gis-leaflet-helper 3.3.13 → 3.3.15

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.
@@ -1 +1 @@
1
- (function(){ try {var elementStyle = document.createElement('style'); elementStyle.appendChild(document.createTextNode(".leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;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{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;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{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.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-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.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-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{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-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height: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{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.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);width:36px;height: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{width:44px;height: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{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;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:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.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{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.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{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.marker-icon{background-color:#fff;border:1px solid #3388ff;border-radius:50%;margin:-8px 0 0 -8px!important;width:14px!important;height:14px!important;outline:0;transition:opacity ease .3s}.marker-icon-middle{opacity:.7;margin:-6px 0 0 -6px!important;width:10px!important;height:10px!important}.leaflet-pm-draggable{cursor:move!important}.cursor-marker{cursor:crosshair;pointer-events:none;opacity:0}.cursor-marker.visible{opacity:1!important}.geoman-draw-cursor,.geoman-draw-cursor .leaflet-interactive{cursor:crosshair}.rect-style-marker,.rect-start-marker{opacity:0}.rect-style-marker.visible,.rect-start-marker.visible{opacity:1!important}.vertexmarker-disabled{opacity:.7}.pm-text-marker{width:0;height:0}.pm-textarea{box-sizing:content-box;background-color:#fff;color:#000;resize:none;border:none;outline:0;cursor:pointer;border-radius:3px;padding-left:7px;padding-bottom:0;padding-top:4px}.leaflet-pm-draggable .pm-textarea{cursor:move}.pm-textarea:focus,.pm-textarea:focus-within,.pm-textarea:focus-visible,.pm-textarea:active{border:2px solid #000;outline:0}.pm-textarea.pm-disabled{border:none;-webkit-user-select:none;user-select:none}.pm-textarea.pm-hasfocus{cursor:auto}.leaflet-pm-toolbar .leaflet-buttons-control-button{padding:5px;box-sizing:border-box;position:relative;z-index:3}.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:first-child:not(.pos-right),.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:last-child.pos-right{border-radius:0}.leaflet-pm-toolbar .button-container a.leaflet-buttons-control-button{border-radius:0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-radius:0 0 2px 2px}.leaflet-pm-toolbar .button-container:first-child a.leaflet-buttons-control-button{border-radius:2px 2px 0 0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-bottom:none}.leaflet-pm-toolbar .control-fa-icon{font-size:19px;line-height:24px}.leaflet-pm-toolbar .control-icon{width:100%;height:100%;box-sizing:border-box;background-size:contain;background-repeat:no-repeat;background-position:center center}.leaflet-pm-toolbar .leaflet-pm-icon-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Marker</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M15.5,24.8782959 C15.2909201,24.8772219 15.1744857,24.8467817 14.6590866,24.2354163 C10.2196955,19.4118054 8,15.5014392 8,12.5043177 C8,8.35979746 11.3578644,5 15.5,5 C19.6421356,5 23,8.35979746 23,12.5043177 C23,17 18.2878217,21.9268378 16.3336601,24.2440186 C15.8224622,24.8501802 15.7090799,24.8793699 15.5,24.8782959 Z M15.5,15.5326948 C17.275201,15.5326948 18.7142857,14.1180004 18.7142857,12.3728864 C18.7142857,10.6277723 17.275201,9.21307792 15.5,9.21307792 C13.724799,9.21307792 12.2857143,10.6277723 12.2857143,12.3728864 C12.2857143,14.1180004 13.724799,15.5326948 15.5,15.5326948 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Marker\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-polygon{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"polygon-a\" d=\"M19.4206892,9.16509725 C19.1523681,8.66992914 19,8.10275831 19,7.5 C19,5.56700338 20.5670034,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 L19.4206892,9.16509725 Z M20.8349073,10.5793063 L10.5793108,20.8349027 C10.6086731,20.8890888 10.6366469,20.9441372 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 C20.9441372,10.6366469 20.8890888,10.6086731 20.8349027,10.5793108 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"polygon-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23polygon-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23polygon-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23polygon-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-polyline{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"line-a\" d=\"M9.16509725,19.4206892 L18.4206892,10.1650973 C18.1523681,9.66992914 18,9.10275831 18,8.5 C18,6.56700338 19.5670034,5 21.5,5 C23.4329966,5 25,6.56700338 25,8.5 C25,10.4329966 23.4329966,12 21.5,12 C20.8972417,12 20.3300709,11.8476319 19.8349027,11.5793108 L10.5793108,20.8349027 C10.8476319,21.3300709 11,21.8972417 11,22.5 C11,24.4329966 9.43299662,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 Z M21.5,10 C22.3284271,10 23,9.32842712 23,8.5 C23,7.67157288 22.3284271,7 21.5,7 C20.6715729,7 20,7.67157288 20,8.5 C20,9.32842712 20.6715729,10 21.5,10 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"line-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23line-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23line-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23line-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-circle{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Circle</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M18.2897751,6.78602275 C18.8924131,6.29464981 19.661797,6 20.5,6 C22.4329966,6 24,7.56700338 24,9.5 C24,10.338203 23.7053502,11.1075869 23.2139772,11.7102249 C23.719599,12.8712053 24,14.1528571 24,15.5 C24,20.7467051 19.7467051,25 14.5,25 C9.25329488,25 5,20.7467051 5,15.5 C5,10.2532949 9.25329488,6 14.5,6 C15.8471429,6 17.1287947,6.28040098 18.2897751,6.78602275 Z M17.1504228,8.4817586 C16.3263581,8.17039236 15.4330777,8 14.5,8 C10.3578644,8 7,11.3578644 7,15.5 C7,19.6421356 10.3578644,23 14.5,23 C18.6421356,23 22,19.6421356 22,15.5 C22,14.5669223 21.8296076,13.6736419 21.5182414,12.8495772 C21.1960383,12.9473968 20.8541622,13 20.5,13 C18.5670034,13 17,11.4329966 17,9.5 C17,9.14583778 17.0526032,8.80396169 17.1504228,8.4817586 Z M14.5,17 C13.6715729,17 13,16.3284271 13,15.5 C13,14.6715729 13.6715729,14 14.5,14 C15.3284271,14 16,14.6715729 16,15.5 C16,16.3284271 15.3284271,17 14.5,17 Z M20.5,11 C21.3284271,11 22,10.3284271 22,9.5 C22,8.67157288 21.3284271,8 20.5,8 C19.6715729,8 19,8.67157288 19,9.5 C19,10.3284271 19.6715729,11 20.5,11 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Circle\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A <g id=\"Atoms/Color/Grey\" mask=\"url(%23mask-2)\" fill=\"%235B5B5B\">%0A <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"30\" height=\"30\"></rect>%0A </g>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-circle-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A%0A<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"%235B5B5B\" stroke-width=\"8\"%0A fill=\"none\">%0A<circle cx=\"50\" cy=\"50\" r=\"35\"/>%0A <circle cx=\"50\" cy=\"50\" r=\"3\" fill=\"%235B5B5B\"/>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rectangle{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rectangle-a\" d=\"M23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.736764 5.30385293,19.2780593 7,19.0354444 L7,10.9645556 C5.30385293,10.7219407 4,9.26323595 4,7.5 C4,5.56700338 5.56700338,4 7.5,4 C9.26323595,4 10.7219407,5.30385293 10.9645556,7 L19.0354444,7 C19.2780593,5.30385293 20.736764,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 Z M21,10.6631844 C20.272154,10.3174225 19.6825775,9.72784598 19.3368156,9 L10.6631844,9 C10.3174225,9.72784598 9.72784598,10.3174225 9,10.6631844 L9,19.3368156 C9.72784598,19.6825775 10.3174225,20.272154 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 Z M7.5,9 C8.32842712,9 9,8.32842712 9,7.5 C9,6.67157288 8.32842712,6 7.5,6 C6.67157288,6 6,6.67157288 6,7.5 C6,8.32842712 6.67157288,9 7.5,9 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"rectangle-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rectangle-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rectangle-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rectangle-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-delete{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Eraser</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M17.7874219,18.4812552 L11.6480079,13.3498184 L6.40466009,19.3816001 L10.5539156,22.9884929 L13.86934,22.9884929 L17.7874219,18.4812552 Z M16.5074252,22.9884929 L26.0000002,22.9884929 L26.0000002,24.9884929 L10.0000002,24.9884929 L9.80708313,24.9884929 L5.09254204,20.8910192 C4.25891285,20.1663564 4.17057814,18.9031112 4.89524093,18.069482 L16.0482444,5.23941916 C16.7729072,4.40578998 18.0361525,4.31745526 18.8697816,5.04211806 L24.9074583,10.2905903 C25.7410875,11.0152531 25.8294222,12.2784983 25.1047594,13.1121275 L16.5074252,22.9884929 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Eraser\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Combined-Shape\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-edit{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"edit_anchor-a\" d=\"M13.5,11 C11.5670034,11 10,9.43299662 10,7.5 C10,5.56700338 11.5670034,4 13.5,4 C15.4329966,4 17,5.56700338 17,7.5 C17,9.43299662 15.4329966,11 13.5,11 Z M13.5,9 C14.3284271,9 15,8.32842712 15,7.5 C15,6.67157288 14.3284271,6 13.5,6 C12.6715729,6 12,6.67157288 12,7.5 C12,8.32842712 12.6715729,9 13.5,9 Z M12.0002889,7.52973893 C12.0125983,8.16273672 12.4170197,8.6996643 12.9807111,8.90767966 L3,15 L3,13 L12.0002889,7.52973893 Z M14.2172722,6.18228472 L19.453125,3 L22.6589355,3 L14.989102,7.68173885 C14.9962971,7.62216459 15,7.56151472 15,7.5 C15,6.93138381 14.6836098,6.4366645 14.2172722,6.18228472 Z M23.4434042,19.2851736 L20.1282799,19.2851736 L21.8729983,23.5349525 C21.9945296,23.8295773 21.8556546,24.1599209 21.5778734,24.2849208 L20.0414675,24.9545142 C19.7550613,25.0795141 19.4338738,24.9366704 19.3123426,24.6509518 L17.6544367,20.6154541 L14.9461873,23.4010151 C14.5852811,23.7721711 14,23.4860463 14,22.9992653 L14,9.57183533 C14,9.05933561 14.6225311,8.809492 14.946156,9.17008555 L23.8340292,18.3120179 C24.1925291,18.6613615 23.9279979,19.2851736 23.4434042,19.2851736 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"edit_anchor-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23edit_anchor-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23edit_anchor-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23edit_anchor-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-drag{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"move-a\" d=\"M21,14 L21,10 L27,15 L21,20 L21,16 L16,16 L16,21 L20,21 L15,27 L10,21 L14,21 L14,16 L9,16 L9,20 L3,15 L9,10 L9,14 L14,14 L14,9 L10,9 L15,3 L20,9 L16,9 L16,14 L21,14 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"move-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23move-a\"/>%0A </mask>%0A <use fill=\"%23D8D8D8\" xlink:href=\"%23move-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23move-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-cut{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Scissors</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M12.9691574,13.4939435 L21.0317032,5.54167013 L23.4649499,5.67722957 L17.0470713,14.5106816 L27.5660336,17.1333535 L25.7891944,18.8012588 L14.5854951,17.8987506 L13.6487955,19.188007 C13.794639,19.2650958 13.9367985,19.3534417 14.0741377,19.4532245 C15.6379648,20.5894114 15.9846357,22.7782052 14.8484488,24.3420324 C13.7122619,25.9058595 11.5234681,26.2525304 9.95964096,25.1163435 C8.39581384,23.9801565 8.04914296,21.7913627 9.18532986,20.2275356 C9.74587276,19.4560145 10.5626188,18.9807475 11.4341218,18.8336407 L12.6805656,17.1180579 L12.5239724,16.3747216 L11.9506932,15.3012391 L9.89310646,14.7882251 C9.13093796,15.2357261 8.19977854,15.3966447 7.27445355,15.1659352 C5.39887519,14.698301 4.25751094,12.7987519 4.72514515,10.9231736 C5.19277935,9.04759519 7.09232846,7.90623094 8.96790682,8.37386515 C10.8434852,8.84149935 11.9848494,10.7410485 11.5172152,12.6166268 C11.4761464,12.7813449 11.4240335,12.9404001 11.3618627,13.0931999 L12.9691574,13.4939435 Z M7.75829735,13.2253438 C8.56211664,13.4257584 9.37620912,12.9366023 9.57662378,12.132783 C9.77703844,11.3289637 9.28788233,10.5148713 8.48406303,10.3144566 C7.68024373,10.1140419 6.86615126,10.603198 6.6657366,11.4070173 C6.46532194,12.2108366 6.95447805,13.0249291 7.75829735,13.2253438 Z M10.8033639,21.4031061 C10.3164266,22.0733177 10.4649998,23.0113722 11.1352115,23.4983095 C11.8054231,23.9852467 12.7434776,23.8366735 13.2304148,23.1664619 C13.7173521,22.4962502 13.5687788,21.5581957 12.8985672,21.0712585 C12.2283556,20.5843212 11.2903011,20.7328945 10.8033639,21.4031061 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Scissors\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(16.093194, 15.663351) rotate(-32.000000) translate(-16.093194, -15.663351) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-snapping{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->%0A <title>Atoms/Icons/Tools/Magnet</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M21.9994759,10.9428183 L21.9999985,16.3710417 C22,16.6872007 22,17.0058278 22,17.3269411 C22,21.5646545 18.6421356,25 14.5,25 C10.3578644,25 7,21.5646545 7,17.3269411 L7.00087508,10.9907507 L11.0022808,10.9984125 C11.0017033,11.6980114 11.001247,12.4168248 11.0008992,13.1554887 L11,17.3269411 C11,19.3756809 12.5876841,21 14.5,21 C16.4123159,21 18,19.3756809 18,17.3269411 C18,15.0702032 17.9995696,12.9619668 17.998539,10.9910032 L21.9994759,10.9428183 Z M10,7 C10.5522847,7 11,7.44771525 11,8 L11,10 L7,10 L7,8 C7,7.44771525 7.44771525,7 8,7 L10,7 Z M21,7 C21.5522847,7 22,7.44771525 22,8 L22,10 L18,10 L18,8 C18,7.44771525 18.4477153,7 19,7 L21,7 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Magnet\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(14.500000, 16.000000) rotate(45.000000) translate(-14.500000, -16.000000) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rotate{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rotate\" d=\"M21.2,5.8c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.4-0.5l-0.2-0.3l2.8-3.1L18,0.6l-4.6,0.1l0.5,4.5l0.5,4.5l3.2-3.6v0.1l0.1,0.2c0.1,0.1,0.1,0.2,0.2,0.2l0.1,0.2C18,7,18,7.1,18.1,7.2c0.3,0.7,0.6,1.4,0.7,2.1c0.2,1.4,0,2.9-0.6,4.2L18,13.9L17.9,14l-0.3,0.5l-0.1,0.2c-0.2,0.2-0.4,0.5-0.6,0.7c-0.5,0.5-1.1,1-1.7,1.3c-0.6,0.4-1.3,0.6-2.1,0.8c-0.7,0.1-1.5,0.2-2.2,0.1c-0.8-0.1-1.5-0.3-2.2-0.5c-0.7-0.3-1.3-0.7-1.9-1.2l-0.4-0.4l-0.2-0.3L6,15c-0.1-0.1-0.2-0.2-0.2-0.3l-0.3-0.4l-0.1-0.1l-0.2-0.4c0-0.1-0.1-0.1-0.1-0.2l-0.3-0.5l-0.1-0.2c-0.1-0.3-0.2-0.6-0.3-0.9c-0.2-0.8-0.3-1.6-0.3-2.4c0-0.2,0-0.3,0-0.5V8.9c0-0.2,0-0.3,0.1-0.4l0.1-0.6l0.2-0.6c0.3-0.8,0.7-1.5,1.2-2.2c0.5-0.7,1.1-1.3,1.8-1.8c0.2-0.1,0.3-0.4,0.1-0.6C7.5,2.6,7.4,2.5,7.3,2.5H7.1L7,2.6C6.1,3,5.4,3.6,4.7,4.2C4,4.9,3.5,5.7,3,6.6c-0.9,1.8-1.2,3.8-0.8,5.8c0.1,0.5,0.2,0.9,0.3,1.4l0.3,0.8C2.9,14.7,3,14.8,3,15l0.2,0.4c0,0.1,0.1,0.2,0.1,0.2l0.3,0.5c0.1,0.2,0.2,0.3,0.3,0.5l0.1,0.2c0.1,0.1,0.2,0.3,0.3,0.4L5,17.8c0.7,0.7,1.6,1.3,2.5,1.8c0.9,0.5,1.9,0.8,3,0.9c0.5,0.1,1,0.1,1.5,0.1c0.6,0,1.1,0,1.6-0.1c1-0.2,2.1-0.5,3-1l0.2-0.1c0.2-0.1,0.3-0.2,0.5-0.3l0.7-0.4c0.2-0.1,0.3-0.2,0.4-0.3l0.2-0.2c0.2-0.1,0.4-0.3,0.5-0.5l0.1-0.1c0.3-0.3,0.7-0.7,0.9-1l0.6-0.9l0.4-0.6c1-1.9,1.4-4.1,1.1-6.2C22,7.8,21.7,6.7,21.2,5.8z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 2)\">%0A <mask id=\"rotate-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rotate\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rotate\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rotate-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-text{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><defs><style>.cls-1{fill:none;stroke:%235b5b5b;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.5px;}<\\/style></defs><title>Text</title><g id=\"Ebene_2\" data-name=\"Ebene 2\"><polyline class=\"cls-1\" points=\"19.64 7.27 19.64 4 12 4 12 20 15.91 20 8.09 20 12 20 12 4 4.36 4 4.36 7.27\"/></g></svg>')}.leaflet-buttons-control-button:hover,.leaflet-buttons-control-button:focus{cursor:pointer;background-color:#f4f4f4}.active>.leaflet-buttons-control-button{box-shadow:inset 0 -1px 5px 2px #514d4d4f}.leaflet-buttons-control-text-hide{display:none}.button-container{position:relative}.button-container .leaflet-pm-actions-container{z-index:2;position:absolute;top:0;left:100%;display:none;white-space:nowrap;direction:ltr}.leaflet-right .leaflet-pm-toolbar .button-container .leaflet-pm-actions-container{right:100%;left:auto}.button-container.active .leaflet-pm-actions-container{display:block}.button-container .leaflet-pm-actions-container:not(.pos-right) a.leaflet-pm-action:last-child{border-radius:0 3px 3px 0;border-right:0}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:first-child{border-radius:3px 0 0 3px}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:last-child{border-right:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action{padding:0 10px;background-color:#666;color:#fff;display:inline-block;width:auto;border-right:1px solid #eee;-webkit-user-select:none;user-select:none;border-bottom:none;height:29px;line-height:29px;vertical-align:middle}.leaflet-pm-toolbar .button-container:first-child.pos-right.active a.leaflet-buttons-control-button{border-top-left-radius:0}.leaflet-pm-toolbar .button-container:first-child.active:not(.pos-right) a.leaflet-buttons-control-button{border-top-right-radius:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action:hover,.button-container .leaflet-pm-actions-container .leaflet-pm-action:focus{cursor:pointer;background-color:#777}.button-container .leaflet-pm-actions-container .leaflet-pm-action.active-action{background-color:#8e8e8e}.leaflet-pm-toolbar.activeChild{z-index:801}.leaflet-buttons-control-button.pm-disabled{background-color:#f4f4f4}.leaflet-buttons-control-button.pm-disabled>.control-icon{filter:opacity(.6)}.button-container .leaflet-pm-actions-container .pm-action-button-mode.control-icon{filter:brightness(0) invert(1);width:18px}body{height:100%;margin:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-family:Microsoft YaHei,Arial,sans-serif}label{font-weight:700}html{height:100%;box-sizing:border-box}#app{height:100%}*,*:before,*:after{box-sizing:inherit}a:focus,a:active{outline:none}a,a:focus,a:hover{cursor:pointer;text-decoration:none}div:focus{outline:none}.clearfix:after{visibility:hidden;display:block;font-size:0;content:\" \";clear:both;height:0}.leaflet-left .leaflet-control{margin-left:5px}.leaflet-right .leaflet-control{margin-right:5px}.leaflet-top .leaflet-control{margin-top:5px}.leaflet-bottom .leaflet-control{margin-bottom:5px}.leaflet-div-icon{border:none!important;background:transparent!important;text-align:center}.leaflet-measure-path-measurement{position:absolute;left:0;top:0;font-size:13px;font-weight:700;color:red;text-shadow:-1px 0 0 white,-1px -1px 0 white,0 -1px 0 white,1px -1px 0 white,1px 0 0 white,1px 1px 0 white,0 1px 0 white,-1px 1px 0 white;white-space:nowrap;transform-origin:0;pointer-events:none;z-index:9999}.leaflet-measure-path-measurement>div{position:relative;margin-top:-50%;left:-50%}.leaflet-control-scale-line{border:1px solid #999;border-top:none;padding:0;text-align:center;white-space:nowrap;overflow:hidden;color:#fff;height:26px;line-height:26px;text-shadow:0 0 2px #fff}.leaflet-control-container>div{display:flex;align-items:flex-end}.leaflet-text-label{position:absolute;transform:translate(calc(-50% + 4px),-6px);padding:2px 4px;white-space:nowrap;cursor:default}#text-input-icon{max-width:80px}\n.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;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{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;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{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.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-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.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-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{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-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height: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{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.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);width:36px;height: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{width:44px;height: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{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;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:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.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{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.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{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.marker-icon{background-color:#fff;border:1px solid #3388ff;border-radius:50%;margin:-8px 0 0 -8px!important;width:14px!important;height:14px!important;outline:0;transition:opacity ease .3s}.marker-icon-middle{opacity:.7;margin:-6px 0 0 -6px!important;width:10px!important;height:10px!important}.leaflet-pm-draggable{cursor:move!important}.cursor-marker{cursor:crosshair;pointer-events:none;opacity:0}.cursor-marker.visible{opacity:1!important}.geoman-draw-cursor,.geoman-draw-cursor .leaflet-interactive{cursor:crosshair}.rect-style-marker,.rect-start-marker{opacity:0}.rect-style-marker.visible,.rect-start-marker.visible{opacity:1!important}.vertexmarker-disabled{opacity:.7}.pm-text-marker{width:0;height:0}.pm-textarea{box-sizing:content-box;background-color:#fff;color:#000;resize:none;border:none;outline:0;cursor:pointer;border-radius:3px;padding-left:7px;padding-bottom:0;padding-top:4px}.leaflet-pm-draggable .pm-textarea{cursor:move}.pm-textarea:focus,.pm-textarea:focus-within,.pm-textarea:focus-visible,.pm-textarea:active{border:2px solid #000;outline:0}.pm-textarea.pm-disabled{border:none;-webkit-user-select:none;user-select:none}.pm-textarea.pm-hasfocus{cursor:auto}.leaflet-pm-toolbar .leaflet-buttons-control-button{padding:5px;box-sizing:border-box;position:relative;z-index:3}.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:first-child:not(.pos-right),.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:last-child.pos-right{border-radius:0}.leaflet-pm-toolbar .button-container a.leaflet-buttons-control-button{border-radius:0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-radius:0 0 2px 2px}.leaflet-pm-toolbar .button-container:first-child a.leaflet-buttons-control-button{border-radius:2px 2px 0 0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-bottom:none}.leaflet-pm-toolbar .control-fa-icon{font-size:19px;line-height:24px}.leaflet-pm-toolbar .control-icon{width:100%;height:100%;box-sizing:border-box;background-size:contain;background-repeat:no-repeat;background-position:center center}.leaflet-pm-toolbar .leaflet-pm-icon-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Marker</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M15.5,24.8782959 C15.2909201,24.8772219 15.1744857,24.8467817 14.6590866,24.2354163 C10.2196955,19.4118054 8,15.5014392 8,12.5043177 C8,8.35979746 11.3578644,5 15.5,5 C19.6421356,5 23,8.35979746 23,12.5043177 C23,17 18.2878217,21.9268378 16.3336601,24.2440186 C15.8224622,24.8501802 15.7090799,24.8793699 15.5,24.8782959 Z M15.5,15.5326948 C17.275201,15.5326948 18.7142857,14.1180004 18.7142857,12.3728864 C18.7142857,10.6277723 17.275201,9.21307792 15.5,9.21307792 C13.724799,9.21307792 12.2857143,10.6277723 12.2857143,12.3728864 C12.2857143,14.1180004 13.724799,15.5326948 15.5,15.5326948 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Marker\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-polygon{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"polygon-a\" d=\"M19.4206892,9.16509725 C19.1523681,8.66992914 19,8.10275831 19,7.5 C19,5.56700338 20.5670034,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 L19.4206892,9.16509725 Z M20.8349073,10.5793063 L10.5793108,20.8349027 C10.6086731,20.8890888 10.6366469,20.9441372 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 C20.9441372,10.6366469 20.8890888,10.6086731 20.8349027,10.5793108 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"polygon-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23polygon-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23polygon-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23polygon-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-polyline{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"line-a\" d=\"M9.16509725,19.4206892 L18.4206892,10.1650973 C18.1523681,9.66992914 18,9.10275831 18,8.5 C18,6.56700338 19.5670034,5 21.5,5 C23.4329966,5 25,6.56700338 25,8.5 C25,10.4329966 23.4329966,12 21.5,12 C20.8972417,12 20.3300709,11.8476319 19.8349027,11.5793108 L10.5793108,20.8349027 C10.8476319,21.3300709 11,21.8972417 11,22.5 C11,24.4329966 9.43299662,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 Z M21.5,10 C22.3284271,10 23,9.32842712 23,8.5 C23,7.67157288 22.3284271,7 21.5,7 C20.6715729,7 20,7.67157288 20,8.5 C20,9.32842712 20.6715729,10 21.5,10 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"line-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23line-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23line-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23line-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-circle{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Circle</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M18.2897751,6.78602275 C18.8924131,6.29464981 19.661797,6 20.5,6 C22.4329966,6 24,7.56700338 24,9.5 C24,10.338203 23.7053502,11.1075869 23.2139772,11.7102249 C23.719599,12.8712053 24,14.1528571 24,15.5 C24,20.7467051 19.7467051,25 14.5,25 C9.25329488,25 5,20.7467051 5,15.5 C5,10.2532949 9.25329488,6 14.5,6 C15.8471429,6 17.1287947,6.28040098 18.2897751,6.78602275 Z M17.1504228,8.4817586 C16.3263581,8.17039236 15.4330777,8 14.5,8 C10.3578644,8 7,11.3578644 7,15.5 C7,19.6421356 10.3578644,23 14.5,23 C18.6421356,23 22,19.6421356 22,15.5 C22,14.5669223 21.8296076,13.6736419 21.5182414,12.8495772 C21.1960383,12.9473968 20.8541622,13 20.5,13 C18.5670034,13 17,11.4329966 17,9.5 C17,9.14583778 17.0526032,8.80396169 17.1504228,8.4817586 Z M14.5,17 C13.6715729,17 13,16.3284271 13,15.5 C13,14.6715729 13.6715729,14 14.5,14 C15.3284271,14 16,14.6715729 16,15.5 C16,16.3284271 15.3284271,17 14.5,17 Z M20.5,11 C21.3284271,11 22,10.3284271 22,9.5 C22,8.67157288 21.3284271,8 20.5,8 C19.6715729,8 19,8.67157288 19,9.5 C19,10.3284271 19.6715729,11 20.5,11 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Circle\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A <g id=\"Atoms/Color/Grey\" mask=\"url(%23mask-2)\" fill=\"%235B5B5B\">%0A <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"30\" height=\"30\"></rect>%0A </g>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-circle-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A%0A<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"%235B5B5B\" stroke-width=\"8\"%0A fill=\"none\">%0A<circle cx=\"50\" cy=\"50\" r=\"35\"/>%0A <circle cx=\"50\" cy=\"50\" r=\"3\" fill=\"%235B5B5B\"/>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rectangle{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rectangle-a\" d=\"M23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.736764 5.30385293,19.2780593 7,19.0354444 L7,10.9645556 C5.30385293,10.7219407 4,9.26323595 4,7.5 C4,5.56700338 5.56700338,4 7.5,4 C9.26323595,4 10.7219407,5.30385293 10.9645556,7 L19.0354444,7 C19.2780593,5.30385293 20.736764,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 Z M21,10.6631844 C20.272154,10.3174225 19.6825775,9.72784598 19.3368156,9 L10.6631844,9 C10.3174225,9.72784598 9.72784598,10.3174225 9,10.6631844 L9,19.3368156 C9.72784598,19.6825775 10.3174225,20.272154 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 Z M7.5,9 C8.32842712,9 9,8.32842712 9,7.5 C9,6.67157288 8.32842712,6 7.5,6 C6.67157288,6 6,6.67157288 6,7.5 C6,8.32842712 6.67157288,9 7.5,9 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"rectangle-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rectangle-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rectangle-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rectangle-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-delete{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Eraser</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M17.7874219,18.4812552 L11.6480079,13.3498184 L6.40466009,19.3816001 L10.5539156,22.9884929 L13.86934,22.9884929 L17.7874219,18.4812552 Z M16.5074252,22.9884929 L26.0000002,22.9884929 L26.0000002,24.9884929 L10.0000002,24.9884929 L9.80708313,24.9884929 L5.09254204,20.8910192 C4.25891285,20.1663564 4.17057814,18.9031112 4.89524093,18.069482 L16.0482444,5.23941916 C16.7729072,4.40578998 18.0361525,4.31745526 18.8697816,5.04211806 L24.9074583,10.2905903 C25.7410875,11.0152531 25.8294222,12.2784983 25.1047594,13.1121275 L16.5074252,22.9884929 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Eraser\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Combined-Shape\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-edit{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"edit_anchor-a\" d=\"M13.5,11 C11.5670034,11 10,9.43299662 10,7.5 C10,5.56700338 11.5670034,4 13.5,4 C15.4329966,4 17,5.56700338 17,7.5 C17,9.43299662 15.4329966,11 13.5,11 Z M13.5,9 C14.3284271,9 15,8.32842712 15,7.5 C15,6.67157288 14.3284271,6 13.5,6 C12.6715729,6 12,6.67157288 12,7.5 C12,8.32842712 12.6715729,9 13.5,9 Z M12.0002889,7.52973893 C12.0125983,8.16273672 12.4170197,8.6996643 12.9807111,8.90767966 L3,15 L3,13 L12.0002889,7.52973893 Z M14.2172722,6.18228472 L19.453125,3 L22.6589355,3 L14.989102,7.68173885 C14.9962971,7.62216459 15,7.56151472 15,7.5 C15,6.93138381 14.6836098,6.4366645 14.2172722,6.18228472 Z M23.4434042,19.2851736 L20.1282799,19.2851736 L21.8729983,23.5349525 C21.9945296,23.8295773 21.8556546,24.1599209 21.5778734,24.2849208 L20.0414675,24.9545142 C19.7550613,25.0795141 19.4338738,24.9366704 19.3123426,24.6509518 L17.6544367,20.6154541 L14.9461873,23.4010151 C14.5852811,23.7721711 14,23.4860463 14,22.9992653 L14,9.57183533 C14,9.05933561 14.6225311,8.809492 14.946156,9.17008555 L23.8340292,18.3120179 C24.1925291,18.6613615 23.9279979,19.2851736 23.4434042,19.2851736 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"edit_anchor-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23edit_anchor-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23edit_anchor-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23edit_anchor-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-drag{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"move-a\" d=\"M21,14 L21,10 L27,15 L21,20 L21,16 L16,16 L16,21 L20,21 L15,27 L10,21 L14,21 L14,16 L9,16 L9,20 L3,15 L9,10 L9,14 L14,14 L14,9 L10,9 L15,3 L20,9 L16,9 L16,14 L21,14 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"move-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23move-a\"/>%0A </mask>%0A <use fill=\"%23D8D8D8\" xlink:href=\"%23move-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23move-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-cut{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Scissors</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M12.9691574,13.4939435 L21.0317032,5.54167013 L23.4649499,5.67722957 L17.0470713,14.5106816 L27.5660336,17.1333535 L25.7891944,18.8012588 L14.5854951,17.8987506 L13.6487955,19.188007 C13.794639,19.2650958 13.9367985,19.3534417 14.0741377,19.4532245 C15.6379648,20.5894114 15.9846357,22.7782052 14.8484488,24.3420324 C13.7122619,25.9058595 11.5234681,26.2525304 9.95964096,25.1163435 C8.39581384,23.9801565 8.04914296,21.7913627 9.18532986,20.2275356 C9.74587276,19.4560145 10.5626188,18.9807475 11.4341218,18.8336407 L12.6805656,17.1180579 L12.5239724,16.3747216 L11.9506932,15.3012391 L9.89310646,14.7882251 C9.13093796,15.2357261 8.19977854,15.3966447 7.27445355,15.1659352 C5.39887519,14.698301 4.25751094,12.7987519 4.72514515,10.9231736 C5.19277935,9.04759519 7.09232846,7.90623094 8.96790682,8.37386515 C10.8434852,8.84149935 11.9848494,10.7410485 11.5172152,12.6166268 C11.4761464,12.7813449 11.4240335,12.9404001 11.3618627,13.0931999 L12.9691574,13.4939435 Z M7.75829735,13.2253438 C8.56211664,13.4257584 9.37620912,12.9366023 9.57662378,12.132783 C9.77703844,11.3289637 9.28788233,10.5148713 8.48406303,10.3144566 C7.68024373,10.1140419 6.86615126,10.603198 6.6657366,11.4070173 C6.46532194,12.2108366 6.95447805,13.0249291 7.75829735,13.2253438 Z M10.8033639,21.4031061 C10.3164266,22.0733177 10.4649998,23.0113722 11.1352115,23.4983095 C11.8054231,23.9852467 12.7434776,23.8366735 13.2304148,23.1664619 C13.7173521,22.4962502 13.5687788,21.5581957 12.8985672,21.0712585 C12.2283556,20.5843212 11.2903011,20.7328945 10.8033639,21.4031061 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Scissors\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(16.093194, 15.663351) rotate(-32.000000) translate(-16.093194, -15.663351) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-snapping{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->%0A <title>Atoms/Icons/Tools/Magnet</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M21.9994759,10.9428183 L21.9999985,16.3710417 C22,16.6872007 22,17.0058278 22,17.3269411 C22,21.5646545 18.6421356,25 14.5,25 C10.3578644,25 7,21.5646545 7,17.3269411 L7.00087508,10.9907507 L11.0022808,10.9984125 C11.0017033,11.6980114 11.001247,12.4168248 11.0008992,13.1554887 L11,17.3269411 C11,19.3756809 12.5876841,21 14.5,21 C16.4123159,21 18,19.3756809 18,17.3269411 C18,15.0702032 17.9995696,12.9619668 17.998539,10.9910032 L21.9994759,10.9428183 Z M10,7 C10.5522847,7 11,7.44771525 11,8 L11,10 L7,10 L7,8 C7,7.44771525 7.44771525,7 8,7 L10,7 Z M21,7 C21.5522847,7 22,7.44771525 22,8 L22,10 L18,10 L18,8 C18,7.44771525 18.4477153,7 19,7 L21,7 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Magnet\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(14.500000, 16.000000) rotate(45.000000) translate(-14.500000, -16.000000) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rotate{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rotate\" d=\"M21.2,5.8c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.4-0.5l-0.2-0.3l2.8-3.1L18,0.6l-4.6,0.1l0.5,4.5l0.5,4.5l3.2-3.6v0.1l0.1,0.2c0.1,0.1,0.1,0.2,0.2,0.2l0.1,0.2C18,7,18,7.1,18.1,7.2c0.3,0.7,0.6,1.4,0.7,2.1c0.2,1.4,0,2.9-0.6,4.2L18,13.9L17.9,14l-0.3,0.5l-0.1,0.2c-0.2,0.2-0.4,0.5-0.6,0.7c-0.5,0.5-1.1,1-1.7,1.3c-0.6,0.4-1.3,0.6-2.1,0.8c-0.7,0.1-1.5,0.2-2.2,0.1c-0.8-0.1-1.5-0.3-2.2-0.5c-0.7-0.3-1.3-0.7-1.9-1.2l-0.4-0.4l-0.2-0.3L6,15c-0.1-0.1-0.2-0.2-0.2-0.3l-0.3-0.4l-0.1-0.1l-0.2-0.4c0-0.1-0.1-0.1-0.1-0.2l-0.3-0.5l-0.1-0.2c-0.1-0.3-0.2-0.6-0.3-0.9c-0.2-0.8-0.3-1.6-0.3-2.4c0-0.2,0-0.3,0-0.5V8.9c0-0.2,0-0.3,0.1-0.4l0.1-0.6l0.2-0.6c0.3-0.8,0.7-1.5,1.2-2.2c0.5-0.7,1.1-1.3,1.8-1.8c0.2-0.1,0.3-0.4,0.1-0.6C7.5,2.6,7.4,2.5,7.3,2.5H7.1L7,2.6C6.1,3,5.4,3.6,4.7,4.2C4,4.9,3.5,5.7,3,6.6c-0.9,1.8-1.2,3.8-0.8,5.8c0.1,0.5,0.2,0.9,0.3,1.4l0.3,0.8C2.9,14.7,3,14.8,3,15l0.2,0.4c0,0.1,0.1,0.2,0.1,0.2l0.3,0.5c0.1,0.2,0.2,0.3,0.3,0.5l0.1,0.2c0.1,0.1,0.2,0.3,0.3,0.4L5,17.8c0.7,0.7,1.6,1.3,2.5,1.8c0.9,0.5,1.9,0.8,3,0.9c0.5,0.1,1,0.1,1.5,0.1c0.6,0,1.1,0,1.6-0.1c1-0.2,2.1-0.5,3-1l0.2-0.1c0.2-0.1,0.3-0.2,0.5-0.3l0.7-0.4c0.2-0.1,0.3-0.2,0.4-0.3l0.2-0.2c0.2-0.1,0.4-0.3,0.5-0.5l0.1-0.1c0.3-0.3,0.7-0.7,0.9-1l0.6-0.9l0.4-0.6c1-1.9,1.4-4.1,1.1-6.2C22,7.8,21.7,6.7,21.2,5.8z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 2)\">%0A <mask id=\"rotate-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rotate\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rotate\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rotate-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-text{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><defs><style>.cls-1{fill:none;stroke:%235b5b5b;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.5px;}<\\/style></defs><title>Text</title><g id=\"Ebene_2\" data-name=\"Ebene 2\"><polyline class=\"cls-1\" points=\"19.64 7.27 19.64 4 12 4 12 20 15.91 20 8.09 20 12 20 12 4 4.36 4 4.36 7.27\"/></g></svg>')}.leaflet-buttons-control-button:hover,.leaflet-buttons-control-button:focus{cursor:pointer;background-color:#f4f4f4}.active>.leaflet-buttons-control-button{box-shadow:inset 0 -1px 5px 2px #514d4d4f}.leaflet-buttons-control-text-hide{display:none}.button-container{position:relative}.button-container .leaflet-pm-actions-container{z-index:2;position:absolute;top:0;left:100%;display:none;white-space:nowrap;direction:ltr}.leaflet-right .leaflet-pm-toolbar .button-container .leaflet-pm-actions-container{right:100%;left:auto}.button-container.active .leaflet-pm-actions-container{display:block}.button-container .leaflet-pm-actions-container:not(.pos-right) a.leaflet-pm-action:last-child{border-radius:0 3px 3px 0;border-right:0}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:first-child{border-radius:3px 0 0 3px}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:last-child{border-right:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action{padding:0 10px;background-color:#666;color:#fff;display:inline-block;width:auto;border-right:1px solid #eee;-webkit-user-select:none;user-select:none;border-bottom:none;height:29px;line-height:29px;vertical-align:middle}.leaflet-pm-toolbar .button-container:first-child.pos-right.active a.leaflet-buttons-control-button{border-top-left-radius:0}.leaflet-pm-toolbar .button-container:first-child.active:not(.pos-right) a.leaflet-buttons-control-button{border-top-right-radius:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action:hover,.button-container .leaflet-pm-actions-container .leaflet-pm-action:focus{cursor:pointer;background-color:#777}.button-container .leaflet-pm-actions-container .leaflet-pm-action.active-action{background-color:#8e8e8e}.leaflet-pm-toolbar.activeChild{z-index:801}.leaflet-buttons-control-button.pm-disabled{background-color:#f4f4f4}.leaflet-buttons-control-button.pm-disabled>.control-icon{filter:opacity(.6)}.button-container .leaflet-pm-actions-container .pm-action-button-mode.control-icon{filter:brightness(0) invert(1);width:18px}body{height:100%;margin:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-family:Microsoft YaHei,Arial,sans-serif}label{font-weight:700}html{height:100%;box-sizing:border-box}#app{height:100%}*,*:before,*:after{box-sizing:inherit}a:focus,a:active{outline:none}a,a:focus,a:hover{cursor:pointer;text-decoration:none}div:focus{outline:none}.clearfix:after{visibility:hidden;display:block;font-size:0;content:\" \";clear:both;height:0}.leaflet-left .leaflet-control{margin-left:5px}.leaflet-right .leaflet-control{margin-right:5px}.leaflet-top .leaflet-control{margin-top:5px}.leaflet-bottom .leaflet-control{margin-bottom:5px}.leaflet-div-icon{border:none!important;background:transparent!important;text-align:center}.leaflet-measure-path-measurement{position:absolute;left:0;top:0;font-size:13px;font-weight:700;color:red;text-shadow:-1px 0 0 white,-1px -1px 0 white,0 -1px 0 white,1px -1px 0 white,1px 0 0 white,1px 1px 0 white,0 1px 0 white,-1px 1px 0 white;white-space:nowrap;transform-origin:0;pointer-events:none;z-index:9999}.leaflet-measure-path-measurement>div{position:relative;margin-top:-50%;left:-50%}.leaflet-control-scale-line{border:1px solid #999;border-top:none;padding:0;text-align:center;white-space:nowrap;overflow:hidden;color:#fff;height:26px;line-height:26px;text-shadow:0 0 2px #fff}.leaflet-control-container>div{display:flex;align-items:flex-end}.leaflet-text-label{position:absolute;transform:translate(calc(-50% + 4px),-6px);padding:2px 4px;white-space:nowrap;cursor:default}#text-input-icon{max-width:80px}")); document.head.appendChild(elementStyle);} catch(e) {console.error('vite-plugin-css-injected-by-js', e);} })();!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("gis-common")):"function"==typeof define&&define.amd?define(["exports","gis-common"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["gis-leaflet-helper"]={},t.Gis)}(this,function(t,e){"use strict";var i=Object.defineProperty,n=(t,e,n)=>((t,e,n)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function a(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var i=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,n.get?n:{enumerable:!0,get:function(){return t[e]}})}),i}var r,h={exports:{}};function l(){return r||(r=1,function(t){var e="1.9.4";function i(t){var e,i,n,s;for(i=1,n=arguments.length;i<n;i++)for(e in s=arguments[i])t[e]=s[e];return t}var n=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function s(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var o=0;function a(t){return"_leaflet_id"in t||(t._leaflet_id=++o),t._leaflet_id}function r(t,e,i){var n,s,o,a;return a=function(){n=!1,s&&(o.apply(i,s),s=!1)},o=function(){n?s=arguments:(t.apply(i,arguments),setTimeout(a,e),n=!0)},o}function h(t,e,i){var n=e[1],s=e[0],o=n-s;return t===n&&i?t:((t-s)%o+o)%o+s}function l(){return!1}function c(t,e){if(!1===e)return t;var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function p(t){return u(t).split(/\s+/)}function d(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?n(t.options):{}),e)t.options[i]=e[i];return t.options}function _(t,e,i){var n=[];for(var s in t)n.push(encodeURIComponent(i?s.toUpperCase():s)+"="+encodeURIComponent(t[s]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var m=/\{ *([\w_ -]+) *\}/g;function g(t,e){return t.replace(m,function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})}var f=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var A="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function v(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var M=0;function x(t){var e=+new Date,i=Math.max(0,16-(e-M));return M=e+i,window.setTimeout(t,i)}var b=window.requestAnimationFrame||v("RequestAnimationFrame")||x,w=window.cancelAnimationFrame||v("CancelAnimationFrame")||v("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function P(t,e,i){if(!i||b!==x)return b.call(window,s(t,e));t.call(e)}function k(t){t&&w.call(window,t)}var E={__proto__:null,extend:i,create:n,bind:s,get lastId(){return o},stamp:a,throttle:r,wrapNum:h,falseFn:l,formatNum:c,trim:u,splitWords:p,setOptions:d,getParamString:_,template:g,isArray:f,indexOf:y,emptyImageUrl:A,requestFn:b,cancelFn:w,requestAnimFrame:P,cancelAnimFrame:k};function C(){}function S(t){if("undefined"!=typeof L&&L&&L.Mixin){t=f(t)?t:[t];for(var e=0;e<t.length;e++)t[e],L.Mixin.Events}}C.extend=function(t){var e=function(){d(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},s=e.__super__=this.prototype,o=n(s);for(var a in o.constructor=e,e.prototype=o,this)Object.prototype.hasOwnProperty.call(this,a)&&"prototype"!==a&&"__super__"!==a&&(e[a]=this[a]);return t.statics&&i(e,t.statics),t.includes&&(S(t.includes),i.apply(null,[o].concat(t.includes))),i(o,t),delete o.statics,delete o.includes,o.options&&(o.options=s.options?n(s.options):{},i(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},e},C.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},C.mergeOptions=function(t){return i(this.prototype.options,t),this},C.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 n in t)this._on(n,t[n],e);else for(var s=0,o=(t=p(t)).length;s<o;s++)this._on(t[s],e,i);return this},off:function(t,e,i){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=p(t);for(var s=1===arguments.length,o=0,a=t.length;o<a;o++)s?this._off(t[o]):this._off(t[o],e,i)}else delete this._events;return this},_on:function(t,e,i,n){if("function"==typeof e&&!1===this._listens(t,e,i)){i===this&&(i=void 0);var s={fn:e,ctx:i};n&&(s.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(s)}},_off:function(t,e,i){var n,s,o;if(this._events&&(n=this._events[t]))if(1!==arguments.length){if("function"==typeof e){var a=this._listens(t,e,i);if(!1!==a){var r=n[a];this._firingCount&&(r.fn=l,this._events[t]=n=n.slice()),n.splice(a,1)}}}else{if(this._firingCount)for(s=0,o=n.length;s<o;s++)n[s].fn=l;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var s=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var a=0,r=o.length;a<r;a++){var h=o[a],l=h.fn;h.once&&this.off(t,l,h.ctx),l.call(h.ctx||this,s)}this._firingCount--}}return n&&this._propagateEvent(s),this},listens:function(t,e,i,n){var s=e;"function"!=typeof e&&(n=!!e,s=void 0,i=void 0);var o=this._events&&this._events[t];if(o&&o.length&&!1!==this._listens(t,s,i))return!0;if(n)for(var a in this._eventParents)if(this._eventParents[a].listens(t,e,i,n))return!0;return!1},_listens:function(t,e,i){if(!this._events)return!1;var n=this._events[t]||[];if(!e)return!!n.length;i===this&&(i=void 0);for(var s=0,o=n.length;s<o;s++)if(n[s].fn===e&&n[s].ctx===i)return s;return!1},once:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e,!0);else for(var s=0,o=(t=p(t)).length;s<o;s++)this._on(t[s],e,i,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[a(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[a(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 O=C.extend(T);function B(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var I=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function D(t,e,i){return t instanceof B?t:f(t)?new B(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new B(t.x,t.y):new B(t,e,i)}function R(t,e){if(t)for(var i=e?[t,e]:t,n=0,s=i.length;n<s;n++)this.extend(i[n])}function z(t,e){return!t||t instanceof R?t:new R(t,e)}function G(t,e){if(t)for(var i=e?[t,e]:t,n=0,s=i.length;n<s;n++)this.extend(i[n])}function N(t,e){return t instanceof G?t:new G(t,e)}function j(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 j?t:f(t)&&"object"!=typeof t[0]?3===t.length?new j(t[0],t[1],t[2]):2===t.length?new j(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new j(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new j(t,e,i)}B.prototype={clone:function(){return new B(this.x,this.y)},add:function(t){return this.clone()._add(D(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(D(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 B(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new B(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=I(this.x),this.y=I(this.y),this},distanceTo:function(t){var e=(t=D(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=D(t)).x===this.x&&t.y===this.y},contains:function(t){return t=D(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)+")"}},R.prototype={extend:function(t){var e,i;if(!t)return this;if(t instanceof B||"number"==typeof t[0]||"x"in t)e=i=D(t);else if(e=(t=z(t)).min,i=t.max,!e||!i)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)):(this.min=e.clone(),this.max=i.clone()),this},getCenter:function(t){return D((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return D(this.min.x,this.max.y)},getTopRight:function(){return D(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 B?D(t):z(t))instanceof R?(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,n=t.min,s=t.max,o=s.x>=e.x&&n.x<=i.x,a=s.y>=e.y&&n.y<=i.y;return o&&a},overlaps:function(t){t=z(t);var e=this.min,i=this.max,n=t.min,s=t.max,o=s.x>e.x&&n.x<i.x,a=s.y>e.y&&n.y<i.y;return o&&a},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,i=this.max,n=Math.abs(e.x-i.x)*t,s=Math.abs(e.y-i.y)*t;return z(D(e.x-n,e.y-s),D(i.x+n,i.y+s))},equals:function(t){return!!t&&(t=z(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},G.prototype={extend:function(t){var e,i,n=this._southWest,s=this._northEast;if(t instanceof j)e=t,i=t;else{if(!(t instanceof G))return t?this.extend(F(t)||N(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||s?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),s.lat=Math.max(i.lat,s.lat),s.lng=Math.max(i.lng,s.lng)):(this._southWest=new j(e.lat,e.lng),this._northEast=new j(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new G(new j(e.lat-n,e.lng-s),new j(i.lat+n,i.lng+s))},getCenter:function(){return new j((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 j(this.getNorth(),this.getWest())},getSouthEast:function(){return new j(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 j||"lat"in t?F(t):N(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof G?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=N(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),o=s.lat>=e.lat&&n.lat<=i.lat,a=s.lng>=e.lng&&n.lng<=i.lng;return o&&a},overlaps:function(t){t=N(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),o=s.lat>e.lat&&n.lat<i.lat,a=s.lng>e.lng&&n.lng<i.lng;return o&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=N(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},j.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 N([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new j(this.lat,this.lng,this.alt)}};var U,Z={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t);return new R(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?h(t.lng,this.wrapLng,!0):t.lng;return new j(this.wrapLat?h(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,s=e.lng-i.lng;if(0===n&&0===s)return t;var o=t.getSouthWest(),a=t.getNorthEast();return new G(new j(o.lat-n,o.lng-s),new j(a.lat-n,a.lng-s))}},H=i({},Z,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,s=e.lat*i,o=Math.sin((e.lat-t.lat)*i/2),a=Math.sin((e.lng-t.lng)*i/2),r=o*o+Math.cos(n)*Math.cos(s)*a*a,h=2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r));return this.R*h}}),q=6378137,V={R:q,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=Math.sin(n*e);return new B(this.R*t.lng*e,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var e=180/Math.PI;return new j((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(U=q*Math.PI,new R([-U,-U],[U,U]))};function W(t,e,i,n){if(f(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=n}function K(t,e,i,n){return new W(t,e,i,n)}W.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new B((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var X,Y=i({},H,{code:"EPSG:3857",projection:V,transformation:(X=.5/(Math.PI*V.R),K(X,.5,-X,.5))}),$=i({},Y,{code:"EPSG:900913"});function J(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Q(t,e){var i,n,s,o,a,r,h="";for(i=0,s=t.length;i<s;i++){for(n=0,o=(a=t[i]).length;n<o;n++)h+=(n?"L":"M")+(r=a[n]).x+" "+r.y;h+=e?Nt.svg?"z":"x":""}return h||"M0 0"}var tt,et=document.documentElement.style,it="ActiveXObject"in window,nt=it&&!document.addEventListener,st="msLaunchUri"in navigator&&!("documentMode"in document),ot=Gt("webkit"),at=Gt("android"),rt=Gt("android 2")||Gt("android 3"),ht=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),lt=at&&Gt("Google")&&ht<537&&!("AudioNode"in window),ct=!!window.opera,ut=!st&&Gt("chrome"),pt=Gt("gecko")&&!ot&&!ct&&!it,dt=!ut&&Gt("safari"),_t=Gt("phantom"),mt="OTransition"in et,gt=0===navigator.platform.indexOf("Win"),ft=it&&"transition"in et,yt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,At="MozPerspective"in et,vt=!window.L_DISABLE_3D&&(ft||yt||At)&&!mt&&!_t,Mt="undefined"!=typeof orientation||Gt("mobile"),Lt=Mt&&ot,xt=Mt&&yt,bt=!window.PointerEvent&&window.MSPointerEvent,wt=!(!window.PointerEvent&&!bt),Pt="ontouchstart"in window||!!window.TouchEvent,kt=!window.L_NO_TOUCH&&(Pt||wt),Et=Mt&&ct,Ct=Mt&&pt,St=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Tt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",l,e),window.removeEventListener("testPassiveEventSupport",l,e)}catch(i){}return t}(),Ot=!!document.createElement("canvas").getContext,Bt=!(!document.createElementNS||!J("svg").createSVGRect),It=!!Bt&&((tt=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(tt.firstChild&&tt.firstChild.namespaceURI)),Dt=!Bt&&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}}(),Rt=0===navigator.platform.indexOf("Mac"),zt=0===navigator.platform.indexOf("Linux");function Gt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Nt={ie:it,ielt9:nt,edge:st,webkit:ot,android:at,android23:rt,androidStock:lt,opera:ct,chrome:ut,gecko:pt,safari:dt,phantom:_t,opera12:mt,win:gt,ie3d:ft,webkit3d:yt,gecko3d:At,any3d:vt,mobile:Mt,mobileWebkit:Lt,mobileWebkit3d:xt,msPointer:bt,pointer:wt,touch:kt,touchNative:Pt,mobileOpera:Et,mobileGecko:Ct,retina:St,passiveEvents:Tt,canvas:Ot,svg:Bt,vml:Dt,inlineSvg:It,mac:Rt,linux:zt},jt=Nt.msPointer?"MSPointerDown":"pointerdown",Ft=Nt.msPointer?"MSPointerMove":"pointermove",Ut=Nt.msPointer?"MSPointerUp":"pointerup",Zt=Nt.msPointer?"MSPointerCancel":"pointercancel",Ht={touchstart:jt,touchmove:Ft,touchend:Ut,touchcancel:Zt},qt={touchstart:ee,touchmove:te,touchend:te,touchcancel:te},Vt={},Wt=!1;function Kt(t,e,i){return"touchstart"===e&&Qt(),qt[e]?(i=qt[e].bind(this,i),t.addEventListener(Ht[e],i,!1),i):l}function Xt(t,e,i){Ht[e]&&t.removeEventListener(Ht[e],i,!1)}function Yt(t){Vt[t.pointerId]=t}function $t(t){Vt[t.pointerId]&&(Vt[t.pointerId]=t)}function Jt(t){delete Vt[t.pointerId]}function Qt(){Wt||(document.addEventListener(jt,Yt,!0),document.addEventListener(Ft,$t,!0),document.addEventListener(Ut,Jt,!0),document.addEventListener(Zt,Jt,!0),Wt=!0)}function te(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Vt)e.touches.push(Vt[i]);e.changedTouches=[e],t(e)}}function ee(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Ye(e),te(t,e)}function ie(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var ne=200;function se(t,e){t.addEventListener("dblclick",e);var i,n=0;function s(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var s=Je(t);if(!s.some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})||s.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})){var o=Date.now();o-n<=ne?2===++i&&e(ie(t)):i=1,n=o}}}else i=t.detail}return t.addEventListener("click",s),{dblclick:e,simDblclick:s}}function oe(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var ae,re,he,le,ce,ue=Ee(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),pe=Ee(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===pe||"OTransition"===pe?pe+"End":"transitionend";function _e(t){return"string"==typeof t?document.getElementById(t):t}function me(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function ge(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function fe(t){var e=t.parentNode;e&&e.removeChild(t)}function ye(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Ae(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ve(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Me(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=we(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function Le(t,e){if(void 0!==t.classList)for(var i=p(e),n=0,s=i.length;n<s;n++)t.classList.add(i[n]);else if(!Me(t,e)){var o=we(t);be(t,(o?o+" ":"")+e)}}function xe(t,e){void 0!==t.classList?t.classList.remove(e):be(t,u((" "+we(t)+" ").replace(" "+e+" "," ")))}function be(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function we(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function Pe(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&ke(t,e)}function ke(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(s){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}function Ee(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function Ce(t,e,i){var n=e||new B(0,0);t.style[ue]=(Nt.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function Se(t,e){t._leaflet_pos=e,Nt.any3d?Ce(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Te(t){return t._leaflet_pos||new B(0,0)}if("onselectstart"in document)ae=function(){je(window,"selectstart",Ye)},re=function(){Ue(window,"selectstart",Ye)};else{var Oe=Ee(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ae=function(){if(Oe){var t=document.documentElement.style;he=t[Oe],t[Oe]="none"}},re=function(){Oe&&(document.documentElement.style[Oe]=he,he=void 0)}}function Be(){je(window,"dragstart",Ye)}function Ie(){Ue(window,"dragstart",Ye)}function De(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Re(),le=t,ce=t.style.outlineStyle,t.style.outlineStyle="none",je(window,"keydown",Re))}function Re(){le&&(le.style.outlineStyle=ce,le=void 0,ce=void 0,Ue(window,"keydown",Re))}function ze(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ge(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ne={__proto__:null,TRANSFORM:ue,TRANSITION:pe,TRANSITION_END:de,get:_e,getStyle:me,create:ge,remove:fe,empty:ye,toFront:Ae,toBack:ve,hasClass:Me,addClass:Le,removeClass:xe,setClass:be,getClass:we,setOpacity:Pe,testProp:Ee,setTransform:Ce,setPosition:Se,getPosition:Te,get disableTextSelection(){return ae},get enableTextSelection(){return re},disableImageDrag:Be,enableImageDrag:Ie,preventOutline:De,restoreOutline:Re,getSizedParentNode:ze,getScale:Ge};function je(t,e,i,n){if(e&&"object"==typeof e)for(var s in e)qe(t,s,e[s],i);else for(var o=0,a=(e=p(e)).length;o<a;o++)qe(t,e[o],i,n);return this}var Fe="_leaflet_events";function Ue(t,e,i,n){if(1===arguments.length)Ze(t),delete t[Fe];else if(e&&"object"==typeof e)for(var s in e)Ve(t,s,e[s],i);else if(e=p(e),2===arguments.length)Ze(t,function(t){return-1!==y(e,t)});else for(var o=0,a=e.length;o<a;o++)Ve(t,e[o],i,n);return this}function Ze(t,e){for(var i in t[Fe]){var n=i.split(/\d/)[0];e&&!e(n)||Ve(t,n,null,null,i)}}var He={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function qe(t,e,i,n){var s=e+a(i)+(n?"_"+a(n):"");if(t[Fe]&&t[Fe][s])return this;var o=function(e){return i.call(n||t,e||window.event)},r=o;!Nt.touchNative&&Nt.pointer&&0===e.indexOf("touch")?o=Kt(t,e,o):Nt.touch&&"dblclick"===e?o=se(t,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(He[e]||e,o,!!Nt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(o=function(e){e=e||window.event,ii(t,e)&&r(e)},t.addEventListener(He[e],o,!1)):t.addEventListener(e,r,!1):t.attachEvent("on"+e,o),t[Fe]=t[Fe]||{},t[Fe][s]=o}function Ve(t,e,i,n,s){s=s||e+a(i)+(n?"_"+a(n):"");var o=t[Fe]&&t[Fe][s];if(!o)return this;!Nt.touchNative&&Nt.pointer&&0===e.indexOf("touch")?Xt(t,e,o):Nt.touch&&"dblclick"===e?oe(t,o):"removeEventListener"in t?t.removeEventListener(He[e]||e,o,!1):t.detachEvent("on"+e,o),t[Fe][s]=null}function We(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ke(t){return qe(t,"wheel",We),this}function Xe(t){return je(t,"mousedown touchstart dblclick contextmenu",We),t._leaflet_disable_click=!0,this}function Ye(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function $e(t){return Ye(t),We(t),this}function Je(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function Qe(t,e){if(!e)return new B(t.clientX,t.clientY);var i=Ge(e),n=i.boundingClientRect;return new B((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var ti=Nt.linux&&Nt.chrome?window.devicePixelRatio:Nt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function ei(t){return Nt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/ti:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function ii(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t}var ni={__proto__:null,on:je,off:Ue,stopPropagation:We,disableScrollPropagation:Ke,disableClickPropagation:Xe,preventDefault:Ye,stop:$e,getPropagationPath:Je,getMousePosition:Qe,getWheelDelta:ei,isExternalTarget:ii,addListener:je,removeListener:Ue},si=O.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=Te(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=P(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),Se(this._el,i),this.fire("step")},_complete:function(){k(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),oi=O.extend({options:{crs:Y,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=s(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=pe&&Nt.any3d&&!Nt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),je(this._proxy,de,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(F(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e,n.pan&&n.pan.noMoveStart),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(Nt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Nt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),o=(t instanceof B?t:this.latLngToContainerPoint(t)).subtract(s).multiplyBy(1-1/n),a=this.containerPointToLatLng(s.add(o));return this.setView(a,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():N(t);var i=D(e.paddingTopLeft||e.padding||[0,0]),n=D(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));if((s="number"==typeof e.maxZoom?Math.min(e.maxZoom,s):s)===1/0)return{center:t.getCenter(),zoom:s};var o=n.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),s),r=this.project(t.getNorthEast(),s);return{center:this.unproject(a.add(r).divideBy(2).add(o),s),zoom:s}},fitBounds:function(t,e){if(!(t=N(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=D(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 si,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){Le(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||!Nt.any3d)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),s=this.project(t),o=this.getSize(),a=this._zoom;t=F(t),e=void 0===e?a:e;var r=Math.max(o.x,o.y),h=r*this.getZoomScale(a,e),l=s.distanceTo(n)||1,c=1.42,u=c*c;function p(t){var e=(h*h-r*r+(t?-1:1)*u*u*l*l)/(2*(t?h:r)*u*l),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 _(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return d(t)/_(t)}var g=p(0);function f(t){return r*(_(g)/_(g+c*t))}function y(t){return r*(_(g)*m(g+c*t)-d(g))/u}function A(t){return 1-Math.pow(1-t,1.5)}var v=Date.now(),M=(p(1)-g)/c,L=i.duration?1e3*i.duration:1e3*M*.8;function x(){var i=(Date.now()-v)/L,o=A(i)*M;i<=1?(this._flyToFrame=P(x,this),this._move(this.unproject(n.add(s.subtract(n).multiplyBy(y(o)/l)),a),this.getScaleZoom(r/f(o),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),x.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=N(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,N(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=D((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=D(e.paddingBottomRight||e.padding||[0,0]),s=this.project(this.getCenter()),o=this.project(t),a=this.getPixelBounds(),r=z([a.min.add(i),a.max.subtract(n)]),h=r.getSize();if(!r.contains(o)){this._enforcingBounds=!0;var l=o.subtract(r.getCenter()),c=r.extend(o).getSize().subtract(h);s.x+=l.x<0?-c.x:c.x,s.y+=l.y<0?-c.y:c.y,this.panTo(this.unproject(s),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 n=this.getSize(),o=e.divideBy(2).round(),a=n.divideBy(2).round(),r=o.subtract(a);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):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=s(this._handleGeolocationResponse,this),n=s(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,n,t):navigator.geolocation.getCurrentPosition(e,n,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new j(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var s=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(s,n.maxZoom):s)}var o={latlng:e,bounds:i,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(o[a]=t.coords[a]);this.fire("locationfound",o)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),fe(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)fe(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=ge("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new G(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=N(t),i=D(i||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),r=t.getSouthEast(),h=this.getSize().subtract(i),l=z(this.project(r,n),this.project(a,n)).getSize(),c=Nt.any3d?this.options.zoomSnap:1,u=h.x/l.x,p=h.y/l.y,d=e?Math.max(u,p):Math.min(u,p);return n=this.getScaleZoom(d,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(s,Math.min(o,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new B(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 R(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},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(D(t),e)},layerPointToLatLng:function(t){var e=D(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(N(t))},distance:function(t,e){return this.options.crs.distance(F(t),F(e))},containerPointToLayerPoint:function(t){return D(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return D(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(D(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=_e(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");je(e,"scroll",this._onScroll,this),this._containerId=a(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Nt.any3d,Le(t,"leaflet-container"+(Nt.touch?" leaflet-touch":"")+(Nt.retina?" leaflet-retina":"")+(Nt.ielt9?" leaflet-oldie":"")+(Nt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=me(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Se(this._mapPane,new B(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Le(t.markerPane,"leaflet-zoom-hide"),Le(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){Se(this._mapPane,new B(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var s=this._zoom!==e;this._moveStart(s,i)._move(t,e)._moveEnd(s),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,i,n){void 0===e&&(e=this._zoom);var s=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((s||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return k(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Se(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[a(this._container)]=this;var e=t?Ue:je;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),Nt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){k(this._resizeRequest),this._resizeRequest=P(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,n=[],s="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,r=!1;o;){if((i=this._targets[a(o)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(s&&!ii(o,t))break;if(n.push(i),s)break}if(o===this._container)break;o=o.parentNode}return n.length||r||s||!this.listens(e,!0)||(n=[this]),n},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var i=t.type;"mousedown"===i&&De(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var s=i({},t);s.type="preclick",this._fireDOMEvent(s,s.type,n)}var o=this._findEventTargets(t,e);if(n){for(var a=[],r=0;r<n.length;r++)n[r].listens(e,!0)&&a.push(n[r]);o=a.concat(o)}if(o.length){"contextmenu"===e&&Ye(t);var h=o[0],l={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var c=h.getLatLng&&(!h._radius||h._radius<=10);l.containerPoint=c?this.latLngToContainerPoint(h.getLatLng()):this.mouseEventToContainerPoint(t),l.layerPoint=this.containerPointToLayerPoint(l.containerPoint),l.latlng=c?h.getLatLng():this.layerPointToLatLng(l.layerPoint)}for(r=0;r<o.length;r++)if(o[r].fire(e,l,!0),l.originalEvent._stopped||!1===o[r].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Te(this._mapPane)||new B(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 n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return z([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),o=new R(n.subtract(s),n.add(s)),a=this._getBoundsOffset(o,i,e);return Math.abs(a.x)<=1&&Math.abs(a.y)<=1?t:this.unproject(n.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new R(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=z(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),s=n.min.subtract(t.min),o=n.max.subtract(t.max);return new B(this._rebound(s.x,-o.x),this._rebound(s.y,-o.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(),n=Nt.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){xe(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=ge("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=ue,i=this._proxy.style[e];Ce(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(){fe(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Ce(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 n=this.getZoomScale(e),s=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(s)||(P(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,Le(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&xe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function ai(t,e){return new oi(t,e)}var ri=C.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(),n=t._controlCorners[i];return Le(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(fe(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()}}),hi=function(t){return new ri(t)};oi.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=ge("div",e+"control-container",this._container);function n(n,s){var o=e+n+" "+e+s;t[n+s]=ge("div",o,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)fe(this._controlCorners[t]);fe(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var li=ri.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in d(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return ri.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(a(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){Le(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?(Le(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):xe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return xe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ge("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Xe(e),Ke(e);var n=this._section=ge("section",t+"-list");i&&(this._map.on("click",this.collapse,this),je(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var s=this._layersLink=ge("a",t+"-toggle",e);s.href="#",s.title="Layers",s.setAttribute("role","button"),je(s,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){Ye(t),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=ge("div",t+"-base",n),this._separator=ge("div",t+"-separator",n),this._overlaysList=ge("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&a(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(s(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;ye(this._baseLayersList),ye(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,s=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,s+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&s>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(a(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"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+a(this),n),this._layerControlInputs.push(e),e.layerId=a(t.layer),je(e,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var o=document.createElement("span");return i.appendChild(o),o.appendChild(e),o.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,n=[],s=[];this._handlingClick=!0;for(var o=i.length-1;o>=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||s.push(e);for(o=0;o<s.length;o++)this._map.hasLayer(s[o])&&this._map.removeLayer(s[o]);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])||this._map.addLayer(n[o]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),s=i.length-1;s>=0;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,je(t,"click",Ye),this.expand();var e=this;setTimeout(function(){Ue(t,"click",Ye),e._preventClick=!1})}}),ci=function(t,e,i){return new li(t,e,i)},ui=ri.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=ge("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),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,n,s){var o=ge("a",i,n);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),Xe(o),je(o,"click",$e),je(o,"click",s,this),je(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";xe(this._zoomInButton,e),xe(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(Le(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(Le(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});oi.mergeOptions({zoomControl:!0}),oi.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new ui,this.addControl(this.zoomControl))});var pi=function(t){return new ui(t)},di=ri.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=ge("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.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=ge("div",e,i)),t.imperial&&(this._iScale=ge("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,s=3.2808399*t;s>5280?(e=s/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(s),this._updateScale(this._iScale,n+" ft",n/s))},_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)}}),_i=function(t){return new di(t)},mi='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',gi=ri.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Nt.inlineSvg?mi+" ":"")+"Leaflet</a>"},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=ge("div","leaflet-control-attribution"),Xe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' <span aria-hidden="true">|</span> ')}}});oi.mergeOptions({attributionControl:!0}),oi.addInitHook(function(){this.options.attributionControl&&(new gi).addTo(this)});var fi=function(t){return new gi(t)};ri.Layers=li,ri.Zoom=ui,ri.Scale=di,ri.Attribution=gi,hi.layers=ci,hi.zoom=pi,hi.scale=_i,hi.attribution=fi;var yi=C.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}});yi.addTo=function(t,e){return t.addHandler(e,this),this};var Ai={Events:T},vi=Nt.touch?"touchstart mousedown":"mousedown",Mi=O.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){d(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(je(this._dragStartTarget,vi,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Mi._dragging===this&&this.finishDrag(!0),Ue(this._dragStartTarget,vi,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!Me(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)Mi._dragging===this&&this.finishDrag();else if(!(Mi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(Mi._dragging=this,this._preventOutline&&De(this._element),Be(),ae(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,i=ze(this._element);this._startPoint=new B(e.clientX,e.clientY),this._startPos=Te(this._element),this._parentScale=Ge(i);var n="mousedown"===t.type;je(document,n?"mousemove":"touchmove",this._onMove,this),je(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new B(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,Ye(t),this._moved||(this.fire("dragstart"),this._moved=!0,Le(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Le(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Se(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){xe(document.body,"leaflet-dragging"),this._lastTarget&&(xe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ue(document,"mousemove touchmove",this._onMove,this),Ue(document,"mouseup touchend touchcancel",this._onUp,this),Ie(),re();var e=this._moved&&this._moving;this._moving=!1,Mi._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function Li(t,e,i){var n,s,o,a,r,h,l,c,u,p=[1,4,2,8];for(s=0,l=t.length;s<l;s++)t[s]._code=Di(t[s],e);for(a=0;a<4;a++){for(c=p[a],n=[],s=0,o=(l=t.length)-1;s<l;o=s++)r=t[s],h=t[o],r._code&c?h._code&c||((u=Ii(h,r,c,e,i))._code=Di(u,e),n.push(u)):(h._code&c&&((u=Ii(h,r,c,e,i))._code=Di(u,e),n.push(u)),n.push(r));t=n}return t}function xi(t,e){var i,n,s,o,a,r,h,l,c;if(!t||0===t.length)throw new Error("latlngs not passed");Gi(t)||(t=t[0]);var u=F([0,0]),p=N(t);p.getNorthWest().distanceTo(p.getSouthWest())*p.getNorthEast().distanceTo(p.getNorthWest())<1700&&(u=bi(t));var d=t.length,_=[];for(i=0;i<d;i++){var m=F(t[i]);_.push(e.project(F([m.lat-u.lat,m.lng-u.lng])))}for(r=h=l=0,i=0,n=d-1;i<d;n=i++)s=_[i],o=_[n],a=s.y*o.x-o.y*s.x,h+=(s.x+o.x)*a,l+=(s.y+o.y)*a,r+=3*a;c=0===r?_[0]:[h/r,l/r];var g=e.unproject(D(c));return F([g.lat+u.lat,g.lng+u.lng])}function bi(t){for(var e=0,i=0,n=0,s=0;s<t.length;s++){var o=F(t[s]);e+=o.lat,i+=o.lng,n++}return F([e/n,i/n])}var wi,Pi={__proto__:null,clipPolygon:Li,polygonCenter:xi,centroid:bi};function ki(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=Si(t=Oi(t,i),i)}function Ei(t,e,i){return Math.sqrt(zi(t,e,i,!0))}function Ci(t,e,i){return zi(t,e,i)}function Si(t,e){var i=t.length,n=new("undefined"!=typeof Uint8Array?Uint8Array:Array)(i);n[0]=n[i-1]=1,Ti(t,n,e,0,i-1);var s,o=[];for(s=0;s<i;s++)n[s]&&o.push(t[s]);return o}function Ti(t,e,i,n,s){var o,a,r,h=0;for(a=n+1;a<=s-1;a++)(r=zi(t[a],t[n],t[s],!0))>h&&(o=a,h=r);h>i&&(e[o]=1,Ti(t,e,i,n,o),Ti(t,e,i,o,s))}function Oi(t,e){for(var i=[t[0]],n=1,s=0,o=t.length;n<o;n++)Ri(t[n],t[s])>e&&(i.push(t[n]),s=n);return s<o-1&&i.push(t[o-1]),i}function Bi(t,e,i,n,s){var o,a,r,h=n?wi:Di(t,i),l=Di(e,i);for(wi=l;;){if(!(h|l))return[t,e];if(h&l)return!1;r=Di(a=Ii(t,e,o=h||l,i,s),i),o===h?(t=a,h=r):(e=a,l=r)}}function Ii(t,e,i,n,s){var o,a,r=e.x-t.x,h=e.y-t.y,l=n.min,c=n.max;return 8&i?(o=t.x+r*(c.y-t.y)/h,a=c.y):4&i?(o=t.x+r*(l.y-t.y)/h,a=l.y):2&i?(o=c.x,a=t.y+h*(c.x-t.x)/r):1&i&&(o=l.x,a=t.y+h*(l.x-t.x)/r),new B(o,a,s)}function Di(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 Ri(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function zi(t,e,i,n){var s,o=e.x,a=e.y,r=i.x-o,h=i.y-a,l=r*r+h*h;return l>0&&((s=((t.x-o)*r+(t.y-a)*h)/l)>1?(o=i.x,a=i.y):s>0&&(o+=r*s,a+=h*s)),r=t.x-o,h=t.y-a,n?r*r+h*h:new B(o,a)}function Gi(t){return!f(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Ni(t){return Gi(t)}function ji(t,e){var i,n,s,o,a,r,h,l;if(!t||0===t.length)throw new Error("latlngs not passed");Gi(t)||(t=t[0]);var c=F([0,0]),u=N(t);u.getNorthWest().distanceTo(u.getSouthWest())*u.getNorthEast().distanceTo(u.getNorthWest())<1700&&(c=bi(t));var p=t.length,d=[];for(i=0;i<p;i++){var _=F(t[i]);d.push(e.project(F([_.lat-c.lat,_.lng-c.lng])))}for(i=0,n=0;i<p-1;i++)n+=d[i].distanceTo(d[i+1])/2;if(0===n)l=d[0];else for(i=0,o=0;i<p-1;i++)if(a=d[i],r=d[i+1],(o+=s=a.distanceTo(r))>n){h=(o-n)/s,l=[r.x-h*(r.x-a.x),r.y-h*(r.y-a.y)];break}var m=e.unproject(D(l));return F([m.lat+c.lat,m.lng+c.lng])}var Fi={__proto__:null,simplify:ki,pointToSegmentDistance:Ei,closestPointOnSegment:Ci,clipSegment:Bi,_getEdgeIntersection:Ii,_getBitCode:Di,_sqClosestPointOnSegment:zi,isFlat:Gi,_flat:Ni,polylineCenter:ji},Ui={project:function(t){return new B(t.lng,t.lat)},unproject:function(t){return new j(t.y,t.x)},bounds:new R([-180,-90],[180,90])},Zi={R:6378137,R_MINOR:6356752.314245179,bounds:new R([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,s=this.R_MINOR/i,o=Math.sqrt(1-s*s),a=o*Math.sin(n),r=Math.tan(Math.PI/4-n/2)/Math.pow((1-a)/(1+a),o/2);return n=-i*Math.log(Math.max(r,1e-10)),new B(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,s=this.R_MINOR/n,o=Math.sqrt(1-s*s),a=Math.exp(-t.y/n),r=Math.PI/2-2*Math.atan(a),h=0,l=.1;h<15&&Math.abs(l)>1e-7;h++)e=o*Math.sin(r),e=Math.pow((1-e)/(1+e),o/2),r+=l=Math.PI/2-2*Math.atan(a*e)-r;return new j(r*i,t.x*i/n)}},Hi={__proto__:null,LonLat:Ui,Mercator:Zi,SphericalMercator:V},qi=i({},H,{code:"EPSG:3395",projection:Zi,transformation:function(){var t=.5/(Math.PI*Zi.R);return K(t,.5,-t,.5)}()}),Vi=i({},H,{code:"EPSG:4326",projection:Ui,transformation:K(1/180,1,-1/180,.5)}),Wi=i({},Z,{projection:Ui,transformation:K(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});Z.Earth=H,Z.EPSG3395=qi,Z.EPSG3857=Y,Z.EPSG900913=$,Z.EPSG4326=Vi,Z.Simple=Wi;var Ki=O.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[a(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[a(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});oi.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=a(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=a(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return a(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?f(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[a(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=a(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var s=this._zoomBoundLayers[n].options;t=void 0===s.minZoom?t:Math.min(t,s.minZoom),e=void 0===s.maxZoom?e:Math.max(e,s.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 Xi=Ki.extend({initialize:function(t,e){var i,n;if(d(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);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 a(t)}}),Yi=function(t,e){return new Xi(t,e)},$i=Xi.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Xi.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),Xi.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 G;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Ji=function(t,e){return new $i(t,e)},Qi=C.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){d(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var s=D(n),o=D("shadow"===e&&i.shadowAnchor||i.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Nt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function tn(t){return new Qi(t)}var en=Qi.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof en.imagePath&&(en.imagePath=this._detectIconPath()),(this.options.imagePath||en.imagePath)+Qi.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,i){var n=e.exec(t);return n&&n[i]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=ge("div","leaflet-default-icon-path",document.body),e=me(t,"background-image")||me(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""}}),nn=yi.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Mi(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Le(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&&xe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,o=Te(e._icon),a=i.getPixelBounds(),r=i.getPixelOrigin(),h=z(a.min._subtract(r).add(s),a.max._subtract(r).subtract(s));if(!h.contains(o)){var l=D((Math.max(h.max.x,o.x)-h.max.x)/(a.max.x-h.max.x)-(Math.min(h.min.x,o.x)-h.min.x)/(a.min.x-h.min.x),(Math.max(h.max.y,o.y)-h.max.y)/(a.max.y-h.max.y)-(Math.min(h.min.y,o.y)-h.min.y)/(a.min.y-h.min.y)).multiplyBy(n);i.panBy(l,{animate:!1}),this._draggable._newPos._add(l),this._draggable._startPos._add(l),Se(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=P(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=P(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=Te(e._icon),s=e._map.layerPointToLatLng(n);i&&Se(i,n),e._latlng=s,t.latlng=s,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)}}),sn=Ki.extend({options:{icon:new en,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=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),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),Le(i,e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&je(i,"focus",this._panOnFocus,this);var s=t.icon.createShadow(this._shadow),o=!1;s!==this._shadow&&(this._removeShadow(),o=!0),s&&(Le(s,e),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ue(this._icon,"focus",this._panOnFocus,this),fe(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&fe(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Se(this._icon,t),this._shadow&&Se(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(Le(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),nn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new nn(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&&Pe(this._icon,t),this._shadow&&Pe(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,i=e.iconSize?D(e.iconSize):D(0,0),n=e.iconAnchor?D(e.iconAnchor):D(0,0);t.panInside(this._latlng,{paddingTopLeft:n,paddingBottomRight:i.subtract(n)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function on(t,e){return new sn(t,e)}var an=Ki.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return d(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),rn=an.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 an.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(),n=[t+i,e+i];this._pxBounds=new R(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function hn(t,e){return new rn(t,e)}var ln=rn.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{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 G(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:an.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===H.distance){var s=Math.PI/180,o=this._mRadius/H.R/s,a=i.project([e+o,t]),r=i.project([e-o,t]),h=a.add(r).divideBy(2),l=i.unproject(h).lat,c=Math.acos((Math.cos(o*s)-Math.sin(e*s)*Math.sin(l*s))/(Math.cos(e*s)*Math.cos(l*s)))/s;(isNaN(c)||0===c)&&(c=o/Math.cos(Math.PI/180*e)),this._point=h.subtract(i.getPixelOrigin()),this._radius=isNaN(c)?0:h.x-i.project([l,t-c]).x,this._radiusY=h.y-a.y}else{var u=n.unproject(n.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 cn(t,e,i){return new ln(t,e,i)}var un=an.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,n=1/0,s=null,o=zi,a=0,r=this._parts.length;a<r;a++)for(var h=this._parts[a],l=1,c=h.length;l<c;l++){var u=o(t,e=h[l-1],i=h[l],!0);u<n&&(n=u,s=o(t,e,i))}return s&&(s.distance=Math.sqrt(n)),s},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return ji(this._defaultShape(),this._map.options.crs)},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 G,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Gi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=Gi(t),n=0,s=t.length;n<s;n++)i?(e[n]=F(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new R;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 B(t,t);this._rawPxBounds&&(this._pxBounds=new R([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,i){var n,s,o=t[0]instanceof j,a=t.length;if(o){for(s=[],n=0;n<a;n++)s[n]=this._map.latLngToLayerPoint(t[n]),i.extend(s[n]);e.push(s)}else for(n=0;n<a;n++)this._projectLatlngs(t[n],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,n,s,o,a,r,h=this._parts;for(e=0,n=0,s=this._rings.length;e<s;e++)for(i=0,o=(r=this._rings[e]).length;i<o-1;i++)(a=Bi(r[i],r[i+1],t,i,!0))&&(h[n]=h[n]||[],h[n].push(a[0]),a[1]===r[i+1]&&i!==o-2||(h[n].push(a[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=ki(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,n,s,o,a,r,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,o=this._parts.length;i<o;i++)for(n=0,s=(a=(r=this._parts[i]).length)-1;n<a;s=n++)if((e||0!==n)&&Ei(t,r[s],r[n])<=h)return!0;return!1}});function pn(t,e){return new un(t,e)}un._flat=Ni;var dn=un.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return xi(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=un.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof j&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){un.prototype._setLatLngs.call(this,t),Gi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Gi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new B(e,e);if(t=new R(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 n,s=0,o=this._rings.length;s<o;s++)(n=Li(this._rings[s],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,s,o,a,r,h,l=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,r=this._parts.length;s<r;s++)for(o=0,a=(h=(e=this._parts[s]).length)-1;o<h;a=o++)i=e[o],n=e[a],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||un.prototype._containsPoint.call(this,t,!0)}});function _n(t,e){return new dn(t,e)}var mn=$i.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=f(t)?t:t.features;if(s){for(e=0,i=s.length;e<i;e++)((n=s[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var a=gn(t,o);return a?(a.feature=xn(t),a.defaultOptions=a.options,this.resetStyle(a),o.onEachFeature&&o.onEachFeature(t,a),this.addLayer(a)):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 gn(t,e){var i,n,s,o,a="Feature"===t.type?t.geometry:t,r=a?a.coordinates:null,h=[],l=e&&e.pointToLayer,c=e&&e.coordsToLatLng||yn;if(!r&&!a)return null;switch(a.type){case"Point":return fn(l,t,i=c(r),e);case"MultiPoint":for(s=0,o=r.length;s<o;s++)i=c(r[s]),h.push(fn(l,t,i,e));return new $i(h);case"LineString":case"MultiLineString":return n=An(r,"LineString"===a.type?0:1,c),new un(n,e);case"Polygon":case"MultiPolygon":return n=An(r,"Polygon"===a.type?1:2,c),new dn(n,e);case"GeometryCollection":for(s=0,o=a.geometries.length;s<o;s++){var u=gn({geometry:a.geometries[s],type:"Feature",properties:t.properties},e);u&&h.push(u)}return new $i(h);case"FeatureCollection":for(s=0,o=a.features.length;s<o;s++){var p=gn(a.features[s],e);p&&h.push(p)}return new $i(h);default:throw new Error("Invalid GeoJSON object.")}}function fn(t,e,i,n){return t?t(e,i):new sn(i,n&&n.markersInheritOptions&&n)}function yn(t){return new j(t[1],t[0],t[2])}function An(t,e,i){for(var n,s=[],o=0,a=t.length;o<a;o++)n=e?An(t[o],e-1,i):(i||yn)(t[o]),s.push(n);return s}function vn(t,e){return void 0!==(t=F(t)).alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function Mn(t,e,i,n){for(var s=[],o=0,a=t.length;o<a;o++)s.push(e?Mn(t[o],Gi(t[o])?0:e-1,i,n):vn(t[o],n));return!e&&i&&s.length>0&&s.push(s[0].slice()),s}function Ln(t,e){return t.feature?i({},t.feature,{geometry:e}):xn(e)}function xn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var bn={toGeoJSON:function(t){return Ln(this,{type:"Point",coordinates:vn(this.getLatLng(),t)})}};function wn(t,e){return new mn(t,e)}sn.include(bn),ln.include(bn),rn.include(bn),un.include({toGeoJSON:function(t){var e=!Gi(this._latlngs);return Ln(this,{type:(e?"Multi":"")+"LineString",coordinates:Mn(this._latlngs,e?1:0,!1,t)})}}),dn.include({toGeoJSON:function(t){var e=!Gi(this._latlngs),i=e&&!Gi(this._latlngs[0]),n=Mn(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Ln(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Xi.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Ln(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,n=[];return this.eachLayer(function(e){if(e.toGeoJSON){var s=e.toGeoJSON(t);if(i)n.push(s.geometry);else{var o=xn(s);"FeatureCollection"===o.type?n.push.apply(n,o.features):n.push(o)}}}),i?Ln(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Pn=wn,kn=Ki.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=N(e),d(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Le(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){fe(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&&Ae(this._image),this},bringToBack:function(){return this._map&&ve(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=N(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:ge("img");Le(e,"leaflet-image-layer"),this._zoomAnimated&&Le(e,"leaflet-zoom-animated"),this.options.className&&Le(e,this.options.className),e.onselectstart=l,e.onmousemove=l,e.onload=s(this.fire,this,"load"),e.onerror=s(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;Ce(this._image,i,e)},_reset:function(){var t=this._image,e=new R(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();Se(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){Pe(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),En=function(t,e,i){return new kn(t,e,i)},Cn=kn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ge("video");if(Le(e,"leaflet-image-layer"),this._zoomAnimated&&Le(e,"leaflet-zoom-animated"),this.options.className&&Le(e,this.options.className),e.onselectstart=l,e.onmousemove=l,e.onloadeddata=s(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o<i.length;o++)n.push(i[o].src);this._url=i.length>0?n:[e.src]}else{f(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var a=0;a<this._url.length;a++){var r=ge("source");r.src=this._url[a],e.appendChild(r)}}}});function Sn(t,e,i){return new Cn(t,e,i)}var Tn=kn.extend({_initImage:function(){var t=this._image=this._url;Le(t,"leaflet-image-layer"),this._zoomAnimated&&Le(t,"leaflet-zoom-animated"),this.options.className&&Le(t,this.options.className),t.onselectstart=l,t.onmousemove=l}});function On(t,e,i){return new Tn(t,e,i)}var Bn=Ki.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof j||f(t))?(this._latlng=F(t),d(this,e)):(d(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&Pe(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Pe(this._container,1),this.bringToFront(),this.options.interactive&&(Le(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(Pe(this._container,0),this._removeTimeout=setTimeout(s(fe,void 0,this._container),200)):fe(this._container),this.options.interactive&&(xe(this._container,"leaflet-interactive"),this.removeInteractiveTarget(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&&Ae(this._container),this},bringToBack:function(){return this._map&&ve(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof $i){e=null;var i=this._source._layers;for(var n in i)if(i[n]._map){e=i[n];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=D(this.options.offset),i=this._getAnchor();this._zoomAnimated?Se(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}});oi.include({_initOverlay:function(t,e,i,n){var s=e;return s instanceof t||(s=new t(n).setContent(e)),i&&s.setLatLng(i),s}}),Ki.include({_initOverlay:function(t,e,i,n){var s=i;return s instanceof t?(d(s,n),s._source=this):(s=e&&!n?e:new t(n,this)).setContent(i),s}});var In=Bn.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Bn.prototype.openOn.call(this,t)},onAdd:function(t){Bn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof an||this._source.on("preclick",We))},onRemove:function(t){Bn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof an||this._source.off("preclick",We))},getEvents:function(){var t=Bn.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=ge("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=ge("div",t+"-content-wrapper",e);if(this._contentNode=ge("div",t+"-content",i),Xe(e),Ke(this._contentNode),je(e,"contextmenu",We),this._tipContainer=ge("div",t+"-tip-container",e),this._tip=ge("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=ge("a",t+"-close-button",e);n.setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">&#215;</span>',je(n,"click",function(t){Ye(t),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,o="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",Le(t,o)):xe(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();Se(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(me(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,s=new B(this._containerLeft,-i-this._containerBottom);s._add(Te(this._container));var o=t.layerPointToContainerPoint(s),a=D(this.options.autoPanPadding),r=D(this.options.autoPanPaddingTopLeft||a),h=D(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),c=0,u=0;o.x+n+h.x>l.x&&(c=o.x+n-l.x+h.x),o.x-c-r.x<0&&(c=o.x-r.x),o.y+i+h.y>l.y&&(u=o.y+i-l.y+h.y),o.y-u-r.y<0&&(u=o.y-r.y),(c||u)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,u]))}},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Dn=function(t,e){return new In(t,e)};oi.mergeOptions({closePopupOnClick:!0}),oi.include({openPopup:function(t,e,i){return this._initOverlay(In,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Ki.include({bindPopup:function(t,e){return this._popup=this._initOverlay(In,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof $i||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){$e(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof an?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Rn=Bn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Bn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Bn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Bn.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ge("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+a(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,s=this._container,o=n.latLngToContainerPoint(n.getCenter()),a=n.layerPointToContainerPoint(t),r=this.options.direction,h=s.offsetWidth,l=s.offsetHeight,c=D(this.options.offset),u=this._getAnchor();"top"===r?(e=h/2,i=l):"bottom"===r?(e=h/2,i=0):"center"===r?(e=h/2,i=l/2):"right"===r?(e=0,i=l/2):"left"===r?(e=h,i=l/2):a.x<o.x?(r="right",e=0,i=l/2):(r="left",e=h+2*(c.x+u.x),i=l/2),t=t.subtract(D(e,i,!0)).add(c).add(u),xe(s,"leaflet-tooltip-right"),xe(s,"leaflet-tooltip-left"),xe(s,"leaflet-tooltip-top"),xe(s,"leaflet-tooltip-bottom"),Le(s,"leaflet-tooltip-"+r),Se(s,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Pe(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return D(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),zn=function(t,e){return new Rn(t,e)};oi.include({openTooltip:function(t,e,i){return this._initOverlay(Rn,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Ki.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Rn,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,i.click=this._openTooltip,this._map?this._addFocusListeners():i.add=this._addFocusListeners),this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof $i||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(je(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),je(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)})}else this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var Gn=Qi.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?(ye(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=D(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Nn(t){return new Gn(t)}Qi.Default=en;var jn=Ki.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Nt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){d(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),fe(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Ae(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ve(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=r(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 B?t:new B(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),s=0,o=i.length;s<o;s++)e=i[s].style.zIndex,i[s]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Nt.ielt9){Pe(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var s=this._tiles[n];if(s.current&&s.loaded){var o=Math.min(1,(t-s.loaded)/200);Pe(s.el,o),o<1?e=!0:(s.active?i=!0:this._onOpaqueTile(s),s.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(k(this._fadeFrame),this._fadeFrame=P(this._updateOpacity,this))}},_onOpaqueTile:l,_initContainer:function(){this._container||(this._container=ge("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)):(fe(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],s=this._map;return n||((n=this._levels[t]={}).el=ge("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,s.getCenter(),s.getZoom()),l(n.el.offsetWidth),this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:l,_onRemoveLevel:l,_onCreateLevel:l,_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 n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var 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)fe(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var s=Math.floor(t/2),o=Math.floor(e/2),a=i-1,r=new B(+s,+o);r.z=+a;var h=this._tileCoordsToKey(r),l=this._tiles[h];return l&&l.active?(l.retain=!0,!0):(l&&l.loaded&&(l.retain=!0),a>n&&this._retainParent(s,o,a,n))},_retainChildren:function(t,e,i,n){for(var s=2*t;s<2*t+2;s++)for(var o=2*e;o<2*e+2;o++){var a=new B(s,o);a.z=i+1;var r=this._tileCoordsToKey(a),h=this._tiles[r];h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),i+1<n&&this._retainChildren(s,o,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!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,n){var s=Math.round(e);s=void 0!==this.options.maxZoom&&s>this.options.maxZoom||void 0!==this.options.minZoom&&s<this.options.minZoom?void 0:this._clampZoom(s);var o=this.options.updateWhenZooming&&s!==this._tileZoom;n&&!o||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==s&&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 n=this._map.getZoomScale(i,t.zoom),s=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();Nt.any3d?Ce(t.el,s,n):Se(t.el,s)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,s=this._map.getPixelWorldBounds(this._tileZoom);s&&(this._globalTileRange=this._pxBoundsToTileRange(s)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){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(),n=e.getZoomScale(i,this._tileZoom),s=e.project(t,this._tileZoom).floor(),o=e.getSize().divideBy(2*n);return new R(s.subtract(o),s.add(o))},_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 n=this._getTiledPixelBounds(t),s=this._pxBoundsToTileRange(n),o=s.getCenter(),a=[],r=this.options.keepBuffer,h=new R(s.getBottomLeft().subtract([r,-r]),s.getTopRight().add([r,-r]));if(!(isFinite(s.min.x)&&isFinite(s.min.y)&&isFinite(s.max.x)&&isFinite(s.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var l in this._tiles){var c=this._tiles[l].coords;c.z===this._tileZoom&&h.contains(new B(c.x,c.y))||(this._tiles[l].current=!1)}if(Math.abs(i-this._tileZoom)>1)this._setView(t,i);else{for(var u=s.min.y;u<=s.max.y;u++)for(var p=s.min.x;p<=s.max.x;p++){var d=new B(p,u);if(d.z=this._tileZoom,this._isValidTile(d)){var _=this._tiles[this._tileCoordsToKey(d)];_?_.current=!0:a.push(d)}}if(a.sort(function(t,e){return t.distanceTo(o)-e.distanceTo(o)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(p=0;p<a.length;p++)this._addTile(a[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 n=this._tileCoordsToBounds(t);return N(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),s=n.add(i);return[e.unproject(n,t.z),e.unproject(s,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new G(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 B(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(fe(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){Le(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=l,t.onmousemove=l,Nt.ielt9&&this.options.opacity<1&&Pe(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),s(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&P(s(this._tileReady,this,t,null,o)),Se(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(Pe(i.el,0),k(this._fadeFrame),this._fadeFrame=P(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(Le(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Nt.ielt9||!this._map._fadeAnimated?P(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new B(this._wrapX?h(t.x,this._wrapX):t.x,this._wrapY?h(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new R(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 Fn(t){return new jn(t)}var Un=jn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&Nt.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return je(i,"load",s(this._tileOnLoad,this,e,i)),je(i,"error",s(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:Nt.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return g(this._url,i(e,this.options))},_tileOnLoad:function(t,e){Nt.ielt9?setTimeout(s(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=l,e.onerror=l,!e.complete)){e.src=A;var i=this._tiles[t].coords;fe(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",A),jn.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==A))return jn.prototype._tileReady.call(this,t,e,i)}});function Zn(t,e){return new Un(t,e)}var Hn=Un.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var s in e)s in this.options||(n[s]=e[s]);var o=(e=d(this,e)).detectRetina&&Nt.retina?2:1,a=this.getTileSize();n.width=a.x*o,n.height=a.y*o,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Un.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=z(i.project(e[0]),i.project(e[1])),s=n.min,o=n.max,a=(this._wmsVersion>=1.3&&this._crs===Vi?[s.y,s.x,o.y,o.x]:[s.x,s.y,o.x,o.y]).join(","),r=Un.prototype.getTileUrl.call(this,t);return r+_(this.wmsParams,r,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});function qn(t,e){return new Hn(t,e)}Un.WMS=Hn,Zn.wms=qn;var Vn=Ki.extend({options:{padding:.1},initialize:function(t){d(this,t),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Le(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),n=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e),o=n.multiplyBy(-i).add(s).subtract(this._map._getNewPixelOrigin(t,e));Nt.any3d?Ce(this._container,o,i):Se(this._container,o)},_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 R(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Wn=Vn.extend({options:{tolerance:0},getEvents:function(){var t=Vn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Vn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");je(t,"mousemove",this._onMouseMove,this),je(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),je(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){k(this._redrawRequest),delete this._ctx,fe(this._container),Ue(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){Vn.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=Nt.retina?2:1;Se(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Nt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Vn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[a(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,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[a(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,n=t.options.dashArray.split(/[, ]+/),s=[];for(i=0;i<n.length;i++){if(e=Number(n[i]),isNaN(e))return;s.push(e)}t.options._dashArray=s}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||P(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new R,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 n=this._drawFirst;n;n=n.next)t=n.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,n,s,o,a=t._parts,r=a.length,h=this._ctx;if(r){for(h.beginPath(),i=0;i<r;i++){for(n=0,s=a[i].length;n<s;n++)o=a[i][n],h[n?"lineTo":"moveTo"](o.x,o.y);e&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==s&&(i.save(),i.scale(1,s)),i.beginPath(),i.arc(e.x,e.y/s,n,0,2*Math.PI,!1),1!==s&&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,n=this._map.mouseEventToLayerPoint(t),s=this._drawFirst;s;s=s.next)(e=s.layer).options.interactive&&e._containsPoint(n)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(i=e);this._fireEvent(!!i&&[i],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(xe(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,n,o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(Le(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(s(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,n=e.prev;i&&(i.prev=n,n?n.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,n=e.prev;n&&(n.next=i,i?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Kn(t){return Nt.canvas?new Wn(t):null}var Xn=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">')}}(),Yn={_initContainer:function(){this._container=ge("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Vn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Xn("shape");Le(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Xn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(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;fe(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(e||(e=t._stroke=Xn("stroke")),s.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=f(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(s.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=Xn("fill")),s.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(s.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Ae(t._container)},_bringToBack:function(t){ve(t._container)}},$n=Nt.vml?Xn:J,Jn=Vn.extend({_initContainer:function(){this._container=$n("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=$n("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){fe(this._container),Ue(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Vn.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),Se(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=$n("path");t.options.className&&Le(e,t.options.className),t.options.interactive&&Le(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){fe(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(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,Q(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Ae(t._path)},_bringToBack:function(t){ve(t._path)}});function Qn(t){return Nt.svg||Nt.vml?new Jn(t):null}Nt.vml&&Jn.include(Yn),oi.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&&Kn(t)||Qn(t)}});var ts=dn.extend({initialize:function(t,e){dn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=N(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function es(t,e){return new ts(t,e)}Jn.create=$n,Jn.pointsToPath=Q,mn.geometryToLayer=gn,mn.coordsToLatLng=yn,mn.coordsToLatLngs=An,mn.latLngToCoords=vn,mn.latLngsToCoords=Mn,mn.getFeature=Ln,mn.asFeature=xn,oi.mergeOptions({boxZoom:!0});var is=yi.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(){je(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ue(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){fe(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(),ae(),Be(),this._startPoint=this._map.mouseEventToContainerPoint(t),je(document,{contextmenu:$e,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ge("div","leaflet-zoom-box",this._container),Le(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new R(this._point,this._startPoint),i=e.getSize();Se(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(fe(this._box),xe(this._container,"leaflet-crosshair")),re(),Ie(),Ue(document,{contextmenu:$e,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(s(this._resetState,this),0);var e=new G(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});oi.addInitHook("addHandler","boxZoom",is),oi.mergeOptions({doubleClickZoom:!0});var ns=yi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,s=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(s):e.setZoomAround(t.containerPoint,s)}});oi.addInitHook("addHandler","doubleClickZoom",ns),oi.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ss=yi.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Mi(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))}Le(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){xe(this._map._container,"leaflet-grab"),xe(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=N(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,n=this._draggable._newPos.x,s=(n-e+i)%t+e-i,o=(n+e+i)%t-e-i,a=Math.abs(s+i)<Math.abs(o+i)?s:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var s=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,a=i.easeLinearity,r=s.multiplyBy(a/o),h=r.distanceTo([0,0]),l=Math.min(i.inertiaMaxSpeed,h),c=r.multiplyBy(l/h),u=l/(i.inertiaDeceleration*a),p=c.multiplyBy(-u/2).round();p.x||p.y?(p=e._limitOffset(p,e.options.maxBounds),P(function(){e.panBy(p,{duration:u,easeLinearity:a,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});oi.addInitHook("addHandler","dragging",ss),oi.mergeOptions({keyboard:!0,keyboardPanDelta:80});var os=yi.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"),je(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(),Ue(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,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,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,n=this._panKeys={},s=this.keyCodes;for(e=0,i=s.left.length;e<i;e++)n[s.left[e]]=[-1*t,0];for(e=0,i=s.right.length;e<i;e++)n[s.right[e]]=[t,0];for(e=0,i=s.down.length;e<i;e++)n[s.down[e]]=[0,t];for(e=0,i=s.up.length;e<i;e++)n[s.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},s=this.keyCodes;for(e=0,i=s.zoomIn.length;e<i;e++)n[s.zoomIn[e]]=t;for(e=0,i=s.zoomOut.length;e<i;e++)n[s.zoomOut[e]]=-t},_addHooks:function(){je(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ue(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress)if(e=this._panKeys[i],t.shiftKey&&(e=D(e).multiplyBy(3)),n.options.maxBounds&&(e=n._limitOffset(D(e),n.options.maxBounds)),n.options.worldCopyJump){var s=n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(e)));n.panTo(s)}else n.panBy(e)}else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}$e(t)}}});oi.addInitHook("addHandler","keyboard",os),oi.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var as=yi.extend({addHooks:function(){je(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ue(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=ei(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(s(this._performZoom,this),n),$e(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),s=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,o=i?Math.ceil(s/i)*i:s,a=t._limitZoom(e+(this._delta>0?o:-o))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});oi.addInitHook("addHandler","scrollWheelZoom",as);var rs=600;oi.mergeOptions({tapHold:Nt.touchNative&&Nt.safari&&Nt.mobile,tapTolerance:15});var hs=yi.extend({addHooks:function(){je(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ue(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new B(e.clientX,e.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(je(document,"touchend",Ye),je(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),rs),je(document,"touchend touchcancel contextmenu",this._cancel,this),je(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Ue(document,"touchend",Ye),Ue(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Ue(document,"touchend touchcancel contextmenu",this._cancel,this),Ue(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new B(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});oi.addInitHook("addHandler","tapHold",hs),oi.mergeOptions({touchZoom:Nt.touch,bounceAtZoomLimits:!0});var ls=yi.extend({addHooks:function(){Le(this._map._container,"leaflet-touch-zoom"),je(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){xe(this._map._container,"leaflet-touch-zoom"),Ue(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]),n=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(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),je(document,"touchmove",this._onTouchMove,this),je(document,"touchend touchcancel",this._onTouchEnd,this),Ye(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var a=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),k(this._animRequest);var r=s(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=P(r,this,!0),Ye(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,k(this._animRequest),Ue(document,"touchmove",this._onTouchMove,this),Ue(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});oi.addInitHook("addHandler","touchZoom",ls),oi.BoxZoom=is,oi.DoubleClickZoom=ns,oi.Drag=ss,oi.Keyboard=os,oi.ScrollWheelZoom=as,oi.TapHold=hs,oi.TouchZoom=ls,t.Bounds=R,t.Browser=Nt,t.CRS=Z,t.Canvas=Wn,t.Circle=ln,t.CircleMarker=rn,t.Class=C,t.Control=ri,t.DivIcon=Gn,t.DivOverlay=Bn,t.DomEvent=ni,t.DomUtil=Ne,t.Draggable=Mi,t.Evented=O,t.FeatureGroup=$i,t.GeoJSON=mn,t.GridLayer=jn,t.Handler=yi,t.Icon=Qi,t.ImageOverlay=kn,t.LatLng=j,t.LatLngBounds=G,t.Layer=Ki,t.LayerGroup=Xi,t.LineUtil=Fi,t.Map=oi,t.Marker=sn,t.Mixin=Ai,t.Path=an,t.Point=B,t.PolyUtil=Pi,t.Polygon=dn,t.Polyline=un,t.Popup=In,t.PosAnimation=si,t.Projection=Hi,t.Rectangle=ts,t.Renderer=Vn,t.SVG=Jn,t.SVGOverlay=Tn,t.TileLayer=Un,t.Tooltip=Rn,t.Transformation=W,t.Util=E,t.VideoOverlay=Cn,t.bind=s,t.bounds=z,t.canvas=Kn,t.circle=cn,t.circleMarker=hn,t.control=hi,t.divIcon=Nn,t.extend=i,t.featureGroup=Ji,t.geoJSON=wn,t.geoJson=Pn,t.gridLayer=Fn,t.icon=tn,t.imageOverlay=En,t.latLng=F,t.latLngBounds=N,t.layerGroup=Yi,t.map=ai,t.marker=on,t.point=D,t.polygon=_n,t.polyline=pn,t.popup=Dn,t.rectangle=es,t.setOptions=d,t.stamp=a,t.svg=Qn,t.svgOverlay=On,t.tileLayer=Zn,t.tooltip=zn,t.transformation=K,t.version=e,t.videoOverlay=Sn;var cs=window.L;t.noConflict=function(){return window.L=cs,this},window.L=t}(h.exports)),h.exports}var c,u=l();c=function(){const t=L.extend({},L.DomUtil);L.extend(L.DomUtil,{setTransform:function(e,i,n,s,o){var a=i||new L.Point(0,0);if(!s)return i=a._round(),t.setTransform.apply(this,arguments);a=a.rotateFrom(s,o),e.style[L.DomUtil.TRANSFORM]="translate3d("+a.x+"px,"+a.y+"px,0)"+(n?" scale("+n+")":"")+" rotate("+s+"rad)"},setPosition:function(e,i,n,s,o){if(!n&&!o)return t.setPosition.apply(this,arguments);e._leaflet_pos=i,L.Browser.any3d?L.DomUtil.setTransform(e,i,o,n,s):(e.style.left=i.x+"px",e.style.top=i.y+"px")},DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI}),L.Draggable.include({}),L.extend(L.Point.prototype,{rotate:function(t){return this.rotateFrom(t,new L.Point(0,0))},rotateFrom:function(t,e){if(!t)return this;var i=Math.sin(t),n=Math.cos(t),s=e.x,o=e.y,a=this.x-s,r=this.y-o;return new L.Point(a*n-r*i+s,a*i+r*n+o)}});const e=L.extend({},L.DivOverlay.prototype);L.DivOverlay.include({getEvents:function(){return L.extend(e.getEvents.apply(this,arguments),{rotate:this._updatePosition})},_updatePosition:function(){if(this._map&&(e._updatePosition.apply(this,arguments),this._map&&this._map._rotate&&this._zoomAnimated)){var t=this._getAnchor(),i=L.DomUtil.getPosition(this._container).subtract(t);L.DomUtil.setPosition(this._container,this._map.rotatedPointToMapPanePoint(i).add(t))}}});const i=L.extend({},L.Popup.prototype);L.Popup.include({_animateZoom:function(t){if(i._animateZoom.apply(this,arguments),this._map&&this._map._rotate){var e=this._getAnchor(),n=L.DomUtil.getPosition(this._container).subtract(e);L.DomUtil.setPosition(this._container,this._map.rotatedPointToMapPanePoint(n).add(e))}},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress))if(this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(L.DomUtil.getStyle(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,s=new L.Point(this._containerLeft,-i-this._containerBottom);s._add(L.DomUtil.getPosition(this._container));var o=s._add(this._map._getMapPanePos()),a=L.point(this.options.autoPanPadding),r=L.point(this.options.autoPanPaddingTopLeft||a),h=L.point(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),c=0,u=0;o.x+n+h.x>l.x&&(c=o.x+n-l.x+h.x),o.x-c-r.x<0&&(c=o.x-r.x),o.y+i+h.y>l.y&&(u=o.y+i-l.y+h.y),o.y-u-r.y<0&&(u=o.y-r.y),(c||u)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,u]))}}});const n=L.extend({},L.Tooltip.prototype);L.Tooltip.include({_animateZoom:function(t){if(!this._map._rotate)return n._animateZoom.apply(this,arguments);var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);e=this._map.rotatedPointToMapPanePoint(e),this._setPosition(e)},_updatePosition:function(){if(!this._map._rotate)return n._updatePosition.apply(this,arguments);var t=this._map.latLngToLayerPoint(this._latlng);t=this._map.rotatedPointToMapPanePoint(t),this._setPosition(t)}}),L.extend({},L.Icon.prototype),L.Icon.include({_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var s=L.point(n),o=L.point("shadow"===e&&i.shadowAnchor||i.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px",t.style[L.DomUtil.TRANSFORM+"Origin"]=o.x+"px "+o.y+"px 0px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")}});const s=L.extend({},L.Marker.prototype);var o;L.Marker.mergeOptions({rotation:0,rotateWithView:!1,scale:void 0});var a={_onDrag:function(t){var e=this._marker,i=e.options.rotation||e.options.rotateWithView,n=e._shadow,s=L.DomUtil.getPosition(e._icon);!i&&n&&L.DomUtil.setPosition(n,s),e._map._rotate&&(s=e._map.mapPanePointToRotatedPoint(s));var o=e._map.layerPointToLatLng(s);e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,i?e.setLatLng(o):e.fire("move",t),e.fire("drag",t)},_onDragEnd:function(t){this._marker._map._rotate&&this._marker.update(),o._onDragEnd.apply(this,arguments)}};L.Marker.include({getEvents:function(){return L.extend(s.getEvents.apply(this,arguments),{rotate:this.update})},_initInteraction:function(){var t=s._initInteraction.apply(this,arguments);return this.dragging&&this.dragging.enabled()&&this._map&&this._map._rotate&&(o=o||Object.getPrototypeOf(this.dragging),this.dragging.disable(),Object.assign(this.dragging,{_onDrag:a._onDrag.bind(this.dragging),_onDragEnd:a._onDragEnd.bind(this.dragging)}),this.dragging.enable()),t},_setPos:function(t){this._map._rotate&&(t=this._map.rotatedPointToMapPanePoint(t));var e=this.options.rotation||0;this.options.rotateWithView&&(e+=this._map._bearing),this._icon&&L.DomUtil.setPosition(this._icon,t,e,t,this.options.scale),this._shadow&&L.DomUtil.setPosition(this._shadow,t,e,t,this.options.scale),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},setRotation:function(t){this.options.rotation=t,this.update()}});const r=L.extend({},L.GridLayer.prototype);L.GridLayer.include({getEvents:function(){var t=r.getEvents.apply(this,arguments);return this._map._rotate&&!this.options.updateWhenIdle&&(this._onRotate||(this._onRotate=L.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),t.rotate=this._onRotate),t},_getTiledPixelBounds:function(t){return this._map._rotate?this._map._getNewPixelBounds(t,this._tileZoom):r._getTiledPixelBounds.apply(this,arguments)}});const h=L.extend({},L.Renderer.prototype);L.Renderer.include({getEvents:function(){return L.extend(h.getEvents.apply(this,arguments),{rotate:this._update})},onAdd:function(){h.onAdd.apply(this,arguments),L.version<="1.9.3"&&this._container.classList.add("leaflet-zoom-animated")},_updateTransform:function(t,e){if(!this._map._rotate)return h._updateTransform.apply(this,arguments);var i=this._map.getZoomScale(e,this._zoom),n=this._map._latLngToNewLayerPoint(this._topLeft,e,t);L.DomUtil.setTransform(this._container,n,i)},_update:function(){if(!this._map._rotate)return h._update.apply(this,arguments);this._bounds=this._map._getPaddedPixelBounds(this.options.padding),this._topLeft=this._map.layerPointToLatLng(this._bounds.min),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}});const l=L.extend({},L.Map.prototype);L.Map.mergeOptions({rotate:!1,bearing:0}),L.Map.include({initialize:function(t,e){e.rotate&&(this._rotate=!0,this._bearing=0),l.initialize.apply(this,arguments),this.options.rotate&&this.setBearing(this.options.bearing)},containerPointToLayerPoint:function(t){return this._rotate?L.point(t).subtract(this._getMapPanePos()).rotateFrom(-this._bearing,this._getRotatePanePos()).subtract(this._getRotatePanePos()):l.containerPointToLayerPoint.apply(this,arguments)},layerPointToContainerPoint:function(t){return this._rotate?L.point(t).add(this._getRotatePanePos()).rotateFrom(this._bearing,this._getRotatePanePos()).add(this._getMapPanePos()):l.layerPointToContainerPoint.apply(this,arguments)},rotatedPointToMapPanePoint:function(t){return L.point(t).rotate(this._bearing)._add(this._getRotatePanePos())},mapPanePointToRotatedPoint:function(t){return L.point(t)._subtract(this._getRotatePanePos()).rotate(-this._bearing)},mapBoundsToContainerBounds:function(t){if(!this._rotate&&l.mapBoundsToContainerBounds)return l.mapBoundsToContainerBounds.apply(this,arguments);const e=this.getPixelOrigin(),i=this.layerPointToContainerPoint(this.project(t.getNorthWest())._subtract(e)),n=this.layerPointToContainerPoint(this.project(t.getNorthEast())._subtract(e)),s=this.layerPointToContainerPoint(this.project(t.getSouthWest())._subtract(e)),o=this.layerPointToContainerPoint(this.project(t.getSouthEast())._subtract(e));return L.bounds([L.point(Math.min(i.x,n.x,o.x,s.x),Math.min(i.y,n.y,o.y,s.y)),L.point(Math.max(i.x,n.x,o.x,s.x),Math.max(i.y,n.y,o.y,s.y))])},getBounds:function(){if(!this._rotate)return l.getBounds.apply(this,arguments);var t=this.getSize();return new L.LatLngBounds([this.containerPointToLatLng([0,0]),this.containerPointToLatLng([t.x,0]),this.containerPointToLatLng([t.x,t.y]),this.containerPointToLatLng([0,t.y])])},setBearing:function(t){if(L.Browser.any3d&&this._rotate){var e=L.Util.wrapNum(t,[0,360])*L.DomUtil.DEG_TO_RAD,i=this._getPixelCenter(),n=this._getRotatePanePos().rotateFrom(-this._bearing,i),s=n.rotateFrom(e,i);L.DomUtil.setPosition(this._rotatePane,n,e,i),this._pivot=i,this._bearing=e,this._rotatePanePos=s,this.fire("rotate")}},getBearing:function(){return this._bearing*L.DomUtil.RAD_TO_DEG},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),L.DomUtil.setPosition(this._mapPane,new L.Point(0,0)),this._rotate?(this._rotatePane=this.createPane("rotatePane",this._mapPane),this._norotatePane=this.createPane("norotatePane",this._mapPane),this.createPane("tilePane",this._rotatePane),this.createPane("overlayPane",this._rotatePane),this.createPane("shadowPane",this._norotatePane),this.createPane("markerPane",this._norotatePane),this.createPane("tooltipPane",this._norotatePane),this.createPane("popupPane",this._norotatePane)):(this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane")),this.options.markerZoomAnimation||(L.DomUtil.addClass(t.markerPane,"leaflet-zoom-hide"),L.DomUtil.addClass(t.shadowPane,"leaflet-zoom-hide"))},panInside(t,e){if(!this._rotate||Math.abs(this._bearing).toFixed(1)<.1)return l.panInside.apply(this,arguments);e=e||{};const i=L.point(e.paddingTopLeft||e.padding||[0,0]),n=L.point(e.paddingBottomRight||e.padding||[0,0]),s=this._container.getBoundingClientRect(),o=this.latLngToContainerPoint(t),a=L.bounds([L.point(s),L.point(s).add(this.getSize())]),r=a.getCenter(),h=L.bounds([a.min.add(i),a.max.subtract(n)]),c=h.getSize();if(!h.contains(o)){this._enforcingBounds=!0;const t=o.subtract(h.getCenter()),i=h.extend(o).getSize().subtract(c);r.x+=t.x<0?-i.x:i.x,r.y+=t.y<0?-i.y:i.y,this.panTo(this.containerPointToLatLng(r),e),this._enforcingBounds=!1}return this},getBoundsZoom(t,e,i){if(!this._rotate||Math.abs(this._bearing).toFixed(1)<.1)return l.getBoundsZoom.apply(this,arguments);t=L.latLngBounds(t),i=L.point(i||[0,0]);let n=this.getZoom()||0;const s=this.getMinZoom(),o=this.getMaxZoom(),a=this.getSize().subtract(i),r=this.mapBoundsToContainerBounds(t).getSize(),h=this.options.zoomSnap,c=a.x/r.x,u=a.y/r.y,p=e?Math.max(c,u):Math.min(c,u);return n=this.getScaleZoom(p,n),h&&(n=Math.round(n/(h/100))*(h/100),n=e?Math.ceil(n/h)*h:Math.floor(n/h)*h),Math.max(s,Math.min(o,n))},_getCenterOffset:function(t){var e=l._getCenterOffset.apply(this,arguments);return this._rotate&&(e=e.rotate(this._bearing)),e},_getRotatePanePos:function(){return this._rotatePanePos||new L.Point(0,0)},_getNewPixelOrigin:function(t,e){if(!this._rotate)return l._getNewPixelOrigin.apply(this,arguments);var i=this.getSize()._divideBy(2);return this.project(t,e).rotate(this._bearing)._subtract(i)._add(this._getMapPanePos())._add(this._getRotatePanePos()).rotate(-this._bearing)._round()},_getNewPixelBounds:function(t,e){if(t=t||this.getCenter(),e=e||this.getZoom(),!this._rotate&&l._getNewPixelBounds)return l._getNewPixelBounds.apply(this,arguments);var i=this._animatingZoom?Math.max(this._animateToZoom,this.getZoom()):this.getZoom(),n=this.getZoomScale(i,e),s=this.project(t,e).floor(),o=this.getSize(),a=new L.Bounds([this.containerPointToLayerPoint([0,0]).floor(),this.containerPointToLayerPoint([o.x,0]).floor(),this.containerPointToLayerPoint([0,o.y]).floor(),this.containerPointToLayerPoint([o.x,o.y]).floor()]).getSize().divideBy(2*n);return new L.Bounds(s.subtract(a),s.add(a))},_getPixelCenter:function(){return!this._rotate&&l._getPixelCenter?l._getPixelCenter.apply(this,arguments):this.getSize()._divideBy(2)._subtract(this._getMapPanePos())},_getPaddedPixelBounds:function(t){if(!this._rotate&&l._getPaddedPixelBounds)return l._getPaddedPixelBounds.apply(this,arguments);var e=t,i=this.getSize(),n=i.multiplyBy(-e),s=i.multiplyBy(1+e);return new L.Bounds([this.containerPointToLayerPoint([n.x,n.y]).floor(),this.containerPointToLayerPoint([n.x,s.y]).floor(),this.containerPointToLayerPoint([s.x,n.y]).floor(),this.containerPointToLayerPoint([s.x,s.y]).floor()])},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,i=t.coords.longitude,n=t.coords.heading,s=new L.LatLng(e,i),o=s.toBounds(t.coords.accuracy),a=this._locateOptions;if(a.setView){var r=this.getBoundsZoom(o);this.setView(s,a.maxZoom?Math.min(r,a.maxZoom):r)}var h={latlng:s,bounds:o,timestamp:t.timestamp,heading:n};for(var l in t.coords)"number"==typeof t.coords[l]&&(h[l]=t.coords[l]);this.fire("locationfound",h)}}}),L.Map.CompassBearing=L.Handler.extend({initialize:function(t){this._map=t,"ondeviceorientationabsolute"in window?this.__deviceOrientationEvent="deviceorientationabsolute":"ondeviceorientation"in window&&(this.__deviceOrientationEvent="deviceorientation"),this._throttled=L.Util.throttle(this._onDeviceOrientation,100,this)},addHooks:function(){this._map._rotate&&this.__deviceOrientationEvent?L.DomEvent.on(window,this.__deviceOrientationEvent,this._throttled,this):this.disable()},removeHooks:function(){this._map._rotate&&this.__deviceOrientationEvent&&L.DomEvent.off(window,this.__deviceOrientationEvent,this._throttled,this)},_onDeviceOrientation:function(t){var e=t.webkitCompassHeading||t.alpha,i=0;!t.absolute&&t.webkitCompassHeading&&(e=360-e),t.absolute||void 0===window.orientation||(i=window.orientation),this._map.setBearing(e-i)}}),L.Map.addInitHook("addHandler","compassBearing",L.Map.CompassBearing),L.Map.mergeOptions({trackContainerMutation:!1}),L.Map.ContainerMutation=L.Handler.extend({addHooks:function(){this._observer||(this._observer=new MutationObserver(L.Util.bind(this._map.invalidateSize,this._map))),this._observer.observe(this._map.getContainer(),{childList:!1,attributes:!0,characterData:!1,subtree:!1,attributeFilter:["style"]})},removeHooks:function(){this._observer.disconnect()}}),L.Map.addInitHook("addHandler","trackContainerMutation",L.Map.ContainerMutation),L.Map.mergeOptions({bounceAtZoomLimits:!0}),L.Map.TouchGestures=L.Handler.extend({initialize:function(t){this._map=t,this.rotate=!!this._map.options.touchRotate,this.zoom=!!this._map.options.touchZoom},addHooks:function(){L.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){L.DomEvent.off(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&&!this._rotating){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),s=i.subtract(n);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),this.zoom?("center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._zooming=!0):this._zooming=!1,this.rotate?(this._startTheta=Math.atan(s.x/s.y),this._startBearing=e.getBearing(),s.y<0&&(this._startBearing+=180),this._rotating=!0):this._rotating=!1,this._moved=!1,e._stop(),L.DomEvent.on(document,"touchmove",this._onTouchMove,this).on(document,"touchend touchcancel",this._onTouchEnd,this),L.DomEvent.preventDefault(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&(this._zooming||this._rotating)){var e,i=this._map,n=i.mouseEventToContainerPoint(t.touches[0]),s=i.mouseEventToContainerPoint(t.touches[1]),o=n.subtract(s),a=n.distanceTo(s)/this._startDist;if(this._rotating){var r=(Math.atan(o.x/o.y)-this._startTheta)*L.DomUtil.RAD_TO_DEG;o.y<0&&(r+=180),r&&i.setBearing(this._startBearing-r)}if(this._zooming)if(this._zoom=i.getScaleZoom(a,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&a<1||this._zoom>i.getMaxZoom()&&a>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===a)return}else{if(e=n._add(s)._divideBy(2)._subtract(this._centerPoint),1===a&&0===e.x&&0===e.y)return;var h=-i.getBearing()*L.DomUtil.DEG_TO_RAD;this._center=i.unproject(i.project(this._pinchStartLatLng).subtract(e.rotate(h)))}this._moved||(i._moveStart(!0,!1),this._moved=!0),L.Util.cancelAnimFrame(this._animRequest);var l=i._move.bind(i,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=L.Util.requestAnimFrame(l,this,!0),L.DomEvent.preventDefault(t)}},_onTouchEnd:function(){this._moved&&(this._zooming||this._rotating)?(this._zooming=!1,this._rotating=!1,L.Util.cancelAnimFrame(this._animRequest),L.DomEvent.off(document,"touchmove",this._onTouchMove,this).off(document,"touchend touchcancel",this._onTouchEnd,this),this.zoom&&(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}}),L.Map.addInitHook("addHandler","touchGestures",L.Map.TouchGestures),L.Map.mergeOptions({touchRotate:!1}),L.Map.TouchRotate=L.Handler.extend({addHooks:function(){this._map.touchGestures.enable(),this._map.touchGestures.rotate=!0},removeHooks:function(){this._map.touchGestures.rotate=!1}}),L.Map.addInitHook("addHandler","touchRotate",L.Map.TouchRotate),L.Map.mergeOptions({shiftKeyRotate:!0}),L.Map.ShiftKeyRotate=L.Handler.extend({addHooks:function(){L.DomEvent.on(this._map._container,"wheel",this._handleShiftScroll,this),this._map.shiftKeyRotate.rotate=!0},removeHooks:function(){L.DomEvent.off(this._map._container,"wheel",this._handleShiftScroll,this),this._map.shiftKeyRotate.rotate=!1},_handleShiftScroll:function(t){t.shiftKey?(t.preventDefault(),this._map.scrollWheelZoom.disable(),this._map.setBearing(this._map._bearing*L.DomUtil.RAD_TO_DEG+5*Math.sign(t.deltaY))):this._map.scrollWheelZoom.enable()}}),L.Map.addInitHook("addHandler","shiftKeyRotate",L.Map.ShiftKeyRotate),L.Map.addInitHook(function(){this.scrollWheelZoom.enabled()&&this.shiftKeyRotate.enabled()&&(this.scrollWheelZoom.disable(),this.scrollWheelZoom.enable())}),L.Map.mergeOptions({touchZoom:L.Browser.touch,bounceAtZoomLimits:!1}),L.Map.TouchZoom=L.Handler.extend({addHooks:function(){L.DomUtil.addClass(this._map._container,"leaflet-touch-zoom"),this._map.touchGestures.enable(),this._map.touchGestures.zoom=!0},removeHooks:function(){L.DomUtil.removeClass(this._map._container,"leaflet-touch-zoom"),this._map.touchGestures.zoom=!1}}),L.Map.addInitHook("addHandler","touchZoom",L.Map.TouchZoom),L.Control.Rotate=L.Control.extend({options:{position:"topleft",closeOnZeroBearing:!0},onAdd:function(t){var e=this._container=L.DomUtil.create("div","leaflet-control-rotate leaflet-bar"),i=this._arrow=L.DomUtil.create("span","leaflet-control-rotate-arrow");i.style.backgroundImage="url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E\")",i.style.cursor="grab",i.style.display="block",i.style.width="100%",i.style.height="100%",i.style.backgroundRepeat="no-repeat",i.style.backgroundPosition="50%";var n=this._link=L.DomUtil.create("a","leaflet-control-rotate-toggle",e);return n.appendChild(i),n.href="#",n.title="Rotate map",L.DomEvent.on(n,"dblclick",L.DomEvent.stopPropagation).on(n,"mousedown",this._handleMouseDown,this).on(n,"click",L.DomEvent.stop).on(n,"click",this._cycleState,this).on(n,"click",this._refocusOnMap,this),L.Browser.any3d||L.DomUtil.addClass(n,"leaflet-disabled"),this._restyle(),t.on("rotate",this._restyle,this),this._follow=!1,this._canFollow=!1,this.options.closeOnZeroBearing&&0===t.getBearing()&&(e.style.display="none"),e},onRemove:function(t){t.off("rotate",this._restyle,this)},_handleMouseDown:function(t){L.DomEvent.stop(t),this.dragging=!0,this.dragstartX=t.pageX,this.dragstartY=t.pageY,L.DomEvent.on(document,"mousemove",this._handleMouseDrag,this).on(document,"mouseup",this._handleMouseUp,this)},_handleMouseUp:function(t){L.DomEvent.stop(t),this.dragging=!1,L.DomEvent.off(document,"mousemove",this._handleMouseDrag,this).off(document,"mouseup",this._handleMouseUp,this)},_handleMouseDrag:function(t){if(this.dragging){var e=t.clientX-this.dragstartX;this._map.setBearing(e)}},_cycleState:function(t){if(this._map){var e=this._map;e.touchRotate.enabled()||e.compassBearing.enabled()?e.compassBearing.enabled()?(e.compassBearing.disable(),e.setBearing(0),this.options.closeOnZeroBearing&&e.touchRotate.enable()):(e.touchRotate.disable(),(DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission():Promise.resolve("granted")).then(t=>"granted"===t&&e.compassBearing.enable())):e.touchRotate.enable(),this._restyle()}},_restyle:function(){if(this._map.options.rotate){var t=this._map,e=t.getBearing();this._arrow.style.transform="rotate("+e+"deg)",e&&this.options.closeOnZeroBearing&&(this._container.style.display="block"),t.compassBearing.enabled()?this._link.style.backgroundColor="orange":t.touchRotate.enabled()?this._link.style.backgroundColor=null:(this._link.style.backgroundColor="grey",0===e&&this.options.closeOnZeroBearing&&(this._container.style.display="none"))}else L.DomUtil.addClass(this._link,"leaflet-disabled")}}),L.control.rotate=function(t){return new L.Control.Rotate(t)},L.Map.mergeOptions({rotateControl:!0}),L.Map.addInitHook(function(){if(this.options.rotateControl){var t="object"==typeof this.options.rotateControl?this.options.rotateControl:{};this.rotateControl=L.control.rotate(t),this.addControl(this.rotateControl)}})},"function"==typeof define&&define.amd?define(c):c(),(()=>{var t,e,i=Object.create,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,h=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),u=(t,e,n)=>(n=null!=t?i(h(t)):{},((t,e,i,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let s of r(e))!l.call(t,s)&&s!==i&&o(t,s,{get:()=>e[s],enumerable:!(n=a(e,s))||n.enumerable});return t})(!e&&t&&t.__esModule?n:o(n,"default",{value:t,enumerable:!0}),t)),p=c((t,e)=>{e.exports=function(){this.__data__=[],this.size=0}}),d=c((t,e)=>{e.exports=function(t,e){return t===e||t!=t&&e!=e}}),_=c((t,e)=>{var i=d();e.exports=function(t,e){for(var n=t.length;n--;)if(i(t[n][0],e))return n;return-1}}),m=c((t,e)=>{var i=_(),n=Array.prototype.splice;e.exports=function(t){var e=this.__data__,s=i(e,t);return!(s<0)&&(s==e.length-1?e.pop():n.call(e,s,1),--this.size,!0)}}),g=c((t,e)=>{var i=_();e.exports=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]}}),f=c((t,e)=>{var i=_();e.exports=function(t){return i(this.__data__,t)>-1}}),y=c((t,e)=>{var i=_();e.exports=function(t,e){var n=this.__data__,s=i(n,t);return s<0?(++this.size,n.push([t,e])):n[s][1]=e,this}}),A=c((t,e)=>{var i=p(),n=m(),s=g(),o=f(),a=y();function r(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}r.prototype.clear=i,r.prototype.delete=n,r.prototype.get=s,r.prototype.has=o,r.prototype.set=a,e.exports=r}),v=c((t,e)=>{var i=A();e.exports=function(){this.__data__=new i,this.size=0}}),M=c((t,e)=>{e.exports=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}}),x=c((t,e)=>{e.exports=function(t){return this.__data__.get(t)}}),b=c((t,e)=>{e.exports=function(t){return this.__data__.has(t)}}),w=c((t,e)=>{var i="object"==typeof s&&s&&s.Object===Object&&s;e.exports=i}),P=c((t,e)=>{var i=w(),n="object"==typeof self&&self&&self.Object===Object&&self,s=i||n||Function("return this")();e.exports=s}),k=c((t,e)=>{var i=P().Symbol;e.exports=i}),E=c((t,e)=>{var i=k(),n=Object.prototype,s=n.hasOwnProperty,o=n.toString,a=i?i.toStringTag:void 0;e.exports=function(t){var e=s.call(t,a),i=t[a];try{t[a]=void 0;var n=!0}catch{}var r=o.call(t);return n&&(e?t[a]=i:delete t[a]),r}}),C=c((t,e)=>{var i=Object.prototype.toString;e.exports=function(t){return i.call(t)}}),S=c((t,e)=>{var i=k(),n=E(),s=C(),o=i?i.toStringTag:void 0;e.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?n(t):s(t)}}),T=c((t,e)=>{e.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}),O=c((t,e)=>{var i=S(),n=T();e.exports=function(t){if(!n(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}),B=c((t,e)=>{var i=P()["__core-js_shared__"];e.exports=i}),I=c((t,e)=>{var i,n=B(),s=(i=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(t){return!!s&&s in t}}),D=c((t,e)=>{var i=Function.prototype.toString;e.exports=function(t){if(null!=t){try{return i.call(t)}catch{}try{return t+""}catch{}}return""}}),R=c((t,e)=>{var i=O(),n=I(),s=T(),o=D(),a=/^\[object .+?Constructor\]$/,r=Function.prototype,h=Object.prototype,l=r.toString,c=h.hasOwnProperty,u=RegExp("^"+l.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(t){return!(!s(t)||n(t))&&(i(t)?u:a).test(o(t))}}),z=c((t,e)=>{e.exports=function(t,e){return null==t?void 0:t[e]}}),G=c((t,e)=>{var i=R(),n=z();e.exports=function(t,e){var s=n(t,e);return i(s)?s:void 0}}),N=c((t,e)=>{var i=G()(P(),"Map");e.exports=i}),j=c((t,e)=>{var i=G()(Object,"create");e.exports=i}),F=c((t,e)=>{var i=j();e.exports=function(){this.__data__=i?i(null):{},this.size=0}}),U=c((t,e)=>{e.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}}),Z=c((t,e)=>{var i=j(),n=Object.prototype.hasOwnProperty;e.exports=function(t){var e=this.__data__;if(i){var s=e[t];return"__lodash_hash_undefined__"===s?void 0:s}return n.call(e,t)?e[t]:void 0}}),H=c((t,e)=>{var i=j(),n=Object.prototype.hasOwnProperty;e.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:n.call(e,t)}}),q=c((t,e)=>{var i=j();e.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}}),V=c((t,e)=>{var i=F(),n=U(),s=Z(),o=H(),a=q();function r(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}r.prototype.clear=i,r.prototype.delete=n,r.prototype.get=s,r.prototype.has=o,r.prototype.set=a,e.exports=r}),W=c((t,e)=>{var i=V(),n=A(),s=N();e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(s||n),string:new i}}}),K=c((t,e)=>{e.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}}),X=c((t,e)=>{var i=K();e.exports=function(t,e){var n=t.__data__;return i(e)?n["string"==typeof e?"string":"hash"]:n.map}}),Y=c((t,e)=>{var i=X();e.exports=function(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}}),$=c((t,e)=>{var i=X();e.exports=function(t){return i(this,t).get(t)}}),J=c((t,e)=>{var i=X();e.exports=function(t){return i(this,t).has(t)}}),Q=c((t,e)=>{var i=X();e.exports=function(t,e){var n=i(this,t),s=n.size;return n.set(t,e),this.size+=n.size==s?0:1,this}}),tt=c((t,e)=>{var i=W(),n=Y(),s=$(),o=J(),a=Q();function r(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}r.prototype.clear=i,r.prototype.delete=n,r.prototype.get=s,r.prototype.has=o,r.prototype.set=a,e.exports=r}),et=c((t,e)=>{var i=A(),n=N(),s=tt();e.exports=function(t,e){var o=this.__data__;if(o instanceof i){var a=o.__data__;if(!n||a.length<199)return a.push([t,e]),this.size=++o.size,this;o=this.__data__=new s(a)}return o.set(t,e),this.size=o.size,this}}),it=c((t,e)=>{var i=A(),n=v(),s=M(),o=x(),a=b(),r=et();function h(t){var e=this.__data__=new i(t);this.size=e.size}h.prototype.clear=n,h.prototype.delete=s,h.prototype.get=o,h.prototype.has=a,h.prototype.set=r,e.exports=h}),nt=c((t,e)=>{var i=G(),n=function(){try{var t=i(Object,"defineProperty");return t({},"",{}),t}catch{}}();e.exports=n}),st=c((t,e)=>{var i=nt();e.exports=function(t,e,n){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}}),ot=c((t,e)=>{var i=st(),n=d();e.exports=function(t,e,s){(void 0!==s&&!n(t[e],s)||void 0===s&&!(e in t))&&i(t,e,s)}}),at=c((t,e)=>{e.exports=function(t){return function(e,i,n){for(var s=-1,o=Object(e),a=n(e),r=a.length;r--;){var h=a[t?r:++s];if(!1===i(o[h],h,o))break}return e}}}),rt=c((t,e)=>{var i=at()();e.exports=i}),ht=c((t,e)=>{var i=P(),n="object"==typeof t&&t&&!t.nodeType&&t,s=n&&"object"==typeof e&&e&&!e.nodeType&&e,o=s&&s.exports===n?i.Buffer:void 0,a=o?o.allocUnsafe:void 0;e.exports=function(t,e){if(e)return t.slice();var i=t.length,n=a?a(i):new t.constructor(i);return t.copy(n),n}}),lt=c((t,e)=>{var i=P().Uint8Array;e.exports=i}),ct=c((t,e)=>{var i=lt();e.exports=function(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}}),ut=c((t,e)=>{var i=ct();e.exports=function(t,e){var n=e?i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}}),pt=c((t,e)=>{e.exports=function(t,e){var i=-1,n=t.length;for(e||(e=Array(n));++i<n;)e[i]=t[i];return e}}),dt=c((t,e)=>{var i=T(),n=Object.create,s=function(){function t(){}return function(e){if(!i(e))return{};if(n)return n(e);t.prototype=e;var s=new t;return t.prototype=void 0,s}}();e.exports=s}),_t=c((t,e)=>{e.exports=function(t,e){return function(i){return t(e(i))}}}),mt=c((t,e)=>{var i=_t()(Object.getPrototypeOf,Object);e.exports=i}),gt=c((t,e)=>{var i=Object.prototype;e.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}}),ft=c((t,e)=>{var i=dt(),n=mt(),s=gt();e.exports=function(t){return"function"!=typeof t.constructor||s(t)?{}:i(n(t))}}),yt=c((t,e)=>{e.exports=function(t){return null!=t&&"object"==typeof t}}),At=c((t,e)=>{var i=S(),n=yt();e.exports=function(t){return n(t)&&"[object Arguments]"==i(t)}}),vt=c((t,e)=>{var i=At(),n=yt(),s=Object.prototype,o=s.hasOwnProperty,a=s.propertyIsEnumerable,r=i(function(){return arguments}())?i:function(t){return n(t)&&o.call(t,"callee")&&!a.call(t,"callee")};e.exports=r}),Mt=c((t,e)=>{var i=Array.isArray;e.exports=i}),Lt=c((t,e)=>{e.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}),xt=c((t,e)=>{var i=O(),n=Lt();e.exports=function(t){return null!=t&&n(t.length)&&!i(t)}}),bt=c((t,e)=>{var i=xt(),n=yt();e.exports=function(t){return n(t)&&i(t)}}),wt=c((t,e)=>{e.exports=function(){return!1}}),Pt=c((t,e)=>{var i=P(),n=wt(),s="object"==typeof t&&t&&!t.nodeType&&t,o=s&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===s?i.Buffer:void 0,r=(a?a.isBuffer:void 0)||n;e.exports=r}),kt=c((t,e)=>{var i=S(),n=mt(),s=yt(),o=Function.prototype,a=Object.prototype,r=o.toString,h=a.hasOwnProperty,l=r.call(Object);e.exports=function(t){if(!s(t)||"[object Object]"!=i(t))return!1;var e=n(t);if(null===e)return!0;var o=h.call(e,"constructor")&&e.constructor;return"function"==typeof o&&o instanceof o&&r.call(o)==l}}),Et=c((t,e)=>{var i=S(),n=Lt(),s=yt(),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(t){return s(t)&&n(t.length)&&!!o[i(t)]}}),Ct=c((t,e)=>{e.exports=function(t){return function(e){return t(e)}}}),St=c((t,e)=>{var i=w(),n="object"==typeof t&&t&&!t.nodeType&&t,s=n&&"object"==typeof e&&e&&!e.nodeType&&e,o=s&&s.exports===n&&i.process,a=function(){try{return s&&s.require&&s.require("util").types||o&&o.binding&&o.binding("util")}catch{}}();e.exports=a}),Tt=c((t,e)=>{var i=Et(),n=Ct(),s=St(),o=s&&s.isTypedArray,a=o?n(o):i;e.exports=a}),Ot=c((t,e)=>{e.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}}),Bt=c((t,e)=>{var i=st(),n=d(),s=Object.prototype.hasOwnProperty;e.exports=function(t,e,o){var a=t[e];(!s.call(t,e)||!n(a,o)||void 0===o&&!(e in t))&&i(t,e,o)}}),It=c((t,e)=>{var i=Bt(),n=st();e.exports=function(t,e,s,o){var a=!s;s||(s={});for(var r=-1,h=e.length;++r<h;){var l=e[r],c=o?o(s[l],t[l],l,s,t):void 0;void 0===c&&(c=t[l]),a?n(s,l,c):i(s,l,c)}return s}}),Dt=c((t,e)=>{e.exports=function(t,e){for(var i=-1,n=Array(t);++i<t;)n[i]=e(i);return n}}),Rt=c((t,e)=>{var i=/^(?:0|[1-9]\d*)$/;e.exports=function(t,e){var n=typeof t;return!!(e=e??9007199254740991)&&("number"==n||"symbol"!=n&&i.test(t))&&t>-1&&t%1==0&&t<e}}),zt=c((t,e)=>{var i=Dt(),n=vt(),s=Mt(),o=Pt(),a=Rt(),r=Tt(),h=Object.prototype.hasOwnProperty;e.exports=function(t,e){var l=s(t),c=!l&&n(t),u=!l&&!c&&o(t),p=!l&&!c&&!u&&r(t),d=l||c||u||p,_=d?i(t.length,String):[],m=_.length;for(var g in t)(e||h.call(t,g))&&(!d||!("length"==g||u&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m)))&&_.push(g);return _}}),Gt=c((t,e)=>{e.exports=function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e}}),Nt=c((t,e)=>{var i=T(),n=gt(),s=Gt(),o=Object.prototype.hasOwnProperty;e.exports=function(t){if(!i(t))return s(t);var e=n(t),a=[];for(var r in t)"constructor"==r&&(e||!o.call(t,r))||a.push(r);return a}}),jt=c((t,e)=>{var i=zt(),n=Nt(),s=xt();e.exports=function(t){return s(t)?i(t,!0):n(t)}}),Ft=c((t,e)=>{var i=It(),n=jt();e.exports=function(t){return i(t,n(t))}}),Ut=c((t,e)=>{var i=ot(),n=ht(),s=ut(),o=pt(),a=ft(),r=vt(),h=Mt(),l=bt(),c=Pt(),u=O(),p=T(),d=kt(),_=Tt(),m=Ot(),g=Ft();e.exports=function(t,e,f,y,A,v,M){var L=m(t,f),x=m(e,f),b=M.get(x);if(b)i(t,f,b);else{var w=v?v(L,x,f+"",t,e,M):void 0,P=void 0===w;if(P){var k=h(x),E=!k&&c(x),C=!k&&!E&&_(x);w=x,k||E||C?h(L)?w=L:l(L)?w=o(L):E?(P=!1,w=n(x,!0)):C?(P=!1,w=s(x,!0)):w=[]:d(x)||r(x)?(w=L,r(L)?w=g(L):(!p(L)||u(L))&&(w=a(x))):P=!1}P&&(M.set(x,w),A(w,x,y,v,M),M.delete(x)),i(t,f,w)}}}),Zt=c((t,e)=>{var i=it(),n=ot(),s=rt(),o=Ut(),a=T(),r=jt(),h=Ot();e.exports=function t(e,l,c,u,p){e!==l&&s(l,function(s,r){if(p||(p=new i),a(s))o(e,l,r,c,t,u,p);else{var d=u?u(h(e,r),s,r+"",e,l,p):void 0;void 0===d&&(d=s),n(e,r,d)}},r)}}),Ht=c((t,e)=>{e.exports=function(t){return t}}),qt=c((t,e)=>{e.exports=function(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}}),Vt=c((t,e)=>{var i=qt(),n=Math.max;e.exports=function(t,e,s){return e=n(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,r=n(o.length-e,0),h=Array(r);++a<r;)h[a]=o[e+a];a=-1;for(var l=Array(e+1);++a<e;)l[a]=o[a];return l[e]=s(h),i(t,this,l)}}}),Wt=c((t,e)=>{e.exports=function(t){return function(){return t}}}),Kt=c((t,e)=>{var i=Wt(),n=nt(),s=Ht(),o=n?function(t,e){return n(t,"toString",{configurable:!0,enumerable:!1,value:i(e),writable:!0})}:s;e.exports=o}),Xt=c((t,e)=>{var i=Date.now;e.exports=function(t){var e=0,n=0;return function(){var s=i(),o=16-(s-n);if(n=s,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}}),Yt=c((t,e)=>{var i=Kt(),n=Xt()(i);e.exports=n}),$t=c((t,e)=>{var i=Ht(),n=Vt(),s=Yt();e.exports=function(t,e){return s(n(t,e,i),t+"")}}),Jt=c((t,e)=>{var i=d(),n=xt(),s=Rt(),o=T();e.exports=function(t,e,a){if(!o(a))return!1;var r=typeof e;return!!("number"==r?n(a)&&s(e,a.length):"string"==r&&e in a)&&i(a[e],t)}}),Qt=c((t,e)=>{var i=$t(),n=Jt();e.exports=function(t){return i(function(e,i){var s=-1,o=i.length,a=o>1?i[o-1]:void 0,r=o>2?i[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,r&&n(i[0],i[1],r)&&(a=o<3?void 0:a,o=1),e=Object(e);++s<o;){var h=i[s];h&&t(e,h,s,a)}return e})}}),te=c((t,e)=>{var i=Zt(),n=Qt()(function(t,e,n){i(t,e,n)});e.exports=n}),ee=c((t,e)=>{var i=S(),n=yt();e.exports=function(t){return"symbol"==typeof t||n(t)&&"[object Symbol]"==i(t)}}),ie=c((t,e)=>{var i=Mt(),n=ee(),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(t,e){if(i(t))return!1;var a=typeof t;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=t&&!n(t))||(o.test(t)||!s.test(t)||null!=e&&t in Object(e))}}),ne=c((t,e)=>{var i=tt();function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var s=function(){var i=arguments,n=e?e.apply(this,i):i[0],o=s.cache;if(o.has(n))return o.get(n);var a=t.apply(this,i);return s.cache=o.set(n,a)||o,a};return s.cache=new(n.Cache||i),s}n.Cache=i,e.exports=n}),se=c((t,e)=>{var i=ne();e.exports=function(t){var e=i(t,function(t){return 500===n.size&&n.clear(),t}),n=e.cache;return e}}),oe=c((t,e)=>{var i=se(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,o=i(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(n,function(t,i,n,o){e.push(n?o.replace(s,"$1"):i||t)}),e});e.exports=o}),ae=c((t,e)=>{e.exports=function(t,e){for(var i=-1,n=null==t?0:t.length,s=Array(n);++i<n;)s[i]=e(t[i],i,t);return s}}),re=c((t,e)=>{var i=k(),n=ae(),s=Mt(),o=ee(),a=i?i.prototype:void 0,r=a?a.toString:void 0;e.exports=function t(e){if("string"==typeof e)return e;if(s(e))return n(e,t)+"";if(o(e))return r?r.call(e):"";var i=e+"";return"0"==i&&1/e==-1/0?"-0":i}}),he=c((t,e)=>{var i=re();e.exports=function(t){return null==t?"":i(t)}}),le=c((t,e)=>{var i=Mt(),n=ie(),s=oe(),o=he();e.exports=function(t,e){return i(t)?t:n(t,e)?[t]:s(o(t))}}),ce=c((t,e)=>{var i=ee();e.exports=function(t){if("string"==typeof t||i(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}}),ue=c((t,e)=>{var i=le(),n=ce();e.exports=function(t,e){for(var s=0,o=(e=i(e,t)).length;null!=t&&s<o;)t=t[n(e[s++])];return s&&s==o?t:void 0}}),pe=c((t,e)=>{var i=ue();e.exports=function(t,e,n){var s=null==t?void 0:i(t,e);return void 0===s?n:s}}),de=c((t,e)=>{var i,n;i=t,n=function(){function t(t,n,s,o,a){!function t(i,n,s,o,a){for(;o>s;){if(o-s>600){var r=o-s+1,h=n-s+1,l=Math.log(r),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(r-c)/r)*(h-r/2<0?-1:1);t(i,n,Math.max(s,Math.floor(n-h*c/r+u)),Math.min(o,Math.floor(n+(r-h)*c/r+u)),a)}var p=i[n],d=s,_=o;for(e(i,s,n),a(i[o],p)>0&&e(i,s,o);d<_;){for(e(i,d,_),d++,_--;a(i[d],p)<0;)d++;for(;a(i[_],p)>0;)_--}0===a(i[s],p)?e(i,s,_):e(i,++_,o),_<=n&&(s=_+1),n<=_&&(o=_-1)}}(t,n,s||0,o||t.length-1,a||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function s(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function o(t,e){a(t,0,t.children.length,e,t)}function a(t,e,i,n,s){s||(s=_(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(var o=e;o<i;o++){var a=t.children[o];r(s,t.leaf?n(a):a)}return s}function r(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function h(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function d(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function _(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(e,i,n,s,o){for(var a=[i,n];a.length;)if(!((n=a.pop())-(i=a.pop())<=s)){var r=i+Math.ceil((n-i)/s/2)*s;t(e,r,i,n,o),a.push(i,r,r,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!d(t,e))return i;for(var n=this.toBBox,s=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],r=e.leaf?n(a):a;d(t,r)&&(e.leaf?i.push(a):p(t,r)?this._all(a,i):s.push(a))}e=s.pop()}return i},n.prototype.collides=function(t){var e=this.data;if(!d(t,e))return!1;for(var i=[];e;){for(var n=0;n<e.children.length;n++){var s=e.children[n],o=e.leaf?this.toBBox(s):s;if(d(t,o)){if(e.leaf||p(t,o))return!0;i.push(s)}}e=i.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=_([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var i,n,o,a=this.data,r=this.toBBox(t),h=[],l=[];a||h.length;){if(a||(a=h.pop(),n=h[h.length-1],i=l.pop(),o=!0),a.leaf){var c=s(t,a.children,e);if(-1!==c)return a.children.splice(c,1),h.push(a),this._condense(h),this}o||a.leaf||!p(a,r)?n?(i++,a=n.children[i],o=!1):a=null:(h.push(a),l.push(i),i=0,n=a,a=a.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},n.prototype._build=function(t,e,i,n){var s,a=i-e+1,r=this._maxEntries;if(a<=r)return o(s=_(t.slice(e,i+1)),this.toBBox),s;n||(n=Math.ceil(Math.log(a)/Math.log(r)),r=Math.ceil(a/Math.pow(r,n-1))),(s=_([])).leaf=!1,s.height=n;var h=Math.ceil(a/r),l=h*Math.ceil(Math.sqrt(r));m(t,e,i,l,this.compareMinX);for(var c=e;c<=i;c+=l){var u=Math.min(c+l-1,i);m(t,c,u,h,this.compareMinY);for(var p=c;p<=u;p+=h){var d=Math.min(p+h-1,u);s.children.push(this._build(t,p,d,n-1))}}return o(s,this.toBBox),s},n.prototype._chooseSubtree=function(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){for(var s=1/0,o=1/0,a=void 0,r=0;r<e.children.length;r++){var h=e.children[r],l=c(h),u=(p=t,d=h,(Math.max(d.maxX,p.maxX)-Math.min(d.minX,p.minX))*(Math.max(d.maxY,p.maxY)-Math.min(d.minY,p.minY))-l);u<o?(o=u,s=l<s?l:s,a=h):u===o&&l<s&&(s=l,a=h)}e=a||e.children[0]}var p,d;return e},n.prototype._insert=function(t,e,i){var n=i?t:this.toBBox(t),s=[],o=this._chooseSubtree(n,this.data,e,s);for(o.children.push(t),r(o,n);e>=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(n,s,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var a=this._chooseSplitIndex(i,s,n),r=_(i.children.splice(a,i.children.length-a));r.height=i.height,r.leaf=i.leaf,o(i,this.toBBox),o(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(i,r)},n.prototype._splitRoot=function(t,e){this.data=_([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,s,o,r,h,l,u,p=1/0,d=1/0,_=e;_<=i-e;_++){var m=a(t,0,_,this.toBBox),g=a(t,_,i,this.toBBox),f=(s=m,o=g,r=Math.max(s.minX,o.minX),h=Math.max(s.minY,o.minY),l=Math.min(s.maxX,o.maxX),u=Math.min(s.maxY,o.maxY),Math.max(0,l-r)*Math.max(0,u-h)),y=c(m)+c(g);f<p?(p=f,n=_,d=y<d?y:d):f===p&&y<d&&(d=y,n=_)}return n||i-e},n.prototype._chooseSplitAxis=function(t,e,i){var n=t.leaf?this.compareMinX:h,s=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,s)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,i,n){t.children.sort(n);for(var s=this.toBBox,o=a(t,0,e,s),h=a(t,i-e,i,s),l=u(o)+u(h),c=e;c<i-e;c++){var p=t.children[c];r(o,t.leaf?s(p):p),l+=u(o)}for(var d=i-e-1;d>=e;d--){var _=t.children[d];r(h,t.leaf?s(_):_),l+=u(h)}return l},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)r(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},n},"object"==typeof t&&typeof e<"u"?e.exports=n():(i=i||self).RBush=n()}),_e=c(t=>{function e(t,e,i){void 0===i&&(i={});var n={type:"Feature"};return(0===i.id||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=e||{},n.geometry=t,n}function i(t,i,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(t[0])||!p(t[1]))throw new Error("coordinates must contain numbers");return e({type:"Point",coordinates:t},i,n)}function n(t,i,n){void 0===n&&(n={});for(var s=0,o=t;s<o.length;s++){var a=o[s];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var r=0;r<a[a.length-1].length;r++)if(a[a.length-1][r]!==a[0][r])throw new Error("First and last Position are not equivalent.")}return e({type:"Polygon",coordinates:t},i,n)}function s(t,i,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return e({type:"LineString",coordinates:t},i,n)}function o(t,e){void 0===e&&(e={});var i={type:"FeatureCollection"};return e.id&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.features=t,i}function a(t,i,n){return void 0===n&&(n={}),e({type:"MultiLineString",coordinates:t},i,n)}function r(t,i,n){return void 0===n&&(n={}),e({type:"MultiPoint",coordinates:t},i,n)}function h(t,i,n){return void 0===n&&(n={}),e({type:"MultiPolygon",coordinates:t},i,n)}function l(e,i){void 0===i&&(i="kilometers");var n=t.factors[i];if(!n)throw new Error(i+" units is invalid");return e*n}function c(e,i){void 0===i&&(i="kilometers");var n=t.factors[i];if(!n)throw new Error(i+" units is invalid");return e/n}function u(t){return 180*(t%(2*Math.PI))/Math.PI}function p(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.earthRadius=6371008.8,t.factors={centimeters:100*t.earthRadius,centimetres:100*t.earthRadius,degrees:t.earthRadius/111325,feet:3.28084*t.earthRadius,inches:39.37*t.earthRadius,kilometers:t.earthRadius/1e3,kilometres:t.earthRadius/1e3,meters:t.earthRadius,metres:t.earthRadius,miles:t.earthRadius/1609.344,millimeters:1e3*t.earthRadius,millimetres:1e3*t.earthRadius,nauticalmiles:t.earthRadius/1852,radians:1,yards:1.0936*t.earthRadius},t.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/t.earthRadius,yards:1.0936133},t.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},t.feature=e,t.geometry=function(t,e,o){switch(t){case"Point":return i(e).geometry;case"LineString":return s(e).geometry;case"Polygon":return n(e).geometry;case"MultiPoint":return r(e).geometry;case"MultiLineString":return a(e).geometry;case"MultiPolygon":return h(e).geometry;default:throw new Error(t+" is invalid")}},t.point=i,t.points=function(t,e,n){return void 0===n&&(n={}),o(t.map(function(t){return i(t,e)}),n)},t.polygon=n,t.polygons=function(t,e,i){return void 0===i&&(i={}),o(t.map(function(t){return n(t,e)}),i)},t.lineString=s,t.lineStrings=function(t,e,i){return void 0===i&&(i={}),o(t.map(function(t){return s(t,e)}),i)},t.featureCollection=o,t.multiLineString=a,t.multiPoint=r,t.multiPolygon=h,t.geometryCollection=function(t,i,n){return void 0===n&&(n={}),e({type:"GeometryCollection",geometries:t},i,n)},t.round=function(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var i=Math.pow(10,e||0);return Math.round(t*i)/i},t.radiansToLength=l,t.lengthToRadians=c,t.lengthToDegrees=function(t,e){return u(c(t,e))},t.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},t.radiansToDegrees=u,t.degreesToRadians=function(t){return t%360*Math.PI/180},t.convertLength=function(t,e,i){if(void 0===e&&(e="kilometers"),void 0===i&&(i="kilometers"),!(t>=0))throw new Error("length must be a positive number");return l(c(t,e),i)},t.convertArea=function(e,i,n){if(void 0===i&&(i="meters"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("area must be a positive number");var s=t.areaFactors[i];if(!s)throw new Error("invalid original units");var o=t.areaFactors[n];if(!o)throw new Error("invalid final units");return e/s*o},t.isNumber=p,t.isObject=function(t){return!!t&&t.constructor===Object},t.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!p(t))throw new Error("bbox must only contain numbers")})},t.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}}),me=c(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=_e();function i(t,e,n){if(null!==t)for(var s,o,a,r,h,l,c,u,p=0,d=0,_=t.type,m="FeatureCollection"===_,g="Feature"===_,f=m?t.features.length:1,y=0;y<f;y++){h=(u=!!(c=m?t.features[y].geometry:g?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var A=0;A<h;A++){var v=0,M=0;if(null!==(r=u?c.geometries[A]:c)){l=r.coordinates;var L=r.type;switch(p=!n||"Polygon"!==L&&"MultiPolygon"!==L?0:1,L){case null:break;case"Point":if(!1===e(l,d,y,v,M))return!1;d++,v++;break;case"LineString":case"MultiPoint":for(s=0;s<l.length;s++){if(!1===e(l[s],d,y,v,M))return!1;d++,"MultiPoint"===L&&v++}"LineString"===L&&v++;break;case"Polygon":case"MultiLineString":for(s=0;s<l.length;s++){for(o=0;o<l[s].length-p;o++){if(!1===e(l[s][o],d,y,v,M))return!1;d++}"MultiLineString"===L&&v++,"Polygon"===L&&M++}"Polygon"===L&&v++;break;case"MultiPolygon":for(s=0;s<l.length;s++){for(M=0,o=0;o<l[s].length;o++){for(a=0;a<l[s][o].length-p;a++){if(!1===e(l[s][o][a],d,y,v,M))return!1;d++}M++}v++}break;case"GeometryCollection":for(s=0;s<r.geometries.length;s++)if(!1===i(r.geometries[s],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function n(t,e){var i;switch(t.type){case"FeatureCollection":for(i=0;i<t.features.length&&!1!==e(t.features[i].properties,i);i++);break;case"Feature":e(t.properties,0)}}function s(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var i=0;i<t.features.length&&!1!==e(t.features[i],i);i++);}function o(t,e){var i,n,s,o,a,r,h,l,c,u,p=0,d="FeatureCollection"===t.type,_="Feature"===t.type,m=d?t.features.length:1;for(i=0;i<m;i++){for(r=d?t.features[i].geometry:_?t.geometry:t,l=d?t.features[i].properties:_?t.properties:{},c=d?t.features[i].bbox:_?t.bbox:void 0,u=d?t.features[i].id:_?t.id:void 0,a=(h=!!r&&"GeometryCollection"===r.type)?r.geometries.length:1,s=0;s<a;s++)if(null!==(o=h?r.geometries[s]:r))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,p,l,c,u))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===e(o.geometries[n],p,l,c,u))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,l,c,u))return!1;p++}}function a(t,i){o(t,function(t,n,s,o,a){var r,h=null===t?null:t.type;switch(h){case null:case"Point":case"LineString":case"Polygon":return!1!==i(e.feature(t,s,{bbox:o,id:a}),n,0)&&void 0}switch(h){case"MultiPoint":r="Point";break;case"MultiLineString":r="LineString";break;case"MultiPolygon":r="Polygon"}for(var l=0;l<t.coordinates.length;l++){var c={type:r,coordinates:t.coordinates[l]};if(!1===i(e.feature(c,s),n,l))return!1}})}function r(t,n){a(t,function(t,s,o){var a=0;if(t.geometry){var r=t.geometry.type;if("Point"!==r&&"MultiPoint"!==r){var h,l=0,c=0,u=0;if(!1===i(t,function(i,r,p,d,_){if(void 0===h||s>l||d>c||_>u)return h=i,l=s,c=d,u=_,void(a=0);var m=e.lineString([h,i],t.properties);if(!1===n(m,s,o,_,a))return!1;a++,h=i}))return!1}}})}function h(t,i){if(!t)throw new Error("geojson is required");a(t,function(t,n,s){if(null!==t.geometry){var o=t.geometry.type,a=t.geometry.coordinates;switch(o){case"LineString":if(!1===i(t,n,s,0,0))return!1;break;case"Polygon":for(var r=0;r<a.length;r++)if(!1===i(e.lineString(a[r],t.properties),n,s,r))return!1}}})}t.coordAll=function(t){var e=[];return i(t,function(t){e.push(t)}),e},t.coordEach=i,t.coordReduce=function(t,e,n,s){var o=n;return i(t,function(t,i,s,a,r){o=0===i&&void 0===n?t:e(o,t,i,s,a,r)},s),o},t.featureEach=s,t.featureReduce=function(t,e,i){var n=i;return s(t,function(t,s){n=0===s&&void 0===i?t:e(n,t,s)}),n},t.findPoint=function(t,i){if(i=i||{},!e.isObject(i))throw new Error("options is invalid");var n,s=i.featureIndex||0,o=i.multiFeatureIndex||0,a=i.geometryIndex||0,r=i.coordIndex||0,h=i.properties;switch(t.type){case"FeatureCollection":s<0&&(s=t.features.length+s),h=h||t.features[s].properties,n=t.features[s].geometry;break;case"Feature":h=h||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":return e.point(l,h,i);case"MultiPoint":return o<0&&(o=l.length+o),e.point(l[o],h,i);case"LineString":return r<0&&(r=l.length+r),e.point(l[r],h,i);case"Polygon":return a<0&&(a=l.length+a),r<0&&(r=l[a].length+r),e.point(l[a][r],h,i);case"MultiLineString":return o<0&&(o=l.length+o),r<0&&(r=l[o].length+r),e.point(l[o][r],h,i);case"MultiPolygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),r<0&&(r=l[o][a].length-r),e.point(l[o][a][r],h,i)}throw new Error("geojson is invalid")},t.findSegment=function(t,i){if(i=i||{},!e.isObject(i))throw new Error("options is invalid");var n,s=i.featureIndex||0,o=i.multiFeatureIndex||0,a=i.geometryIndex||0,r=i.segmentIndex||0,h=i.properties;switch(t.type){case"FeatureCollection":s<0&&(s=t.features.length+s),h=h||t.features[s].properties,n=t.features[s].geometry;break;case"Feature":h=h||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return r<0&&(r=l.length+r-1),e.lineString([l[r],l[r+1]],h,i);case"Polygon":return a<0&&(a=l.length+a),r<0&&(r=l[a].length+r-1),e.lineString([l[a][r],l[a][r+1]],h,i);case"MultiLineString":return o<0&&(o=l.length+o),r<0&&(r=l[o].length+r-1),e.lineString([l[o][r],l[o][r+1]],h,i);case"MultiPolygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),r<0&&(r=l[o][a].length-r-1),e.lineString([l[o][a][r],l[o][a][r+1]],h,i)}throw new Error("geojson is invalid")},t.flattenEach=a,t.flattenReduce=function(t,e,i){var n=i;return a(t,function(t,s,o){n=0===s&&0===o&&void 0===i?t:e(n,t,s,o)}),n},t.geomEach=o,t.geomReduce=function(t,e,i){var n=i;return o(t,function(t,s,o,a,r){n=0===s&&void 0===i?t:e(n,t,s,o,a,r)}),n},t.lineEach=h,t.lineReduce=function(t,e,i){var n=i;return h(t,function(t,s,o,a){n=0===s&&void 0===i?t:e(n,t,s,o,a)}),n},t.propEach=n,t.propReduce=function(t,e,i){var s=i;return n(t,function(t,n){s=0===n&&void 0===i?t:e(s,t,n)}),s},t.segmentEach=r,t.segmentReduce=function(t,e,i){var n=i,s=!1;return r(t,function(t,o,a,r,h){n=!1===s&&void 0===i?t:e(n,t,o,a,r,h),s=!0}),n}}),ge=c(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=me();function i(t){var i=[1/0,1/0,-1/0,-1/0];return e.coordEach(t,function(t){i[0]>t[0]&&(i[0]=t[0]),i[1]>t[1]&&(i[1]=t[1]),i[2]<t[0]&&(i[2]=t[0]),i[3]<t[1]&&(i[3]=t[1])}),i}i.default=i,t.default=i}),fe=c((t,e)=>{var i=de(),n=_e(),s=me(),o=ge().default,a=s.featureEach;s.coordEach,n.polygon;var r=n.featureCollection;function h(t){var e=new i(t);return e.insert=function(t){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:o(t),i.prototype.insert.call(this,t)},e.load=function(t){var e=[];return Array.isArray(t)?t.forEach(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:o(t),e.push(t)}):a(t,function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:o(t),e.push(t)}),i.prototype.load.call(this,e)},e.remove=function(t,e){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:o(t),i.prototype.remove.call(this,t,e)},e.clear=function(){return i.prototype.clear.call(this)},e.search=function(t){var e=i.prototype.search.call(this,this.toBBox(t));return r(e)},e.collides=function(t){return i.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=i.prototype.all.call(this);return r(t)},e.toJSON=function(){return i.prototype.toJSON.call(this)},e.fromJSON=function(t){return i.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var e;if(t.bbox)e=t.bbox;else if(Array.isArray(t)&&4===t.length)e=t;else if(Array.isArray(t)&&6===t.length)e=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)e=o(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=o(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}e.exports=h,e.exports.default=h});Array.prototype.findIndex=Array.prototype.findIndex||function(t){if(null===this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof t)throw new TypeError("callback must be a function");for(var e=Object(this),i=e.length>>>0,n=arguments[1],s=0;s<i;s++)if(t.call(n,e[s],s,e))return s;return-1},Array.prototype.find=Array.prototype.find||function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("callback must be a function");for(var e=Object(this),i=e.length>>>0,n=arguments[1],s=0;s<i;s++){var o=e[s];if(t.call(n,o,s,e))return o}},"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");t=Object(t);for(var e=1;e<arguments.length;e++){var i=arguments[e];if(null!=i)for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}),[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach(function(t){t.hasOwnProperty("remove")||Object.defineProperty(t,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var i=Object(this),n=i.length>>>0;if(0===n)return!1;var s=0|e,o=Math.max(s>=0?s:n-Math.abs(s),0);function a(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}for(;o<n;){if(a(i[o],t))return!0;o++}return!1}});var ye=u(te()),Ae={tooltips:{placeMarker:"Clique para colocar marcador",firstVertex:"Clique para colocar primeiro vértice",continueLine:"Clique para continuar a desenhar",finishLine:"Clique num marcador existente para terminar",finishPoly:"Clique no primeiro marcador para terminar",finishRect:"Clique para terminar",startCircle:"Clique para colocar o centro do círculo",finishCircle:"Clique para terminar o círculo",placeCircleMarker:"Clique para colocar marcador de círculo",placeText:"Clique para colocar texto"},actions:{finish:"Terminar",cancel:"Cancelar",removeLastVertex:"Remover Último Vértice"},buttonTitles:{drawMarkerButton:"Desenhar Marcador",drawPolyButton:"Desenhar Polígonos",drawLineButton:"Desenhar Polilinha",drawCircleButton:"Desenhar Círculo",drawRectButton:"Desenhar Retângulo",editButton:"Editar Camadas",dragButton:"Arrastar Camadas",cutButton:"Cortar Camadas",deleteButton:"Remover Camadas",drawCircleMarkerButton:"Desenhar Marcador de Círculo",snappingButton:"Ajustar marcador arrastado a outras camadas e vértices",pinningButton:"Unir vértices partilhados",rotateButton:"Rodar Camadas",drawTextButton:"Desenhar Texto",scaleButton:"Escalar Camadas",autoTracingButton:"Traçado Automático de Linha"},measurements:{totalLength:"Comprimento",segmentLength:"Comprimento do Segmento",area:"Área",radius:"Raio",perimeter:"Perímetro",height:"Altura",width:"Largura",coordinates:"Posição",coordinatesMarker:"Marcador de Posição"}},ve={en:{tooltips:{placeMarker:"Click to place marker",firstVertex:"Click to place first vertex",continueLine:"Click to continue drawing",finishLine:"Click any existing marker to finish",finishPoly:"Click first marker to finish",finishRect:"Click to finish",startCircle:"Click to place circle center",finishCircle:"Click to finish circle",placeCircleMarker:"Click to place circle marker",placeText:"Click to place text",selectFirstLayerFor:"Select first layer for {action}",selectSecondLayerFor:"Select second layer for {action}"},actions:{finish:"Finish",cancel:"Cancel",removeLastVertex:"Remove Last Vertex"},buttonTitles:{drawMarkerButton:"Draw Marker",drawPolyButton:"Draw Polygons",drawLineButton:"Draw Polyline",drawCircleButton:"Draw Circle",drawRectButton:"Draw Rectangle",editButton:"Edit Layers",dragButton:"Drag Layers",cutButton:"Cut Layers",deleteButton:"Remove Layers",drawCircleMarkerButton:"Draw Circle Marker",snappingButton:"Snap dragged marker to other layers and vertices",pinningButton:"Pin shared vertices together",rotateButton:"Rotate Layers",drawTextButton:"Draw Text",scaleButton:"Scale Layers",autoTracingButton:"Auto trace Line",snapGuidesButton:"Show SnapGuides",unionButton:"Union layers",differenceButton:"Subtract layers"},measurements:{totalLength:"Length",segmentLength:"Segment length",area:"Area",radius:"Radius",perimeter:"Perimeter",height:"Height",width:"Width",coordinates:"Position",coordinatesMarker:"Position Marker"}},de:{tooltips:{placeMarker:"Platziere den Marker mit Klick",firstVertex:"Platziere den ersten Marker mit Klick",continueLine:"Klicke, um weiter zu zeichnen",finishLine:"Beende mit Klick auf existierenden Marker",finishPoly:"Beende mit Klick auf ersten Marker",finishRect:"Beende mit Klick",startCircle:"Platziere das Kreiszentrum mit Klick",finishCircle:"Beende den Kreis mit Klick",placeCircleMarker:"Platziere den Kreismarker mit Klick",placeText:"Platziere den Text mit Klick"},actions:{finish:"Beenden",cancel:"Abbrechen",removeLastVertex:"Letzten Vertex löschen"},buttonTitles:{drawMarkerButton:"Marker zeichnen",drawPolyButton:"Polygon zeichnen",drawLineButton:"Polyline zeichnen",drawCircleButton:"Kreis zeichnen",drawRectButton:"Rechteck zeichnen",editButton:"Layer editieren",dragButton:"Layer bewegen",cutButton:"Layer schneiden",deleteButton:"Layer löschen",drawCircleMarkerButton:"Kreismarker zeichnen",snappingButton:"Bewegter Layer an andere Layer oder Vertexe einhacken",pinningButton:"Vertexe an der gleichen Position verknüpfen",rotateButton:"Layer drehen",drawTextButton:"Text zeichnen",scaleButton:"Layer skalieren",autoTracingButton:"Linie automatisch nachzeichen"},measurements:{totalLength:"Länge",segmentLength:"Segment Länge",area:"Fläche",radius:"Radius",perimeter:"Umfang",height:"Höhe",width:"Breite",coordinates:"Position",coordinatesMarker:"Position Marker"}},it:{tooltips:{placeMarker:"Clicca per posizionare un Marker",firstVertex:"Clicca per posizionare il primo vertice",continueLine:"Clicca per continuare a disegnare",finishLine:"Clicca qualsiasi marker esistente per terminare",finishPoly:"Clicca il primo marker per terminare",finishRect:"Clicca per terminare",startCircle:"Clicca per posizionare il punto centrale del cerchio",finishCircle:"Clicca per terminare il cerchio",placeCircleMarker:"Clicca per posizionare un Marker del cherchio"},actions:{finish:"Termina",cancel:"Annulla",removeLastVertex:"Rimuovi l'ultimo vertice"},buttonTitles:{drawMarkerButton:"Disegna Marker",drawPolyButton:"Disegna Poligoni",drawLineButton:"Disegna Polilinea",drawCircleButton:"Disegna Cerchio",drawRectButton:"Disegna Rettangolo",editButton:"Modifica Livelli",dragButton:"Sposta Livelli",cutButton:"Ritaglia Livelli",deleteButton:"Elimina Livelli",drawCircleMarkerButton:"Disegna Marker del Cerchio",snappingButton:"Snap ha trascinato il pennarello su altri strati e vertici",pinningButton:"Pin condiviso vertici insieme",rotateButton:"Ruota livello"}},id:{tooltips:{placeMarker:"Klik untuk menempatkan marker",firstVertex:"Klik untuk menempatkan vertex pertama",continueLine:"Klik untuk meneruskan digitasi",finishLine:"Klik pada sembarang marker yang ada untuk mengakhiri",finishPoly:"Klik marker pertama untuk mengakhiri",finishRect:"Klik untuk mengakhiri",startCircle:"Klik untuk menempatkan titik pusat lingkaran",finishCircle:"Klik untuk mengakhiri lingkaran",placeCircleMarker:"Klik untuk menempatkan penanda lingkarann"},actions:{finish:"Selesai",cancel:"Batal",removeLastVertex:"Hilangkan Vertex Terakhir"},buttonTitles:{drawMarkerButton:"Digitasi Marker",drawPolyButton:"Digitasi Polygon",drawLineButton:"Digitasi Polyline",drawCircleButton:"Digitasi Lingkaran",drawRectButton:"Digitasi Segi Empat",editButton:"Edit Layer",dragButton:"Geser Layer",cutButton:"Potong Layer",deleteButton:"Hilangkan Layer",drawCircleMarkerButton:"Digitasi Penanda Lingkaran",snappingButton:"Jepretkan penanda yang ditarik ke lapisan dan simpul lain",pinningButton:"Sematkan simpul bersama bersama",rotateButton:"Putar lapisan"}},ro:{tooltips:{placeMarker:"Adaugă un punct",firstVertex:"Apasă aici pentru a adăuga primul Vertex",continueLine:"Apasă aici pentru a continua desenul",finishLine:"Apasă pe orice obiect pentru a finisa desenul",finishPoly:"Apasă pe primul obiect pentru a finisa",finishRect:"Apasă pentru a finisa",startCircle:"Apasă pentru a desena un cerc",finishCircle:"Apasă pentru a finisa un cerc",placeCircleMarker:"Adaugă un punct"},actions:{finish:"Termină",cancel:"Anulează",removeLastVertex:"Șterge ultimul Vertex"},buttonTitles:{drawMarkerButton:"Adaugă o bulină",drawPolyButton:"Desenează un poligon",drawLineButton:"Desenează o linie",drawCircleButton:"Desenează un cerc",drawRectButton:"Desenează un dreptunghi",editButton:"Editează straturile",dragButton:"Mută straturile",cutButton:"Taie straturile",deleteButton:"Șterge straturile",drawCircleMarkerButton:"Desenează marcatorul cercului",snappingButton:"Fixați marcatorul glisat pe alte straturi și vârfuri",pinningButton:"Fixați vârfurile partajate împreună",rotateButton:"Rotiți stratul"}},ru:{tooltips:{placeMarker:"Нажмите, чтобы нанести маркер",firstVertex:"Нажмите, чтобы нанести первый объект",continueLine:"Нажмите, чтобы продолжить рисование",finishLine:"Нажмите любой существующий маркер для завершения",finishPoly:"Выберите первую точку, чтобы закончить",finishRect:"Нажмите, чтобы закончить",startCircle:"Нажмите, чтобы добавить центр круга",finishCircle:"Нажмите, чтобы задать радиус",placeCircleMarker:"Нажмите, чтобы нанести круговой маркер"},actions:{finish:"Завершить",cancel:"Отменить",removeLastVertex:"Отменить последнее действие"},buttonTitles:{drawMarkerButton:"Добавить маркер",drawPolyButton:"Рисовать полигон",drawLineButton:"Рисовать кривую",drawCircleButton:"Рисовать круг",drawRectButton:"Рисовать прямоугольник",editButton:"Редактировать слой",dragButton:"Перенести слой",cutButton:"Вырезать слой",deleteButton:"Удалить слой",drawCircleMarkerButton:"Добавить круговой маркер",snappingButton:"Привязать перетаскиваемый маркер к другим слоям и вершинам",pinningButton:"Связать общие точки вместе",rotateButton:"Поворот слоя"}},es:{tooltips:{placeMarker:"Presiona para colocar un marcador",firstVertex:"Presiona para colocar el primer vértice",continueLine:"Presiona para continuar dibujando",finishLine:"Presiona cualquier marcador existente para finalizar",finishPoly:"Presiona el primer marcador para finalizar",finishRect:"Presiona para finalizar",startCircle:"Presiona para colocar el centro del círculo",finishCircle:"Presiona para finalizar el círculo",placeCircleMarker:"Presiona para colocar un marcador de círculo"},actions:{finish:"Finalizar",cancel:"Cancelar",removeLastVertex:"Eliminar último vértice"},buttonTitles:{drawMarkerButton:"Dibujar Marcador",drawPolyButton:"Dibujar Polígono",drawLineButton:"Dibujar Línea",drawCircleButton:"Dibujar Círculo",drawRectButton:"Dibujar Rectángulo",editButton:"Editar Capas",dragButton:"Arrastrar Capas",cutButton:"Cortar Capas",deleteButton:"Eliminar Capas",drawCircleMarkerButton:"Dibujar Marcador de Círculo",snappingButton:"El marcador de Snap arrastrado a otras capas y vértices",pinningButton:"Fijar juntos los vértices compartidos",rotateButton:"Rotar capa"}},nl:{tooltips:{placeMarker:"Klik om een marker te plaatsen",firstVertex:"Klik om het eerste punt te plaatsen",continueLine:"Klik om te blijven tekenen",finishLine:"Klik op een bestaand punt om te beëindigen",finishPoly:"Klik op het eerst punt om te beëindigen",finishRect:"Klik om te beëindigen",startCircle:"Klik om het middelpunt te plaatsen",finishCircle:"Klik om de cirkel te beëindigen",placeCircleMarker:"Klik om een marker te plaatsen"},actions:{finish:"Bewaar",cancel:"Annuleer",removeLastVertex:"Verwijder laatste punt"},buttonTitles:{drawMarkerButton:"Plaats Marker",drawPolyButton:"Teken een vlak",drawLineButton:"Teken een lijn",drawCircleButton:"Teken een cirkel",drawRectButton:"Teken een vierkant",editButton:"Bewerk",dragButton:"Verplaats",cutButton:"Knip",deleteButton:"Verwijder",drawCircleMarkerButton:"Plaats Marker",snappingButton:"Snap gesleepte marker naar andere lagen en hoekpunten",pinningButton:"Speld gedeelde hoekpunten samen",rotateButton:"Laag roteren"}},fr:{tooltips:{placeMarker:"Cliquez pour placer un marqueur",firstVertex:"Cliquez pour placer le premier sommet",continueLine:"Cliquez pour continuer à dessiner",finishLine:"Cliquez sur n'importe quel marqueur pour terminer",finishPoly:"Cliquez sur le premier marqueur pour terminer",finishRect:"Cliquez pour terminer",startCircle:"Cliquez pour placer le centre du cercle",finishCircle:"Cliquez pour finir le cercle",placeCircleMarker:"Cliquez pour placer le marqueur circulaire"},actions:{finish:"Terminer",cancel:"Annuler",removeLastVertex:"Retirer le dernier sommet"},buttonTitles:{drawMarkerButton:"Placer des marqueurs",drawPolyButton:"Dessiner des polygones",drawLineButton:"Dessiner des polylignes",drawCircleButton:"Dessiner un cercle",drawRectButton:"Dessiner un rectangle",editButton:"Éditer des calques",dragButton:"Déplacer des calques",cutButton:"Couper des calques",deleteButton:"Supprimer des calques",drawCircleMarkerButton:"Dessiner un marqueur circulaire",snappingButton:"Glisser le marqueur vers d'autres couches et sommets",pinningButton:"Épingler ensemble les sommets partagés",rotateButton:"Tourner des calques"}},pt:Ae,pt_br:{tooltips:{placeMarker:"Clique para posicionar o marcador",firstVertex:"Clique para posicionar o primeiro vértice",continueLine:"Clique para continuar desenhando",finishLine:"Clique em qualquer marcador existente para finalizar",finishPoly:"Clique no primeiro marcador para finalizar",finishRect:"Clique para finalizar",startCircle:"Clique para posicionar o centro do círculo",finishCircle:"Clique para finalizar o círculo",placeCircleMarker:"Clique para posicionar o marcador circular",placeText:"Clique para inserir texto"},actions:{finish:"Finalizar",cancel:"Cancelar",removeLastVertex:"Remover último vértice"},buttonTitles:{drawMarkerButton:"Desenhar Marcador",drawPolyButton:"Desenhar Polígonos",drawLineButton:"Desenhar Linha Poligonal",drawCircleButton:"Desenhar Círculo",drawRectButton:"Desenhar Retângulo",editButton:"Editar Camadas",dragButton:"Arrastar Camadas",cutButton:"Recortar Camadas",deleteButton:"Remover Camadas",drawCircleMarkerButton:"Desenhar Marcador de Círculo",snappingButton:"Ajustar marcador arrastado a outras camadas e vértices",pinningButton:"Unir vértices compartilhados",rotateButton:"Rotacionar Camadas",drawTextButton:"Desenhar Texto",scaleButton:"Redimensionar Camadas",autoTracingButton:"Traçado Automático de Linha"},measurements:{totalLength:"Comprimento",segmentLength:"Comprimento do Segmento",area:"Área",radius:"Raio",perimeter:"Perímetro",height:"Altura",width:"Largura",coordinates:"Posição",coordinatesMarker:"Marcador de Posição"}},pt_pt:Ae,zh:{tooltips:{placeMarker:"单击放置标记",firstVertex:"单击放置首个顶点",continueLine:"单击继续绘制",finishLine:"单击任何存在的标记以完成",finishPoly:"单击第一个标记以完成",finishRect:"单击完成",startCircle:"单击放置圆心",finishCircle:"单击完成圆形",placeCircleMarker:"点击放置圆形标记"},actions:{finish:"完成",cancel:"取消",removeLastVertex:"移除最后的顶点"},buttonTitles:{drawMarkerButton:"绘制标记",drawPolyButton:"绘制多边形",drawLineButton:"绘制线段",drawCircleButton:"绘制圆形",drawRectButton:"绘制长方形",editButton:"编辑图层",dragButton:"拖拽图层",cutButton:"剪切图层",deleteButton:"删除图层",drawCircleMarkerButton:"画圆圈标记",snappingButton:"将拖动的标记捕捉到其他图层和顶点",pinningButton:"将共享顶点固定在一起",rotateButton:"旋转图层"}},zh_tw:{tooltips:{placeMarker:"單擊放置標記",firstVertex:"單擊放置第一個頂點",continueLine:"單擊繼續繪製",finishLine:"單擊任何存在的標記以完成",finishPoly:"單擊第一個標記以完成",finishRect:"單擊完成",startCircle:"單擊放置圓心",finishCircle:"單擊完成圓形",placeCircleMarker:"點擊放置圓形標記"},actions:{finish:"完成",cancel:"取消",removeLastVertex:"移除最後一個頂點"},buttonTitles:{drawMarkerButton:"放置標記",drawPolyButton:"繪製多邊形",drawLineButton:"繪製線段",drawCircleButton:"繪製圓形",drawRectButton:"繪製方形",editButton:"編輯圖形",dragButton:"移動圖形",cutButton:"裁切圖形",deleteButton:"刪除圖形",drawCircleMarkerButton:"畫圓圈標記",snappingButton:"將拖動的標記對齊到其他圖層和頂點",pinningButton:"將共享頂點固定在一起",rotateButton:"旋轉圖形"}},pl:{tooltips:{placeMarker:"Kliknij, aby umieścić znacznik",firstVertex:"Kliknij, aby umieścić pierwszy wierzchołek",continueLine:"Kliknij, aby kontynuować rysowanie",finishLine:"Kliknij dowolny istniejący znacznik, aby zakończyć",finishPoly:"Kliknij pierwszy znacznik, aby zakończyć",finishRect:"Kliknij, aby zakończyć",startCircle:"Kliknij, aby umieścić środek okręgu",finishCircle:"Kliknij, aby zakończyć okrąg",placeCircleMarker:"Kliknij, aby umieścić znacznik okręgu",placeText:"Kliknij, aby umieścić tekst"},actions:{finish:"Zakończ",cancel:"Anuluj",removeLastVertex:"Usuń ostatni wierzchołek"},buttonTitles:{drawMarkerButton:"Rysuj znacznik",drawPolyButton:"Rysuj wielokąt",drawLineButton:"Rysuj linię",drawCircleButton:"Rysuj okrąg",drawRectButton:"Rysuj prostokąt",editButton:"Edytuj warstwy",dragButton:"Przeciągnij warstwy",cutButton:"Wytnij warstwy",deleteButton:"Usuń warstwy",drawCircleMarkerButton:"Rysuj znacznik okrągły",snappingButton:"Przyciągnij przenoszony znacznik do innych warstw i wierzchołków",pinningButton:"Przypnij wspólne wierzchołki razem",rotateButton:"Obróć warstwy",drawTextButton:"Rysuj tekst",scaleButton:"Skaluj warstwy",autoTracingButton:"Automatyczne śledzenie linii"},measurements:{totalLength:"Długość",segmentLength:"Długość odcinka",area:"Obszar",radius:"Promień",perimeter:"Obwód",height:"Wysokość",width:"Szerokość",coordinates:"Pozycja",coordinatesMarker:"Znacznik pozycji"}},sv:{tooltips:{placeMarker:"Klicka för att placera markör",firstVertex:"Klicka för att placera första hörnet",continueLine:"Klicka för att fortsätta rita",finishLine:"Klicka på en existerande punkt för att slutföra",finishPoly:"Klicka på den första punkten för att slutföra",finishRect:"Klicka för att slutföra",startCircle:"Klicka för att placera cirkelns centrum",finishCircle:"Klicka för att slutföra cirkeln",placeCircleMarker:"Klicka för att placera cirkelmarkör"},actions:{finish:"Slutför",cancel:"Avbryt",removeLastVertex:"Ta bort sista hörnet"},buttonTitles:{drawMarkerButton:"Rita Markör",drawPolyButton:"Rita Polygoner",drawLineButton:"Rita Linje",drawCircleButton:"Rita Cirkel",drawRectButton:"Rita Rektangel",editButton:"Redigera Lager",dragButton:"Dra Lager",cutButton:"Klipp i Lager",deleteButton:"Ta bort Lager",drawCircleMarkerButton:"Rita Cirkelmarkör",snappingButton:"Snäpp dra markören till andra lager och hörn",pinningButton:"Fäst delade hörn tillsammans",rotateButton:"Rotera lagret"}},el:{tooltips:{placeMarker:"Κάντε κλικ για να τοποθετήσετε Δείκτη",firstVertex:"Κάντε κλικ για να τοποθετήσετε το πρώτο σημείο",continueLine:"Κάντε κλικ για να συνεχίσετε να σχεδιάζετε",finishLine:"Κάντε κλικ σε οποιονδήποτε υπάρχον σημείο για να ολοκληρωθεί",finishPoly:"Κάντε κλικ στο πρώτο σημείο για να τελειώσετε",finishRect:"Κάντε κλικ για να τελειώσετε",startCircle:"Κάντε κλικ για να τοποθετήσετε κέντρο Κύκλου",finishCircle:"Κάντε κλικ για να ολοκληρώσετε τον Κύκλο",placeCircleMarker:"Κάντε κλικ για να τοποθετήσετε Κυκλικό Δείκτη"},actions:{finish:"Τέλος",cancel:"Ακύρωση",removeLastVertex:"Κατάργηση τελευταίου σημείου"},buttonTitles:{drawMarkerButton:"Σχεδίαση Δείκτη",drawPolyButton:"Σχεδίαση Πολυγώνου",drawLineButton:"Σχεδίαση Γραμμής",drawCircleButton:"Σχεδίαση Κύκλου",drawRectButton:"Σχεδίαση Ορθογωνίου",editButton:"Επεξεργασία Επιπέδων",dragButton:"Μεταφορά Επιπέδων",cutButton:"Αποκοπή Επιπέδων",deleteButton:"Κατάργηση Επιπέδων",drawCircleMarkerButton:"Σχεδίαση Κυκλικού Δείκτη",snappingButton:"Προσκόλληση του Δείκτη μεταφοράς σε άλλα Επίπεδα και Κορυφές",pinningButton:"Περικοπή κοινών κορυφών μαζί",rotateButton:"Περιστρέψτε το στρώμα"}},hu:{tooltips:{placeMarker:"Kattintson a jelölő elhelyezéséhez",firstVertex:"Kattintson az első pont elhelyezéséhez",continueLine:"Kattintson a következő pont elhelyezéséhez",finishLine:"A befejezéshez kattintson egy meglévő pontra",finishPoly:"A befejezéshez kattintson az első pontra",finishRect:"Kattintson a befejezéshez",startCircle:"Kattintson a kör középpontjának elhelyezéséhez",finishCircle:"Kattintson a kör befejezéséhez",placeCircleMarker:"Kattintson a körjelölő elhelyezéséhez"},actions:{finish:"Befejezés",cancel:"Mégse",removeLastVertex:"Utolsó pont eltávolítása"},buttonTitles:{drawMarkerButton:"Jelölő rajzolása",drawPolyButton:"Poligon rajzolása",drawLineButton:"Vonal rajzolása",drawCircleButton:"Kör rajzolása",drawRectButton:"Négyzet rajzolása",editButton:"Elemek szerkesztése",dragButton:"Elemek mozgatása",cutButton:"Elemek vágása",deleteButton:"Elemek törlése",drawCircleMarkerButton:"Kör jelölő rajzolása",snappingButton:"Kapcsolja a jelöltőt másik elemhez vagy ponthoz",pinningButton:"Közös pontok összekötése",rotateButton:"Fólia elforgatása"}},da:{tooltips:{placeMarker:"Tryk for at placere en markør",firstVertex:"Tryk for at placere det første punkt",continueLine:"Tryk for at fortsætte linjen",finishLine:"Tryk på et eksisterende punkt for at afslutte",finishPoly:"Tryk på det første punkt for at afslutte",finishRect:"Tryk for at afslutte",startCircle:"Tryk for at placere cirklens center",finishCircle:"Tryk for at afslutte cirklen",placeCircleMarker:"Tryk for at placere en cirkelmarkør"},actions:{finish:"Afslut",cancel:"Afbryd",removeLastVertex:"Fjern sidste punkt"},buttonTitles:{drawMarkerButton:"Placer markør",drawPolyButton:"Tegn polygon",drawLineButton:"Tegn linje",drawCircleButton:"Tegn cirkel",drawRectButton:"Tegn firkant",editButton:"Rediger",dragButton:"Træk",cutButton:"Klip",deleteButton:"Fjern",drawCircleMarkerButton:"Tegn cirkelmarkør",snappingButton:"Fastgør trukket markør til andre elementer",pinningButton:"Sammenlæg delte elementer",rotateButton:"Roter laget"}},no:{tooltips:{placeMarker:"Klikk for å plassere punkt",firstVertex:"Klikk for å plassere første punkt",continueLine:"Klikk for å tegne videre",finishLine:"Klikk på et eksisterende punkt for å fullføre",finishPoly:"Klikk første punkt for å fullføre",finishRect:"Klikk for å fullføre",startCircle:"Klikk for å sette sirkel midtpunkt",finishCircle:"Klikk for å fullføre sirkel",placeCircleMarker:"Klikk for å plassere sirkel",placeText:"Klikk for å plassere tekst"},actions:{finish:"Fullfør",cancel:"Kanseller",removeLastVertex:"Fjern forrige punkt"},buttonTitles:{drawMarkerButton:"Tegn punkt",drawPolyButton:"Tegn flate",drawLineButton:"Tegn linje",drawCircleButton:"Tegn sirkel",drawRectButton:"Tegn rektangel",editButton:"Rediger objekter",dragButton:"Dra objekter",cutButton:"Kutt objekter",deleteButton:"Fjern objekter",drawCircleMarkerButton:"Tegn sirkel-punkt",snappingButton:"Fest dratt punkt til andre objekter og punkt",pinningButton:"Pin delte punkter sammen",rotateButton:"Rotér objekter",drawTextButton:"Tegn tekst",scaleButton:"Skalér objekter",autoTracingButton:"Automatisk sporing av linje"},measurements:{totalLength:"Lengde",segmentLength:"Segmentlengde",area:"Område",radius:"Radius",perimeter:"Omriss",height:"Høyde",width:"Bredde",coordinates:"Posisjon",coordinatesMarker:"Posisjonsmarkør"}},fa:{tooltips:{placeMarker:"کلیک برای جانمایی نشان",firstVertex:"کلیک برای رسم اولین رأس",continueLine:"کلیک برای ادامه رسم",finishLine:"کلیک روی هر نشان موجود برای پایان",finishPoly:"کلیک روی اولین نشان برای پایان",finishRect:"کلیک برای پایان",startCircle:"کلیک برای رسم مرکز دایره",finishCircle:"کلیک برای پایان رسم دایره",placeCircleMarker:"کلیک برای رسم نشان دایره",placeText:"کلیک برای نوشتن متن"},actions:{finish:"پایان",cancel:"لفو",removeLastVertex:"حذف آخرین رأس"},buttonTitles:{drawMarkerButton:"درج نشان",drawPolyButton:"رسم چندضلعی",drawLineButton:"رسم خط",drawCircleButton:"رسم دایره",drawRectButton:"رسم چهارضلعی",editButton:"ویرایش لایه‌ها",dragButton:"جابجایی لایه‌ها",cutButton:"برش لایه‌ها",deleteButton:"حذف لایه‌ها",drawCircleMarkerButton:"رسم نشان دایره",snappingButton:"نشانگر را به لایه‌ها و رئوس دیگر بکشید",pinningButton:"رئوس مشترک را با هم پین کنید",rotateButton:"چرخش لایه",drawTextButton:"رسم متن",scaleButton:"مقیاس‌گذاری",autoTracingButton:"ردیاب خودکار"},measurements:{totalLength:"طول",segmentLength:"طول بخش",area:"ناحیه",radius:"شعاع",perimeter:"محیط",height:"ارتفاع",width:"عرض",coordinates:"موقعیت",coordinatesMarker:"موقعیت نشان"}},ua:{tooltips:{placeMarker:"Натисніть, щоб нанести маркер",firstVertex:"Натисніть, щоб нанести першу вершину",continueLine:"Натисніть, щоб продовжити малювати",finishLine:"Натисніть будь-який існуючий маркер для завершення",finishPoly:"Виберіть перший маркер, щоб завершити",finishRect:"Натисніть, щоб завершити",startCircle:"Натисніть, щоб додати центр кола",finishCircle:"Натисніть, щоб завершити коло",placeCircleMarker:"Натисніть, щоб нанести круговий маркер"},actions:{finish:"Завершити",cancel:"Відмінити",removeLastVertex:"Видалити попередню вершину"},buttonTitles:{drawMarkerButton:"Малювати маркер",drawPolyButton:"Малювати полігон",drawLineButton:"Малювати криву",drawCircleButton:"Малювати коло",drawRectButton:"Малювати прямокутник",editButton:"Редагувати шари",dragButton:"Перенести шари",cutButton:"Вирізати шари",deleteButton:"Видалити шари",drawCircleMarkerButton:"Малювати круговий маркер",snappingButton:"Прив’язати перетягнутий маркер до інших шарів та вершин",pinningButton:"Зв'язати спільні вершини разом",rotateButton:"Повернути шар"}},tr:{tooltips:{placeMarker:"İşaretçi yerleştirmek için tıklayın",firstVertex:"İlk tepe noktasını yerleştirmek için tıklayın",continueLine:"Çizime devam etmek için tıklayın",finishLine:"Bitirmek için mevcut herhangi bir işaretçiyi tıklayın",finishPoly:"Bitirmek için ilk işaretçiyi tıklayın",finishRect:"Bitirmek için tıklayın",startCircle:"Daire merkezine yerleştirmek için tıklayın",finishCircle:"Daireyi bitirmek için tıklayın",placeCircleMarker:"Daire işaretçisi yerleştirmek için tıklayın"},actions:{finish:"Bitir",cancel:"İptal",removeLastVertex:"Son köşeyi kaldır"},buttonTitles:{drawMarkerButton:"Çizim İşaretçisi",drawPolyButton:"Çokgenler çiz",drawLineButton:"Çoklu çizgi çiz",drawCircleButton:"Çember çiz",drawRectButton:"Dikdörtgen çiz",editButton:"Katmanları düzenle",dragButton:"Katmanları sürükle",cutButton:"Katmanları kes",deleteButton:"Katmanları kaldır",drawCircleMarkerButton:"Daire işaretçisi çiz",snappingButton:"Sürüklenen işaretçiyi diğer katmanlara ve köşelere yapıştır",pinningButton:"Paylaşılan köşeleri birbirine sabitle",rotateButton:"Katmanı döndür"}},cz:{tooltips:{placeMarker:"Kliknutím vytvoříte značku",firstVertex:"Kliknutím vytvoříte první objekt",continueLine:"Kliknutím pokračujte v kreslení",finishLine:"Kliknutí na libovolnou existující značku pro dokončení",finishPoly:"Vyberte první bod pro dokončení",finishRect:"Klikněte pro dokončení",startCircle:"Kliknutím přidejte střed kruhu",finishCircle:"Нажмите, чтобы задать радиус",placeCircleMarker:"Kliknutím nastavte poloměr"},actions:{finish:"Dokončit",cancel:"Zrušit",removeLastVertex:"Zrušit poslední akci"},buttonTitles:{drawMarkerButton:"Přidat značku",drawPolyButton:"Nakreslit polygon",drawLineButton:"Nakreslit křivku",drawCircleButton:"Nakreslit kruh",drawRectButton:"Nakreslit obdélník",editButton:"Upravit vrstvu",dragButton:"Přeneste vrstvu",cutButton:"Vyjmout vrstvu",deleteButton:"Smazat vrstvu",drawCircleMarkerButton:"Přidat kruhovou značku",snappingButton:"Navázat tažnou značku k dalším vrstvám a vrcholům",pinningButton:"Spojit společné body dohromady",rotateButton:"Otočte vrstvu"}},ja:{tooltips:{placeMarker:"クリックしてマーカーを配置",firstVertex:"クリックして最初の頂点を配置",continueLine:"クリックして描画を続ける",finishLine:"任意のマーカーをクリックして終了",finishPoly:"最初のマーカーをクリックして終了",finishRect:"クリックして終了",startCircle:"クリックして円の中心を配置",finishCircle:"クリックして円の描画を終了",placeCircleMarker:"クリックして円マーカーを配置",placeText:"クリックしてテキストを配置"},actions:{finish:"終了",cancel:"キャンセル",removeLastVertex:"最後の頂点を削除"},buttonTitles:{drawMarkerButton:"マーカーを描画",drawPolyButton:"ポリゴンを描画",drawLineButton:"折れ線を描画",drawCircleButton:"円を描画",drawRectButton:"矩形を描画",editButton:"レイヤーを編集",dragButton:"レイヤーをドラッグ",cutButton:"レイヤーを切り取り",deleteButton:"レイヤーを削除",drawCircleMarkerButton:"円マーカーを描画",snappingButton:"ドラッグしたマーカーを他のレイヤーや頂点にスナップする",pinningButton:"共有する頂点を同時に動かす",rotateButton:"レイヤーを回転",drawTextButton:"テキストを描画"}},fi:{tooltips:{placeMarker:"Klikkaa asettaaksesi merkin",firstVertex:"Klikkaa asettaakseni ensimmäisen osuuden",continueLine:"Klikkaa jatkaaksesi piirtämistä",finishLine:"Klikkaa olemassa olevaa merkkiä lopettaaksesi",finishPoly:"Klikkaa ensimmäistä merkkiä lopettaaksesi",finishRect:"Klikkaa lopettaaksesi",startCircle:"Klikkaa asettaaksesi ympyrän keskipisteen",finishCircle:"Klikkaa lopettaaksesi ympyrän",placeCircleMarker:"Klikkaa asettaaksesi ympyrämerkin",placeText:"Klikkaa asettaaksesi tekstin"},actions:{finish:"Valmis",cancel:"Peruuta",removeLastVertex:"Poista viimeinen osuus"},buttonTitles:{drawMarkerButton:"Piirrä merkkejä",drawPolyButton:"Piirrä monikulmioita",drawLineButton:"Piirrä viivoja",drawCircleButton:"Piirrä ympyrä",drawRectButton:"Piirrä neliskulmioita",editButton:"Muokkaa",dragButton:"Siirrä",cutButton:"Leikkaa",deleteButton:"Poista",drawCircleMarkerButton:"Piirrä ympyrämerkki",snappingButton:"Kiinnitä siirrettävä merkki toisiin muotoihin",pinningButton:"Kiinnitä jaetut muodot yhteen",rotateButton:"Käännä",drawTextButton:"Piirrä tekstiä"}},ko:{tooltips:{placeMarker:"마커 위치를 클릭하세요",firstVertex:"첫번째 꼭지점 위치을 클릭하세요",continueLine:"계속 그리려면 클릭하세요",finishLine:"끝내려면 기존 마커를 클릭하세요",finishPoly:"끝내려면 처음 마커를 클릭하세요",finishRect:"끝내려면 클릭하세요",startCircle:"원의 중심이 될 위치를 클릭하세요",finishCircle:"원을 끝내려면 클릭하세요",placeCircleMarker:"원 마커 위치를 클릭하세요",placeText:"텍스트 위치를 클릭하세요"},actions:{finish:"끝내기",cancel:"취소",removeLastVertex:"마지막 꼭지점 제거"},buttonTitles:{drawMarkerButton:"마커 그리기",drawPolyButton:"다각형 그리기",drawLineButton:"다각선 그리기",drawCircleButton:"원 그리기",drawRectButton:"직사각형 그리기",editButton:"레이어 편집하기",dragButton:"레이어 끌기",cutButton:"레이어 자르기",deleteButton:"레이어 제거하기",drawCircleMarkerButton:"원 마커 그리기",snappingButton:"잡아끈 마커를 다른 레이어 및 꼭지점에 들러붙게 하기",pinningButton:"공유 꼭지점을 함께 찍기",rotateButton:"레이어 회전하기",drawTextButton:"텍스트 그리기"}},ky:{tooltips:{placeMarker:"Маркерди жайгаштыруу үчүн басыңыз",firstVertex:"Биринчи чокуну жайгаштырууну үчүн басыңыз",continueLine:"Сүрөт тартууну улантуу үчүн басыңыз",finishLine:"Аяктоо үчүн учурдагы маркерди басыңыз",finishPoly:"Бүтүрүү үчүн биринчи маркерди басыңыз",finishRect:"Бүтүрүү үчүн басыңыз",startCircle:"Айлананын борборун жайгаштырууну үчүн басыңыз",finishCircle:"Айлананы бүтүрүү үчүн басыңыз",placeCircleMarker:"Тегерек маркерди жайгаштыруу үчүн басыңыз",placeText:"Текстти жайгаштыруу үчүн басыңыз"},actions:{finish:"Аягы",cancel:"Жок кылуу",removeLastVertex:"Акыркы чокуну өчүрүү"},buttonTitles:{drawMarkerButton:"Маркерди чизуу",drawPolyButton:"Полигон чизуу",drawLineButton:"Полилиния чизуу",drawCircleButton:"Дайынды чизуу",drawRectButton:"Прямоугольник чизуу",editButton:"Слоопту түзөтүү",dragButton:"Слоопту карап сүйлөү",cutButton:"Слооптун башын кесүү",deleteButton:"Слооптун өчүрүү",drawCircleMarkerButton:"Дайынды маркерди чизуу",snappingButton:"Башка слооптордун жана вертекстердин арасына чекилдөө",pinningButton:"Бөлүшкөн вертекстерди бирге тутуштуруу",rotateButton:"Слооптун өзгөртүү",drawTextButton:"Текст чизуу",scaleButton:"Слооптун өлчөмүн өзгөртүү",autoTracingButton:"Автоматтык тизмеги чизуу"},measurements:{totalLength:"Узундук",segmentLength:"Сегмент узундугу",area:"Аймак",radius:"Радиус",perimeter:"Периметр",height:"Диаметр",width:"Кенчилик",coordinates:"Координаттар",coordinatesMarker:"Маркердин координаттары"}}},Me={_globalEditModeEnabled:!1,enableGlobalEditMode(t){let e={...t};this._globalEditModeEnabled=!0,this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),L.PM.Utils.findLayers(this.map).forEach(t=>{this._isRelevantForEdit(t)&&t.pm.enable(e)}),this.throttledReInitEdit||(this.throttledReInitEdit=L.Util.throttle(this.handleLayerAdditionInGlobalEditMode,100,this)),this._addedLayersEdit={},this.map.on("layeradd",this._layerAddedEdit,this),this.map.on("layeradd",this.throttledReInitEdit,this),this._fireGlobalEditModeToggled(!0)},disableGlobalEditMode(){this._globalEditModeEnabled=!1,L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.disable()}),this.map.off("layeradd",this._layerAddedEdit,this),this.map.off("layeradd",this.throttledReInitEdit,this),this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),this._fireGlobalEditModeToggled(!1)},globalEditEnabled(){return this.globalEditModeEnabled()},globalEditModeEnabled(){return this._globalEditModeEnabled},toggleGlobalEditMode(t=this.globalOptions){this.globalEditModeEnabled()?this.disableGlobalEditMode():this.enableGlobalEditMode(t)},handleLayerAdditionInGlobalEditMode(){let t=this._addedLayersEdit;if(this._addedLayersEdit={},this.globalEditModeEnabled())for(let e in t){let i=t[e];this._isRelevantForEdit(i)&&i.pm.enable({...this.globalOptions})}},_layerAddedEdit({layer:t}){this._addedLayersEdit[L.stamp(t)]=t},_isRelevantForEdit:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowEditing},Le={_globalDragModeEnabled:!1,enableGlobalDragMode(){let t=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!0,this._addedLayersDrag={},t.forEach(t=>{this._isRelevantForDrag(t)&&t.pm.enableLayerDrag()}),this.throttledReInitDrag||(this.throttledReInitDrag=L.Util.throttle(this.reinitGlobalDragMode,100,this)),this.map.on("layeradd",this._layerAddedDrag,this),this.map.on("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!0)},disableGlobalDragMode(){let t=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!1,t.forEach(t=>{t.pm.disableLayerDrag()}),this.map.off("layeradd",this._layerAddedDrag,this),this.map.off("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!1)},globalDragModeEnabled(){return!!this._globalDragModeEnabled},toggleGlobalDragMode(){this.globalDragModeEnabled()?this.disableGlobalDragMode():this.enableGlobalDragMode()},reinitGlobalDragMode(){let t=this._addedLayersDrag;if(this._addedLayersDrag={},this.globalDragModeEnabled())for(let e in t){let i=t[e];this._isRelevantForDrag(i)&&i.pm.enableLayerDrag()}},_layerAddedDrag({layer:t}){this._addedLayersDrag[L.stamp(t)]=t},_isRelevantForDrag:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.draggable},xe={_globalRemovalModeEnabled:!1,enableGlobalRemovalMode(){this._globalRemovalModeEnabled=!0,this.map.eachLayer(t=>{this._isRelevantForRemoval(t)&&(t.pm.enabled()&&t.pm.disable(),t.on("click",this.removeLayer,this))}),this.throttledReInitRemoval||(this.throttledReInitRemoval=L.Util.throttle(this.handleLayerAdditionInGlobalRemovalMode,100,this)),this._addedLayersRemoval={},this.map.on("layeradd",this._layerAddedRemoval,this),this.map.on("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!0)},disableGlobalRemovalMode(){this._globalRemovalModeEnabled=!1,this.map.eachLayer(t=>{t.off("click",this.removeLayer,this)}),this.map.off("layeradd",this._layerAddedRemoval,this),this.map.off("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!1)},globalRemovalEnabled(){return this.globalRemovalModeEnabled()},globalRemovalModeEnabled(){return!!this._globalRemovalModeEnabled},toggleGlobalRemovalMode(){this.globalRemovalModeEnabled()?this.disableGlobalRemovalMode():this.enableGlobalRemovalMode()},removeLayer(t){let e=t.target;this._isRelevantForRemoval(e)&&!e.pm.dragging()&&(e.removeFrom(this.map.pm._getContainingLayer()),e.remove(),e instanceof L.LayerGroup?(this._fireRemoveLayerGroup(e),this._fireRemoveLayerGroup(this.map,e)):(e.pm._fireRemove(e),e.pm._fireRemove(this.map,e)))},_isRelevantForRemoval:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowRemoval,handleLayerAdditionInGlobalRemovalMode(){let t=this._addedLayersRemoval;if(this._addedLayersRemoval={},this.globalRemovalModeEnabled())for(let e in t){let i=t[e];this._isRelevantForRemoval(i)&&(i.pm.enabled()&&i.pm.disable(),i.on("click",this.removeLayer,this))}},_layerAddedRemoval({layer:t}){this._addedLayersRemoval[L.stamp(t)]=t}},be={_globalRotateModeEnabled:!1,enableGlobalRotateMode(){this._globalRotateModeEnabled=!0,L.PM.Utils.findLayers(this.map).filter(t=>t instanceof L.Polyline).forEach(t=>{this._isRelevantForRotate(t)&&t.pm.enableRotate()}),this.throttledReInitRotate||(this.throttledReInitRotate=L.Util.throttle(this.handleLayerAdditionInGlobalRotateMode,100,this)),this._addedLayersRotate={},this.map.on("layeradd",this._layerAddedRotate,this),this.map.on("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},disableGlobalRotateMode(){this._globalRotateModeEnabled=!1,L.PM.Utils.findLayers(this.map).filter(t=>t instanceof L.Polyline).forEach(t=>{t.pm.disableRotate()}),this.map.off("layeradd",this._layerAddedRotate,this),this.map.off("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},globalRotateModeEnabled(){return!!this._globalRotateModeEnabled},toggleGlobalRotateMode(){this.globalRotateModeEnabled()?this.disableGlobalRotateMode():this.enableGlobalRotateMode()},_isRelevantForRotate:t=>t.pm&&t instanceof L.Polyline&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowRotation,handleLayerAdditionInGlobalRotateMode(){let t=this._addedLayersRotate;if(this._addedLayersRotate={},this.globalRotateModeEnabled())for(let e in t){let i=t[e];this._isRelevantForRemoval(i)&&i.pm.enableRotate()}},_layerAddedRotate({layer:t}){this._addedLayersRotate[L.stamp(t)]=t}},we=u(te()),Pe={_fireDrawStart(t="Draw",e={}){this.__fire(this._map,"pm:drawstart",{shape:this._shape,workingLayer:this._layer},t,e)},_fireDrawEnd(t="Draw",e={}){this.__fire(this._map,"pm:drawend",{shape:this._shape},t,e)},_fireCreate(t,e="Draw",i={}){this.__fire(this._map,"pm:create",{shape:this._shape,marker:t,layer:t},e,i)},_fireCenterPlaced(t="Draw",e={}){let i="Draw"===t?this._layer:void 0,n="Draw"!==t?this._layer:void 0;this.__fire(this._layer,"pm:centerplaced",{shape:this._shape,workingLayer:i,layer:n,latlng:this._layer.getLatLng()},t,e)},_fireCut(t,e,i,n="Draw",s={}){this.__fire(t,"pm:cut",{shape:this._shape,layer:e,originalLayer:i},n,s)},_fireEdit(t=this._layer,e="Edit",i={}){this.__fire(t,"pm:edit",{layer:this._layer,shape:this.getShape()},e,i)},_fireEnable(t="Edit",e={}){this.__fire(this._layer,"pm:enable",{layer:this._layer,shape:this.getShape()},t,e)},_fireDisable(t="Edit",e={}){this.__fire(this._layer,"pm:disable",{layer:this._layer,shape:this.getShape()},t,e)},_fireUpdate(t="Edit",e={}){this.__fire(this._layer,"pm:update",{layer:this._layer,shape:this.getShape()},t,e)},_fireMarkerDragStart(t,e=void 0,i="Edit",n={}){this.__fire(this._layer,"pm:markerdragstart",{layer:this._layer,markerEvent:t,shape:this.getShape(),indexPath:e},i,n)},_fireMarkerDrag(t,e=void 0,i="Edit",n={}){this.__fire(this._layer,"pm:markerdrag",{layer:this._layer,markerEvent:t,shape:this.getShape(),indexPath:e},i,n)},_fireMarkerDragEnd(t,e=void 0,i=void 0,n="Edit",s={}){this.__fire(this._layer,"pm:markerdragend",{layer:this._layer,markerEvent:t,shape:this.getShape(),indexPath:e,intersectionReset:i},n,s)},_fireDragStart(t="Edit",e={}){this.__fire(this._layer,"pm:dragstart",{layer:this._layer,shape:this.getShape()},t,e)},_fireDrag(t,e="Edit",i={}){this.__fire(this._layer,"pm:drag",{...t,shape:this.getShape()},e,i)},_fireDragEnd(t="Edit",e={}){this.__fire(this._layer,"pm:dragend",{layer:this._layer,shape:this.getShape()},t,e)},_fireDragEnable(t="Edit",e={}){this.__fire(this._layer,"pm:dragenable",{layer:this._layer,shape:this.getShape()},t,e)},_fireDragDisable(t="Edit",e={}){this.__fire(this._layer,"pm:dragdisable",{layer:this._layer,shape:this.getShape()},t,e)},_fireRemove(t,e=t,i="Edit",n={}){this.__fire(t,"pm:remove",{layer:e,shape:this.getShape()},i,n)},_fireVertexAdded(t,e,i,n="Edit",s={}){this.__fire(this._layer,"pm:vertexadded",{layer:this._layer,workingLayer:this._layer,marker:t,indexPath:e,latlng:i,shape:this.getShape()},n,s)},_fireVertexRemoved(t,e,i="Edit",n={}){this.__fire(this._layer,"pm:vertexremoved",{layer:this._layer,marker:t,indexPath:e,shape:this.getShape()},i,n)},_fireVertexClick(t,e,i="Edit",n={}){this.__fire(this._layer,"pm:vertexclick",{layer:this._layer,markerEvent:t,indexPath:e,shape:this.getShape()},i,n)},_fireIntersect(t,e=this._layer,i="Edit",n={}){this.__fire(e,"pm:intersect",{layer:this._layer,intersection:t,shape:this.getShape()},i,n)},_fireLayerReset(t,e,i="Edit",n={}){this.__fire(this._layer,"pm:layerreset",{layer:this._layer,markerEvent:t,indexPath:e,shape:this.getShape()},i,n)},_fireChange(t,e="Edit",i={}){this.__fire(this._layer,"pm:change",{layer:this._layer,latlngs:t,shape:this.getShape()},e,i)},_fireTextChange(t,e="Edit",i={}){this.__fire(this._layer,"pm:textchange",{layer:this._layer,text:t,shape:this.getShape()},e,i)},_fireTextFocus(t="Edit",e={}){this.__fire(this._layer,"pm:textfocus",{layer:this._layer,shape:this.getShape()},t,e)},_fireTextBlur(t="Edit",e={}){this.__fire(this._layer,"pm:textblur",{layer:this._layer,shape:this.getShape()},t,e)},_fireSnapDrag(t,e,i="Snapping",n={}){this.__fire(t,"pm:snapdrag",e,i,n)},_fireSnap(t,e,i="Snapping",n={}){this.__fire(t,"pm:snap",e,i,n)},_fireUnsnap(t,e,i="Snapping",n={}){this.__fire(t,"pm:unsnap",e,i,n)},_fireRotationEnable(t,e,i="Rotation",n={}){this.__fire(t,"pm:rotateenable",{layer:this._layer,helpLayer:this._rotatePoly,shape:this.getShape()},i,n)},_fireRotationDisable(t,e="Rotation",i={}){this.__fire(t,"pm:rotatedisable",{layer:this._layer,shape:this.getShape()},e,i)},_fireRotationStart(t,e,i="Rotation",n={}){this.__fire(t,"pm:rotatestart",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:this._startAngle,originLatLngs:e},i,n)},_fireRotation(t,e,i,n=this._rotationLayer,s="Rotation",o={}){this.__fire(t,"pm:rotate",{layer:n,helpLayer:this._layer,startAngle:this._startAngle,angle:n.pm.getAngle(),angleDiff:e,oldLatLngs:i,newLatLngs:n.getLatLngs()},s,o)},_fireRotationEnd(t,e,i,n="Rotation",s={}){this.__fire(t,"pm:rotateend",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:e,angle:this._rotationLayer.pm.getAngle(),originLatLngs:i,newLatLngs:this._rotationLayer.getLatLngs()},n,s)},_fireActionClick(t,e,i,n="Toolbar",s={}){this.__fire(this._map,"pm:actionclick",{text:t.text,action:t,btnName:e,button:i},n,s)},_fireButtonClick(t,e,i="Toolbar",n={}){this.__fire(this._map,"pm:buttonclick",{btnName:t,button:e},i,n)},_fireLangChange(t,e,i,n,s="Global",o={}){this.__fire(this.map,"pm:langchange",{oldLang:t,activeLang:e,fallback:i,translations:n},s,o)},_fireGlobalDragModeToggled(t,e="Global",i={}){this.__fire(this.map,"pm:globaldragmodetoggled",{enabled:t,map:this.map},e,i)},_fireGlobalEditModeToggled(t,e="Global",i={}){this.__fire(this.map,"pm:globaleditmodetoggled",{enabled:t,map:this.map},e,i)},_fireGlobalRemovalModeToggled(t,e="Global",i={}){this.__fire(this.map,"pm:globalremovalmodetoggled",{enabled:t,map:this.map},e,i)},_fireGlobalCutModeToggled(t="Global",e={}){this.__fire(this._map,"pm:globalcutmodetoggled",{enabled:!!this._enabled,map:this._map},t,e)},_fireGlobalDrawModeToggled(t="Global",e={}){this.__fire(this._map,"pm:globaldrawmodetoggled",{enabled:this._enabled,shape:this._shape,map:this._map},t,e)},_fireGlobalRotateModeToggled(t="Global",e={}){this.__fire(this.map,"pm:globalrotatemodetoggled",{enabled:this.globalRotateModeEnabled(),map:this.map},t,e)},_fireRemoveLayerGroup(t,e=t,i="Edit",n={}){this.__fire(t,"pm:remove",{layer:e,shape:void 0},i,n)},_fireKeyeventEvent(t,e,i,n="Global",s={}){this.__fire(this.map,"pm:keyevent",{event:t,eventType:e,focusOn:i},n,s)},__fire(t,e,i,n,s={}){i=(0,we.default)(i,s,{source:n}),L.PM.Utils._fireEvent(t,e,i)}},ke=()=>({_lastEvents:{keydown:void 0,keyup:void 0,current:void 0},_initKeyListener(t){this.map=t,L.DomEvent.on(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.on(window,"blur",this._onBlur,this),t.once("unload",this._unbindKeyListenerEvents,this)},_unbindKeyListenerEvents(){L.DomEvent.off(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.off(window,"blur",this._onBlur,this)},_onKeyListener(t){let e="document";this.map.getContainer().contains(t.target)&&(e="map");let i={event:t,eventType:t.type,focusOn:e};this._lastEvents[t.type]=i,this._lastEvents.current=i,this.map.pm._fireKeyeventEvent(t,t.type,e)},_onBlur(t){t.altKey=!1;let e={event:t,eventType:t.type,focusOn:"document"};this._lastEvents[t.type]=e,this._lastEvents.current=e},getLastKeyEvent(t="current"){return this._lastEvents[t]},isShiftKeyPressed(){var t;return null==(t=this._lastEvents.current)?void 0:t.event.shiftKey},isAltKeyPressed(){var t;return null==(t=this._lastEvents.current)?void 0:t.event.altKey},isCtrlKeyPressed(){var t;return null==(t=this._lastEvents.current)?void 0:t.event.ctrlKey},isMetaKeyPressed(){var t;return null==(t=this._lastEvents.current)?void 0:t.event.metaKey},getPressedKey(){var t;return null==(t=this._lastEvents.current)?void 0:t.event.key}}),Ee=u(pe());function Ce(t){let e=L.PM.activeLang;return(0,Ee.default)(ve[e],t)||(0,Ee.default)(ve.en,t)||t}function Se(t){for(let e=0;e<t.length;e+=1){let i=t[e];if(Array.isArray(i)){if(Se(i))return!0}else if(null!=i&&""!==i)return!0}return!1}function Te(t){return t.reduce((t,e)=>{if(0!==e.length){let i=Array.isArray(e)?Te(e):e;Array.isArray(i)?0!==i.length&&t.push(i):t.push(i)}return t},[])}function Oe(t,e,i){let n,s,o,a={a:L.CRS.Earth.R,b:6356752.3142,f:.0033528106647474805},{a:r,b:h,f:l}=a,c=t.lng,u=t.lat,p=i,d=Math.PI,_=e*d/180,m=Math.sin(_),g=Math.cos(_),f=(1-l)*Math.tan(u*d/180),y=1/Math.sqrt(1+f*f),A=f*y,v=Math.atan2(f,g),M=y*m,x=1-M*M,b=x*(r*r-h*h)/(h*h),w=1+b/16384*(4096+b*(b*(320-175*b)-768)),P=b/1024*(256+b*(b*(74-47*b)-128)),k=p/(h*w),E=2*Math.PI;for(;Math.abs(k-E)>1e-12;){n=Math.cos(2*v+k),s=Math.sin(k),o=Math.cos(k),E=k,k=p/(h*w)+P*s*(n+P/4*(o*(2*n*n-1)-P/6*n*(4*s*s-3)*(4*n*n-3)))}let C=A*s-y*o*g,S=Math.atan2(A*o+y*s*g,(1-l)*Math.sqrt(M*M+C*C)),T=l/16*x*(4+l*(4-3*x)),O=c+180*(Math.atan2(s*m,y*o-A*s*g)-(1-T)*l*M*(k+T*s*(n+T*o*(2*n*n-1))))/d,B=180*S/d;return L.latLng(O,B)}function Be(t,e,i,n,s=!0){let o,a,r,h=[];for(let l=0;l<i;l+=1){if(s)o=360*l/i+n,a=Oe(t,o,e),r=L.latLng(a.lng,a.lat);else{let n=t.lat+Math.cos(2*l*Math.PI/i)*e,s=t.lng+Math.sin(2*l*Math.PI/i)*e;r=L.latLng(n,s)}h.push(r)}return h}function Ie(t,e,i){let n=t.latLngToContainerPoint(e),s=t.latLngToContainerPoint(i),o=180*Math.atan2(s.y-n.y,s.x-n.x)/Math.PI+90;return o+=o<0?360:0,o}function De(t,e,i,n){return function(t,e,i){e=(e+360)%360;let n=Math.PI/180,s=180/Math.PI,{R:o}=L.CRS.Earth,a=t.lng*n,r=t.lat*n,h=e*n,l=Math.sin(r),c=Math.cos(r),u=Math.cos(i/o),p=Math.sin(i/o),d=Math.asin(l*u+c*p*Math.cos(h)),_=a+Math.atan2(Math.sin(h)*p*c,u-l*Math.sin(d));return _*=s,_=_>180?_-360:_<-180?_+360:_,L.latLng([d*s,_])}(e,Ie(t,e,i),n)}function Re(t,e=t.getLatLngs()){return t instanceof L.Polygon?L.polygon(e).getLatLngs():L.polyline(e).getLatLngs()}function ze(t,e){var i,n,s,o;if(null==(n=null==(i=e.options.crs)?void 0:i.projection)?void 0:n.MAX_LATITUDE){let i=null==(o=null==(s=e.options.crs)?void 0:s.projection)?void 0:o.MAX_LATITUDE;t.lat=Math.max(Math.min(i,t.lat),-i)}return t}function Ge(t){return t.options.renderer||t._map&&(t._map._getPaneRenderer(t.options.pane)||t._map.options.renderer||t._map._renderer)||t._renderer}var Ne=L.Class.extend({includes:[Me,Le,xe,be,Pe],initialize(t){this.map=t,this.Draw=new L.PM.Draw(t),this.Toolbar=new L.PM.Toolbar(t),this.Keyboard=ke(),this.globalOptions={snappable:!0,layerGroup:void 0,snappingOrder:["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"],panes:{vertexPane:"markerPane",layerPane:"overlayPane",markerPane:"markerPane"},draggable:!0},this.Keyboard._initKeyListener(t)},setLang(t="en",e,i="en"){if(t=t.trim().toLowerCase(),!/^[a-z]{2}$/.test(t)){let e=t.replace(/[-_\s]/g,"-").replace(/^(\w{2})$/,"$1-").match(/([a-z]{2})-?([a-z]{2})?/);if(e){let i=[`${e[1]}_${e[2]}`,`${e[1]}`];for(let e of i)if(ve[e]){t=e;break}}}let n=L.PM.activeLang;e&&(ve[t]=(0,ye.default)(ve[i],e)),L.PM.activeLang=t,this.map.pm.Toolbar.reinit(),this._fireLangChange(n,t,i,ve[t])},addControls(t){this.Toolbar.addControls(t)},removeControls(){this.Toolbar.removeControls()},toggleControls(){this.Toolbar.toggleControls()},controlsVisible(){return this.Toolbar.isVisible},enableDraw(t="Polygon",e){"Poly"===t&&(t="Polygon"),this.Draw.enable(t,e)},disableDraw(t="Polygon"){"Poly"===t&&(t="Polygon"),this.Draw.disable(t)},setPathOptions(t,e={}){let i=e.ignoreShapes||[],n=e.merge||!1;this.map.pm.Draw.shapes.forEach(e=>{-1===i.indexOf(e)&&this.map.pm.Draw[e].setPathOptions(t,n)})},getGlobalOptions(){return this.globalOptions},setGlobalOptions(t){let e=(0,ye.default)(this.globalOptions,t);e.editable&&(e.resizeableCircleMarker=e.editable,delete e.editable);let i=!1;this.map.pm.Draw.CircleMarker.enabled()&&!!this.map.pm.Draw.CircleMarker.options.resizeableCircleMarker!=!!e.resizeableCircleMarker&&(this.map.pm.Draw.CircleMarker.disable(),i=!0);let n=!1;this.map.pm.Draw.Circle.enabled()&&!!this.map.pm.Draw.Circle.options.resizeableCircle!=!!e.resizeableCircle&&(this.map.pm.Draw.Circle.disable(),n=!0),this.map.pm.Draw.shapes.forEach(t=>{this.map.pm.Draw[t].setOptions(e)}),i&&this.map.pm.Draw.CircleMarker.enable(),n&&this.map.pm.Draw.Circle.enable(),L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.setOptions(e)}),this.map.fire("pm:globaloptionschanged"),this.globalOptions=e,this.applyGlobalOptions()},applyGlobalOptions(){L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.enabled()&&t.pm.applyOptions()})},globalDrawModeEnabled(){return!!this.Draw.getActiveShape()},globalCutModeEnabled(){return!!this.Draw.Cut.enabled()},enableGlobalCutMode(t){return this.Draw.Cut.enable(t)},toggleGlobalCutMode(t){return this.Draw.Cut.toggle(t)},disableGlobalCutMode(){return this.Draw.Cut.disable()},getGeomanLayers(t=!1){let e=L.PM.Utils.findLayers(this.map);if(!t)return e;let i=L.featureGroup();return i._pmTempLayer=!0,e.forEach(t=>{i.addLayer(t)}),i},getGeomanDrawLayers(t=!1){let e=L.PM.Utils.findLayers(this.map).filter(t=>!0===t._drawnByGeoman);if(!t)return e;let i=L.featureGroup();return i._pmTempLayer=!0,e.forEach(t=>{i.addLayer(t)}),i},_getContainingLayer(){return this.globalOptions.layerGroup&&this.globalOptions.layerGroup instanceof L.LayerGroup?this.globalOptions.layerGroup:this.map},_isCRSSimple(){return this.map.options.crs===L.CRS.Simple},_touchEventCounter:0,_addTouchEvents(t){0===this._touchEventCounter&&(L.DomEvent.on(t,"touchmove",this._canvasTouchMove,this),L.DomEvent.on(t,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter+=1},_removeTouchEvents(t){1===this._touchEventCounter&&(L.DomEvent.off(t,"touchmove",this._canvasTouchMove,this),L.DomEvent.off(t,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter=this._touchEventCounter<=1?0:this._touchEventCounter-1},_canvasTouchMove(t){Ge(this.map)._onMouseMove(this._createMouseEvent("mousemove",t))},_canvasTouchClick(t){let e="";"touchstart"===t.type||"pointerdown"===t.type?e="mousedown":("touchend"===t.type||"pointerup"===t.type||"touchcancel"===t.type||"pointercancel"===t.type)&&(e="mouseup"),e&&Ge(this.map)._onClick(this._createMouseEvent(e,t))},_createMouseEvent(t,e){let i,n=e.touches[0]||e.changedTouches[0];try{i=new MouseEvent(t,{bubbles:e.bubbles,cancelable:e.cancelable,view:e.view,detail:n.detail,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,button:e.button,relatedTarget:e.relatedTarget})}catch{i=document.createEvent("MouseEvents"),i.initMouseEvent(t,e.bubbles,e.cancelable,e.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}return i}}),je=L.Control.extend({includes:[Pe],options:{position:"topleft",disableByOtherButtons:!0},initialize(t){this._button=L.Util.extend({},this.options,t)},onAdd(t){return this._map=t,this._map.pm.Toolbar.options.oneBlock?this._container=this._map.pm.Toolbar._createContainer(this.options.position):"edit"===this._button.tool?this._container=this._map.pm.Toolbar.editContainer:"options"===this._button.tool?this._container=this._map.pm.Toolbar.optionsContainer:"custom"===this._button.tool?this._container=this._map.pm.Toolbar.customContainer:this._container=this._map.pm.Toolbar.drawContainer,this._renderButton(),this._container},_renderButton(){let t=this.buttonsDomNode;this.buttonsDomNode=this._makeButton(this._button),t?t.replaceWith(this.buttonsDomNode):this._container.appendChild(this.buttonsDomNode)},onRemove(){return this.buttonsDomNode.remove(),this._container},getText(){return this._button.text},getIconUrl(){return this._button.iconUrl},destroy(){this._button={},this._update()},toggle(t){return this._button.toggleStatus="boolean"==typeof t?t:!this._button.toggleStatus,this._applyStyleClasses(),this._updateActiveAction(this._button),this._button.toggleStatus},toggled(){return this._button.toggleStatus},onCreate(){this.toggle(!1)},disable(){this.toggle(!1),this._button.disabled=!0,this._updateDisabled()},enable(){this._button.disabled=!1,this._updateDisabled(),this._updateActiveAction(this._button)},_triggerClick(t){t&&t.preventDefault(),!this._button.disabled&&(this._button.onClick(t,{button:this,event:t}),this._clicked(t),this._button.afterClick(t,{button:this,event:t}))},_makeButton(t){let e=this.options.position.indexOf("right")>-1?"pos-right":"",i=L.DomUtil.create("div",`button-container ${e}`,this._container);t.title&&i.setAttribute("title",t.title);let n=L.DomUtil.create("a","leaflet-buttons-control-button",i);n.setAttribute("role","button"),n.setAttribute("tabindex","0"),n.href="#";let s=L.DomUtil.create("div",`leaflet-pm-actions-container ${e}`,i),o=t.actions,a={cancel:{text:Ce("actions.cancel"),title:Ce("actions.cancel"),onClick(){this._triggerClick()}},finishMode:{text:Ce("actions.finish"),title:Ce("actions.finish"),onClick(){this._triggerClick()}},removeLastVertex:{text:Ce("actions.removeLastVertex"),title:Ce("actions.removeLastVertex"),onClick(){this._map.pm.Draw[t.jsClass]._removeLastVertex()}},finish:{text:Ce("actions.finish"),title:Ce("actions.finish"),onClick(e){this._map.pm.Draw[t.jsClass]._finishShape(e)}}};t._preparedActions=o.map(i=>{let n,o="string"==typeof i?i:i.name;if(a[o])n=a[o];else{if(!i.text)return n;n=i}let r=L.DomUtil.create("a",`leaflet-pm-action ${e} action-${o}`,s);if(r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.href="#",n.title&&(r.title=n.title),r.innerHTML=n.text,L.DomEvent.disableClickPropagation(r),L.DomEvent.on(r,"click",L.DomEvent.stop),n._node=r,!t.disabled&&n.onClick){let e=e=>{e.preventDefault();let i="",{buttons:s}=this._map.pm.Toolbar;for(let n in s)if(s[n]._button===t){i=n;break}this._fireActionClick(n,i,t)};L.DomEvent.addListener(r,"click",e,this),L.DomEvent.addListener(r,"click",n.onClick,this),L.DomEvent.addListener(r,"click",()=>this._updateActiveAction(t))}return n}),this._updateActiveAction(t),t.toggleStatus&&L.DomUtil.addClass(i,"active");let r=L.DomUtil.create("div","control-icon",n);return t.iconUrl&&r.setAttribute("src",t.iconUrl),t.className&&L.DomUtil.addClass(r,t.className),L.DomEvent.disableClickPropagation(n),L.DomEvent.on(n,"click",L.DomEvent.stop),t.disabled||(L.DomEvent.addListener(n,"click",this._onBtnClick,this),L.DomEvent.addListener(n,"click",this._triggerClick,this)),t.disabled&&(L.DomUtil.addClass(n,"pm-disabled"),n.setAttribute("aria-disabled","true")),i},_applyStyleClasses(){this._container&&(this._button.toggleStatus&&!1!==this._button.cssToggle?(L.DomUtil.addClass(this.buttonsDomNode,"active"),L.DomUtil.addClass(this._container,"activeChild")):(L.DomUtil.removeClass(this.buttonsDomNode,"active"),L.DomUtil.removeClass(this._container,"activeChild")))},_onBtnClick(){if(this._button.disabled)return;this._button.disableOtherButtons&&this._map.pm.Toolbar.triggerClickOnToggledButtons(this);let t="",{buttons:e}=this._map.pm.Toolbar;for(let i in e)if(e[i]._button===this._button){t=i;break}this._fireButtonClick(t,this._button)},_clicked(){this._button.doToggle&&this.toggle()},_updateDisabled(){if(!this._container)return;let t="pm-disabled",e=this.buttonsDomNode.children[0];this._button.disabled?(L.DomUtil.addClass(e,t),e.setAttribute("aria-disabled","true")):(L.DomUtil.removeClass(e,t),e.setAttribute("aria-disabled","false"))},_updateActiveAction(t){var e;null==(e=t._preparedActions)||e.forEach(t=>{(null==t?void 0:t._node)&&(t.isActive&&t.isActive.call(this)?L.DomUtil.addClass(t._node,"active-action"):L.DomUtil.removeClass(t._node,"active-action"))})}});L.Control.PMButton=je;var Fe=L.Class.extend({options:{drawMarker:!0,drawRectangle:!0,drawPolyline:!0,drawPolygon:!0,drawCircle:!0,drawCircleMarker:!0,drawText:!0,editMode:!0,dragMode:!0,cutPolygon:!0,removalMode:!0,rotateMode:!0,snappingOption:!0,drawControls:!0,editControls:!0,optionsControls:!0,customControls:!0,oneBlock:!1,position:"topleft",positions:{draw:"",edit:"",options:"",custom:""}},customButtons:[],initialize(t){this.customButtons=[],this.options.positions={draw:"",edit:"",options:"",custom:""},this.init(t)},reinit(){let t=this.isVisible;this.removeControls(),this._defineButtons(),t&&this.addControls()},init(t){this.map=t,this.buttons={},this.isVisible=!1,this.drawContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-draw leaflet-bar leaflet-control"),this.editContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-edit leaflet-bar leaflet-control"),this.optionsContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-options leaflet-bar leaflet-control"),this.customContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-custom leaflet-bar leaflet-control"),this._defineButtons()},_createContainer(t){let e=`${t}Container`;return this[e]||(this[e]=L.DomUtil.create("div",`leaflet-pm-toolbar leaflet-pm-${t} leaflet-bar leaflet-control`)),this[e]},getButtons(){return this.buttons},addControls(t=this.options){typeof t.editPolygon<"u"&&(t.editMode=t.editPolygon),typeof t.deleteLayer<"u"&&(t.removalMode=t.deleteLayer),L.Util.setOptions(this,t),this.applyIconStyle(),this.isVisible=!0,this._showHideButtons()},applyIconStyle(){let t=this.getButtons(),e={geomanIcons:{drawMarker:"control-icon leaflet-pm-icon-marker",drawPolyline:"control-icon leaflet-pm-icon-polyline",drawRectangle:"control-icon leaflet-pm-icon-rectangle",drawPolygon:"control-icon leaflet-pm-icon-polygon",drawCircle:"control-icon leaflet-pm-icon-circle",drawCircleMarker:"control-icon leaflet-pm-icon-circle-marker",editMode:"control-icon leaflet-pm-icon-edit",dragMode:"control-icon leaflet-pm-icon-drag",cutPolygon:"control-icon leaflet-pm-icon-cut",removalMode:"control-icon leaflet-pm-icon-delete",drawText:"control-icon leaflet-pm-icon-text"}};for(let i in t){let n=t[i];L.Util.setOptions(n,{className:e.geomanIcons[i]})}},removeControls(){let t=this.getButtons();for(let e in t)t[e].remove();this.isVisible=!1},toggleControls(t=this.options){this.isVisible?this.removeControls():this.addControls(t)},_addButton(t,e){return this.buttons[t]=e,this.options[t]=!!this.options[t]||!1,this.buttons[t]},triggerClickOnToggledButtons(t){for(let e in this.buttons){let i=this.buttons[e];i._button.disableByOtherButtons&&i!==t&&i.toggled()&&i._triggerClick()}},toggleButton(t,e,i=!0){"editPolygon"===t&&(t="editMode"),"deleteLayer"===t&&(t="removalMode");let n=t;return i&&this.triggerClickOnToggledButtons(this.buttons[n]),!!this.buttons[n]&&this.buttons[n].toggle(e)},_defineButtons(){let t={className:"control-icon leaflet-pm-icon-marker",title:Ce("buttonTitles.drawMarkerButton"),jsClass:"Marker",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},e={title:Ce("buttonTitles.drawPolyButton"),className:"control-icon leaflet-pm-icon-polygon",jsClass:"Polygon",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},i={className:"control-icon leaflet-pm-icon-polyline",title:Ce("buttonTitles.drawLineButton"),jsClass:"Line",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},n={title:Ce("buttonTitles.drawCircleButton"),className:"control-icon leaflet-pm-icon-circle",jsClass:"Circle",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},s={title:Ce("buttonTitles.drawCircleMarkerButton"),className:"control-icon leaflet-pm-icon-circle-marker",jsClass:"CircleMarker",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},o={title:Ce("buttonTitles.drawRectButton"),className:"control-icon leaflet-pm-icon-rectangle",jsClass:"Rectangle",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},a={title:Ce("buttonTitles.editButton"),className:"control-icon leaflet-pm-icon-edit",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalEditMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},r={title:Ce("buttonTitles.dragButton"),className:"control-icon leaflet-pm-icon-drag",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalDragMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},h={title:Ce("buttonTitles.cutButton"),className:"control-icon leaflet-pm-icon-cut",jsClass:"Cut",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle({snappable:!0,cursorMarker:!0,allowSelfIntersection:!1})},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finish","removeLastVertex","cancel"]},l={title:Ce("buttonTitles.deleteButton"),className:"control-icon leaflet-pm-icon-delete",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRemovalMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},c={title:Ce("buttonTitles.rotateButton"),className:"control-icon leaflet-pm-icon-rotate",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRotateMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},u={className:"control-icon leaflet-pm-icon-text",title:Ce("buttonTitles.drawTextButton"),jsClass:"Text",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]};this._addButton("drawMarker",new L.Control.PMButton(t)),this._addButton("drawPolyline",new L.Control.PMButton(i)),this._addButton("drawRectangle",new L.Control.PMButton(o)),this._addButton("drawPolygon",new L.Control.PMButton(e)),this._addButton("drawCircle",new L.Control.PMButton(n)),this._addButton("drawCircleMarker",new L.Control.PMButton(s)),this._addButton("drawText",new L.Control.PMButton(u)),this._addButton("editMode",new L.Control.PMButton(a)),this._addButton("dragMode",new L.Control.PMButton(r)),this._addButton("cutPolygon",new L.Control.PMButton(h)),this._addButton("removalMode",new L.Control.PMButton(l)),this._addButton("rotateMode",new L.Control.PMButton(c))},_showHideButtons(){if(!this.isVisible)return;this.removeControls(),this.isVisible=!0;let t=this.getButtons(),e=[];!1===this.options.drawControls&&(e=e.concat(Object.keys(t).filter(e=>!t[e]._button.tool))),!1===this.options.editControls&&(e=e.concat(Object.keys(t).filter(e=>"edit"===t[e]._button.tool))),!1===this.options.optionsControls&&(e=e.concat(Object.keys(t).filter(e=>"options"===t[e]._button.tool))),!1===this.options.customControls&&(e=e.concat(Object.keys(t).filter(e=>"custom"===t[e]._button.tool)));for(let i in t)if(this.options[i]&&-1===e.indexOf(i)){let e=t[i]._button.tool;e||(e="draw"),t[i].setPosition(this._getBtnPosition(e)),t[i].addTo(this.map)}},_getBtnPosition(t){return this.options.positions&&this.options.positions[t]?this.options.positions[t]:this.options.position},setBlockPosition(t,e){this.options.positions[t]=e,this._showHideButtons(),this.changeControlOrder()},getBlockPositions(){return this.options.positions},copyDrawControl(t,e){if(!e)throw new TypeError("Button has no name");"object"!=typeof e&&(e={name:e});let i=this._btnNameMapping(t);if(!e.name)throw new TypeError("Button has no name");if(this.buttons[e.name])throw new TypeError("Button with this name already exists");let n=this.map.pm.Draw.createNewDrawInstance(e.name,i);return e={...this.buttons[i]._button,...e},{drawInstance:n,control:this.createCustomControl(e)}},createCustomControl(t){if(!t.name)throw new TypeError("Button has no name");if(this.buttons[t.name])throw new TypeError("Button with this name already exists");t.onClick||(t.onClick=()=>{}),t.afterClick||(t.afterClick=()=>{}),!1!==t.toggle&&(t.toggle=!0),t.block&&(t.block=t.block.toLowerCase()),(!t.block||"draw"===t.block)&&(t.block=""),t.className?-1===t.className.indexOf("control-icon")&&(t.className=`control-icon ${t.className}`):t.className="control-icon";let e={tool:t.block,className:t.className,title:t.title||"",jsClass:t.name,onClick:t.onClick,afterClick:t.afterClick,doToggle:t.toggle,toggleStatus:!1,disableOtherButtons:t.disableOtherButtons??!0,disableByOtherButtons:t.disableByOtherButtons??!0,cssToggle:t.toggle,position:this.options.position,actions:t.actions||[],disabled:!!t.disabled};!1!==this.options[t.name]&&(this.options[t.name]=!0);let i=this._addButton(t.name,new L.Control.PMButton(e));return this.changeControlOrder(),i},controlExists(t){return!!this.getButton(t)},getButton(t){return this.getButtons()[t]},getButtonsInBlock(t){let e={};if(t)for(let i in this.getButtons()){let n=this.getButtons()[i];(n._button.tool===t||"draw"===t&&!n._button.tool)&&(e[i]=n)}return e},changeControlOrder(t=[]){let e=this._shapeMapping(),i=[];t.forEach(t=>{e[t]?i.push(e[t]):i.push(t)});let n=this.getButtons(),s={};i.forEach(t=>{n[t]&&(s[t]=n[t])}),Object.keys(n).filter(t=>!n[t]._button.tool||"draw"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(s[t]=n[t])}),Object.keys(n).filter(t=>"edit"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(s[t]=n[t])}),Object.keys(n).filter(t=>"options"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(s[t]=n[t])}),Object.keys(n).filter(t=>"custom"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(s[t]=n[t])}),Object.keys(n).forEach(t=>{-1===i.indexOf(t)&&(s[t]=n[t])}),this.map.pm.Toolbar.buttons=s,this._showHideButtons()},getControlOrder(){let t=this.getButtons(),e=[];for(let i in t)e.push(i);return e},changeActionsOfControl(t,e){let i=this._btnNameMapping(t);if(!i)throw new TypeError("No name passed");if(!e)throw new TypeError("No actions passed");if(!this.buttons[i])throw new TypeError("Button with this name not exists");this.buttons[i]._button.actions=e,this.changeControlOrder()},setButtonDisabled(t,e){let i=this._btnNameMapping(t);e?this.buttons[i].disable():this.buttons[i].enable()},_shapeMapping:()=>({Marker:"drawMarker",Circle:"drawCircle",Polygon:"drawPolygon",Rectangle:"drawRectangle",Polyline:"drawPolyline",Line:"drawPolyline",CircleMarker:"drawCircleMarker",Edit:"editMode",Drag:"dragMode",Cut:"cutPolygon",Removal:"removalMode",Rotate:"rotateMode",Text:"drawText"}),_btnNameMapping(t){let e=this._shapeMapping();return e[t]?e[t]:t}}),Ue=u(te()),Ze={_initSnappableMarkers(){this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,this._assignEvents(this._markers),this._layer.off("pm:dragstart",this._unsnap,this),this._layer.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){this._layer.off("pm:dragstart",this._unsnap,this)},_assignEvents(t){t.forEach(t=>{Array.isArray(t)?this._assignEvents(t):(t.off("drag",this._handleSnapping,this),t.on("drag",this._handleSnapping,this),t.off("dragend",this._cleanupSnapping,this),t.on("dragend",this._cleanupSnapping,this))})},_cleanupSnapping(t){if(t){t.target._snapped=!1}delete this._snapList,this.throttledList&&(this._map.off("layeradd",this.throttledList,this),this.throttledList=void 0),this._map.off("layerremove",this._handleSnapLayerRemoval,this),this.debugIndicatorLines&&this.debugIndicatorLines.forEach(t=>{t.remove()})},_handleThrottleSnapping(){this.throttledList&&this._createSnapList()},_handleSnapping(t){var e,i,n;let s=t.target;if(s._snapped=!1,this.throttledList||(this.throttledList=L.Util.throttle(this._handleThrottleSnapping,100,this)),(null==(e=null==t?void 0:t.originalEvent)?void 0:e.altKey)||(null==(n=null==(i=this._map)?void 0:i.pm)?void 0:n.Keyboard.isAltKeyPressed())||(void 0===this._snapList&&(this._createSnapList(),this._map.off("layeradd",this.throttledList,this),this._map.on("layeradd",this.throttledList,this)),this._snapList.length<=0))return!1;let o=this._calcClosestLayer(s.getLatLng(),this._snapList);if(0===Object.keys(o).length)return!1;let a,r=o.layer instanceof L.Marker||o.layer instanceof L.CircleMarker||!this.options.snapSegment;a=r?o.latlng:this._checkPrioritiySnapping(o);let h=this.options.snapDistance,l={marker:s,shape:this._shape,snapLatLng:a,segment:o.segment,layer:this._layer,workingLayer:this._layer,layerInteractedWith:o.layer,distance:o.distance};if(this._fireSnapDrag(l.marker,l),this._fireSnapDrag(this._layer,l),o.distance<h){s._orgLatLng=s.getLatLng(),s.setLatLng(a),s._snapped=!0,s._snapInfo=l;let t=()=>{this._snapLatLng=a,this._fireSnap(s,l),this._fireSnap(this._layer,l)},e=this._snapLatLng||{},i=a||{};(e.lat!==i.lat||e.lng!==i.lng)&&t()}else this._snapLatLng&&(this._unsnap(l),s._snapped=!1,s._snapInfo=void 0,this._fireUnsnap(l.marker,l),this._fireUnsnap(this._layer,l));return!0},_createSnapList(){let t=[],e=[],i=this._map;i.off("layerremove",this._handleSnapLayerRemoval,this),i.on("layerremove",this._handleSnapLayerRemoval,this),i.eachLayer(i=>{if((i instanceof L.Polyline||i instanceof L.Marker||i instanceof L.CircleMarker||i instanceof L.ImageOverlay)&&!0!==i.options.snapIgnore){if(void 0===i.options.snapIgnore&&(!L.PM.optIn&&!0===i.options.pmIgnore||L.PM.optIn&&!1!==i.options.pmIgnore))return;(i instanceof L.Circle||i instanceof L.CircleMarker)&&i.pm&&i.pm._hiddenPolyCircle?t.push(i.pm._hiddenPolyCircle):i instanceof L.ImageOverlay&&(i=L.rectangle(i.getBounds())),t.push(i);let n=L.polyline([],{color:"red",pmIgnore:!0});n._pmTempLayer=!0,e.push(n),(i instanceof L.Circle||i instanceof L.CircleMarker)&&e.push(n)}}),t=t.filter(t=>this._layer!==t),t=t.filter(t=>t._latlng||t._latlngs&&Se(t._latlngs)),t=t.filter(t=>!t._pmTempLayer),this._otherSnapLayers?(this._otherSnapLayers.forEach(()=>{let t=L.polyline([],{color:"red",pmIgnore:!0});t._pmTempLayer=!0,e.push(t)}),this._snapList=t.concat(this._otherSnapLayers)):this._snapList=t,this.debugIndicatorLines=e},_handleSnapLayerRemoval({layer:t}){if(!t._leaflet_id)return;let e=this._snapList.findIndex(e=>e._leaflet_id===t._leaflet_id);e>-1&&this._snapList.splice(e,1)},_calcClosestLayer(t,e){return this._calcClosestLayers(t,e,1)[0]},_calcClosestLayers(t,e,i=1){let n=[],s={};e.forEach((e,o)=>{var a;if(e._parentCopy&&e._parentCopy===this._layer||(null==(a=e.getLatLngs)?void 0:a.call(e).flat(5).length)<2)return;let r=this._calcLayerDistances(t,e);if(r.distance=Math.floor(r.distance),this.debugIndicatorLines){if(!this.debugIndicatorLines[o]){let t=L.polyline([],{color:"red",pmIgnore:!0});t._pmTempLayer=!0,this.debugIndicatorLines[o]=t}this.debugIndicatorLines[o].setLatLngs([t,r.latlng])}1===i&&(void 0===s.distance||r.distance-5<=s.distance)?(r.distance+5<s.distance&&(n=[]),s=r,s.layer=e,n.push(s)):1!==i&&(s={},s=r,s.layer=e,n.push(s))}),1!==i&&(n=n.sort((t,e)=>t.distance-e.distance)),-1===i&&(i=n.length);let o=this._getClosestLayerByPriority(n,i);return L.Util.isArray(o)?o:[o]},_calcLayerDistances(t,e){let i=this._map,n=e instanceof L.Marker||e instanceof L.CircleMarker,s=e instanceof L.Polygon,o=t;if(n){let t=e.getLatLng();return{latlng:{...t},distance:this._getDistance(i,t,o)}}return this._calcLatLngDistances(o,e.getLatLngs(),i,s)},_calcLatLngDistances(t,e,i,n=!1){let s,o,a,r=e=>{e.forEach((h,l)=>{if(Array.isArray(h))r(h);else if(this.options.snapSegment){let s,r=h;s=n?l+1===e.length?0:l+1:l+1===e.length?void 0:l+1;let c=e[s];if(c){let e=this._getDistanceToSegment(i,t,r,c);(void 0===o||e<o)&&(o=e,a=[r,c])}}else{let e=this._getDistance(i,t,h);(void 0===o||e<o)&&(o=e,s=h)}})};return r(e),this.options.snapSegment?{latlng:{...this._getClosestPointOnSegment(i,t,a[0],a[1])},segment:a,distance:o}:{latlng:s,distance:o}},_getClosestLayerByPriority(t,e=1){t=t.sort((t,e)=>t._leaflet_id-e._leaflet_id);let i=this._map.pm.globalOptions.snappingOrder||[],n=0,s={};return i.concat(["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"]).forEach(t=>{s[t]||(n+=1,s[t]=n)}),t.sort(function(t,e,i="asc"){if(!e||0===Object.keys(e).length)return(t,e)=>t-e;let n,s=Object.keys(e),o=s.length-1,a={};for(;o>=0;)n=s[o],a[n.toLowerCase()]=e[n],o-=1;function r(t){return t instanceof L.Marker?"Marker":t instanceof L.Circle?"Circle":t instanceof L.CircleMarker?"CircleMarker":t instanceof L.Rectangle?"Rectangle":t instanceof L.Polygon?"Polygon":t instanceof L.Polyline?"Line":void 0}return(t,e)=>{let n,s;if(n=r(t.layer).toLowerCase(),s=r(e.layer).toLowerCase(),!n||!s)return 0;let o=n in a?a[n]:Number.MAX_SAFE_INTEGER,h=s in a?a[s]:Number.MAX_SAFE_INTEGER,l=0;return o<h?l=-1:o>h&&(l=1),"desc"===i?-1*l:l}}(0,s)),1===e?t[0]||{}:t.slice(0,e)},_checkPrioritiySnapping(t){let e=this._map,i=t.segment[0],n=t.segment[1],s=t.latlng,o=s;if(this.options.snapVertex){let t=this._getDistance(e,i,s),a=this._getDistance(e,n,s),r=t<a?i:n,h=t<a?t:a;if(this.options.snapMiddle){let o=L.PM.Utils.calcMiddleLatLng(e,i,n),l=this._getDistance(e,o,s);l<t&&l<a&&(r=o,h=l)}h<this.options.snapDistance&&(o=r)}return{...o}},_unsnap(){delete this._snapLatLng},_getClosestPointOnSegment(t,e,i,n){let s=t.getMaxZoom();s===1/0&&(s=t.getZoom());let o=t.project(e,s),a=t.project(i,s),r=t.project(n,s),h=L.LineUtil.closestPointOnSegment(o,a,r);return t.unproject(h,s)},_getDistanceToSegment(t,e,i,n){let s=t.latLngToContainerPoint(e),o=t.latLngToContainerPoint(i),a=t.latLngToContainerPoint(n);return L.LineUtil.pointToSegmentDistance(s,o,a)},_getDistance:(t,e,i)=>t.latLngToContainerPoint(e).distanceTo(t.latLngToContainerPoint(i))},He=L.Class.extend({includes:[Ze,Pe],options:{snappable:!0,snapDistance:20,snapMiddle:!1,allowSelfIntersection:!0,tooltips:!0,templineStyle:{},hintlineStyle:{color:"#3388ff",dashArray:"5,5"},pathOptions:null,cursorMarker:!0,finishOn:null,markerStyle:{draggable:!0,icon:L.icon()},hideMiddleMarkers:!1,minRadiusCircle:null,maxRadiusCircle:null,minRadiusCircleMarker:null,maxRadiusCircleMarker:null,resizeableCircleMarker:!1,resizeableCircle:!0,markerEditable:!0,continueDrawing:!1,snapSegment:!0,requireSnapToFinish:!1,rectangleAngle:0,textOptions:{text:null,focusAfterDraw:null,removeIfEmpty:null,className:null},snapVertex:!0},setOptions(t){L.Util.setOptions(this,t),this.setStyle(this.options)},setStyle(){},getOptions(){return this.options},initialize(t){let e=new L.Icon.Default;e.options.tooltipAnchor=[0,0],this.options.markerStyle.icon=e,this._map=t,this.shapes=["Marker","CircleMarker","Line","Polygon","Rectangle","Circle","Cut","Text"],this.shapes.forEach(t=>{this[t]=new L.PM.Draw[t](this._map)}),this.Marker.setOptions({continueDrawing:!0}),this.CircleMarker.setOptions({continueDrawing:!0})},setPathOptions(t,e=!1){this.options.pathOptions=e?(0,Ue.default)(this.options.pathOptions,t):t},getShapes(){return this.shapes},getShape(){return this._shape},enable(t,e){if(!t)throw new Error(`Error: Please pass a shape as a parameter. Possible shapes are: ${this.getShapes().join(",")}`);this.disable(),this[t].enable(e)},disable(){this.shapes.forEach(t=>{this[t].disable()})},addControls(){this.shapes.forEach(t=>{this[t].addButton()})},getActiveShape(){let t;return this.shapes.forEach(e=>{this[e]._enabled&&(t=e)}),t},_setGlobalDrawMode(){"Cut"===this._shape?this._fireGlobalCutModeToggled():this._fireGlobalDrawModeToggled();let t=[];this._map.eachLayer(e=>{(e instanceof L.Polyline||e instanceof L.Marker||e instanceof L.Circle||e instanceof L.CircleMarker||e instanceof L.ImageOverlay)&&(e._pmTempLayer||t.push(e))}),this._enabled?t.forEach(t=>{L.PM.Utils.disablePopup(t)}):t.forEach(t=>{L.PM.Utils.enablePopup(t)})},createNewDrawInstance(t,e){let i=this._getShapeFromBtnName(e);if(this[t])throw new TypeError("Draw Type already exists");if(!L.PM.Draw[i])throw new TypeError(`There is no class L.PM.Draw.${i}`);return this[t]=new L.PM.Draw[i](this._map),this[t].toolbarButtonName=t,this[t]._shape=t,this.shapes.push(t),this[e]&&this[t].setOptions(this[e].options),this[t].setOptions(this[t].options),this[t]},_getShapeFromBtnName(t){let e={drawMarker:"Marker",drawCircle:"Circle",drawPolygon:"Polygon",drawPolyline:"Line",drawRectangle:"Rectangle",drawCircleMarker:"CircleMarker",editMode:"Edit",dragMode:"Drag",cutPolygon:"Cut",removalMode:"Removal",rotateMode:"Rotate",drawText:"Text"};return e[t]?e[t]:this[t]?this[t]._shape:t},_finishLayer(t){t.pm&&(t.pm.setOptions(this.options),t.pm._shape=this._shape,t.pm._map=this._map),this._addDrawnLayerProp(t)},_addDrawnLayerProp(t){t._drawnByGeoman=!0},_setPane(t,e){"layerPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":"vertexPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":"markerPane"===e&&(t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},_isFirstLayer(){return 0===(this._map||this._layer._map).pm.getGeomanLayers().length}});He.Marker=He.extend({initialize(t){this._map=t,this._shape="Marker",this.toolbarButtonName="drawMarker"},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._hintMarker=L.marker(this._map.getCenter(),this.options.markerStyle),this._setPane(this._hintMarker,"markerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.placeMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this.options.markerEditable&&this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.enable()}),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createMarker,this),this._hintMarker.remove(),this._map.off("mousemove",this._syncHintMarker,this),this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.disable()}),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},isRelevantMarker:t=>t instanceof L.Marker&&t.pm&&!t._pmTempLayer&&!t.pm._initTextMarker,_syncHintMarker(t){if(this._hintMarker.setLatLng(t.latlng),this.options.snappable){let e=t;e.target=this._hintMarker,this._handleSnapping(e)}this._fireChange(this._hintMarker.getLatLng(),"Draw")},_createMarker(t){if(!t.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=new L.Marker(e,this.options.markerStyle);this._setPane(i,"markerPane"),this._finishLayer(i),i.pm||(i.options.draggable=!1),i.addTo(this._map.pm._getContainingLayer()),i.pm&&this.options.markerEditable?i.pm.enable():i.dragging&&i.dragging.disable(),this._fireCreate(i),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},setStyle(){var t,e;(null==(t=this.options.markerStyle)?void 0:t.icon)&&(null==(e=this._hintMarker)||e.setIcon(this.options.markerStyle.icon))}});var qe=6371008.8,Ve={centimeters:100*qe,centimetres:100*qe,degrees:qe/111325,feet:3.28084*qe,inches:39.37*qe,kilometers:qe/1e3,kilometres:qe/1e3,meters:qe,metres:qe,miles:qe/1609.344,millimeters:1e3*qe,millimetres:1e3*qe,nauticalmiles:qe/1852,radians:1,yards:1.0936*qe};function We(t,e,i){void 0===i&&(i={});var n={type:"Feature"};return(0===i.id||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=e||{},n.geometry=t,n}function Ke(t,e,i){if(void 0===i&&(i={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Qe(t[0])||!Qe(t[1]))throw new Error("coordinates must contain numbers");return We({type:"Point",coordinates:t},e,i)}function Xe(t,e,i){if(void 0===i&&(i={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return We({type:"LineString",coordinates:t},e,i)}function Ye(t,e){void 0===e&&(e={});var i={type:"FeatureCollection"};return e.id&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.features=t,i}function $e(t){return 180*(t%(2*Math.PI))/Math.PI}function Je(t){return t%360*Math.PI/180}function Qe(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function ti(t){var e,i,n={type:"FeatureCollection",features:[]};if("LineString"===(i="Feature"===t.type?t.geometry:t).type)e=[i.coordinates];else if("MultiLineString"===i.type)e=i.coordinates;else if("MultiPolygon"===i.type)e=[].concat.apply([],i.coordinates);else{if("Polygon"!==i.type)throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");e=i.coordinates}return e.forEach(function(t){e.forEach(function(e){for(var i=0;i<t.length-1;i++)for(var s=i;s<e.length-1;s++)if(t!==e||1!==Math.abs(i-s)&&(0!==i||s!==t.length-2||t[i][0]!==t[t.length-1][0]||t[i][1]!==t[t.length-1][1])){var o=ei(t[i][0],t[i][1],t[i+1][0],t[i+1][1],e[s][0],e[s][1],e[s+1][0],e[s+1][1]);o&&n.features.push(Ke([o[0],o[1]]))}})}),n}function ei(t,e,i,n,s,o,a,r){var h,l,c,u,p={x:null,y:null,onLine1:!1,onLine2:!1};return 0===(h=(r-o)*(i-t)-(a-s)*(n-e))?null!==p.x&&null!==p.y&&p:(u=(i-t)*(l=e-o)-(n-e)*(c=t-s),l=((a-s)*l-(r-o)*c)/h,c=u/h,p.x=t+l*(i-t),p.y=e+l*(n-e),l>=0&&l<=1&&(p.onLine1=!0),c>=0&&c<=1&&(p.onLine2=!0),!(!p.onLine1||!p.onLine2)&&[p.x,p.y])}function ii(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function ni(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function si(t){return"Feature"===t.type?t.geometry:t}function oi(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}function ai(t,e,i){if(null!==t)for(var n,s,o,a,r,h,l,c,u=0,p=0,d=t.type,_="FeatureCollection"===d,m="Feature"===d,g=_?t.features.length:1,f=0;f<g;f++){r=(c=!!(l=_?t.features[f].geometry:m?t.geometry:t)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var y=0;y<r;y++){var A=0,v=0;if(null!==(a=c?l.geometries[y]:l)){h=a.coordinates;var M=a.type;switch(u=0,M){case null:break;case"Point":if(!1===e(h,p,f,A,v))return!1;p++,A++;break;case"LineString":case"MultiPoint":for(n=0;n<h.length;n++){if(!1===e(h[n],p,f,A,v))return!1;p++,"MultiPoint"===M&&A++}"LineString"===M&&A++;break;case"Polygon":case"MultiLineString":for(n=0;n<h.length;n++){for(s=0;s<h[n].length-u;s++){if(!1===e(h[n][s],p,f,A,v))return!1;p++}"MultiLineString"===M&&A++,"Polygon"===M&&v++}"Polygon"===M&&A++;break;case"MultiPolygon":for(n=0;n<h.length;n++){for(v=0,s=0;s<h[n].length;s++){for(o=0;o<h[n][s].length-u;o++){if(!1===e(h[n][s][o],p,f,A,v))return!1;p++}v++}A++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===ai(a.geometries[n],e))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ri(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var i=0;i<t.features.length&&!1!==e(t.features[i],i);i++);}function hi(t,e){!function(t,e){var i,n,s,o,a,r,h,l,c,u,p=0,d="FeatureCollection"===t.type,_="Feature"===t.type,m=d?t.features.length:1;for(i=0;i<m;i++){for(r=d?t.features[i].geometry:_?t.geometry:t,l=d?t.features[i].properties:_?t.properties:{},c=d?t.features[i].bbox:_?t.bbox:void 0,u=d?t.features[i].id:_?t.id:void 0,a=(h=!!r&&"GeometryCollection"===r.type)?r.geometries.length:1,s=0;s<a;s++)if(null!==(o=h?r.geometries[s]:r))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,p,l,c,u))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===e(o.geometries[n],p,l,c,u))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,l,c,u))return!1;p++}}(t,function(t,i,n,s,o){var a,r=null===t?null:t.type;switch(r){case null:case"Point":case"LineString":case"Polygon":return!1!==e(We(t,n,{bbox:s,id:o}),i,0)&&void 0}switch(r){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var h=0;h<t.coordinates.length;h++){var l=t.coordinates[h];if(!1===e(We({type:a,coordinates:l},n),i,h))return!1}})}He.Line=He.extend({initialize(t){this._map=t,this._shape="Line",this.toolbarButtonName="drawPolyline",this._doesSelfIntersect=!1},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._markers=[],this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.polyline([],{...this.options.templineStyle,pmIgnore:!1}),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._layerGroup.addLayer(this._layer),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createVertex,this),this.options.finishOn&&"snap"!==this.options.finishOn&&this._map.on(this.options.finishOn,this._finishShape,this),"dblclick"===this.options.finishOn&&(this.tempMapDoubleClickZoomState=this._map.doubleClickZoom._enabled,this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.disable()),this._map.on("mousemove",this._syncHintMarker,this),this._hintMarker.on("move",this._syncHintLine,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this.isRed=!1,this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createVertex,this),this._map.off("mousemove",this._syncHintMarker,this),this.options.finishOn&&"snap"!==this.options.finishOn&&this._map.off(this.options.finishOn,this._finishShape,this),this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.enable(),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_syncHintLine(){let t=this._layer.getLatLngs();if(t.length>0){let e=t[t.length-1];this._hintline.setLatLngs([e,this._hintMarker.getLatLng()])}},_syncHintMarker(t){if(this._hintMarker.setLatLng(t.latlng),this.options.snappable){let e=t;e.target=this._hintMarker,this._handleSnapping(e)}this.options.allowSelfIntersection||this._handleSelfIntersection(!0,this._hintMarker.getLatLng());let e=this._layer._defaultShape().slice();e.push(this._hintMarker.getLatLng()),this._change(e)},hasSelfIntersection(){return ti(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersection(t,e){let i=L.polyline(this._layer.getLatLngs());t&&(e||(e=this._hintMarker.getLatLng()),i.addLatLng(e));let n=ti(i.toGeoJSON(15));this._doesSelfIntersect=n.features.length>0,this._doesSelfIntersect?this.isRed||(this.isRed=!0,this._hintline.setStyle({color:"#f00000ff"}),this._fireIntersect(n,this._map,"Draw")):this._hintline.isEmpty()||(this.isRed=!1,this._hintline.setStyle(this.options.hintlineStyle))},_createVertex(t){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,t.latlng),this._doesSelfIntersect))return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=this._layer.getLatLngs(),n=i[i.length-1];if(e.equals(i[0])||i.length>0&&e.equals(n))return void this._finishShape();this._layer._latlngInfo=this._layer._latlngInfo||[],this._layer._latlngInfo.push({latlng:e,snapInfo:this._hintMarker._snapInfo}),this._layer.addLatLng(e);let s=this._createMarker(e);this._setTooltipText(),this._setHintLineAfterNewVertex(e),this._fireVertexAdded(s,void 0,e,"Draw"),this._change(this._layer.getLatLngs()),"snap"===this.options.finishOn&&this._hintMarker._snapped&&this._finishShape(t)},_setHintLineAfterNewVertex(t){this._hintline.setLatLngs([t,t])},_removeLastVertex(){let t=this._markers;if(t.length<=1)return void this.disable();let e=this._layer.getLatLngs(),i=t[t.length-1],{indexPath:n}=L.PM.Utils.findDeepMarkerIndex(t,i);t.pop(),this._layerGroup.removeLayer(i);let s=t[t.length-1],o=e.indexOf(s.getLatLng());e=e.slice(0,o+1),this._layer.setLatLngs(e),this._layer._latlngInfo.pop(),this._syncHintLine(),this._setTooltipText(),this._fireVertexRemoved(i,n,"Draw"),this._change(this._layer.getLatLngs())},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!1),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let t=this._layer.getLatLngs();if(t.length<=1)return;let e=L.polyline(t,this.options.pathOptions);this._setPane(e,"layerPane"),this._finishLayer(e),e.addTo(this._map.pm._getContainingLayer()),this._fireCreate(e),this.options.snappable&&this._cleanupSnapping();let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))},_createMarker(t){let e=new L.Marker(t,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this._layerGroup.addLayer(e),this._markers.push(e),e.on("click",this._finishShape,this),e},_setTooltipText(){let{length:t}=this._layer.getLatLngs().flat(),e="";e=Ce(t<=1?"tooltips.continueLine":"tooltips.finishLine"),this._hintMarker.setTooltipContent(e)},_change(t){this._fireChange(t,"Draw")},setStyle(){var t,e;null==(t=this._layer)||t.setStyle(this.options.templineStyle),null==(e=this._hintline)||e.setStyle(this.options.hintlineStyle)}}),He.Polygon=He.Line.extend({initialize(t){this._map=t,this._shape="Polygon",this.toolbarButtonName="drawPolygon"},enable(t){L.PM.Draw.Line.prototype.enable.call(this,t),this._layer.pm._shape="Polygon"},_createMarker(t){let e=new L.Marker(t,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this._layerGroup.addLayer(e),this._markers.push(e),1===this._layer.getLatLngs().flat().length?(e.on("click",this._finishShape,this),this._tempSnapLayerIndex=this._otherSnapLayers.push(e)-1,this.options.snappable&&this._cleanupSnapping()):e.on("click",()=>1),e},_setTooltipText(){let{length:t}=this._layer.getLatLngs().flat(),e="";e=Ce(t<=2?"tooltips.continueLine":"tooltips.finishPoly"),this._hintMarker.setTooltipContent(e)},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let t=this._layer.getLatLngs();if(t.length<=2)return;let e=L.polygon(t,this.options.pathOptions);this._setPane(e,"layerPane"),this._finishLayer(e),e.addTo(this._map.pm._getContainingLayer()),this._fireCreate(e),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex;let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))}}),He.Rectangle=He.extend({initialize(t){this._map=t,this._shape="Rectangle",this.toolbarButtonName="drawRectangle"},enable(t){if(L.Util.setOptions(this,t),this._enabled=!0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.rectangle([[0,0],[0,0]],this.options.pathOptions),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._startMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-start-marker"}),draggable:!1,zIndexOffset:-100,opacity:this.options.cursorMarker?1:0}),this._setPane(this._startMarker,"vertexPane"),this._startMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._startMarker),this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:150,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this.options.cursorMarker){this._styleMarkers=[];for(let t=0;t<2;t+=1){let t=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-style-marker"}),draggable:!1,zIndexOffset:100});this._setPane(t,"vertexPane"),t._pmTempLayer=!0,this._layerGroup.addLayer(t),this._styleMarkers.push(t)}}this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._placeStartingMarkers,this),this._map.on("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._finishShape,this),this._map.off("click",this._placeStartingMarkers,this),this._map.off("mousemove",this._syncHintMarker,this),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_placeStartingMarkers(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng();L.DomUtil.addClass(this._startMarker._icon,"visible"),this._startMarker.setLatLng(e),this.options.cursorMarker&&this._styleMarkers&&this._styleMarkers.forEach(t=>{L.DomUtil.addClass(t._icon,"visible"),t.setLatLng(e)}),this._map.off("click",this._placeStartingMarkers,this),this._map.on("click",this._finishShape,this),this._hintMarker.setTooltipContent(Ce("tooltips.finishRect")),this._setRectangleOrigin()},_setRectangleOrigin(){let t=this._startMarker.getLatLng();t&&(this._layerGroup.addLayer(this._layer),this._layer.setLatLngs([t,t]),this._hintMarker.on("move",this._syncRectangleSize,this))},_syncHintMarker(t){if(this._hintMarker.setLatLng(t.latlng),this.options.snappable){let e=t;e.target=this._hintMarker,this._handleSnapping(e)}let e=this._layerGroup&&this._layerGroup.hasLayer(this._layer)?this._layer.getLatLngs():[this._hintMarker.getLatLng()];this._fireChange(e,"Draw")},_syncRectangleSize(){let t=ze(this._startMarker.getLatLng(),this._map),e=ze(this._hintMarker.getLatLng(),this._map),i=L.PM.Utils._getRotatedRectangle(t,e,this.options.rectangleAngle||0,this._map);if(this._layer.setLatLngs(i),this.options.cursorMarker&&this._styleMarkers){let n=[];i.forEach(i=>{!i.equals(t,1e-8)&&!i.equals(e,1e-8)&&n.push(i)}),n.forEach((t,e)=>{try{this._styleMarkers[e].setLatLng(t)}catch{}})}},_findCorners(){let t=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(t[0],t[2],this.options.rectangleAngle||0,this._map)},_finishShape(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=this._startMarker.getLatLng();if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||i.equals(e))return;let n=L.rectangle([i,e],this.options.pathOptions);if(this.options.rectangleAngle){let t=L.PM.Utils._getRotatedRectangle(i,e,this.options.rectangleAngle||0,this._map);n.setLatLngs(t),n.pm&&n.pm._setAngle(this.options.rectangleAngle||0)}this._setPane(n,"layerPane"),this._finishLayer(n),n.addTo(this._map.pm._getContainingLayer()),this._fireCreate(n);let s=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(s))},setStyle(){var t;null==(t=this._layer)||t.setStyle(this.options.pathOptions)}}),He.CircleMarker=He.extend({initialize(t){this._map=t,this._shape="CircleMarker",this.toolbarButtonName="drawCircleMarker",this._layerIsDragging=!1,this._BaseCircleClass=L.CircleMarker,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._defaultRadius=10},enable(t){if(L.Util.setOptions(this,t),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),this._enabled=!0,this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._map.getContainer().classList.add("geoman-draw-cursor"),this.options[this._editableOption]){let t={};L.extend(t,this.options.templineStyle),t.radius=0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=new this._BaseCircleClass(this._map.getCenter(),t),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._centerMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon"}),draggable:!1,zIndexOffset:100}),this._setPane(this._centerMarker,"vertexPane"),this._centerMarker._pmTempLayer=!0,this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:110,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.startCircle"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._map.on("click",this._placeCenterMarker,this)}else this._map.on("click",this._createMarker,this),this._hintMarker=new this._BaseCircleClass(this._map.getCenter(),{radius:this._defaultRadius,...this.options.templineStyle}),this._setPane(this._hintMarker,"layerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this._layer=this._hintMarker,this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.placeCircleMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip();this._map.on("mousemove",this._syncHintMarker,this),this._extendingEnable(),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},_extendingEnable(){!this.options[this._editableOption]&&this.options.markerEditable&&this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.enable()}),this._layer.bringToBack()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this.options[this._editableOption]?(this._map.off("click",this._finishShape,this),this._map.off("click",this._placeCenterMarker,this),this._map.removeLayer(this._layerGroup)):(this._map.off("click",this._createMarker,this),this._extendingDisable(),this._hintMarker.remove()),this._map.off("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},_extendingDisable(){this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.disable()})},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_placeCenterMarker(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng),this._layerGroup.addLayer(this._layer),this._layerGroup.addLayer(this._centerMarker);let e=this._hintMarker.getLatLng();this._centerMarker.setLatLng(e),this._map.off("click",this._placeCenterMarker,this),this._map.on("click",this._finishShape,this),this._placeCircleCenter()},_placeCircleCenter(){let t=this._centerMarker.getLatLng();t&&(this._layer.setLatLng(t),this._hintMarker.on("move",this._syncHintLine,this),this._hintMarker.on("move",this._syncCircleRadius,this),this._hintMarker.setTooltipContent(Ce("tooltips.finishCircle")),this._fireCenterPlaced(),this._fireChange(this._layer.getLatLng(),"Draw"))},_syncHintLine(){let t=this._centerMarker.getLatLng(),e=this._getNewDestinationOfHintMarker();this._hintline.setLatLngs([t,e])},_syncCircleRadius(){let t=this._centerMarker.getLatLng(),e=this._hintMarker.getLatLng(),i=this._distanceCalculation(t,e);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(i)},_syncHintMarker(t){if(this._hintMarker.setLatLng(t.latlng),this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker()),this.options.snappable){let e=t;e.target=this._hintMarker,this._handleSnapping(e)}this._handleHintMarkerSnapping();let e=this._layerGroup&&this._layerGroup.hasLayer(this._centerMarker)?this._centerMarker.getLatLng():this._hintMarker.getLatLng();this._fireChange(e,"Draw")},isRelevantMarker:t=>t instanceof L.CircleMarker&&!(t instanceof L.Circle)&&t.pm&&!t._pmTempLayer,_createMarker(t){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||!t.latlng||this._layerIsDragging)return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=new this._BaseCircleClass(e,{radius:this._defaultRadius,...this.options.pathOptions});this._setPane(i,"layerPane"),this._finishLayer(i),i.addTo(this._map.pm._getContainingLayer()),this._extendingCreateMarker(i),this._fireCreate(i),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},_extendingCreateMarker(t){t.pm&&this.options.markerEditable&&t.pm.enable()},_finishShape(t){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._centerMarker.getLatLng(),i=this._defaultRadius;if(this.options[this._editableOption]){let t=this._hintMarker.getLatLng();i=this._distanceCalculation(e,t),this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?i=this.options[this._minRadiusOption]:this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&(i=this.options[this._maxRadiusOption])}let n={...this.options.pathOptions,radius:i},s=new this._BaseCircleClass(e,n);this._setPane(s,"layerPane"),this._finishLayer(s),s.addTo(this._map.pm._getContainingLayer()),s.pm&&s.pm._updateHiddenPolyCircle(),this._fireCreate(s);let o=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(o))},_getNewDestinationOfHintMarker(){let t=this._hintMarker.getLatLng();if(this.options[this._editableOption]){if(!this._layerGroup.hasLayer(this._centerMarker))return t;let e=this._centerMarker.getLatLng(),i=this._distanceCalculation(e,t);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?t=De(this._map,e,t,this._getMinDistanceInMeter()):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&(t=De(this._map,e,t,this._getMaxDistanceInMeter()))}return t},_getMinDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,this._centerMarker.getLatLng())},_getMaxDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,this._centerMarker.getLatLng())},_handleHintMarkerSnapping(){if(this.options[this._editableOption]){if(this._hintMarker._snapped){let t=this._centerMarker.getLatLng(),e=this._hintMarker.getLatLng(),i=this._distanceCalculation(t,e);this._layerGroup.hasLayer(this._centerMarker)&&(this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]||this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption])&&this._hintMarker.setLatLng(this._hintMarker._orgLatLng)}this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker())}},setStyle(){var t,e;let i={};L.extend(i,this.options.templineStyle),this.options[this._editableOption]&&(i.radius=0),null==(t=this._layer)||t.setStyle(i),null==(e=this._hintline)||e.setStyle(this.options.hintlineStyle)},_distanceCalculation(t,e){return this._map.project(t).distanceTo(this._map.project(e))}}),He.Circle=He.CircleMarker.extend({initialize(t){this._map=t,this._shape="Circle",this.toolbarButtonName="drawCircle",this._BaseCircleClass=L.Circle,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._defaultRadius=100},_extendingEnable(){},_extendingDisable(){},_extendingCreateMarker(){},isRelevantMarker(){},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_distanceCalculation(t,e){return this._map.distance(t,e)}});var li=function(t){if(!t)throw new Error("geojson is required");var e=[];return hi(t,function(t){!function(t,e){var i=[],n=t.geometry;if(null!==n){switch(n.type){case"Polygon":i=ni(n);break;case"LineString":i=[ni(n)]}i.forEach(function(i){var n=function(t,e){var i=[];return t.reduce(function(t,n){var s=Xe([t,n],e);return s.bbox=function(t,e){var i=t[0],n=t[1],s=e[0],o=e[1],a=i<s?i:s,r=n<o?n:o,h=i>s?i:s,l=n>o?n:o;return[a,r,h,l]}(t,n),i.push(s),n}),i}(i,t.properties);n.forEach(function(t){t.id=e.length,e.push(t)})})}}(t,e)}),Ye(e)},ci=u(fe(),1);function ui(t,e){var i=ni(t),n=ni(e);if(2!==i.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==n.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var s=i[0][0],o=i[0][1],a=i[1][0],r=i[1][1],h=n[0][0],l=n[0][1],c=n[1][0],u=n[1][1],p=(u-l)*(a-s)-(c-h)*(r-o);if(0===p)return null;var d=((c-h)*(o-l)-(u-l)*(s-h))/p,_=((a-s)*(o-l)-(r-o)*(s-h))/p;return d>=0&&d<=1&&_>=0&&_<=1?Ke([s+d*(a-s),o+d*(r-o)]):null}var pi=function(t,e){var i={},n=[];if("LineString"===t.type&&(t=We(t)),"LineString"===e.type&&(e=We(e)),"Feature"===t.type&&"Feature"===e.type&&null!==t.geometry&&null!==e.geometry&&"LineString"===t.geometry.type&&"LineString"===e.geometry.type&&2===t.geometry.coordinates.length&&2===e.geometry.coordinates.length){var s=ui(t,e);return s&&n.push(s),Ye(n)}var o=(0,ci.default)();return o.load(li(e)),ri(li(t),function(t){ri(o.search(t),function(e){var s=ui(t,e);if(s){var o=ni(s).join(",");i[o]||(i[o]=!0,n.push(s))}})}),Ye(n)},di=u(fe(),1);var _i=function(t,e,i){void 0===i&&(i={});var n=ii(t),s=ii(e),o=Je(s[1]-n[1]),a=Je(s[0]-n[0]),r=Je(n[1]),h=Je(s[1]),l=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(r)*Math.cos(h);return function(t,e){void 0===e&&(e="kilometers");var i=Ve[e];if(!i)throw new Error(e+" units is invalid");return t*i}(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),i.units)};var mi=function(t){var e=t[0],i=t[1],n=t[2],s=t[3];if(_i(t.slice(0,2),[n,i])>=_i(t.slice(0,2),[e,s])){var o=(i+s)/2;return[e,o-(n-e)/2,n,o+(n-e)/2]}var a=(e+n)/2;return[a-(s-i)/2,i,a+(s-i)/2,s]};function gi(t){var e=[1/0,1/0,-1/0,-1/0];return ai(t,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}gi.default=gi;var fi=gi;var yi=function(t,e){void 0===e&&(e={});var i=e.precision,n=e.coordinates,s=e.mutate;if(i=null==i||isNaN(i)?6:i,n=null==n||isNaN(n)?3:n,!t)throw new Error("<geojson> is required");if("number"!=typeof i)throw new Error("<precision> must be a number");if("number"!=typeof n)throw new Error("<coordinates> must be a number");(!1===s||void 0===s)&&(t=JSON.parse(JSON.stringify(t)));var o=Math.pow(10,i);return ai(t,function(t){!function(t,e,i){t.length>i&&t.splice(i,t.length);for(var n=0;n<t.length;n++)t[n]=Math.round(t[n]*e)/e}(t,o,n)}),t};function Ai(t,e,i){if(void 0===i&&(i={}),!0===i.final)return function(t,e){var i=Ai(e,t);return i=(i+180)%360,i}(t,e);var n=ii(t),s=ii(e),o=Je(n[0]),a=Je(s[0]),r=Je(n[1]),h=Je(s[1]),l=Math.sin(a-o)*Math.cos(h),c=Math.cos(r)*Math.sin(h)-Math.sin(r)*Math.cos(h)*Math.cos(a-o);return $e(Math.atan2(l,c))}function vi(t,e,i,n){void 0===n&&(n={});var s=ii(t),o=Je(s[0]),a=Je(s[1]),r=Je(i),h=function(t,e){void 0===e&&(e="kilometers");var i=Ve[e];if(!i)throw new Error(e+" units is invalid");return t/i}(e,n.units),l=Math.asin(Math.sin(a)*Math.cos(h)+Math.cos(a)*Math.sin(h)*Math.cos(r));return Ke([$e(o+Math.atan2(Math.sin(r)*Math.sin(h)*Math.cos(a),Math.cos(h)-Math.sin(a)*Math.sin(l))),$e(l)],n.properties)}var Mi=function(t,e,i){void 0===i&&(i={});var n=Ke([1/0,1/0],{dist:1/0}),s=0;return hi(t,function(t){for(var o=ni(t),a=0;a<o.length-1;a++){var r=Ke(o[a]);r.properties.dist=_i(e,r,i);var h=Ke(o[a+1]);h.properties.dist=_i(e,h,i);var l=_i(r,h,i),c=Math.max(r.properties.dist,h.properties.dist),u=Ai(r,h),p=vi(e,c,u+90,i),d=vi(e,c,u-90,i),_=pi(Xe([p.geometry.coordinates,d.geometry.coordinates]),Xe([r.geometry.coordinates,h.geometry.coordinates])),m=null;_.features.length>0&&((m=_.features[0]).properties.dist=_i(e,m,i),m.properties.location=s+_i(r,m,i)),r.properties.dist<n.properties.dist&&((n=r).properties.index=a,n.properties.location=s),h.properties.dist<n.properties.dist&&((n=h).properties.index=a+1,n.properties.location=s+l),m&&m.properties.dist<n.properties.dist&&((n=m).properties.index=a),s+=l}}),n};function Li(t,e){var i=[],n=(0,di.default)();return hi(e,function(e){if(i.forEach(function(t,e){t.id=e}),i.length){var s=n.search(e);if(s.features.length){var o=bi(e,s);i=i.filter(function(t){return t.id!==o.id}),n.remove(o),ri(xi(o,e),function(t){i.push(t),n.insert(t)})}}else(i=xi(t,e).features).forEach(function(t){t.bbox||(t.bbox=mi(fi(t)))}),n.load(Ye(i))}),Ye(i)}function xi(t,e){var i=[],n=ni(t)[0],s=ni(t)[t.geometry.coordinates.length-1];if(wi(n,ii(e))||wi(s,ii(e)))return Ye([t]);var o=(0,di.default)(),a=li(t);o.load(a);var r=o.search(e);if(!r.features.length)return Ye([t]);var h=bi(e,r),l=function(t,e,i){var n=i;return ri(t,function(t,s){n=0===s&&void 0===i?t:e(n,t,s)}),n}(a,function(t,n,s){var o=ni(n)[1],a=ii(e);return s===h.id?(t.push(a),i.push(Xe(t)),wi(a,o)?[a]:[a,o]):(t.push(o),t)},[n]);return l.length>1&&i.push(Xe(l)),Ye(i)}function bi(t,e){if(!e.features.length)throw new Error("lines must contain features");if(1===e.features.length)return e.features[0];var i,n=1/0;return ri(e,function(e){var s=Mi(e,t).properties.dist;s<n&&(i=e,n=s)}),i}function wi(t,e){return t[0]===e[0]&&t[1]===e[1]}var Pi=function(t,e){if(!t)throw new Error("line is required");if(!e)throw new Error("splitter is required");var i=oi(t),n=oi(e);if("LineString"!==i)throw new Error("line must be LineString");if("FeatureCollection"===n)throw new Error("splitter cannot be a FeatureCollection");if("GeometryCollection"===n)throw new Error("splitter cannot be a GeometryCollection");var s=yi(e,{precision:7});switch(n){case"Point":return xi(t,s);case"MultiPoint":return Li(t,s);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return Li(t,pi(t,s))}};function ki(t,e,i){if(void 0===i&&(i={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var n=ii(t),s=si(e),o=s.type,a=e.bbox,r=s.coordinates;if(a&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(n,a))return!1;"Polygon"===o&&(r=[r]);for(var h=!1,l=0;l<r.length&&!h;l++)if(Ei(n,r[l][0],i.ignoreBoundary)){for(var c=!1,u=1;u<r[l].length&&!c;)Ei(n,r[l][u],!i.ignoreBoundary)&&(c=!0),u++;c||(h=!0)}return h}function Ei(t,e,i){var n=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var s=0,o=e.length-1;s<e.length;o=s++){var a=e[s][0],r=e[s][1],h=e[o][0],l=e[o][1];if(t[1]*(a-h)+r*(h-t[0])+l*(t[0]-a)===0&&(a-t[0])*(h-t[0])<=0&&(r-t[1])*(l-t[1])<=0)return!i;r>t[1]!=l>t[1]&&t[0]<(h-a)*(t[1]-r)/(l-r)+a&&(n=!n)}return n}function Ci(t,e,i,n,s){var o=i[0],a=i[1],r=t[0],h=t[1],l=e[0],c=e[1],u=l-r,p=c-h,d=(i[0]-r)*p-(i[1]-h)*u;if(null!==s){if(Math.abs(d)>s)return!1}else if(0!==d)return!1;return n?"start"===n?Math.abs(u)>=Math.abs(p)?u>0?r<o&&o<=l:l<=o&&o<r:p>0?h<a&&a<=c:c<=a&&a<h:"end"===n?Math.abs(u)>=Math.abs(p)?u>0?r<=o&&o<l:l<o&&o<=r:p>0?h<=a&&a<c:c<a&&a<=h:"both"===n&&(Math.abs(u)>=Math.abs(p)?u>0?r<o&&o<l:l<o&&o<r:p>0?h<a&&a<c:c<a&&a<h):Math.abs(u)>=Math.abs(p)?u>0?r<=o&&o<=l:l<=o&&o<=r:p>0?h<=a&&a<=c:c<=a&&a<=h}var Si=function(t,e,i){void 0===i&&(i={});for(var n=ii(t),s=ni(e),o=0;o<s.length-1;o++){var a=!1;if(i.ignoreEndVertices&&(0===o&&(a="start"),o===s.length-2&&(a="end"),0===o&&o+1===s.length-1&&(a="both")),Ci(s[o],s[o+1],n,a,typeof i.epsilon>"u"?null:i.epsilon))return!0}return!1};function Ti(t,e){var i=si(t),n=si(e),s=i.type,o=n.type,a=i.coordinates,r=n.coordinates;switch(s){case"Point":if("Point"===o)return Bi(a,r);throw new Error("feature2 "+o+" geometry not supported");case"MultiPoint":switch(o){case"Point":return function(t,e){var i,n=!1;for(i=0;i<t.coordinates.length;i++)if(Bi(t.coordinates[i],e.coordinates)){n=!0;break}return n}(i,n);case"MultiPoint":return function(t,e){for(var i=0,n=e.coordinates;i<n.length;i++){for(var s=n[i],o=!1,a=0,r=t.coordinates;a<r.length;a++){if(Bi(s,r[a])){o=!0;break}}if(!o)return!1}return!0}(i,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"Point":return Si(n,i,{ignoreEndVertices:!0});case"LineString":return function(t,e){for(var i=!1,n=0,s=e.coordinates;n<s.length;n++){var o=s[n];if(Si({type:"Point",coordinates:o},t,{ignoreEndVertices:!0})&&(i=!0),!Si({type:"Point",coordinates:o},t,{ignoreEndVertices:!1}))return!1}return i}(i,n);case"MultiPoint":return function(t,e){for(var i=!1,n=0,s=e.coordinates;n<s.length;n++){var o=s[n];if(Si(o,t,{ignoreEndVertices:!0})&&(i=!0),!Si(o,t))return!1}return!!i}(i,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"Point":return ki(n,i,{ignoreBoundary:!0});case"LineString":return function(t,e){var i=!1,n=0,s=fi(t),o=fi(e);if(!Oi(s,o))return!1;for(;n<e.coordinates.length-1;n++){if(ki({type:"Point",coordinates:Ii(e.coordinates[n],e.coordinates[n+1])},t,{ignoreBoundary:!0})){i=!0;break}}return i}(i,n);case"Polygon":return function(t,e){if("Feature"===t.type&&null===t.geometry||"Feature"===e.type&&null===e.geometry)return!1;var i=fi(t),n=fi(e);if(!Oi(i,n))return!1;for(var s=si(e).coordinates,o=0,a=s;o<a.length;o++)for(var r=a[o],h=0,l=r;h<l.length;h++){if(!ki(l[h],t))return!1}return!0}(i,n);case"MultiPoint":return function(t,e){for(var i=0,n=e.coordinates;i<n.length;i++){if(!ki(n[i],t,{ignoreBoundary:!0}))return!1}return!0}(i,n);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+s+" geometry not supported")}}function Oi(t,e){return!(t[0]>e[0]||t[2]<e[2]||t[1]>e[1]||t[3]<e[3])}function Bi(t,e){return t[0]===e[0]&&t[1]===e[1]}function Ii(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}var Di=u(pe()),Ri=t=>()=>t,zi=t=>{let e=t?(e,i)=>i.minus(e).abs().isLessThanOrEqualTo(t):Ri(!1);return(t,i)=>e(t,i)?0:t.comparedTo(i)};function Gi(t){let e=t?(e,i,n,s,o)=>e.exponentiatedBy(2).isLessThanOrEqualTo(s.minus(i).exponentiatedBy(2).plus(o.minus(n).exponentiatedBy(2)).times(t)):Ri(!1);return(t,i,n)=>{let s=t.x,o=t.y,a=n.x,r=n.y,h=o.minus(r).times(i.x.minus(a)).minus(s.minus(a).times(i.y.minus(r)));return e(h,s,o,a,r)?0:h.comparedTo(0)}}var Ni=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,ji=Math.ceil,Fi=Math.floor,Ui="[BigNumber Error] ",Zi=Ui+"Number primitive has more than 15 significant digits: ",Hi=1e14,qi=14,Vi=9007199254740991,Wi=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Ki=1e7,Xi=1e9;function Yi(t){var e=0|t;return t>0||t===e?e:e-1}function $i(t){for(var e,i,n=1,s=t.length,o=t[0]+"";n<s;){for(e=t[n++]+"",i=qi-e.length;i--;e="0"+e);o+=e}for(s=o.length;48===o.charCodeAt(--s););return o.slice(0,s+1||1)}function Ji(t,e){var i,n,s=t.c,o=e.c,a=t.s,r=e.s,h=t.e,l=e.e;if(!a||!r)return null;if(i=s&&!s[0],n=o&&!o[0],i||n)return i?n?0:-r:a;if(a!=r)return a;if(i=a<0,n=h==l,!s||!o)return n?0:!s^i?1:-1;if(!n)return h>l^i?1:-1;for(r=(h=s.length)<(l=o.length)?h:l,a=0;a<r;a++)if(s[a]!=o[a])return s[a]>o[a]^i?1:-1;return h==l?0:h>l^i?1:-1}function Qi(t,e,i,n){if(t<e||t>i||t!==Fi(t))throw Error(Ui+(n||"Argument")+("number"==typeof t?t<e||t>i?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function tn(t){var e=t.c.length-1;return Yi(t.e/qi)==e&&t.c[e]%2!=0}function en(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function nn(t,e,i){var n,s;if(e<0){for(s=i+".";++e;s+=i);t=s+t}else if(++e>(n=t.length)){for(s=i,e-=n;--e;s+=i);t+=s}else e<n&&(t=t.slice(0,e)+"."+t.slice(e));return t}var sn=function t(e){var i,n,s,o,a,r=M.prototype={constructor:M,toString:null,valueOf:null},h=new M(1),l=20,c=4,u=-7,p=21,d=-1e7,_=1e7,m=!1,g=1,f=0,y={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},A="0123456789abcdefghijklmnopqrstuvwxyz",v=!0;function M(t,e){var i,o,a,r,h,u,p,m,g=this;if(!(g instanceof M))return new M(t,e);if(null==e){if(t&&!0===t._isBigNumber)return g.s=t.s,void(!t.c||t.e>_?g.c=g.e=null:t.e<d?g.c=[g.e=0]:(g.e=t.e,g.c=t.c.slice()));if((u="number"==typeof t)&&0*t==0){if(g.s=1/t<0?(t=-t,-1):1,t===~~t){for(r=0,h=t;h>=10;h/=10,r++);return void(r>_?g.c=g.e=null:(g.e=r,g.c=[t]))}m=String(t)}else{if(!Ni.test(m=String(t)))return s(g,m,u);g.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(r=m.indexOf("."))>-1&&(m=m.replace(".","")),(h=m.search(/e/i))>0?(r<0&&(r=h),r+=+m.slice(h+1),m=m.substring(0,h)):r<0&&(r=m.length)}else{if(Qi(e,2,A.length,"Base"),10==e&&v)return w(g=new M(t),l+g.e+1,c);if(m=String(t),u="number"==typeof t){if(0*t!=0)return s(g,m,u,e);if(g.s=1/t<0?(m=m.slice(1),-1):1,M.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(Zi+t)}else g.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(i=A.slice(0,e),r=h=0,p=m.length;h<p;h++)if(i.indexOf(o=m.charAt(h))<0){if("."==o){if(h>r){r=p;continue}}else if(!a&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){a=!0,h=-1,r=0;continue}return s(g,String(t),u,e)}u=!1,(r=(m=n(m,e,10,g.s)).indexOf("."))>-1?m=m.replace(".",""):r=m.length}for(h=0;48===m.charCodeAt(h);h++);for(p=m.length;48===m.charCodeAt(--p););if(m=m.slice(h,++p)){if(p-=h,u&&M.DEBUG&&p>15&&(t>Vi||t!==Fi(t)))throw Error(Zi+g.s*t);if((r=r-h-1)>_)g.c=g.e=null;else if(r<d)g.c=[g.e=0];else{if(g.e=r,g.c=[],h=(r+1)%qi,r<0&&(h+=qi),h<p){for(h&&g.c.push(+m.slice(0,h)),p-=qi;h<p;)g.c.push(+m.slice(h,h+=qi));h=qi-(m=m.slice(h)).length}else h-=p;for(;h--;m+="0");g.c.push(+m)}}else g.c=[g.e=0]}function L(t,e,i,n){var s,o,a,r,h;if(null==i?i=c:Qi(i,0,8),!t.c)return t.toString();if(s=t.c[0],a=t.e,null==e)h=$i(t.c),h=1==n||2==n&&(a<=u||a>=p)?en(h,a):nn(h,a,"0");else if(o=(t=w(new M(t),e,i)).e,r=(h=$i(t.c)).length,1==n||2==n&&(e<=o||o<=u)){for(;r<e;h+="0",r++);h=en(h,o)}else if(e-=a,h=nn(h,o,"0"),o+1>r){if(--e>0)for(h+=".";e--;h+="0");}else if((e+=o-r)>0)for(o+1==r&&(h+=".");e--;h+="0");return t.s<0&&s?"-"+h:h}function x(t,e){for(var i,n,s=1,o=new M(t[0]);s<t.length;s++)(!(n=new M(t[s])).s||(i=Ji(o,n))===e||0===i&&o.s===e)&&(o=n);return o}function b(t,e,i){for(var n=1,s=e.length;!e[--s];e.pop());for(s=e[0];s>=10;s/=10,n++);return(i=n+i*qi-1)>_?t.c=t.e=null:i<d?t.c=[t.e=0]:(t.e=i,t.c=e),t}function w(t,e,i,n){var s,o,a,r,h,l,c,u=t.c,p=Wi;if(u){t:{for(s=1,r=u[0];r>=10;r/=10,s++);if((o=e-s)<0)o+=qi,a=e,h=u[l=0],c=Fi(h/p[s-a-1]%10);else if((l=ji((o+1)/qi))>=u.length){if(!n)break t;for(;u.length<=l;u.push(0));h=c=0,s=1,a=(o%=qi)-qi+1}else{for(h=r=u[l],s=1;r>=10;r/=10,s++);c=(a=(o%=qi)-qi+s)<0?0:Fi(h/p[s-a-1]%10)}if(n=n||e<0||null!=u[l+1]||(a<0?h:h%p[s-a-1]),n=i<4?(c||n)&&(0==i||i==(t.s<0?3:2)):c>5||5==c&&(4==i||n||6==i&&(o>0?a>0?h/p[s-a]:0:u[l-1])%10&1||i==(t.s<0?8:7)),e<1||!u[0])return u.length=0,n?(e-=t.e+1,u[0]=p[(qi-e%qi)%qi],t.e=-e||0):u[0]=t.e=0,t;if(0==o?(u.length=l,r=1,l--):(u.length=l+1,r=p[qi-o],u[l]=a>0?Fi(h/p[s-a]%p[a])*r:0),n)for(;;){if(0==l){for(o=1,a=u[0];a>=10;a/=10,o++);for(a=u[0]+=r,r=1;a>=10;a/=10,r++);o!=r&&(t.e++,u[0]==Hi&&(u[0]=1));break}if(u[l]+=r,u[l]!=Hi)break;u[l--]=0,r=1}for(o=u.length;0===u[--o];u.pop());}t.e>_?t.c=t.e=null:t.e<d&&(t.c=[t.e=0])}return t}function P(t){var e,i=t.e;return null===i?t.toString():(e=$i(t.c),e=i<=u||i>=p?en(e,i):nn(e,i,"0"),t.s<0?"-"+e:e)}return M.clone=t,M.ROUND_UP=0,M.ROUND_DOWN=1,M.ROUND_CEIL=2,M.ROUND_FLOOR=3,M.ROUND_HALF_UP=4,M.ROUND_HALF_DOWN=5,M.ROUND_HALF_EVEN=6,M.ROUND_HALF_CEIL=7,M.ROUND_HALF_FLOOR=8,M.EUCLID=9,M.config=M.set=function(t){var e,i;if(null!=t){if("object"!=typeof t)throw Error(Ui+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(Qi(i=t[e],0,Xi,e),l=i),t.hasOwnProperty(e="ROUNDING_MODE")&&(Qi(i=t[e],0,8,e),c=i),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((i=t[e])&&i.pop?(Qi(i[0],-Xi,0,e),Qi(i[1],0,Xi,e),u=i[0],p=i[1]):(Qi(i,-Xi,Xi,e),u=-(p=i<0?-i:i))),t.hasOwnProperty(e="RANGE"))if((i=t[e])&&i.pop)Qi(i[0],-Xi,-1,e),Qi(i[1],1,Xi,e),d=i[0],_=i[1];else{if(Qi(i,-Xi,Xi,e),!i)throw Error(Ui+e+" cannot be zero: "+i);d=-(_=i<0?-i:i)}if(t.hasOwnProperty(e="CRYPTO")){if((i=t[e])!==!!i)throw Error(Ui+e+" not true or false: "+i);if(i){if(!(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes)))throw m=!i,Error(Ui+"crypto unavailable");m=i}else m=i}if(t.hasOwnProperty(e="MODULO_MODE")&&(Qi(i=t[e],0,9,e),g=i),t.hasOwnProperty(e="POW_PRECISION")&&(Qi(i=t[e],0,Xi,e),f=i),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(i=t[e]))throw Error(Ui+e+" not an object: "+i);y=i}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(i=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(i))throw Error(Ui+e+" invalid: "+i);v="0123456789"==i.slice(0,10),A=i}}return{DECIMAL_PLACES:l,ROUNDING_MODE:c,EXPONENTIAL_AT:[u,p],RANGE:[d,_],CRYPTO:m,MODULO_MODE:g,POW_PRECISION:f,FORMAT:y,ALPHABET:A}},M.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!M.DEBUG)return!0;var e,i,n=t.c,s=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&s>=-Xi&&s<=Xi&&s===Fi(s)){if(0===n[0]){if(0===s&&1===n.length)return!0;break t}if((e=(s+1)%qi)<1&&(e+=qi),String(n[0]).length==e){for(e=0;e<n.length;e++)if((i=n[e])<0||i>=Hi||i!==Fi(i))break t;if(0!==i)return!0}}}else if(null===n&&null===s&&(null===o||1===o||-1===o))return!0;throw Error(Ui+"Invalid BigNumber: "+t)},M.maximum=M.max=function(){return x(arguments,-1)},M.minimum=M.min=function(){return x(arguments,1)},M.random=(o=9007199254740992,a=Math.random()*o&2097151?function(){return Fi(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,i,n,s,o,r=0,c=[],u=new M(h);if(null==t?t=l:Qi(t,0,Xi),s=ji(t/qi),m)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(s*=2));r<s;)(o=131072*e[r]+(e[r+1]>>>11))>=9e15?(i=crypto.getRandomValues(new Uint32Array(2)),e[r]=i[0],e[r+1]=i[1]):(c.push(o%1e14),r+=2);r=s/2}else{if(!crypto.randomBytes)throw m=!1,Error(Ui+"crypto unavailable");for(e=crypto.randomBytes(s*=7);r<s;)(o=281474976710656*(31&e[r])+1099511627776*e[r+1]+4294967296*e[r+2]+16777216*e[r+3]+(e[r+4]<<16)+(e[r+5]<<8)+e[r+6])>=9e15?crypto.randomBytes(7).copy(e,r):(c.push(o%1e14),r+=7);r=s/7}if(!m)for(;r<s;)(o=a())<9e15&&(c[r++]=o%1e14);for(s=c[--r],t%=qi,s&&t&&(o=Wi[qi-t],c[r]=Fi(s/o)*o);0===c[r];c.pop(),r--);if(r<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=qi);for(r=1,o=c[0];o>=10;o/=10,r++);r<qi&&(n-=qi-r)}return u.e=n,u.c=c,u}),M.sum=function(){for(var t=1,e=arguments,i=new M(e[0]);t<e.length;)i=i.plus(e[t++]);return i},n=function(){var t="0123456789";function e(t,e,i,n){for(var s,o,a=[0],r=0,h=t.length;r<h;){for(o=a.length;o--;a[o]*=e);for(a[0]+=n.indexOf(t.charAt(r++)),s=0;s<a.length;s++)a[s]>i-1&&(null==a[s+1]&&(a[s+1]=0),a[s+1]+=a[s]/i|0,a[s]%=i)}return a.reverse()}return function(n,s,o,a,r){var h,u,p,d,_,m,g,y,v=n.indexOf("."),L=l,x=c;for(v>=0&&(d=f,f=0,n=n.replace(".",""),m=(y=new M(s)).pow(n.length-v),f=d,y.c=e(nn($i(m.c),m.e,"0"),10,o,t),y.e=y.c.length),p=d=(g=e(n,s,o,r?(h=A,t):(h=t,A))).length;0==g[--d];g.pop());if(!g[0])return h.charAt(0);if(v<0?--p:(m.c=g,m.e=p,m.s=a,g=(m=i(m,y,L,x,o)).c,_=m.r,p=m.e),v=g[u=p+L+1],d=o/2,_=_||u<0||null!=g[u+1],_=x<4?(null!=v||_)&&(0==x||x==(m.s<0?3:2)):v>d||v==d&&(4==x||_||6==x&&1&g[u-1]||x==(m.s<0?8:7)),u<1||!g[0])n=_?nn(h.charAt(1),-L,h.charAt(0)):h.charAt(0);else{if(g.length=u,_)for(--o;++g[--u]>o;)g[u]=0,u||(++p,g=[1].concat(g));for(d=g.length;!g[--d];);for(v=0,n="";v<=d;n+=h.charAt(g[v++]));n=nn(n,p,h.charAt(0))}return n}}(),i=function(){function t(t,e,i){var n,s,o,a,r=0,h=t.length,l=e%Ki,c=e/Ki|0;for(t=t.slice();h--;)r=((s=l*(o=t[h]%Ki)+(n=c*o+(a=t[h]/Ki|0)*l)%Ki*Ki+r)/i|0)+(n/Ki|0)+c*a,t[h]=s%i;return r&&(t=[r].concat(t)),t}function e(t,e,i,n){var s,o;if(i!=n)o=i>n?1:-1;else for(s=o=0;s<i;s++)if(t[s]!=e[s]){o=t[s]>e[s]?1:-1;break}return o}function i(t,e,i,n){for(var s=0;i--;)t[i]-=s,s=t[i]<e[i]?1:0,t[i]=s*n+t[i]-e[i];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(n,s,o,a,r){var h,l,c,u,p,d,_,m,g,f,y,A,v,L,x,b,P,k=n.s==s.s?1:-1,E=n.c,C=s.c;if(!(E&&E[0]&&C&&C[0]))return new M(n.s&&s.s&&(E?!C||E[0]!=C[0]:C)?E&&0==E[0]||!C?0*k:k/0:NaN);for(g=(m=new M(k)).c=[],k=o+(l=n.e-s.e)+1,r||(r=Hi,l=Yi(n.e/qi)-Yi(s.e/qi),k=k/qi|0),c=0;C[c]==(E[c]||0);c++);if(C[c]>(E[c]||0)&&l--,k<0)g.push(1),u=!0;else{for(L=E.length,b=C.length,c=0,k+=2,(p=Fi(r/(C[0]+1)))>1&&(C=t(C,p,r),E=t(E,p,r),b=C.length,L=E.length),v=b,y=(f=E.slice(0,b)).length;y<b;f[y++]=0);P=C.slice(),P=[0].concat(P),x=C[0],C[1]>=r/2&&x++;do{if(p=0,(h=e(C,f,b,y))<0){if(A=f[0],b!=y&&(A=A*r+(f[1]||0)),(p=Fi(A/x))>1)for(p>=r&&(p=r-1),_=(d=t(C,p,r)).length,y=f.length;1==e(d,f,_,y);)p--,i(d,b<_?P:C,_,r),_=d.length,h=1;else 0==p&&(h=p=1),_=(d=C.slice()).length;if(_<y&&(d=[0].concat(d)),i(f,d,y,r),y=f.length,-1==h)for(;e(C,f,b,y)<1;)p++,i(f,b<y?P:C,y,r),y=f.length}else 0===h&&(p++,f=[0]);g[c++]=p,f[0]?f[y++]=E[v]||0:(f=[E[v]],y=1)}while((v++<L||null!=f[0])&&k--);u=null!=f[0],g[0]||g.splice(0,1)}if(r==Hi){for(c=1,k=g[0];k>=10;k/=10,c++);w(m,o+(m.e=c+l*qi-1)+1,a,u)}else m.e=l,m.r=+u;return m}}(),s=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,i=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,s=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,r,h){var l,c=r?a:a.replace(s,"");if(n.test(c))o.s=isNaN(c)?null:c<0?-1:1;else{if(!r&&(c=c.replace(t,function(t,e,i){return l="x"==(i=i.toLowerCase())?16:"b"==i?2:8,h&&h!=l?t:e}),h&&(l=h,c=c.replace(e,"$1").replace(i,"0.$1")),a!=c))return new M(c,l);if(M.DEBUG)throw Error(Ui+"Not a"+(h?" base "+h:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),r.absoluteValue=r.abs=function(){var t=new M(this);return t.s<0&&(t.s=1),t},r.comparedTo=function(t,e){return Ji(this,new M(t,e))},r.decimalPlaces=r.dp=function(t,e){var i,n,s,o=this;if(null!=t)return Qi(t,0,Xi),null==e?e=c:Qi(e,0,8),w(new M(o),t+o.e+1,e);if(!(i=o.c))return null;if(n=((s=i.length-1)-Yi(this.e/qi))*qi,s=i[s])for(;s%10==0;s/=10,n--);return n<0&&(n=0),n},r.dividedBy=r.div=function(t,e){return i(this,new M(t,e),l,c)},r.dividedToIntegerBy=r.idiv=function(t,e){return i(this,new M(t,e),0,1)},r.exponentiatedBy=r.pow=function(t,e){var i,n,s,o,a,r,l,u,p=this;if((t=new M(t)).c&&!t.isInteger())throw Error(Ui+"Exponent not an integer: "+P(t));if(null!=e&&(e=new M(e)),a=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return u=new M(Math.pow(+P(p),a?t.s*(2-tn(t)):+P(t))),e?u.mod(e):u;if(r=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new M(NaN);(n=!r&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&tn(t)?-0:0,p.e>-1&&(o=1/o),new M(r?1/o:o);f&&(o=ji(f/qi+2))}for(a?(i=new M(.5),r&&(t.s=1),l=tn(t)):l=(s=Math.abs(+P(t)))%2,u=new M(h);;){if(l){if(!(u=u.times(p)).c)break;o?u.c.length>o&&(u.c.length=o):n&&(u=u.mod(e))}if(s){if(0===(s=Fi(s/2)))break;l=s%2}else if(w(t=t.times(i),t.e+1,1),t.e>14)l=tn(t);else{if(0===(s=+P(t)))break;l=s%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(e))}return n?u:(r&&(u=h.div(u)),e?u.mod(e):o?w(u,f,c,undefined):u)},r.integerValue=function(t){var e=new M(this);return null==t?t=c:Qi(t,0,8),w(e,e.e+1,t)},r.isEqualTo=r.eq=function(t,e){return 0===Ji(this,new M(t,e))},r.isFinite=function(){return!!this.c},r.isGreaterThan=r.gt=function(t,e){return Ji(this,new M(t,e))>0},r.isGreaterThanOrEqualTo=r.gte=function(t,e){return 1===(e=Ji(this,new M(t,e)))||0===e},r.isInteger=function(){return!!this.c&&Yi(this.e/qi)>this.c.length-2},r.isLessThan=r.lt=function(t,e){return Ji(this,new M(t,e))<0},r.isLessThanOrEqualTo=r.lte=function(t,e){return-1===(e=Ji(this,new M(t,e)))||0===e},r.isNaN=function(){return!this.s},r.isNegative=function(){return this.s<0},r.isPositive=function(){return this.s>0},r.isZero=function(){return!!this.c&&0==this.c[0]},r.minus=function(t,e){var i,n,s,o,a=this,r=a.s;if(e=(t=new M(t,e)).s,!r||!e)return new M(NaN);if(r!=e)return t.s=-e,a.plus(t);var h=a.e/qi,l=t.e/qi,u=a.c,p=t.c;if(!h||!l){if(!u||!p)return u?(t.s=-e,t):new M(p?a:NaN);if(!u[0]||!p[0])return p[0]?(t.s=-e,t):new M(u[0]?a:3==c?-0:0)}if(h=Yi(h),l=Yi(l),u=u.slice(),r=h-l){for((o=r<0)?(r=-r,s=u):(l=h,s=p),s.reverse(),e=r;e--;s.push(0));s.reverse()}else for(n=(o=(r=u.length)<(e=p.length))?r:e,r=e=0;e<n;e++)if(u[e]!=p[e]){o=u[e]<p[e];break}if(o&&(s=u,u=p,p=s,t.s=-t.s),(e=(n=p.length)-(i=u.length))>0)for(;e--;u[i++]=0);for(e=Hi-1;n>r;){if(u[--n]<p[n]){for(i=n;i&&!u[--i];u[i]=e);--u[i],u[n]+=Hi}u[n]-=p[n]}for(;0==u[0];u.splice(0,1),--l);return u[0]?b(t,u,l):(t.s=3==c?-1:1,t.c=[t.e=0],t)},r.modulo=r.mod=function(t,e){var n,s,o=this;return t=new M(t,e),!o.c||!t.s||t.c&&!t.c[0]?new M(NaN):!t.c||o.c&&!o.c[0]?new M(o):(9==g?(s=t.s,t.s=1,n=i(o,t,0,3),t.s=s,n.s*=s):n=i(o,t,0,g),!(t=o.minus(n.times(t))).c[0]&&1==g&&(t.s=o.s),t)},r.multipliedBy=r.times=function(t,e){var i,n,s,o,a,r,h,l,c,u,p,d,_,m,g,f=this,y=f.c,A=(t=new M(t,e)).c;if(!(y&&A&&y[0]&&A[0]))return!f.s||!t.s||y&&!y[0]&&!A||A&&!A[0]&&!y?t.c=t.e=t.s=null:(t.s*=f.s,y&&A?(t.c=[0],t.e=0):t.c=t.e=null),t;for(n=Yi(f.e/qi)+Yi(t.e/qi),t.s*=f.s,(h=y.length)<(u=A.length)&&(_=y,y=A,A=_,s=h,h=u,u=s),s=h+u,_=[];s--;_.push(0));for(m=Hi,g=Ki,s=u;--s>=0;){for(i=0,p=A[s]%g,d=A[s]/g|0,o=s+(a=h);o>s;)i=((l=p*(l=y[--a]%g)+(r=d*l+(c=y[a]/g|0)*p)%g*g+_[o]+i)/m|0)+(r/g|0)+d*c,_[o--]=l%m;_[o]=i}return i?++n:_.splice(0,1),b(t,_,n)},r.negated=function(){var t=new M(this);return t.s=-t.s||null,t},r.plus=function(t,e){var i,n=this,s=n.s;if(e=(t=new M(t,e)).s,!s||!e)return new M(NaN);if(s!=e)return t.s=-e,n.minus(t);var o=n.e/qi,a=t.e/qi,r=n.c,h=t.c;if(!o||!a){if(!r||!h)return new M(s/0);if(!r[0]||!h[0])return h[0]?t:new M(r[0]?n:0*s)}if(o=Yi(o),a=Yi(a),r=r.slice(),s=o-a){for(s>0?(a=o,i=h):(s=-s,i=r),i.reverse();s--;i.push(0));i.reverse()}for((s=r.length)-(e=h.length)<0&&(i=h,h=r,r=i,e=s),s=0;e;)s=(r[--e]=r[e]+h[e]+s)/Hi|0,r[e]=Hi===r[e]?0:r[e]%Hi;return s&&(r=[s].concat(r),++a),b(t,r,a)},r.precision=r.sd=function(t,e){var i,n,s,o=this;if(null!=t&&t!==!!t)return Qi(t,1,Xi),null==e?e=c:Qi(e,0,8),w(new M(o),t,e);if(!(i=o.c))return null;if(n=(s=i.length-1)*qi+1,s=i[s]){for(;s%10==0;s/=10,n--);for(s=i[0];s>=10;s/=10,n++);}return t&&o.e+1>n&&(n=o.e+1),n},r.shiftedBy=function(t){return Qi(t,-Vi,Vi),this.times("1e"+t)},r.squareRoot=r.sqrt=function(){var t,e,n,s,o,a=this,r=a.c,h=a.s,u=a.e,p=l+4,d=new M("0.5");if(1!==h||!r||!r[0])return new M(!h||h<0&&(!r||r[0])?NaN:r?a:1/0);if(0==(h=Math.sqrt(+P(a)))||h==1/0?(((e=$i(r)).length+u)%2==0&&(e+="0"),h=Math.sqrt(+e),u=Yi((u+1)/2)-(u<0||u%2),h==1/0?e="5e"+u:e=(e=h.toExponential()).slice(0,e.indexOf("e")+1)+u,n=new M(e)):n=new M(h+""),n.c[0])for((h=(u=n.e)+p)<3&&(h=0);;)if(o=n,n=d.times(o.plus(i(a,o,p,1))),$i(o.c).slice(0,h)===(e=$i(n.c)).slice(0,h)){if(n.e<u&&--h,"9999"!=(e=e.slice(h-3,h+1))&&(s||"4999"!=e)){(!+e||!+e.slice(1)&&"5"==e.charAt(0))&&(w(n,n.e+l+2,1),t=!n.times(n).eq(a));break}if(!s&&(w(o,o.e+l+2,0),o.times(o).eq(a))){n=o;break}p+=4,h+=4,s=1}return w(n,n.e+l+1,c,t)},r.toExponential=function(t,e){return null!=t&&(Qi(t,0,Xi),t++),L(this,t,e,1)},r.toFixed=function(t,e){return null!=t&&(Qi(t,0,Xi),t=t+this.e+1),L(this,t,e)},r.toFormat=function(t,e,i){var n,s=this;if(null==i)null!=t&&e&&"object"==typeof e?(i=e,e=null):t&&"object"==typeof t?(i=t,t=e=null):i=y;else if("object"!=typeof i)throw Error(Ui+"Argument not an object: "+i);if(n=s.toFixed(t,e),s.c){var o,a=n.split("."),r=+i.groupSize,h=+i.secondaryGroupSize,l=i.groupSeparator||"",c=a[0],u=a[1],p=s.s<0,d=p?c.slice(1):c,_=d.length;if(h&&(o=r,r=h,h=o,_-=o),r>0&&_>0){for(o=_%r||r,c=d.substr(0,o);o<_;o+=r)c+=l+d.substr(o,r);h>0&&(c+=l+d.slice(o)),p&&(c="-"+c)}n=u?c+(i.decimalSeparator||"")+((h=+i.fractionGroupSize)?u.replace(new RegExp("\\d{"+h+"}\\B","g"),"$&"+(i.fractionGroupSeparator||"")):u):c}return(i.prefix||"")+n+(i.suffix||"")},r.toFraction=function(t){var e,n,s,o,a,r,l,u,p,d,m,g,f=this,y=f.c;if(null!=t&&(!(l=new M(t)).isInteger()&&(l.c||1!==l.s)||l.lt(h)))throw Error(Ui+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+P(l));if(!y)return new M(f);for(e=new M(h),p=n=new M(h),s=u=new M(h),g=$i(y),a=e.e=g.length-f.e-1,e.c[0]=Wi[(r=a%qi)<0?qi+r:r],t=!t||l.comparedTo(e)>0?a>0?e:p:l,r=_,_=1/0,l=new M(g),u.c[0]=0;d=i(l,e,0,1),1!=(o=n.plus(d.times(s))).comparedTo(t);)n=s,s=o,p=u.plus(d.times(o=p)),u=o,e=l.minus(d.times(o=e)),l=o;return o=i(t.minus(n),s,0,1),u=u.plus(o.times(p)),n=n.plus(o.times(s)),u.s=p.s=f.s,m=i(p,s,a*=2,c).minus(f).abs().comparedTo(i(u,n,a,c).minus(f).abs())<1?[p,s]:[u,n],_=r,m},r.toNumber=function(){return+P(this)},r.toPrecision=function(t,e){return null!=t&&Qi(t,1,Xi),L(this,t,e,2)},r.toString=function(t){var e,i=this,s=i.s,o=i.e;return null===o?s?(e="Infinity",s<0&&(e="-"+e)):e="NaN":(null==t?e=o<=u||o>=p?en($i(i.c),o):nn($i(i.c),o,"0"):10===t&&v?e=nn($i((i=w(new M(i),l+o+1,c)).c),i.e,"0"):(Qi(t,2,A.length,"Base"),e=n(nn($i(i.c),o,"0"),10,t,s,!0)),s<0&&i.c[0]&&(e="-"+e)),e},r.valueOf=r.toJSON=function(){return P(this)},r._isBigNumber=!0,r[Symbol.toStringTag]="BigNumber",r[Symbol.for("nodejs.util.inspect.custom")]=r.valueOf,null!=e&&M.set(e),M}(),on=sn,an=class{constructor(t){n(this,"key"),n(this,"left",null),n(this,"right",null),this.key=t}},rn=class extends an{constructor(t){super(t)}},hn=class{constructor(){n(this,"size",0),n(this,"modificationCount",0),n(this,"splayCount",0)}splay(t){let e=this.root;if(null==e)return this.compare(t,t),-1;let i,n=null,s=null,o=null,a=null,r=e,h=this.compare;for(;;)if(i=h(r.key,t),i>0){let e=r.left;if(null==e||(i=h(e.key,t),i>0&&(r.left=e.right,e.right=r,r=e,e=r.left,null==e)))break;null==n?s=r:n.left=r,n=r,r=e}else{if(!(i<0))break;{let e=r.right;if(null==e||(i=h(e.key,t),i<0&&(r.right=e.left,e.left=r,r=e,e=r.right,null==e)))break;null==o?a=r:o.right=r,o=r,r=e}}return null!=o&&(o.right=r.left,r.left=a),null!=n&&(n.left=r.right,r.right=s),this.root!==r&&(this.root=r,this.splayCount++),i}splayMin(t){let e=t,i=e.left;for(;null!=i;){let t=i;e.left=t.right,t.right=e,e=t,i=e.left}return e}splayMax(t){let e=t,i=e.right;for(;null!=i;){let t=i;e.right=t.left,t.left=e,e=t,i=e.right}return e}_delete(t){if(null==this.root||0!=this.splay(t))return null;let e=this.root,i=e,n=e.left;if(this.size--,null==n)this.root=e.right;else{let t=e.right;e=this.splayMax(n),e.right=t,this.root=e}return this.modificationCount++,i}addNewRoot(t,e){this.size++,this.modificationCount++;let i=this.root;null!=i?(e<0?(t.left=i,t.right=i.right,i.right=null):(t.right=i,t.left=i.left,i.left=null),this.root=t):this.root=t}_first(){let t=this.root;return null==t?null:(this.root=this.splayMin(t),this.root)}_last(){let t=this.root;return null==t?null:(this.root=this.splayMax(t),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(t){return this.validKey(t)&&0==this.splay(t)}defaultCompare(){return(t,e)=>t<e?-1:t>e?1:0}wrap(){return{getRoot:()=>this.root,setRoot:t=>{this.root=t},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:t=>{this.splayCount=t},splay:t=>this.splay(t),has:t=>this.has(t)}}},ln=class i extends hn{constructor(e,i){super(),n(this,"root",null),n(this,"compare"),n(this,"validKey"),n(this,t,"[object Set]"),this.compare=e??this.defaultCompare(),this.validKey=i??(t=>null!=t&&null!=t)}delete(t){return!!this.validKey(t)&&null!=this._delete(t)}deleteAll(t){for(let e of t)this.delete(e)}forEach(t){let e,i=this[Symbol.iterator]();for(;e=i.next(),!e.done;)t(e.value,e.value,this)}add(t){let e=this.splay(t);return 0!=e&&this.addNewRoot(new rn(t),e),this}addAndReturn(t){let e=this.splay(t);return 0!=e&&this.addNewRoot(new rn(t),e),this.root.key}addAll(t){for(let e of t)this.add(e)}isEmpty(){return null==this.root}isNotEmpty(){return null!=this.root}single(){if(0==this.size)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(0==this.size)throw"Bad state: No element";return this._first().key}last(){if(0==this.size)throw"Bad state: No element";return this._last().key}lastBefore(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)<0)return this.root.key;let e=this.root.left;if(null==e)return null;let i=e.right;for(;null!=i;)e=i,i=e.right;return e.key}firstAfter(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)>0)return this.root.key;let e=this.root.right;if(null==e)return null;let i=e.left;for(;null!=i;)e=i,i=e.left;return e.key}retainAll(t){let e=new i(this.compare,this.validKey),n=this.modificationCount;for(let i of t){if(n!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(i)&&0==this.splay(i)&&e.add(this.root.key)}e.size!=this.size&&(this.root=e.root,this.size=e.size,this.modificationCount++)}lookup(t){return this.validKey(t)&&0==this.splay(t)?this.root.key:null}intersection(t){let e=new i(this.compare,this.validKey);for(let i of this)t.has(i)&&e.add(i);return e}difference(t){let e=new i(this.compare,this.validKey);for(let i of this)t.has(i)||e.add(i);return e}union(t){let e=this.clone();return e.addAll(t),e}clone(){let t=new i(this.compare,this.validKey);return t.size=this.size,t.root=this.copyNode(this.root),t}copyNode(t){if(null==t)return null;let e=new rn(t.key);return function t(e,i){let n,s;do{if(n=e.left,s=e.right,null!=n){let e=new rn(n.key);i.left=e,t(n,e)}if(null!=s){let t=new rn(s.key);i.right=t,e=s,i=t}}while(null!=s)}(t,e),e}toSet(){return this.clone()}entries(){return new pn(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[(e=Symbol.iterator,t=Symbol.toStringTag,e)](){return new un(this.wrap())}},cn=class{constructor(t){n(this,"tree"),n(this,"path",new Array),n(this,"modificationCount",null),n(this,"splayCount"),this.tree=t,this.splayCount=t.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;let t=this.path[this.path.length-1];return this.getValue(t)}rebuildPath(t){this.path.splice(0,this.path.length),this.tree.splay(t),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(t){for(;null!=t;)this.path.push(t),t=t.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(null==this.modificationCount){this.modificationCount=this.tree.getModificationCount();let t=this.tree.getRoot();for(;null!=t;)this.path.push(t),t=t.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let t=this.path[this.path.length-1],e=t.right;if(null!=e){for(;null!=e;)this.path.push(e),e=e.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===t;)t=this.path.pop();return this.path.length>0}},un=class extends cn{getValue(t){return t.key}},pn=class extends cn{getValue(t){return[t.key,t.key]}},dn=t=>t,_n=t=>{if(t){let e=new ln(zi(t)),i=new ln(zi(t)),n=(t,e)=>e.addAndReturn(t),s=t=>({x:n(t.x,e),y:n(t.y,i)});return s({x:new on(0),y:new on(0)}),s}return dn},mn=t=>({set:t=>{gn=mn(t)},reset:()=>mn(t),compare:zi(t),snap:_n(t),orient:Gi(t)}),gn=mn(),fn=(t,e)=>t.ll.x.isLessThanOrEqualTo(e.x)&&e.x.isLessThanOrEqualTo(t.ur.x)&&t.ll.y.isLessThanOrEqualTo(e.y)&&e.y.isLessThanOrEqualTo(t.ur.y),yn=(t,e)=>{if(e.ur.x.isLessThan(t.ll.x)||t.ur.x.isLessThan(e.ll.x)||e.ur.y.isLessThan(t.ll.y)||t.ur.y.isLessThan(e.ll.y))return null;let i=t.ll.x.isLessThan(e.ll.x)?e.ll.x:t.ll.x,n=t.ur.x.isLessThan(e.ur.x)?t.ur.x:e.ur.x;return{ll:{x:i,y:t.ll.y.isLessThan(e.ll.y)?e.ll.y:t.ll.y},ur:{x:n,y:t.ur.y.isLessThan(e.ur.y)?t.ur.y:e.ur.y}}},An=(t,e)=>t.x.times(e.y).minus(t.y.times(e.x)),vn=(t,e)=>t.x.times(e.x).plus(t.y.times(e.y)),Mn=t=>vn(t,t).sqrt(),Ln=(t,e,i)=>{let n={x:e.x.minus(t.x),y:e.y.minus(t.y)},s={x:i.x.minus(t.x),y:i.y.minus(t.y)};return An(s,n).div(Mn(s)).div(Mn(n))},xn=(t,e,i)=>{let n={x:e.x.minus(t.x),y:e.y.minus(t.y)},s={x:i.x.minus(t.x),y:i.y.minus(t.y)};return vn(s,n).div(Mn(s)).div(Mn(n))},bn=(t,e,i)=>e.y.isZero()?null:{x:t.x.plus(e.x.div(e.y).times(i.minus(t.y))),y:i},wn=(t,e,i)=>e.x.isZero()?null:{x:i,y:t.y.plus(e.y.div(e.x).times(i.minus(t.x)))},Pn=class t{constructor(t,e){n(this,"point"),n(this,"isLeft"),n(this,"segment"),n(this,"otherSE"),n(this,"consumedBy"),void 0===t.events?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}static compare(e,i){let n=t.comparePoints(e.point,i.point);return 0!==n?n:(e.point!==i.point&&e.link(i),e.isLeft!==i.isLeft?e.isLeft?1:-1:En.compare(e.segment,i.segment))}static comparePoints(t,e){return t.x.isLessThan(e.x)?-1:t.x.isGreaterThan(e.x)?1:t.y.isLessThan(e.y)?-1:t.y.isGreaterThan(e.y)?1:0}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");let e=t.point.events;for(let i=0,n=e.length;i<n;i++){let t=e[i];this.point.events.push(t),t.point=this.point}this.checkForConsuming()}checkForConsuming(){let t=this.point.events.length;for(let e=0;e<t;e++){let i=this.point.events[e];if(void 0===i.segment.consumedBy)for(let n=e+1;n<t;n++){let t=this.point.events[n];void 0===t.consumedBy&&i.otherSE.point.events===t.otherSE.point.events&&i.segment.consume(t.segment)}}}getAvailableLinkedEvents(){let t=[];for(let e=0,i=this.point.events.length;e<i;e++){let i=this.point.events[e];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}getLeftmostComparator(t){let e=new Map,i=i=>{let n=i.otherSE;e.set(i,{sine:Ln(this.point,t.point,n.point),cosine:xn(this.point,t.point,n.point)})};return(t,n)=>{e.has(t)||i(t),e.has(n)||i(n);let{sine:s,cosine:o}=e.get(t),{sine:a,cosine:r}=e.get(n);return s.isGreaterThanOrEqualTo(0)&&a.isGreaterThanOrEqualTo(0)?o.isLessThan(r)?1:o.isGreaterThan(r)?-1:0:s.isLessThan(0)&&a.isLessThan(0)?o.isLessThan(r)?-1:o.isGreaterThan(r)?1:0:a.isLessThan(s)?-1:a.isGreaterThan(s)?1:0}}},kn=0,En=class t{constructor(t,e,i,s){n(this,"id"),n(this,"leftSE"),n(this,"rightSE"),n(this,"rings"),n(this,"windings"),n(this,"ringOut"),n(this,"consumedBy"),n(this,"prev"),n(this,"_prevInResult"),n(this,"_beforeState"),n(this,"_afterState"),n(this,"_isInResult"),this.id=++kn,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=i,this.windings=s}static compare(t,e){let i=t.leftSE.point.x,n=e.leftSE.point.x,s=t.rightSE.point.x,o=e.rightSE.point.x;if(o.isLessThan(i))return 1;if(s.isLessThan(n))return-1;let a=t.leftSE.point.y,r=e.leftSE.point.y,h=t.rightSE.point.y,l=e.rightSE.point.y;if(i.isLessThan(n)){if(r.isLessThan(a)&&r.isLessThan(h))return 1;if(r.isGreaterThan(a)&&r.isGreaterThan(h))return-1;let i=t.comparePoint(e.leftSE.point);if(i<0)return 1;if(i>0)return-1;let n=e.comparePoint(t.rightSE.point);return 0!==n?n:-1}if(i.isGreaterThan(n)){if(a.isLessThan(r)&&a.isLessThan(l))return-1;if(a.isGreaterThan(r)&&a.isGreaterThan(l))return 1;let i=e.comparePoint(t.leftSE.point);if(0!==i)return i;let n=t.comparePoint(e.rightSE.point);return n<0?1:n>0?-1:1}if(a.isLessThan(r))return-1;if(a.isGreaterThan(r))return 1;if(s.isLessThan(o)){let i=e.comparePoint(t.rightSE.point);if(0!==i)return i}if(s.isGreaterThan(o)){let i=t.comparePoint(e.rightSE.point);if(i<0)return 1;if(i>0)return-1}if(!s.eq(o)){let t=h.minus(a),e=s.minus(i),c=l.minus(r),u=o.minus(n);if(t.isGreaterThan(e)&&c.isLessThan(u))return 1;if(t.isLessThan(e)&&c.isGreaterThan(u))return-1}return s.isGreaterThan(o)?1:s.isLessThan(o)||h.isLessThan(l)?-1:h.isGreaterThan(l)?1:t.id<e.id?-1:t.id>e.id?1:0}static fromRing(e,i,n){let s,o,a,r=Pn.comparePoints(e,i);if(r<0)s=e,o=i,a=1;else{if(!(r>0))throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);s=i,o=e,a=-1}let h=new Pn(s,!0),l=new Pn(o,!1);return new t(h,l,[n],[a])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t.isLessThan(e)?t:e},ur:{x:this.rightSE.point.x,y:t.isGreaterThan(e)?t:e}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(t){return t.x.eq(this.leftSE.point.x)&&t.y.eq(this.leftSE.point.y)||t.x.eq(this.rightSE.point.x)&&t.y.eq(this.rightSE.point.y)}comparePoint(t){return gn.orient(this.leftSE.point,t,this.rightSE.point)}getIntersection(t){let e=this.bbox(),i=t.bbox(),n=yn(e,i);if(null===n)return null;let s=this.leftSE.point,o=this.rightSE.point,a=t.leftSE.point,r=t.rightSE.point,h=fn(e,a)&&0===this.comparePoint(a),l=fn(i,s)&&0===t.comparePoint(s),c=fn(e,r)&&0===this.comparePoint(r),u=fn(i,o)&&0===t.comparePoint(o);if(l&&h)return u&&!c?o:!u&&c?r:null;if(l)return c&&s.x.eq(r.x)&&s.y.eq(r.y)?null:s;if(h)return u&&o.x.eq(a.x)&&o.y.eq(a.y)?null:a;if(u&&c)return null;if(u)return o;if(c)return r;let p=((t,e,i,n)=>{if(e.x.isZero())return wn(i,n,t.x);if(n.x.isZero())return wn(t,e,i.x);if(e.y.isZero())return bn(i,n,t.y);if(n.y.isZero())return bn(t,e,i.y);let s=An(e,n);if(s.isZero())return null;let o={x:i.x.minus(t.x),y:i.y.minus(t.y)},a=An(o,e).div(s),r=An(o,n).div(s),h=t.x.plus(r.times(e.x)),l=i.x.plus(a.times(n.x)),c=t.y.plus(r.times(e.y)),u=i.y.plus(a.times(n.y));return{x:h.plus(l).div(2),y:c.plus(u).div(2)}})(s,this.vector(),a,t.vector());return null!==p&&fn(n,p)?gn.snap(p):null}split(e){let i=[],n=void 0!==e.events,s=new Pn(e,!0),o=new Pn(e,!1),a=this.rightSE;this.replaceRightSE(o),i.push(o),i.push(s);let r=new t(s,a,this.rings.slice(),this.windings.slice());return Pn.comparePoints(r.leftSE.point,r.rightSE.point)>0&&r.swapEvents(),Pn.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(s.checkForConsuming(),o.checkForConsuming()),i}swapEvents(){let t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,i=this.windings.length;e<i;e++)this.windings[e]*=-1}consume(e){let i=this,n=e;for(;i.consumedBy;)i=i.consumedBy;for(;n.consumedBy;)n=n.consumedBy;let s=t.compare(i,n);if(0!==s){if(s>0){let t=i;i=n,n=t}if(i.prev===n){let t=i;i=n,n=t}for(let t=0,e=n.rings.length;t<e;t++){let e=n.rings[t],s=n.windings[t],o=i.rings.indexOf(e);-1===o?(i.rings.push(e),i.windings.push(s)):i.windings[o]+=s}n.rings=null,n.windings=null,n.consumedBy=i,n.leftSE.consumedBy=i.leftSE,n.rightSE.consumedBy=i.rightSE}}prevInResult(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}beforeState(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){let t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}afterState(){if(void 0!==this._afterState)return this._afterState;let t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};let e=this._afterState.rings,i=this._afterState.windings,n=this._afterState.multiPolys;for(let a=0,r=this.rings.length;a<r;a++){let t=this.rings[a],n=this.windings[a],s=e.indexOf(t);-1===s?(e.push(t),i.push(n)):i[s]+=n}let s=[],o=[];for(let a=0,r=e.length;a<r;a++){if(0===i[a])continue;let t=e[a],n=t.poly;if(-1===o.indexOf(n))if(t.isExterior)s.push(n);else{-1===o.indexOf(n)&&o.push(n);let e=s.indexOf(t.poly);-1!==e&&s.splice(e,1)}}for(let a=0,r=s.length;a<r;a++){let t=s[a].multiPoly;-1===n.indexOf(t)&&n.push(t)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;let t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(zn.type){case"union":{let i=0===t.length,n=0===e.length;this._isInResult=i!==n;break}case"intersection":{let i,n;t.length<e.length?(i=t.length,n=e.length):(i=e.length,n=t.length),this._isInResult=n===zn.numMultiPolys&&i<n;break}case"xor":{let i=Math.abs(t.length-e.length);this._isInResult=i%2==1;break}case"difference":{let i=t=>1===t.length&&t[0].isSubject;this._isInResult=i(t)!==i(e);break}}return this._isInResult}},Cn=class{constructor(t,e,i){if(n(this,"poly"),n(this,"isExterior"),n(this,"segments"),n(this,"bbox"),!Array.isArray(t)||0===t.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=i,this.segments=[],"number"!=typeof t[0][0]||"number"!=typeof t[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let s=gn.snap({x:new on(t[0][0]),y:new on(t[0][1])});this.bbox={ll:{x:s.x,y:s.y},ur:{x:s.x,y:s.y}};let o=s;for(let n=1,a=t.length;n<a;n++){if("number"!=typeof t[n][0]||"number"!=typeof t[n][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let e=gn.snap({x:new on(t[n][0]),y:new on(t[n][1])});e.x.eq(o.x)&&e.y.eq(o.y)||(this.segments.push(En.fromRing(o,e,this)),e.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=e.x),e.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=e.y),e.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=e.x),e.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=e.y),o=e)}(!s.x.eq(o.x)||!s.y.eq(o.y))&&this.segments.push(En.fromRing(o,s,this))}getSweepEvents(){let t=[];for(let e=0,i=this.segments.length;e<i;e++){let i=this.segments[e];t.push(i.leftSE),t.push(i.rightSE)}return t}},Sn=class{constructor(t,e){if(n(this,"multiPoly"),n(this,"exteriorRing"),n(this,"interiorRings"),n(this,"bbox"),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Cn(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let i=1,n=t.length;i<n;i++){let e=new Cn(t[i],this,!1);e.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=e.bbox.ll.x),e.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=e.bbox.ll.y),e.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=e.bbox.ur.x),e.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=e.bbox.ur.y),this.interiorRings.push(e)}this.multiPoly=e}getSweepEvents(){let t=this.exteriorRing.getSweepEvents();for(let e=0,i=this.interiorRings.length;e<i;e++){let i=this.interiorRings[e].getSweepEvents();for(let e=0,n=i.length;e<n;e++)t.push(i[e])}return t}},Tn=class{constructor(t,e){if(n(this,"isSubject"),n(this,"polys"),n(this,"bbox"),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof t[0][0][0]&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:new on(Number.POSITIVE_INFINITY),y:new on(Number.POSITIVE_INFINITY)},ur:{x:new on(Number.NEGATIVE_INFINITY),y:new on(Number.NEGATIVE_INFINITY)}};for(let i=0,n=t.length;i<n;i++){let e=new Sn(t[i],this);e.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=e.bbox.ll.x),e.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=e.bbox.ll.y),e.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=e.bbox.ur.x),e.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=e.bbox.ur.y),this.polys.push(e)}this.isSubject=e}getSweepEvents(){let t=[];for(let e=0,i=this.polys.length;e<i;e++){let i=this.polys[e].getSweepEvents();for(let e=0,n=i.length;e<n;e++)t.push(i[e])}return t}},On=class t{constructor(t){n(this,"events"),n(this,"poly"),n(this,"_isExteriorRing"),n(this,"_enclosingRing"),this.events=t;for(let e=0,i=t.length;e<i;e++)t[e].segment.ringOut=this;this.poly=null}static factory(e){let i=[];for(let n=0,s=e.length;n<s;n++){let s=e[n];if(!s.isInResult()||s.ringOut)continue;let o=null,a=s.leftSE,r=s.rightSE,h=[a],l=a.point,c=[];for(;o=a,a=r,h.push(a),a.point!==l;)for(;;){let e=a.getAvailableLinkedEvents();if(0===e.length){let t=h[0].point,e=h[h.length-1].point;throw new Error(`Unable to complete output ring starting at [${t.x}, ${t.y}]. Last matching segment found ends at [${e.x}, ${e.y}].`)}if(1===e.length){r=e[0].otherSE;break}let n=null;for(let t=0,i=c.length;t<i;t++)if(c[t].point===a.point){n=t;break}if(null!==n){let e=c.splice(n)[0],s=h.splice(e.index);s.unshift(s[0].otherSE),i.push(new t(s.reverse()));continue}c.push({index:h.length,point:a.point});let s=a.getLeftmostComparator(o);r=e.sort(s)[0].otherSE;break}i.push(new t(h))}return i}getGeom(){let t=this.events[0].point,e=[t];for(let h=1,l=this.events.length-1;h<l;h++){let i=this.events[h].point,n=this.events[h+1].point;0!==gn.orient(i,t,n)&&(e.push(i),t=i)}if(1===e.length)return null;let i=e[0],n=e[1];0===gn.orient(i,t,n)&&e.shift(),e.push(e[0]);let s=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:e.length-1,a=this.isExteriorRing()?e.length:-1,r=[];for(let h=o;h!=a;h+=s)r.push([e[h].x.toNumber(),e[h].y.toNumber()]);return r}isExteriorRing(){if(void 0===this._isExteriorRing){let t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}enclosingRing(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){var t,e;let i=this.events[0];for(let o=1,a=this.events.length;o<a;o++){let t=this.events[o];Pn.compare(i,t)>0&&(i=t)}let n=i.segment.prevInResult(),s=n?n.prevInResult():null;for(;;){if(!n)return null;if(!s)return n.ringOut;if(s.ringOut!==n.ringOut)return(null==(t=s.ringOut)?void 0:t.enclosingRing())!==n.ringOut?n.ringOut:null==(e=n.ringOut)?void 0:e.enclosingRing();n=s.prevInResult(),s=n?n.prevInResult():null}}},Bn=class{constructor(t){n(this,"exteriorRing"),n(this,"interiorRings"),this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){let t=this.exteriorRing.getGeom();if(null===t)return null;let e=[t];for(let i=0,n=this.interiorRings.length;i<n;i++){let t=this.interiorRings[i].getGeom();null!==t&&e.push(t)}return e}},In=class{constructor(t){n(this,"rings"),n(this,"polys"),this.rings=t,this.polys=this._composePolys(t)}getGeom(){let t=[];for(let e=0,i=this.polys.length;e<i;e++){let i=this.polys[e].getGeom();null!==i&&t.push(i)}return t}_composePolys(t){var e;let i=[];for(let n=0,s=t.length;n<s;n++){let s=t[n];if(!s.poly)if(s.isExteriorRing())i.push(new Bn(s));else{let t=s.enclosingRing();(null==t?void 0:t.poly)||i.push(new Bn(t)),null==(e=null==t?void 0:t.poly)||e.addInterior(s)}}return i}},Dn=class{constructor(t,e=En.compare){n(this,"queue"),n(this,"tree"),n(this,"segments"),this.queue=t,this.tree=new ln(e),this.segments=[]}process(t){let e=t.segment,i=[];if(t.consumedBy)return t.isLeft?this.queue.delete(t.otherSE):this.tree.delete(e),i;t.isLeft&&this.tree.add(e);let n=e,s=e;do{n=this.tree.lastBefore(n)}while(null!=n&&null!=n.consumedBy);do{s=this.tree.firstAfter(s)}while(null!=s&&null!=s.consumedBy);if(t.isLeft){let o=null;if(n){let t=n.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(o=t),!n.isAnEndpoint(t))){let e=this._splitSafely(n,t);for(let t=0,n=e.length;t<n;t++)i.push(e[t])}}let a=null;if(s){let t=s.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(a=t),!s.isAnEndpoint(t))){let e=this._splitSafely(s,t);for(let t=0,n=e.length;t<n;t++)i.push(e[t])}}if(null!==o||null!==a){let t=null;t=null===o?a:null===a||Pn.comparePoints(o,a)<=0?o:a,this.queue.delete(e.rightSE),i.push(e.rightSE);let n=e.split(t);for(let e=0,s=n.length;e<s;e++)i.push(n[e])}i.length>0?(this.tree.delete(e),i.push(t)):(this.segments.push(e),e.prev=n)}else{if(n&&s){let t=n.getIntersection(s);if(null!==t){if(!n.isAnEndpoint(t)){let e=this._splitSafely(n,t);for(let t=0,n=e.length;t<n;t++)i.push(e[t])}if(!s.isAnEndpoint(t)){let e=this._splitSafely(s,t);for(let t=0,n=e.length;t<n;t++)i.push(e[t])}}}this.tree.delete(e)}return i}_splitSafely(t,e){this.tree.delete(t);let i=t.rightSE;this.queue.delete(i);let n=t.split(e);return n.push(i),void 0===t.consumedBy&&this.tree.add(t),n}},Rn=new class{constructor(){n(this,"type"),n(this,"numMultiPolys")}run(t,e,i){Rn.type=t;let n=[new Tn(e,!0)];for(let h=0,l=i.length;h<l;h++)n.push(new Tn(i[h],!1));if(Rn.numMultiPolys=n.length,"difference"===Rn.type){let t=n[0],e=1;for(;e<n.length;)null!==yn(n[e].bbox,t.bbox)?e++:n.splice(e,1)}if("intersection"===Rn.type)for(let h=0,l=n.length;h<l;h++){let t=n[h];for(let e=h+1,i=n.length;e<i;e++)if(null===yn(t.bbox,n[e].bbox))return[]}let s=new ln(Pn.compare);for(let h=0,l=n.length;h<l;h++){let t=n[h].getSweepEvents();for(let e=0,i=t.length;e<i;e++)s.add(t[e])}let o=new Dn(s),a=null;for(0!=s.size&&(a=s.first(),s.delete(a));a;){let t=o.process(a);for(let e=0,i=t.length;e<i;e++){let i=t[e];void 0===i.consumedBy&&s.add(i)}0!=s.size?(a=s.first(),s.delete(a)):a=null}gn.reset();let r=On.factory(o.segments);return new In(r).getGeom()}},zn=Rn;function Gn(t){let e={type:"Feature"};return e.geometry=t,e}function Nn(t){return"Feature"===t.type?t.geometry:t}function jn(t){return t&&t.geometry&&t.geometry.coordinates?t.geometry.coordinates:t}function Fn(t){return Gn({type:"Polygon",coordinates:t})}function Un(t){return Gn({type:"MultiPolygon",coordinates:t})}function Zn(t,e){let i=Nn(t),n=Nn(e),s=((t,...e)=>zn.run("intersection",t,e))(i.coordinates,n.coordinates);return 0===s.length?null:1===s.length?Fn(s[0]):Un(s)}function Hn(t,e){let i=Nn(t),n=Nn(e),s=((t,...e)=>zn.run("difference",t,e))(i.coordinates,n.coordinates);return 0===s.length?null:1===s.length?Fn(s[0]):Un(s)}function qn(t){return Array.isArray(t)?1+qn(t[0]):-1}function Vn(t){t instanceof L.Polyline&&(t=t.toGeoJSON(15));let e=jn(t),i=qn(e),n=[];return i>1?e.forEach(t=>{n.push(function(t){return Gn({type:"LineString",coordinates:t})}(t))}):n.push(t),n}function Wn(t){let e=[];return t.eachLayer(t=>{e.push(jn(t.toGeoJSON(15)))}),function(t){return Gn({type:"MultiLineString",coordinates:t})}(e)}gn.set,He.Cut=He.Polygon.extend({initialize(t){this._map=t,this._shape="Cut",this.toolbarButtonName="cutPolygon"},_finishShape(){if(this._editedLayers=[],!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let t=this._layer.getLatLngs();if(t.length<=2)return;let e=L.polygon(t,this.options.pathOptions);e._latlngInfos=this._layer._latlngInfo,this.cut(e),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex,this._editedLayers.forEach(({layer:t,originalLayer:e})=>{this._fireCut(e,t,e),this._fireCut(this._map,t,e),e.pm._fireEdit()}),this._editedLayers=[];let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))},cut(t){let e=this._map._layers,i=t._latlngInfos||[];Object.keys(e).map(t=>e[t]).filter(t=>t.pm).filter(t=>!t._pmTempLayer).filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore).filter(t=>t instanceof L.Polyline).filter(e=>e!==t).filter(t=>t.pm.options.allowCutting).filter(t=>!(this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0)||this.options.layersToCut.indexOf(t)>-1).filter(t=>!this._layerGroup.hasLayer(t)).filter(e=>{try{let i=!!pi(t.toGeoJSON(15),e.toGeoJSON(15)).features.length>0;return i||e instanceof L.Polyline&&!(e instanceof L.Polygon)?i:!!Zn(t.toGeoJSON(15),e.toGeoJSON(15))}catch{return L.Polygon,!1}}).forEach(e=>{let n;if(e instanceof L.Polygon){n=L.polygon(e.getLatLngs());let t=n.getLatLngs();i.forEach(e=>{if(e&&e.snapInfo){let{latlng:i}=e,s=this._calcClosestLayer(i,[n]);if(s&&s.segment&&s.distance<this.options.snapDistance){let{segment:e}=s;if(e&&2===e.length){let{indexPath:n,parentPath:s,newIndex:o}=L.PM.Utils._getIndexFromSegment(t,e);(n.length>1?(0,Di.default)(t,s):t).splice(o,0,i)}}}})}else n=e;let s=this._cutLayer(t,n),o=L.geoJSON(s,e.options);1===o.getLayers().length&&([o]=o.getLayers()),this._setPane(o,"layerPane");let a=o.addTo(this._map.pm._getContainingLayer());if(a.pm.enable(e.pm.options),a.pm.disable(),e._pmTempLayer=!0,t._pmTempLayer=!0,e.remove(),e.removeFrom(this._map.pm._getContainingLayer()),t.remove(),t.removeFrom(this._map.pm._getContainingLayer()),a.getLayers&&0===a.getLayers().length&&this._map.pm.removeLayer({target:a}),a instanceof L.LayerGroup?(a.eachLayer(t=>{this._addDrawnLayerProp(t)}),this._addDrawnLayerProp(a)):this._addDrawnLayerProp(a),this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0){let t=this.options.layersToCut.indexOf(e);t>-1&&this.options.layersToCut.splice(t,1)}this._editedLayers.push({layer:a,originalLayer:e})})},_cutLayer(t,e){let i,n=L.geoJSON();if(e instanceof L.Polygon)i=Hn(e.toGeoJSON(15),t.toGeoJSON(15));else{let s=Vn(e);s.forEach(e=>{let i,s=Pi(e,t.toGeoJSON(15));i=s&&s.features.length>0?L.geoJSON(s):L.geoJSON(e),i.getLayers().forEach(e=>{Ti(t.toGeoJSON(15),e.toGeoJSON(15))||e.addTo(n)})}),i=s.length>1?Wn(n):n.toGeoJSON(15)}return i},_change:L.Util.falseFn}),He.Text=He.extend({initialize(t){this._map=t,this._shape="Text",this.toolbarButtonName="drawText"},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.placeText"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this._map.getContainer().classList.add("geoman-draw-cursor"),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){var t;this._enabled&&(this._enabled=!1,this._map.off("click",this._createMarker,this),null==(t=this._hintMarker)||t.remove(),this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("mousemove",this._syncHintMarker,this),this._map.off("mousemove",this._showHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_syncHintMarker(t){if(this._hintMarker.setLatLng(t.latlng),this.options.snappable){let e=t;e.target=this._hintMarker,this._handleSnapping(e)}},_createMarker(t){var e,i,n,s;if(!t.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let o=this._hintMarker.getLatLng();if(this.textArea=this._createTextArea(),null==(e=this.options.textOptions)?void 0:e.className){let t=this.options.textOptions.className.split(" ");this.textArea.classList.add(...t)}let a=this._createTextIcon(this.textArea),r=new L.Marker(o,{textMarker:!0,_textMarkerOverPM:!0,icon:a});if(this._setPane(r,"markerPane"),this._finishLayer(r),r.pm||(r.options.draggable=!1),r.addTo(this._map.pm._getContainingLayer()),r.pm){r.pm.textArea=this.textArea,L.setOptions(r.pm,{removeIfEmpty:(null==(i=this.options.textOptions)?void 0:i.removeIfEmpty)??!0});let t=(null==(n=this.options.textOptions)?void 0:n.focusAfterDraw)??!0;r.pm._createTextMarker(t),(null==(s=this.options.textOptions)?void 0:s.text)&&r.pm.setText(this.options.textOptions.text)}this._fireCreate(r),this._cleanupSnapping(),this.disable(),this.options.continueDrawing&&this._map.once("mousemove",this._showHintMarkerAfterMoving,this)},_showHintMarkerAfterMoving(t){this.enable(),this._hintMarker.setLatLng(t.latlng)},_createTextArea(){let t=document.createElement("textarea");return t.readOnly=!0,t.classList.add("pm-textarea","pm-disabled"),t},_createTextIcon:t=>L.divIcon({className:"pm-text-marker",html:t})});var Kn={enableLayerDrag(){if(!this.options.draggable||!this._layer._map)return;this.disable(),this._layerDragEnabled=!0,this._map||(this._map=this._layer._map),(this._layer instanceof L.Marker||this._layer instanceof L.ImageOverlay)&&L.DomEvent.on(this._getDOMElem(),"dragstart",this._stopDOMImageDrag),this._layer.dragging&&this._layer.dragging.disable(),this._tempDragCoord=null,Ge(this._layer)instanceof L.Canvas?(this._layer.on("mouseout",this.removeDraggingClass,this),this._layer.on("mouseover",this.addDraggingClass,this)):this.addDraggingClass(),this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!0;let t=this._getDOMElem();t&&(Ge(this._layer)instanceof L.Canvas?(this._layer.on("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._addTouchEvents(t)):L.DomEvent.on(t,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._fireDragEnable()},disableLayerDrag(){this._layerDragEnabled=!1,Ge(this._layer)instanceof L.Canvas?(this._layer.off("mouseout",this.removeDraggingClass,this),this._layer.off("mouseover",this.addDraggingClass,this)):this.removeDraggingClass(),this._originalMapDragState&&this._dragging&&this._map.dragging.enable(),this._safeToCacheDragState=!1,this._layer.dragging&&this._layer.dragging.disable();let t=this._getDOMElem();t&&(Ge(this._layer)instanceof L.Canvas?(this._layer.off("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._removeTouchEvents(t)):L.DomEvent.off(t,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._layerDragged&&this._fireUpdate(),this._layerDragged=!1,this._fireDragDisable()},dragging(){return this._dragging},layerDragEnabled(){return!!this._layerDragEnabled},_simulateMouseDownEvent(t){let e=t.touches?t.touches[0]:t,i={originalEvent:e,target:this._layer};return i.containerPoint=this._map.mouseEventToContainerPoint(e),i.latlng=this._map.containerPointToLatLng(i.containerPoint),this._dragMixinOnMouseDown(i),!1},_simulateMouseMoveEvent(t){let e=t.touches?t.touches[0]:t,i={originalEvent:e,target:this._layer};return i.containerPoint=this._map.mouseEventToContainerPoint(e),i.latlng=this._map.containerPointToLatLng(i.containerPoint),this._dragMixinOnMouseMove(i),!1},_simulateMouseUpEvent(t){let e={originalEvent:t.touches?t.touches[0]:t,target:this._layer};return-1===t.type.indexOf("touch")&&(e.containerPoint=this._map.mouseEventToContainerPoint(t),e.latlng=this._map.containerPointToLatLng(e.containerPoint)),this._dragMixinOnMouseUp(e),!1},_dragMixinOnMouseDown(t){if(t.originalEvent.button>0)return;this._overwriteEventIfItComesFromMarker(t);let e=t._fromLayerSync,i=this._syncLayers("_dragMixinOnMouseDown",t);if(this._layer instanceof L.Marker&&(!this.options.snappable||e||i?this._disableSnapping():this._initSnappableMarkers()),this._layer instanceof L.CircleMarker){let t="resizeableCircleMarker";this._layer instanceof L.Circle&&(t="resizeableCircle"),!this.options.snappable||e||i?this._layer.pm.options[t]?this._layer.pm._disableSnapping():this._layer.pm._disableSnappingDrag():this._layer.pm.options[t]||this._initSnappableMarkersDrag()}this._safeToCacheDragState&&(this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!1),this._tempDragCoord=t.latlng,L.DomEvent.on(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),L.DomEvent.on(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this)},_dragMixinOnMouseMove(t){this._overwriteEventIfItComesFromMarker(t);let e=this._getDOMElem();this._syncLayers("_dragMixinOnMouseMove",t),this._dragging||(this._dragging=!0,L.DomUtil.addClass(e,"leaflet-pm-dragging"),this._layer instanceof L.Marker||this._layer.bringToFront(),this._originalMapDragState&&this._map.dragging.disable(),this._fireDragStart()),this._tempDragCoord||(this._tempDragCoord=t.latlng),this._onLayerDrag(t),this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle()},_dragMixinOnMouseUp(t){let e=this._getDOMElem();return this._syncLayers("_dragMixinOnMouseUp",t),this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0,L.DomEvent.off(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this),L.DomEvent.off(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),!!this._dragging&&(this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle(),this._layerDragged=!0,window.setTimeout(()=>{this._dragging=!1,e&&L.DomUtil.removeClass(e,"leaflet-pm-dragging"),this._fireDragEnd(),this._fireEdit(),this._layerEdited=!0},10),!0)},_onLayerDrag(t){let{latlng:e}=t,i=e.lat-this._tempDragCoord.lat,n=e.lng-this._tempDragCoord.lng,s=t=>t.map(t=>{if(Array.isArray(t))return s(t);let e={lat:t.lat+i,lng:t.lng+n};return(t.alt||0===t.alt)&&(e.alt=t.alt),e});if(this._layer instanceof L.Circle&&this._layer.options.resizeableCircle||this._layer instanceof L.CircleMarker&&this._layer.options.resizeableCircleMarker){let t=s([this._layer.getLatLng()]);this._layer.setLatLng(t[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.CircleMarker||this._layer instanceof L.Marker){let t=this._layer.getLatLng();this._layer._snapped&&(t=this._layer._orgLatLng);let e=s([t]);this._layer.setLatLng(e[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.ImageOverlay){let t=s([this._layer.getBounds().getNorthWest(),this._layer.getBounds().getSouthEast()]);this._layer.setBounds(t),this._fireChange(this._layer.getBounds(),"Edit")}else{let t=s(this._layer.getLatLngs());this._layer.setLatLngs(t),this._fireChange(this._layer.getLatLngs(),"Edit")}this._tempDragCoord=e,t.layer=this._layer,this._fireDrag(t)},addDraggingClass(){let t=this._getDOMElem();t&&L.DomUtil.addClass(t,"leaflet-pm-draggable")},removeDraggingClass(){let t=this._getDOMElem();t&&L.DomUtil.removeClass(t,"leaflet-pm-draggable")},_getDOMElem(){let t=null;return this._layer._path?t=this._layer._path:this._layer._renderer&&this._layer._renderer._container?t=this._layer._renderer._container:this._layer._image?t=this._layer._image:this._layer._icon&&(t=this._layer._icon),t},_overwriteEventIfItComesFromMarker(t){t.target.getLatLng&&(!t.target._radius||t.target._radius<=10)&&(t.containerPoint=this._map.mouseEventToContainerPoint(t.originalEvent),t.latlng=this._map.containerPointToLatLng(t.containerPoint))},_syncLayers(t,e){if(this.enabled())return!1;if(!e._fromLayerSync&&this._layer===e.target&&this.options.syncLayersOnDrag){e._fromLayerSync=!0;let i=[];if(L.Util.isArray(this.options.syncLayersOnDrag))i=this.options.syncLayersOnDrag,this.options.syncLayersOnDrag.forEach(t=>{t instanceof L.LayerGroup&&(i=i.concat(t.pm.getLayers(!0)))});else if(!0===this.options.syncLayersOnDrag&&this._parentLayerGroup)for(let t in this._parentLayerGroup){let e=this._parentLayerGroup[t];e.pm&&(i=e.pm.getLayers(!0))}return L.Util.isArray(i)&&i.length>0&&(i=i.filter(t=>!!t.pm).filter(t=>!!t.pm.options.draggable),i.forEach(i=>{i!==this._layer&&i.pm[t]&&(i._snapped=!1,i.pm[t](e))})),i.length>0}return!1},_stopDOMImageDrag:t=>(t.preventDefault(),!1)},Xn=u(pe());function Yn(t,e,i){let n=i.getMaxZoom();if(n===1/0&&(n=i.getZoom()),L.Util.isArray(t)){let n=[];return t.forEach(t=>{n.push(Yn(t,e,i))}),n}return t instanceof L.LatLng?function(t,e,i,n){return i.unproject(e.transform(i.project(t,n)),n)}(t,e,i,n):null}function $n(t,e){e instanceof L.Layer&&(e=e.getLatLng());let i=t.getMaxZoom();return i===1/0&&(i=t.getZoom()),t.project(e,i)}function Jn(t,e){let i=t.getMaxZoom();return i===1/0&&(i=t.getZoom()),t.unproject(e,i)}var Qn={_onRotateStart(t){this._preventRenderingMarkers(!0),this._rotationOriginLatLng=this._getRotationCenter().clone(),this._rotationOriginPoint=$n(this._map,this._rotationOriginLatLng),this._rotationStartPoint=$n(this._map,t.target.getLatLng()),this._initialRotateLatLng=Re(this._layer),this._startAngle=this.getAngle();let e=Re(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._fireRotationStart(this._rotationLayer,e),this._fireRotationStart(this._map,e)},_onRotate(t){let e=$n(this._map,t.target.getLatLng()),i=this._rotationStartPoint,n=this._rotationOriginPoint,s=Math.atan2(e.y-n.y,e.x-n.x)-Math.atan2(i.y-n.y,i.x-n.x);this._layer.setLatLngs(this._rotateLayer(s,this._initialRotateLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let o=this;!function t(e,i=[],n=-1){if(n>-1&&i.push(n),L.Util.isArray(e[0]))e.forEach((e,n)=>t(e,i.slice(),n));else{let t=i.length>0?(0,Xn.default)(o._markers,i):o._markers[0];e.forEach((e,i)=>{t[i].setLatLng(e)})}}(this._layer.getLatLngs());let a=Re(this._rotationLayer);this._rotationLayer.setLatLngs(this._rotateLayer(s,this._rotationLayer.pm._rotateOrgLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let r=180*s/Math.PI;r=r<0?r+360:r;let h=r+this._startAngle;this._setAngle(h),this._rotationLayer.pm._setAngle(h),this._fireRotation(this._rotationLayer,r,a),this._fireRotation(this._map,r,a),this._rotationLayer.pm._fireChange(this._rotationLayer.getLatLngs(),"Rotation")},_onRotateEnd(){let t=this._startAngle;delete this._rotationOriginLatLng,delete this._rotationOriginPoint,delete this._rotationStartPoint,delete this._initialRotateLatLng,delete this._startAngle;let e=Re(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._rotationLayer.pm._rotateOrgLatLng=Re(this._rotationLayer),this._fireRotationEnd(this._rotationLayer,t,e),this._fireRotationEnd(this._map,t,e),this._rotationLayer.pm._fireEdit(this._rotationLayer,"Rotation"),this._preventRenderingMarkers(!1),this._layerRotated=!0},_rotateLayer(t,e,i,n,s){let o=$n(s,i);return this._matrix=n.clone().rotate(t,o).flip(),Yn(e,this._matrix,s)},_setAngle(t){t=t<0?t+360:t,this._angle=t%360},_getRotationCenter(){if(this._rotationCenter)return this._rotationCenter;let t=L.polygon(this._layer.getLatLngs(),{stroke:!1,fill:!1,pmIgnore:!0}).addTo(this._layer._map),e=t.getCenter();return t.removeFrom(this._layer._map),e},enableRotate(){if(!this.options.allowRotation)return void this.disableRotate();this.rotateEnabled()&&this.disableRotate(),this._layer instanceof L.Rectangle&&void 0===this._angle&&this.setInitAngle(Ie(this._layer._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);this._rotatePoly=L.polygon(this._layer.getLatLngs(),{fill:!1,stroke:!1,pmIgnore:!1,snapIgnore:!0}),this._rotatePoly._pmTempLayer=!0,this._rotatePoly.addTo(this._layer._map),this._rotatePoly.pm._setAngle(this.getAngle()),this._rotatePoly.pm.setRotationCenter(this.getRotationCenter()),this._rotatePoly.pm.setOptions(this._layer._map.pm.getGlobalOptions()),this._rotatePoly.pm.setOptions({rotate:!0,snappable:!1,hideMiddleMarkers:!0}),this._rotatePoly.pm._rotationLayer=this._layer,this._rotatePoly.pm.enable(),this._rotateOrgLatLng=Re(this._layer),this._rotateEnabled=!0,this._layer.on("remove",this.disableRotate,this),this._fireRotationEnable(this._layer),this._fireRotationEnable(this._layer._map)},disableRotate(){this.rotateEnabled()&&(this._rotatePoly.pm._layerRotated&&this._fireUpdate(),this._rotatePoly.pm._layerRotated=!1,this._rotatePoly.pm.disable(),this._rotatePoly.remove(),this._rotatePoly.pm.setOptions({rotate:!1}),this._rotatePoly=void 0,this._rotateOrgLatLng=void 0,this._layer.off("remove",this.disableRotate,this),this._rotateEnabled=!1,this._fireRotationDisable(this._layer),this._fireRotationDisable(this._layer._map))},rotateEnabled(){return!!this._rotateEnabled},rotateLayer(t){let e=this.getAngle(),i=this._layer.getLatLngs(),n=t*(Math.PI/180);this._layer.setLatLngs(this._rotateLayer(n,this._layer.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._layer._map)),this._rotateOrgLatLng=L.polygon(this._layer.getLatLngs()).getLatLngs(),this._setAngle(this.getAngle()+t),this.rotateEnabled()&&this._rotatePoly&&this._rotatePoly.pm.enabled()&&(this._rotatePoly.setLatLngs(this._rotateLayer(n,this._rotatePoly.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._rotatePoly._map)),this._rotatePoly.pm._initMarkers());let s=this.getAngle()-e;s=s<0?s+360:s,this._startAngle=e,this._fireRotation(this._layer,s,i,this._layer),this._fireRotation(this._map||this._layer._map,s,i,this._layer),delete this._startAngle,this._fireChange(this._layer.getLatLngs(),"Rotation")},rotateLayerToAngle(t){let e=t-this.getAngle();this.rotateLayer(e)},getAngle(){return this._angle||0},setInitAngle(t){this._setAngle(t)},getRotationCenter(){return this._getRotationCenter()},setRotationCenter(t){this._rotationCenter=t,this._rotatePoly&&this._rotatePoly.pm.setRotationCenter(t)}},ts=L.Class.extend({includes:[Kn,Ze,Qn,Pe],options:{snappable:!0,snapDistance:20,allowSelfIntersection:!0,allowSelfIntersectionEdit:!1,preventMarkerRemoval:!1,removeLayerBelowMinVertexCount:!0,limitMarkersToCount:-1,hideMiddleMarkers:!1,snapSegment:!0,syncLayersOnDrag:!1,draggable:!0,allowEditing:!0,allowRemoval:!0,allowCutting:!0,allowRotation:!0,addVertexOn:"click",removeVertexOn:"contextmenu",removeVertexValidation:void 0,addVertexValidation:void 0,moveVertexValidation:void 0,resizeableCircleMarker:!1,resizeableCircle:!0,snapMiddle:!1,snapVertex:!0},setOptions(t){L.Util.setOptions(this,t)},getOptions(){return this.options},applyOptions(){},isPolygon(){return this._layer instanceof L.Polygon},getShape(){return this._shape},_setPane(t,e){"layerPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":"vertexPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":"markerPane"===e&&(t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},remove(){(this._map||this._layer._map).pm.removeLayer({target:this._layer})},_vertexValidation(t,e){let i=e.target,n={layer:this._layer,marker:i,event:e},s="";return"move"===t?s="moveVertexValidation":"add"===t?s="addVertexValidation":"remove"===t&&(s="removeVertexValidation"),this.options[s]&&"function"==typeof this.options[s]&&!this.options[s](n)?("move"===t&&(i._cancelDragEventChain=i.getLatLng()),!1):(i._cancelDragEventChain=null,!0)},_vertexValidationDrag:t=>!t._cancelDragEventChain||(t._latlng=t._cancelDragEventChain,t.update(),!1),_vertexValidationDragEnd:t=>!t._cancelDragEventChain||(t._cancelDragEventChain=null,!1)});ts.LayerGroup=L.Class.extend({initialize(t){this._layerGroup=t,this._layers=this.getLayers(),this._getMap(),this._layers.forEach(t=>this._initLayer(t));this._layerGroup.on("layeradd",L.Util.throttle(t=>{if(t.layer._pmTempLayer)return;this._layers=this.getLayers();let e=this._layers.filter(t=>!t.pm._parentLayerGroup||!(this._layerGroup._leaflet_id in t.pm._parentLayerGroup));e.forEach(t=>{this._initLayer(t)}),e.length>0&&this._getMap()&&this._getMap().pm.globalEditModeEnabled()&&this.enabled()&&this.enable(this.getOptions())},100,this),this),this._layerGroup.on("layerremove",t=>{this._removeLayerFromGroup(t.target)},this);this._layerGroup.on("layerremove",L.Util.throttle(t=>{t.target._pmTempLayer||(this._layers=this.getLayers())},100,this),this)},enable(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this._options=t,this._layers.forEach(i=>{i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.enable(t,e)):i.pm.enable(t)})},disable(t=[]){0===t.length&&(this._layers=this.getLayers()),this._layers.forEach(e=>{e instanceof L.LayerGroup?-1===t.indexOf(e._leaflet_id)&&(t.push(e._leaflet_id),e.pm.disable(t)):e.pm.disable()})},enabled(t=[]){return 0===t.length&&(this._layers=this.getLayers()),!!this._layers.find(e=>e instanceof L.LayerGroup?-1===t.indexOf(e._leaflet_id)&&(t.push(e._leaflet_id),e.pm.enabled(t)):e.pm.enabled())},toggleEdit(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this._options=t,this._layers.forEach(i=>{i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.toggleEdit(t,e)):i.pm.toggleEdit(t)})},_initLayer(t){let e=L.Util.stamp(this._layerGroup);t.pm._parentLayerGroup||(t.pm._parentLayerGroup={}),t.pm._parentLayerGroup[e]=this._layerGroup},_removeLayerFromGroup(t){if(t.pm&&t.pm._layerGroup){let e=L.Util.stamp(this._layerGroup);delete t.pm._layerGroup[e]}},dragging(){return this._layers=this.getLayers(),!!this._layers&&!!this._layers.find(t=>t.pm.dragging())},getOptions(){return this.options},_getMap(){var t;return this._map||(null==(t=this._layers.find(t=>!!t._map))?void 0:t._map)||null},getLayers(t=!1,e=!0,i=!0,n=[]){let s=[];return t?this._layerGroup.getLayers().forEach(t=>{s.push(t),t instanceof L.LayerGroup&&-1===n.indexOf(t._leaflet_id)&&(n.push(t._leaflet_id),s=s.concat(t.pm.getLayers(!0,!0,!0,n)))}):s=this._layerGroup.getLayers(),i&&(s=s.filter(t=>!(t instanceof L.LayerGroup))),e&&(s=s.filter(t=>!!t.pm),s=s.filter(t=>!t._pmTempLayer),s=s.filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)),s},setOptions(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this.options=t,this._layers.forEach(i=>{i.pm&&(i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.setOptions(t,e)):i.pm.setOptions(t))})}}),ts.Marker=ts.extend({_shape:"Marker",initialize(t){this._layer=t,this._enabled=!1,this._layer.on("dragend",this._onDragEnd,this)},enable(t={draggable:!0}){L.Util.setOptions(this,t),this.options.allowEditing&&this._layer._map?(this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._fireEnable()):this.disable()},disable(){this.enabled()&&(this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this._layer.off("contextmenu",this._removeMarker,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1)},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this.options.draggable?this.enableLayerDrag():this.disableLayerDrag(),this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_removeMarker(t){let e=t.target;e.remove(),this._fireRemove(e),this._fireRemove(this._map,e)},_onDragEnd(){this._fireEdit(),this._layerEdited=!0},_initSnappableMarkers(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)}});var es=u(pe()),is={filterMarkerGroup(){this.markerCache=[],this.createCache(),this._layer.on("pm:edit",this.createCache,this),this.applyLimitFilters({}),this.throttledApplyLimitFilters||(this.throttledApplyLimitFilters=L.Util.throttle(this.applyLimitFilters,100,this)),this._layer.on("pm:disable",this._removeMarkerLimitEvents,this),this._layer.on("remove",this._removeMarkerLimitEvents,this),this.options.limitMarkersToCount>-1&&(this._layer.on("pm:vertexremoved",this._initMarkers,this),this._map.on("mousemove",this.throttledApplyLimitFilters,this))},_removeMarkerLimitEvents(){this._map.off("mousemove",this.throttledApplyLimitFilters,this),this._layer.off("pm:edit",this.createCache,this),this._layer.off("pm:disable",this._removeMarkerLimitEvents,this),this._layer.off("pm:vertexremoved",this._initMarkers,this)},createCache(){let t=[...this._markerGroup.getLayers(),...this.markerCache];this.markerCache=t.filter((t,e,i)=>i.indexOf(t)===e)},_removeFromCache(t){let e=this.markerCache.indexOf(t);e>-1&&this.markerCache.splice(e,1)},renderLimits(t){this.markerCache.forEach(e=>{t.includes(e)?this._markerGroup.addLayer(e):this._markerGroup.removeLayer(e)})},applyLimitFilters({latlng:t={lat:0,lng:0}}){if(this._preventRenderMarkers)return;let e=[...this._filterClosestMarkers(t)];this.renderLimits(e)},_filterClosestMarkers(t){let e=[...this.markerCache],i=this.options.limitMarkersToCount;return-1===i?e:(e.sort((e,i)=>e._latlng.distanceTo(t)-i._latlng.distanceTo(t)),e.filter((t,e)=>!(i>-1)||e<i))},_preventRenderMarkers:!1,_preventRenderingMarkers(t){this._preventRenderMarkers=!!t}};ts.Line=ts.extend({includes:[is],_shape:"Line",initialize(t){this._layer=t,this._enabled=!1},enable(t){if(L.Util.setOptions(this,t),this._map=this._layer._map,this._map){if(!this.options.allowEditing)return void this.disable();this.enabled()&&this.disable(),this._enabled=!0,this._initMarkers(),this.applyOptions(),this._layer.on("remove",this.disable,this),this.options.allowSelfIntersection||this._layer.on("pm:vertexremoved",this._handleSelfIntersectionOnVertexRemoval,this),this.options.allowSelfIntersection?this.cachedColor=void 0:("#f00000ff"!==this._layer.options.color?(this.cachedColor=this._layer.options.color,this.isRed=!1):this.isRed=!0,this._handleLayerStyle()),this._fireEnable()}},disable(){if(!this.enabled()||this._dragging)return;this._enabled=!1,this._markerGroup.clearLayers(),this._markerGroup.removeFrom(this._map),this._layer.off("remove",this.disable,this),this.options.allowSelfIntersection||this._layer.off("pm:vertexremoved",this._handleSelfIntersectionOnVertexRemoval,this);let t=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(t,"leaflet-pm-draggable"),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()},enabled(){return this._enabled},toggleEdit(t){return this.enabled()?this.disable():this.enable(t),this.enabled()},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initMarkers(){let t=this._map,e=this._layer.getLatLngs();this._markerGroup&&(this._markerGroup.removeFrom(t),this._markerGroup.clearLayers()),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0;let i=t=>{if(Array.isArray(t[0]))return t.map(i,this);let e=t.map(this._createMarker,this);return!0!==this.options.hideMiddleMarkers&&t.map((i,n)=>{let s=this.isPolygon()?(n+1)%t.length:n+1;return this._createMiddleMarker(e[n],e[s])}),e};this._markers=i(e),this.filterMarkerGroup(),t.addLayer(this._markerGroup)},_createMarker(t){let e=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this.options.rotate?(e.on("dragstart",this._onRotateStart,this),e.on("drag",this._onRotate,this),e.on("dragend",this._onRotateEnd,this)):(e.on("click",this._onVertexClick,this),e.on("dragstart",this._onMarkerDragStart,this),e.on("move",this._onMarkerDrag,this),e.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||e.on(this.options.removeVertexOn,this._removeMarker,this)),this._markerGroup.addLayer(e),e},_createMiddleMarker(t,e){if(!t||!e)return!1;let i=L.PM.Utils.calcMiddleLatLng(this._map,t.getLatLng(),e.getLatLng()),n=this._createMarker(i),s=L.divIcon({className:"marker-icon marker-icon-middle"});return n.setIcon(s),n.leftM=t,n.rightM=e,t._middleMarkerNext=n,e._middleMarkerPrev=n,n.on(this.options.addVertexOn,this._onMiddleMarkerClick,this),n.on("movestart",this._onMiddleMarkerMoveStart,this),n},_onMiddleMarkerClick(t){let e=t.target;if(!this._vertexValidation("add",t))return;let i=L.divIcon({className:"marker-icon"});e.setIcon(i),this._addMarker(e,e.leftM,e.rightM)},_onMiddleMarkerMoveStart(t){let e=t.target;e.on("moveend",this._onMiddleMarkerMoveEnd,this),this._vertexValidation("add",t)?(e._dragging=!0,this._addMarker(e,e.leftM,e.rightM)):e.on("move",this._onMiddleMarkerMovePrevent,this)},_onMiddleMarkerMovePrevent(t){let e=t.target;this._vertexValidationDrag(e)},_onMiddleMarkerMoveEnd(t){let e=t.target;if(e.off("move",this._onMiddleMarkerMovePrevent,this),e.off("moveend",this._onMiddleMarkerMoveEnd,this),!this._vertexValidationDragEnd(e))return;let i=L.divIcon({className:"marker-icon"});e.setIcon(i),setTimeout(()=>{delete e._dragging},100)},_addMarker(t,e,i){t.off("movestart",this._onMiddleMarkerMoveStart,this),t.off(this.options.addVertexOn,this._onMiddleMarkerClick,this);let n=t.getLatLng(),s=this._layer._latlngs;delete t.leftM,delete t.rightM;let{indexPath:o,index:a,parentPath:r}=L.PM.Utils.findDeepMarkerIndex(this._markers,e),h=o.length>1?(0,es.default)(s,r):s,l=o.length>1?(0,es.default)(this._markers,r):this._markers;h.splice(a+1,0,n),l.splice(a+1,0,t),this._layer.setLatLngs(s),!0!==this.options.hideMiddleMarkers&&(this._createMiddleMarker(e,t),this._createMiddleMarker(t,i)),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit"),this._fireVertexAdded(t,L.PM.Utils.findDeepMarkerIndex(this._markers,t).indexPath,n),this.options.snappable&&this._initSnappableMarkers()},hasSelfIntersection(){return ti(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersectionOnVertexRemoval(){this._handleLayerStyle(!0)&&(this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers())},_handleLayerStyle(t){let e,i,n=this._layer;if(this.options.allowSelfIntersection?e=!1:(i=ti(this._layer.toGeoJSON(15)),e=i.features.length>0),e){if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!0),this.isRed)return e;t?this._flashLayer():(n.setStyle({color:"#f00000ff"}),this.isRed=!0),this._fireIntersect(i)}else n.setStyle({color:this.cachedColor}),this.isRed=!1,!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!1);return e},_flashLayer(){this.cachedColor||(this.cachedColor=this._layer.options.color),this._layer.setStyle({color:"#f00000ff"}),this.isRed=!0,window.setTimeout(()=>{this._layer.setStyle({color:this.cachedColor}),this.isRed=!1},200)},_updateDisabledMarkerStyle(t,e){t.forEach(t=>{Array.isArray(t)?this._updateDisabledMarkerStyle(t,e):t._icon&&(e&&!this._checkMarkerAllowedToDrag(t)?L.DomUtil.addClass(t._icon,"vertexmarker-disabled"):L.DomUtil.removeClass(t._icon,"vertexmarker-disabled"))})},_removeMarker(t){let e=t.target;if(!this._vertexValidation("remove",t))return;this.options.allowSelfIntersection||(this._coordsBeforeEdit=Re(this._layer,this._layer.getLatLngs()));let i=this._layer.getLatLngs(),{indexPath:n,index:s,parentPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);if(!n)return;let a=n.length>1?(0,es.default)(i,o):i,r=n.length>1?(0,es.default)(this._markers,o):this._markers,h=o[o.length-1]>0&&this._layer instanceof L.Polygon;if(!this.options.removeLayerBelowMinVertexCount&&!h&&(a.length<=2||this.isPolygon()&&a.length<=3))return void this._flashLayer();a.splice(s,1),this._layer.setLatLngs(i),this.isPolygon()&&a.length<=2&&a.splice(0,a.length);let l=!1;if(a.length<=1&&(a.splice(0,a.length),o.length>1&&n.length>1&&(i=Te(i)),this._layer.setLatLngs(i),this._initMarkers(),l=!0),Se(i)||this._layer.remove(),i=Te(i),this._layer.setLatLngs(i),this._markers=Te(this._markers),!l&&(r=n.length>1?(0,es.default)(this._markers,o):this._markers,e._middleMarkerPrev&&(this._markerGroup.removeLayer(e._middleMarkerPrev),this._removeFromCache(e._middleMarkerPrev)),e._middleMarkerNext&&(this._markerGroup.removeLayer(e._middleMarkerNext),this._removeFromCache(e._middleMarkerNext)),this._markerGroup.removeLayer(e),this._removeFromCache(e),r)){let t,e;if(this.isPolygon()?(t=(s+1)%r.length,e=(s+(r.length-1))%r.length):(e=s-1<0?void 0:s-1,t=s+1>=r.length?void 0:s+1),t!==e){let i=r[e],n=r[t];!0!==this.options.hideMiddleMarkers&&this._createMiddleMarker(i,n)}r.splice(s,1)}this._fireEdit(),this._layerEdited=!0,this._fireVertexRemoved(e,n),this._fireChange(this._layer.getLatLngs(),"Edit")},updatePolygonCoordsFromMarkerDrag(t){let e=this._layer.getLatLngs(),i=t.getLatLng(),{indexPath:n,index:s,parentPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,t);(n.length>1?(0,es.default)(e,o):e).splice(s,1,i),this._layer.setLatLngs(e)},_getNeighborMarkers(t){let{indexPath:e,index:i,parentPath:n}=L.PM.Utils.findDeepMarkerIndex(this._markers,t),s=e.length>1?(0,es.default)(this._markers,n):this._markers,o=(i+1)%s.length;return{prevMarker:s[(i+(s.length-1))%s.length],nextMarker:s[o]}},_checkMarkerAllowedToDrag(t){let{prevMarker:e,nextMarker:i}=this._getNeighborMarkers(t),n=L.polyline([e.getLatLng(),t.getLatLng()]),s=L.polyline([t.getLatLng(),i.getLatLng()]),o=pi(this._layer.toGeoJSON(15),n.toGeoJSON(15)).features.length,a=pi(this._layer.toGeoJSON(15),s.toGeoJSON(15)).features.length;return t.getLatLng()===this._markers[0][0].getLatLng()?a+=1:t.getLatLng()===this._markers[0][this._markers[0].length-1].getLatLng()&&(o+=1),!(o<=2&&a<=2)},_onMarkerDragStart(t){let e=t.target;if(this.cachedColor||(this.cachedColor=this._layer.options.color),!this._vertexValidation("move",t))return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragStart(t,i),this.options.allowSelfIntersection||(this._coordsBeforeEdit=Re(this._layer,this._layer.getLatLngs())),!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()?this._markerAllowedToDrag=this._checkMarkerAllowedToDrag(e):this._markerAllowedToDrag=null},_onMarkerDrag(t){let e=t.target;if(!this._vertexValidationDrag(e))return;let{indexPath:i,index:n,parentPath:s}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);if(!i)return;if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()&&!1===this._markerAllowedToDrag)return this._layer.setLatLngs(this._coordsBeforeEdit),this._initMarkers(),void this._handleLayerStyle();this.updatePolygonCoordsFromMarkerDrag(e);let o=i.length>1?(0,es.default)(this._markers,s):this._markers,a=(n+1)%o.length,r=(n+(o.length-1))%o.length,h=e.getLatLng(),l=o[r].getLatLng(),c=o[a].getLatLng();if(e._middleMarkerNext){let t=L.PM.Utils.calcMiddleLatLng(this._map,h,c);e._middleMarkerNext.setLatLng(t)}if(e._middleMarkerPrev){let t=L.PM.Utils.calcMiddleLatLng(this._map,h,l);e._middleMarkerPrev.setLatLng(t)}this.options.allowSelfIntersection||this._handleLayerStyle(),this._fireMarkerDrag(t,i),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(t){let e=t.target;if(!this._vertexValidationDragEnd(e))return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e),n=!this.options.allowSelfIntersection&&this.hasSelfIntersection();n&&this.options.allowSelfIntersectionEdit&&this._markerAllowedToDrag&&(n=!1);let s=!this.options.allowSelfIntersection&&n;if(this._fireMarkerDragEnd(t,i,s),s)return this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers(),this.options.snappable&&this._initSnappableMarkers(),this._handleLayerStyle(),void this._fireLayerReset(t,i);!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._handleLayerStyle(),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_onVertexClick(t){let e=t.target;if(e._dragging)return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireVertexClick(t,i)}}),ts.Polygon=ts.Line.extend({_shape:"Polygon",_checkMarkerAllowedToDrag(t){let{prevMarker:e,nextMarker:i}=this._getNeighborMarkers(t),n=L.polyline([e.getLatLng(),t.getLatLng()]),s=L.polyline([t.getLatLng(),i.getLatLng()]),o=pi(this._layer.toGeoJSON(15),n.toGeoJSON(15)).features.length,a=pi(this._layer.toGeoJSON(15),s.toGeoJSON(15)).features.length;return!(o<=2&&a<=2)}}),ts.Rectangle=ts.Polygon.extend({_shape:"Rectangle",_initMarkers(){let t=this._map,e=this._findCorners();this._markerGroup&&this._markerGroup.clearLayers(),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0,t.addLayer(this._markerGroup),this._markers=[],this._markers[0]=e.map(this._createMarker,this),[this._cornerMarkers]=this._markers,this._layer.getLatLngs()[0].forEach((t,e)=>{let i=this._cornerMarkers.find(t=>t._index===e);i&&i.setLatLng(t)})},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this._addMarkerEvents()},_createMarker(t,e){let i=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(i,"vertexPane"),i._origLatLng=t,i._index=e,i._pmTempLayer=!0,i.on("click",this._onVertexClick,this),this._markerGroup.addLayer(i),i},_addMarkerEvents(){this._markers[0].forEach(t=>{t.on("dragstart",this._onMarkerDragStart,this),t.on("drag",this._onMarkerDrag,this),t.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||t.on("contextmenu",this._removeMarker,this)})},_removeMarker:()=>null,_onMarkerDragStart(t){if(!this._vertexValidation("move",t))return;let e=t.target,i=this._cornerMarkers;e._oppositeCornerLatLng=i.find(t=>t._index===(e._index+2)%4).getLatLng(),e._snapped=!1;let{indexPath:n}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragStart(t,n)},_onMarkerDrag(t){let e=t.target;if(!this._vertexValidationDrag(e)||void 0===e._index)return;this._adjustRectangleForMarkerMove(e);let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDrag(t,i),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(t){let e=t.target;if(!this._vertexValidationDragEnd(e))return;this._cornerMarkers.forEach(t=>{delete t._oppositeCornerLatLng});let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragEnd(t,i),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_adjustRectangleForMarkerMove(t){L.extend(t._origLatLng,t._latlng);let e=L.PM.Utils._getRotatedRectangle(t.getLatLng(),t._oppositeCornerLatLng,this.getAngle(),this._map);this._layer.setLatLngs(e),this._adjustAllMarkers(t),this._layer.redraw()},_adjustAllMarkers(t){let e=this._layer.getLatLngs()[0];if(e&&4!==e.length&&e.length>0)e.forEach((t,e)=>{this._cornerMarkers[e].setLatLng(t)}),this._cornerMarkers.slice(e.length).forEach(t=>{t.setLatLng(e[0])});else if(e&&e.length){let i=e.findIndex(e=>t.getLatLng().equals(e));i>-1?(this._cornerMarkers[(t._index+1)%4].setLatLng(e[(i+1)%4]),this._cornerMarkers[(t._index+2)%4].setLatLng(e[(i+2)%4]),this._cornerMarkers[(t._index+3)%4].setLatLng(e[(i+3)%4])):this._cornerMarkers.forEach(t=>{t.setLatLng(e[t._index])})}else;},_findCorners(){void 0===this._angle&&this.setInitAngle(Ie(this._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);let t=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(t[0],t[2],this.getAngle(),this._map||this)}}),ts.CircleMarker=ts.extend({_shape:"CircleMarker",initialize(t){this._layer=t,this._enabled=!1,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._updateHiddenPolyCircle()},enable(t={draggable:!0,snappable:!0}){L.Util.setOptions(this,t),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),this.options.allowEditing&&this._layer._map?(this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._extendingEnable(),this._updateHiddenPolyCircle(),this._fireEnable()):this.disable()},_extendingEnable(){this._layer.on("pm:dragstart",this._onDragStart,this),this._layer.on("pm:drag",this._onMarkerDrag,this),this._layer.on("pm:dragend",this._onMarkerDragEnd,this)},disable(){this.dragging()||(this._map||(this._map=this._layer._map),this._map&&this.enabled()&&(this.layerDragEnabled()&&this.disableLayerDrag(),this._helperLayers&&(this._helperLayers.clearLayers(),this._helperLayers.removeFrom(this._map)),this.options[this._editableOption]?(this._map.off("move",this._syncMarkers,this),this._outerMarker.off("drag",this._handleOuterMarkerSnapping,this)):this._map.off("move",this._updateHiddenPolyCircle,this),this._extendingDisable(),this._layer.off("remove",this.disable,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1))},_extendingDisable(){this._layer.off("contextmenu",this._removeMarker,this)},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options[this._editableOption]?(this._initMarkers(),this._map.on("move",this._syncMarkers,this),this.options.snappable?(this._initSnappableMarkers(),this._outerMarker.on("drag",this._handleOuterMarkerSnapping,this),this._outerMarker.on("move",this._syncHintLine,this),this._outerMarker.on("move",this._syncCircleRadius,this)):this._disableSnapping()):(this.options.draggable&&this.enableLayerDrag(),this._map.on("move",this._updateHiddenPolyCircle,this),this.options.snappable?this._initSnappableMarkersDrag():this._disableSnappingDrag()),this._extendingApplyOptions()},_extendingApplyOptions(){this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_initMarkers(){let t=this._map;this._helperLayers&&(this._helperLayers.removeFrom(t),this._helperLayers.clearLayers()),this._helperLayers=new L.FeatureGroup,this._helperLayers._pmTempLayer=!0,this._helperLayers.addTo(t);let e=this._layer.getLatLng(),i=this._layer._radius,n=this._getLatLngOnCircle(e,i);this._centerMarker=this._createCenterMarker(e),this._outerMarker=this._createOuterMarker(n),this._markers=[this._centerMarker,this._outerMarker],this._createHintLine(this._centerMarker,this._outerMarker)},_getLatLngOnCircle(t,e){let i=this._map.project(t),n=L.point(i.x+e,i.y);return this._map.unproject(n)},_createHintLine(t,e){let i=t.getLatLng(),n=e.getLatLng();this._hintline=L.polyline([i,n],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._helperLayers.addLayer(this._hintline)},_createCenterMarker(t){let e=this._createMarker(t);return this.options.draggable?(L.DomUtil.addClass(e._icon,"leaflet-pm-draggable"),e.on("move",this._moveCircle,this)):e.dragging.disable(),e},_createOuterMarker(t){let e=this._createMarker(t);return e.on("drag",this._resizeCircle,this),e},_createMarker(t){let e=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._origLatLng=t,e._pmTempLayer=!0,e.on("dragstart",this._onMarkerDragStart,this),e.on("drag",this._onMarkerDrag,this),e.on("dragend",this._onMarkerDragEnd,this),e.on("click",this._onVertexClick,this),this._helperLayers.addLayer(e),e},_moveCircle(t){if(t.target._cancelDragEventChain)return;let e=this._centerMarker.getLatLng();this._layer.setLatLng(e);let i=this._layer._radius,n=this._getLatLngOnCircle(e,i);this._outerMarker._latlng=n,this._outerMarker.update(),this._syncHintLine(),this._updateHiddenPolyCircle(),this._fireCenterPlaced("Edit"),this._fireChange(this._layer.getLatLng(),"Edit")},_syncMarkers(){let t=this._layer.getLatLng(),e=this._layer._radius,i=this._getLatLngOnCircle(t,e);this._outerMarker.setLatLng(i),this._centerMarker.setLatLng(t),this._syncHintLine(),this._updateHiddenPolyCircle()},_resizeCircle(){this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker()),this._syncHintLine(),this._syncCircleRadius()},_syncCircleRadius(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(i),this._updateHiddenPolyCircle(),this._fireChange(this._layer.getLatLng(),"Edit")},_syncHintLine(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng();this._hintline.setLatLngs([t,e])},_removeMarker(){this.options[this._editableOption]&&this.disable(),this._layer.remove(),this._fireRemove(this._layer),this._fireRemove(this._map,this._layer)},_onDragStart(){this._map.pm.Draw.CircleMarker._layerIsDragging=!0},_onMarkerDragStart(t){this._vertexValidation("move",t)&&this._fireMarkerDragStart(t)},_onMarkerDrag(t){let e=t.target;e instanceof L.Marker&&!this._vertexValidationDrag(e)||this._fireMarkerDrag(t)},_onMarkerDragEnd(t){this._extedingMarkerDragEnd();let e=t.target;this._vertexValidationDragEnd(e)&&(this.options[this._editableOption]&&(this._fireEdit(),this._layerEdited=!0),this._fireMarkerDragEnd(t))},_extedingMarkerDragEnd(){this._map.pm.Draw.CircleMarker._layerIsDragging=!1},_initSnappableMarkersDrag(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnappingDrag(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)},_updateHiddenPolyCircle(){let t=this._layer._map||this._map;if(t){let e=L.PM.Utils.pxRadiusToMeterRadius(this._layer.getRadius(),t,this._layer.getLatLng()),i=L.circle(this._layer.getLatLng(),this._layer.options);i.setRadius(e);let n=t&&t.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(i,200,!n).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(i,200,!n),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)}},_getNewDestinationOfOuterMarker(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);return this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?e=De(this._map,t,e,this._getMinDistanceInMeter(t)):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&(e=De(this._map,t,e,this._getMaxDistanceInMeter(t))),e},_handleOuterMarkerSnapping(){if(this._outerMarker._snapped){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);(this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]||this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption])&&this._outerMarker.setLatLng(this._outerMarker._orgLatLng)}this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker())},_distanceCalculation(t,e){return this._map.project(t).distanceTo(this._map.project(e))},_getMinDistanceInMeter(t){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,t)},_getMaxDistanceInMeter(t){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,t)},_onVertexClick(t){t.target._dragging||this._fireVertexClick(t,void 0)}}),ts.Circle=ts.CircleMarker.extend({_shape:"Circle",initialize(t){this._layer=t,this._enabled=!1,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._updateHiddenPolyCircle()},enable(t){L.PM.Edit.CircleMarker.prototype.enable.call(this,t||{})},_extendingEnable(){},_extendingDisable(){this._layer.off("remove",this.disable,this);let t=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(t,"leaflet-pm-draggable")},_extendingApplyOptions(){},_syncMarkers(){},_removeMarker(){},_onDragStart(){},_extedingMarkerDragEnd(){},_updateHiddenPolyCircle(){let t=this._map&&this._map.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(this._layer,200,!t).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(this._layer,200,!t),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)},_distanceCalculation(t,e){return this._map.distance(t,e)},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_onVertexClick(t){t.target._dragging||this._fireVertexClick(t,void 0)}}),ts.ImageOverlay=ts.extend({_shape:"ImageOverlay",initialize(t){this._layer=t,this._enabled=!1},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},enabled(){return this._enabled},enable(t={draggable:!0,snappable:!0}){if(L.Util.setOptions(this,t),this._map=this._layer._map,this._map){if(!this.options.allowEditing)return void this.disable();this.enabled()||this.disable(),this.enableLayerDrag(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._otherSnapLayers=this._findCorners(),this._fireEnable()}},disable(){this._dragging||(this._map||(this._map=this._layer._map),this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this.enabled()||(this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()),this._enabled=!1)},_findCorners(){let t=this._layer.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]}}),ts.Text=ts.extend({_shape:"Text",initialize(t){this._layer=t,this._enabled=!1},enable(t){if(L.Util.setOptions(this,t),this.textArea){if(!this.options.allowEditing||!this._layer._map)return void this.disable();this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._safeToCacheDragState=!0,this._focusChange(),this.textArea.readOnly=!1,this.textArea.classList.remove("pm-disabled"),this._layer.on("remove",this.disable,this),L.DomEvent.on(this.textArea,"input",this._autoResize,this),L.DomEvent.on(this.textArea,"focus",this._focusChange,this),L.DomEvent.on(this.textArea,"blur",this._focusChange,this),this._layer.on("dblclick",L.DomEvent.stop),L.DomEvent.off(this.textArea,"mousedown",this._preventTextSelection),this._enabled=!0,this._fireEnable()}},disable(){if(!this.enabled())return;this._layer.off("remove",this.disable,this),L.DomEvent.off(this.textArea,"input",this._autoResize,this),L.DomEvent.off(this.textArea,"focus",this._focusChange,this),L.DomEvent.off(this.textArea,"blur",this._focusChange,this),L.DomEvent.off(document,"click",this._documentClick,this),this._focusChange(),this.textArea.readOnly=!0,this.textArea.classList.add("pm-disabled");let t=document.activeElement;this.textArea.focus(),this.textArea.selectionStart=0,this.textArea.selectionEnd=0,L.DomEvent.on(this.textArea,"mousedown",this._preventTextSelection),t.focus(),this._disableOnBlurActive=!1,this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initSnappableMarkers(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)},_autoResize(){this.textArea.style.height="1px",this.textArea.style.width="1px";let t=this.textArea.scrollHeight>21?this.textArea.scrollHeight:21,e=this.textArea.scrollWidth>16?this.textArea.scrollWidth:16;this.textArea.style.height=`${t}px`,this.textArea.style.width=`${e}px`,this._layer.options.text=this.getText(),this._fireTextChange(this.getText())},_disableOnBlur(){this._disableOnBlurActive=!0,setTimeout(()=>{this.enabled()&&L.DomEvent.on(document,"click",this._documentClick,this)},100)},_documentClick(t){t.target!==this.textArea&&(this.disable(),!this.getText()&&this.options.removeIfEmpty&&this.remove())},_focusChange(t={}){let e=this._hasFocus;this._hasFocus="focus"===t.type,!e!=!this._hasFocus&&(this._hasFocus?(this._applyFocus(),this._focusText=this.getText(),this._fireTextFocus()):(this._removeFocus(),this._fireTextBlur(),this._focusText!==this.getText()&&(this._fireEdit(),this._layerEdited=!0)))},_applyFocus(){this.textArea.classList.add("pm-hasfocus"),this._map.dragging&&(this._safeToCacheDragState&&(this._originalMapDragState=this._map.dragging._enabled,this._safeToCacheDragState=!1),this._map.dragging.disable())},_removeFocus(){this._map.dragging&&(this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0),this.textArea.classList.remove("pm-hasfocus")},focus(){if(!this.enabled())throw new TypeError("Layer is not enabled");this.textArea.focus()},blur(){if(!this.enabled())throw new TypeError("Layer is not enabled");this.textArea.blur(),this._disableOnBlurActive&&this.disable()},hasFocus(){return this._hasFocus},getElement(){return this.textArea},setText(t){t&&(this.textArea.value=t),this._autoResize()},getText(){return this.textArea.value},_initTextMarker(){if(this.textArea=L.PM.Draw.Text.prototype._createTextArea.call(this),this.options.className){let t=this.options.className.split(" ");this.textArea.classList.add(...t)}let t=L.PM.Draw.Text.prototype._createTextIcon.call(this,this.textArea);this._layer.setIcon(t),this._layer.once("add",this._createTextMarker,this)},_createTextMarker(t=!1){this._layer.off("add",this._createTextMarker,this),this._layer.getElement().tabIndex=-1,this.textArea.wrap="off",this.textArea.style.overflow="hidden",this.textArea.style.height=L.DomUtil.getStyle(this.textArea,"font-size"),this.textArea.style.width="1px",this._layer.options.text&&this.setText(this._layer.options.text),this._autoResize(),!0===t&&(this.enable(),this.focus(),this._disableOnBlur())},_preventTextSelection(t){t.preventDefault()}});var ns=function(t,e,i,n,s,o){this._matrix=[t,e,i,n,s,o]};ns.init=()=>new L.PM.Matrix(1,0,0,1,0,0),ns.prototype={transform(t){return this._transform(t.clone())},_transform(t){let e=this._matrix,{x:i,y:n}=t;return t.x=e[0]*i+e[1]*n+e[4],t.y=e[2]*i+e[3]*n+e[5],t},untransform(t){let e=this._matrix;return new L.Point((t.x/e[0]-e[4])/e[0],(t.y/e[2]-e[5])/e[2])},clone(){let t=this._matrix;return new L.PM.Matrix(t[0],t[1],t[2],t[3],t[4],t[5])},translate(t){if(void 0===t)return new L.Point(this._matrix[4],this._matrix[5]);let e,i;return"number"==typeof t?(e=t,i=t):(e=t.x,i=t.y),this._add(1,0,0,1,e,i)},scale(t,e){if(void 0===t)return new L.Point(this._matrix[0],this._matrix[3]);let i,n;return e=e||L.point(0,0),"number"==typeof t?(i=t,n=t):(i=t.x,n=t.y),this._add(i,0,0,n,e.x,e.y)._add(1,0,0,1,-e.x,-e.y)},rotate(t,e){let i=Math.cos(t),n=Math.sin(t);return e=e||new L.Point(0,0),this._add(i,n,-n,i,e.x,e.y)._add(1,0,0,1,-e.x,-e.y)},flip(){return this._matrix[1]*=-1,this._matrix[2]*=-1,this},_add(t,e,i,n,s,o){let a,r=[[],[],[]],h=this._matrix,l=[[h[0],h[2],h[4]],[h[1],h[3],h[5]],[0,0,1]],c=[[t,i,s],[e,n,o],[0,0,1]];t&&t instanceof L.PM.Matrix&&(h=t._matrix,c=[[h[0],h[2],h[4]],[h[1],h[3],h[5]],[0,0,1]]);for(let u=0;u<3;u+=1)for(let t=0;t<3;t+=1){a=0;for(let e=0;e<3;e+=1)a+=l[u][e]*c[e][t];r[u][t]=a}return this._matrix=[r[0][0],r[1][0],r[0][1],r[1][1],r[0][2],r[1][2]],this}};var ss=ns,os={calcMiddleLatLng(t,e,i){let n=t.project(e),s=t.project(i);return t.unproject(n._add(s)._divideBy(2))},findLayers(t){let e=[];return t.eachLayer(t=>{(t instanceof L.Polyline||t instanceof L.Marker||t instanceof L.Circle||t instanceof L.CircleMarker||t instanceof L.ImageOverlay)&&e.push(t)}),e=e.filter(t=>!!t.pm),e=e.filter(t=>!t._pmTempLayer),e=e.filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore),e},circleToPolygon(t,e=60,i=!0){let n=Be(t.getLatLng(),t.getRadius(),e,0,i),s=[];for(let o=0;o<n.length;o+=1){let t=[n[o].lat,n[o].lng];s.push(t)}return L.polygon(s,t.options)},disablePopup(t){t.getPopup()&&(t._tempPopupCopy=t.getPopup(),t.unbindPopup())},enablePopup(t){t._tempPopupCopy&&(t.bindPopup(t._tempPopupCopy),delete t._tempPopupCopy)},_fireEvent(t,e,i,n=!1){t.fire(e,i,n);let{groups:s}=this.getAllParentGroups(t);s.forEach(t=>{t.fire(e,i,n)})},getAllParentGroups(t){let e=[],i=[],n=t=>{for(let s in t._eventParents)if(-1===e.indexOf(s)){e.push(s);let o=t._eventParents[s];i.push(o),n(o)}};return!t._pmLastGroupFetch||!t._pmLastGroupFetch.time||(new Date).getTime()-t._pmLastGroupFetch.time>1e3?(n(t),t._pmLastGroupFetch={time:(new Date).getTime(),groups:i,groupIds:e},{groupIds:e,groups:i}):{groups:t._pmLastGroupFetch.groups,groupIds:t._pmLastGroupFetch.groupIds}},createGeodesicPolygon:Be,getTranslation:Ce,findDeepCoordIndex(t,e,i=!0){let n,s=t=>(o,a)=>{let r=t.concat(a);if(i){if(o.lat&&o.lat===e.lat&&o.lng===e.lng)return n=r,!0}else if(o.lat&&L.latLng(o).equals(e))return n=r,!0;return Array.isArray(o)&&o.some(s(r))};t.some(s([]));let o={};return n&&(o={indexPath:n,index:n[n.length-1],parentPath:n.slice(0,n.length-1)}),o},findDeepMarkerIndex(t,e){let i,n=t=>(s,o)=>{let a=t.concat(o);return s._leaflet_id===e._leaflet_id?(i=a,!0):Array.isArray(s)&&s.some(n(a))};t.some(n([]));let s={};return i&&(s={indexPath:i,index:i[i.length-1],parentPath:i.slice(0,i.length-1)}),s},_getIndexFromSegment(t,e){if(e&&2===e.length){let i=this.findDeepCoordIndex(t,e[0]),n=this.findDeepCoordIndex(t,e[1]),s=Math.max(i.index,n.index);return(0===i.index||0===n.index)&&1!==s&&(s+=1),{indexA:i,indexB:n,newIndex:s,indexPath:i.indexPath,parentPath:i.parentPath}}return null},_getRotatedRectangle(t,e,i,n){let s=$n(n,t),o=$n(n,e),a=i*Math.PI/180,r=Math.cos(a),h=Math.sin(a),l=(o.x-s.x)*r+(o.y-s.y)*h,c=(o.y-s.y)*r-(o.x-s.x)*h,u=l*r+s.x,p=l*h+s.y,d=-c*h+s.x,_=c*r+s.y;return[Jn(n,s),Jn(n,{x:u,y:p}),Jn(n,o),Jn(n,{x:d,y:_})]},pxRadiusToMeterRadius(t,e,i){let n=e.project(i),s=L.point(n.x+t,n.y);return e.distance(e.unproject(s),i)}};L.PM=L.PM||{version:"2.18.3",Map:Ne,Toolbar:Fe,Draw:He,Edit:ts,Utils:os,Matrix:ss,activeLang:"en",optIn:!1,initialize(t){this.addInitHooks(t)},setOptIn(t){this.optIn=!!t},addInitHooks(){L.Map.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Map(this)):this.options.pmIgnore||(this.pm=new L.PM.Map(this)),this.pm&&this.pm.setGlobalOptions({})}),L.LayerGroup.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.LayerGroup(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.LayerGroup(this))}),L.Marker.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this)):this.options.pmIgnore||(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this))}),L.CircleMarker.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.CircleMarker(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.CircleMarker(this))}),L.Polyline.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Line(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Line(this))}),L.Polygon.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Polygon(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Polygon(this))}),L.Rectangle.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Rectangle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Rectangle(this))}),L.Circle.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Circle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Circle(this))}),L.ImageOverlay.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.ImageOverlay(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.ImageOverlay(this))})},reInitLayer(t){t instanceof L.LayerGroup&&t.eachLayer(t=>{this.reInitLayer(t)}),t.pm||L.PM.optIn&&!1!==t.options.pmIgnore||t.options.pmIgnore||(t instanceof L.Map?t.pm=new L.PM.Map(t):t instanceof L.Marker?t.options.textMarker?(t.pm=new L.PM.Edit.Text(t),t.pm._initTextMarker(),t.pm._createTextMarker(!1)):t.pm=new L.PM.Edit.Marker(t):t instanceof L.Circle?t.pm=new L.PM.Edit.Circle(t):t instanceof L.CircleMarker?t.pm=new L.PM.Edit.CircleMarker(t):t instanceof L.Rectangle?t.pm=new L.PM.Edit.Rectangle(t):t instanceof L.Polygon?t.pm=new L.PM.Edit.Polygon(t):t instanceof L.Polyline?t.pm=new L.PM.Edit.Line(t):t instanceof L.LayerGroup?t.pm=new L.PM.Edit.LayerGroup(t):t instanceof L.ImageOverlay&&(t.pm=new L.PM.Edit.ImageOverlay(t)))}},"1.7.1"===L.version&&L.Canvas.include({_onClick(t){let e,i,n=this._map.mouseEventToLayerPoint(t);for(let s=this._drawFirst;s;s=s.next)e=s.layer,e.options.interactive&&e._containsPoint(n)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(i=e);i&&(L.DomEvent.fakeStop(t),this._fireEvent([i],t))}}),L.PM.initialize()})();const p={en_US:{showEagle:"Show Eagle Map",hideEagle:"Hide Eagle Map"},zh_CN:{showEagle:"显示鹰眼图",hideEagle:"隐藏鹰眼图"}},d={en_US:{coordinate:"Coordinate",zoomLevel:"Zoom Level",FPS:"FPS"},zh_CN:{coordinate:"坐标",zoomLevel:"层级",FPS:"每秒帧数"}},_={en_US:{home:"Go Home",capture:"Screen Capture",center:"View Full",north:"Move North",south:"Move South",east:"Move East",west:"Move West",zoomIn:"Zoom In",zoomOut:"Zoom Out",zoom:"Zoom to this level",dragZoom:"Drag to zoom",more:"More",draw:"Plot",layer:"Layer Manager",lng:"Longitude",lat:"Latitude"},zh_CN:{home:"回到初始位置",capture:"截屏",center:"查看全图",north:"向上平移",south:"向下平移",east:"向右平移",west:"向左平移",zoomIn:"放大一级",zoomOut:"缩小一级",zoom:"缩放到此级别",dragZoom:"拖动缩放",more:"更多",draw:"标绘",layer:"图层管理",lng:"经度",lat:"纬度"}},m=u.Control.extend({options:{position:"bottomleft",coordinateUnit:"decimal",showCoordinate:!0,showLevel:!0,showFPS:!0,precision:6},initialize(t){u.setOptions(this,t),this.lastTime=+new Date,this.frames=0,u.Control.prototype.initialize.call(this,this.options)},onAdd(t){this.map=t,this.lang=t.lang,this.langDic=d,this._container=u.DomUtil.create("div",`${t.clsPrefix}-statusbar`),this.zoom=t.getZoom();const e=t.getCenter();return this.lng=e.lng,this.lat=e.lat,this.options.showCoordinate&&(this._latlngContainer=u.DomUtil.create("div",`${t.clsPrefix}-statusbar-item coordinate`,this._container),this._latlngContainer.innerHTML=`<b>${this.langDic[this.lang].coordinate}:</b>${this.getCoordinate(this.lng)},${this.getCoordinate(this.lat)}`),this.options.showLevel&&(this._levelContainer=u.DomUtil.create("div",`${t.clsPrefix}-statusbar-item level`,this._container),this._levelContainer.innerHTML=`<b>${this.langDic[this.lang].zoomLevel}:</b>${this.zoom+1}`),this.options.showFPS&&(this._fpsContainer=u.DomUtil.create("div",`${t.clsPrefix}-statusbar-item fps`,this._container),this._fpsContainer.innerHTML=`<b>${this.langDic[this.lang].FPS}:</b>60`),this.initEvt(),this._container},initEvt(){this.map.on("mousemove",t=>{this.lat=t.latlng.lat,this.lng=t.latlng.lng,this._latlngContainer&&(this._latlngContainer.innerHTML=`<b>${this.langDic[this.lang].coordinate}:</b>${this.getCoordinate(this.lng,"lng")},${this.getCoordinate(this.lat,"lat")}`)}),this.map.on("zoomend",()=>{this.zoom=this.map.getZoom(),this._levelContainer&&(this._levelContainer.innerHTML=`<b>${this.langDic[this.lang].zoomLevel}:</b>${this.zoom+1}`)}),this.options.showFPS&&this.calcFPS()},getCoordinate(t,e="lng"){switch(this.options.coordinateUnit){case"decimal":return t.toFixed(this.options.precision);case"radian":return(t*Math.PI/180).toFixed(this.options.precision);case"degrees":return this._formatDeg(t,e)}},_formatDeg(t,e){const i=parseFloat(t),n=parseInt(i);let s="";"lng"===e?s=n>0?"E":"W":"lat"===e&&(s=n>0?"N":"S");let o=parseInt(60*(i-n));return n+"°"+o+"′"+(3600*(i-n)-60*o).toFixed(2)+"″"+s},calcFPS(){if(this.frames++,this.frames>=30){const t=Date.now()-this.lastTime,e=Math.round(1e3/(t/this.frames));this._fpsContainer&&(this.frames=0,this.lastTime=Date.now(),this._fpsContainer.innerHTML=`<b>${this.langDic[this.lang].FPS}:</b><span>${e}</span>`)}requestAnimationFrame(this.calcFPS.bind(this))}}),g=u.Control.extend({includes:u.Evented?u.Evented.prototype:u.Mixin.Events,options:{position:"bottomright",toggleDisplay:!0,zoomLevelOffset:5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:100,height:100,collapsedWidth:22,collapsedHeight:22,aimingRectOptions:{color:"#ff7800",weight:1,interactive:!1},shadowRectOptions:{color:"#000000",weight:1,interactive:!1,opacity:0,fillOpacity:0},strings:{},mapOptions:{rotate:!0,rotateControl:!1}},initialize(t,e){u.Util.setOptions(this,e),this.options.aimingRectOptions.interactive=!1,this.options.shadowRectOptions.interactive=!1,this._layer=t},onAdd(t){this._mainMap=t,this.lang=t.options.lang??this.options.lang??"zh_CN",this.langDic=p,this.options.strings={hideText:this.langDic[this.lang].hideEagle,showText:this.langDic[this.lang].showEagle},this._container=u.DomUtil.create("div",`${t.clsPrefix}-eaglemap`),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",u.DomEvent.disableClickPropagation(this._container),u.DomEvent.on(this._container,"mousewheel",u.DomEvent.stopPropagation);let e={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:t.options.crs,rotateControl:t.options.rotateControl,rotate:t.options.rotate,bearing:t.options.bearing,lang:this.lang};return e=u.Util.extend(this.options.mapOptions,e),this._eagleMap=new u.Map(this._container,e),this._layer instanceof u.Layer&&this._eagleMap.addLayer(this._layer),this._mainMapMoving=!1,this._eagleMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._eagleMap.whenReady(u.Util.bind(function(){this._aimingRect=new u.Rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._eagleMap),this._shadowRect=new u.Rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._eagleMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._eagleMap.on("movestart",this._onEagleMapMoveStarted,this),this._eagleMap.on("move",this._onEagleMapMoving,this),this._eagleMap.on("moveend",this._onEagleMapMoved,this)},this)),this._container},addTo(t){u.Control.prototype.addTo.call(this,t);const e=this.options.centerFixed||this._mainMap.getCenter();return this._eagleMap.setView(e,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._eagleMap.off("moveend",this._onEagleMapMoved,this),this._eagleMap.removeLayer(this._layer)},changeLayer(t){this._eagleMap.removeLayer(this._layer),this._layer=t,this._eagleMap.addLayer(this._layer)},_addToggleButton(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),`${this._mainMap.clsPrefix}-eaglemap-toggle-display ${this._mainMap.clsPrefix}-eaglemap-toggle-display-`+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText(){return this.options.minimized?this.langDic[this.lang].showEagle:this.langDic[this.lang].hideEagle},_createButton(t,e,i,n,s,o){const a=u.DomUtil.create("a",i,n);a.innerHTML=t,a.href="#",a.title=e;const r=u.DomEvent.stopPropagation;return u.DomEvent.on(a,"click",r).on(a,"mousedown",r).on(a,"dblclick",r).on(a,"click",u.DomEvent.preventDefault).on(a,"click",s,o),a},_toggleDisplayButtonClicked(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay(t){t!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle()},_restore(){this.options.toggleDisplay?(this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace("minimized-"+this.options.position,""),this._toggleDisplayButton.title=this.options.strings.hideText):this._container.style.display="block",this._minimized=!1,this._onToggle()},_onMainMapMoved(t){if(this._eagleMapMoving)this._eagleMapMoving=!1;else{const t=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=!0,this._eagleMap.setView(t,this._decideZoom(!0)),this._setDisplay(this._decideMinimized())}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving(t){this._aimingRect.setBounds(this._mainMap.getBounds())},_onEagleMapMoveStarted(t){if(!this.options.centerFixed){const t=this._aimingRect.getBounds(),e=this._eagleMap.latLngToContainerPoint(t.getSouthWest()),i=this._eagleMap.latLngToContainerPoint(t.getNorthEast());this._lastAimingRectPosition={sw:e,ne:i}}},_onEagleMapMoving(t){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new u.LatLngBounds(this._eagleMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._eagleMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onEagleMapMoved(t){this._mainMapMoving?this._mainMapMoving=!1:(this._eagleMapMoving=!0,this._mainMap.setView(this._eagleMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_isZoomLevelFixed(){const t=this.options.zoomLevelFixed;return this._isDefined(t)&&this._isInteger(t)},_decideZoom(t){if(this._isZoomLevelFixed())return t?this.options.zoomLevelFixed:this._mainMap.getZoom();if(t)return this._mainMap.getZoom()-this.options.zoomLevelOffset;{const t=this._eagleMap.getZoom()-this._mainMap.getZoom(),e=this._eagleMap.getZoom()+this.options.zoomLevelOffset;let i;return t<this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._eagleMap.getMinZoom()+this.options.zoomLevelOffset?this._eagleMap.getZoom()>this._lastEagleMapZoom?(i=this._mainMap.getZoom()+1,this._eagleMap.setZoom(this._eagleMap.getZoom()-1)):i=this._mainMap.getZoom():i=e,this._lastEagleMapZoom=this._eagleMap.getZoom(),i}},_decideMinimized(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._eagleMap.getBounds()):this._minimized},_isInteger:t=>"number"==typeof t,_isDefined:t=>void 0!==t,_onToggle(){u.Util.requestAnimFrame(function(){u.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),u.Browser.any3d||u.Util.requestAnimFrame(this._fireToggleEvents,this)},this)},_fireToggleEvents(){u.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);const t={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",t),this.fire("toggle",t)}}),f=L.FeatureGroup.extend({initialize(t,e){this.markers=[],L.Util.setOptions(this,e);const i="string"==typeof this.options.cssClass?this.options.cssClass:"vertex-marker",n=void 0!==this.options.iconSize?this.options.iconSize:[24,24],s=void 0!==this.options.iconAnchor?this.options.iconAnchor:[12,12],o=this.options.textFn,a="boolean"!=typeof this.options.firstVertex||this.options.firstVertex,r="boolean"!=typeof this.options.lastVertex||this.options.lastVertex;this.dragable=this.options.dragable||!1;let h=t;"function"==typeof t.getLatLngs&&(h=t.getLatLngs());for(let p=a?0:1,d=h.length-(r?0:1);p<d;p++){const t=h[p];var l="function"==typeof o?o.call(this,p,h):o||"",c=L.divIcon({className:i,html:l,iconSize:n,iconAnchor:s}),u=L.marker(t,{icon:c,pmIgnore:!0,index:p});this.markers.push(u)}L.FeatureGroup.prototype.initialize.call(this,this.markers)},onAdd(t){this.markers.forEach(t=>{L.FeatureGroup.prototype.addLayer.call(this,t)}),L.FeatureGroup.prototype.onAdd.call(this,t)},onRemove(t){this.markers.forEach(t=>{L.FeatureGroup.prototype.removeLayer.call(this,t)}),L.FeatureGroup.prototype.onRemove.call(this,t)}});class y extends L[L.Layer?"Layer":"Class"]{constructor(t,e,i,n,s){super(),L.setOptions(this,s),this._latlng=t,this._measurement=e,this._title=i,this._rotation=n,this.MEASUREDDATA=null,this.tempAcCurrDrawPoints=null}addTo(t){return t.addLayer(this),this}onAdd(t){this._map=t;const e=this.getPane?this.getPane():t.getPanes().markerPane,i=this._element=L.DomUtil.create("div","leaflet-zoom-animated leaflet-measure-path-measurement",e),n=L.DomUtil.create("div","",i);n.title=this._title,n.innerHTML=this._measurement,t.on("zoomanim",this._animateZoom,this),this._setPosition()}onRemove(t){t.off("zoomanim",this._animateZoom,this);(this.getPane?this.getPane():t.getPanes().markerPane).removeChild(this._element),this._map=null}_setPosition(){L.DomUtil.setPosition(this._element,this._map.latLngToLayerPoint(this._latlng)),this._element.style.transform+=" rotate("+this._rotation+"rad)"}_animateZoom(t){const e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();L.DomUtil.setPosition(this._element,e),this._element.style.transform+=" rotate("+this._rotation+"rad)"}}u.Map.addInitHook(function(){var t,e,i;this.pm&&this.pm.setLang(this.options.lang.split("_")[0]),(null==(t=this.options.eagleMapControl)?void 0:t.show)&&(this.eagleMapControl=new g(this.options.eagleMapControl),this.addControl(this.eagleMapControl)),(null==(e=this.options.statusBarControl)?void 0:e.show)&&(this.statusBarControl=new m(this.options.statusBarControl),this.addControl(this.statusBarControl)),(null==(i=this.options.scaleControl)?void 0:i.show)&&(this.scaleControl=new u.Control.Scale(Object.assign({position:"bottomleft",maxWidth:100,metric:!0,imperial:!1},this.options.scaleControl)),this.addControl(this.scaleControl))}),u.Marker.addInitHook(function(){let t=this.options.icon&&this.options.icon.options&&this.options.icon.options.iconAnchor;t&&(t=t[0]+"px "+t[1]+"px"),this.options.rotationOrigin=this.options.rotationOrigin||t||"center bottom",this.on("drag",t=>{t.target._applyRotation()})}),u.Marker.mergeOptions({scale:1,rotation:0,minZoom:0,maxZoom:16,hideOnMinZoom:!0,minificationScale:.6}),u.Marker.include({_setPos(t){this._icon.style.display="initial";const{rotation:i,minZoom:n,maxZoom:s,hideOnMinZoom:o,minificationScale:a}=this.options;if(n&&s&&s-n>0){const t=parseFloat(((1-a)/(s-n)).toFixed(2));this._map._zoom>=s?this.options.scale=1:this._map._zoom>n&this._map._zoom<s?this.options.scale=1-(s-this._map._zoom)*t:this._map._zoom<=n&&o&&(this._icon.style.display="none")}this._map._rotate&&(t=this._map.rotatedPointToMapPanePoint(t)),this._icon&&u.DomUtil.setPosition(this._icon,t,i,t,e.MathUtil.clamp(this.options.scale,a,1)),this._shadow&&u.DomUtil.setPosition(this._shadow,t,i,t,e.MathUtil.clamp(this.options.scale,a,1)),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_applyRotation(){this.options.rotation&&(this._icon.style[u.DomUtil.TRANSFORM+"Origin"]=this.options.rotationOrigin,"msTransform"===u.DomUtil.TRANSFORM?this._icon.style[u.DomUtil.TRANSFORM]="rotate("+this.options.rotation+"deg)":this._icon.style[u.DomUtil.TRANSFORM]+=" rotateZ("+this.options.rotation+"deg)")},startTwinkle(t,e){this.twinkle(t,e)},endTwinkle(){this.twinkleTimer&&(this.setOpacity(1),clearTimeout(this.twinkleTimer),this.twinkleTimer=void 0)},twinkle(t=200,e=1/0){let i=!1,n=0;const s=()=>{n++,e&&t&&n>Math.floor(e/t)?this.endTwinkle():(i?(this.setOpacity(.01),i=!1):(this.setOpacity(1),i=!0),this.twinkleTimer=setTimeout(s,t))};s()}}),u.Map.include({hasLayer:function(t){return t&&u.Util.stamp(t)in this._layers},removeLayerById:function(t){const e=this.getLayer(t);e&&this.removeLayer(e)}}),u.Path.addInitHook(function(){this.options.color&&(this.color=e.Color.from(this.options.color)),this.options.fillColor&&(this.fillColor=e.Color.from(this.options.fillColor))}),u.Polyline.addInitHook(function(){this.options.showMeasurements&&this.showMeasurements()}),u.Circle.include({toGeoJSON(){return{type:"Feature",properties:{},geometry:{type:"Circle",radius:this.getRadius(),coordinates:[this._latlng.lng,this._latlng.lat]}}}}),u.Layer.addInitHook(function(){this._leaflet_id=this.options.id||u.stamp({})}),u.LayerGroup.include({getLayerId:t=>t._leaflet_id,hasLayer(t){if(!t)return!1;return(["number","string"].includes(typeof t)?t:this.getLayerId(t))in this._layers}}),u.GridLayer.include({_setZoomTransform:function(t,i,n){null!=(s=i)&&this.options&&("gcj02"==this.options.corrdType?s=e.CoordsUtil.gcjEncrypt(i.lat,i.lng):"bd09"==this.options.corrdType&&(i=e.CoordsUtil.gcjEncrypt(i.lat,i.lng),s=e.CoordsUtil.bdEncrypt(i.lat,i.lng))),i=this._map.getZoomScale(n,t.zoom);var s=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(s,n)).round();u.Browser.any3d?u.DomUtil.setTransform(t.el,s,i):u.DomUtil.setPosition(t.el,s)},_getTiledPixelBounds:function(t){var i=(t=(null!=(n=t)&&this.options&&("gcj02"==this.options.corrdType?n=e.CoordsUtil.gcjEncrypt(t.lat,t.lng):"bd09"==this.options.corrdType&&(t=e.CoordsUtil.gcjEncrypt(t.lat,t.lng),n=e.CoordsUtil.bdEncrypt(t.lat,t.lng))),this._map))._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),n=(i=t.getZoomScale(i,this._tileZoom),t.project(n,this._tileZoom).floor());t=t.getSize().divideBy(2*i);return new u.Bounds(n.subtract(t),n.add(t))}}),u.TileLayer.addInitHook(function(){this.on("add",function(t){this._container.style.filter=Object.keys(this.options.style||{}).map(t=>`${t}(${this.options.style[t]})`).join(" ")})}),u.Polyline.include({_originalOnAdd:u.Polyline.prototype.onAdd,_originalOnRemove:u.Polyline.prototype.onRemove,_originalSetLatLngs:u.Polyline.prototype.setLatLngs,_originalAddLatLng:u.Polyline.prototype.addLatLng,setLatLngs:function(t){var e=this._map&&this._vertexMarkers&&this._latlngs.length!==t.length;this._originalSetLatLngs(t),e&&(this.removeVertexMarkers(),this.destroyVertexMarkers(),this.createVertexMarkers()),this.options.showMeasurements&&this.updateMeasurements()},removeVertexMarkers:function(){this._map&&this._vertexMarkers&&(this._map.removeLayer(this._vertexMarkers),this._vertexMarkers=void 0)},onAdd:function(t){this._originalOnAdd(t),this.createVertexMarkers(),this.options.showMeasurements&&this.showMeasurements(this.options.measurementOptions)},createVertexMarkers:function(){if(this._map){var t=this.options.vertexMarkers||{};void 0===this._vertexMarkers&&this.options.vertexMarkers&&(this._vertexMarkers=new f(this,t).addTo(this._map))}},destroyVertexMarkers:function(){this._vertexMarkers&&(this._vertexMarkers=void 0)},onRemove:function(t){this.removeVertexMarkers(),this._originalOnRemove(t),this.options.showMeasurements&&this.hideMeasurements()},showMeasurements(t){return!this._map||this._measurementLayer||(this._measurementOptions=u.extend({showCloseButton:!1,minPixelDistance:30,showDistances:!0,showArea:!0,showAggregate:!0,lang:{totalLength:"Total length",totalArea:"Total area",segmentLength:"Segment length"},map:this._map},t||{}),this._measurementLayer=(new u.LayerGroup).addTo(this._map),this.updateMeasurements(),this._map.on("zoomend",this.updateMeasurements,this)),this},hideMeasurements(){return this._map.off("zoomend",this.updateMeasurements,this),this._measurementLayer?(this._map.removeLayer(this._measurementLayer),this._measurementLayer=null,this):this},tempFormatDistance(t){const e=this._map.options.crs,i=new Array;for(let d=0;d<t.length;d++){const n=e.project(t[d]);i.push(n)}const n=i.length;let s,o,a,r,h,l,c=0;for(let d=0;d<n-1;d++)s=i[d],a=s.x,r=s.y,o=i[d+1],h=o.x,l=o.y,c+=Math.sqrt((a-h)*(a-h)+(r-l)*(r-l));const u=c;let p="";return p=u>1e3?"总长:"+Number(u/1e3).toFixed(1)+"公里":"总长:"+Math.round(u)+"米",p},tempMoveFormatDistance(t,e){const i=this._map.options.crs;t=i.project(t),t=new Array(t),e=i.project(e),t.push(e);const n=t.length;let s,o,a,r,h,l,c=0;for(let d=0;d<n-1;d++)s=t[d],a=s.x,r=s.y,o=t[d+1],h=o.x,l=o.y,c+=Math.sqrt((a-h)*(a-h)+(r-l)*(r-l));const u=c;let p="";return p=u>1e3?Number(u/1e3).toFixed(1)+"公里":Math.round(u)+"米",p},tempFormatArea(t){const e=this._map.options.crs,i=new Array;for(let m=0;m<t.length;m++){const n=e.project(t[m]);i.push(n)}let n=!0;for(var s=0;s<i.length-1;s++){n=i[s].x>180;break}const o=i.length;let a,r,h=0,l=0,c=0,u=0,p=0;if(null!=i){let t;if(n)for(s=0;s<o;s++)t=(s+1)%o,a=i[s],r=i[t],h+=a.x*r.y,h-=a.y*r.x;else{let e,n=0,d=0;for(s=0;s<o;s++)a=i[s],e=a.x,0==s?(n=e,d=e):(e<n&&(n=e),e>d&&(d=e));const _=parseInt(((n+d)/2+3)/6);for(s=0;s<o;s++)t=(s+1)%o,0==s?(a=i[s],l=widget.LonLatToXA80N(_,a.x,a.y)[0],c=widget.LonLatToXA80N(_,a.x,a.y)[1]):(l=u,c=p),r=i[t],u=widget.LonLatToXA80N(_,r.x,r.y)[0],p=widget.LonLatToXA80N(_,r.x,r.y)[1],h+=l*p,h-=u*c}}const d=Math.abs(h/2);let _="";return _=d>1e6?"总面积:"+Number(d/1e6).toFixed(4)+"平方公里\n(约:"+Number(.0015*d).toFixed(3)+"亩)":"总面积:"+d.toFixed(0)+"平方米\n(约:"+Number(.0015*d).toFixed(3)+"亩)",_},updateMeasurements(){if(!this._measurementLayer)return this;const t=this.getLatLngs();(new Array).push(t);let e=this.getLatLngs();const i=this instanceof u.Polygon,n=this._measurementOptions;let s,o,a,r,h;if(e&&e.length&&u.Util.isArray(e[0])&&(e=e[0]),this._measurementLayer.clearLayers(),this._measurementOptions.showDistances&&e.length>1){t.length;for(let t=1,l=e.length;i&&t<=l||t<l;t++)if(s=e[t-1],o=e[t%l],s.distanceTo(o),a=this._map.latLngToLayerPoint(s),r=this._map.latLngToLayerPoint(o),h=a.distanceTo(r),h>=n.minPixelDistance){const t=this.tempMoveFormatDistance(s,o);new y(this._map.layerPointToLatLng([(a.x+r.x)/2,(a.y+r.y)/2]),t,n.lang.segmentLength,this._getRotation(s,o),n).addTo(this._measurementLayer)}!i&&this._measurementOptions.showAggregate&&(new y(o,this.tempFormatDistance(t),n.lang.totalLength,0,n).addTo(this._measurementLayer),this.MEASUREDDATA=this.tempFormatDistance(t))}return i&&n.showArea&&e.length>2&&(new y(this.getBounds().getCenter(),this.tempFormatArea(t[0]),n.lang.totalArea,0,n).addTo(this._measurementLayer),this.MEASUREDDATA=this.tempFormatArea(t[0])),this},_getRotation(t,e){const i=this._map.project(t),n=this._map.project(e);return Math.atan((n.y-i.y)/(n.x-i.x))}}),u.LatLng.prototype.toArray=function(){return[this.lat,this.lng]},u.Path.include({startTwinkle(t,e){this.twinkle(t,e)},endTwinkle(){this.twinkleTimer&&(clearTimeout(this.twinkleTimer),this.setStyle({fillColor:this._orginalColor,stroke:this._orginalStroke}),this.twinkleTimer=void 0,this._orginalColor=void 0,this._orginalStroke=void 0)},twinkle(t=200,e=1/0){let i=!1,n=0;this._orginalColor=this.options.fillColor,this._orginalStroke=this.options.stroke;const s=()=>{n++,e&&t&&n>Math.floor(e/t)?this.endTwinkle():(i?(this.setStyle({fillColor:"rgba(255,255,255,0.01)",stroke:!1}),i=!1):(this.setStyle({fillColor:this._orginalColor,stroke:this._orginalStroke}),i=!0),this.twinkleTimer=setTimeout(s,t))};s()},getArea(t){if(this instanceof u.Polyline){var e,i=this._latlngs[0],n=(t||this._map).options.crs,s=i.length;let o,a,r=0;if(null!=i)for(let t=0;t<s;t++)e=(t+1)%s,o=180<i[t].lng&&90<i[t].lat?{x:i[t].lat,y:i[t].lng}:n.project(i[t]),a=180<i[e].lng&&90<i[e].lat?{x:i[e].lat,y:i[e].lng}:n.project(i[e]),r=(r+=o.x*a.y)-o.y*a.x;return Math.abs(r/2)}return this instanceof u.Circle?2*Math.PI*this.getRadius():null},getLength(t){if(this instanceof u.Polyline){for(var e=[],i=(t||this._map).options.crs,n=this._latlngs,s=0;s<n.length;s++)this instanceof u.Polygon?e.push(...n[s]):this instanceof u.Polyline&&e.push(n[s]);let l,c,p=0;for(let t=0,n=e.length-1;t<n;t++){l=180<e[t][0]&&90<e[t][1]?{x:e[t].lat,y:e[t].lng}:i.project(e[t]),c=180<e[t+1][0]&&90<e[t+1][1]?{x:e[t+1].lat,y:e[t+1].lng}:i.project(e[t+1]);var o=l.x,a=l.y,r=c.x,h=c.y;p+=Math.sqrt((o-r)*(o-r)+(a-h)*(a-h))}return p}return this instanceof u.Circle?Math.PI*Math.pow(this.getRadius(),2):null}}),u.Control.mergeOptions({offset:[0,0]}),u.Control.addInitHook(function(){const{className:t,offset:[e,i]}=this.options;(e||i)&&setTimeout(()=>{const n=this.getContainer();n&&(n.style.transform=`translate(${e}px, ${i}px)`,t&&n.classList.add(t))},200)}),u.Canvas.include({_fillStroke:function(t,e){var i=e.options;if(i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),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(),i.img)){const n=new Image;n.src=i.img,n.onload=function(){t.save(),t.clip();var i=e instanceof u.Circle?e._pxBounds:e._rawPxBounds,s=i.getSize(),o=t.createPattern(n,"repeat");t.fillStyle=o,t.fillRect(i.min.x,i.min.y,s.x,s.y),t.restore()}}}}),u.SVG.include({_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.img?("string"==typeof i.img&&i.img.match(/^url\(/)?this.__fillPattern(t):e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):i.fill?(e.setAttribute("fill",i.fillColor),e.setAttribute("fill-opacity",t instanceof u.Polygon||t instanceof L.Circle||t instanceof L.CircleMarker?i.fillOpacity:0)):e.setAttribute("fill-opacity",0))},__fillPattern:function(t){var e=t._path,i=t.options;this._defs||(this._defs=L.SVG.create("defs"),this._container.appendChild(this._defs));var n=i.img.substring(4,i.img.length-1),s=n+(Math.random()*Math.pow(10,17)+Math.random()*Math.pow(10,17));s+=(new Date).getUTCMilliseconds();var o=document.getElementById(s);if(!o){var a=new Image;a.src=n,(o=L.SVG.create("pattern")).setAttribute("id",s),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("patternUnits","userSpaceOnUse"),o.setAttribute("width","24"),o.setAttribute("height","24");var r=L.SVG.create("rect");r.setAttribute("width",24),r.setAttribute("height",24),r.setAttribute("x",0),r.setAttribute("x",0),r.setAttribute("fill",i.fillColor||i.color),o.appendChild(r),this._defs.appendChild(o);var h=L.SVG.create("image");h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttributeNS("http://www.w3.org/1999/xlink","href",n),h.setAttribute("width","24"),h.setAttribute("height","24"),o.appendChild(h),a.onload=function(){o.setAttribute("width",a.width),o.setAttribute("height",a.height),h.setAttribute("width",a.width),h.setAttribute("height",a.height)}}e.setAttribute("fill","url(#"+s+")")}});var A=6378137,v=.0066943799901413165,M=484813681109536e-20,x=Math.PI/2,b=1e-10,w=.017453292519943295,P=57.29577951308232,k=Math.PI/4,E=2*Math.PI,C=3.14159265359,S={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};const T={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var O=/[\s_\-\/\(\)]/g;function B(t,e){if(t[e])return t[e];for(var i,n=Object.keys(t),s=e.toLowerCase().replace(O,""),o=-1;++o<n.length;)if((i=n[o]).toLowerCase().replace(O,"")===s)return t[i]}function I(t){var e,i,n,s={},o=t.split("+").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,e){var i=e.split("=");return i.push(!0),t[i[0].toLowerCase()]=i[1],t},{}),a={proj:"projName",datum:"datumCode",rf:function(t){s.rf=parseFloat(t)},lat_0:function(t){s.lat0=t*w},lat_1:function(t){s.lat1=t*w},lat_2:function(t){s.lat2=t*w},lat_ts:function(t){s.lat_ts=t*w},lon_0:function(t){s.long0=t*w},lon_1:function(t){s.long1=t*w},lon_2:function(t){s.long2=t*w},alpha:function(t){s.alpha=parseFloat(t)*w},gamma:function(t){s.rectified_grid_angle=parseFloat(t)*w},lonc:function(t){s.longc=t*w},x_0:function(t){s.x0=parseFloat(t)},y_0:function(t){s.y0=parseFloat(t)},k_0:function(t){s.k0=parseFloat(t)},k:function(t){s.k0=parseFloat(t)},a:function(t){s.a=parseFloat(t)},b:function(t){s.b=parseFloat(t)},r:function(t){s.a=s.b=parseFloat(t)},r_a:function(){s.R_A=!0},zone:function(t){s.zone=parseInt(t,10)},south:function(){s.utmSouth=!0},towgs84:function(t){s.datum_params=t.split(",").map(function(t){return parseFloat(t)})},to_meter:function(t){s.to_meter=parseFloat(t)},units:function(t){s.units=t;var e=B(T,t);e&&(s.to_meter=e.to_meter)},from_greenwich:function(t){s.from_greenwich=t*w},pm:function(t){var e=B(S,t);s.from_greenwich=(e||parseFloat(t))*w},nadgrids:function(t){"@null"===t?s.datumCode="none":s.nadgrids=t},axis:function(t){var e="ewnsud";3===t.length&&-1!==e.indexOf(t.substr(0,1))&&-1!==e.indexOf(t.substr(1,1))&&-1!==e.indexOf(t.substr(2,1))&&(s.axis=t)},approx:function(){s.approx=!0}};for(e in o)i=o[e],e in a?"function"==typeof(n=a[e])?n(i):s[n]=i:s[e]=i;return"string"==typeof s.datumCode&&"WGS84"!==s.datumCode&&(s.datumCode=s.datumCode.toLowerCase()),s}class D{static getId(t){const e=t.find(t=>Array.isArray(t)&&"ID"===t[0]);return e&&e.length>=3?{authority:e[1],code:parseInt(e[2],10)}:null}static convertUnit(t,e="unit"){if(!t||t.length<3)return{type:e,name:"unknown",conversion_factor:null};const i=t[1],n=parseFloat(t[2])||null,s=t.find(t=>Array.isArray(t)&&"ID"===t[0]);return{type:e,name:i,conversion_factor:n,id:s?{authority:s[1],code:parseInt(s[2],10)}:null}}static convertAxis(t){const e=t[1]||"Unknown";let i;const n=e.match(/^\((.)\)$/);if(n){const t=n[1].toUpperCase();if("E"===t)i="east";else if("N"===t)i="north";else{if("U"!==t)throw new Error(`Unknown axis abbreviation: ${t}`);i="up"}}else i=t[2]?t[2].toLowerCase():"unknown";const s=t.find(t=>Array.isArray(t)&&"ORDER"===t[0]),o=s?parseInt(s[1],10):null,a=t.find(t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0]));return{name:e,direction:i,unit:this.convertUnit(a),order:o}}static extractAxes(t){return t.filter(t=>Array.isArray(t)&&"AXIS"===t[0]).map(t=>this.convertAxis(t)).sort((t,e)=>(t.order||0)-(e.order||0))}static convert(t,e={}){switch(t[0]){case"PROJCRS":e.type="ProjectedCRS",e.name=t[1],e.base_crs=t.find(t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0])):null,e.conversion=t.find(t=>Array.isArray(t)&&"CONVERSION"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"CONVERSION"===t[0])):null;const i=t.find(t=>Array.isArray(t)&&"CS"===t[0]);i&&(e.coordinate_system={type:i[1],axis:this.extractAxes(t)});const n=t.find(t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]);if(n){const t=this.convertUnit(n);e.coordinate_system.unit=t}e.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":e.type="GeographicCRS",e.name=t[1];const s=t.find(t=>Array.isArray(t)&&("DATUM"===t[0]||"ENSEMBLE"===t[0]));if(s){const i=this.convert(s);"ENSEMBLE"===s[0]?e.datum_ensemble=i:e.datum=i;const n=t.find(t=>Array.isArray(t)&&"PRIMEM"===t[0]);n&&"Greenwich"!==n[1]&&(i.prime_meridian={name:n[1],longitude:parseFloat(n[2])})}e.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},e.id=this.getId(t);break;case"DATUM":e.type="GeodeticReferenceFrame",e.name=t[1],e.ellipsoid=t.find(t=>Array.isArray(t)&&"ELLIPSOID"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"ELLIPSOID"===t[0])):null;break;case"ENSEMBLE":e.type="DatumEnsemble",e.name=t[1],e.members=t.filter(t=>Array.isArray(t)&&"MEMBER"===t[0]).map(t=>({type:"DatumEnsembleMember",name:t[1],id:this.getId(t)}));const o=t.find(t=>Array.isArray(t)&&"ENSEMBLEACCURACY"===t[0]);o&&(e.accuracy=parseFloat(o[1]));const a=t.find(t=>Array.isArray(t)&&"ELLIPSOID"===t[0]);a&&(e.ellipsoid=this.convert(a)),e.id=this.getId(t);break;case"ELLIPSOID":e.type="Ellipsoid",e.name=t[1],e.semi_major_axis=parseFloat(t[2]),e.inverse_flattening=parseFloat(t[3]),t.find(t=>Array.isArray(t)&&"LENGTHUNIT"===t[0])&&this.convert(t.find(t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]),e);break;case"CONVERSION":e.type="Conversion",e.name=t[1],e.method=t.find(t=>Array.isArray(t)&&"METHOD"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"METHOD"===t[0])):null,e.parameters=t.filter(t=>Array.isArray(t)&&"PARAMETER"===t[0]).map(t=>this.convert(t));break;case"METHOD":e.type="Method",e.name=t[1],e.id=this.getId(t);break;case"PARAMETER":e.type="Parameter",e.name=t[1],e.value=parseFloat(t[2]),e.unit=this.convertUnit(t.find(t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0]))),e.id=this.getId(t);break;case"BOUNDCRS":e.type="BoundCRS";const r=t.find(t=>Array.isArray(t)&&"SOURCECRS"===t[0]);if(r){const t=r.find(t=>Array.isArray(t));e.source_crs=t?this.convert(t):null}const h=t.find(t=>Array.isArray(t)&&"TARGETCRS"===t[0]);if(h){const t=h.find(t=>Array.isArray(t));e.target_crs=t?this.convert(t):null}const l=t.find(t=>Array.isArray(t)&&"ABRIDGEDTRANSFORMATION"===t[0]);e.transformation=l?this.convert(l):null;break;case"ABRIDGEDTRANSFORMATION":if(e.type="Transformation",e.name=t[1],e.method=t.find(t=>Array.isArray(t)&&"METHOD"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"METHOD"===t[0])):null,e.parameters=t.filter(t=>Array.isArray(t)&&("PARAMETER"===t[0]||"PARAMETERFILE"===t[0])).map(t=>"PARAMETER"===t[0]?this.convert(t):"PARAMETERFILE"===t[0]?{name:t[1],value:t[2],id:{authority:"EPSG",code:8656}}:void 0),7===e.parameters.length){const t=e.parameters[6];"Scale difference"===t.name&&(t.value=Math.round(1e12*(t.value-1))/1e6)}e.id=this.getId(t);break;case"AXIS":e.coordinate_system||(e.coordinate_system={type:"unspecified",axis:[]}),e.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const c=this.convertUnit(t,"LinearUnit");e.coordinate_system&&e.coordinate_system.axis&&e.coordinate_system.axis.forEach(t=>{t.unit||(t.unit=c)}),c.conversion_factor&&1!==c.conversion_factor&&e.semi_major_axis&&(e.semi_major_axis={value:e.semi_major_axis,unit:c});break;default:e.keyword=t[0]}return e}}class R extends D{static convert(t,e={}){return super.convert(t,e),e.coordinate_system&&"Cartesian"===e.coordinate_system.subtype&&delete e.coordinate_system,e.usage&&delete e.usage,e}}class z extends D{static convert(t,e={}){super.convert(t,e);const i=t.find(t=>Array.isArray(t)&&"CS"===t[0]);i&&(e.coordinate_system={subtype:i[1],axis:this.extractAxes(t)});const n=t.find(t=>Array.isArray(t)&&"USAGE"===t[0]);if(n){const t=n.find(t=>Array.isArray(t)&&"SCOPE"===t[0]),i=n.find(t=>Array.isArray(t)&&"AREA"===t[0]),s=n.find(t=>Array.isArray(t)&&"BBOX"===t[0]);e.usage={},t&&(e.usage.scope=t[1]),i&&(e.usage.area=i[1]),s&&(e.usage.bbox=s.slice(1))}return e}}function G(t){const e=function(t){return t.find(t=>Array.isArray(t)&&"USAGE"===t[0])?"2019":(t.find(t=>Array.isArray(t)&&"CS"===t[0])||"BOUNDCRS"===t[0]||"PROJCRS"===t[0]||t[0],"2015")}(t);return("2019"===e?z:R).convert(t)}var N=/\s/,j=/[A-Za-z]/,F=/[A-Za-z84_]/,U=/[,\]]/,Z=/[\d\.E\-\+]/;function H(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function q(t,e,i){Array.isArray(e)&&(i.unshift(e),e=null);var n=e?{}:t,s=i.reduce(function(t,e){return V(e,t),t},n);e&&(t[e]=s)}function V(t,e){if(Array.isArray(t)){var i=t.shift();if("PARAMETER"===i&&(i=t.shift()),1===t.length)return Array.isArray(t[0])?(e[i]={},void V(t[0],e[i])):void(e[i]=t[0]);if(t.length)if("TOWGS84"!==i){if("AXIS"===i)return i in e||(e[i]=[]),void e[i].push(t);var n;switch(Array.isArray(i)||(e[i]={}),i){case"UNIT":case"PRIMEM":case"VERT_DATUM":return e[i]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&V(t[2],e[i]));case"SPHEROID":case"ELLIPSOID":return e[i]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&V(t[3],e[i]));case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":return t[0]=["name",t[0]],void q(e,i,t);case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":return t[0]=["name",t[0]],q(e,i,t),void(e[i].type=i);default:for(n=-1;++n<t.length;)if(!Array.isArray(t[n]))return V(t,e[i]);return q(e,i,t)}}else e[i]=t;else e[i]=!0}else e[t]=!0}H.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;N.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},H.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(U.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},H.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},H.prototype.number=function(t){if(!Z.test(t)){if(U.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},H.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},H.prototype.keyword=function(t){if(F.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=1)}if(!U.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},H.prototype.neutral=function(t){if(j.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(Z.test(t))return this.word=t,void(this.state=3);if(!U.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},H.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function W(t){return.017453292519943295*t}function K(t){const e=(t.projName||"").toLowerCase().replace(/_/g," ");t.long0||!t.longc||"albers conic equal area"!==e&&"lambert azimuthal equal area"!==e||(t.long0=t.longc),t.lat_ts||!t.lat1||"stereographic south pole"!==e&&"polar stereographic (variant b)"!==e?t.lat_ts||!t.lat0||"polar stereographic"!==e&&"polar stereographic (variant a)"!==e||(t.lat_ts=t.lat0,t.lat0=W(t.lat0>0?90:-90),delete t.lat1):(t.lat0=W(t.lat1>0?90:-90),t.lat_ts=t.lat1,delete t.lat1)}function X(t){let e={units:null,to_meter:void 0};return"string"==typeof t?(e.units=t.toLowerCase(),"metre"===e.units&&(e.units="meter"),"meter"===e.units&&(e.to_meter=1)):t&&t.name&&(e.units=t.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.to_meter=t.conversion_factor),e}function Y(t){return"object"==typeof t?t.value*t.unit.conversion_factor:t}function $(t,e){t.ellipsoid.radius?(e.a=t.ellipsoid.radius,e.rf=0):(e.a=Y(t.ellipsoid.semi_major_axis),void 0!==t.ellipsoid.inverse_flattening?e.rf=t.ellipsoid.inverse_flattening:void 0!==t.ellipsoid.semi_major_axis&&void 0!==t.ellipsoid.semi_minor_axis&&(e.rf=e.a/(e.a-Y(t.ellipsoid.semi_minor_axis))))}function J(t,e={}){return t&&"object"==typeof t?"BoundCRS"===t.type?(J(t.source_crs,e),t.transformation&&(t.transformation.method&&"NTv2"===t.transformation.method.name?e.nadgrids=t.transformation.parameters[0].value:e.datum_params=t.transformation.parameters.map(t=>t.value)),e):(Object.keys(t).forEach(i=>{const n=t[i];if(null!==n)switch(i){case"name":if(e.srsCode)break;e.name=n,e.srsCode=n;break;case"type":"GeographicCRS"===n?e.projName="longlat":"ProjectedCRS"===n&&t.conversion&&t.conversion.method&&(e.projName=t.conversion.method.name);break;case"datum":case"datum_ensemble":n.ellipsoid&&(e.ellps=n.ellipsoid.name,$(n,e)),n.prime_meridian&&(e.from_greenwich=n.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":e.ellps=n.name,$(n,e);break;case"prime_meridian":e.long0=(n.longitude||0)*Math.PI/180;break;case"coordinate_system":if(n.axis)if(e.axis=n.axis.map(t=>{const e=t.direction;if("east"===e)return"e";if("north"===e)return"n";if("west"===e)return"w";if("south"===e)return"s";throw new Error(`Unknown axis direction: ${e}`)}).join("")+"u",n.unit){const{units:t,to_meter:i}=X(n.unit);e.units=t,e.to_meter=i}else if(n.axis[0]&&n.axis[0].unit){const{units:t,to_meter:i}=X(n.axis[0].unit);e.units=t,e.to_meter=i}break;case"id":n.authority&&n.code&&(e.title=n.authority+":"+n.code);break;case"conversion":n.method&&n.method.name&&(e.projName=n.method.name),n.parameters&&n.parameters.forEach(t=>{const i=t.name.toLowerCase().replace(/\s+/g,"_"),n=t.value;t.unit&&t.unit.conversion_factor?e[i]=n*t.unit.conversion_factor:"degree"===t.unit?e[i]=n*Math.PI/180:e[i]=n});break;case"unit":n.name&&(e.units=n.name.toLowerCase(),"metre"===e.units&&(e.units="meter")),n.conversion_factor&&(e.to_meter=n.conversion_factor);break;case"base_crs":J(n,e),e.datumCode=n.id?n.id.authority+"_"+n.id.code:n.name}}),void 0!==e.latitude_of_false_origin&&(e.lat0=e.latitude_of_false_origin),void 0!==e.longitude_of_false_origin&&(e.long0=e.longitude_of_false_origin),void 0!==e.latitude_of_standard_parallel&&(e.lat0=e.latitude_of_standard_parallel,e.lat1=e.latitude_of_standard_parallel),void 0!==e.latitude_of_1st_standard_parallel&&(e.lat1=e.latitude_of_1st_standard_parallel),void 0!==e.latitude_of_2nd_standard_parallel&&(e.lat2=e.latitude_of_2nd_standard_parallel),void 0!==e.latitude_of_projection_centre&&(e.lat0=e.latitude_of_projection_centre),void 0!==e.longitude_of_projection_centre&&(e.longc=e.longitude_of_projection_centre),void 0!==e.easting_at_false_origin&&(e.x0=e.easting_at_false_origin),void 0!==e.northing_at_false_origin&&(e.y0=e.northing_at_false_origin),void 0!==e.latitude_of_natural_origin&&(e.lat0=e.latitude_of_natural_origin),void 0!==e.longitude_of_natural_origin&&(e.long0=e.longitude_of_natural_origin),void 0!==e.longitude_of_origin&&(e.long0=e.longitude_of_origin),void 0!==e.false_easting&&(e.x0=e.false_easting),e.easting_at_projection_centre&&(e.x0=e.easting_at_projection_centre),void 0!==e.false_northing&&(e.y0=e.false_northing),e.northing_at_projection_centre&&(e.y0=e.northing_at_projection_centre),void 0!==e.standard_parallel_1&&(e.lat1=e.standard_parallel_1),void 0!==e.standard_parallel_2&&(e.lat2=e.standard_parallel_2),void 0!==e.scale_factor_at_natural_origin&&(e.k0=e.scale_factor_at_natural_origin),void 0!==e.scale_factor_at_projection_centre&&(e.k0=e.scale_factor_at_projection_centre),void 0!==e.scale_factor_on_pseudo_standard_parallel&&(e.k0=e.scale_factor_on_pseudo_standard_parallel),void 0!==e.azimuth&&(e.alpha=e.azimuth),void 0!==e.azimuth_at_projection_centre&&(e.alpha=e.azimuth_at_projection_centre),e.angle_from_rectified_to_skew_grid&&(e.rectified_grid_angle=e.angle_from_rectified_to_skew_grid),K(e),e):t}var Q=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function tt(t){for(var e=Object.keys(t),i=0,n=e.length;i<n;++i){var s=e[i];-1!==Q.indexOf(s)&&et(t[s]),"object"==typeof t[s]&&tt(t[s])}}function et(t){if(t.AUTHORITY){var e=Object.keys(t.AUTHORITY)[0];e&&e in t.AUTHORITY&&(t.title=e+":"+t.AUTHORITY[e])}if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var i="",n=0,s=t.AXIS.length;n<s;++n){var o=[t.AXIS[n][0].toLowerCase(),t.AXIS[n][1].toLowerCase()];-1!==o[0].indexOf("north")||("y"===o[0]||"lat"===o[0])&&"north"===o[1]?i+="n":-1!==o[0].indexOf("south")||("y"===o[0]||"lat"===o[0])&&"south"===o[1]?i+="s":-1!==o[0].indexOf("east")||("x"===o[0]||"lon"===o[0])&&"east"===o[1]?i+="e":-1===o[0].indexOf("west")&&("x"!==o[0]&&"lon"!==o[0]||"west"!==o[1])||(i+="w")}2===i.length&&(i+="u"),3===i.length&&(t.axis=i)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var a=t.GEOGCS;function r(e){return e*(t.to_meter||1)}"GEOGCS"===t.type&&(a=t),a&&(a.DATUM?t.datumCode=a.DATUM.name.toLowerCase():t.datumCode=a.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_1949"===t.datumCode&&(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"belge_1972"===t.datumCode&&(t.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(t.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=a.DATUM.SPHEROID.a,t.rf=parseFloat(a.DATUM.SPHEROID.rf,10)),a.DATUM&&a.DATUM.TOWGS84&&(t.datum_params=a.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),t.rectified_grid_angle&&(t.rectified_grid_angle=W(t.rectified_grid_angle));[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",W],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",W],["x0","false_easting",r],["y0","false_northing",r],["long0","central_meridian",W],["lat0","latitude_of_origin",W],["lat0","standard_parallel_1",W],["lat1","standard_parallel_1",W],["lat2","standard_parallel_2",W],["azimuth","Azimuth"],["alpha","azimuth",W],["srsCode","name"]].forEach(function(e){return i=t,s=(n=e)[0],o=n[1],void(!(s in i)&&o in i&&(i[s]=i[o],3===n.length&&(i[s]=n[2](i[s]))));var i,n,s,o}),K(t)}function it(t){if("object"==typeof t)return J(t);const e=function(t){const e=t.toUpperCase();return e.includes("PROJCRS")||e.includes("GEOGCRS")||e.includes("BOUNDCRS")||e.includes("VERTCRS")||e.includes("LENGTHUNIT")||e.includes("ANGLEUNIT")||e.includes("SCALEUNIT")?"WKT2":(e.includes("PROJCS")||e.includes("GEOGCS")||e.includes("LOCAL_CS")||e.includes("VERT_CS")||e.includes("UNIT"),"WKT1")}(t);var i=new H(t).output();if("WKT2"===e){return J(G(i))}var n=i[0],s={};return V(i,s),tt(s),s[n]}function nt(t){var e=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?nt[t]=I(arguments[1]):nt[t]=it(arguments[1]):nt[t]=i}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){return Array.isArray(t)?nt.apply(e,t):nt(t)});if("string"==typeof t){if(t in nt)return nt[t]}else"EPSG"in t?nt["EPSG:"+t.EPSG]=t:"ESRI"in t?nt["ESRI:"+t.ESRI]=t:"IAU2000"in t&&(nt["IAU2000:"+t.IAU2000]=t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var e=1;e<=60;++e)t("EPSG:"+(32600+e),"+proj=utm +zone="+e+" +datum=WGS84 +units=m"),t("EPSG:"+(32700+e),"+proj=utm +zone="+e+" +south +datum=WGS84 +units=m");t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(nt);var st=["3857","900913","3785","102113"];function ot(t){if(!function(t){return"string"==typeof t}(t))return"projName"in t?t:it(t);if(function(t){return t in nt}(t))return nt[t];if(function(t){return 0!==t.indexOf("+")&&-1!==t.indexOf("[")||"object"==typeof t&&!("srsCode"in t)}(t)){var e=it(t);if(function(t){var e=B(t,"authority");if(e){var i=B(e,"epsg");return i&&st.indexOf(i)>-1}}(e))return nt["EPSG:3857"];var i=function(t){var e=B(t,"extension");if(e)return B(e,"proj4")}(e);return i?I(i):e}return function(t){return"+"===t[0]}(t)?I(t):void 0}function at(t,e){var i,n;if(t=t||{},!e)return t;for(n in e)void 0!==(i=e[n])&&(t[n]=i);return t}function rt(t,e,i){var n=t*e;return i/Math.sqrt(1-n*n)}function ht(t){return t<0?-1:1}function lt(t){return Math.abs(t)<=C?t:t-ht(t)*E}function ct(t,e,i){var n=t*i,s=.5*t;return n=Math.pow((1-n)/(1+n),s),Math.tan(.5*(x-e))/n}function ut(t,e){for(var i,n,s=.5*t,o=x-2*Math.atan(e),a=0;a<=15;a++)if(i=t*Math.sin(o),o+=n=x-2*Math.atan(e*Math.pow((1-i)/(1+i),s))-o,Math.abs(n)<=1e-10)return o;return-9999}function pt(t){return t}var dt=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=rt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var e,i,n=t.x,s=t.y;if(s*P>90&&s*P<-90&&n*P>180&&n*P<-180)return null;if(Math.abs(Math.abs(s)-x)<=b)return null;if(this.sphere)e=this.x0+this.a*this.k0*lt(n-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(k+.5*s));else{var o=Math.sin(s),a=ct(this.e,s,o);e=this.x0+this.a*this.k0*lt(n-this.long0),i=this.y0-this.a*this.k0*Math.log(a)}return t.x=e,t.y=i,t},inverse:function(t){var e,i,n=t.x-this.x0,s=t.y-this.y0;if(this.sphere)i=x-2*Math.atan(Math.exp(-s/(this.a*this.k0)));else{var o=Math.exp(-s/(this.a*this.k0));if(-9999===(i=ut(this.e,o)))return null}return e=lt(this.long0+n/(this.a*this.k0)),t.x=e,t.y=i,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"]},{init:function(){},forward:pt,inverse:pt,names:["longlat","identity"]}],_t={},mt=[];function gt(t,e){var i=mt.length;return!t.names||(mt[i]=t,t.names.forEach(function(t){_t[t.toLowerCase()]=i}),this)}function ft(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}const yt={start:function(){dt.forEach(gt)},add:gt,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==_t[e]&&mt[_t[e]]||(e=ft(e))in _t&&mt[_t[e]]?mt[_t[e]]:void 0}};var At={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const vt=At.WGS84;var Mt={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var Lt in Mt){var xt=Mt[Lt];xt.datumName&&(Mt[xt.datumName]=xt)}var bt={};async function wt(t,e){for(var i=[],n=await e.getImageCount(),s=n-1;s>=0;s--){var o=await e.getImage(s),a=await o.readRasters(),r=[o.getWidth(),o.getHeight()],h=o.getBoundingBox().map(kt),l=[o.fileDirectory.ModelPixelScale[0],o.fileDirectory.ModelPixelScale[1]].map(kt),c=h[0]+(r[0]-1)*l[0],u=h[3]-(r[1]-1)*l[1],p=a[0],d=a[1],_=[];for(let t=r[1]-1;t>=0;t--)for(let e=r[0]-1;e>=0;e--){var m=t*r[0]+e;_.push([-Et(d[m]),Et(p[m])])}i.push({del:l,lim:r,ll:[-c,u],cvs:_})}var g={header:{nSubgrids:n},subgrids:i};return bt[t]=g,g}function Pt(t){if(0===t.length)return null;var e="@"===t[0];return e&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:bt[t]||null,isNull:!1}}function kt(t){return t*Math.PI/180}function Et(t){return t/3600*Math.PI/180}function Ct(t,e,i){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,i)))}function St(t){return t.map(function(t){return[Et(t.longitudeShift),Et(t.latitudeShift)]})}function Tt(t,e,i){return{name:Ct(t,e+8,e+16).trim(),parent:Ct(t,e+24,e+24+8).trim(),lowerLatitude:t.getFloat64(e+72,i),upperLatitude:t.getFloat64(e+88,i),lowerLongitude:t.getFloat64(e+104,i),upperLongitude:t.getFloat64(e+120,i),latitudeInterval:t.getFloat64(e+136,i),longitudeInterval:t.getFloat64(e+152,i),gridNodeCount:t.getInt32(e+168,i)}}function Ot(t,e,i,n,s){var o=e+176,a=16;!1===s&&(a=8);for(var r=[],h=0;h<i.gridNodeCount;h++){var l={latitudeShift:t.getFloat32(o+h*a,n),longitudeShift:t.getFloat32(o+h*a+4,n)};!1!==s&&(l.latitudeAccuracy=t.getFloat32(o+h*a+8,n),l.longitudeAccuracy=t.getFloat32(o+h*a+12,n)),r.push(l)}return r}function Bt(t,e){if(!(this instanceof Bt))return new Bt(t);this.forward=null,this.inverse=null,this.init=null,this.name,this.names=null,this.title,e=e||function(t){if(t)throw t};var i=ot(t);if("object"==typeof i){var n=Bt.projections.get(i.projName);if(n){if(i.datumCode&&"none"!==i.datumCode){var s=B(Mt,i.datumCode);s&&(i.datum_params=i.datum_params||(s.towgs84?s.towgs84.split(","):null),i.ellps=s.ellipse,i.datumName=s.datumName?s.datumName:i.datumCode)}i.k0=i.k0||1,i.axis=i.axis||"enu",i.ellps=i.ellps||"wgs84",i.lat1=i.lat1||i.lat0;var o,a,r,h,l,c,u,p=function(t,e,i,n,s){if(!t){var o=B(At,n);o||(o=vt),t=o.a,e=o.b,i=o.rf}return i&&!e&&(e=(1-1/i)*t),(0===i||Math.abs(t-e)<b)&&(s=!0,e=t),{a:t,b:e,rf:i,sphere:s}}(i.a,i.b,i.rf,i.ellps,i.sphere),d=(o=p.a,a=p.b,p.rf,r=i.R_A,c=((h=o*o)-(l=a*a))/h,u=0,r?(h=(o*=1-c*(.16666666666666666+c*(.04722222222222222+.022156084656084655*c)))*o,c=0):u=Math.sqrt(c),{es:c,e:u,ep2:(h-l)/l}),_=function(t){return void 0===t?null:t.split(",").map(Pt)}(i.nadgrids),m=i.datum||function(t,e,i,n,s,o,a){var r={};return r.datum_type=void 0===t||"none"===t?5:4,e&&(r.datum_params=e.map(parseFloat),0===r.datum_params[0]&&0===r.datum_params[1]&&0===r.datum_params[2]||(r.datum_type=1),r.datum_params.length>3&&(0===r.datum_params[3]&&0===r.datum_params[4]&&0===r.datum_params[5]&&0===r.datum_params[6]||(r.datum_type=2,r.datum_params[3]*=M,r.datum_params[4]*=M,r.datum_params[5]*=M,r.datum_params[6]=r.datum_params[6]/1e6+1))),a&&(r.datum_type=3,r.grids=a),r.a=i,r.b=n,r.es=s,r.ep2=o,r}(i.datumCode,i.datum_params,p.a,p.b,d.es,d.ep2,_);at(this,i),at(this,n),this.a=p.a,this.b=p.b,this.rf=p.rf,this.sphere=p.sphere,this.es=d.es,this.e=d.e,this.ep2=d.ep2,this.datum=m,"init"in this&&"function"==typeof this.init&&this.init(),e(null,this)}else e("Could not get projection name from: "+t)}else e("Could not parse to valid json: "+t)}function It(t,e,i){var n,s,o,a,r=t.x,h=t.y,l=t.z?t.z:0;if(h<-x&&h>-1.001*x)h=-x;else if(h>x&&h<1.001*x)h=x;else{if(h<-x)return{x:-1/0,y:-1/0,z:t.z};if(h>x)return{x:1/0,y:1/0,z:t.z}}return r>Math.PI&&(r-=2*Math.PI),s=Math.sin(h),a=Math.cos(h),o=s*s,{x:((n=i/Math.sqrt(1-e*o))+l)*a*Math.cos(r),y:(n+l)*a*Math.sin(r),z:(n*(1-e)+l)*s}}function Dt(t,e,i,n){var s,o,a,r,h,l,c,u,p,d,_,m,g,f,y,A=1e-12,v=t.x,M=t.y,L=t.z?t.z:0;if(s=Math.sqrt(v*v+M*M),o=Math.sqrt(v*v+M*M+L*L),s/i<A){if(f=0,o/i<A)return y=-n,{x:t.x,y:t.y,z:t.z}}else f=Math.atan2(M,v);a=L/o,u=(r=s/o)*(1-e)*(h=1/Math.sqrt(1-e*(2-e)*r*r)),p=a*h,g=0;do{g++,l=e*(c=i/Math.sqrt(1-e*p*p))/(c+(y=s*u+L*p-c*(1-e*p*p))),m=(_=a*(h=1/Math.sqrt(1-l*(2-l)*r*r)))*u-(d=r*(1-l)*h)*p,u=d,p=_}while(m*m>1e-24&&g<30);return{x:f,y:Math.atan(_/Math.abs(d)),z:y}}function Rt(t){return 1===t||2===t}function zt(t,e,i){if(function(t,e){return t.datum_type===e.datum_type&&!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:2!==t.datum_type||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6])}(t,e))return i;if(5===t.datum_type||5===e.datum_type)return i;var n=t.a,s=t.es;if(3===t.datum_type){if(0!==Gt(t,!1,i))return;n=A,s=v}var o=e.a,a=e.b,r=e.es;if(3===e.datum_type&&(o=A,a=6356752.314,r=v),s===r&&n===o&&!Rt(t.datum_type)&&!Rt(e.datum_type))return i;if((i=It(i,s,n),Rt(t.datum_type)&&(i=function(t,e,i){if(1===e)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(2===e){var n=i[0],s=i[1],o=i[2],a=i[3],r=i[4],h=i[5],l=i[6];return{x:l*(t.x-h*t.y+r*t.z)+n,y:l*(h*t.x+t.y-a*t.z)+s,z:l*(-r*t.x+a*t.y+t.z)+o}}}(i,t.datum_type,t.datum_params)),Rt(e.datum_type)&&(i=function(t,e,i){if(1===e)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(2===e){var n=i[0],s=i[1],o=i[2],a=i[3],r=i[4],h=i[5],l=i[6],c=(t.x-n)/l,u=(t.y-s)/l,p=(t.z-o)/l;return{x:c+h*u-r*p,y:-h*c+u+a*p,z:r*c-a*u+p}}}(i,e.datum_type,e.datum_params)),i=Dt(i,r,o,a),3===e.datum_type)&&0!==Gt(e,!0,i))return;return i}function Gt(t,e,i){if(null===t.grids||0===t.grids.length)return-1;var n={x:-i.x,y:i.y},s={x:Number.NaN,y:Number.NaN},o=[];t:for(var a=0;a<t.grids.length;a++){var r=t.grids[a];if(o.push(r.name),r.isNull){s=n;break}if(null!==r.grid)for(var h=r.grid.subgrids,l=0,c=h.length;l<c;l++){var u=h[l],p=(Math.abs(u.del[1])+Math.abs(u.del[0]))/1e4,d=u.ll[0]-p,_=u.ll[1]-p,m=u.ll[0]+(u.lim[0]-1)*u.del[0]+p,g=u.ll[1]+(u.lim[1]-1)*u.del[1]+p;if(!(_>n.y||d>n.x||g<n.y||m<n.x)&&(s=Nt(n,e,u),!isNaN(s.x)))break t}else if(r.mandatory)return-1}return isNaN(s.x)?-1:(i.x=-s.x,i.y=s.y,0)}function Nt(t,e,i){var n={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return n;var s={x:t.x,y:t.y};s.x-=i.ll[0],s.y-=i.ll[1],s.x=lt(s.x-Math.PI)+Math.PI;var o=jt(s,i);if(e){if(isNaN(o.x))return n;o.x=s.x-o.x,o.y=s.y-o.y;var a,r,h=9;do{if(r=jt(o,i),isNaN(r.x))break;a={x:s.x-(r.x+o.x),y:s.y-(r.y+o.y)},o.x+=a.x,o.y+=a.y}while(h--&&Math.abs(a.x)>1e-12&&Math.abs(a.y)>1e-12);if(h<0)return n;n.x=lt(o.x+i.ll[0]),n.y=o.y+i.ll[1]}else isNaN(o.x)||(n.x=t.x+o.x,n.y=t.y+o.y);return n}function jt(t,e){var i,n={x:t.x/e.del[0],y:t.y/e.del[1]},s=Math.floor(n.x),o=Math.floor(n.y),a=n.x-1*s,r=n.y-1*o,h={x:Number.NaN,y:Number.NaN};if(s<0||s>=e.lim[0])return h;if(o<0||o>=e.lim[1])return h;i=o*e.lim[0]+s;var l=e.cvs[i][0],c=e.cvs[i][1];i++;var u=e.cvs[i][0],p=e.cvs[i][1];i+=e.lim[0];var d=e.cvs[i][0],_=e.cvs[i][1];i--;var m=e.cvs[i][0],g=e.cvs[i][1],f=a*r,y=a*(1-r),A=(1-a)*(1-r),v=(1-a)*r;return h.x=A*l+y*u+v*m+f*d,h.y=A*c+y*p+v*g+f*_,h}function Ft(t,e,i){var n,s,o,a=i.x,r=i.y,h=i.z||0,l={};for(o=0;o<3;o++)if(!e||2!==o||void 0!==i.z)switch(0===o?(n=a,s=-1!=="ew".indexOf(t.axis[o])?"x":"y"):1===o?(n=r,s=-1!=="ns".indexOf(t.axis[o])?"y":"x"):(n=h,s="z"),t.axis[o]){case"e":case"n":l[s]=n;break;case"w":case"s":l[s]=-n;break;case"u":void 0!==i[s]&&(l.z=n);break;case"d":void 0!==i[s]&&(l.z=-n);break;default:return null}return l}function Ut(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}function Zt(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function Ht(t,e,i,n){var s,o=void 0!==(i=Array.isArray(i)?Ut(i):{x:i.x,y:i.y,z:i.z,m:i.m}).z;if(function(t){Zt(t.x),Zt(t.y)}(i),t.datum&&e.datum&&function(t,e){return(1===t.datum.datum_type||2===t.datum.datum_type||3===t.datum.datum_type)&&"WGS84"!==e.datumCode||(1===e.datum.datum_type||2===e.datum.datum_type||3===e.datum.datum_type)&&"WGS84"!==t.datumCode}(t,e)&&(i=Ht(t,s=new Bt("WGS84"),i,n),t=s),n&&"enu"!==t.axis&&(i=Ft(t,!1,i)),"longlat"===t.projName)i={x:i.x*w,y:i.y*w,z:i.z||0};else if(t.to_meter&&(i={x:i.x*t.to_meter,y:i.y*t.to_meter,z:i.z||0}),!(i=t.inverse(i)))return;if(t.from_greenwich&&(i.x+=t.from_greenwich),i=zt(t.datum,e.datum,i))return e.from_greenwich&&(i={x:i.x-e.from_greenwich,y:i.y,z:i.z||0}),"longlat"===e.projName?i={x:i.x*P,y:i.y*P,z:i.z||0}:(i=e.forward(i),e.to_meter&&(i={x:i.x/e.to_meter,y:i.y/e.to_meter,z:i.z||0})),n&&"enu"!==e.axis?Ft(e,!0,i):(i&&!o&&delete i.z,i)}Bt.projections=yt,Bt.projections.start();var qt=Bt("WGS84");function Vt(t,e,i,n){var s,o,a;return Array.isArray(i)?(s=Ht(t,e,i,n)||{x:NaN,y:NaN},i.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof s.z?[s.x,s.y,s.z].concat(i.slice(3)):[s.x,s.y,i[2]].concat(i.slice(3)):[s.x,s.y].concat(i.slice(2)):[s.x,s.y]):(o=Ht(t,e,i,n),2===(a=Object.keys(i)).length||a.forEach(function(n){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;o[n]=i[n]}),o)}function Wt(t){return t instanceof Bt?t:"object"==typeof t&&"oProj"in t?t.oProj:Bt(t)}var Kt="AJSAJS",Xt="AFAFAF",Yt=65,$t=73,Jt=79,Qt=86,te=90;const ee={forward:ie,inverse:function(t){var e=ae(le(t.toUpperCase()));if(e.lat&&e.lon)return[e.lon,e.lat,e.lon,e.lat];return[e.left,e.bottom,e.right,e.top]},toPoint:ne};function ie(t,e){return e=e||5,function(t,e){var i="00000"+t.easting,n="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(d=t.easting,_=t.northing,m=t.zoneNumber,g=he(m),f=Math.floor(d/1e5),y=Math.floor(_/1e5)%20,s=f,o=y,a=g,r=a-1,h=Kt.charCodeAt(r),l=Xt.charCodeAt(r),c=h+s-1,u=l+o,p=!1,c>te&&(c=c-te+Yt-1,p=!0),(c===$t||h<$t&&c>$t||(c>$t||h<$t)&&p)&&c++,(c===Jt||h<Jt&&c>Jt||(c>Jt||h<Jt)&&p)&&++c===$t&&c++,c>te&&(c=c-te+Yt-1),u>Qt?(u=u-Qt+Yt-1,p=!0):p=!1,(u===$t||l<$t&&u>$t||(u>$t||l<$t)&&p)&&u++,(u===Jt||l<Jt&&u>Jt||(u>Jt||l<Jt)&&p)&&++u===$t&&u++,u>Qt&&(u=u-Qt+Yt-1),String.fromCharCode(c)+String.fromCharCode(u))+i.substr(i.length-5,e)+n.substr(n.length-5,e);var s,o,a,r,h,l,c,u,p;var d,_,m,g,f,y}(function(t){var e,i,n,s,o,a,r,h,l=t.lat,c=t.lon,u=6378137,p=.00669438,d=.9996,_=se(l),m=se(c);h=Math.floor((c+180)/6)+1,180===c&&(h=60);l>=56&&l<64&&c>=3&&c<12&&(h=32);l>=72&&l<84&&(c>=0&&c<9?h=31:c>=9&&c<21?h=33:c>=21&&c<33?h=35:c>=33&&c<42&&(h=37));r=se(6*(h-1)-180+3),e=p/(1-p),i=u/Math.sqrt(1-p*Math.sin(_)*Math.sin(_)),n=Math.tan(_)*Math.tan(_),s=e*Math.cos(_)*Math.cos(_),o=Math.cos(_)*(m-r),a=u*((1-p/4-3*p*p/64-5*p*p*p/256)*_-(3*p/8+3*p*p/32+45*p*p*p/1024)*Math.sin(2*_)+(15*p*p/256+45*p*p*p/1024)*Math.sin(4*_)-35*p*p*p/3072*Math.sin(6*_));var g=d*i*(o+(1-n+s)*o*o*o/6+(5-18*n+n*n+72*s-58*e)*o*o*o*o*o/120)+5e5,f=d*(a+i*Math.tan(_)*(o*o/2+(5-n+9*s+4*s*s)*o*o*o*o/24+(61-58*n+n*n+600*s-330*e)*o*o*o*o*o*o/720));l<0&&(f+=1e7);return{northing:Math.round(f),easting:Math.round(g),zoneNumber:h,zoneLetter:re(l)}}({lat:t[1],lon:t[0]}),e)}function ne(t){var e=ae(le(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function se(t){return t*(Math.PI/180)}function oe(t){return t/Math.PI*180}function ae(t){var e=t.northing,i=t.easting,n=t.zoneLetter,s=t.zoneNumber;if(s<0||s>60)return null;var o,a,r,h,l,c,u,p,d,_=.9996,m=6378137,g=.00669438,f=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),y=i-5e5,A=e;n<"N"&&(A-=1e7),u=6*(s-1)-180+3,o=.006739496752268451,d=(p=A/_/6367449.145945056)+(3*f/2-27*f*f*f/32)*Math.sin(2*p)+(21*f*f/16-55*f*f*f*f/32)*Math.sin(4*p)+151*f*f*f/96*Math.sin(6*p),a=m/Math.sqrt(1-g*Math.sin(d)*Math.sin(d)),r=Math.tan(d)*Math.tan(d),h=o*Math.cos(d)*Math.cos(d),l=.99330562*m/Math.pow(1-g*Math.sin(d)*Math.sin(d),1.5),c=y/(a*_);var v=d-a*Math.tan(d)/l*(c*c/2-(5+3*r+10*h-4*h*h-9*o)*c*c*c*c/24+(61+90*r+298*h+45*r*r-1.6983531815716497-3*h*h)*c*c*c*c*c*c/720);v=oe(v);var M,L=(c-(1+2*r+h)*c*c*c/6+(5-2*h+28*r-3*h*h+8*o+24*r*r)*c*c*c*c*c/120)/Math.cos(d);if(L=u+oe(L),t.accuracy){var x=ae({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});M={top:x.lat,right:x.lon,bottom:v,left:L}}else M={lat:v,lon:L};return M}function re(t){var e="Z";return 84>=t&&t>=72?e="X":72>t&&t>=64?e="W":64>t&&t>=56?e="V":56>t&&t>=48?e="U":48>t&&t>=40?e="T":40>t&&t>=32?e="S":32>t&&t>=24?e="R":24>t&&t>=16?e="Q":16>t&&t>=8?e="P":8>t&&t>=0?e="N":0>t&&t>=-8?e="M":-8>t&&t>=-16?e="L":-16>t&&t>=-24?e="K":-24>t&&t>=-32?e="J":-32>t&&t>=-40?e="H":-40>t&&t>=-48?e="G":-48>t&&t>=-56?e="F":-56>t&&t>=-64?e="E":-64>t&&t>=-72?e="D":-72>t&&t>=-80&&(e="C"),e}function he(t){var e=t%6;return 0===e&&(e=6),e}function le(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,i=t.length,n=null,s="",o=0;!/[A-Z]/.test(e=t.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+t;s+=e,o++}var a=parseInt(s,10);if(0===o||o+3>i)throw"MGRSPoint bad conversion from: "+t;var r=t.charAt(o++);if(r<="A"||"B"===r||"Y"===r||r>="Z"||"I"===r||"O"===r)throw"MGRSPoint zone letter "+r+" not handled: "+t;n=t.substring(o,o+=2);for(var h=he(a),l=function(t,e){var i=Kt.charCodeAt(e-1),n=1e5,s=!1;for(;i!==t.charCodeAt(0);){if(++i===$t&&i++,i===Jt&&i++,i>te){if(s)throw"Bad character: "+t;i=Yt,s=!0}n+=1e5}return n}(n.charAt(0),h),c=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;var i=Xt.charCodeAt(e-1),n=0,s=!1;for(;i!==t.charCodeAt(0);){if(++i===$t&&i++,i===Jt&&i++,i>Qt){if(s)throw"Bad character: "+t;i=Yt,s=!0}n+=1e5}return n}(n.charAt(1),h);c<ce(r);)c+=2e6;var u=i-o;if(u%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var p,d,_,m=u/2,g=0,f=0;return m>0&&(p=1e5/Math.pow(10,m),d=t.substring(o,o+m),g=parseFloat(d)*p,_=t.substring(o+m),f=parseFloat(_)*p),{easting:g+l,northing:f+c,zoneLetter:r,zoneNumber:a,accuracy:p}}function ce(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function ue(t,e,i){if(!(this instanceof ue))return new ue(t,e,i);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var n=t.split(",");this.x=parseFloat(n[0]),this.y=parseFloat(n[1]),this.z=parseFloat(n[2])||0}else this.x=t,this.y=e,this.z=i||0}ue.fromMGRS=function(t){return new ue(ne(t))},ue.prototype.toMGRS=function(t){return ie([this.x,this.y],t)};var pe=.046875,de=.01953125,_e=.01068115234375;function me(t){var e=[];e[0]=1-t*(.25+t*(pe+t*(de+t*_e))),e[1]=t*(.75-t*(pe+t*(de+t*_e)));var i=t*t;return e[2]=i*(.46875-t*(.013020833333333334+.007120768229166667*t)),i*=t,e[3]=i*(.3645833333333333-.005696614583333333*t),e[4]=i*t*.3076171875,e}function ge(t,e,i,n){return i*=e,e*=e,n[0]*t-i*(n[1]+e*(n[2]+e*(n[3]+e*n[4])))}function fe(t,e,i){for(var n=1/(1-e),s=t,o=20;o;--o){var a=Math.sin(s),r=1-e*a*a;if(s-=r=(ge(s,a,Math.cos(s),i)-t)*(r*Math.sqrt(r))*n,Math.abs(r)<b)return s}return s}const ye={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=me(this.es),this.ml0=ge(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var e,i,n,s=t.x,o=t.y,a=lt(s-this.long0),r=Math.sin(o),h=Math.cos(o);if(this.es){var l=h*a,c=Math.pow(l,2),u=this.ep2*Math.pow(h,2),p=Math.pow(u,2),d=Math.abs(h)>b?Math.tan(o):0,_=Math.pow(d,2),m=Math.pow(_,2);e=1-this.es*Math.pow(r,2),l/=Math.sqrt(e);var g=ge(o,r,h,this.en);i=this.a*(this.k0*l*(1+c/6*(1-_+u+c/20*(5-18*_+m+14*u-58*_*u+c/42*(61+179*m-m*_-479*_)))))+this.x0,n=this.a*(this.k0*(g-this.ml0+r*a*l/2*(1+c/12*(5-_+9*u+4*p+c/30*(61+m-58*_+270*u-330*_*u+c/56*(1385+543*m-m*_-3111*_))))))+this.y0}else{var f=h*Math.sin(a);if(Math.abs(Math.abs(f)-1)<b)return 93;if(i=.5*this.a*this.k0*Math.log((1+f)/(1-f))+this.x0,n=h*Math.cos(a)/Math.sqrt(1-Math.pow(f,2)),(f=Math.abs(n))>=1){if(f-1>b)return 93;n=0}else n=Math.acos(n);o<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return t.x=i,t.y=n,t},inverse:function(t){var e,i,n,s,o=(t.x-this.x0)*(1/this.a),a=(t.y-this.y0)*(1/this.a);if(this.es)if(i=fe(e=this.ml0+a/this.k0,this.es,this.en),Math.abs(i)<x){var r=Math.sin(i),h=Math.cos(i),l=Math.abs(h)>b?Math.tan(i):0,c=this.ep2*Math.pow(h,2),u=Math.pow(c,2),p=Math.pow(l,2),d=Math.pow(p,2);e=1-this.es*Math.pow(r,2);var _=o*Math.sqrt(e)/this.k0,m=Math.pow(_,2);n=i-(e*=l)*m/(1-this.es)*.5*(1-m/12*(5+3*p-9*c*p+c-4*u-m/30*(61+90*p-252*c*p+45*d+46*c-m/56*(1385+3633*p+4095*d+1574*d*p)))),s=lt(this.long0+_*(1-m/6*(1+2*p+c-m/20*(5+28*p+24*d+8*c*p+6*c-m/42*(61+662*p+1320*d+720*d*p))))/h)}else n=x*ht(a),s=0;else{var g=Math.exp(o/this.k0),f=.5*(g-1/g),y=this.lat0+a/this.k0,A=Math.cos(y);e=Math.sqrt((1-Math.pow(A,2))/(1+Math.pow(f,2))),n=Math.asin(e),a<0&&(n=-n),s=0===f&&0===A?0:lt(Math.atan2(f,A)+this.long0)}return t.x=s,t.y=n,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function Ae(t){var e=Math.exp(t);return e=(e-1/e)/2}function ve(t,e){t=Math.abs(t),e=Math.abs(e);var i=Math.max(t,e),n=Math.min(t,e)/(i||1);return i*Math.sqrt(1+Math.pow(n,2))}function Me(t){var e=Math.abs(t);return e=function(t){var e=1+t,i=e-1;return 0===i?t:t*Math.log(e)/i}(e*(1+e/(ve(1,e)+1))),t<0?-e:e}function Le(t,e){for(var i,n=2*Math.cos(2*e),s=t.length-1,o=t[s],a=0;--s>=0;)i=n*o-a+t[s],a=o,o=i;return e+i*Math.sin(2*e)}function xe(t,e,i){for(var n,s,o=Math.sin(e),a=Math.cos(e),r=Ae(i),h=function(t){var e=Math.exp(t);return(e+1/e)/2}(i),l=2*a*h,c=-2*o*r,u=t.length-1,p=t[u],d=0,_=0,m=0;--u>=0;)n=_,s=d,p=l*(_=p)-n-c*(d=m)+t[u],m=c*_-s+l*d;return[(l=o*h)*p-(c=a*r)*m,l*m+c*p]}const be={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(ye.init.apply(this),this.forward=ye.forward,this.inverse=ye.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),i=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),i*=e,this.cgb[1]=i*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),i*=e,this.cgb[2]=i*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=i*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),i*=e,this.cgb[3]=i*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=i*(1237/630+e*(e*(-24832/14175)-2.4)),i*=e,this.cgb[4]=i*(4174/315+e*(-144838/6237)),this.cbg[4]=i*(-734/315+e*(109598/31185)),i*=e,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=i*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=i*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),i*=e,this.utg[2]=i*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=i*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),i*=e,this.utg[3]=i*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=i*(49561/161280+e*(-179/168+e*(6601661/7257600))),i*=e,this.utg[4]=i*(-4583/161280+e*(108847/3991680)),this.gtu[4]=i*(34729/80640+e*(-3418889/1995840)),i*=e,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=.6650675310896665*i;var n=Le(this.cbg,this.lat0);this.Zb=-this.Qn*(n+function(t,e){for(var i,n=2*Math.cos(e),s=t.length-1,o=t[s],a=0;--s>=0;)i=n*o-a+t[s],a=o,o=i;return Math.sin(e)*i}(this.gtu,2*n))},forward:function(t){var e=lt(t.x-this.long0),i=t.y;i=Le(this.cbg,i);var n=Math.sin(i),s=Math.cos(i),o=Math.sin(e),a=Math.cos(e);i=Math.atan2(n,a*s),e=Math.atan2(o*s,ve(n,s*a)),e=Me(Math.tan(e));var r,h,l=xe(this.gtu,2*i,2*e);return i+=l[0],e+=l[1],Math.abs(e)<=2.623395162778?(r=this.a*(this.Qn*e)+this.x0,h=this.a*(this.Qn*i+this.Zb)+this.y0):(r=1/0,h=1/0),t.x=r,t.y=h,t},inverse:function(t){var e,i,n=(t.x-this.x0)*(1/this.a),s=(t.y-this.y0)*(1/this.a);if(s=(s-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var o=xe(this.utg,2*s,2*n);s+=o[0],n+=o[1],n=Math.atan(Ae(n));var a=Math.sin(s),r=Math.cos(s),h=Math.sin(n),l=Math.cos(n);s=Math.atan2(a*l,ve(h,l*r)),e=lt((n=Math.atan2(h,l*r))+this.long0),i=Le(this.cgb,s)}else e=1/0,i=1/0;return t.x=e,t.y=i,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]};const we={init:function(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*(lt(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*w,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,be.init.apply(this),this.forward=be.forward,this.inverse=be.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function Pe(t,e){return Math.pow((1-t)/(1+t),e)}const ke={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+k)/(Math.pow(Math.tan(.5*this.lat0+k),this.C)*Pe(this.e*t,this.ratexp))},forward:function(t){var e=t.x,i=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+k),this.C)*Pe(this.e*Math.sin(i),this.ratexp))-x,t.x=this.C*e,t},inverse:function(t){for(var e=t.x/this.C,i=t.y,n=Math.pow(Math.tan(.5*i+k)/this.K,1/this.C),s=20;s>0&&(i=2*Math.atan(n*Pe(this.e*Math.sin(t.y),-.5*this.e))-x,!(Math.abs(i-t.y)<1e-14));--s)t.y=i;return s?(t.x=e,t.y=i,t):null}};const Ee={init:function(){ke.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,i,n,s;return t.x=lt(t.x-this.long0),ke.forward.apply(this,[t]),e=Math.sin(t.y),i=Math.cos(t.y),n=Math.cos(t.x),s=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*i*n),t.x=s*i*Math.sin(t.x),t.y=s*(this.cosc0*e-this.sinc0*i*n),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,i,n,s,o;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,o=ve(t.x,t.y)){var a=2*Math.atan2(o,this.R2);e=Math.sin(a),i=Math.cos(a),s=Math.asin(i*this.sinc0+t.y*e*this.cosc0/o),n=Math.atan2(t.x*e,o*this.cosc0*i-t.y*this.sinc0*e)}else s=this.phic0,n=0;return t.x=n,t.y=s,ke.inverse.apply(this,[t]),t.x=lt(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};function Ce(t,e,i){return e*=i,Math.tan(.5*(x+t))*Math.pow((1-e)/(1+e),.5*i)}const Se={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=b&&(this.k0=.5*(1+ht(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=b&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=b&&Math.abs(Math.cos(this.lat_ts))>b&&(this.k0=.5*this.cons*rt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/ct(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=rt(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(Ce(this.lat0,this.sinlat0,this.e))-x,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var e,i,n,s,o,a,r=t.x,h=t.y,l=Math.sin(h),c=Math.cos(h),u=lt(r-this.long0);return Math.abs(Math.abs(r-this.long0)-Math.PI)<=b&&Math.abs(h+this.lat0)<=b?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*l+this.coslat0*c*Math.cos(u)),t.x=this.a*e*c*Math.sin(u)+this.x0,t.y=this.a*e*(this.coslat0*l-this.sinlat0*c*Math.cos(u))+this.y0,t):(i=2*Math.atan(Ce(h,l,this.e))-x,s=Math.cos(i),n=Math.sin(i),Math.abs(this.coslat0)<=b?(o=ct(this.e,h*this.con,this.con*l),a=2*this.a*this.k0*o/this.cons,t.x=this.x0+a*Math.sin(r-this.long0),t.y=this.y0-this.con*a*Math.cos(r-this.long0),t):(Math.abs(this.sinlat0)<b?(e=2*this.a*this.k0/(1+s*Math.cos(u)),t.y=e*n):(e=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*n+this.cosX0*s*Math.cos(u))),t.y=e*(this.cosX0*n-this.sinX0*s*Math.cos(u))+this.y0),t.x=e*s*Math.sin(u)+this.x0,t))},inverse:function(t){var e,i,n,s,o;t.x-=this.x0,t.y-=this.y0;var a=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var r=2*Math.atan(a/(2*this.a*this.k0));return e=this.long0,i=this.lat0,a<=b?(t.x=e,t.y=i,t):(i=Math.asin(Math.cos(r)*this.sinlat0+t.y*Math.sin(r)*this.coslat0/a),e=Math.abs(this.coslat0)<b?this.lat0>0?lt(this.long0+Math.atan2(t.x,-1*t.y)):lt(this.long0+Math.atan2(t.x,t.y)):lt(this.long0+Math.atan2(t.x*Math.sin(r),a*this.coslat0*Math.cos(r)-t.y*this.sinlat0*Math.sin(r))),t.x=e,t.y=i,t)}if(Math.abs(this.coslat0)<=b){if(a<=b)return i=this.lat0,e=this.long0,t.x=e,t.y=i,t;t.x*=this.con,t.y*=this.con,n=a*this.cons/(2*this.a*this.k0),i=this.con*ut(this.e,n),e=this.con*lt(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else s=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,a<=b?o=this.X0:(o=Math.asin(Math.cos(s)*this.sinX0+t.y*Math.sin(s)*this.cosX0/a),e=lt(this.long0+Math.atan2(t.x*Math.sin(s),a*this.cosX0*Math.cos(s)-t.y*this.sinX0*Math.sin(s)))),i=-1*ut(this.e,Math.tan(.5*(x+o)));return t.x=e,t.y=i,t},names:["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"],ssfn_:Ce};const Te={init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),i=this.a,n=1/this.rf,s=2*n-Math.pow(n,2),o=this.e=Math.sqrt(s);this.R=this.k0*i*Math.sqrt(1-s)/(1-s*Math.pow(e,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),r=Math.log(Math.tan(Math.PI/4+t/2)),h=Math.log((1+o*e)/(1-o*e));this.K=a-this.alpha*r+this.alpha*o/2*h},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),n=-this.alpha*(e+i)+this.K,s=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(t.x-this.lambda0),a=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(s)+Math.cos(this.b0)*Math.cos(o))),r=Math.asin(Math.cos(this.b0)*Math.sin(s)-Math.sin(this.b0)*Math.cos(s)*Math.cos(o));return t.y=this.R/2*Math.log((1+Math.sin(r))/(1-Math.sin(r)))+this.y0,t.x=this.R*a+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,i=t.y-this.y0,n=e/this.R,s=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(s)+Math.sin(this.b0)*Math.cos(s)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(s))),r=this.lambda0+a/this.alpha,h=0,l=o,c=-1e3,u=0;Math.abs(l-c)>1e-7;){if(++u>20)return;h=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),c=l,l=2*Math.atan(Math.exp(h))-Math.PI/2}return t.x=r,t.y=l,t},names:["somerc"]};var Oe=1e-7;const Be={init:function(){var t,e,i,n,s,o,a,r,h,l,c,u,p,d,_=0,m=0,g=0,f=0,y=0,A=0,v=0;this.no_off=(p=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],d="object"==typeof(u=this).projName?Object.keys(u.projName)[0]:u.projName,"no_uoff"in u||"no_off"in u||-1!==p.indexOf(d)||-1!==p.indexOf(ft(d))),this.no_rot="no_rot"in this;var M=!1;"alpha"in this&&(M=!0);var L=!1;if("rectified_grid_angle"in this&&(L=!0),M&&(v=this.alpha),L&&(_=this.rectified_grid_angle),M||L)m=this.longc;else if(g=this.long1,y=this.lat1,f=this.long2,A=this.lat2,Math.abs(y-A)<=Oe||(t=Math.abs(y))<=Oe||Math.abs(t-x)<=Oe||Math.abs(Math.abs(this.lat0)-x)<=Oe||Math.abs(Math.abs(A)-x)<=Oe)throw new Error;var w=1-this.es;e=Math.sqrt(w),Math.abs(this.lat0)>b?(r=Math.sin(this.lat0),i=Math.cos(this.lat0),t=1-this.es*r*r,this.B=i*i,this.B=Math.sqrt(1+this.es*this.B*this.B/w),this.A=this.B*this.k0*e/t,(s=(n=this.B*e/(i*Math.sqrt(t)))*n-1)<=0?s=0:(s=Math.sqrt(s),this.lat0<0&&(s=-s)),this.E=s+=n,this.E*=Math.pow(ct(this.e,this.lat0,r),this.B)):(this.B=1/e,this.A=this.k0,this.E=n=s=1),M||L?(M?(c=Math.asin(Math.sin(v)/n),L||(_=v)):(c=_,v=Math.asin(n*Math.sin(c))),this.lam0=m-Math.asin(.5*(s-1/s)*Math.tan(c))/this.B):(o=Math.pow(ct(this.e,y,Math.sin(y)),this.B),a=Math.pow(ct(this.e,A,Math.sin(A)),this.B),s=this.E/o,h=(a-o)/(a+o),l=((l=this.E*this.E)-a*o)/(l+a*o),(t=g-f)<-Math.PI?f-=E:t>Math.PI&&(f+=E),this.lam0=lt(.5*(g+f)-Math.atan(l*Math.tan(.5*this.B*(g-f))/h)/this.B),c=Math.atan(2*Math.sin(this.B*lt(g-this.lam0))/(s-1/s)),_=v=Math.asin(n*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(_),this.cosrot=Math.cos(_),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(v))),this.lat0<0&&(this.u_0=-this.u_0)),s=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(k-s)),this.v_pole_s=this.ArB*Math.log(Math.tan(k+s))},forward:function(t){var e,i,n,s,o,a,r,h,l={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-x)>b){if(e=.5*((o=this.E/Math.pow(ct(this.e,t.y,Math.sin(t.y)),this.B))-(a=1/o)),i=.5*(o+a),s=Math.sin(this.B*t.x),n=(e*this.singam-s*this.cosgam)/i,Math.abs(Math.abs(n)-1)<b)throw new Error;h=.5*this.ArB*Math.log((1-n)/(1+n)),a=Math.cos(this.B*t.x),r=Math.abs(a)<Oe?this.A*t.x:this.ArB*Math.atan2(e*this.cosgam+s*this.singam,a)}else h=t.y>0?this.v_pole_n:this.v_pole_s,r=this.ArB*t.y;return this.no_rot?(l.x=r,l.y=h):(r-=this.u_0,l.x=h*this.cosrot+r*this.sinrot,l.y=r*this.cosrot-h*this.sinrot),l.x=this.a*l.x+this.x0,l.y=this.a*l.y+this.y0,l},inverse:function(t){var e,i,n,s,o,a,r,h={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(i=t.y,e=t.x):(i=t.x*this.cosrot-t.y*this.sinrot,e=t.y*this.cosrot+t.x*this.sinrot+this.u_0),s=.5*((n=Math.exp(-this.BrA*i))-1/n),o=.5*(n+1/n),r=((a=Math.sin(this.BrA*e))*this.cosgam+s*this.singam)/o,Math.abs(Math.abs(r)-1)<b)h.x=0,h.y=r<0?-x:x;else{if(h.y=this.E/Math.sqrt((1+r)/(1-r)),h.y=ut(this.e,Math.pow(h.y,1/this.B)),h.y===1/0)throw new Error;h.x=-this.rB*Math.atan2(s*this.cosgam-a*this.singam,Math.cos(this.BrA*e))}return h.x+=this.lam0,h},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]};const Ie={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<b)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),i=Math.cos(this.lat1),n=rt(this.e,e,i),s=ct(this.e,this.lat1,e),o=Math.sin(this.lat2),a=Math.cos(this.lat2),r=rt(this.e,o,a),h=ct(this.e,this.lat2,o),l=Math.abs(Math.abs(this.lat0)-x)<b?0:ct(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>b?this.ns=Math.log(n/r)/Math.log(s/h):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=n/(this.ns*Math.pow(s,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var e=t.x,i=t.y;Math.abs(2*Math.abs(i)-Math.PI)<=b&&(i=ht(i)*(x-2e-10));var n,s,o=Math.abs(Math.abs(i)-x);if(o>b)n=ct(this.e,i,Math.sin(i)),s=this.a*this.f0*Math.pow(n,this.ns);else{if((o=i*this.ns)<=0)return null;s=0}var a=this.ns*lt(e-this.long0);return t.x=this.k0*(s*Math.sin(a))+this.x0,t.y=this.k0*(this.rh-s*Math.cos(a))+this.y0,t},inverse:function(t){var e,i,n,s,o,a=(t.x-this.x0)/this.k0,r=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(a*a+r*r),i=1):(e=-Math.sqrt(a*a+r*r),i=-1);var h=0;if(0!==e&&(h=Math.atan2(i*a,i*r)),0!==e||this.ns>0){if(i=1/this.ns,n=Math.pow(e/(this.a*this.f0),i),-9999===(s=ut(this.e,n)))return null}else s=-x;return o=lt(h/this.ns+this.long0),t.x=o,t.y=s,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]};const De={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,i,n,s,o,a,r,h=t.x,l=t.y,c=lt(h-this.long0);return e=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/e)-this.s45),n=-c*this.alfa,s=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),o=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(s)),a=this.n*o,r=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(s/2+this.s45),this.n),t.y=r*Math.cos(a)/1,t.x=r*Math.sin(a)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,i,n,s,o,a,r,h=t.x;t.x=t.y,t.y=h,this.czech||(t.y*=-1,t.x*=-1),o=Math.sqrt(t.x*t.x+t.y*t.y),s=Math.atan2(t.y,t.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(s)),i=Math.asin(Math.cos(n)*Math.sin(s)/Math.cos(e)),t.x=this.long0-i/this.alfa,a=e,r=0;var l=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-t.y)<1e-10&&(r=1),a=t.y,l+=1}while(0===r&&l<15);return l>=15?null:t},names:["Krovak","krovak"]};function Re(t,e,i,n,s){return t*s-e*Math.sin(2*s)+i*Math.sin(4*s)-n*Math.sin(6*s)}function ze(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function Ge(t){return.375*t*(1+.25*t*(1+.46875*t))}function Ne(t){return.05859375*t*t*(1+.75*t)}function je(t){return t*t*t*(35/3072)}function Fe(t,e,i){var n=e*i;return t/Math.sqrt(1-n*n)}function Ue(t){return Math.abs(t)<x?t:t-ht(t)*Math.PI}function Ze(t,e,i,n,s){var o,a;o=t/e;for(var r=0;r<15;r++)if(o+=a=(t-(e*o-i*Math.sin(2*o)+n*Math.sin(4*o)-s*Math.sin(6*o)))/(e-2*i*Math.cos(2*o)+4*n*Math.cos(4*o)-6*s*Math.cos(6*o)),Math.abs(a)<=1e-10)return o;return NaN}const He={init:function(){this.sphere||(this.e0=ze(this.es),this.e1=Ge(this.es),this.e2=Ne(this.es),this.e3=je(this.es),this.ml0=this.a*Re(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var e,i,n=t.x,s=t.y;if(n=lt(n-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(s)*Math.sin(n)),i=this.a*(Math.atan2(Math.tan(s),Math.cos(n))-this.lat0);else{var o=Math.sin(s),a=Math.cos(s),r=Fe(this.a,this.e,o),h=Math.tan(s)*Math.tan(s),l=n*Math.cos(s),c=l*l,u=this.es*a*a/(1-this.es);e=r*l*(1-c*h*(1/6-(8-h+8*u)*c/120)),i=this.a*Re(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+r*o/a*c*(.5+(5-h+6*u)*c/24)}return t.x=e+this.x0,t.y=i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,i,n=t.x/this.a,s=t.y/this.a;if(this.sphere){var o=s+this.lat0;e=Math.asin(Math.sin(o)*Math.cos(n)),i=Math.atan2(Math.tan(n),Math.cos(o))}else{var a=Ze(this.ml0/this.a+s,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-x)<=b)return t.x=this.long0,t.y=x,s<0&&(t.y*=-1),t;var r=Fe(this.a,this.e,Math.sin(a)),h=r*r*r/this.a/this.a*(1-this.es),l=Math.pow(Math.tan(a),2),c=n*this.a/r,u=c*c;e=a-r*Math.tan(a)/h*c*c*(.5-(1+3*l)*c*c/24),i=c*(1-u*(l/3+(1+3*l)*l*u/15))/Math.cos(a)}return t.x=lt(i+this.long0),t.y=Ue(e),t},names:["Cassini","Cassini_Soldner","cass"]};function qe(t,e){var i;return t>1e-7?(1-t*t)*(e/(1-(i=t*e)*i)-.5/t*Math.log((1-i)/(1+i))):2*e}var Ve=.3333333333333333,We=.17222222222222222,Ke=.10257936507936508,Xe=.06388888888888888,Ye=.0664021164021164,$e=.016415012942191543;const Je={init:function(){var t,e=Math.abs(this.lat0);if(Math.abs(e-x)<b?this.mode=this.lat0<0?1:2:Math.abs(e)<b?this.mode=3:this.mode=4,this.es>0)switch(this.qp=qe(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,i=[];return i[0]=t*Ve,e=t*t,i[0]+=e*We,i[1]=e*Xe,e*=t,i[0]+=e*Ke,i[1]+=e*Ye,i[2]=e*$e,i}(this.es),this.mode){case 2:case 1:this.dd=1;break;case 3:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case 4:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=qe(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else 4===this.mode&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var e,i,n,s,o,a,r,h,l,c,u=t.x,p=t.y;if(u=lt(u-this.long0),this.sphere){if(o=Math.sin(p),c=Math.cos(p),n=Math.cos(u),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+c*n:1+this.sinph0*o+this.cosph0*c*n)<=b)return null;e=(i=Math.sqrt(2/i))*c*Math.sin(u),i*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(p+this.lat0)<b)return null;i=k-.5*p,e=(i=2*(this.mode===this.S_POLE?Math.cos(i):Math.sin(i)))*Math.sin(u),i*=n}}else{switch(r=0,h=0,l=0,n=Math.cos(u),s=Math.sin(u),o=Math.sin(p),a=qe(this.e,o),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(r=a/this.qp,h=Math.sqrt(1-r*r)),this.mode){case this.OBLIQ:l=1+this.sinb1*r+this.cosb1*h*n;break;case this.EQUIT:l=1+h*n;break;case this.N_POLE:l=x+p,a=this.qp-a;break;case this.S_POLE:l=p-x,a=this.qp+a}if(Math.abs(l)<b)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:l=Math.sqrt(2/l),i=this.mode===this.OBLIQ?this.ymf*l*(this.cosb1*r-this.sinb1*h*n):(l=Math.sqrt(2/(1+h*n)))*r*this.ymf,e=this.xmf*l*h*s;break;case this.N_POLE:case this.S_POLE:a>=0?(e=(l=Math.sqrt(a))*s,i=n*(this.mode===this.S_POLE?l:-l)):e=i=0}}return t.x=this.a*e+this.x0,t.y=this.a*i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,i,n,s,o,a,r,h,l,c,u=t.x/this.a,p=t.y/this.a;if(this.sphere){var d,_=0,m=0;if((i=.5*(d=Math.sqrt(u*u+p*p)))>1)return null;switch(i=2*Math.asin(i),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(m=Math.sin(i),_=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(d)<=b?0:Math.asin(p*m/d),u*=m,p=_*d;break;case this.OBLIQ:i=Math.abs(d)<=b?this.lat0:Math.asin(_*this.sinph0+p*m*this.cosph0/d),u*=m*this.cosph0,p=(_-Math.sin(i)*this.sinph0)*d;break;case this.N_POLE:p=-p,i=x-i;break;case this.S_POLE:i-=x}e=0!==p||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(u,p):0}else{if(r=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(u/=this.dd,p*=this.dd,(a=Math.sqrt(u*u+p*p))<b)return t.x=this.long0,t.y=this.lat0,t;s=2*Math.asin(.5*a/this.rq),n=Math.cos(s),u*=s=Math.sin(s),this.mode===this.OBLIQ?(r=n*this.sinb1+p*s*this.cosb1/a,o=this.qp*r,p=a*this.cosb1*n-p*this.sinb1*s):(r=p*s/a,o=this.qp*r,p=a*n)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(p=-p),!(o=u*u+p*p))return t.x=this.long0,t.y=this.lat0,t;r=1-o/this.qp,this.mode===this.S_POLE&&(r=-r)}e=Math.atan2(u,p),h=Math.asin(r),l=this.apa,c=h+h,i=h+l[0]*Math.sin(c)+l[1]*Math.sin(c+c)+l[2]*Math.sin(c+c+c)}return t.x=lt(this.long0+e),t.y=i,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4};function Qe(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}const ti={init:function(){Math.abs(this.lat1+this.lat2)<b||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=rt(this.e3,this.sin_po,this.cos_po),this.qs1=qe(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=rt(this.e3,this.sin_po,this.cos_po),this.qs2=qe(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=qe(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>b?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=qe(this.e3,this.sin_phi),s=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*lt(e-this.long0),a=s*Math.sin(o)+this.x0,r=this.rh-s*Math.cos(o)+this.y0;return t.x=a,t.y=r,t},inverse:function(t){var e,i,n,s,o,a;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),n=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),n=-1),s=0,0!==e&&(s=Math.atan2(n*t.x,n*t.y)),n=e*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(i=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,i)),o=lt(s/this.ns0+this.long0),t.x=o,t.y=a,t},names:["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"],phi1z:function(t,e){var i,n,s,o,a=Qe(.5*e);if(t<b)return a;for(var r=t*t,h=1;h<=25;h++)if(a+=o=.5*(s=1-(n=t*(i=Math.sin(a)))*n)*s/Math.cos(a)*(e/(1-r)-i/s+.5/t*Math.log((1-n)/(1+n))),Math.abs(o)<=1e-7)return a;return null}};const ei={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var e,i,n,s,o,a,r,h=t.x,l=t.y;return n=lt(h-this.long0),e=Math.sin(l),i=Math.cos(l),s=Math.cos(n),(o=this.sin_p14*e+this.cos_p14*i*s)>0||Math.abs(o)<=b?(a=this.x0+1*this.a*i*Math.sin(n)/o,r=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*i*s)/o):(a=this.x0+this.infinity_dist*i*Math.sin(n),r=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*i*s)),t.x=a,t.y=r,t},inverse:function(t){var e,i,n,s,o,a;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(s=Math.atan2(e,this.rc),i=Math.sin(s),a=Qe((n=Math.cos(s))*this.sin_p14+t.y*i*this.cos_p14/e),o=Math.atan2(t.x*i,e*this.cos_p14*n-t.y*this.sin_p14*i),o=lt(this.long0+o)):(a=this.phic0,o=0),t.x=o,t.y=a,t},names:["gnom"]};const ii={init:function(){this.sphere||(this.k0=rt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,i,n=t.x,s=t.y,o=lt(n-this.long0);if(this.sphere)e=this.x0+this.a*o*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(s)/Math.cos(this.lat_ts);else{var a=qe(this.e,Math.sin(s));e=this.x0+this.a*this.k0*o,i=this.y0+this.a*a*.5/this.k0}return t.x=e,t.y=i,t},inverse:function(t){var e,i;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=lt(this.long0+t.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(i=function(t,e){var i=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-i)<1e-6)return e<0?-1*x:x;for(var n,s,o,a,r=Math.asin(.5*e),h=0;h<30;h++)if(s=Math.sin(r),o=Math.cos(r),a=t*s,r+=n=Math.pow(1-a*a,2)/(2*o)*(e/(1-t*t)-s/(1-a*a)+.5/t*Math.log((1-a)/(1+a))),Math.abs(n)<=1e-10)return r;return NaN}(this.e,2*t.y*this.k0/this.a),e=lt(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=i,t},names:["cea"]};const ni={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,i=t.y,n=lt(e-this.long0),s=Ue(i-this.lat0);return t.x=this.x0+this.a*n*this.rc,t.y=this.y0+this.a*s,t},inverse:function(t){var e=t.x,i=t.y;return t.x=lt(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=Ue(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"]};const si={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ze(this.es),this.e1=Ge(this.es),this.e2=Ne(this.es),this.e3=je(this.es),this.ml0=this.a*Re(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,i,n,s=t.x,o=t.y,a=lt(s-this.long0);if(n=a*Math.sin(o),this.sphere)Math.abs(o)<=b?(e=this.a*a,i=-1*this.a*this.lat0):(e=this.a*Math.sin(n)/Math.tan(o),i=this.a*(Ue(o-this.lat0)+(1-Math.cos(n))/Math.tan(o)));else if(Math.abs(o)<=b)e=this.a*a,i=-1*this.ml0;else{var r=Fe(this.a,this.e,Math.sin(o))/Math.tan(o);e=r*Math.sin(n),i=this.a*Re(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+r*(1-Math.cos(n))}return t.x=e+this.x0,t.y=i+this.y0,t},inverse:function(t){var e,i,n,s,o,a,r,h,l;if(n=t.x-this.x0,s=t.y-this.y0,this.sphere)if(Math.abs(s+this.a*this.lat0)<=b)e=lt(n/this.a+this.long0),i=0;else{var c;for(a=this.lat0+s/this.a,r=n*n/this.a/this.a+a*a,h=a,o=20;o;--o)if(h+=l=-1*(a*(h*(c=Math.tan(h))+1)-h-.5*(h*h+r)*c)/((h-a)/c-1),Math.abs(l)<=b){i=h;break}e=lt(this.long0+Math.asin(n*Math.tan(h)/this.a)/Math.sin(i))}else if(Math.abs(s+this.ml0)<=b)i=0,e=lt(this.long0+n/this.a);else{var u,p,d,_,m;for(a=(this.ml0+s)/this.a,r=n*n/this.a/this.a+a*a,h=a,o=20;o;--o)if(m=this.e*Math.sin(h),u=Math.sqrt(1-m*m)*Math.tan(h),p=this.a*Re(this.e0,this.e1,this.e2,this.e3,h),d=this.e0-2*this.e1*Math.cos(2*h)+4*this.e2*Math.cos(4*h)-6*this.e3*Math.cos(6*h),h-=l=(a*(u*(_=p/this.a)+1)-_-.5*u*(_*_+r))/(this.es*Math.sin(2*h)*(_*_+r-2*a*_)/(4*u)+(a-_)*(u*d-2/Math.sin(2*h))-d),Math.abs(l)<=b){i=h;break}u=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),e=lt(this.long0+Math.asin(n*u/this.a)/Math.sin(i))}return t.x=e,t.y=i,t},names:["Polyconic","American_Polyconic","poly"]};const oi={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var e,i=t.x,n=t.y-this.lat0,s=i-this.long0,o=n/M*1e-5,a=s,r=1,h=0;for(e=1;e<=10;e++)r*=o,h+=this.A[e]*r;var l,c=h,u=a,p=1,d=0,_=0,m=0;for(e=1;e<=6;e++)l=d*c+p*u,p=p*c-d*u,d=l,_=_+this.B_re[e]*p-this.B_im[e]*d,m=m+this.B_im[e]*p+this.B_re[e]*d;return t.x=m*this.a+this.x0,t.y=_*this.a+this.y0,t},inverse:function(t){var e,i,n=t.x,s=t.y,o=n-this.x0,a=(s-this.y0)/this.a,r=o/this.a,h=1,l=0,c=0,u=0;for(e=1;e<=6;e++)i=l*a+h*r,h=h*a-l*r,l=i,c=c+this.C_re[e]*h-this.C_im[e]*l,u=u+this.C_im[e]*h+this.C_re[e]*l;for(var p=0;p<this.iterations;p++){var d,_=c,m=u,g=a,f=r;for(e=2;e<=6;e++)d=m*c+_*u,_=_*c-m*u,m=d,g+=(e-1)*(this.B_re[e]*_-this.B_im[e]*m),f+=(e-1)*(this.B_im[e]*_+this.B_re[e]*m);_=1,m=0;var y=this.B_re[1],A=this.B_im[1];for(e=2;e<=6;e++)d=m*c+_*u,_=_*c-m*u,m=d,y+=e*(this.B_re[e]*_-this.B_im[e]*m),A+=e*(this.B_im[e]*_+this.B_re[e]*m);var v=y*y+A*A;c=(g*y+f*A)/v,u=(f*y-g*A)/v}var L=c,x=u,b=1,w=0;for(e=1;e<=9;e++)b*=L,w+=this.D[e]*b;var P=this.lat0+w*M*1e5,k=this.long0+x;return t.x=k,t.y=P,t},names:["New_Zealand_Map_Grid","nzmg"]};const ai={init:function(){},forward:function(t){var e=t.x,i=t.y,n=lt(e-this.long0),s=this.x0+this.a*n,o=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return t.x=s,t.y=o,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e=lt(this.long0+t.x/this.a),i=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=i,t},names:["Miller_Cylindrical","mill"]};const ri={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=me(this.es)},forward:function(t){var e,i,n=t.x,s=t.y;if(n=lt(n-this.long0),this.sphere){if(this.m)for(var o=this.n*Math.sin(s),a=20;a;--a){var r=(this.m*s+Math.sin(s)-o)/(this.m+Math.cos(s));if(s-=r,Math.abs(r)<b)break}else s=1!==this.n?Math.asin(this.n*Math.sin(s)):s;e=this.a*this.C_x*n*(this.m+Math.cos(s)),i=this.a*this.C_y*s}else{var h=Math.sin(s),l=Math.cos(s);i=this.a*ge(s,h,l,this.en),e=this.a*n*l/Math.sqrt(1-this.es*h*h)}return t.x=e,t.y=i,t},inverse:function(t){var e,i,n;return t.x-=this.x0,i=t.x/this.a,t.y-=this.y0,e=t.y/this.a,this.sphere?(e/=this.C_y,i/=this.C_x*(this.m+Math.cos(e)),this.m?e=Qe((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=Qe(Math.sin(e)/this.n)),i=lt(i+this.long0),e=Ue(e)):(e=fe(t.y/this.a,this.es,this.en),(n=Math.abs(e))<x?(n=Math.sin(e),i=lt(this.long0+t.x*Math.sqrt(1-this.es*n*n)/(this.a*Math.cos(e)))):n-b<x&&(i=this.long0)),t.x=i,t.y=e,t},names:["Sinusoidal","sinu"]};const hi={init:function(){},forward:function(t){for(var e=t.x,i=t.y,n=lt(e-this.long0),s=i,o=Math.PI*Math.sin(i);;){var a=-(s+Math.sin(s)-o)/(1+Math.cos(s));if(s+=a,Math.abs(a)<b)break}s/=2,Math.PI/2-Math.abs(i)<b&&(n=0);var r=.900316316158*this.a*n*Math.cos(s)+this.x0,h=1.4142135623731*this.a*Math.sin(s)+this.y0;return t.x=r,t.y=h,t},inverse:function(t){var e,i;t.x-=this.x0,t.y-=this.y0,i=t.y/(1.4142135623731*this.a),Math.abs(i)>.999999999999&&(i=.999999999999),e=Math.asin(i);var n=lt(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),i=(2*e+Math.sin(2*e))/Math.PI,Math.abs(i)>1&&(i=1);var s=Math.asin(i);return t.x=n,t.y=s,t},names:["Mollweide","moll"]};const li={init:function(){Math.abs(this.lat1+this.lat2)<b||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ze(this.es),this.e1=Ge(this.es),this.e2=Ne(this.es),this.e3=je(this.es),this.sin_phi=Math.sin(this.lat1),this.cos_phi=Math.cos(this.lat1),this.ms1=rt(this.e,this.sin_phi,this.cos_phi),this.ml1=Re(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<b?this.ns=this.sin_phi:(this.sin_phi=Math.sin(this.lat2),this.cos_phi=Math.cos(this.lat2),this.ms2=rt(this.e,this.sin_phi,this.cos_phi),this.ml2=Re(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Re(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var e,i=t.x,n=t.y;if(this.sphere)e=this.a*(this.g-n);else{var s=Re(this.e0,this.e1,this.e2,this.e3,n);e=this.a*(this.g-s)}var o=this.ns*lt(i-this.long0),a=this.x0+e*Math.sin(o),r=this.y0+this.rh-e*Math.cos(o);return t.x=a,t.y=r,t},inverse:function(t){var e,i,n,s;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var o=0;return 0!==i&&(o=Math.atan2(e*t.x,e*t.y)),this.sphere?(s=lt(this.long0+o/this.ns),n=Ue(this.g-i/this.a),t.x=s,t.y=n,t):(n=Ze(this.g-i/this.a,this.e0,this.e1,this.e2,this.e3),s=lt(this.long0+o/this.ns),t.x=s,t.y=n,t)},names:["Equidistant_Conic","eqdc"]};const ci={init:function(){this.R=this.a},forward:function(t){var e,i,n=t.x,s=t.y,o=lt(n-this.long0);Math.abs(s)<=b&&(e=this.x0+this.R*o,i=this.y0);var a=Qe(2*Math.abs(s/Math.PI));(Math.abs(o)<=b||Math.abs(Math.abs(s)-x)<=b)&&(e=this.x0,i=s>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var r=.5*Math.abs(Math.PI/o-o/Math.PI),h=r*r,l=Math.sin(a),c=Math.cos(a),u=c/(l+c-1),p=u*u,d=u*(2/l-1),_=d*d,m=Math.PI*this.R*(r*(u-_)+Math.sqrt(h*(u-_)*(u-_)-(_+h)*(p-_)))/(_+h);o<0&&(m=-m),e=this.x0+m;var g=h+u;return m=Math.PI*this.R*(d*g-r*Math.sqrt((_+h)*(h+1)-g*g))/(_+h),i=s>=0?this.y0+m:this.y0-m,t.x=e,t.y=i,t},inverse:function(t){var e,i,n,s,o,a,r,h,l,c,u,p;return t.x-=this.x0,t.y-=this.y0,u=Math.PI*this.R,o=(n=t.x/u)*n+(s=t.y/u)*s,u=3*(s*s/(h=-2*(a=-Math.abs(s)*(1+o))+1+2*s*s+o*o)+(2*(r=a-2*s*s+n*n)*r*r/h/h/h-9*a*r/h/h)/27)/(l=(a-r*r/3/h)/h)/(c=2*Math.sqrt(-l/3)),Math.abs(u)>1&&(u=u>=0?1:-1),p=Math.acos(u)/3,i=t.y>=0?(-c*Math.cos(p+Math.PI/3)-r/3/h)*Math.PI:-(-c*Math.cos(p+Math.PI/3)-r/3/h)*Math.PI,e=Math.abs(n)<b?this.long0:lt(this.long0+Math.PI*(o-1+Math.sqrt(1+2*(n*n-s*s)+o*o))/2/n),t.x=e,t.y=i,t},names:["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"]};const ui={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.f=this.es/(1+Math.sqrt(1-this.es))},forward:function(t){var e,i,n,s,o,a,r,h,l,c,u,p=t.x,d=t.y,_=Math.sin(t.y),m=Math.cos(t.y),g=lt(p-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=b?(t.x=this.x0+this.a*(x-d)*Math.sin(g),t.y=this.y0-this.a*(x-d)*Math.cos(g),t):Math.abs(this.sin_p12+1)<=b?(t.x=this.x0+this.a*(x+d)*Math.sin(g),t.y=this.y0+this.a*(x+d)*Math.cos(g),t):(l=this.sin_p12*_+this.cos_p12*m*Math.cos(g),h=(r=Math.acos(l))?r/Math.sin(r):1,t.x=this.x0+this.a*h*m*Math.sin(g),t.y=this.y0+this.a*h*(this.cos_p12*_-this.sin_p12*m*Math.cos(g)),t):(e=ze(this.es),i=Ge(this.es),n=Ne(this.es),s=je(this.es),Math.abs(this.sin_p12-1)<=b?(o=this.a*Re(e,i,n,s,x),a=this.a*Re(e,i,n,s,d),t.x=this.x0+(o-a)*Math.sin(g),t.y=this.y0-(o-a)*Math.cos(g),t):Math.abs(this.sin_p12+1)<=b?(o=this.a*Re(e,i,n,s,x),a=this.a*Re(e,i,n,s,d),t.x=this.x0+(o+a)*Math.sin(g),t.y=this.y0+(o+a)*Math.cos(g),t):Math.abs(p)<b&&Math.abs(d-this.lat0)<b?(t.x=t.y=0,t):(u=(c=function(t,e,i,n,s,o){const a=n-e,r=Math.atan((1-o)*Math.tan(t)),h=Math.atan((1-o)*Math.tan(i)),l=Math.sin(r),c=Math.cos(r),u=Math.sin(h),p=Math.cos(h);let d,_,m,g,f,y,A,v,M,L,x,b,w,P,k,E=a,C=100;do{if(_=Math.sin(E),m=Math.cos(E),g=Math.sqrt(p*_*(p*_)+(c*u-l*p*m)*(c*u-l*p*m)),0===g)return{azi1:0,s12:0};f=l*u+c*p*m,y=Math.atan2(g,f),A=c*p*_/g,v=1-A*A,M=0!==v?f-2*l*u/v:0,L=o/16*v*(4+o*(4-3*v)),d=E,E=a+(1-L)*o*A*(y+L*g*(M+L*f*(2*M*M-1)))}while(Math.abs(E-d)>1e-12&&--C>0);return 0===C?{azi1:NaN,s12:NaN}:(x=v*(s*s-s*(1-o)*(s*(1-o)))/(s*(1-o)*(s*(1-o))),b=1+x/16384*(4096+x*(x*(320-175*x)-768)),w=x/1024*(256+x*(x*(74-47*x)-128)),P=w*g*(M+w/4*(f*(2*M*M-1)-w/6*M*(4*g*g-3)*(4*M*M-3))),k=s*(1-o)*b*(y-P),{azi1:Math.atan2(p*_,c*u-l*p*m),s12:k})}(this.lat0,this.long0,d,p,this.a,this.f)).azi1,t.x=c.s12*Math.sin(u),t.y=c.s12*Math.cos(u),t))},inverse:function(t){var e,i,n,s,o,a,r,h,l,c,u,p,d,_,m;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((e=Math.sqrt(t.x*t.x+t.y*t.y))>2*x*this.a)return;return i=e/this.a,n=Math.sin(i),s=Math.cos(i),o=this.long0,Math.abs(e)<=b?a=this.lat0:(a=Qe(s*this.sin_p12+t.y*n*this.cos_p12/e),r=Math.abs(this.lat0)-x,o=Math.abs(r)<=b?this.lat0>=0?lt(this.long0+Math.atan2(t.x,-t.y)):lt(this.long0-Math.atan2(-t.x,t.y)):lt(this.long0+Math.atan2(t.x*n,e*this.cos_p12*s-t.y*this.sin_p12*n))),t.x=o,t.y=a,t}return h=ze(this.es),l=Ge(this.es),c=Ne(this.es),u=je(this.es),Math.abs(this.sin_p12-1)<=b?(a=Ze(((p=this.a*Re(h,l,c,u,x))-(e=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,h,l,c,u),o=lt(this.long0+Math.atan2(t.x,-1*t.y)),t.x=o,t.y=a,t):Math.abs(this.sin_p12+1)<=b?(p=this.a*Re(h,l,c,u,x),a=Ze(((e=Math.sqrt(t.x*t.x+t.y*t.y))-p)/this.a,h,l,c,u),o=lt(this.long0+Math.atan2(t.x,t.y)),t.x=o,t.y=a,t):(d=Math.atan2(t.x,t.y),_=Math.sqrt(t.x*t.x+t.y*t.y),m=function(t,e,i,n,s,o){const a=Math.atan((1-o)*Math.tan(t)),r=Math.sin(a),h=Math.cos(a),l=Math.sin(i),c=Math.cos(i),u=Math.atan2(r,h*c),p=h*l,d=1-p*p,_=d*(s*s-s*(1-o)*(s*(1-o)))/(s*(1-o)*(s*(1-o))),m=1+_/16384*(4096+_*(_*(320-175*_)-768)),g=_/1024*(256+_*(_*(74-47*_)-128));let f,y,A,v,M,L=n/(s*(1-o)*m),x=100;do{y=Math.cos(2*u+L),A=Math.sin(L),v=Math.cos(L),M=g*A*(y+g/4*(v*(2*y*y-1)-g/6*y*(4*A*A-3)*(4*y*y-3))),f=L,L=n/(s*(1-o)*m)+M}while(Math.abs(L-f)>1e-12&&--x>0);if(0===x)return{lat2:NaN,lon2:NaN};const b=r*A-h*v*c,w=o/16*d*(4+o*(4-3*d));return{lat2:Math.atan2(r*v+h*A*c,(1-o)*Math.sqrt(p*p+b*b)),lon2:e+(Math.atan2(A*l,h*v-r*A*c)-(1-w)*o*p*(L+w*A*(y+w*v*(2*y*y-1))))}}(this.lat0,this.long0,d,_,this.a,this.f),t.x=m.lon2,t.y=m.lat2,t)},names:["Azimuthal_Equidistant","aeqd"]};const pi={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var e,i,n,s,o,a,r,h=t.x,l=t.y;return n=lt(h-this.long0),e=Math.sin(l),i=Math.cos(l),s=Math.cos(n),((o=this.sin_p14*e+this.cos_p14*i*s)>0||Math.abs(o)<=b)&&(a=1*this.a*i*Math.sin(n),r=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*i*s)),t.x=a,t.y=r,t},inverse:function(t){var e,i,n,s,o,a,r;return t.x-=this.x0,t.y-=this.y0,i=Qe((e=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),n=Math.sin(i),s=Math.cos(i),a=this.long0,Math.abs(e)<=b?(r=this.lat0,t.x=a,t.y=r,t):(r=Qe(s*this.sin_p14+t.y*n*this.cos_p14/e),o=Math.abs(this.lat0)-x,Math.abs(o)<=b?(a=this.lat0>=0?lt(this.long0+Math.atan2(t.x,-t.y)):lt(this.long0-Math.atan2(-t.x,t.y)),t.x=a,t.y=r,t):(a=lt(this.long0+Math.atan2(t.x*n,e*this.cos_p14*s-t.y*this.sin_p14*n)),t.x=a,t.y=r,t))},names:["ortho"]};var di=1,_i=2,mi=3,gi=4,fi=5,yi=6,Ai=1,vi=2,Mi=3,Li=4;function xi(t,e,i,n){var s;return t<b?(n.value=Ai,s=0):(s=Math.atan2(e,i),Math.abs(s)<=k?n.value=Ai:s>k&&s<=x+k?(n.value=vi,s-=x):s>x+k||s<=-(x+k)?(n.value=Mi,s=s>=0?s-C:s+C):(n.value=Li,s+=x)),s}function bi(t,e){var i=t+e;return i<-C?i+=E:i>+C&&(i-=E),i}const wi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=x-k/2?this.face=fi:this.lat0<=-(x-k/2)?this.face=yi:Math.abs(this.long0)<=k?this.face=di:Math.abs(this.long0)<=x+k?this.face=this.long0>0?_i:gi:this.face=mi,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var e,i,n,s,o,a,r={x:0,y:0},h={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,i=t.x,this.face===fi)s=x-e,i>=k&&i<=x+k?(h.value=Ai,n=i-x):i>x+k||i<=-(x+k)?(h.value=vi,n=i>0?i-C:i+C):i>-(x+k)&&i<=-k?(h.value=Mi,n=i+x):(h.value=Li,n=i);else if(this.face===yi)s=x+e,i>=k&&i<=x+k?(h.value=Ai,n=-i+x):i<k&&i>=-k?(h.value=vi,n=-i):i<-k&&i>=-(x+k)?(h.value=Mi,n=-i-x):(h.value=Li,n=i>0?-i+C:-i-C);else{var l,c,u,p,d,_;this.face===_i?i=bi(i,+x):this.face===mi?i=bi(i,+C):this.face===gi&&(i=bi(i,-x)),p=Math.sin(e),d=Math.cos(e),_=Math.sin(i),l=d*Math.cos(i),c=d*_,u=p,this.face===di?n=xi(s=Math.acos(l),u,c,h):this.face===_i?n=xi(s=Math.acos(c),u,-l,h):this.face===mi?n=xi(s=Math.acos(-l),u,-c,h):this.face===gi?n=xi(s=Math.acos(-c),u,l,h):(s=n=0,h.value=Ai)}return a=Math.atan(12/C*(n+Math.acos(Math.sin(n)*Math.cos(k))-x)),o=Math.sqrt((1-Math.cos(s))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),h.value===vi?a+=x:h.value===Mi?a+=C:h.value===Li&&(a+=1.5*C),r.x=o*Math.cos(a),r.y=o*Math.sin(a),r.x=r.x*this.a+this.x0,r.y=r.y*this.a+this.y0,t.x=r.x,t.y=r.y,t},inverse:function(t){var e,i,n,s,o,a,r,h,l,c,u,p,d={lam:0,phi:0},_={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,i=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?_.value=Ai:t.y>=0&&t.y>=Math.abs(t.x)?(_.value=vi,e-=x):t.x<0&&-t.x>=Math.abs(t.y)?(_.value=Mi,e=e<0?e+C:e-C):(_.value=Li,e+=x),l=C/12*Math.tan(e),o=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),a=Math.atan(o),(r=1-(n=Math.cos(e))*n*(s=Math.tan(i))*s*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?r=-1:r>1&&(r=1),this.face===fi)h=Math.acos(r),d.phi=x-h,_.value===Ai?d.lam=a+x:_.value===vi?d.lam=a<0?a+C:a-C:_.value===Mi?d.lam=a-x:d.lam=a;else if(this.face===yi)h=Math.acos(r),d.phi=h-x,_.value===Ai?d.lam=-a+x:_.value===vi?d.lam=-a:_.value===Mi?d.lam=-a-x:d.lam=a<0?-a-C:-a+C;else{var m,g,f;l=(m=r)*m,g=(l+=(f=l>=1?0:Math.sqrt(1-l)*Math.sin(a))*f)>=1?0:Math.sqrt(1-l),_.value===vi?(l=g,g=-f,f=l):_.value===Mi?(g=-g,f=-f):_.value===Li&&(l=g,g=f,f=-l),this.face===_i?(l=m,m=-g,g=l):this.face===mi?(m=-m,g=-g):this.face===gi&&(l=m,m=g,g=-l),d.phi=Math.acos(-f)-x,d.lam=Math.atan2(g,m),this.face===_i?d.lam=bi(d.lam,-x):this.face===mi?d.lam=bi(d.lam,-C):this.face===gi&&(d.lam=bi(d.lam,+x))}return 0!==this.es&&(c=d.phi<0?1:0,u=Math.tan(d.phi),p=this.b/Math.sqrt(u*u+this.one_minus_f_squared),d.phi=Math.atan(Math.sqrt(this.a*this.a-p*p)/(this.one_minus_f*p)),c&&(d.phi=-d.phi)),d.lam+=this.long0,t.x=d.lam,t.y=d.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]};var Pi=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],ki=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Ei=.8487,Ci=1.3523,Si=P/5,Ti=1/Si,Oi=18,Bi=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))};const Ii={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=lt(t.x-this.long0),i=Math.abs(t.y),n=Math.floor(i*Si);n<0?n=0:n>=Oi&&(n=17);var s={x:Bi(Pi[n],i=P*(i-Ti*n))*e,y:Bi(ki[n],i)};return t.y<0&&(s.y=-s.y),s.x=s.x*this.a*Ei+this.x0,s.y=s.y*this.a*Ci+this.y0,s},inverse:function(t){var e={x:(t.x-this.x0)/(this.a*Ei),y:Math.abs(t.y-this.y0)/(this.a*Ci)};if(e.y>=1)e.x/=Pi[18][0],e.y=t.y<0?-x:x;else{var i=Math.floor(e.y*Oi);for(i<0?i=0:i>=Oi&&(i=17);;)if(ki[i][0]>e.y)--i;else{if(!(ki[i+1][0]<=e.y))break;++i}var n=ki[i],s=5*(e.y-n[0])/(ki[i+1][0]-n[0]);s=function(t,e,i,n){for(var s=e;n;--n){var o=t(s);if(s-=o,Math.abs(o)<i)break}return s}(function(t){return(Bi(n,t)-e.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])}(n,t)},s,b,100),e.x/=Bi(Pi[i],s),e.y=(5*i+s)*w,t.y<0&&(e.y=-e.y)}return e.x=lt(e.x+this.long0),e},names:["Robinson","robin"]};const Di={init:function(){this.name="geocent"},forward:function(t){return It(t,this.es,this.a)},inverse:function(t){return Dt(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};var Ri=0,zi=1,Gi=2,Ni=3,ji={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};const Fi={init:function(){if(Object.keys(ji).forEach(function(t){if(void 0===this[t])this[t]=ji[t].def;else{if(ji[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);ji[t].num&&(this[t]=parseFloat(this[t]))}ji[t].degrees&&(this[t]=this[t]*w)}.bind(this)),Math.abs(Math.abs(this.lat0)-x)<b?this.mode=this.lat0<0?zi:Ri:Math.abs(this.lat0)<b?this.mode=Gi:(this.mode=Ni,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var e,i,n,s,o=Math.sin(t.y),a=Math.cos(t.y),r=Math.cos(t.x);switch(this.mode){case Ni:i=this.sinph0*o+this.cosph0*a*r;break;case Gi:i=a*r;break;case zi:i=-o;break;case Ri:i=o}switch(e=(i=this.pn1/(this.p-i))*a*Math.sin(t.x),this.mode){case Ni:i*=this.cosph0*o-this.sinph0*a*r;break;case Gi:i*=o;break;case Ri:i*=-a*r;break;case zi:i*=a*r}return s=1/((n=i*this.cg+e*this.sg)*this.sw*this.h1+this.cw),e=(e*this.cg-i*this.sg)*this.cw*s,i=n*s,t.x=e*this.a,t.y=i*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var e,i,n,s={x:t.x,y:t.y};n=1/(this.pn1-t.y*this.sw),e=this.pn1*t.x*n,i=this.pn1*t.y*this.cw*n,t.x=e*this.cg+i*this.sg,t.y=i*this.cg-e*this.sg;var o=ve(t.x,t.y);if(Math.abs(o)<b)s.x=0,s.y=t.y;else{var a,r;switch(r=1-o*o*this.pfact,r=(this.p-Math.sqrt(r))/(this.pn1/o+o/this.pn1),a=Math.sqrt(1-r*r),this.mode){case Ni:s.y=Math.asin(a*this.sinph0+t.y*r*this.cosph0/o),t.y=(a-this.sinph0*Math.sin(s.y))*o,t.x*=r*this.cosph0;break;case Gi:s.y=Math.asin(t.y*r/o),t.y=a*o,t.x*=r;break;case Ri:s.y=Math.asin(a),t.y=-t.y;break;case zi:s.y=-Math.asin(a)}s.x=Math.atan2(t.x,t.y)}return t.x=s.x+this.long0,t.y=s.y,t},names:["Tilted_Perspective","tpers"]};const Ui={init:function(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,e=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var e,i,n,s,o=t.x,a=t.y;if(o-=this.long0,"ellipse"===this.shape){a=Math.atan(this.radius_p2*Math.tan(a));var r=this.radius_p/ve(this.radius_p*Math.cos(a),Math.sin(a));if(i=r*Math.cos(o)*Math.cos(a),n=r*Math.sin(o)*Math.cos(a),s=r*Math.sin(a),(this.radius_g-i)*i-n*n-s*s*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;e=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/ve(s,e)),t.y=this.radius_g_1*Math.atan(s/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(s/ve(n,e)))}else"sphere"===this.shape&&(e=Math.cos(a),i=Math.cos(o)*e,n=Math.sin(o)*e,s=Math.sin(a),e=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/ve(s,e)),t.y=this.radius_g_1*Math.atan(s/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(s/ve(n,e))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var e,i,n,s,o=-1,a=0,r=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(r=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*ve(1,r)):(a=Math.tan(t.x/this.radius_g_1),r=Math.tan(t.y/this.radius_g_1)*ve(1,a));var h=r/this.radius_p;if(e=a*a+h*h+o*o,(n=(i=2*this.radius_g*o)*i-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;s=(-i-Math.sqrt(n))/(2*e),o=this.radius_g+s*o,a*=s,r*=s,t.x=Math.atan2(a,o),t.y=Math.atan(r*Math.cos(t.x)/o),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(r=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+r*r)):(a=Math.tan(t.x/this.radius_g_1),r=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+a*a)),e=a*a+r*r+o*o,(n=(i=2*this.radius_g*o)*i-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;s=(-i-Math.sqrt(n))/(2*e),o=this.radius_g+s*o,a*=s,r*=s,t.x=Math.atan2(a,o),t.y=Math.atan(r*Math.cos(t.x)/o)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};var Zi=1.340264,Hi=-.081106,qi=893e-6,Vi=.003796,Wi=Math.sqrt(3)/2;const Ki={init:function(){this.es=0,this.long0=void 0!==this.long0?this.long0:0},forward:function(t){var e=lt(t.x-this.long0),i=t.y,n=Math.asin(Wi*Math.sin(i)),s=n*n,o=s*s*s;return t.x=e*Math.cos(n)/(Wi*(Zi+3*Hi*s+o*(7*qi+9*Vi*s))),t.y=n*(Zi+Hi*s+o*(qi+Vi*s)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var e,i,n,s,o=t.y;for(s=0;s<12&&(o-=n=(o*(Zi+Hi*(e=o*o)+(i=e*e*e)*(qi+Vi*e))-t.y)/(Zi+3*Hi*e+i*(7*qi+9*Vi*e)),!(Math.abs(n)<1e-9));++s);return i=(e=o*o)*e*e,t.x=Wi*t.x*(Zi+3*Hi*e+i*(7*qi+9*Vi*e))/Math.cos(o),t.y=Math.asin(Math.sin(o)/Wi),t.x=lt(t.x+this.long0),t},names:["eqearth","Equal Earth","Equal_Earth"]};var Xi=1e-10;function Yi(t){var e,i,n,s=lt(t.x-(this.long0||0)),o=t.y;return e=this.am1+this.m1-ge(o,i=Math.sin(o),n=Math.cos(o),this.en),i=n*s/(e*Math.sqrt(1-this.es*i*i)),t.x=e*Math.sin(i),t.y=this.am1-e*Math.cos(i),t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function $i(t){var e,i,n,s;if(t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a,i=ve(t.x,t.y=this.am1-t.y),s=fe(this.am1+this.m1-i,this.es,this.en),(e=Math.abs(s))<x)e=Math.sin(s),n=i*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*e*e)/Math.cos(s);else{if(!(Math.abs(e-x)<=Xi))throw new Error;n=0}return t.x=lt(n+(this.long0||0)),t.y=Ue(s),t}function Ji(t){var e,i,n=lt(t.x-(this.long0||0)),s=t.y;return i=this.cphi1+this.phi1-s,Math.abs(i)>Xi?(t.x=i*Math.sin(e=n*Math.cos(s)/i),t.y=this.cphi1-i*Math.cos(e)):t.x=t.y=0,t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function Qi(t){var e,i;t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var n=ve(t.x,t.y=this.cphi1-t.y);if(i=this.cphi1+this.phi1-n,Math.abs(i)>x)throw new Error;return e=Math.abs(Math.abs(i)-x)<=Xi?0:n*Math.atan2(t.x,t.y)/Math.cos(i),t.x=lt(e+(this.long0||0)),t.y=Ue(i),t}const tn={init:function(){var t;if(this.phi1=this.lat1,Math.abs(this.phi1)<Xi)throw new Error;this.es?(this.en=me(this.es),this.m1=ge(this.phi1,this.am1=Math.sin(this.phi1),t=Math.cos(this.phi1),this.en),this.am1=t/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=$i,this.forward=Yi):(Math.abs(this.phi1)+Xi>=x?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=Qi,this.forward=Ji)},names:["bonne","Bonne (Werner lat_1=90)"]};const en=Object.assign(function(t,e,i){var n,s,o,a=!1;return void 0===e?(s=Wt(t),n=qt,a=!0):(void 0!==e.x||Array.isArray(e))&&(i=e,s=Wt(t),n=qt,a=!0),n||(n=Wt(t)),s||(s=Wt(e)),i?Vt(n,s,i):(o={forward:function(t,e){return Vt(n,s,t,e)},inverse:function(t,e){return Vt(s,n,t,e)}},a&&(o.oProj=s),o)},{defaultDatum:"WGS84",Proj:Bt,WGS84:new Bt("WGS84"),Point:ue,toPoint:Ut,defs:nt,nadgrid:function(t,e,i){return e instanceof ArrayBuffer?function(t,e,i){var n=!0;void 0!==i&&!1===i.includeErrorFields&&(n=!1);var s=new DataView(e),o=function(t){var e=t.getInt32(8,!1);if(11===e)return!1;e=t.getInt32(8,!0);return!0}(s),a=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:Ct(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,e),fromSemiMinorAxis:t.getFloat64(136,e),toSemiMajorAxis:t.getFloat64(152,e),toSemiMinorAxis:t.getFloat64(168,e)}}(s,o),r=function(t,e,i,n){for(var s=176,o=[],a=0;a<e.nSubgrids;a++){var r=Tt(t,s,i),h=Ot(t,s,r,i,n),l=Math.round(1+(r.upperLongitude-r.lowerLongitude)/r.longitudeInterval),c=Math.round(1+(r.upperLatitude-r.lowerLatitude)/r.latitudeInterval);o.push({ll:[Et(r.lowerLongitude),Et(r.lowerLatitude)],del:[Et(r.longitudeInterval),Et(r.latitudeInterval)],lim:[l,c],count:r.gridNodeCount,cvs:St(h)});var u=16;!1===n&&(u=8),s+=176+r.gridNodeCount*u}return o}(s,a,o,n),h={header:a,subgrids:r};return bt[t]=h,h}(t,e,i):{ready:wt(t,e)}},transform:Ht,mgrs:ee,version:"__VERSION__"});var nn;(nn=en).Proj.projections.add(ye),nn.Proj.projections.add(be),nn.Proj.projections.add(we),nn.Proj.projections.add(Ee),nn.Proj.projections.add(Se),nn.Proj.projections.add(Te),nn.Proj.projections.add(Be),nn.Proj.projections.add(Ie),nn.Proj.projections.add(De),nn.Proj.projections.add(He),nn.Proj.projections.add(Je),nn.Proj.projections.add(ti),nn.Proj.projections.add(ei),nn.Proj.projections.add(ii),nn.Proj.projections.add(ni),nn.Proj.projections.add(si),nn.Proj.projections.add(oi),nn.Proj.projections.add(ai),nn.Proj.projections.add(ri),nn.Proj.projections.add(hi),nn.Proj.projections.add(li),nn.Proj.projections.add(ci),nn.Proj.projections.add(ui),nn.Proj.projections.add(pi),nn.Proj.projections.add(wi),nn.Proj.projections.add(Ii),nn.Proj.projections.add(Di),nn.Proj.projections.add(Fi),nn.Proj.projections.add(Ui),nn.Proj.projections.add(Ki),nn.Proj.projections.add(tn);const sn=a(Object.freeze(Object.defineProperty({__proto__:null,default:en},Symbol.toStringTag,{value:"Module"})));var on;on={exports:{}},function(){var t,e;t=l(),e=sn,on.exports=function(t,e){return e.__esModule&&e.default&&(e=e.default),t.Proj={},t.Proj._isProj4Obj=function(t){return void 0!==t.inverse&&void 0!==t.forward},t.Proj.Projection=t.Class.extend({initialize:function(e,i,n){var s=t.Proj._isProj4Obj(e);this._proj=s?e:this._projFromCodeDef(e,i),this.bounds=s?i:n},project:function(e){var i=this._proj.forward([e.lng,e.lat]);return new t.Point(i[0],i[1])},unproject:function(e,i){var n=this._proj.inverse([e.x,e.y]);return new t.LatLng(n[1],n[0],i)},_projFromCodeDef:function(t,i){if(i)e.defs(t,i);else if(void 0===e.defs[t]){var n=t.split(":");if(n.length>3&&(t=n[n.length-3]+":"+n[n.length-1]),void 0===e.defs[t])throw"No projection definition for code "+t}return e(t)}}),t.Proj.CRS=t.Class.extend({includes:t.CRS,options:{transformation:new t.Transformation(1,0,-1,0)},initialize:function(e,i,n){var s,o,a,r;if(t.Proj._isProj4Obj(e)?(s=(o=e).srsCode,r=i||{},this.projection=new t.Proj.Projection(o,r.bounds)):(s=e,a=i,r=n||{},this.projection=new t.Proj.Projection(s,a,r.bounds)),t.Util.setOptions(this,r),this.code=s,this.transformation=this.options.transformation,this.options.origin&&(this.transformation=new t.Transformation(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales)this._scales=this.options.scales;else if(this.options.resolutions){this._scales=[];for(var h=this.options.resolutions.length-1;h>=0;h--)this.options.resolutions[h]&&(this._scales[h]=1/this.options.resolutions[h])}this.infinite=!this.options.bounds},scale:function(t){var e,i=Math.floor(t);return t===i?this._scales[t]:(e=this._scales[i])+(this._scales[i+1]-e)*(t-i)},zoom:function(t){var e,i,n=this._closestElement(this._scales,t),s=this._scales.indexOf(n);return t===n?s:void 0===n?-1/0:(i=s+1,void 0===(e=this._scales[i])?1/0:(t-n)/(e-n)+s)},distance:t.CRS.Earth.distance,R:t.CRS.Earth.R,_closestElement:function(t,e){for(var i,n=t.length;n--;)t[n]<=e&&(void 0===i||i<t[n])&&(i=t[n]);return i}}),t.Proj.GeoJSON=t.GeoJSON.extend({initialize:function(e,i){this._callLevel=0,t.GeoJSON.prototype.initialize.call(this,e,i)},addData:function(e){var i;e&&(e.crs&&"name"===e.crs.type?i=new t.Proj.CRS(e.crs.properties.name):e.crs&&e.crs.type&&(i=new t.Proj.CRS(e.crs.type+":"+e.crs.properties.code)),void 0!==i&&(this.options.coordsToLatLng=function(e){var n=t.point(e[0],e[1]);return i.projection.unproject(n)})),this._callLevel++;try{t.GeoJSON.prototype.addData.call(this,e)}finally{this._callLevel--,0===this._callLevel&&delete this.options.coordsToLatLng}}}),t.Proj.geoJson=function(e,i){return new t.Proj.GeoJSON(e,i)},t.Proj.ImageOverlay=t.ImageOverlay.extend({initialize:function(e,i,n){t.ImageOverlay.prototype.initialize.call(this,e,null,n),this._projectedBounds=i},_animateZoom:function(e){var i=this._map.getZoomScale(e.zoom),n=t.point(this._projectedBounds.min.x,this._projectedBounds.max.y),s=this._projectedToNewLayerPoint(n,e.zoom,e.center);t.DomUtil.setTransform(this._image,s,i)},_reset:function(){var e=this._map.getZoom(),i=this._map.getPixelOrigin(),n=t.bounds(this._transform(this._projectedBounds.min,e)._subtract(i),this._transform(this._projectedBounds.max,e)._subtract(i)),s=n.getSize();t.DomUtil.setPosition(this._image,n.min),this._image.style.width=s.x+"px",this._image.style.height=s.y+"px"},_projectedToNewLayerPoint:function(t,e,i){var n=this._map.getSize()._divideBy(2),s=this._map.project(i,e)._subtract(n)._round().add(this._map._getMapPanePos());return this._transform(t,e)._subtract(s)},_transform:function(t,e){var i=this._map.options.crs,n=i.transformation,s=i.scale(e);return n.transform(t,s)}}),t.Proj.imageOverlay=function(e,i,n){return new t.Proj.ImageOverlay(e,i,n)},t.Proj}(t,e)}();const an=new u.Proj.CRS("EPSG:900913","+proj=merc +a=6378206 +b=6356584.314245179 +lat_ts=0.0 +lon_0=0.0 +x_0=0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs",{resolutions:function(){var t=[];t[0]=Math.pow(2,18);for(var e=1;e<21;e++)t[e]=Math.pow(2,18-e);return t}(),origin:[0,0],bounds:u.bounds([20037508.342789244,0],[0,20037508.342789244])}),rn=u.Circle.extend({options:{},initialize:function(t,e,i){e&&(this._startAngle=e.startAngle-90,this._endAngle=e.endAngle-90,this.angle=this._endAngle-this._startAngle,this.type=e.type,L.Circle.prototype.initialize.call(this,t,e,i))},_updatePath(){switch(this.type){case ln.Scan:this._renderer._updateSector1(this);break;case ln.Wave:case ln.Breath:this._renderer._updateCircle(this);break;default:this._renderer._updateSector(this)}},setStyle:function(t){this._startAngle=t.startAngle-90,this._endAngle=t.endAngle-90,L.Circle.prototype.setStyle.call(this,t)}}),hn=L.Canvas.extend({options:{collisionFlg:!0},initialize(t){t=L.Util.setOptions(this,t),L.Util.stamp(this),this._layers=this._layers||{}},_handleMouseHover(t,e){let i,n;for(i in this._drawnLayers)n=this._drawnLayers[i],n.options.interactive&&n._containsPoint(e)&&(L.DomUtil.addClass(this._containerText,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n);this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_handleMouseOut(t,e){const i=this._hoveredLayer;!i||"mouseout"!==t.type&&i._containsPoint(e)||(L.DomUtil.removeClass(this._containerText,"leaflet-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null)},_updateTransform(t,e){L.Canvas.prototype._updateTransform.call(this,t,e);const i=this._map.getZoomScale(e,this._zoom),n=L.DomUtil.getPosition(this._container),s=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),a=this._map.project(t,e).subtract(o),r=s.multiplyBy(-i).add(n).add(s).subtract(a);L.Browser.any3d?L.DomUtil.setTransform(this._containerText,r,i):L.DomUtil.setPosition(this._containerText,r)},_initContainer(t){L.Canvas.prototype._initContainer.call(this),this._containerText=document.createElement("canvas"),L.DomEvent.on(this._containerText,"mousemove",L.Util.throttle(this._onMouseMove,32,this),this).on(this._containerText,"dblclick mousedown mouseup contextmenu",this._onClick,this).on(this._containerText,"mouseout",this._handleMouseOut,this),this._ctxLabel=this._containerText.getContext("2d"),L.DomUtil.addClass(this._containerText,"leaflet-zoom-animated2"),this.getPane().appendChild(this._containerText)},_update(){this._textList=[],L.Renderer.prototype._update.call(this);const t=this._bounds,e=this._containerText,i=t.getSize(),n=L.Browser.retina?2:1;L.DomUtil.setPosition(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",e.style.zIndex="4",this._container.style.zIndex="3",L.Browser.retina&&this._ctxLabel.scale(2,2),this._ctxLabel.translate(-t.min.x,-t.min.y),L.Canvas.prototype._update.call(this)},_updatePoly(t,e){L.Canvas.prototype._updatePoly.call(this,t,e),this._text(this._ctxLabel,t)},_updateCircle(t){if(t.options.gradient){const e=this._ctx,i=t._point,n=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||n)/n,o=e.createRadialGradient(i.x,i.y/s,0,i.x,i.y/s,n);o.addColorStop(.8,"rgba(0, 255, 255, 0)"),o.addColorStop(1,t.fillColor.toString()),t.options.fillColor=o}L.Canvas.prototype._updateCircle.call(this,t),this._text(this._ctxLabel,t)},_updateSector1(t){const e=parseFloat(t.options.scaleSpeed),i=parseFloat(t.options.scaleAngle);if(t.options._currentAngle+=e,t._map)var n=t._map.latLngToLayerPoint(t._latlng);else n=t._point;const s=this._ctx,o=Math.max(Math.round(t._radius),1),a=(Math.max(Math.round(t._radiusY),1)||o)/o,r=(t,e)=>({x:n.x+t*Math.cos(Math.PI/180*e),y:n.y+t*Math.sin(Math.PI/180*e)});for(let h=0,l=i;h<l;h++){let e,l;360===t.angle?(e=t.options._currentAngle-h,l=t.options._currentAngle-h+1):t.options._currentAngle>t.angle?(e=t.options._currentAngle-h-1-t.angle,l=t.options._currentAngle-h-t.angle):(e=-t.options._currentAngle+h+1+t.angle,l=-t.options._currentAngle+h+t.angle);const c=r(o,e+t._startAngle),u=r(o,l+t._startAngle),p=.7-h/i;s.beginPath(),s.fillStyle=t.fillColor.setAlpha(p).toString(),s.moveTo(n.x,n.y/a),s.lineTo(c.x,c.y),s.lineTo(u.x,u.y),s.fill()}this._text(this._ctxLabel,t)},_updateSector2(t){if(!this._drawing||t._empty())return;if(t._map)var e=t._map.latLngToLayerPoint(t._latlng);else e=t._point;const i=this._ctx,n=t._startAngle/180*Math.PI,s=t._endAngle/180*Math.PI,o=Math.max(Math.round(t._radius),1),a=(Math.max(Math.round(t._radiusY),1)||o)/o;1!==a&&(i.save(),i.scale(1,a)),i.beginPath(),i.moveTo(e.x,e.y/a),i.arc(e.x,e.y/a,o,n,s,!1),i.closePath(),1!==a&&i.restore();const r=i.createRadialGradient(e.x,e.y/a,0,e.x,e.y/a,o);r.addColorStop(0,"rgb(0,0,255)"),r.addColorStop(1,"rgb(255,255,0)"),t.options.fillColor=r,this._fillStroke(i,t),this._text(this._ctxLabel,t)},_updateSector(t){if(!this._drawing||t._empty())return;if(t._map)var e=t._map.latLngToLayerPoint(t._latlng);else e=t._point;const i=this._ctx,n=t._startAngle/180*Math.PI,s=t._endAngle/180*Math.PI,o=Math.max(Math.round(t._radius),1),a=(Math.max(Math.round(t._radiusY),1)||o)/o;1!==a&&(i.save(),i.scale(1,a)),i.beginPath(),i.moveTo(e.x,e.y/a),i.arc(e.x,e.y/a,o,n,s,!1),i.closePath(),1!==a&&i.restore(),this._fillStroke(i,t),this._text(this._ctxLabel,t)},_updateRadarGrid(t){if(!this._drawing||t._empty())return;if(t._map)var e=t._map.latLngToLayerPoint(t._latlng);else e=t._point;const i=this._ctx,n=t._startAngle/180*Math.PI,s=t._endAngle/180*Math.PI,o=Math.max(Math.round(t._radius),1),a=(Math.max(Math.round(t._radiusY),1)||o)/o;1!==a&&(i.save(),i.scale(1,a)),i.beginPath(),i.moveTo(e.x,e.y/a),i.arc(e.x,e.y/a,o,n,s,!1),i.closePath(),1!==a&&i.restore(),t.options.fillColor=t.options.color,this._fillStroke(i,t),this._text(this._ctxLabel,t)},_updateRing(t){var e=this._ctx;if(!this._drawing||t._empty())return;const i=t._point;e=this._ctx;const n=Math.max(Math.round(t._radiuMaxs),1),s=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||s)/s;1!==o&&(e.save(),e.scale(1,o)),e.beginPath(),e.arc(i.x,i.y/o,n,0,2*Math.PI,!1),e.moveTo(i.x+s/o,i.y/o),e.arc(i.x,i.y/o,s,0,2*Math.PI,!0),e.closePath(),1!==o&&e.restore(),this._fillStroke(e,t),this._text(this._ctxLabel,t)},_initLine(t){},_text(t,e){if(null!=e.options.text&&this._map.getZoom()>14){t.globalAlpha=1;let i=e._point;if(null==i){if(0==e._parts.length||0==e._parts[0].length)return;i=this._getCenter(e._parts[0])}const n=7,s=5;t.lineWidth=4,t.font="12px 'Meiryo'";const o=t.measureText(e.options.text).width+i.x,a=i.y+s+20,r=L.bounds(L.point(i.x+n,i.y+s),L.point(o,a));if(this.options.collisionFlg)for(const t in this._textList){if(this._textList[t].intersects(r))return}this._textList.push(r),this._drawBubble(t,i.x,i.y,t.measureText(e.options.text).width+10,20),null==e.options.textColor?t.fillStyle="blue":t.fillStyle=e.options.textColor,t.fillText(e.options.text,i.x+n,i.y+s)}},_drawBubble(t,e,i,n,s){t.fillStyle="rgba(212,212,212,.8)",t.beginPath(),t.moveTo(e,i),t.lineTo(e+3,i+3),t.lineTo(e+3,i+s/2),t.lineTo(e+n,i+s/2),t.lineTo(e+n,i-s/2),t.lineTo(e+3,i-s/2),t.lineTo(e+3,i),t.fill()},_updateDashArray(t){if("string"==typeof t.options.dashArray){const e=t.options.dashArray.split(/[, ]+/),i=[];let n,s;for(s=0;s<e.length;s++){if(n=Number(e[s]),isNaN(n))return;i.push(n)}t.options._dashArray=i,t.options._dashOffset=t.options.dashOffset}else t.options._dashArray=t.options.dashArray,t.options._dashOffset=t.options.dashOffset||0},_fillStroke(t,e){const 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.lineDashOffset=e.options&&e.options._dashOffset||0),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_getCenter(t){let e,i,n,s,o,a,r;const h=t.length;if(!h)return null;for(e=0,i=0;e<h-1;e++)i+=t[e].distanceTo(t[e+1])/2;if(0===i)return t[0];for(e=0,s=0;e<h-1;e++)if(o=t[e],a=t[e+1],n=o.distanceTo(a),s+=n,s>i){r=(s-i)/n;const t=[a.x-r*(a.x-o.x),a.y-r*(a.y-o.y)];return L.point(t[0],t[1])}}}),ln={Wave:0,Scan:1,Breath:2},cn=L.LayerGroup.extend({options:{fillColor:"#ff0",color:"#fff",axis:{show:!1,color:"#000"},scale:{show:!1,splitNum:5,lineColor:"#000",labelColor:"#000",minZoom:0,maxZoom:23},material:{show:!1,type:ln.Wave,color:"#0ff",speed:10,clockwise:!0,angle:60}},initialize(t){e.ObjectUtil.deepAssign(this.options,t);const{lng:i,lat:n}=this.options.center;e.GeoUtil.isLnglat(i,n)||e.ExceptionUtil.throwCoordinateException(),this.latLng=new L.LatLng(n,i),this.labelTextCollision=new hn({collisionFlg:!0,padding:.5}),this.axisEntity=[],this.scaleCircleEntity=[],this.labelCircleEntity=[],L.LayerGroup.prototype.initialize.call(this,t)},onAdd(t){this.initializeCircle(),this.initializeAxis(),this.initializeScale(),this.initializeMaterial()},onRemove(){L.LayerGroup.prototype.removeLayer.call(this,this.circleEntity),L.LayerGroup.prototype.removeLayer.call(this,this.materialEntity),this.axisEntity.forEach(t=>{L.LayerGroup.prototype.removeLayer.call(this,t)}),this.scaleCircleEntity.forEach(t=>{L.LayerGroup.prototype.removeLayer.call(this,t)}),this.labelCircleEntity.forEach(t=>{L.LayerGroup.prototype.removeLayer.call(this,t)}),this.stopMotion()},initializeCircle(){var t;null==(t=this.circleEntity)||t.remove(),this.circleEntity=new L.Circle(this.latLng,this.getCircleStyle()),L.LayerGroup.prototype.addLayer.call(this,this.circleEntity)},initializeAxis(){if(this.axisEntity.forEach(t=>t.remove()),!this.options.axis.show)return;const t=this.circleEntity.getBounds();this.axisEntity[0]=L.polyline([[t._northEast.lat,this.latLng.lng],[t._southWest.lat,this.latLng.lng]],{weight:1,color:this.options.axis.color}),L.LayerGroup.prototype.addLayer.call(this,this.axisEntity[0]),this.axisEntity[1]=L.polyline([[this.latLng.lat,t._northEast.lng],[this.latLng.lat,t._southWest.lng]],{weight:1,color:this.options.axis.color}),L.LayerGroup.prototype.addLayer.call(this,this.axisEntity[1])},initializeScale(){if(this.scaleCircleEntity.forEach(t=>t.remove()),this.labelCircleEntity.forEach(t=>t.remove()),this.options.scale.show)for(let t=1,i=this.options.scale.splitNum;t<=i;t++){const n=this.options.radius*t/i;if(n){const i=this.scaleCircleEntity[t-1]=L.circle(this.latLng,n,{color:this.options.scale.lineColor,weight:1,fill:!1,renderer:L.canvas()});L.LayerGroup.prototype.addLayer.call(this,i);const s=i.getBounds(),o=this.labelCircleEntity[t-1]=new L.Text(L.latLng(this.latLng.lat,s.getEast()),e.MathUtil.formatLength(n),{color:this.options.scale.labelColor,offset:[24,16],minZoom:this.options.scale.minZoom,maxZoom:this.options.scale.maxZoom,minificationScale:1});L.LayerGroup.prototype.addLayer.call(this,o)}}},initializeMaterial(){var t;if(null==(t=this.materialEntity)||t.remove(),this.stopMotion(),this.options.material.show){switch(this.options.material.type){case ln.Wave:this.materialEntity=new rn(this.latLng,{...this.getMaterialStyle(),gradient:!0,_currentRadius:0}),this._motionWave();break;case ln.Scan:this.materialEntity=new rn(this.latLng,{...this.getMaterialStyle(),_currentAngle:0,scaleSpeed:this.options.material.speed}),this._motionScan();break;case ln.Breath:this.counter=this.createCounter(0,100,this.options.material.speed),this.materialEntity=new rn(this.latLng,{...this.getMaterialStyle(),gradient:!0,_currentOpacity:0}),this._motionBreath()}this.materialEntity&&L.LayerGroup.prototype.addLayer.call(this,this.materialEntity)}},getMaterialStyle(){return{fillColor:this.options.material.color,weight:0,radius:this.options.radius,scaleAngle:this.options.material.angle,renderer:this.labelTextCollision,angle:360,startAngle:0,endAngle:360,type:this.options.material.type}},getCircleStyle(){return{radius:this.options.radius,weight:1,color:this.options.color,fill:!!this.options.fillColor,fillColor:this.options.fillColor,renderer:L.canvas()}},_motionScan(){this.materialEntity.setStyle(this.getMaterialStyle()),this.animation=L.Util.requestAnimFrame(()=>{this._motionScan()},this)},_motionWave(){this.materialEntity.options._currentRadius+=this.options.material.speed,this.materialEntity.options._currentRadius>this.options.radius&&(this.materialEntity.options._currentRadius=0),this.materialEntity.setRadius(this.materialEntity.options._currentRadius),this.animation=L.Util.requestAnimFrame(()=>{this._motionWave()},this)},_motionBreath(){const t=this.counter.next()/100;1===t?this.counter.setMode(!1):0===t&&this.counter.setMode(!0),this.materialEntity.setStyle({fillOpacity:t}),this.animation=L.Util.requestAnimFrame(()=>{this._motionBreath()},this)},stopMotion(){L.Util.cancelAnimFrame(this.animation)},setStyle(t={}){e.ObjectUtil.deepAssign(this.options,t),this.circleEntity.setStyle(this.getCircleStyle()),this.initializeAxis(),this.initializeScale(),this.initializeMaterial()},createCounter(t=5,e=30,i=1){let n=t;return{mode:!0,next(){return this.mode&&n<=e?n+=i:!this.mode&&n>=t&&(n-=i),n},setMode(t){this.mode=t}}}});cn.CircleMaterialType=ln;const un={TWO_PI:2*Math.PI,HALF_PI:Math.PI/2,FITTING_COUNT:100,ZERO_TOLERANCE:1e-4},pn=function(t){return L.Projection.Mercator.project(t)},dn=function(t){return L.Projection.Mercator.unproject(L.point(t))},_n=function(t){const e=[];for(let i=0;i<t.length;i++){const n=dn(t[i]);e.push(n)}return e},mn=function(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))},gn=function(t,e){let i;const n=Math.asin(Math.abs(e[1]-t[1])/mn(t,e));return e[1]>=t[1]&&e[0]>=t[0]?i=n+Math.PI:e[1]>=t[1]&&e[0]<t[0]?i=un.TWO_PI-n:e[1]<t[1]&&e[0]<t[0]?i=n:e[1]<t[1]&&e[0]>=t[0]&&(i=Math.PI-n),i},fn=function(t,e,i,n,s){const o=gn(t,e),a=s?o+i:o-i,r=n*Math.cos(a),h=n*Math.sin(a);return[e[0]+r,e[1]+h]},yn=function(t){let e=0;for(let i=0;i<t.length-1;i++)e+=mn(t[i],t[i+1]);return e},An=function(t){return Math.pow(yn(t),.99)},vn=function(t,e,i){return(i[1]-t[1])*(e[0]-t[0])>(e[1]-t[1])*(i[0]-t[0])},Mn=function(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]},Ln=function(t){if(t.length<=2)return t;const e=[],i=t.length-2-1;e.push(t[0]);for(let n=0;n<=i;n++)for(let i=0;i<=1;i+=.05){let s=0,o=0;for(let e=0;e<=2;e++){const a=xn(e,i);s+=a*t[n+e][0],o+=a*t[n+e][1]}e.push([s,o])}return e.push(t[t.length-1]),e},xn=function(t,e){return 0==t?Math.pow(e-1,2)/2:1==t?(-2*Math.pow(e,2)+2*e+1)/2:2==t?Math.pow(e,2)/2:0},bn=function(t,e,i){const n=gn(e,t)-gn(e,i);return n<0?n+un.TWO_PI:n},wn=function(t){if(t.length<=2)return t;const e=[],i=t.length-1;for(let n=0;n<=1;n+=.01){let s=0,o=0;for(let e=0;e<=i;e++){const a=Pn(i,e),r=Math.pow(n,e),h=Math.pow(1-n,i-e);s+=a*r*h*t[e][0],o+=a*r*h*t[e][1]}e.push([s,o])}return e.push(t[i]),e},Pn=function(t,e){return kn(t)/(kn(e)*kn(t-e))},kn=function(t){if(t<=1)return 1;if(2===t)return 2;if(3===t)return 6;if(4===t)return 24;if(5===t)return 120;let e=1;for(let i=1;i<=t;i++)e*=i;return e},En=function(t,e,i,n){const s=Cn(e,i,n),o=Math.sqrt(s[0]*s[0]+s[1]*s[1]),a=s[0]/o,r=s[1]/o,h=mn(e,i),l=mn(i,n);if(o>un.ZERO_TOLERANCE)if(vn(e,i,n)){var c=t*h,u=i[0]-c*r,p=i[1]+c*a,d=[u,p];c=t*l;var _=[u=i[0]+c*r,p=i[1]-c*a]}else c=t*h,d=[u=i[0]+c*r,p=i[1]-c*a],c=t*l,_=[u=i[0]-c*r,p=i[1]+c*a];else d=[u=i[0]+t*(e[0]-i[0]),p=i[1]+t*(e[1]-i[1])],_=[u=i[0]+t*(n[0]-i[0]),p=i[1]+t*(n[1]-i[1])];return[d,_]},Cn=function(t,e,i){let n=t[0]-e[0],s=t[1]-e[1];const o=Math.sqrt(n*n+s*s);n/=o,s/=o;let a=i[0]-e[0],r=i[1]-e[1];const h=Math.sqrt(a*a+r*r);a/=h,r/=h;return[n+a,s+r]},Sn=function(t,e,i,n,s){const o=1-(t=Math.max(Math.min(t,1),0)),a=t*t,r=a*t,h=o*o,l=h*o;return[l*e[0]+3*h*t*i[0]+3*o*a*n[0]+r*s[0],l*e[1]+3*h*t*i[1]+3*o*a*n[1]+r*s[1]]},Tn=u.Handler.extend({style:{color:"#f00",weight:2},addHooks(){this._map.on("mousemove",this._mouseMove,this),this._map.on("click",this._mouseClick,this),this._map.on("dblclick",this._mouseDblClick,this)},removeHooks(){this._map.off("mousemove",this._mouseMove,this),this._map.off("click",this._mouseClick,this),this._map.off("dblclick",this._mouseDblClick,this)},_mouseMove(t){this.tooltip.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.plotShape.setPoints([...this.latlngs,t.latlng])},_mouseClick(t){this.latlngs=[...this.latlngs.filter(e=>e.lng!==t.latlng.lng&&e.lat!==t.latlng.lat),t.latlng],[On.ASSAULT_DIRECTION,On.FINE_ARROW].includes(this.type)?(this.tooltip.setContent("双击完成绘制形状"),this._map.off("click",this._mouseClick,this)):this.tooltip.setContent("点击继续绘制形状,双击完成绘制形状")},_mouseDblClick(t){this.latlngs=[...this.latlngs.filter(e=>e.lng!==t.latlng.lng&&e.lat!==t.latlng.lat),t.latlng],this.plotShape.setPoints(this.latlngs),this.disable(),this.finishedCallback&&this.finishedCallback(this.plotShape)},enable(t,e){var i,n;this.type=t,this.finishedCallback=e,this.latlngs=[],this.graphicLayer=L.featureGroup([]).addTo(this._map),this.plotShape=Dn(t,[],this.style).addTo(this.graphicLayer),null==(n=(i=this._map).setCursor)||n.call(i,"draw"),this.tooltip=L.tooltip().setContent("点击开始绘制形状"),L.Handler.prototype.enable.call(this)},disable(){this.type=void 0,this._map._container.style.cursor="default",this.latlngs=[],this._map.closeTooltip(this.tooltip),L.Handler.prototype.disable.call(this)}});u.Map.addInitHook("addHandler","plotDrawHandler",Tn);const On={STRAIGHT_ARROW:"straightarrow",ASSAULT_DIRECTION:"assaultdirection",ATTACK_ARROW:"attackarrow",TAILED_ATTACK_ARROW:"tailedattackarrow",SQUAD_COMBAT:"squadcombat",TAILED_SQUAD_COMBAT:"tailedsquadcombat",FINE_ARROW:"finearrow",DOUBLE_ARROW:"doublearrow",GATHERING_PLACE:"gatheringplace"},Bn=Tn,In={isPlot:()=>!0,getBaseType(){let t=this.toGeoJSON().geometry.type;return"MultiLineString"!==t&&"LineString"!==t||(t="Polyline"),t},setPoints(t=[]){this._bounds=new L.LatLngBounds,this._setLatLngs([]),this._points=this._convertLatLngs(t)||[],this._proPoints=function(t){const e=[];for(let i=0;i<t.length;i++){const n=pn(t[i]);e.push([n.x,n.y])}return e}(this._points),this.getPointCount()>=1&&this.generate()},setProPoints(t){const e=_n(t);this.setPoints(e)},getCtrlPoints(){let t=[];switch(this.type){case On.SECTOR:case On.ARC:t=this.getPoints(),t.length<3&&(t=this._ctrlPnts);break;case On.CIRCLE:t=this.getPoints(),t.length<2&&(t=this._ctrlPnts);break;default:t=this.getPoints()}return t},getPoints(){return this._points},getProPoints(){return this._proPoints},getPointCount(){return this._proPoints.length||0},toPlotJSON(){return{type:this.type,points:this.getPoints(),options:this.options}},finishDrawing(){}},Dn=function(t,e,i){switch(t){case On.GATHERING_PLACE:return new Rn(e,i);case On.STRAIGHT_ARROW:return new zn(e,i);case On.ASSAULT_DIRECTION:return new Nn(e,i);case On.ATTACK_ARROW:return new jn(e,i);case On.FINE_ARROW:return new Gn(e,i);case On.DOUBLE_ARROW:return new Hn(e,i);case On.TAILED_ATTACK_ARROW:return new Fn(e,i);case On.SQUAD_COMBAT:return new Un(e,i);case On.TAILED_SQUAD_COMBAT:return new Zn(e,i)}return null},Rn=L.Polygon.extend({includes:In,options:{t:.4,fixPointCount:3},initialize(t,e){L.setOptions(this,e),this.type=On.GATHERING_PLACE,this.setPoints(t)},generate(){let t=this._proPoints.concat([]);if(t.length<2)return void this._setLatLngs([]);if(2===this.getPointCount()){const e=Mn(t[0],t[1]),i=mn(t[0],e)/.9,n=fn(t[0],e,un.HALF_PI,i,!0);t=[t[0],n,t[1]]}const e=Mn(t[0],t[2]);t.push(e,t[0],t[1]);let i=[];for(let o=0;o<t.length-2;o++){const e=t[o],n=t[o+1],s=t[o+2],a=En(this.options.t,e,n,s);i=i.concat(a)}const n=i.length;i=[i[n-1]].concat(i.slice(0,n-1));const s=[];for(let o=0;o<t.length-2;o++){const e=t[o],n=t[o+1];s.push(e);for(let t=0;t<=un.FITTING_COUNT;t++){const a=Sn(t/un.FITTING_COUNT,e,i[2*o],i[2*o+1],n);s.push(a)}s.push(n)}this._setLatLngs([_n(s)]),this.redraw()}}),zn=L.Polygon.extend({includes:In,options:{fixPointCount:2,maxArrowLength:3e6,arrowLengthScale:8,fillOpacity:1},initialize(t,e){L.setOptions(this,e),this.type=On.STRAIGHT_ARROW,this.setPoints(t)},generate(){if(this.getPointCount()<2)return;const t=this._proPoints,e=t[t.length-2],i=t[t.length-1],n=t.slice(0,-2);let s=mn(e,i)/this.options.arrowLengthScale;s=s>this.options.maxArrowLength?this.options.maxArrowLength:s;const o=fn(e,i,Math.PI/8,s,!1),a=fn(e,i,Math.PI/8,s,!0),r=Mn(o,a),h=[...n,e,r,o,i,a,r,e,...n.reverse()];this._setLatLngs(_n(h)),this.redraw()}}),Gn=L.Polygon.extend({includes:In,options:{tailWidthFactor:.15,neckWidthFactor:.2,headWidthFactor:.25,headAngle:Math.PI/8.5,neckAngle:Math.PI/13,fixPointCount:2},initialize(t,e){L.setOptions(this,e),this.type=On.FINE_ARROW,this.setPoints(t)},generate(){if(this.getPointCount()<2)return void this._setLatLngs([]);const t=this._proPoints,e=t[0],i=t[1],n=An(t),s=n*this.options.tailWidthFactor,o=n*this.options.neckWidthFactor,a=n*this.options.headWidthFactor,r=fn(i,e,un.HALF_PI,s,!0),h=fn(i,e,un.HALF_PI,s,!1),l=fn(e,i,this.options.headAngle,a,!1),c=fn(e,i,this.options.headAngle,a,!0),u=[r,fn(e,i,this.options.neckAngle,o,!1),l,i,c,fn(e,i,this.options.neckAngle,o,!0),h];this._setLatLngs([_n(u)]),this.redraw()}}),Nn=Gn.extend({options:{tailWidthFactor:.2,neckWidthFactor:.25,headWidthFactor:.3,headAngle:Math.PI/4,neckAngle:.17741*Math.PI,fixPointCount:2},initialize(t,e){L.setOptions(this,e),this.type=On.ASSAULT_DIRECTION,this.setPoints(t)}}),jn=L.Polygon.extend({includes:In,options:{headHeightFactor:.18,headWidthFactor:.3,neckHeightFactor:.85,neckWidthFactor:.15,headTailFactor:.8},initialize(t,e){L.setOptions(this,e),this.type=On.ATTACK_ARROW,this.setPoints(t)},generate(){if(this.getPointCount()<2)return void this._setLatLngs([]);if(2===this.getPointCount())return this._setLatLngs(this._points),void this.redraw();const t=this._proPoints;let e=t[0],i=t[1];vn(t[0],t[1],t[2])&&(e=t[1],i=t[0]);const n=[Mn(e,i)].concat(t.slice(2)),s=this.getArrowHeadPoints(n,e,i),o=s[0],a=s[4],r=mn(e,i)/An(n),h=this.getArrowBodyPoints(n,o,a,r),l=h.length;let c=[e].concat(h.slice(0,l/2));c.push(o);let u=[i].concat(h.slice(l/2,l));u.push(a),c=Ln(c),u=Ln(u);const p=c.concat(s,u.reverse());this._setLatLngs([_n(p)]),this.redraw()},getArrowHeadPoints(t,e,i){let n=An(t),s=n*this.options.headHeightFactor;const o=t[t.length-1];n=mn(o,t[t.length-2]);const a=mn(e,i);s>a*this.options.headTailFactor&&(s=a*this.options.headTailFactor);const r=s*this.options.headWidthFactor,h=s*this.options.neckWidthFactor;s=s>n?n:s;const l=s*this.options.neckHeightFactor,c=fn(t[t.length-2],o,0,s,!0),u=fn(t[t.length-2],o,0,l,!0),p=fn(o,c,un.HALF_PI,r,!1),d=fn(o,c,un.HALF_PI,r,!0);return[fn(o,u,un.HALF_PI,h,!1),p,o,d,fn(o,u,un.HALF_PI,h,!0)]},getArrowBodyPoints(t,e,i,n){const s=yn(t),o=An(t)*n,a=(o-mn(e,i))/2;let r=0;const h=[],l=[];for(let c=1;c<t.length-1;c++){const e=bn(t[c-1],t[c],t[c+1])/2;r+=mn(t[c-1],t[c]);const i=(o/2-r/s*a)/Math.sin(e),n=fn(t[c-1],t[c],Math.PI-e,i,!0),u=fn(t[c-1],t[c],e,i,!1);h.push(n),l.push(u)}return h.concat(l)}}),Fn=jn.extend({options:{tailWidthFactor:.1,swallowTailFactor:1},initialize(t,e){L.setOptions(this,e),this.type=On.TAILED_ATTACK_ARROW,this.swallowTailPnt=null,this.setPoints(t)},generate(){if(this.getPointCount()<2)return void this._setLatLngs([]);if(2===this.getPointCount())return this._setLatLngs(this._points),void this.redraw();const t=this._proPoints;let e=t[0],i=t[1];vn(t[0],t[1],t[2])&&(e=t[1],i=t[0]);const n=[Mn(e,i)].concat(t.slice(2)),s=this.getArrowHeadPoints(n,e,i),o=s[0],a=s[4],r=mn(e,i),h=An(n),l=h*this.options.tailWidthFactor*this.options.swallowTailFactor;this.swallowTailPnt=fn(n[1],n[0],0,l,!0);const c=r/h,u=this.getArrowBodyPoints(n,o,a,c),p=u.length;let d=[e].concat(u.slice(0,p/2));d.push(o);let _=[i].concat(u.slice(p/2,p));_.push(a),d=Ln(d),_=Ln(_);const m=d.concat(s,_.reverse(),[this.swallowTailPnt,d[0]]);this._setLatLngs([_n(m)]),this.redraw()}}),Un=jn.extend({options:{tailWidthFactor:.1},initialize(t,e){L.setOptions(this,e),this.type=On.SQUAD_COMBAT,this.setPoints(t)},generate(){if(this.getPointCount()<2)return void this._setLatLngs([]);const t=this._proPoints,e=this.getTailPoints(t),i=this.getArrowHeadPoints(t,e[0],e[1]),n=i[0],s=i[4],o=this.getArrowBodyPoints(t,n,s,this.options.tailWidthFactor),a=o.length;let r=[e[0]].concat(o.slice(0,a/2));r.push(n);let h=[e[1]].concat(o.slice(a/2,a));h.push(s),r=Ln(r),h=Ln(h);const l=r.concat(i,h.reverse());this._setLatLngs([_n(l)]),this.redraw()},getTailPoints(t){const e=An(t)*this.options.tailWidthFactor;return[fn(t[1],t[0],un.HALF_PI,e,!1),fn(t[1],t[0],un.HALF_PI,e,!0)]}}),Zn=jn.extend({options:{tailWidthFactor:.1,swallowTailFactor:1},initialize(t,e){L.setOptions(this,e),this.type=On.TAILED_SQUAD_COMBAT,this.setPoints(t)},generate(){if(this.getPointCount()<2)return void this._setLatLngs([]);const t=this._proPoints,e=this.getTailPoints(t),i=this.getArrowHeadPoints(t,e[0],e[2]),n=i[0],s=i[4],o=this.getArrowBodyPoints(t,n,s,this.options.tailWidthFactor),a=o.length;let r=[e[0]].concat(o.slice(0,a/2));r.push(n);let h=[e[2]].concat(o.slice(a/2,a));h.push(s),r=Ln(r),h=Ln(h);const l=r.concat(i,h.reverse(),[e[1],r[0]]);this._setLatLngs([_n(l)]),this.redraw()},getTailPoints(t){const e=An(t)*this.options.tailWidthFactor,i=fn(t[1],t[0],un.HALF_PI,e,!1),n=fn(t[1],t[0],un.HALF_PI,e,!0),s=e*this.options.swallowTailFactor;return[i,fn(t[1],t[0],0,s,!0),n]}}),Hn=L.Polygon.extend({includes:In,options:{headHeightFactor:.25,headWidthFactor:.3,neckHeightFactor:.85,neckWidthFactor:.15,fixPointCount:4},initialize(t,e){L.setOptions(this,e),this.type=On.DOUBLE_ARROW,this.connPoint=null,this.tempPoint4=null,this.setPoints(t)},finishDrawing(){3===this.getPointCount()&&null!=this.tempPoint4&&this._proPoints.push(this.tempPoint4),null!=this.connPoint&&this._proPoints.push(this.connPoint)},generate(){const t=this.getPointCount();if(t<2)return void this._setLatLngs([]);if(2===t)return this._setLatLngs(this._points),void this.redraw();const e=this._proPoints[0],i=this._proPoints[1],n=this._proPoints[2];let s,o;this.tempPoint4=3===t?this.getTempPoint4(e,i,n):this._proPoints[3],this.connPoint=3===t||4===t?Mn(e,i):this._proPoints[4],vn(e,i,n)?(s=this.getArrowPoints(e,this.connPoint,this.tempPoint4,!1),o=this.getArrowPoints(this.connPoint,i,n,!0)):(s=this.getArrowPoints(i,this.connPoint,n,!1),o=this.getArrowPoints(this.connPoint,e,this.tempPoint4,!0));const a=s.length,r=(a-5)/2,h=s.slice(0,r),l=s.slice(r,r+5);let c=s.slice(r+5,a),u=o.slice(0,r);const p=o.slice(r,r+5),d=o.slice(r+5,a);u=wn(u);const _=wn(d.concat(h.slice(1)));c=wn(c);const m=u.concat(p,_,l,c);this._setLatLngs([_n(m)]),this.redraw()},getArrowPoints(t,e,i,n){const s=Mn(t,e),o=mn(s,i);let a=fn(i,s,0,.3*o,!0),r=fn(i,s,0,.5*o,!0);a=fn(s,a,un.HALF_PI,o/5,n),r=fn(s,r,un.HALF_PI,o/4,n);const h=[s,a,r,i],l=this.getArrowHeadPoints(h,this.options.headHeightFactor,this.options.headWidthFactor,this.options.neckHeightFactor,this.options.neckWidthFactor),c=l[0],u=l[4],p=mn(t,e)/An(h)/2,d=this.getArrowBodyPoints(h,c,u,p),_=d.length;let m=d.slice(0,_/2),g=d.slice(_/2,_);return m.push(c),g.push(u),m=m.reverse(),m.push(e),g=g.reverse(),g.push(t),m.reverse().concat(l,g)},getArrowHeadPoints(t,e,i){const n=An(t)*this.options.headHeightFactor,s=t[t.length-1];mn(e,i);const o=n*this.options.headWidthFactor,a=n*this.options.neckWidthFactor,r=n*this.options.neckHeightFactor,h=fn(t[t.length-2],s,0,n,!0),l=fn(t[t.length-2],s,0,r,!0),c=fn(s,h,un.HALF_PI,o,!1),u=fn(s,h,un.HALF_PI,o,!0);return[fn(s,l,un.HALF_PI,a,!1),c,s,u,fn(s,l,un.HALF_PI,a,!0)]},getArrowBodyPoints(t,e,i,n){const s=yn(t),o=An(t)*n,a=(o-mn(e,i))/2;let r=0;const h=[],l=[];for(let c=1;c<t.length-1;c++){const e=bn(t[c-1],t[c],t[c+1])/2;r+=mn(t[c-1],t[c]);const i=(o/2-r/s*a)/Math.sin(e),n=fn(t[c-1],t[c],Math.PI-e,i,!0),u=fn(t[c-1],t[c],e,i,!1);h.push(n),l.push(u)}return h.concat(l)},getTempPoint4(t,e,i){const n=Mn(t,e),s=mn(n,i),o=bn(t,n,i);let a,r,h,l;return o<un.HALF_PI?(r=s*Math.sin(o),h=s*Math.cos(o),l=fn(t,n,un.HALF_PI,r,!1),a=fn(n,l,un.HALF_PI,h,!0)):o>=un.HALF_PI&&o<Math.PI?(r=s*Math.sin(Math.PI-o),h=s*Math.cos(Math.PI-o),l=fn(t,n,un.HALF_PI,r,!1),a=fn(n,l,un.HALF_PI,h,!1)):o>=Math.PI&&o<1.5*Math.PI?(r=s*Math.sin(o-Math.PI),h=s*Math.cos(o-Math.PI),l=fn(t,n,un.HALF_PI,r,!0),a=fn(n,l,un.HALF_PI,h,!0)):(r=s*Math.sin(2*Math.PI-o),h=s*Math.cos(2*Math.PI-o),l=fn(t,n,un.HALF_PI,r,!0),a=fn(n,l,un.HALF_PI,h,!1)),a}}),qn=Object.freeze(Object.defineProperty({__proto__:null,AssaultDirection:Nn,AttackArrow:jn,DoubleArrow:Hn,Draw:Bn,FineArrow:Gn,GatheringPlace:Rn,PlotTypes:On,SquadCombat:Un,StraightArrow:zn,TailedAttackArrow:Fn,TailedSquadCombat:Zn,createPlot:Dn},Symbol.toStringTag,{value:"Module"})),Vn=u.Marker.extend({options:{fontSize:"12px",color:"#f00",fontShadowColor:"none",fontWeight:"normal",background:"rgba(0, 0, 0, 0)",minZoom:void 0,maxZoom:void 0,minificationScale:1,clsName:"leaflet-text",offset:[6,6]},initialize(t,i,n={}){this._latlng=t,this._enabled=!1,this.options.id=n.id||"text_"+e.Util.guid(),this.options.text=i||"",n=Object.assign(this.options,n),u.setOptions(this,n);const{id:s,fontSize:o,color:a,fontWeight:r,background:h,fontShadowColor:l,clsName:c,offset:p}=this.options;this.options.icon=new u.DivIcon({html:`<span id=${s} class="leaflet-text-label" style="font-weight:${r};font-size:${o};color:${a};background:${h};text-shadow:${l} 1px 0px 2px">${i||""}</span>`,className:c,iconAnchor:p}),u.Marker.prototype.initialize.call(this,t,this.options)},setStyle(t){const e=document.getElementById(this.options.id),{text:i,color:n,fontSize:s,fontShadowColor:o,fontWeight:a}=t,r=t.background||"none";return e&&(n&&(this.options.color=n,e.style.color=n),a&&(this.options.fontWeight=a,e.style.fontWeight=a),s&&(this.options.fontSize=s,e.style.fontSize=s),this.options.background=r,e.style.background=r,i&&(this.options.text=i,e.textContent=i),o?(this.options.fontShadowColor=o,e.style["text-shadow"]=o+" 1px 0px 2px"):(this.options.fontShadowColor="none",e.style["text-shadow"]="none")),this},enableEdit(t){const{fontSize:e,color:i,text:n}=this.options;if(!this._enabled){this._enabled=!0;const s=new u.DivIcon({html:`<input type="text" id="text-input-icon" style="font-size:${e};color:${i};" value=${n}></input>`,className:"leaflet-text"});return this.setIcon(s),document.getElementById("text-input-icon").onblur=e=>{this.options.text=e.target.value,setTimeout(()=>{this.disableEdit(),this.fire("edit",this),t&&t(this)},100)},document.getElementById("text-input-icon").onkeydown=function(t){t.stopPropagation(),13===t.keyCode&&(this.options.text=t.target.value,this.blur(t))},this}},disableEdit(t){if(this._enabled){this._enabled=!1;const{id:e,color:i,fontSize:n,fontWeight:s,fontShadowColor:o}=this.options,a=new u.DivIcon({html:`<span id=${e} style="padding:2px 4px;white-space:nowrap;font-weight:${s};font-size:${n};color:${i};text-shadow:${o} 1px 2px 3px">${this.options.text}</span>`,className:"leaflet-text"});return this.setIcon(a),t&&t(this),this}}}),Wn=u.Marker.extend({options:{color:"#f00",diveColor:"#f00",iconSize:[14,14],level:0,speedTime:2,animation:!0},initialize(t,i){u.setOptions(this,i);const{clsPrefix:n}=this.options;this.tempDivEle=document.createElement("div"),this.spanEl=e.DomUtil.create("span",`${n}-pulse-icon`),this.aEl=e.DomUtil.create("a",`${n}-dive-icon`),this.tempDivEle.append(this.spanEl),this.spanEl.append(this.aEl),this._init(),u.Marker.prototype.initialize.call(this,t,this.options)},_init(){const{color:t,iconSize:e,diveColor:i,level:n,speedTime:s,animation:o,clsPrefix:a}=this.options;t&&(this.spanEl.style.backgroundColor=t,i||(this.aEl.style.boxShadow="0 0 6px 2px "+t)),e&&(this.spanEl.style.width=e[0]+"px",this.spanEl.style.height=e[1]+"px"),o&&s?(this.aEl.style.setProperty("animation","pulsate "+s+"s infinite"),n?i?this.aEl.style.boxShadow="0 0 "+3*n+"px "+n+"px "+i:t&&(this.aEl.style.boxShadow="0 0 "+3*n+"px "+n+"px "+t):i&&(this.aEl.style.boxShadow=n?"0 0 "+3*n+"px "+n+"px "+i:"0 0 6px 2px "+i)):(this.aEl.style.removeProperty("animation"),this.aEl.style.removeProperty("box-shadow"));const r=L.divIcon({iconSize:e,iconAnchor:e.map(t=>t/2),className:`${a}-blink-marker`,html:this.tempDivEle.innerHTML});this.options.icon?this.setIcon(r):this.options.icon=r},setOptions(t){u.setOptions(this,t),this._init()},start(t){u.setOptions(this,t),this.options.animation=!0,this._init()},stop(t){u.setOptions(this,t),this.options.animation=!1,this._init()}}),Kn=u.Layer.extend({initialize:function(t){L.setOptions(this,t),this._onClickListeners=[],this._onHoverListeners=[]},setOptions:function(t){return L.setOptions(this,t),this.redraw()},redraw:function(){this._redraw(!0)},addMarkers:function(t){var e=this,i=[],n=[];t.forEach(function(t){if("markerPane"==t.options.pane&&t.options.icon){var s=t.getLatLng(),o=e._map.getBounds().contains(s),a=e._addMarker(t,s,o);!0===o&&i.push(a[0]),n.push(a[1])}}),e._markers.load(i),e._latlngMarkers.load(n)},addMarker:function(t){var e=this,i=t.getLatLng(),n=e._map.getBounds().contains(i),s=e._addMarker(t,i,n);!0===n&&e._markers.insert(s[0]),e._latlngMarkers.insert(s[1])},addLayer:function(t){"markerPane"==t.options.pane&&t.options.icon&&this.addMarker(t)},addLayers:function(t){this.addMarkers(t)},removeLayer:function(t){this.removeMarker(t,!0)},removeMarker:function(t,e){var i=this;t.minX&&(t=t.data);var n=t.getLatLng(),s=i._map.getBounds().contains(n),o={minX:n.lng,minY:n.lat,maxX:n.lng,maxY:n.lat,data:t};i._latlngMarkers.remove(o,function(t,e){return t.data._leaflet_id===e.data._leaflet_id}),i._latlngMarkers.total--,i._latlngMarkers.dirty++,!0===s&&!0===e&&i._redraw(!0)},onAdd:function(t){this._map=t,this._canvas||this._initCanvas(),this.options.pane?this.getPane().appendChild(this._canvas):t._panes.overlayPane.appendChild(this._canvas),t.on("moveend",this._reset,this),t.on("resize",this._reset,this),t.on("click",this._executeListeners,this),t.on("mousemove",this._executeListeners,this)},onRemove:function(t){this.options.pane?this.getPane().removeChild(this._canvas):t.getPanes().overlayPane.removeChild(this._canvas),t.off("click",this._executeListeners,this),t.off("mousemove",this._executeListeners,this),t.off("moveend",this._reset,this),t.off("resize",this._reset,this)},addTo:function(t){return t.addLayer(this),this},clearLayers:function(){this._latlngMarkers=null,this._markers=null,this._redraw(!0)},_addMarker:function(t,e,i){var n=this;t._map=n._map,n._markers||(n._markers=new rbush),n._latlngMarkers||(n._latlngMarkers=new rbush,n._latlngMarkers.dirty=0,n._latlngMarkers.total=0),L.Util.stamp(t);var s=n._map.latLngToContainerPoint(e),o=t.options.icon.options.iconSize,a=o[0]/2,r=o[1]/2,h=[{minX:s.x-a,minY:s.y-r,maxX:s.x+a,maxY:s.y+r,data:t},{minX:e.lng,minY:e.lat,maxX:e.lng,maxY:e.lat,data:t}];return n._latlngMarkers.dirty++,n._latlngMarkers.total++,!0===i&&n._drawMarker(t,s),h},_drawMarker:function(t,e){var i=this;this._imageLookup||(this._imageLookup={}),e||(e=i._map.latLngToContainerPoint(t.getLatLng()));var n=t.options.icon.options.iconUrl;if(t.canvas_img)i._drawImage(t,e);else if(i._imageLookup[n])t.canvas_img=i._imageLookup[n][0],!1===i._imageLookup[n][1]?i._imageLookup[n][2].push([t,e]):i._drawImage(t,e);else{var s=new Image;s.src=n,t.canvas_img=s,i._imageLookup[n]=[s,!1,[[t,e]]],s.onload=function(){i._imageLookup[n][1]=!0,i._imageLookup[n][2].forEach(function(t){i._drawImage(t[0],t[1])})}}},_drawImage:function(t,e){var i=t.options.icon.options;this._context.drawImage(t.canvas_img,e.x-i.iconAnchor[0],e.y-i.iconAnchor[1],i.iconSize[0],i.iconSize[1])},_reset:function(){var t=this._map.containerPointToLayerPoint([0,0]);L.DomUtil.setPosition(this._canvas,t);var e=this._map.getSize();this._canvas.width=e.x,this._canvas.height=e.y,this._redraw()},_redraw:function(t){var e=this;if(t&&this._context.clearRect(0,0,this._canvas.width,this._canvas.height),this._map&&this._latlngMarkers){var i=[];e._latlngMarkers.dirty/e._latlngMarkers.total>=.1&&(e._latlngMarkers.all().forEach(function(t){i.push(t)}),e._latlngMarkers.clear(),e._latlngMarkers.load(i),e._latlngMarkers.dirty=0,i=[]);var n=e._map.getBounds(),s={minX:n.getWest(),minY:n.getSouth(),maxX:n.getEast(),maxY:n.getNorth()};e._latlngMarkers.search(s).forEach(function(t){var n=e._map.latLngToContainerPoint(t.data.getLatLng()),s=t.data.options.icon.options.iconSize,o=s[0]/2,a=s[1]/2,r={minX:n.x-o,minY:n.y-a,maxX:n.x+o,maxY:n.y+a,data:t.data};i.push(r),e._drawMarker(t.data,n)}),this._markers.clear(),this._markers.load(i)}},_initCanvas:function(){this._canvas=L.DomUtil.create("canvas","leaflet-canvas-icon-layer leaflet-layer");var t=L.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);this._canvas.style[t]="50% 50%";var e=this._map.getSize();this._canvas.width=e.x,this._canvas.height=e.y,this._context=this._canvas.getContext("2d");var i=this._map.options.zoomAnimation&&L.Browser.any3d;L.DomUtil.addClass(this._canvas,"leaflet-zoom-"+(i?"animated":"hide"))},addOnClickListener:function(t){this._onClickListeners.push(t)},addOnHoverListener:function(t){this._onHoverListeners.push(t)},_executeListeners:function(t){if(this._markers){var e=this,i=t.containerPoint.x,n=t.containerPoint.y;e._openToolTip&&(e._openToolTip.closeTooltip(),delete e._openToolTip);var s=this._markers.search({minX:i,minY:n,maxX:i,maxY:n});if(s&&s.length>0){if(e._map._container.style.cursor="pointer","click"===t.type)s[0].data.getPopup()&&s[0].data.openPopup(),e._onClickListeners.forEach(function(e){e(t,s)});if("mousemove"===t.type)s[0].data.getTooltip()&&(e._openToolTip=s[0].data,s[0].data.openTooltip()),e._onHoverListeners.forEach(function(e){e(t,s)})}else e._map._container.style.cursor=""}}}),Xn=u.Layer.extend({provide:{TDT:"tdt",BAIDU:"bd",GAODE:"gd",YANDEX:"yandex"},source:{VECTOR:"vec",SATELITE:"img",ANNO:"cia",VEC_NO_ANNO:"vec_no_anno",SATELITE_NO_ANNO:"img_no_anno"},style:{NORMAL:"normal",GRAY:"gray",DARK:"dark",BROWN:"brown",BLUR:"blur"},options:{provide:"tdt",source:"img",style:"normal",accessToken:"016b31f15f25e1365e85aec7e7b0464e"},initialize(t){t=e.Util.deleteEmptyProperty(t),u.Util.setOptions(this,t)},onAdd(t){this.map=t,this.replaceProjection(),this.tileLayers=this.getLayerGroup(),t.addLayer(this.tileLayers)},onRemove(t){t.removeLayer(this.tileLayers)},replaceProjection(){const t=this.map.getCenter(),e=this.map.getZoom();this.options.provide===this.provide.BAIDU?this.map.options.crs=an:this.options.provide===this.provide.YANDEX?this.map.options.crs=u.CRS.EPSG3395:this.map.options.crs=u.CRS.EPSG3857,this._resetMapStatus(t,e)},_resetMapStatus(t,e){this.map.setView(t),this.map._resetView(t,e,!0)},getLayerGroup(){let t={},i={};switch(this.options.style&&this.options.style.split(",").forEach(e=>{switch(e){case this.style.DARK:t.invert=1;break;case this.style.GRAY:t.grayscale=1;break;case this.style.BROWN:t.sepia=1;break;case this.style.BLUR:t.blur="1px"}}),this.options.provide){case this.provide.TDT:i={subdomains:e.ArrayUtil.create(8),maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.BAIDU:i={subdomains:e.ArrayUtil.create(10),tms:!0,corrdType:"bd09",maxNativeZoom:19,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.GAODE:i={subdomains:e.ArrayUtil.create(4).map(t=>t+1),corrdType:"gcj02",maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.YANDEX:i={maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()}}if(this.options.opacity>=0&&(t.opacity=this.options.opacity),this.options.url)return new u.TileLayer(this.options.url,{...i,style:t});switch(this.options.provide){case this.provide.TDT:let e;switch(i.maxNativeZoom=18,this.options.source){case this.source.VECTOR:e=["vec_w","cva_w"];break;case this.source.SATELITE:e=["img_w","cia_w"];break;case this.source.ANNO:e=["cva_w"];break;case this.source.VEC_NO_ANNO:e=["vec_w"];break;case this.source.SATELITE_NO_ANNO:e=["img_w"]}return new u.LayerGroup(e.map(e=>new u.TileLayer(`http://t{s}.tianditu.gov.cn/DataServer?T=${e}&x={x}&y={y}&l={z}&tk=${this.options.accessToken}`,{...i,style:t})));case this.provide.BAIDU:switch(this.options.source){case this.source.VECTOR:return i.maxNativeZoom=19,new u.TileLayer("http://online{s}.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles=pl&scaler=1&p=1",{...i,style:t});case this.source.ANNO:return i.maxNativeZoom=19,new u.TileLayer("http://online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl",{...i,style:t});case this.source.SATELITE:return i.maxNativeZoom=17,new u.LayerGroup([new u.TileLayer("http://shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",{...i,style:t}),new u.TileLayer("http://online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl",{...i,style:t})]);case this.source.SATELITE_NO_ANNO:return i.maxNativeZoom=19,new u.TileLayer("http://shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",{...i,style:t})}break;case this.provide.GAODE:switch(this.options.source){case this.source.VECTOR:return i.maxNativeZoom=18,new u.TileLayer("http://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...i,style:t});case this.source.ANNO:return i.maxNativeZoom=18,new u.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...i,style:t});case this.source.SATELITE:return i.maxNativeZoom=16,new u.LayerGroup([new u.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=6",{...i,style:t}),new u.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...i,style:t})]);case this.source.SATELITE_NO_ANNO:return i.maxNativeZoom=18,new u.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=6",{...i,style:t})}break;case this.provide.YANDEX:switch(this.options.source){case this.source.ANNO:return new u.TileLayer("https://core-renderer-tiles.maps.yandex.net/tiles?l=skl&v=24.05.19-0-b240515214430&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps&experimental_ranking_mode_name=default-web-ranking&experimental_data_hd=vegetation_model_exp",{...i,style:t});case this.source.SATELITE:return new u.LayerGroup([new u.TileLayer("https://sat{s}.maps.yandex.net/tiles?l=sat&v=3.1238.0&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps",{...i,subdomains:["01","02","03","04"],style:t}),new u.TileLayer("https://core-renderer-tiles.maps.yandex.net/tiles?l=skl&v=24.05.19-0-b240515214430&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps&experimental_ranking_mode_name=default-web-ranking&experimental_data_hd=vegetation_model_exp",{...i,style:t})]);case this.source.SATELITE_NO_ANNO:return new u.TileLayer("https://sat{s}.maps.yandex.net/tiles?l=sat&v=3.1238.0&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps",{...i,subdomains:["01","02","03","04"],style:t})}}},setOptions(t){u.Util.setOptions(this,t);const e=this.getLayerGroup();this.map.removeLayer(this.tileLayers),setTimeout(()=>{this.replaceProjection(),this.tileLayers=e.addTo(this.map)},500)}}),Yn=u.ImageOverlay.extend({initialize(t,e={},i=new u.Marker,n=new u.Marker){"string"==typeof t?this._url=t:this._rawImage=t,this.topRightMarker=i,this.bottomLeftMarker=n,this.angle=0,u.setOptions(this,e),this._topLeft=new u.LatLng(e.corners[0]),this._topRight=new u.LatLng(e.corners[1]),this._bottomLeft=new u.LatLng(e.corners[3]),i.on("drag dragend",this.reposition,this),n.on("drag dragend",this.reposition,this)},onAdd(t){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(u.DomUtil.addClass(this._rawImage,"leaflet-interactive"),this.addInteractiveTarget(this._rawImage)),t.on("zoomend resetview",this._reset,this),this.getPane().appendChild(this._image),this._reset()},onRemove(t){t.off("zoomend resetview",this._reset,this),u.ImageOverlay.prototype.onRemove.call(this,t)},_initImage(){let t=this._rawImage;this._url&&(t=u.DomUtil.create("img"),t.style.display="none",this.options.crossOrigin&&(t.crossOrigin=""),t.src=this._url,this._rawImage=t),u.DomUtil.addClass(t,"leaflet-image-layer");const e=this._image=u.DomUtil.create("div","leaflet-image-layer "+(this._zoomAnimated?"leaflet-zoom-animated":""));this._updateZIndex&&this._updateZIndex(),e.appendChild(t),e.onselectstart=u.Util.falseFn,e.onmousemove=u.Util.falseFn,t.onload=function(){this._reset(),t.style.display="block",this.options.w=this._rawImage.width,this.options.h=this._rawImage.height,this.boundsRectBottomLeft=new u.Point(0,0),this.boundsRectTopRight=new u.Point(this.options.w,this.options.h),this.diagonalVector=this.boundsRectTopRight.subtract(this.boundsRectBottomLeft),this.fire("load")}.bind(this),t.alt=this.options.alt},_reset(){const t=this._image,e=this._map.latLngToLayerPoint(this._topLeft),i=this._map.latLngToLayerPoint(this._topRight),n=this._map.latLngToLayerPoint(this._bottomLeft),s=i.subtract(e).add(n),o=new u.Bounds([e,i,n,s]),a=o.getSize(),r=e.subtract(o.min),h=i.subtract(e),l=n.subtract(e),c=Math.atan2(h.y,h.x),p=Math.atan2(l.x,l.y);this.angle=((Math.abs(c)+Math.abs(p))/2*180).toFixed(2),this._bounds=new u.LatLngBounds(this._map.layerPointToLatLng(o.min),this._map.layerPointToLatLng(o.max)),u.DomUtil.setPosition(t,o.min),t.pxBounds=o,t.style.width=a.x+"px",t.style.height=a.y+"px";const d=this._rawImage.width,_=this._rawImage.height;if(!d||!_)return;const m=e.distanceTo(i)/d*Math.cos(c),g=e.distanceTo(n)/_*Math.cos(p);this._rawImage.style.transformOrigin="0 0",this._rawImage.style.transform="translate("+r.x+"px, "+r.y+"px)skew("+p+"rad, "+c+"rad) scale("+m+", "+g+") "},_animateZoom(t){const e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;u.DomUtil.setTransform(this._image,i,e)},reposition(){const t=this.topRightMarker.getLatLng(),e=this.bottomLeftMarker.getLatLng(),i=this.options.w,n=this.options.h,s=this.getCornerLatLng(new u.Point(0,n),e,t),o=this.getCornerLatLng(new u.Point(i,n),e,t),a=this.getCornerLatLng(new u.Point(0,0),e,t),r=this.getCornerLatLng(new u.Point(i,0),e,t);this.options.corners=[s,o,r,a],this._topLeft=new u.LatLng(s),this._topRight=new u.LatLng(o),this._bottomLeft=new u.LatLng(a),this._reset()},getCornerLatLng(t,e,i){const n=this.boundsRectBottomLeft,s=this.diagonalVector,o=t.subtract(n),a=this.getClockWiseRotate90DegreePoint(s),r=this.getDotProduction(s,o)/this.getDotProduction(s,s),h=-this.getDotProduction(a,o)/this.getDotProduction(a,a),l=new u.Projection.SphericalMercator.project(e),c=new u.Projection.SphericalMercator.project(i),p=l.add(c.subtract(l).multiplyBy(r)),d=this.getClockWiseRotate90DegreePoint(l.subtract(c)).multiplyBy(h),_=p.add(d);return new u.Projection.SphericalMercator.unproject(_)},setUrl(t){return this._url=t,this._rawImage&&(this._rawImage.src=t),this},getDotProduction:(t,e)=>t.x*e.x+t.y*e.y,getClockWiseRotate90DegreePoint:t=>new u.Point([t.y,-t.x])});var $n={exports:{}};!function(t){!function(e,i,n){t.exports?t.exports=n():i.h337=n()}(0,s,function(){var t,e,i,n={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},s=(t=function(t){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=t.xField||t.defaultXField,this._yField=t.yField||t.defaultYField,this._valueField=t.valueField||t.defaultValueField,t.radius&&(this._cfgRadius=t.radius)},e=n.defaultRadius,t.prototype={_organiseData:function(t,i){var n=t[this._xField],s=t[this._yField],o=this._radi,a=this._data,r=this._max,h=this._min,l=t[this._valueField]||1,c=t.radius||this._cfgRadius||e;a[n]||(a[n]=[],o[n]=[]),a[n][s]?a[n][s]+=l:(a[n][s]=l,o[n][s]=c);var u=a[n][s];return u>r?(i?this.setDataMax(u):this._max=u,!1):u<h?(i?this.setDataMin(u):this._min=u,!1):{x:n,y:s,value:l,radius:c,min:h,max:r}},_unOrganizeData:function(){var t=[],e=this._data,i=this._radi;for(var n in e)for(var s in e[n])t.push({x:n,y:s,radius:i[n][s],value:e[n][s]});return{min:this._min,max:this._max,data:t}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var t=arguments[0],e=t.length;e--;)this.addData.call(this,t[e]);else{var i=this._organiseData(arguments[0],!0);i&&(0===this._data.length&&(this._min=this._max=i.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[i]}))}return this},setData:function(t){var e=t.data,i=e.length;this._data=[],this._radi=[];for(var n=0;n<i;n++)this._organiseData(e[n],!1);return this._max=t.max,this._min=t.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(t){return this._max=t,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(t){return this._min=t,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(t){this._coordinator=t},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},t),o=function(){var t=function(t){var e=t.gradient||t.defaultGradient,i=document.createElement("canvas"),n=i.getContext("2d");i.width=256,i.height=1;var s=n.createLinearGradient(0,0,256,1);for(var o in e)s.addColorStop(o,e[o]);return n.fillStyle=s,n.fillRect(0,0,256,1),n.getImageData(0,0,256,1).data},e=function(t,e){var i=document.createElement("canvas"),n=i.getContext("2d"),s=t,o=t;if(i.width=i.height=2*t,1==e)n.beginPath(),n.arc(s,o,t,0,2*Math.PI,!1),n.fillStyle="rgba(0,0,0,1)",n.fill();else{var a=n.createRadialGradient(s,o,t*e,s,o,t);a.addColorStop(0,"rgba(0,0,0,1)"),a.addColorStop(1,"rgba(0,0,0,0)"),n.fillStyle=a,n.fillRect(0,0,2*t,2*t)}return i};function i(e){var i=e.container,n=this.shadowCanvas=document.createElement("canvas"),s=this.canvas=e.canvas||document.createElement("canvas");this._renderBoundaries=[1e4,1e4,0,0];var o=getComputedStyle(e.container)||{};s.className="heatmap-canvas",this._width=s.width=n.width=e.width||+o.width.replace(/px/,""),this._height=s.height=n.height=e.height||+o.height.replace(/px/,""),this.shadowCtx=n.getContext("2d"),this.ctx=s.getContext("2d"),s.style.cssText=n.style.cssText="position:absolute;left:0;top:0;",i.style.position="relative",i.appendChild(s),this._palette=t(e),this._templates={},this._setStyles(e)}return i.prototype={renderPartial:function(t){t.data.length>0&&(this._drawAlpha(t),this._colorize())},renderAll:function(t){this._clear(),t.data.length>0&&(this._drawAlpha(function(t){for(var e=[],i=t.min,n=t.max,s=t.radi,o=(t=t.data,Object.keys(t)),a=o.length;a--;)for(var r=o[a],h=Object.keys(t[r]),l=h.length;l--;){var c=h[l],u=t[r][c],p=s[r][c];e.push({x:r,y:c,value:u,radius:p})}return{min:i,max:n,data:e}}(t)),this._colorize())},_updateGradient:function(e){this._palette=t(e)},updateConfig:function(t){t.gradient&&this._updateGradient(t),this._setStyles(t)},setDimensions:function(t,e){this._width=t,this._height=e,this.canvas.width=this.shadowCanvas.width=t,this.canvas.height=this.shadowCanvas.height=e},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(t){this._blur=0==t.blur?0:t.blur||t.defaultBlur,t.backgroundColor&&(this.canvas.style.backgroundColor=t.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=t.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=t.height||this._height,this._opacity=255*(t.opacity||0),this._maxOpacity=255*(t.maxOpacity||t.defaultMaxOpacity),this._minOpacity=255*(t.minOpacity||t.defaultMinOpacity),this._useGradientOpacity=!!t.useGradientOpacity},_drawAlpha:function(t){for(var i=this._min=t.min,n=this._max=t.max,s=(t=t.data||[]).length,o=1-this._blur;s--;){var a,r=t[s],h=r.x,l=r.y,c=r.radius,u=Math.min(r.value,n),p=h-c,d=l-c,_=this.shadowCtx;this._templates[c]?a=this._templates[c]:this._templates[c]=a=e(c,o);var m=(u-i)/(n-i);_.globalAlpha=m<.01?.01:m,_.drawImage(a,p,d),p<this._renderBoundaries[0]&&(this._renderBoundaries[0]=p),d<this._renderBoundaries[1]&&(this._renderBoundaries[1]=d),p+2*c>this._renderBoundaries[2]&&(this._renderBoundaries[2]=p+2*c),d+2*c>this._renderBoundaries[3]&&(this._renderBoundaries[3]=d+2*c)}},_colorize:function(){var t=this._renderBoundaries[0],e=this._renderBoundaries[1],i=this._renderBoundaries[2]-t,n=this._renderBoundaries[3]-e,s=this._width,o=this._height,a=this._opacity,r=this._maxOpacity,h=this._minOpacity,l=this._useGradientOpacity;t<0&&(t=0),e<0&&(e=0),t+i>s&&(i=s-t),e+n>o&&(n=o-e);for(var c=this.shadowCtx.getImageData(t,e,i,n),u=c.data,p=u.length,d=this._palette,_=3;_<p;_+=4){var m,g=u[_],f=4*g;if(f)m=a>0?a:g<r?g<h?h:g:r,u[_-3]=d[f],u[_-2]=d[f+1],u[_-1]=d[f+2],u[_]=l?d[f+3]:m}c.data=u,this.ctx.putImageData(c,t,e),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(t){var e=this.shadowCtx.getImageData(t.x,t.y,1,1).data[3],i=this._max,n=this._min;return Math.abs(i-n)*(e/255)|0},getDataURL:function(){return this.canvas.toDataURL()}},i}(),a=(i=!1,"canvas2d"===n.defaultRenderer&&(i=o),i),r=function(){for(var t={},e=arguments.length,i=0;i<e;i++){var n=arguments[i];for(var s in n)t[s]=n[s]}return t},h=function(){var t=function(){function t(){this.cStore={}}return t.prototype={on:function(t,e,i){var n=this.cStore;n[t]||(n[t]=[]),n[t].push(function(t){return e.call(i,t)})},emit:function(t,e){var i=this.cStore;if(i[t])for(var n=i[t].length,s=0;s<n;s++){(0,i[t][s])(e)}}},t}();function e(){var e,i,o,h,l=this._config=r(n,arguments[0]||{});if(this._coordinator=new t,l.plugin){var c=l.plugin;if(!n.plugins[c])throw new Error("Plugin '"+c+"' not found. Maybe it was not registered.");var u=n.plugins[c];this._renderer=new u.renderer(l),this._store=new u.store(l)}else this._renderer=new a(l),this._store=new s(l);i=(e=this)._renderer,o=e._coordinator,h=e._store,o.on("renderpartial",i.renderPartial,i),o.on("renderall",i.renderAll,i),o.on("extremachange",function(t){e._config.onExtremaChange&&e._config.onExtremaChange({min:t.min,max:t.max,gradient:e._config.gradient||e._config.defaultGradient})}),h.setCoordinator(o)}return e.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(t){return this._config=r(this._config,t),this._renderer.updateConfig(this._config),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(t){return this._store.getValueAt?this._store.getValueAt(t):this._renderer.getValueAt?this._renderer.getValueAt(t):null}},e}();return{create:function(t){return new h(t)},register:function(t,e){n.plugins[t]=e}}})}($n);const Jn=o($n.exports);var Qn=L.Layer.extend({initialize:function(t){this.cfg=t,this._el=L.DomUtil.create("div","leaflet-zoom-hide"),this._data=[],this._max=1,this._min=0,this.cfg.container=this._el},onAdd:function(t){var e=t.getSize();this._map=t,this._width=e.x,this._height=e.y,this._el.style.width=e.x+"px",this._el.style.height=e.y+"px",this._el.style.position="absolute",this._resetOrigin(),t.getPanes().overlayPane.appendChild(this._el),this._heatmap||(this._heatmap=Jn.create(this.cfg)),t.on("moveend",this._resetOrigin,this),this._draw()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._el),t.off("moveend",this._resetOrigin,this)},_draw:function(){if(this._map){var t=this._map.getPanes().mapPane._leaflet_pos;this._el.style[Qn.CSS_TRANSFORM]="translate("+-Math.round(t.x)+"px,"+-Math.round(t.y)+"px)",this._update()}},_update:function(){var t,e,i,n={max:this._max,min:this._min,data:[]};if(t=this._map.getBounds(),e=this._map.getZoom(),i=Math.pow(2,e),0!=this._data.length){for(var s=[],o=this.cfg.scaleRadius?i:1,a=0,r=0,h=this.cfg.valueField,l=this._data.length;l--;){var c=this._data[l],u=c[h],p=c.latlng;if(t.contains(p)){a=Math.max(u,a),r=Math.min(u,r);var d,_=this._map.latLngToContainerPoint(p),m={x:Math.round(_.x),y:Math.round(_.y)};m[h]=u,d=c.radius?c.radius*o:(this.cfg.radius||2)*o,m.radius=d,s.push(m)}}this.cfg.useLocalExtrema&&(n.max=a,n.min=r),n.data=s,this._heatmap.setData(n)}else this._heatmap&&this._heatmap.setData(n)},setData:function(t){this._max=t.max||this._max,this._min=t.min||this._min;for(var e=this.cfg.latField||"lat",i=this.cfg.lngField||"lng",n=this.cfg.valueField||"value",s=(t=t.data).length,o=[];s--;){var a=t[s],r={latlng:new L.LatLng(a[e],a[i])};r[n]=a[n],a.radius&&(r.radius=a.radius),o.push(r)}this._data=o,this._draw()},addData:function(t){if(t.length>0)for(var e=t.length;e--;)this.addData(t[e]);else{var i=this.cfg.latField||"lat",n=this.cfg.lngField||"lng",s=this.cfg.valueField||"value",o=t,a={latlng:new L.LatLng(o[i],o[n])};a[s]=o[s],this._max=Math.max(this._max,a[s]),this._min=Math.min(this._min,a[s]),o.radius&&(a.radius=o.radius),this._data.push(a),this._draw()}},_resetOrigin:function(){this._origin=this._map.layerPointToLatLng(new L.Point(0,0));var t=this._map.getSize();this._width===t.x&&this._height===t.y||(this._width=t.x,this._height=t.y,this._el.style.width=this._width+"px",this._el.style.height=this._height+"px"),this._draw()}});Qn.CSS_TRANSFORM=function(){for(var t=document.createElement("div"),e=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],i=0;i<e.length;i++){var n=e[i];if(void 0!==t.style[n])return n}return e[0]}();const ts=L.TileLayer.extend({defaultWmtsParams:{service:"WMTS",request:"GetTile",version:"1.0.0",layer:"",style:"",tilematrixset:"",format:"image/jpeg"},initialize:function(t,e){this._url=t;var i={};Object.keys(e).forEach(t=>{i[t.toLowerCase()]=e[t]});var n=L.extend({},this.defaultWmtsParams),s=i.tileSize||this.options.tileSize;for(var o in i.detectRetina&&L.Browser.retina?n.width=n.height=2*s:n.width=n.height=s,i)n.hasOwnProperty(o)&&"matrixIds"!=o&&(n[o]=i[o]);this.wmtsParams=n,this.matrixIds=e.matrixIds||this.getDefaultMatrix(),L.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,L.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this.options.tileSize,i=t.multiplyBy(e);i.x+=1,i.y-=1;var n=i.add(new L.Point(e,e)),s=this._tileZoom,o=this._crs.project(this._map.unproject(i,s)),a=this._crs.project(this._map.unproject(n,s));tilewidth=a.x-o.x;var r=this.matrixIds[s].identifier,h=this.wmtsParams.tilematrixset+":"+r,l=this.matrixIds[s].topLeftCorner.lng,c=this.matrixIds[s].topLeftCorner.lat,u=Math.floor((o.x-l)/tilewidth),p=-Math.floor((o.y-c)/tilewidth),d=L.Util.template(this._url,{s:this._getSubdomain(t)});return d+L.Util.getParamString(this.wmtsParams,d)+"&tilematrix="+h+"&tilerow="+p+"&tilecol="+u},setParams:function(t,e){return L.extend(this.wmtsParams,t),e||this.redraw(),this},getDefaultMatrix:function(){for(var t=new Array(22),e=0;e<22;e++)t[e]={identifier:""+e,topLeftCorner:new L.LatLng(20037508.3428,-20037508.3428)};return t}});var es={};es.Source=L.Layer.extend({options:{untiled:!0,identify:!0},initialize:function(t,e){L.setOptions(this,e),this.options.tiled&&(this.options.untiled=!1),this._url=t,this._subLayers={},this._overlay=this.createOverlay(this.options.untiled)},createOverlay:function(t){var e={};for(var i in this.options)"untiled"!=i&&"identify"!=i&&(e[i]=this.options[i]);return t?es.overlay(this._url,e):es.tileLayer(this._url,e)},onAdd:function(){this.refreshOverlay()},getEvents:function(){return this.options.identify?{click:this.identify}:{}},setOpacity:function(t){this.options.opacity=t,this._overlay&&this._overlay.setOpacity(t)},bringToBack:function(){this.options.isBack=!0,this._overlay&&this._overlay.bringToBack()},bringToFront:function(){this.options.isBack=!1,this._overlay&&this._overlay.bringToFront()},getLayer:function(t){return es.layer(this,t)},addSubLayer:function(t){this._subLayers[t]=!0,this.refreshOverlay()},removeSubLayer:function(t){delete this._subLayers[t],this.refreshOverlay()},refreshOverlay:function(){var t=Object.keys(this._subLayers).join(",");this._map&&(t?(this._overlay.setParams({layers:t}),this._overlay.addTo(this._map)):this._overlay.remove())},identify:function(t){var e=this.getIdentifyLayers();e.length&&this.getFeatureInfo(t.containerPoint,t.latlng,e,this.showFeatureInfo)},getFeatureInfo:function(t,e,i,n){var s=this.getFeatureInfoParams(t,i),o=this._url+L.Util.getParamString(s,this._url);this.showWaiting(),this.ajax(o,function(t){this.hideWaiting();var i=this.parseFeatureInfo(t,o);n.call(this,e,i)})},ajax:function(t,e){ns.call(this,t,e)},getIdentifyLayers:function(){return this.options.identifyLayers?this.options.identifyLayers:Object.keys(this._subLayers)},getFeatureInfoParams:function(t,e){var i,n;this.options.untiled?i=this._overlay.wmsParams:((n=this.createOverlay(!0)).updateWmsParams(this._map),(i=n.wmsParams).layers=e.join(","));var s={request:"GetFeatureInfo",query_layers:e.join(","),X:Math.round(t.x),Y:Math.round(t.y)};return L.extend({},i,s)},parseFeatureInfo:function(t,e){return"error"==t&&(t="<iframe src='"+e+"' style='border:none'>"),t},showFeatureInfo:function(t,e){this._map&&this._map.openPopup(e,t)},showWaiting:function(){this._map&&(this._map._container.style.cursor="progress")},hideWaiting:function(){this._map&&(this._map._container.style.cursor="default")}}),es.source=function(t,e){return new es.Source(t,e)},es.Layer=L.Layer.extend({initialize:function(t,e,i){L.setOptions(this,i),t.addSubLayer||(t=es.getSourceForUrl(t,i)),this._source=t,this._name=e},onAdd:function(){this._source._map||this._source.addTo(this._map),this._source.addSubLayer(this._name)},onRemove:function(){this._source.removeSubLayer(this._name)},setOpacity:function(t){this._source.setOpacity(t)},bringToBack:function(){this._source.bringToBack()},bringToFront:function(){this._source.bringToFront()}}),es.layer=function(t,e){return new es.Layer(t,e)};var is={};function ns(t,e){var i=this,n=new XMLHttpRequest;n.onreadystatechange=function(){4===n.readyState&&(200===n.status?e.call(i,n.responseText):e.call(i,"error"))},n.open("GET",t),n.send()}es.getSourceForUrl=function(t,e){return is[t]||(is[t]=es.source(t,e)),is[t]},es.TileLayer=L.TileLayer.WMS,es.tileLayer=L.tileLayer.wms,es.Overlay=L.Layer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},options:{crs:null,uppercase:!1,attribution:"",opacity:1,isBack:!1,minZoom:0,maxZoom:18},initialize:function(t,e){this._url=t;var i={},n={};for(var s in e)s in this.options?n[s]=e[s]:i[s]=e[s];L.setOptions(this,n),this.wmsParams=L.extend({},this.defaultWmsParams,i)},setParams:function(t){L.extend(this.wmsParams,t),this.update()},getAttribution:function(){return this.options.attribution},onAdd:function(){this.update()},onRemove:function(t){this._currentOverlay&&(t.removeLayer(this._currentOverlay),delete this._currentOverlay),this._currentUrl&&delete this._currentUrl},getEvents:function(){return{moveend:this.update}},update:function(){if(this._map){this.updateWmsParams();var t=this.getImageUrl();if(this._currentUrl!=t){this._currentUrl=t;var e=this._map.getBounds(),i=L.imageOverlay(t,e,{opacity:0});i.addTo(this._map),i.once("load",function(){if(!this._map)return;if(i._url!=this._currentUrl)return void this._map.removeLayer(i);this._currentOverlay&&this._map.removeLayer(this._currentOverlay);this._currentOverlay=i,i.setOpacity(this.options.opacity?this.options.opacity:1),!0===this.options.isBack&&i.bringToBack();!1===this.options.isBack&&i.bringToFront()},this),(this._map.getZoom()<this.options.minZoom||this._map.getZoom()>this.options.maxZoom)&&this._map.removeLayer(i)}}},setOpacity:function(t){this.options.opacity=t,this._currentOverlay&&this._currentOverlay.setOpacity(t)},bringToBack:function(){this.options.isBack=!0,this._currentOverlay&&this._currentOverlay.bringToBack()},bringToFront:function(){this.options.isBack=!1,this._currentOverlay&&this._currentOverlay.bringToFront()},updateWmsParams:function(t){t||(t=this._map);var e=t.getBounds(),i=t.getSize(),n=parseFloat(this.wmsParams.version),s=this.options.crs||t.options.crs,o=n>=1.3?"crs":"srs",a=s.project(e.getNorthWest()),r=s.project(e.getSouthEast()),h={width:i.x,height:i.y};h[o]=s.code,h.bbox=(n>=1.3&&s===L.CRS.EPSG4326?[r.y,a.x,a.y,r.x]:[a.x,r.y,r.x,a.y]).join(","),L.extend(this.wmsParams,h)},getImageUrl:function(){var t=this.options.uppercase||!1,e=L.Util.getParamString(this.wmsParams,this._url,t);return this._url+e}}),es.overlay=function(t,e){return new es.Overlay(t,e)};const ss=u.Draggable.extend({initialize(t,e,i){u.Draggable.prototype.initialize.call(this,t,t),this._element=t,this._stepHeight=e??5.45,this._knobHeight=i??10,this.on("predrag",function(){this._newPos.x=0,this._newPos.y=this._adjust(this._newPos.y)},this)},_adjust(t){let e=Math.round(this._toValue(t));return e=Math.max(0,Math.min(this._maxValue,e)),this._toY(e)},_toY(t){return this._k*t+this._m},_toValue(t){return(t-this._m)/this._k},setSteps(t){this._maxValue=t-1,this._k=-this._stepHeight,this._m=0},setPosition(t){u.DomUtil.setPosition(this._element,L.point(0,this._adjust(t)))},setValue(t){this.setPosition(this._toY(t))},getValue(){return this._toValue(u.DomUtil.getPosition(this._element).y)}});const os=(t,e)=>(180*Math.atan2(e.y-t.y,e.x-t.x)/Math.PI+90+360)%360,as=({value:t,isInPixels:e},i)=>e?t/i:t;function rs(t){if("string"==typeof t&&-1!==t.indexOf("%"))return{value:parseFloat(t)/100,isInPixels:!1};const e=t?parseFloat(t):0;return{value:e,isInPixels:e>0}}function hs(t){return t.reduce((t,e,i,n)=>{if(i>0&&!((t,e)=>t.x===e.x&&t.y===e.y)(e,n[i-1])){const s=n[i-1],o=t.length>0?t[t.length-1].distB:0,a=function(t,e){const i=e.x-t.x,n=e.y-t.y;return Math.sqrt(i*i+n*n)}(s,e);t.push({a:s,b:e,distA:o,distB:o+a,heading:os(s,e)})}return t},[])}function ls(t,e,i){return e.x!==t.x?{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}:{x:t.x,y:t.y+(e.y-t.y)*i}}const cs=t=>{return Array.isArray(t)&&((e=t[0])instanceof L.LatLng||Array.isArray(e)&&2===e.length&&"number"==typeof e[0]);var e},us=L.FeatureGroup.extend({options:{patterns:[]},initialize:function(t,e){L.FeatureGroup.prototype.initialize.call(this),L.Util.setOptions(this,e),this._map=null,this._paths=this._initPaths(t),this._bounds=this._initBounds(),this._patterns=this._initPatterns(this.options.patterns)},_initPaths:function(t,e){if(cs(t)){return[e?t.concat([t[0]]):t]}return t instanceof L.Polyline?this._initPaths(t.getLatLngs(),t instanceof L.Polygon):Array.isArray(t)?t.reduce((t,i)=>t.concat(this._initPaths(i,e)),[]):[]},_initPatterns:function(t){return t.map(this._parsePatternDef)},setPatterns:function(t){this.options.patterns=t,this._patterns=this._initPatterns(this.options.patterns),this.redraw()},setPaths:function(t){this._paths=this._initPaths(t),this._bounds=this._initBounds(),this.redraw()},_parsePatternDef:function(t,e){return{symbolFactory:t.symbol,offset:rs(t.offset),endOffset:rs(t.endOffset),repeat:rs(t.repeat)}},onAdd:function(t){this._map=t,this._draw(),this._map.on("moveend",this.redraw,this)},onRemove:function(t){this._map.off("moveend",this.redraw,this),this._map=null,L.FeatureGroup.prototype.onRemove.call(this,t)},_initBounds:function(){const t=this._paths.reduce((t,e)=>t.concat(e),[]);return L.latLngBounds(t)},getBounds:function(){return this._bounds},_buildSymbols:function(t,e,i){return i.map((n,s)=>e.buildSymbol(n,t,this._map,s,i.length))},_getDirectionPoints:function(t,e){if(t.length<2)return[];return function(t,e){const i=hs(t),n=i.length;if(0===n)return[];const s=i[n-1].distB,o=as(e.offset,s),a=as(e.endOffset,s),r=s*as(e.repeat,s),h=a>0?s*a:0,l=[];let c=o>0?s*o:0;do{l.push(c),c+=r}while(r>0&&c<s-h);let u=0,p=i[0];return l.map(t=>{for(;t>p.distB&&u<n-1;)u++,p=i[u];const e=(t-p.distA)/(p.distB-p.distA);return{pt:ls(p.a,p.b,e),heading:p.heading}})}(t.map(t=>this._map.project(t)),e).map(t=>({latLng:this._map.unproject(L.point(t.pt)),heading:t.heading}))},redraw:function(){this._map&&(this.clearLayers(),this._draw())},_getPatternLayers:function(t){const e=this._map.getBounds().pad(.1);return this._paths.map(i=>{const n=this._getDirectionPoints(i,t).filter(t=>e.contains(t.latLng));return L.featureGroup(this._buildSymbols(i,t.symbolFactory,n))})},_draw:function(){this._patterns.map(t=>this._getPatternLayers(t)).forEach(t=>{this.addLayer(L.featureGroup(t))})}}),ps={Dash:L.Class.extend({options:{pixelSize:10,pathOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.pathOptions.clickable=!1},buildSymbol:function(t,e,i,n,s){const o=this.options,a=Math.PI/180;if(o.pixelSize<=1)return L.polyline([t.latLng,t.latLng],o.pathOptions);const r=i.project(t.latLng),h=-(t.heading-90)*a,l=L.point(r.x+o.pixelSize*Math.cos(h+Math.PI)/2,r.y+o.pixelSize*Math.sin(h)/2),c=r.add(r.subtract(l));return L.polyline([i.unproject(l),i.unproject(c)],o.pathOptions)}}),ArrowHead:L.Class.extend({options:{polygon:!0,pixelSize:10,headAngle:60,pathOptions:{stroke:!1,weight:2}},initialize:function(t){L.Util.setOptions(this,t),this.options.pathOptions.clickable=!1},buildSymbol:function(t,e,i,n,s){return this.options.polygon?L.polygon(this._buildArrowPath(t,i),this.options.pathOptions):L.polyline(this._buildArrowPath(t,i),this.options.pathOptions)},_buildArrowPath:function(t,e){const i=Math.PI/180,n=e.project(t.latLng),s=-(t.heading-90)*i,o=this.options.headAngle/2*i,a=s+o,r=s-o,h=L.point(n.x-this.options.pixelSize*Math.cos(a),n.y+this.options.pixelSize*Math.sin(a)),l=L.point(n.x-this.options.pixelSize*Math.cos(r),n.y+this.options.pixelSize*Math.sin(r));return[e.unproject(h),t.latLng,e.unproject(l)]}}),Marker:L.Class.extend({options:{markerOptions:{},rotation:!1},initialize:function(t){L.Util.setOptions(this,t),this.options.markerOptions.clickable=!1,this.options.markerOptions.draggable=!1},buildSymbol:function(t,e,i,n,s){return this.options.rotation&&(this.options.markerOptions.rotationAngle=t.heading+(this.options.angleCorrection||0)),L.marker(t.latLng,this.options.markerOptions)}})},ds=u.Handler.extend({options:{color:"#f00",weight:2,fillColor:"#ff0",fillOpacity:.7,radius:5,fontSize:"12px",fontWeight:"normal",iconUrl:"",iconWidth:32,iconHeight:32,continue:!1,showCloseButton:!1,showMeasurements:!1},FreelineEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)&&(this.geometry.addLatLng(t.latlng),this.onVertexAdd&&this.onVertexAdd(this.geometry),this.geometry.getLatLngs().length?this.tooltip.setContent("双击完成绘制"):this.tooltip.setContent("点击开始绘制")),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.geometry||(this.geometry=new u.Polyline([],this.options).addTo(this._map))},_mouseDblClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null}},ArrowEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setPaths([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("点击继续绘制,双击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new us(this.geometry,{patterns:[{offset:25,repeat:50,symbol:new ps.ArrowHead({pixelSize:15,pathOptions:{fillColor:this.options.fillColor,fillOpacity:this.options.fillOpacity,weight:0}})}]}).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setLatLngs(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry)},_mouseDblClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null}},SectorEvents:{_mouseMove(t){var i;if(this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this._latlng&&this.line.setLatLngs([this._latlng,t.latlng]),this._latlng&&this._radius)if(this._endAngle=(null==(i=e.GeoUtil.calcBearAndDisByPoints(t.latlng,this._latlng))?void 0:i.angle)+180,this.geometry)this.geometry.setStyle({startAngle:this._startAngle,endAngle:this._endAngle,...this.style});else{const t=new hn({collisionFlg:!0,padding:.5});this.geometry=new rn(this._latlng,this._radius,{renderer:t,startAngle:this._startAngle,endAngle:this._endAngle,...this.style}).addTo(this._map)}},_mouseClick(t){var i;this._latlng?this._radius||(this.tooltip.setContent("双击完成绘制"),this._map.removeLayer(this.line),this._radius=this._latlng.distanceTo(t.latlng),this._startAngle=(null==(i=e.GeoUtil.calcBearAndDisByPoints(t.latlng,this._latlng))?void 0:i.angle)+180):(this._latlng=t.latlng,this.line=L.polyline([this._latlng],{color:"#eee",weight:2,dashArray:[5,15]}).addTo(this._map),this.tooltip.setContent("点击继续绘制"))},_mouseDblClick(t){this._map.removeLayer(this.tempPoint),this.onFinish&&this.geometry&&this.onFinish(this.geometry),!this.options.continue&&this.disable(),this.geometry=null}},MarkerEvents:{_mouseMove(t){this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?this.geometry.setLatLng(t.latlng):this.geometry=new u.Marker(t.latlng,{icon:new u.Icon({iconUrl:this.options.iconUrl,iconSize:[this.options.iconWidth,this.options.iconHeight],iconAnchor:[this.options.iconWidth/2,this.options.iconHeight/2]})}).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),!this.options.continue&&this.disable(),this.geometry=null}},TextEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?this.geometry.setLatLng(t.latlng):(this.tooltip.setContent("点击开始绘制,并修改名字"),this.geometry=new Vn(t.latlng,"Text",{color:this.options.color,fontSize:this.options.fontSize,fontWeight:this.options.fontWeight}).addTo(this._map)),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.geometry.enableEdit(),this.onFinish&&this.geometry&&this.onFinish(this.geometry),!this.options.continue&&this.disable(),this.geometry=null}},PointEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?this.geometry.setLatLng(t.latlng):(this.tooltip.setContent("点击开始绘制"),this.geometry=new u.CircleMarker(t.latlng,this.options).addTo(this._map)),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),!this.options.continue&&this.disable(),this.geometry=null}},CircleEvents:{_mouseMove(t){if(this.tooltip.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)){const e=this.latlng?this._map.distance(t.latlng,this.latlng):0;this.geometry.setRadius(e),0!==e?this.tooltip.setContent(`半径:<b>${e.toFixed(2)}m</b><br/>继续点击完成绘制`):this.tooltip.setContent("点击开始绘制")}this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlng=t.latlng,this.onVertexAdd&&this.onVertexAdd(this.geometry),this.geometry&&0!==this.geometry.getRadius()?(this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null):this.geometry=new u.Circle(this.latlng,0,this.options).addTo(this._map)},_mouseDblClick(t){}},PolylineEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setLatLngs([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("点击继续绘制,双击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new u.Polyline([t.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setLatLngs(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry)},_mouseDblClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null}},RectangleEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setBounds([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("继续点击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new u.Rectangle([t.latlng,t.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setBounds(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry),2===this.latlngs.length&&(this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null)},_mouseDblClick(t){}},PolygonEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setLatLngs([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("点击继续绘制,双击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new u.Polygon([t.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setLatLngs(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry)},_mouseDblClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null}},addHooks(){this[this.drawType+"Events"]&&(this[this.drawType+"Events"]._mouseMove&&this._map.on("mousemove",this[this.drawType+"Events"]._mouseMove,this),this[this.drawType+"Events"]._mouseClick&&this._map.on("click",this[this.drawType+"Events"]._mouseClick,this),this[this.drawType+"Events"]._mouseDblClick&&this._map.on("dblclick",this[this.drawType+"Events"]._mouseDblClick,this))},removeHooks(){this[this.drawType+"Events"]&&(this[this.drawType+"Events"]._mouseMove&&this._map.off("mousemove",this[this.drawType+"Events"]._mouseMove,this),this[this.drawType+"Events"]._mouseClick&&this._map.off("click",this[this.drawType+"Events"]._mouseClick,this),this[this.drawType+"Events"]._mouseDblClick&&this._map.off("dblclick",this[this.drawType+"Events"]._mouseDblClick,this))},setOptions(t){return u.Util.setOptions(this,t),this},enable(t,i={}){return u.Util.setOptions(this,i),this.onFinish=i.onFinish||new Function,this.onDrawing=i.onDrawing||new Function,this.onVertexAdd=i.onVertexAdd||new Function,this.drawType=e.StringUtil.changeCase(t,1),this.latlngs=i.latlngs||[],this._map.setCursor("data:application/octet-stream;base64,AAACAAEAEBAAAAMABgBoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AACxAAAs6/oAAIKEAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQUAAAAAAAAAAAAAAAAAAAUFBQAAAAAAAAAAAAAAAAAFAwQAAAAAAAAAAAAAAAAAAAMDBAAAAAAAAAEBAQAAAAADAwQAAAAAAAABAQEAAAAAAAMDBAQAAAAAAQEBAAAAAAADAwIAAAAAAAAAAAAAAAAAAAIBAQAAAAAAAAAAAAAAAAABAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAA/v8AAP4/AAD+HwAA/g8AAP4PAAD+BwAAxwcAAMcDAADHgwAA/8EAAP/BAAD/5wAA//8AAP//AAA="),this.tempPoint=new u.CircleMarker([0,0],{weight:1,radius:5,color:"#3388ff",fillColor:"#fff",fillOpacity:1}).addTo(this._map),this.tooltip=new u.Tooltip({offset:[10,-10]}).setContent("点击开始绘制"),u.Handler.prototype.enable.call(this),this},disable(){if(this._map.setCursor(),this.removeHooks(),this.tooltip&&this._map.closeTooltip(this.tooltip),this.tempPoint&&this._map.removeLayer(this.tempPoint),this.options.showCloseButton&&this.options.showMeasurements){const t=this.geometry._measurementLayer;let e;e=this.geometry instanceof u.Path?this.geometry._latlngs.flat().at(-1):this.geometry._latlng;const i=this.geometry._leaflet_id,n=new u.Marker(e,{icon:new u.Icon({iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAAFRJREFUKFOlklEKACAIQ7f7H9rQkJYFFUVfY49NiwBgcc+HABlmu/K7HQMge0SFVd8CCqU5tQlwUQ06UqYuwA7Siv/AU6U6YK3n1f7Wen7onvD6NRqqukP5oM7XCQAAAABJRU5ErkJggg==",iconSize:[12,12],iconAnchor:[6,6]}),zIndexOffset:9999}).on("click",e=>{this._map.removeLayerById(i),null==t||t.clearLayers(),n.remove()}).addTo(this._map)}return u.Util.setOptions(this,ds.prototype.options),u.Handler.prototype.disable.call(this),this}});u.Map.addInitHook("addHandler","drawHandler",ds);const _s=u.Handler.extend({_touchstart:u.Browser.msPointer?"MSPointerDown":u.Browser.pointer?"pointerdown":"touchstart",initialize(t){u.Handler.prototype.initialize.call(this,t),this._items=[],this._visible=!1,_s.BASE_CLS=`${t.clsPrefix}-contextmenu`;const e=this._container=u.DomUtil.create("div",`${t.clsPrefix}-contextmenu`,t._container);e.style.zIndex=1e4,e.style.position="absolute",t.options.contextmenuWidth&&(e.style.width=t.options.contextmenuWidth+"px"),this._createItems(),u.DomEvent.on(e,"click",u.DomEvent.stop).on(e,"mousedown",u.DomEvent.stop).on(e,"dblclick",u.DomEvent.stop).on(e,"contextmenu",u.DomEvent.stop)},addHooks(){const t=this._map.getContainer();u.DomEvent.on(t,"mouseleave",this._hide,this).on(document,"keydown",this._onKeyDown,this),u.Browser.touch&&u.DomEvent.on(document,this._touchstart,this._hide,this),this._map.on({contextmenu:this._show,mousedown:this._hide,zoomstart:this._hide},this)},removeHooks(){const t=this._map.getContainer();u.DomEvent.off(t,"mouseleave",this._hide,this).off(document,"keydown",this._onKeyDown,this),u.Browser.touch&&u.DomEvent.off(document,this._touchstart,this._hide,this),this._map.off({contextmenu:this._show,mousedown:this._hide,zoomstart:this._hide},this)},showAt(t,e){t instanceof u.LatLng&&(t=this._map.latLngToContainerPoint(t)),this._showAtPoint(t,e)},hide(){this._hide()},addItem(t){return this.insertItem(t)},insertItem(t,e){e=void 0!==e?e:this._items.length;const i=this._createItem(this._container,t,e);return this._items.push(i),this._sizeChanged=!0,this._map.fire("contextmenu.additem",{contextmenu:this,el:i.el,index:e}),i.el},removeItem(t){const e=this._container;return isNaN(t)||(t=e.children[t]),t?(this._removeItem(u.Util.stamp(t)),this._sizeChanged=!0,this._map.fire("contextmenu.removeitem",{contextmenu:this,el:t}),t):null},removeAllItems(){const t=this._container.children;let e;for(;t.length;)e=t[0],this._removeItem(u.Util.stamp(e));return t},hideAllItems(){let t,e,i;for(e=0,i=this._items.length;e<i;e++)t=this._items[e],t.el.style.display="none"},showAllItems(){let t,e,i;for(e=0,i=this._items.length;e<i;e++)t=this._items[e],t.el.style.display=""},setDisabled(t,e){const i=this._container,n=_s.BASE_CLS+"-item";isNaN(t)||(t=i.children[t]),t&&u.DomUtil.hasClass(t,n)&&(e?(u.DomUtil.addClass(t,n+"-disabled"),this._map.fire("contextmenu.disableitem",{contextmenu:this,el:t})):(u.DomUtil.removeClass(t,n+"-disabled"),this._map.fire("contextmenu.enableitem",{contextmenu:this,el:t})))},isVisible(){return this._visible},_createItems(){const t=this._map.options.contextmenuItems;let e,i;for(e=0,i=t.length;e<i;e++)this._items.push(this._createItem(this._container,t[e]))},_createItem(t,i,n){if(i.separator||"-"===i)return this._createSeparator(t,n);const s=_s.BASE_CLS+"-item";let o=!1;e.Util.isFunction(i.disabled)?o=i.disabled(this):i.disabled&&(o=!0);const a=o?s+" "+s+"-disabled":s,r=this._insertElementAt("a",a,t,n),h=this._createEventHandler(r,i.callback,i.context,i.hideOnSelect),l=this._getIcon(i),c=this._getIconCls(i);let p="";return l?p='<img class="'+_s.BASE_CLS+'-icon" src="'+l+'"/>':c&&(p='<span class="'+_s.BASE_CLS+"-icon "+c+'"></span>'),r.innerHTML=p+i.text,r.href="#",u.DomEvent.on(r,"mouseover",this._onItemMouseOver,this).on(r,"mouseout",this._onItemMouseOut,this).on(r,"mousedown",u.DomEvent.stopPropagation).on(r,"click",h),u.Browser.touch&&u.DomEvent.on(r,this._touchstart,u.DomEvent.stopPropagation),u.Browser.pointer||u.DomEvent.on(r,"click",this._onItemMouseOut,this),{id:u.Util.stamp(r),el:r,disabled:i.disabled,callback:h}},_removeItem(t){let e,i,n,s,o;for(n=0,s=this._items.length;n<s;n++)if(e=this._items[n],e.id===t)return i=e.el,o=e.callback,o&&(u.DomEvent.off(i,"mouseover",this._onItemMouseOver,this).off(i,"mouseover",this._onItemMouseOut,this).off(i,"mousedown",u.DomEvent.stopPropagation).off(i,"click",o),u.Browser.touch&&u.DomEvent.off(i,this._touchstart,u.DomEvent.stopPropagation),u.Browser.pointer||u.DomEvent.on(i,"click",this._onItemMouseOut,this)),this._container.removeChild(i),this._items.splice(n,1),e;return null},_createSeparator(t,e){const i=this._insertElementAt("div",_s.BASE_CLS+"-separator",t,e);return{id:u.Util.stamp(i),el:i}},_createEventHandler(t,e,i,n){const s=this;this._map;const o=_s.BASE_CLS+"-item-disabled";n=void 0===n||n;return function(a){if(u.DomUtil.hasClass(t,o))return;const r=s._map,h=s._showLocation.containerPoint,l=r.containerPointToLayerPoint(h),c={containerPoint:h,layerPoint:l,latlng:r.layerPointToLatLng(l),relatedTarget:s._showLocation.relatedTarget};n&&s._hide(),e&&e.call(i||r,c),s._map.fire("contextmenu.select",{contextmenu:s,el:t})}},_insertElementAt(t,e,i,n){let s;const o=document.createElement(t);return o.className=e,void 0!==n&&(s=i.children[n]),s?i.insertBefore(o,s):i.appendChild(o),o},_show(t){this._showAtPoint(t.containerPoint,t)},_showAtPoint(t,e){if(this._items.length){this._map;const i=u.extend(e||{},{contextmenu:this});this._showLocation={containerPoint:t},e&&e.relatedTarget&&(this._showLocation.relatedTarget=e.relatedTarget),this._setPosition(t),this._visible||(this._container.style.display="block",this._visible=!0),this._map.fire("contextmenu.show",i)}},_hide(){this._visible&&(this._visible=!1,this._container.style.display="none",this._map.fire("contextmenu.hide",{contextmenu:this}))},_getIcon:t=>u.Browser.retina&&t.retinaIcon||t.icon,_getIconCls:t=>u.Browser.retina&&t.retinaIconCls||t.iconCls,_setPosition(t){const e=this._map.getSize(),i=this._container,n=this._getElementSize(i);let s;this._map.options.contextmenuAnchor&&(s=new u.Point(this._map.options.contextmenuAnchor),t=t.add(s)),i._leaflet_pos=t,t.x+n.x>e.x?(i.style.left="auto",i.style.right=Math.min(Math.max(e.x-t.x,0),e.x-n.x-1)+"px"):(i.style.left=Math.max(t.x,0)+"px",i.style.right="auto"),t.y+n.y>e.y?(i.style.top="auto",i.style.bottom=Math.min(Math.max(e.y-t.y,0),e.y-n.y-1)+"px"):(i.style.top=Math.max(t.y,0)+"px",i.style.bottom="auto")},_getElementSize(t){let e=this._size;const i=t.style.display;return e&&!this._sizeChanged||(e={},t.style.left="-999999px",t.style.right="auto",t.style.display="block",e.x=t.offsetWidth,e.y=t.offsetHeight,t.style.left="auto",t.style.display=i,this._sizeChanged=!1),e},_onKeyDown(t){27===t.keyCode&&this._hide()},_onItemMouseOver(t){u.DomUtil.addClass(t.target||t.srcElement,"over")},_onItemMouseOut(t){u.DomUtil.removeClass(t.target||t.srcElement,"over")}});u.Map.mergeOptions({contextmenuItems:[]}),u.Map.addInitHook("addHandler","contextmenu",_s);const ms={bindContextMenu(t){return L.setOptions(this,t),this._initContextMenu(),this},unbindContextMenu(){return this.off("contextmenu",this._showContextMenu,this),this},addContextMenuItem(t){this.options.contextmenuItems.push(t)},removeContextMenuItemWithIndex(t){const e=[];for(let n=0;n<this.options.contextmenuItems.length;n++)this.options.contextmenuItems[n].index==t&&e.push(n);let i=e.pop();for(;void 0!==i;)this.options.contextmenuItems.splice(i,1),i=e.pop()},replaceContextMenuItem(t){this.removeContextMenuItemWithIndex(t.index),this.addContextMenuItem(t)},_initContextMenu(){this._items=[],this.on("contextmenu",this._showContextMenu,this)},_showContextMenu(t){let e,i,n,s,o;if(this._items=[],this._map.contextmenu){for(i=L.extend({relatedTarget:this},t),n=this._map.mouseEventToContainerPoint(t.originalEvent),this.options.contextmenuInheritItems||this._map.contextmenu.hideAllItems(),s=0,o=this.options.contextmenuItems.length;s<o;s++)e=this.options.contextmenuItems[s],this._items.push(this._map.contextmenu.insertItem(e,e.index));this._map.once("contextmenu.hide",this._hideContextMenu,this),this._map.contextmenu.showAt(n,i)}},_hideContextMenu(){let t,e;if(this._items){for(t=0,e=this._items.length;t<e;t++)this._map.contextmenu.removeItem(this._items[t]);this._items.length=0,this.options.contextmenuInheritItems||this._map.contextmenu.showAllItems()}}},gs=[u.Marker,u.Path],fs={contextmenu:!1,contextmenuItems:[],contextmenuInheritItems:!1};for(let L=0,Xs=gs.length;L<Xs;L++){const t=gs[L];t.prototype.options?t.mergeOptions(fs):t.prototype.options=fs,t.addInitHook(function(){this.options.contextmenu&&this._initContextMenu()}),t.include(ms)}const ys=u.Handler.extend({options:{moveStep:10,zoomSnap:1,moveKeyCodeMap:{65:"left",68:"right",87:"top",83:"bottom"},zoomKeyCodeMap:{69:"add",81:"minus"}},enable(t){u.Util.setOptions(this,t),u.Handler.prototype.enable.call(this)},addHooks(){this._map.on("keydown",this._keyDownEvent,this)},removeHooks(){this._map.off("keydown",this._keyDownEvent,this)},_keyDownEvent(t){let e=this.options.moveKeyCodeMap[t.originalEvent.keyCode],i=this.options.zoomKeyCodeMap[t.originalEvent.keyCode];e&&this.moveByMeters(e,this.options.moveStep),i&&this.setZoom(i)},moveByMeters(t,e){let i=this._map.project(this._map.getCenter());switch(t){case"left":i.x-=e;break;case"right":i.x+=e;break;case"bottom":i.y+=e;break;case"top":i.y-=e}i=this._map.unproject(i),this._map.panTo(i)},setZoom(t){let e=this._map.getZoom();switch(t){case"add":e+=this.options.zoomSnap;break;case"minus":e-=this.options.zoomSnap}this._map.setZoom(e)}});u.Map.addInitHook("addHandler","keyboard",ys);const As=u.LayerGroup.extend({initialize(t){u.Util.setOptions(this,t),u.LayerGroup.prototype.initialize.call(this,t)},getRasterLayers(){const t={},e=i=>{if(i._layers&&i.getLayer)for(const n in i._layers){const s=i._layers[n];s._layers&&s.getLayer?e(s):t[s._leaflet_id]=s}else t[i._leaflet_id]=i};return e(this),t},removeRasterLayer(t){const e=function(i){if(i._layers&&i.getLayer&&i.getLayer(t)){const e=i.getLayer(t);i.removeLayer(e)}else if(i._layers)for(const n in i._layers){const s=i._layers[n];if(s._layers&&s.getLayer&&s.getLayer(t)){const e=s.getLayer(t);s.removeLayer(e)}else s._layers&&e(s)}};e(this)},getRasterTop(){const t=Object.values(this.getRasterLayers());return t.length?Math.max(...t.map(t=>t.options.zIndex))+1:null}});function vs(t,e,i,n){let s=n;const o=e+(i-e>>1);let a,r=i-e;const h=t[e],l=t[e+1],c=t[i],u=t[i+1];for(let p=e+3;p<i;p+=3){const e=Ms(t[p],t[p+1],h,l,c,u);if(e>s)a=p,s=e;else if(e===s){const t=Math.abs(p-o);t<r&&(a=p,r=t)}}s>n&&(a-e>3&&vs(t,e,a,n),t[a+2]=s,i-a>3&&vs(t,a,i,n))}function Ms(t,e,i,n,s,o){let a=s-i,r=o-n;if(0!==a||0!==r){const h=((t-i)*a+(e-n)*r)/(a*a+r*r);h>1?(i=s,n=o):h>0&&(i+=a*h,n+=r*h)}return a=t-i,r=e-n,a*a+r*r}function Ls(t,e,i,n){const s={id:null==t?null:t,type:e,geometry:i,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if("Point"===e||"MultiPoint"===e||"LineString"===e)xs(s,i);else if("Polygon"===e)xs(s,i[0]);else if("MultiLineString"===e)for(const o of i)xs(s,o);else if("MultiPolygon"===e)for(const o of i)xs(s,o[0]);return s}function xs(t,e){for(let i=0;i<e.length;i+=3)t.minX=Math.min(t.minX,e[i]),t.minY=Math.min(t.minY,e[i+1]),t.maxX=Math.max(t.maxX,e[i]),t.maxY=Math.max(t.maxY,e[i+1])}function bs(t,e,i,n){if(!e.geometry)return;const s=e.geometry.coordinates;if(s&&0===s.length)return;const o=e.geometry.type,a=Math.pow(i.tolerance/((1<<i.maxZoom)*i.extent),2);let r=[],h=e.id;if(i.promoteId?h=e.properties[i.promoteId]:i.generateId&&(h=n||0),"Point"===o)ws(s,r);else if("MultiPoint"===o)for(const l of s)ws(l,r);else if("LineString"===o)Ps(s,r,a,!1);else if("MultiLineString"===o){if(i.lineMetrics){for(const i of s)r=[],Ps(i,r,a,!1),t.push(Ls(h,"LineString",r,e.properties));return}ks(s,r,a,!1)}else if("Polygon"===o)ks(s,r,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(const s of e.geometry.geometries)bs(t,{id:h,geometry:s,properties:e.properties},i,n);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const t of s){const e=[];ks(t,e,a,!0),r.push(e)}}t.push(Ls(h,o,r,e.properties))}function ws(t,e){e.push(Es(t[0]),Cs(t[1]),0)}function Ps(t,e,i,n){let s,o,a=0;for(let h=0;h<t.length;h++){const i=Es(t[h][0]),r=Cs(t[h][1]);e.push(i,r,0),h>0&&(a+=n?(s*r-i*o)/2:Math.sqrt(Math.pow(i-s,2)+Math.pow(r-o,2))),s=i,o=r}const r=e.length-3;e[2]=1,vs(e,0,r,i),e[r+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function ks(t,e,i,n){for(let s=0;s<t.length;s++){const o=[];Ps(t[s],o,i,n),e.push(o)}}function Es(t){return t/360+.5}function Cs(t){const e=Math.sin(t*Math.PI/180),i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i<0?0:i>1?1:i}function Ss(t,e,i,n,s,o,a,r){if(n/=e,o>=(i/=e)&&a<n)return t;if(a<i||o>=n)return null;const h=[];for(const l of t){const t=l.geometry;let e=l.type;const o=0===s?l.minX:l.minY,a=0===s?l.maxX:l.maxY;if(o>=i&&a<n){h.push(l);continue}if(a<i||o>=n)continue;let c=[];if("Point"===e||"MultiPoint"===e)Ts(t,c,i,n,s);else if("LineString"===e)Os(t,c,i,n,s,!1,r.lineMetrics);else if("MultiLineString"===e)Is(t,c,i,n,s,!1);else if("Polygon"===e)Is(t,c,i,n,s,!0);else if("MultiPolygon"===e)for(const r of t){const t=[];Is(r,t,i,n,s,!0),t.length&&c.push(t)}if(c.length){if(r.lineMetrics&&"LineString"===e){for(const t of c)h.push(Ls(l.id,e,t,l.tags));continue}"LineString"!==e&&"MultiLineString"!==e||(1===c.length?(e="LineString",c=c[0]):e="MultiLineString"),"Point"!==e&&"MultiPoint"!==e||(e=3===c.length?"Point":"MultiPoint"),h.push(Ls(l.id,e,c,l.tags))}}return h.length?h:null}function Ts(t,e,i,n,s){for(let o=0;o<t.length;o+=3){const a=t[o+s];a>=i&&a<=n&&Ds(e,t[o],t[o+1],t[o+2])}}function Os(t,e,i,n,s,o,a){let r=Bs(t);const h=0===s?Rs:zs;let l,c,u=t.start;for(let f=0;f<t.length-3;f+=3){const p=t[f],d=t[f+1],_=t[f+2],m=t[f+3],g=t[f+4],y=0===s?p:d,A=0===s?m:g;let v=!1;a&&(l=Math.sqrt(Math.pow(p-m,2)+Math.pow(d-g,2))),y<i?A>i&&(c=h(r,p,d,m,g,i),a&&(r.start=u+l*c)):y>n?A<n&&(c=h(r,p,d,m,g,n),a&&(r.start=u+l*c)):Ds(r,p,d,_),A<i&&y>=i&&(c=h(r,p,d,m,g,i),v=!0),A>n&&y<=n&&(c=h(r,p,d,m,g,n),v=!0),!o&&v&&(a&&(r.end=u+l*c),e.push(r),r=Bs(t)),a&&(u+=l)}let p=t.length-3;const d=t[p],_=t[p+1],m=t[p+2],g=0===s?d:_;g>=i&&g<=n&&Ds(r,d,_,m),p=r.length-3,o&&p>=3&&(r[p]!==r[0]||r[p+1]!==r[1])&&Ds(r,r[0],r[1],r[2]),r.length&&e.push(r)}function Bs(t){const e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function Is(t,e,i,n,s,o){for(const a of t)Os(a,e,i,n,s,o,!1)}function Ds(t,e,i,n){t.push(e,i,n)}function Rs(t,e,i,n,s,o){const a=(o-e)/(n-e);return Ds(t,o,i+(s-i)*a,1),a}function zs(t,e,i,n,s,o){const a=(o-i)/(s-i);return Ds(t,e+(n-e)*a,o,1),a}function Gs(t,e){const i=[];for(let n=0;n<t.length;n++){const s=t[n],o=s.type;let a;if("Point"===o||"MultiPoint"===o||"LineString"===o)a=Ns(s.geometry,e);else if("MultiLineString"===o||"Polygon"===o){a=[];for(const t of s.geometry)a.push(Ns(t,e))}else if("MultiPolygon"===o){a=[];for(const t of s.geometry){const i=[];for(const n of t)i.push(Ns(n,e));a.push(i)}}i.push(Ls(s.id,o,a,s.tags))}return i}function Ns(t,e){const i=[];i.size=t.size,void 0!==t.start&&(i.start=t.start,i.end=t.end);for(let n=0;n<t.length;n+=3)i.push(t[n]+e,t[n+1],t[n+2]);return i}function js(t,e){if(t.transformed)return t;const i=1<<t.z,n=t.x,s=t.y;for(const o of t.features){const t=o.geometry,a=o.type;if(o.geometry=[],1===a)for(let r=0;r<t.length;r+=2)o.geometry.push(Fs(t[r],t[r+1],e,i,n,s));else for(let r=0;r<t.length;r++){const a=[];for(let o=0;o<t[r].length;o+=2)a.push(Fs(t[r][o],t[r][o+1],e,i,n,s));o.geometry.push(a)}}return t.transformed=!0,t}function Fs(t,e,i,n,s,o){return[Math.round(i*(t*n-s)),Math.round(i*(e*n-o))]}function Us(t,e,i,n,s){const o=e===s.maxZoom?0:s.tolerance/((1<<e)*s.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:t.length,source:null,x:i,y:n,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const r of t)Zs(a,r,o,s);return a}function Zs(t,e,i,n){const s=e.geometry,o=e.type,a=[];if(t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),"Point"===o||"MultiPoint"===o)for(let r=0;r<s.length;r+=3)a.push(s[r],s[r+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)Hs(a,s,t,i,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(let r=0;r<s.length;r++)Hs(a,s[r],t,i,"Polygon"===o,0===r);else if("MultiPolygon"===o)for(let r=0;r<s.length;r++){const e=s[r];for(let n=0;n<e.length;n++)Hs(a,e[n],t,i,!0,0===n)}if(a.length){let i=e.tags||null;if("LineString"===o&&n.lineMetrics){i={};for(const t in e.tags)i[t]=e.tags[t];i.mapbox_clip_start=s.start/s.size,i.mapbox_clip_end=s.end/s.size}const r={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:i};null!==e.id&&(r.id=e.id),t.features.push(r)}}function Hs(t,e,i,n,s,o){const a=n*n;if(n>0&&e.size<(s?a:n))return void(i.numPoints+=e.length/3);const r=[];for(let h=0;h<e.length;h+=3)(0===n||e[h+2]>a)&&(i.numSimplified++,r.push(e[h],e[h+1])),i.numPoints++;s&&function(t,e){let i=0;for(let n=0,s=t.length,o=s-2;n<s;o=n,n+=2)i+=(t[n]-t[o])*(t[n+1]+t[o+1]);if(i>0===e)for(let n=0,s=t.length;n<s/2;n+=2){const e=t[n],i=t[n+1];t[n]=t[s-2-n],t[n+1]=t[s-1-n],t[s-2-n]=e,t[s-1-n]=i}}(r,o),t.push(r)}const qs={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};let Vs=class{constructor(t,e){const i=(e=this.options=function(t,e){for(const i in e)t[i]=e[i];return t}(Object.create(qs),e)).debug;if(e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");let n=function(t,e){const i=[];if("FeatureCollection"===t.type)for(let n=0;n<t.features.length;n++)bs(i,t.features[n],e,n);else"Feature"===t.type?bs(i,t,e):bs(i,{geometry:t},e);return i}(t,e);this.tiles={},this.tileCoords=[],i&&(this.stats={},this.total=0),n=function(t,e){const i=e.buffer/e.extent;let n=t;const s=Ss(t,1,-1-i,i,0,-1,2,e),o=Ss(t,1,1-i,2+i,0,-1,2,e);return(s||o)&&(n=Ss(t,1,-i,1+i,0,-1,2,e)||[],s&&(n=Gs(s,1).concat(n)),o&&(n=n.concat(Gs(o,-1)))),n}(n,e),n.length&&this.splitTile(n,0,0,0),i&&n.length}splitTile(t,e,i,n,s,o,a){const r=[t,e,i,n],h=this.options,l=h.debug;for(;r.length;){n=r.pop(),i=r.pop(),e=r.pop(),t=r.pop();const c=1<<e,u=Ws(e,i,n);let p=this.tiles[u];if(!p&&(p=this.tiles[u]=Us(t,e,i,n,h),this.tileCoords.push({z:e,x:i,y:n}),l)){const t=`z${e}`;this.stats[t]=(this.stats[t]||0)+1,this.total++}if(p.source=t,null==s){if(e===h.indexMaxZoom||p.numPoints<=h.indexMaxPoints)continue}else{if(e===h.maxZoom||e===s)continue;if(null!=s){const t=s-e;if(i!==o>>t||n!==a>>t)continue}}if(p.source=null,0===t.length)continue;const d=.5*h.buffer/h.extent,_=.5-d,m=.5+d,g=1+d;let f=null,y=null,A=null,v=null,M=Ss(t,c,i-d,i+m,0,p.minX,p.maxX,h),L=Ss(t,c,i+_,i+g,0,p.minX,p.maxX,h);t=null,M&&(f=Ss(M,c,n-d,n+m,1,p.minY,p.maxY,h),y=Ss(M,c,n+_,n+g,1,p.minY,p.maxY,h),M=null),L&&(A=Ss(L,c,n-d,n+m,1,p.minY,p.maxY,h),v=Ss(L,c,n+_,n+g,1,p.minY,p.maxY,h),L=null),r.push(f||[],e+1,2*i,2*n),r.push(y||[],e+1,2*i,2*n+1),r.push(A||[],e+1,2*i+1,2*n),r.push(v||[],e+1,2*i+1,2*n+1)}}getTile(t,e,i){t=+t,e=+e,i=+i;const n=this.options,{extent:s,debug:o}=n;if(t<0||t>24)return null;const a=1<<t,r=Ws(t,e=e+a&a-1,i);if(this.tiles[r])return js(this.tiles[r],s);let h,l=t,c=e,u=i;for(;!h&&l>0;)l--,c>>=1,u>>=1,h=this.tiles[Ws(l,c,u)];return h&&h.source?(this.splitTile(h.source,l,c,u,t,e,i),this.tiles[r]?js(this.tiles[r],s):null):null}};function Ws(t,e,i){return 32*((1<<t)*i+e)+t}const Ks=L.GridLayer.extend({options:{async:!1},initialize:function(t,e){L.setOptions(this,e),L.GridLayer.prototype.initialize.call(this,e),this.tileIndex=function(t,e){return new Vs(t,e)}(t,this.options)},createTile:function(t){var e=L.DomUtil.create("canvas","leaflet-tile"),i=this.getTileSize();e.width=i.x,e.height=i.y;for(var n=e.getContext("2d"),s=this.tileIndex.getTile(t.z,t.x,t.y),o=s?s.features:[],a=0;a<o.length;a++){var r=o[a];this.drawFeature(n,r)}return e},drawFeature:function(t,e){e.type;var i=e.type;if(t.beginPath(),this.options.style&&(this.options.style instanceof Function?this.setStyle(t,this.options.style(e.tags)):this.setStyle(t,this.options.style)),2===i||3===i)for(var n=0;n<e.geometry.length;n++)for(var s=e.geometry[n],o=0;o<s.length;o++){var a=s[o];o?t.lineTo(a[0]/16,a[1]/16):t.moveTo(a[0]/16,a[1]/16)}else if(1===i)for(n=0;n<e.geometry.length;n++){a=e.geometry[n];t.arc(a[0]/16,a[1]/16,2,0,2*Math.PI,!0)}3===i&&t.fill(this.options.style.fillRule||"evenodd"),t.stroke()},setStyle:function(t,e){e.stroke,t.lineWidth=e.weight||5;var i=this.setOpacity(e.color,e.opacity);t.strokeStyle=i,e.fill,t.fillStyle=e.fillColor||"#03f";i=this.setOpacity(e.fillColor,e.fillOpacity);t.fillStyle=i},setOpacity:function(t,e){if(e){if((t=t||"#03f").iscolorHex()){var i=t.colorRgb();return"rgba("+i[0]+","+i[1]+","+i[2]+","+e+")"}return t}return t}});String.prototype.iscolorHex=function(){var t=this.toLowerCase();return/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)},String.prototype.colorRgb=function(){var t=this.toLowerCase();if(4===t.length){for(var e="#",i=1;i<4;i+=1)e+=t.slice(i,i+1).concat(t.slice(i,i+1));t=e}var n=[];for(i=1;i<7;i+=2)n.push(parseInt("0x"+t.slice(i,i+2)));return n},(t=>{const i=Object.create(L)||{};i.LANG=_,i.BaseMap=L.Map.extend({options:{doubleClickZoom:!1,closePopupOnClick:!1,zoomControl:!1,attributionControl:!1,scaleControl:{show:!0},rotate:!1,rotateControl:!1,minZoom:5,maxZoom:19,contextmenu:!0,center:[0,0],zoom:17},initialize(i,n={},s){var o;if("string"==typeof i&&(i=document.getElementById(i)),!i instanceof HTMLElement||!i.clientWidth||!i.clientHeight)throw new Error("地图容器不存在或元素尺寸为0");this.lang="string"==typeof n.lang?n.lang:"zh_CN",this.clsPrefix="string"==typeof n.clsPrefix?n.clsPrefix:"gis2d",function(t){const e=document.createElement("style"),i=document.head||document.documentElement;e.innerHTML=`\n\t.${t}-statusbar {\n\t\tdisplay: flex;\n\t\tcolor: #fff;\n\t\theight: 26px;\n\t\tpadding: 0 10px;\n\t\tline-height: 26px;\n\t\tmargin: 0;\n\t\tletter-spacing: 1px;\n\t\ttext-shadow: 0 0 2px #fff;\n\t\tborder: 1px solid #999;\n\t\tborder-top: none;\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t}\n\t.${t}-statusbar-item + .${t}-statusbar-item {\n\t\tmargin-left: 10px\n\t}\n\t.${t}-eaglemap {\n\t\tborder: solid rgba(13, 59, 54, 0.85) 1px;\n\t\tbox-shadow: 0 1px 7px #999;\n\t\tbackground: rgba(13, 59, 54, 0.85);\n\t\t-moz-border-radius: 8px;\n\t\t-webkit-border-radius: 8px;\n\t\tborder-radius: 3px;\n\t\ttransition: all 0.5s;\n\t}\n\n\t.${t}-eaglemap a {\n\t\tbackground-color: rgba(13, 59, 54, 0.85);\n\t\tbackground-position: -1px -1px;\n\t\tbackground-repeat: no-repeat;\n\t\tdisplay: block;\n\t\toutline: none;\n\t\tz-index: 99999;\n\t\ttransition: all 0.2s;\n\t}\n\n\t.${t}-eaglemap a.minimized {\n\t\t-webkit-transform: rotate(180deg);\n\t\ttransform: rotate(180deg);\n\t}\n\n\t.${t}-eaglemap a.minimized-bottomright {\n\t\t-webkit-transform: rotate(180deg);\n\t\ttransform: rotate(180deg);\n\t\tborder-radius: 0px;\n\t}\n\n\t.${t}-eaglemap a.minimized-topleft {\n\t\t-webkit-transform: rotate(0deg);\n\t\ttransform: rotate(0deg);\n\t\tborder-radius: 0px;\n\t}\n\t.${t}-eaglemap a.minimized-bottomleft {\n\t\t-webkit-transform: rotate(270deg);\n\t\ttransform: rotate(270deg);\n\t\tborder-radius: 0px;\n\t}\n\t.${t}-eaglemap a.minimized-topright {\n\t\t-webkit-transform: rotate(90deg);\n\t\ttransform: rotate(90deg);\n\t\tborder-radius: 0px;\n\t}\n\t.${t}-eaglemap-toggle-display {\n\t\tbackground-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAMdJREFUOE/V0zEOQVEQheH/hMQqVDahREMreonKApCgUYkE67ANOhWJxga0WoXqyEuehBeP+0Lj1iffzNzMiB89/cjhTyDbOSAv6Ro6+svRbLeALtCUdElitgvJImnQFigDO6Ah6XzHbJeAiaT2Y4E0aAYM4+AeqEeY7SKwBk6Sqh+hKGB7Cozj8BHoACsg6mgTDMXYAJi/+PBsUIxFo1QSWDbI9hLofdWR7QXQT9mjsI5s14DRm2U8SHoq8ie3FnpfQQuZFbsB4idCE9J/7MkAAAAASUVORK5CYII=');\n\t\tbackground-size: cover;\n\t\tposition: absolute;\n\t\tborder-radius: 3px 0px 0px 0px;\n\t}\n\t.${t}-eaglemap-toggle-display-bottomright {\n\t\tbottom: 0;\n\t\tright: 0;\n\t}\n\t.${t}-eaglemap-toggle-display-topleft {\n\t\ttop: 0;\n\t\tleft: 0;\n\t\t-webkit-transform: rotate(180deg);\n\t\ttransform: rotate(180deg);\n\t}\n\t.${t}-eaglemap-toggle-display-bottomleft {\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\t-webkit-transform: rotate(90deg);\n\t\ttransform: rotate(90deg);\n\t}\n\t.${t}-eaglemap-toggle-display-topright {\n\t\ttop: 0;\n\t\tright: 0;\n\t\t-webkit-transform: rotate(270deg);\n\t\ttransform: rotate(270deg);\n\t}\n\t.${t}-contextmenu {\n\t\tdisplay: none;\n\t\tbox-shadow: 0 1px 7px rgba(0, 0, 0, 0.4);\n\t\t-webkit-border-radius: 4px;\n\t\tborder-radius: 4px;\n\t\tpadding: 4px 0;\n\t\tbackground-color: #fff;\n\t\tcursor: default;\n\t\t-webkit-user-select: none;\n\t\t-moz-user-select: none;\n\t\tuser-select: none;\n\t}\n\t.${t}-contextmenu a.${t}-contextmenu-item {\n\t\tdisplay: block;\n\t\tcolor: #222;\n\t\tfont-size: 12px;\n\t\tline-height: 20px;\n\t\ttext-decoration: none;\n\t\tpadding: 0 12px;\n\t\tborder-top: 1px solid transparent;\n\t\tborder-bottom: 1px solid transparent;\n\t\tcursor: default;\n\t\toutline: none;\n\t}\n\t.${t}-contextmenu a.${t}-contextmenu-item-disabled {\n\t\topacity: 0.5;\n\t}\n\t.${t}-contextmenu a.${t}-contextmenu-item.over {\n\t\tbackground-color: #f4f4f4;\n\t\tborder-top: 1px solid #f0f0f0;\n\t\tborder-bottom: 1px solid #f0f0f0;\n\t}\n\t.${t}-contextmenu a.${t}-contextmenu-item-disabled.over {\n\t\tbackground-color: inherit;\n\t\tborder-top: 1px solid transparent;\n\t\tborder-bottom: 1px solid transparent;\n\t}\n\t.${t}-contextmenu-icon {\n\t\tmargin: 2px 8px 0 0;\n\t\twidth: 16px;\n\t\theight: 16px;\n\t\tfloat: left;\n\t\tborder: 0;\n\t}\n\t.${t}-contextmenu-separator {\n\t\tborder-bottom: 1px solid #ccc;\n\t\tmargin: 5px 0;\n\t}\n\t.${t}-pulse-icon {\n\t\tdisplay: inline-block;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 100%;\n\t\tposition: relative;\n\t\tbox-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.1);\n\t}\n\t.${t}-dive-icon {\n\t\tcontent: '';\n\t\tborder-radius: 100%;\n\t\theight: 200%;\n\t\twidth: 200%;\n\t\tposition: absolute;\n\t\tmargin: -50% 0 0 -50%;\n\t}\n\t@keyframes pulsate {\n\t\t0% {\n\t\t\ttransform: scale(0.1, 0.1);\n\t\t\topacity: 0;\n\t\t\t-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)';\n\t\t\tfilter: alpha(opacity=0);\n\t\t}\n\t\t50% {\n\t\t\topacity: 1;\n\t\t\t-ms-filter: none;\n\t\t\tfilter: none;\n\t\t}\n\t\t100% {\n\t\t\ttransform: scale(1.2, 1.2);\n\t\t\topacity: 0;\n\t\t\t-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)';\n\t\t\tfilter: alpha(opacity=0);\n\t\t}\n\t}\n\t`,i.appendChild(e)}(this.clsPrefix),L.Util.setOptions(this,n),L.Layer.mergeOptions({clsPrefix:this.clsPrefix,cached:!1}),L.Control.mergeOptions({clsPrefix:this.clsPrefix}),L.Control.Zoom.mergeOptions({position:(null==(o=this.options.zoomControl)?void 0:o.position)||"topleft",zoomInTitle:_[this.lang].zoomIn,zoomOutTitle:_[this.lang].zoomOut}),this.layerMap=new e.HashMap,L.Map.prototype.initialize.call(this,i,this.options),this.on("layeradd",t=>{t.layer.options.cached&&this.layerMap.set(t.layer._leaflet_id,t.layer)}),L.DomEvent.on(this._container,"click",t=>{var e;const i=this._container.querySelector(".add");i&&(i.style.display="none"),null==(e=this.contextmenu)||e.hide()},this),n.debug?(document.onselectstart=()=>n.debug.allowSelect,i.oncontextmenu=()=>n.debug.allowContextmenu,document.onkeydown=function(t){if(t&&123===t.keyCode)return n.debug.allowDevtool}):"development"!==process.env.NODE_ENV&&(document.onkeydown=function(t){if(t&&123===t.keyCode)return!1},i.oncontextmenu=()=>!1),t[s||"$m"]=this},getCursor(){return this.getContainer().style.cursor||"default"},setCursor(t="default"){const e=this.getContainer();["auto","pointer","crosshair","move","text","wait","help","grab","default"].includes(t)?e.style.cursor=`${t}`:e.style.cursor="draw"===t?"url(data:application/octet-stream;base64,AAACAAEAEBAAAAMABgBoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AACxAAAs6/oAAIKEAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQUAAAAAAAAAAAAAAAAAAAUFBQAAAAAAAAAAAAAAAAAFAwQAAAAAAAAAAAAAAAAAAAMDBAAAAAAAAAEBAQAAAAADAwQAAAAAAAABAQEAAAAAAAMDBAQAAAAAAQEBAAAAAAADAwIAAAAAAAAAAAAAAAAAAAIBAQAAAAAAAAAAAAAAAAABAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAA/v8AAP4/AAD+HwAA/g8AAP4PAAD+BwAAxwcAAMcDAADHgwAA/8EAAP/BAAD/5wAA//8AAP//AAA=), auto":`url(${t}), auto`},setBackground:function(t){const i=this.getContainer();e.Color.isColor(t)?i.style.backgroundColor=t:i.style.background=`url(${t}), no-repeat center center / cover`},flyTo(t,e=0,i={animate:!1}){t instanceof L.Marker?(t=t._latlng,L.Map.prototype.flyTo.call(this,t,e||this.getZoom(),i)):t instanceof L.Path||t instanceof L.FeatureGroup?(t=t.getBounds(),L.Map.prototype.flyToBounds.call(this,t,i)):L.Map.prototype.flyTo.call(this,t,e||this.getZoom(),i)},getLayer(t){return this._layers[t]},getLayers(){return Object.values(this._layers)},setLayerVisible(t,e){const i=this.layerMap.get(t);!i||!0!==e&&!1!==e||(e?i.addTo(this):i.remove())},openWidget(t,e={},i={},n={}){this.fire("widget-mount",{name:t,options:e,events:{onClose:()=>this.closeWidget(t),...i},config:n})},closeWidget(t){this.fire("widget-unmount",{name:t})},closeAllWidget(){this.fire("widget-destory")}}),i.StatusBar=m,i.CRS.BaiDu=an,i.WebMercatorTiledLayer=Xn,i.BlinkMarker=Wn,i.CanvasMarker=Kn,i.HeatLayer=Qn,i.WMTS=ts,i.WMS=es,i.Knob=ss,i.Draw=ds,i.ContextMenu=_s,i.KeyBoard=ys,i.EagleMap=g,i.LayerManager=As,i.ImageOverlay.Rotated=Yn,i.Text=Vn,i.VertexMarkers=f,i.Measurement=y,i.Symbol=ps,i.PolylineDecorator=us,i.RadarCircle=cn,i.Plot=qn,i.GeoJSON.VT=Ks,t.L=i})(window),t.BaiDuCRS=an,t.BlinkMarker=Wn,t.CanvasMarker=Kn,t.CircleMaterialType=ln,t.ContextMenu=_s,t.Draw=ds,t.EagleMap=g,t.KeyBoard=ys,t.Knob=ss,t.LayerManager=As,t.MeasureMent=y,t.Plot=qn,t.RadarCircle=cn,t.StatusBar=m,t.TextMarker=Vn,t.VertexMarker=f,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
1
+ (function(){ try {var elementStyle = document.createElement('style'); elementStyle.appendChild(document.createTextNode(".leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;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{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;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{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.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-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.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-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{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-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height: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{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.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);width:36px;height: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{width:44px;height: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{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;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:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.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{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.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{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.marker-icon{background-color:#fff;border:1px solid #3388ff;border-radius:50%;margin:-8px 0 0 -8px!important;width:14px!important;height:14px!important;outline:0;transition:opacity ease .3s}.marker-icon-middle{opacity:.7;margin:-6px 0 0 -6px!important;width:10px!important;height:10px!important}.leaflet-pm-draggable{cursor:move!important}.cursor-marker{cursor:crosshair;pointer-events:none;opacity:0}.cursor-marker.visible{opacity:1!important}.geoman-draw-cursor,.geoman-draw-cursor .leaflet-interactive{cursor:crosshair}.rect-style-marker,.rect-start-marker{opacity:0}.rect-style-marker.visible,.rect-start-marker.visible{opacity:1!important}.vertexmarker-disabled{opacity:.7}.pm-text-marker{width:0;height:0}.pm-textarea{box-sizing:content-box;background-color:#fff;color:#000;resize:none;border:none;outline:0;cursor:pointer;border-radius:3px;padding-left:7px;padding-bottom:0;padding-top:4px}.leaflet-pm-draggable .pm-textarea{cursor:move}.pm-textarea:focus,.pm-textarea:focus-within,.pm-textarea:focus-visible,.pm-textarea:active{border:2px solid #000;outline:0}.pm-textarea.pm-disabled{border:none;-webkit-user-select:none;user-select:none}.pm-textarea.pm-hasfocus{cursor:auto}.leaflet-pm-toolbar .leaflet-buttons-control-button{padding:5px;box-sizing:border-box;position:relative;z-index:3}.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:first-child:not(.pos-right),.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:last-child.pos-right{border-radius:0}.leaflet-pm-toolbar .button-container a.leaflet-buttons-control-button{border-radius:0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-radius:0 0 2px 2px}.leaflet-pm-toolbar .button-container:first-child a.leaflet-buttons-control-button{border-radius:2px 2px 0 0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-bottom:none}.leaflet-pm-toolbar .control-fa-icon{font-size:19px;line-height:24px}.leaflet-pm-toolbar .control-icon{width:100%;height:100%;box-sizing:border-box;background-size:contain;background-repeat:no-repeat;background-position:center center}.leaflet-pm-toolbar .leaflet-pm-icon-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Marker</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M15.5,24.8782959 C15.2909201,24.8772219 15.1744857,24.8467817 14.6590866,24.2354163 C10.2196955,19.4118054 8,15.5014392 8,12.5043177 C8,8.35979746 11.3578644,5 15.5,5 C19.6421356,5 23,8.35979746 23,12.5043177 C23,17 18.2878217,21.9268378 16.3336601,24.2440186 C15.8224622,24.8501802 15.7090799,24.8793699 15.5,24.8782959 Z M15.5,15.5326948 C17.275201,15.5326948 18.7142857,14.1180004 18.7142857,12.3728864 C18.7142857,10.6277723 17.275201,9.21307792 15.5,9.21307792 C13.724799,9.21307792 12.2857143,10.6277723 12.2857143,12.3728864 C12.2857143,14.1180004 13.724799,15.5326948 15.5,15.5326948 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Marker\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-polygon{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"polygon-a\" d=\"M19.4206892,9.16509725 C19.1523681,8.66992914 19,8.10275831 19,7.5 C19,5.56700338 20.5670034,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 L19.4206892,9.16509725 Z M20.8349073,10.5793063 L10.5793108,20.8349027 C10.6086731,20.8890888 10.6366469,20.9441372 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 C20.9441372,10.6366469 20.8890888,10.6086731 20.8349027,10.5793108 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"polygon-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23polygon-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23polygon-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23polygon-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-polyline{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"line-a\" d=\"M9.16509725,19.4206892 L18.4206892,10.1650973 C18.1523681,9.66992914 18,9.10275831 18,8.5 C18,6.56700338 19.5670034,5 21.5,5 C23.4329966,5 25,6.56700338 25,8.5 C25,10.4329966 23.4329966,12 21.5,12 C20.8972417,12 20.3300709,11.8476319 19.8349027,11.5793108 L10.5793108,20.8349027 C10.8476319,21.3300709 11,21.8972417 11,22.5 C11,24.4329966 9.43299662,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 Z M21.5,10 C22.3284271,10 23,9.32842712 23,8.5 C23,7.67157288 22.3284271,7 21.5,7 C20.6715729,7 20,7.67157288 20,8.5 C20,9.32842712 20.6715729,10 21.5,10 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"line-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23line-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23line-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23line-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-circle{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Circle</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M18.2897751,6.78602275 C18.8924131,6.29464981 19.661797,6 20.5,6 C22.4329966,6 24,7.56700338 24,9.5 C24,10.338203 23.7053502,11.1075869 23.2139772,11.7102249 C23.719599,12.8712053 24,14.1528571 24,15.5 C24,20.7467051 19.7467051,25 14.5,25 C9.25329488,25 5,20.7467051 5,15.5 C5,10.2532949 9.25329488,6 14.5,6 C15.8471429,6 17.1287947,6.28040098 18.2897751,6.78602275 Z M17.1504228,8.4817586 C16.3263581,8.17039236 15.4330777,8 14.5,8 C10.3578644,8 7,11.3578644 7,15.5 C7,19.6421356 10.3578644,23 14.5,23 C18.6421356,23 22,19.6421356 22,15.5 C22,14.5669223 21.8296076,13.6736419 21.5182414,12.8495772 C21.1960383,12.9473968 20.8541622,13 20.5,13 C18.5670034,13 17,11.4329966 17,9.5 C17,9.14583778 17.0526032,8.80396169 17.1504228,8.4817586 Z M14.5,17 C13.6715729,17 13,16.3284271 13,15.5 C13,14.6715729 13.6715729,14 14.5,14 C15.3284271,14 16,14.6715729 16,15.5 C16,16.3284271 15.3284271,17 14.5,17 Z M20.5,11 C21.3284271,11 22,10.3284271 22,9.5 C22,8.67157288 21.3284271,8 20.5,8 C19.6715729,8 19,8.67157288 19,9.5 C19,10.3284271 19.6715729,11 20.5,11 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Circle\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A <g id=\"Atoms/Color/Grey\" mask=\"url(%23mask-2)\" fill=\"%235B5B5B\">%0A <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"30\" height=\"30\"></rect>%0A </g>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-circle-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A%0A<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"%235B5B5B\" stroke-width=\"8\"%0A fill=\"none\">%0A<circle cx=\"50\" cy=\"50\" r=\"35\"/>%0A <circle cx=\"50\" cy=\"50\" r=\"3\" fill=\"%235B5B5B\"/>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rectangle{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rectangle-a\" d=\"M23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.736764 5.30385293,19.2780593 7,19.0354444 L7,10.9645556 C5.30385293,10.7219407 4,9.26323595 4,7.5 C4,5.56700338 5.56700338,4 7.5,4 C9.26323595,4 10.7219407,5.30385293 10.9645556,7 L19.0354444,7 C19.2780593,5.30385293 20.736764,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 Z M21,10.6631844 C20.272154,10.3174225 19.6825775,9.72784598 19.3368156,9 L10.6631844,9 C10.3174225,9.72784598 9.72784598,10.3174225 9,10.6631844 L9,19.3368156 C9.72784598,19.6825775 10.3174225,20.272154 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 Z M7.5,9 C8.32842712,9 9,8.32842712 9,7.5 C9,6.67157288 8.32842712,6 7.5,6 C6.67157288,6 6,6.67157288 6,7.5 C6,8.32842712 6.67157288,9 7.5,9 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"rectangle-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rectangle-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rectangle-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rectangle-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-delete{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Eraser</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M17.7874219,18.4812552 L11.6480079,13.3498184 L6.40466009,19.3816001 L10.5539156,22.9884929 L13.86934,22.9884929 L17.7874219,18.4812552 Z M16.5074252,22.9884929 L26.0000002,22.9884929 L26.0000002,24.9884929 L10.0000002,24.9884929 L9.80708313,24.9884929 L5.09254204,20.8910192 C4.25891285,20.1663564 4.17057814,18.9031112 4.89524093,18.069482 L16.0482444,5.23941916 C16.7729072,4.40578998 18.0361525,4.31745526 18.8697816,5.04211806 L24.9074583,10.2905903 C25.7410875,11.0152531 25.8294222,12.2784983 25.1047594,13.1121275 L16.5074252,22.9884929 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Eraser\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Combined-Shape\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-edit{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"edit_anchor-a\" d=\"M13.5,11 C11.5670034,11 10,9.43299662 10,7.5 C10,5.56700338 11.5670034,4 13.5,4 C15.4329966,4 17,5.56700338 17,7.5 C17,9.43299662 15.4329966,11 13.5,11 Z M13.5,9 C14.3284271,9 15,8.32842712 15,7.5 C15,6.67157288 14.3284271,6 13.5,6 C12.6715729,6 12,6.67157288 12,7.5 C12,8.32842712 12.6715729,9 13.5,9 Z M12.0002889,7.52973893 C12.0125983,8.16273672 12.4170197,8.6996643 12.9807111,8.90767966 L3,15 L3,13 L12.0002889,7.52973893 Z M14.2172722,6.18228472 L19.453125,3 L22.6589355,3 L14.989102,7.68173885 C14.9962971,7.62216459 15,7.56151472 15,7.5 C15,6.93138381 14.6836098,6.4366645 14.2172722,6.18228472 Z M23.4434042,19.2851736 L20.1282799,19.2851736 L21.8729983,23.5349525 C21.9945296,23.8295773 21.8556546,24.1599209 21.5778734,24.2849208 L20.0414675,24.9545142 C19.7550613,25.0795141 19.4338738,24.9366704 19.3123426,24.6509518 L17.6544367,20.6154541 L14.9461873,23.4010151 C14.5852811,23.7721711 14,23.4860463 14,22.9992653 L14,9.57183533 C14,9.05933561 14.6225311,8.809492 14.946156,9.17008555 L23.8340292,18.3120179 C24.1925291,18.6613615 23.9279979,19.2851736 23.4434042,19.2851736 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"edit_anchor-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23edit_anchor-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23edit_anchor-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23edit_anchor-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-drag{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"move-a\" d=\"M21,14 L21,10 L27,15 L21,20 L21,16 L16,16 L16,21 L20,21 L15,27 L10,21 L14,21 L14,16 L9,16 L9,20 L3,15 L9,10 L9,14 L14,14 L14,9 L10,9 L15,3 L20,9 L16,9 L16,14 L21,14 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"move-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23move-a\"/>%0A </mask>%0A <use fill=\"%23D8D8D8\" xlink:href=\"%23move-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23move-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-cut{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Scissors</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M12.9691574,13.4939435 L21.0317032,5.54167013 L23.4649499,5.67722957 L17.0470713,14.5106816 L27.5660336,17.1333535 L25.7891944,18.8012588 L14.5854951,17.8987506 L13.6487955,19.188007 C13.794639,19.2650958 13.9367985,19.3534417 14.0741377,19.4532245 C15.6379648,20.5894114 15.9846357,22.7782052 14.8484488,24.3420324 C13.7122619,25.9058595 11.5234681,26.2525304 9.95964096,25.1163435 C8.39581384,23.9801565 8.04914296,21.7913627 9.18532986,20.2275356 C9.74587276,19.4560145 10.5626188,18.9807475 11.4341218,18.8336407 L12.6805656,17.1180579 L12.5239724,16.3747216 L11.9506932,15.3012391 L9.89310646,14.7882251 C9.13093796,15.2357261 8.19977854,15.3966447 7.27445355,15.1659352 C5.39887519,14.698301 4.25751094,12.7987519 4.72514515,10.9231736 C5.19277935,9.04759519 7.09232846,7.90623094 8.96790682,8.37386515 C10.8434852,8.84149935 11.9848494,10.7410485 11.5172152,12.6166268 C11.4761464,12.7813449 11.4240335,12.9404001 11.3618627,13.0931999 L12.9691574,13.4939435 Z M7.75829735,13.2253438 C8.56211664,13.4257584 9.37620912,12.9366023 9.57662378,12.132783 C9.77703844,11.3289637 9.28788233,10.5148713 8.48406303,10.3144566 C7.68024373,10.1140419 6.86615126,10.603198 6.6657366,11.4070173 C6.46532194,12.2108366 6.95447805,13.0249291 7.75829735,13.2253438 Z M10.8033639,21.4031061 C10.3164266,22.0733177 10.4649998,23.0113722 11.1352115,23.4983095 C11.8054231,23.9852467 12.7434776,23.8366735 13.2304148,23.1664619 C13.7173521,22.4962502 13.5687788,21.5581957 12.8985672,21.0712585 C12.2283556,20.5843212 11.2903011,20.7328945 10.8033639,21.4031061 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Scissors\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(16.093194, 15.663351) rotate(-32.000000) translate(-16.093194, -15.663351) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-snapping{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->%0A <title>Atoms/Icons/Tools/Magnet</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M21.9994759,10.9428183 L21.9999985,16.3710417 C22,16.6872007 22,17.0058278 22,17.3269411 C22,21.5646545 18.6421356,25 14.5,25 C10.3578644,25 7,21.5646545 7,17.3269411 L7.00087508,10.9907507 L11.0022808,10.9984125 C11.0017033,11.6980114 11.001247,12.4168248 11.0008992,13.1554887 L11,17.3269411 C11,19.3756809 12.5876841,21 14.5,21 C16.4123159,21 18,19.3756809 18,17.3269411 C18,15.0702032 17.9995696,12.9619668 17.998539,10.9910032 L21.9994759,10.9428183 Z M10,7 C10.5522847,7 11,7.44771525 11,8 L11,10 L7,10 L7,8 C7,7.44771525 7.44771525,7 8,7 L10,7 Z M21,7 C21.5522847,7 22,7.44771525 22,8 L22,10 L18,10 L18,8 C18,7.44771525 18.4477153,7 19,7 L21,7 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Magnet\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(14.500000, 16.000000) rotate(45.000000) translate(-14.500000, -16.000000) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rotate{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rotate\" d=\"M21.2,5.8c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.4-0.5l-0.2-0.3l2.8-3.1L18,0.6l-4.6,0.1l0.5,4.5l0.5,4.5l3.2-3.6v0.1l0.1,0.2c0.1,0.1,0.1,0.2,0.2,0.2l0.1,0.2C18,7,18,7.1,18.1,7.2c0.3,0.7,0.6,1.4,0.7,2.1c0.2,1.4,0,2.9-0.6,4.2L18,13.9L17.9,14l-0.3,0.5l-0.1,0.2c-0.2,0.2-0.4,0.5-0.6,0.7c-0.5,0.5-1.1,1-1.7,1.3c-0.6,0.4-1.3,0.6-2.1,0.8c-0.7,0.1-1.5,0.2-2.2,0.1c-0.8-0.1-1.5-0.3-2.2-0.5c-0.7-0.3-1.3-0.7-1.9-1.2l-0.4-0.4l-0.2-0.3L6,15c-0.1-0.1-0.2-0.2-0.2-0.3l-0.3-0.4l-0.1-0.1l-0.2-0.4c0-0.1-0.1-0.1-0.1-0.2l-0.3-0.5l-0.1-0.2c-0.1-0.3-0.2-0.6-0.3-0.9c-0.2-0.8-0.3-1.6-0.3-2.4c0-0.2,0-0.3,0-0.5V8.9c0-0.2,0-0.3,0.1-0.4l0.1-0.6l0.2-0.6c0.3-0.8,0.7-1.5,1.2-2.2c0.5-0.7,1.1-1.3,1.8-1.8c0.2-0.1,0.3-0.4,0.1-0.6C7.5,2.6,7.4,2.5,7.3,2.5H7.1L7,2.6C6.1,3,5.4,3.6,4.7,4.2C4,4.9,3.5,5.7,3,6.6c-0.9,1.8-1.2,3.8-0.8,5.8c0.1,0.5,0.2,0.9,0.3,1.4l0.3,0.8C2.9,14.7,3,14.8,3,15l0.2,0.4c0,0.1,0.1,0.2,0.1,0.2l0.3,0.5c0.1,0.2,0.2,0.3,0.3,0.5l0.1,0.2c0.1,0.1,0.2,0.3,0.3,0.4L5,17.8c0.7,0.7,1.6,1.3,2.5,1.8c0.9,0.5,1.9,0.8,3,0.9c0.5,0.1,1,0.1,1.5,0.1c0.6,0,1.1,0,1.6-0.1c1-0.2,2.1-0.5,3-1l0.2-0.1c0.2-0.1,0.3-0.2,0.5-0.3l0.7-0.4c0.2-0.1,0.3-0.2,0.4-0.3l0.2-0.2c0.2-0.1,0.4-0.3,0.5-0.5l0.1-0.1c0.3-0.3,0.7-0.7,0.9-1l0.6-0.9l0.4-0.6c1-1.9,1.4-4.1,1.1-6.2C22,7.8,21.7,6.7,21.2,5.8z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 2)\">%0A <mask id=\"rotate-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rotate\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rotate\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rotate-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-text{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><defs><style>.cls-1{fill:none;stroke:%235b5b5b;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.5px;}<\\/style></defs><title>Text</title><g id=\"Ebene_2\" data-name=\"Ebene 2\"><polyline class=\"cls-1\" points=\"19.64 7.27 19.64 4 12 4 12 20 15.91 20 8.09 20 12 20 12 4 4.36 4 4.36 7.27\"/></g></svg>')}.leaflet-buttons-control-button:hover,.leaflet-buttons-control-button:focus{cursor:pointer;background-color:#f4f4f4}.active>.leaflet-buttons-control-button{box-shadow:inset 0 -1px 5px 2px #514d4d4f}.leaflet-buttons-control-text-hide{display:none}.button-container{position:relative}.button-container .leaflet-pm-actions-container{z-index:2;position:absolute;top:0;left:100%;display:none;white-space:nowrap;direction:ltr}.leaflet-right .leaflet-pm-toolbar .button-container .leaflet-pm-actions-container{right:100%;left:auto}.button-container.active .leaflet-pm-actions-container{display:block}.button-container .leaflet-pm-actions-container:not(.pos-right) a.leaflet-pm-action:last-child{border-radius:0 3px 3px 0;border-right:0}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:first-child{border-radius:3px 0 0 3px}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:last-child{border-right:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action{padding:0 10px;background-color:#666;color:#fff;display:inline-block;width:auto;border-right:1px solid #eee;-webkit-user-select:none;user-select:none;border-bottom:none;height:29px;line-height:29px;vertical-align:middle}.leaflet-pm-toolbar .button-container:first-child.pos-right.active a.leaflet-buttons-control-button{border-top-left-radius:0}.leaflet-pm-toolbar .button-container:first-child.active:not(.pos-right) a.leaflet-buttons-control-button{border-top-right-radius:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action:hover,.button-container .leaflet-pm-actions-container .leaflet-pm-action:focus{cursor:pointer;background-color:#777}.button-container .leaflet-pm-actions-container .leaflet-pm-action.active-action{background-color:#8e8e8e}.leaflet-pm-toolbar.activeChild{z-index:801}.leaflet-buttons-control-button.pm-disabled{background-color:#f4f4f4}.leaflet-buttons-control-button.pm-disabled>.control-icon{filter:opacity(.6)}.button-container .leaflet-pm-actions-container .pm-action-button-mode.control-icon{filter:brightness(0) invert(1);width:18px}body{height:100%;margin:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-family:Microsoft YaHei,Arial,sans-serif}label{font-weight:700}html{height:100%;box-sizing:border-box}#app{height:100%}*,*:before,*:after{box-sizing:inherit}a:focus,a:active{outline:none}a,a:focus,a:hover{cursor:pointer;text-decoration:none}div:focus{outline:none}.clearfix:after{visibility:hidden;display:block;font-size:0;content:\" \";clear:both;height:0}.leaflet-left .leaflet-control{margin-left:5px}.leaflet-right .leaflet-control{margin-right:5px}.leaflet-top .leaflet-control{margin-top:5px}.leaflet-bottom .leaflet-control{margin-bottom:5px}.leaflet-div-icon{border:none!important;background:transparent!important;text-align:center}.leaflet-measure-path-measurement{position:absolute;left:0;top:0;font-size:13px;font-weight:700;color:red;text-shadow:-1px 0 0 white,-1px -1px 0 white,0 -1px 0 white,1px -1px 0 white,1px 0 0 white,1px 1px 0 white,0 1px 0 white,-1px 1px 0 white;white-space:nowrap;transform-origin:0;pointer-events:none;z-index:9999}.leaflet-measure-path-measurement>div{position:relative;margin-top:-50%;left:-50%}.leaflet-control-scale-line{border:1px solid #999;border-top:none;padding:0;text-align:center;white-space:nowrap;overflow:hidden;color:#fff;height:26px;line-height:26px;text-shadow:0 0 2px #fff}.leaflet-control-container>div{display:flex;align-items:flex-end}.leaflet-text-label{position:absolute;transform:translate(calc(-50% + 4px),-6px);padding:2px 4px;white-space:nowrap;cursor:default}#text-input-icon{max-width:80px}\n.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;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{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;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{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.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-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.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-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{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-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height: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{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.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);width:36px;height: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{width:44px;height: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{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;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:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.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{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.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{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.marker-icon{background-color:#fff;border:1px solid #3388ff;border-radius:50%;margin:-8px 0 0 -8px!important;width:14px!important;height:14px!important;outline:0;transition:opacity ease .3s}.marker-icon-middle{opacity:.7;margin:-6px 0 0 -6px!important;width:10px!important;height:10px!important}.leaflet-pm-draggable{cursor:move!important}.cursor-marker{cursor:crosshair;pointer-events:none;opacity:0}.cursor-marker.visible{opacity:1!important}.geoman-draw-cursor,.geoman-draw-cursor .leaflet-interactive{cursor:crosshair}.rect-style-marker,.rect-start-marker{opacity:0}.rect-style-marker.visible,.rect-start-marker.visible{opacity:1!important}.vertexmarker-disabled{opacity:.7}.pm-text-marker{width:0;height:0}.pm-textarea{box-sizing:content-box;background-color:#fff;color:#000;resize:none;border:none;outline:0;cursor:pointer;border-radius:3px;padding-left:7px;padding-bottom:0;padding-top:4px}.leaflet-pm-draggable .pm-textarea{cursor:move}.pm-textarea:focus,.pm-textarea:focus-within,.pm-textarea:focus-visible,.pm-textarea:active{border:2px solid #000;outline:0}.pm-textarea.pm-disabled{border:none;-webkit-user-select:none;user-select:none}.pm-textarea.pm-hasfocus{cursor:auto}.leaflet-pm-toolbar .leaflet-buttons-control-button{padding:5px;box-sizing:border-box;position:relative;z-index:3}.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:first-child:not(.pos-right),.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:last-child.pos-right{border-radius:0}.leaflet-pm-toolbar .button-container a.leaflet-buttons-control-button{border-radius:0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-radius:0 0 2px 2px}.leaflet-pm-toolbar .button-container:first-child a.leaflet-buttons-control-button{border-radius:2px 2px 0 0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-bottom:none}.leaflet-pm-toolbar .control-fa-icon{font-size:19px;line-height:24px}.leaflet-pm-toolbar .control-icon{width:100%;height:100%;box-sizing:border-box;background-size:contain;background-repeat:no-repeat;background-position:center center}.leaflet-pm-toolbar .leaflet-pm-icon-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Marker</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M15.5,24.8782959 C15.2909201,24.8772219 15.1744857,24.8467817 14.6590866,24.2354163 C10.2196955,19.4118054 8,15.5014392 8,12.5043177 C8,8.35979746 11.3578644,5 15.5,5 C19.6421356,5 23,8.35979746 23,12.5043177 C23,17 18.2878217,21.9268378 16.3336601,24.2440186 C15.8224622,24.8501802 15.7090799,24.8793699 15.5,24.8782959 Z M15.5,15.5326948 C17.275201,15.5326948 18.7142857,14.1180004 18.7142857,12.3728864 C18.7142857,10.6277723 17.275201,9.21307792 15.5,9.21307792 C13.724799,9.21307792 12.2857143,10.6277723 12.2857143,12.3728864 C12.2857143,14.1180004 13.724799,15.5326948 15.5,15.5326948 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Marker\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-polygon{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"polygon-a\" d=\"M19.4206892,9.16509725 C19.1523681,8.66992914 19,8.10275831 19,7.5 C19,5.56700338 20.5670034,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 L19.4206892,9.16509725 Z M20.8349073,10.5793063 L10.5793108,20.8349027 C10.6086731,20.8890888 10.6366469,20.9441372 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 C20.9441372,10.6366469 20.8890888,10.6086731 20.8349027,10.5793108 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"polygon-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23polygon-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23polygon-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23polygon-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-polyline{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"line-a\" d=\"M9.16509725,19.4206892 L18.4206892,10.1650973 C18.1523681,9.66992914 18,9.10275831 18,8.5 C18,6.56700338 19.5670034,5 21.5,5 C23.4329966,5 25,6.56700338 25,8.5 C25,10.4329966 23.4329966,12 21.5,12 C20.8972417,12 20.3300709,11.8476319 19.8349027,11.5793108 L10.5793108,20.8349027 C10.8476319,21.3300709 11,21.8972417 11,22.5 C11,24.4329966 9.43299662,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 Z M21.5,10 C22.3284271,10 23,9.32842712 23,8.5 C23,7.67157288 22.3284271,7 21.5,7 C20.6715729,7 20,7.67157288 20,8.5 C20,9.32842712 20.6715729,10 21.5,10 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"line-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23line-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23line-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23line-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-circle{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Circle</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M18.2897751,6.78602275 C18.8924131,6.29464981 19.661797,6 20.5,6 C22.4329966,6 24,7.56700338 24,9.5 C24,10.338203 23.7053502,11.1075869 23.2139772,11.7102249 C23.719599,12.8712053 24,14.1528571 24,15.5 C24,20.7467051 19.7467051,25 14.5,25 C9.25329488,25 5,20.7467051 5,15.5 C5,10.2532949 9.25329488,6 14.5,6 C15.8471429,6 17.1287947,6.28040098 18.2897751,6.78602275 Z M17.1504228,8.4817586 C16.3263581,8.17039236 15.4330777,8 14.5,8 C10.3578644,8 7,11.3578644 7,15.5 C7,19.6421356 10.3578644,23 14.5,23 C18.6421356,23 22,19.6421356 22,15.5 C22,14.5669223 21.8296076,13.6736419 21.5182414,12.8495772 C21.1960383,12.9473968 20.8541622,13 20.5,13 C18.5670034,13 17,11.4329966 17,9.5 C17,9.14583778 17.0526032,8.80396169 17.1504228,8.4817586 Z M14.5,17 C13.6715729,17 13,16.3284271 13,15.5 C13,14.6715729 13.6715729,14 14.5,14 C15.3284271,14 16,14.6715729 16,15.5 C16,16.3284271 15.3284271,17 14.5,17 Z M20.5,11 C21.3284271,11 22,10.3284271 22,9.5 C22,8.67157288 21.3284271,8 20.5,8 C19.6715729,8 19,8.67157288 19,9.5 C19,10.3284271 19.6715729,11 20.5,11 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Circle\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A <g id=\"Atoms/Color/Grey\" mask=\"url(%23mask-2)\" fill=\"%235B5B5B\">%0A <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"30\" height=\"30\"></rect>%0A </g>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-circle-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A%0A<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"%235B5B5B\" stroke-width=\"8\"%0A fill=\"none\">%0A<circle cx=\"50\" cy=\"50\" r=\"35\"/>%0A <circle cx=\"50\" cy=\"50\" r=\"3\" fill=\"%235B5B5B\"/>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rectangle{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rectangle-a\" d=\"M23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.736764 5.30385293,19.2780593 7,19.0354444 L7,10.9645556 C5.30385293,10.7219407 4,9.26323595 4,7.5 C4,5.56700338 5.56700338,4 7.5,4 C9.26323595,4 10.7219407,5.30385293 10.9645556,7 L19.0354444,7 C19.2780593,5.30385293 20.736764,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 Z M21,10.6631844 C20.272154,10.3174225 19.6825775,9.72784598 19.3368156,9 L10.6631844,9 C10.3174225,9.72784598 9.72784598,10.3174225 9,10.6631844 L9,19.3368156 C9.72784598,19.6825775 10.3174225,20.272154 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 Z M7.5,9 C8.32842712,9 9,8.32842712 9,7.5 C9,6.67157288 8.32842712,6 7.5,6 C6.67157288,6 6,6.67157288 6,7.5 C6,8.32842712 6.67157288,9 7.5,9 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"rectangle-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rectangle-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rectangle-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rectangle-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-delete{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Eraser</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M17.7874219,18.4812552 L11.6480079,13.3498184 L6.40466009,19.3816001 L10.5539156,22.9884929 L13.86934,22.9884929 L17.7874219,18.4812552 Z M16.5074252,22.9884929 L26.0000002,22.9884929 L26.0000002,24.9884929 L10.0000002,24.9884929 L9.80708313,24.9884929 L5.09254204,20.8910192 C4.25891285,20.1663564 4.17057814,18.9031112 4.89524093,18.069482 L16.0482444,5.23941916 C16.7729072,4.40578998 18.0361525,4.31745526 18.8697816,5.04211806 L24.9074583,10.2905903 C25.7410875,11.0152531 25.8294222,12.2784983 25.1047594,13.1121275 L16.5074252,22.9884929 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Eraser\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Combined-Shape\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-edit{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"edit_anchor-a\" d=\"M13.5,11 C11.5670034,11 10,9.43299662 10,7.5 C10,5.56700338 11.5670034,4 13.5,4 C15.4329966,4 17,5.56700338 17,7.5 C17,9.43299662 15.4329966,11 13.5,11 Z M13.5,9 C14.3284271,9 15,8.32842712 15,7.5 C15,6.67157288 14.3284271,6 13.5,6 C12.6715729,6 12,6.67157288 12,7.5 C12,8.32842712 12.6715729,9 13.5,9 Z M12.0002889,7.52973893 C12.0125983,8.16273672 12.4170197,8.6996643 12.9807111,8.90767966 L3,15 L3,13 L12.0002889,7.52973893 Z M14.2172722,6.18228472 L19.453125,3 L22.6589355,3 L14.989102,7.68173885 C14.9962971,7.62216459 15,7.56151472 15,7.5 C15,6.93138381 14.6836098,6.4366645 14.2172722,6.18228472 Z M23.4434042,19.2851736 L20.1282799,19.2851736 L21.8729983,23.5349525 C21.9945296,23.8295773 21.8556546,24.1599209 21.5778734,24.2849208 L20.0414675,24.9545142 C19.7550613,25.0795141 19.4338738,24.9366704 19.3123426,24.6509518 L17.6544367,20.6154541 L14.9461873,23.4010151 C14.5852811,23.7721711 14,23.4860463 14,22.9992653 L14,9.57183533 C14,9.05933561 14.6225311,8.809492 14.946156,9.17008555 L23.8340292,18.3120179 C24.1925291,18.6613615 23.9279979,19.2851736 23.4434042,19.2851736 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"edit_anchor-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23edit_anchor-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23edit_anchor-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23edit_anchor-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-drag{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"move-a\" d=\"M21,14 L21,10 L27,15 L21,20 L21,16 L16,16 L16,21 L20,21 L15,27 L10,21 L14,21 L14,16 L9,16 L9,20 L3,15 L9,10 L9,14 L14,14 L14,9 L10,9 L15,3 L20,9 L16,9 L16,14 L21,14 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"move-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23move-a\"/>%0A </mask>%0A <use fill=\"%23D8D8D8\" xlink:href=\"%23move-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23move-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-cut{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Scissors</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M12.9691574,13.4939435 L21.0317032,5.54167013 L23.4649499,5.67722957 L17.0470713,14.5106816 L27.5660336,17.1333535 L25.7891944,18.8012588 L14.5854951,17.8987506 L13.6487955,19.188007 C13.794639,19.2650958 13.9367985,19.3534417 14.0741377,19.4532245 C15.6379648,20.5894114 15.9846357,22.7782052 14.8484488,24.3420324 C13.7122619,25.9058595 11.5234681,26.2525304 9.95964096,25.1163435 C8.39581384,23.9801565 8.04914296,21.7913627 9.18532986,20.2275356 C9.74587276,19.4560145 10.5626188,18.9807475 11.4341218,18.8336407 L12.6805656,17.1180579 L12.5239724,16.3747216 L11.9506932,15.3012391 L9.89310646,14.7882251 C9.13093796,15.2357261 8.19977854,15.3966447 7.27445355,15.1659352 C5.39887519,14.698301 4.25751094,12.7987519 4.72514515,10.9231736 C5.19277935,9.04759519 7.09232846,7.90623094 8.96790682,8.37386515 C10.8434852,8.84149935 11.9848494,10.7410485 11.5172152,12.6166268 C11.4761464,12.7813449 11.4240335,12.9404001 11.3618627,13.0931999 L12.9691574,13.4939435 Z M7.75829735,13.2253438 C8.56211664,13.4257584 9.37620912,12.9366023 9.57662378,12.132783 C9.77703844,11.3289637 9.28788233,10.5148713 8.48406303,10.3144566 C7.68024373,10.1140419 6.86615126,10.603198 6.6657366,11.4070173 C6.46532194,12.2108366 6.95447805,13.0249291 7.75829735,13.2253438 Z M10.8033639,21.4031061 C10.3164266,22.0733177 10.4649998,23.0113722 11.1352115,23.4983095 C11.8054231,23.9852467 12.7434776,23.8366735 13.2304148,23.1664619 C13.7173521,22.4962502 13.5687788,21.5581957 12.8985672,21.0712585 C12.2283556,20.5843212 11.2903011,20.7328945 10.8033639,21.4031061 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Scissors\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(16.093194, 15.663351) rotate(-32.000000) translate(-16.093194, -15.663351) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-snapping{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->%0A <title>Atoms/Icons/Tools/Magnet</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M21.9994759,10.9428183 L21.9999985,16.3710417 C22,16.6872007 22,17.0058278 22,17.3269411 C22,21.5646545 18.6421356,25 14.5,25 C10.3578644,25 7,21.5646545 7,17.3269411 L7.00087508,10.9907507 L11.0022808,10.9984125 C11.0017033,11.6980114 11.001247,12.4168248 11.0008992,13.1554887 L11,17.3269411 C11,19.3756809 12.5876841,21 14.5,21 C16.4123159,21 18,19.3756809 18,17.3269411 C18,15.0702032 17.9995696,12.9619668 17.998539,10.9910032 L21.9994759,10.9428183 Z M10,7 C10.5522847,7 11,7.44771525 11,8 L11,10 L7,10 L7,8 C7,7.44771525 7.44771525,7 8,7 L10,7 Z M21,7 C21.5522847,7 22,7.44771525 22,8 L22,10 L18,10 L18,8 C18,7.44771525 18.4477153,7 19,7 L21,7 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Magnet\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(14.500000, 16.000000) rotate(45.000000) translate(-14.500000, -16.000000) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rotate{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rotate\" d=\"M21.2,5.8c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.4-0.5l-0.2-0.3l2.8-3.1L18,0.6l-4.6,0.1l0.5,4.5l0.5,4.5l3.2-3.6v0.1l0.1,0.2c0.1,0.1,0.1,0.2,0.2,0.2l0.1,0.2C18,7,18,7.1,18.1,7.2c0.3,0.7,0.6,1.4,0.7,2.1c0.2,1.4,0,2.9-0.6,4.2L18,13.9L17.9,14l-0.3,0.5l-0.1,0.2c-0.2,0.2-0.4,0.5-0.6,0.7c-0.5,0.5-1.1,1-1.7,1.3c-0.6,0.4-1.3,0.6-2.1,0.8c-0.7,0.1-1.5,0.2-2.2,0.1c-0.8-0.1-1.5-0.3-2.2-0.5c-0.7-0.3-1.3-0.7-1.9-1.2l-0.4-0.4l-0.2-0.3L6,15c-0.1-0.1-0.2-0.2-0.2-0.3l-0.3-0.4l-0.1-0.1l-0.2-0.4c0-0.1-0.1-0.1-0.1-0.2l-0.3-0.5l-0.1-0.2c-0.1-0.3-0.2-0.6-0.3-0.9c-0.2-0.8-0.3-1.6-0.3-2.4c0-0.2,0-0.3,0-0.5V8.9c0-0.2,0-0.3,0.1-0.4l0.1-0.6l0.2-0.6c0.3-0.8,0.7-1.5,1.2-2.2c0.5-0.7,1.1-1.3,1.8-1.8c0.2-0.1,0.3-0.4,0.1-0.6C7.5,2.6,7.4,2.5,7.3,2.5H7.1L7,2.6C6.1,3,5.4,3.6,4.7,4.2C4,4.9,3.5,5.7,3,6.6c-0.9,1.8-1.2,3.8-0.8,5.8c0.1,0.5,0.2,0.9,0.3,1.4l0.3,0.8C2.9,14.7,3,14.8,3,15l0.2,0.4c0,0.1,0.1,0.2,0.1,0.2l0.3,0.5c0.1,0.2,0.2,0.3,0.3,0.5l0.1,0.2c0.1,0.1,0.2,0.3,0.3,0.4L5,17.8c0.7,0.7,1.6,1.3,2.5,1.8c0.9,0.5,1.9,0.8,3,0.9c0.5,0.1,1,0.1,1.5,0.1c0.6,0,1.1,0,1.6-0.1c1-0.2,2.1-0.5,3-1l0.2-0.1c0.2-0.1,0.3-0.2,0.5-0.3l0.7-0.4c0.2-0.1,0.3-0.2,0.4-0.3l0.2-0.2c0.2-0.1,0.4-0.3,0.5-0.5l0.1-0.1c0.3-0.3,0.7-0.7,0.9-1l0.6-0.9l0.4-0.6c1-1.9,1.4-4.1,1.1-6.2C22,7.8,21.7,6.7,21.2,5.8z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 2)\">%0A <mask id=\"rotate-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rotate\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rotate\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rotate-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-text{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><defs><style>.cls-1{fill:none;stroke:%235b5b5b;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.5px;}<\\/style></defs><title>Text</title><g id=\"Ebene_2\" data-name=\"Ebene 2\"><polyline class=\"cls-1\" points=\"19.64 7.27 19.64 4 12 4 12 20 15.91 20 8.09 20 12 20 12 4 4.36 4 4.36 7.27\"/></g></svg>')}.leaflet-buttons-control-button:hover,.leaflet-buttons-control-button:focus{cursor:pointer;background-color:#f4f4f4}.active>.leaflet-buttons-control-button{box-shadow:inset 0 -1px 5px 2px #514d4d4f}.leaflet-buttons-control-text-hide{display:none}.button-container{position:relative}.button-container .leaflet-pm-actions-container{z-index:2;position:absolute;top:0;left:100%;display:none;white-space:nowrap;direction:ltr}.leaflet-right .leaflet-pm-toolbar .button-container .leaflet-pm-actions-container{right:100%;left:auto}.button-container.active .leaflet-pm-actions-container{display:block}.button-container .leaflet-pm-actions-container:not(.pos-right) a.leaflet-pm-action:last-child{border-radius:0 3px 3px 0;border-right:0}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:first-child{border-radius:3px 0 0 3px}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:last-child{border-right:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action{padding:0 10px;background-color:#666;color:#fff;display:inline-block;width:auto;border-right:1px solid #eee;-webkit-user-select:none;user-select:none;border-bottom:none;height:29px;line-height:29px;vertical-align:middle}.leaflet-pm-toolbar .button-container:first-child.pos-right.active a.leaflet-buttons-control-button{border-top-left-radius:0}.leaflet-pm-toolbar .button-container:first-child.active:not(.pos-right) a.leaflet-buttons-control-button{border-top-right-radius:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action:hover,.button-container .leaflet-pm-actions-container .leaflet-pm-action:focus{cursor:pointer;background-color:#777}.button-container .leaflet-pm-actions-container .leaflet-pm-action.active-action{background-color:#8e8e8e}.leaflet-pm-toolbar.activeChild{z-index:801}.leaflet-buttons-control-button.pm-disabled{background-color:#f4f4f4}.leaflet-buttons-control-button.pm-disabled>.control-icon{filter:opacity(.6)}.button-container .leaflet-pm-actions-container .pm-action-button-mode.control-icon{filter:brightness(0) invert(1);width:18px}body{height:100%;margin:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-family:Microsoft YaHei,Arial,sans-serif}label{font-weight:700}html{height:100%;box-sizing:border-box}#app{height:100%}*,*:before,*:after{box-sizing:inherit}a:focus,a:active{outline:none}a,a:focus,a:hover{cursor:pointer;text-decoration:none}div:focus{outline:none}.clearfix:after{visibility:hidden;display:block;font-size:0;content:\" \";clear:both;height:0}.leaflet-left .leaflet-control{margin-left:5px}.leaflet-right .leaflet-control{margin-right:5px}.leaflet-top .leaflet-control{margin-top:5px}.leaflet-bottom .leaflet-control{margin-bottom:5px}.leaflet-div-icon{border:none!important;background:transparent!important;text-align:center}.leaflet-measure-path-measurement{position:absolute;left:0;top:0;font-size:13px;font-weight:700;color:red;text-shadow:-1px 0 0 white,-1px -1px 0 white,0 -1px 0 white,1px -1px 0 white,1px 0 0 white,1px 1px 0 white,0 1px 0 white,-1px 1px 0 white;white-space:nowrap;transform-origin:0;pointer-events:none;z-index:9999}.leaflet-measure-path-measurement>div{position:relative;margin-top:-50%;left:-50%}.leaflet-control-scale-line{border:1px solid #999;border-top:none;padding:0;text-align:center;white-space:nowrap;overflow:hidden;color:#fff;height:26px;line-height:26px;text-shadow:0 0 2px #fff}.leaflet-control-container>div{display:flex;align-items:flex-end}.leaflet-text-label{position:absolute;transform:translate(calc(-50% + 4px),-6px);padding:2px 4px;white-space:nowrap;cursor:default}#text-input-icon{max-width:80px}")); document.head.appendChild(elementStyle);} catch(e) {console.error('vite-plugin-css-injected-by-js', e);} })();!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("gis-common")):"function"==typeof define&&define.amd?define(["exports","gis-common"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["gis-leaflet-helper"]={},t.Gis)}(this,function(t,e){"use strict";var i=Object.defineProperty,n=(t,e,n)=>((t,e,n)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function a(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var i=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,n.get?n:{enumerable:!0,get:function(){return t[e]}})}),i}var r,h={exports:{}};function l(){return r||(r=1,function(t){var e="1.9.4";function i(t){var e,i,n,s;for(i=1,n=arguments.length;i<n;i++)for(e in s=arguments[i])t[e]=s[e];return t}var n=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function s(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var o=0;function a(t){return"_leaflet_id"in t||(t._leaflet_id=++o),t._leaflet_id}function r(t,e,i){var n,s,o,a;return a=function(){n=!1,s&&(o.apply(i,s),s=!1)},o=function(){n?s=arguments:(t.apply(i,arguments),setTimeout(a,e),n=!0)},o}function h(t,e,i){var n=e[1],s=e[0],o=n-s;return t===n&&i?t:((t-s)%o+o)%o+s}function l(){return!1}function c(t,e){if(!1===e)return t;var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function p(t){return u(t).split(/\s+/)}function d(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?n(t.options):{}),e)t.options[i]=e[i];return t.options}function _(t,e,i){var n=[];for(var s in t)n.push(encodeURIComponent(i?s.toUpperCase():s)+"="+encodeURIComponent(t[s]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var m=/\{ *([\w_ -]+) *\}/g;function g(t,e){return t.replace(m,function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})}var f=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var A="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function v(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var M=0;function x(t){var e=+new Date,i=Math.max(0,16-(e-M));return M=e+i,window.setTimeout(t,i)}var b=window.requestAnimationFrame||v("RequestAnimationFrame")||x,w=window.cancelAnimationFrame||v("CancelAnimationFrame")||v("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function P(t,e,i){if(!i||b!==x)return b.call(window,s(t,e));t.call(e)}function k(t){t&&w.call(window,t)}var E={__proto__:null,extend:i,create:n,bind:s,get lastId(){return o},stamp:a,throttle:r,wrapNum:h,falseFn:l,formatNum:c,trim:u,splitWords:p,setOptions:d,getParamString:_,template:g,isArray:f,indexOf:y,emptyImageUrl:A,requestFn:b,cancelFn:w,requestAnimFrame:P,cancelAnimFrame:k};function C(){}function S(t){if("undefined"!=typeof L&&L&&L.Mixin){t=f(t)?t:[t];for(var e=0;e<t.length;e++)t[e],L.Mixin.Events}}C.extend=function(t){var e=function(){d(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},s=e.__super__=this.prototype,o=n(s);for(var a in o.constructor=e,e.prototype=o,this)Object.prototype.hasOwnProperty.call(this,a)&&"prototype"!==a&&"__super__"!==a&&(e[a]=this[a]);return t.statics&&i(e,t.statics),t.includes&&(S(t.includes),i.apply(null,[o].concat(t.includes))),i(o,t),delete o.statics,delete o.includes,o.options&&(o.options=s.options?n(s.options):{},i(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},e},C.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},C.mergeOptions=function(t){return i(this.prototype.options,t),this},C.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 n in t)this._on(n,t[n],e);else for(var s=0,o=(t=p(t)).length;s<o;s++)this._on(t[s],e,i);return this},off:function(t,e,i){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=p(t);for(var s=1===arguments.length,o=0,a=t.length;o<a;o++)s?this._off(t[o]):this._off(t[o],e,i)}else delete this._events;return this},_on:function(t,e,i,n){if("function"==typeof e&&!1===this._listens(t,e,i)){i===this&&(i=void 0);var s={fn:e,ctx:i};n&&(s.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(s)}},_off:function(t,e,i){var n,s,o;if(this._events&&(n=this._events[t]))if(1!==arguments.length){if("function"==typeof e){var a=this._listens(t,e,i);if(!1!==a){var r=n[a];this._firingCount&&(r.fn=l,this._events[t]=n=n.slice()),n.splice(a,1)}}}else{if(this._firingCount)for(s=0,o=n.length;s<o;s++)n[s].fn=l;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var s=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var a=0,r=o.length;a<r;a++){var h=o[a],l=h.fn;h.once&&this.off(t,l,h.ctx),l.call(h.ctx||this,s)}this._firingCount--}}return n&&this._propagateEvent(s),this},listens:function(t,e,i,n){var s=e;"function"!=typeof e&&(n=!!e,s=void 0,i=void 0);var o=this._events&&this._events[t];if(o&&o.length&&!1!==this._listens(t,s,i))return!0;if(n)for(var a in this._eventParents)if(this._eventParents[a].listens(t,e,i,n))return!0;return!1},_listens:function(t,e,i){if(!this._events)return!1;var n=this._events[t]||[];if(!e)return!!n.length;i===this&&(i=void 0);for(var s=0,o=n.length;s<o;s++)if(n[s].fn===e&&n[s].ctx===i)return s;return!1},once:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e,!0);else for(var s=0,o=(t=p(t)).length;s<o;s++)this._on(t[s],e,i,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[a(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[a(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 O=C.extend(T);function B(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var D=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function I(t,e,i){return t instanceof B?t:f(t)?new B(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new B(t.x,t.y):new B(t,e,i)}function R(t,e){if(t)for(var i=e?[t,e]:t,n=0,s=i.length;n<s;n++)this.extend(i[n])}function z(t,e){return!t||t instanceof R?t:new R(t,e)}function G(t,e){if(t)for(var i=e?[t,e]:t,n=0,s=i.length;n<s;n++)this.extend(i[n])}function N(t,e){return t instanceof G?t:new G(t,e)}function j(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 j?t:f(t)&&"object"!=typeof t[0]?3===t.length?new j(t[0],t[1],t[2]):2===t.length?new j(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new j(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new j(t,e,i)}B.prototype={clone:function(){return new B(this.x,this.y)},add:function(t){return this.clone()._add(I(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(I(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 B(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new B(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=D(this.x),this.y=D(this.y),this},distanceTo:function(t){var e=(t=I(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=I(t)).x===this.x&&t.y===this.y},contains:function(t){return t=I(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)+")"}},R.prototype={extend:function(t){var e,i;if(!t)return this;if(t instanceof B||"number"==typeof t[0]||"x"in t)e=i=I(t);else if(e=(t=z(t)).min,i=t.max,!e||!i)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)):(this.min=e.clone(),this.max=i.clone()),this},getCenter:function(t){return I((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return I(this.min.x,this.max.y)},getTopRight:function(){return I(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 B?I(t):z(t))instanceof R?(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,n=t.min,s=t.max,o=s.x>=e.x&&n.x<=i.x,a=s.y>=e.y&&n.y<=i.y;return o&&a},overlaps:function(t){t=z(t);var e=this.min,i=this.max,n=t.min,s=t.max,o=s.x>e.x&&n.x<i.x,a=s.y>e.y&&n.y<i.y;return o&&a},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,i=this.max,n=Math.abs(e.x-i.x)*t,s=Math.abs(e.y-i.y)*t;return z(I(e.x-n,e.y-s),I(i.x+n,i.y+s))},equals:function(t){return!!t&&(t=z(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},G.prototype={extend:function(t){var e,i,n=this._southWest,s=this._northEast;if(t instanceof j)e=t,i=t;else{if(!(t instanceof G))return t?this.extend(F(t)||N(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||s?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),s.lat=Math.max(i.lat,s.lat),s.lng=Math.max(i.lng,s.lng)):(this._southWest=new j(e.lat,e.lng),this._northEast=new j(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new G(new j(e.lat-n,e.lng-s),new j(i.lat+n,i.lng+s))},getCenter:function(){return new j((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 j(this.getNorth(),this.getWest())},getSouthEast:function(){return new j(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 j||"lat"in t?F(t):N(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof G?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=N(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),o=s.lat>=e.lat&&n.lat<=i.lat,a=s.lng>=e.lng&&n.lng<=i.lng;return o&&a},overlaps:function(t){t=N(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),o=s.lat>e.lat&&n.lat<i.lat,a=s.lng>e.lng&&n.lng<i.lng;return o&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=N(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},j.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 N([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new j(this.lat,this.lng,this.alt)}};var U,Z={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t);return new R(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?h(t.lng,this.wrapLng,!0):t.lng;return new j(this.wrapLat?h(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,s=e.lng-i.lng;if(0===n&&0===s)return t;var o=t.getSouthWest(),a=t.getNorthEast();return new G(new j(o.lat-n,o.lng-s),new j(a.lat-n,a.lng-s))}},H=i({},Z,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,s=e.lat*i,o=Math.sin((e.lat-t.lat)*i/2),a=Math.sin((e.lng-t.lng)*i/2),r=o*o+Math.cos(n)*Math.cos(s)*a*a,h=2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r));return this.R*h}}),q=6378137,V={R:q,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=Math.sin(n*e);return new B(this.R*t.lng*e,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var e=180/Math.PI;return new j((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(U=q*Math.PI,new R([-U,-U],[U,U]))};function W(t,e,i,n){if(f(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=n}function K(t,e,i,n){return new W(t,e,i,n)}W.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new B((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var X,Y=i({},H,{code:"EPSG:3857",projection:V,transformation:(X=.5/(Math.PI*V.R),K(X,.5,-X,.5))}),$=i({},Y,{code:"EPSG:900913"});function J(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Q(t,e){var i,n,s,o,a,r,h="";for(i=0,s=t.length;i<s;i++){for(n=0,o=(a=t[i]).length;n<o;n++)h+=(n?"L":"M")+(r=a[n]).x+" "+r.y;h+=e?Nt.svg?"z":"x":""}return h||"M0 0"}var tt,et=document.documentElement.style,it="ActiveXObject"in window,nt=it&&!document.addEventListener,st="msLaunchUri"in navigator&&!("documentMode"in document),ot=Gt("webkit"),at=Gt("android"),rt=Gt("android 2")||Gt("android 3"),ht=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),lt=at&&Gt("Google")&&ht<537&&!("AudioNode"in window),ct=!!window.opera,ut=!st&&Gt("chrome"),pt=Gt("gecko")&&!ot&&!ct&&!it,dt=!ut&&Gt("safari"),_t=Gt("phantom"),mt="OTransition"in et,gt=0===navigator.platform.indexOf("Win"),ft=it&&"transition"in et,yt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,At="MozPerspective"in et,vt=!window.L_DISABLE_3D&&(ft||yt||At)&&!mt&&!_t,Mt="undefined"!=typeof orientation||Gt("mobile"),Lt=Mt&&ot,xt=Mt&&yt,bt=!window.PointerEvent&&window.MSPointerEvent,wt=!(!window.PointerEvent&&!bt),Pt="ontouchstart"in window||!!window.TouchEvent,kt=!window.L_NO_TOUCH&&(Pt||wt),Et=Mt&&ct,Ct=Mt&&pt,St=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Tt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",l,e),window.removeEventListener("testPassiveEventSupport",l,e)}catch(i){}return t}(),Ot=!!document.createElement("canvas").getContext,Bt=!(!document.createElementNS||!J("svg").createSVGRect),Dt=!!Bt&&((tt=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(tt.firstChild&&tt.firstChild.namespaceURI)),It=!Bt&&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}}(),Rt=0===navigator.platform.indexOf("Mac"),zt=0===navigator.platform.indexOf("Linux");function Gt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Nt={ie:it,ielt9:nt,edge:st,webkit:ot,android:at,android23:rt,androidStock:lt,opera:ct,chrome:ut,gecko:pt,safari:dt,phantom:_t,opera12:mt,win:gt,ie3d:ft,webkit3d:yt,gecko3d:At,any3d:vt,mobile:Mt,mobileWebkit:Lt,mobileWebkit3d:xt,msPointer:bt,pointer:wt,touch:kt,touchNative:Pt,mobileOpera:Et,mobileGecko:Ct,retina:St,passiveEvents:Tt,canvas:Ot,svg:Bt,vml:It,inlineSvg:Dt,mac:Rt,linux:zt},jt=Nt.msPointer?"MSPointerDown":"pointerdown",Ft=Nt.msPointer?"MSPointerMove":"pointermove",Ut=Nt.msPointer?"MSPointerUp":"pointerup",Zt=Nt.msPointer?"MSPointerCancel":"pointercancel",Ht={touchstart:jt,touchmove:Ft,touchend:Ut,touchcancel:Zt},qt={touchstart:ee,touchmove:te,touchend:te,touchcancel:te},Vt={},Wt=!1;function Kt(t,e,i){return"touchstart"===e&&Qt(),qt[e]?(i=qt[e].bind(this,i),t.addEventListener(Ht[e],i,!1),i):l}function Xt(t,e,i){Ht[e]&&t.removeEventListener(Ht[e],i,!1)}function Yt(t){Vt[t.pointerId]=t}function $t(t){Vt[t.pointerId]&&(Vt[t.pointerId]=t)}function Jt(t){delete Vt[t.pointerId]}function Qt(){Wt||(document.addEventListener(jt,Yt,!0),document.addEventListener(Ft,$t,!0),document.addEventListener(Ut,Jt,!0),document.addEventListener(Zt,Jt,!0),Wt=!0)}function te(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Vt)e.touches.push(Vt[i]);e.changedTouches=[e],t(e)}}function ee(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Ye(e),te(t,e)}function ie(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var ne=200;function se(t,e){t.addEventListener("dblclick",e);var i,n=0;function s(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var s=Je(t);if(!s.some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})||s.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})){var o=Date.now();o-n<=ne?2===++i&&e(ie(t)):i=1,n=o}}}else i=t.detail}return t.addEventListener("click",s),{dblclick:e,simDblclick:s}}function oe(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var ae,re,he,le,ce,ue=Ee(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),pe=Ee(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===pe||"OTransition"===pe?pe+"End":"transitionend";function _e(t){return"string"==typeof t?document.getElementById(t):t}function me(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function ge(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function fe(t){var e=t.parentNode;e&&e.removeChild(t)}function ye(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Ae(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ve(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Me(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=we(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function Le(t,e){if(void 0!==t.classList)for(var i=p(e),n=0,s=i.length;n<s;n++)t.classList.add(i[n]);else if(!Me(t,e)){var o=we(t);be(t,(o?o+" ":"")+e)}}function xe(t,e){void 0!==t.classList?t.classList.remove(e):be(t,u((" "+we(t)+" ").replace(" "+e+" "," ")))}function be(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function we(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function Pe(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&ke(t,e)}function ke(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(s){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}function Ee(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function Ce(t,e,i){var n=e||new B(0,0);t.style[ue]=(Nt.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function Se(t,e){t._leaflet_pos=e,Nt.any3d?Ce(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Te(t){return t._leaflet_pos||new B(0,0)}if("onselectstart"in document)ae=function(){je(window,"selectstart",Ye)},re=function(){Ue(window,"selectstart",Ye)};else{var Oe=Ee(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ae=function(){if(Oe){var t=document.documentElement.style;he=t[Oe],t[Oe]="none"}},re=function(){Oe&&(document.documentElement.style[Oe]=he,he=void 0)}}function Be(){je(window,"dragstart",Ye)}function De(){Ue(window,"dragstart",Ye)}function Ie(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Re(),le=t,ce=t.style.outlineStyle,t.style.outlineStyle="none",je(window,"keydown",Re))}function Re(){le&&(le.style.outlineStyle=ce,le=void 0,ce=void 0,Ue(window,"keydown",Re))}function ze(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ge(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ne={__proto__:null,TRANSFORM:ue,TRANSITION:pe,TRANSITION_END:de,get:_e,getStyle:me,create:ge,remove:fe,empty:ye,toFront:Ae,toBack:ve,hasClass:Me,addClass:Le,removeClass:xe,setClass:be,getClass:we,setOpacity:Pe,testProp:Ee,setTransform:Ce,setPosition:Se,getPosition:Te,get disableTextSelection(){return ae},get enableTextSelection(){return re},disableImageDrag:Be,enableImageDrag:De,preventOutline:Ie,restoreOutline:Re,getSizedParentNode:ze,getScale:Ge};function je(t,e,i,n){if(e&&"object"==typeof e)for(var s in e)qe(t,s,e[s],i);else for(var o=0,a=(e=p(e)).length;o<a;o++)qe(t,e[o],i,n);return this}var Fe="_leaflet_events";function Ue(t,e,i,n){if(1===arguments.length)Ze(t),delete t[Fe];else if(e&&"object"==typeof e)for(var s in e)Ve(t,s,e[s],i);else if(e=p(e),2===arguments.length)Ze(t,function(t){return-1!==y(e,t)});else for(var o=0,a=e.length;o<a;o++)Ve(t,e[o],i,n);return this}function Ze(t,e){for(var i in t[Fe]){var n=i.split(/\d/)[0];e&&!e(n)||Ve(t,n,null,null,i)}}var He={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function qe(t,e,i,n){var s=e+a(i)+(n?"_"+a(n):"");if(t[Fe]&&t[Fe][s])return this;var o=function(e){return i.call(n||t,e||window.event)},r=o;!Nt.touchNative&&Nt.pointer&&0===e.indexOf("touch")?o=Kt(t,e,o):Nt.touch&&"dblclick"===e?o=se(t,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(He[e]||e,o,!!Nt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(o=function(e){e=e||window.event,ii(t,e)&&r(e)},t.addEventListener(He[e],o,!1)):t.addEventListener(e,r,!1):t.attachEvent("on"+e,o),t[Fe]=t[Fe]||{},t[Fe][s]=o}function Ve(t,e,i,n,s){s=s||e+a(i)+(n?"_"+a(n):"");var o=t[Fe]&&t[Fe][s];if(!o)return this;!Nt.touchNative&&Nt.pointer&&0===e.indexOf("touch")?Xt(t,e,o):Nt.touch&&"dblclick"===e?oe(t,o):"removeEventListener"in t?t.removeEventListener(He[e]||e,o,!1):t.detachEvent("on"+e,o),t[Fe][s]=null}function We(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ke(t){return qe(t,"wheel",We),this}function Xe(t){return je(t,"mousedown touchstart dblclick contextmenu",We),t._leaflet_disable_click=!0,this}function Ye(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function $e(t){return Ye(t),We(t),this}function Je(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function Qe(t,e){if(!e)return new B(t.clientX,t.clientY);var i=Ge(e),n=i.boundingClientRect;return new B((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var ti=Nt.linux&&Nt.chrome?window.devicePixelRatio:Nt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function ei(t){return Nt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/ti:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function ii(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t}var ni={__proto__:null,on:je,off:Ue,stopPropagation:We,disableScrollPropagation:Ke,disableClickPropagation:Xe,preventDefault:Ye,stop:$e,getPropagationPath:Je,getMousePosition:Qe,getWheelDelta:ei,isExternalTarget:ii,addListener:je,removeListener:Ue},si=O.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=Te(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=P(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),Se(this._el,i),this.fire("step")},_complete:function(){k(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),oi=O.extend({options:{crs:Y,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=s(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=pe&&Nt.any3d&&!Nt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),je(this._proxy,de,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(F(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e,n.pan&&n.pan.noMoveStart),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(Nt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Nt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),o=(t instanceof B?t:this.latLngToContainerPoint(t)).subtract(s).multiplyBy(1-1/n),a=this.containerPointToLatLng(s.add(o));return this.setView(a,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():N(t);var i=I(e.paddingTopLeft||e.padding||[0,0]),n=I(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));if((s="number"==typeof e.maxZoom?Math.min(e.maxZoom,s):s)===1/0)return{center:t.getCenter(),zoom:s};var o=n.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),s),r=this.project(t.getNorthEast(),s);return{center:this.unproject(a.add(r).divideBy(2).add(o),s),zoom:s}},fitBounds:function(t,e){if(!(t=N(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=I(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 si,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){Le(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||!Nt.any3d)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),s=this.project(t),o=this.getSize(),a=this._zoom;t=F(t),e=void 0===e?a:e;var r=Math.max(o.x,o.y),h=r*this.getZoomScale(a,e),l=s.distanceTo(n)||1,c=1.42,u=c*c;function p(t){var e=(h*h-r*r+(t?-1:1)*u*u*l*l)/(2*(t?h:r)*u*l),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 _(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return d(t)/_(t)}var g=p(0);function f(t){return r*(_(g)/_(g+c*t))}function y(t){return r*(_(g)*m(g+c*t)-d(g))/u}function A(t){return 1-Math.pow(1-t,1.5)}var v=Date.now(),M=(p(1)-g)/c,L=i.duration?1e3*i.duration:1e3*M*.8;function x(){var i=(Date.now()-v)/L,o=A(i)*M;i<=1?(this._flyToFrame=P(x,this),this._move(this.unproject(n.add(s.subtract(n).multiplyBy(y(o)/l)),a),this.getScaleZoom(r/f(o),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),x.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=N(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,N(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=I((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=I(e.paddingBottomRight||e.padding||[0,0]),s=this.project(this.getCenter()),o=this.project(t),a=this.getPixelBounds(),r=z([a.min.add(i),a.max.subtract(n)]),h=r.getSize();if(!r.contains(o)){this._enforcingBounds=!0;var l=o.subtract(r.getCenter()),c=r.extend(o).getSize().subtract(h);s.x+=l.x<0?-c.x:c.x,s.y+=l.y<0?-c.y:c.y,this.panTo(this.unproject(s),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 n=this.getSize(),o=e.divideBy(2).round(),a=n.divideBy(2).round(),r=o.subtract(a);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):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=s(this._handleGeolocationResponse,this),n=s(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,n,t):navigator.geolocation.getCurrentPosition(e,n,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new j(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var s=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(s,n.maxZoom):s)}var o={latlng:e,bounds:i,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(o[a]=t.coords[a]);this.fire("locationfound",o)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),fe(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)fe(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=ge("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new G(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=N(t),i=I(i||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),r=t.getSouthEast(),h=this.getSize().subtract(i),l=z(this.project(r,n),this.project(a,n)).getSize(),c=Nt.any3d?this.options.zoomSnap:1,u=h.x/l.x,p=h.y/l.y,d=e?Math.max(u,p):Math.min(u,p);return n=this.getScaleZoom(d,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(s,Math.min(o,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new B(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 R(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},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(I(t),e)},layerPointToLatLng:function(t){var e=I(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(N(t))},distance:function(t,e){return this.options.crs.distance(F(t),F(e))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(I(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=_e(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");je(e,"scroll",this._onScroll,this),this._containerId=a(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Nt.any3d,Le(t,"leaflet-container"+(Nt.touch?" leaflet-touch":"")+(Nt.retina?" leaflet-retina":"")+(Nt.ielt9?" leaflet-oldie":"")+(Nt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=me(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Se(this._mapPane,new B(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Le(t.markerPane,"leaflet-zoom-hide"),Le(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){Se(this._mapPane,new B(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var s=this._zoom!==e;this._moveStart(s,i)._move(t,e)._moveEnd(s),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,i,n){void 0===e&&(e=this._zoom);var s=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((s||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return k(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Se(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[a(this._container)]=this;var e=t?Ue:je;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),Nt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){k(this._resizeRequest),this._resizeRequest=P(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,n=[],s="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,r=!1;o;){if((i=this._targets[a(o)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(s&&!ii(o,t))break;if(n.push(i),s)break}if(o===this._container)break;o=o.parentNode}return n.length||r||s||!this.listens(e,!0)||(n=[this]),n},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var i=t.type;"mousedown"===i&&Ie(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var s=i({},t);s.type="preclick",this._fireDOMEvent(s,s.type,n)}var o=this._findEventTargets(t,e);if(n){for(var a=[],r=0;r<n.length;r++)n[r].listens(e,!0)&&a.push(n[r]);o=a.concat(o)}if(o.length){"contextmenu"===e&&Ye(t);var h=o[0],l={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var c=h.getLatLng&&(!h._radius||h._radius<=10);l.containerPoint=c?this.latLngToContainerPoint(h.getLatLng()):this.mouseEventToContainerPoint(t),l.layerPoint=this.containerPointToLayerPoint(l.containerPoint),l.latlng=c?h.getLatLng():this.layerPointToLatLng(l.layerPoint)}for(r=0;r<o.length;r++)if(o[r].fire(e,l,!0),l.originalEvent._stopped||!1===o[r].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Te(this._mapPane)||new B(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 n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return z([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),o=new R(n.subtract(s),n.add(s)),a=this._getBoundsOffset(o,i,e);return Math.abs(a.x)<=1&&Math.abs(a.y)<=1?t:this.unproject(n.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new R(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=z(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),s=n.min.subtract(t.min),o=n.max.subtract(t.max);return new B(this._rebound(s.x,-o.x),this._rebound(s.y,-o.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(),n=Nt.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){xe(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=ge("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=ue,i=this._proxy.style[e];Ce(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(){fe(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Ce(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 n=this.getZoomScale(e),s=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(s)||(P(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,Le(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&xe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function ai(t,e){return new oi(t,e)}var ri=C.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(),n=t._controlCorners[i];return Le(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(fe(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()}}),hi=function(t){return new ri(t)};oi.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=ge("div",e+"control-container",this._container);function n(n,s){var o=e+n+" "+e+s;t[n+s]=ge("div",o,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)fe(this._controlCorners[t]);fe(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var li=ri.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in d(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return ri.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(a(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){Le(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?(Le(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):xe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return xe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ge("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Xe(e),Ke(e);var n=this._section=ge("section",t+"-list");i&&(this._map.on("click",this.collapse,this),je(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var s=this._layersLink=ge("a",t+"-toggle",e);s.href="#",s.title="Layers",s.setAttribute("role","button"),je(s,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){Ye(t),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=ge("div",t+"-base",n),this._separator=ge("div",t+"-separator",n),this._overlaysList=ge("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&a(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(s(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;ye(this._baseLayersList),ye(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,s=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,s+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&s>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(a(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"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+a(this),n),this._layerControlInputs.push(e),e.layerId=a(t.layer),je(e,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var o=document.createElement("span");return i.appendChild(o),o.appendChild(e),o.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,n=[],s=[];this._handlingClick=!0;for(var o=i.length-1;o>=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||s.push(e);for(o=0;o<s.length;o++)this._map.hasLayer(s[o])&&this._map.removeLayer(s[o]);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])||this._map.addLayer(n[o]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),s=i.length-1;s>=0;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,je(t,"click",Ye),this.expand();var e=this;setTimeout(function(){Ue(t,"click",Ye),e._preventClick=!1})}}),ci=function(t,e,i){return new li(t,e,i)},ui=ri.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=ge("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),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,n,s){var o=ge("a",i,n);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),Xe(o),je(o,"click",$e),je(o,"click",s,this),je(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";xe(this._zoomInButton,e),xe(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(Le(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(Le(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});oi.mergeOptions({zoomControl:!0}),oi.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new ui,this.addControl(this.zoomControl))});var pi=function(t){return new ui(t)},di=ri.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=ge("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.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=ge("div",e,i)),t.imperial&&(this._iScale=ge("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,s=3.2808399*t;s>5280?(e=s/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(s),this._updateScale(this._iScale,n+" ft",n/s))},_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)}}),_i=function(t){return new di(t)},mi='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',gi=ri.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Nt.inlineSvg?mi+" ":"")+"Leaflet</a>"},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=ge("div","leaflet-control-attribution"),Xe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' <span aria-hidden="true">|</span> ')}}});oi.mergeOptions({attributionControl:!0}),oi.addInitHook(function(){this.options.attributionControl&&(new gi).addTo(this)});var fi=function(t){return new gi(t)};ri.Layers=li,ri.Zoom=ui,ri.Scale=di,ri.Attribution=gi,hi.layers=ci,hi.zoom=pi,hi.scale=_i,hi.attribution=fi;var yi=C.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}});yi.addTo=function(t,e){return t.addHandler(e,this),this};var Ai={Events:T},vi=Nt.touch?"touchstart mousedown":"mousedown",Mi=O.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){d(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(je(this._dragStartTarget,vi,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Mi._dragging===this&&this.finishDrag(!0),Ue(this._dragStartTarget,vi,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!Me(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)Mi._dragging===this&&this.finishDrag();else if(!(Mi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(Mi._dragging=this,this._preventOutline&&Ie(this._element),Be(),ae(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,i=ze(this._element);this._startPoint=new B(e.clientX,e.clientY),this._startPos=Te(this._element),this._parentScale=Ge(i);var n="mousedown"===t.type;je(document,n?"mousemove":"touchmove",this._onMove,this),je(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new B(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,Ye(t),this._moved||(this.fire("dragstart"),this._moved=!0,Le(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Le(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Se(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){xe(document.body,"leaflet-dragging"),this._lastTarget&&(xe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ue(document,"mousemove touchmove",this._onMove,this),Ue(document,"mouseup touchend touchcancel",this._onUp,this),De(),re();var e=this._moved&&this._moving;this._moving=!1,Mi._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function Li(t,e,i){var n,s,o,a,r,h,l,c,u,p=[1,4,2,8];for(s=0,l=t.length;s<l;s++)t[s]._code=Ii(t[s],e);for(a=0;a<4;a++){for(c=p[a],n=[],s=0,o=(l=t.length)-1;s<l;o=s++)r=t[s],h=t[o],r._code&c?h._code&c||((u=Di(h,r,c,e,i))._code=Ii(u,e),n.push(u)):(h._code&c&&((u=Di(h,r,c,e,i))._code=Ii(u,e),n.push(u)),n.push(r));t=n}return t}function xi(t,e){var i,n,s,o,a,r,h,l,c;if(!t||0===t.length)throw new Error("latlngs not passed");Gi(t)||(t=t[0]);var u=F([0,0]),p=N(t);p.getNorthWest().distanceTo(p.getSouthWest())*p.getNorthEast().distanceTo(p.getNorthWest())<1700&&(u=bi(t));var d=t.length,_=[];for(i=0;i<d;i++){var m=F(t[i]);_.push(e.project(F([m.lat-u.lat,m.lng-u.lng])))}for(r=h=l=0,i=0,n=d-1;i<d;n=i++)s=_[i],o=_[n],a=s.y*o.x-o.y*s.x,h+=(s.x+o.x)*a,l+=(s.y+o.y)*a,r+=3*a;c=0===r?_[0]:[h/r,l/r];var g=e.unproject(I(c));return F([g.lat+u.lat,g.lng+u.lng])}function bi(t){for(var e=0,i=0,n=0,s=0;s<t.length;s++){var o=F(t[s]);e+=o.lat,i+=o.lng,n++}return F([e/n,i/n])}var wi,Pi={__proto__:null,clipPolygon:Li,polygonCenter:xi,centroid:bi};function ki(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=Si(t=Oi(t,i),i)}function Ei(t,e,i){return Math.sqrt(zi(t,e,i,!0))}function Ci(t,e,i){return zi(t,e,i)}function Si(t,e){var i=t.length,n=new("undefined"!=typeof Uint8Array?Uint8Array:Array)(i);n[0]=n[i-1]=1,Ti(t,n,e,0,i-1);var s,o=[];for(s=0;s<i;s++)n[s]&&o.push(t[s]);return o}function Ti(t,e,i,n,s){var o,a,r,h=0;for(a=n+1;a<=s-1;a++)(r=zi(t[a],t[n],t[s],!0))>h&&(o=a,h=r);h>i&&(e[o]=1,Ti(t,e,i,n,o),Ti(t,e,i,o,s))}function Oi(t,e){for(var i=[t[0]],n=1,s=0,o=t.length;n<o;n++)Ri(t[n],t[s])>e&&(i.push(t[n]),s=n);return s<o-1&&i.push(t[o-1]),i}function Bi(t,e,i,n,s){var o,a,r,h=n?wi:Ii(t,i),l=Ii(e,i);for(wi=l;;){if(!(h|l))return[t,e];if(h&l)return!1;r=Ii(a=Di(t,e,o=h||l,i,s),i),o===h?(t=a,h=r):(e=a,l=r)}}function Di(t,e,i,n,s){var o,a,r=e.x-t.x,h=e.y-t.y,l=n.min,c=n.max;return 8&i?(o=t.x+r*(c.y-t.y)/h,a=c.y):4&i?(o=t.x+r*(l.y-t.y)/h,a=l.y):2&i?(o=c.x,a=t.y+h*(c.x-t.x)/r):1&i&&(o=l.x,a=t.y+h*(l.x-t.x)/r),new B(o,a,s)}function Ii(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function Ri(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function zi(t,e,i,n){var s,o=e.x,a=e.y,r=i.x-o,h=i.y-a,l=r*r+h*h;return l>0&&((s=((t.x-o)*r+(t.y-a)*h)/l)>1?(o=i.x,a=i.y):s>0&&(o+=r*s,a+=h*s)),r=t.x-o,h=t.y-a,n?r*r+h*h:new B(o,a)}function Gi(t){return!f(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Ni(t){return Gi(t)}function ji(t,e){var i,n,s,o,a,r,h,l;if(!t||0===t.length)throw new Error("latlngs not passed");Gi(t)||(t=t[0]);var c=F([0,0]),u=N(t);u.getNorthWest().distanceTo(u.getSouthWest())*u.getNorthEast().distanceTo(u.getNorthWest())<1700&&(c=bi(t));var p=t.length,d=[];for(i=0;i<p;i++){var _=F(t[i]);d.push(e.project(F([_.lat-c.lat,_.lng-c.lng])))}for(i=0,n=0;i<p-1;i++)n+=d[i].distanceTo(d[i+1])/2;if(0===n)l=d[0];else for(i=0,o=0;i<p-1;i++)if(a=d[i],r=d[i+1],(o+=s=a.distanceTo(r))>n){h=(o-n)/s,l=[r.x-h*(r.x-a.x),r.y-h*(r.y-a.y)];break}var m=e.unproject(I(l));return F([m.lat+c.lat,m.lng+c.lng])}var Fi={__proto__:null,simplify:ki,pointToSegmentDistance:Ei,closestPointOnSegment:Ci,clipSegment:Bi,_getEdgeIntersection:Di,_getBitCode:Ii,_sqClosestPointOnSegment:zi,isFlat:Gi,_flat:Ni,polylineCenter:ji},Ui={project:function(t){return new B(t.lng,t.lat)},unproject:function(t){return new j(t.y,t.x)},bounds:new R([-180,-90],[180,90])},Zi={R:6378137,R_MINOR:6356752.314245179,bounds:new R([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,s=this.R_MINOR/i,o=Math.sqrt(1-s*s),a=o*Math.sin(n),r=Math.tan(Math.PI/4-n/2)/Math.pow((1-a)/(1+a),o/2);return n=-i*Math.log(Math.max(r,1e-10)),new B(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,s=this.R_MINOR/n,o=Math.sqrt(1-s*s),a=Math.exp(-t.y/n),r=Math.PI/2-2*Math.atan(a),h=0,l=.1;h<15&&Math.abs(l)>1e-7;h++)e=o*Math.sin(r),e=Math.pow((1-e)/(1+e),o/2),r+=l=Math.PI/2-2*Math.atan(a*e)-r;return new j(r*i,t.x*i/n)}},Hi={__proto__:null,LonLat:Ui,Mercator:Zi,SphericalMercator:V},qi=i({},H,{code:"EPSG:3395",projection:Zi,transformation:function(){var t=.5/(Math.PI*Zi.R);return K(t,.5,-t,.5)}()}),Vi=i({},H,{code:"EPSG:4326",projection:Ui,transformation:K(1/180,1,-1/180,.5)}),Wi=i({},Z,{projection:Ui,transformation:K(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});Z.Earth=H,Z.EPSG3395=qi,Z.EPSG3857=Y,Z.EPSG900913=$,Z.EPSG4326=Vi,Z.Simple=Wi;var Ki=O.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[a(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[a(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});oi.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=a(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=a(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return a(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?f(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[a(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=a(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var s=this._zoomBoundLayers[n].options;t=void 0===s.minZoom?t:Math.min(t,s.minZoom),e=void 0===s.maxZoom?e:Math.max(e,s.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 Xi=Ki.extend({initialize:function(t,e){var i,n;if(d(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);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 a(t)}}),Yi=function(t,e){return new Xi(t,e)},$i=Xi.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Xi.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),Xi.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 G;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Ji=function(t,e){return new $i(t,e)},Qi=C.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){d(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var s=I(n),o=I("shadow"===e&&i.shadowAnchor||i.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Nt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function tn(t){return new Qi(t)}var en=Qi.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof en.imagePath&&(en.imagePath=this._detectIconPath()),(this.options.imagePath||en.imagePath)+Qi.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,i){var n=e.exec(t);return n&&n[i]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=ge("div","leaflet-default-icon-path",document.body),e=me(t,"background-image")||me(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""}}),nn=yi.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Mi(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Le(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&&xe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,o=Te(e._icon),a=i.getPixelBounds(),r=i.getPixelOrigin(),h=z(a.min._subtract(r).add(s),a.max._subtract(r).subtract(s));if(!h.contains(o)){var l=I((Math.max(h.max.x,o.x)-h.max.x)/(a.max.x-h.max.x)-(Math.min(h.min.x,o.x)-h.min.x)/(a.min.x-h.min.x),(Math.max(h.max.y,o.y)-h.max.y)/(a.max.y-h.max.y)-(Math.min(h.min.y,o.y)-h.min.y)/(a.min.y-h.min.y)).multiplyBy(n);i.panBy(l,{animate:!1}),this._draggable._newPos._add(l),this._draggable._startPos._add(l),Se(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=P(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=P(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=Te(e._icon),s=e._map.layerPointToLatLng(n);i&&Se(i,n),e._latlng=s,t.latlng=s,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)}}),sn=Ki.extend({options:{icon:new en,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=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),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),Le(i,e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&je(i,"focus",this._panOnFocus,this);var s=t.icon.createShadow(this._shadow),o=!1;s!==this._shadow&&(this._removeShadow(),o=!0),s&&(Le(s,e),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ue(this._icon,"focus",this._panOnFocus,this),fe(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&fe(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Se(this._icon,t),this._shadow&&Se(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(Le(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),nn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new nn(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&&Pe(this._icon,t),this._shadow&&Pe(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,i=e.iconSize?I(e.iconSize):I(0,0),n=e.iconAnchor?I(e.iconAnchor):I(0,0);t.panInside(this._latlng,{paddingTopLeft:n,paddingBottomRight:i.subtract(n)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function on(t,e){return new sn(t,e)}var an=Ki.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return d(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),rn=an.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 an.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(),n=[t+i,e+i];this._pxBounds=new R(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function hn(t,e){return new rn(t,e)}var ln=rn.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{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 G(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:an.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===H.distance){var s=Math.PI/180,o=this._mRadius/H.R/s,a=i.project([e+o,t]),r=i.project([e-o,t]),h=a.add(r).divideBy(2),l=i.unproject(h).lat,c=Math.acos((Math.cos(o*s)-Math.sin(e*s)*Math.sin(l*s))/(Math.cos(e*s)*Math.cos(l*s)))/s;(isNaN(c)||0===c)&&(c=o/Math.cos(Math.PI/180*e)),this._point=h.subtract(i.getPixelOrigin()),this._radius=isNaN(c)?0:h.x-i.project([l,t-c]).x,this._radiusY=h.y-a.y}else{var u=n.unproject(n.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 cn(t,e,i){return new ln(t,e,i)}var un=an.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,n=1/0,s=null,o=zi,a=0,r=this._parts.length;a<r;a++)for(var h=this._parts[a],l=1,c=h.length;l<c;l++){var u=o(t,e=h[l-1],i=h[l],!0);u<n&&(n=u,s=o(t,e,i))}return s&&(s.distance=Math.sqrt(n)),s},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return ji(this._defaultShape(),this._map.options.crs)},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 G,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Gi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=Gi(t),n=0,s=t.length;n<s;n++)i?(e[n]=F(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new R;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 B(t,t);this._rawPxBounds&&(this._pxBounds=new R([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,i){var n,s,o=t[0]instanceof j,a=t.length;if(o){for(s=[],n=0;n<a;n++)s[n]=this._map.latLngToLayerPoint(t[n]),i.extend(s[n]);e.push(s)}else for(n=0;n<a;n++)this._projectLatlngs(t[n],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,n,s,o,a,r,h=this._parts;for(e=0,n=0,s=this._rings.length;e<s;e++)for(i=0,o=(r=this._rings[e]).length;i<o-1;i++)(a=Bi(r[i],r[i+1],t,i,!0))&&(h[n]=h[n]||[],h[n].push(a[0]),a[1]===r[i+1]&&i!==o-2||(h[n].push(a[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=ki(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,n,s,o,a,r,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,o=this._parts.length;i<o;i++)for(n=0,s=(a=(r=this._parts[i]).length)-1;n<a;s=n++)if((e||0!==n)&&Ei(t,r[s],r[n])<=h)return!0;return!1}});function pn(t,e){return new un(t,e)}un._flat=Ni;var dn=un.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return xi(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=un.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof j&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){un.prototype._setLatLngs.call(this,t),Gi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Gi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new B(e,e);if(t=new R(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 n,s=0,o=this._rings.length;s<o;s++)(n=Li(this._rings[s],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,s,o,a,r,h,l=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,r=this._parts.length;s<r;s++)for(o=0,a=(h=(e=this._parts[s]).length)-1;o<h;a=o++)i=e[o],n=e[a],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||un.prototype._containsPoint.call(this,t,!0)}});function _n(t,e){return new dn(t,e)}var mn=$i.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=f(t)?t:t.features;if(s){for(e=0,i=s.length;e<i;e++)((n=s[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var a=gn(t,o);return a?(a.feature=xn(t),a.defaultOptions=a.options,this.resetStyle(a),o.onEachFeature&&o.onEachFeature(t,a),this.addLayer(a)):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 gn(t,e){var i,n,s,o,a="Feature"===t.type?t.geometry:t,r=a?a.coordinates:null,h=[],l=e&&e.pointToLayer,c=e&&e.coordsToLatLng||yn;if(!r&&!a)return null;switch(a.type){case"Point":return fn(l,t,i=c(r),e);case"MultiPoint":for(s=0,o=r.length;s<o;s++)i=c(r[s]),h.push(fn(l,t,i,e));return new $i(h);case"LineString":case"MultiLineString":return n=An(r,"LineString"===a.type?0:1,c),new un(n,e);case"Polygon":case"MultiPolygon":return n=An(r,"Polygon"===a.type?1:2,c),new dn(n,e);case"GeometryCollection":for(s=0,o=a.geometries.length;s<o;s++){var u=gn({geometry:a.geometries[s],type:"Feature",properties:t.properties},e);u&&h.push(u)}return new $i(h);case"FeatureCollection":for(s=0,o=a.features.length;s<o;s++){var p=gn(a.features[s],e);p&&h.push(p)}return new $i(h);default:throw new Error("Invalid GeoJSON object.")}}function fn(t,e,i,n){return t?t(e,i):new sn(i,n&&n.markersInheritOptions&&n)}function yn(t){return new j(t[1],t[0],t[2])}function An(t,e,i){for(var n,s=[],o=0,a=t.length;o<a;o++)n=e?An(t[o],e-1,i):(i||yn)(t[o]),s.push(n);return s}function vn(t,e){return void 0!==(t=F(t)).alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function Mn(t,e,i,n){for(var s=[],o=0,a=t.length;o<a;o++)s.push(e?Mn(t[o],Gi(t[o])?0:e-1,i,n):vn(t[o],n));return!e&&i&&s.length>0&&s.push(s[0].slice()),s}function Ln(t,e){return t.feature?i({},t.feature,{geometry:e}):xn(e)}function xn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var bn={toGeoJSON:function(t){return Ln(this,{type:"Point",coordinates:vn(this.getLatLng(),t)})}};function wn(t,e){return new mn(t,e)}sn.include(bn),ln.include(bn),rn.include(bn),un.include({toGeoJSON:function(t){var e=!Gi(this._latlngs);return Ln(this,{type:(e?"Multi":"")+"LineString",coordinates:Mn(this._latlngs,e?1:0,!1,t)})}}),dn.include({toGeoJSON:function(t){var e=!Gi(this._latlngs),i=e&&!Gi(this._latlngs[0]),n=Mn(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Ln(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Xi.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Ln(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,n=[];return this.eachLayer(function(e){if(e.toGeoJSON){var s=e.toGeoJSON(t);if(i)n.push(s.geometry);else{var o=xn(s);"FeatureCollection"===o.type?n.push.apply(n,o.features):n.push(o)}}}),i?Ln(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Pn=wn,kn=Ki.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=N(e),d(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Le(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){fe(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&&Ae(this._image),this},bringToBack:function(){return this._map&&ve(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=N(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:ge("img");Le(e,"leaflet-image-layer"),this._zoomAnimated&&Le(e,"leaflet-zoom-animated"),this.options.className&&Le(e,this.options.className),e.onselectstart=l,e.onmousemove=l,e.onload=s(this.fire,this,"load"),e.onerror=s(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;Ce(this._image,i,e)},_reset:function(){var t=this._image,e=new R(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();Se(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){Pe(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),En=function(t,e,i){return new kn(t,e,i)},Cn=kn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ge("video");if(Le(e,"leaflet-image-layer"),this._zoomAnimated&&Le(e,"leaflet-zoom-animated"),this.options.className&&Le(e,this.options.className),e.onselectstart=l,e.onmousemove=l,e.onloadeddata=s(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o<i.length;o++)n.push(i[o].src);this._url=i.length>0?n:[e.src]}else{f(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var a=0;a<this._url.length;a++){var r=ge("source");r.src=this._url[a],e.appendChild(r)}}}});function Sn(t,e,i){return new Cn(t,e,i)}var Tn=kn.extend({_initImage:function(){var t=this._image=this._url;Le(t,"leaflet-image-layer"),this._zoomAnimated&&Le(t,"leaflet-zoom-animated"),this.options.className&&Le(t,this.options.className),t.onselectstart=l,t.onmousemove=l}});function On(t,e,i){return new Tn(t,e,i)}var Bn=Ki.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof j||f(t))?(this._latlng=F(t),d(this,e)):(d(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&Pe(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Pe(this._container,1),this.bringToFront(),this.options.interactive&&(Le(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(Pe(this._container,0),this._removeTimeout=setTimeout(s(fe,void 0,this._container),200)):fe(this._container),this.options.interactive&&(xe(this._container,"leaflet-interactive"),this.removeInteractiveTarget(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&&Ae(this._container),this},bringToBack:function(){return this._map&&ve(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof $i){e=null;var i=this._source._layers;for(var n in i)if(i[n]._map){e=i[n];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=I(this.options.offset),i=this._getAnchor();this._zoomAnimated?Se(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}});oi.include({_initOverlay:function(t,e,i,n){var s=e;return s instanceof t||(s=new t(n).setContent(e)),i&&s.setLatLng(i),s}}),Ki.include({_initOverlay:function(t,e,i,n){var s=i;return s instanceof t?(d(s,n),s._source=this):(s=e&&!n?e:new t(n,this)).setContent(i),s}});var Dn=Bn.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Bn.prototype.openOn.call(this,t)},onAdd:function(t){Bn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof an||this._source.on("preclick",We))},onRemove:function(t){Bn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof an||this._source.off("preclick",We))},getEvents:function(){var t=Bn.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=ge("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=ge("div",t+"-content-wrapper",e);if(this._contentNode=ge("div",t+"-content",i),Xe(e),Ke(this._contentNode),je(e,"contextmenu",We),this._tipContainer=ge("div",t+"-tip-container",e),this._tip=ge("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=ge("a",t+"-close-button",e);n.setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">&#215;</span>',je(n,"click",function(t){Ye(t),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,o="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",Le(t,o)):xe(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();Se(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(me(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,s=new B(this._containerLeft,-i-this._containerBottom);s._add(Te(this._container));var o=t.layerPointToContainerPoint(s),a=I(this.options.autoPanPadding),r=I(this.options.autoPanPaddingTopLeft||a),h=I(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),c=0,u=0;o.x+n+h.x>l.x&&(c=o.x+n-l.x+h.x),o.x-c-r.x<0&&(c=o.x-r.x),o.y+i+h.y>l.y&&(u=o.y+i-l.y+h.y),o.y-u-r.y<0&&(u=o.y-r.y),(c||u)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,u]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),In=function(t,e){return new Dn(t,e)};oi.mergeOptions({closePopupOnClick:!0}),oi.include({openPopup:function(t,e,i){return this._initOverlay(Dn,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Ki.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Dn,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof $i||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){$e(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof an?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Rn=Bn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Bn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Bn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Bn.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ge("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+a(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,s=this._container,o=n.latLngToContainerPoint(n.getCenter()),a=n.layerPointToContainerPoint(t),r=this.options.direction,h=s.offsetWidth,l=s.offsetHeight,c=I(this.options.offset),u=this._getAnchor();"top"===r?(e=h/2,i=l):"bottom"===r?(e=h/2,i=0):"center"===r?(e=h/2,i=l/2):"right"===r?(e=0,i=l/2):"left"===r?(e=h,i=l/2):a.x<o.x?(r="right",e=0,i=l/2):(r="left",e=h+2*(c.x+u.x),i=l/2),t=t.subtract(I(e,i,!0)).add(c).add(u),xe(s,"leaflet-tooltip-right"),xe(s,"leaflet-tooltip-left"),xe(s,"leaflet-tooltip-top"),xe(s,"leaflet-tooltip-bottom"),Le(s,"leaflet-tooltip-"+r),Se(s,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Pe(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return I(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),zn=function(t,e){return new Rn(t,e)};oi.include({openTooltip:function(t,e,i){return this._initOverlay(Rn,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Ki.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Rn,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,i.click=this._openTooltip,this._map?this._addFocusListeners():i.add=this._addFocusListeners),this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof $i||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(je(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),je(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)})}else this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var Gn=Qi.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?(ye(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=I(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Nn(t){return new Gn(t)}Qi.Default=en;var jn=Ki.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Nt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){d(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),fe(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Ae(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ve(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=r(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 B?t:new B(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),s=0,o=i.length;s<o;s++)e=i[s].style.zIndex,i[s]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Nt.ielt9){Pe(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var s=this._tiles[n];if(s.current&&s.loaded){var o=Math.min(1,(t-s.loaded)/200);Pe(s.el,o),o<1?e=!0:(s.active?i=!0:this._onOpaqueTile(s),s.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(k(this._fadeFrame),this._fadeFrame=P(this._updateOpacity,this))}},_onOpaqueTile:l,_initContainer:function(){this._container||(this._container=ge("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)):(fe(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],s=this._map;return n||((n=this._levels[t]={}).el=ge("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,s.getCenter(),s.getZoom()),l(n.el.offsetWidth),this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:l,_onRemoveLevel:l,_onCreateLevel:l,_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 n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var 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)fe(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var s=Math.floor(t/2),o=Math.floor(e/2),a=i-1,r=new B(+s,+o);r.z=+a;var h=this._tileCoordsToKey(r),l=this._tiles[h];return l&&l.active?(l.retain=!0,!0):(l&&l.loaded&&(l.retain=!0),a>n&&this._retainParent(s,o,a,n))},_retainChildren:function(t,e,i,n){for(var s=2*t;s<2*t+2;s++)for(var o=2*e;o<2*e+2;o++){var a=new B(s,o);a.z=i+1;var r=this._tileCoordsToKey(a),h=this._tiles[r];h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),i+1<n&&this._retainChildren(s,o,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!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,n){var s=Math.round(e);s=void 0!==this.options.maxZoom&&s>this.options.maxZoom||void 0!==this.options.minZoom&&s<this.options.minZoom?void 0:this._clampZoom(s);var o=this.options.updateWhenZooming&&s!==this._tileZoom;n&&!o||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==s&&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 n=this._map.getZoomScale(i,t.zoom),s=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();Nt.any3d?Ce(t.el,s,n):Se(t.el,s)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,s=this._map.getPixelWorldBounds(this._tileZoom);s&&(this._globalTileRange=this._pxBoundsToTileRange(s)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){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(),n=e.getZoomScale(i,this._tileZoom),s=e.project(t,this._tileZoom).floor(),o=e.getSize().divideBy(2*n);return new R(s.subtract(o),s.add(o))},_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 n=this._getTiledPixelBounds(t),s=this._pxBoundsToTileRange(n),o=s.getCenter(),a=[],r=this.options.keepBuffer,h=new R(s.getBottomLeft().subtract([r,-r]),s.getTopRight().add([r,-r]));if(!(isFinite(s.min.x)&&isFinite(s.min.y)&&isFinite(s.max.x)&&isFinite(s.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var l in this._tiles){var c=this._tiles[l].coords;c.z===this._tileZoom&&h.contains(new B(c.x,c.y))||(this._tiles[l].current=!1)}if(Math.abs(i-this._tileZoom)>1)this._setView(t,i);else{for(var u=s.min.y;u<=s.max.y;u++)for(var p=s.min.x;p<=s.max.x;p++){var d=new B(p,u);if(d.z=this._tileZoom,this._isValidTile(d)){var _=this._tiles[this._tileCoordsToKey(d)];_?_.current=!0:a.push(d)}}if(a.sort(function(t,e){return t.distanceTo(o)-e.distanceTo(o)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(p=0;p<a.length;p++)this._addTile(a[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 n=this._tileCoordsToBounds(t);return N(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),s=n.add(i);return[e.unproject(n,t.z),e.unproject(s,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new G(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 B(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(fe(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){Le(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=l,t.onmousemove=l,Nt.ielt9&&this.options.opacity<1&&Pe(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),s(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&P(s(this._tileReady,this,t,null,o)),Se(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(Pe(i.el,0),k(this._fadeFrame),this._fadeFrame=P(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(Le(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Nt.ielt9||!this._map._fadeAnimated?P(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new B(this._wrapX?h(t.x,this._wrapX):t.x,this._wrapY?h(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new R(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 Fn(t){return new jn(t)}var Un=jn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&Nt.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return je(i,"load",s(this._tileOnLoad,this,e,i)),je(i,"error",s(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:Nt.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return g(this._url,i(e,this.options))},_tileOnLoad:function(t,e){Nt.ielt9?setTimeout(s(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=l,e.onerror=l,!e.complete)){e.src=A;var i=this._tiles[t].coords;fe(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",A),jn.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==A))return jn.prototype._tileReady.call(this,t,e,i)}});function Zn(t,e){return new Un(t,e)}var Hn=Un.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var s in e)s in this.options||(n[s]=e[s]);var o=(e=d(this,e)).detectRetina&&Nt.retina?2:1,a=this.getTileSize();n.width=a.x*o,n.height=a.y*o,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Un.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=z(i.project(e[0]),i.project(e[1])),s=n.min,o=n.max,a=(this._wmsVersion>=1.3&&this._crs===Vi?[s.y,s.x,o.y,o.x]:[s.x,s.y,o.x,o.y]).join(","),r=Un.prototype.getTileUrl.call(this,t);return r+_(this.wmsParams,r,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});function qn(t,e){return new Hn(t,e)}Un.WMS=Hn,Zn.wms=qn;var Vn=Ki.extend({options:{padding:.1},initialize:function(t){d(this,t),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Le(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),n=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e),o=n.multiplyBy(-i).add(s).subtract(this._map._getNewPixelOrigin(t,e));Nt.any3d?Ce(this._container,o,i):Se(this._container,o)},_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 R(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Wn=Vn.extend({options:{tolerance:0},getEvents:function(){var t=Vn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Vn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");je(t,"mousemove",this._onMouseMove,this),je(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),je(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){k(this._redrawRequest),delete this._ctx,fe(this._container),Ue(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){Vn.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=Nt.retina?2:1;Se(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Nt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Vn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[a(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,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[a(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,n=t.options.dashArray.split(/[, ]+/),s=[];for(i=0;i<n.length;i++){if(e=Number(n[i]),isNaN(e))return;s.push(e)}t.options._dashArray=s}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||P(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new R,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 n=this._drawFirst;n;n=n.next)t=n.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,n,s,o,a=t._parts,r=a.length,h=this._ctx;if(r){for(h.beginPath(),i=0;i<r;i++){for(n=0,s=a[i].length;n<s;n++)o=a[i][n],h[n?"lineTo":"moveTo"](o.x,o.y);e&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==s&&(i.save(),i.scale(1,s)),i.beginPath(),i.arc(e.x,e.y/s,n,0,2*Math.PI,!1),1!==s&&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,n=this._map.mouseEventToLayerPoint(t),s=this._drawFirst;s;s=s.next)(e=s.layer).options.interactive&&e._containsPoint(n)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(i=e);this._fireEvent(!!i&&[i],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(xe(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,n,o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(Le(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(s(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,n=e.prev;i&&(i.prev=n,n?n.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,n=e.prev;n&&(n.next=i,i?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Kn(t){return Nt.canvas?new Wn(t):null}var Xn=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">')}}(),Yn={_initContainer:function(){this._container=ge("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Vn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Xn("shape");Le(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Xn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(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;fe(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(e||(e=t._stroke=Xn("stroke")),s.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=f(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(s.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=Xn("fill")),s.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(s.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Ae(t._container)},_bringToBack:function(t){ve(t._container)}},$n=Nt.vml?Xn:J,Jn=Vn.extend({_initContainer:function(){this._container=$n("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=$n("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){fe(this._container),Ue(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Vn.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),Se(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=$n("path");t.options.className&&Le(e,t.options.className),t.options.interactive&&Le(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){fe(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(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,Q(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Ae(t._path)},_bringToBack:function(t){ve(t._path)}});function Qn(t){return Nt.svg||Nt.vml?new Jn(t):null}Nt.vml&&Jn.include(Yn),oi.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&&Kn(t)||Qn(t)}});var ts=dn.extend({initialize:function(t,e){dn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=N(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function es(t,e){return new ts(t,e)}Jn.create=$n,Jn.pointsToPath=Q,mn.geometryToLayer=gn,mn.coordsToLatLng=yn,mn.coordsToLatLngs=An,mn.latLngToCoords=vn,mn.latLngsToCoords=Mn,mn.getFeature=Ln,mn.asFeature=xn,oi.mergeOptions({boxZoom:!0});var is=yi.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(){je(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ue(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){fe(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(),ae(),Be(),this._startPoint=this._map.mouseEventToContainerPoint(t),je(document,{contextmenu:$e,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ge("div","leaflet-zoom-box",this._container),Le(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new R(this._point,this._startPoint),i=e.getSize();Se(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(fe(this._box),xe(this._container,"leaflet-crosshair")),re(),De(),Ue(document,{contextmenu:$e,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(s(this._resetState,this),0);var e=new G(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});oi.addInitHook("addHandler","boxZoom",is),oi.mergeOptions({doubleClickZoom:!0});var ns=yi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,s=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(s):e.setZoomAround(t.containerPoint,s)}});oi.addInitHook("addHandler","doubleClickZoom",ns),oi.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ss=yi.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Mi(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))}Le(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){xe(this._map._container,"leaflet-grab"),xe(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=N(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,n=this._draggable._newPos.x,s=(n-e+i)%t+e-i,o=(n+e+i)%t-e-i,a=Math.abs(s+i)<Math.abs(o+i)?s:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var s=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,a=i.easeLinearity,r=s.multiplyBy(a/o),h=r.distanceTo([0,0]),l=Math.min(i.inertiaMaxSpeed,h),c=r.multiplyBy(l/h),u=l/(i.inertiaDeceleration*a),p=c.multiplyBy(-u/2).round();p.x||p.y?(p=e._limitOffset(p,e.options.maxBounds),P(function(){e.panBy(p,{duration:u,easeLinearity:a,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});oi.addInitHook("addHandler","dragging",ss),oi.mergeOptions({keyboard:!0,keyboardPanDelta:80});var os=yi.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"),je(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(),Ue(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,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,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,n=this._panKeys={},s=this.keyCodes;for(e=0,i=s.left.length;e<i;e++)n[s.left[e]]=[-1*t,0];for(e=0,i=s.right.length;e<i;e++)n[s.right[e]]=[t,0];for(e=0,i=s.down.length;e<i;e++)n[s.down[e]]=[0,t];for(e=0,i=s.up.length;e<i;e++)n[s.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},s=this.keyCodes;for(e=0,i=s.zoomIn.length;e<i;e++)n[s.zoomIn[e]]=t;for(e=0,i=s.zoomOut.length;e<i;e++)n[s.zoomOut[e]]=-t},_addHooks:function(){je(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ue(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress)if(e=this._panKeys[i],t.shiftKey&&(e=I(e).multiplyBy(3)),n.options.maxBounds&&(e=n._limitOffset(I(e),n.options.maxBounds)),n.options.worldCopyJump){var s=n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(e)));n.panTo(s)}else n.panBy(e)}else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}$e(t)}}});oi.addInitHook("addHandler","keyboard",os),oi.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var as=yi.extend({addHooks:function(){je(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ue(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=ei(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(s(this._performZoom,this),n),$e(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),s=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,o=i?Math.ceil(s/i)*i:s,a=t._limitZoom(e+(this._delta>0?o:-o))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});oi.addInitHook("addHandler","scrollWheelZoom",as);var rs=600;oi.mergeOptions({tapHold:Nt.touchNative&&Nt.safari&&Nt.mobile,tapTolerance:15});var hs=yi.extend({addHooks:function(){je(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ue(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new B(e.clientX,e.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(je(document,"touchend",Ye),je(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),rs),je(document,"touchend touchcancel contextmenu",this._cancel,this),je(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Ue(document,"touchend",Ye),Ue(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Ue(document,"touchend touchcancel contextmenu",this._cancel,this),Ue(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new B(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});oi.addInitHook("addHandler","tapHold",hs),oi.mergeOptions({touchZoom:Nt.touch,bounceAtZoomLimits:!0});var ls=yi.extend({addHooks:function(){Le(this._map._container,"leaflet-touch-zoom"),je(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){xe(this._map._container,"leaflet-touch-zoom"),Ue(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]),n=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(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),je(document,"touchmove",this._onTouchMove,this),je(document,"touchend touchcancel",this._onTouchEnd,this),Ye(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var a=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),k(this._animRequest);var r=s(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=P(r,this,!0),Ye(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,k(this._animRequest),Ue(document,"touchmove",this._onTouchMove,this),Ue(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});oi.addInitHook("addHandler","touchZoom",ls),oi.BoxZoom=is,oi.DoubleClickZoom=ns,oi.Drag=ss,oi.Keyboard=os,oi.ScrollWheelZoom=as,oi.TapHold=hs,oi.TouchZoom=ls,t.Bounds=R,t.Browser=Nt,t.CRS=Z,t.Canvas=Wn,t.Circle=ln,t.CircleMarker=rn,t.Class=C,t.Control=ri,t.DivIcon=Gn,t.DivOverlay=Bn,t.DomEvent=ni,t.DomUtil=Ne,t.Draggable=Mi,t.Evented=O,t.FeatureGroup=$i,t.GeoJSON=mn,t.GridLayer=jn,t.Handler=yi,t.Icon=Qi,t.ImageOverlay=kn,t.LatLng=j,t.LatLngBounds=G,t.Layer=Ki,t.LayerGroup=Xi,t.LineUtil=Fi,t.Map=oi,t.Marker=sn,t.Mixin=Ai,t.Path=an,t.Point=B,t.PolyUtil=Pi,t.Polygon=dn,t.Polyline=un,t.Popup=Dn,t.PosAnimation=si,t.Projection=Hi,t.Rectangle=ts,t.Renderer=Vn,t.SVG=Jn,t.SVGOverlay=Tn,t.TileLayer=Un,t.Tooltip=Rn,t.Transformation=W,t.Util=E,t.VideoOverlay=Cn,t.bind=s,t.bounds=z,t.canvas=Kn,t.circle=cn,t.circleMarker=hn,t.control=hi,t.divIcon=Nn,t.extend=i,t.featureGroup=Ji,t.geoJSON=wn,t.geoJson=Pn,t.gridLayer=Fn,t.icon=tn,t.imageOverlay=En,t.latLng=F,t.latLngBounds=N,t.layerGroup=Yi,t.map=ai,t.marker=on,t.point=I,t.polygon=_n,t.polyline=pn,t.popup=In,t.rectangle=es,t.setOptions=d,t.stamp=a,t.svg=Qn,t.svgOverlay=On,t.tileLayer=Zn,t.tooltip=zn,t.transformation=K,t.version=e,t.videoOverlay=Sn;var cs=window.L;t.noConflict=function(){return window.L=cs,this},window.L=t}(h.exports)),h.exports}var c,u=l();c=function(){const t=L.extend({},L.DomUtil);L.extend(L.DomUtil,{setTransform:function(e,i,n,s,o){var a=i||new L.Point(0,0);if(!s)return i=a._round(),t.setTransform.apply(this,arguments);a=a.rotateFrom(s,o),e.style[L.DomUtil.TRANSFORM]="translate3d("+a.x+"px,"+a.y+"px,0)"+(n?" scale("+n+")":"")+" rotate("+s+"rad)"},setPosition:function(e,i,n,s,o){if(!n&&!o)return t.setPosition.apply(this,arguments);e._leaflet_pos=i,L.Browser.any3d?L.DomUtil.setTransform(e,i,o,n,s):(e.style.left=i.x+"px",e.style.top=i.y+"px")},DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI}),L.Draggable.include({}),L.extend(L.Point.prototype,{rotate:function(t){return this.rotateFrom(t,new L.Point(0,0))},rotateFrom:function(t,e){if(!t)return this;var i=Math.sin(t),n=Math.cos(t),s=e.x,o=e.y,a=this.x-s,r=this.y-o;return new L.Point(a*n-r*i+s,a*i+r*n+o)}});const e=L.extend({},L.DivOverlay.prototype);L.DivOverlay.include({getEvents:function(){return L.extend(e.getEvents.apply(this,arguments),{rotate:this._updatePosition})},_updatePosition:function(){if(this._map&&(e._updatePosition.apply(this,arguments),this._map&&this._map._rotate&&this._zoomAnimated)){var t=this._getAnchor(),i=L.DomUtil.getPosition(this._container).subtract(t);L.DomUtil.setPosition(this._container,this._map.rotatedPointToMapPanePoint(i).add(t))}}});const i=L.extend({},L.Popup.prototype);L.Popup.include({_animateZoom:function(t){if(i._animateZoom.apply(this,arguments),this._map&&this._map._rotate){var e=this._getAnchor(),n=L.DomUtil.getPosition(this._container).subtract(e);L.DomUtil.setPosition(this._container,this._map.rotatedPointToMapPanePoint(n).add(e))}},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress))if(this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(L.DomUtil.getStyle(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,s=new L.Point(this._containerLeft,-i-this._containerBottom);s._add(L.DomUtil.getPosition(this._container));var o=s._add(this._map._getMapPanePos()),a=L.point(this.options.autoPanPadding),r=L.point(this.options.autoPanPaddingTopLeft||a),h=L.point(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),c=0,u=0;o.x+n+h.x>l.x&&(c=o.x+n-l.x+h.x),o.x-c-r.x<0&&(c=o.x-r.x),o.y+i+h.y>l.y&&(u=o.y+i-l.y+h.y),o.y-u-r.y<0&&(u=o.y-r.y),(c||u)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,u]))}}});const n=L.extend({},L.Tooltip.prototype);L.Tooltip.include({_animateZoom:function(t){if(!this._map._rotate)return n._animateZoom.apply(this,arguments);var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);e=this._map.rotatedPointToMapPanePoint(e),this._setPosition(e)},_updatePosition:function(){if(!this._map._rotate)return n._updatePosition.apply(this,arguments);var t=this._map.latLngToLayerPoint(this._latlng);t=this._map.rotatedPointToMapPanePoint(t),this._setPosition(t)}}),L.extend({},L.Icon.prototype),L.Icon.include({_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var s=L.point(n),o=L.point("shadow"===e&&i.shadowAnchor||i.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px",t.style[L.DomUtil.TRANSFORM+"Origin"]=o.x+"px "+o.y+"px 0px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")}});const s=L.extend({},L.Marker.prototype);var o;L.Marker.mergeOptions({rotation:0,rotateWithView:!1,scale:void 0});var a={_onDrag:function(t){var e=this._marker,i=e.options.rotation||e.options.rotateWithView,n=e._shadow,s=L.DomUtil.getPosition(e._icon);!i&&n&&L.DomUtil.setPosition(n,s),e._map._rotate&&(s=e._map.mapPanePointToRotatedPoint(s));var o=e._map.layerPointToLatLng(s);e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,i?e.setLatLng(o):e.fire("move",t),e.fire("drag",t)},_onDragEnd:function(t){this._marker._map._rotate&&this._marker.update(),o._onDragEnd.apply(this,arguments)}};L.Marker.include({getEvents:function(){return L.extend(s.getEvents.apply(this,arguments),{rotate:this.update})},_initInteraction:function(){var t=s._initInteraction.apply(this,arguments);return this.dragging&&this.dragging.enabled()&&this._map&&this._map._rotate&&(o=o||Object.getPrototypeOf(this.dragging),this.dragging.disable(),Object.assign(this.dragging,{_onDrag:a._onDrag.bind(this.dragging),_onDragEnd:a._onDragEnd.bind(this.dragging)}),this.dragging.enable()),t},_setPos:function(t){this._map._rotate&&(t=this._map.rotatedPointToMapPanePoint(t));var e=this.options.rotation||0;this.options.rotateWithView&&(e+=this._map._bearing),this._icon&&L.DomUtil.setPosition(this._icon,t,e,t,this.options.scale),this._shadow&&L.DomUtil.setPosition(this._shadow,t,e,t,this.options.scale),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},setRotation:function(t){this.options.rotation=t,this.update()}});const r=L.extend({},L.GridLayer.prototype);L.GridLayer.include({getEvents:function(){var t=r.getEvents.apply(this,arguments);return this._map._rotate&&!this.options.updateWhenIdle&&(this._onRotate||(this._onRotate=L.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),t.rotate=this._onRotate),t},_getTiledPixelBounds:function(t){return this._map._rotate?this._map._getNewPixelBounds(t,this._tileZoom):r._getTiledPixelBounds.apply(this,arguments)}});const h=L.extend({},L.Renderer.prototype);L.Renderer.include({getEvents:function(){return L.extend(h.getEvents.apply(this,arguments),{rotate:this._update})},onAdd:function(){h.onAdd.apply(this,arguments),L.version<="1.9.3"&&this._container.classList.add("leaflet-zoom-animated")},_updateTransform:function(t,e){if(!this._map._rotate)return h._updateTransform.apply(this,arguments);var i=this._map.getZoomScale(e,this._zoom),n=this._map._latLngToNewLayerPoint(this._topLeft,e,t);L.DomUtil.setTransform(this._container,n,i)},_update:function(){if(!this._map._rotate)return h._update.apply(this,arguments);this._bounds=this._map._getPaddedPixelBounds(this.options.padding),this._topLeft=this._map.layerPointToLatLng(this._bounds.min),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}});const l=L.extend({},L.Map.prototype);L.Map.mergeOptions({rotate:!1,bearing:0}),L.Map.include({initialize:function(t,e){e.rotate&&(this._rotate=!0,this._bearing=0),l.initialize.apply(this,arguments),this.options.rotate&&this.setBearing(this.options.bearing)},containerPointToLayerPoint:function(t){return this._rotate?L.point(t).subtract(this._getMapPanePos()).rotateFrom(-this._bearing,this._getRotatePanePos()).subtract(this._getRotatePanePos()):l.containerPointToLayerPoint.apply(this,arguments)},layerPointToContainerPoint:function(t){return this._rotate?L.point(t).add(this._getRotatePanePos()).rotateFrom(this._bearing,this._getRotatePanePos()).add(this._getMapPanePos()):l.layerPointToContainerPoint.apply(this,arguments)},rotatedPointToMapPanePoint:function(t){return L.point(t).rotate(this._bearing)._add(this._getRotatePanePos())},mapPanePointToRotatedPoint:function(t){return L.point(t)._subtract(this._getRotatePanePos()).rotate(-this._bearing)},mapBoundsToContainerBounds:function(t){if(!this._rotate&&l.mapBoundsToContainerBounds)return l.mapBoundsToContainerBounds.apply(this,arguments);const e=this.getPixelOrigin(),i=this.layerPointToContainerPoint(this.project(t.getNorthWest())._subtract(e)),n=this.layerPointToContainerPoint(this.project(t.getNorthEast())._subtract(e)),s=this.layerPointToContainerPoint(this.project(t.getSouthWest())._subtract(e)),o=this.layerPointToContainerPoint(this.project(t.getSouthEast())._subtract(e));return L.bounds([L.point(Math.min(i.x,n.x,o.x,s.x),Math.min(i.y,n.y,o.y,s.y)),L.point(Math.max(i.x,n.x,o.x,s.x),Math.max(i.y,n.y,o.y,s.y))])},getBounds:function(){if(!this._rotate)return l.getBounds.apply(this,arguments);var t=this.getSize();return new L.LatLngBounds([this.containerPointToLatLng([0,0]),this.containerPointToLatLng([t.x,0]),this.containerPointToLatLng([t.x,t.y]),this.containerPointToLatLng([0,t.y])])},setBearing:function(t){if(L.Browser.any3d&&this._rotate){var e=L.Util.wrapNum(t,[0,360])*L.DomUtil.DEG_TO_RAD,i=this._getPixelCenter(),n=this._getRotatePanePos().rotateFrom(-this._bearing,i),s=n.rotateFrom(e,i);L.DomUtil.setPosition(this._rotatePane,n,e,i),this._pivot=i,this._bearing=e,this._rotatePanePos=s,this.fire("rotate")}},getBearing:function(){return this._bearing*L.DomUtil.RAD_TO_DEG},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),L.DomUtil.setPosition(this._mapPane,new L.Point(0,0)),this._rotate?(this._rotatePane=this.createPane("rotatePane",this._mapPane),this._norotatePane=this.createPane("norotatePane",this._mapPane),this.createPane("tilePane",this._rotatePane),this.createPane("overlayPane",this._rotatePane),this.createPane("shadowPane",this._norotatePane),this.createPane("markerPane",this._norotatePane),this.createPane("tooltipPane",this._norotatePane),this.createPane("popupPane",this._norotatePane)):(this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane")),this.options.markerZoomAnimation||(L.DomUtil.addClass(t.markerPane,"leaflet-zoom-hide"),L.DomUtil.addClass(t.shadowPane,"leaflet-zoom-hide"))},panInside(t,e){if(!this._rotate||Math.abs(this._bearing).toFixed(1)<.1)return l.panInside.apply(this,arguments);e=e||{};const i=L.point(e.paddingTopLeft||e.padding||[0,0]),n=L.point(e.paddingBottomRight||e.padding||[0,0]),s=this._container.getBoundingClientRect(),o=this.latLngToContainerPoint(t),a=L.bounds([L.point(s),L.point(s).add(this.getSize())]),r=a.getCenter(),h=L.bounds([a.min.add(i),a.max.subtract(n)]),c=h.getSize();if(!h.contains(o)){this._enforcingBounds=!0;const t=o.subtract(h.getCenter()),i=h.extend(o).getSize().subtract(c);r.x+=t.x<0?-i.x:i.x,r.y+=t.y<0?-i.y:i.y,this.panTo(this.containerPointToLatLng(r),e),this._enforcingBounds=!1}return this},getBoundsZoom(t,e,i){if(!this._rotate||Math.abs(this._bearing).toFixed(1)<.1)return l.getBoundsZoom.apply(this,arguments);t=L.latLngBounds(t),i=L.point(i||[0,0]);let n=this.getZoom()||0;const s=this.getMinZoom(),o=this.getMaxZoom(),a=this.getSize().subtract(i),r=this.mapBoundsToContainerBounds(t).getSize(),h=this.options.zoomSnap,c=a.x/r.x,u=a.y/r.y,p=e?Math.max(c,u):Math.min(c,u);return n=this.getScaleZoom(p,n),h&&(n=Math.round(n/(h/100))*(h/100),n=e?Math.ceil(n/h)*h:Math.floor(n/h)*h),Math.max(s,Math.min(o,n))},_getCenterOffset:function(t){var e=l._getCenterOffset.apply(this,arguments);return this._rotate&&(e=e.rotate(this._bearing)),e},_getRotatePanePos:function(){return this._rotatePanePos||new L.Point(0,0)},_getNewPixelOrigin:function(t,e){if(!this._rotate)return l._getNewPixelOrigin.apply(this,arguments);var i=this.getSize()._divideBy(2);return this.project(t,e).rotate(this._bearing)._subtract(i)._add(this._getMapPanePos())._add(this._getRotatePanePos()).rotate(-this._bearing)._round()},_getNewPixelBounds:function(t,e){if(t=t||this.getCenter(),e=e||this.getZoom(),!this._rotate&&l._getNewPixelBounds)return l._getNewPixelBounds.apply(this,arguments);var i=this._animatingZoom?Math.max(this._animateToZoom,this.getZoom()):this.getZoom(),n=this.getZoomScale(i,e),s=this.project(t,e).floor(),o=this.getSize(),a=new L.Bounds([this.containerPointToLayerPoint([0,0]).floor(),this.containerPointToLayerPoint([o.x,0]).floor(),this.containerPointToLayerPoint([0,o.y]).floor(),this.containerPointToLayerPoint([o.x,o.y]).floor()]).getSize().divideBy(2*n);return new L.Bounds(s.subtract(a),s.add(a))},_getPixelCenter:function(){return!this._rotate&&l._getPixelCenter?l._getPixelCenter.apply(this,arguments):this.getSize()._divideBy(2)._subtract(this._getMapPanePos())},_getPaddedPixelBounds:function(t){if(!this._rotate&&l._getPaddedPixelBounds)return l._getPaddedPixelBounds.apply(this,arguments);var e=t,i=this.getSize(),n=i.multiplyBy(-e),s=i.multiplyBy(1+e);return new L.Bounds([this.containerPointToLayerPoint([n.x,n.y]).floor(),this.containerPointToLayerPoint([n.x,s.y]).floor(),this.containerPointToLayerPoint([s.x,n.y]).floor(),this.containerPointToLayerPoint([s.x,s.y]).floor()])},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,i=t.coords.longitude,n=t.coords.heading,s=new L.LatLng(e,i),o=s.toBounds(t.coords.accuracy),a=this._locateOptions;if(a.setView){var r=this.getBoundsZoom(o);this.setView(s,a.maxZoom?Math.min(r,a.maxZoom):r)}var h={latlng:s,bounds:o,timestamp:t.timestamp,heading:n};for(var l in t.coords)"number"==typeof t.coords[l]&&(h[l]=t.coords[l]);this.fire("locationfound",h)}}}),L.Map.CompassBearing=L.Handler.extend({initialize:function(t){this._map=t,"ondeviceorientationabsolute"in window?this.__deviceOrientationEvent="deviceorientationabsolute":"ondeviceorientation"in window&&(this.__deviceOrientationEvent="deviceorientation"),this._throttled=L.Util.throttle(this._onDeviceOrientation,100,this)},addHooks:function(){this._map._rotate&&this.__deviceOrientationEvent?L.DomEvent.on(window,this.__deviceOrientationEvent,this._throttled,this):this.disable()},removeHooks:function(){this._map._rotate&&this.__deviceOrientationEvent&&L.DomEvent.off(window,this.__deviceOrientationEvent,this._throttled,this)},_onDeviceOrientation:function(t){var e=t.webkitCompassHeading||t.alpha,i=0;!t.absolute&&t.webkitCompassHeading&&(e=360-e),t.absolute||void 0===window.orientation||(i=window.orientation),this._map.setBearing(e-i)}}),L.Map.addInitHook("addHandler","compassBearing",L.Map.CompassBearing),L.Map.mergeOptions({trackContainerMutation:!1}),L.Map.ContainerMutation=L.Handler.extend({addHooks:function(){this._observer||(this._observer=new MutationObserver(L.Util.bind(this._map.invalidateSize,this._map))),this._observer.observe(this._map.getContainer(),{childList:!1,attributes:!0,characterData:!1,subtree:!1,attributeFilter:["style"]})},removeHooks:function(){this._observer.disconnect()}}),L.Map.addInitHook("addHandler","trackContainerMutation",L.Map.ContainerMutation),L.Map.mergeOptions({bounceAtZoomLimits:!0}),L.Map.TouchGestures=L.Handler.extend({initialize:function(t){this._map=t,this.rotate=!!this._map.options.touchRotate,this.zoom=!!this._map.options.touchZoom},addHooks:function(){L.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){L.DomEvent.off(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&&!this._rotating){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),s=i.subtract(n);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),this.zoom?("center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._zooming=!0):this._zooming=!1,this.rotate?(this._startTheta=Math.atan(s.x/s.y),this._startBearing=e.getBearing(),s.y<0&&(this._startBearing+=180),this._rotating=!0):this._rotating=!1,this._moved=!1,e._stop(),L.DomEvent.on(document,"touchmove",this._onTouchMove,this).on(document,"touchend touchcancel",this._onTouchEnd,this),L.DomEvent.preventDefault(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&(this._zooming||this._rotating)){var e,i=this._map,n=i.mouseEventToContainerPoint(t.touches[0]),s=i.mouseEventToContainerPoint(t.touches[1]),o=n.subtract(s),a=n.distanceTo(s)/this._startDist;if(this._rotating){var r=(Math.atan(o.x/o.y)-this._startTheta)*L.DomUtil.RAD_TO_DEG;o.y<0&&(r+=180),r&&i.setBearing(this._startBearing-r)}if(this._zooming)if(this._zoom=i.getScaleZoom(a,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&a<1||this._zoom>i.getMaxZoom()&&a>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===a)return}else{if(e=n._add(s)._divideBy(2)._subtract(this._centerPoint),1===a&&0===e.x&&0===e.y)return;var h=-i.getBearing()*L.DomUtil.DEG_TO_RAD;this._center=i.unproject(i.project(this._pinchStartLatLng).subtract(e.rotate(h)))}this._moved||(i._moveStart(!0,!1),this._moved=!0),L.Util.cancelAnimFrame(this._animRequest);var l=i._move.bind(i,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=L.Util.requestAnimFrame(l,this,!0),L.DomEvent.preventDefault(t)}},_onTouchEnd:function(){this._moved&&(this._zooming||this._rotating)?(this._zooming=!1,this._rotating=!1,L.Util.cancelAnimFrame(this._animRequest),L.DomEvent.off(document,"touchmove",this._onTouchMove,this).off(document,"touchend touchcancel",this._onTouchEnd,this),this.zoom&&(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}}),L.Map.addInitHook("addHandler","touchGestures",L.Map.TouchGestures),L.Map.mergeOptions({touchRotate:!1}),L.Map.TouchRotate=L.Handler.extend({addHooks:function(){this._map.touchGestures.enable(),this._map.touchGestures.rotate=!0},removeHooks:function(){this._map.touchGestures.rotate=!1}}),L.Map.addInitHook("addHandler","touchRotate",L.Map.TouchRotate),L.Map.mergeOptions({shiftKeyRotate:!0}),L.Map.ShiftKeyRotate=L.Handler.extend({addHooks:function(){L.DomEvent.on(this._map._container,"wheel",this._handleShiftScroll,this),this._map.shiftKeyRotate.rotate=!0},removeHooks:function(){L.DomEvent.off(this._map._container,"wheel",this._handleShiftScroll,this),this._map.shiftKeyRotate.rotate=!1},_handleShiftScroll:function(t){t.shiftKey?(t.preventDefault(),this._map.scrollWheelZoom.disable(),this._map.setBearing(this._map._bearing*L.DomUtil.RAD_TO_DEG+5*Math.sign(t.deltaY))):this._map.scrollWheelZoom.enable()}}),L.Map.addInitHook("addHandler","shiftKeyRotate",L.Map.ShiftKeyRotate),L.Map.addInitHook(function(){this.scrollWheelZoom.enabled()&&this.shiftKeyRotate.enabled()&&(this.scrollWheelZoom.disable(),this.scrollWheelZoom.enable())}),L.Map.mergeOptions({touchZoom:L.Browser.touch,bounceAtZoomLimits:!1}),L.Map.TouchZoom=L.Handler.extend({addHooks:function(){L.DomUtil.addClass(this._map._container,"leaflet-touch-zoom"),this._map.touchGestures.enable(),this._map.touchGestures.zoom=!0},removeHooks:function(){L.DomUtil.removeClass(this._map._container,"leaflet-touch-zoom"),this._map.touchGestures.zoom=!1}}),L.Map.addInitHook("addHandler","touchZoom",L.Map.TouchZoom),L.Control.Rotate=L.Control.extend({options:{position:"topleft",closeOnZeroBearing:!0},onAdd:function(t){var e=this._container=L.DomUtil.create("div","leaflet-control-rotate leaflet-bar"),i=this._arrow=L.DomUtil.create("span","leaflet-control-rotate-arrow");i.style.backgroundImage="url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E\")",i.style.cursor="grab",i.style.display="block",i.style.width="100%",i.style.height="100%",i.style.backgroundRepeat="no-repeat",i.style.backgroundPosition="50%";var n=this._link=L.DomUtil.create("a","leaflet-control-rotate-toggle",e);return n.appendChild(i),n.href="#",n.title="Rotate map",L.DomEvent.on(n,"dblclick",L.DomEvent.stopPropagation).on(n,"mousedown",this._handleMouseDown,this).on(n,"click",L.DomEvent.stop).on(n,"click",this._cycleState,this).on(n,"click",this._refocusOnMap,this),L.Browser.any3d||L.DomUtil.addClass(n,"leaflet-disabled"),this._restyle(),t.on("rotate",this._restyle,this),this._follow=!1,this._canFollow=!1,this.options.closeOnZeroBearing&&0===t.getBearing()&&(e.style.display="none"),e},onRemove:function(t){t.off("rotate",this._restyle,this)},_handleMouseDown:function(t){L.DomEvent.stop(t),this.dragging=!0,this.dragstartX=t.pageX,this.dragstartY=t.pageY,L.DomEvent.on(document,"mousemove",this._handleMouseDrag,this).on(document,"mouseup",this._handleMouseUp,this)},_handleMouseUp:function(t){L.DomEvent.stop(t),this.dragging=!1,L.DomEvent.off(document,"mousemove",this._handleMouseDrag,this).off(document,"mouseup",this._handleMouseUp,this)},_handleMouseDrag:function(t){if(this.dragging){var e=t.clientX-this.dragstartX;this._map.setBearing(e)}},_cycleState:function(t){if(this._map){var e=this._map;e.touchRotate.enabled()||e.compassBearing.enabled()?e.compassBearing.enabled()?(e.compassBearing.disable(),e.setBearing(0),this.options.closeOnZeroBearing&&e.touchRotate.enable()):(e.touchRotate.disable(),(DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission():Promise.resolve("granted")).then(t=>"granted"===t&&e.compassBearing.enable())):e.touchRotate.enable(),this._restyle()}},_restyle:function(){if(this._map.options.rotate){var t=this._map,e=t.getBearing();this._arrow.style.transform="rotate("+e+"deg)",e&&this.options.closeOnZeroBearing&&(this._container.style.display="block"),t.compassBearing.enabled()?this._link.style.backgroundColor="orange":t.touchRotate.enabled()?this._link.style.backgroundColor=null:(this._link.style.backgroundColor="grey",0===e&&this.options.closeOnZeroBearing&&(this._container.style.display="none"))}else L.DomUtil.addClass(this._link,"leaflet-disabled")}}),L.control.rotate=function(t){return new L.Control.Rotate(t)},L.Map.mergeOptions({rotateControl:!0}),L.Map.addInitHook(function(){if(this.options.rotateControl){var t="object"==typeof this.options.rotateControl?this.options.rotateControl:{};this.rotateControl=L.control.rotate(t),this.addControl(this.rotateControl)}})},"function"==typeof define&&define.amd?define(c):c(),(()=>{var t,e,i=Object.create,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,h=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),u=(t,e,n)=>(n=null!=t?i(h(t)):{},((t,e,i,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let s of r(e))!l.call(t,s)&&s!==i&&o(t,s,{get:()=>e[s],enumerable:!(n=a(e,s))||n.enumerable});return t})(!e&&t&&t.__esModule?n:o(n,"default",{value:t,enumerable:!0}),t)),p=c((t,e)=>{e.exports=function(){this.__data__=[],this.size=0}}),d=c((t,e)=>{e.exports=function(t,e){return t===e||t!=t&&e!=e}}),_=c((t,e)=>{var i=d();e.exports=function(t,e){for(var n=t.length;n--;)if(i(t[n][0],e))return n;return-1}}),m=c((t,e)=>{var i=_(),n=Array.prototype.splice;e.exports=function(t){var e=this.__data__,s=i(e,t);return!(s<0)&&(s==e.length-1?e.pop():n.call(e,s,1),--this.size,!0)}}),g=c((t,e)=>{var i=_();e.exports=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]}}),f=c((t,e)=>{var i=_();e.exports=function(t){return i(this.__data__,t)>-1}}),y=c((t,e)=>{var i=_();e.exports=function(t,e){var n=this.__data__,s=i(n,t);return s<0?(++this.size,n.push([t,e])):n[s][1]=e,this}}),A=c((t,e)=>{var i=p(),n=m(),s=g(),o=f(),a=y();function r(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}r.prototype.clear=i,r.prototype.delete=n,r.prototype.get=s,r.prototype.has=o,r.prototype.set=a,e.exports=r}),v=c((t,e)=>{var i=A();e.exports=function(){this.__data__=new i,this.size=0}}),M=c((t,e)=>{e.exports=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}}),x=c((t,e)=>{e.exports=function(t){return this.__data__.get(t)}}),b=c((t,e)=>{e.exports=function(t){return this.__data__.has(t)}}),w=c((t,e)=>{var i="object"==typeof s&&s&&s.Object===Object&&s;e.exports=i}),P=c((t,e)=>{var i=w(),n="object"==typeof self&&self&&self.Object===Object&&self,s=i||n||Function("return this")();e.exports=s}),k=c((t,e)=>{var i=P().Symbol;e.exports=i}),E=c((t,e)=>{var i=k(),n=Object.prototype,s=n.hasOwnProperty,o=n.toString,a=i?i.toStringTag:void 0;e.exports=function(t){var e=s.call(t,a),i=t[a];try{t[a]=void 0;var n=!0}catch{}var r=o.call(t);return n&&(e?t[a]=i:delete t[a]),r}}),C=c((t,e)=>{var i=Object.prototype.toString;e.exports=function(t){return i.call(t)}}),S=c((t,e)=>{var i=k(),n=E(),s=C(),o=i?i.toStringTag:void 0;e.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?n(t):s(t)}}),T=c((t,e)=>{e.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}),O=c((t,e)=>{var i=S(),n=T();e.exports=function(t){if(!n(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}),B=c((t,e)=>{var i=P()["__core-js_shared__"];e.exports=i}),D=c((t,e)=>{var i,n=B(),s=(i=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(t){return!!s&&s in t}}),I=c((t,e)=>{var i=Function.prototype.toString;e.exports=function(t){if(null!=t){try{return i.call(t)}catch{}try{return t+""}catch{}}return""}}),R=c((t,e)=>{var i=O(),n=D(),s=T(),o=I(),a=/^\[object .+?Constructor\]$/,r=Function.prototype,h=Object.prototype,l=r.toString,c=h.hasOwnProperty,u=RegExp("^"+l.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(t){return!(!s(t)||n(t))&&(i(t)?u:a).test(o(t))}}),z=c((t,e)=>{e.exports=function(t,e){return null==t?void 0:t[e]}}),G=c((t,e)=>{var i=R(),n=z();e.exports=function(t,e){var s=n(t,e);return i(s)?s:void 0}}),N=c((t,e)=>{var i=G()(P(),"Map");e.exports=i}),j=c((t,e)=>{var i=G()(Object,"create");e.exports=i}),F=c((t,e)=>{var i=j();e.exports=function(){this.__data__=i?i(null):{},this.size=0}}),U=c((t,e)=>{e.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}}),Z=c((t,e)=>{var i=j(),n=Object.prototype.hasOwnProperty;e.exports=function(t){var e=this.__data__;if(i){var s=e[t];return"__lodash_hash_undefined__"===s?void 0:s}return n.call(e,t)?e[t]:void 0}}),H=c((t,e)=>{var i=j(),n=Object.prototype.hasOwnProperty;e.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:n.call(e,t)}}),q=c((t,e)=>{var i=j();e.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}}),V=c((t,e)=>{var i=F(),n=U(),s=Z(),o=H(),a=q();function r(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}r.prototype.clear=i,r.prototype.delete=n,r.prototype.get=s,r.prototype.has=o,r.prototype.set=a,e.exports=r}),W=c((t,e)=>{var i=V(),n=A(),s=N();e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(s||n),string:new i}}}),K=c((t,e)=>{e.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}}),X=c((t,e)=>{var i=K();e.exports=function(t,e){var n=t.__data__;return i(e)?n["string"==typeof e?"string":"hash"]:n.map}}),Y=c((t,e)=>{var i=X();e.exports=function(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}}),$=c((t,e)=>{var i=X();e.exports=function(t){return i(this,t).get(t)}}),J=c((t,e)=>{var i=X();e.exports=function(t){return i(this,t).has(t)}}),Q=c((t,e)=>{var i=X();e.exports=function(t,e){var n=i(this,t),s=n.size;return n.set(t,e),this.size+=n.size==s?0:1,this}}),tt=c((t,e)=>{var i=W(),n=Y(),s=$(),o=J(),a=Q();function r(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}r.prototype.clear=i,r.prototype.delete=n,r.prototype.get=s,r.prototype.has=o,r.prototype.set=a,e.exports=r}),et=c((t,e)=>{var i=A(),n=N(),s=tt();e.exports=function(t,e){var o=this.__data__;if(o instanceof i){var a=o.__data__;if(!n||a.length<199)return a.push([t,e]),this.size=++o.size,this;o=this.__data__=new s(a)}return o.set(t,e),this.size=o.size,this}}),it=c((t,e)=>{var i=A(),n=v(),s=M(),o=x(),a=b(),r=et();function h(t){var e=this.__data__=new i(t);this.size=e.size}h.prototype.clear=n,h.prototype.delete=s,h.prototype.get=o,h.prototype.has=a,h.prototype.set=r,e.exports=h}),nt=c((t,e)=>{var i=G(),n=function(){try{var t=i(Object,"defineProperty");return t({},"",{}),t}catch{}}();e.exports=n}),st=c((t,e)=>{var i=nt();e.exports=function(t,e,n){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}}),ot=c((t,e)=>{var i=st(),n=d();e.exports=function(t,e,s){(void 0!==s&&!n(t[e],s)||void 0===s&&!(e in t))&&i(t,e,s)}}),at=c((t,e)=>{e.exports=function(t){return function(e,i,n){for(var s=-1,o=Object(e),a=n(e),r=a.length;r--;){var h=a[t?r:++s];if(!1===i(o[h],h,o))break}return e}}}),rt=c((t,e)=>{var i=at()();e.exports=i}),ht=c((t,e)=>{var i=P(),n="object"==typeof t&&t&&!t.nodeType&&t,s=n&&"object"==typeof e&&e&&!e.nodeType&&e,o=s&&s.exports===n?i.Buffer:void 0,a=o?o.allocUnsafe:void 0;e.exports=function(t,e){if(e)return t.slice();var i=t.length,n=a?a(i):new t.constructor(i);return t.copy(n),n}}),lt=c((t,e)=>{var i=P().Uint8Array;e.exports=i}),ct=c((t,e)=>{var i=lt();e.exports=function(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}}),ut=c((t,e)=>{var i=ct();e.exports=function(t,e){var n=e?i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}}),pt=c((t,e)=>{e.exports=function(t,e){var i=-1,n=t.length;for(e||(e=Array(n));++i<n;)e[i]=t[i];return e}}),dt=c((t,e)=>{var i=T(),n=Object.create,s=function(){function t(){}return function(e){if(!i(e))return{};if(n)return n(e);t.prototype=e;var s=new t;return t.prototype=void 0,s}}();e.exports=s}),_t=c((t,e)=>{e.exports=function(t,e){return function(i){return t(e(i))}}}),mt=c((t,e)=>{var i=_t()(Object.getPrototypeOf,Object);e.exports=i}),gt=c((t,e)=>{var i=Object.prototype;e.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}}),ft=c((t,e)=>{var i=dt(),n=mt(),s=gt();e.exports=function(t){return"function"!=typeof t.constructor||s(t)?{}:i(n(t))}}),yt=c((t,e)=>{e.exports=function(t){return null!=t&&"object"==typeof t}}),At=c((t,e)=>{var i=S(),n=yt();e.exports=function(t){return n(t)&&"[object Arguments]"==i(t)}}),vt=c((t,e)=>{var i=At(),n=yt(),s=Object.prototype,o=s.hasOwnProperty,a=s.propertyIsEnumerable,r=i(function(){return arguments}())?i:function(t){return n(t)&&o.call(t,"callee")&&!a.call(t,"callee")};e.exports=r}),Mt=c((t,e)=>{var i=Array.isArray;e.exports=i}),Lt=c((t,e)=>{e.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}),xt=c((t,e)=>{var i=O(),n=Lt();e.exports=function(t){return null!=t&&n(t.length)&&!i(t)}}),bt=c((t,e)=>{var i=xt(),n=yt();e.exports=function(t){return n(t)&&i(t)}}),wt=c((t,e)=>{e.exports=function(){return!1}}),Pt=c((t,e)=>{var i=P(),n=wt(),s="object"==typeof t&&t&&!t.nodeType&&t,o=s&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===s?i.Buffer:void 0,r=(a?a.isBuffer:void 0)||n;e.exports=r}),kt=c((t,e)=>{var i=S(),n=mt(),s=yt(),o=Function.prototype,a=Object.prototype,r=o.toString,h=a.hasOwnProperty,l=r.call(Object);e.exports=function(t){if(!s(t)||"[object Object]"!=i(t))return!1;var e=n(t);if(null===e)return!0;var o=h.call(e,"constructor")&&e.constructor;return"function"==typeof o&&o instanceof o&&r.call(o)==l}}),Et=c((t,e)=>{var i=S(),n=Lt(),s=yt(),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(t){return s(t)&&n(t.length)&&!!o[i(t)]}}),Ct=c((t,e)=>{e.exports=function(t){return function(e){return t(e)}}}),St=c((t,e)=>{var i=w(),n="object"==typeof t&&t&&!t.nodeType&&t,s=n&&"object"==typeof e&&e&&!e.nodeType&&e,o=s&&s.exports===n&&i.process,a=function(){try{return s&&s.require&&s.require("util").types||o&&o.binding&&o.binding("util")}catch{}}();e.exports=a}),Tt=c((t,e)=>{var i=Et(),n=Ct(),s=St(),o=s&&s.isTypedArray,a=o?n(o):i;e.exports=a}),Ot=c((t,e)=>{e.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}}),Bt=c((t,e)=>{var i=st(),n=d(),s=Object.prototype.hasOwnProperty;e.exports=function(t,e,o){var a=t[e];(!s.call(t,e)||!n(a,o)||void 0===o&&!(e in t))&&i(t,e,o)}}),Dt=c((t,e)=>{var i=Bt(),n=st();e.exports=function(t,e,s,o){var a=!s;s||(s={});for(var r=-1,h=e.length;++r<h;){var l=e[r],c=o?o(s[l],t[l],l,s,t):void 0;void 0===c&&(c=t[l]),a?n(s,l,c):i(s,l,c)}return s}}),It=c((t,e)=>{e.exports=function(t,e){for(var i=-1,n=Array(t);++i<t;)n[i]=e(i);return n}}),Rt=c((t,e)=>{var i=/^(?:0|[1-9]\d*)$/;e.exports=function(t,e){var n=typeof t;return!!(e=e??9007199254740991)&&("number"==n||"symbol"!=n&&i.test(t))&&t>-1&&t%1==0&&t<e}}),zt=c((t,e)=>{var i=It(),n=vt(),s=Mt(),o=Pt(),a=Rt(),r=Tt(),h=Object.prototype.hasOwnProperty;e.exports=function(t,e){var l=s(t),c=!l&&n(t),u=!l&&!c&&o(t),p=!l&&!c&&!u&&r(t),d=l||c||u||p,_=d?i(t.length,String):[],m=_.length;for(var g in t)(e||h.call(t,g))&&(!d||!("length"==g||u&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m)))&&_.push(g);return _}}),Gt=c((t,e)=>{e.exports=function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e}}),Nt=c((t,e)=>{var i=T(),n=gt(),s=Gt(),o=Object.prototype.hasOwnProperty;e.exports=function(t){if(!i(t))return s(t);var e=n(t),a=[];for(var r in t)"constructor"==r&&(e||!o.call(t,r))||a.push(r);return a}}),jt=c((t,e)=>{var i=zt(),n=Nt(),s=xt();e.exports=function(t){return s(t)?i(t,!0):n(t)}}),Ft=c((t,e)=>{var i=Dt(),n=jt();e.exports=function(t){return i(t,n(t))}}),Ut=c((t,e)=>{var i=ot(),n=ht(),s=ut(),o=pt(),a=ft(),r=vt(),h=Mt(),l=bt(),c=Pt(),u=O(),p=T(),d=kt(),_=Tt(),m=Ot(),g=Ft();e.exports=function(t,e,f,y,A,v,M){var L=m(t,f),x=m(e,f),b=M.get(x);if(b)i(t,f,b);else{var w=v?v(L,x,f+"",t,e,M):void 0,P=void 0===w;if(P){var k=h(x),E=!k&&c(x),C=!k&&!E&&_(x);w=x,k||E||C?h(L)?w=L:l(L)?w=o(L):E?(P=!1,w=n(x,!0)):C?(P=!1,w=s(x,!0)):w=[]:d(x)||r(x)?(w=L,r(L)?w=g(L):(!p(L)||u(L))&&(w=a(x))):P=!1}P&&(M.set(x,w),A(w,x,y,v,M),M.delete(x)),i(t,f,w)}}}),Zt=c((t,e)=>{var i=it(),n=ot(),s=rt(),o=Ut(),a=T(),r=jt(),h=Ot();e.exports=function t(e,l,c,u,p){e!==l&&s(l,function(s,r){if(p||(p=new i),a(s))o(e,l,r,c,t,u,p);else{var d=u?u(h(e,r),s,r+"",e,l,p):void 0;void 0===d&&(d=s),n(e,r,d)}},r)}}),Ht=c((t,e)=>{e.exports=function(t){return t}}),qt=c((t,e)=>{e.exports=function(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}}),Vt=c((t,e)=>{var i=qt(),n=Math.max;e.exports=function(t,e,s){return e=n(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,r=n(o.length-e,0),h=Array(r);++a<r;)h[a]=o[e+a];a=-1;for(var l=Array(e+1);++a<e;)l[a]=o[a];return l[e]=s(h),i(t,this,l)}}}),Wt=c((t,e)=>{e.exports=function(t){return function(){return t}}}),Kt=c((t,e)=>{var i=Wt(),n=nt(),s=Ht(),o=n?function(t,e){return n(t,"toString",{configurable:!0,enumerable:!1,value:i(e),writable:!0})}:s;e.exports=o}),Xt=c((t,e)=>{var i=Date.now;e.exports=function(t){var e=0,n=0;return function(){var s=i(),o=16-(s-n);if(n=s,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}}),Yt=c((t,e)=>{var i=Kt(),n=Xt()(i);e.exports=n}),$t=c((t,e)=>{var i=Ht(),n=Vt(),s=Yt();e.exports=function(t,e){return s(n(t,e,i),t+"")}}),Jt=c((t,e)=>{var i=d(),n=xt(),s=Rt(),o=T();e.exports=function(t,e,a){if(!o(a))return!1;var r=typeof e;return!!("number"==r?n(a)&&s(e,a.length):"string"==r&&e in a)&&i(a[e],t)}}),Qt=c((t,e)=>{var i=$t(),n=Jt();e.exports=function(t){return i(function(e,i){var s=-1,o=i.length,a=o>1?i[o-1]:void 0,r=o>2?i[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,r&&n(i[0],i[1],r)&&(a=o<3?void 0:a,o=1),e=Object(e);++s<o;){var h=i[s];h&&t(e,h,s,a)}return e})}}),te=c((t,e)=>{var i=Zt(),n=Qt()(function(t,e,n){i(t,e,n)});e.exports=n}),ee=c((t,e)=>{var i=S(),n=yt();e.exports=function(t){return"symbol"==typeof t||n(t)&&"[object Symbol]"==i(t)}}),ie=c((t,e)=>{var i=Mt(),n=ee(),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(t,e){if(i(t))return!1;var a=typeof t;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=t&&!n(t))||(o.test(t)||!s.test(t)||null!=e&&t in Object(e))}}),ne=c((t,e)=>{var i=tt();function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var s=function(){var i=arguments,n=e?e.apply(this,i):i[0],o=s.cache;if(o.has(n))return o.get(n);var a=t.apply(this,i);return s.cache=o.set(n,a)||o,a};return s.cache=new(n.Cache||i),s}n.Cache=i,e.exports=n}),se=c((t,e)=>{var i=ne();e.exports=function(t){var e=i(t,function(t){return 500===n.size&&n.clear(),t}),n=e.cache;return e}}),oe=c((t,e)=>{var i=se(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,o=i(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(n,function(t,i,n,o){e.push(n?o.replace(s,"$1"):i||t)}),e});e.exports=o}),ae=c((t,e)=>{e.exports=function(t,e){for(var i=-1,n=null==t?0:t.length,s=Array(n);++i<n;)s[i]=e(t[i],i,t);return s}}),re=c((t,e)=>{var i=k(),n=ae(),s=Mt(),o=ee(),a=i?i.prototype:void 0,r=a?a.toString:void 0;e.exports=function t(e){if("string"==typeof e)return e;if(s(e))return n(e,t)+"";if(o(e))return r?r.call(e):"";var i=e+"";return"0"==i&&1/e==-1/0?"-0":i}}),he=c((t,e)=>{var i=re();e.exports=function(t){return null==t?"":i(t)}}),le=c((t,e)=>{var i=Mt(),n=ie(),s=oe(),o=he();e.exports=function(t,e){return i(t)?t:n(t,e)?[t]:s(o(t))}}),ce=c((t,e)=>{var i=ee();e.exports=function(t){if("string"==typeof t||i(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}}),ue=c((t,e)=>{var i=le(),n=ce();e.exports=function(t,e){for(var s=0,o=(e=i(e,t)).length;null!=t&&s<o;)t=t[n(e[s++])];return s&&s==o?t:void 0}}),pe=c((t,e)=>{var i=ue();e.exports=function(t,e,n){var s=null==t?void 0:i(t,e);return void 0===s?n:s}}),de=c((t,e)=>{var i,n;i=t,n=function(){function t(t,n,s,o,a){!function t(i,n,s,o,a){for(;o>s;){if(o-s>600){var r=o-s+1,h=n-s+1,l=Math.log(r),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(r-c)/r)*(h-r/2<0?-1:1);t(i,n,Math.max(s,Math.floor(n-h*c/r+u)),Math.min(o,Math.floor(n+(r-h)*c/r+u)),a)}var p=i[n],d=s,_=o;for(e(i,s,n),a(i[o],p)>0&&e(i,s,o);d<_;){for(e(i,d,_),d++,_--;a(i[d],p)<0;)d++;for(;a(i[_],p)>0;)_--}0===a(i[s],p)?e(i,s,_):e(i,++_,o),_<=n&&(s=_+1),n<=_&&(o=_-1)}}(t,n,s||0,o||t.length-1,a||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function s(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function o(t,e){a(t,0,t.children.length,e,t)}function a(t,e,i,n,s){s||(s=_(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(var o=e;o<i;o++){var a=t.children[o];r(s,t.leaf?n(a):a)}return s}function r(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function h(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function d(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function _(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(e,i,n,s,o){for(var a=[i,n];a.length;)if(!((n=a.pop())-(i=a.pop())<=s)){var r=i+Math.ceil((n-i)/s/2)*s;t(e,r,i,n,o),a.push(i,r,r,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!d(t,e))return i;for(var n=this.toBBox,s=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],r=e.leaf?n(a):a;d(t,r)&&(e.leaf?i.push(a):p(t,r)?this._all(a,i):s.push(a))}e=s.pop()}return i},n.prototype.collides=function(t){var e=this.data;if(!d(t,e))return!1;for(var i=[];e;){for(var n=0;n<e.children.length;n++){var s=e.children[n],o=e.leaf?this.toBBox(s):s;if(d(t,o)){if(e.leaf||p(t,o))return!0;i.push(s)}}e=i.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=_([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var i,n,o,a=this.data,r=this.toBBox(t),h=[],l=[];a||h.length;){if(a||(a=h.pop(),n=h[h.length-1],i=l.pop(),o=!0),a.leaf){var c=s(t,a.children,e);if(-1!==c)return a.children.splice(c,1),h.push(a),this._condense(h),this}o||a.leaf||!p(a,r)?n?(i++,a=n.children[i],o=!1):a=null:(h.push(a),l.push(i),i=0,n=a,a=a.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},n.prototype._build=function(t,e,i,n){var s,a=i-e+1,r=this._maxEntries;if(a<=r)return o(s=_(t.slice(e,i+1)),this.toBBox),s;n||(n=Math.ceil(Math.log(a)/Math.log(r)),r=Math.ceil(a/Math.pow(r,n-1))),(s=_([])).leaf=!1,s.height=n;var h=Math.ceil(a/r),l=h*Math.ceil(Math.sqrt(r));m(t,e,i,l,this.compareMinX);for(var c=e;c<=i;c+=l){var u=Math.min(c+l-1,i);m(t,c,u,h,this.compareMinY);for(var p=c;p<=u;p+=h){var d=Math.min(p+h-1,u);s.children.push(this._build(t,p,d,n-1))}}return o(s,this.toBBox),s},n.prototype._chooseSubtree=function(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){for(var s=1/0,o=1/0,a=void 0,r=0;r<e.children.length;r++){var h=e.children[r],l=c(h),u=(p=t,d=h,(Math.max(d.maxX,p.maxX)-Math.min(d.minX,p.minX))*(Math.max(d.maxY,p.maxY)-Math.min(d.minY,p.minY))-l);u<o?(o=u,s=l<s?l:s,a=h):u===o&&l<s&&(s=l,a=h)}e=a||e.children[0]}var p,d;return e},n.prototype._insert=function(t,e,i){var n=i?t:this.toBBox(t),s=[],o=this._chooseSubtree(n,this.data,e,s);for(o.children.push(t),r(o,n);e>=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(n,s,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var a=this._chooseSplitIndex(i,s,n),r=_(i.children.splice(a,i.children.length-a));r.height=i.height,r.leaf=i.leaf,o(i,this.toBBox),o(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(i,r)},n.prototype._splitRoot=function(t,e){this.data=_([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,s,o,r,h,l,u,p=1/0,d=1/0,_=e;_<=i-e;_++){var m=a(t,0,_,this.toBBox),g=a(t,_,i,this.toBBox),f=(s=m,o=g,r=Math.max(s.minX,o.minX),h=Math.max(s.minY,o.minY),l=Math.min(s.maxX,o.maxX),u=Math.min(s.maxY,o.maxY),Math.max(0,l-r)*Math.max(0,u-h)),y=c(m)+c(g);f<p?(p=f,n=_,d=y<d?y:d):f===p&&y<d&&(d=y,n=_)}return n||i-e},n.prototype._chooseSplitAxis=function(t,e,i){var n=t.leaf?this.compareMinX:h,s=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,s)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,i,n){t.children.sort(n);for(var s=this.toBBox,o=a(t,0,e,s),h=a(t,i-e,i,s),l=u(o)+u(h),c=e;c<i-e;c++){var p=t.children[c];r(o,t.leaf?s(p):p),l+=u(o)}for(var d=i-e-1;d>=e;d--){var _=t.children[d];r(h,t.leaf?s(_):_),l+=u(h)}return l},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)r(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},n},"object"==typeof t&&typeof e<"u"?e.exports=n():(i=i||self).RBush=n()}),_e=c(t=>{function e(t,e,i){void 0===i&&(i={});var n={type:"Feature"};return(0===i.id||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=e||{},n.geometry=t,n}function i(t,i,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(t[0])||!p(t[1]))throw new Error("coordinates must contain numbers");return e({type:"Point",coordinates:t},i,n)}function n(t,i,n){void 0===n&&(n={});for(var s=0,o=t;s<o.length;s++){var a=o[s];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var r=0;r<a[a.length-1].length;r++)if(a[a.length-1][r]!==a[0][r])throw new Error("First and last Position are not equivalent.")}return e({type:"Polygon",coordinates:t},i,n)}function s(t,i,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return e({type:"LineString",coordinates:t},i,n)}function o(t,e){void 0===e&&(e={});var i={type:"FeatureCollection"};return e.id&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.features=t,i}function a(t,i,n){return void 0===n&&(n={}),e({type:"MultiLineString",coordinates:t},i,n)}function r(t,i,n){return void 0===n&&(n={}),e({type:"MultiPoint",coordinates:t},i,n)}function h(t,i,n){return void 0===n&&(n={}),e({type:"MultiPolygon",coordinates:t},i,n)}function l(e,i){void 0===i&&(i="kilometers");var n=t.factors[i];if(!n)throw new Error(i+" units is invalid");return e*n}function c(e,i){void 0===i&&(i="kilometers");var n=t.factors[i];if(!n)throw new Error(i+" units is invalid");return e/n}function u(t){return 180*(t%(2*Math.PI))/Math.PI}function p(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.earthRadius=6371008.8,t.factors={centimeters:100*t.earthRadius,centimetres:100*t.earthRadius,degrees:t.earthRadius/111325,feet:3.28084*t.earthRadius,inches:39.37*t.earthRadius,kilometers:t.earthRadius/1e3,kilometres:t.earthRadius/1e3,meters:t.earthRadius,metres:t.earthRadius,miles:t.earthRadius/1609.344,millimeters:1e3*t.earthRadius,millimetres:1e3*t.earthRadius,nauticalmiles:t.earthRadius/1852,radians:1,yards:1.0936*t.earthRadius},t.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/t.earthRadius,yards:1.0936133},t.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},t.feature=e,t.geometry=function(t,e,o){switch(t){case"Point":return i(e).geometry;case"LineString":return s(e).geometry;case"Polygon":return n(e).geometry;case"MultiPoint":return r(e).geometry;case"MultiLineString":return a(e).geometry;case"MultiPolygon":return h(e).geometry;default:throw new Error(t+" is invalid")}},t.point=i,t.points=function(t,e,n){return void 0===n&&(n={}),o(t.map(function(t){return i(t,e)}),n)},t.polygon=n,t.polygons=function(t,e,i){return void 0===i&&(i={}),o(t.map(function(t){return n(t,e)}),i)},t.lineString=s,t.lineStrings=function(t,e,i){return void 0===i&&(i={}),o(t.map(function(t){return s(t,e)}),i)},t.featureCollection=o,t.multiLineString=a,t.multiPoint=r,t.multiPolygon=h,t.geometryCollection=function(t,i,n){return void 0===n&&(n={}),e({type:"GeometryCollection",geometries:t},i,n)},t.round=function(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var i=Math.pow(10,e||0);return Math.round(t*i)/i},t.radiansToLength=l,t.lengthToRadians=c,t.lengthToDegrees=function(t,e){return u(c(t,e))},t.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},t.radiansToDegrees=u,t.degreesToRadians=function(t){return t%360*Math.PI/180},t.convertLength=function(t,e,i){if(void 0===e&&(e="kilometers"),void 0===i&&(i="kilometers"),!(t>=0))throw new Error("length must be a positive number");return l(c(t,e),i)},t.convertArea=function(e,i,n){if(void 0===i&&(i="meters"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("area must be a positive number");var s=t.areaFactors[i];if(!s)throw new Error("invalid original units");var o=t.areaFactors[n];if(!o)throw new Error("invalid final units");return e/s*o},t.isNumber=p,t.isObject=function(t){return!!t&&t.constructor===Object},t.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!p(t))throw new Error("bbox must only contain numbers")})},t.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}}),me=c(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=_e();function i(t,e,n){if(null!==t)for(var s,o,a,r,h,l,c,u,p=0,d=0,_=t.type,m="FeatureCollection"===_,g="Feature"===_,f=m?t.features.length:1,y=0;y<f;y++){h=(u=!!(c=m?t.features[y].geometry:g?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var A=0;A<h;A++){var v=0,M=0;if(null!==(r=u?c.geometries[A]:c)){l=r.coordinates;var L=r.type;switch(p=!n||"Polygon"!==L&&"MultiPolygon"!==L?0:1,L){case null:break;case"Point":if(!1===e(l,d,y,v,M))return!1;d++,v++;break;case"LineString":case"MultiPoint":for(s=0;s<l.length;s++){if(!1===e(l[s],d,y,v,M))return!1;d++,"MultiPoint"===L&&v++}"LineString"===L&&v++;break;case"Polygon":case"MultiLineString":for(s=0;s<l.length;s++){for(o=0;o<l[s].length-p;o++){if(!1===e(l[s][o],d,y,v,M))return!1;d++}"MultiLineString"===L&&v++,"Polygon"===L&&M++}"Polygon"===L&&v++;break;case"MultiPolygon":for(s=0;s<l.length;s++){for(M=0,o=0;o<l[s].length;o++){for(a=0;a<l[s][o].length-p;a++){if(!1===e(l[s][o][a],d,y,v,M))return!1;d++}M++}v++}break;case"GeometryCollection":for(s=0;s<r.geometries.length;s++)if(!1===i(r.geometries[s],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function n(t,e){var i;switch(t.type){case"FeatureCollection":for(i=0;i<t.features.length&&!1!==e(t.features[i].properties,i);i++);break;case"Feature":e(t.properties,0)}}function s(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var i=0;i<t.features.length&&!1!==e(t.features[i],i);i++);}function o(t,e){var i,n,s,o,a,r,h,l,c,u,p=0,d="FeatureCollection"===t.type,_="Feature"===t.type,m=d?t.features.length:1;for(i=0;i<m;i++){for(r=d?t.features[i].geometry:_?t.geometry:t,l=d?t.features[i].properties:_?t.properties:{},c=d?t.features[i].bbox:_?t.bbox:void 0,u=d?t.features[i].id:_?t.id:void 0,a=(h=!!r&&"GeometryCollection"===r.type)?r.geometries.length:1,s=0;s<a;s++)if(null!==(o=h?r.geometries[s]:r))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,p,l,c,u))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===e(o.geometries[n],p,l,c,u))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,l,c,u))return!1;p++}}function a(t,i){o(t,function(t,n,s,o,a){var r,h=null===t?null:t.type;switch(h){case null:case"Point":case"LineString":case"Polygon":return!1!==i(e.feature(t,s,{bbox:o,id:a}),n,0)&&void 0}switch(h){case"MultiPoint":r="Point";break;case"MultiLineString":r="LineString";break;case"MultiPolygon":r="Polygon"}for(var l=0;l<t.coordinates.length;l++){var c={type:r,coordinates:t.coordinates[l]};if(!1===i(e.feature(c,s),n,l))return!1}})}function r(t,n){a(t,function(t,s,o){var a=0;if(t.geometry){var r=t.geometry.type;if("Point"!==r&&"MultiPoint"!==r){var h,l=0,c=0,u=0;if(!1===i(t,function(i,r,p,d,_){if(void 0===h||s>l||d>c||_>u)return h=i,l=s,c=d,u=_,void(a=0);var m=e.lineString([h,i],t.properties);if(!1===n(m,s,o,_,a))return!1;a++,h=i}))return!1}}})}function h(t,i){if(!t)throw new Error("geojson is required");a(t,function(t,n,s){if(null!==t.geometry){var o=t.geometry.type,a=t.geometry.coordinates;switch(o){case"LineString":if(!1===i(t,n,s,0,0))return!1;break;case"Polygon":for(var r=0;r<a.length;r++)if(!1===i(e.lineString(a[r],t.properties),n,s,r))return!1}}})}t.coordAll=function(t){var e=[];return i(t,function(t){e.push(t)}),e},t.coordEach=i,t.coordReduce=function(t,e,n,s){var o=n;return i(t,function(t,i,s,a,r){o=0===i&&void 0===n?t:e(o,t,i,s,a,r)},s),o},t.featureEach=s,t.featureReduce=function(t,e,i){var n=i;return s(t,function(t,s){n=0===s&&void 0===i?t:e(n,t,s)}),n},t.findPoint=function(t,i){if(i=i||{},!e.isObject(i))throw new Error("options is invalid");var n,s=i.featureIndex||0,o=i.multiFeatureIndex||0,a=i.geometryIndex||0,r=i.coordIndex||0,h=i.properties;switch(t.type){case"FeatureCollection":s<0&&(s=t.features.length+s),h=h||t.features[s].properties,n=t.features[s].geometry;break;case"Feature":h=h||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":return e.point(l,h,i);case"MultiPoint":return o<0&&(o=l.length+o),e.point(l[o],h,i);case"LineString":return r<0&&(r=l.length+r),e.point(l[r],h,i);case"Polygon":return a<0&&(a=l.length+a),r<0&&(r=l[a].length+r),e.point(l[a][r],h,i);case"MultiLineString":return o<0&&(o=l.length+o),r<0&&(r=l[o].length+r),e.point(l[o][r],h,i);case"MultiPolygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),r<0&&(r=l[o][a].length-r),e.point(l[o][a][r],h,i)}throw new Error("geojson is invalid")},t.findSegment=function(t,i){if(i=i||{},!e.isObject(i))throw new Error("options is invalid");var n,s=i.featureIndex||0,o=i.multiFeatureIndex||0,a=i.geometryIndex||0,r=i.segmentIndex||0,h=i.properties;switch(t.type){case"FeatureCollection":s<0&&(s=t.features.length+s),h=h||t.features[s].properties,n=t.features[s].geometry;break;case"Feature":h=h||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return r<0&&(r=l.length+r-1),e.lineString([l[r],l[r+1]],h,i);case"Polygon":return a<0&&(a=l.length+a),r<0&&(r=l[a].length+r-1),e.lineString([l[a][r],l[a][r+1]],h,i);case"MultiLineString":return o<0&&(o=l.length+o),r<0&&(r=l[o].length+r-1),e.lineString([l[o][r],l[o][r+1]],h,i);case"MultiPolygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),r<0&&(r=l[o][a].length-r-1),e.lineString([l[o][a][r],l[o][a][r+1]],h,i)}throw new Error("geojson is invalid")},t.flattenEach=a,t.flattenReduce=function(t,e,i){var n=i;return a(t,function(t,s,o){n=0===s&&0===o&&void 0===i?t:e(n,t,s,o)}),n},t.geomEach=o,t.geomReduce=function(t,e,i){var n=i;return o(t,function(t,s,o,a,r){n=0===s&&void 0===i?t:e(n,t,s,o,a,r)}),n},t.lineEach=h,t.lineReduce=function(t,e,i){var n=i;return h(t,function(t,s,o,a){n=0===s&&void 0===i?t:e(n,t,s,o,a)}),n},t.propEach=n,t.propReduce=function(t,e,i){var s=i;return n(t,function(t,n){s=0===n&&void 0===i?t:e(s,t,n)}),s},t.segmentEach=r,t.segmentReduce=function(t,e,i){var n=i,s=!1;return r(t,function(t,o,a,r,h){n=!1===s&&void 0===i?t:e(n,t,o,a,r,h),s=!0}),n}}),ge=c(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=me();function i(t){var i=[1/0,1/0,-1/0,-1/0];return e.coordEach(t,function(t){i[0]>t[0]&&(i[0]=t[0]),i[1]>t[1]&&(i[1]=t[1]),i[2]<t[0]&&(i[2]=t[0]),i[3]<t[1]&&(i[3]=t[1])}),i}i.default=i,t.default=i}),fe=c((t,e)=>{var i=de(),n=_e(),s=me(),o=ge().default,a=s.featureEach;s.coordEach,n.polygon;var r=n.featureCollection;function h(t){var e=new i(t);return e.insert=function(t){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:o(t),i.prototype.insert.call(this,t)},e.load=function(t){var e=[];return Array.isArray(t)?t.forEach(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:o(t),e.push(t)}):a(t,function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:o(t),e.push(t)}),i.prototype.load.call(this,e)},e.remove=function(t,e){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:o(t),i.prototype.remove.call(this,t,e)},e.clear=function(){return i.prototype.clear.call(this)},e.search=function(t){var e=i.prototype.search.call(this,this.toBBox(t));return r(e)},e.collides=function(t){return i.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=i.prototype.all.call(this);return r(t)},e.toJSON=function(){return i.prototype.toJSON.call(this)},e.fromJSON=function(t){return i.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var e;if(t.bbox)e=t.bbox;else if(Array.isArray(t)&&4===t.length)e=t;else if(Array.isArray(t)&&6===t.length)e=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)e=o(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=o(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}e.exports=h,e.exports.default=h});Array.prototype.findIndex=Array.prototype.findIndex||function(t){if(null===this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof t)throw new TypeError("callback must be a function");for(var e=Object(this),i=e.length>>>0,n=arguments[1],s=0;s<i;s++)if(t.call(n,e[s],s,e))return s;return-1},Array.prototype.find=Array.prototype.find||function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("callback must be a function");for(var e=Object(this),i=e.length>>>0,n=arguments[1],s=0;s<i;s++){var o=e[s];if(t.call(n,o,s,e))return o}},"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");t=Object(t);for(var e=1;e<arguments.length;e++){var i=arguments[e];if(null!=i)for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}),[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach(function(t){t.hasOwnProperty("remove")||Object.defineProperty(t,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var i=Object(this),n=i.length>>>0;if(0===n)return!1;var s=0|e,o=Math.max(s>=0?s:n-Math.abs(s),0);function a(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}for(;o<n;){if(a(i[o],t))return!0;o++}return!1}});var ye=u(te()),Ae={tooltips:{placeMarker:"Clique para colocar marcador",firstVertex:"Clique para colocar primeiro vértice",continueLine:"Clique para continuar a desenhar",finishLine:"Clique num marcador existente para terminar",finishPoly:"Clique no primeiro marcador para terminar",finishRect:"Clique para terminar",startCircle:"Clique para colocar o centro do círculo",finishCircle:"Clique para terminar o círculo",placeCircleMarker:"Clique para colocar marcador de círculo",placeText:"Clique para colocar texto"},actions:{finish:"Terminar",cancel:"Cancelar",removeLastVertex:"Remover Último Vértice"},buttonTitles:{drawMarkerButton:"Desenhar Marcador",drawPolyButton:"Desenhar Polígonos",drawLineButton:"Desenhar Polilinha",drawCircleButton:"Desenhar Círculo",drawRectButton:"Desenhar Retângulo",editButton:"Editar Camadas",dragButton:"Arrastar Camadas",cutButton:"Cortar Camadas",deleteButton:"Remover Camadas",drawCircleMarkerButton:"Desenhar Marcador de Círculo",snappingButton:"Ajustar marcador arrastado a outras camadas e vértices",pinningButton:"Unir vértices partilhados",rotateButton:"Rodar Camadas",drawTextButton:"Desenhar Texto",scaleButton:"Escalar Camadas",autoTracingButton:"Traçado Automático de Linha"},measurements:{totalLength:"Comprimento",segmentLength:"Comprimento do Segmento",area:"Área",radius:"Raio",perimeter:"Perímetro",height:"Altura",width:"Largura",coordinates:"Posição",coordinatesMarker:"Marcador de Posição"}},ve={en:{tooltips:{placeMarker:"Click to place marker",firstVertex:"Click to place first vertex",continueLine:"Click to continue drawing",finishLine:"Click any existing marker to finish",finishPoly:"Click first marker to finish",finishRect:"Click to finish",startCircle:"Click to place circle center",finishCircle:"Click to finish circle",placeCircleMarker:"Click to place circle marker",placeText:"Click to place text",selectFirstLayerFor:"Select first layer for {action}",selectSecondLayerFor:"Select second layer for {action}"},actions:{finish:"Finish",cancel:"Cancel",removeLastVertex:"Remove Last Vertex"},buttonTitles:{drawMarkerButton:"Draw Marker",drawPolyButton:"Draw Polygons",drawLineButton:"Draw Polyline",drawCircleButton:"Draw Circle",drawRectButton:"Draw Rectangle",editButton:"Edit Layers",dragButton:"Drag Layers",cutButton:"Cut Layers",deleteButton:"Remove Layers",drawCircleMarkerButton:"Draw Circle Marker",snappingButton:"Snap dragged marker to other layers and vertices",pinningButton:"Pin shared vertices together",rotateButton:"Rotate Layers",drawTextButton:"Draw Text",scaleButton:"Scale Layers",autoTracingButton:"Auto trace Line",snapGuidesButton:"Show SnapGuides",unionButton:"Union layers",differenceButton:"Subtract layers"},measurements:{totalLength:"Length",segmentLength:"Segment length",area:"Area",radius:"Radius",perimeter:"Perimeter",height:"Height",width:"Width",coordinates:"Position",coordinatesMarker:"Position Marker"}},de:{tooltips:{placeMarker:"Platziere den Marker mit Klick",firstVertex:"Platziere den ersten Marker mit Klick",continueLine:"Klicke, um weiter zu zeichnen",finishLine:"Beende mit Klick auf existierenden Marker",finishPoly:"Beende mit Klick auf ersten Marker",finishRect:"Beende mit Klick",startCircle:"Platziere das Kreiszentrum mit Klick",finishCircle:"Beende den Kreis mit Klick",placeCircleMarker:"Platziere den Kreismarker mit Klick",placeText:"Platziere den Text mit Klick"},actions:{finish:"Beenden",cancel:"Abbrechen",removeLastVertex:"Letzten Vertex löschen"},buttonTitles:{drawMarkerButton:"Marker zeichnen",drawPolyButton:"Polygon zeichnen",drawLineButton:"Polyline zeichnen",drawCircleButton:"Kreis zeichnen",drawRectButton:"Rechteck zeichnen",editButton:"Layer editieren",dragButton:"Layer bewegen",cutButton:"Layer schneiden",deleteButton:"Layer löschen",drawCircleMarkerButton:"Kreismarker zeichnen",snappingButton:"Bewegter Layer an andere Layer oder Vertexe einhacken",pinningButton:"Vertexe an der gleichen Position verknüpfen",rotateButton:"Layer drehen",drawTextButton:"Text zeichnen",scaleButton:"Layer skalieren",autoTracingButton:"Linie automatisch nachzeichen"},measurements:{totalLength:"Länge",segmentLength:"Segment Länge",area:"Fläche",radius:"Radius",perimeter:"Umfang",height:"Höhe",width:"Breite",coordinates:"Position",coordinatesMarker:"Position Marker"}},it:{tooltips:{placeMarker:"Clicca per posizionare un Marker",firstVertex:"Clicca per posizionare il primo vertice",continueLine:"Clicca per continuare a disegnare",finishLine:"Clicca qualsiasi marker esistente per terminare",finishPoly:"Clicca il primo marker per terminare",finishRect:"Clicca per terminare",startCircle:"Clicca per posizionare il punto centrale del cerchio",finishCircle:"Clicca per terminare il cerchio",placeCircleMarker:"Clicca per posizionare un Marker del cherchio"},actions:{finish:"Termina",cancel:"Annulla",removeLastVertex:"Rimuovi l'ultimo vertice"},buttonTitles:{drawMarkerButton:"Disegna Marker",drawPolyButton:"Disegna Poligoni",drawLineButton:"Disegna Polilinea",drawCircleButton:"Disegna Cerchio",drawRectButton:"Disegna Rettangolo",editButton:"Modifica Livelli",dragButton:"Sposta Livelli",cutButton:"Ritaglia Livelli",deleteButton:"Elimina Livelli",drawCircleMarkerButton:"Disegna Marker del Cerchio",snappingButton:"Snap ha trascinato il pennarello su altri strati e vertici",pinningButton:"Pin condiviso vertici insieme",rotateButton:"Ruota livello"}},id:{tooltips:{placeMarker:"Klik untuk menempatkan marker",firstVertex:"Klik untuk menempatkan vertex pertama",continueLine:"Klik untuk meneruskan digitasi",finishLine:"Klik pada sembarang marker yang ada untuk mengakhiri",finishPoly:"Klik marker pertama untuk mengakhiri",finishRect:"Klik untuk mengakhiri",startCircle:"Klik untuk menempatkan titik pusat lingkaran",finishCircle:"Klik untuk mengakhiri lingkaran",placeCircleMarker:"Klik untuk menempatkan penanda lingkarann"},actions:{finish:"Selesai",cancel:"Batal",removeLastVertex:"Hilangkan Vertex Terakhir"},buttonTitles:{drawMarkerButton:"Digitasi Marker",drawPolyButton:"Digitasi Polygon",drawLineButton:"Digitasi Polyline",drawCircleButton:"Digitasi Lingkaran",drawRectButton:"Digitasi Segi Empat",editButton:"Edit Layer",dragButton:"Geser Layer",cutButton:"Potong Layer",deleteButton:"Hilangkan Layer",drawCircleMarkerButton:"Digitasi Penanda Lingkaran",snappingButton:"Jepretkan penanda yang ditarik ke lapisan dan simpul lain",pinningButton:"Sematkan simpul bersama bersama",rotateButton:"Putar lapisan"}},ro:{tooltips:{placeMarker:"Adaugă un punct",firstVertex:"Apasă aici pentru a adăuga primul Vertex",continueLine:"Apasă aici pentru a continua desenul",finishLine:"Apasă pe orice obiect pentru a finisa desenul",finishPoly:"Apasă pe primul obiect pentru a finisa",finishRect:"Apasă pentru a finisa",startCircle:"Apasă pentru a desena un cerc",finishCircle:"Apasă pentru a finisa un cerc",placeCircleMarker:"Adaugă un punct"},actions:{finish:"Termină",cancel:"Anulează",removeLastVertex:"Șterge ultimul Vertex"},buttonTitles:{drawMarkerButton:"Adaugă o bulină",drawPolyButton:"Desenează un poligon",drawLineButton:"Desenează o linie",drawCircleButton:"Desenează un cerc",drawRectButton:"Desenează un dreptunghi",editButton:"Editează straturile",dragButton:"Mută straturile",cutButton:"Taie straturile",deleteButton:"Șterge straturile",drawCircleMarkerButton:"Desenează marcatorul cercului",snappingButton:"Fixați marcatorul glisat pe alte straturi și vârfuri",pinningButton:"Fixați vârfurile partajate împreună",rotateButton:"Rotiți stratul"}},ru:{tooltips:{placeMarker:"Нажмите, чтобы нанести маркер",firstVertex:"Нажмите, чтобы нанести первый объект",continueLine:"Нажмите, чтобы продолжить рисование",finishLine:"Нажмите любой существующий маркер для завершения",finishPoly:"Выберите первую точку, чтобы закончить",finishRect:"Нажмите, чтобы закончить",startCircle:"Нажмите, чтобы добавить центр круга",finishCircle:"Нажмите, чтобы задать радиус",placeCircleMarker:"Нажмите, чтобы нанести круговой маркер"},actions:{finish:"Завершить",cancel:"Отменить",removeLastVertex:"Отменить последнее действие"},buttonTitles:{drawMarkerButton:"Добавить маркер",drawPolyButton:"Рисовать полигон",drawLineButton:"Рисовать кривую",drawCircleButton:"Рисовать круг",drawRectButton:"Рисовать прямоугольник",editButton:"Редактировать слой",dragButton:"Перенести слой",cutButton:"Вырезать слой",deleteButton:"Удалить слой",drawCircleMarkerButton:"Добавить круговой маркер",snappingButton:"Привязать перетаскиваемый маркер к другим слоям и вершинам",pinningButton:"Связать общие точки вместе",rotateButton:"Поворот слоя"}},es:{tooltips:{placeMarker:"Presiona para colocar un marcador",firstVertex:"Presiona para colocar el primer vértice",continueLine:"Presiona para continuar dibujando",finishLine:"Presiona cualquier marcador existente para finalizar",finishPoly:"Presiona el primer marcador para finalizar",finishRect:"Presiona para finalizar",startCircle:"Presiona para colocar el centro del círculo",finishCircle:"Presiona para finalizar el círculo",placeCircleMarker:"Presiona para colocar un marcador de círculo"},actions:{finish:"Finalizar",cancel:"Cancelar",removeLastVertex:"Eliminar último vértice"},buttonTitles:{drawMarkerButton:"Dibujar Marcador",drawPolyButton:"Dibujar Polígono",drawLineButton:"Dibujar Línea",drawCircleButton:"Dibujar Círculo",drawRectButton:"Dibujar Rectángulo",editButton:"Editar Capas",dragButton:"Arrastrar Capas",cutButton:"Cortar Capas",deleteButton:"Eliminar Capas",drawCircleMarkerButton:"Dibujar Marcador de Círculo",snappingButton:"El marcador de Snap arrastrado a otras capas y vértices",pinningButton:"Fijar juntos los vértices compartidos",rotateButton:"Rotar capa"}},nl:{tooltips:{placeMarker:"Klik om een marker te plaatsen",firstVertex:"Klik om het eerste punt te plaatsen",continueLine:"Klik om te blijven tekenen",finishLine:"Klik op een bestaand punt om te beëindigen",finishPoly:"Klik op het eerst punt om te beëindigen",finishRect:"Klik om te beëindigen",startCircle:"Klik om het middelpunt te plaatsen",finishCircle:"Klik om de cirkel te beëindigen",placeCircleMarker:"Klik om een marker te plaatsen"},actions:{finish:"Bewaar",cancel:"Annuleer",removeLastVertex:"Verwijder laatste punt"},buttonTitles:{drawMarkerButton:"Plaats Marker",drawPolyButton:"Teken een vlak",drawLineButton:"Teken een lijn",drawCircleButton:"Teken een cirkel",drawRectButton:"Teken een vierkant",editButton:"Bewerk",dragButton:"Verplaats",cutButton:"Knip",deleteButton:"Verwijder",drawCircleMarkerButton:"Plaats Marker",snappingButton:"Snap gesleepte marker naar andere lagen en hoekpunten",pinningButton:"Speld gedeelde hoekpunten samen",rotateButton:"Laag roteren"}},fr:{tooltips:{placeMarker:"Cliquez pour placer un marqueur",firstVertex:"Cliquez pour placer le premier sommet",continueLine:"Cliquez pour continuer à dessiner",finishLine:"Cliquez sur n'importe quel marqueur pour terminer",finishPoly:"Cliquez sur le premier marqueur pour terminer",finishRect:"Cliquez pour terminer",startCircle:"Cliquez pour placer le centre du cercle",finishCircle:"Cliquez pour finir le cercle",placeCircleMarker:"Cliquez pour placer le marqueur circulaire"},actions:{finish:"Terminer",cancel:"Annuler",removeLastVertex:"Retirer le dernier sommet"},buttonTitles:{drawMarkerButton:"Placer des marqueurs",drawPolyButton:"Dessiner des polygones",drawLineButton:"Dessiner des polylignes",drawCircleButton:"Dessiner un cercle",drawRectButton:"Dessiner un rectangle",editButton:"Éditer des calques",dragButton:"Déplacer des calques",cutButton:"Couper des calques",deleteButton:"Supprimer des calques",drawCircleMarkerButton:"Dessiner un marqueur circulaire",snappingButton:"Glisser le marqueur vers d'autres couches et sommets",pinningButton:"Épingler ensemble les sommets partagés",rotateButton:"Tourner des calques"}},pt:Ae,pt_br:{tooltips:{placeMarker:"Clique para posicionar o marcador",firstVertex:"Clique para posicionar o primeiro vértice",continueLine:"Clique para continuar desenhando",finishLine:"Clique em qualquer marcador existente para finalizar",finishPoly:"Clique no primeiro marcador para finalizar",finishRect:"Clique para finalizar",startCircle:"Clique para posicionar o centro do círculo",finishCircle:"Clique para finalizar o círculo",placeCircleMarker:"Clique para posicionar o marcador circular",placeText:"Clique para inserir texto"},actions:{finish:"Finalizar",cancel:"Cancelar",removeLastVertex:"Remover último vértice"},buttonTitles:{drawMarkerButton:"Desenhar Marcador",drawPolyButton:"Desenhar Polígonos",drawLineButton:"Desenhar Linha Poligonal",drawCircleButton:"Desenhar Círculo",drawRectButton:"Desenhar Retângulo",editButton:"Editar Camadas",dragButton:"Arrastar Camadas",cutButton:"Recortar Camadas",deleteButton:"Remover Camadas",drawCircleMarkerButton:"Desenhar Marcador de Círculo",snappingButton:"Ajustar marcador arrastado a outras camadas e vértices",pinningButton:"Unir vértices compartilhados",rotateButton:"Rotacionar Camadas",drawTextButton:"Desenhar Texto",scaleButton:"Redimensionar Camadas",autoTracingButton:"Traçado Automático de Linha"},measurements:{totalLength:"Comprimento",segmentLength:"Comprimento do Segmento",area:"Área",radius:"Raio",perimeter:"Perímetro",height:"Altura",width:"Largura",coordinates:"Posição",coordinatesMarker:"Marcador de Posição"}},pt_pt:Ae,zh:{tooltips:{placeMarker:"单击放置标记",firstVertex:"单击放置首个顶点",continueLine:"单击继续绘制",finishLine:"单击任何存在的标记以完成",finishPoly:"单击第一个标记以完成",finishRect:"单击完成",startCircle:"单击放置圆心",finishCircle:"单击完成圆形",placeCircleMarker:"点击放置圆形标记"},actions:{finish:"完成",cancel:"取消",removeLastVertex:"移除最后的顶点"},buttonTitles:{drawMarkerButton:"绘制标记",drawPolyButton:"绘制多边形",drawLineButton:"绘制线段",drawCircleButton:"绘制圆形",drawRectButton:"绘制长方形",editButton:"编辑图层",dragButton:"拖拽图层",cutButton:"剪切图层",deleteButton:"删除图层",drawCircleMarkerButton:"画圆圈标记",snappingButton:"将拖动的标记捕捉到其他图层和顶点",pinningButton:"将共享顶点固定在一起",rotateButton:"旋转图层"}},zh_tw:{tooltips:{placeMarker:"單擊放置標記",firstVertex:"單擊放置第一個頂點",continueLine:"單擊繼續繪製",finishLine:"單擊任何存在的標記以完成",finishPoly:"單擊第一個標記以完成",finishRect:"單擊完成",startCircle:"單擊放置圓心",finishCircle:"單擊完成圓形",placeCircleMarker:"點擊放置圓形標記"},actions:{finish:"完成",cancel:"取消",removeLastVertex:"移除最後一個頂點"},buttonTitles:{drawMarkerButton:"放置標記",drawPolyButton:"繪製多邊形",drawLineButton:"繪製線段",drawCircleButton:"繪製圓形",drawRectButton:"繪製方形",editButton:"編輯圖形",dragButton:"移動圖形",cutButton:"裁切圖形",deleteButton:"刪除圖形",drawCircleMarkerButton:"畫圓圈標記",snappingButton:"將拖動的標記對齊到其他圖層和頂點",pinningButton:"將共享頂點固定在一起",rotateButton:"旋轉圖形"}},pl:{tooltips:{placeMarker:"Kliknij, aby umieścić znacznik",firstVertex:"Kliknij, aby umieścić pierwszy wierzchołek",continueLine:"Kliknij, aby kontynuować rysowanie",finishLine:"Kliknij dowolny istniejący znacznik, aby zakończyć",finishPoly:"Kliknij pierwszy znacznik, aby zakończyć",finishRect:"Kliknij, aby zakończyć",startCircle:"Kliknij, aby umieścić środek okręgu",finishCircle:"Kliknij, aby zakończyć okrąg",placeCircleMarker:"Kliknij, aby umieścić znacznik okręgu",placeText:"Kliknij, aby umieścić tekst"},actions:{finish:"Zakończ",cancel:"Anuluj",removeLastVertex:"Usuń ostatni wierzchołek"},buttonTitles:{drawMarkerButton:"Rysuj znacznik",drawPolyButton:"Rysuj wielokąt",drawLineButton:"Rysuj linię",drawCircleButton:"Rysuj okrąg",drawRectButton:"Rysuj prostokąt",editButton:"Edytuj warstwy",dragButton:"Przeciągnij warstwy",cutButton:"Wytnij warstwy",deleteButton:"Usuń warstwy",drawCircleMarkerButton:"Rysuj znacznik okrągły",snappingButton:"Przyciągnij przenoszony znacznik do innych warstw i wierzchołków",pinningButton:"Przypnij wspólne wierzchołki razem",rotateButton:"Obróć warstwy",drawTextButton:"Rysuj tekst",scaleButton:"Skaluj warstwy",autoTracingButton:"Automatyczne śledzenie linii"},measurements:{totalLength:"Długość",segmentLength:"Długość odcinka",area:"Obszar",radius:"Promień",perimeter:"Obwód",height:"Wysokość",width:"Szerokość",coordinates:"Pozycja",coordinatesMarker:"Znacznik pozycji"}},sv:{tooltips:{placeMarker:"Klicka för att placera markör",firstVertex:"Klicka för att placera första hörnet",continueLine:"Klicka för att fortsätta rita",finishLine:"Klicka på en existerande punkt för att slutföra",finishPoly:"Klicka på den första punkten för att slutföra",finishRect:"Klicka för att slutföra",startCircle:"Klicka för att placera cirkelns centrum",finishCircle:"Klicka för att slutföra cirkeln",placeCircleMarker:"Klicka för att placera cirkelmarkör"},actions:{finish:"Slutför",cancel:"Avbryt",removeLastVertex:"Ta bort sista hörnet"},buttonTitles:{drawMarkerButton:"Rita Markör",drawPolyButton:"Rita Polygoner",drawLineButton:"Rita Linje",drawCircleButton:"Rita Cirkel",drawRectButton:"Rita Rektangel",editButton:"Redigera Lager",dragButton:"Dra Lager",cutButton:"Klipp i Lager",deleteButton:"Ta bort Lager",drawCircleMarkerButton:"Rita Cirkelmarkör",snappingButton:"Snäpp dra markören till andra lager och hörn",pinningButton:"Fäst delade hörn tillsammans",rotateButton:"Rotera lagret"}},el:{tooltips:{placeMarker:"Κάντε κλικ για να τοποθετήσετε Δείκτη",firstVertex:"Κάντε κλικ για να τοποθετήσετε το πρώτο σημείο",continueLine:"Κάντε κλικ για να συνεχίσετε να σχεδιάζετε",finishLine:"Κάντε κλικ σε οποιονδήποτε υπάρχον σημείο για να ολοκληρωθεί",finishPoly:"Κάντε κλικ στο πρώτο σημείο για να τελειώσετε",finishRect:"Κάντε κλικ για να τελειώσετε",startCircle:"Κάντε κλικ για να τοποθετήσετε κέντρο Κύκλου",finishCircle:"Κάντε κλικ για να ολοκληρώσετε τον Κύκλο",placeCircleMarker:"Κάντε κλικ για να τοποθετήσετε Κυκλικό Δείκτη"},actions:{finish:"Τέλος",cancel:"Ακύρωση",removeLastVertex:"Κατάργηση τελευταίου σημείου"},buttonTitles:{drawMarkerButton:"Σχεδίαση Δείκτη",drawPolyButton:"Σχεδίαση Πολυγώνου",drawLineButton:"Σχεδίαση Γραμμής",drawCircleButton:"Σχεδίαση Κύκλου",drawRectButton:"Σχεδίαση Ορθογωνίου",editButton:"Επεξεργασία Επιπέδων",dragButton:"Μεταφορά Επιπέδων",cutButton:"Αποκοπή Επιπέδων",deleteButton:"Κατάργηση Επιπέδων",drawCircleMarkerButton:"Σχεδίαση Κυκλικού Δείκτη",snappingButton:"Προσκόλληση του Δείκτη μεταφοράς σε άλλα Επίπεδα και Κορυφές",pinningButton:"Περικοπή κοινών κορυφών μαζί",rotateButton:"Περιστρέψτε το στρώμα"}},hu:{tooltips:{placeMarker:"Kattintson a jelölő elhelyezéséhez",firstVertex:"Kattintson az első pont elhelyezéséhez",continueLine:"Kattintson a következő pont elhelyezéséhez",finishLine:"A befejezéshez kattintson egy meglévő pontra",finishPoly:"A befejezéshez kattintson az első pontra",finishRect:"Kattintson a befejezéshez",startCircle:"Kattintson a kör középpontjának elhelyezéséhez",finishCircle:"Kattintson a kör befejezéséhez",placeCircleMarker:"Kattintson a körjelölő elhelyezéséhez"},actions:{finish:"Befejezés",cancel:"Mégse",removeLastVertex:"Utolsó pont eltávolítása"},buttonTitles:{drawMarkerButton:"Jelölő rajzolása",drawPolyButton:"Poligon rajzolása",drawLineButton:"Vonal rajzolása",drawCircleButton:"Kör rajzolása",drawRectButton:"Négyzet rajzolása",editButton:"Elemek szerkesztése",dragButton:"Elemek mozgatása",cutButton:"Elemek vágása",deleteButton:"Elemek törlése",drawCircleMarkerButton:"Kör jelölő rajzolása",snappingButton:"Kapcsolja a jelöltőt másik elemhez vagy ponthoz",pinningButton:"Közös pontok összekötése",rotateButton:"Fólia elforgatása"}},da:{tooltips:{placeMarker:"Tryk for at placere en markør",firstVertex:"Tryk for at placere det første punkt",continueLine:"Tryk for at fortsætte linjen",finishLine:"Tryk på et eksisterende punkt for at afslutte",finishPoly:"Tryk på det første punkt for at afslutte",finishRect:"Tryk for at afslutte",startCircle:"Tryk for at placere cirklens center",finishCircle:"Tryk for at afslutte cirklen",placeCircleMarker:"Tryk for at placere en cirkelmarkør"},actions:{finish:"Afslut",cancel:"Afbryd",removeLastVertex:"Fjern sidste punkt"},buttonTitles:{drawMarkerButton:"Placer markør",drawPolyButton:"Tegn polygon",drawLineButton:"Tegn linje",drawCircleButton:"Tegn cirkel",drawRectButton:"Tegn firkant",editButton:"Rediger",dragButton:"Træk",cutButton:"Klip",deleteButton:"Fjern",drawCircleMarkerButton:"Tegn cirkelmarkør",snappingButton:"Fastgør trukket markør til andre elementer",pinningButton:"Sammenlæg delte elementer",rotateButton:"Roter laget"}},no:{tooltips:{placeMarker:"Klikk for å plassere punkt",firstVertex:"Klikk for å plassere første punkt",continueLine:"Klikk for å tegne videre",finishLine:"Klikk på et eksisterende punkt for å fullføre",finishPoly:"Klikk første punkt for å fullføre",finishRect:"Klikk for å fullføre",startCircle:"Klikk for å sette sirkel midtpunkt",finishCircle:"Klikk for å fullføre sirkel",placeCircleMarker:"Klikk for å plassere sirkel",placeText:"Klikk for å plassere tekst"},actions:{finish:"Fullfør",cancel:"Kanseller",removeLastVertex:"Fjern forrige punkt"},buttonTitles:{drawMarkerButton:"Tegn punkt",drawPolyButton:"Tegn flate",drawLineButton:"Tegn linje",drawCircleButton:"Tegn sirkel",drawRectButton:"Tegn rektangel",editButton:"Rediger objekter",dragButton:"Dra objekter",cutButton:"Kutt objekter",deleteButton:"Fjern objekter",drawCircleMarkerButton:"Tegn sirkel-punkt",snappingButton:"Fest dratt punkt til andre objekter og punkt",pinningButton:"Pin delte punkter sammen",rotateButton:"Rotér objekter",drawTextButton:"Tegn tekst",scaleButton:"Skalér objekter",autoTracingButton:"Automatisk sporing av linje"},measurements:{totalLength:"Lengde",segmentLength:"Segmentlengde",area:"Område",radius:"Radius",perimeter:"Omriss",height:"Høyde",width:"Bredde",coordinates:"Posisjon",coordinatesMarker:"Posisjonsmarkør"}},fa:{tooltips:{placeMarker:"کلیک برای جانمایی نشان",firstVertex:"کلیک برای رسم اولین رأس",continueLine:"کلیک برای ادامه رسم",finishLine:"کلیک روی هر نشان موجود برای پایان",finishPoly:"کلیک روی اولین نشان برای پایان",finishRect:"کلیک برای پایان",startCircle:"کلیک برای رسم مرکز دایره",finishCircle:"کلیک برای پایان رسم دایره",placeCircleMarker:"کلیک برای رسم نشان دایره",placeText:"کلیک برای نوشتن متن"},actions:{finish:"پایان",cancel:"لفو",removeLastVertex:"حذف آخرین رأس"},buttonTitles:{drawMarkerButton:"درج نشان",drawPolyButton:"رسم چندضلعی",drawLineButton:"رسم خط",drawCircleButton:"رسم دایره",drawRectButton:"رسم چهارضلعی",editButton:"ویرایش لایه‌ها",dragButton:"جابجایی لایه‌ها",cutButton:"برش لایه‌ها",deleteButton:"حذف لایه‌ها",drawCircleMarkerButton:"رسم نشان دایره",snappingButton:"نشانگر را به لایه‌ها و رئوس دیگر بکشید",pinningButton:"رئوس مشترک را با هم پین کنید",rotateButton:"چرخش لایه",drawTextButton:"رسم متن",scaleButton:"مقیاس‌گذاری",autoTracingButton:"ردیاب خودکار"},measurements:{totalLength:"طول",segmentLength:"طول بخش",area:"ناحیه",radius:"شعاع",perimeter:"محیط",height:"ارتفاع",width:"عرض",coordinates:"موقعیت",coordinatesMarker:"موقعیت نشان"}},ua:{tooltips:{placeMarker:"Натисніть, щоб нанести маркер",firstVertex:"Натисніть, щоб нанести першу вершину",continueLine:"Натисніть, щоб продовжити малювати",finishLine:"Натисніть будь-який існуючий маркер для завершення",finishPoly:"Виберіть перший маркер, щоб завершити",finishRect:"Натисніть, щоб завершити",startCircle:"Натисніть, щоб додати центр кола",finishCircle:"Натисніть, щоб завершити коло",placeCircleMarker:"Натисніть, щоб нанести круговий маркер"},actions:{finish:"Завершити",cancel:"Відмінити",removeLastVertex:"Видалити попередню вершину"},buttonTitles:{drawMarkerButton:"Малювати маркер",drawPolyButton:"Малювати полігон",drawLineButton:"Малювати криву",drawCircleButton:"Малювати коло",drawRectButton:"Малювати прямокутник",editButton:"Редагувати шари",dragButton:"Перенести шари",cutButton:"Вирізати шари",deleteButton:"Видалити шари",drawCircleMarkerButton:"Малювати круговий маркер",snappingButton:"Прив’язати перетягнутий маркер до інших шарів та вершин",pinningButton:"Зв'язати спільні вершини разом",rotateButton:"Повернути шар"}},tr:{tooltips:{placeMarker:"İşaretçi yerleştirmek için tıklayın",firstVertex:"İlk tepe noktasını yerleştirmek için tıklayın",continueLine:"Çizime devam etmek için tıklayın",finishLine:"Bitirmek için mevcut herhangi bir işaretçiyi tıklayın",finishPoly:"Bitirmek için ilk işaretçiyi tıklayın",finishRect:"Bitirmek için tıklayın",startCircle:"Daire merkezine yerleştirmek için tıklayın",finishCircle:"Daireyi bitirmek için tıklayın",placeCircleMarker:"Daire işaretçisi yerleştirmek için tıklayın"},actions:{finish:"Bitir",cancel:"İptal",removeLastVertex:"Son köşeyi kaldır"},buttonTitles:{drawMarkerButton:"Çizim İşaretçisi",drawPolyButton:"Çokgenler çiz",drawLineButton:"Çoklu çizgi çiz",drawCircleButton:"Çember çiz",drawRectButton:"Dikdörtgen çiz",editButton:"Katmanları düzenle",dragButton:"Katmanları sürükle",cutButton:"Katmanları kes",deleteButton:"Katmanları kaldır",drawCircleMarkerButton:"Daire işaretçisi çiz",snappingButton:"Sürüklenen işaretçiyi diğer katmanlara ve köşelere yapıştır",pinningButton:"Paylaşılan köşeleri birbirine sabitle",rotateButton:"Katmanı döndür"}},cz:{tooltips:{placeMarker:"Kliknutím vytvoříte značku",firstVertex:"Kliknutím vytvoříte první objekt",continueLine:"Kliknutím pokračujte v kreslení",finishLine:"Kliknutí na libovolnou existující značku pro dokončení",finishPoly:"Vyberte první bod pro dokončení",finishRect:"Klikněte pro dokončení",startCircle:"Kliknutím přidejte střed kruhu",finishCircle:"Нажмите, чтобы задать радиус",placeCircleMarker:"Kliknutím nastavte poloměr"},actions:{finish:"Dokončit",cancel:"Zrušit",removeLastVertex:"Zrušit poslední akci"},buttonTitles:{drawMarkerButton:"Přidat značku",drawPolyButton:"Nakreslit polygon",drawLineButton:"Nakreslit křivku",drawCircleButton:"Nakreslit kruh",drawRectButton:"Nakreslit obdélník",editButton:"Upravit vrstvu",dragButton:"Přeneste vrstvu",cutButton:"Vyjmout vrstvu",deleteButton:"Smazat vrstvu",drawCircleMarkerButton:"Přidat kruhovou značku",snappingButton:"Navázat tažnou značku k dalším vrstvám a vrcholům",pinningButton:"Spojit společné body dohromady",rotateButton:"Otočte vrstvu"}},ja:{tooltips:{placeMarker:"クリックしてマーカーを配置",firstVertex:"クリックして最初の頂点を配置",continueLine:"クリックして描画を続ける",finishLine:"任意のマーカーをクリックして終了",finishPoly:"最初のマーカーをクリックして終了",finishRect:"クリックして終了",startCircle:"クリックして円の中心を配置",finishCircle:"クリックして円の描画を終了",placeCircleMarker:"クリックして円マーカーを配置",placeText:"クリックしてテキストを配置"},actions:{finish:"終了",cancel:"キャンセル",removeLastVertex:"最後の頂点を削除"},buttonTitles:{drawMarkerButton:"マーカーを描画",drawPolyButton:"ポリゴンを描画",drawLineButton:"折れ線を描画",drawCircleButton:"円を描画",drawRectButton:"矩形を描画",editButton:"レイヤーを編集",dragButton:"レイヤーをドラッグ",cutButton:"レイヤーを切り取り",deleteButton:"レイヤーを削除",drawCircleMarkerButton:"円マーカーを描画",snappingButton:"ドラッグしたマーカーを他のレイヤーや頂点にスナップする",pinningButton:"共有する頂点を同時に動かす",rotateButton:"レイヤーを回転",drawTextButton:"テキストを描画"}},fi:{tooltips:{placeMarker:"Klikkaa asettaaksesi merkin",firstVertex:"Klikkaa asettaakseni ensimmäisen osuuden",continueLine:"Klikkaa jatkaaksesi piirtämistä",finishLine:"Klikkaa olemassa olevaa merkkiä lopettaaksesi",finishPoly:"Klikkaa ensimmäistä merkkiä lopettaaksesi",finishRect:"Klikkaa lopettaaksesi",startCircle:"Klikkaa asettaaksesi ympyrän keskipisteen",finishCircle:"Klikkaa lopettaaksesi ympyrän",placeCircleMarker:"Klikkaa asettaaksesi ympyrämerkin",placeText:"Klikkaa asettaaksesi tekstin"},actions:{finish:"Valmis",cancel:"Peruuta",removeLastVertex:"Poista viimeinen osuus"},buttonTitles:{drawMarkerButton:"Piirrä merkkejä",drawPolyButton:"Piirrä monikulmioita",drawLineButton:"Piirrä viivoja",drawCircleButton:"Piirrä ympyrä",drawRectButton:"Piirrä neliskulmioita",editButton:"Muokkaa",dragButton:"Siirrä",cutButton:"Leikkaa",deleteButton:"Poista",drawCircleMarkerButton:"Piirrä ympyrämerkki",snappingButton:"Kiinnitä siirrettävä merkki toisiin muotoihin",pinningButton:"Kiinnitä jaetut muodot yhteen",rotateButton:"Käännä",drawTextButton:"Piirrä tekstiä"}},ko:{tooltips:{placeMarker:"마커 위치를 클릭하세요",firstVertex:"첫번째 꼭지점 위치을 클릭하세요",continueLine:"계속 그리려면 클릭하세요",finishLine:"끝내려면 기존 마커를 클릭하세요",finishPoly:"끝내려면 처음 마커를 클릭하세요",finishRect:"끝내려면 클릭하세요",startCircle:"원의 중심이 될 위치를 클릭하세요",finishCircle:"원을 끝내려면 클릭하세요",placeCircleMarker:"원 마커 위치를 클릭하세요",placeText:"텍스트 위치를 클릭하세요"},actions:{finish:"끝내기",cancel:"취소",removeLastVertex:"마지막 꼭지점 제거"},buttonTitles:{drawMarkerButton:"마커 그리기",drawPolyButton:"다각형 그리기",drawLineButton:"다각선 그리기",drawCircleButton:"원 그리기",drawRectButton:"직사각형 그리기",editButton:"레이어 편집하기",dragButton:"레이어 끌기",cutButton:"레이어 자르기",deleteButton:"레이어 제거하기",drawCircleMarkerButton:"원 마커 그리기",snappingButton:"잡아끈 마커를 다른 레이어 및 꼭지점에 들러붙게 하기",pinningButton:"공유 꼭지점을 함께 찍기",rotateButton:"레이어 회전하기",drawTextButton:"텍스트 그리기"}},ky:{tooltips:{placeMarker:"Маркерди жайгаштыруу үчүн басыңыз",firstVertex:"Биринчи чокуну жайгаштырууну үчүн басыңыз",continueLine:"Сүрөт тартууну улантуу үчүн басыңыз",finishLine:"Аяктоо үчүн учурдагы маркерди басыңыз",finishPoly:"Бүтүрүү үчүн биринчи маркерди басыңыз",finishRect:"Бүтүрүү үчүн басыңыз",startCircle:"Айлананын борборун жайгаштырууну үчүн басыңыз",finishCircle:"Айлананы бүтүрүү үчүн басыңыз",placeCircleMarker:"Тегерек маркерди жайгаштыруу үчүн басыңыз",placeText:"Текстти жайгаштыруу үчүн басыңыз"},actions:{finish:"Аягы",cancel:"Жок кылуу",removeLastVertex:"Акыркы чокуну өчүрүү"},buttonTitles:{drawMarkerButton:"Маркерди чизуу",drawPolyButton:"Полигон чизуу",drawLineButton:"Полилиния чизуу",drawCircleButton:"Дайынды чизуу",drawRectButton:"Прямоугольник чизуу",editButton:"Слоопту түзөтүү",dragButton:"Слоопту карап сүйлөү",cutButton:"Слооптун башын кесүү",deleteButton:"Слооптун өчүрүү",drawCircleMarkerButton:"Дайынды маркерди чизуу",snappingButton:"Башка слооптордун жана вертекстердин арасына чекилдөө",pinningButton:"Бөлүшкөн вертекстерди бирге тутуштуруу",rotateButton:"Слооптун өзгөртүү",drawTextButton:"Текст чизуу",scaleButton:"Слооптун өлчөмүн өзгөртүү",autoTracingButton:"Автоматтык тизмеги чизуу"},measurements:{totalLength:"Узундук",segmentLength:"Сегмент узундугу",area:"Аймак",radius:"Радиус",perimeter:"Периметр",height:"Диаметр",width:"Кенчилик",coordinates:"Координаттар",coordinatesMarker:"Маркердин координаттары"}}},Me={_globalEditModeEnabled:!1,enableGlobalEditMode(t){let e={...t};this._globalEditModeEnabled=!0,this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),L.PM.Utils.findLayers(this.map).forEach(t=>{this._isRelevantForEdit(t)&&t.pm.enable(e)}),this.throttledReInitEdit||(this.throttledReInitEdit=L.Util.throttle(this.handleLayerAdditionInGlobalEditMode,100,this)),this._addedLayersEdit={},this.map.on("layeradd",this._layerAddedEdit,this),this.map.on("layeradd",this.throttledReInitEdit,this),this._fireGlobalEditModeToggled(!0)},disableGlobalEditMode(){this._globalEditModeEnabled=!1,L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.disable()}),this.map.off("layeradd",this._layerAddedEdit,this),this.map.off("layeradd",this.throttledReInitEdit,this),this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),this._fireGlobalEditModeToggled(!1)},globalEditEnabled(){return this.globalEditModeEnabled()},globalEditModeEnabled(){return this._globalEditModeEnabled},toggleGlobalEditMode(t=this.globalOptions){this.globalEditModeEnabled()?this.disableGlobalEditMode():this.enableGlobalEditMode(t)},handleLayerAdditionInGlobalEditMode(){let t=this._addedLayersEdit;if(this._addedLayersEdit={},this.globalEditModeEnabled())for(let e in t){let i=t[e];this._isRelevantForEdit(i)&&i.pm.enable({...this.globalOptions})}},_layerAddedEdit({layer:t}){this._addedLayersEdit[L.stamp(t)]=t},_isRelevantForEdit:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowEditing},Le={_globalDragModeEnabled:!1,enableGlobalDragMode(){let t=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!0,this._addedLayersDrag={},t.forEach(t=>{this._isRelevantForDrag(t)&&t.pm.enableLayerDrag()}),this.throttledReInitDrag||(this.throttledReInitDrag=L.Util.throttle(this.reinitGlobalDragMode,100,this)),this.map.on("layeradd",this._layerAddedDrag,this),this.map.on("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!0)},disableGlobalDragMode(){let t=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!1,t.forEach(t=>{t.pm.disableLayerDrag()}),this.map.off("layeradd",this._layerAddedDrag,this),this.map.off("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!1)},globalDragModeEnabled(){return!!this._globalDragModeEnabled},toggleGlobalDragMode(){this.globalDragModeEnabled()?this.disableGlobalDragMode():this.enableGlobalDragMode()},reinitGlobalDragMode(){let t=this._addedLayersDrag;if(this._addedLayersDrag={},this.globalDragModeEnabled())for(let e in t){let i=t[e];this._isRelevantForDrag(i)&&i.pm.enableLayerDrag()}},_layerAddedDrag({layer:t}){this._addedLayersDrag[L.stamp(t)]=t},_isRelevantForDrag:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.draggable},xe={_globalRemovalModeEnabled:!1,enableGlobalRemovalMode(){this._globalRemovalModeEnabled=!0,this.map.eachLayer(t=>{this._isRelevantForRemoval(t)&&(t.pm.enabled()&&t.pm.disable(),t.on("click",this.removeLayer,this))}),this.throttledReInitRemoval||(this.throttledReInitRemoval=L.Util.throttle(this.handleLayerAdditionInGlobalRemovalMode,100,this)),this._addedLayersRemoval={},this.map.on("layeradd",this._layerAddedRemoval,this),this.map.on("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!0)},disableGlobalRemovalMode(){this._globalRemovalModeEnabled=!1,this.map.eachLayer(t=>{t.off("click",this.removeLayer,this)}),this.map.off("layeradd",this._layerAddedRemoval,this),this.map.off("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!1)},globalRemovalEnabled(){return this.globalRemovalModeEnabled()},globalRemovalModeEnabled(){return!!this._globalRemovalModeEnabled},toggleGlobalRemovalMode(){this.globalRemovalModeEnabled()?this.disableGlobalRemovalMode():this.enableGlobalRemovalMode()},removeLayer(t){let e=t.target;this._isRelevantForRemoval(e)&&!e.pm.dragging()&&(e.removeFrom(this.map.pm._getContainingLayer()),e.remove(),e instanceof L.LayerGroup?(this._fireRemoveLayerGroup(e),this._fireRemoveLayerGroup(this.map,e)):(e.pm._fireRemove(e),e.pm._fireRemove(this.map,e)))},_isRelevantForRemoval:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowRemoval,handleLayerAdditionInGlobalRemovalMode(){let t=this._addedLayersRemoval;if(this._addedLayersRemoval={},this.globalRemovalModeEnabled())for(let e in t){let i=t[e];this._isRelevantForRemoval(i)&&(i.pm.enabled()&&i.pm.disable(),i.on("click",this.removeLayer,this))}},_layerAddedRemoval({layer:t}){this._addedLayersRemoval[L.stamp(t)]=t}},be={_globalRotateModeEnabled:!1,enableGlobalRotateMode(){this._globalRotateModeEnabled=!0,L.PM.Utils.findLayers(this.map).filter(t=>t instanceof L.Polyline).forEach(t=>{this._isRelevantForRotate(t)&&t.pm.enableRotate()}),this.throttledReInitRotate||(this.throttledReInitRotate=L.Util.throttle(this.handleLayerAdditionInGlobalRotateMode,100,this)),this._addedLayersRotate={},this.map.on("layeradd",this._layerAddedRotate,this),this.map.on("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},disableGlobalRotateMode(){this._globalRotateModeEnabled=!1,L.PM.Utils.findLayers(this.map).filter(t=>t instanceof L.Polyline).forEach(t=>{t.pm.disableRotate()}),this.map.off("layeradd",this._layerAddedRotate,this),this.map.off("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},globalRotateModeEnabled(){return!!this._globalRotateModeEnabled},toggleGlobalRotateMode(){this.globalRotateModeEnabled()?this.disableGlobalRotateMode():this.enableGlobalRotateMode()},_isRelevantForRotate:t=>t.pm&&t instanceof L.Polyline&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowRotation,handleLayerAdditionInGlobalRotateMode(){let t=this._addedLayersRotate;if(this._addedLayersRotate={},this.globalRotateModeEnabled())for(let e in t){let i=t[e];this._isRelevantForRemoval(i)&&i.pm.enableRotate()}},_layerAddedRotate({layer:t}){this._addedLayersRotate[L.stamp(t)]=t}},we=u(te()),Pe={_fireDrawStart(t="Draw",e={}){this.__fire(this._map,"pm:drawstart",{shape:this._shape,workingLayer:this._layer},t,e)},_fireDrawEnd(t="Draw",e={}){this.__fire(this._map,"pm:drawend",{shape:this._shape},t,e)},_fireCreate(t,e="Draw",i={}){this.__fire(this._map,"pm:create",{shape:this._shape,marker:t,layer:t},e,i)},_fireCenterPlaced(t="Draw",e={}){let i="Draw"===t?this._layer:void 0,n="Draw"!==t?this._layer:void 0;this.__fire(this._layer,"pm:centerplaced",{shape:this._shape,workingLayer:i,layer:n,latlng:this._layer.getLatLng()},t,e)},_fireCut(t,e,i,n="Draw",s={}){this.__fire(t,"pm:cut",{shape:this._shape,layer:e,originalLayer:i},n,s)},_fireEdit(t=this._layer,e="Edit",i={}){this.__fire(t,"pm:edit",{layer:this._layer,shape:this.getShape()},e,i)},_fireEnable(t="Edit",e={}){this.__fire(this._layer,"pm:enable",{layer:this._layer,shape:this.getShape()},t,e)},_fireDisable(t="Edit",e={}){this.__fire(this._layer,"pm:disable",{layer:this._layer,shape:this.getShape()},t,e)},_fireUpdate(t="Edit",e={}){this.__fire(this._layer,"pm:update",{layer:this._layer,shape:this.getShape()},t,e)},_fireMarkerDragStart(t,e=void 0,i="Edit",n={}){this.__fire(this._layer,"pm:markerdragstart",{layer:this._layer,markerEvent:t,shape:this.getShape(),indexPath:e},i,n)},_fireMarkerDrag(t,e=void 0,i="Edit",n={}){this.__fire(this._layer,"pm:markerdrag",{layer:this._layer,markerEvent:t,shape:this.getShape(),indexPath:e},i,n)},_fireMarkerDragEnd(t,e=void 0,i=void 0,n="Edit",s={}){this.__fire(this._layer,"pm:markerdragend",{layer:this._layer,markerEvent:t,shape:this.getShape(),indexPath:e,intersectionReset:i},n,s)},_fireDragStart(t="Edit",e={}){this.__fire(this._layer,"pm:dragstart",{layer:this._layer,shape:this.getShape()},t,e)},_fireDrag(t,e="Edit",i={}){this.__fire(this._layer,"pm:drag",{...t,shape:this.getShape()},e,i)},_fireDragEnd(t="Edit",e={}){this.__fire(this._layer,"pm:dragend",{layer:this._layer,shape:this.getShape()},t,e)},_fireDragEnable(t="Edit",e={}){this.__fire(this._layer,"pm:dragenable",{layer:this._layer,shape:this.getShape()},t,e)},_fireDragDisable(t="Edit",e={}){this.__fire(this._layer,"pm:dragdisable",{layer:this._layer,shape:this.getShape()},t,e)},_fireRemove(t,e=t,i="Edit",n={}){this.__fire(t,"pm:remove",{layer:e,shape:this.getShape()},i,n)},_fireVertexAdded(t,e,i,n="Edit",s={}){this.__fire(this._layer,"pm:vertexadded",{layer:this._layer,workingLayer:this._layer,marker:t,indexPath:e,latlng:i,shape:this.getShape()},n,s)},_fireVertexRemoved(t,e,i="Edit",n={}){this.__fire(this._layer,"pm:vertexremoved",{layer:this._layer,marker:t,indexPath:e,shape:this.getShape()},i,n)},_fireVertexClick(t,e,i="Edit",n={}){this.__fire(this._layer,"pm:vertexclick",{layer:this._layer,markerEvent:t,indexPath:e,shape:this.getShape()},i,n)},_fireIntersect(t,e=this._layer,i="Edit",n={}){this.__fire(e,"pm:intersect",{layer:this._layer,intersection:t,shape:this.getShape()},i,n)},_fireLayerReset(t,e,i="Edit",n={}){this.__fire(this._layer,"pm:layerreset",{layer:this._layer,markerEvent:t,indexPath:e,shape:this.getShape()},i,n)},_fireChange(t,e="Edit",i={}){this.__fire(this._layer,"pm:change",{layer:this._layer,latlngs:t,shape:this.getShape()},e,i)},_fireTextChange(t,e="Edit",i={}){this.__fire(this._layer,"pm:textchange",{layer:this._layer,text:t,shape:this.getShape()},e,i)},_fireTextFocus(t="Edit",e={}){this.__fire(this._layer,"pm:textfocus",{layer:this._layer,shape:this.getShape()},t,e)},_fireTextBlur(t="Edit",e={}){this.__fire(this._layer,"pm:textblur",{layer:this._layer,shape:this.getShape()},t,e)},_fireSnapDrag(t,e,i="Snapping",n={}){this.__fire(t,"pm:snapdrag",e,i,n)},_fireSnap(t,e,i="Snapping",n={}){this.__fire(t,"pm:snap",e,i,n)},_fireUnsnap(t,e,i="Snapping",n={}){this.__fire(t,"pm:unsnap",e,i,n)},_fireRotationEnable(t,e,i="Rotation",n={}){this.__fire(t,"pm:rotateenable",{layer:this._layer,helpLayer:this._rotatePoly,shape:this.getShape()},i,n)},_fireRotationDisable(t,e="Rotation",i={}){this.__fire(t,"pm:rotatedisable",{layer:this._layer,shape:this.getShape()},e,i)},_fireRotationStart(t,e,i="Rotation",n={}){this.__fire(t,"pm:rotatestart",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:this._startAngle,originLatLngs:e},i,n)},_fireRotation(t,e,i,n=this._rotationLayer,s="Rotation",o={}){this.__fire(t,"pm:rotate",{layer:n,helpLayer:this._layer,startAngle:this._startAngle,angle:n.pm.getAngle(),angleDiff:e,oldLatLngs:i,newLatLngs:n.getLatLngs()},s,o)},_fireRotationEnd(t,e,i,n="Rotation",s={}){this.__fire(t,"pm:rotateend",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:e,angle:this._rotationLayer.pm.getAngle(),originLatLngs:i,newLatLngs:this._rotationLayer.getLatLngs()},n,s)},_fireActionClick(t,e,i,n="Toolbar",s={}){this.__fire(this._map,"pm:actionclick",{text:t.text,action:t,btnName:e,button:i},n,s)},_fireButtonClick(t,e,i="Toolbar",n={}){this.__fire(this._map,"pm:buttonclick",{btnName:t,button:e},i,n)},_fireLangChange(t,e,i,n,s="Global",o={}){this.__fire(this.map,"pm:langchange",{oldLang:t,activeLang:e,fallback:i,translations:n},s,o)},_fireGlobalDragModeToggled(t,e="Global",i={}){this.__fire(this.map,"pm:globaldragmodetoggled",{enabled:t,map:this.map},e,i)},_fireGlobalEditModeToggled(t,e="Global",i={}){this.__fire(this.map,"pm:globaleditmodetoggled",{enabled:t,map:this.map},e,i)},_fireGlobalRemovalModeToggled(t,e="Global",i={}){this.__fire(this.map,"pm:globalremovalmodetoggled",{enabled:t,map:this.map},e,i)},_fireGlobalCutModeToggled(t="Global",e={}){this.__fire(this._map,"pm:globalcutmodetoggled",{enabled:!!this._enabled,map:this._map},t,e)},_fireGlobalDrawModeToggled(t="Global",e={}){this.__fire(this._map,"pm:globaldrawmodetoggled",{enabled:this._enabled,shape:this._shape,map:this._map},t,e)},_fireGlobalRotateModeToggled(t="Global",e={}){this.__fire(this.map,"pm:globalrotatemodetoggled",{enabled:this.globalRotateModeEnabled(),map:this.map},t,e)},_fireRemoveLayerGroup(t,e=t,i="Edit",n={}){this.__fire(t,"pm:remove",{layer:e,shape:void 0},i,n)},_fireKeyeventEvent(t,e,i,n="Global",s={}){this.__fire(this.map,"pm:keyevent",{event:t,eventType:e,focusOn:i},n,s)},__fire(t,e,i,n,s={}){i=(0,we.default)(i,s,{source:n}),L.PM.Utils._fireEvent(t,e,i)}},ke=()=>({_lastEvents:{keydown:void 0,keyup:void 0,current:void 0},_initKeyListener(t){this.map=t,L.DomEvent.on(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.on(window,"blur",this._onBlur,this),t.once("unload",this._unbindKeyListenerEvents,this)},_unbindKeyListenerEvents(){L.DomEvent.off(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.off(window,"blur",this._onBlur,this)},_onKeyListener(t){let e="document";this.map.getContainer().contains(t.target)&&(e="map");let i={event:t,eventType:t.type,focusOn:e};this._lastEvents[t.type]=i,this._lastEvents.current=i,this.map.pm._fireKeyeventEvent(t,t.type,e)},_onBlur(t){t.altKey=!1;let e={event:t,eventType:t.type,focusOn:"document"};this._lastEvents[t.type]=e,this._lastEvents.current=e},getLastKeyEvent(t="current"){return this._lastEvents[t]},isShiftKeyPressed(){var t;return null==(t=this._lastEvents.current)?void 0:t.event.shiftKey},isAltKeyPressed(){var t;return null==(t=this._lastEvents.current)?void 0:t.event.altKey},isCtrlKeyPressed(){var t;return null==(t=this._lastEvents.current)?void 0:t.event.ctrlKey},isMetaKeyPressed(){var t;return null==(t=this._lastEvents.current)?void 0:t.event.metaKey},getPressedKey(){var t;return null==(t=this._lastEvents.current)?void 0:t.event.key}}),Ee=u(pe());function Ce(t){let e=L.PM.activeLang;return(0,Ee.default)(ve[e],t)||(0,Ee.default)(ve.en,t)||t}function Se(t){for(let e=0;e<t.length;e+=1){let i=t[e];if(Array.isArray(i)){if(Se(i))return!0}else if(null!=i&&""!==i)return!0}return!1}function Te(t){return t.reduce((t,e)=>{if(0!==e.length){let i=Array.isArray(e)?Te(e):e;Array.isArray(i)?0!==i.length&&t.push(i):t.push(i)}return t},[])}function Oe(t,e,i){let n,s,o,a={a:L.CRS.Earth.R,b:6356752.3142,f:.0033528106647474805},{a:r,b:h,f:l}=a,c=t.lng,u=t.lat,p=i,d=Math.PI,_=e*d/180,m=Math.sin(_),g=Math.cos(_),f=(1-l)*Math.tan(u*d/180),y=1/Math.sqrt(1+f*f),A=f*y,v=Math.atan2(f,g),M=y*m,x=1-M*M,b=x*(r*r-h*h)/(h*h),w=1+b/16384*(4096+b*(b*(320-175*b)-768)),P=b/1024*(256+b*(b*(74-47*b)-128)),k=p/(h*w),E=2*Math.PI;for(;Math.abs(k-E)>1e-12;){n=Math.cos(2*v+k),s=Math.sin(k),o=Math.cos(k),E=k,k=p/(h*w)+P*s*(n+P/4*(o*(2*n*n-1)-P/6*n*(4*s*s-3)*(4*n*n-3)))}let C=A*s-y*o*g,S=Math.atan2(A*o+y*s*g,(1-l)*Math.sqrt(M*M+C*C)),T=l/16*x*(4+l*(4-3*x)),O=c+180*(Math.atan2(s*m,y*o-A*s*g)-(1-T)*l*M*(k+T*s*(n+T*o*(2*n*n-1))))/d,B=180*S/d;return L.latLng(O,B)}function Be(t,e,i,n,s=!0){let o,a,r,h=[];for(let l=0;l<i;l+=1){if(s)o=360*l/i+n,a=Oe(t,o,e),r=L.latLng(a.lng,a.lat);else{let n=t.lat+Math.cos(2*l*Math.PI/i)*e,s=t.lng+Math.sin(2*l*Math.PI/i)*e;r=L.latLng(n,s)}h.push(r)}return h}function De(t,e,i){let n=t.latLngToContainerPoint(e),s=t.latLngToContainerPoint(i),o=180*Math.atan2(s.y-n.y,s.x-n.x)/Math.PI+90;return o+=o<0?360:0,o}function Ie(t,e,i,n){return function(t,e,i){e=(e+360)%360;let n=Math.PI/180,s=180/Math.PI,{R:o}=L.CRS.Earth,a=t.lng*n,r=t.lat*n,h=e*n,l=Math.sin(r),c=Math.cos(r),u=Math.cos(i/o),p=Math.sin(i/o),d=Math.asin(l*u+c*p*Math.cos(h)),_=a+Math.atan2(Math.sin(h)*p*c,u-l*Math.sin(d));return _*=s,_=_>180?_-360:_<-180?_+360:_,L.latLng([d*s,_])}(e,De(t,e,i),n)}function Re(t,e=t.getLatLngs()){return t instanceof L.Polygon?L.polygon(e).getLatLngs():L.polyline(e).getLatLngs()}function ze(t,e){var i,n,s,o;if(null==(n=null==(i=e.options.crs)?void 0:i.projection)?void 0:n.MAX_LATITUDE){let i=null==(o=null==(s=e.options.crs)?void 0:s.projection)?void 0:o.MAX_LATITUDE;t.lat=Math.max(Math.min(i,t.lat),-i)}return t}function Ge(t){return t.options.renderer||t._map&&(t._map._getPaneRenderer(t.options.pane)||t._map.options.renderer||t._map._renderer)||t._renderer}var Ne=L.Class.extend({includes:[Me,Le,xe,be,Pe],initialize(t){this.map=t,this.Draw=new L.PM.Draw(t),this.Toolbar=new L.PM.Toolbar(t),this.Keyboard=ke(),this.globalOptions={snappable:!0,layerGroup:void 0,snappingOrder:["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"],panes:{vertexPane:"markerPane",layerPane:"overlayPane",markerPane:"markerPane"},draggable:!0},this.Keyboard._initKeyListener(t)},setLang(t="en",e,i="en"){if(t=t.trim().toLowerCase(),!/^[a-z]{2}$/.test(t)){let e=t.replace(/[-_\s]/g,"-").replace(/^(\w{2})$/,"$1-").match(/([a-z]{2})-?([a-z]{2})?/);if(e){let i=[`${e[1]}_${e[2]}`,`${e[1]}`];for(let e of i)if(ve[e]){t=e;break}}}let n=L.PM.activeLang;e&&(ve[t]=(0,ye.default)(ve[i],e)),L.PM.activeLang=t,this.map.pm.Toolbar.reinit(),this._fireLangChange(n,t,i,ve[t])},addControls(t){this.Toolbar.addControls(t)},removeControls(){this.Toolbar.removeControls()},toggleControls(){this.Toolbar.toggleControls()},controlsVisible(){return this.Toolbar.isVisible},enableDraw(t="Polygon",e){"Poly"===t&&(t="Polygon"),this.Draw.enable(t,e)},disableDraw(t="Polygon"){"Poly"===t&&(t="Polygon"),this.Draw.disable(t)},setPathOptions(t,e={}){let i=e.ignoreShapes||[],n=e.merge||!1;this.map.pm.Draw.shapes.forEach(e=>{-1===i.indexOf(e)&&this.map.pm.Draw[e].setPathOptions(t,n)})},getGlobalOptions(){return this.globalOptions},setGlobalOptions(t){let e=(0,ye.default)(this.globalOptions,t);e.editable&&(e.resizeableCircleMarker=e.editable,delete e.editable);let i=!1;this.map.pm.Draw.CircleMarker.enabled()&&!!this.map.pm.Draw.CircleMarker.options.resizeableCircleMarker!=!!e.resizeableCircleMarker&&(this.map.pm.Draw.CircleMarker.disable(),i=!0);let n=!1;this.map.pm.Draw.Circle.enabled()&&!!this.map.pm.Draw.Circle.options.resizeableCircle!=!!e.resizeableCircle&&(this.map.pm.Draw.Circle.disable(),n=!0),this.map.pm.Draw.shapes.forEach(t=>{this.map.pm.Draw[t].setOptions(e)}),i&&this.map.pm.Draw.CircleMarker.enable(),n&&this.map.pm.Draw.Circle.enable(),L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.setOptions(e)}),this.map.fire("pm:globaloptionschanged"),this.globalOptions=e,this.applyGlobalOptions()},applyGlobalOptions(){L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.enabled()&&t.pm.applyOptions()})},globalDrawModeEnabled(){return!!this.Draw.getActiveShape()},globalCutModeEnabled(){return!!this.Draw.Cut.enabled()},enableGlobalCutMode(t){return this.Draw.Cut.enable(t)},toggleGlobalCutMode(t){return this.Draw.Cut.toggle(t)},disableGlobalCutMode(){return this.Draw.Cut.disable()},getGeomanLayers(t=!1){let e=L.PM.Utils.findLayers(this.map);if(!t)return e;let i=L.featureGroup();return i._pmTempLayer=!0,e.forEach(t=>{i.addLayer(t)}),i},getGeomanDrawLayers(t=!1){let e=L.PM.Utils.findLayers(this.map).filter(t=>!0===t._drawnByGeoman);if(!t)return e;let i=L.featureGroup();return i._pmTempLayer=!0,e.forEach(t=>{i.addLayer(t)}),i},_getContainingLayer(){return this.globalOptions.layerGroup&&this.globalOptions.layerGroup instanceof L.LayerGroup?this.globalOptions.layerGroup:this.map},_isCRSSimple(){return this.map.options.crs===L.CRS.Simple},_touchEventCounter:0,_addTouchEvents(t){0===this._touchEventCounter&&(L.DomEvent.on(t,"touchmove",this._canvasTouchMove,this),L.DomEvent.on(t,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter+=1},_removeTouchEvents(t){1===this._touchEventCounter&&(L.DomEvent.off(t,"touchmove",this._canvasTouchMove,this),L.DomEvent.off(t,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter=this._touchEventCounter<=1?0:this._touchEventCounter-1},_canvasTouchMove(t){Ge(this.map)._onMouseMove(this._createMouseEvent("mousemove",t))},_canvasTouchClick(t){let e="";"touchstart"===t.type||"pointerdown"===t.type?e="mousedown":("touchend"===t.type||"pointerup"===t.type||"touchcancel"===t.type||"pointercancel"===t.type)&&(e="mouseup"),e&&Ge(this.map)._onClick(this._createMouseEvent(e,t))},_createMouseEvent(t,e){let i,n=e.touches[0]||e.changedTouches[0];try{i=new MouseEvent(t,{bubbles:e.bubbles,cancelable:e.cancelable,view:e.view,detail:n.detail,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,button:e.button,relatedTarget:e.relatedTarget})}catch{i=document.createEvent("MouseEvents"),i.initMouseEvent(t,e.bubbles,e.cancelable,e.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}return i}}),je=L.Control.extend({includes:[Pe],options:{position:"topleft",disableByOtherButtons:!0},initialize(t){this._button=L.Util.extend({},this.options,t)},onAdd(t){return this._map=t,this._map.pm.Toolbar.options.oneBlock?this._container=this._map.pm.Toolbar._createContainer(this.options.position):"edit"===this._button.tool?this._container=this._map.pm.Toolbar.editContainer:"options"===this._button.tool?this._container=this._map.pm.Toolbar.optionsContainer:"custom"===this._button.tool?this._container=this._map.pm.Toolbar.customContainer:this._container=this._map.pm.Toolbar.drawContainer,this._renderButton(),this._container},_renderButton(){let t=this.buttonsDomNode;this.buttonsDomNode=this._makeButton(this._button),t?t.replaceWith(this.buttonsDomNode):this._container.appendChild(this.buttonsDomNode)},onRemove(){return this.buttonsDomNode.remove(),this._container},getText(){return this._button.text},getIconUrl(){return this._button.iconUrl},destroy(){this._button={},this._update()},toggle(t){return this._button.toggleStatus="boolean"==typeof t?t:!this._button.toggleStatus,this._applyStyleClasses(),this._updateActiveAction(this._button),this._button.toggleStatus},toggled(){return this._button.toggleStatus},onCreate(){this.toggle(!1)},disable(){this.toggle(!1),this._button.disabled=!0,this._updateDisabled()},enable(){this._button.disabled=!1,this._updateDisabled(),this._updateActiveAction(this._button)},_triggerClick(t){t&&t.preventDefault(),!this._button.disabled&&(this._button.onClick(t,{button:this,event:t}),this._clicked(t),this._button.afterClick(t,{button:this,event:t}))},_makeButton(t){let e=this.options.position.indexOf("right")>-1?"pos-right":"",i=L.DomUtil.create("div",`button-container ${e}`,this._container);t.title&&i.setAttribute("title",t.title);let n=L.DomUtil.create("a","leaflet-buttons-control-button",i);n.setAttribute("role","button"),n.setAttribute("tabindex","0"),n.href="#";let s=L.DomUtil.create("div",`leaflet-pm-actions-container ${e}`,i),o=t.actions,a={cancel:{text:Ce("actions.cancel"),title:Ce("actions.cancel"),onClick(){this._triggerClick()}},finishMode:{text:Ce("actions.finish"),title:Ce("actions.finish"),onClick(){this._triggerClick()}},removeLastVertex:{text:Ce("actions.removeLastVertex"),title:Ce("actions.removeLastVertex"),onClick(){this._map.pm.Draw[t.jsClass]._removeLastVertex()}},finish:{text:Ce("actions.finish"),title:Ce("actions.finish"),onClick(e){this._map.pm.Draw[t.jsClass]._finishShape(e)}}};t._preparedActions=o.map(i=>{let n,o="string"==typeof i?i:i.name;if(a[o])n=a[o];else{if(!i.text)return n;n=i}let r=L.DomUtil.create("a",`leaflet-pm-action ${e} action-${o}`,s);if(r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.href="#",n.title&&(r.title=n.title),r.innerHTML=n.text,L.DomEvent.disableClickPropagation(r),L.DomEvent.on(r,"click",L.DomEvent.stop),n._node=r,!t.disabled&&n.onClick){let e=e=>{e.preventDefault();let i="",{buttons:s}=this._map.pm.Toolbar;for(let n in s)if(s[n]._button===t){i=n;break}this._fireActionClick(n,i,t)};L.DomEvent.addListener(r,"click",e,this),L.DomEvent.addListener(r,"click",n.onClick,this),L.DomEvent.addListener(r,"click",()=>this._updateActiveAction(t))}return n}),this._updateActiveAction(t),t.toggleStatus&&L.DomUtil.addClass(i,"active");let r=L.DomUtil.create("div","control-icon",n);return t.iconUrl&&r.setAttribute("src",t.iconUrl),t.className&&L.DomUtil.addClass(r,t.className),L.DomEvent.disableClickPropagation(n),L.DomEvent.on(n,"click",L.DomEvent.stop),t.disabled||(L.DomEvent.addListener(n,"click",this._onBtnClick,this),L.DomEvent.addListener(n,"click",this._triggerClick,this)),t.disabled&&(L.DomUtil.addClass(n,"pm-disabled"),n.setAttribute("aria-disabled","true")),i},_applyStyleClasses(){this._container&&(this._button.toggleStatus&&!1!==this._button.cssToggle?(L.DomUtil.addClass(this.buttonsDomNode,"active"),L.DomUtil.addClass(this._container,"activeChild")):(L.DomUtil.removeClass(this.buttonsDomNode,"active"),L.DomUtil.removeClass(this._container,"activeChild")))},_onBtnClick(){if(this._button.disabled)return;this._button.disableOtherButtons&&this._map.pm.Toolbar.triggerClickOnToggledButtons(this);let t="",{buttons:e}=this._map.pm.Toolbar;for(let i in e)if(e[i]._button===this._button){t=i;break}this._fireButtonClick(t,this._button)},_clicked(){this._button.doToggle&&this.toggle()},_updateDisabled(){if(!this._container)return;let t="pm-disabled",e=this.buttonsDomNode.children[0];this._button.disabled?(L.DomUtil.addClass(e,t),e.setAttribute("aria-disabled","true")):(L.DomUtil.removeClass(e,t),e.setAttribute("aria-disabled","false"))},_updateActiveAction(t){var e;null==(e=t._preparedActions)||e.forEach(t=>{(null==t?void 0:t._node)&&(t.isActive&&t.isActive.call(this)?L.DomUtil.addClass(t._node,"active-action"):L.DomUtil.removeClass(t._node,"active-action"))})}});L.Control.PMButton=je;var Fe=L.Class.extend({options:{drawMarker:!0,drawRectangle:!0,drawPolyline:!0,drawPolygon:!0,drawCircle:!0,drawCircleMarker:!0,drawText:!0,editMode:!0,dragMode:!0,cutPolygon:!0,removalMode:!0,rotateMode:!0,snappingOption:!0,drawControls:!0,editControls:!0,optionsControls:!0,customControls:!0,oneBlock:!1,position:"topleft",positions:{draw:"",edit:"",options:"",custom:""}},customButtons:[],initialize(t){this.customButtons=[],this.options.positions={draw:"",edit:"",options:"",custom:""},this.init(t)},reinit(){let t=this.isVisible;this.removeControls(),this._defineButtons(),t&&this.addControls()},init(t){this.map=t,this.buttons={},this.isVisible=!1,this.drawContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-draw leaflet-bar leaflet-control"),this.editContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-edit leaflet-bar leaflet-control"),this.optionsContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-options leaflet-bar leaflet-control"),this.customContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-custom leaflet-bar leaflet-control"),this._defineButtons()},_createContainer(t){let e=`${t}Container`;return this[e]||(this[e]=L.DomUtil.create("div",`leaflet-pm-toolbar leaflet-pm-${t} leaflet-bar leaflet-control`)),this[e]},getButtons(){return this.buttons},addControls(t=this.options){typeof t.editPolygon<"u"&&(t.editMode=t.editPolygon),typeof t.deleteLayer<"u"&&(t.removalMode=t.deleteLayer),L.Util.setOptions(this,t),this.applyIconStyle(),this.isVisible=!0,this._showHideButtons()},applyIconStyle(){let t=this.getButtons(),e={geomanIcons:{drawMarker:"control-icon leaflet-pm-icon-marker",drawPolyline:"control-icon leaflet-pm-icon-polyline",drawRectangle:"control-icon leaflet-pm-icon-rectangle",drawPolygon:"control-icon leaflet-pm-icon-polygon",drawCircle:"control-icon leaflet-pm-icon-circle",drawCircleMarker:"control-icon leaflet-pm-icon-circle-marker",editMode:"control-icon leaflet-pm-icon-edit",dragMode:"control-icon leaflet-pm-icon-drag",cutPolygon:"control-icon leaflet-pm-icon-cut",removalMode:"control-icon leaflet-pm-icon-delete",drawText:"control-icon leaflet-pm-icon-text"}};for(let i in t){let n=t[i];L.Util.setOptions(n,{className:e.geomanIcons[i]})}},removeControls(){let t=this.getButtons();for(let e in t)t[e].remove();this.isVisible=!1},toggleControls(t=this.options){this.isVisible?this.removeControls():this.addControls(t)},_addButton(t,e){return this.buttons[t]=e,this.options[t]=!!this.options[t]||!1,this.buttons[t]},triggerClickOnToggledButtons(t){for(let e in this.buttons){let i=this.buttons[e];i._button.disableByOtherButtons&&i!==t&&i.toggled()&&i._triggerClick()}},toggleButton(t,e,i=!0){"editPolygon"===t&&(t="editMode"),"deleteLayer"===t&&(t="removalMode");let n=t;return i&&this.triggerClickOnToggledButtons(this.buttons[n]),!!this.buttons[n]&&this.buttons[n].toggle(e)},_defineButtons(){let t={className:"control-icon leaflet-pm-icon-marker",title:Ce("buttonTitles.drawMarkerButton"),jsClass:"Marker",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},e={title:Ce("buttonTitles.drawPolyButton"),className:"control-icon leaflet-pm-icon-polygon",jsClass:"Polygon",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},i={className:"control-icon leaflet-pm-icon-polyline",title:Ce("buttonTitles.drawLineButton"),jsClass:"Line",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},n={title:Ce("buttonTitles.drawCircleButton"),className:"control-icon leaflet-pm-icon-circle",jsClass:"Circle",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},s={title:Ce("buttonTitles.drawCircleMarkerButton"),className:"control-icon leaflet-pm-icon-circle-marker",jsClass:"CircleMarker",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},o={title:Ce("buttonTitles.drawRectButton"),className:"control-icon leaflet-pm-icon-rectangle",jsClass:"Rectangle",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},a={title:Ce("buttonTitles.editButton"),className:"control-icon leaflet-pm-icon-edit",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalEditMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},r={title:Ce("buttonTitles.dragButton"),className:"control-icon leaflet-pm-icon-drag",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalDragMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},h={title:Ce("buttonTitles.cutButton"),className:"control-icon leaflet-pm-icon-cut",jsClass:"Cut",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle({snappable:!0,cursorMarker:!0,allowSelfIntersection:!1})},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finish","removeLastVertex","cancel"]},l={title:Ce("buttonTitles.deleteButton"),className:"control-icon leaflet-pm-icon-delete",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRemovalMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},c={title:Ce("buttonTitles.rotateButton"),className:"control-icon leaflet-pm-icon-rotate",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRotateMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},u={className:"control-icon leaflet-pm-icon-text",title:Ce("buttonTitles.drawTextButton"),jsClass:"Text",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]};this._addButton("drawMarker",new L.Control.PMButton(t)),this._addButton("drawPolyline",new L.Control.PMButton(i)),this._addButton("drawRectangle",new L.Control.PMButton(o)),this._addButton("drawPolygon",new L.Control.PMButton(e)),this._addButton("drawCircle",new L.Control.PMButton(n)),this._addButton("drawCircleMarker",new L.Control.PMButton(s)),this._addButton("drawText",new L.Control.PMButton(u)),this._addButton("editMode",new L.Control.PMButton(a)),this._addButton("dragMode",new L.Control.PMButton(r)),this._addButton("cutPolygon",new L.Control.PMButton(h)),this._addButton("removalMode",new L.Control.PMButton(l)),this._addButton("rotateMode",new L.Control.PMButton(c))},_showHideButtons(){if(!this.isVisible)return;this.removeControls(),this.isVisible=!0;let t=this.getButtons(),e=[];!1===this.options.drawControls&&(e=e.concat(Object.keys(t).filter(e=>!t[e]._button.tool))),!1===this.options.editControls&&(e=e.concat(Object.keys(t).filter(e=>"edit"===t[e]._button.tool))),!1===this.options.optionsControls&&(e=e.concat(Object.keys(t).filter(e=>"options"===t[e]._button.tool))),!1===this.options.customControls&&(e=e.concat(Object.keys(t).filter(e=>"custom"===t[e]._button.tool)));for(let i in t)if(this.options[i]&&-1===e.indexOf(i)){let e=t[i]._button.tool;e||(e="draw"),t[i].setPosition(this._getBtnPosition(e)),t[i].addTo(this.map)}},_getBtnPosition(t){return this.options.positions&&this.options.positions[t]?this.options.positions[t]:this.options.position},setBlockPosition(t,e){this.options.positions[t]=e,this._showHideButtons(),this.changeControlOrder()},getBlockPositions(){return this.options.positions},copyDrawControl(t,e){if(!e)throw new TypeError("Button has no name");"object"!=typeof e&&(e={name:e});let i=this._btnNameMapping(t);if(!e.name)throw new TypeError("Button has no name");if(this.buttons[e.name])throw new TypeError("Button with this name already exists");let n=this.map.pm.Draw.createNewDrawInstance(e.name,i);return e={...this.buttons[i]._button,...e},{drawInstance:n,control:this.createCustomControl(e)}},createCustomControl(t){if(!t.name)throw new TypeError("Button has no name");if(this.buttons[t.name])throw new TypeError("Button with this name already exists");t.onClick||(t.onClick=()=>{}),t.afterClick||(t.afterClick=()=>{}),!1!==t.toggle&&(t.toggle=!0),t.block&&(t.block=t.block.toLowerCase()),(!t.block||"draw"===t.block)&&(t.block=""),t.className?-1===t.className.indexOf("control-icon")&&(t.className=`control-icon ${t.className}`):t.className="control-icon";let e={tool:t.block,className:t.className,title:t.title||"",jsClass:t.name,onClick:t.onClick,afterClick:t.afterClick,doToggle:t.toggle,toggleStatus:!1,disableOtherButtons:t.disableOtherButtons??!0,disableByOtherButtons:t.disableByOtherButtons??!0,cssToggle:t.toggle,position:this.options.position,actions:t.actions||[],disabled:!!t.disabled};!1!==this.options[t.name]&&(this.options[t.name]=!0);let i=this._addButton(t.name,new L.Control.PMButton(e));return this.changeControlOrder(),i},controlExists(t){return!!this.getButton(t)},getButton(t){return this.getButtons()[t]},getButtonsInBlock(t){let e={};if(t)for(let i in this.getButtons()){let n=this.getButtons()[i];(n._button.tool===t||"draw"===t&&!n._button.tool)&&(e[i]=n)}return e},changeControlOrder(t=[]){let e=this._shapeMapping(),i=[];t.forEach(t=>{e[t]?i.push(e[t]):i.push(t)});let n=this.getButtons(),s={};i.forEach(t=>{n[t]&&(s[t]=n[t])}),Object.keys(n).filter(t=>!n[t]._button.tool||"draw"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(s[t]=n[t])}),Object.keys(n).filter(t=>"edit"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(s[t]=n[t])}),Object.keys(n).filter(t=>"options"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(s[t]=n[t])}),Object.keys(n).filter(t=>"custom"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(s[t]=n[t])}),Object.keys(n).forEach(t=>{-1===i.indexOf(t)&&(s[t]=n[t])}),this.map.pm.Toolbar.buttons=s,this._showHideButtons()},getControlOrder(){let t=this.getButtons(),e=[];for(let i in t)e.push(i);return e},changeActionsOfControl(t,e){let i=this._btnNameMapping(t);if(!i)throw new TypeError("No name passed");if(!e)throw new TypeError("No actions passed");if(!this.buttons[i])throw new TypeError("Button with this name not exists");this.buttons[i]._button.actions=e,this.changeControlOrder()},setButtonDisabled(t,e){let i=this._btnNameMapping(t);e?this.buttons[i].disable():this.buttons[i].enable()},_shapeMapping:()=>({Marker:"drawMarker",Circle:"drawCircle",Polygon:"drawPolygon",Rectangle:"drawRectangle",Polyline:"drawPolyline",Line:"drawPolyline",CircleMarker:"drawCircleMarker",Edit:"editMode",Drag:"dragMode",Cut:"cutPolygon",Removal:"removalMode",Rotate:"rotateMode",Text:"drawText"}),_btnNameMapping(t){let e=this._shapeMapping();return e[t]?e[t]:t}}),Ue=u(te()),Ze={_initSnappableMarkers(){this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,this._assignEvents(this._markers),this._layer.off("pm:dragstart",this._unsnap,this),this._layer.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){this._layer.off("pm:dragstart",this._unsnap,this)},_assignEvents(t){t.forEach(t=>{Array.isArray(t)?this._assignEvents(t):(t.off("drag",this._handleSnapping,this),t.on("drag",this._handleSnapping,this),t.off("dragend",this._cleanupSnapping,this),t.on("dragend",this._cleanupSnapping,this))})},_cleanupSnapping(t){if(t){t.target._snapped=!1}delete this._snapList,this.throttledList&&(this._map.off("layeradd",this.throttledList,this),this.throttledList=void 0),this._map.off("layerremove",this._handleSnapLayerRemoval,this),this.debugIndicatorLines&&this.debugIndicatorLines.forEach(t=>{t.remove()})},_handleThrottleSnapping(){this.throttledList&&this._createSnapList()},_handleSnapping(t){var e,i,n;let s=t.target;if(s._snapped=!1,this.throttledList||(this.throttledList=L.Util.throttle(this._handleThrottleSnapping,100,this)),(null==(e=null==t?void 0:t.originalEvent)?void 0:e.altKey)||(null==(n=null==(i=this._map)?void 0:i.pm)?void 0:n.Keyboard.isAltKeyPressed())||(void 0===this._snapList&&(this._createSnapList(),this._map.off("layeradd",this.throttledList,this),this._map.on("layeradd",this.throttledList,this)),this._snapList.length<=0))return!1;let o=this._calcClosestLayer(s.getLatLng(),this._snapList);if(0===Object.keys(o).length)return!1;let a,r=o.layer instanceof L.Marker||o.layer instanceof L.CircleMarker||!this.options.snapSegment;a=r?o.latlng:this._checkPrioritiySnapping(o);let h=this.options.snapDistance,l={marker:s,shape:this._shape,snapLatLng:a,segment:o.segment,layer:this._layer,workingLayer:this._layer,layerInteractedWith:o.layer,distance:o.distance};if(this._fireSnapDrag(l.marker,l),this._fireSnapDrag(this._layer,l),o.distance<h){s._orgLatLng=s.getLatLng(),s.setLatLng(a),s._snapped=!0,s._snapInfo=l;let t=()=>{this._snapLatLng=a,this._fireSnap(s,l),this._fireSnap(this._layer,l)},e=this._snapLatLng||{},i=a||{};(e.lat!==i.lat||e.lng!==i.lng)&&t()}else this._snapLatLng&&(this._unsnap(l),s._snapped=!1,s._snapInfo=void 0,this._fireUnsnap(l.marker,l),this._fireUnsnap(this._layer,l));return!0},_createSnapList(){let t=[],e=[],i=this._map;i.off("layerremove",this._handleSnapLayerRemoval,this),i.on("layerremove",this._handleSnapLayerRemoval,this),i.eachLayer(i=>{if((i instanceof L.Polyline||i instanceof L.Marker||i instanceof L.CircleMarker||i instanceof L.ImageOverlay)&&!0!==i.options.snapIgnore){if(void 0===i.options.snapIgnore&&(!L.PM.optIn&&!0===i.options.pmIgnore||L.PM.optIn&&!1!==i.options.pmIgnore))return;(i instanceof L.Circle||i instanceof L.CircleMarker)&&i.pm&&i.pm._hiddenPolyCircle?t.push(i.pm._hiddenPolyCircle):i instanceof L.ImageOverlay&&(i=L.rectangle(i.getBounds())),t.push(i);let n=L.polyline([],{color:"red",pmIgnore:!0});n._pmTempLayer=!0,e.push(n),(i instanceof L.Circle||i instanceof L.CircleMarker)&&e.push(n)}}),t=t.filter(t=>this._layer!==t),t=t.filter(t=>t._latlng||t._latlngs&&Se(t._latlngs)),t=t.filter(t=>!t._pmTempLayer),this._otherSnapLayers?(this._otherSnapLayers.forEach(()=>{let t=L.polyline([],{color:"red",pmIgnore:!0});t._pmTempLayer=!0,e.push(t)}),this._snapList=t.concat(this._otherSnapLayers)):this._snapList=t,this.debugIndicatorLines=e},_handleSnapLayerRemoval({layer:t}){if(!t._leaflet_id)return;let e=this._snapList.findIndex(e=>e._leaflet_id===t._leaflet_id);e>-1&&this._snapList.splice(e,1)},_calcClosestLayer(t,e){return this._calcClosestLayers(t,e,1)[0]},_calcClosestLayers(t,e,i=1){let n=[],s={};e.forEach((e,o)=>{var a;if(e._parentCopy&&e._parentCopy===this._layer||(null==(a=e.getLatLngs)?void 0:a.call(e).flat(5).length)<2)return;let r=this._calcLayerDistances(t,e);if(r.distance=Math.floor(r.distance),this.debugIndicatorLines){if(!this.debugIndicatorLines[o]){let t=L.polyline([],{color:"red",pmIgnore:!0});t._pmTempLayer=!0,this.debugIndicatorLines[o]=t}this.debugIndicatorLines[o].setLatLngs([t,r.latlng])}1===i&&(void 0===s.distance||r.distance-5<=s.distance)?(r.distance+5<s.distance&&(n=[]),s=r,s.layer=e,n.push(s)):1!==i&&(s={},s=r,s.layer=e,n.push(s))}),1!==i&&(n=n.sort((t,e)=>t.distance-e.distance)),-1===i&&(i=n.length);let o=this._getClosestLayerByPriority(n,i);return L.Util.isArray(o)?o:[o]},_calcLayerDistances(t,e){let i=this._map,n=e instanceof L.Marker||e instanceof L.CircleMarker,s=e instanceof L.Polygon,o=t;if(n){let t=e.getLatLng();return{latlng:{...t},distance:this._getDistance(i,t,o)}}return this._calcLatLngDistances(o,e.getLatLngs(),i,s)},_calcLatLngDistances(t,e,i,n=!1){let s,o,a,r=e=>{e.forEach((h,l)=>{if(Array.isArray(h))r(h);else if(this.options.snapSegment){let s,r=h;s=n?l+1===e.length?0:l+1:l+1===e.length?void 0:l+1;let c=e[s];if(c){let e=this._getDistanceToSegment(i,t,r,c);(void 0===o||e<o)&&(o=e,a=[r,c])}}else{let e=this._getDistance(i,t,h);(void 0===o||e<o)&&(o=e,s=h)}})};return r(e),this.options.snapSegment?{latlng:{...this._getClosestPointOnSegment(i,t,a[0],a[1])},segment:a,distance:o}:{latlng:s,distance:o}},_getClosestLayerByPriority(t,e=1){t=t.sort((t,e)=>t._leaflet_id-e._leaflet_id);let i=this._map.pm.globalOptions.snappingOrder||[],n=0,s={};return i.concat(["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"]).forEach(t=>{s[t]||(n+=1,s[t]=n)}),t.sort(function(t,e,i="asc"){if(!e||0===Object.keys(e).length)return(t,e)=>t-e;let n,s=Object.keys(e),o=s.length-1,a={};for(;o>=0;)n=s[o],a[n.toLowerCase()]=e[n],o-=1;function r(t){return t instanceof L.Marker?"Marker":t instanceof L.Circle?"Circle":t instanceof L.CircleMarker?"CircleMarker":t instanceof L.Rectangle?"Rectangle":t instanceof L.Polygon?"Polygon":t instanceof L.Polyline?"Line":void 0}return(t,e)=>{let n,s;if(n=r(t.layer).toLowerCase(),s=r(e.layer).toLowerCase(),!n||!s)return 0;let o=n in a?a[n]:Number.MAX_SAFE_INTEGER,h=s in a?a[s]:Number.MAX_SAFE_INTEGER,l=0;return o<h?l=-1:o>h&&(l=1),"desc"===i?-1*l:l}}(0,s)),1===e?t[0]||{}:t.slice(0,e)},_checkPrioritiySnapping(t){let e=this._map,i=t.segment[0],n=t.segment[1],s=t.latlng,o=s;if(this.options.snapVertex){let t=this._getDistance(e,i,s),a=this._getDistance(e,n,s),r=t<a?i:n,h=t<a?t:a;if(this.options.snapMiddle){let o=L.PM.Utils.calcMiddleLatLng(e,i,n),l=this._getDistance(e,o,s);l<t&&l<a&&(r=o,h=l)}h<this.options.snapDistance&&(o=r)}return{...o}},_unsnap(){delete this._snapLatLng},_getClosestPointOnSegment(t,e,i,n){let s=t.getMaxZoom();s===1/0&&(s=t.getZoom());let o=t.project(e,s),a=t.project(i,s),r=t.project(n,s),h=L.LineUtil.closestPointOnSegment(o,a,r);return t.unproject(h,s)},_getDistanceToSegment(t,e,i,n){let s=t.latLngToContainerPoint(e),o=t.latLngToContainerPoint(i),a=t.latLngToContainerPoint(n);return L.LineUtil.pointToSegmentDistance(s,o,a)},_getDistance:(t,e,i)=>t.latLngToContainerPoint(e).distanceTo(t.latLngToContainerPoint(i))},He=L.Class.extend({includes:[Ze,Pe],options:{snappable:!0,snapDistance:20,snapMiddle:!1,allowSelfIntersection:!0,tooltips:!0,templineStyle:{},hintlineStyle:{color:"#3388ff",dashArray:"5,5"},pathOptions:null,cursorMarker:!0,finishOn:null,markerStyle:{draggable:!0,icon:L.icon()},hideMiddleMarkers:!1,minRadiusCircle:null,maxRadiusCircle:null,minRadiusCircleMarker:null,maxRadiusCircleMarker:null,resizeableCircleMarker:!1,resizeableCircle:!0,markerEditable:!0,continueDrawing:!1,snapSegment:!0,requireSnapToFinish:!1,rectangleAngle:0,textOptions:{text:null,focusAfterDraw:null,removeIfEmpty:null,className:null},snapVertex:!0},setOptions(t){L.Util.setOptions(this,t),this.setStyle(this.options)},setStyle(){},getOptions(){return this.options},initialize(t){let e=new L.Icon.Default;e.options.tooltipAnchor=[0,0],this.options.markerStyle.icon=e,this._map=t,this.shapes=["Marker","CircleMarker","Line","Polygon","Rectangle","Circle","Cut","Text"],this.shapes.forEach(t=>{this[t]=new L.PM.Draw[t](this._map)}),this.Marker.setOptions({continueDrawing:!0}),this.CircleMarker.setOptions({continueDrawing:!0})},setPathOptions(t,e=!1){this.options.pathOptions=e?(0,Ue.default)(this.options.pathOptions,t):t},getShapes(){return this.shapes},getShape(){return this._shape},enable(t,e){if(!t)throw new Error(`Error: Please pass a shape as a parameter. Possible shapes are: ${this.getShapes().join(",")}`);this.disable(),this[t].enable(e)},disable(){this.shapes.forEach(t=>{this[t].disable()})},addControls(){this.shapes.forEach(t=>{this[t].addButton()})},getActiveShape(){let t;return this.shapes.forEach(e=>{this[e]._enabled&&(t=e)}),t},_setGlobalDrawMode(){"Cut"===this._shape?this._fireGlobalCutModeToggled():this._fireGlobalDrawModeToggled();let t=[];this._map.eachLayer(e=>{(e instanceof L.Polyline||e instanceof L.Marker||e instanceof L.Circle||e instanceof L.CircleMarker||e instanceof L.ImageOverlay)&&(e._pmTempLayer||t.push(e))}),this._enabled?t.forEach(t=>{L.PM.Utils.disablePopup(t)}):t.forEach(t=>{L.PM.Utils.enablePopup(t)})},createNewDrawInstance(t,e){let i=this._getShapeFromBtnName(e);if(this[t])throw new TypeError("Draw Type already exists");if(!L.PM.Draw[i])throw new TypeError(`There is no class L.PM.Draw.${i}`);return this[t]=new L.PM.Draw[i](this._map),this[t].toolbarButtonName=t,this[t]._shape=t,this.shapes.push(t),this[e]&&this[t].setOptions(this[e].options),this[t].setOptions(this[t].options),this[t]},_getShapeFromBtnName(t){let e={drawMarker:"Marker",drawCircle:"Circle",drawPolygon:"Polygon",drawPolyline:"Line",drawRectangle:"Rectangle",drawCircleMarker:"CircleMarker",editMode:"Edit",dragMode:"Drag",cutPolygon:"Cut",removalMode:"Removal",rotateMode:"Rotate",drawText:"Text"};return e[t]?e[t]:this[t]?this[t]._shape:t},_finishLayer(t){t.pm&&(t.pm.setOptions(this.options),t.pm._shape=this._shape,t.pm._map=this._map),this._addDrawnLayerProp(t)},_addDrawnLayerProp(t){t._drawnByGeoman=!0},_setPane(t,e){"layerPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":"vertexPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":"markerPane"===e&&(t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},_isFirstLayer(){return 0===(this._map||this._layer._map).pm.getGeomanLayers().length}});He.Marker=He.extend({initialize(t){this._map=t,this._shape="Marker",this.toolbarButtonName="drawMarker"},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._hintMarker=L.marker(this._map.getCenter(),this.options.markerStyle),this._setPane(this._hintMarker,"markerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.placeMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this.options.markerEditable&&this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.enable()}),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createMarker,this),this._hintMarker.remove(),this._map.off("mousemove",this._syncHintMarker,this),this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.disable()}),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},isRelevantMarker:t=>t instanceof L.Marker&&t.pm&&!t._pmTempLayer&&!t.pm._initTextMarker,_syncHintMarker(t){if(this._hintMarker.setLatLng(t.latlng),this.options.snappable){let e=t;e.target=this._hintMarker,this._handleSnapping(e)}this._fireChange(this._hintMarker.getLatLng(),"Draw")},_createMarker(t){if(!t.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=new L.Marker(e,this.options.markerStyle);this._setPane(i,"markerPane"),this._finishLayer(i),i.pm||(i.options.draggable=!1),i.addTo(this._map.pm._getContainingLayer()),i.pm&&this.options.markerEditable?i.pm.enable():i.dragging&&i.dragging.disable(),this._fireCreate(i),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},setStyle(){var t,e;(null==(t=this.options.markerStyle)?void 0:t.icon)&&(null==(e=this._hintMarker)||e.setIcon(this.options.markerStyle.icon))}});var qe=6371008.8,Ve={centimeters:100*qe,centimetres:100*qe,degrees:qe/111325,feet:3.28084*qe,inches:39.37*qe,kilometers:qe/1e3,kilometres:qe/1e3,meters:qe,metres:qe,miles:qe/1609.344,millimeters:1e3*qe,millimetres:1e3*qe,nauticalmiles:qe/1852,radians:1,yards:1.0936*qe};function We(t,e,i){void 0===i&&(i={});var n={type:"Feature"};return(0===i.id||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=e||{},n.geometry=t,n}function Ke(t,e,i){if(void 0===i&&(i={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Qe(t[0])||!Qe(t[1]))throw new Error("coordinates must contain numbers");return We({type:"Point",coordinates:t},e,i)}function Xe(t,e,i){if(void 0===i&&(i={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return We({type:"LineString",coordinates:t},e,i)}function Ye(t,e){void 0===e&&(e={});var i={type:"FeatureCollection"};return e.id&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.features=t,i}function $e(t){return 180*(t%(2*Math.PI))/Math.PI}function Je(t){return t%360*Math.PI/180}function Qe(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function ti(t){var e,i,n={type:"FeatureCollection",features:[]};if("LineString"===(i="Feature"===t.type?t.geometry:t).type)e=[i.coordinates];else if("MultiLineString"===i.type)e=i.coordinates;else if("MultiPolygon"===i.type)e=[].concat.apply([],i.coordinates);else{if("Polygon"!==i.type)throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");e=i.coordinates}return e.forEach(function(t){e.forEach(function(e){for(var i=0;i<t.length-1;i++)for(var s=i;s<e.length-1;s++)if(t!==e||1!==Math.abs(i-s)&&(0!==i||s!==t.length-2||t[i][0]!==t[t.length-1][0]||t[i][1]!==t[t.length-1][1])){var o=ei(t[i][0],t[i][1],t[i+1][0],t[i+1][1],e[s][0],e[s][1],e[s+1][0],e[s+1][1]);o&&n.features.push(Ke([o[0],o[1]]))}})}),n}function ei(t,e,i,n,s,o,a,r){var h,l,c,u,p={x:null,y:null,onLine1:!1,onLine2:!1};return 0===(h=(r-o)*(i-t)-(a-s)*(n-e))?null!==p.x&&null!==p.y&&p:(u=(i-t)*(l=e-o)-(n-e)*(c=t-s),l=((a-s)*l-(r-o)*c)/h,c=u/h,p.x=t+l*(i-t),p.y=e+l*(n-e),l>=0&&l<=1&&(p.onLine1=!0),c>=0&&c<=1&&(p.onLine2=!0),!(!p.onLine1||!p.onLine2)&&[p.x,p.y])}function ii(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function ni(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function si(t){return"Feature"===t.type?t.geometry:t}function oi(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}function ai(t,e,i){if(null!==t)for(var n,s,o,a,r,h,l,c,u=0,p=0,d=t.type,_="FeatureCollection"===d,m="Feature"===d,g=_?t.features.length:1,f=0;f<g;f++){r=(c=!!(l=_?t.features[f].geometry:m?t.geometry:t)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var y=0;y<r;y++){var A=0,v=0;if(null!==(a=c?l.geometries[y]:l)){h=a.coordinates;var M=a.type;switch(u=0,M){case null:break;case"Point":if(!1===e(h,p,f,A,v))return!1;p++,A++;break;case"LineString":case"MultiPoint":for(n=0;n<h.length;n++){if(!1===e(h[n],p,f,A,v))return!1;p++,"MultiPoint"===M&&A++}"LineString"===M&&A++;break;case"Polygon":case"MultiLineString":for(n=0;n<h.length;n++){for(s=0;s<h[n].length-u;s++){if(!1===e(h[n][s],p,f,A,v))return!1;p++}"MultiLineString"===M&&A++,"Polygon"===M&&v++}"Polygon"===M&&A++;break;case"MultiPolygon":for(n=0;n<h.length;n++){for(v=0,s=0;s<h[n].length;s++){for(o=0;o<h[n][s].length-u;o++){if(!1===e(h[n][s][o],p,f,A,v))return!1;p++}v++}A++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===ai(a.geometries[n],e))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ri(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var i=0;i<t.features.length&&!1!==e(t.features[i],i);i++);}function hi(t,e){!function(t,e){var i,n,s,o,a,r,h,l,c,u,p=0,d="FeatureCollection"===t.type,_="Feature"===t.type,m=d?t.features.length:1;for(i=0;i<m;i++){for(r=d?t.features[i].geometry:_?t.geometry:t,l=d?t.features[i].properties:_?t.properties:{},c=d?t.features[i].bbox:_?t.bbox:void 0,u=d?t.features[i].id:_?t.id:void 0,a=(h=!!r&&"GeometryCollection"===r.type)?r.geometries.length:1,s=0;s<a;s++)if(null!==(o=h?r.geometries[s]:r))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,p,l,c,u))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===e(o.geometries[n],p,l,c,u))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,l,c,u))return!1;p++}}(t,function(t,i,n,s,o){var a,r=null===t?null:t.type;switch(r){case null:case"Point":case"LineString":case"Polygon":return!1!==e(We(t,n,{bbox:s,id:o}),i,0)&&void 0}switch(r){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var h=0;h<t.coordinates.length;h++){var l=t.coordinates[h];if(!1===e(We({type:a,coordinates:l},n),i,h))return!1}})}He.Line=He.extend({initialize(t){this._map=t,this._shape="Line",this.toolbarButtonName="drawPolyline",this._doesSelfIntersect=!1},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._markers=[],this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.polyline([],{...this.options.templineStyle,pmIgnore:!1}),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._layerGroup.addLayer(this._layer),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createVertex,this),this.options.finishOn&&"snap"!==this.options.finishOn&&this._map.on(this.options.finishOn,this._finishShape,this),"dblclick"===this.options.finishOn&&(this.tempMapDoubleClickZoomState=this._map.doubleClickZoom._enabled,this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.disable()),this._map.on("mousemove",this._syncHintMarker,this),this._hintMarker.on("move",this._syncHintLine,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this.isRed=!1,this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createVertex,this),this._map.off("mousemove",this._syncHintMarker,this),this.options.finishOn&&"snap"!==this.options.finishOn&&this._map.off(this.options.finishOn,this._finishShape,this),this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.enable(),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_syncHintLine(){let t=this._layer.getLatLngs();if(t.length>0){let e=t[t.length-1];this._hintline.setLatLngs([e,this._hintMarker.getLatLng()])}},_syncHintMarker(t){if(this._hintMarker.setLatLng(t.latlng),this.options.snappable){let e=t;e.target=this._hintMarker,this._handleSnapping(e)}this.options.allowSelfIntersection||this._handleSelfIntersection(!0,this._hintMarker.getLatLng());let e=this._layer._defaultShape().slice();e.push(this._hintMarker.getLatLng()),this._change(e)},hasSelfIntersection(){return ti(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersection(t,e){let i=L.polyline(this._layer.getLatLngs());t&&(e||(e=this._hintMarker.getLatLng()),i.addLatLng(e));let n=ti(i.toGeoJSON(15));this._doesSelfIntersect=n.features.length>0,this._doesSelfIntersect?this.isRed||(this.isRed=!0,this._hintline.setStyle({color:"#f00000ff"}),this._fireIntersect(n,this._map,"Draw")):this._hintline.isEmpty()||(this.isRed=!1,this._hintline.setStyle(this.options.hintlineStyle))},_createVertex(t){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,t.latlng),this._doesSelfIntersect))return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=this._layer.getLatLngs(),n=i[i.length-1];if(e.equals(i[0])||i.length>0&&e.equals(n))return void this._finishShape();this._layer._latlngInfo=this._layer._latlngInfo||[],this._layer._latlngInfo.push({latlng:e,snapInfo:this._hintMarker._snapInfo}),this._layer.addLatLng(e);let s=this._createMarker(e);this._setTooltipText(),this._setHintLineAfterNewVertex(e),this._fireVertexAdded(s,void 0,e,"Draw"),this._change(this._layer.getLatLngs()),"snap"===this.options.finishOn&&this._hintMarker._snapped&&this._finishShape(t)},_setHintLineAfterNewVertex(t){this._hintline.setLatLngs([t,t])},_removeLastVertex(){let t=this._markers;if(t.length<=1)return void this.disable();let e=this._layer.getLatLngs(),i=t[t.length-1],{indexPath:n}=L.PM.Utils.findDeepMarkerIndex(t,i);t.pop(),this._layerGroup.removeLayer(i);let s=t[t.length-1],o=e.indexOf(s.getLatLng());e=e.slice(0,o+1),this._layer.setLatLngs(e),this._layer._latlngInfo.pop(),this._syncHintLine(),this._setTooltipText(),this._fireVertexRemoved(i,n,"Draw"),this._change(this._layer.getLatLngs())},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!1),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let t=this._layer.getLatLngs();if(t.length<=1)return;let e=L.polyline(t,this.options.pathOptions);this._setPane(e,"layerPane"),this._finishLayer(e),e.addTo(this._map.pm._getContainingLayer()),this._fireCreate(e),this.options.snappable&&this._cleanupSnapping();let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))},_createMarker(t){let e=new L.Marker(t,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this._layerGroup.addLayer(e),this._markers.push(e),e.on("click",this._finishShape,this),e},_setTooltipText(){let{length:t}=this._layer.getLatLngs().flat(),e="";e=Ce(t<=1?"tooltips.continueLine":"tooltips.finishLine"),this._hintMarker.setTooltipContent(e)},_change(t){this._fireChange(t,"Draw")},setStyle(){var t,e;null==(t=this._layer)||t.setStyle(this.options.templineStyle),null==(e=this._hintline)||e.setStyle(this.options.hintlineStyle)}}),He.Polygon=He.Line.extend({initialize(t){this._map=t,this._shape="Polygon",this.toolbarButtonName="drawPolygon"},enable(t){L.PM.Draw.Line.prototype.enable.call(this,t),this._layer.pm._shape="Polygon"},_createMarker(t){let e=new L.Marker(t,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this._layerGroup.addLayer(e),this._markers.push(e),1===this._layer.getLatLngs().flat().length?(e.on("click",this._finishShape,this),this._tempSnapLayerIndex=this._otherSnapLayers.push(e)-1,this.options.snappable&&this._cleanupSnapping()):e.on("click",()=>1),e},_setTooltipText(){let{length:t}=this._layer.getLatLngs().flat(),e="";e=Ce(t<=2?"tooltips.continueLine":"tooltips.finishPoly"),this._hintMarker.setTooltipContent(e)},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let t=this._layer.getLatLngs();if(t.length<=2)return;let e=L.polygon(t,this.options.pathOptions);this._setPane(e,"layerPane"),this._finishLayer(e),e.addTo(this._map.pm._getContainingLayer()),this._fireCreate(e),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex;let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))}}),He.Rectangle=He.extend({initialize(t){this._map=t,this._shape="Rectangle",this.toolbarButtonName="drawRectangle"},enable(t){if(L.Util.setOptions(this,t),this._enabled=!0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.rectangle([[0,0],[0,0]],this.options.pathOptions),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._startMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-start-marker"}),draggable:!1,zIndexOffset:-100,opacity:this.options.cursorMarker?1:0}),this._setPane(this._startMarker,"vertexPane"),this._startMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._startMarker),this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:150,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this.options.cursorMarker){this._styleMarkers=[];for(let t=0;t<2;t+=1){let t=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-style-marker"}),draggable:!1,zIndexOffset:100});this._setPane(t,"vertexPane"),t._pmTempLayer=!0,this._layerGroup.addLayer(t),this._styleMarkers.push(t)}}this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._placeStartingMarkers,this),this._map.on("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._finishShape,this),this._map.off("click",this._placeStartingMarkers,this),this._map.off("mousemove",this._syncHintMarker,this),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_placeStartingMarkers(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng();L.DomUtil.addClass(this._startMarker._icon,"visible"),this._startMarker.setLatLng(e),this.options.cursorMarker&&this._styleMarkers&&this._styleMarkers.forEach(t=>{L.DomUtil.addClass(t._icon,"visible"),t.setLatLng(e)}),this._map.off("click",this._placeStartingMarkers,this),this._map.on("click",this._finishShape,this),this._hintMarker.setTooltipContent(Ce("tooltips.finishRect")),this._setRectangleOrigin()},_setRectangleOrigin(){let t=this._startMarker.getLatLng();t&&(this._layerGroup.addLayer(this._layer),this._layer.setLatLngs([t,t]),this._hintMarker.on("move",this._syncRectangleSize,this))},_syncHintMarker(t){if(this._hintMarker.setLatLng(t.latlng),this.options.snappable){let e=t;e.target=this._hintMarker,this._handleSnapping(e)}let e=this._layerGroup&&this._layerGroup.hasLayer(this._layer)?this._layer.getLatLngs():[this._hintMarker.getLatLng()];this._fireChange(e,"Draw")},_syncRectangleSize(){let t=ze(this._startMarker.getLatLng(),this._map),e=ze(this._hintMarker.getLatLng(),this._map),i=L.PM.Utils._getRotatedRectangle(t,e,this.options.rectangleAngle||0,this._map);if(this._layer.setLatLngs(i),this.options.cursorMarker&&this._styleMarkers){let n=[];i.forEach(i=>{!i.equals(t,1e-8)&&!i.equals(e,1e-8)&&n.push(i)}),n.forEach((t,e)=>{try{this._styleMarkers[e].setLatLng(t)}catch{}})}},_findCorners(){let t=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(t[0],t[2],this.options.rectangleAngle||0,this._map)},_finishShape(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=this._startMarker.getLatLng();if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||i.equals(e))return;let n=L.rectangle([i,e],this.options.pathOptions);if(this.options.rectangleAngle){let t=L.PM.Utils._getRotatedRectangle(i,e,this.options.rectangleAngle||0,this._map);n.setLatLngs(t),n.pm&&n.pm._setAngle(this.options.rectangleAngle||0)}this._setPane(n,"layerPane"),this._finishLayer(n),n.addTo(this._map.pm._getContainingLayer()),this._fireCreate(n);let s=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(s))},setStyle(){var t;null==(t=this._layer)||t.setStyle(this.options.pathOptions)}}),He.CircleMarker=He.extend({initialize(t){this._map=t,this._shape="CircleMarker",this.toolbarButtonName="drawCircleMarker",this._layerIsDragging=!1,this._BaseCircleClass=L.CircleMarker,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._defaultRadius=10},enable(t){if(L.Util.setOptions(this,t),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),this._enabled=!0,this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._map.getContainer().classList.add("geoman-draw-cursor"),this.options[this._editableOption]){let t={};L.extend(t,this.options.templineStyle),t.radius=0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=new this._BaseCircleClass(this._map.getCenter(),t),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._centerMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon"}),draggable:!1,zIndexOffset:100}),this._setPane(this._centerMarker,"vertexPane"),this._centerMarker._pmTempLayer=!0,this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:110,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.startCircle"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._map.on("click",this._placeCenterMarker,this)}else this._map.on("click",this._createMarker,this),this._hintMarker=new this._BaseCircleClass(this._map.getCenter(),{radius:this._defaultRadius,...this.options.templineStyle}),this._setPane(this._hintMarker,"layerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this._layer=this._hintMarker,this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.placeCircleMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip();this._map.on("mousemove",this._syncHintMarker,this),this._extendingEnable(),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},_extendingEnable(){!this.options[this._editableOption]&&this.options.markerEditable&&this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.enable()}),this._layer.bringToBack()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this.options[this._editableOption]?(this._map.off("click",this._finishShape,this),this._map.off("click",this._placeCenterMarker,this),this._map.removeLayer(this._layerGroup)):(this._map.off("click",this._createMarker,this),this._extendingDisable(),this._hintMarker.remove()),this._map.off("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},_extendingDisable(){this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.disable()})},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_placeCenterMarker(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng),this._layerGroup.addLayer(this._layer),this._layerGroup.addLayer(this._centerMarker);let e=this._hintMarker.getLatLng();this._centerMarker.setLatLng(e),this._map.off("click",this._placeCenterMarker,this),this._map.on("click",this._finishShape,this),this._placeCircleCenter()},_placeCircleCenter(){let t=this._centerMarker.getLatLng();t&&(this._layer.setLatLng(t),this._hintMarker.on("move",this._syncHintLine,this),this._hintMarker.on("move",this._syncCircleRadius,this),this._hintMarker.setTooltipContent(Ce("tooltips.finishCircle")),this._fireCenterPlaced(),this._fireChange(this._layer.getLatLng(),"Draw"))},_syncHintLine(){let t=this._centerMarker.getLatLng(),e=this._getNewDestinationOfHintMarker();this._hintline.setLatLngs([t,e])},_syncCircleRadius(){let t=this._centerMarker.getLatLng(),e=this._hintMarker.getLatLng(),i=this._distanceCalculation(t,e);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(i)},_syncHintMarker(t){if(this._hintMarker.setLatLng(t.latlng),this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker()),this.options.snappable){let e=t;e.target=this._hintMarker,this._handleSnapping(e)}this._handleHintMarkerSnapping();let e=this._layerGroup&&this._layerGroup.hasLayer(this._centerMarker)?this._centerMarker.getLatLng():this._hintMarker.getLatLng();this._fireChange(e,"Draw")},isRelevantMarker:t=>t instanceof L.CircleMarker&&!(t instanceof L.Circle)&&t.pm&&!t._pmTempLayer,_createMarker(t){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||!t.latlng||this._layerIsDragging)return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=new this._BaseCircleClass(e,{radius:this._defaultRadius,...this.options.pathOptions});this._setPane(i,"layerPane"),this._finishLayer(i),i.addTo(this._map.pm._getContainingLayer()),this._extendingCreateMarker(i),this._fireCreate(i),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},_extendingCreateMarker(t){t.pm&&this.options.markerEditable&&t.pm.enable()},_finishShape(t){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._centerMarker.getLatLng(),i=this._defaultRadius;if(this.options[this._editableOption]){let t=this._hintMarker.getLatLng();i=this._distanceCalculation(e,t),this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?i=this.options[this._minRadiusOption]:this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&(i=this.options[this._maxRadiusOption])}let n={...this.options.pathOptions,radius:i},s=new this._BaseCircleClass(e,n);this._setPane(s,"layerPane"),this._finishLayer(s),s.addTo(this._map.pm._getContainingLayer()),s.pm&&s.pm._updateHiddenPolyCircle(),this._fireCreate(s);let o=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(o))},_getNewDestinationOfHintMarker(){let t=this._hintMarker.getLatLng();if(this.options[this._editableOption]){if(!this._layerGroup.hasLayer(this._centerMarker))return t;let e=this._centerMarker.getLatLng(),i=this._distanceCalculation(e,t);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?t=Ie(this._map,e,t,this._getMinDistanceInMeter()):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&(t=Ie(this._map,e,t,this._getMaxDistanceInMeter()))}return t},_getMinDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,this._centerMarker.getLatLng())},_getMaxDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,this._centerMarker.getLatLng())},_handleHintMarkerSnapping(){if(this.options[this._editableOption]){if(this._hintMarker._snapped){let t=this._centerMarker.getLatLng(),e=this._hintMarker.getLatLng(),i=this._distanceCalculation(t,e);this._layerGroup.hasLayer(this._centerMarker)&&(this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]||this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption])&&this._hintMarker.setLatLng(this._hintMarker._orgLatLng)}this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker())}},setStyle(){var t,e;let i={};L.extend(i,this.options.templineStyle),this.options[this._editableOption]&&(i.radius=0),null==(t=this._layer)||t.setStyle(i),null==(e=this._hintline)||e.setStyle(this.options.hintlineStyle)},_distanceCalculation(t,e){return this._map.project(t).distanceTo(this._map.project(e))}}),He.Circle=He.CircleMarker.extend({initialize(t){this._map=t,this._shape="Circle",this.toolbarButtonName="drawCircle",this._BaseCircleClass=L.Circle,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._defaultRadius=100},_extendingEnable(){},_extendingDisable(){},_extendingCreateMarker(){},isRelevantMarker(){},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_distanceCalculation(t,e){return this._map.distance(t,e)}});var li=function(t){if(!t)throw new Error("geojson is required");var e=[];return hi(t,function(t){!function(t,e){var i=[],n=t.geometry;if(null!==n){switch(n.type){case"Polygon":i=ni(n);break;case"LineString":i=[ni(n)]}i.forEach(function(i){var n=function(t,e){var i=[];return t.reduce(function(t,n){var s=Xe([t,n],e);return s.bbox=function(t,e){var i=t[0],n=t[1],s=e[0],o=e[1],a=i<s?i:s,r=n<o?n:o,h=i>s?i:s,l=n>o?n:o;return[a,r,h,l]}(t,n),i.push(s),n}),i}(i,t.properties);n.forEach(function(t){t.id=e.length,e.push(t)})})}}(t,e)}),Ye(e)},ci=u(fe(),1);function ui(t,e){var i=ni(t),n=ni(e);if(2!==i.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==n.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var s=i[0][0],o=i[0][1],a=i[1][0],r=i[1][1],h=n[0][0],l=n[0][1],c=n[1][0],u=n[1][1],p=(u-l)*(a-s)-(c-h)*(r-o);if(0===p)return null;var d=((c-h)*(o-l)-(u-l)*(s-h))/p,_=((a-s)*(o-l)-(r-o)*(s-h))/p;return d>=0&&d<=1&&_>=0&&_<=1?Ke([s+d*(a-s),o+d*(r-o)]):null}var pi=function(t,e){var i={},n=[];if("LineString"===t.type&&(t=We(t)),"LineString"===e.type&&(e=We(e)),"Feature"===t.type&&"Feature"===e.type&&null!==t.geometry&&null!==e.geometry&&"LineString"===t.geometry.type&&"LineString"===e.geometry.type&&2===t.geometry.coordinates.length&&2===e.geometry.coordinates.length){var s=ui(t,e);return s&&n.push(s),Ye(n)}var o=(0,ci.default)();return o.load(li(e)),ri(li(t),function(t){ri(o.search(t),function(e){var s=ui(t,e);if(s){var o=ni(s).join(",");i[o]||(i[o]=!0,n.push(s))}})}),Ye(n)},di=u(fe(),1);var _i=function(t,e,i){void 0===i&&(i={});var n=ii(t),s=ii(e),o=Je(s[1]-n[1]),a=Je(s[0]-n[0]),r=Je(n[1]),h=Je(s[1]),l=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(r)*Math.cos(h);return function(t,e){void 0===e&&(e="kilometers");var i=Ve[e];if(!i)throw new Error(e+" units is invalid");return t*i}(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),i.units)};var mi=function(t){var e=t[0],i=t[1],n=t[2],s=t[3];if(_i(t.slice(0,2),[n,i])>=_i(t.slice(0,2),[e,s])){var o=(i+s)/2;return[e,o-(n-e)/2,n,o+(n-e)/2]}var a=(e+n)/2;return[a-(s-i)/2,i,a+(s-i)/2,s]};function gi(t){var e=[1/0,1/0,-1/0,-1/0];return ai(t,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}gi.default=gi;var fi=gi;var yi=function(t,e){void 0===e&&(e={});var i=e.precision,n=e.coordinates,s=e.mutate;if(i=null==i||isNaN(i)?6:i,n=null==n||isNaN(n)?3:n,!t)throw new Error("<geojson> is required");if("number"!=typeof i)throw new Error("<precision> must be a number");if("number"!=typeof n)throw new Error("<coordinates> must be a number");(!1===s||void 0===s)&&(t=JSON.parse(JSON.stringify(t)));var o=Math.pow(10,i);return ai(t,function(t){!function(t,e,i){t.length>i&&t.splice(i,t.length);for(var n=0;n<t.length;n++)t[n]=Math.round(t[n]*e)/e}(t,o,n)}),t};function Ai(t,e,i){if(void 0===i&&(i={}),!0===i.final)return function(t,e){var i=Ai(e,t);return i=(i+180)%360,i}(t,e);var n=ii(t),s=ii(e),o=Je(n[0]),a=Je(s[0]),r=Je(n[1]),h=Je(s[1]),l=Math.sin(a-o)*Math.cos(h),c=Math.cos(r)*Math.sin(h)-Math.sin(r)*Math.cos(h)*Math.cos(a-o);return $e(Math.atan2(l,c))}function vi(t,e,i,n){void 0===n&&(n={});var s=ii(t),o=Je(s[0]),a=Je(s[1]),r=Je(i),h=function(t,e){void 0===e&&(e="kilometers");var i=Ve[e];if(!i)throw new Error(e+" units is invalid");return t/i}(e,n.units),l=Math.asin(Math.sin(a)*Math.cos(h)+Math.cos(a)*Math.sin(h)*Math.cos(r));return Ke([$e(o+Math.atan2(Math.sin(r)*Math.sin(h)*Math.cos(a),Math.cos(h)-Math.sin(a)*Math.sin(l))),$e(l)],n.properties)}var Mi=function(t,e,i){void 0===i&&(i={});var n=Ke([1/0,1/0],{dist:1/0}),s=0;return hi(t,function(t){for(var o=ni(t),a=0;a<o.length-1;a++){var r=Ke(o[a]);r.properties.dist=_i(e,r,i);var h=Ke(o[a+1]);h.properties.dist=_i(e,h,i);var l=_i(r,h,i),c=Math.max(r.properties.dist,h.properties.dist),u=Ai(r,h),p=vi(e,c,u+90,i),d=vi(e,c,u-90,i),_=pi(Xe([p.geometry.coordinates,d.geometry.coordinates]),Xe([r.geometry.coordinates,h.geometry.coordinates])),m=null;_.features.length>0&&((m=_.features[0]).properties.dist=_i(e,m,i),m.properties.location=s+_i(r,m,i)),r.properties.dist<n.properties.dist&&((n=r).properties.index=a,n.properties.location=s),h.properties.dist<n.properties.dist&&((n=h).properties.index=a+1,n.properties.location=s+l),m&&m.properties.dist<n.properties.dist&&((n=m).properties.index=a),s+=l}}),n};function Li(t,e){var i=[],n=(0,di.default)();return hi(e,function(e){if(i.forEach(function(t,e){t.id=e}),i.length){var s=n.search(e);if(s.features.length){var o=bi(e,s);i=i.filter(function(t){return t.id!==o.id}),n.remove(o),ri(xi(o,e),function(t){i.push(t),n.insert(t)})}}else(i=xi(t,e).features).forEach(function(t){t.bbox||(t.bbox=mi(fi(t)))}),n.load(Ye(i))}),Ye(i)}function xi(t,e){var i=[],n=ni(t)[0],s=ni(t)[t.geometry.coordinates.length-1];if(wi(n,ii(e))||wi(s,ii(e)))return Ye([t]);var o=(0,di.default)(),a=li(t);o.load(a);var r=o.search(e);if(!r.features.length)return Ye([t]);var h=bi(e,r),l=function(t,e,i){var n=i;return ri(t,function(t,s){n=0===s&&void 0===i?t:e(n,t,s)}),n}(a,function(t,n,s){var o=ni(n)[1],a=ii(e);return s===h.id?(t.push(a),i.push(Xe(t)),wi(a,o)?[a]:[a,o]):(t.push(o),t)},[n]);return l.length>1&&i.push(Xe(l)),Ye(i)}function bi(t,e){if(!e.features.length)throw new Error("lines must contain features");if(1===e.features.length)return e.features[0];var i,n=1/0;return ri(e,function(e){var s=Mi(e,t).properties.dist;s<n&&(i=e,n=s)}),i}function wi(t,e){return t[0]===e[0]&&t[1]===e[1]}var Pi=function(t,e){if(!t)throw new Error("line is required");if(!e)throw new Error("splitter is required");var i=oi(t),n=oi(e);if("LineString"!==i)throw new Error("line must be LineString");if("FeatureCollection"===n)throw new Error("splitter cannot be a FeatureCollection");if("GeometryCollection"===n)throw new Error("splitter cannot be a GeometryCollection");var s=yi(e,{precision:7});switch(n){case"Point":return xi(t,s);case"MultiPoint":return Li(t,s);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return Li(t,pi(t,s))}};function ki(t,e,i){if(void 0===i&&(i={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var n=ii(t),s=si(e),o=s.type,a=e.bbox,r=s.coordinates;if(a&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(n,a))return!1;"Polygon"===o&&(r=[r]);for(var h=!1,l=0;l<r.length&&!h;l++)if(Ei(n,r[l][0],i.ignoreBoundary)){for(var c=!1,u=1;u<r[l].length&&!c;)Ei(n,r[l][u],!i.ignoreBoundary)&&(c=!0),u++;c||(h=!0)}return h}function Ei(t,e,i){var n=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var s=0,o=e.length-1;s<e.length;o=s++){var a=e[s][0],r=e[s][1],h=e[o][0],l=e[o][1];if(t[1]*(a-h)+r*(h-t[0])+l*(t[0]-a)===0&&(a-t[0])*(h-t[0])<=0&&(r-t[1])*(l-t[1])<=0)return!i;r>t[1]!=l>t[1]&&t[0]<(h-a)*(t[1]-r)/(l-r)+a&&(n=!n)}return n}function Ci(t,e,i,n,s){var o=i[0],a=i[1],r=t[0],h=t[1],l=e[0],c=e[1],u=l-r,p=c-h,d=(i[0]-r)*p-(i[1]-h)*u;if(null!==s){if(Math.abs(d)>s)return!1}else if(0!==d)return!1;return n?"start"===n?Math.abs(u)>=Math.abs(p)?u>0?r<o&&o<=l:l<=o&&o<r:p>0?h<a&&a<=c:c<=a&&a<h:"end"===n?Math.abs(u)>=Math.abs(p)?u>0?r<=o&&o<l:l<o&&o<=r:p>0?h<=a&&a<c:c<a&&a<=h:"both"===n&&(Math.abs(u)>=Math.abs(p)?u>0?r<o&&o<l:l<o&&o<r:p>0?h<a&&a<c:c<a&&a<h):Math.abs(u)>=Math.abs(p)?u>0?r<=o&&o<=l:l<=o&&o<=r:p>0?h<=a&&a<=c:c<=a&&a<=h}var Si=function(t,e,i){void 0===i&&(i={});for(var n=ii(t),s=ni(e),o=0;o<s.length-1;o++){var a=!1;if(i.ignoreEndVertices&&(0===o&&(a="start"),o===s.length-2&&(a="end"),0===o&&o+1===s.length-1&&(a="both")),Ci(s[o],s[o+1],n,a,typeof i.epsilon>"u"?null:i.epsilon))return!0}return!1};function Ti(t,e){var i=si(t),n=si(e),s=i.type,o=n.type,a=i.coordinates,r=n.coordinates;switch(s){case"Point":if("Point"===o)return Bi(a,r);throw new Error("feature2 "+o+" geometry not supported");case"MultiPoint":switch(o){case"Point":return function(t,e){var i,n=!1;for(i=0;i<t.coordinates.length;i++)if(Bi(t.coordinates[i],e.coordinates)){n=!0;break}return n}(i,n);case"MultiPoint":return function(t,e){for(var i=0,n=e.coordinates;i<n.length;i++){for(var s=n[i],o=!1,a=0,r=t.coordinates;a<r.length;a++){if(Bi(s,r[a])){o=!0;break}}if(!o)return!1}return!0}(i,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"Point":return Si(n,i,{ignoreEndVertices:!0});case"LineString":return function(t,e){for(var i=!1,n=0,s=e.coordinates;n<s.length;n++){var o=s[n];if(Si({type:"Point",coordinates:o},t,{ignoreEndVertices:!0})&&(i=!0),!Si({type:"Point",coordinates:o},t,{ignoreEndVertices:!1}))return!1}return i}(i,n);case"MultiPoint":return function(t,e){for(var i=!1,n=0,s=e.coordinates;n<s.length;n++){var o=s[n];if(Si(o,t,{ignoreEndVertices:!0})&&(i=!0),!Si(o,t))return!1}return!!i}(i,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"Point":return ki(n,i,{ignoreBoundary:!0});case"LineString":return function(t,e){var i=!1,n=0,s=fi(t),o=fi(e);if(!Oi(s,o))return!1;for(;n<e.coordinates.length-1;n++){if(ki({type:"Point",coordinates:Di(e.coordinates[n],e.coordinates[n+1])},t,{ignoreBoundary:!0})){i=!0;break}}return i}(i,n);case"Polygon":return function(t,e){if("Feature"===t.type&&null===t.geometry||"Feature"===e.type&&null===e.geometry)return!1;var i=fi(t),n=fi(e);if(!Oi(i,n))return!1;for(var s=si(e).coordinates,o=0,a=s;o<a.length;o++)for(var r=a[o],h=0,l=r;h<l.length;h++){if(!ki(l[h],t))return!1}return!0}(i,n);case"MultiPoint":return function(t,e){for(var i=0,n=e.coordinates;i<n.length;i++){if(!ki(n[i],t,{ignoreBoundary:!0}))return!1}return!0}(i,n);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+s+" geometry not supported")}}function Oi(t,e){return!(t[0]>e[0]||t[2]<e[2]||t[1]>e[1]||t[3]<e[3])}function Bi(t,e){return t[0]===e[0]&&t[1]===e[1]}function Di(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}var Ii=u(pe()),Ri=t=>()=>t,zi=t=>{let e=t?(e,i)=>i.minus(e).abs().isLessThanOrEqualTo(t):Ri(!1);return(t,i)=>e(t,i)?0:t.comparedTo(i)};function Gi(t){let e=t?(e,i,n,s,o)=>e.exponentiatedBy(2).isLessThanOrEqualTo(s.minus(i).exponentiatedBy(2).plus(o.minus(n).exponentiatedBy(2)).times(t)):Ri(!1);return(t,i,n)=>{let s=t.x,o=t.y,a=n.x,r=n.y,h=o.minus(r).times(i.x.minus(a)).minus(s.minus(a).times(i.y.minus(r)));return e(h,s,o,a,r)?0:h.comparedTo(0)}}var Ni=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,ji=Math.ceil,Fi=Math.floor,Ui="[BigNumber Error] ",Zi=Ui+"Number primitive has more than 15 significant digits: ",Hi=1e14,qi=14,Vi=9007199254740991,Wi=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Ki=1e7,Xi=1e9;function Yi(t){var e=0|t;return t>0||t===e?e:e-1}function $i(t){for(var e,i,n=1,s=t.length,o=t[0]+"";n<s;){for(e=t[n++]+"",i=qi-e.length;i--;e="0"+e);o+=e}for(s=o.length;48===o.charCodeAt(--s););return o.slice(0,s+1||1)}function Ji(t,e){var i,n,s=t.c,o=e.c,a=t.s,r=e.s,h=t.e,l=e.e;if(!a||!r)return null;if(i=s&&!s[0],n=o&&!o[0],i||n)return i?n?0:-r:a;if(a!=r)return a;if(i=a<0,n=h==l,!s||!o)return n?0:!s^i?1:-1;if(!n)return h>l^i?1:-1;for(r=(h=s.length)<(l=o.length)?h:l,a=0;a<r;a++)if(s[a]!=o[a])return s[a]>o[a]^i?1:-1;return h==l?0:h>l^i?1:-1}function Qi(t,e,i,n){if(t<e||t>i||t!==Fi(t))throw Error(Ui+(n||"Argument")+("number"==typeof t?t<e||t>i?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function tn(t){var e=t.c.length-1;return Yi(t.e/qi)==e&&t.c[e]%2!=0}function en(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function nn(t,e,i){var n,s;if(e<0){for(s=i+".";++e;s+=i);t=s+t}else if(++e>(n=t.length)){for(s=i,e-=n;--e;s+=i);t+=s}else e<n&&(t=t.slice(0,e)+"."+t.slice(e));return t}var sn=function t(e){var i,n,s,o,a,r=M.prototype={constructor:M,toString:null,valueOf:null},h=new M(1),l=20,c=4,u=-7,p=21,d=-1e7,_=1e7,m=!1,g=1,f=0,y={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},A="0123456789abcdefghijklmnopqrstuvwxyz",v=!0;function M(t,e){var i,o,a,r,h,u,p,m,g=this;if(!(g instanceof M))return new M(t,e);if(null==e){if(t&&!0===t._isBigNumber)return g.s=t.s,void(!t.c||t.e>_?g.c=g.e=null:t.e<d?g.c=[g.e=0]:(g.e=t.e,g.c=t.c.slice()));if((u="number"==typeof t)&&0*t==0){if(g.s=1/t<0?(t=-t,-1):1,t===~~t){for(r=0,h=t;h>=10;h/=10,r++);return void(r>_?g.c=g.e=null:(g.e=r,g.c=[t]))}m=String(t)}else{if(!Ni.test(m=String(t)))return s(g,m,u);g.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(r=m.indexOf("."))>-1&&(m=m.replace(".","")),(h=m.search(/e/i))>0?(r<0&&(r=h),r+=+m.slice(h+1),m=m.substring(0,h)):r<0&&(r=m.length)}else{if(Qi(e,2,A.length,"Base"),10==e&&v)return w(g=new M(t),l+g.e+1,c);if(m=String(t),u="number"==typeof t){if(0*t!=0)return s(g,m,u,e);if(g.s=1/t<0?(m=m.slice(1),-1):1,M.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(Zi+t)}else g.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(i=A.slice(0,e),r=h=0,p=m.length;h<p;h++)if(i.indexOf(o=m.charAt(h))<0){if("."==o){if(h>r){r=p;continue}}else if(!a&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){a=!0,h=-1,r=0;continue}return s(g,String(t),u,e)}u=!1,(r=(m=n(m,e,10,g.s)).indexOf("."))>-1?m=m.replace(".",""):r=m.length}for(h=0;48===m.charCodeAt(h);h++);for(p=m.length;48===m.charCodeAt(--p););if(m=m.slice(h,++p)){if(p-=h,u&&M.DEBUG&&p>15&&(t>Vi||t!==Fi(t)))throw Error(Zi+g.s*t);if((r=r-h-1)>_)g.c=g.e=null;else if(r<d)g.c=[g.e=0];else{if(g.e=r,g.c=[],h=(r+1)%qi,r<0&&(h+=qi),h<p){for(h&&g.c.push(+m.slice(0,h)),p-=qi;h<p;)g.c.push(+m.slice(h,h+=qi));h=qi-(m=m.slice(h)).length}else h-=p;for(;h--;m+="0");g.c.push(+m)}}else g.c=[g.e=0]}function L(t,e,i,n){var s,o,a,r,h;if(null==i?i=c:Qi(i,0,8),!t.c)return t.toString();if(s=t.c[0],a=t.e,null==e)h=$i(t.c),h=1==n||2==n&&(a<=u||a>=p)?en(h,a):nn(h,a,"0");else if(o=(t=w(new M(t),e,i)).e,r=(h=$i(t.c)).length,1==n||2==n&&(e<=o||o<=u)){for(;r<e;h+="0",r++);h=en(h,o)}else if(e-=a,h=nn(h,o,"0"),o+1>r){if(--e>0)for(h+=".";e--;h+="0");}else if((e+=o-r)>0)for(o+1==r&&(h+=".");e--;h+="0");return t.s<0&&s?"-"+h:h}function x(t,e){for(var i,n,s=1,o=new M(t[0]);s<t.length;s++)(!(n=new M(t[s])).s||(i=Ji(o,n))===e||0===i&&o.s===e)&&(o=n);return o}function b(t,e,i){for(var n=1,s=e.length;!e[--s];e.pop());for(s=e[0];s>=10;s/=10,n++);return(i=n+i*qi-1)>_?t.c=t.e=null:i<d?t.c=[t.e=0]:(t.e=i,t.c=e),t}function w(t,e,i,n){var s,o,a,r,h,l,c,u=t.c,p=Wi;if(u){t:{for(s=1,r=u[0];r>=10;r/=10,s++);if((o=e-s)<0)o+=qi,a=e,h=u[l=0],c=Fi(h/p[s-a-1]%10);else if((l=ji((o+1)/qi))>=u.length){if(!n)break t;for(;u.length<=l;u.push(0));h=c=0,s=1,a=(o%=qi)-qi+1}else{for(h=r=u[l],s=1;r>=10;r/=10,s++);c=(a=(o%=qi)-qi+s)<0?0:Fi(h/p[s-a-1]%10)}if(n=n||e<0||null!=u[l+1]||(a<0?h:h%p[s-a-1]),n=i<4?(c||n)&&(0==i||i==(t.s<0?3:2)):c>5||5==c&&(4==i||n||6==i&&(o>0?a>0?h/p[s-a]:0:u[l-1])%10&1||i==(t.s<0?8:7)),e<1||!u[0])return u.length=0,n?(e-=t.e+1,u[0]=p[(qi-e%qi)%qi],t.e=-e||0):u[0]=t.e=0,t;if(0==o?(u.length=l,r=1,l--):(u.length=l+1,r=p[qi-o],u[l]=a>0?Fi(h/p[s-a]%p[a])*r:0),n)for(;;){if(0==l){for(o=1,a=u[0];a>=10;a/=10,o++);for(a=u[0]+=r,r=1;a>=10;a/=10,r++);o!=r&&(t.e++,u[0]==Hi&&(u[0]=1));break}if(u[l]+=r,u[l]!=Hi)break;u[l--]=0,r=1}for(o=u.length;0===u[--o];u.pop());}t.e>_?t.c=t.e=null:t.e<d&&(t.c=[t.e=0])}return t}function P(t){var e,i=t.e;return null===i?t.toString():(e=$i(t.c),e=i<=u||i>=p?en(e,i):nn(e,i,"0"),t.s<0?"-"+e:e)}return M.clone=t,M.ROUND_UP=0,M.ROUND_DOWN=1,M.ROUND_CEIL=2,M.ROUND_FLOOR=3,M.ROUND_HALF_UP=4,M.ROUND_HALF_DOWN=5,M.ROUND_HALF_EVEN=6,M.ROUND_HALF_CEIL=7,M.ROUND_HALF_FLOOR=8,M.EUCLID=9,M.config=M.set=function(t){var e,i;if(null!=t){if("object"!=typeof t)throw Error(Ui+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(Qi(i=t[e],0,Xi,e),l=i),t.hasOwnProperty(e="ROUNDING_MODE")&&(Qi(i=t[e],0,8,e),c=i),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((i=t[e])&&i.pop?(Qi(i[0],-Xi,0,e),Qi(i[1],0,Xi,e),u=i[0],p=i[1]):(Qi(i,-Xi,Xi,e),u=-(p=i<0?-i:i))),t.hasOwnProperty(e="RANGE"))if((i=t[e])&&i.pop)Qi(i[0],-Xi,-1,e),Qi(i[1],1,Xi,e),d=i[0],_=i[1];else{if(Qi(i,-Xi,Xi,e),!i)throw Error(Ui+e+" cannot be zero: "+i);d=-(_=i<0?-i:i)}if(t.hasOwnProperty(e="CRYPTO")){if((i=t[e])!==!!i)throw Error(Ui+e+" not true or false: "+i);if(i){if(!(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes)))throw m=!i,Error(Ui+"crypto unavailable");m=i}else m=i}if(t.hasOwnProperty(e="MODULO_MODE")&&(Qi(i=t[e],0,9,e),g=i),t.hasOwnProperty(e="POW_PRECISION")&&(Qi(i=t[e],0,Xi,e),f=i),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(i=t[e]))throw Error(Ui+e+" not an object: "+i);y=i}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(i=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(i))throw Error(Ui+e+" invalid: "+i);v="0123456789"==i.slice(0,10),A=i}}return{DECIMAL_PLACES:l,ROUNDING_MODE:c,EXPONENTIAL_AT:[u,p],RANGE:[d,_],CRYPTO:m,MODULO_MODE:g,POW_PRECISION:f,FORMAT:y,ALPHABET:A}},M.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!M.DEBUG)return!0;var e,i,n=t.c,s=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&s>=-Xi&&s<=Xi&&s===Fi(s)){if(0===n[0]){if(0===s&&1===n.length)return!0;break t}if((e=(s+1)%qi)<1&&(e+=qi),String(n[0]).length==e){for(e=0;e<n.length;e++)if((i=n[e])<0||i>=Hi||i!==Fi(i))break t;if(0!==i)return!0}}}else if(null===n&&null===s&&(null===o||1===o||-1===o))return!0;throw Error(Ui+"Invalid BigNumber: "+t)},M.maximum=M.max=function(){return x(arguments,-1)},M.minimum=M.min=function(){return x(arguments,1)},M.random=(o=9007199254740992,a=Math.random()*o&2097151?function(){return Fi(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,i,n,s,o,r=0,c=[],u=new M(h);if(null==t?t=l:Qi(t,0,Xi),s=ji(t/qi),m)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(s*=2));r<s;)(o=131072*e[r]+(e[r+1]>>>11))>=9e15?(i=crypto.getRandomValues(new Uint32Array(2)),e[r]=i[0],e[r+1]=i[1]):(c.push(o%1e14),r+=2);r=s/2}else{if(!crypto.randomBytes)throw m=!1,Error(Ui+"crypto unavailable");for(e=crypto.randomBytes(s*=7);r<s;)(o=281474976710656*(31&e[r])+1099511627776*e[r+1]+4294967296*e[r+2]+16777216*e[r+3]+(e[r+4]<<16)+(e[r+5]<<8)+e[r+6])>=9e15?crypto.randomBytes(7).copy(e,r):(c.push(o%1e14),r+=7);r=s/7}if(!m)for(;r<s;)(o=a())<9e15&&(c[r++]=o%1e14);for(s=c[--r],t%=qi,s&&t&&(o=Wi[qi-t],c[r]=Fi(s/o)*o);0===c[r];c.pop(),r--);if(r<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=qi);for(r=1,o=c[0];o>=10;o/=10,r++);r<qi&&(n-=qi-r)}return u.e=n,u.c=c,u}),M.sum=function(){for(var t=1,e=arguments,i=new M(e[0]);t<e.length;)i=i.plus(e[t++]);return i},n=function(){var t="0123456789";function e(t,e,i,n){for(var s,o,a=[0],r=0,h=t.length;r<h;){for(o=a.length;o--;a[o]*=e);for(a[0]+=n.indexOf(t.charAt(r++)),s=0;s<a.length;s++)a[s]>i-1&&(null==a[s+1]&&(a[s+1]=0),a[s+1]+=a[s]/i|0,a[s]%=i)}return a.reverse()}return function(n,s,o,a,r){var h,u,p,d,_,m,g,y,v=n.indexOf("."),L=l,x=c;for(v>=0&&(d=f,f=0,n=n.replace(".",""),m=(y=new M(s)).pow(n.length-v),f=d,y.c=e(nn($i(m.c),m.e,"0"),10,o,t),y.e=y.c.length),p=d=(g=e(n,s,o,r?(h=A,t):(h=t,A))).length;0==g[--d];g.pop());if(!g[0])return h.charAt(0);if(v<0?--p:(m.c=g,m.e=p,m.s=a,g=(m=i(m,y,L,x,o)).c,_=m.r,p=m.e),v=g[u=p+L+1],d=o/2,_=_||u<0||null!=g[u+1],_=x<4?(null!=v||_)&&(0==x||x==(m.s<0?3:2)):v>d||v==d&&(4==x||_||6==x&&1&g[u-1]||x==(m.s<0?8:7)),u<1||!g[0])n=_?nn(h.charAt(1),-L,h.charAt(0)):h.charAt(0);else{if(g.length=u,_)for(--o;++g[--u]>o;)g[u]=0,u||(++p,g=[1].concat(g));for(d=g.length;!g[--d];);for(v=0,n="";v<=d;n+=h.charAt(g[v++]));n=nn(n,p,h.charAt(0))}return n}}(),i=function(){function t(t,e,i){var n,s,o,a,r=0,h=t.length,l=e%Ki,c=e/Ki|0;for(t=t.slice();h--;)r=((s=l*(o=t[h]%Ki)+(n=c*o+(a=t[h]/Ki|0)*l)%Ki*Ki+r)/i|0)+(n/Ki|0)+c*a,t[h]=s%i;return r&&(t=[r].concat(t)),t}function e(t,e,i,n){var s,o;if(i!=n)o=i>n?1:-1;else for(s=o=0;s<i;s++)if(t[s]!=e[s]){o=t[s]>e[s]?1:-1;break}return o}function i(t,e,i,n){for(var s=0;i--;)t[i]-=s,s=t[i]<e[i]?1:0,t[i]=s*n+t[i]-e[i];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(n,s,o,a,r){var h,l,c,u,p,d,_,m,g,f,y,A,v,L,x,b,P,k=n.s==s.s?1:-1,E=n.c,C=s.c;if(!(E&&E[0]&&C&&C[0]))return new M(n.s&&s.s&&(E?!C||E[0]!=C[0]:C)?E&&0==E[0]||!C?0*k:k/0:NaN);for(g=(m=new M(k)).c=[],k=o+(l=n.e-s.e)+1,r||(r=Hi,l=Yi(n.e/qi)-Yi(s.e/qi),k=k/qi|0),c=0;C[c]==(E[c]||0);c++);if(C[c]>(E[c]||0)&&l--,k<0)g.push(1),u=!0;else{for(L=E.length,b=C.length,c=0,k+=2,(p=Fi(r/(C[0]+1)))>1&&(C=t(C,p,r),E=t(E,p,r),b=C.length,L=E.length),v=b,y=(f=E.slice(0,b)).length;y<b;f[y++]=0);P=C.slice(),P=[0].concat(P),x=C[0],C[1]>=r/2&&x++;do{if(p=0,(h=e(C,f,b,y))<0){if(A=f[0],b!=y&&(A=A*r+(f[1]||0)),(p=Fi(A/x))>1)for(p>=r&&(p=r-1),_=(d=t(C,p,r)).length,y=f.length;1==e(d,f,_,y);)p--,i(d,b<_?P:C,_,r),_=d.length,h=1;else 0==p&&(h=p=1),_=(d=C.slice()).length;if(_<y&&(d=[0].concat(d)),i(f,d,y,r),y=f.length,-1==h)for(;e(C,f,b,y)<1;)p++,i(f,b<y?P:C,y,r),y=f.length}else 0===h&&(p++,f=[0]);g[c++]=p,f[0]?f[y++]=E[v]||0:(f=[E[v]],y=1)}while((v++<L||null!=f[0])&&k--);u=null!=f[0],g[0]||g.splice(0,1)}if(r==Hi){for(c=1,k=g[0];k>=10;k/=10,c++);w(m,o+(m.e=c+l*qi-1)+1,a,u)}else m.e=l,m.r=+u;return m}}(),s=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,i=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,s=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,r,h){var l,c=r?a:a.replace(s,"");if(n.test(c))o.s=isNaN(c)?null:c<0?-1:1;else{if(!r&&(c=c.replace(t,function(t,e,i){return l="x"==(i=i.toLowerCase())?16:"b"==i?2:8,h&&h!=l?t:e}),h&&(l=h,c=c.replace(e,"$1").replace(i,"0.$1")),a!=c))return new M(c,l);if(M.DEBUG)throw Error(Ui+"Not a"+(h?" base "+h:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),r.absoluteValue=r.abs=function(){var t=new M(this);return t.s<0&&(t.s=1),t},r.comparedTo=function(t,e){return Ji(this,new M(t,e))},r.decimalPlaces=r.dp=function(t,e){var i,n,s,o=this;if(null!=t)return Qi(t,0,Xi),null==e?e=c:Qi(e,0,8),w(new M(o),t+o.e+1,e);if(!(i=o.c))return null;if(n=((s=i.length-1)-Yi(this.e/qi))*qi,s=i[s])for(;s%10==0;s/=10,n--);return n<0&&(n=0),n},r.dividedBy=r.div=function(t,e){return i(this,new M(t,e),l,c)},r.dividedToIntegerBy=r.idiv=function(t,e){return i(this,new M(t,e),0,1)},r.exponentiatedBy=r.pow=function(t,e){var i,n,s,o,a,r,l,u,p=this;if((t=new M(t)).c&&!t.isInteger())throw Error(Ui+"Exponent not an integer: "+P(t));if(null!=e&&(e=new M(e)),a=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return u=new M(Math.pow(+P(p),a?t.s*(2-tn(t)):+P(t))),e?u.mod(e):u;if(r=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new M(NaN);(n=!r&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&tn(t)?-0:0,p.e>-1&&(o=1/o),new M(r?1/o:o);f&&(o=ji(f/qi+2))}for(a?(i=new M(.5),r&&(t.s=1),l=tn(t)):l=(s=Math.abs(+P(t)))%2,u=new M(h);;){if(l){if(!(u=u.times(p)).c)break;o?u.c.length>o&&(u.c.length=o):n&&(u=u.mod(e))}if(s){if(0===(s=Fi(s/2)))break;l=s%2}else if(w(t=t.times(i),t.e+1,1),t.e>14)l=tn(t);else{if(0===(s=+P(t)))break;l=s%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(e))}return n?u:(r&&(u=h.div(u)),e?u.mod(e):o?w(u,f,c,undefined):u)},r.integerValue=function(t){var e=new M(this);return null==t?t=c:Qi(t,0,8),w(e,e.e+1,t)},r.isEqualTo=r.eq=function(t,e){return 0===Ji(this,new M(t,e))},r.isFinite=function(){return!!this.c},r.isGreaterThan=r.gt=function(t,e){return Ji(this,new M(t,e))>0},r.isGreaterThanOrEqualTo=r.gte=function(t,e){return 1===(e=Ji(this,new M(t,e)))||0===e},r.isInteger=function(){return!!this.c&&Yi(this.e/qi)>this.c.length-2},r.isLessThan=r.lt=function(t,e){return Ji(this,new M(t,e))<0},r.isLessThanOrEqualTo=r.lte=function(t,e){return-1===(e=Ji(this,new M(t,e)))||0===e},r.isNaN=function(){return!this.s},r.isNegative=function(){return this.s<0},r.isPositive=function(){return this.s>0},r.isZero=function(){return!!this.c&&0==this.c[0]},r.minus=function(t,e){var i,n,s,o,a=this,r=a.s;if(e=(t=new M(t,e)).s,!r||!e)return new M(NaN);if(r!=e)return t.s=-e,a.plus(t);var h=a.e/qi,l=t.e/qi,u=a.c,p=t.c;if(!h||!l){if(!u||!p)return u?(t.s=-e,t):new M(p?a:NaN);if(!u[0]||!p[0])return p[0]?(t.s=-e,t):new M(u[0]?a:3==c?-0:0)}if(h=Yi(h),l=Yi(l),u=u.slice(),r=h-l){for((o=r<0)?(r=-r,s=u):(l=h,s=p),s.reverse(),e=r;e--;s.push(0));s.reverse()}else for(n=(o=(r=u.length)<(e=p.length))?r:e,r=e=0;e<n;e++)if(u[e]!=p[e]){o=u[e]<p[e];break}if(o&&(s=u,u=p,p=s,t.s=-t.s),(e=(n=p.length)-(i=u.length))>0)for(;e--;u[i++]=0);for(e=Hi-1;n>r;){if(u[--n]<p[n]){for(i=n;i&&!u[--i];u[i]=e);--u[i],u[n]+=Hi}u[n]-=p[n]}for(;0==u[0];u.splice(0,1),--l);return u[0]?b(t,u,l):(t.s=3==c?-1:1,t.c=[t.e=0],t)},r.modulo=r.mod=function(t,e){var n,s,o=this;return t=new M(t,e),!o.c||!t.s||t.c&&!t.c[0]?new M(NaN):!t.c||o.c&&!o.c[0]?new M(o):(9==g?(s=t.s,t.s=1,n=i(o,t,0,3),t.s=s,n.s*=s):n=i(o,t,0,g),!(t=o.minus(n.times(t))).c[0]&&1==g&&(t.s=o.s),t)},r.multipliedBy=r.times=function(t,e){var i,n,s,o,a,r,h,l,c,u,p,d,_,m,g,f=this,y=f.c,A=(t=new M(t,e)).c;if(!(y&&A&&y[0]&&A[0]))return!f.s||!t.s||y&&!y[0]&&!A||A&&!A[0]&&!y?t.c=t.e=t.s=null:(t.s*=f.s,y&&A?(t.c=[0],t.e=0):t.c=t.e=null),t;for(n=Yi(f.e/qi)+Yi(t.e/qi),t.s*=f.s,(h=y.length)<(u=A.length)&&(_=y,y=A,A=_,s=h,h=u,u=s),s=h+u,_=[];s--;_.push(0));for(m=Hi,g=Ki,s=u;--s>=0;){for(i=0,p=A[s]%g,d=A[s]/g|0,o=s+(a=h);o>s;)i=((l=p*(l=y[--a]%g)+(r=d*l+(c=y[a]/g|0)*p)%g*g+_[o]+i)/m|0)+(r/g|0)+d*c,_[o--]=l%m;_[o]=i}return i?++n:_.splice(0,1),b(t,_,n)},r.negated=function(){var t=new M(this);return t.s=-t.s||null,t},r.plus=function(t,e){var i,n=this,s=n.s;if(e=(t=new M(t,e)).s,!s||!e)return new M(NaN);if(s!=e)return t.s=-e,n.minus(t);var o=n.e/qi,a=t.e/qi,r=n.c,h=t.c;if(!o||!a){if(!r||!h)return new M(s/0);if(!r[0]||!h[0])return h[0]?t:new M(r[0]?n:0*s)}if(o=Yi(o),a=Yi(a),r=r.slice(),s=o-a){for(s>0?(a=o,i=h):(s=-s,i=r),i.reverse();s--;i.push(0));i.reverse()}for((s=r.length)-(e=h.length)<0&&(i=h,h=r,r=i,e=s),s=0;e;)s=(r[--e]=r[e]+h[e]+s)/Hi|0,r[e]=Hi===r[e]?0:r[e]%Hi;return s&&(r=[s].concat(r),++a),b(t,r,a)},r.precision=r.sd=function(t,e){var i,n,s,o=this;if(null!=t&&t!==!!t)return Qi(t,1,Xi),null==e?e=c:Qi(e,0,8),w(new M(o),t,e);if(!(i=o.c))return null;if(n=(s=i.length-1)*qi+1,s=i[s]){for(;s%10==0;s/=10,n--);for(s=i[0];s>=10;s/=10,n++);}return t&&o.e+1>n&&(n=o.e+1),n},r.shiftedBy=function(t){return Qi(t,-Vi,Vi),this.times("1e"+t)},r.squareRoot=r.sqrt=function(){var t,e,n,s,o,a=this,r=a.c,h=a.s,u=a.e,p=l+4,d=new M("0.5");if(1!==h||!r||!r[0])return new M(!h||h<0&&(!r||r[0])?NaN:r?a:1/0);if(0==(h=Math.sqrt(+P(a)))||h==1/0?(((e=$i(r)).length+u)%2==0&&(e+="0"),h=Math.sqrt(+e),u=Yi((u+1)/2)-(u<0||u%2),h==1/0?e="5e"+u:e=(e=h.toExponential()).slice(0,e.indexOf("e")+1)+u,n=new M(e)):n=new M(h+""),n.c[0])for((h=(u=n.e)+p)<3&&(h=0);;)if(o=n,n=d.times(o.plus(i(a,o,p,1))),$i(o.c).slice(0,h)===(e=$i(n.c)).slice(0,h)){if(n.e<u&&--h,"9999"!=(e=e.slice(h-3,h+1))&&(s||"4999"!=e)){(!+e||!+e.slice(1)&&"5"==e.charAt(0))&&(w(n,n.e+l+2,1),t=!n.times(n).eq(a));break}if(!s&&(w(o,o.e+l+2,0),o.times(o).eq(a))){n=o;break}p+=4,h+=4,s=1}return w(n,n.e+l+1,c,t)},r.toExponential=function(t,e){return null!=t&&(Qi(t,0,Xi),t++),L(this,t,e,1)},r.toFixed=function(t,e){return null!=t&&(Qi(t,0,Xi),t=t+this.e+1),L(this,t,e)},r.toFormat=function(t,e,i){var n,s=this;if(null==i)null!=t&&e&&"object"==typeof e?(i=e,e=null):t&&"object"==typeof t?(i=t,t=e=null):i=y;else if("object"!=typeof i)throw Error(Ui+"Argument not an object: "+i);if(n=s.toFixed(t,e),s.c){var o,a=n.split("."),r=+i.groupSize,h=+i.secondaryGroupSize,l=i.groupSeparator||"",c=a[0],u=a[1],p=s.s<0,d=p?c.slice(1):c,_=d.length;if(h&&(o=r,r=h,h=o,_-=o),r>0&&_>0){for(o=_%r||r,c=d.substr(0,o);o<_;o+=r)c+=l+d.substr(o,r);h>0&&(c+=l+d.slice(o)),p&&(c="-"+c)}n=u?c+(i.decimalSeparator||"")+((h=+i.fractionGroupSize)?u.replace(new RegExp("\\d{"+h+"}\\B","g"),"$&"+(i.fractionGroupSeparator||"")):u):c}return(i.prefix||"")+n+(i.suffix||"")},r.toFraction=function(t){var e,n,s,o,a,r,l,u,p,d,m,g,f=this,y=f.c;if(null!=t&&(!(l=new M(t)).isInteger()&&(l.c||1!==l.s)||l.lt(h)))throw Error(Ui+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+P(l));if(!y)return new M(f);for(e=new M(h),p=n=new M(h),s=u=new M(h),g=$i(y),a=e.e=g.length-f.e-1,e.c[0]=Wi[(r=a%qi)<0?qi+r:r],t=!t||l.comparedTo(e)>0?a>0?e:p:l,r=_,_=1/0,l=new M(g),u.c[0]=0;d=i(l,e,0,1),1!=(o=n.plus(d.times(s))).comparedTo(t);)n=s,s=o,p=u.plus(d.times(o=p)),u=o,e=l.minus(d.times(o=e)),l=o;return o=i(t.minus(n),s,0,1),u=u.plus(o.times(p)),n=n.plus(o.times(s)),u.s=p.s=f.s,m=i(p,s,a*=2,c).minus(f).abs().comparedTo(i(u,n,a,c).minus(f).abs())<1?[p,s]:[u,n],_=r,m},r.toNumber=function(){return+P(this)},r.toPrecision=function(t,e){return null!=t&&Qi(t,1,Xi),L(this,t,e,2)},r.toString=function(t){var e,i=this,s=i.s,o=i.e;return null===o?s?(e="Infinity",s<0&&(e="-"+e)):e="NaN":(null==t?e=o<=u||o>=p?en($i(i.c),o):nn($i(i.c),o,"0"):10===t&&v?e=nn($i((i=w(new M(i),l+o+1,c)).c),i.e,"0"):(Qi(t,2,A.length,"Base"),e=n(nn($i(i.c),o,"0"),10,t,s,!0)),s<0&&i.c[0]&&(e="-"+e)),e},r.valueOf=r.toJSON=function(){return P(this)},r._isBigNumber=!0,r[Symbol.toStringTag]="BigNumber",r[Symbol.for("nodejs.util.inspect.custom")]=r.valueOf,null!=e&&M.set(e),M}(),on=sn,an=class{constructor(t){n(this,"key"),n(this,"left",null),n(this,"right",null),this.key=t}},rn=class extends an{constructor(t){super(t)}},hn=class{constructor(){n(this,"size",0),n(this,"modificationCount",0),n(this,"splayCount",0)}splay(t){let e=this.root;if(null==e)return this.compare(t,t),-1;let i,n=null,s=null,o=null,a=null,r=e,h=this.compare;for(;;)if(i=h(r.key,t),i>0){let e=r.left;if(null==e||(i=h(e.key,t),i>0&&(r.left=e.right,e.right=r,r=e,e=r.left,null==e)))break;null==n?s=r:n.left=r,n=r,r=e}else{if(!(i<0))break;{let e=r.right;if(null==e||(i=h(e.key,t),i<0&&(r.right=e.left,e.left=r,r=e,e=r.right,null==e)))break;null==o?a=r:o.right=r,o=r,r=e}}return null!=o&&(o.right=r.left,r.left=a),null!=n&&(n.left=r.right,r.right=s),this.root!==r&&(this.root=r,this.splayCount++),i}splayMin(t){let e=t,i=e.left;for(;null!=i;){let t=i;e.left=t.right,t.right=e,e=t,i=e.left}return e}splayMax(t){let e=t,i=e.right;for(;null!=i;){let t=i;e.right=t.left,t.left=e,e=t,i=e.right}return e}_delete(t){if(null==this.root||0!=this.splay(t))return null;let e=this.root,i=e,n=e.left;if(this.size--,null==n)this.root=e.right;else{let t=e.right;e=this.splayMax(n),e.right=t,this.root=e}return this.modificationCount++,i}addNewRoot(t,e){this.size++,this.modificationCount++;let i=this.root;null!=i?(e<0?(t.left=i,t.right=i.right,i.right=null):(t.right=i,t.left=i.left,i.left=null),this.root=t):this.root=t}_first(){let t=this.root;return null==t?null:(this.root=this.splayMin(t),this.root)}_last(){let t=this.root;return null==t?null:(this.root=this.splayMax(t),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(t){return this.validKey(t)&&0==this.splay(t)}defaultCompare(){return(t,e)=>t<e?-1:t>e?1:0}wrap(){return{getRoot:()=>this.root,setRoot:t=>{this.root=t},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:t=>{this.splayCount=t},splay:t=>this.splay(t),has:t=>this.has(t)}}},ln=class i extends hn{constructor(e,i){super(),n(this,"root",null),n(this,"compare"),n(this,"validKey"),n(this,t,"[object Set]"),this.compare=e??this.defaultCompare(),this.validKey=i??(t=>null!=t&&null!=t)}delete(t){return!!this.validKey(t)&&null!=this._delete(t)}deleteAll(t){for(let e of t)this.delete(e)}forEach(t){let e,i=this[Symbol.iterator]();for(;e=i.next(),!e.done;)t(e.value,e.value,this)}add(t){let e=this.splay(t);return 0!=e&&this.addNewRoot(new rn(t),e),this}addAndReturn(t){let e=this.splay(t);return 0!=e&&this.addNewRoot(new rn(t),e),this.root.key}addAll(t){for(let e of t)this.add(e)}isEmpty(){return null==this.root}isNotEmpty(){return null!=this.root}single(){if(0==this.size)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(0==this.size)throw"Bad state: No element";return this._first().key}last(){if(0==this.size)throw"Bad state: No element";return this._last().key}lastBefore(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)<0)return this.root.key;let e=this.root.left;if(null==e)return null;let i=e.right;for(;null!=i;)e=i,i=e.right;return e.key}firstAfter(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)>0)return this.root.key;let e=this.root.right;if(null==e)return null;let i=e.left;for(;null!=i;)e=i,i=e.left;return e.key}retainAll(t){let e=new i(this.compare,this.validKey),n=this.modificationCount;for(let i of t){if(n!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(i)&&0==this.splay(i)&&e.add(this.root.key)}e.size!=this.size&&(this.root=e.root,this.size=e.size,this.modificationCount++)}lookup(t){return this.validKey(t)&&0==this.splay(t)?this.root.key:null}intersection(t){let e=new i(this.compare,this.validKey);for(let i of this)t.has(i)&&e.add(i);return e}difference(t){let e=new i(this.compare,this.validKey);for(let i of this)t.has(i)||e.add(i);return e}union(t){let e=this.clone();return e.addAll(t),e}clone(){let t=new i(this.compare,this.validKey);return t.size=this.size,t.root=this.copyNode(this.root),t}copyNode(t){if(null==t)return null;let e=new rn(t.key);return function t(e,i){let n,s;do{if(n=e.left,s=e.right,null!=n){let e=new rn(n.key);i.left=e,t(n,e)}if(null!=s){let t=new rn(s.key);i.right=t,e=s,i=t}}while(null!=s)}(t,e),e}toSet(){return this.clone()}entries(){return new pn(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[(e=Symbol.iterator,t=Symbol.toStringTag,e)](){return new un(this.wrap())}},cn=class{constructor(t){n(this,"tree"),n(this,"path",new Array),n(this,"modificationCount",null),n(this,"splayCount"),this.tree=t,this.splayCount=t.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;let t=this.path[this.path.length-1];return this.getValue(t)}rebuildPath(t){this.path.splice(0,this.path.length),this.tree.splay(t),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(t){for(;null!=t;)this.path.push(t),t=t.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(null==this.modificationCount){this.modificationCount=this.tree.getModificationCount();let t=this.tree.getRoot();for(;null!=t;)this.path.push(t),t=t.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let t=this.path[this.path.length-1],e=t.right;if(null!=e){for(;null!=e;)this.path.push(e),e=e.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===t;)t=this.path.pop();return this.path.length>0}},un=class extends cn{getValue(t){return t.key}},pn=class extends cn{getValue(t){return[t.key,t.key]}},dn=t=>t,_n=t=>{if(t){let e=new ln(zi(t)),i=new ln(zi(t)),n=(t,e)=>e.addAndReturn(t),s=t=>({x:n(t.x,e),y:n(t.y,i)});return s({x:new on(0),y:new on(0)}),s}return dn},mn=t=>({set:t=>{gn=mn(t)},reset:()=>mn(t),compare:zi(t),snap:_n(t),orient:Gi(t)}),gn=mn(),fn=(t,e)=>t.ll.x.isLessThanOrEqualTo(e.x)&&e.x.isLessThanOrEqualTo(t.ur.x)&&t.ll.y.isLessThanOrEqualTo(e.y)&&e.y.isLessThanOrEqualTo(t.ur.y),yn=(t,e)=>{if(e.ur.x.isLessThan(t.ll.x)||t.ur.x.isLessThan(e.ll.x)||e.ur.y.isLessThan(t.ll.y)||t.ur.y.isLessThan(e.ll.y))return null;let i=t.ll.x.isLessThan(e.ll.x)?e.ll.x:t.ll.x,n=t.ur.x.isLessThan(e.ur.x)?t.ur.x:e.ur.x;return{ll:{x:i,y:t.ll.y.isLessThan(e.ll.y)?e.ll.y:t.ll.y},ur:{x:n,y:t.ur.y.isLessThan(e.ur.y)?t.ur.y:e.ur.y}}},An=(t,e)=>t.x.times(e.y).minus(t.y.times(e.x)),vn=(t,e)=>t.x.times(e.x).plus(t.y.times(e.y)),Mn=t=>vn(t,t).sqrt(),Ln=(t,e,i)=>{let n={x:e.x.minus(t.x),y:e.y.minus(t.y)},s={x:i.x.minus(t.x),y:i.y.minus(t.y)};return An(s,n).div(Mn(s)).div(Mn(n))},xn=(t,e,i)=>{let n={x:e.x.minus(t.x),y:e.y.minus(t.y)},s={x:i.x.minus(t.x),y:i.y.minus(t.y)};return vn(s,n).div(Mn(s)).div(Mn(n))},bn=(t,e,i)=>e.y.isZero()?null:{x:t.x.plus(e.x.div(e.y).times(i.minus(t.y))),y:i},wn=(t,e,i)=>e.x.isZero()?null:{x:i,y:t.y.plus(e.y.div(e.x).times(i.minus(t.x)))},Pn=class t{constructor(t,e){n(this,"point"),n(this,"isLeft"),n(this,"segment"),n(this,"otherSE"),n(this,"consumedBy"),void 0===t.events?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}static compare(e,i){let n=t.comparePoints(e.point,i.point);return 0!==n?n:(e.point!==i.point&&e.link(i),e.isLeft!==i.isLeft?e.isLeft?1:-1:En.compare(e.segment,i.segment))}static comparePoints(t,e){return t.x.isLessThan(e.x)?-1:t.x.isGreaterThan(e.x)?1:t.y.isLessThan(e.y)?-1:t.y.isGreaterThan(e.y)?1:0}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");let e=t.point.events;for(let i=0,n=e.length;i<n;i++){let t=e[i];this.point.events.push(t),t.point=this.point}this.checkForConsuming()}checkForConsuming(){let t=this.point.events.length;for(let e=0;e<t;e++){let i=this.point.events[e];if(void 0===i.segment.consumedBy)for(let n=e+1;n<t;n++){let t=this.point.events[n];void 0===t.consumedBy&&i.otherSE.point.events===t.otherSE.point.events&&i.segment.consume(t.segment)}}}getAvailableLinkedEvents(){let t=[];for(let e=0,i=this.point.events.length;e<i;e++){let i=this.point.events[e];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}getLeftmostComparator(t){let e=new Map,i=i=>{let n=i.otherSE;e.set(i,{sine:Ln(this.point,t.point,n.point),cosine:xn(this.point,t.point,n.point)})};return(t,n)=>{e.has(t)||i(t),e.has(n)||i(n);let{sine:s,cosine:o}=e.get(t),{sine:a,cosine:r}=e.get(n);return s.isGreaterThanOrEqualTo(0)&&a.isGreaterThanOrEqualTo(0)?o.isLessThan(r)?1:o.isGreaterThan(r)?-1:0:s.isLessThan(0)&&a.isLessThan(0)?o.isLessThan(r)?-1:o.isGreaterThan(r)?1:0:a.isLessThan(s)?-1:a.isGreaterThan(s)?1:0}}},kn=0,En=class t{constructor(t,e,i,s){n(this,"id"),n(this,"leftSE"),n(this,"rightSE"),n(this,"rings"),n(this,"windings"),n(this,"ringOut"),n(this,"consumedBy"),n(this,"prev"),n(this,"_prevInResult"),n(this,"_beforeState"),n(this,"_afterState"),n(this,"_isInResult"),this.id=++kn,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=i,this.windings=s}static compare(t,e){let i=t.leftSE.point.x,n=e.leftSE.point.x,s=t.rightSE.point.x,o=e.rightSE.point.x;if(o.isLessThan(i))return 1;if(s.isLessThan(n))return-1;let a=t.leftSE.point.y,r=e.leftSE.point.y,h=t.rightSE.point.y,l=e.rightSE.point.y;if(i.isLessThan(n)){if(r.isLessThan(a)&&r.isLessThan(h))return 1;if(r.isGreaterThan(a)&&r.isGreaterThan(h))return-1;let i=t.comparePoint(e.leftSE.point);if(i<0)return 1;if(i>0)return-1;let n=e.comparePoint(t.rightSE.point);return 0!==n?n:-1}if(i.isGreaterThan(n)){if(a.isLessThan(r)&&a.isLessThan(l))return-1;if(a.isGreaterThan(r)&&a.isGreaterThan(l))return 1;let i=e.comparePoint(t.leftSE.point);if(0!==i)return i;let n=t.comparePoint(e.rightSE.point);return n<0?1:n>0?-1:1}if(a.isLessThan(r))return-1;if(a.isGreaterThan(r))return 1;if(s.isLessThan(o)){let i=e.comparePoint(t.rightSE.point);if(0!==i)return i}if(s.isGreaterThan(o)){let i=t.comparePoint(e.rightSE.point);if(i<0)return 1;if(i>0)return-1}if(!s.eq(o)){let t=h.minus(a),e=s.minus(i),c=l.minus(r),u=o.minus(n);if(t.isGreaterThan(e)&&c.isLessThan(u))return 1;if(t.isLessThan(e)&&c.isGreaterThan(u))return-1}return s.isGreaterThan(o)?1:s.isLessThan(o)||h.isLessThan(l)?-1:h.isGreaterThan(l)?1:t.id<e.id?-1:t.id>e.id?1:0}static fromRing(e,i,n){let s,o,a,r=Pn.comparePoints(e,i);if(r<0)s=e,o=i,a=1;else{if(!(r>0))throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);s=i,o=e,a=-1}let h=new Pn(s,!0),l=new Pn(o,!1);return new t(h,l,[n],[a])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t.isLessThan(e)?t:e},ur:{x:this.rightSE.point.x,y:t.isGreaterThan(e)?t:e}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(t){return t.x.eq(this.leftSE.point.x)&&t.y.eq(this.leftSE.point.y)||t.x.eq(this.rightSE.point.x)&&t.y.eq(this.rightSE.point.y)}comparePoint(t){return gn.orient(this.leftSE.point,t,this.rightSE.point)}getIntersection(t){let e=this.bbox(),i=t.bbox(),n=yn(e,i);if(null===n)return null;let s=this.leftSE.point,o=this.rightSE.point,a=t.leftSE.point,r=t.rightSE.point,h=fn(e,a)&&0===this.comparePoint(a),l=fn(i,s)&&0===t.comparePoint(s),c=fn(e,r)&&0===this.comparePoint(r),u=fn(i,o)&&0===t.comparePoint(o);if(l&&h)return u&&!c?o:!u&&c?r:null;if(l)return c&&s.x.eq(r.x)&&s.y.eq(r.y)?null:s;if(h)return u&&o.x.eq(a.x)&&o.y.eq(a.y)?null:a;if(u&&c)return null;if(u)return o;if(c)return r;let p=((t,e,i,n)=>{if(e.x.isZero())return wn(i,n,t.x);if(n.x.isZero())return wn(t,e,i.x);if(e.y.isZero())return bn(i,n,t.y);if(n.y.isZero())return bn(t,e,i.y);let s=An(e,n);if(s.isZero())return null;let o={x:i.x.minus(t.x),y:i.y.minus(t.y)},a=An(o,e).div(s),r=An(o,n).div(s),h=t.x.plus(r.times(e.x)),l=i.x.plus(a.times(n.x)),c=t.y.plus(r.times(e.y)),u=i.y.plus(a.times(n.y));return{x:h.plus(l).div(2),y:c.plus(u).div(2)}})(s,this.vector(),a,t.vector());return null!==p&&fn(n,p)?gn.snap(p):null}split(e){let i=[],n=void 0!==e.events,s=new Pn(e,!0),o=new Pn(e,!1),a=this.rightSE;this.replaceRightSE(o),i.push(o),i.push(s);let r=new t(s,a,this.rings.slice(),this.windings.slice());return Pn.comparePoints(r.leftSE.point,r.rightSE.point)>0&&r.swapEvents(),Pn.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(s.checkForConsuming(),o.checkForConsuming()),i}swapEvents(){let t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,i=this.windings.length;e<i;e++)this.windings[e]*=-1}consume(e){let i=this,n=e;for(;i.consumedBy;)i=i.consumedBy;for(;n.consumedBy;)n=n.consumedBy;let s=t.compare(i,n);if(0!==s){if(s>0){let t=i;i=n,n=t}if(i.prev===n){let t=i;i=n,n=t}for(let t=0,e=n.rings.length;t<e;t++){let e=n.rings[t],s=n.windings[t],o=i.rings.indexOf(e);-1===o?(i.rings.push(e),i.windings.push(s)):i.windings[o]+=s}n.rings=null,n.windings=null,n.consumedBy=i,n.leftSE.consumedBy=i.leftSE,n.rightSE.consumedBy=i.rightSE}}prevInResult(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}beforeState(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){let t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}afterState(){if(void 0!==this._afterState)return this._afterState;let t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};let e=this._afterState.rings,i=this._afterState.windings,n=this._afterState.multiPolys;for(let a=0,r=this.rings.length;a<r;a++){let t=this.rings[a],n=this.windings[a],s=e.indexOf(t);-1===s?(e.push(t),i.push(n)):i[s]+=n}let s=[],o=[];for(let a=0,r=e.length;a<r;a++){if(0===i[a])continue;let t=e[a],n=t.poly;if(-1===o.indexOf(n))if(t.isExterior)s.push(n);else{-1===o.indexOf(n)&&o.push(n);let e=s.indexOf(t.poly);-1!==e&&s.splice(e,1)}}for(let a=0,r=s.length;a<r;a++){let t=s[a].multiPoly;-1===n.indexOf(t)&&n.push(t)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;let t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(zn.type){case"union":{let i=0===t.length,n=0===e.length;this._isInResult=i!==n;break}case"intersection":{let i,n;t.length<e.length?(i=t.length,n=e.length):(i=e.length,n=t.length),this._isInResult=n===zn.numMultiPolys&&i<n;break}case"xor":{let i=Math.abs(t.length-e.length);this._isInResult=i%2==1;break}case"difference":{let i=t=>1===t.length&&t[0].isSubject;this._isInResult=i(t)!==i(e);break}}return this._isInResult}},Cn=class{constructor(t,e,i){if(n(this,"poly"),n(this,"isExterior"),n(this,"segments"),n(this,"bbox"),!Array.isArray(t)||0===t.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=i,this.segments=[],"number"!=typeof t[0][0]||"number"!=typeof t[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let s=gn.snap({x:new on(t[0][0]),y:new on(t[0][1])});this.bbox={ll:{x:s.x,y:s.y},ur:{x:s.x,y:s.y}};let o=s;for(let n=1,a=t.length;n<a;n++){if("number"!=typeof t[n][0]||"number"!=typeof t[n][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let e=gn.snap({x:new on(t[n][0]),y:new on(t[n][1])});e.x.eq(o.x)&&e.y.eq(o.y)||(this.segments.push(En.fromRing(o,e,this)),e.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=e.x),e.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=e.y),e.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=e.x),e.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=e.y),o=e)}(!s.x.eq(o.x)||!s.y.eq(o.y))&&this.segments.push(En.fromRing(o,s,this))}getSweepEvents(){let t=[];for(let e=0,i=this.segments.length;e<i;e++){let i=this.segments[e];t.push(i.leftSE),t.push(i.rightSE)}return t}},Sn=class{constructor(t,e){if(n(this,"multiPoly"),n(this,"exteriorRing"),n(this,"interiorRings"),n(this,"bbox"),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Cn(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let i=1,n=t.length;i<n;i++){let e=new Cn(t[i],this,!1);e.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=e.bbox.ll.x),e.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=e.bbox.ll.y),e.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=e.bbox.ur.x),e.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=e.bbox.ur.y),this.interiorRings.push(e)}this.multiPoly=e}getSweepEvents(){let t=this.exteriorRing.getSweepEvents();for(let e=0,i=this.interiorRings.length;e<i;e++){let i=this.interiorRings[e].getSweepEvents();for(let e=0,n=i.length;e<n;e++)t.push(i[e])}return t}},Tn=class{constructor(t,e){if(n(this,"isSubject"),n(this,"polys"),n(this,"bbox"),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof t[0][0][0]&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:new on(Number.POSITIVE_INFINITY),y:new on(Number.POSITIVE_INFINITY)},ur:{x:new on(Number.NEGATIVE_INFINITY),y:new on(Number.NEGATIVE_INFINITY)}};for(let i=0,n=t.length;i<n;i++){let e=new Sn(t[i],this);e.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=e.bbox.ll.x),e.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=e.bbox.ll.y),e.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=e.bbox.ur.x),e.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=e.bbox.ur.y),this.polys.push(e)}this.isSubject=e}getSweepEvents(){let t=[];for(let e=0,i=this.polys.length;e<i;e++){let i=this.polys[e].getSweepEvents();for(let e=0,n=i.length;e<n;e++)t.push(i[e])}return t}},On=class t{constructor(t){n(this,"events"),n(this,"poly"),n(this,"_isExteriorRing"),n(this,"_enclosingRing"),this.events=t;for(let e=0,i=t.length;e<i;e++)t[e].segment.ringOut=this;this.poly=null}static factory(e){let i=[];for(let n=0,s=e.length;n<s;n++){let s=e[n];if(!s.isInResult()||s.ringOut)continue;let o=null,a=s.leftSE,r=s.rightSE,h=[a],l=a.point,c=[];for(;o=a,a=r,h.push(a),a.point!==l;)for(;;){let e=a.getAvailableLinkedEvents();if(0===e.length){let t=h[0].point,e=h[h.length-1].point;throw new Error(`Unable to complete output ring starting at [${t.x}, ${t.y}]. Last matching segment found ends at [${e.x}, ${e.y}].`)}if(1===e.length){r=e[0].otherSE;break}let n=null;for(let t=0,i=c.length;t<i;t++)if(c[t].point===a.point){n=t;break}if(null!==n){let e=c.splice(n)[0],s=h.splice(e.index);s.unshift(s[0].otherSE),i.push(new t(s.reverse()));continue}c.push({index:h.length,point:a.point});let s=a.getLeftmostComparator(o);r=e.sort(s)[0].otherSE;break}i.push(new t(h))}return i}getGeom(){let t=this.events[0].point,e=[t];for(let h=1,l=this.events.length-1;h<l;h++){let i=this.events[h].point,n=this.events[h+1].point;0!==gn.orient(i,t,n)&&(e.push(i),t=i)}if(1===e.length)return null;let i=e[0],n=e[1];0===gn.orient(i,t,n)&&e.shift(),e.push(e[0]);let s=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:e.length-1,a=this.isExteriorRing()?e.length:-1,r=[];for(let h=o;h!=a;h+=s)r.push([e[h].x.toNumber(),e[h].y.toNumber()]);return r}isExteriorRing(){if(void 0===this._isExteriorRing){let t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}enclosingRing(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){var t,e;let i=this.events[0];for(let o=1,a=this.events.length;o<a;o++){let t=this.events[o];Pn.compare(i,t)>0&&(i=t)}let n=i.segment.prevInResult(),s=n?n.prevInResult():null;for(;;){if(!n)return null;if(!s)return n.ringOut;if(s.ringOut!==n.ringOut)return(null==(t=s.ringOut)?void 0:t.enclosingRing())!==n.ringOut?n.ringOut:null==(e=n.ringOut)?void 0:e.enclosingRing();n=s.prevInResult(),s=n?n.prevInResult():null}}},Bn=class{constructor(t){n(this,"exteriorRing"),n(this,"interiorRings"),this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){let t=this.exteriorRing.getGeom();if(null===t)return null;let e=[t];for(let i=0,n=this.interiorRings.length;i<n;i++){let t=this.interiorRings[i].getGeom();null!==t&&e.push(t)}return e}},Dn=class{constructor(t){n(this,"rings"),n(this,"polys"),this.rings=t,this.polys=this._composePolys(t)}getGeom(){let t=[];for(let e=0,i=this.polys.length;e<i;e++){let i=this.polys[e].getGeom();null!==i&&t.push(i)}return t}_composePolys(t){var e;let i=[];for(let n=0,s=t.length;n<s;n++){let s=t[n];if(!s.poly)if(s.isExteriorRing())i.push(new Bn(s));else{let t=s.enclosingRing();(null==t?void 0:t.poly)||i.push(new Bn(t)),null==(e=null==t?void 0:t.poly)||e.addInterior(s)}}return i}},In=class{constructor(t,e=En.compare){n(this,"queue"),n(this,"tree"),n(this,"segments"),this.queue=t,this.tree=new ln(e),this.segments=[]}process(t){let e=t.segment,i=[];if(t.consumedBy)return t.isLeft?this.queue.delete(t.otherSE):this.tree.delete(e),i;t.isLeft&&this.tree.add(e);let n=e,s=e;do{n=this.tree.lastBefore(n)}while(null!=n&&null!=n.consumedBy);do{s=this.tree.firstAfter(s)}while(null!=s&&null!=s.consumedBy);if(t.isLeft){let o=null;if(n){let t=n.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(o=t),!n.isAnEndpoint(t))){let e=this._splitSafely(n,t);for(let t=0,n=e.length;t<n;t++)i.push(e[t])}}let a=null;if(s){let t=s.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(a=t),!s.isAnEndpoint(t))){let e=this._splitSafely(s,t);for(let t=0,n=e.length;t<n;t++)i.push(e[t])}}if(null!==o||null!==a){let t=null;t=null===o?a:null===a||Pn.comparePoints(o,a)<=0?o:a,this.queue.delete(e.rightSE),i.push(e.rightSE);let n=e.split(t);for(let e=0,s=n.length;e<s;e++)i.push(n[e])}i.length>0?(this.tree.delete(e),i.push(t)):(this.segments.push(e),e.prev=n)}else{if(n&&s){let t=n.getIntersection(s);if(null!==t){if(!n.isAnEndpoint(t)){let e=this._splitSafely(n,t);for(let t=0,n=e.length;t<n;t++)i.push(e[t])}if(!s.isAnEndpoint(t)){let e=this._splitSafely(s,t);for(let t=0,n=e.length;t<n;t++)i.push(e[t])}}}this.tree.delete(e)}return i}_splitSafely(t,e){this.tree.delete(t);let i=t.rightSE;this.queue.delete(i);let n=t.split(e);return n.push(i),void 0===t.consumedBy&&this.tree.add(t),n}},Rn=new class{constructor(){n(this,"type"),n(this,"numMultiPolys")}run(t,e,i){Rn.type=t;let n=[new Tn(e,!0)];for(let h=0,l=i.length;h<l;h++)n.push(new Tn(i[h],!1));if(Rn.numMultiPolys=n.length,"difference"===Rn.type){let t=n[0],e=1;for(;e<n.length;)null!==yn(n[e].bbox,t.bbox)?e++:n.splice(e,1)}if("intersection"===Rn.type)for(let h=0,l=n.length;h<l;h++){let t=n[h];for(let e=h+1,i=n.length;e<i;e++)if(null===yn(t.bbox,n[e].bbox))return[]}let s=new ln(Pn.compare);for(let h=0,l=n.length;h<l;h++){let t=n[h].getSweepEvents();for(let e=0,i=t.length;e<i;e++)s.add(t[e])}let o=new In(s),a=null;for(0!=s.size&&(a=s.first(),s.delete(a));a;){let t=o.process(a);for(let e=0,i=t.length;e<i;e++){let i=t[e];void 0===i.consumedBy&&s.add(i)}0!=s.size?(a=s.first(),s.delete(a)):a=null}gn.reset();let r=On.factory(o.segments);return new Dn(r).getGeom()}},zn=Rn;function Gn(t){let e={type:"Feature"};return e.geometry=t,e}function Nn(t){return"Feature"===t.type?t.geometry:t}function jn(t){return t&&t.geometry&&t.geometry.coordinates?t.geometry.coordinates:t}function Fn(t){return Gn({type:"Polygon",coordinates:t})}function Un(t){return Gn({type:"MultiPolygon",coordinates:t})}function Zn(t,e){let i=Nn(t),n=Nn(e),s=((t,...e)=>zn.run("intersection",t,e))(i.coordinates,n.coordinates);return 0===s.length?null:1===s.length?Fn(s[0]):Un(s)}function Hn(t,e){let i=Nn(t),n=Nn(e),s=((t,...e)=>zn.run("difference",t,e))(i.coordinates,n.coordinates);return 0===s.length?null:1===s.length?Fn(s[0]):Un(s)}function qn(t){return Array.isArray(t)?1+qn(t[0]):-1}function Vn(t){t instanceof L.Polyline&&(t=t.toGeoJSON(15));let e=jn(t),i=qn(e),n=[];return i>1?e.forEach(t=>{n.push(function(t){return Gn({type:"LineString",coordinates:t})}(t))}):n.push(t),n}function Wn(t){let e=[];return t.eachLayer(t=>{e.push(jn(t.toGeoJSON(15)))}),function(t){return Gn({type:"MultiLineString",coordinates:t})}(e)}gn.set,He.Cut=He.Polygon.extend({initialize(t){this._map=t,this._shape="Cut",this.toolbarButtonName="cutPolygon"},_finishShape(){if(this._editedLayers=[],!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let t=this._layer.getLatLngs();if(t.length<=2)return;let e=L.polygon(t,this.options.pathOptions);e._latlngInfos=this._layer._latlngInfo,this.cut(e),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex,this._editedLayers.forEach(({layer:t,originalLayer:e})=>{this._fireCut(e,t,e),this._fireCut(this._map,t,e),e.pm._fireEdit()}),this._editedLayers=[];let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))},cut(t){let e=this._map._layers,i=t._latlngInfos||[];Object.keys(e).map(t=>e[t]).filter(t=>t.pm).filter(t=>!t._pmTempLayer).filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore).filter(t=>t instanceof L.Polyline).filter(e=>e!==t).filter(t=>t.pm.options.allowCutting).filter(t=>!(this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0)||this.options.layersToCut.indexOf(t)>-1).filter(t=>!this._layerGroup.hasLayer(t)).filter(e=>{try{let i=!!pi(t.toGeoJSON(15),e.toGeoJSON(15)).features.length>0;return i||e instanceof L.Polyline&&!(e instanceof L.Polygon)?i:!!Zn(t.toGeoJSON(15),e.toGeoJSON(15))}catch{return L.Polygon,!1}}).forEach(e=>{let n;if(e instanceof L.Polygon){n=L.polygon(e.getLatLngs());let t=n.getLatLngs();i.forEach(e=>{if(e&&e.snapInfo){let{latlng:i}=e,s=this._calcClosestLayer(i,[n]);if(s&&s.segment&&s.distance<this.options.snapDistance){let{segment:e}=s;if(e&&2===e.length){let{indexPath:n,parentPath:s,newIndex:o}=L.PM.Utils._getIndexFromSegment(t,e);(n.length>1?(0,Ii.default)(t,s):t).splice(o,0,i)}}}})}else n=e;let s=this._cutLayer(t,n),o=L.geoJSON(s,e.options);1===o.getLayers().length&&([o]=o.getLayers()),this._setPane(o,"layerPane");let a=o.addTo(this._map.pm._getContainingLayer());if(a.pm.enable(e.pm.options),a.pm.disable(),e._pmTempLayer=!0,t._pmTempLayer=!0,e.remove(),e.removeFrom(this._map.pm._getContainingLayer()),t.remove(),t.removeFrom(this._map.pm._getContainingLayer()),a.getLayers&&0===a.getLayers().length&&this._map.pm.removeLayer({target:a}),a instanceof L.LayerGroup?(a.eachLayer(t=>{this._addDrawnLayerProp(t)}),this._addDrawnLayerProp(a)):this._addDrawnLayerProp(a),this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0){let t=this.options.layersToCut.indexOf(e);t>-1&&this.options.layersToCut.splice(t,1)}this._editedLayers.push({layer:a,originalLayer:e})})},_cutLayer(t,e){let i,n=L.geoJSON();if(e instanceof L.Polygon)i=Hn(e.toGeoJSON(15),t.toGeoJSON(15));else{let s=Vn(e);s.forEach(e=>{let i,s=Pi(e,t.toGeoJSON(15));i=s&&s.features.length>0?L.geoJSON(s):L.geoJSON(e),i.getLayers().forEach(e=>{Ti(t.toGeoJSON(15),e.toGeoJSON(15))||e.addTo(n)})}),i=s.length>1?Wn(n):n.toGeoJSON(15)}return i},_change:L.Util.falseFn}),He.Text=He.extend({initialize(t){this._map=t,this._shape="Text",this.toolbarButtonName="drawText"},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.placeText"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this._map.getContainer().classList.add("geoman-draw-cursor"),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){var t;this._enabled&&(this._enabled=!1,this._map.off("click",this._createMarker,this),null==(t=this._hintMarker)||t.remove(),this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("mousemove",this._syncHintMarker,this),this._map.off("mousemove",this._showHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_syncHintMarker(t){if(this._hintMarker.setLatLng(t.latlng),this.options.snappable){let e=t;e.target=this._hintMarker,this._handleSnapping(e)}},_createMarker(t){var e,i,n,s;if(!t.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let o=this._hintMarker.getLatLng();if(this.textArea=this._createTextArea(),null==(e=this.options.textOptions)?void 0:e.className){let t=this.options.textOptions.className.split(" ");this.textArea.classList.add(...t)}let a=this._createTextIcon(this.textArea),r=new L.Marker(o,{textMarker:!0,_textMarkerOverPM:!0,icon:a});if(this._setPane(r,"markerPane"),this._finishLayer(r),r.pm||(r.options.draggable=!1),r.addTo(this._map.pm._getContainingLayer()),r.pm){r.pm.textArea=this.textArea,L.setOptions(r.pm,{removeIfEmpty:(null==(i=this.options.textOptions)?void 0:i.removeIfEmpty)??!0});let t=(null==(n=this.options.textOptions)?void 0:n.focusAfterDraw)??!0;r.pm._createTextMarker(t),(null==(s=this.options.textOptions)?void 0:s.text)&&r.pm.setText(this.options.textOptions.text)}this._fireCreate(r),this._cleanupSnapping(),this.disable(),this.options.continueDrawing&&this._map.once("mousemove",this._showHintMarkerAfterMoving,this)},_showHintMarkerAfterMoving(t){this.enable(),this._hintMarker.setLatLng(t.latlng)},_createTextArea(){let t=document.createElement("textarea");return t.readOnly=!0,t.classList.add("pm-textarea","pm-disabled"),t},_createTextIcon:t=>L.divIcon({className:"pm-text-marker",html:t})});var Kn={enableLayerDrag(){if(!this.options.draggable||!this._layer._map)return;this.disable(),this._layerDragEnabled=!0,this._map||(this._map=this._layer._map),(this._layer instanceof L.Marker||this._layer instanceof L.ImageOverlay)&&L.DomEvent.on(this._getDOMElem(),"dragstart",this._stopDOMImageDrag),this._layer.dragging&&this._layer.dragging.disable(),this._tempDragCoord=null,Ge(this._layer)instanceof L.Canvas?(this._layer.on("mouseout",this.removeDraggingClass,this),this._layer.on("mouseover",this.addDraggingClass,this)):this.addDraggingClass(),this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!0;let t=this._getDOMElem();t&&(Ge(this._layer)instanceof L.Canvas?(this._layer.on("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._addTouchEvents(t)):L.DomEvent.on(t,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._fireDragEnable()},disableLayerDrag(){this._layerDragEnabled=!1,Ge(this._layer)instanceof L.Canvas?(this._layer.off("mouseout",this.removeDraggingClass,this),this._layer.off("mouseover",this.addDraggingClass,this)):this.removeDraggingClass(),this._originalMapDragState&&this._dragging&&this._map.dragging.enable(),this._safeToCacheDragState=!1,this._layer.dragging&&this._layer.dragging.disable();let t=this._getDOMElem();t&&(Ge(this._layer)instanceof L.Canvas?(this._layer.off("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._removeTouchEvents(t)):L.DomEvent.off(t,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._layerDragged&&this._fireUpdate(),this._layerDragged=!1,this._fireDragDisable()},dragging(){return this._dragging},layerDragEnabled(){return!!this._layerDragEnabled},_simulateMouseDownEvent(t){let e=t.touches?t.touches[0]:t,i={originalEvent:e,target:this._layer};return i.containerPoint=this._map.mouseEventToContainerPoint(e),i.latlng=this._map.containerPointToLatLng(i.containerPoint),this._dragMixinOnMouseDown(i),!1},_simulateMouseMoveEvent(t){let e=t.touches?t.touches[0]:t,i={originalEvent:e,target:this._layer};return i.containerPoint=this._map.mouseEventToContainerPoint(e),i.latlng=this._map.containerPointToLatLng(i.containerPoint),this._dragMixinOnMouseMove(i),!1},_simulateMouseUpEvent(t){let e={originalEvent:t.touches?t.touches[0]:t,target:this._layer};return-1===t.type.indexOf("touch")&&(e.containerPoint=this._map.mouseEventToContainerPoint(t),e.latlng=this._map.containerPointToLatLng(e.containerPoint)),this._dragMixinOnMouseUp(e),!1},_dragMixinOnMouseDown(t){if(t.originalEvent.button>0)return;this._overwriteEventIfItComesFromMarker(t);let e=t._fromLayerSync,i=this._syncLayers("_dragMixinOnMouseDown",t);if(this._layer instanceof L.Marker&&(!this.options.snappable||e||i?this._disableSnapping():this._initSnappableMarkers()),this._layer instanceof L.CircleMarker){let t="resizeableCircleMarker";this._layer instanceof L.Circle&&(t="resizeableCircle"),!this.options.snappable||e||i?this._layer.pm.options[t]?this._layer.pm._disableSnapping():this._layer.pm._disableSnappingDrag():this._layer.pm.options[t]||this._initSnappableMarkersDrag()}this._safeToCacheDragState&&(this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!1),this._tempDragCoord=t.latlng,L.DomEvent.on(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),L.DomEvent.on(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this)},_dragMixinOnMouseMove(t){this._overwriteEventIfItComesFromMarker(t);let e=this._getDOMElem();this._syncLayers("_dragMixinOnMouseMove",t),this._dragging||(this._dragging=!0,L.DomUtil.addClass(e,"leaflet-pm-dragging"),this._layer instanceof L.Marker||this._layer.bringToFront(),this._originalMapDragState&&this._map.dragging.disable(),this._fireDragStart()),this._tempDragCoord||(this._tempDragCoord=t.latlng),this._onLayerDrag(t),this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle()},_dragMixinOnMouseUp(t){let e=this._getDOMElem();return this._syncLayers("_dragMixinOnMouseUp",t),this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0,L.DomEvent.off(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this),L.DomEvent.off(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),!!this._dragging&&(this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle(),this._layerDragged=!0,window.setTimeout(()=>{this._dragging=!1,e&&L.DomUtil.removeClass(e,"leaflet-pm-dragging"),this._fireDragEnd(),this._fireEdit(),this._layerEdited=!0},10),!0)},_onLayerDrag(t){let{latlng:e}=t,i=e.lat-this._tempDragCoord.lat,n=e.lng-this._tempDragCoord.lng,s=t=>t.map(t=>{if(Array.isArray(t))return s(t);let e={lat:t.lat+i,lng:t.lng+n};return(t.alt||0===t.alt)&&(e.alt=t.alt),e});if(this._layer instanceof L.Circle&&this._layer.options.resizeableCircle||this._layer instanceof L.CircleMarker&&this._layer.options.resizeableCircleMarker){let t=s([this._layer.getLatLng()]);this._layer.setLatLng(t[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.CircleMarker||this._layer instanceof L.Marker){let t=this._layer.getLatLng();this._layer._snapped&&(t=this._layer._orgLatLng);let e=s([t]);this._layer.setLatLng(e[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.ImageOverlay){let t=s([this._layer.getBounds().getNorthWest(),this._layer.getBounds().getSouthEast()]);this._layer.setBounds(t),this._fireChange(this._layer.getBounds(),"Edit")}else{let t=s(this._layer.getLatLngs());this._layer.setLatLngs(t),this._fireChange(this._layer.getLatLngs(),"Edit")}this._tempDragCoord=e,t.layer=this._layer,this._fireDrag(t)},addDraggingClass(){let t=this._getDOMElem();t&&L.DomUtil.addClass(t,"leaflet-pm-draggable")},removeDraggingClass(){let t=this._getDOMElem();t&&L.DomUtil.removeClass(t,"leaflet-pm-draggable")},_getDOMElem(){let t=null;return this._layer._path?t=this._layer._path:this._layer._renderer&&this._layer._renderer._container?t=this._layer._renderer._container:this._layer._image?t=this._layer._image:this._layer._icon&&(t=this._layer._icon),t},_overwriteEventIfItComesFromMarker(t){t.target.getLatLng&&(!t.target._radius||t.target._radius<=10)&&(t.containerPoint=this._map.mouseEventToContainerPoint(t.originalEvent),t.latlng=this._map.containerPointToLatLng(t.containerPoint))},_syncLayers(t,e){if(this.enabled())return!1;if(!e._fromLayerSync&&this._layer===e.target&&this.options.syncLayersOnDrag){e._fromLayerSync=!0;let i=[];if(L.Util.isArray(this.options.syncLayersOnDrag))i=this.options.syncLayersOnDrag,this.options.syncLayersOnDrag.forEach(t=>{t instanceof L.LayerGroup&&(i=i.concat(t.pm.getLayers(!0)))});else if(!0===this.options.syncLayersOnDrag&&this._parentLayerGroup)for(let t in this._parentLayerGroup){let e=this._parentLayerGroup[t];e.pm&&(i=e.pm.getLayers(!0))}return L.Util.isArray(i)&&i.length>0&&(i=i.filter(t=>!!t.pm).filter(t=>!!t.pm.options.draggable),i.forEach(i=>{i!==this._layer&&i.pm[t]&&(i._snapped=!1,i.pm[t](e))})),i.length>0}return!1},_stopDOMImageDrag:t=>(t.preventDefault(),!1)},Xn=u(pe());function Yn(t,e,i){let n=i.getMaxZoom();if(n===1/0&&(n=i.getZoom()),L.Util.isArray(t)){let n=[];return t.forEach(t=>{n.push(Yn(t,e,i))}),n}return t instanceof L.LatLng?function(t,e,i,n){return i.unproject(e.transform(i.project(t,n)),n)}(t,e,i,n):null}function $n(t,e){e instanceof L.Layer&&(e=e.getLatLng());let i=t.getMaxZoom();return i===1/0&&(i=t.getZoom()),t.project(e,i)}function Jn(t,e){let i=t.getMaxZoom();return i===1/0&&(i=t.getZoom()),t.unproject(e,i)}var Qn={_onRotateStart(t){this._preventRenderingMarkers(!0),this._rotationOriginLatLng=this._getRotationCenter().clone(),this._rotationOriginPoint=$n(this._map,this._rotationOriginLatLng),this._rotationStartPoint=$n(this._map,t.target.getLatLng()),this._initialRotateLatLng=Re(this._layer),this._startAngle=this.getAngle();let e=Re(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._fireRotationStart(this._rotationLayer,e),this._fireRotationStart(this._map,e)},_onRotate(t){let e=$n(this._map,t.target.getLatLng()),i=this._rotationStartPoint,n=this._rotationOriginPoint,s=Math.atan2(e.y-n.y,e.x-n.x)-Math.atan2(i.y-n.y,i.x-n.x);this._layer.setLatLngs(this._rotateLayer(s,this._initialRotateLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let o=this;!function t(e,i=[],n=-1){if(n>-1&&i.push(n),L.Util.isArray(e[0]))e.forEach((e,n)=>t(e,i.slice(),n));else{let t=i.length>0?(0,Xn.default)(o._markers,i):o._markers[0];e.forEach((e,i)=>{t[i].setLatLng(e)})}}(this._layer.getLatLngs());let a=Re(this._rotationLayer);this._rotationLayer.setLatLngs(this._rotateLayer(s,this._rotationLayer.pm._rotateOrgLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let r=180*s/Math.PI;r=r<0?r+360:r;let h=r+this._startAngle;this._setAngle(h),this._rotationLayer.pm._setAngle(h),this._fireRotation(this._rotationLayer,r,a),this._fireRotation(this._map,r,a),this._rotationLayer.pm._fireChange(this._rotationLayer.getLatLngs(),"Rotation")},_onRotateEnd(){let t=this._startAngle;delete this._rotationOriginLatLng,delete this._rotationOriginPoint,delete this._rotationStartPoint,delete this._initialRotateLatLng,delete this._startAngle;let e=Re(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._rotationLayer.pm._rotateOrgLatLng=Re(this._rotationLayer),this._fireRotationEnd(this._rotationLayer,t,e),this._fireRotationEnd(this._map,t,e),this._rotationLayer.pm._fireEdit(this._rotationLayer,"Rotation"),this._preventRenderingMarkers(!1),this._layerRotated=!0},_rotateLayer(t,e,i,n,s){let o=$n(s,i);return this._matrix=n.clone().rotate(t,o).flip(),Yn(e,this._matrix,s)},_setAngle(t){t=t<0?t+360:t,this._angle=t%360},_getRotationCenter(){if(this._rotationCenter)return this._rotationCenter;let t=L.polygon(this._layer.getLatLngs(),{stroke:!1,fill:!1,pmIgnore:!0}).addTo(this._layer._map),e=t.getCenter();return t.removeFrom(this._layer._map),e},enableRotate(){if(!this.options.allowRotation)return void this.disableRotate();this.rotateEnabled()&&this.disableRotate(),this._layer instanceof L.Rectangle&&void 0===this._angle&&this.setInitAngle(De(this._layer._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);this._rotatePoly=L.polygon(this._layer.getLatLngs(),{fill:!1,stroke:!1,pmIgnore:!1,snapIgnore:!0}),this._rotatePoly._pmTempLayer=!0,this._rotatePoly.addTo(this._layer._map),this._rotatePoly.pm._setAngle(this.getAngle()),this._rotatePoly.pm.setRotationCenter(this.getRotationCenter()),this._rotatePoly.pm.setOptions(this._layer._map.pm.getGlobalOptions()),this._rotatePoly.pm.setOptions({rotate:!0,snappable:!1,hideMiddleMarkers:!0}),this._rotatePoly.pm._rotationLayer=this._layer,this._rotatePoly.pm.enable(),this._rotateOrgLatLng=Re(this._layer),this._rotateEnabled=!0,this._layer.on("remove",this.disableRotate,this),this._fireRotationEnable(this._layer),this._fireRotationEnable(this._layer._map)},disableRotate(){this.rotateEnabled()&&(this._rotatePoly.pm._layerRotated&&this._fireUpdate(),this._rotatePoly.pm._layerRotated=!1,this._rotatePoly.pm.disable(),this._rotatePoly.remove(),this._rotatePoly.pm.setOptions({rotate:!1}),this._rotatePoly=void 0,this._rotateOrgLatLng=void 0,this._layer.off("remove",this.disableRotate,this),this._rotateEnabled=!1,this._fireRotationDisable(this._layer),this._fireRotationDisable(this._layer._map))},rotateEnabled(){return!!this._rotateEnabled},rotateLayer(t){let e=this.getAngle(),i=this._layer.getLatLngs(),n=t*(Math.PI/180);this._layer.setLatLngs(this._rotateLayer(n,this._layer.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._layer._map)),this._rotateOrgLatLng=L.polygon(this._layer.getLatLngs()).getLatLngs(),this._setAngle(this.getAngle()+t),this.rotateEnabled()&&this._rotatePoly&&this._rotatePoly.pm.enabled()&&(this._rotatePoly.setLatLngs(this._rotateLayer(n,this._rotatePoly.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._rotatePoly._map)),this._rotatePoly.pm._initMarkers());let s=this.getAngle()-e;s=s<0?s+360:s,this._startAngle=e,this._fireRotation(this._layer,s,i,this._layer),this._fireRotation(this._map||this._layer._map,s,i,this._layer),delete this._startAngle,this._fireChange(this._layer.getLatLngs(),"Rotation")},rotateLayerToAngle(t){let e=t-this.getAngle();this.rotateLayer(e)},getAngle(){return this._angle||0},setInitAngle(t){this._setAngle(t)},getRotationCenter(){return this._getRotationCenter()},setRotationCenter(t){this._rotationCenter=t,this._rotatePoly&&this._rotatePoly.pm.setRotationCenter(t)}},ts=L.Class.extend({includes:[Kn,Ze,Qn,Pe],options:{snappable:!0,snapDistance:20,allowSelfIntersection:!0,allowSelfIntersectionEdit:!1,preventMarkerRemoval:!1,removeLayerBelowMinVertexCount:!0,limitMarkersToCount:-1,hideMiddleMarkers:!1,snapSegment:!0,syncLayersOnDrag:!1,draggable:!0,allowEditing:!0,allowRemoval:!0,allowCutting:!0,allowRotation:!0,addVertexOn:"click",removeVertexOn:"contextmenu",removeVertexValidation:void 0,addVertexValidation:void 0,moveVertexValidation:void 0,resizeableCircleMarker:!1,resizeableCircle:!0,snapMiddle:!1,snapVertex:!0},setOptions(t){L.Util.setOptions(this,t)},getOptions(){return this.options},applyOptions(){},isPolygon(){return this._layer instanceof L.Polygon},getShape(){return this._shape},_setPane(t,e){"layerPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":"vertexPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":"markerPane"===e&&(t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},remove(){(this._map||this._layer._map).pm.removeLayer({target:this._layer})},_vertexValidation(t,e){let i=e.target,n={layer:this._layer,marker:i,event:e},s="";return"move"===t?s="moveVertexValidation":"add"===t?s="addVertexValidation":"remove"===t&&(s="removeVertexValidation"),this.options[s]&&"function"==typeof this.options[s]&&!this.options[s](n)?("move"===t&&(i._cancelDragEventChain=i.getLatLng()),!1):(i._cancelDragEventChain=null,!0)},_vertexValidationDrag:t=>!t._cancelDragEventChain||(t._latlng=t._cancelDragEventChain,t.update(),!1),_vertexValidationDragEnd:t=>!t._cancelDragEventChain||(t._cancelDragEventChain=null,!1)});ts.LayerGroup=L.Class.extend({initialize(t){this._layerGroup=t,this._layers=this.getLayers(),this._getMap(),this._layers.forEach(t=>this._initLayer(t));this._layerGroup.on("layeradd",L.Util.throttle(t=>{if(t.layer._pmTempLayer)return;this._layers=this.getLayers();let e=this._layers.filter(t=>!t.pm._parentLayerGroup||!(this._layerGroup._leaflet_id in t.pm._parentLayerGroup));e.forEach(t=>{this._initLayer(t)}),e.length>0&&this._getMap()&&this._getMap().pm.globalEditModeEnabled()&&this.enabled()&&this.enable(this.getOptions())},100,this),this),this._layerGroup.on("layerremove",t=>{this._removeLayerFromGroup(t.target)},this);this._layerGroup.on("layerremove",L.Util.throttle(t=>{t.target._pmTempLayer||(this._layers=this.getLayers())},100,this),this)},enable(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this._options=t,this._layers.forEach(i=>{i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.enable(t,e)):i.pm.enable(t)})},disable(t=[]){0===t.length&&(this._layers=this.getLayers()),this._layers.forEach(e=>{e instanceof L.LayerGroup?-1===t.indexOf(e._leaflet_id)&&(t.push(e._leaflet_id),e.pm.disable(t)):e.pm.disable()})},enabled(t=[]){return 0===t.length&&(this._layers=this.getLayers()),!!this._layers.find(e=>e instanceof L.LayerGroup?-1===t.indexOf(e._leaflet_id)&&(t.push(e._leaflet_id),e.pm.enabled(t)):e.pm.enabled())},toggleEdit(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this._options=t,this._layers.forEach(i=>{i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.toggleEdit(t,e)):i.pm.toggleEdit(t)})},_initLayer(t){let e=L.Util.stamp(this._layerGroup);t.pm._parentLayerGroup||(t.pm._parentLayerGroup={}),t.pm._parentLayerGroup[e]=this._layerGroup},_removeLayerFromGroup(t){if(t.pm&&t.pm._layerGroup){let e=L.Util.stamp(this._layerGroup);delete t.pm._layerGroup[e]}},dragging(){return this._layers=this.getLayers(),!!this._layers&&!!this._layers.find(t=>t.pm.dragging())},getOptions(){return this.options},_getMap(){var t;return this._map||(null==(t=this._layers.find(t=>!!t._map))?void 0:t._map)||null},getLayers(t=!1,e=!0,i=!0,n=[]){let s=[];return t?this._layerGroup.getLayers().forEach(t=>{s.push(t),t instanceof L.LayerGroup&&-1===n.indexOf(t._leaflet_id)&&(n.push(t._leaflet_id),s=s.concat(t.pm.getLayers(!0,!0,!0,n)))}):s=this._layerGroup.getLayers(),i&&(s=s.filter(t=>!(t instanceof L.LayerGroup))),e&&(s=s.filter(t=>!!t.pm),s=s.filter(t=>!t._pmTempLayer),s=s.filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)),s},setOptions(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this.options=t,this._layers.forEach(i=>{i.pm&&(i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.setOptions(t,e)):i.pm.setOptions(t))})}}),ts.Marker=ts.extend({_shape:"Marker",initialize(t){this._layer=t,this._enabled=!1,this._layer.on("dragend",this._onDragEnd,this)},enable(t={draggable:!0}){L.Util.setOptions(this,t),this.options.allowEditing&&this._layer._map?(this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._fireEnable()):this.disable()},disable(){this.enabled()&&(this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this._layer.off("contextmenu",this._removeMarker,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1)},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this.options.draggable?this.enableLayerDrag():this.disableLayerDrag(),this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_removeMarker(t){let e=t.target;e.remove(),this._fireRemove(e),this._fireRemove(this._map,e)},_onDragEnd(){this._fireEdit(),this._layerEdited=!0},_initSnappableMarkers(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)}});var es=u(pe()),is={filterMarkerGroup(){this.markerCache=[],this.createCache(),this._layer.on("pm:edit",this.createCache,this),this.applyLimitFilters({}),this.throttledApplyLimitFilters||(this.throttledApplyLimitFilters=L.Util.throttle(this.applyLimitFilters,100,this)),this._layer.on("pm:disable",this._removeMarkerLimitEvents,this),this._layer.on("remove",this._removeMarkerLimitEvents,this),this.options.limitMarkersToCount>-1&&(this._layer.on("pm:vertexremoved",this._initMarkers,this),this._map.on("mousemove",this.throttledApplyLimitFilters,this))},_removeMarkerLimitEvents(){this._map.off("mousemove",this.throttledApplyLimitFilters,this),this._layer.off("pm:edit",this.createCache,this),this._layer.off("pm:disable",this._removeMarkerLimitEvents,this),this._layer.off("pm:vertexremoved",this._initMarkers,this)},createCache(){let t=[...this._markerGroup.getLayers(),...this.markerCache];this.markerCache=t.filter((t,e,i)=>i.indexOf(t)===e)},_removeFromCache(t){let e=this.markerCache.indexOf(t);e>-1&&this.markerCache.splice(e,1)},renderLimits(t){this.markerCache.forEach(e=>{t.includes(e)?this._markerGroup.addLayer(e):this._markerGroup.removeLayer(e)})},applyLimitFilters({latlng:t={lat:0,lng:0}}){if(this._preventRenderMarkers)return;let e=[...this._filterClosestMarkers(t)];this.renderLimits(e)},_filterClosestMarkers(t){let e=[...this.markerCache],i=this.options.limitMarkersToCount;return-1===i?e:(e.sort((e,i)=>e._latlng.distanceTo(t)-i._latlng.distanceTo(t)),e.filter((t,e)=>!(i>-1)||e<i))},_preventRenderMarkers:!1,_preventRenderingMarkers(t){this._preventRenderMarkers=!!t}};ts.Line=ts.extend({includes:[is],_shape:"Line",initialize(t){this._layer=t,this._enabled=!1},enable(t){if(L.Util.setOptions(this,t),this._map=this._layer._map,this._map){if(!this.options.allowEditing)return void this.disable();this.enabled()&&this.disable(),this._enabled=!0,this._initMarkers(),this.applyOptions(),this._layer.on("remove",this.disable,this),this.options.allowSelfIntersection||this._layer.on("pm:vertexremoved",this._handleSelfIntersectionOnVertexRemoval,this),this.options.allowSelfIntersection?this.cachedColor=void 0:("#f00000ff"!==this._layer.options.color?(this.cachedColor=this._layer.options.color,this.isRed=!1):this.isRed=!0,this._handleLayerStyle()),this._fireEnable()}},disable(){if(!this.enabled()||this._dragging)return;this._enabled=!1,this._markerGroup.clearLayers(),this._markerGroup.removeFrom(this._map),this._layer.off("remove",this.disable,this),this.options.allowSelfIntersection||this._layer.off("pm:vertexremoved",this._handleSelfIntersectionOnVertexRemoval,this);let t=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(t,"leaflet-pm-draggable"),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()},enabled(){return this._enabled},toggleEdit(t){return this.enabled()?this.disable():this.enable(t),this.enabled()},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initMarkers(){let t=this._map,e=this._layer.getLatLngs();this._markerGroup&&(this._markerGroup.removeFrom(t),this._markerGroup.clearLayers()),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0;let i=t=>{if(Array.isArray(t[0]))return t.map(i,this);let e=t.map(this._createMarker,this);return!0!==this.options.hideMiddleMarkers&&t.map((i,n)=>{let s=this.isPolygon()?(n+1)%t.length:n+1;return this._createMiddleMarker(e[n],e[s])}),e};this._markers=i(e),this.filterMarkerGroup(),t.addLayer(this._markerGroup)},_createMarker(t){let e=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this.options.rotate?(e.on("dragstart",this._onRotateStart,this),e.on("drag",this._onRotate,this),e.on("dragend",this._onRotateEnd,this)):(e.on("click",this._onVertexClick,this),e.on("dragstart",this._onMarkerDragStart,this),e.on("move",this._onMarkerDrag,this),e.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||e.on(this.options.removeVertexOn,this._removeMarker,this)),this._markerGroup.addLayer(e),e},_createMiddleMarker(t,e){if(!t||!e)return!1;let i=L.PM.Utils.calcMiddleLatLng(this._map,t.getLatLng(),e.getLatLng()),n=this._createMarker(i),s=L.divIcon({className:"marker-icon marker-icon-middle"});return n.setIcon(s),n.leftM=t,n.rightM=e,t._middleMarkerNext=n,e._middleMarkerPrev=n,n.on(this.options.addVertexOn,this._onMiddleMarkerClick,this),n.on("movestart",this._onMiddleMarkerMoveStart,this),n},_onMiddleMarkerClick(t){let e=t.target;if(!this._vertexValidation("add",t))return;let i=L.divIcon({className:"marker-icon"});e.setIcon(i),this._addMarker(e,e.leftM,e.rightM)},_onMiddleMarkerMoveStart(t){let e=t.target;e.on("moveend",this._onMiddleMarkerMoveEnd,this),this._vertexValidation("add",t)?(e._dragging=!0,this._addMarker(e,e.leftM,e.rightM)):e.on("move",this._onMiddleMarkerMovePrevent,this)},_onMiddleMarkerMovePrevent(t){let e=t.target;this._vertexValidationDrag(e)},_onMiddleMarkerMoveEnd(t){let e=t.target;if(e.off("move",this._onMiddleMarkerMovePrevent,this),e.off("moveend",this._onMiddleMarkerMoveEnd,this),!this._vertexValidationDragEnd(e))return;let i=L.divIcon({className:"marker-icon"});e.setIcon(i),setTimeout(()=>{delete e._dragging},100)},_addMarker(t,e,i){t.off("movestart",this._onMiddleMarkerMoveStart,this),t.off(this.options.addVertexOn,this._onMiddleMarkerClick,this);let n=t.getLatLng(),s=this._layer._latlngs;delete t.leftM,delete t.rightM;let{indexPath:o,index:a,parentPath:r}=L.PM.Utils.findDeepMarkerIndex(this._markers,e),h=o.length>1?(0,es.default)(s,r):s,l=o.length>1?(0,es.default)(this._markers,r):this._markers;h.splice(a+1,0,n),l.splice(a+1,0,t),this._layer.setLatLngs(s),!0!==this.options.hideMiddleMarkers&&(this._createMiddleMarker(e,t),this._createMiddleMarker(t,i)),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit"),this._fireVertexAdded(t,L.PM.Utils.findDeepMarkerIndex(this._markers,t).indexPath,n),this.options.snappable&&this._initSnappableMarkers()},hasSelfIntersection(){return ti(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersectionOnVertexRemoval(){this._handleLayerStyle(!0)&&(this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers())},_handleLayerStyle(t){let e,i,n=this._layer;if(this.options.allowSelfIntersection?e=!1:(i=ti(this._layer.toGeoJSON(15)),e=i.features.length>0),e){if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!0),this.isRed)return e;t?this._flashLayer():(n.setStyle({color:"#f00000ff"}),this.isRed=!0),this._fireIntersect(i)}else n.setStyle({color:this.cachedColor}),this.isRed=!1,!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!1);return e},_flashLayer(){this.cachedColor||(this.cachedColor=this._layer.options.color),this._layer.setStyle({color:"#f00000ff"}),this.isRed=!0,window.setTimeout(()=>{this._layer.setStyle({color:this.cachedColor}),this.isRed=!1},200)},_updateDisabledMarkerStyle(t,e){t.forEach(t=>{Array.isArray(t)?this._updateDisabledMarkerStyle(t,e):t._icon&&(e&&!this._checkMarkerAllowedToDrag(t)?L.DomUtil.addClass(t._icon,"vertexmarker-disabled"):L.DomUtil.removeClass(t._icon,"vertexmarker-disabled"))})},_removeMarker(t){let e=t.target;if(!this._vertexValidation("remove",t))return;this.options.allowSelfIntersection||(this._coordsBeforeEdit=Re(this._layer,this._layer.getLatLngs()));let i=this._layer.getLatLngs(),{indexPath:n,index:s,parentPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);if(!n)return;let a=n.length>1?(0,es.default)(i,o):i,r=n.length>1?(0,es.default)(this._markers,o):this._markers,h=o[o.length-1]>0&&this._layer instanceof L.Polygon;if(!this.options.removeLayerBelowMinVertexCount&&!h&&(a.length<=2||this.isPolygon()&&a.length<=3))return void this._flashLayer();a.splice(s,1),this._layer.setLatLngs(i),this.isPolygon()&&a.length<=2&&a.splice(0,a.length);let l=!1;if(a.length<=1&&(a.splice(0,a.length),o.length>1&&n.length>1&&(i=Te(i)),this._layer.setLatLngs(i),this._initMarkers(),l=!0),Se(i)||this._layer.remove(),i=Te(i),this._layer.setLatLngs(i),this._markers=Te(this._markers),!l&&(r=n.length>1?(0,es.default)(this._markers,o):this._markers,e._middleMarkerPrev&&(this._markerGroup.removeLayer(e._middleMarkerPrev),this._removeFromCache(e._middleMarkerPrev)),e._middleMarkerNext&&(this._markerGroup.removeLayer(e._middleMarkerNext),this._removeFromCache(e._middleMarkerNext)),this._markerGroup.removeLayer(e),this._removeFromCache(e),r)){let t,e;if(this.isPolygon()?(t=(s+1)%r.length,e=(s+(r.length-1))%r.length):(e=s-1<0?void 0:s-1,t=s+1>=r.length?void 0:s+1),t!==e){let i=r[e],n=r[t];!0!==this.options.hideMiddleMarkers&&this._createMiddleMarker(i,n)}r.splice(s,1)}this._fireEdit(),this._layerEdited=!0,this._fireVertexRemoved(e,n),this._fireChange(this._layer.getLatLngs(),"Edit")},updatePolygonCoordsFromMarkerDrag(t){let e=this._layer.getLatLngs(),i=t.getLatLng(),{indexPath:n,index:s,parentPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,t);(n.length>1?(0,es.default)(e,o):e).splice(s,1,i),this._layer.setLatLngs(e)},_getNeighborMarkers(t){let{indexPath:e,index:i,parentPath:n}=L.PM.Utils.findDeepMarkerIndex(this._markers,t),s=e.length>1?(0,es.default)(this._markers,n):this._markers,o=(i+1)%s.length;return{prevMarker:s[(i+(s.length-1))%s.length],nextMarker:s[o]}},_checkMarkerAllowedToDrag(t){let{prevMarker:e,nextMarker:i}=this._getNeighborMarkers(t),n=L.polyline([e.getLatLng(),t.getLatLng()]),s=L.polyline([t.getLatLng(),i.getLatLng()]),o=pi(this._layer.toGeoJSON(15),n.toGeoJSON(15)).features.length,a=pi(this._layer.toGeoJSON(15),s.toGeoJSON(15)).features.length;return t.getLatLng()===this._markers[0][0].getLatLng()?a+=1:t.getLatLng()===this._markers[0][this._markers[0].length-1].getLatLng()&&(o+=1),!(o<=2&&a<=2)},_onMarkerDragStart(t){let e=t.target;if(this.cachedColor||(this.cachedColor=this._layer.options.color),!this._vertexValidation("move",t))return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragStart(t,i),this.options.allowSelfIntersection||(this._coordsBeforeEdit=Re(this._layer,this._layer.getLatLngs())),!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()?this._markerAllowedToDrag=this._checkMarkerAllowedToDrag(e):this._markerAllowedToDrag=null},_onMarkerDrag(t){let e=t.target;if(!this._vertexValidationDrag(e))return;let{indexPath:i,index:n,parentPath:s}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);if(!i)return;if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()&&!1===this._markerAllowedToDrag)return this._layer.setLatLngs(this._coordsBeforeEdit),this._initMarkers(),void this._handleLayerStyle();this.updatePolygonCoordsFromMarkerDrag(e);let o=i.length>1?(0,es.default)(this._markers,s):this._markers,a=(n+1)%o.length,r=(n+(o.length-1))%o.length,h=e.getLatLng(),l=o[r].getLatLng(),c=o[a].getLatLng();if(e._middleMarkerNext){let t=L.PM.Utils.calcMiddleLatLng(this._map,h,c);e._middleMarkerNext.setLatLng(t)}if(e._middleMarkerPrev){let t=L.PM.Utils.calcMiddleLatLng(this._map,h,l);e._middleMarkerPrev.setLatLng(t)}this.options.allowSelfIntersection||this._handleLayerStyle(),this._fireMarkerDrag(t,i),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(t){let e=t.target;if(!this._vertexValidationDragEnd(e))return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e),n=!this.options.allowSelfIntersection&&this.hasSelfIntersection();n&&this.options.allowSelfIntersectionEdit&&this._markerAllowedToDrag&&(n=!1);let s=!this.options.allowSelfIntersection&&n;if(this._fireMarkerDragEnd(t,i,s),s)return this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers(),this.options.snappable&&this._initSnappableMarkers(),this._handleLayerStyle(),void this._fireLayerReset(t,i);!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._handleLayerStyle(),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_onVertexClick(t){let e=t.target;if(e._dragging)return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireVertexClick(t,i)}}),ts.Polygon=ts.Line.extend({_shape:"Polygon",_checkMarkerAllowedToDrag(t){let{prevMarker:e,nextMarker:i}=this._getNeighborMarkers(t),n=L.polyline([e.getLatLng(),t.getLatLng()]),s=L.polyline([t.getLatLng(),i.getLatLng()]),o=pi(this._layer.toGeoJSON(15),n.toGeoJSON(15)).features.length,a=pi(this._layer.toGeoJSON(15),s.toGeoJSON(15)).features.length;return!(o<=2&&a<=2)}}),ts.Rectangle=ts.Polygon.extend({_shape:"Rectangle",_initMarkers(){let t=this._map,e=this._findCorners();this._markerGroup&&this._markerGroup.clearLayers(),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0,t.addLayer(this._markerGroup),this._markers=[],this._markers[0]=e.map(this._createMarker,this),[this._cornerMarkers]=this._markers,this._layer.getLatLngs()[0].forEach((t,e)=>{let i=this._cornerMarkers.find(t=>t._index===e);i&&i.setLatLng(t)})},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this._addMarkerEvents()},_createMarker(t,e){let i=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(i,"vertexPane"),i._origLatLng=t,i._index=e,i._pmTempLayer=!0,i.on("click",this._onVertexClick,this),this._markerGroup.addLayer(i),i},_addMarkerEvents(){this._markers[0].forEach(t=>{t.on("dragstart",this._onMarkerDragStart,this),t.on("drag",this._onMarkerDrag,this),t.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||t.on("contextmenu",this._removeMarker,this)})},_removeMarker:()=>null,_onMarkerDragStart(t){if(!this._vertexValidation("move",t))return;let e=t.target,i=this._cornerMarkers;e._oppositeCornerLatLng=i.find(t=>t._index===(e._index+2)%4).getLatLng(),e._snapped=!1;let{indexPath:n}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragStart(t,n)},_onMarkerDrag(t){let e=t.target;if(!this._vertexValidationDrag(e)||void 0===e._index)return;this._adjustRectangleForMarkerMove(e);let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDrag(t,i),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(t){let e=t.target;if(!this._vertexValidationDragEnd(e))return;this._cornerMarkers.forEach(t=>{delete t._oppositeCornerLatLng});let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragEnd(t,i),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_adjustRectangleForMarkerMove(t){L.extend(t._origLatLng,t._latlng);let e=L.PM.Utils._getRotatedRectangle(t.getLatLng(),t._oppositeCornerLatLng,this.getAngle(),this._map);this._layer.setLatLngs(e),this._adjustAllMarkers(t),this._layer.redraw()},_adjustAllMarkers(t){let e=this._layer.getLatLngs()[0];if(e&&4!==e.length&&e.length>0)e.forEach((t,e)=>{this._cornerMarkers[e].setLatLng(t)}),this._cornerMarkers.slice(e.length).forEach(t=>{t.setLatLng(e[0])});else if(e&&e.length){let i=e.findIndex(e=>t.getLatLng().equals(e));i>-1?(this._cornerMarkers[(t._index+1)%4].setLatLng(e[(i+1)%4]),this._cornerMarkers[(t._index+2)%4].setLatLng(e[(i+2)%4]),this._cornerMarkers[(t._index+3)%4].setLatLng(e[(i+3)%4])):this._cornerMarkers.forEach(t=>{t.setLatLng(e[t._index])})}else;},_findCorners(){void 0===this._angle&&this.setInitAngle(De(this._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);let t=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(t[0],t[2],this.getAngle(),this._map||this)}}),ts.CircleMarker=ts.extend({_shape:"CircleMarker",initialize(t){this._layer=t,this._enabled=!1,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._updateHiddenPolyCircle()},enable(t={draggable:!0,snappable:!0}){L.Util.setOptions(this,t),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),this.options.allowEditing&&this._layer._map?(this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._extendingEnable(),this._updateHiddenPolyCircle(),this._fireEnable()):this.disable()},_extendingEnable(){this._layer.on("pm:dragstart",this._onDragStart,this),this._layer.on("pm:drag",this._onMarkerDrag,this),this._layer.on("pm:dragend",this._onMarkerDragEnd,this)},disable(){this.dragging()||(this._map||(this._map=this._layer._map),this._map&&this.enabled()&&(this.layerDragEnabled()&&this.disableLayerDrag(),this._helperLayers&&(this._helperLayers.clearLayers(),this._helperLayers.removeFrom(this._map)),this.options[this._editableOption]?(this._map.off("move",this._syncMarkers,this),this._outerMarker.off("drag",this._handleOuterMarkerSnapping,this)):this._map.off("move",this._updateHiddenPolyCircle,this),this._extendingDisable(),this._layer.off("remove",this.disable,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1))},_extendingDisable(){this._layer.off("contextmenu",this._removeMarker,this)},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options[this._editableOption]?(this._initMarkers(),this._map.on("move",this._syncMarkers,this),this.options.snappable?(this._initSnappableMarkers(),this._outerMarker.on("drag",this._handleOuterMarkerSnapping,this),this._outerMarker.on("move",this._syncHintLine,this),this._outerMarker.on("move",this._syncCircleRadius,this)):this._disableSnapping()):(this.options.draggable&&this.enableLayerDrag(),this._map.on("move",this._updateHiddenPolyCircle,this),this.options.snappable?this._initSnappableMarkersDrag():this._disableSnappingDrag()),this._extendingApplyOptions()},_extendingApplyOptions(){this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_initMarkers(){let t=this._map;this._helperLayers&&(this._helperLayers.removeFrom(t),this._helperLayers.clearLayers()),this._helperLayers=new L.FeatureGroup,this._helperLayers._pmTempLayer=!0,this._helperLayers.addTo(t);let e=this._layer.getLatLng(),i=this._layer._radius,n=this._getLatLngOnCircle(e,i);this._centerMarker=this._createCenterMarker(e),this._outerMarker=this._createOuterMarker(n),this._markers=[this._centerMarker,this._outerMarker],this._createHintLine(this._centerMarker,this._outerMarker)},_getLatLngOnCircle(t,e){let i=this._map.project(t),n=L.point(i.x+e,i.y);return this._map.unproject(n)},_createHintLine(t,e){let i=t.getLatLng(),n=e.getLatLng();this._hintline=L.polyline([i,n],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._helperLayers.addLayer(this._hintline)},_createCenterMarker(t){let e=this._createMarker(t);return this.options.draggable?(L.DomUtil.addClass(e._icon,"leaflet-pm-draggable"),e.on("move",this._moveCircle,this)):e.dragging.disable(),e},_createOuterMarker(t){let e=this._createMarker(t);return e.on("drag",this._resizeCircle,this),e},_createMarker(t){let e=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._origLatLng=t,e._pmTempLayer=!0,e.on("dragstart",this._onMarkerDragStart,this),e.on("drag",this._onMarkerDrag,this),e.on("dragend",this._onMarkerDragEnd,this),e.on("click",this._onVertexClick,this),this._helperLayers.addLayer(e),e},_moveCircle(t){if(t.target._cancelDragEventChain)return;let e=this._centerMarker.getLatLng();this._layer.setLatLng(e);let i=this._layer._radius,n=this._getLatLngOnCircle(e,i);this._outerMarker._latlng=n,this._outerMarker.update(),this._syncHintLine(),this._updateHiddenPolyCircle(),this._fireCenterPlaced("Edit"),this._fireChange(this._layer.getLatLng(),"Edit")},_syncMarkers(){let t=this._layer.getLatLng(),e=this._layer._radius,i=this._getLatLngOnCircle(t,e);this._outerMarker.setLatLng(i),this._centerMarker.setLatLng(t),this._syncHintLine(),this._updateHiddenPolyCircle()},_resizeCircle(){this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker()),this._syncHintLine(),this._syncCircleRadius()},_syncCircleRadius(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(i),this._updateHiddenPolyCircle(),this._fireChange(this._layer.getLatLng(),"Edit")},_syncHintLine(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng();this._hintline.setLatLngs([t,e])},_removeMarker(){this.options[this._editableOption]&&this.disable(),this._layer.remove(),this._fireRemove(this._layer),this._fireRemove(this._map,this._layer)},_onDragStart(){this._map.pm.Draw.CircleMarker._layerIsDragging=!0},_onMarkerDragStart(t){this._vertexValidation("move",t)&&this._fireMarkerDragStart(t)},_onMarkerDrag(t){let e=t.target;e instanceof L.Marker&&!this._vertexValidationDrag(e)||this._fireMarkerDrag(t)},_onMarkerDragEnd(t){this._extedingMarkerDragEnd();let e=t.target;this._vertexValidationDragEnd(e)&&(this.options[this._editableOption]&&(this._fireEdit(),this._layerEdited=!0),this._fireMarkerDragEnd(t))},_extedingMarkerDragEnd(){this._map.pm.Draw.CircleMarker._layerIsDragging=!1},_initSnappableMarkersDrag(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnappingDrag(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)},_updateHiddenPolyCircle(){let t=this._layer._map||this._map;if(t){let e=L.PM.Utils.pxRadiusToMeterRadius(this._layer.getRadius(),t,this._layer.getLatLng()),i=L.circle(this._layer.getLatLng(),this._layer.options);i.setRadius(e);let n=t&&t.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(i,200,!n).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(i,200,!n),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)}},_getNewDestinationOfOuterMarker(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);return this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?e=Ie(this._map,t,e,this._getMinDistanceInMeter(t)):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&(e=Ie(this._map,t,e,this._getMaxDistanceInMeter(t))),e},_handleOuterMarkerSnapping(){if(this._outerMarker._snapped){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);(this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]||this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption])&&this._outerMarker.setLatLng(this._outerMarker._orgLatLng)}this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker())},_distanceCalculation(t,e){return this._map.project(t).distanceTo(this._map.project(e))},_getMinDistanceInMeter(t){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,t)},_getMaxDistanceInMeter(t){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,t)},_onVertexClick(t){t.target._dragging||this._fireVertexClick(t,void 0)}}),ts.Circle=ts.CircleMarker.extend({_shape:"Circle",initialize(t){this._layer=t,this._enabled=!1,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._updateHiddenPolyCircle()},enable(t){L.PM.Edit.CircleMarker.prototype.enable.call(this,t||{})},_extendingEnable(){},_extendingDisable(){this._layer.off("remove",this.disable,this);let t=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(t,"leaflet-pm-draggable")},_extendingApplyOptions(){},_syncMarkers(){},_removeMarker(){},_onDragStart(){},_extedingMarkerDragEnd(){},_updateHiddenPolyCircle(){let t=this._map&&this._map.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(this._layer,200,!t).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(this._layer,200,!t),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)},_distanceCalculation(t,e){return this._map.distance(t,e)},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_onVertexClick(t){t.target._dragging||this._fireVertexClick(t,void 0)}}),ts.ImageOverlay=ts.extend({_shape:"ImageOverlay",initialize(t){this._layer=t,this._enabled=!1},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},enabled(){return this._enabled},enable(t={draggable:!0,snappable:!0}){if(L.Util.setOptions(this,t),this._map=this._layer._map,this._map){if(!this.options.allowEditing)return void this.disable();this.enabled()||this.disable(),this.enableLayerDrag(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._otherSnapLayers=this._findCorners(),this._fireEnable()}},disable(){this._dragging||(this._map||(this._map=this._layer._map),this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this.enabled()||(this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()),this._enabled=!1)},_findCorners(){let t=this._layer.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]}}),ts.Text=ts.extend({_shape:"Text",initialize(t){this._layer=t,this._enabled=!1},enable(t){if(L.Util.setOptions(this,t),this.textArea){if(!this.options.allowEditing||!this._layer._map)return void this.disable();this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._safeToCacheDragState=!0,this._focusChange(),this.textArea.readOnly=!1,this.textArea.classList.remove("pm-disabled"),this._layer.on("remove",this.disable,this),L.DomEvent.on(this.textArea,"input",this._autoResize,this),L.DomEvent.on(this.textArea,"focus",this._focusChange,this),L.DomEvent.on(this.textArea,"blur",this._focusChange,this),this._layer.on("dblclick",L.DomEvent.stop),L.DomEvent.off(this.textArea,"mousedown",this._preventTextSelection),this._enabled=!0,this._fireEnable()}},disable(){if(!this.enabled())return;this._layer.off("remove",this.disable,this),L.DomEvent.off(this.textArea,"input",this._autoResize,this),L.DomEvent.off(this.textArea,"focus",this._focusChange,this),L.DomEvent.off(this.textArea,"blur",this._focusChange,this),L.DomEvent.off(document,"click",this._documentClick,this),this._focusChange(),this.textArea.readOnly=!0,this.textArea.classList.add("pm-disabled");let t=document.activeElement;this.textArea.focus(),this.textArea.selectionStart=0,this.textArea.selectionEnd=0,L.DomEvent.on(this.textArea,"mousedown",this._preventTextSelection),t.focus(),this._disableOnBlurActive=!1,this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initSnappableMarkers(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)},_autoResize(){this.textArea.style.height="1px",this.textArea.style.width="1px";let t=this.textArea.scrollHeight>21?this.textArea.scrollHeight:21,e=this.textArea.scrollWidth>16?this.textArea.scrollWidth:16;this.textArea.style.height=`${t}px`,this.textArea.style.width=`${e}px`,this._layer.options.text=this.getText(),this._fireTextChange(this.getText())},_disableOnBlur(){this._disableOnBlurActive=!0,setTimeout(()=>{this.enabled()&&L.DomEvent.on(document,"click",this._documentClick,this)},100)},_documentClick(t){t.target!==this.textArea&&(this.disable(),!this.getText()&&this.options.removeIfEmpty&&this.remove())},_focusChange(t={}){let e=this._hasFocus;this._hasFocus="focus"===t.type,!e!=!this._hasFocus&&(this._hasFocus?(this._applyFocus(),this._focusText=this.getText(),this._fireTextFocus()):(this._removeFocus(),this._fireTextBlur(),this._focusText!==this.getText()&&(this._fireEdit(),this._layerEdited=!0)))},_applyFocus(){this.textArea.classList.add("pm-hasfocus"),this._map.dragging&&(this._safeToCacheDragState&&(this._originalMapDragState=this._map.dragging._enabled,this._safeToCacheDragState=!1),this._map.dragging.disable())},_removeFocus(){this._map.dragging&&(this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0),this.textArea.classList.remove("pm-hasfocus")},focus(){if(!this.enabled())throw new TypeError("Layer is not enabled");this.textArea.focus()},blur(){if(!this.enabled())throw new TypeError("Layer is not enabled");this.textArea.blur(),this._disableOnBlurActive&&this.disable()},hasFocus(){return this._hasFocus},getElement(){return this.textArea},setText(t){t&&(this.textArea.value=t),this._autoResize()},getText(){return this.textArea.value},_initTextMarker(){if(this.textArea=L.PM.Draw.Text.prototype._createTextArea.call(this),this.options.className){let t=this.options.className.split(" ");this.textArea.classList.add(...t)}let t=L.PM.Draw.Text.prototype._createTextIcon.call(this,this.textArea);this._layer.setIcon(t),this._layer.once("add",this._createTextMarker,this)},_createTextMarker(t=!1){this._layer.off("add",this._createTextMarker,this),this._layer.getElement().tabIndex=-1,this.textArea.wrap="off",this.textArea.style.overflow="hidden",this.textArea.style.height=L.DomUtil.getStyle(this.textArea,"font-size"),this.textArea.style.width="1px",this._layer.options.text&&this.setText(this._layer.options.text),this._autoResize(),!0===t&&(this.enable(),this.focus(),this._disableOnBlur())},_preventTextSelection(t){t.preventDefault()}});var ns=function(t,e,i,n,s,o){this._matrix=[t,e,i,n,s,o]};ns.init=()=>new L.PM.Matrix(1,0,0,1,0,0),ns.prototype={transform(t){return this._transform(t.clone())},_transform(t){let e=this._matrix,{x:i,y:n}=t;return t.x=e[0]*i+e[1]*n+e[4],t.y=e[2]*i+e[3]*n+e[5],t},untransform(t){let e=this._matrix;return new L.Point((t.x/e[0]-e[4])/e[0],(t.y/e[2]-e[5])/e[2])},clone(){let t=this._matrix;return new L.PM.Matrix(t[0],t[1],t[2],t[3],t[4],t[5])},translate(t){if(void 0===t)return new L.Point(this._matrix[4],this._matrix[5]);let e,i;return"number"==typeof t?(e=t,i=t):(e=t.x,i=t.y),this._add(1,0,0,1,e,i)},scale(t,e){if(void 0===t)return new L.Point(this._matrix[0],this._matrix[3]);let i,n;return e=e||L.point(0,0),"number"==typeof t?(i=t,n=t):(i=t.x,n=t.y),this._add(i,0,0,n,e.x,e.y)._add(1,0,0,1,-e.x,-e.y)},rotate(t,e){let i=Math.cos(t),n=Math.sin(t);return e=e||new L.Point(0,0),this._add(i,n,-n,i,e.x,e.y)._add(1,0,0,1,-e.x,-e.y)},flip(){return this._matrix[1]*=-1,this._matrix[2]*=-1,this},_add(t,e,i,n,s,o){let a,r=[[],[],[]],h=this._matrix,l=[[h[0],h[2],h[4]],[h[1],h[3],h[5]],[0,0,1]],c=[[t,i,s],[e,n,o],[0,0,1]];t&&t instanceof L.PM.Matrix&&(h=t._matrix,c=[[h[0],h[2],h[4]],[h[1],h[3],h[5]],[0,0,1]]);for(let u=0;u<3;u+=1)for(let t=0;t<3;t+=1){a=0;for(let e=0;e<3;e+=1)a+=l[u][e]*c[e][t];r[u][t]=a}return this._matrix=[r[0][0],r[1][0],r[0][1],r[1][1],r[0][2],r[1][2]],this}};var ss=ns,os={calcMiddleLatLng(t,e,i){let n=t.project(e),s=t.project(i);return t.unproject(n._add(s)._divideBy(2))},findLayers(t){let e=[];return t.eachLayer(t=>{(t instanceof L.Polyline||t instanceof L.Marker||t instanceof L.Circle||t instanceof L.CircleMarker||t instanceof L.ImageOverlay)&&e.push(t)}),e=e.filter(t=>!!t.pm),e=e.filter(t=>!t._pmTempLayer),e=e.filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore),e},circleToPolygon(t,e=60,i=!0){let n=Be(t.getLatLng(),t.getRadius(),e,0,i),s=[];for(let o=0;o<n.length;o+=1){let t=[n[o].lat,n[o].lng];s.push(t)}return L.polygon(s,t.options)},disablePopup(t){t.getPopup()&&(t._tempPopupCopy=t.getPopup(),t.unbindPopup())},enablePopup(t){t._tempPopupCopy&&(t.bindPopup(t._tempPopupCopy),delete t._tempPopupCopy)},_fireEvent(t,e,i,n=!1){t.fire(e,i,n);let{groups:s}=this.getAllParentGroups(t);s.forEach(t=>{t.fire(e,i,n)})},getAllParentGroups(t){let e=[],i=[],n=t=>{for(let s in t._eventParents)if(-1===e.indexOf(s)){e.push(s);let o=t._eventParents[s];i.push(o),n(o)}};return!t._pmLastGroupFetch||!t._pmLastGroupFetch.time||(new Date).getTime()-t._pmLastGroupFetch.time>1e3?(n(t),t._pmLastGroupFetch={time:(new Date).getTime(),groups:i,groupIds:e},{groupIds:e,groups:i}):{groups:t._pmLastGroupFetch.groups,groupIds:t._pmLastGroupFetch.groupIds}},createGeodesicPolygon:Be,getTranslation:Ce,findDeepCoordIndex(t,e,i=!0){let n,s=t=>(o,a)=>{let r=t.concat(a);if(i){if(o.lat&&o.lat===e.lat&&o.lng===e.lng)return n=r,!0}else if(o.lat&&L.latLng(o).equals(e))return n=r,!0;return Array.isArray(o)&&o.some(s(r))};t.some(s([]));let o={};return n&&(o={indexPath:n,index:n[n.length-1],parentPath:n.slice(0,n.length-1)}),o},findDeepMarkerIndex(t,e){let i,n=t=>(s,o)=>{let a=t.concat(o);return s._leaflet_id===e._leaflet_id?(i=a,!0):Array.isArray(s)&&s.some(n(a))};t.some(n([]));let s={};return i&&(s={indexPath:i,index:i[i.length-1],parentPath:i.slice(0,i.length-1)}),s},_getIndexFromSegment(t,e){if(e&&2===e.length){let i=this.findDeepCoordIndex(t,e[0]),n=this.findDeepCoordIndex(t,e[1]),s=Math.max(i.index,n.index);return(0===i.index||0===n.index)&&1!==s&&(s+=1),{indexA:i,indexB:n,newIndex:s,indexPath:i.indexPath,parentPath:i.parentPath}}return null},_getRotatedRectangle(t,e,i,n){let s=$n(n,t),o=$n(n,e),a=i*Math.PI/180,r=Math.cos(a),h=Math.sin(a),l=(o.x-s.x)*r+(o.y-s.y)*h,c=(o.y-s.y)*r-(o.x-s.x)*h,u=l*r+s.x,p=l*h+s.y,d=-c*h+s.x,_=c*r+s.y;return[Jn(n,s),Jn(n,{x:u,y:p}),Jn(n,o),Jn(n,{x:d,y:_})]},pxRadiusToMeterRadius(t,e,i){let n=e.project(i),s=L.point(n.x+t,n.y);return e.distance(e.unproject(s),i)}};L.PM=L.PM||{version:"2.18.3",Map:Ne,Toolbar:Fe,Draw:He,Edit:ts,Utils:os,Matrix:ss,activeLang:"en",optIn:!1,initialize(t){this.addInitHooks(t)},setOptIn(t){this.optIn=!!t},addInitHooks(){L.Map.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Map(this)):this.options.pmIgnore||(this.pm=new L.PM.Map(this)),this.pm&&this.pm.setGlobalOptions({})}),L.LayerGroup.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.LayerGroup(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.LayerGroup(this))}),L.Marker.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this)):this.options.pmIgnore||(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this))}),L.CircleMarker.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.CircleMarker(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.CircleMarker(this))}),L.Polyline.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Line(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Line(this))}),L.Polygon.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Polygon(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Polygon(this))}),L.Rectangle.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Rectangle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Rectangle(this))}),L.Circle.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Circle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Circle(this))}),L.ImageOverlay.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.ImageOverlay(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.ImageOverlay(this))})},reInitLayer(t){t instanceof L.LayerGroup&&t.eachLayer(t=>{this.reInitLayer(t)}),t.pm||L.PM.optIn&&!1!==t.options.pmIgnore||t.options.pmIgnore||(t instanceof L.Map?t.pm=new L.PM.Map(t):t instanceof L.Marker?t.options.textMarker?(t.pm=new L.PM.Edit.Text(t),t.pm._initTextMarker(),t.pm._createTextMarker(!1)):t.pm=new L.PM.Edit.Marker(t):t instanceof L.Circle?t.pm=new L.PM.Edit.Circle(t):t instanceof L.CircleMarker?t.pm=new L.PM.Edit.CircleMarker(t):t instanceof L.Rectangle?t.pm=new L.PM.Edit.Rectangle(t):t instanceof L.Polygon?t.pm=new L.PM.Edit.Polygon(t):t instanceof L.Polyline?t.pm=new L.PM.Edit.Line(t):t instanceof L.LayerGroup?t.pm=new L.PM.Edit.LayerGroup(t):t instanceof L.ImageOverlay&&(t.pm=new L.PM.Edit.ImageOverlay(t)))}},"1.7.1"===L.version&&L.Canvas.include({_onClick(t){let e,i,n=this._map.mouseEventToLayerPoint(t);for(let s=this._drawFirst;s;s=s.next)e=s.layer,e.options.interactive&&e._containsPoint(n)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(i=e);i&&(L.DomEvent.fakeStop(t),this._fireEvent([i],t))}}),L.PM.initialize()})();const p={en_US:{showEagle:"Show Eagle Map",hideEagle:"Hide Eagle Map"},zh_CN:{showEagle:"显示鹰眼图",hideEagle:"隐藏鹰眼图"}},d={en_US:{coordinate:"Coordinate",zoomLevel:"Zoom Level",FPS:"FPS"},zh_CN:{coordinate:"坐标",zoomLevel:"层级",FPS:"每秒帧数"}},_={en_US:{home:"Go Home",capture:"Screen Capture",center:"View Full",north:"Move North",south:"Move South",east:"Move East",west:"Move West",zoomIn:"Zoom In",zoomOut:"Zoom Out",zoom:"Zoom to this level",dragZoom:"Drag to zoom",more:"More",draw:"Plot",layer:"Layer Manager",lng:"Longitude",lat:"Latitude"},zh_CN:{home:"回到初始位置",capture:"截屏",center:"查看全图",north:"向上平移",south:"向下平移",east:"向右平移",west:"向左平移",zoomIn:"放大一级",zoomOut:"缩小一级",zoom:"缩放到此级别",dragZoom:"拖动缩放",more:"更多",draw:"标绘",layer:"图层管理",lng:"经度",lat:"纬度"}},m=u.Control.extend({options:{position:"bottomleft",coordinateUnit:"decimal",showCoordinate:!0,showLevel:!0,showFPS:!0,precision:6},initialize(t){u.setOptions(this,t),this.lastTime=+new Date,this.frames=0,u.Control.prototype.initialize.call(this,this.options)},onAdd(t){this.map=t,this.lang=t.lang,this.langDic=d,this._container=u.DomUtil.create("div",`${t.clsPrefix}-statusbar`),this.zoom=t.getZoom();const e=t.getCenter();return this.lng=e.lng,this.lat=e.lat,this.options.showCoordinate&&(this._latlngContainer=u.DomUtil.create("div",`${t.clsPrefix}-statusbar-item coordinate`,this._container),this._latlngContainer.innerHTML=`<b>${this.langDic[this.lang].coordinate}:</b>${this.getCoordinate(this.lng)},${this.getCoordinate(this.lat)}`),this.options.showLevel&&(this._levelContainer=u.DomUtil.create("div",`${t.clsPrefix}-statusbar-item level`,this._container),this._levelContainer.innerHTML=`<b>${this.langDic[this.lang].zoomLevel}:</b>${this.zoom+1}`),this.options.showFPS&&(this._fpsContainer=u.DomUtil.create("div",`${t.clsPrefix}-statusbar-item fps`,this._container),this._fpsContainer.innerHTML=`<b>${this.langDic[this.lang].FPS}:</b>60`),this.initEvt(),this._container},initEvt(){this.map.on("mousemove",t=>{this.lat=t.latlng.lat,this.lng=t.latlng.lng,this._latlngContainer&&(this._latlngContainer.innerHTML=`<b>${this.langDic[this.lang].coordinate}:</b>${this.getCoordinate(this.lng,"lng")},${this.getCoordinate(this.lat,"lat")}`)}),this.map.on("zoomend",()=>{this.zoom=this.map.getZoom(),this._levelContainer&&(this._levelContainer.innerHTML=`<b>${this.langDic[this.lang].zoomLevel}:</b>${this.zoom+1}`)}),this.options.showFPS&&this.calcFPS()},getCoordinate(t,e="lng"){switch(this.options.coordinateUnit){case"decimal":return t.toFixed(this.options.precision);case"radian":return(t*Math.PI/180).toFixed(this.options.precision);case"degrees":return this._formatDeg(t,e)}},_formatDeg(t,e){const i=parseFloat(t),n=parseInt(i);let s="";"lng"===e?s=n>0?"E":"W":"lat"===e&&(s=n>0?"N":"S");let o=parseInt(60*(i-n));return n+"°"+o+"′"+(3600*(i-n)-60*o).toFixed(2)+"″"+s},calcFPS(){if(this.frames++,this.frames>=30){const t=Date.now()-this.lastTime,e=Math.round(1e3/(t/this.frames));this._fpsContainer&&(this.frames=0,this.lastTime=Date.now(),this._fpsContainer.innerHTML=`<b>${this.langDic[this.lang].FPS}:</b><span>${e}</span>`)}requestAnimationFrame(this.calcFPS.bind(this))}}),g=u.Control.extend({includes:u.Evented?u.Evented.prototype:u.Mixin.Events,options:{position:"bottomright",toggleDisplay:!0,zoomLevelOffset:5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:100,height:100,collapsedWidth:22,collapsedHeight:22,aimingRectOptions:{color:"#ff7800",weight:1,interactive:!1},shadowRectOptions:{color:"#000000",weight:1,interactive:!1,opacity:0,fillOpacity:0},strings:{},mapOptions:{rotate:!0,rotateControl:!1}},initialize(t,e){u.Util.setOptions(this,e),this.options.aimingRectOptions.interactive=!1,this.options.shadowRectOptions.interactive=!1,this._layer=t},onAdd(t){this._mainMap=t,this.lang=t.options.lang??this.options.lang??"zh_CN",this.langDic=p,this.options.strings={hideText:this.langDic[this.lang].hideEagle,showText:this.langDic[this.lang].showEagle},this._container=u.DomUtil.create("div",`${t.clsPrefix}-eaglemap`),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",u.DomEvent.disableClickPropagation(this._container),u.DomEvent.on(this._container,"mousewheel",u.DomEvent.stopPropagation);let e={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:t.options.crs,rotateControl:t.options.rotateControl,rotate:t.options.rotate,bearing:t.options.bearing,lang:this.lang};return e=u.Util.extend(this.options.mapOptions,e),this._eagleMap=new u.Map(this._container,e),this._layer instanceof u.Layer&&this._eagleMap.addLayer(this._layer),this._mainMapMoving=!1,this._eagleMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._eagleMap.whenReady(u.Util.bind(function(){this._aimingRect=new u.Rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._eagleMap),this._shadowRect=new u.Rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._eagleMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._eagleMap.on("movestart",this._onEagleMapMoveStarted,this),this._eagleMap.on("move",this._onEagleMapMoving,this),this._eagleMap.on("moveend",this._onEagleMapMoved,this)},this)),this._container},addTo(t){u.Control.prototype.addTo.call(this,t);const e=this.options.centerFixed||this._mainMap.getCenter();return this._eagleMap.setView(e,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._eagleMap.off("moveend",this._onEagleMapMoved,this),this._eagleMap.removeLayer(this._layer)},changeLayer(t){this._eagleMap.removeLayer(this._layer),this._layer=t,this._eagleMap.addLayer(this._layer)},_addToggleButton(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),`${this._mainMap.clsPrefix}-eaglemap-toggle-display ${this._mainMap.clsPrefix}-eaglemap-toggle-display-`+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText(){return this.options.minimized?this.langDic[this.lang].showEagle:this.langDic[this.lang].hideEagle},_createButton(t,e,i,n,s,o){const a=u.DomUtil.create("a",i,n);a.innerHTML=t,a.href="#",a.title=e;const r=u.DomEvent.stopPropagation;return u.DomEvent.on(a,"click",r).on(a,"mousedown",r).on(a,"dblclick",r).on(a,"click",u.DomEvent.preventDefault).on(a,"click",s,o),a},_toggleDisplayButtonClicked(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay(t){t!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle()},_restore(){this.options.toggleDisplay?(this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace("minimized-"+this.options.position,""),this._toggleDisplayButton.title=this.options.strings.hideText):this._container.style.display="block",this._minimized=!1,this._onToggle()},_onMainMapMoved(t){if(this._eagleMapMoving)this._eagleMapMoving=!1;else{const t=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=!0,this._eagleMap.setView(t,this._decideZoom(!0)),this._setDisplay(this._decideMinimized())}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving(t){this._aimingRect.setBounds(this._mainMap.getBounds())},_onEagleMapMoveStarted(t){if(!this.options.centerFixed){const t=this._aimingRect.getBounds(),e=this._eagleMap.latLngToContainerPoint(t.getSouthWest()),i=this._eagleMap.latLngToContainerPoint(t.getNorthEast());this._lastAimingRectPosition={sw:e,ne:i}}},_onEagleMapMoving(t){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new u.LatLngBounds(this._eagleMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._eagleMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onEagleMapMoved(t){this._mainMapMoving?this._mainMapMoving=!1:(this._eagleMapMoving=!0,this._mainMap.setView(this._eagleMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_isZoomLevelFixed(){const t=this.options.zoomLevelFixed;return this._isDefined(t)&&this._isInteger(t)},_decideZoom(t){if(this._isZoomLevelFixed())return t?this.options.zoomLevelFixed:this._mainMap.getZoom();if(t)return this._mainMap.getZoom()-this.options.zoomLevelOffset;{const t=this._eagleMap.getZoom()-this._mainMap.getZoom(),e=this._eagleMap.getZoom()+this.options.zoomLevelOffset;let i;return t<this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._eagleMap.getMinZoom()+this.options.zoomLevelOffset?this._eagleMap.getZoom()>this._lastEagleMapZoom?(i=this._mainMap.getZoom()+1,this._eagleMap.setZoom(this._eagleMap.getZoom()-1)):i=this._mainMap.getZoom():i=e,this._lastEagleMapZoom=this._eagleMap.getZoom(),i}},_decideMinimized(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._eagleMap.getBounds()):this._minimized},_isInteger:t=>"number"==typeof t,_isDefined:t=>void 0!==t,_onToggle(){u.Util.requestAnimFrame(function(){u.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),u.Browser.any3d||u.Util.requestAnimFrame(this._fireToggleEvents,this)},this)},_fireToggleEvents(){u.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);const t={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",t),this.fire("toggle",t)}}),f=L.FeatureGroup.extend({initialize(t,e){this.markers=[],L.Util.setOptions(this,e);const i="string"==typeof this.options.cssClass?this.options.cssClass:"vertex-marker",n=void 0!==this.options.iconSize?this.options.iconSize:[24,24],s=void 0!==this.options.iconAnchor?this.options.iconAnchor:[12,12],o=this.options.textFn,a="boolean"!=typeof this.options.firstVertex||this.options.firstVertex,r="boolean"!=typeof this.options.lastVertex||this.options.lastVertex;this.dragable=this.options.dragable||!1;let h=t;"function"==typeof t.getLatLngs&&(h=t.getLatLngs());for(let p=a?0:1,d=h.length-(r?0:1);p<d;p++){const t=h[p];var l="function"==typeof o?o.call(this,p,h):o||"",c=L.divIcon({className:`${i} vertex-marker-${p===d-1?"last":p}`,html:l,iconSize:n,iconAnchor:s}),u=L.marker(t,{icon:c,pmIgnore:!0,index:p});this.markers.push(u)}L.FeatureGroup.prototype.initialize.call(this,this.markers)},onAdd(t){this.markers.forEach(t=>{L.FeatureGroup.prototype.addLayer.call(this,t)}),L.FeatureGroup.prototype.onAdd.call(this,t)},onRemove(t){this.markers.forEach(t=>{L.FeatureGroup.prototype.removeLayer.call(this,t)}),L.FeatureGroup.prototype.onRemove.call(this,t)}});class y extends L[L.Layer?"Layer":"Class"]{constructor(t,e,i,n,s){super(),L.setOptions(this,s),this._latlng=t,this._measurement=e,this._title=i,this._rotation=n,this.MEASUREDDATA=null,this.tempAcCurrDrawPoints=null}addTo(t){return t.addLayer(this),this}onAdd(t){this._map=t;const e=this.getPane?this.getPane():t.getPanes().markerPane,i=this._element=L.DomUtil.create("div","leaflet-zoom-animated leaflet-measure-path-measurement",e),n=L.DomUtil.create("div","",i);n.title=this._title,n.innerHTML=this._measurement,t.on("zoomanim",this._animateZoom,this),this._setPosition()}onRemove(t){t.off("zoomanim",this._animateZoom,this);(this.getPane?this.getPane():t.getPanes().markerPane).removeChild(this._element),this._map=null}_setPosition(){L.DomUtil.setPosition(this._element,this._map.latLngToLayerPoint(this._latlng)),this._element.style.transform+=" rotate("+this._rotation+"rad)"}_animateZoom(t){const e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();L.DomUtil.setPosition(this._element,e),this._element.style.transform+=" rotate("+this._rotation+"rad)"}}u.Map.addInitHook(function(){var t,e,i;this.pm&&this.pm.setLang(this.options.lang.split("_")[0]),(null==(t=this.options.eagleMapControl)?void 0:t.show)&&(this.eagleMapControl=new g(this.options.eagleMapControl),this.addControl(this.eagleMapControl)),(null==(e=this.options.statusBarControl)?void 0:e.show)&&(this.statusBarControl=new m(this.options.statusBarControl),this.addControl(this.statusBarControl)),(null==(i=this.options.scaleControl)?void 0:i.show)&&(this.scaleControl=new u.Control.Scale(Object.assign({position:"bottomleft",maxWidth:100,metric:!0,imperial:!1},this.options.scaleControl)),this.addControl(this.scaleControl))}),u.Marker.addInitHook(function(){let t=this.options.icon&&this.options.icon.options&&this.options.icon.options.iconAnchor;t&&(t=t[0]+"px "+t[1]+"px"),this.options.rotationOrigin=this.options.rotationOrigin||t||"center bottom",this.on("drag",t=>{t.target._applyRotation()})}),u.Marker.mergeOptions({scale:1,rotation:0,minZoom:0,maxZoom:16,hideOnMinZoom:!0,minificationScale:.6}),u.Marker.include({_setPos(t){this._icon.style.display="initial";const{rotation:i,minZoom:n,maxZoom:s,hideOnMinZoom:o,minificationScale:a}=this.options;if(n&&s&&s-n>0){const t=parseFloat(((1-a)/(s-n)).toFixed(2));this._map._zoom>=s?this.options.scale=1:this._map._zoom>n&this._map._zoom<s?this.options.scale=1-(s-this._map._zoom)*t:this._map._zoom<=n&&o&&(this._icon.style.display="none")}this._map._rotate&&(t=this._map.rotatedPointToMapPanePoint(t)),this._icon&&u.DomUtil.setPosition(this._icon,t,i,t,e.MathUtil.clamp(this.options.scale,a,1)),this._shadow&&u.DomUtil.setPosition(this._shadow,t,i,t,e.MathUtil.clamp(this.options.scale,a,1)),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_applyRotation(){this.options.rotation&&(this._icon.style[u.DomUtil.TRANSFORM+"Origin"]=this.options.rotationOrigin,"msTransform"===u.DomUtil.TRANSFORM?this._icon.style[u.DomUtil.TRANSFORM]="rotate("+this.options.rotation+"deg)":this._icon.style[u.DomUtil.TRANSFORM]+=" rotateZ("+this.options.rotation+"deg)")},startTwinkle(t,e){this.twinkle(t,e)},endTwinkle(){this.twinkleTimer&&(this.setOpacity(1),clearTimeout(this.twinkleTimer),this.twinkleTimer=void 0)},twinkle(t=200,e=1/0){let i=!1,n=0;const s=()=>{n++,e&&t&&n>Math.floor(e/t)?this.endTwinkle():(i?(this.setOpacity(.01),i=!1):(this.setOpacity(1),i=!0),this.twinkleTimer=setTimeout(s,t))};s()}}),u.Map.include({hasLayer:function(t){return t&&u.Util.stamp(t)in this._layers},removeLayerById:function(t){const e=this.getLayer(t);e&&this.removeLayer(e)}}),u.Path.addInitHook(function(){this.options.color&&(this.color=e.Color.from(this.options.color)),this.options.fillColor&&(this.fillColor=e.Color.from(this.options.fillColor))}),u.Polyline.addInitHook(function(){this.options.showMeasurements&&this.showMeasurements()}),u.Circle.include({toGeoJSON(){return{type:"Feature",properties:{},geometry:{type:"Circle",radius:this.getRadius(),coordinates:[this._latlng.lng,this._latlng.lat]}}}}),u.Layer.addInitHook(function(){this._leaflet_id=this.options.id||u.stamp({})}),u.LayerGroup.include({getLayerId:t=>t._leaflet_id,hasLayer(t){if(!t)return!1;return(["number","string"].includes(typeof t)?t:this.getLayerId(t))in this._layers}}),u.GridLayer.include({_setZoomTransform:function(t,i,n){null!=(s=i)&&this.options&&("gcj02"==this.options.corrdType?s=e.CoordsUtil.gcjEncrypt(i.lat,i.lng):"bd09"==this.options.corrdType&&(i=e.CoordsUtil.gcjEncrypt(i.lat,i.lng),s=e.CoordsUtil.bdEncrypt(i.lat,i.lng))),i=this._map.getZoomScale(n,t.zoom);var s=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(s,n)).round();u.Browser.any3d?u.DomUtil.setTransform(t.el,s,i):u.DomUtil.setPosition(t.el,s)},_getTiledPixelBounds:function(t){var i=(t=(null!=(n=t)&&this.options&&("gcj02"==this.options.corrdType?n=e.CoordsUtil.gcjEncrypt(t.lat,t.lng):"bd09"==this.options.corrdType&&(t=e.CoordsUtil.gcjEncrypt(t.lat,t.lng),n=e.CoordsUtil.bdEncrypt(t.lat,t.lng))),this._map))._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),n=(i=t.getZoomScale(i,this._tileZoom),t.project(n,this._tileZoom).floor());t=t.getSize().divideBy(2*i);return new u.Bounds(n.subtract(t),n.add(t))}}),u.TileLayer.addInitHook(function(){this.on("add",function(t){this._container.style.filter=Object.keys(this.options.style||{}).map(t=>`${t}(${this.options.style[t]})`).join(" ")})}),u.Polyline.include({_originalOnAdd:u.Polyline.prototype.onAdd,_originalOnRemove:u.Polyline.prototype.onRemove,_originalSetLatLngs:u.Polyline.prototype.setLatLngs,_originalAddLatLng:u.Polyline.prototype.addLatLng,setLatLngs:function(t){var e=this._map&&this._vertexMarkers&&this._latlngs.length!==t.length;this._originalSetLatLngs(t),e&&(this.removeVertexMarkers(),this.destroyVertexMarkers(),this.createVertexMarkers()),this.options.showMeasurements&&this.updateMeasurements()},removeVertexMarkers:function(){this._map&&this._vertexMarkers&&(this._map.removeLayer(this._vertexMarkers),this._vertexMarkers=void 0)},onAdd:function(t){this._originalOnAdd(t),this.createVertexMarkers(),this.options.showMeasurements&&this.showMeasurements(this.options.measurementOptions)},createVertexMarkers:function(){if(this._map){var t=this.options.vertexMarkers||{};void 0===this._vertexMarkers&&this.options.vertexMarkers&&(this._vertexMarkers=new f(this,t).addTo(this._map))}},destroyVertexMarkers:function(){this._vertexMarkers&&(this._vertexMarkers=void 0)},onRemove:function(t){this.removeVertexMarkers(),this._originalOnRemove(t),this.options.showMeasurements&&this.hideMeasurements()},showMeasurements(t){return!this._map||this._measurementLayer||(this._measurementOptions=u.extend({showCloseButton:!1,minPixelDistance:30,showDistances:!0,showArea:!0,showAggregate:!0,lang:{totalLength:"Total length",totalArea:"Total area",segmentLength:"Segment length"},map:this._map},t||{}),this._measurementLayer=(new u.LayerGroup).addTo(this._map),this.updateMeasurements(),this._map.on("zoomend",this.updateMeasurements,this)),this},hideMeasurements(){return this._map.off("zoomend",this.updateMeasurements,this),this._measurementLayer?(this._map.removeLayer(this._measurementLayer),this._measurementLayer=null,this):this},tempFormatDistance(t){const e=this._map.options.crs,i=new Array;for(let d=0;d<t.length;d++){const n=e.project(t[d]);i.push(n)}const n=i.length;let s,o,a,r,h,l,c=0;for(let d=0;d<n-1;d++)s=i[d],a=s.x,r=s.y,o=i[d+1],h=o.x,l=o.y,c+=Math.sqrt((a-h)*(a-h)+(r-l)*(r-l));const u=c;let p="";return p=u>1e3?"总长:"+Number(u/1e3).toFixed(1)+"公里":"总长:"+Math.round(u)+"米",p},tempMoveFormatDistance(t,e){const i=this._map.options.crs;t=i.project(t),t=new Array(t),e=i.project(e),t.push(e);const n=t.length;let s,o,a,r,h,l,c=0;for(let d=0;d<n-1;d++)s=t[d],a=s.x,r=s.y,o=t[d+1],h=o.x,l=o.y,c+=Math.sqrt((a-h)*(a-h)+(r-l)*(r-l));const u=c;let p="";return p=u>1e3?Number(u/1e3).toFixed(1)+"公里":Math.round(u)+"米",p},tempFormatArea(t){const e=this._map.options.crs,i=new Array;for(let m=0;m<t.length;m++){const n=e.project(t[m]);i.push(n)}let n=!0;for(var s=0;s<i.length-1;s++){n=i[s].x>180;break}const o=i.length;let a,r,h=0,l=0,c=0,u=0,p=0;if(null!=i){let t;if(n)for(s=0;s<o;s++)t=(s+1)%o,a=i[s],r=i[t],h+=a.x*r.y,h-=a.y*r.x;else{let e,n=0,d=0;for(s=0;s<o;s++)a=i[s],e=a.x,0==s?(n=e,d=e):(e<n&&(n=e),e>d&&(d=e));const _=parseInt(((n+d)/2+3)/6);for(s=0;s<o;s++)t=(s+1)%o,0==s?(a=i[s],l=widget.LonLatToXA80N(_,a.x,a.y)[0],c=widget.LonLatToXA80N(_,a.x,a.y)[1]):(l=u,c=p),r=i[t],u=widget.LonLatToXA80N(_,r.x,r.y)[0],p=widget.LonLatToXA80N(_,r.x,r.y)[1],h+=l*p,h-=u*c}}const d=Math.abs(h/2);let _="";return _=d>1e6?"总面积:"+Number(d/1e6).toFixed(4)+"平方公里\n(约:"+Number(.0015*d).toFixed(3)+"亩)":"总面积:"+d.toFixed(0)+"平方米\n(约:"+Number(.0015*d).toFixed(3)+"亩)",_},updateMeasurements(){if(!this._measurementLayer)return this;const t=this.getLatLngs();(new Array).push(t);let e=this.getLatLngs();const i=this instanceof u.Polygon,n=this._measurementOptions;let s,o,a,r,h;if(e&&e.length&&u.Util.isArray(e[0])&&(e=e[0]),this._measurementLayer.clearLayers(),this._measurementOptions.showDistances&&e.length>1){t.length;for(let t=1,l=e.length;i&&t<=l||t<l;t++)if(s=e[t-1],o=e[t%l],s.distanceTo(o),a=this._map.latLngToLayerPoint(s),r=this._map.latLngToLayerPoint(o),h=a.distanceTo(r),h>=n.minPixelDistance){const t=this.tempMoveFormatDistance(s,o);new y(this._map.layerPointToLatLng([(a.x+r.x)/2,(a.y+r.y)/2]),t,n.lang.segmentLength,this._getRotation(s,o),n).addTo(this._measurementLayer)}!i&&this._measurementOptions.showAggregate&&(new y(o,this.tempFormatDistance(t),n.lang.totalLength,0,n).addTo(this._measurementLayer),this.MEASUREDDATA=this.tempFormatDistance(t))}return i&&n.showArea&&e.length>2&&(new y(this.getBounds().getCenter(),this.tempFormatArea(t[0]),n.lang.totalArea,0,n).addTo(this._measurementLayer),this.MEASUREDDATA=this.tempFormatArea(t[0])),this},_getRotation(t,e){const i=this._map.project(t),n=this._map.project(e);return Math.atan((n.y-i.y)/(n.x-i.x))}}),u.LatLng.prototype.toArray=function(){return[this.lat,this.lng]},u.Path.include({startTwinkle(t,e){this.twinkle(t,e)},endTwinkle(){this.twinkleTimer&&(clearTimeout(this.twinkleTimer),this.setStyle({fillColor:this._orginalColor,stroke:this._orginalStroke}),this.twinkleTimer=void 0,this._orginalColor=void 0,this._orginalStroke=void 0)},twinkle(t=200,e=1/0){let i=!1,n=0;this._orginalColor=this.options.fillColor,this._orginalStroke=this.options.stroke;const s=()=>{n++,e&&t&&n>Math.floor(e/t)?this.endTwinkle():(i?(this.setStyle({fillColor:"rgba(255,255,255,0.01)",stroke:!1}),i=!1):(this.setStyle({fillColor:this._orginalColor,stroke:this._orginalStroke}),i=!0),this.twinkleTimer=setTimeout(s,t))};s()},getArea(t){if(this instanceof u.Polyline){var e,i=this._latlngs[0],n=(t||this._map).options.crs,s=i.length;let o,a,r=0;if(null!=i)for(let t=0;t<s;t++)e=(t+1)%s,o=180<i[t].lng&&90<i[t].lat?{x:i[t].lat,y:i[t].lng}:n.project(i[t]),a=180<i[e].lng&&90<i[e].lat?{x:i[e].lat,y:i[e].lng}:n.project(i[e]),r=(r+=o.x*a.y)-o.y*a.x;return Math.abs(r/2)}return this instanceof u.Circle?2*Math.PI*this.getRadius():null},getLength(t){if(this instanceof u.Polyline){for(var e=[],i=(t||this._map).options.crs,n=this._latlngs,s=0;s<n.length;s++)this instanceof u.Polygon?e.push(...n[s]):this instanceof u.Polyline&&e.push(n[s]);let l,c,p=0;for(let t=0,n=e.length-1;t<n;t++){l=180<e[t][0]&&90<e[t][1]?{x:e[t].lat,y:e[t].lng}:i.project(e[t]),c=180<e[t+1][0]&&90<e[t+1][1]?{x:e[t+1].lat,y:e[t+1].lng}:i.project(e[t+1]);var o=l.x,a=l.y,r=c.x,h=c.y;p+=Math.sqrt((o-r)*(o-r)+(a-h)*(a-h))}return p}return this instanceof u.Circle?Math.PI*Math.pow(this.getRadius(),2):null}}),u.Control.mergeOptions({offset:[0,0]}),u.Control.addInitHook(function(){const{className:t,offset:[e,i]}=this.options;(e||i)&&setTimeout(()=>{const n=this.getContainer();n&&(n.style.transform=`translate(${e}px, ${i}px)`,t&&n.classList.add(t))},200)}),u.Canvas.include({_fillStroke:function(t,e){var i=e.options;if(i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),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(),i.img)){const n=new Image;n.src=i.img,n.onload=function(){t.save(),t.clip();var i=e instanceof u.Circle?e._pxBounds:e._rawPxBounds,s=i.getSize(),o=t.createPattern(n,"repeat");t.fillStyle=o,t.fillRect(i.min.x,i.min.y,s.x,s.y),t.restore()}}}}),u.SVG.include({_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.img?("string"==typeof i.img&&i.img.match(/^url\(/)?this.__fillPattern(t):e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):i.fill?(e.setAttribute("fill",i.fillColor),e.setAttribute("fill-opacity",t instanceof u.Polygon||t instanceof L.Circle||t instanceof L.CircleMarker?i.fillOpacity:0)):e.setAttribute("fill-opacity",0))},__fillPattern:function(t){var e=t._path,i=t.options;this._defs||(this._defs=L.SVG.create("defs"),this._container.appendChild(this._defs));var n=i.img.substring(4,i.img.length-1),s=n+(Math.random()*Math.pow(10,17)+Math.random()*Math.pow(10,17));s+=(new Date).getUTCMilliseconds();var o=document.getElementById(s);if(!o){var a=new Image;a.src=n,(o=L.SVG.create("pattern")).setAttribute("id",s),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("patternUnits","userSpaceOnUse"),o.setAttribute("width","24"),o.setAttribute("height","24");var r=L.SVG.create("rect");r.setAttribute("width",24),r.setAttribute("height",24),r.setAttribute("x",0),r.setAttribute("x",0),r.setAttribute("fill",i.fillColor||i.color),o.appendChild(r),this._defs.appendChild(o);var h=L.SVG.create("image");h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttributeNS("http://www.w3.org/1999/xlink","href",n),h.setAttribute("width","24"),h.setAttribute("height","24"),o.appendChild(h),a.onload=function(){o.setAttribute("width",a.width),o.setAttribute("height",a.height),h.setAttribute("width",a.width),h.setAttribute("height",a.height)}}e.setAttribute("fill","url(#"+s+")")}});var A=6378137,v=.0066943799901413165,M=484813681109536e-20,x=Math.PI/2,b=1e-10,w=.017453292519943295,P=57.29577951308232,k=Math.PI/4,E=2*Math.PI,C=3.14159265359,S={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};const T={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var O=/[\s_\-\/\(\)]/g;function B(t,e){if(t[e])return t[e];for(var i,n=Object.keys(t),s=e.toLowerCase().replace(O,""),o=-1;++o<n.length;)if((i=n[o]).toLowerCase().replace(O,"")===s)return t[i]}function D(t){var e,i,n,s={},o=t.split("+").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,e){var i=e.split("=");return i.push(!0),t[i[0].toLowerCase()]=i[1],t},{}),a={proj:"projName",datum:"datumCode",rf:function(t){s.rf=parseFloat(t)},lat_0:function(t){s.lat0=t*w},lat_1:function(t){s.lat1=t*w},lat_2:function(t){s.lat2=t*w},lat_ts:function(t){s.lat_ts=t*w},lon_0:function(t){s.long0=t*w},lon_1:function(t){s.long1=t*w},lon_2:function(t){s.long2=t*w},alpha:function(t){s.alpha=parseFloat(t)*w},gamma:function(t){s.rectified_grid_angle=parseFloat(t)*w},lonc:function(t){s.longc=t*w},x_0:function(t){s.x0=parseFloat(t)},y_0:function(t){s.y0=parseFloat(t)},k_0:function(t){s.k0=parseFloat(t)},k:function(t){s.k0=parseFloat(t)},a:function(t){s.a=parseFloat(t)},b:function(t){s.b=parseFloat(t)},r:function(t){s.a=s.b=parseFloat(t)},r_a:function(){s.R_A=!0},zone:function(t){s.zone=parseInt(t,10)},south:function(){s.utmSouth=!0},towgs84:function(t){s.datum_params=t.split(",").map(function(t){return parseFloat(t)})},to_meter:function(t){s.to_meter=parseFloat(t)},units:function(t){s.units=t;var e=B(T,t);e&&(s.to_meter=e.to_meter)},from_greenwich:function(t){s.from_greenwich=t*w},pm:function(t){var e=B(S,t);s.from_greenwich=(e||parseFloat(t))*w},nadgrids:function(t){"@null"===t?s.datumCode="none":s.nadgrids=t},axis:function(t){var e="ewnsud";3===t.length&&-1!==e.indexOf(t.substr(0,1))&&-1!==e.indexOf(t.substr(1,1))&&-1!==e.indexOf(t.substr(2,1))&&(s.axis=t)},approx:function(){s.approx=!0}};for(e in o)i=o[e],e in a?"function"==typeof(n=a[e])?n(i):s[n]=i:s[e]=i;return"string"==typeof s.datumCode&&"WGS84"!==s.datumCode&&(s.datumCode=s.datumCode.toLowerCase()),s}class I{static getId(t){const e=t.find(t=>Array.isArray(t)&&"ID"===t[0]);return e&&e.length>=3?{authority:e[1],code:parseInt(e[2],10)}:null}static convertUnit(t,e="unit"){if(!t||t.length<3)return{type:e,name:"unknown",conversion_factor:null};const i=t[1],n=parseFloat(t[2])||null,s=t.find(t=>Array.isArray(t)&&"ID"===t[0]);return{type:e,name:i,conversion_factor:n,id:s?{authority:s[1],code:parseInt(s[2],10)}:null}}static convertAxis(t){const e=t[1]||"Unknown";let i;const n=e.match(/^\((.)\)$/);if(n){const t=n[1].toUpperCase();if("E"===t)i="east";else if("N"===t)i="north";else{if("U"!==t)throw new Error(`Unknown axis abbreviation: ${t}`);i="up"}}else i=t[2]?t[2].toLowerCase():"unknown";const s=t.find(t=>Array.isArray(t)&&"ORDER"===t[0]),o=s?parseInt(s[1],10):null,a=t.find(t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0]));return{name:e,direction:i,unit:this.convertUnit(a),order:o}}static extractAxes(t){return t.filter(t=>Array.isArray(t)&&"AXIS"===t[0]).map(t=>this.convertAxis(t)).sort((t,e)=>(t.order||0)-(e.order||0))}static convert(t,e={}){switch(t[0]){case"PROJCRS":e.type="ProjectedCRS",e.name=t[1],e.base_crs=t.find(t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0])):null,e.conversion=t.find(t=>Array.isArray(t)&&"CONVERSION"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"CONVERSION"===t[0])):null;const i=t.find(t=>Array.isArray(t)&&"CS"===t[0]);i&&(e.coordinate_system={type:i[1],axis:this.extractAxes(t)});const n=t.find(t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]);if(n){const t=this.convertUnit(n);e.coordinate_system.unit=t}e.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":e.type="GeographicCRS",e.name=t[1];const s=t.find(t=>Array.isArray(t)&&("DATUM"===t[0]||"ENSEMBLE"===t[0]));if(s){const i=this.convert(s);"ENSEMBLE"===s[0]?e.datum_ensemble=i:e.datum=i;const n=t.find(t=>Array.isArray(t)&&"PRIMEM"===t[0]);n&&"Greenwich"!==n[1]&&(i.prime_meridian={name:n[1],longitude:parseFloat(n[2])})}e.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},e.id=this.getId(t);break;case"DATUM":e.type="GeodeticReferenceFrame",e.name=t[1],e.ellipsoid=t.find(t=>Array.isArray(t)&&"ELLIPSOID"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"ELLIPSOID"===t[0])):null;break;case"ENSEMBLE":e.type="DatumEnsemble",e.name=t[1],e.members=t.filter(t=>Array.isArray(t)&&"MEMBER"===t[0]).map(t=>({type:"DatumEnsembleMember",name:t[1],id:this.getId(t)}));const o=t.find(t=>Array.isArray(t)&&"ENSEMBLEACCURACY"===t[0]);o&&(e.accuracy=parseFloat(o[1]));const a=t.find(t=>Array.isArray(t)&&"ELLIPSOID"===t[0]);a&&(e.ellipsoid=this.convert(a)),e.id=this.getId(t);break;case"ELLIPSOID":e.type="Ellipsoid",e.name=t[1],e.semi_major_axis=parseFloat(t[2]),e.inverse_flattening=parseFloat(t[3]),t.find(t=>Array.isArray(t)&&"LENGTHUNIT"===t[0])&&this.convert(t.find(t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]),e);break;case"CONVERSION":e.type="Conversion",e.name=t[1],e.method=t.find(t=>Array.isArray(t)&&"METHOD"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"METHOD"===t[0])):null,e.parameters=t.filter(t=>Array.isArray(t)&&"PARAMETER"===t[0]).map(t=>this.convert(t));break;case"METHOD":e.type="Method",e.name=t[1],e.id=this.getId(t);break;case"PARAMETER":e.type="Parameter",e.name=t[1],e.value=parseFloat(t[2]),e.unit=this.convertUnit(t.find(t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0]))),e.id=this.getId(t);break;case"BOUNDCRS":e.type="BoundCRS";const r=t.find(t=>Array.isArray(t)&&"SOURCECRS"===t[0]);if(r){const t=r.find(t=>Array.isArray(t));e.source_crs=t?this.convert(t):null}const h=t.find(t=>Array.isArray(t)&&"TARGETCRS"===t[0]);if(h){const t=h.find(t=>Array.isArray(t));e.target_crs=t?this.convert(t):null}const l=t.find(t=>Array.isArray(t)&&"ABRIDGEDTRANSFORMATION"===t[0]);e.transformation=l?this.convert(l):null;break;case"ABRIDGEDTRANSFORMATION":if(e.type="Transformation",e.name=t[1],e.method=t.find(t=>Array.isArray(t)&&"METHOD"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"METHOD"===t[0])):null,e.parameters=t.filter(t=>Array.isArray(t)&&("PARAMETER"===t[0]||"PARAMETERFILE"===t[0])).map(t=>"PARAMETER"===t[0]?this.convert(t):"PARAMETERFILE"===t[0]?{name:t[1],value:t[2],id:{authority:"EPSG",code:8656}}:void 0),7===e.parameters.length){const t=e.parameters[6];"Scale difference"===t.name&&(t.value=Math.round(1e12*(t.value-1))/1e6)}e.id=this.getId(t);break;case"AXIS":e.coordinate_system||(e.coordinate_system={type:"unspecified",axis:[]}),e.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const c=this.convertUnit(t,"LinearUnit");e.coordinate_system&&e.coordinate_system.axis&&e.coordinate_system.axis.forEach(t=>{t.unit||(t.unit=c)}),c.conversion_factor&&1!==c.conversion_factor&&e.semi_major_axis&&(e.semi_major_axis={value:e.semi_major_axis,unit:c});break;default:e.keyword=t[0]}return e}}class R extends I{static convert(t,e={}){return super.convert(t,e),e.coordinate_system&&"Cartesian"===e.coordinate_system.subtype&&delete e.coordinate_system,e.usage&&delete e.usage,e}}class z extends I{static convert(t,e={}){super.convert(t,e);const i=t.find(t=>Array.isArray(t)&&"CS"===t[0]);i&&(e.coordinate_system={subtype:i[1],axis:this.extractAxes(t)});const n=t.find(t=>Array.isArray(t)&&"USAGE"===t[0]);if(n){const t=n.find(t=>Array.isArray(t)&&"SCOPE"===t[0]),i=n.find(t=>Array.isArray(t)&&"AREA"===t[0]),s=n.find(t=>Array.isArray(t)&&"BBOX"===t[0]);e.usage={},t&&(e.usage.scope=t[1]),i&&(e.usage.area=i[1]),s&&(e.usage.bbox=s.slice(1))}return e}}function G(t){const e=function(t){return t.find(t=>Array.isArray(t)&&"USAGE"===t[0])?"2019":(t.find(t=>Array.isArray(t)&&"CS"===t[0])||"BOUNDCRS"===t[0]||"PROJCRS"===t[0]||t[0],"2015")}(t);return("2019"===e?z:R).convert(t)}var N=/\s/,j=/[A-Za-z]/,F=/[A-Za-z84_]/,U=/[,\]]/,Z=/[\d\.E\-\+]/;function H(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function q(t,e,i){Array.isArray(e)&&(i.unshift(e),e=null);var n=e?{}:t,s=i.reduce(function(t,e){return V(e,t),t},n);e&&(t[e]=s)}function V(t,e){if(Array.isArray(t)){var i=t.shift();if("PARAMETER"===i&&(i=t.shift()),1===t.length)return Array.isArray(t[0])?(e[i]={},void V(t[0],e[i])):void(e[i]=t[0]);if(t.length)if("TOWGS84"!==i){if("AXIS"===i)return i in e||(e[i]=[]),void e[i].push(t);var n;switch(Array.isArray(i)||(e[i]={}),i){case"UNIT":case"PRIMEM":case"VERT_DATUM":return e[i]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&V(t[2],e[i]));case"SPHEROID":case"ELLIPSOID":return e[i]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&V(t[3],e[i]));case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":return t[0]=["name",t[0]],void q(e,i,t);case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":return t[0]=["name",t[0]],q(e,i,t),void(e[i].type=i);default:for(n=-1;++n<t.length;)if(!Array.isArray(t[n]))return V(t,e[i]);return q(e,i,t)}}else e[i]=t;else e[i]=!0}else e[t]=!0}H.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;N.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},H.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(U.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},H.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},H.prototype.number=function(t){if(!Z.test(t)){if(U.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},H.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},H.prototype.keyword=function(t){if(F.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=1)}if(!U.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},H.prototype.neutral=function(t){if(j.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(Z.test(t))return this.word=t,void(this.state=3);if(!U.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},H.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function W(t){return.017453292519943295*t}function K(t){const e=(t.projName||"").toLowerCase().replace(/_/g," ");t.long0||!t.longc||"albers conic equal area"!==e&&"lambert azimuthal equal area"!==e||(t.long0=t.longc),t.lat_ts||!t.lat1||"stereographic south pole"!==e&&"polar stereographic (variant b)"!==e?t.lat_ts||!t.lat0||"polar stereographic"!==e&&"polar stereographic (variant a)"!==e||(t.lat_ts=t.lat0,t.lat0=W(t.lat0>0?90:-90),delete t.lat1):(t.lat0=W(t.lat1>0?90:-90),t.lat_ts=t.lat1,delete t.lat1)}function X(t){let e={units:null,to_meter:void 0};return"string"==typeof t?(e.units=t.toLowerCase(),"metre"===e.units&&(e.units="meter"),"meter"===e.units&&(e.to_meter=1)):t&&t.name&&(e.units=t.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.to_meter=t.conversion_factor),e}function Y(t){return"object"==typeof t?t.value*t.unit.conversion_factor:t}function $(t,e){t.ellipsoid.radius?(e.a=t.ellipsoid.radius,e.rf=0):(e.a=Y(t.ellipsoid.semi_major_axis),void 0!==t.ellipsoid.inverse_flattening?e.rf=t.ellipsoid.inverse_flattening:void 0!==t.ellipsoid.semi_major_axis&&void 0!==t.ellipsoid.semi_minor_axis&&(e.rf=e.a/(e.a-Y(t.ellipsoid.semi_minor_axis))))}function J(t,e={}){return t&&"object"==typeof t?"BoundCRS"===t.type?(J(t.source_crs,e),t.transformation&&(t.transformation.method&&"NTv2"===t.transformation.method.name?e.nadgrids=t.transformation.parameters[0].value:e.datum_params=t.transformation.parameters.map(t=>t.value)),e):(Object.keys(t).forEach(i=>{const n=t[i];if(null!==n)switch(i){case"name":if(e.srsCode)break;e.name=n,e.srsCode=n;break;case"type":"GeographicCRS"===n?e.projName="longlat":"ProjectedCRS"===n&&t.conversion&&t.conversion.method&&(e.projName=t.conversion.method.name);break;case"datum":case"datum_ensemble":n.ellipsoid&&(e.ellps=n.ellipsoid.name,$(n,e)),n.prime_meridian&&(e.from_greenwich=n.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":e.ellps=n.name,$(n,e);break;case"prime_meridian":e.long0=(n.longitude||0)*Math.PI/180;break;case"coordinate_system":if(n.axis)if(e.axis=n.axis.map(t=>{const e=t.direction;if("east"===e)return"e";if("north"===e)return"n";if("west"===e)return"w";if("south"===e)return"s";throw new Error(`Unknown axis direction: ${e}`)}).join("")+"u",n.unit){const{units:t,to_meter:i}=X(n.unit);e.units=t,e.to_meter=i}else if(n.axis[0]&&n.axis[0].unit){const{units:t,to_meter:i}=X(n.axis[0].unit);e.units=t,e.to_meter=i}break;case"id":n.authority&&n.code&&(e.title=n.authority+":"+n.code);break;case"conversion":n.method&&n.method.name&&(e.projName=n.method.name),n.parameters&&n.parameters.forEach(t=>{const i=t.name.toLowerCase().replace(/\s+/g,"_"),n=t.value;t.unit&&t.unit.conversion_factor?e[i]=n*t.unit.conversion_factor:"degree"===t.unit?e[i]=n*Math.PI/180:e[i]=n});break;case"unit":n.name&&(e.units=n.name.toLowerCase(),"metre"===e.units&&(e.units="meter")),n.conversion_factor&&(e.to_meter=n.conversion_factor);break;case"base_crs":J(n,e),e.datumCode=n.id?n.id.authority+"_"+n.id.code:n.name}}),void 0!==e.latitude_of_false_origin&&(e.lat0=e.latitude_of_false_origin),void 0!==e.longitude_of_false_origin&&(e.long0=e.longitude_of_false_origin),void 0!==e.latitude_of_standard_parallel&&(e.lat0=e.latitude_of_standard_parallel,e.lat1=e.latitude_of_standard_parallel),void 0!==e.latitude_of_1st_standard_parallel&&(e.lat1=e.latitude_of_1st_standard_parallel),void 0!==e.latitude_of_2nd_standard_parallel&&(e.lat2=e.latitude_of_2nd_standard_parallel),void 0!==e.latitude_of_projection_centre&&(e.lat0=e.latitude_of_projection_centre),void 0!==e.longitude_of_projection_centre&&(e.longc=e.longitude_of_projection_centre),void 0!==e.easting_at_false_origin&&(e.x0=e.easting_at_false_origin),void 0!==e.northing_at_false_origin&&(e.y0=e.northing_at_false_origin),void 0!==e.latitude_of_natural_origin&&(e.lat0=e.latitude_of_natural_origin),void 0!==e.longitude_of_natural_origin&&(e.long0=e.longitude_of_natural_origin),void 0!==e.longitude_of_origin&&(e.long0=e.longitude_of_origin),void 0!==e.false_easting&&(e.x0=e.false_easting),e.easting_at_projection_centre&&(e.x0=e.easting_at_projection_centre),void 0!==e.false_northing&&(e.y0=e.false_northing),e.northing_at_projection_centre&&(e.y0=e.northing_at_projection_centre),void 0!==e.standard_parallel_1&&(e.lat1=e.standard_parallel_1),void 0!==e.standard_parallel_2&&(e.lat2=e.standard_parallel_2),void 0!==e.scale_factor_at_natural_origin&&(e.k0=e.scale_factor_at_natural_origin),void 0!==e.scale_factor_at_projection_centre&&(e.k0=e.scale_factor_at_projection_centre),void 0!==e.scale_factor_on_pseudo_standard_parallel&&(e.k0=e.scale_factor_on_pseudo_standard_parallel),void 0!==e.azimuth&&(e.alpha=e.azimuth),void 0!==e.azimuth_at_projection_centre&&(e.alpha=e.azimuth_at_projection_centre),e.angle_from_rectified_to_skew_grid&&(e.rectified_grid_angle=e.angle_from_rectified_to_skew_grid),K(e),e):t}var Q=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function tt(t){for(var e=Object.keys(t),i=0,n=e.length;i<n;++i){var s=e[i];-1!==Q.indexOf(s)&&et(t[s]),"object"==typeof t[s]&&tt(t[s])}}function et(t){if(t.AUTHORITY){var e=Object.keys(t.AUTHORITY)[0];e&&e in t.AUTHORITY&&(t.title=e+":"+t.AUTHORITY[e])}if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var i="",n=0,s=t.AXIS.length;n<s;++n){var o=[t.AXIS[n][0].toLowerCase(),t.AXIS[n][1].toLowerCase()];-1!==o[0].indexOf("north")||("y"===o[0]||"lat"===o[0])&&"north"===o[1]?i+="n":-1!==o[0].indexOf("south")||("y"===o[0]||"lat"===o[0])&&"south"===o[1]?i+="s":-1!==o[0].indexOf("east")||("x"===o[0]||"lon"===o[0])&&"east"===o[1]?i+="e":-1===o[0].indexOf("west")&&("x"!==o[0]&&"lon"!==o[0]||"west"!==o[1])||(i+="w")}2===i.length&&(i+="u"),3===i.length&&(t.axis=i)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var a=t.GEOGCS;function r(e){return e*(t.to_meter||1)}"GEOGCS"===t.type&&(a=t),a&&(a.DATUM?t.datumCode=a.DATUM.name.toLowerCase():t.datumCode=a.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_1949"===t.datumCode&&(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"belge_1972"===t.datumCode&&(t.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(t.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=a.DATUM.SPHEROID.a,t.rf=parseFloat(a.DATUM.SPHEROID.rf,10)),a.DATUM&&a.DATUM.TOWGS84&&(t.datum_params=a.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),t.rectified_grid_angle&&(t.rectified_grid_angle=W(t.rectified_grid_angle));[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",W],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",W],["x0","false_easting",r],["y0","false_northing",r],["long0","central_meridian",W],["lat0","latitude_of_origin",W],["lat0","standard_parallel_1",W],["lat1","standard_parallel_1",W],["lat2","standard_parallel_2",W],["azimuth","Azimuth"],["alpha","azimuth",W],["srsCode","name"]].forEach(function(e){return i=t,s=(n=e)[0],o=n[1],void(!(s in i)&&o in i&&(i[s]=i[o],3===n.length&&(i[s]=n[2](i[s]))));var i,n,s,o}),K(t)}function it(t){if("object"==typeof t)return J(t);const e=function(t){const e=t.toUpperCase();return e.includes("PROJCRS")||e.includes("GEOGCRS")||e.includes("BOUNDCRS")||e.includes("VERTCRS")||e.includes("LENGTHUNIT")||e.includes("ANGLEUNIT")||e.includes("SCALEUNIT")?"WKT2":(e.includes("PROJCS")||e.includes("GEOGCS")||e.includes("LOCAL_CS")||e.includes("VERT_CS")||e.includes("UNIT"),"WKT1")}(t);var i=new H(t).output();if("WKT2"===e){return J(G(i))}var n=i[0],s={};return V(i,s),tt(s),s[n]}function nt(t){var e=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?nt[t]=D(arguments[1]):nt[t]=it(arguments[1]):nt[t]=i}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){return Array.isArray(t)?nt.apply(e,t):nt(t)});if("string"==typeof t){if(t in nt)return nt[t]}else"EPSG"in t?nt["EPSG:"+t.EPSG]=t:"ESRI"in t?nt["ESRI:"+t.ESRI]=t:"IAU2000"in t&&(nt["IAU2000:"+t.IAU2000]=t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var e=1;e<=60;++e)t("EPSG:"+(32600+e),"+proj=utm +zone="+e+" +datum=WGS84 +units=m"),t("EPSG:"+(32700+e),"+proj=utm +zone="+e+" +south +datum=WGS84 +units=m");t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(nt);var st=["3857","900913","3785","102113"];function ot(t){if(!function(t){return"string"==typeof t}(t))return"projName"in t?t:it(t);if(function(t){return t in nt}(t))return nt[t];if(function(t){return 0!==t.indexOf("+")&&-1!==t.indexOf("[")||"object"==typeof t&&!("srsCode"in t)}(t)){var e=it(t);if(function(t){var e=B(t,"authority");if(e){var i=B(e,"epsg");return i&&st.indexOf(i)>-1}}(e))return nt["EPSG:3857"];var i=function(t){var e=B(t,"extension");if(e)return B(e,"proj4")}(e);return i?D(i):e}return function(t){return"+"===t[0]}(t)?D(t):void 0}function at(t,e){var i,n;if(t=t||{},!e)return t;for(n in e)void 0!==(i=e[n])&&(t[n]=i);return t}function rt(t,e,i){var n=t*e;return i/Math.sqrt(1-n*n)}function ht(t){return t<0?-1:1}function lt(t){return Math.abs(t)<=C?t:t-ht(t)*E}function ct(t,e,i){var n=t*i,s=.5*t;return n=Math.pow((1-n)/(1+n),s),Math.tan(.5*(x-e))/n}function ut(t,e){for(var i,n,s=.5*t,o=x-2*Math.atan(e),a=0;a<=15;a++)if(i=t*Math.sin(o),o+=n=x-2*Math.atan(e*Math.pow((1-i)/(1+i),s))-o,Math.abs(n)<=1e-10)return o;return-9999}function pt(t){return t}var dt=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=rt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var e,i,n=t.x,s=t.y;if(s*P>90&&s*P<-90&&n*P>180&&n*P<-180)return null;if(Math.abs(Math.abs(s)-x)<=b)return null;if(this.sphere)e=this.x0+this.a*this.k0*lt(n-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(k+.5*s));else{var o=Math.sin(s),a=ct(this.e,s,o);e=this.x0+this.a*this.k0*lt(n-this.long0),i=this.y0-this.a*this.k0*Math.log(a)}return t.x=e,t.y=i,t},inverse:function(t){var e,i,n=t.x-this.x0,s=t.y-this.y0;if(this.sphere)i=x-2*Math.atan(Math.exp(-s/(this.a*this.k0)));else{var o=Math.exp(-s/(this.a*this.k0));if(-9999===(i=ut(this.e,o)))return null}return e=lt(this.long0+n/(this.a*this.k0)),t.x=e,t.y=i,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"]},{init:function(){},forward:pt,inverse:pt,names:["longlat","identity"]}],_t={},mt=[];function gt(t,e){var i=mt.length;return!t.names||(mt[i]=t,t.names.forEach(function(t){_t[t.toLowerCase()]=i}),this)}function ft(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}const yt={start:function(){dt.forEach(gt)},add:gt,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==_t[e]&&mt[_t[e]]||(e=ft(e))in _t&&mt[_t[e]]?mt[_t[e]]:void 0}};var At={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const vt=At.WGS84;var Mt={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var Lt in Mt){var xt=Mt[Lt];xt.datumName&&(Mt[xt.datumName]=xt)}var bt={};async function wt(t,e){for(var i=[],n=await e.getImageCount(),s=n-1;s>=0;s--){var o=await e.getImage(s),a=await o.readRasters(),r=[o.getWidth(),o.getHeight()],h=o.getBoundingBox().map(kt),l=[o.fileDirectory.ModelPixelScale[0],o.fileDirectory.ModelPixelScale[1]].map(kt),c=h[0]+(r[0]-1)*l[0],u=h[3]-(r[1]-1)*l[1],p=a[0],d=a[1],_=[];for(let t=r[1]-1;t>=0;t--)for(let e=r[0]-1;e>=0;e--){var m=t*r[0]+e;_.push([-Et(d[m]),Et(p[m])])}i.push({del:l,lim:r,ll:[-c,u],cvs:_})}var g={header:{nSubgrids:n},subgrids:i};return bt[t]=g,g}function Pt(t){if(0===t.length)return null;var e="@"===t[0];return e&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:bt[t]||null,isNull:!1}}function kt(t){return t*Math.PI/180}function Et(t){return t/3600*Math.PI/180}function Ct(t,e,i){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,i)))}function St(t){return t.map(function(t){return[Et(t.longitudeShift),Et(t.latitudeShift)]})}function Tt(t,e,i){return{name:Ct(t,e+8,e+16).trim(),parent:Ct(t,e+24,e+24+8).trim(),lowerLatitude:t.getFloat64(e+72,i),upperLatitude:t.getFloat64(e+88,i),lowerLongitude:t.getFloat64(e+104,i),upperLongitude:t.getFloat64(e+120,i),latitudeInterval:t.getFloat64(e+136,i),longitudeInterval:t.getFloat64(e+152,i),gridNodeCount:t.getInt32(e+168,i)}}function Ot(t,e,i,n,s){var o=e+176,a=16;!1===s&&(a=8);for(var r=[],h=0;h<i.gridNodeCount;h++){var l={latitudeShift:t.getFloat32(o+h*a,n),longitudeShift:t.getFloat32(o+h*a+4,n)};!1!==s&&(l.latitudeAccuracy=t.getFloat32(o+h*a+8,n),l.longitudeAccuracy=t.getFloat32(o+h*a+12,n)),r.push(l)}return r}function Bt(t,e){if(!(this instanceof Bt))return new Bt(t);this.forward=null,this.inverse=null,this.init=null,this.name,this.names=null,this.title,e=e||function(t){if(t)throw t};var i=ot(t);if("object"==typeof i){var n=Bt.projections.get(i.projName);if(n){if(i.datumCode&&"none"!==i.datumCode){var s=B(Mt,i.datumCode);s&&(i.datum_params=i.datum_params||(s.towgs84?s.towgs84.split(","):null),i.ellps=s.ellipse,i.datumName=s.datumName?s.datumName:i.datumCode)}i.k0=i.k0||1,i.axis=i.axis||"enu",i.ellps=i.ellps||"wgs84",i.lat1=i.lat1||i.lat0;var o,a,r,h,l,c,u,p=function(t,e,i,n,s){if(!t){var o=B(At,n);o||(o=vt),t=o.a,e=o.b,i=o.rf}return i&&!e&&(e=(1-1/i)*t),(0===i||Math.abs(t-e)<b)&&(s=!0,e=t),{a:t,b:e,rf:i,sphere:s}}(i.a,i.b,i.rf,i.ellps,i.sphere),d=(o=p.a,a=p.b,p.rf,r=i.R_A,c=((h=o*o)-(l=a*a))/h,u=0,r?(h=(o*=1-c*(.16666666666666666+c*(.04722222222222222+.022156084656084655*c)))*o,c=0):u=Math.sqrt(c),{es:c,e:u,ep2:(h-l)/l}),_=function(t){return void 0===t?null:t.split(",").map(Pt)}(i.nadgrids),m=i.datum||function(t,e,i,n,s,o,a){var r={};return r.datum_type=void 0===t||"none"===t?5:4,e&&(r.datum_params=e.map(parseFloat),0===r.datum_params[0]&&0===r.datum_params[1]&&0===r.datum_params[2]||(r.datum_type=1),r.datum_params.length>3&&(0===r.datum_params[3]&&0===r.datum_params[4]&&0===r.datum_params[5]&&0===r.datum_params[6]||(r.datum_type=2,r.datum_params[3]*=M,r.datum_params[4]*=M,r.datum_params[5]*=M,r.datum_params[6]=r.datum_params[6]/1e6+1))),a&&(r.datum_type=3,r.grids=a),r.a=i,r.b=n,r.es=s,r.ep2=o,r}(i.datumCode,i.datum_params,p.a,p.b,d.es,d.ep2,_);at(this,i),at(this,n),this.a=p.a,this.b=p.b,this.rf=p.rf,this.sphere=p.sphere,this.es=d.es,this.e=d.e,this.ep2=d.ep2,this.datum=m,"init"in this&&"function"==typeof this.init&&this.init(),e(null,this)}else e("Could not get projection name from: "+t)}else e("Could not parse to valid json: "+t)}function Dt(t,e,i){var n,s,o,a,r=t.x,h=t.y,l=t.z?t.z:0;if(h<-x&&h>-1.001*x)h=-x;else if(h>x&&h<1.001*x)h=x;else{if(h<-x)return{x:-1/0,y:-1/0,z:t.z};if(h>x)return{x:1/0,y:1/0,z:t.z}}return r>Math.PI&&(r-=2*Math.PI),s=Math.sin(h),a=Math.cos(h),o=s*s,{x:((n=i/Math.sqrt(1-e*o))+l)*a*Math.cos(r),y:(n+l)*a*Math.sin(r),z:(n*(1-e)+l)*s}}function It(t,e,i,n){var s,o,a,r,h,l,c,u,p,d,_,m,g,f,y,A=1e-12,v=t.x,M=t.y,L=t.z?t.z:0;if(s=Math.sqrt(v*v+M*M),o=Math.sqrt(v*v+M*M+L*L),s/i<A){if(f=0,o/i<A)return y=-n,{x:t.x,y:t.y,z:t.z}}else f=Math.atan2(M,v);a=L/o,u=(r=s/o)*(1-e)*(h=1/Math.sqrt(1-e*(2-e)*r*r)),p=a*h,g=0;do{g++,l=e*(c=i/Math.sqrt(1-e*p*p))/(c+(y=s*u+L*p-c*(1-e*p*p))),m=(_=a*(h=1/Math.sqrt(1-l*(2-l)*r*r)))*u-(d=r*(1-l)*h)*p,u=d,p=_}while(m*m>1e-24&&g<30);return{x:f,y:Math.atan(_/Math.abs(d)),z:y}}function Rt(t){return 1===t||2===t}function zt(t,e,i){if(function(t,e){return t.datum_type===e.datum_type&&!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:2!==t.datum_type||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6])}(t,e))return i;if(5===t.datum_type||5===e.datum_type)return i;var n=t.a,s=t.es;if(3===t.datum_type){if(0!==Gt(t,!1,i))return;n=A,s=v}var o=e.a,a=e.b,r=e.es;if(3===e.datum_type&&(o=A,a=6356752.314,r=v),s===r&&n===o&&!Rt(t.datum_type)&&!Rt(e.datum_type))return i;if((i=Dt(i,s,n),Rt(t.datum_type)&&(i=function(t,e,i){if(1===e)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(2===e){var n=i[0],s=i[1],o=i[2],a=i[3],r=i[4],h=i[5],l=i[6];return{x:l*(t.x-h*t.y+r*t.z)+n,y:l*(h*t.x+t.y-a*t.z)+s,z:l*(-r*t.x+a*t.y+t.z)+o}}}(i,t.datum_type,t.datum_params)),Rt(e.datum_type)&&(i=function(t,e,i){if(1===e)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(2===e){var n=i[0],s=i[1],o=i[2],a=i[3],r=i[4],h=i[5],l=i[6],c=(t.x-n)/l,u=(t.y-s)/l,p=(t.z-o)/l;return{x:c+h*u-r*p,y:-h*c+u+a*p,z:r*c-a*u+p}}}(i,e.datum_type,e.datum_params)),i=It(i,r,o,a),3===e.datum_type)&&0!==Gt(e,!0,i))return;return i}function Gt(t,e,i){if(null===t.grids||0===t.grids.length)return-1;var n={x:-i.x,y:i.y},s={x:Number.NaN,y:Number.NaN},o=[];t:for(var a=0;a<t.grids.length;a++){var r=t.grids[a];if(o.push(r.name),r.isNull){s=n;break}if(null!==r.grid)for(var h=r.grid.subgrids,l=0,c=h.length;l<c;l++){var u=h[l],p=(Math.abs(u.del[1])+Math.abs(u.del[0]))/1e4,d=u.ll[0]-p,_=u.ll[1]-p,m=u.ll[0]+(u.lim[0]-1)*u.del[0]+p,g=u.ll[1]+(u.lim[1]-1)*u.del[1]+p;if(!(_>n.y||d>n.x||g<n.y||m<n.x)&&(s=Nt(n,e,u),!isNaN(s.x)))break t}else if(r.mandatory)return-1}return isNaN(s.x)?-1:(i.x=-s.x,i.y=s.y,0)}function Nt(t,e,i){var n={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return n;var s={x:t.x,y:t.y};s.x-=i.ll[0],s.y-=i.ll[1],s.x=lt(s.x-Math.PI)+Math.PI;var o=jt(s,i);if(e){if(isNaN(o.x))return n;o.x=s.x-o.x,o.y=s.y-o.y;var a,r,h=9;do{if(r=jt(o,i),isNaN(r.x))break;a={x:s.x-(r.x+o.x),y:s.y-(r.y+o.y)},o.x+=a.x,o.y+=a.y}while(h--&&Math.abs(a.x)>1e-12&&Math.abs(a.y)>1e-12);if(h<0)return n;n.x=lt(o.x+i.ll[0]),n.y=o.y+i.ll[1]}else isNaN(o.x)||(n.x=t.x+o.x,n.y=t.y+o.y);return n}function jt(t,e){var i,n={x:t.x/e.del[0],y:t.y/e.del[1]},s=Math.floor(n.x),o=Math.floor(n.y),a=n.x-1*s,r=n.y-1*o,h={x:Number.NaN,y:Number.NaN};if(s<0||s>=e.lim[0])return h;if(o<0||o>=e.lim[1])return h;i=o*e.lim[0]+s;var l=e.cvs[i][0],c=e.cvs[i][1];i++;var u=e.cvs[i][0],p=e.cvs[i][1];i+=e.lim[0];var d=e.cvs[i][0],_=e.cvs[i][1];i--;var m=e.cvs[i][0],g=e.cvs[i][1],f=a*r,y=a*(1-r),A=(1-a)*(1-r),v=(1-a)*r;return h.x=A*l+y*u+v*m+f*d,h.y=A*c+y*p+v*g+f*_,h}function Ft(t,e,i){var n,s,o,a=i.x,r=i.y,h=i.z||0,l={};for(o=0;o<3;o++)if(!e||2!==o||void 0!==i.z)switch(0===o?(n=a,s=-1!=="ew".indexOf(t.axis[o])?"x":"y"):1===o?(n=r,s=-1!=="ns".indexOf(t.axis[o])?"y":"x"):(n=h,s="z"),t.axis[o]){case"e":case"n":l[s]=n;break;case"w":case"s":l[s]=-n;break;case"u":void 0!==i[s]&&(l.z=n);break;case"d":void 0!==i[s]&&(l.z=-n);break;default:return null}return l}function Ut(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}function Zt(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function Ht(t,e,i,n){var s,o=void 0!==(i=Array.isArray(i)?Ut(i):{x:i.x,y:i.y,z:i.z,m:i.m}).z;if(function(t){Zt(t.x),Zt(t.y)}(i),t.datum&&e.datum&&function(t,e){return(1===t.datum.datum_type||2===t.datum.datum_type||3===t.datum.datum_type)&&"WGS84"!==e.datumCode||(1===e.datum.datum_type||2===e.datum.datum_type||3===e.datum.datum_type)&&"WGS84"!==t.datumCode}(t,e)&&(i=Ht(t,s=new Bt("WGS84"),i,n),t=s),n&&"enu"!==t.axis&&(i=Ft(t,!1,i)),"longlat"===t.projName)i={x:i.x*w,y:i.y*w,z:i.z||0};else if(t.to_meter&&(i={x:i.x*t.to_meter,y:i.y*t.to_meter,z:i.z||0}),!(i=t.inverse(i)))return;if(t.from_greenwich&&(i.x+=t.from_greenwich),i=zt(t.datum,e.datum,i))return e.from_greenwich&&(i={x:i.x-e.from_greenwich,y:i.y,z:i.z||0}),"longlat"===e.projName?i={x:i.x*P,y:i.y*P,z:i.z||0}:(i=e.forward(i),e.to_meter&&(i={x:i.x/e.to_meter,y:i.y/e.to_meter,z:i.z||0})),n&&"enu"!==e.axis?Ft(e,!0,i):(i&&!o&&delete i.z,i)}Bt.projections=yt,Bt.projections.start();var qt=Bt("WGS84");function Vt(t,e,i,n){var s,o,a;return Array.isArray(i)?(s=Ht(t,e,i,n)||{x:NaN,y:NaN},i.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof s.z?[s.x,s.y,s.z].concat(i.slice(3)):[s.x,s.y,i[2]].concat(i.slice(3)):[s.x,s.y].concat(i.slice(2)):[s.x,s.y]):(o=Ht(t,e,i,n),2===(a=Object.keys(i)).length||a.forEach(function(n){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;o[n]=i[n]}),o)}function Wt(t){return t instanceof Bt?t:"object"==typeof t&&"oProj"in t?t.oProj:Bt(t)}var Kt="AJSAJS",Xt="AFAFAF",Yt=65,$t=73,Jt=79,Qt=86,te=90;const ee={forward:ie,inverse:function(t){var e=ae(le(t.toUpperCase()));if(e.lat&&e.lon)return[e.lon,e.lat,e.lon,e.lat];return[e.left,e.bottom,e.right,e.top]},toPoint:ne};function ie(t,e){return e=e||5,function(t,e){var i="00000"+t.easting,n="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(d=t.easting,_=t.northing,m=t.zoneNumber,g=he(m),f=Math.floor(d/1e5),y=Math.floor(_/1e5)%20,s=f,o=y,a=g,r=a-1,h=Kt.charCodeAt(r),l=Xt.charCodeAt(r),c=h+s-1,u=l+o,p=!1,c>te&&(c=c-te+Yt-1,p=!0),(c===$t||h<$t&&c>$t||(c>$t||h<$t)&&p)&&c++,(c===Jt||h<Jt&&c>Jt||(c>Jt||h<Jt)&&p)&&++c===$t&&c++,c>te&&(c=c-te+Yt-1),u>Qt?(u=u-Qt+Yt-1,p=!0):p=!1,(u===$t||l<$t&&u>$t||(u>$t||l<$t)&&p)&&u++,(u===Jt||l<Jt&&u>Jt||(u>Jt||l<Jt)&&p)&&++u===$t&&u++,u>Qt&&(u=u-Qt+Yt-1),String.fromCharCode(c)+String.fromCharCode(u))+i.substr(i.length-5,e)+n.substr(n.length-5,e);var s,o,a,r,h,l,c,u,p;var d,_,m,g,f,y}(function(t){var e,i,n,s,o,a,r,h,l=t.lat,c=t.lon,u=6378137,p=.00669438,d=.9996,_=se(l),m=se(c);h=Math.floor((c+180)/6)+1,180===c&&(h=60);l>=56&&l<64&&c>=3&&c<12&&(h=32);l>=72&&l<84&&(c>=0&&c<9?h=31:c>=9&&c<21?h=33:c>=21&&c<33?h=35:c>=33&&c<42&&(h=37));r=se(6*(h-1)-180+3),e=p/(1-p),i=u/Math.sqrt(1-p*Math.sin(_)*Math.sin(_)),n=Math.tan(_)*Math.tan(_),s=e*Math.cos(_)*Math.cos(_),o=Math.cos(_)*(m-r),a=u*((1-p/4-3*p*p/64-5*p*p*p/256)*_-(3*p/8+3*p*p/32+45*p*p*p/1024)*Math.sin(2*_)+(15*p*p/256+45*p*p*p/1024)*Math.sin(4*_)-35*p*p*p/3072*Math.sin(6*_));var g=d*i*(o+(1-n+s)*o*o*o/6+(5-18*n+n*n+72*s-58*e)*o*o*o*o*o/120)+5e5,f=d*(a+i*Math.tan(_)*(o*o/2+(5-n+9*s+4*s*s)*o*o*o*o/24+(61-58*n+n*n+600*s-330*e)*o*o*o*o*o*o/720));l<0&&(f+=1e7);return{northing:Math.round(f),easting:Math.round(g),zoneNumber:h,zoneLetter:re(l)}}({lat:t[1],lon:t[0]}),e)}function ne(t){var e=ae(le(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function se(t){return t*(Math.PI/180)}function oe(t){return t/Math.PI*180}function ae(t){var e=t.northing,i=t.easting,n=t.zoneLetter,s=t.zoneNumber;if(s<0||s>60)return null;var o,a,r,h,l,c,u,p,d,_=.9996,m=6378137,g=.00669438,f=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),y=i-5e5,A=e;n<"N"&&(A-=1e7),u=6*(s-1)-180+3,o=.006739496752268451,d=(p=A/_/6367449.145945056)+(3*f/2-27*f*f*f/32)*Math.sin(2*p)+(21*f*f/16-55*f*f*f*f/32)*Math.sin(4*p)+151*f*f*f/96*Math.sin(6*p),a=m/Math.sqrt(1-g*Math.sin(d)*Math.sin(d)),r=Math.tan(d)*Math.tan(d),h=o*Math.cos(d)*Math.cos(d),l=.99330562*m/Math.pow(1-g*Math.sin(d)*Math.sin(d),1.5),c=y/(a*_);var v=d-a*Math.tan(d)/l*(c*c/2-(5+3*r+10*h-4*h*h-9*o)*c*c*c*c/24+(61+90*r+298*h+45*r*r-1.6983531815716497-3*h*h)*c*c*c*c*c*c/720);v=oe(v);var M,L=(c-(1+2*r+h)*c*c*c/6+(5-2*h+28*r-3*h*h+8*o+24*r*r)*c*c*c*c*c/120)/Math.cos(d);if(L=u+oe(L),t.accuracy){var x=ae({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});M={top:x.lat,right:x.lon,bottom:v,left:L}}else M={lat:v,lon:L};return M}function re(t){var e="Z";return 84>=t&&t>=72?e="X":72>t&&t>=64?e="W":64>t&&t>=56?e="V":56>t&&t>=48?e="U":48>t&&t>=40?e="T":40>t&&t>=32?e="S":32>t&&t>=24?e="R":24>t&&t>=16?e="Q":16>t&&t>=8?e="P":8>t&&t>=0?e="N":0>t&&t>=-8?e="M":-8>t&&t>=-16?e="L":-16>t&&t>=-24?e="K":-24>t&&t>=-32?e="J":-32>t&&t>=-40?e="H":-40>t&&t>=-48?e="G":-48>t&&t>=-56?e="F":-56>t&&t>=-64?e="E":-64>t&&t>=-72?e="D":-72>t&&t>=-80&&(e="C"),e}function he(t){var e=t%6;return 0===e&&(e=6),e}function le(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,i=t.length,n=null,s="",o=0;!/[A-Z]/.test(e=t.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+t;s+=e,o++}var a=parseInt(s,10);if(0===o||o+3>i)throw"MGRSPoint bad conversion from: "+t;var r=t.charAt(o++);if(r<="A"||"B"===r||"Y"===r||r>="Z"||"I"===r||"O"===r)throw"MGRSPoint zone letter "+r+" not handled: "+t;n=t.substring(o,o+=2);for(var h=he(a),l=function(t,e){var i=Kt.charCodeAt(e-1),n=1e5,s=!1;for(;i!==t.charCodeAt(0);){if(++i===$t&&i++,i===Jt&&i++,i>te){if(s)throw"Bad character: "+t;i=Yt,s=!0}n+=1e5}return n}(n.charAt(0),h),c=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;var i=Xt.charCodeAt(e-1),n=0,s=!1;for(;i!==t.charCodeAt(0);){if(++i===$t&&i++,i===Jt&&i++,i>Qt){if(s)throw"Bad character: "+t;i=Yt,s=!0}n+=1e5}return n}(n.charAt(1),h);c<ce(r);)c+=2e6;var u=i-o;if(u%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var p,d,_,m=u/2,g=0,f=0;return m>0&&(p=1e5/Math.pow(10,m),d=t.substring(o,o+m),g=parseFloat(d)*p,_=t.substring(o+m),f=parseFloat(_)*p),{easting:g+l,northing:f+c,zoneLetter:r,zoneNumber:a,accuracy:p}}function ce(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function ue(t,e,i){if(!(this instanceof ue))return new ue(t,e,i);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var n=t.split(",");this.x=parseFloat(n[0]),this.y=parseFloat(n[1]),this.z=parseFloat(n[2])||0}else this.x=t,this.y=e,this.z=i||0}ue.fromMGRS=function(t){return new ue(ne(t))},ue.prototype.toMGRS=function(t){return ie([this.x,this.y],t)};var pe=.046875,de=.01953125,_e=.01068115234375;function me(t){var e=[];e[0]=1-t*(.25+t*(pe+t*(de+t*_e))),e[1]=t*(.75-t*(pe+t*(de+t*_e)));var i=t*t;return e[2]=i*(.46875-t*(.013020833333333334+.007120768229166667*t)),i*=t,e[3]=i*(.3645833333333333-.005696614583333333*t),e[4]=i*t*.3076171875,e}function ge(t,e,i,n){return i*=e,e*=e,n[0]*t-i*(n[1]+e*(n[2]+e*(n[3]+e*n[4])))}function fe(t,e,i){for(var n=1/(1-e),s=t,o=20;o;--o){var a=Math.sin(s),r=1-e*a*a;if(s-=r=(ge(s,a,Math.cos(s),i)-t)*(r*Math.sqrt(r))*n,Math.abs(r)<b)return s}return s}const ye={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=me(this.es),this.ml0=ge(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var e,i,n,s=t.x,o=t.y,a=lt(s-this.long0),r=Math.sin(o),h=Math.cos(o);if(this.es){var l=h*a,c=Math.pow(l,2),u=this.ep2*Math.pow(h,2),p=Math.pow(u,2),d=Math.abs(h)>b?Math.tan(o):0,_=Math.pow(d,2),m=Math.pow(_,2);e=1-this.es*Math.pow(r,2),l/=Math.sqrt(e);var g=ge(o,r,h,this.en);i=this.a*(this.k0*l*(1+c/6*(1-_+u+c/20*(5-18*_+m+14*u-58*_*u+c/42*(61+179*m-m*_-479*_)))))+this.x0,n=this.a*(this.k0*(g-this.ml0+r*a*l/2*(1+c/12*(5-_+9*u+4*p+c/30*(61+m-58*_+270*u-330*_*u+c/56*(1385+543*m-m*_-3111*_))))))+this.y0}else{var f=h*Math.sin(a);if(Math.abs(Math.abs(f)-1)<b)return 93;if(i=.5*this.a*this.k0*Math.log((1+f)/(1-f))+this.x0,n=h*Math.cos(a)/Math.sqrt(1-Math.pow(f,2)),(f=Math.abs(n))>=1){if(f-1>b)return 93;n=0}else n=Math.acos(n);o<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return t.x=i,t.y=n,t},inverse:function(t){var e,i,n,s,o=(t.x-this.x0)*(1/this.a),a=(t.y-this.y0)*(1/this.a);if(this.es)if(i=fe(e=this.ml0+a/this.k0,this.es,this.en),Math.abs(i)<x){var r=Math.sin(i),h=Math.cos(i),l=Math.abs(h)>b?Math.tan(i):0,c=this.ep2*Math.pow(h,2),u=Math.pow(c,2),p=Math.pow(l,2),d=Math.pow(p,2);e=1-this.es*Math.pow(r,2);var _=o*Math.sqrt(e)/this.k0,m=Math.pow(_,2);n=i-(e*=l)*m/(1-this.es)*.5*(1-m/12*(5+3*p-9*c*p+c-4*u-m/30*(61+90*p-252*c*p+45*d+46*c-m/56*(1385+3633*p+4095*d+1574*d*p)))),s=lt(this.long0+_*(1-m/6*(1+2*p+c-m/20*(5+28*p+24*d+8*c*p+6*c-m/42*(61+662*p+1320*d+720*d*p))))/h)}else n=x*ht(a),s=0;else{var g=Math.exp(o/this.k0),f=.5*(g-1/g),y=this.lat0+a/this.k0,A=Math.cos(y);e=Math.sqrt((1-Math.pow(A,2))/(1+Math.pow(f,2))),n=Math.asin(e),a<0&&(n=-n),s=0===f&&0===A?0:lt(Math.atan2(f,A)+this.long0)}return t.x=s,t.y=n,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function Ae(t){var e=Math.exp(t);return e=(e-1/e)/2}function ve(t,e){t=Math.abs(t),e=Math.abs(e);var i=Math.max(t,e),n=Math.min(t,e)/(i||1);return i*Math.sqrt(1+Math.pow(n,2))}function Me(t){var e=Math.abs(t);return e=function(t){var e=1+t,i=e-1;return 0===i?t:t*Math.log(e)/i}(e*(1+e/(ve(1,e)+1))),t<0?-e:e}function Le(t,e){for(var i,n=2*Math.cos(2*e),s=t.length-1,o=t[s],a=0;--s>=0;)i=n*o-a+t[s],a=o,o=i;return e+i*Math.sin(2*e)}function xe(t,e,i){for(var n,s,o=Math.sin(e),a=Math.cos(e),r=Ae(i),h=function(t){var e=Math.exp(t);return(e+1/e)/2}(i),l=2*a*h,c=-2*o*r,u=t.length-1,p=t[u],d=0,_=0,m=0;--u>=0;)n=_,s=d,p=l*(_=p)-n-c*(d=m)+t[u],m=c*_-s+l*d;return[(l=o*h)*p-(c=a*r)*m,l*m+c*p]}const be={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(ye.init.apply(this),this.forward=ye.forward,this.inverse=ye.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),i=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),i*=e,this.cgb[1]=i*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),i*=e,this.cgb[2]=i*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=i*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),i*=e,this.cgb[3]=i*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=i*(1237/630+e*(e*(-24832/14175)-2.4)),i*=e,this.cgb[4]=i*(4174/315+e*(-144838/6237)),this.cbg[4]=i*(-734/315+e*(109598/31185)),i*=e,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=i*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=i*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),i*=e,this.utg[2]=i*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=i*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),i*=e,this.utg[3]=i*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=i*(49561/161280+e*(-179/168+e*(6601661/7257600))),i*=e,this.utg[4]=i*(-4583/161280+e*(108847/3991680)),this.gtu[4]=i*(34729/80640+e*(-3418889/1995840)),i*=e,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=.6650675310896665*i;var n=Le(this.cbg,this.lat0);this.Zb=-this.Qn*(n+function(t,e){for(var i,n=2*Math.cos(e),s=t.length-1,o=t[s],a=0;--s>=0;)i=n*o-a+t[s],a=o,o=i;return Math.sin(e)*i}(this.gtu,2*n))},forward:function(t){var e=lt(t.x-this.long0),i=t.y;i=Le(this.cbg,i);var n=Math.sin(i),s=Math.cos(i),o=Math.sin(e),a=Math.cos(e);i=Math.atan2(n,a*s),e=Math.atan2(o*s,ve(n,s*a)),e=Me(Math.tan(e));var r,h,l=xe(this.gtu,2*i,2*e);return i+=l[0],e+=l[1],Math.abs(e)<=2.623395162778?(r=this.a*(this.Qn*e)+this.x0,h=this.a*(this.Qn*i+this.Zb)+this.y0):(r=1/0,h=1/0),t.x=r,t.y=h,t},inverse:function(t){var e,i,n=(t.x-this.x0)*(1/this.a),s=(t.y-this.y0)*(1/this.a);if(s=(s-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var o=xe(this.utg,2*s,2*n);s+=o[0],n+=o[1],n=Math.atan(Ae(n));var a=Math.sin(s),r=Math.cos(s),h=Math.sin(n),l=Math.cos(n);s=Math.atan2(a*l,ve(h,l*r)),e=lt((n=Math.atan2(h,l*r))+this.long0),i=Le(this.cgb,s)}else e=1/0,i=1/0;return t.x=e,t.y=i,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]};const we={init:function(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*(lt(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*w,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,be.init.apply(this),this.forward=be.forward,this.inverse=be.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function Pe(t,e){return Math.pow((1-t)/(1+t),e)}const ke={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+k)/(Math.pow(Math.tan(.5*this.lat0+k),this.C)*Pe(this.e*t,this.ratexp))},forward:function(t){var e=t.x,i=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+k),this.C)*Pe(this.e*Math.sin(i),this.ratexp))-x,t.x=this.C*e,t},inverse:function(t){for(var e=t.x/this.C,i=t.y,n=Math.pow(Math.tan(.5*i+k)/this.K,1/this.C),s=20;s>0&&(i=2*Math.atan(n*Pe(this.e*Math.sin(t.y),-.5*this.e))-x,!(Math.abs(i-t.y)<1e-14));--s)t.y=i;return s?(t.x=e,t.y=i,t):null}};const Ee={init:function(){ke.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,i,n,s;return t.x=lt(t.x-this.long0),ke.forward.apply(this,[t]),e=Math.sin(t.y),i=Math.cos(t.y),n=Math.cos(t.x),s=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*i*n),t.x=s*i*Math.sin(t.x),t.y=s*(this.cosc0*e-this.sinc0*i*n),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,i,n,s,o;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,o=ve(t.x,t.y)){var a=2*Math.atan2(o,this.R2);e=Math.sin(a),i=Math.cos(a),s=Math.asin(i*this.sinc0+t.y*e*this.cosc0/o),n=Math.atan2(t.x*e,o*this.cosc0*i-t.y*this.sinc0*e)}else s=this.phic0,n=0;return t.x=n,t.y=s,ke.inverse.apply(this,[t]),t.x=lt(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};function Ce(t,e,i){return e*=i,Math.tan(.5*(x+t))*Math.pow((1-e)/(1+e),.5*i)}const Se={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=b&&(this.k0=.5*(1+ht(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=b&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=b&&Math.abs(Math.cos(this.lat_ts))>b&&(this.k0=.5*this.cons*rt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/ct(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=rt(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(Ce(this.lat0,this.sinlat0,this.e))-x,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var e,i,n,s,o,a,r=t.x,h=t.y,l=Math.sin(h),c=Math.cos(h),u=lt(r-this.long0);return Math.abs(Math.abs(r-this.long0)-Math.PI)<=b&&Math.abs(h+this.lat0)<=b?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*l+this.coslat0*c*Math.cos(u)),t.x=this.a*e*c*Math.sin(u)+this.x0,t.y=this.a*e*(this.coslat0*l-this.sinlat0*c*Math.cos(u))+this.y0,t):(i=2*Math.atan(Ce(h,l,this.e))-x,s=Math.cos(i),n=Math.sin(i),Math.abs(this.coslat0)<=b?(o=ct(this.e,h*this.con,this.con*l),a=2*this.a*this.k0*o/this.cons,t.x=this.x0+a*Math.sin(r-this.long0),t.y=this.y0-this.con*a*Math.cos(r-this.long0),t):(Math.abs(this.sinlat0)<b?(e=2*this.a*this.k0/(1+s*Math.cos(u)),t.y=e*n):(e=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*n+this.cosX0*s*Math.cos(u))),t.y=e*(this.cosX0*n-this.sinX0*s*Math.cos(u))+this.y0),t.x=e*s*Math.sin(u)+this.x0,t))},inverse:function(t){var e,i,n,s,o;t.x-=this.x0,t.y-=this.y0;var a=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var r=2*Math.atan(a/(2*this.a*this.k0));return e=this.long0,i=this.lat0,a<=b?(t.x=e,t.y=i,t):(i=Math.asin(Math.cos(r)*this.sinlat0+t.y*Math.sin(r)*this.coslat0/a),e=Math.abs(this.coslat0)<b?this.lat0>0?lt(this.long0+Math.atan2(t.x,-1*t.y)):lt(this.long0+Math.atan2(t.x,t.y)):lt(this.long0+Math.atan2(t.x*Math.sin(r),a*this.coslat0*Math.cos(r)-t.y*this.sinlat0*Math.sin(r))),t.x=e,t.y=i,t)}if(Math.abs(this.coslat0)<=b){if(a<=b)return i=this.lat0,e=this.long0,t.x=e,t.y=i,t;t.x*=this.con,t.y*=this.con,n=a*this.cons/(2*this.a*this.k0),i=this.con*ut(this.e,n),e=this.con*lt(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else s=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,a<=b?o=this.X0:(o=Math.asin(Math.cos(s)*this.sinX0+t.y*Math.sin(s)*this.cosX0/a),e=lt(this.long0+Math.atan2(t.x*Math.sin(s),a*this.cosX0*Math.cos(s)-t.y*this.sinX0*Math.sin(s)))),i=-1*ut(this.e,Math.tan(.5*(x+o)));return t.x=e,t.y=i,t},names:["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"],ssfn_:Ce};const Te={init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),i=this.a,n=1/this.rf,s=2*n-Math.pow(n,2),o=this.e=Math.sqrt(s);this.R=this.k0*i*Math.sqrt(1-s)/(1-s*Math.pow(e,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),r=Math.log(Math.tan(Math.PI/4+t/2)),h=Math.log((1+o*e)/(1-o*e));this.K=a-this.alpha*r+this.alpha*o/2*h},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),n=-this.alpha*(e+i)+this.K,s=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(t.x-this.lambda0),a=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(s)+Math.cos(this.b0)*Math.cos(o))),r=Math.asin(Math.cos(this.b0)*Math.sin(s)-Math.sin(this.b0)*Math.cos(s)*Math.cos(o));return t.y=this.R/2*Math.log((1+Math.sin(r))/(1-Math.sin(r)))+this.y0,t.x=this.R*a+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,i=t.y-this.y0,n=e/this.R,s=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(s)+Math.sin(this.b0)*Math.cos(s)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(s))),r=this.lambda0+a/this.alpha,h=0,l=o,c=-1e3,u=0;Math.abs(l-c)>1e-7;){if(++u>20)return;h=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),c=l,l=2*Math.atan(Math.exp(h))-Math.PI/2}return t.x=r,t.y=l,t},names:["somerc"]};var Oe=1e-7;const Be={init:function(){var t,e,i,n,s,o,a,r,h,l,c,u,p,d,_=0,m=0,g=0,f=0,y=0,A=0,v=0;this.no_off=(p=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],d="object"==typeof(u=this).projName?Object.keys(u.projName)[0]:u.projName,"no_uoff"in u||"no_off"in u||-1!==p.indexOf(d)||-1!==p.indexOf(ft(d))),this.no_rot="no_rot"in this;var M=!1;"alpha"in this&&(M=!0);var L=!1;if("rectified_grid_angle"in this&&(L=!0),M&&(v=this.alpha),L&&(_=this.rectified_grid_angle),M||L)m=this.longc;else if(g=this.long1,y=this.lat1,f=this.long2,A=this.lat2,Math.abs(y-A)<=Oe||(t=Math.abs(y))<=Oe||Math.abs(t-x)<=Oe||Math.abs(Math.abs(this.lat0)-x)<=Oe||Math.abs(Math.abs(A)-x)<=Oe)throw new Error;var w=1-this.es;e=Math.sqrt(w),Math.abs(this.lat0)>b?(r=Math.sin(this.lat0),i=Math.cos(this.lat0),t=1-this.es*r*r,this.B=i*i,this.B=Math.sqrt(1+this.es*this.B*this.B/w),this.A=this.B*this.k0*e/t,(s=(n=this.B*e/(i*Math.sqrt(t)))*n-1)<=0?s=0:(s=Math.sqrt(s),this.lat0<0&&(s=-s)),this.E=s+=n,this.E*=Math.pow(ct(this.e,this.lat0,r),this.B)):(this.B=1/e,this.A=this.k0,this.E=n=s=1),M||L?(M?(c=Math.asin(Math.sin(v)/n),L||(_=v)):(c=_,v=Math.asin(n*Math.sin(c))),this.lam0=m-Math.asin(.5*(s-1/s)*Math.tan(c))/this.B):(o=Math.pow(ct(this.e,y,Math.sin(y)),this.B),a=Math.pow(ct(this.e,A,Math.sin(A)),this.B),s=this.E/o,h=(a-o)/(a+o),l=((l=this.E*this.E)-a*o)/(l+a*o),(t=g-f)<-Math.PI?f-=E:t>Math.PI&&(f+=E),this.lam0=lt(.5*(g+f)-Math.atan(l*Math.tan(.5*this.B*(g-f))/h)/this.B),c=Math.atan(2*Math.sin(this.B*lt(g-this.lam0))/(s-1/s)),_=v=Math.asin(n*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(_),this.cosrot=Math.cos(_),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(v))),this.lat0<0&&(this.u_0=-this.u_0)),s=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(k-s)),this.v_pole_s=this.ArB*Math.log(Math.tan(k+s))},forward:function(t){var e,i,n,s,o,a,r,h,l={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-x)>b){if(e=.5*((o=this.E/Math.pow(ct(this.e,t.y,Math.sin(t.y)),this.B))-(a=1/o)),i=.5*(o+a),s=Math.sin(this.B*t.x),n=(e*this.singam-s*this.cosgam)/i,Math.abs(Math.abs(n)-1)<b)throw new Error;h=.5*this.ArB*Math.log((1-n)/(1+n)),a=Math.cos(this.B*t.x),r=Math.abs(a)<Oe?this.A*t.x:this.ArB*Math.atan2(e*this.cosgam+s*this.singam,a)}else h=t.y>0?this.v_pole_n:this.v_pole_s,r=this.ArB*t.y;return this.no_rot?(l.x=r,l.y=h):(r-=this.u_0,l.x=h*this.cosrot+r*this.sinrot,l.y=r*this.cosrot-h*this.sinrot),l.x=this.a*l.x+this.x0,l.y=this.a*l.y+this.y0,l},inverse:function(t){var e,i,n,s,o,a,r,h={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(i=t.y,e=t.x):(i=t.x*this.cosrot-t.y*this.sinrot,e=t.y*this.cosrot+t.x*this.sinrot+this.u_0),s=.5*((n=Math.exp(-this.BrA*i))-1/n),o=.5*(n+1/n),r=((a=Math.sin(this.BrA*e))*this.cosgam+s*this.singam)/o,Math.abs(Math.abs(r)-1)<b)h.x=0,h.y=r<0?-x:x;else{if(h.y=this.E/Math.sqrt((1+r)/(1-r)),h.y=ut(this.e,Math.pow(h.y,1/this.B)),h.y===1/0)throw new Error;h.x=-this.rB*Math.atan2(s*this.cosgam-a*this.singam,Math.cos(this.BrA*e))}return h.x+=this.lam0,h},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]};const De={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<b)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),i=Math.cos(this.lat1),n=rt(this.e,e,i),s=ct(this.e,this.lat1,e),o=Math.sin(this.lat2),a=Math.cos(this.lat2),r=rt(this.e,o,a),h=ct(this.e,this.lat2,o),l=Math.abs(Math.abs(this.lat0)-x)<b?0:ct(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>b?this.ns=Math.log(n/r)/Math.log(s/h):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=n/(this.ns*Math.pow(s,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var e=t.x,i=t.y;Math.abs(2*Math.abs(i)-Math.PI)<=b&&(i=ht(i)*(x-2e-10));var n,s,o=Math.abs(Math.abs(i)-x);if(o>b)n=ct(this.e,i,Math.sin(i)),s=this.a*this.f0*Math.pow(n,this.ns);else{if((o=i*this.ns)<=0)return null;s=0}var a=this.ns*lt(e-this.long0);return t.x=this.k0*(s*Math.sin(a))+this.x0,t.y=this.k0*(this.rh-s*Math.cos(a))+this.y0,t},inverse:function(t){var e,i,n,s,o,a=(t.x-this.x0)/this.k0,r=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(a*a+r*r),i=1):(e=-Math.sqrt(a*a+r*r),i=-1);var h=0;if(0!==e&&(h=Math.atan2(i*a,i*r)),0!==e||this.ns>0){if(i=1/this.ns,n=Math.pow(e/(this.a*this.f0),i),-9999===(s=ut(this.e,n)))return null}else s=-x;return o=lt(h/this.ns+this.long0),t.x=o,t.y=s,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]};const Ie={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,i,n,s,o,a,r,h=t.x,l=t.y,c=lt(h-this.long0);return e=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/e)-this.s45),n=-c*this.alfa,s=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),o=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(s)),a=this.n*o,r=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(s/2+this.s45),this.n),t.y=r*Math.cos(a)/1,t.x=r*Math.sin(a)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,i,n,s,o,a,r,h=t.x;t.x=t.y,t.y=h,this.czech||(t.y*=-1,t.x*=-1),o=Math.sqrt(t.x*t.x+t.y*t.y),s=Math.atan2(t.y,t.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(s)),i=Math.asin(Math.cos(n)*Math.sin(s)/Math.cos(e)),t.x=this.long0-i/this.alfa,a=e,r=0;var l=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-t.y)<1e-10&&(r=1),a=t.y,l+=1}while(0===r&&l<15);return l>=15?null:t},names:["Krovak","krovak"]};function Re(t,e,i,n,s){return t*s-e*Math.sin(2*s)+i*Math.sin(4*s)-n*Math.sin(6*s)}function ze(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function Ge(t){return.375*t*(1+.25*t*(1+.46875*t))}function Ne(t){return.05859375*t*t*(1+.75*t)}function je(t){return t*t*t*(35/3072)}function Fe(t,e,i){var n=e*i;return t/Math.sqrt(1-n*n)}function Ue(t){return Math.abs(t)<x?t:t-ht(t)*Math.PI}function Ze(t,e,i,n,s){var o,a;o=t/e;for(var r=0;r<15;r++)if(o+=a=(t-(e*o-i*Math.sin(2*o)+n*Math.sin(4*o)-s*Math.sin(6*o)))/(e-2*i*Math.cos(2*o)+4*n*Math.cos(4*o)-6*s*Math.cos(6*o)),Math.abs(a)<=1e-10)return o;return NaN}const He={init:function(){this.sphere||(this.e0=ze(this.es),this.e1=Ge(this.es),this.e2=Ne(this.es),this.e3=je(this.es),this.ml0=this.a*Re(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var e,i,n=t.x,s=t.y;if(n=lt(n-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(s)*Math.sin(n)),i=this.a*(Math.atan2(Math.tan(s),Math.cos(n))-this.lat0);else{var o=Math.sin(s),a=Math.cos(s),r=Fe(this.a,this.e,o),h=Math.tan(s)*Math.tan(s),l=n*Math.cos(s),c=l*l,u=this.es*a*a/(1-this.es);e=r*l*(1-c*h*(1/6-(8-h+8*u)*c/120)),i=this.a*Re(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+r*o/a*c*(.5+(5-h+6*u)*c/24)}return t.x=e+this.x0,t.y=i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,i,n=t.x/this.a,s=t.y/this.a;if(this.sphere){var o=s+this.lat0;e=Math.asin(Math.sin(o)*Math.cos(n)),i=Math.atan2(Math.tan(n),Math.cos(o))}else{var a=Ze(this.ml0/this.a+s,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-x)<=b)return t.x=this.long0,t.y=x,s<0&&(t.y*=-1),t;var r=Fe(this.a,this.e,Math.sin(a)),h=r*r*r/this.a/this.a*(1-this.es),l=Math.pow(Math.tan(a),2),c=n*this.a/r,u=c*c;e=a-r*Math.tan(a)/h*c*c*(.5-(1+3*l)*c*c/24),i=c*(1-u*(l/3+(1+3*l)*l*u/15))/Math.cos(a)}return t.x=lt(i+this.long0),t.y=Ue(e),t},names:["Cassini","Cassini_Soldner","cass"]};function qe(t,e){var i;return t>1e-7?(1-t*t)*(e/(1-(i=t*e)*i)-.5/t*Math.log((1-i)/(1+i))):2*e}var Ve=.3333333333333333,We=.17222222222222222,Ke=.10257936507936508,Xe=.06388888888888888,Ye=.0664021164021164,$e=.016415012942191543;const Je={init:function(){var t,e=Math.abs(this.lat0);if(Math.abs(e-x)<b?this.mode=this.lat0<0?1:2:Math.abs(e)<b?this.mode=3:this.mode=4,this.es>0)switch(this.qp=qe(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,i=[];return i[0]=t*Ve,e=t*t,i[0]+=e*We,i[1]=e*Xe,e*=t,i[0]+=e*Ke,i[1]+=e*Ye,i[2]=e*$e,i}(this.es),this.mode){case 2:case 1:this.dd=1;break;case 3:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case 4:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=qe(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else 4===this.mode&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var e,i,n,s,o,a,r,h,l,c,u=t.x,p=t.y;if(u=lt(u-this.long0),this.sphere){if(o=Math.sin(p),c=Math.cos(p),n=Math.cos(u),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+c*n:1+this.sinph0*o+this.cosph0*c*n)<=b)return null;e=(i=Math.sqrt(2/i))*c*Math.sin(u),i*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(p+this.lat0)<b)return null;i=k-.5*p,e=(i=2*(this.mode===this.S_POLE?Math.cos(i):Math.sin(i)))*Math.sin(u),i*=n}}else{switch(r=0,h=0,l=0,n=Math.cos(u),s=Math.sin(u),o=Math.sin(p),a=qe(this.e,o),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(r=a/this.qp,h=Math.sqrt(1-r*r)),this.mode){case this.OBLIQ:l=1+this.sinb1*r+this.cosb1*h*n;break;case this.EQUIT:l=1+h*n;break;case this.N_POLE:l=x+p,a=this.qp-a;break;case this.S_POLE:l=p-x,a=this.qp+a}if(Math.abs(l)<b)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:l=Math.sqrt(2/l),i=this.mode===this.OBLIQ?this.ymf*l*(this.cosb1*r-this.sinb1*h*n):(l=Math.sqrt(2/(1+h*n)))*r*this.ymf,e=this.xmf*l*h*s;break;case this.N_POLE:case this.S_POLE:a>=0?(e=(l=Math.sqrt(a))*s,i=n*(this.mode===this.S_POLE?l:-l)):e=i=0}}return t.x=this.a*e+this.x0,t.y=this.a*i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,i,n,s,o,a,r,h,l,c,u=t.x/this.a,p=t.y/this.a;if(this.sphere){var d,_=0,m=0;if((i=.5*(d=Math.sqrt(u*u+p*p)))>1)return null;switch(i=2*Math.asin(i),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(m=Math.sin(i),_=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(d)<=b?0:Math.asin(p*m/d),u*=m,p=_*d;break;case this.OBLIQ:i=Math.abs(d)<=b?this.lat0:Math.asin(_*this.sinph0+p*m*this.cosph0/d),u*=m*this.cosph0,p=(_-Math.sin(i)*this.sinph0)*d;break;case this.N_POLE:p=-p,i=x-i;break;case this.S_POLE:i-=x}e=0!==p||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(u,p):0}else{if(r=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(u/=this.dd,p*=this.dd,(a=Math.sqrt(u*u+p*p))<b)return t.x=this.long0,t.y=this.lat0,t;s=2*Math.asin(.5*a/this.rq),n=Math.cos(s),u*=s=Math.sin(s),this.mode===this.OBLIQ?(r=n*this.sinb1+p*s*this.cosb1/a,o=this.qp*r,p=a*this.cosb1*n-p*this.sinb1*s):(r=p*s/a,o=this.qp*r,p=a*n)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(p=-p),!(o=u*u+p*p))return t.x=this.long0,t.y=this.lat0,t;r=1-o/this.qp,this.mode===this.S_POLE&&(r=-r)}e=Math.atan2(u,p),h=Math.asin(r),l=this.apa,c=h+h,i=h+l[0]*Math.sin(c)+l[1]*Math.sin(c+c)+l[2]*Math.sin(c+c+c)}return t.x=lt(this.long0+e),t.y=i,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4};function Qe(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}const ti={init:function(){Math.abs(this.lat1+this.lat2)<b||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=rt(this.e3,this.sin_po,this.cos_po),this.qs1=qe(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=rt(this.e3,this.sin_po,this.cos_po),this.qs2=qe(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=qe(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>b?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=qe(this.e3,this.sin_phi),s=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*lt(e-this.long0),a=s*Math.sin(o)+this.x0,r=this.rh-s*Math.cos(o)+this.y0;return t.x=a,t.y=r,t},inverse:function(t){var e,i,n,s,o,a;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),n=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),n=-1),s=0,0!==e&&(s=Math.atan2(n*t.x,n*t.y)),n=e*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(i=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,i)),o=lt(s/this.ns0+this.long0),t.x=o,t.y=a,t},names:["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"],phi1z:function(t,e){var i,n,s,o,a=Qe(.5*e);if(t<b)return a;for(var r=t*t,h=1;h<=25;h++)if(a+=o=.5*(s=1-(n=t*(i=Math.sin(a)))*n)*s/Math.cos(a)*(e/(1-r)-i/s+.5/t*Math.log((1-n)/(1+n))),Math.abs(o)<=1e-7)return a;return null}};const ei={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var e,i,n,s,o,a,r,h=t.x,l=t.y;return n=lt(h-this.long0),e=Math.sin(l),i=Math.cos(l),s=Math.cos(n),(o=this.sin_p14*e+this.cos_p14*i*s)>0||Math.abs(o)<=b?(a=this.x0+1*this.a*i*Math.sin(n)/o,r=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*i*s)/o):(a=this.x0+this.infinity_dist*i*Math.sin(n),r=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*i*s)),t.x=a,t.y=r,t},inverse:function(t){var e,i,n,s,o,a;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(s=Math.atan2(e,this.rc),i=Math.sin(s),a=Qe((n=Math.cos(s))*this.sin_p14+t.y*i*this.cos_p14/e),o=Math.atan2(t.x*i,e*this.cos_p14*n-t.y*this.sin_p14*i),o=lt(this.long0+o)):(a=this.phic0,o=0),t.x=o,t.y=a,t},names:["gnom"]};const ii={init:function(){this.sphere||(this.k0=rt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,i,n=t.x,s=t.y,o=lt(n-this.long0);if(this.sphere)e=this.x0+this.a*o*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(s)/Math.cos(this.lat_ts);else{var a=qe(this.e,Math.sin(s));e=this.x0+this.a*this.k0*o,i=this.y0+this.a*a*.5/this.k0}return t.x=e,t.y=i,t},inverse:function(t){var e,i;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=lt(this.long0+t.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(i=function(t,e){var i=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-i)<1e-6)return e<0?-1*x:x;for(var n,s,o,a,r=Math.asin(.5*e),h=0;h<30;h++)if(s=Math.sin(r),o=Math.cos(r),a=t*s,r+=n=Math.pow(1-a*a,2)/(2*o)*(e/(1-t*t)-s/(1-a*a)+.5/t*Math.log((1-a)/(1+a))),Math.abs(n)<=1e-10)return r;return NaN}(this.e,2*t.y*this.k0/this.a),e=lt(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=i,t},names:["cea"]};const ni={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,i=t.y,n=lt(e-this.long0),s=Ue(i-this.lat0);return t.x=this.x0+this.a*n*this.rc,t.y=this.y0+this.a*s,t},inverse:function(t){var e=t.x,i=t.y;return t.x=lt(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=Ue(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"]};const si={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ze(this.es),this.e1=Ge(this.es),this.e2=Ne(this.es),this.e3=je(this.es),this.ml0=this.a*Re(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,i,n,s=t.x,o=t.y,a=lt(s-this.long0);if(n=a*Math.sin(o),this.sphere)Math.abs(o)<=b?(e=this.a*a,i=-1*this.a*this.lat0):(e=this.a*Math.sin(n)/Math.tan(o),i=this.a*(Ue(o-this.lat0)+(1-Math.cos(n))/Math.tan(o)));else if(Math.abs(o)<=b)e=this.a*a,i=-1*this.ml0;else{var r=Fe(this.a,this.e,Math.sin(o))/Math.tan(o);e=r*Math.sin(n),i=this.a*Re(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+r*(1-Math.cos(n))}return t.x=e+this.x0,t.y=i+this.y0,t},inverse:function(t){var e,i,n,s,o,a,r,h,l;if(n=t.x-this.x0,s=t.y-this.y0,this.sphere)if(Math.abs(s+this.a*this.lat0)<=b)e=lt(n/this.a+this.long0),i=0;else{var c;for(a=this.lat0+s/this.a,r=n*n/this.a/this.a+a*a,h=a,o=20;o;--o)if(h+=l=-1*(a*(h*(c=Math.tan(h))+1)-h-.5*(h*h+r)*c)/((h-a)/c-1),Math.abs(l)<=b){i=h;break}e=lt(this.long0+Math.asin(n*Math.tan(h)/this.a)/Math.sin(i))}else if(Math.abs(s+this.ml0)<=b)i=0,e=lt(this.long0+n/this.a);else{var u,p,d,_,m;for(a=(this.ml0+s)/this.a,r=n*n/this.a/this.a+a*a,h=a,o=20;o;--o)if(m=this.e*Math.sin(h),u=Math.sqrt(1-m*m)*Math.tan(h),p=this.a*Re(this.e0,this.e1,this.e2,this.e3,h),d=this.e0-2*this.e1*Math.cos(2*h)+4*this.e2*Math.cos(4*h)-6*this.e3*Math.cos(6*h),h-=l=(a*(u*(_=p/this.a)+1)-_-.5*u*(_*_+r))/(this.es*Math.sin(2*h)*(_*_+r-2*a*_)/(4*u)+(a-_)*(u*d-2/Math.sin(2*h))-d),Math.abs(l)<=b){i=h;break}u=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),e=lt(this.long0+Math.asin(n*u/this.a)/Math.sin(i))}return t.x=e,t.y=i,t},names:["Polyconic","American_Polyconic","poly"]};const oi={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var e,i=t.x,n=t.y-this.lat0,s=i-this.long0,o=n/M*1e-5,a=s,r=1,h=0;for(e=1;e<=10;e++)r*=o,h+=this.A[e]*r;var l,c=h,u=a,p=1,d=0,_=0,m=0;for(e=1;e<=6;e++)l=d*c+p*u,p=p*c-d*u,d=l,_=_+this.B_re[e]*p-this.B_im[e]*d,m=m+this.B_im[e]*p+this.B_re[e]*d;return t.x=m*this.a+this.x0,t.y=_*this.a+this.y0,t},inverse:function(t){var e,i,n=t.x,s=t.y,o=n-this.x0,a=(s-this.y0)/this.a,r=o/this.a,h=1,l=0,c=0,u=0;for(e=1;e<=6;e++)i=l*a+h*r,h=h*a-l*r,l=i,c=c+this.C_re[e]*h-this.C_im[e]*l,u=u+this.C_im[e]*h+this.C_re[e]*l;for(var p=0;p<this.iterations;p++){var d,_=c,m=u,g=a,f=r;for(e=2;e<=6;e++)d=m*c+_*u,_=_*c-m*u,m=d,g+=(e-1)*(this.B_re[e]*_-this.B_im[e]*m),f+=(e-1)*(this.B_im[e]*_+this.B_re[e]*m);_=1,m=0;var y=this.B_re[1],A=this.B_im[1];for(e=2;e<=6;e++)d=m*c+_*u,_=_*c-m*u,m=d,y+=e*(this.B_re[e]*_-this.B_im[e]*m),A+=e*(this.B_im[e]*_+this.B_re[e]*m);var v=y*y+A*A;c=(g*y+f*A)/v,u=(f*y-g*A)/v}var L=c,x=u,b=1,w=0;for(e=1;e<=9;e++)b*=L,w+=this.D[e]*b;var P=this.lat0+w*M*1e5,k=this.long0+x;return t.x=k,t.y=P,t},names:["New_Zealand_Map_Grid","nzmg"]};const ai={init:function(){},forward:function(t){var e=t.x,i=t.y,n=lt(e-this.long0),s=this.x0+this.a*n,o=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return t.x=s,t.y=o,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e=lt(this.long0+t.x/this.a),i=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=i,t},names:["Miller_Cylindrical","mill"]};const ri={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=me(this.es)},forward:function(t){var e,i,n=t.x,s=t.y;if(n=lt(n-this.long0),this.sphere){if(this.m)for(var o=this.n*Math.sin(s),a=20;a;--a){var r=(this.m*s+Math.sin(s)-o)/(this.m+Math.cos(s));if(s-=r,Math.abs(r)<b)break}else s=1!==this.n?Math.asin(this.n*Math.sin(s)):s;e=this.a*this.C_x*n*(this.m+Math.cos(s)),i=this.a*this.C_y*s}else{var h=Math.sin(s),l=Math.cos(s);i=this.a*ge(s,h,l,this.en),e=this.a*n*l/Math.sqrt(1-this.es*h*h)}return t.x=e,t.y=i,t},inverse:function(t){var e,i,n;return t.x-=this.x0,i=t.x/this.a,t.y-=this.y0,e=t.y/this.a,this.sphere?(e/=this.C_y,i/=this.C_x*(this.m+Math.cos(e)),this.m?e=Qe((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=Qe(Math.sin(e)/this.n)),i=lt(i+this.long0),e=Ue(e)):(e=fe(t.y/this.a,this.es,this.en),(n=Math.abs(e))<x?(n=Math.sin(e),i=lt(this.long0+t.x*Math.sqrt(1-this.es*n*n)/(this.a*Math.cos(e)))):n-b<x&&(i=this.long0)),t.x=i,t.y=e,t},names:["Sinusoidal","sinu"]};const hi={init:function(){},forward:function(t){for(var e=t.x,i=t.y,n=lt(e-this.long0),s=i,o=Math.PI*Math.sin(i);;){var a=-(s+Math.sin(s)-o)/(1+Math.cos(s));if(s+=a,Math.abs(a)<b)break}s/=2,Math.PI/2-Math.abs(i)<b&&(n=0);var r=.900316316158*this.a*n*Math.cos(s)+this.x0,h=1.4142135623731*this.a*Math.sin(s)+this.y0;return t.x=r,t.y=h,t},inverse:function(t){var e,i;t.x-=this.x0,t.y-=this.y0,i=t.y/(1.4142135623731*this.a),Math.abs(i)>.999999999999&&(i=.999999999999),e=Math.asin(i);var n=lt(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),i=(2*e+Math.sin(2*e))/Math.PI,Math.abs(i)>1&&(i=1);var s=Math.asin(i);return t.x=n,t.y=s,t},names:["Mollweide","moll"]};const li={init:function(){Math.abs(this.lat1+this.lat2)<b||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ze(this.es),this.e1=Ge(this.es),this.e2=Ne(this.es),this.e3=je(this.es),this.sin_phi=Math.sin(this.lat1),this.cos_phi=Math.cos(this.lat1),this.ms1=rt(this.e,this.sin_phi,this.cos_phi),this.ml1=Re(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<b?this.ns=this.sin_phi:(this.sin_phi=Math.sin(this.lat2),this.cos_phi=Math.cos(this.lat2),this.ms2=rt(this.e,this.sin_phi,this.cos_phi),this.ml2=Re(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Re(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var e,i=t.x,n=t.y;if(this.sphere)e=this.a*(this.g-n);else{var s=Re(this.e0,this.e1,this.e2,this.e3,n);e=this.a*(this.g-s)}var o=this.ns*lt(i-this.long0),a=this.x0+e*Math.sin(o),r=this.y0+this.rh-e*Math.cos(o);return t.x=a,t.y=r,t},inverse:function(t){var e,i,n,s;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var o=0;return 0!==i&&(o=Math.atan2(e*t.x,e*t.y)),this.sphere?(s=lt(this.long0+o/this.ns),n=Ue(this.g-i/this.a),t.x=s,t.y=n,t):(n=Ze(this.g-i/this.a,this.e0,this.e1,this.e2,this.e3),s=lt(this.long0+o/this.ns),t.x=s,t.y=n,t)},names:["Equidistant_Conic","eqdc"]};const ci={init:function(){this.R=this.a},forward:function(t){var e,i,n=t.x,s=t.y,o=lt(n-this.long0);Math.abs(s)<=b&&(e=this.x0+this.R*o,i=this.y0);var a=Qe(2*Math.abs(s/Math.PI));(Math.abs(o)<=b||Math.abs(Math.abs(s)-x)<=b)&&(e=this.x0,i=s>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var r=.5*Math.abs(Math.PI/o-o/Math.PI),h=r*r,l=Math.sin(a),c=Math.cos(a),u=c/(l+c-1),p=u*u,d=u*(2/l-1),_=d*d,m=Math.PI*this.R*(r*(u-_)+Math.sqrt(h*(u-_)*(u-_)-(_+h)*(p-_)))/(_+h);o<0&&(m=-m),e=this.x0+m;var g=h+u;return m=Math.PI*this.R*(d*g-r*Math.sqrt((_+h)*(h+1)-g*g))/(_+h),i=s>=0?this.y0+m:this.y0-m,t.x=e,t.y=i,t},inverse:function(t){var e,i,n,s,o,a,r,h,l,c,u,p;return t.x-=this.x0,t.y-=this.y0,u=Math.PI*this.R,o=(n=t.x/u)*n+(s=t.y/u)*s,u=3*(s*s/(h=-2*(a=-Math.abs(s)*(1+o))+1+2*s*s+o*o)+(2*(r=a-2*s*s+n*n)*r*r/h/h/h-9*a*r/h/h)/27)/(l=(a-r*r/3/h)/h)/(c=2*Math.sqrt(-l/3)),Math.abs(u)>1&&(u=u>=0?1:-1),p=Math.acos(u)/3,i=t.y>=0?(-c*Math.cos(p+Math.PI/3)-r/3/h)*Math.PI:-(-c*Math.cos(p+Math.PI/3)-r/3/h)*Math.PI,e=Math.abs(n)<b?this.long0:lt(this.long0+Math.PI*(o-1+Math.sqrt(1+2*(n*n-s*s)+o*o))/2/n),t.x=e,t.y=i,t},names:["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"]};const ui={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.f=this.es/(1+Math.sqrt(1-this.es))},forward:function(t){var e,i,n,s,o,a,r,h,l,c,u,p=t.x,d=t.y,_=Math.sin(t.y),m=Math.cos(t.y),g=lt(p-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=b?(t.x=this.x0+this.a*(x-d)*Math.sin(g),t.y=this.y0-this.a*(x-d)*Math.cos(g),t):Math.abs(this.sin_p12+1)<=b?(t.x=this.x0+this.a*(x+d)*Math.sin(g),t.y=this.y0+this.a*(x+d)*Math.cos(g),t):(l=this.sin_p12*_+this.cos_p12*m*Math.cos(g),h=(r=Math.acos(l))?r/Math.sin(r):1,t.x=this.x0+this.a*h*m*Math.sin(g),t.y=this.y0+this.a*h*(this.cos_p12*_-this.sin_p12*m*Math.cos(g)),t):(e=ze(this.es),i=Ge(this.es),n=Ne(this.es),s=je(this.es),Math.abs(this.sin_p12-1)<=b?(o=this.a*Re(e,i,n,s,x),a=this.a*Re(e,i,n,s,d),t.x=this.x0+(o-a)*Math.sin(g),t.y=this.y0-(o-a)*Math.cos(g),t):Math.abs(this.sin_p12+1)<=b?(o=this.a*Re(e,i,n,s,x),a=this.a*Re(e,i,n,s,d),t.x=this.x0+(o+a)*Math.sin(g),t.y=this.y0+(o+a)*Math.cos(g),t):Math.abs(p)<b&&Math.abs(d-this.lat0)<b?(t.x=t.y=0,t):(u=(c=function(t,e,i,n,s,o){const a=n-e,r=Math.atan((1-o)*Math.tan(t)),h=Math.atan((1-o)*Math.tan(i)),l=Math.sin(r),c=Math.cos(r),u=Math.sin(h),p=Math.cos(h);let d,_,m,g,f,y,A,v,M,L,x,b,w,P,k,E=a,C=100;do{if(_=Math.sin(E),m=Math.cos(E),g=Math.sqrt(p*_*(p*_)+(c*u-l*p*m)*(c*u-l*p*m)),0===g)return{azi1:0,s12:0};f=l*u+c*p*m,y=Math.atan2(g,f),A=c*p*_/g,v=1-A*A,M=0!==v?f-2*l*u/v:0,L=o/16*v*(4+o*(4-3*v)),d=E,E=a+(1-L)*o*A*(y+L*g*(M+L*f*(2*M*M-1)))}while(Math.abs(E-d)>1e-12&&--C>0);return 0===C?{azi1:NaN,s12:NaN}:(x=v*(s*s-s*(1-o)*(s*(1-o)))/(s*(1-o)*(s*(1-o))),b=1+x/16384*(4096+x*(x*(320-175*x)-768)),w=x/1024*(256+x*(x*(74-47*x)-128)),P=w*g*(M+w/4*(f*(2*M*M-1)-w/6*M*(4*g*g-3)*(4*M*M-3))),k=s*(1-o)*b*(y-P),{azi1:Math.atan2(p*_,c*u-l*p*m),s12:k})}(this.lat0,this.long0,d,p,this.a,this.f)).azi1,t.x=c.s12*Math.sin(u),t.y=c.s12*Math.cos(u),t))},inverse:function(t){var e,i,n,s,o,a,r,h,l,c,u,p,d,_,m;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((e=Math.sqrt(t.x*t.x+t.y*t.y))>2*x*this.a)return;return i=e/this.a,n=Math.sin(i),s=Math.cos(i),o=this.long0,Math.abs(e)<=b?a=this.lat0:(a=Qe(s*this.sin_p12+t.y*n*this.cos_p12/e),r=Math.abs(this.lat0)-x,o=Math.abs(r)<=b?this.lat0>=0?lt(this.long0+Math.atan2(t.x,-t.y)):lt(this.long0-Math.atan2(-t.x,t.y)):lt(this.long0+Math.atan2(t.x*n,e*this.cos_p12*s-t.y*this.sin_p12*n))),t.x=o,t.y=a,t}return h=ze(this.es),l=Ge(this.es),c=Ne(this.es),u=je(this.es),Math.abs(this.sin_p12-1)<=b?(a=Ze(((p=this.a*Re(h,l,c,u,x))-(e=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,h,l,c,u),o=lt(this.long0+Math.atan2(t.x,-1*t.y)),t.x=o,t.y=a,t):Math.abs(this.sin_p12+1)<=b?(p=this.a*Re(h,l,c,u,x),a=Ze(((e=Math.sqrt(t.x*t.x+t.y*t.y))-p)/this.a,h,l,c,u),o=lt(this.long0+Math.atan2(t.x,t.y)),t.x=o,t.y=a,t):(d=Math.atan2(t.x,t.y),_=Math.sqrt(t.x*t.x+t.y*t.y),m=function(t,e,i,n,s,o){const a=Math.atan((1-o)*Math.tan(t)),r=Math.sin(a),h=Math.cos(a),l=Math.sin(i),c=Math.cos(i),u=Math.atan2(r,h*c),p=h*l,d=1-p*p,_=d*(s*s-s*(1-o)*(s*(1-o)))/(s*(1-o)*(s*(1-o))),m=1+_/16384*(4096+_*(_*(320-175*_)-768)),g=_/1024*(256+_*(_*(74-47*_)-128));let f,y,A,v,M,L=n/(s*(1-o)*m),x=100;do{y=Math.cos(2*u+L),A=Math.sin(L),v=Math.cos(L),M=g*A*(y+g/4*(v*(2*y*y-1)-g/6*y*(4*A*A-3)*(4*y*y-3))),f=L,L=n/(s*(1-o)*m)+M}while(Math.abs(L-f)>1e-12&&--x>0);if(0===x)return{lat2:NaN,lon2:NaN};const b=r*A-h*v*c,w=o/16*d*(4+o*(4-3*d));return{lat2:Math.atan2(r*v+h*A*c,(1-o)*Math.sqrt(p*p+b*b)),lon2:e+(Math.atan2(A*l,h*v-r*A*c)-(1-w)*o*p*(L+w*A*(y+w*v*(2*y*y-1))))}}(this.lat0,this.long0,d,_,this.a,this.f),t.x=m.lon2,t.y=m.lat2,t)},names:["Azimuthal_Equidistant","aeqd"]};const pi={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var e,i,n,s,o,a,r,h=t.x,l=t.y;return n=lt(h-this.long0),e=Math.sin(l),i=Math.cos(l),s=Math.cos(n),((o=this.sin_p14*e+this.cos_p14*i*s)>0||Math.abs(o)<=b)&&(a=1*this.a*i*Math.sin(n),r=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*i*s)),t.x=a,t.y=r,t},inverse:function(t){var e,i,n,s,o,a,r;return t.x-=this.x0,t.y-=this.y0,i=Qe((e=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),n=Math.sin(i),s=Math.cos(i),a=this.long0,Math.abs(e)<=b?(r=this.lat0,t.x=a,t.y=r,t):(r=Qe(s*this.sin_p14+t.y*n*this.cos_p14/e),o=Math.abs(this.lat0)-x,Math.abs(o)<=b?(a=this.lat0>=0?lt(this.long0+Math.atan2(t.x,-t.y)):lt(this.long0-Math.atan2(-t.x,t.y)),t.x=a,t.y=r,t):(a=lt(this.long0+Math.atan2(t.x*n,e*this.cos_p14*s-t.y*this.sin_p14*n)),t.x=a,t.y=r,t))},names:["ortho"]};var di=1,_i=2,mi=3,gi=4,fi=5,yi=6,Ai=1,vi=2,Mi=3,Li=4;function xi(t,e,i,n){var s;return t<b?(n.value=Ai,s=0):(s=Math.atan2(e,i),Math.abs(s)<=k?n.value=Ai:s>k&&s<=x+k?(n.value=vi,s-=x):s>x+k||s<=-(x+k)?(n.value=Mi,s=s>=0?s-C:s+C):(n.value=Li,s+=x)),s}function bi(t,e){var i=t+e;return i<-C?i+=E:i>+C&&(i-=E),i}const wi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=x-k/2?this.face=fi:this.lat0<=-(x-k/2)?this.face=yi:Math.abs(this.long0)<=k?this.face=di:Math.abs(this.long0)<=x+k?this.face=this.long0>0?_i:gi:this.face=mi,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var e,i,n,s,o,a,r={x:0,y:0},h={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,i=t.x,this.face===fi)s=x-e,i>=k&&i<=x+k?(h.value=Ai,n=i-x):i>x+k||i<=-(x+k)?(h.value=vi,n=i>0?i-C:i+C):i>-(x+k)&&i<=-k?(h.value=Mi,n=i+x):(h.value=Li,n=i);else if(this.face===yi)s=x+e,i>=k&&i<=x+k?(h.value=Ai,n=-i+x):i<k&&i>=-k?(h.value=vi,n=-i):i<-k&&i>=-(x+k)?(h.value=Mi,n=-i-x):(h.value=Li,n=i>0?-i+C:-i-C);else{var l,c,u,p,d,_;this.face===_i?i=bi(i,+x):this.face===mi?i=bi(i,+C):this.face===gi&&(i=bi(i,-x)),p=Math.sin(e),d=Math.cos(e),_=Math.sin(i),l=d*Math.cos(i),c=d*_,u=p,this.face===di?n=xi(s=Math.acos(l),u,c,h):this.face===_i?n=xi(s=Math.acos(c),u,-l,h):this.face===mi?n=xi(s=Math.acos(-l),u,-c,h):this.face===gi?n=xi(s=Math.acos(-c),u,l,h):(s=n=0,h.value=Ai)}return a=Math.atan(12/C*(n+Math.acos(Math.sin(n)*Math.cos(k))-x)),o=Math.sqrt((1-Math.cos(s))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),h.value===vi?a+=x:h.value===Mi?a+=C:h.value===Li&&(a+=1.5*C),r.x=o*Math.cos(a),r.y=o*Math.sin(a),r.x=r.x*this.a+this.x0,r.y=r.y*this.a+this.y0,t.x=r.x,t.y=r.y,t},inverse:function(t){var e,i,n,s,o,a,r,h,l,c,u,p,d={lam:0,phi:0},_={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,i=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?_.value=Ai:t.y>=0&&t.y>=Math.abs(t.x)?(_.value=vi,e-=x):t.x<0&&-t.x>=Math.abs(t.y)?(_.value=Mi,e=e<0?e+C:e-C):(_.value=Li,e+=x),l=C/12*Math.tan(e),o=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),a=Math.atan(o),(r=1-(n=Math.cos(e))*n*(s=Math.tan(i))*s*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?r=-1:r>1&&(r=1),this.face===fi)h=Math.acos(r),d.phi=x-h,_.value===Ai?d.lam=a+x:_.value===vi?d.lam=a<0?a+C:a-C:_.value===Mi?d.lam=a-x:d.lam=a;else if(this.face===yi)h=Math.acos(r),d.phi=h-x,_.value===Ai?d.lam=-a+x:_.value===vi?d.lam=-a:_.value===Mi?d.lam=-a-x:d.lam=a<0?-a-C:-a+C;else{var m,g,f;l=(m=r)*m,g=(l+=(f=l>=1?0:Math.sqrt(1-l)*Math.sin(a))*f)>=1?0:Math.sqrt(1-l),_.value===vi?(l=g,g=-f,f=l):_.value===Mi?(g=-g,f=-f):_.value===Li&&(l=g,g=f,f=-l),this.face===_i?(l=m,m=-g,g=l):this.face===mi?(m=-m,g=-g):this.face===gi&&(l=m,m=g,g=-l),d.phi=Math.acos(-f)-x,d.lam=Math.atan2(g,m),this.face===_i?d.lam=bi(d.lam,-x):this.face===mi?d.lam=bi(d.lam,-C):this.face===gi&&(d.lam=bi(d.lam,+x))}return 0!==this.es&&(c=d.phi<0?1:0,u=Math.tan(d.phi),p=this.b/Math.sqrt(u*u+this.one_minus_f_squared),d.phi=Math.atan(Math.sqrt(this.a*this.a-p*p)/(this.one_minus_f*p)),c&&(d.phi=-d.phi)),d.lam+=this.long0,t.x=d.lam,t.y=d.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]};var Pi=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],ki=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Ei=.8487,Ci=1.3523,Si=P/5,Ti=1/Si,Oi=18,Bi=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))};const Di={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=lt(t.x-this.long0),i=Math.abs(t.y),n=Math.floor(i*Si);n<0?n=0:n>=Oi&&(n=17);var s={x:Bi(Pi[n],i=P*(i-Ti*n))*e,y:Bi(ki[n],i)};return t.y<0&&(s.y=-s.y),s.x=s.x*this.a*Ei+this.x0,s.y=s.y*this.a*Ci+this.y0,s},inverse:function(t){var e={x:(t.x-this.x0)/(this.a*Ei),y:Math.abs(t.y-this.y0)/(this.a*Ci)};if(e.y>=1)e.x/=Pi[18][0],e.y=t.y<0?-x:x;else{var i=Math.floor(e.y*Oi);for(i<0?i=0:i>=Oi&&(i=17);;)if(ki[i][0]>e.y)--i;else{if(!(ki[i+1][0]<=e.y))break;++i}var n=ki[i],s=5*(e.y-n[0])/(ki[i+1][0]-n[0]);s=function(t,e,i,n){for(var s=e;n;--n){var o=t(s);if(s-=o,Math.abs(o)<i)break}return s}(function(t){return(Bi(n,t)-e.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])}(n,t)},s,b,100),e.x/=Bi(Pi[i],s),e.y=(5*i+s)*w,t.y<0&&(e.y=-e.y)}return e.x=lt(e.x+this.long0),e},names:["Robinson","robin"]};const Ii={init:function(){this.name="geocent"},forward:function(t){return Dt(t,this.es,this.a)},inverse:function(t){return It(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};var Ri=0,zi=1,Gi=2,Ni=3,ji={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};const Fi={init:function(){if(Object.keys(ji).forEach(function(t){if(void 0===this[t])this[t]=ji[t].def;else{if(ji[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);ji[t].num&&(this[t]=parseFloat(this[t]))}ji[t].degrees&&(this[t]=this[t]*w)}.bind(this)),Math.abs(Math.abs(this.lat0)-x)<b?this.mode=this.lat0<0?zi:Ri:Math.abs(this.lat0)<b?this.mode=Gi:(this.mode=Ni,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var e,i,n,s,o=Math.sin(t.y),a=Math.cos(t.y),r=Math.cos(t.x);switch(this.mode){case Ni:i=this.sinph0*o+this.cosph0*a*r;break;case Gi:i=a*r;break;case zi:i=-o;break;case Ri:i=o}switch(e=(i=this.pn1/(this.p-i))*a*Math.sin(t.x),this.mode){case Ni:i*=this.cosph0*o-this.sinph0*a*r;break;case Gi:i*=o;break;case Ri:i*=-a*r;break;case zi:i*=a*r}return s=1/((n=i*this.cg+e*this.sg)*this.sw*this.h1+this.cw),e=(e*this.cg-i*this.sg)*this.cw*s,i=n*s,t.x=e*this.a,t.y=i*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var e,i,n,s={x:t.x,y:t.y};n=1/(this.pn1-t.y*this.sw),e=this.pn1*t.x*n,i=this.pn1*t.y*this.cw*n,t.x=e*this.cg+i*this.sg,t.y=i*this.cg-e*this.sg;var o=ve(t.x,t.y);if(Math.abs(o)<b)s.x=0,s.y=t.y;else{var a,r;switch(r=1-o*o*this.pfact,r=(this.p-Math.sqrt(r))/(this.pn1/o+o/this.pn1),a=Math.sqrt(1-r*r),this.mode){case Ni:s.y=Math.asin(a*this.sinph0+t.y*r*this.cosph0/o),t.y=(a-this.sinph0*Math.sin(s.y))*o,t.x*=r*this.cosph0;break;case Gi:s.y=Math.asin(t.y*r/o),t.y=a*o,t.x*=r;break;case Ri:s.y=Math.asin(a),t.y=-t.y;break;case zi:s.y=-Math.asin(a)}s.x=Math.atan2(t.x,t.y)}return t.x=s.x+this.long0,t.y=s.y,t},names:["Tilted_Perspective","tpers"]};const Ui={init:function(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,e=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var e,i,n,s,o=t.x,a=t.y;if(o-=this.long0,"ellipse"===this.shape){a=Math.atan(this.radius_p2*Math.tan(a));var r=this.radius_p/ve(this.radius_p*Math.cos(a),Math.sin(a));if(i=r*Math.cos(o)*Math.cos(a),n=r*Math.sin(o)*Math.cos(a),s=r*Math.sin(a),(this.radius_g-i)*i-n*n-s*s*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;e=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/ve(s,e)),t.y=this.radius_g_1*Math.atan(s/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(s/ve(n,e)))}else"sphere"===this.shape&&(e=Math.cos(a),i=Math.cos(o)*e,n=Math.sin(o)*e,s=Math.sin(a),e=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/ve(s,e)),t.y=this.radius_g_1*Math.atan(s/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(s/ve(n,e))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var e,i,n,s,o=-1,a=0,r=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(r=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*ve(1,r)):(a=Math.tan(t.x/this.radius_g_1),r=Math.tan(t.y/this.radius_g_1)*ve(1,a));var h=r/this.radius_p;if(e=a*a+h*h+o*o,(n=(i=2*this.radius_g*o)*i-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;s=(-i-Math.sqrt(n))/(2*e),o=this.radius_g+s*o,a*=s,r*=s,t.x=Math.atan2(a,o),t.y=Math.atan(r*Math.cos(t.x)/o),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(r=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+r*r)):(a=Math.tan(t.x/this.radius_g_1),r=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+a*a)),e=a*a+r*r+o*o,(n=(i=2*this.radius_g*o)*i-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;s=(-i-Math.sqrt(n))/(2*e),o=this.radius_g+s*o,a*=s,r*=s,t.x=Math.atan2(a,o),t.y=Math.atan(r*Math.cos(t.x)/o)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};var Zi=1.340264,Hi=-.081106,qi=893e-6,Vi=.003796,Wi=Math.sqrt(3)/2;const Ki={init:function(){this.es=0,this.long0=void 0!==this.long0?this.long0:0},forward:function(t){var e=lt(t.x-this.long0),i=t.y,n=Math.asin(Wi*Math.sin(i)),s=n*n,o=s*s*s;return t.x=e*Math.cos(n)/(Wi*(Zi+3*Hi*s+o*(7*qi+9*Vi*s))),t.y=n*(Zi+Hi*s+o*(qi+Vi*s)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var e,i,n,s,o=t.y;for(s=0;s<12&&(o-=n=(o*(Zi+Hi*(e=o*o)+(i=e*e*e)*(qi+Vi*e))-t.y)/(Zi+3*Hi*e+i*(7*qi+9*Vi*e)),!(Math.abs(n)<1e-9));++s);return i=(e=o*o)*e*e,t.x=Wi*t.x*(Zi+3*Hi*e+i*(7*qi+9*Vi*e))/Math.cos(o),t.y=Math.asin(Math.sin(o)/Wi),t.x=lt(t.x+this.long0),t},names:["eqearth","Equal Earth","Equal_Earth"]};var Xi=1e-10;function Yi(t){var e,i,n,s=lt(t.x-(this.long0||0)),o=t.y;return e=this.am1+this.m1-ge(o,i=Math.sin(o),n=Math.cos(o),this.en),i=n*s/(e*Math.sqrt(1-this.es*i*i)),t.x=e*Math.sin(i),t.y=this.am1-e*Math.cos(i),t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function $i(t){var e,i,n,s;if(t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a,i=ve(t.x,t.y=this.am1-t.y),s=fe(this.am1+this.m1-i,this.es,this.en),(e=Math.abs(s))<x)e=Math.sin(s),n=i*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*e*e)/Math.cos(s);else{if(!(Math.abs(e-x)<=Xi))throw new Error;n=0}return t.x=lt(n+(this.long0||0)),t.y=Ue(s),t}function Ji(t){var e,i,n=lt(t.x-(this.long0||0)),s=t.y;return i=this.cphi1+this.phi1-s,Math.abs(i)>Xi?(t.x=i*Math.sin(e=n*Math.cos(s)/i),t.y=this.cphi1-i*Math.cos(e)):t.x=t.y=0,t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function Qi(t){var e,i;t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var n=ve(t.x,t.y=this.cphi1-t.y);if(i=this.cphi1+this.phi1-n,Math.abs(i)>x)throw new Error;return e=Math.abs(Math.abs(i)-x)<=Xi?0:n*Math.atan2(t.x,t.y)/Math.cos(i),t.x=lt(e+(this.long0||0)),t.y=Ue(i),t}const tn={init:function(){var t;if(this.phi1=this.lat1,Math.abs(this.phi1)<Xi)throw new Error;this.es?(this.en=me(this.es),this.m1=ge(this.phi1,this.am1=Math.sin(this.phi1),t=Math.cos(this.phi1),this.en),this.am1=t/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=$i,this.forward=Yi):(Math.abs(this.phi1)+Xi>=x?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=Qi,this.forward=Ji)},names:["bonne","Bonne (Werner lat_1=90)"]};const en=Object.assign(function(t,e,i){var n,s,o,a=!1;return void 0===e?(s=Wt(t),n=qt,a=!0):(void 0!==e.x||Array.isArray(e))&&(i=e,s=Wt(t),n=qt,a=!0),n||(n=Wt(t)),s||(s=Wt(e)),i?Vt(n,s,i):(o={forward:function(t,e){return Vt(n,s,t,e)},inverse:function(t,e){return Vt(s,n,t,e)}},a&&(o.oProj=s),o)},{defaultDatum:"WGS84",Proj:Bt,WGS84:new Bt("WGS84"),Point:ue,toPoint:Ut,defs:nt,nadgrid:function(t,e,i){return e instanceof ArrayBuffer?function(t,e,i){var n=!0;void 0!==i&&!1===i.includeErrorFields&&(n=!1);var s=new DataView(e),o=function(t){var e=t.getInt32(8,!1);if(11===e)return!1;e=t.getInt32(8,!0);return!0}(s),a=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:Ct(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,e),fromSemiMinorAxis:t.getFloat64(136,e),toSemiMajorAxis:t.getFloat64(152,e),toSemiMinorAxis:t.getFloat64(168,e)}}(s,o),r=function(t,e,i,n){for(var s=176,o=[],a=0;a<e.nSubgrids;a++){var r=Tt(t,s,i),h=Ot(t,s,r,i,n),l=Math.round(1+(r.upperLongitude-r.lowerLongitude)/r.longitudeInterval),c=Math.round(1+(r.upperLatitude-r.lowerLatitude)/r.latitudeInterval);o.push({ll:[Et(r.lowerLongitude),Et(r.lowerLatitude)],del:[Et(r.longitudeInterval),Et(r.latitudeInterval)],lim:[l,c],count:r.gridNodeCount,cvs:St(h)});var u=16;!1===n&&(u=8),s+=176+r.gridNodeCount*u}return o}(s,a,o,n),h={header:a,subgrids:r};return bt[t]=h,h}(t,e,i):{ready:wt(t,e)}},transform:Ht,mgrs:ee,version:"__VERSION__"});var nn;(nn=en).Proj.projections.add(ye),nn.Proj.projections.add(be),nn.Proj.projections.add(we),nn.Proj.projections.add(Ee),nn.Proj.projections.add(Se),nn.Proj.projections.add(Te),nn.Proj.projections.add(Be),nn.Proj.projections.add(De),nn.Proj.projections.add(Ie),nn.Proj.projections.add(He),nn.Proj.projections.add(Je),nn.Proj.projections.add(ti),nn.Proj.projections.add(ei),nn.Proj.projections.add(ii),nn.Proj.projections.add(ni),nn.Proj.projections.add(si),nn.Proj.projections.add(oi),nn.Proj.projections.add(ai),nn.Proj.projections.add(ri),nn.Proj.projections.add(hi),nn.Proj.projections.add(li),nn.Proj.projections.add(ci),nn.Proj.projections.add(ui),nn.Proj.projections.add(pi),nn.Proj.projections.add(wi),nn.Proj.projections.add(Di),nn.Proj.projections.add(Ii),nn.Proj.projections.add(Fi),nn.Proj.projections.add(Ui),nn.Proj.projections.add(Ki),nn.Proj.projections.add(tn);const sn=a(Object.freeze(Object.defineProperty({__proto__:null,default:en},Symbol.toStringTag,{value:"Module"})));var on;on={exports:{}},function(){var t,e;t=l(),e=sn,on.exports=function(t,e){return e.__esModule&&e.default&&(e=e.default),t.Proj={},t.Proj._isProj4Obj=function(t){return void 0!==t.inverse&&void 0!==t.forward},t.Proj.Projection=t.Class.extend({initialize:function(e,i,n){var s=t.Proj._isProj4Obj(e);this._proj=s?e:this._projFromCodeDef(e,i),this.bounds=s?i:n},project:function(e){var i=this._proj.forward([e.lng,e.lat]);return new t.Point(i[0],i[1])},unproject:function(e,i){var n=this._proj.inverse([e.x,e.y]);return new t.LatLng(n[1],n[0],i)},_projFromCodeDef:function(t,i){if(i)e.defs(t,i);else if(void 0===e.defs[t]){var n=t.split(":");if(n.length>3&&(t=n[n.length-3]+":"+n[n.length-1]),void 0===e.defs[t])throw"No projection definition for code "+t}return e(t)}}),t.Proj.CRS=t.Class.extend({includes:t.CRS,options:{transformation:new t.Transformation(1,0,-1,0)},initialize:function(e,i,n){var s,o,a,r;if(t.Proj._isProj4Obj(e)?(s=(o=e).srsCode,r=i||{},this.projection=new t.Proj.Projection(o,r.bounds)):(s=e,a=i,r=n||{},this.projection=new t.Proj.Projection(s,a,r.bounds)),t.Util.setOptions(this,r),this.code=s,this.transformation=this.options.transformation,this.options.origin&&(this.transformation=new t.Transformation(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales)this._scales=this.options.scales;else if(this.options.resolutions){this._scales=[];for(var h=this.options.resolutions.length-1;h>=0;h--)this.options.resolutions[h]&&(this._scales[h]=1/this.options.resolutions[h])}this.infinite=!this.options.bounds},scale:function(t){var e,i=Math.floor(t);return t===i?this._scales[t]:(e=this._scales[i])+(this._scales[i+1]-e)*(t-i)},zoom:function(t){var e,i,n=this._closestElement(this._scales,t),s=this._scales.indexOf(n);return t===n?s:void 0===n?-1/0:(i=s+1,void 0===(e=this._scales[i])?1/0:(t-n)/(e-n)+s)},distance:t.CRS.Earth.distance,R:t.CRS.Earth.R,_closestElement:function(t,e){for(var i,n=t.length;n--;)t[n]<=e&&(void 0===i||i<t[n])&&(i=t[n]);return i}}),t.Proj.GeoJSON=t.GeoJSON.extend({initialize:function(e,i){this._callLevel=0,t.GeoJSON.prototype.initialize.call(this,e,i)},addData:function(e){var i;e&&(e.crs&&"name"===e.crs.type?i=new t.Proj.CRS(e.crs.properties.name):e.crs&&e.crs.type&&(i=new t.Proj.CRS(e.crs.type+":"+e.crs.properties.code)),void 0!==i&&(this.options.coordsToLatLng=function(e){var n=t.point(e[0],e[1]);return i.projection.unproject(n)})),this._callLevel++;try{t.GeoJSON.prototype.addData.call(this,e)}finally{this._callLevel--,0===this._callLevel&&delete this.options.coordsToLatLng}}}),t.Proj.geoJson=function(e,i){return new t.Proj.GeoJSON(e,i)},t.Proj.ImageOverlay=t.ImageOverlay.extend({initialize:function(e,i,n){t.ImageOverlay.prototype.initialize.call(this,e,null,n),this._projectedBounds=i},_animateZoom:function(e){var i=this._map.getZoomScale(e.zoom),n=t.point(this._projectedBounds.min.x,this._projectedBounds.max.y),s=this._projectedToNewLayerPoint(n,e.zoom,e.center);t.DomUtil.setTransform(this._image,s,i)},_reset:function(){var e=this._map.getZoom(),i=this._map.getPixelOrigin(),n=t.bounds(this._transform(this._projectedBounds.min,e)._subtract(i),this._transform(this._projectedBounds.max,e)._subtract(i)),s=n.getSize();t.DomUtil.setPosition(this._image,n.min),this._image.style.width=s.x+"px",this._image.style.height=s.y+"px"},_projectedToNewLayerPoint:function(t,e,i){var n=this._map.getSize()._divideBy(2),s=this._map.project(i,e)._subtract(n)._round().add(this._map._getMapPanePos());return this._transform(t,e)._subtract(s)},_transform:function(t,e){var i=this._map.options.crs,n=i.transformation,s=i.scale(e);return n.transform(t,s)}}),t.Proj.imageOverlay=function(e,i,n){return new t.Proj.ImageOverlay(e,i,n)},t.Proj}(t,e)}();const an=new u.Proj.CRS("EPSG:900913","+proj=merc +a=6378206 +b=6356584.314245179 +lat_ts=0.0 +lon_0=0.0 +x_0=0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs",{resolutions:function(){var t=[];t[0]=Math.pow(2,18);for(var e=1;e<21;e++)t[e]=Math.pow(2,18-e);return t}(),origin:[0,0],bounds:u.bounds([20037508.342789244,0],[0,20037508.342789244])}),rn=u.Circle.extend({options:{},initialize:function(t,e,i){e&&(this._startAngle=e.startAngle-90,this._endAngle=e.endAngle-90,this.angle=this._endAngle-this._startAngle,this.type=e.type,L.Circle.prototype.initialize.call(this,t,e,i))},_updatePath(){switch(this.type){case ln.Scan:this._renderer._updateSector1(this);break;case ln.Wave:case ln.Breath:this._renderer._updateCircle(this);break;default:this._renderer._updateSector(this)}},setStyle:function(t){this._startAngle=t.startAngle-90,this._endAngle=t.endAngle-90,L.Circle.prototype.setStyle.call(this,t)}}),hn=L.Canvas.extend({options:{collisionFlg:!0},initialize(t){t=L.Util.setOptions(this,t),L.Util.stamp(this),this._layers=this._layers||{}},_handleMouseHover(t,e){let i,n;for(i in this._drawnLayers)n=this._drawnLayers[i],n.options.interactive&&n._containsPoint(e)&&(L.DomUtil.addClass(this._containerText,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n);this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_handleMouseOut(t,e){const i=this._hoveredLayer;!i||"mouseout"!==t.type&&i._containsPoint(e)||(L.DomUtil.removeClass(this._containerText,"leaflet-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null)},_updateTransform(t,e){L.Canvas.prototype._updateTransform.call(this,t,e);const i=this._map.getZoomScale(e,this._zoom),n=L.DomUtil.getPosition(this._container),s=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),a=this._map.project(t,e).subtract(o),r=s.multiplyBy(-i).add(n).add(s).subtract(a);L.Browser.any3d?L.DomUtil.setTransform(this._containerText,r,i):L.DomUtil.setPosition(this._containerText,r)},_initContainer(t){L.Canvas.prototype._initContainer.call(this),this._containerText=document.createElement("canvas"),L.DomEvent.on(this._containerText,"mousemove",L.Util.throttle(this._onMouseMove,32,this),this).on(this._containerText,"dblclick mousedown mouseup contextmenu",this._onClick,this).on(this._containerText,"mouseout",this._handleMouseOut,this),this._ctxLabel=this._containerText.getContext("2d"),L.DomUtil.addClass(this._containerText,"leaflet-zoom-animated2"),this.getPane().appendChild(this._containerText)},_update(){this._textList=[],L.Renderer.prototype._update.call(this);const t=this._bounds,e=this._containerText,i=t.getSize(),n=L.Browser.retina?2:1;L.DomUtil.setPosition(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",e.style.zIndex="4",this._container.style.zIndex="3",L.Browser.retina&&this._ctxLabel.scale(2,2),this._ctxLabel.translate(-t.min.x,-t.min.y),L.Canvas.prototype._update.call(this)},_updatePoly(t,e){L.Canvas.prototype._updatePoly.call(this,t,e),this._text(this._ctxLabel,t)},_updateCircle(t){if(t.options.gradient){const e=this._ctx,i=t._point,n=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||n)/n,o=e.createRadialGradient(i.x,i.y/s,0,i.x,i.y/s,n);o.addColorStop(.8,"rgba(0, 255, 255, 0)"),o.addColorStop(1,t.fillColor.toString()),t.options.fillColor=o}L.Canvas.prototype._updateCircle.call(this,t),this._text(this._ctxLabel,t)},_updateSector1(t){const e=parseFloat(t.options.scaleSpeed),i=parseFloat(t.options.scaleAngle);if(t.options._currentAngle+=e,t._map)var n=t._map.latLngToLayerPoint(t._latlng);else n=t._point;const s=this._ctx,o=Math.max(Math.round(t._radius),1),a=(Math.max(Math.round(t._radiusY),1)||o)/o,r=(t,e)=>({x:n.x+t*Math.cos(Math.PI/180*e),y:n.y+t*Math.sin(Math.PI/180*e)});for(let h=0,l=i;h<l;h++){let e,l;360===t.angle?(e=t.options._currentAngle-h,l=t.options._currentAngle-h+1):t.options._currentAngle>t.angle?(e=t.options._currentAngle-h-1-t.angle,l=t.options._currentAngle-h-t.angle):(e=-t.options._currentAngle+h+1+t.angle,l=-t.options._currentAngle+h+t.angle);const c=r(o,e+t._startAngle),u=r(o,l+t._startAngle),p=.7-h/i;s.beginPath(),s.fillStyle=t.fillColor.setAlpha(p).toString(),s.moveTo(n.x,n.y/a),s.lineTo(c.x,c.y),s.lineTo(u.x,u.y),s.fill()}this._text(this._ctxLabel,t)},_updateSector2(t){if(!this._drawing||t._empty())return;if(t._map)var e=t._map.latLngToLayerPoint(t._latlng);else e=t._point;const i=this._ctx,n=t._startAngle/180*Math.PI,s=t._endAngle/180*Math.PI,o=Math.max(Math.round(t._radius),1),a=(Math.max(Math.round(t._radiusY),1)||o)/o;1!==a&&(i.save(),i.scale(1,a)),i.beginPath(),i.moveTo(e.x,e.y/a),i.arc(e.x,e.y/a,o,n,s,!1),i.closePath(),1!==a&&i.restore();const r=i.createRadialGradient(e.x,e.y/a,0,e.x,e.y/a,o);r.addColorStop(0,"rgb(0,0,255)"),r.addColorStop(1,"rgb(255,255,0)"),t.options.fillColor=r,this._fillStroke(i,t),this._text(this._ctxLabel,t)},_updateSector(t){if(!this._drawing||t._empty())return;if(t._map)var e=t._map.latLngToLayerPoint(t._latlng);else e=t._point;const i=this._ctx,n=t._startAngle/180*Math.PI,s=t._endAngle/180*Math.PI,o=Math.max(Math.round(t._radius),1),a=(Math.max(Math.round(t._radiusY),1)||o)/o;1!==a&&(i.save(),i.scale(1,a)),i.beginPath(),i.moveTo(e.x,e.y/a),i.arc(e.x,e.y/a,o,n,s,!1),i.closePath(),1!==a&&i.restore(),this._fillStroke(i,t),this._text(this._ctxLabel,t)},_updateRadarGrid(t){if(!this._drawing||t._empty())return;if(t._map)var e=t._map.latLngToLayerPoint(t._latlng);else e=t._point;const i=this._ctx,n=t._startAngle/180*Math.PI,s=t._endAngle/180*Math.PI,o=Math.max(Math.round(t._radius),1),a=(Math.max(Math.round(t._radiusY),1)||o)/o;1!==a&&(i.save(),i.scale(1,a)),i.beginPath(),i.moveTo(e.x,e.y/a),i.arc(e.x,e.y/a,o,n,s,!1),i.closePath(),1!==a&&i.restore(),t.options.fillColor=t.options.color,this._fillStroke(i,t),this._text(this._ctxLabel,t)},_updateRing(t){var e=this._ctx;if(!this._drawing||t._empty())return;const i=t._point;e=this._ctx;const n=Math.max(Math.round(t._radiuMaxs),1),s=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||s)/s;1!==o&&(e.save(),e.scale(1,o)),e.beginPath(),e.arc(i.x,i.y/o,n,0,2*Math.PI,!1),e.moveTo(i.x+s/o,i.y/o),e.arc(i.x,i.y/o,s,0,2*Math.PI,!0),e.closePath(),1!==o&&e.restore(),this._fillStroke(e,t),this._text(this._ctxLabel,t)},_initLine(t){},_text(t,e){if(null!=e.options.text&&this._map.getZoom()>14){t.globalAlpha=1;let i=e._point;if(null==i){if(0==e._parts.length||0==e._parts[0].length)return;i=this._getCenter(e._parts[0])}const n=7,s=5;t.lineWidth=4,t.font="12px 'Meiryo'";const o=t.measureText(e.options.text).width+i.x,a=i.y+s+20,r=L.bounds(L.point(i.x+n,i.y+s),L.point(o,a));if(this.options.collisionFlg)for(const t in this._textList){if(this._textList[t].intersects(r))return}this._textList.push(r),this._drawBubble(t,i.x,i.y,t.measureText(e.options.text).width+10,20),null==e.options.textColor?t.fillStyle="blue":t.fillStyle=e.options.textColor,t.fillText(e.options.text,i.x+n,i.y+s)}},_drawBubble(t,e,i,n,s){t.fillStyle="rgba(212,212,212,.8)",t.beginPath(),t.moveTo(e,i),t.lineTo(e+3,i+3),t.lineTo(e+3,i+s/2),t.lineTo(e+n,i+s/2),t.lineTo(e+n,i-s/2),t.lineTo(e+3,i-s/2),t.lineTo(e+3,i),t.fill()},_updateDashArray(t){if("string"==typeof t.options.dashArray){const e=t.options.dashArray.split(/[, ]+/),i=[];let n,s;for(s=0;s<e.length;s++){if(n=Number(e[s]),isNaN(n))return;i.push(n)}t.options._dashArray=i,t.options._dashOffset=t.options.dashOffset}else t.options._dashArray=t.options.dashArray,t.options._dashOffset=t.options.dashOffset||0},_fillStroke(t,e){const 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.lineDashOffset=e.options&&e.options._dashOffset||0),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_getCenter(t){let e,i,n,s,o,a,r;const h=t.length;if(!h)return null;for(e=0,i=0;e<h-1;e++)i+=t[e].distanceTo(t[e+1])/2;if(0===i)return t[0];for(e=0,s=0;e<h-1;e++)if(o=t[e],a=t[e+1],n=o.distanceTo(a),s+=n,s>i){r=(s-i)/n;const t=[a.x-r*(a.x-o.x),a.y-r*(a.y-o.y)];return L.point(t[0],t[1])}}}),ln={Wave:0,Scan:1,Breath:2},cn=L.LayerGroup.extend({options:{fillColor:"#ff0",color:"#fff",axis:{show:!1,color:"#000"},scale:{show:!1,splitNum:5,lineColor:"#000",labelColor:"#000",minZoom:0,maxZoom:23},material:{show:!1,type:ln.Wave,color:"#0ff",speed:10,clockwise:!0,angle:60}},initialize(t){e.ObjectUtil.deepAssign(this.options,t);const{lng:i,lat:n}=this.options.center;e.GeoUtil.isLnglat(i,n)||e.ExceptionUtil.throwCoordinateException(),this.latLng=new L.LatLng(n,i),this.labelTextCollision=new hn({collisionFlg:!0,padding:.5}),this.axisEntity=[],this.scaleCircleEntity=[],this.labelCircleEntity=[],L.LayerGroup.prototype.initialize.call(this,t)},onAdd(t){this.initializeCircle(),this.initializeAxis(),this.initializeScale(),this.initializeMaterial()},onRemove(){L.LayerGroup.prototype.removeLayer.call(this,this.circleEntity),L.LayerGroup.prototype.removeLayer.call(this,this.materialEntity),this.axisEntity.forEach(t=>{L.LayerGroup.prototype.removeLayer.call(this,t)}),this.scaleCircleEntity.forEach(t=>{L.LayerGroup.prototype.removeLayer.call(this,t)}),this.labelCircleEntity.forEach(t=>{L.LayerGroup.prototype.removeLayer.call(this,t)}),this.stopMotion()},initializeCircle(){var t;null==(t=this.circleEntity)||t.remove(),this.circleEntity=new L.Circle(this.latLng,this.getCircleStyle()),L.LayerGroup.prototype.addLayer.call(this,this.circleEntity)},initializeAxis(){if(this.axisEntity.forEach(t=>t.remove()),!this.options.axis.show)return;const t=this.circleEntity.getBounds();this.axisEntity[0]=L.polyline([[t._northEast.lat,this.latLng.lng],[t._southWest.lat,this.latLng.lng]],{weight:1,color:this.options.axis.color}),L.LayerGroup.prototype.addLayer.call(this,this.axisEntity[0]),this.axisEntity[1]=L.polyline([[this.latLng.lat,t._northEast.lng],[this.latLng.lat,t._southWest.lng]],{weight:1,color:this.options.axis.color}),L.LayerGroup.prototype.addLayer.call(this,this.axisEntity[1])},initializeScale(){if(this.scaleCircleEntity.forEach(t=>t.remove()),this.labelCircleEntity.forEach(t=>t.remove()),this.options.scale.show)for(let t=1,i=this.options.scale.splitNum;t<=i;t++){const n=this.options.radius*t/i;if(n){const i=this.scaleCircleEntity[t-1]=L.circle(this.latLng,n,{color:this.options.scale.lineColor,weight:1,fill:!1,renderer:L.canvas()});L.LayerGroup.prototype.addLayer.call(this,i);const s=i.getBounds(),o=this.labelCircleEntity[t-1]=new L.Text(L.latLng(this.latLng.lat,s.getEast()),e.MathUtil.formatLength(n),{color:this.options.scale.labelColor,offset:[24,16],minZoom:this.options.scale.minZoom,maxZoom:this.options.scale.maxZoom,minificationScale:1});L.LayerGroup.prototype.addLayer.call(this,o)}}},initializeMaterial(){var t;if(null==(t=this.materialEntity)||t.remove(),this.stopMotion(),this.options.material.show){switch(this.options.material.type){case ln.Wave:this.materialEntity=new rn(this.latLng,{...this.getMaterialStyle(),gradient:!0,_currentRadius:0}),this._motionWave();break;case ln.Scan:this.materialEntity=new rn(this.latLng,{...this.getMaterialStyle(),_currentAngle:0,scaleSpeed:this.options.material.speed}),this._motionScan();break;case ln.Breath:this.counter=this.createCounter(0,100,this.options.material.speed),this.materialEntity=new rn(this.latLng,{...this.getMaterialStyle(),gradient:!0,_currentOpacity:0}),this._motionBreath()}this.materialEntity&&L.LayerGroup.prototype.addLayer.call(this,this.materialEntity)}},getMaterialStyle(){return{fillColor:this.options.material.color,weight:0,radius:this.options.radius,scaleAngle:this.options.material.angle,renderer:this.labelTextCollision,angle:360,startAngle:0,endAngle:360,type:this.options.material.type}},getCircleStyle(){return{radius:this.options.radius,weight:1,color:this.options.color,fill:!!this.options.fillColor,fillColor:this.options.fillColor,renderer:L.canvas()}},_motionScan(){this.materialEntity.setStyle(this.getMaterialStyle()),this.animation=L.Util.requestAnimFrame(()=>{this._motionScan()},this)},_motionWave(){this.materialEntity.options._currentRadius+=this.options.material.speed,this.materialEntity.options._currentRadius>this.options.radius&&(this.materialEntity.options._currentRadius=0),this.materialEntity.setRadius(this.materialEntity.options._currentRadius),this.animation=L.Util.requestAnimFrame(()=>{this._motionWave()},this)},_motionBreath(){const t=this.counter.next()/100;1===t?this.counter.setMode(!1):0===t&&this.counter.setMode(!0),this.materialEntity.setStyle({fillOpacity:t}),this.animation=L.Util.requestAnimFrame(()=>{this._motionBreath()},this)},stopMotion(){L.Util.cancelAnimFrame(this.animation)},setStyle(t={}){e.ObjectUtil.deepAssign(this.options,t),this.circleEntity.setStyle(this.getCircleStyle()),this.initializeAxis(),this.initializeScale(),this.initializeMaterial()},createCounter(t=5,e=30,i=1){let n=t;return{mode:!0,next(){return this.mode&&n<=e?n+=i:!this.mode&&n>=t&&(n-=i),n},setMode(t){this.mode=t}}}});cn.CircleMaterialType=ln;const un={TWO_PI:2*Math.PI,HALF_PI:Math.PI/2,FITTING_COUNT:100,ZERO_TOLERANCE:1e-4},pn=function(t){return L.Projection.Mercator.project(t)},dn=function(t){return L.Projection.Mercator.unproject(L.point(t))},_n=function(t){const e=[];for(let i=0;i<t.length;i++){const n=dn(t[i]);e.push(n)}return e},mn=function(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))},gn=function(t,e){let i;const n=Math.asin(Math.abs(e[1]-t[1])/mn(t,e));return e[1]>=t[1]&&e[0]>=t[0]?i=n+Math.PI:e[1]>=t[1]&&e[0]<t[0]?i=un.TWO_PI-n:e[1]<t[1]&&e[0]<t[0]?i=n:e[1]<t[1]&&e[0]>=t[0]&&(i=Math.PI-n),i},fn=function(t,e,i,n,s){const o=gn(t,e),a=s?o+i:o-i,r=n*Math.cos(a),h=n*Math.sin(a);return[e[0]+r,e[1]+h]},yn=function(t){let e=0;for(let i=0;i<t.length-1;i++)e+=mn(t[i],t[i+1]);return e},An=function(t){return Math.pow(yn(t),.99)},vn=function(t,e,i){return(i[1]-t[1])*(e[0]-t[0])>(e[1]-t[1])*(i[0]-t[0])},Mn=function(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]},Ln=function(t){if(t.length<=2)return t;const e=[],i=t.length-2-1;e.push(t[0]);for(let n=0;n<=i;n++)for(let i=0;i<=1;i+=.05){let s=0,o=0;for(let e=0;e<=2;e++){const a=xn(e,i);s+=a*t[n+e][0],o+=a*t[n+e][1]}e.push([s,o])}return e.push(t[t.length-1]),e},xn=function(t,e){return 0==t?Math.pow(e-1,2)/2:1==t?(-2*Math.pow(e,2)+2*e+1)/2:2==t?Math.pow(e,2)/2:0},bn=function(t,e,i){const n=gn(e,t)-gn(e,i);return n<0?n+un.TWO_PI:n},wn=function(t){if(t.length<=2)return t;const e=[],i=t.length-1;for(let n=0;n<=1;n+=.01){let s=0,o=0;for(let e=0;e<=i;e++){const a=Pn(i,e),r=Math.pow(n,e),h=Math.pow(1-n,i-e);s+=a*r*h*t[e][0],o+=a*r*h*t[e][1]}e.push([s,o])}return e.push(t[i]),e},Pn=function(t,e){return kn(t)/(kn(e)*kn(t-e))},kn=function(t){if(t<=1)return 1;if(2===t)return 2;if(3===t)return 6;if(4===t)return 24;if(5===t)return 120;let e=1;for(let i=1;i<=t;i++)e*=i;return e},En=function(t,e,i,n){const s=Cn(e,i,n),o=Math.sqrt(s[0]*s[0]+s[1]*s[1]),a=s[0]/o,r=s[1]/o,h=mn(e,i),l=mn(i,n);if(o>un.ZERO_TOLERANCE)if(vn(e,i,n)){var c=t*h,u=i[0]-c*r,p=i[1]+c*a,d=[u,p];c=t*l;var _=[u=i[0]+c*r,p=i[1]-c*a]}else c=t*h,d=[u=i[0]+c*r,p=i[1]-c*a],c=t*l,_=[u=i[0]-c*r,p=i[1]+c*a];else d=[u=i[0]+t*(e[0]-i[0]),p=i[1]+t*(e[1]-i[1])],_=[u=i[0]+t*(n[0]-i[0]),p=i[1]+t*(n[1]-i[1])];return[d,_]},Cn=function(t,e,i){let n=t[0]-e[0],s=t[1]-e[1];const o=Math.sqrt(n*n+s*s);n/=o,s/=o;let a=i[0]-e[0],r=i[1]-e[1];const h=Math.sqrt(a*a+r*r);a/=h,r/=h;return[n+a,s+r]},Sn=function(t,e,i,n,s){const o=1-(t=Math.max(Math.min(t,1),0)),a=t*t,r=a*t,h=o*o,l=h*o;return[l*e[0]+3*h*t*i[0]+3*o*a*n[0]+r*s[0],l*e[1]+3*h*t*i[1]+3*o*a*n[1]+r*s[1]]},Tn=u.Handler.extend({style:{color:"#f00",weight:2},addHooks(){this._map.on("mousemove",this._mouseMove,this),this._map.on("click",this._mouseClick,this),this._map.on("dblclick",this._mouseDblClick,this)},removeHooks(){this._map.off("mousemove",this._mouseMove,this),this._map.off("click",this._mouseClick,this),this._map.off("dblclick",this._mouseDblClick,this)},_mouseMove(t){this.tooltip.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.plotShape.setPoints([...this.latlngs,t.latlng])},_mouseClick(t){this.latlngs=[...this.latlngs.filter(e=>e.lng!==t.latlng.lng&&e.lat!==t.latlng.lat),t.latlng],[On.ASSAULT_DIRECTION,On.FINE_ARROW].includes(this.type)?(this.tooltip.setContent("双击完成绘制形状"),this._map.off("click",this._mouseClick,this)):this.tooltip.setContent("点击继续绘制形状,双击完成绘制形状")},_mouseDblClick(t){this.latlngs=[...this.latlngs.filter(e=>e.lng!==t.latlng.lng&&e.lat!==t.latlng.lat),t.latlng],this.plotShape.setPoints(this.latlngs),this.disable(),this.finishedCallback&&this.finishedCallback(this.plotShape)},enable(t,e){var i,n;this.type=t,this.finishedCallback=e,this.latlngs=[],this.graphicLayer=L.featureGroup([]).addTo(this._map),this.plotShape=In(t,[],this.style).addTo(this.graphicLayer),null==(n=(i=this._map).setCursor)||n.call(i,"draw"),this.tooltip=L.tooltip().setContent("点击开始绘制形状"),L.Handler.prototype.enable.call(this)},disable(){this.type=void 0,this._map._container.style.cursor="default",this.latlngs=[],this.tooltip&&this._map.closeTooltip(this.tooltip),L.Handler.prototype.disable.call(this)}});u.Map.addInitHook("addHandler","plotDrawHandler",Tn);const On={STRAIGHT_ARROW:"straightarrow",ASSAULT_DIRECTION:"assaultdirection",ATTACK_ARROW:"attackarrow",TAILED_ATTACK_ARROW:"tailedattackarrow",SQUAD_COMBAT:"squadcombat",TAILED_SQUAD_COMBAT:"tailedsquadcombat",FINE_ARROW:"finearrow",DOUBLE_ARROW:"doublearrow",GATHERING_PLACE:"gatheringplace"},Bn=Tn,Dn={isPlot:()=>!0,getBaseType(){let t=this.toGeoJSON().geometry.type;return"MultiLineString"!==t&&"LineString"!==t||(t="Polyline"),t},setPoints(t=[]){this._bounds=new L.LatLngBounds,this._setLatLngs([]),this._points=this._convertLatLngs(t)||[],this._proPoints=function(t){const e=[];for(let i=0;i<t.length;i++){const n=pn(t[i]);e.push([n.x,n.y])}return e}(this._points),this.getPointCount()>=1&&this.generate()},setProPoints(t){const e=_n(t);this.setPoints(e)},getCtrlPoints(){let t=[];switch(this.type){case On.SECTOR:case On.ARC:t=this.getPoints(),t.length<3&&(t=this._ctrlPnts);break;case On.CIRCLE:t=this.getPoints(),t.length<2&&(t=this._ctrlPnts);break;default:t=this.getPoints()}return t},getPoints(){return this._points},getProPoints(){return this._proPoints},getPointCount(){return this._proPoints.length||0},toPlotJSON(){return{type:this.type,points:this.getPoints(),options:this.options}},finishDrawing(){}},In=function(t,e,i){switch(t){case On.GATHERING_PLACE:return new Rn(e,i);case On.STRAIGHT_ARROW:return new zn(e,i);case On.ASSAULT_DIRECTION:return new Nn(e,i);case On.ATTACK_ARROW:return new jn(e,i);case On.FINE_ARROW:return new Gn(e,i);case On.DOUBLE_ARROW:return new Hn(e,i);case On.TAILED_ATTACK_ARROW:return new Fn(e,i);case On.SQUAD_COMBAT:return new Un(e,i);case On.TAILED_SQUAD_COMBAT:return new Zn(e,i)}return null},Rn=L.Polygon.extend({includes:Dn,options:{t:.4,fixPointCount:3},initialize(t,e){L.setOptions(this,e),this.type=On.GATHERING_PLACE,this.setPoints(t)},generate(){let t=this._proPoints.concat([]);if(t.length<2)return void this._setLatLngs([]);if(2===this.getPointCount()){const e=Mn(t[0],t[1]),i=mn(t[0],e)/.9,n=fn(t[0],e,un.HALF_PI,i,!0);t=[t[0],n,t[1]]}const e=Mn(t[0],t[2]);t.push(e,t[0],t[1]);let i=[];for(let o=0;o<t.length-2;o++){const e=t[o],n=t[o+1],s=t[o+2],a=En(this.options.t,e,n,s);i=i.concat(a)}const n=i.length;i=[i[n-1]].concat(i.slice(0,n-1));const s=[];for(let o=0;o<t.length-2;o++){const e=t[o],n=t[o+1];s.push(e);for(let t=0;t<=un.FITTING_COUNT;t++){const a=Sn(t/un.FITTING_COUNT,e,i[2*o],i[2*o+1],n);s.push(a)}s.push(n)}this._setLatLngs([_n(s)]),this.redraw()}}),zn=L.Polygon.extend({includes:Dn,options:{fixPointCount:2,maxArrowLength:3e6,arrowLengthScale:8,fillOpacity:1},initialize(t,e){L.setOptions(this,e),this.type=On.STRAIGHT_ARROW,this.setPoints(t)},generate(){if(this.getPointCount()<2)return;const t=this._proPoints,e=t[t.length-2],i=t[t.length-1],n=t.slice(0,-2);let s=mn(e,i)/this.options.arrowLengthScale;s=s>this.options.maxArrowLength?this.options.maxArrowLength:s;const o=fn(e,i,Math.PI/8,s,!1),a=fn(e,i,Math.PI/8,s,!0),r=Mn(o,a),h=[...n,e,r,o,i,a,r,e,...n.reverse()];this._setLatLngs(_n(h)),this.redraw()}}),Gn=L.Polygon.extend({includes:Dn,options:{tailWidthFactor:.15,neckWidthFactor:.2,headWidthFactor:.25,headAngle:Math.PI/8.5,neckAngle:Math.PI/13,fixPointCount:2},initialize(t,e){L.setOptions(this,e),this.type=On.FINE_ARROW,this.setPoints(t)},generate(){if(this.getPointCount()<2)return void this._setLatLngs([]);const t=this._proPoints,e=t[0],i=t[1],n=An(t),s=n*this.options.tailWidthFactor,o=n*this.options.neckWidthFactor,a=n*this.options.headWidthFactor,r=fn(i,e,un.HALF_PI,s,!0),h=fn(i,e,un.HALF_PI,s,!1),l=fn(e,i,this.options.headAngle,a,!1),c=fn(e,i,this.options.headAngle,a,!0),u=[r,fn(e,i,this.options.neckAngle,o,!1),l,i,c,fn(e,i,this.options.neckAngle,o,!0),h];this._setLatLngs([_n(u)]),this.redraw()}}),Nn=Gn.extend({options:{tailWidthFactor:.2,neckWidthFactor:.25,headWidthFactor:.3,headAngle:Math.PI/4,neckAngle:.17741*Math.PI,fixPointCount:2},initialize(t,e){L.setOptions(this,e),this.type=On.ASSAULT_DIRECTION,this.setPoints(t)}}),jn=L.Polygon.extend({includes:Dn,options:{headHeightFactor:.18,headWidthFactor:.3,neckHeightFactor:.85,neckWidthFactor:.15,headTailFactor:.8},initialize(t,e){L.setOptions(this,e),this.type=On.ATTACK_ARROW,this.setPoints(t)},generate(){if(this.getPointCount()<2)return void this._setLatLngs([]);if(2===this.getPointCount())return this._setLatLngs(this._points),void this.redraw();const t=this._proPoints;let e=t[0],i=t[1];vn(t[0],t[1],t[2])&&(e=t[1],i=t[0]);const n=[Mn(e,i)].concat(t.slice(2)),s=this.getArrowHeadPoints(n,e,i),o=s[0],a=s[4],r=mn(e,i)/An(n),h=this.getArrowBodyPoints(n,o,a,r),l=h.length;let c=[e].concat(h.slice(0,l/2));c.push(o);let u=[i].concat(h.slice(l/2,l));u.push(a),c=Ln(c),u=Ln(u);const p=c.concat(s,u.reverse());this._setLatLngs([_n(p)]),this.redraw()},getArrowHeadPoints(t,e,i){let n=An(t),s=n*this.options.headHeightFactor;const o=t[t.length-1];n=mn(o,t[t.length-2]);const a=mn(e,i);s>a*this.options.headTailFactor&&(s=a*this.options.headTailFactor);const r=s*this.options.headWidthFactor,h=s*this.options.neckWidthFactor;s=s>n?n:s;const l=s*this.options.neckHeightFactor,c=fn(t[t.length-2],o,0,s,!0),u=fn(t[t.length-2],o,0,l,!0),p=fn(o,c,un.HALF_PI,r,!1),d=fn(o,c,un.HALF_PI,r,!0);return[fn(o,u,un.HALF_PI,h,!1),p,o,d,fn(o,u,un.HALF_PI,h,!0)]},getArrowBodyPoints(t,e,i,n){const s=yn(t),o=An(t)*n,a=(o-mn(e,i))/2;let r=0;const h=[],l=[];for(let c=1;c<t.length-1;c++){const e=bn(t[c-1],t[c],t[c+1])/2;r+=mn(t[c-1],t[c]);const i=(o/2-r/s*a)/Math.sin(e),n=fn(t[c-1],t[c],Math.PI-e,i,!0),u=fn(t[c-1],t[c],e,i,!1);h.push(n),l.push(u)}return h.concat(l)}}),Fn=jn.extend({options:{tailWidthFactor:.1,swallowTailFactor:1},initialize(t,e){L.setOptions(this,e),this.type=On.TAILED_ATTACK_ARROW,this.swallowTailPnt=null,this.setPoints(t)},generate(){if(this.getPointCount()<2)return void this._setLatLngs([]);if(2===this.getPointCount())return this._setLatLngs(this._points),void this.redraw();const t=this._proPoints;let e=t[0],i=t[1];vn(t[0],t[1],t[2])&&(e=t[1],i=t[0]);const n=[Mn(e,i)].concat(t.slice(2)),s=this.getArrowHeadPoints(n,e,i),o=s[0],a=s[4],r=mn(e,i),h=An(n),l=h*this.options.tailWidthFactor*this.options.swallowTailFactor;this.swallowTailPnt=fn(n[1],n[0],0,l,!0);const c=r/h,u=this.getArrowBodyPoints(n,o,a,c),p=u.length;let d=[e].concat(u.slice(0,p/2));d.push(o);let _=[i].concat(u.slice(p/2,p));_.push(a),d=Ln(d),_=Ln(_);const m=d.concat(s,_.reverse(),[this.swallowTailPnt,d[0]]);this._setLatLngs([_n(m)]),this.redraw()}}),Un=jn.extend({options:{tailWidthFactor:.1},initialize(t,e){L.setOptions(this,e),this.type=On.SQUAD_COMBAT,this.setPoints(t)},generate(){if(this.getPointCount()<2)return void this._setLatLngs([]);const t=this._proPoints,e=this.getTailPoints(t),i=this.getArrowHeadPoints(t,e[0],e[1]),n=i[0],s=i[4],o=this.getArrowBodyPoints(t,n,s,this.options.tailWidthFactor),a=o.length;let r=[e[0]].concat(o.slice(0,a/2));r.push(n);let h=[e[1]].concat(o.slice(a/2,a));h.push(s),r=Ln(r),h=Ln(h);const l=r.concat(i,h.reverse());this._setLatLngs([_n(l)]),this.redraw()},getTailPoints(t){const e=An(t)*this.options.tailWidthFactor;return[fn(t[1],t[0],un.HALF_PI,e,!1),fn(t[1],t[0],un.HALF_PI,e,!0)]}}),Zn=jn.extend({options:{tailWidthFactor:.1,swallowTailFactor:1},initialize(t,e){L.setOptions(this,e),this.type=On.TAILED_SQUAD_COMBAT,this.setPoints(t)},generate(){if(this.getPointCount()<2)return void this._setLatLngs([]);const t=this._proPoints,e=this.getTailPoints(t),i=this.getArrowHeadPoints(t,e[0],e[2]),n=i[0],s=i[4],o=this.getArrowBodyPoints(t,n,s,this.options.tailWidthFactor),a=o.length;let r=[e[0]].concat(o.slice(0,a/2));r.push(n);let h=[e[2]].concat(o.slice(a/2,a));h.push(s),r=Ln(r),h=Ln(h);const l=r.concat(i,h.reverse(),[e[1],r[0]]);this._setLatLngs([_n(l)]),this.redraw()},getTailPoints(t){const e=An(t)*this.options.tailWidthFactor,i=fn(t[1],t[0],un.HALF_PI,e,!1),n=fn(t[1],t[0],un.HALF_PI,e,!0),s=e*this.options.swallowTailFactor;return[i,fn(t[1],t[0],0,s,!0),n]}}),Hn=L.Polygon.extend({includes:Dn,options:{headHeightFactor:.25,headWidthFactor:.3,neckHeightFactor:.85,neckWidthFactor:.15,fixPointCount:4},initialize(t,e){L.setOptions(this,e),this.type=On.DOUBLE_ARROW,this.connPoint=null,this.tempPoint4=null,this.setPoints(t)},finishDrawing(){3===this.getPointCount()&&null!=this.tempPoint4&&this._proPoints.push(this.tempPoint4),null!=this.connPoint&&this._proPoints.push(this.connPoint)},generate(){const t=this.getPointCount();if(t<2)return void this._setLatLngs([]);if(2===t)return this._setLatLngs(this._points),void this.redraw();const e=this._proPoints[0],i=this._proPoints[1],n=this._proPoints[2];let s,o;this.tempPoint4=3===t?this.getTempPoint4(e,i,n):this._proPoints[3],this.connPoint=3===t||4===t?Mn(e,i):this._proPoints[4],vn(e,i,n)?(s=this.getArrowPoints(e,this.connPoint,this.tempPoint4,!1),o=this.getArrowPoints(this.connPoint,i,n,!0)):(s=this.getArrowPoints(i,this.connPoint,n,!1),o=this.getArrowPoints(this.connPoint,e,this.tempPoint4,!0));const a=s.length,r=(a-5)/2,h=s.slice(0,r),l=s.slice(r,r+5);let c=s.slice(r+5,a),u=o.slice(0,r);const p=o.slice(r,r+5),d=o.slice(r+5,a);u=wn(u);const _=wn(d.concat(h.slice(1)));c=wn(c);const m=u.concat(p,_,l,c);this._setLatLngs([_n(m)]),this.redraw()},getArrowPoints(t,e,i,n){const s=Mn(t,e),o=mn(s,i);let a=fn(i,s,0,.3*o,!0),r=fn(i,s,0,.5*o,!0);a=fn(s,a,un.HALF_PI,o/5,n),r=fn(s,r,un.HALF_PI,o/4,n);const h=[s,a,r,i],l=this.getArrowHeadPoints(h,this.options.headHeightFactor,this.options.headWidthFactor,this.options.neckHeightFactor,this.options.neckWidthFactor),c=l[0],u=l[4],p=mn(t,e)/An(h)/2,d=this.getArrowBodyPoints(h,c,u,p),_=d.length;let m=d.slice(0,_/2),g=d.slice(_/2,_);return m.push(c),g.push(u),m=m.reverse(),m.push(e),g=g.reverse(),g.push(t),m.reverse().concat(l,g)},getArrowHeadPoints(t,e,i){const n=An(t)*this.options.headHeightFactor,s=t[t.length-1];mn(e,i);const o=n*this.options.headWidthFactor,a=n*this.options.neckWidthFactor,r=n*this.options.neckHeightFactor,h=fn(t[t.length-2],s,0,n,!0),l=fn(t[t.length-2],s,0,r,!0),c=fn(s,h,un.HALF_PI,o,!1),u=fn(s,h,un.HALF_PI,o,!0);return[fn(s,l,un.HALF_PI,a,!1),c,s,u,fn(s,l,un.HALF_PI,a,!0)]},getArrowBodyPoints(t,e,i,n){const s=yn(t),o=An(t)*n,a=(o-mn(e,i))/2;let r=0;const h=[],l=[];for(let c=1;c<t.length-1;c++){const e=bn(t[c-1],t[c],t[c+1])/2;r+=mn(t[c-1],t[c]);const i=(o/2-r/s*a)/Math.sin(e),n=fn(t[c-1],t[c],Math.PI-e,i,!0),u=fn(t[c-1],t[c],e,i,!1);h.push(n),l.push(u)}return h.concat(l)},getTempPoint4(t,e,i){const n=Mn(t,e),s=mn(n,i),o=bn(t,n,i);let a,r,h,l;return o<un.HALF_PI?(r=s*Math.sin(o),h=s*Math.cos(o),l=fn(t,n,un.HALF_PI,r,!1),a=fn(n,l,un.HALF_PI,h,!0)):o>=un.HALF_PI&&o<Math.PI?(r=s*Math.sin(Math.PI-o),h=s*Math.cos(Math.PI-o),l=fn(t,n,un.HALF_PI,r,!1),a=fn(n,l,un.HALF_PI,h,!1)):o>=Math.PI&&o<1.5*Math.PI?(r=s*Math.sin(o-Math.PI),h=s*Math.cos(o-Math.PI),l=fn(t,n,un.HALF_PI,r,!0),a=fn(n,l,un.HALF_PI,h,!0)):(r=s*Math.sin(2*Math.PI-o),h=s*Math.cos(2*Math.PI-o),l=fn(t,n,un.HALF_PI,r,!0),a=fn(n,l,un.HALF_PI,h,!1)),a}}),qn=Object.freeze(Object.defineProperty({__proto__:null,AssaultDirection:Nn,AttackArrow:jn,DoubleArrow:Hn,Draw:Bn,FineArrow:Gn,GatheringPlace:Rn,PlotTypes:On,SquadCombat:Un,StraightArrow:zn,TailedAttackArrow:Fn,TailedSquadCombat:Zn,createPlot:In},Symbol.toStringTag,{value:"Module"})),Vn=u.Marker.extend({options:{fontSize:"12px",color:"#f00",fontShadowColor:"none",fontWeight:"normal",background:"rgba(0, 0, 0, 0)",minZoom:void 0,maxZoom:void 0,minificationScale:1,clsName:"leaflet-text",offset:[6,6]},initialize(t,i,n={}){this._latlng=t,this._enabled=!1,this.options.id=n.id||"text_"+e.Util.guid(),this.options.text=i||"",n=Object.assign(this.options,n),u.setOptions(this,n);const{id:s,fontSize:o,color:a,fontWeight:r,background:h,fontShadowColor:l,clsName:c,offset:p}=this.options;this.options.icon=new u.DivIcon({html:`<span id=${s} class="leaflet-text-label" style="font-weight:${r};font-size:${o};color:${a};background:${h};text-shadow:${l} 1px 0px 2px">${i||""}</span>`,className:c,iconAnchor:p}),u.Marker.prototype.initialize.call(this,t,this.options)},setStyle(t){const e=document.getElementById(this.options.id),{text:i,color:n,fontSize:s,fontShadowColor:o,fontWeight:a}=t,r=t.background||"none";return e&&(n&&(this.options.color=n,e.style.color=n),a&&(this.options.fontWeight=a,e.style.fontWeight=a),s&&(this.options.fontSize=s,e.style.fontSize=s),this.options.background=r,e.style.background=r,i&&(this.options.text=i,e.textContent=i),o?(this.options.fontShadowColor=o,e.style["text-shadow"]=o+" 1px 0px 2px"):(this.options.fontShadowColor="none",e.style["text-shadow"]="none")),this},enableEdit(t){const{fontSize:e,color:i,text:n}=this.options;if(!this._enabled){this._enabled=!0;const s=new u.DivIcon({html:`<input type="text" id="text-input-icon" style="font-size:${e};color:${i};" value=${n}></input>`,className:"leaflet-text"});return this.setIcon(s),document.getElementById("text-input-icon").onblur=e=>{this.options.text=e.target.value,setTimeout(()=>{this.disableEdit(),this.fire("edit",this),t&&t(this)},100)},document.getElementById("text-input-icon").onkeydown=function(t){t.stopPropagation(),13===t.keyCode&&(this.options.text=t.target.value,this.blur(t))},this}},disableEdit(t){if(this._enabled){this._enabled=!1;const{id:e,color:i,fontSize:n,fontWeight:s,fontShadowColor:o}=this.options,a=new u.DivIcon({html:`<span id=${e} style="padding:2px 4px;white-space:nowrap;font-weight:${s};font-size:${n};color:${i};text-shadow:${o} 1px 2px 3px">${this.options.text}</span>`,className:"leaflet-text"});return this.setIcon(a),t&&t(this),this}}}),Wn=u.Marker.extend({options:{color:"#f00",diveColor:"#f00",iconSize:[14,14],level:0,speedTime:2,animation:!0},initialize(t,i){u.setOptions(this,i);const{clsPrefix:n}=this.options;this.tempDivEle=document.createElement("div"),this.spanEl=e.DomUtil.create("span",`${n}-pulse-icon`),this.aEl=e.DomUtil.create("a",`${n}-dive-icon`),this.tempDivEle.append(this.spanEl),this.spanEl.append(this.aEl),this._init(),u.Marker.prototype.initialize.call(this,t,this.options)},_init(){const{color:t,iconSize:e,diveColor:i,level:n,speedTime:s,animation:o,clsPrefix:a}=this.options;t&&(this.spanEl.style.backgroundColor=t,i||(this.aEl.style.boxShadow="0 0 6px 2px "+t)),e&&(this.spanEl.style.width=e[0]+"px",this.spanEl.style.height=e[1]+"px"),o&&s?(this.aEl.style.setProperty("animation","pulsate "+s+"s infinite"),n?i?this.aEl.style.boxShadow="0 0 "+3*n+"px "+n+"px "+i:t&&(this.aEl.style.boxShadow="0 0 "+3*n+"px "+n+"px "+t):i&&(this.aEl.style.boxShadow=n?"0 0 "+3*n+"px "+n+"px "+i:"0 0 6px 2px "+i)):(this.aEl.style.removeProperty("animation"),this.aEl.style.removeProperty("box-shadow"));const r=L.divIcon({iconSize:e,iconAnchor:e.map(t=>t/2),className:`${a}-blink-marker`,html:this.tempDivEle.innerHTML});this.options.icon?this.setIcon(r):this.options.icon=r},setOptions(t){u.setOptions(this,t),this._init()},start(t){u.setOptions(this,t),this.options.animation=!0,this._init()},stop(t){u.setOptions(this,t),this.options.animation=!1,this._init()}}),Kn=u.Layer.extend({initialize:function(t){L.setOptions(this,t),this._onClickListeners=[],this._onHoverListeners=[]},setOptions:function(t){return L.setOptions(this,t),this.redraw()},redraw:function(){this._redraw(!0)},addMarkers:function(t){var e=this,i=[],n=[];t.forEach(function(t){if("markerPane"==t.options.pane&&t.options.icon){var s=t.getLatLng(),o=e._map.getBounds().contains(s),a=e._addMarker(t,s,o);!0===o&&i.push(a[0]),n.push(a[1])}}),e._markers.load(i),e._latlngMarkers.load(n)},addMarker:function(t){var e=this,i=t.getLatLng(),n=e._map.getBounds().contains(i),s=e._addMarker(t,i,n);!0===n&&e._markers.insert(s[0]),e._latlngMarkers.insert(s[1])},addLayer:function(t){"markerPane"==t.options.pane&&t.options.icon&&this.addMarker(t)},addLayers:function(t){this.addMarkers(t)},removeLayer:function(t){this.removeMarker(t,!0)},removeMarker:function(t,e){var i=this;t.minX&&(t=t.data);var n=t.getLatLng(),s=i._map.getBounds().contains(n),o={minX:n.lng,minY:n.lat,maxX:n.lng,maxY:n.lat,data:t};i._latlngMarkers.remove(o,function(t,e){return t.data._leaflet_id===e.data._leaflet_id}),i._latlngMarkers.total--,i._latlngMarkers.dirty++,!0===s&&!0===e&&i._redraw(!0)},onAdd:function(t){this._map=t,this._canvas||this._initCanvas(),this.options.pane?this.getPane().appendChild(this._canvas):t._panes.overlayPane.appendChild(this._canvas),t.on("moveend",this._reset,this),t.on("resize",this._reset,this),t.on("click",this._executeListeners,this),t.on("mousemove",this._executeListeners,this)},onRemove:function(t){this.options.pane?this.getPane().removeChild(this._canvas):t.getPanes().overlayPane.removeChild(this._canvas),t.off("click",this._executeListeners,this),t.off("mousemove",this._executeListeners,this),t.off("moveend",this._reset,this),t.off("resize",this._reset,this)},addTo:function(t){return t.addLayer(this),this},clearLayers:function(){this._latlngMarkers=null,this._markers=null,this._redraw(!0)},_addMarker:function(t,e,i){var n=this;t._map=n._map,n._markers||(n._markers=new rbush),n._latlngMarkers||(n._latlngMarkers=new rbush,n._latlngMarkers.dirty=0,n._latlngMarkers.total=0),L.Util.stamp(t);var s=n._map.latLngToContainerPoint(e),o=t.options.icon.options.iconSize,a=o[0]/2,r=o[1]/2,h=[{minX:s.x-a,minY:s.y-r,maxX:s.x+a,maxY:s.y+r,data:t},{minX:e.lng,minY:e.lat,maxX:e.lng,maxY:e.lat,data:t}];return n._latlngMarkers.dirty++,n._latlngMarkers.total++,!0===i&&n._drawMarker(t,s),h},_drawMarker:function(t,e){var i=this;this._imageLookup||(this._imageLookup={}),e||(e=i._map.latLngToContainerPoint(t.getLatLng()));var n=t.options.icon.options.iconUrl;if(t.canvas_img)i._drawImage(t,e);else if(i._imageLookup[n])t.canvas_img=i._imageLookup[n][0],!1===i._imageLookup[n][1]?i._imageLookup[n][2].push([t,e]):i._drawImage(t,e);else{var s=new Image;s.src=n,t.canvas_img=s,i._imageLookup[n]=[s,!1,[[t,e]]],s.onload=function(){i._imageLookup[n][1]=!0,i._imageLookup[n][2].forEach(function(t){i._drawImage(t[0],t[1])})}}},_drawImage:function(t,e){var i=t.options.icon.options;this._context.drawImage(t.canvas_img,e.x-i.iconAnchor[0],e.y-i.iconAnchor[1],i.iconSize[0],i.iconSize[1])},_reset:function(){var t=this._map.containerPointToLayerPoint([0,0]);L.DomUtil.setPosition(this._canvas,t);var e=this._map.getSize();this._canvas.width=e.x,this._canvas.height=e.y,this._redraw()},_redraw:function(t){var e=this;if(t&&this._context.clearRect(0,0,this._canvas.width,this._canvas.height),this._map&&this._latlngMarkers){var i=[];e._latlngMarkers.dirty/e._latlngMarkers.total>=.1&&(e._latlngMarkers.all().forEach(function(t){i.push(t)}),e._latlngMarkers.clear(),e._latlngMarkers.load(i),e._latlngMarkers.dirty=0,i=[]);var n=e._map.getBounds(),s={minX:n.getWest(),minY:n.getSouth(),maxX:n.getEast(),maxY:n.getNorth()};e._latlngMarkers.search(s).forEach(function(t){var n=e._map.latLngToContainerPoint(t.data.getLatLng()),s=t.data.options.icon.options.iconSize,o=s[0]/2,a=s[1]/2,r={minX:n.x-o,minY:n.y-a,maxX:n.x+o,maxY:n.y+a,data:t.data};i.push(r),e._drawMarker(t.data,n)}),this._markers.clear(),this._markers.load(i)}},_initCanvas:function(){this._canvas=L.DomUtil.create("canvas","leaflet-canvas-icon-layer leaflet-layer");var t=L.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);this._canvas.style[t]="50% 50%";var e=this._map.getSize();this._canvas.width=e.x,this._canvas.height=e.y,this._context=this._canvas.getContext("2d");var i=this._map.options.zoomAnimation&&L.Browser.any3d;L.DomUtil.addClass(this._canvas,"leaflet-zoom-"+(i?"animated":"hide"))},addOnClickListener:function(t){this._onClickListeners.push(t)},addOnHoverListener:function(t){this._onHoverListeners.push(t)},_executeListeners:function(t){if(this._markers){var e=this,i=t.containerPoint.x,n=t.containerPoint.y;e._openToolTip&&(e._openToolTip.closeTooltip(),delete e._openToolTip);var s=this._markers.search({minX:i,minY:n,maxX:i,maxY:n});if(s&&s.length>0){if(e._map._container.style.cursor="pointer","click"===t.type)s[0].data.getPopup()&&s[0].data.openPopup(),e._onClickListeners.forEach(function(e){e(t,s)});if("mousemove"===t.type)s[0].data.getTooltip()&&(e._openToolTip=s[0].data,s[0].data.openTooltip()),e._onHoverListeners.forEach(function(e){e(t,s)})}else e._map._container.style.cursor=""}}}),Xn=u.Layer.extend({provide:{TDT:"tdt",BAIDU:"bd",GAODE:"gd",YANDEX:"yandex"},source:{VECTOR:"vec",SATELITE:"img",ANNO:"cia",VEC_NO_ANNO:"vec_no_anno",SATELITE_NO_ANNO:"img_no_anno"},style:{NORMAL:"normal",GRAY:"gray",DARK:"dark",BROWN:"brown",BLUR:"blur"},options:{provide:"tdt",source:"img",style:"normal",accessToken:"016b31f15f25e1365e85aec7e7b0464e"},initialize(t){t=e.Util.deleteEmptyProperty(t),u.Util.setOptions(this,t)},onAdd(t){this.map=t,this.replaceProjection(),this.tileLayers=this.getLayerGroup(),t.addLayer(this.tileLayers)},onRemove(t){t.removeLayer(this.tileLayers)},replaceProjection(){const t=this.map.getCenter(),e=this.map.getZoom();this.options.provide===this.provide.BAIDU?this.map.options.crs=an:this.options.provide===this.provide.YANDEX?this.map.options.crs=u.CRS.EPSG3395:this.map.options.crs=u.CRS.EPSG3857,this._resetMapStatus(t,e)},_resetMapStatus(t,e){this.map.setView(t),this.map._resetView(t,e,!0)},getLayerGroup(){let t={},i={};switch(this.options.style&&this.options.style.split(",").forEach(e=>{switch(e){case this.style.DARK:t.invert=1;break;case this.style.GRAY:t.grayscale=1;break;case this.style.BROWN:t.sepia=1;break;case this.style.BLUR:t.blur="1px"}}),this.options.provide){case this.provide.TDT:i={subdomains:e.ArrayUtil.create(8),maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.BAIDU:i={subdomains:e.ArrayUtil.create(10),tms:!0,corrdType:"bd09",maxNativeZoom:19,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.GAODE:i={subdomains:e.ArrayUtil.create(4).map(t=>t+1),corrdType:"gcj02",maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.YANDEX:i={maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()}}if(this.options.opacity>=0&&(t.opacity=this.options.opacity),this.options.url)return new u.TileLayer(this.options.url,{...i,style:t});switch(this.options.provide){case this.provide.TDT:let e;switch(i.maxNativeZoom=18,this.options.source){case this.source.VECTOR:e=["vec_w","cva_w"];break;case this.source.SATELITE:e=["img_w","cia_w"];break;case this.source.ANNO:e=["cva_w"];break;case this.source.VEC_NO_ANNO:e=["vec_w"];break;case this.source.SATELITE_NO_ANNO:e=["img_w"]}return new u.LayerGroup(e.map(e=>new u.TileLayer(`http://t{s}.tianditu.gov.cn/DataServer?T=${e}&x={x}&y={y}&l={z}&tk=${this.options.accessToken}`,{...i,style:t})));case this.provide.BAIDU:switch(this.options.source){case this.source.VECTOR:return i.maxNativeZoom=19,new u.TileLayer("http://online{s}.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles=pl&scaler=1&p=1",{...i,style:t});case this.source.ANNO:return i.maxNativeZoom=19,new u.TileLayer("http://online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl",{...i,style:t});case this.source.SATELITE:return i.maxNativeZoom=17,new u.LayerGroup([new u.TileLayer("http://shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",{...i,style:t}),new u.TileLayer("http://online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl",{...i,style:t})]);case this.source.SATELITE_NO_ANNO:return i.maxNativeZoom=19,new u.TileLayer("http://shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",{...i,style:t})}break;case this.provide.GAODE:switch(this.options.source){case this.source.VECTOR:return i.maxNativeZoom=18,new u.TileLayer("http://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...i,style:t});case this.source.ANNO:return i.maxNativeZoom=18,new u.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...i,style:t});case this.source.SATELITE:return i.maxNativeZoom=16,new u.LayerGroup([new u.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=6",{...i,style:t}),new u.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...i,style:t})]);case this.source.SATELITE_NO_ANNO:return i.maxNativeZoom=18,new u.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=6",{...i,style:t})}break;case this.provide.YANDEX:switch(this.options.source){case this.source.ANNO:return new u.TileLayer("https://core-renderer-tiles.maps.yandex.net/tiles?l=skl&v=24.05.19-0-b240515214430&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps&experimental_ranking_mode_name=default-web-ranking&experimental_data_hd=vegetation_model_exp",{...i,style:t});case this.source.SATELITE:return new u.LayerGroup([new u.TileLayer("https://sat{s}.maps.yandex.net/tiles?l=sat&v=3.1238.0&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps",{...i,subdomains:["01","02","03","04"],style:t}),new u.TileLayer("https://core-renderer-tiles.maps.yandex.net/tiles?l=skl&v=24.05.19-0-b240515214430&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps&experimental_ranking_mode_name=default-web-ranking&experimental_data_hd=vegetation_model_exp",{...i,style:t})]);case this.source.SATELITE_NO_ANNO:return new u.TileLayer("https://sat{s}.maps.yandex.net/tiles?l=sat&v=3.1238.0&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps",{...i,subdomains:["01","02","03","04"],style:t})}}},setOptions(t){u.Util.setOptions(this,t);const e=this.getLayerGroup();this.map.removeLayer(this.tileLayers),setTimeout(()=>{this.replaceProjection(),this.tileLayers=e.addTo(this.map)},500)}}),Yn=u.ImageOverlay.extend({initialize(t,e={},i=new u.Marker,n=new u.Marker){"string"==typeof t?this._url=t:this._rawImage=t,this.topRightMarker=i,this.bottomLeftMarker=n,this.angle=0,u.setOptions(this,e),this._topLeft=new u.LatLng(e.corners[0]),this._topRight=new u.LatLng(e.corners[1]),this._bottomLeft=new u.LatLng(e.corners[3]),i.on("drag dragend",this.reposition,this),n.on("drag dragend",this.reposition,this)},onAdd(t){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(u.DomUtil.addClass(this._rawImage,"leaflet-interactive"),this.addInteractiveTarget(this._rawImage)),t.on("zoomend resetview",this._reset,this),this.getPane().appendChild(this._image),this._reset()},onRemove(t){t.off("zoomend resetview",this._reset,this),u.ImageOverlay.prototype.onRemove.call(this,t)},_initImage(){let t=this._rawImage;this._url&&(t=u.DomUtil.create("img"),t.style.display="none",this.options.crossOrigin&&(t.crossOrigin=""),t.src=this._url,this._rawImage=t),u.DomUtil.addClass(t,"leaflet-image-layer");const e=this._image=u.DomUtil.create("div","leaflet-image-layer "+(this._zoomAnimated?"leaflet-zoom-animated":""));this._updateZIndex&&this._updateZIndex(),e.appendChild(t),e.onselectstart=u.Util.falseFn,e.onmousemove=u.Util.falseFn,t.onload=function(){this._reset(),t.style.display="block",this.options.w=this._rawImage.width,this.options.h=this._rawImage.height,this.boundsRectBottomLeft=new u.Point(0,0),this.boundsRectTopRight=new u.Point(this.options.w,this.options.h),this.diagonalVector=this.boundsRectTopRight.subtract(this.boundsRectBottomLeft),this.fire("load")}.bind(this),t.alt=this.options.alt},_reset(){const t=this._image,e=this._map.latLngToLayerPoint(this._topLeft),i=this._map.latLngToLayerPoint(this._topRight),n=this._map.latLngToLayerPoint(this._bottomLeft),s=i.subtract(e).add(n),o=new u.Bounds([e,i,n,s]),a=o.getSize(),r=e.subtract(o.min),h=i.subtract(e),l=n.subtract(e),c=Math.atan2(h.y,h.x),p=Math.atan2(l.x,l.y);this.angle=((Math.abs(c)+Math.abs(p))/2*180).toFixed(2),this._bounds=new u.LatLngBounds(this._map.layerPointToLatLng(o.min),this._map.layerPointToLatLng(o.max)),u.DomUtil.setPosition(t,o.min),t.pxBounds=o,t.style.width=a.x+"px",t.style.height=a.y+"px";const d=this._rawImage.width,_=this._rawImage.height;if(!d||!_)return;const m=e.distanceTo(i)/d*Math.cos(c),g=e.distanceTo(n)/_*Math.cos(p);this._rawImage.style.transformOrigin="0 0",this._rawImage.style.transform="translate("+r.x+"px, "+r.y+"px)skew("+p+"rad, "+c+"rad) scale("+m+", "+g+") "},_animateZoom(t){const e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;u.DomUtil.setTransform(this._image,i,e)},reposition(){const t=this.topRightMarker.getLatLng(),e=this.bottomLeftMarker.getLatLng(),i=this.options.w,n=this.options.h,s=this.getCornerLatLng(new u.Point(0,n),e,t),o=this.getCornerLatLng(new u.Point(i,n),e,t),a=this.getCornerLatLng(new u.Point(0,0),e,t),r=this.getCornerLatLng(new u.Point(i,0),e,t);this.options.corners=[s,o,r,a],this._topLeft=new u.LatLng(s),this._topRight=new u.LatLng(o),this._bottomLeft=new u.LatLng(a),this._reset()},getCornerLatLng(t,e,i){const n=this.boundsRectBottomLeft,s=this.diagonalVector,o=t.subtract(n),a=this.getClockWiseRotate90DegreePoint(s),r=this.getDotProduction(s,o)/this.getDotProduction(s,s),h=-this.getDotProduction(a,o)/this.getDotProduction(a,a),l=new u.Projection.SphericalMercator.project(e),c=new u.Projection.SphericalMercator.project(i),p=l.add(c.subtract(l).multiplyBy(r)),d=this.getClockWiseRotate90DegreePoint(l.subtract(c)).multiplyBy(h),_=p.add(d);return new u.Projection.SphericalMercator.unproject(_)},setUrl(t){return this._url=t,this._rawImage&&(this._rawImage.src=t),this},getDotProduction:(t,e)=>t.x*e.x+t.y*e.y,getClockWiseRotate90DegreePoint:t=>new u.Point([t.y,-t.x])});var $n={exports:{}};!function(t){!function(e,i,n){t.exports?t.exports=n():i.h337=n()}(0,s,function(){var t,e,i,n={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},s=(t=function(t){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=t.xField||t.defaultXField,this._yField=t.yField||t.defaultYField,this._valueField=t.valueField||t.defaultValueField,t.radius&&(this._cfgRadius=t.radius)},e=n.defaultRadius,t.prototype={_organiseData:function(t,i){var n=t[this._xField],s=t[this._yField],o=this._radi,a=this._data,r=this._max,h=this._min,l=t[this._valueField]||1,c=t.radius||this._cfgRadius||e;a[n]||(a[n]=[],o[n]=[]),a[n][s]?a[n][s]+=l:(a[n][s]=l,o[n][s]=c);var u=a[n][s];return u>r?(i?this.setDataMax(u):this._max=u,!1):u<h?(i?this.setDataMin(u):this._min=u,!1):{x:n,y:s,value:l,radius:c,min:h,max:r}},_unOrganizeData:function(){var t=[],e=this._data,i=this._radi;for(var n in e)for(var s in e[n])t.push({x:n,y:s,radius:i[n][s],value:e[n][s]});return{min:this._min,max:this._max,data:t}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var t=arguments[0],e=t.length;e--;)this.addData.call(this,t[e]);else{var i=this._organiseData(arguments[0],!0);i&&(0===this._data.length&&(this._min=this._max=i.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[i]}))}return this},setData:function(t){var e=t.data,i=e.length;this._data=[],this._radi=[];for(var n=0;n<i;n++)this._organiseData(e[n],!1);return this._max=t.max,this._min=t.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(t){return this._max=t,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(t){return this._min=t,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(t){this._coordinator=t},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},t),o=function(){var t=function(t){var e=t.gradient||t.defaultGradient,i=document.createElement("canvas"),n=i.getContext("2d");i.width=256,i.height=1;var s=n.createLinearGradient(0,0,256,1);for(var o in e)s.addColorStop(o,e[o]);return n.fillStyle=s,n.fillRect(0,0,256,1),n.getImageData(0,0,256,1).data},e=function(t,e){var i=document.createElement("canvas"),n=i.getContext("2d"),s=t,o=t;if(i.width=i.height=2*t,1==e)n.beginPath(),n.arc(s,o,t,0,2*Math.PI,!1),n.fillStyle="rgba(0,0,0,1)",n.fill();else{var a=n.createRadialGradient(s,o,t*e,s,o,t);a.addColorStop(0,"rgba(0,0,0,1)"),a.addColorStop(1,"rgba(0,0,0,0)"),n.fillStyle=a,n.fillRect(0,0,2*t,2*t)}return i};function i(e){var i=e.container,n=this.shadowCanvas=document.createElement("canvas"),s=this.canvas=e.canvas||document.createElement("canvas");this._renderBoundaries=[1e4,1e4,0,0];var o=getComputedStyle(e.container)||{};s.className="heatmap-canvas",this._width=s.width=n.width=e.width||+o.width.replace(/px/,""),this._height=s.height=n.height=e.height||+o.height.replace(/px/,""),this.shadowCtx=n.getContext("2d"),this.ctx=s.getContext("2d"),s.style.cssText=n.style.cssText="position:absolute;left:0;top:0;",i.style.position="relative",i.appendChild(s),this._palette=t(e),this._templates={},this._setStyles(e)}return i.prototype={renderPartial:function(t){t.data.length>0&&(this._drawAlpha(t),this._colorize())},renderAll:function(t){this._clear(),t.data.length>0&&(this._drawAlpha(function(t){for(var e=[],i=t.min,n=t.max,s=t.radi,o=(t=t.data,Object.keys(t)),a=o.length;a--;)for(var r=o[a],h=Object.keys(t[r]),l=h.length;l--;){var c=h[l],u=t[r][c],p=s[r][c];e.push({x:r,y:c,value:u,radius:p})}return{min:i,max:n,data:e}}(t)),this._colorize())},_updateGradient:function(e){this._palette=t(e)},updateConfig:function(t){t.gradient&&this._updateGradient(t),this._setStyles(t)},setDimensions:function(t,e){this._width=t,this._height=e,this.canvas.width=this.shadowCanvas.width=t,this.canvas.height=this.shadowCanvas.height=e},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(t){this._blur=0==t.blur?0:t.blur||t.defaultBlur,t.backgroundColor&&(this.canvas.style.backgroundColor=t.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=t.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=t.height||this._height,this._opacity=255*(t.opacity||0),this._maxOpacity=255*(t.maxOpacity||t.defaultMaxOpacity),this._minOpacity=255*(t.minOpacity||t.defaultMinOpacity),this._useGradientOpacity=!!t.useGradientOpacity},_drawAlpha:function(t){for(var i=this._min=t.min,n=this._max=t.max,s=(t=t.data||[]).length,o=1-this._blur;s--;){var a,r=t[s],h=r.x,l=r.y,c=r.radius,u=Math.min(r.value,n),p=h-c,d=l-c,_=this.shadowCtx;this._templates[c]?a=this._templates[c]:this._templates[c]=a=e(c,o);var m=(u-i)/(n-i);_.globalAlpha=m<.01?.01:m,_.drawImage(a,p,d),p<this._renderBoundaries[0]&&(this._renderBoundaries[0]=p),d<this._renderBoundaries[1]&&(this._renderBoundaries[1]=d),p+2*c>this._renderBoundaries[2]&&(this._renderBoundaries[2]=p+2*c),d+2*c>this._renderBoundaries[3]&&(this._renderBoundaries[3]=d+2*c)}},_colorize:function(){var t=this._renderBoundaries[0],e=this._renderBoundaries[1],i=this._renderBoundaries[2]-t,n=this._renderBoundaries[3]-e,s=this._width,o=this._height,a=this._opacity,r=this._maxOpacity,h=this._minOpacity,l=this._useGradientOpacity;t<0&&(t=0),e<0&&(e=0),t+i>s&&(i=s-t),e+n>o&&(n=o-e);for(var c=this.shadowCtx.getImageData(t,e,i,n),u=c.data,p=u.length,d=this._palette,_=3;_<p;_+=4){var m,g=u[_],f=4*g;if(f)m=a>0?a:g<r?g<h?h:g:r,u[_-3]=d[f],u[_-2]=d[f+1],u[_-1]=d[f+2],u[_]=l?d[f+3]:m}c.data=u,this.ctx.putImageData(c,t,e),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(t){var e=this.shadowCtx.getImageData(t.x,t.y,1,1).data[3],i=this._max,n=this._min;return Math.abs(i-n)*(e/255)|0},getDataURL:function(){return this.canvas.toDataURL()}},i}(),a=(i=!1,"canvas2d"===n.defaultRenderer&&(i=o),i),r=function(){for(var t={},e=arguments.length,i=0;i<e;i++){var n=arguments[i];for(var s in n)t[s]=n[s]}return t},h=function(){var t=function(){function t(){this.cStore={}}return t.prototype={on:function(t,e,i){var n=this.cStore;n[t]||(n[t]=[]),n[t].push(function(t){return e.call(i,t)})},emit:function(t,e){var i=this.cStore;if(i[t])for(var n=i[t].length,s=0;s<n;s++){(0,i[t][s])(e)}}},t}();function e(){var e,i,o,h,l=this._config=r(n,arguments[0]||{});if(this._coordinator=new t,l.plugin){var c=l.plugin;if(!n.plugins[c])throw new Error("Plugin '"+c+"' not found. Maybe it was not registered.");var u=n.plugins[c];this._renderer=new u.renderer(l),this._store=new u.store(l)}else this._renderer=new a(l),this._store=new s(l);i=(e=this)._renderer,o=e._coordinator,h=e._store,o.on("renderpartial",i.renderPartial,i),o.on("renderall",i.renderAll,i),o.on("extremachange",function(t){e._config.onExtremaChange&&e._config.onExtremaChange({min:t.min,max:t.max,gradient:e._config.gradient||e._config.defaultGradient})}),h.setCoordinator(o)}return e.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(t){return this._config=r(this._config,t),this._renderer.updateConfig(this._config),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(t){return this._store.getValueAt?this._store.getValueAt(t):this._renderer.getValueAt?this._renderer.getValueAt(t):null}},e}();return{create:function(t){return new h(t)},register:function(t,e){n.plugins[t]=e}}})}($n);const Jn=o($n.exports);var Qn=L.Layer.extend({initialize:function(t){this.cfg=t,this._el=L.DomUtil.create("div","leaflet-zoom-hide"),this._data=[],this._max=1,this._min=0,this.cfg.container=this._el},onAdd:function(t){var e=t.getSize();this._map=t,this._width=e.x,this._height=e.y,this._el.style.width=e.x+"px",this._el.style.height=e.y+"px",this._el.style.position="absolute",this._resetOrigin(),t.getPanes().overlayPane.appendChild(this._el),this._heatmap||(this._heatmap=Jn.create(this.cfg)),t.on("moveend",this._resetOrigin,this),this._draw()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._el),t.off("moveend",this._resetOrigin,this)},_draw:function(){if(this._map){var t=this._map.getPanes().mapPane._leaflet_pos;this._el.style[Qn.CSS_TRANSFORM]="translate("+-Math.round(t.x)+"px,"+-Math.round(t.y)+"px)",this._update()}},_update:function(){var t,e,i,n={max:this._max,min:this._min,data:[]};if(t=this._map.getBounds(),e=this._map.getZoom(),i=Math.pow(2,e),0!=this._data.length){for(var s=[],o=this.cfg.scaleRadius?i:1,a=0,r=0,h=this.cfg.valueField,l=this._data.length;l--;){var c=this._data[l],u=c[h],p=c.latlng;if(t.contains(p)){a=Math.max(u,a),r=Math.min(u,r);var d,_=this._map.latLngToContainerPoint(p),m={x:Math.round(_.x),y:Math.round(_.y)};m[h]=u,d=c.radius?c.radius*o:(this.cfg.radius||2)*o,m.radius=d,s.push(m)}}this.cfg.useLocalExtrema&&(n.max=a,n.min=r),n.data=s,this._heatmap.setData(n)}else this._heatmap&&this._heatmap.setData(n)},setData:function(t){this._max=t.max||this._max,this._min=t.min||this._min;for(var e=this.cfg.latField||"lat",i=this.cfg.lngField||"lng",n=this.cfg.valueField||"value",s=(t=t.data).length,o=[];s--;){var a=t[s],r={latlng:new L.LatLng(a[e],a[i])};r[n]=a[n],a.radius&&(r.radius=a.radius),o.push(r)}this._data=o,this._draw()},addData:function(t){if(t.length>0)for(var e=t.length;e--;)this.addData(t[e]);else{var i=this.cfg.latField||"lat",n=this.cfg.lngField||"lng",s=this.cfg.valueField||"value",o=t,a={latlng:new L.LatLng(o[i],o[n])};a[s]=o[s],this._max=Math.max(this._max,a[s]),this._min=Math.min(this._min,a[s]),o.radius&&(a.radius=o.radius),this._data.push(a),this._draw()}},_resetOrigin:function(){this._origin=this._map.layerPointToLatLng(new L.Point(0,0));var t=this._map.getSize();this._width===t.x&&this._height===t.y||(this._width=t.x,this._height=t.y,this._el.style.width=this._width+"px",this._el.style.height=this._height+"px"),this._draw()}});Qn.CSS_TRANSFORM=function(){for(var t=document.createElement("div"),e=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],i=0;i<e.length;i++){var n=e[i];if(void 0!==t.style[n])return n}return e[0]}();const ts=L.TileLayer.extend({defaultWmtsParams:{service:"WMTS",request:"GetTile",version:"1.0.0",layer:"",style:"",tilematrixset:"",format:"image/jpeg"},initialize:function(t,e){this._url=t;var i={};Object.keys(e).forEach(t=>{i[t.toLowerCase()]=e[t]});var n=L.extend({},this.defaultWmtsParams),s=i.tileSize||this.options.tileSize;for(var o in i.detectRetina&&L.Browser.retina?n.width=n.height=2*s:n.width=n.height=s,i)n.hasOwnProperty(o)&&"matrixIds"!=o&&(n[o]=i[o]);this.wmtsParams=n,this.matrixIds=e.matrixIds||this.getDefaultMatrix(),L.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,L.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this.options.tileSize,i=t.multiplyBy(e);i.x+=1,i.y-=1;var n=i.add(new L.Point(e,e)),s=this._tileZoom,o=this._crs.project(this._map.unproject(i,s)),a=this._crs.project(this._map.unproject(n,s));tilewidth=a.x-o.x;var r=this.matrixIds[s].identifier,h=this.wmtsParams.tilematrixset+":"+r,l=this.matrixIds[s].topLeftCorner.lng,c=this.matrixIds[s].topLeftCorner.lat,u=Math.floor((o.x-l)/tilewidth),p=-Math.floor((o.y-c)/tilewidth),d=L.Util.template(this._url,{s:this._getSubdomain(t)});return d+L.Util.getParamString(this.wmtsParams,d)+"&tilematrix="+h+"&tilerow="+p+"&tilecol="+u},setParams:function(t,e){return L.extend(this.wmtsParams,t),e||this.redraw(),this},getDefaultMatrix:function(){for(var t=new Array(22),e=0;e<22;e++)t[e]={identifier:""+e,topLeftCorner:new L.LatLng(20037508.3428,-20037508.3428)};return t}});var es={};es.Source=L.Layer.extend({options:{untiled:!0,identify:!0},initialize:function(t,e){L.setOptions(this,e),this.options.tiled&&(this.options.untiled=!1),this._url=t,this._subLayers={},this._overlay=this.createOverlay(this.options.untiled)},createOverlay:function(t){var e={};for(var i in this.options)"untiled"!=i&&"identify"!=i&&(e[i]=this.options[i]);return t?es.overlay(this._url,e):es.tileLayer(this._url,e)},onAdd:function(){this.refreshOverlay()},getEvents:function(){return this.options.identify?{click:this.identify}:{}},setOpacity:function(t){this.options.opacity=t,this._overlay&&this._overlay.setOpacity(t)},bringToBack:function(){this.options.isBack=!0,this._overlay&&this._overlay.bringToBack()},bringToFront:function(){this.options.isBack=!1,this._overlay&&this._overlay.bringToFront()},getLayer:function(t){return es.layer(this,t)},addSubLayer:function(t){this._subLayers[t]=!0,this.refreshOverlay()},removeSubLayer:function(t){delete this._subLayers[t],this.refreshOverlay()},refreshOverlay:function(){var t=Object.keys(this._subLayers).join(",");this._map&&(t?(this._overlay.setParams({layers:t}),this._overlay.addTo(this._map)):this._overlay.remove())},identify:function(t){var e=this.getIdentifyLayers();e.length&&this.getFeatureInfo(t.containerPoint,t.latlng,e,this.showFeatureInfo)},getFeatureInfo:function(t,e,i,n){var s=this.getFeatureInfoParams(t,i),o=this._url+L.Util.getParamString(s,this._url);this.showWaiting(),this.ajax(o,function(t){this.hideWaiting();var i=this.parseFeatureInfo(t,o);n.call(this,e,i)})},ajax:function(t,e){ns.call(this,t,e)},getIdentifyLayers:function(){return this.options.identifyLayers?this.options.identifyLayers:Object.keys(this._subLayers)},getFeatureInfoParams:function(t,e){var i,n;this.options.untiled?i=this._overlay.wmsParams:((n=this.createOverlay(!0)).updateWmsParams(this._map),(i=n.wmsParams).layers=e.join(","));var s={request:"GetFeatureInfo",query_layers:e.join(","),X:Math.round(t.x),Y:Math.round(t.y)};return L.extend({},i,s)},parseFeatureInfo:function(t,e){return"error"==t&&(t="<iframe src='"+e+"' style='border:none'>"),t},showFeatureInfo:function(t,e){this._map&&this._map.openPopup(e,t)},showWaiting:function(){this._map&&(this._map._container.style.cursor="progress")},hideWaiting:function(){this._map&&(this._map._container.style.cursor="default")}}),es.source=function(t,e){return new es.Source(t,e)},es.Layer=L.Layer.extend({initialize:function(t,e,i){L.setOptions(this,i),t.addSubLayer||(t=es.getSourceForUrl(t,i)),this._source=t,this._name=e},onAdd:function(){this._source._map||this._source.addTo(this._map),this._source.addSubLayer(this._name)},onRemove:function(){this._source.removeSubLayer(this._name)},setOpacity:function(t){this._source.setOpacity(t)},bringToBack:function(){this._source.bringToBack()},bringToFront:function(){this._source.bringToFront()}}),es.layer=function(t,e){return new es.Layer(t,e)};var is={};function ns(t,e){var i=this,n=new XMLHttpRequest;n.onreadystatechange=function(){4===n.readyState&&(200===n.status?e.call(i,n.responseText):e.call(i,"error"))},n.open("GET",t),n.send()}es.getSourceForUrl=function(t,e){return is[t]||(is[t]=es.source(t,e)),is[t]},es.TileLayer=L.TileLayer.WMS,es.tileLayer=L.tileLayer.wms,es.Overlay=L.Layer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},options:{crs:null,uppercase:!1,attribution:"",opacity:1,isBack:!1,minZoom:0,maxZoom:18},initialize:function(t,e){this._url=t;var i={},n={};for(var s in e)s in this.options?n[s]=e[s]:i[s]=e[s];L.setOptions(this,n),this.wmsParams=L.extend({},this.defaultWmsParams,i)},setParams:function(t){L.extend(this.wmsParams,t),this.update()},getAttribution:function(){return this.options.attribution},onAdd:function(){this.update()},onRemove:function(t){this._currentOverlay&&(t.removeLayer(this._currentOverlay),delete this._currentOverlay),this._currentUrl&&delete this._currentUrl},getEvents:function(){return{moveend:this.update}},update:function(){if(this._map){this.updateWmsParams();var t=this.getImageUrl();if(this._currentUrl!=t){this._currentUrl=t;var e=this._map.getBounds(),i=L.imageOverlay(t,e,{opacity:0});i.addTo(this._map),i.once("load",function(){if(!this._map)return;if(i._url!=this._currentUrl)return void this._map.removeLayer(i);this._currentOverlay&&this._map.removeLayer(this._currentOverlay);this._currentOverlay=i,i.setOpacity(this.options.opacity?this.options.opacity:1),!0===this.options.isBack&&i.bringToBack();!1===this.options.isBack&&i.bringToFront()},this),(this._map.getZoom()<this.options.minZoom||this._map.getZoom()>this.options.maxZoom)&&this._map.removeLayer(i)}}},setOpacity:function(t){this.options.opacity=t,this._currentOverlay&&this._currentOverlay.setOpacity(t)},bringToBack:function(){this.options.isBack=!0,this._currentOverlay&&this._currentOverlay.bringToBack()},bringToFront:function(){this.options.isBack=!1,this._currentOverlay&&this._currentOverlay.bringToFront()},updateWmsParams:function(t){t||(t=this._map);var e=t.getBounds(),i=t.getSize(),n=parseFloat(this.wmsParams.version),s=this.options.crs||t.options.crs,o=n>=1.3?"crs":"srs",a=s.project(e.getNorthWest()),r=s.project(e.getSouthEast()),h={width:i.x,height:i.y};h[o]=s.code,h.bbox=(n>=1.3&&s===L.CRS.EPSG4326?[r.y,a.x,a.y,r.x]:[a.x,r.y,r.x,a.y]).join(","),L.extend(this.wmsParams,h)},getImageUrl:function(){var t=this.options.uppercase||!1,e=L.Util.getParamString(this.wmsParams,this._url,t);return this._url+e}}),es.overlay=function(t,e){return new es.Overlay(t,e)};const ss=u.Draggable.extend({initialize(t,e,i){u.Draggable.prototype.initialize.call(this,t,t),this._element=t,this._stepHeight=e??5.45,this._knobHeight=i??10,this.on("predrag",function(){this._newPos.x=0,this._newPos.y=this._adjust(this._newPos.y)},this)},_adjust(t){let e=Math.round(this._toValue(t));return e=Math.max(0,Math.min(this._maxValue,e)),this._toY(e)},_toY(t){return this._k*t+this._m},_toValue(t){return(t-this._m)/this._k},setSteps(t){this._maxValue=t-1,this._k=-this._stepHeight,this._m=0},setPosition(t){u.DomUtil.setPosition(this._element,L.point(0,this._adjust(t)))},setValue(t){this.setPosition(this._toY(t))},getValue(){return this._toValue(u.DomUtil.getPosition(this._element).y)}});const os=(t,e)=>(180*Math.atan2(e.y-t.y,e.x-t.x)/Math.PI+90+360)%360,as=({value:t,isInPixels:e},i)=>e?t/i:t;function rs(t){if("string"==typeof t&&-1!==t.indexOf("%"))return{value:parseFloat(t)/100,isInPixels:!1};const e=t?parseFloat(t):0;return{value:e,isInPixels:e>0}}function hs(t){return t.reduce((t,e,i,n)=>{if(i>0&&!((t,e)=>t.x===e.x&&t.y===e.y)(e,n[i-1])){const s=n[i-1],o=t.length>0?t[t.length-1].distB:0,a=function(t,e){const i=e.x-t.x,n=e.y-t.y;return Math.sqrt(i*i+n*n)}(s,e);t.push({a:s,b:e,distA:o,distB:o+a,heading:os(s,e)})}return t},[])}function ls(t,e,i){return e.x!==t.x?{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}:{x:t.x,y:t.y+(e.y-t.y)*i}}const cs=t=>{return Array.isArray(t)&&((e=t[0])instanceof L.LatLng||Array.isArray(e)&&2===e.length&&"number"==typeof e[0]);var e},us=L.FeatureGroup.extend({options:{patterns:[]},initialize:function(t,e){L.FeatureGroup.prototype.initialize.call(this),L.Util.setOptions(this,e),this._map=null,this._paths=this._initPaths(t),this._bounds=this._initBounds(),this._patterns=this._initPatterns(this.options.patterns)},_initPaths:function(t,e){if(cs(t)){return[e?t.concat([t[0]]):t]}return t instanceof L.Polyline?this._initPaths(t.getLatLngs(),t instanceof L.Polygon):Array.isArray(t)?t.reduce((t,i)=>t.concat(this._initPaths(i,e)),[]):[]},_initPatterns:function(t){return t.map(this._parsePatternDef)},setPatterns:function(t){this.options.patterns=t,this._patterns=this._initPatterns(this.options.patterns),this.redraw()},setPaths:function(t){this._paths=this._initPaths(t),this._bounds=this._initBounds(),this.redraw()},_parsePatternDef:function(t,e){return{symbolFactory:t.symbol,offset:rs(t.offset),endOffset:rs(t.endOffset),repeat:rs(t.repeat)}},onAdd:function(t){this._map=t,this._draw(),this._map.on("moveend",this.redraw,this)},onRemove:function(t){this._map.off("moveend",this.redraw,this),this._map=null,L.FeatureGroup.prototype.onRemove.call(this,t)},_initBounds:function(){const t=this._paths.reduce((t,e)=>t.concat(e),[]);return L.latLngBounds(t)},getBounds:function(){return this._bounds},_buildSymbols:function(t,e,i){return i.map((n,s)=>e.buildSymbol(n,t,this._map,s,i.length))},_getDirectionPoints:function(t,e){if(t.length<2)return[];return function(t,e){const i=hs(t),n=i.length;if(0===n)return[];const s=i[n-1].distB,o=as(e.offset,s),a=as(e.endOffset,s),r=s*as(e.repeat,s),h=a>0?s*a:0,l=[];let c=o>0?s*o:0;do{l.push(c),c+=r}while(r>0&&c<s-h);let u=0,p=i[0];return l.map(t=>{for(;t>p.distB&&u<n-1;)u++,p=i[u];const e=(t-p.distA)/(p.distB-p.distA);return{pt:ls(p.a,p.b,e),heading:p.heading}})}(t.map(t=>this._map.project(t)),e).map(t=>({latLng:this._map.unproject(L.point(t.pt)),heading:t.heading}))},redraw:function(){this._map&&(this.clearLayers(),this._draw())},_getPatternLayers:function(t){const e=this._map.getBounds().pad(.1);return this._paths.map(i=>{const n=this._getDirectionPoints(i,t).filter(t=>e.contains(t.latLng));return L.featureGroup(this._buildSymbols(i,t.symbolFactory,n))})},_draw:function(){this._patterns.map(t=>this._getPatternLayers(t)).forEach(t=>{this.addLayer(L.featureGroup(t))})}}),ps={Dash:L.Class.extend({options:{pixelSize:10,pathOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.pathOptions.clickable=!1},buildSymbol:function(t,e,i,n,s){const o=this.options,a=Math.PI/180;if(o.pixelSize<=1)return L.polyline([t.latLng,t.latLng],o.pathOptions);const r=i.project(t.latLng),h=-(t.heading-90)*a,l=L.point(r.x+o.pixelSize*Math.cos(h+Math.PI)/2,r.y+o.pixelSize*Math.sin(h)/2),c=r.add(r.subtract(l));return L.polyline([i.unproject(l),i.unproject(c)],o.pathOptions)}}),ArrowHead:L.Class.extend({options:{polygon:!0,pixelSize:10,headAngle:60,pathOptions:{stroke:!1,weight:2}},initialize:function(t){L.Util.setOptions(this,t),this.options.pathOptions.clickable=!1},buildSymbol:function(t,e,i,n,s){return this.options.polygon?L.polygon(this._buildArrowPath(t,i),this.options.pathOptions):L.polyline(this._buildArrowPath(t,i),this.options.pathOptions)},_buildArrowPath:function(t,e){const i=Math.PI/180,n=e.project(t.latLng),s=-(t.heading-90)*i,o=this.options.headAngle/2*i,a=s+o,r=s-o,h=L.point(n.x-this.options.pixelSize*Math.cos(a),n.y+this.options.pixelSize*Math.sin(a)),l=L.point(n.x-this.options.pixelSize*Math.cos(r),n.y+this.options.pixelSize*Math.sin(r));return[e.unproject(h),t.latLng,e.unproject(l)]}}),Marker:L.Class.extend({options:{markerOptions:{},rotation:!1},initialize:function(t){L.Util.setOptions(this,t),this.options.markerOptions.clickable=!1,this.options.markerOptions.draggable=!1},buildSymbol:function(t,e,i,n,s){return this.options.rotation&&(this.options.markerOptions.rotationAngle=t.heading+(this.options.angleCorrection||0)),L.marker(t.latLng,this.options.markerOptions)}})},ds=u.Handler.extend({options:{color:"#f00",weight:2,fillColor:"#ff0",fillOpacity:.7,radius:5,fontSize:"12px",fontWeight:"normal",iconUrl:"",iconWidth:32,iconHeight:32,continue:!1,showCloseButton:!1,showMeasurements:!1},FreelineEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)&&(this.geometry.addLatLng(t.latlng),this.onVertexAdd&&this.onVertexAdd(this.geometry),this.geometry.getLatLngs().length?this.tooltip.setContent("双击完成绘制"):this.tooltip.setContent("点击开始绘制")),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.geometry||(this.geometry=new u.Polyline([],this.options).addTo(this._map))},_mouseDblClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null}},ArrowEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setPaths([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("点击继续绘制,双击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new us(this.geometry,{patterns:[{offset:25,repeat:50,symbol:new ps.ArrowHead({pixelSize:15,pathOptions:{fillColor:this.options.fillColor,fillOpacity:this.options.fillOpacity,weight:0}})}]}).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setLatLngs(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry)},_mouseDblClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null}},SectorEvents:{_mouseMove(t){var i;if(this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this._latlng&&this.line.setLatLngs([this._latlng,t.latlng]),this._latlng&&this._radius)if(this._endAngle=(null==(i=e.GeoUtil.calcBearAndDisByPoints(t.latlng,this._latlng))?void 0:i.angle)+180,this.geometry)this.geometry.setStyle({startAngle:this._startAngle,endAngle:this._endAngle,...this.style});else{const t=new hn({collisionFlg:!0,padding:.5});this.geometry=new rn(this._latlng,this._radius,{renderer:t,startAngle:this._startAngle,endAngle:this._endAngle,...this.style}).addTo(this._map)}},_mouseClick(t){var i;this._latlng?this._radius||(this.tooltip.setContent("双击完成绘制"),this._map.removeLayer(this.line),this._radius=this._latlng.distanceTo(t.latlng),this._startAngle=(null==(i=e.GeoUtil.calcBearAndDisByPoints(t.latlng,this._latlng))?void 0:i.angle)+180):(this._latlng=t.latlng,this.line=L.polyline([this._latlng],{color:"#eee",weight:2,dashArray:[5,15]}).addTo(this._map),this.tooltip.setContent("点击继续绘制"))},_mouseDblClick(t){this._map.removeLayer(this.tempPoint),this.onFinish&&this.geometry&&this.onFinish(this.geometry),!this.options.continue&&this.disable(),this.geometry=null}},MarkerEvents:{_mouseMove(t){this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?this.geometry.setLatLng(t.latlng):this.geometry=new u.Marker(t.latlng,{icon:new u.Icon({iconUrl:this.options.iconUrl,iconSize:[this.options.iconWidth,this.options.iconHeight],iconAnchor:[this.options.iconWidth/2,this.options.iconHeight/2]})}).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),!this.options.continue&&this.disable(),this.geometry=null}},TextEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?this.geometry.setLatLng(t.latlng):(this.tooltip.setContent("点击开始绘制,并修改名字"),this.geometry=new Vn(t.latlng,"Text",{color:this.options.color,fontSize:this.options.fontSize,fontWeight:this.options.fontWeight}).addTo(this._map)),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.geometry.enableEdit(),this.onFinish&&this.geometry&&this.onFinish(this.geometry),!this.options.continue&&this.disable(),this.geometry=null}},PointEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?this.geometry.setLatLng(t.latlng):(this.tooltip.setContent("点击开始绘制"),this.geometry=new u.CircleMarker(t.latlng,this.options).addTo(this._map)),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),!this.options.continue&&this.disable(),this.geometry=null}},CircleEvents:{_mouseMove(t){if(this.tooltip.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)){const e=this.latlng?this._map.distance(t.latlng,this.latlng):0;this.geometry.setRadius(e),0!==e?this.tooltip.setContent(`半径:<b>${e.toFixed(2)}m</b><br/>继续点击完成绘制`):this.tooltip.setContent("点击开始绘制")}this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlng=t.latlng,this.onVertexAdd&&this.onVertexAdd(this.geometry),this.geometry&&0!==this.geometry.getRadius()?(this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null):this.geometry=new u.Circle(this.latlng,0,this.options).addTo(this._map)},_mouseDblClick(t){}},PolylineEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setLatLngs([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("点击继续绘制,双击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new u.Polyline([t.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setLatLngs(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry)},_mouseDblClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null}},RectangleEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setBounds([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("继续点击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new u.Rectangle([t.latlng,t.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setBounds(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry),2===this.latlngs.length&&(this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null)},_mouseDblClick(t){}},PolygonEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setLatLngs([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("点击继续绘制,双击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new u.Polygon([t.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setLatLngs(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry)},_mouseDblClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null}},addHooks(){this[this.drawType+"Events"]&&(this[this.drawType+"Events"]._mouseMove&&this._map.on("mousemove",this[this.drawType+"Events"]._mouseMove,this),this[this.drawType+"Events"]._mouseClick&&this._map.on("click",this[this.drawType+"Events"]._mouseClick,this),this[this.drawType+"Events"]._mouseDblClick&&this._map.on("dblclick",this[this.drawType+"Events"]._mouseDblClick,this))},removeHooks(){this[this.drawType+"Events"]&&(this[this.drawType+"Events"]._mouseMove&&this._map.off("mousemove",this[this.drawType+"Events"]._mouseMove,this),this[this.drawType+"Events"]._mouseClick&&this._map.off("click",this[this.drawType+"Events"]._mouseClick,this),this[this.drawType+"Events"]._mouseDblClick&&this._map.off("dblclick",this[this.drawType+"Events"]._mouseDblClick,this))},setOptions(t){return u.Util.setOptions(this,t),this},enable(t,i={}){return u.Util.setOptions(this,i),this.onFinish=i.onFinish||new Function,this.onDrawing=i.onDrawing||new Function,this.onVertexAdd=i.onVertexAdd||new Function,this.drawType=e.StringUtil.changeCase(t,1),this.latlngs=i.latlngs||[],this._map.setCursor("data:application/octet-stream;base64,AAACAAEAEBAAAAMABgBoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AACxAAAs6/oAAIKEAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQUAAAAAAAAAAAAAAAAAAAUFBQAAAAAAAAAAAAAAAAAFAwQAAAAAAAAAAAAAAAAAAAMDBAAAAAAAAAEBAQAAAAADAwQAAAAAAAABAQEAAAAAAAMDBAQAAAAAAQEBAAAAAAADAwIAAAAAAAAAAAAAAAAAAAIBAQAAAAAAAAAAAAAAAAABAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAA/v8AAP4/AAD+HwAA/g8AAP4PAAD+BwAAxwcAAMcDAADHgwAA/8EAAP/BAAD/5wAA//8AAP//AAA="),this.tempPoint=new u.CircleMarker([0,0],{weight:1,radius:5,color:"#3388ff",fillColor:"#fff",fillOpacity:1}).addTo(this._map),this.tooltip=new u.Tooltip({offset:[10,-10]}).setContent("点击开始绘制"),u.Handler.prototype.enable.call(this),this},disable(){if(this._map.setCursor(),this.removeHooks(),this.tooltip&&this._map.closeTooltip(this.tooltip),this.tempPoint&&this._map.removeLayer(this.tempPoint),this.options.showCloseButton&&this.options.showMeasurements){const t=this.geometry._measurementLayer;let e;e=this.geometry instanceof u.Path?this.geometry._latlngs.flat().at(-1):this.geometry._latlng;const i=this.geometry._leaflet_id,n=new u.Marker(e,{icon:new u.Icon({iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAAFRJREFUKFOlklEKACAIQ7f7H9rQkJYFFUVfY49NiwBgcc+HABlmu/K7HQMge0SFVd8CCqU5tQlwUQ06UqYuwA7Siv/AU6U6YK3n1f7Wen7onvD6NRqqukP5oM7XCQAAAABJRU5ErkJggg==",iconSize:[12,12],iconAnchor:[6,6]}),zIndexOffset:9999}).on("click",e=>{this._map.removeLayerById(i),null==t||t.clearLayers(),n.remove()}).addTo(this._map)}return u.Util.setOptions(this,ds.prototype.options),u.Handler.prototype.disable.call(this),this}});u.Map.addInitHook("addHandler","drawHandler",ds);const _s=u.Handler.extend({_touchstart:u.Browser.msPointer?"MSPointerDown":u.Browser.pointer?"pointerdown":"touchstart",initialize(t){u.Handler.prototype.initialize.call(this,t),this._items=[],this._visible=!1,_s.BASE_CLS=`${t.clsPrefix}-contextmenu`;const e=this._container=u.DomUtil.create("div",`${t.clsPrefix}-contextmenu`,t._container);e.style.zIndex=1e4,e.style.position="absolute",t.options.contextmenuWidth&&(e.style.width=t.options.contextmenuWidth+"px"),this._createItems(),u.DomEvent.on(e,"click",u.DomEvent.stop).on(e,"mousedown",u.DomEvent.stop).on(e,"dblclick",u.DomEvent.stop).on(e,"contextmenu",u.DomEvent.stop)},addHooks(){const t=this._map.getContainer();u.DomEvent.on(t,"mouseleave",this._hide,this).on(document,"keydown",this._onKeyDown,this),u.Browser.touch&&u.DomEvent.on(document,this._touchstart,this._hide,this),this._map.on({contextmenu:this._show,mousedown:this._hide,zoomstart:this._hide},this)},removeHooks(){const t=this._map.getContainer();u.DomEvent.off(t,"mouseleave",this._hide,this).off(document,"keydown",this._onKeyDown,this),u.Browser.touch&&u.DomEvent.off(document,this._touchstart,this._hide,this),this._map.off({contextmenu:this._show,mousedown:this._hide,zoomstart:this._hide},this)},showAt(t,e){t instanceof u.LatLng&&(t=this._map.latLngToContainerPoint(t)),this._showAtPoint(t,e)},hide(){this._hide()},addItem(t){return this.insertItem(t)},insertItem(t,e){e=void 0!==e?e:this._items.length;const i=this._createItem(this._container,t,e);return this._items.push(i),this._sizeChanged=!0,this._map.fire("contextmenu.additem",{contextmenu:this,el:i.el,index:e}),i.el},removeItem(t){const e=this._container;return isNaN(t)||(t=e.children[t]),t?(this._removeItem(u.Util.stamp(t)),this._sizeChanged=!0,this._map.fire("contextmenu.removeitem",{contextmenu:this,el:t}),t):null},removeAllItems(){const t=this._container.children;let e;for(;t.length;)e=t[0],this._removeItem(u.Util.stamp(e));return t},hideAllItems(){let t,e,i;for(e=0,i=this._items.length;e<i;e++)t=this._items[e],t.el.style.display="none"},showAllItems(){let t,e,i;for(e=0,i=this._items.length;e<i;e++)t=this._items[e],t.el.style.display=""},setDisabled(t,e){const i=this._container,n=_s.BASE_CLS+"-item";isNaN(t)||(t=i.children[t]),t&&u.DomUtil.hasClass(t,n)&&(e?(u.DomUtil.addClass(t,n+"-disabled"),this._map.fire("contextmenu.disableitem",{contextmenu:this,el:t})):(u.DomUtil.removeClass(t,n+"-disabled"),this._map.fire("contextmenu.enableitem",{contextmenu:this,el:t})))},isVisible(){return this._visible},_createItems(){const t=this._map.options.contextmenuItems;let e,i;for(e=0,i=t.length;e<i;e++)this._items.push(this._createItem(this._container,t[e]))},_createItem(t,i,n){if(i.separator||"-"===i)return this._createSeparator(t,n);const s=_s.BASE_CLS+"-item";let o=!1;e.Util.isFunction(i.disabled)?o=i.disabled(this):i.disabled&&(o=!0);const a=o?s+" "+s+"-disabled":s,r=this._insertElementAt("a",a,t,n),h=this._createEventHandler(r,i.callback,i.context,i.hideOnSelect),l=this._getIcon(i),c=this._getIconCls(i);let p="";return l?p='<img class="'+_s.BASE_CLS+'-icon" src="'+l+'"/>':c&&(p='<span class="'+_s.BASE_CLS+"-icon "+c+'"></span>'),r.innerHTML=p+i.text,r.href="#",u.DomEvent.on(r,"mouseover",this._onItemMouseOver,this).on(r,"mouseout",this._onItemMouseOut,this).on(r,"mousedown",u.DomEvent.stopPropagation).on(r,"click",h),u.Browser.touch&&u.DomEvent.on(r,this._touchstart,u.DomEvent.stopPropagation),u.Browser.pointer||u.DomEvent.on(r,"click",this._onItemMouseOut,this),{id:u.Util.stamp(r),el:r,disabled:i.disabled,callback:h}},_removeItem(t){let e,i,n,s,o;for(n=0,s=this._items.length;n<s;n++)if(e=this._items[n],e.id===t)return i=e.el,o=e.callback,o&&(u.DomEvent.off(i,"mouseover",this._onItemMouseOver,this).off(i,"mouseover",this._onItemMouseOut,this).off(i,"mousedown",u.DomEvent.stopPropagation).off(i,"click",o),u.Browser.touch&&u.DomEvent.off(i,this._touchstart,u.DomEvent.stopPropagation),u.Browser.pointer||u.DomEvent.on(i,"click",this._onItemMouseOut,this)),this._container.removeChild(i),this._items.splice(n,1),e;return null},_createSeparator(t,e){const i=this._insertElementAt("div",_s.BASE_CLS+"-separator",t,e);return{id:u.Util.stamp(i),el:i}},_createEventHandler(t,e,i,n){const s=this;this._map;const o=_s.BASE_CLS+"-item-disabled";n=void 0===n||n;return function(a){if(u.DomUtil.hasClass(t,o))return;const r=s._map,h=s._showLocation.containerPoint,l=r.containerPointToLayerPoint(h),c={containerPoint:h,layerPoint:l,latlng:r.layerPointToLatLng(l),relatedTarget:s._showLocation.relatedTarget};n&&s._hide(),e&&e.call(i||r,c),s._map.fire("contextmenu.select",{contextmenu:s,el:t})}},_insertElementAt(t,e,i,n){let s;const o=document.createElement(t);return o.className=e,void 0!==n&&(s=i.children[n]),s?i.insertBefore(o,s):i.appendChild(o),o},_show(t){this._showAtPoint(t.containerPoint,t)},_showAtPoint(t,e){if(this._items.length){this._map;const i=u.extend(e||{},{contextmenu:this});this._showLocation={containerPoint:t},e&&e.relatedTarget&&(this._showLocation.relatedTarget=e.relatedTarget),this._setPosition(t),this._visible||(this._container.style.display="block",this._visible=!0),this._map.fire("contextmenu.show",i)}},_hide(){this._visible&&(this._visible=!1,this._container.style.display="none",this._map.fire("contextmenu.hide",{contextmenu:this}))},_getIcon:t=>u.Browser.retina&&t.retinaIcon||t.icon,_getIconCls:t=>u.Browser.retina&&t.retinaIconCls||t.iconCls,_setPosition(t){const e=this._map.getSize(),i=this._container,n=this._getElementSize(i);let s;this._map.options.contextmenuAnchor&&(s=new u.Point(this._map.options.contextmenuAnchor),t=t.add(s)),i._leaflet_pos=t,t.x+n.x>e.x?(i.style.left="auto",i.style.right=Math.min(Math.max(e.x-t.x,0),e.x-n.x-1)+"px"):(i.style.left=Math.max(t.x,0)+"px",i.style.right="auto"),t.y+n.y>e.y?(i.style.top="auto",i.style.bottom=Math.min(Math.max(e.y-t.y,0),e.y-n.y-1)+"px"):(i.style.top=Math.max(t.y,0)+"px",i.style.bottom="auto")},_getElementSize(t){let e=this._size;const i=t.style.display;return e&&!this._sizeChanged||(e={},t.style.left="-999999px",t.style.right="auto",t.style.display="block",e.x=t.offsetWidth,e.y=t.offsetHeight,t.style.left="auto",t.style.display=i,this._sizeChanged=!1),e},_onKeyDown(t){27===t.keyCode&&this._hide()},_onItemMouseOver(t){u.DomUtil.addClass(t.target||t.srcElement,"over")},_onItemMouseOut(t){u.DomUtil.removeClass(t.target||t.srcElement,"over")}});u.Map.mergeOptions({contextmenuItems:[]}),u.Map.addInitHook("addHandler","contextmenu",_s);const ms={bindContextMenu(t){return L.setOptions(this,t),this._initContextMenu(),this},unbindContextMenu(){return this.off("contextmenu",this._showContextMenu,this),this},addContextMenuItem(t){this.options.contextmenuItems.push(t)},removeContextMenuItemWithIndex(t){const e=[];for(let n=0;n<this.options.contextmenuItems.length;n++)this.options.contextmenuItems[n].index==t&&e.push(n);let i=e.pop();for(;void 0!==i;)this.options.contextmenuItems.splice(i,1),i=e.pop()},replaceContextMenuItem(t){this.removeContextMenuItemWithIndex(t.index),this.addContextMenuItem(t)},_initContextMenu(){this._items=[],this.on("contextmenu",this._showContextMenu,this)},_showContextMenu(t){let e,i,n,s,o;if(this._items=[],this._map.contextmenu){for(i=L.extend({relatedTarget:this},t),n=this._map.mouseEventToContainerPoint(t.originalEvent),this.options.contextmenuInheritItems||this._map.contextmenu.hideAllItems(),s=0,o=this.options.contextmenuItems.length;s<o;s++)e=this.options.contextmenuItems[s],this._items.push(this._map.contextmenu.insertItem(e,e.index));this._map.once("contextmenu.hide",this._hideContextMenu,this),this._map.contextmenu.showAt(n,i)}},_hideContextMenu(){let t,e;if(this._items){for(t=0,e=this._items.length;t<e;t++)this._map.contextmenu.removeItem(this._items[t]);this._items.length=0,this.options.contextmenuInheritItems||this._map.contextmenu.showAllItems()}}},gs=[u.Marker,u.Path],fs={contextmenu:!1,contextmenuItems:[],contextmenuInheritItems:!1};for(let L=0,Xs=gs.length;L<Xs;L++){const t=gs[L];t.prototype.options?t.mergeOptions(fs):t.prototype.options=fs,t.addInitHook(function(){this.options.contextmenu&&this._initContextMenu()}),t.include(ms)}const ys=u.Handler.extend({options:{moveStep:10,zoomSnap:1,moveKeyCodeMap:{65:"left",68:"right",87:"top",83:"bottom"},zoomKeyCodeMap:{69:"add",81:"minus"}},enable(t){u.Util.setOptions(this,t),u.Handler.prototype.enable.call(this)},addHooks(){this._map.on("keydown",this._keyDownEvent,this)},removeHooks(){this._map.off("keydown",this._keyDownEvent,this)},_keyDownEvent(t){let e=this.options.moveKeyCodeMap[t.originalEvent.keyCode],i=this.options.zoomKeyCodeMap[t.originalEvent.keyCode];e&&this.moveByMeters(e,this.options.moveStep),i&&this.setZoom(i)},moveByMeters(t,e){let i=this._map.project(this._map.getCenter());switch(t){case"left":i.x-=e;break;case"right":i.x+=e;break;case"bottom":i.y+=e;break;case"top":i.y-=e}i=this._map.unproject(i),this._map.panTo(i)},setZoom(t){let e=this._map.getZoom();switch(t){case"add":e+=this.options.zoomSnap;break;case"minus":e-=this.options.zoomSnap}this._map.setZoom(e)}});u.Map.addInitHook("addHandler","keyboard",ys);const As=u.LayerGroup.extend({initialize(t){u.Util.setOptions(this,t),u.LayerGroup.prototype.initialize.call(this,t)},getRasterLayers(){const t={},e=i=>{if(i._layers&&i.getLayer)for(const n in i._layers){const s=i._layers[n];s._layers&&s.getLayer?e(s):t[s._leaflet_id]=s}else t[i._leaflet_id]=i};return e(this),t},removeRasterLayer(t){const e=function(i){if(i._layers&&i.getLayer&&i.getLayer(t)){const e=i.getLayer(t);i.removeLayer(e)}else if(i._layers)for(const n in i._layers){const s=i._layers[n];if(s._layers&&s.getLayer&&s.getLayer(t)){const e=s.getLayer(t);s.removeLayer(e)}else s._layers&&e(s)}};e(this)},getRasterTop(){const t=Object.values(this.getRasterLayers());return t.length?Math.max(...t.map(t=>t.options.zIndex))+1:null}});function vs(t,e,i,n){let s=n;const o=e+(i-e>>1);let a,r=i-e;const h=t[e],l=t[e+1],c=t[i],u=t[i+1];for(let p=e+3;p<i;p+=3){const e=Ms(t[p],t[p+1],h,l,c,u);if(e>s)a=p,s=e;else if(e===s){const t=Math.abs(p-o);t<r&&(a=p,r=t)}}s>n&&(a-e>3&&vs(t,e,a,n),t[a+2]=s,i-a>3&&vs(t,a,i,n))}function Ms(t,e,i,n,s,o){let a=s-i,r=o-n;if(0!==a||0!==r){const h=((t-i)*a+(e-n)*r)/(a*a+r*r);h>1?(i=s,n=o):h>0&&(i+=a*h,n+=r*h)}return a=t-i,r=e-n,a*a+r*r}function Ls(t,e,i,n){const s={id:null==t?null:t,type:e,geometry:i,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if("Point"===e||"MultiPoint"===e||"LineString"===e)xs(s,i);else if("Polygon"===e)xs(s,i[0]);else if("MultiLineString"===e)for(const o of i)xs(s,o);else if("MultiPolygon"===e)for(const o of i)xs(s,o[0]);return s}function xs(t,e){for(let i=0;i<e.length;i+=3)t.minX=Math.min(t.minX,e[i]),t.minY=Math.min(t.minY,e[i+1]),t.maxX=Math.max(t.maxX,e[i]),t.maxY=Math.max(t.maxY,e[i+1])}function bs(t,e,i,n){if(!e.geometry)return;const s=e.geometry.coordinates;if(s&&0===s.length)return;const o=e.geometry.type,a=Math.pow(i.tolerance/((1<<i.maxZoom)*i.extent),2);let r=[],h=e.id;if(i.promoteId?h=e.properties[i.promoteId]:i.generateId&&(h=n||0),"Point"===o)ws(s,r);else if("MultiPoint"===o)for(const l of s)ws(l,r);else if("LineString"===o)Ps(s,r,a,!1);else if("MultiLineString"===o){if(i.lineMetrics){for(const i of s)r=[],Ps(i,r,a,!1),t.push(Ls(h,"LineString",r,e.properties));return}ks(s,r,a,!1)}else if("Polygon"===o)ks(s,r,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(const s of e.geometry.geometries)bs(t,{id:h,geometry:s,properties:e.properties},i,n);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const t of s){const e=[];ks(t,e,a,!0),r.push(e)}}t.push(Ls(h,o,r,e.properties))}function ws(t,e){e.push(Es(t[0]),Cs(t[1]),0)}function Ps(t,e,i,n){let s,o,a=0;for(let h=0;h<t.length;h++){const i=Es(t[h][0]),r=Cs(t[h][1]);e.push(i,r,0),h>0&&(a+=n?(s*r-i*o)/2:Math.sqrt(Math.pow(i-s,2)+Math.pow(r-o,2))),s=i,o=r}const r=e.length-3;e[2]=1,vs(e,0,r,i),e[r+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function ks(t,e,i,n){for(let s=0;s<t.length;s++){const o=[];Ps(t[s],o,i,n),e.push(o)}}function Es(t){return t/360+.5}function Cs(t){const e=Math.sin(t*Math.PI/180),i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i<0?0:i>1?1:i}function Ss(t,e,i,n,s,o,a,r){if(n/=e,o>=(i/=e)&&a<n)return t;if(a<i||o>=n)return null;const h=[];for(const l of t){const t=l.geometry;let e=l.type;const o=0===s?l.minX:l.minY,a=0===s?l.maxX:l.maxY;if(o>=i&&a<n){h.push(l);continue}if(a<i||o>=n)continue;let c=[];if("Point"===e||"MultiPoint"===e)Ts(t,c,i,n,s);else if("LineString"===e)Os(t,c,i,n,s,!1,r.lineMetrics);else if("MultiLineString"===e)Ds(t,c,i,n,s,!1);else if("Polygon"===e)Ds(t,c,i,n,s,!0);else if("MultiPolygon"===e)for(const r of t){const t=[];Ds(r,t,i,n,s,!0),t.length&&c.push(t)}if(c.length){if(r.lineMetrics&&"LineString"===e){for(const t of c)h.push(Ls(l.id,e,t,l.tags));continue}"LineString"!==e&&"MultiLineString"!==e||(1===c.length?(e="LineString",c=c[0]):e="MultiLineString"),"Point"!==e&&"MultiPoint"!==e||(e=3===c.length?"Point":"MultiPoint"),h.push(Ls(l.id,e,c,l.tags))}}return h.length?h:null}function Ts(t,e,i,n,s){for(let o=0;o<t.length;o+=3){const a=t[o+s];a>=i&&a<=n&&Is(e,t[o],t[o+1],t[o+2])}}function Os(t,e,i,n,s,o,a){let r=Bs(t);const h=0===s?Rs:zs;let l,c,u=t.start;for(let f=0;f<t.length-3;f+=3){const p=t[f],d=t[f+1],_=t[f+2],m=t[f+3],g=t[f+4],y=0===s?p:d,A=0===s?m:g;let v=!1;a&&(l=Math.sqrt(Math.pow(p-m,2)+Math.pow(d-g,2))),y<i?A>i&&(c=h(r,p,d,m,g,i),a&&(r.start=u+l*c)):y>n?A<n&&(c=h(r,p,d,m,g,n),a&&(r.start=u+l*c)):Is(r,p,d,_),A<i&&y>=i&&(c=h(r,p,d,m,g,i),v=!0),A>n&&y<=n&&(c=h(r,p,d,m,g,n),v=!0),!o&&v&&(a&&(r.end=u+l*c),e.push(r),r=Bs(t)),a&&(u+=l)}let p=t.length-3;const d=t[p],_=t[p+1],m=t[p+2],g=0===s?d:_;g>=i&&g<=n&&Is(r,d,_,m),p=r.length-3,o&&p>=3&&(r[p]!==r[0]||r[p+1]!==r[1])&&Is(r,r[0],r[1],r[2]),r.length&&e.push(r)}function Bs(t){const e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function Ds(t,e,i,n,s,o){for(const a of t)Os(a,e,i,n,s,o,!1)}function Is(t,e,i,n){t.push(e,i,n)}function Rs(t,e,i,n,s,o){const a=(o-e)/(n-e);return Is(t,o,i+(s-i)*a,1),a}function zs(t,e,i,n,s,o){const a=(o-i)/(s-i);return Is(t,e+(n-e)*a,o,1),a}function Gs(t,e){const i=[];for(let n=0;n<t.length;n++){const s=t[n],o=s.type;let a;if("Point"===o||"MultiPoint"===o||"LineString"===o)a=Ns(s.geometry,e);else if("MultiLineString"===o||"Polygon"===o){a=[];for(const t of s.geometry)a.push(Ns(t,e))}else if("MultiPolygon"===o){a=[];for(const t of s.geometry){const i=[];for(const n of t)i.push(Ns(n,e));a.push(i)}}i.push(Ls(s.id,o,a,s.tags))}return i}function Ns(t,e){const i=[];i.size=t.size,void 0!==t.start&&(i.start=t.start,i.end=t.end);for(let n=0;n<t.length;n+=3)i.push(t[n]+e,t[n+1],t[n+2]);return i}function js(t,e){if(t.transformed)return t;const i=1<<t.z,n=t.x,s=t.y;for(const o of t.features){const t=o.geometry,a=o.type;if(o.geometry=[],1===a)for(let r=0;r<t.length;r+=2)o.geometry.push(Fs(t[r],t[r+1],e,i,n,s));else for(let r=0;r<t.length;r++){const a=[];for(let o=0;o<t[r].length;o+=2)a.push(Fs(t[r][o],t[r][o+1],e,i,n,s));o.geometry.push(a)}}return t.transformed=!0,t}function Fs(t,e,i,n,s,o){return[Math.round(i*(t*n-s)),Math.round(i*(e*n-o))]}function Us(t,e,i,n,s){const o=e===s.maxZoom?0:s.tolerance/((1<<e)*s.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:t.length,source:null,x:i,y:n,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const r of t)Zs(a,r,o,s);return a}function Zs(t,e,i,n){const s=e.geometry,o=e.type,a=[];if(t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),"Point"===o||"MultiPoint"===o)for(let r=0;r<s.length;r+=3)a.push(s[r],s[r+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)Hs(a,s,t,i,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(let r=0;r<s.length;r++)Hs(a,s[r],t,i,"Polygon"===o,0===r);else if("MultiPolygon"===o)for(let r=0;r<s.length;r++){const e=s[r];for(let n=0;n<e.length;n++)Hs(a,e[n],t,i,!0,0===n)}if(a.length){let i=e.tags||null;if("LineString"===o&&n.lineMetrics){i={};for(const t in e.tags)i[t]=e.tags[t];i.mapbox_clip_start=s.start/s.size,i.mapbox_clip_end=s.end/s.size}const r={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:i};null!==e.id&&(r.id=e.id),t.features.push(r)}}function Hs(t,e,i,n,s,o){const a=n*n;if(n>0&&e.size<(s?a:n))return void(i.numPoints+=e.length/3);const r=[];for(let h=0;h<e.length;h+=3)(0===n||e[h+2]>a)&&(i.numSimplified++,r.push(e[h],e[h+1])),i.numPoints++;s&&function(t,e){let i=0;for(let n=0,s=t.length,o=s-2;n<s;o=n,n+=2)i+=(t[n]-t[o])*(t[n+1]+t[o+1]);if(i>0===e)for(let n=0,s=t.length;n<s/2;n+=2){const e=t[n],i=t[n+1];t[n]=t[s-2-n],t[n+1]=t[s-1-n],t[s-2-n]=e,t[s-1-n]=i}}(r,o),t.push(r)}const qs={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};let Vs=class{constructor(t,e){const i=(e=this.options=function(t,e){for(const i in e)t[i]=e[i];return t}(Object.create(qs),e)).debug;if(e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");let n=function(t,e){const i=[];if("FeatureCollection"===t.type)for(let n=0;n<t.features.length;n++)bs(i,t.features[n],e,n);else"Feature"===t.type?bs(i,t,e):bs(i,{geometry:t},e);return i}(t,e);this.tiles={},this.tileCoords=[],i&&(this.stats={},this.total=0),n=function(t,e){const i=e.buffer/e.extent;let n=t;const s=Ss(t,1,-1-i,i,0,-1,2,e),o=Ss(t,1,1-i,2+i,0,-1,2,e);return(s||o)&&(n=Ss(t,1,-i,1+i,0,-1,2,e)||[],s&&(n=Gs(s,1).concat(n)),o&&(n=n.concat(Gs(o,-1)))),n}(n,e),n.length&&this.splitTile(n,0,0,0),i&&n.length}splitTile(t,e,i,n,s,o,a){const r=[t,e,i,n],h=this.options,l=h.debug;for(;r.length;){n=r.pop(),i=r.pop(),e=r.pop(),t=r.pop();const c=1<<e,u=Ws(e,i,n);let p=this.tiles[u];if(!p&&(p=this.tiles[u]=Us(t,e,i,n,h),this.tileCoords.push({z:e,x:i,y:n}),l)){const t=`z${e}`;this.stats[t]=(this.stats[t]||0)+1,this.total++}if(p.source=t,null==s){if(e===h.indexMaxZoom||p.numPoints<=h.indexMaxPoints)continue}else{if(e===h.maxZoom||e===s)continue;if(null!=s){const t=s-e;if(i!==o>>t||n!==a>>t)continue}}if(p.source=null,0===t.length)continue;const d=.5*h.buffer/h.extent,_=.5-d,m=.5+d,g=1+d;let f=null,y=null,A=null,v=null,M=Ss(t,c,i-d,i+m,0,p.minX,p.maxX,h),L=Ss(t,c,i+_,i+g,0,p.minX,p.maxX,h);t=null,M&&(f=Ss(M,c,n-d,n+m,1,p.minY,p.maxY,h),y=Ss(M,c,n+_,n+g,1,p.minY,p.maxY,h),M=null),L&&(A=Ss(L,c,n-d,n+m,1,p.minY,p.maxY,h),v=Ss(L,c,n+_,n+g,1,p.minY,p.maxY,h),L=null),r.push(f||[],e+1,2*i,2*n),r.push(y||[],e+1,2*i,2*n+1),r.push(A||[],e+1,2*i+1,2*n),r.push(v||[],e+1,2*i+1,2*n+1)}}getTile(t,e,i){t=+t,e=+e,i=+i;const n=this.options,{extent:s,debug:o}=n;if(t<0||t>24)return null;const a=1<<t,r=Ws(t,e=e+a&a-1,i);if(this.tiles[r])return js(this.tiles[r],s);let h,l=t,c=e,u=i;for(;!h&&l>0;)l--,c>>=1,u>>=1,h=this.tiles[Ws(l,c,u)];return h&&h.source?(this.splitTile(h.source,l,c,u,t,e,i),this.tiles[r]?js(this.tiles[r],s):null):null}};function Ws(t,e,i){return 32*((1<<t)*i+e)+t}const Ks=L.GridLayer.extend({options:{async:!1},initialize:function(t,e){L.setOptions(this,e),L.GridLayer.prototype.initialize.call(this,e),this.tileIndex=function(t,e){return new Vs(t,e)}(t,this.options)},createTile:function(t){var e=L.DomUtil.create("canvas","leaflet-tile"),i=this.getTileSize();e.width=i.x,e.height=i.y;for(var n=e.getContext("2d"),s=this.tileIndex.getTile(t.z,t.x,t.y),o=s?s.features:[],a=0;a<o.length;a++){var r=o[a];this.drawFeature(n,r)}return e},drawFeature:function(t,e){e.type;var i=e.type;if(t.beginPath(),this.options.style&&(this.options.style instanceof Function?this.setStyle(t,this.options.style(e.tags)):this.setStyle(t,this.options.style)),2===i||3===i)for(var n=0;n<e.geometry.length;n++)for(var s=e.geometry[n],o=0;o<s.length;o++){var a=s[o];o?t.lineTo(a[0]/16,a[1]/16):t.moveTo(a[0]/16,a[1]/16)}else if(1===i)for(n=0;n<e.geometry.length;n++){a=e.geometry[n];t.arc(a[0]/16,a[1]/16,2,0,2*Math.PI,!0)}3===i&&t.fill(this.options.style.fillRule||"evenodd"),t.stroke()},setStyle:function(t,e){e.stroke,t.lineWidth=e.weight||5;var i=this.setOpacity(e.color,e.opacity);t.strokeStyle=i,e.fill,t.fillStyle=e.fillColor||"#03f";i=this.setOpacity(e.fillColor,e.fillOpacity);t.fillStyle=i},setOpacity:function(t,e){if(e){if((t=t||"#03f").iscolorHex()){var i=t.colorRgb();return"rgba("+i[0]+","+i[1]+","+i[2]+","+e+")"}return t}return t}});String.prototype.iscolorHex=function(){var t=this.toLowerCase();return/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)},String.prototype.colorRgb=function(){var t=this.toLowerCase();if(4===t.length){for(var e="#",i=1;i<4;i+=1)e+=t.slice(i,i+1).concat(t.slice(i,i+1));t=e}var n=[];for(i=1;i<7;i+=2)n.push(parseInt("0x"+t.slice(i,i+2)));return n},(t=>{const i=Object.create(L)||{};i.LANG=_,i.BaseMap=L.Map.extend({options:{doubleClickZoom:!1,closePopupOnClick:!1,zoomControl:!1,attributionControl:!1,scaleControl:{show:!0},rotate:!1,rotateControl:!1,minZoom:5,maxZoom:19,contextmenu:!0,center:[0,0],zoom:17},initialize(i,n={},s){var o;if("string"==typeof i&&(i=document.getElementById(i)),!i instanceof HTMLElement||!i.clientWidth||!i.clientHeight)throw new Error("地图容器不存在或元素尺寸为0");this.lang="string"==typeof n.lang?n.lang:"zh_CN",this.clsPrefix="string"==typeof n.clsPrefix?n.clsPrefix:"gis2d",function(t){const e=document.createElement("style"),i=document.head||document.documentElement;e.innerHTML=`\n\t.${t}-statusbar {\n\t\tdisplay: flex;\n\t\tcolor: #fff;\n\t\theight: 26px;\n\t\tpadding: 0 10px;\n\t\tline-height: 26px;\n\t\tmargin: 0;\n\t\tletter-spacing: 1px;\n\t\ttext-shadow: 0 0 2px #fff;\n\t\tborder: 1px solid #999;\n\t\tborder-top: none;\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t}\n\t.${t}-statusbar-item + .${t}-statusbar-item {\n\t\tmargin-left: 10px\n\t}\n\t.${t}-eaglemap {\n\t\tborder: solid rgba(13, 59, 54, 0.85) 1px;\n\t\tbox-shadow: 0 1px 7px #999;\n\t\tbackground: rgba(13, 59, 54, 0.85);\n\t\t-moz-border-radius: 8px;\n\t\t-webkit-border-radius: 8px;\n\t\tborder-radius: 3px;\n\t\ttransition: all 0.5s;\n\t}\n\n\t.${t}-eaglemap a {\n\t\tbackground-color: rgba(13, 59, 54, 0.85);\n\t\tbackground-position: -1px -1px;\n\t\tbackground-repeat: no-repeat;\n\t\tdisplay: block;\n\t\toutline: none;\n\t\tz-index: 99999;\n\t\ttransition: all 0.2s;\n\t}\n\n\t.${t}-eaglemap a.minimized {\n\t\t-webkit-transform: rotate(180deg);\n\t\ttransform: rotate(180deg);\n\t}\n\n\t.${t}-eaglemap a.minimized-bottomright {\n\t\t-webkit-transform: rotate(180deg);\n\t\ttransform: rotate(180deg);\n\t\tborder-radius: 0px;\n\t}\n\n\t.${t}-eaglemap a.minimized-topleft {\n\t\t-webkit-transform: rotate(0deg);\n\t\ttransform: rotate(0deg);\n\t\tborder-radius: 0px;\n\t}\n\t.${t}-eaglemap a.minimized-bottomleft {\n\t\t-webkit-transform: rotate(270deg);\n\t\ttransform: rotate(270deg);\n\t\tborder-radius: 0px;\n\t}\n\t.${t}-eaglemap a.minimized-topright {\n\t\t-webkit-transform: rotate(90deg);\n\t\ttransform: rotate(90deg);\n\t\tborder-radius: 0px;\n\t}\n\t.${t}-eaglemap-toggle-display {\n\t\tbackground-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAMdJREFUOE/V0zEOQVEQheH/hMQqVDahREMreonKApCgUYkE67ANOhWJxga0WoXqyEuehBeP+0Lj1iffzNzMiB89/cjhTyDbOSAv6Ro6+svRbLeALtCUdElitgvJImnQFigDO6Ah6XzHbJeAiaT2Y4E0aAYM4+AeqEeY7SKwBk6Sqh+hKGB7Cozj8BHoACsg6mgTDMXYAJi/+PBsUIxFo1QSWDbI9hLofdWR7QXQT9mjsI5s14DRm2U8SHoq8ie3FnpfQQuZFbsB4idCE9J/7MkAAAAASUVORK5CYII=');\n\t\tbackground-size: cover;\n\t\tposition: absolute;\n\t\tborder-radius: 3px 0px 0px 0px;\n\t}\n\t.${t}-eaglemap-toggle-display-bottomright {\n\t\tbottom: 0;\n\t\tright: 0;\n\t}\n\t.${t}-eaglemap-toggle-display-topleft {\n\t\ttop: 0;\n\t\tleft: 0;\n\t\t-webkit-transform: rotate(180deg);\n\t\ttransform: rotate(180deg);\n\t}\n\t.${t}-eaglemap-toggle-display-bottomleft {\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\t-webkit-transform: rotate(90deg);\n\t\ttransform: rotate(90deg);\n\t}\n\t.${t}-eaglemap-toggle-display-topright {\n\t\ttop: 0;\n\t\tright: 0;\n\t\t-webkit-transform: rotate(270deg);\n\t\ttransform: rotate(270deg);\n\t}\n\t.${t}-contextmenu {\n\t\tdisplay: none;\n\t\tbox-shadow: 0 1px 7px rgba(0, 0, 0, 0.4);\n\t\t-webkit-border-radius: 4px;\n\t\tborder-radius: 4px;\n\t\tpadding: 4px 0;\n\t\tbackground-color: #fff;\n\t\tcursor: default;\n\t\t-webkit-user-select: none;\n\t\t-moz-user-select: none;\n\t\tuser-select: none;\n\t}\n\t.${t}-contextmenu a.${t}-contextmenu-item {\n\t\tdisplay: block;\n\t\tcolor: #222;\n\t\tfont-size: 12px;\n\t\tline-height: 20px;\n\t\ttext-decoration: none;\n\t\tpadding: 0 12px;\n\t\tborder-top: 1px solid transparent;\n\t\tborder-bottom: 1px solid transparent;\n\t\tcursor: default;\n\t\toutline: none;\n\t}\n\t.${t}-contextmenu a.${t}-contextmenu-item-disabled {\n\t\topacity: 0.5;\n\t}\n\t.${t}-contextmenu a.${t}-contextmenu-item.over {\n\t\tbackground-color: #f4f4f4;\n\t\tborder-top: 1px solid #f0f0f0;\n\t\tborder-bottom: 1px solid #f0f0f0;\n\t}\n\t.${t}-contextmenu a.${t}-contextmenu-item-disabled.over {\n\t\tbackground-color: inherit;\n\t\tborder-top: 1px solid transparent;\n\t\tborder-bottom: 1px solid transparent;\n\t}\n\t.${t}-contextmenu-icon {\n\t\tmargin: 2px 8px 0 0;\n\t\twidth: 16px;\n\t\theight: 16px;\n\t\tfloat: left;\n\t\tborder: 0;\n\t}\n\t.${t}-contextmenu-separator {\n\t\tborder-bottom: 1px solid #ccc;\n\t\tmargin: 5px 0;\n\t}\n\t.${t}-pulse-icon {\n\t\tdisplay: inline-block;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 100%;\n\t\tposition: relative;\n\t\tbox-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.1);\n\t}\n\t.${t}-dive-icon {\n\t\tcontent: '';\n\t\tborder-radius: 100%;\n\t\theight: 200%;\n\t\twidth: 200%;\n\t\tposition: absolute;\n\t\tmargin: -50% 0 0 -50%;\n\t}\n\t@keyframes pulsate {\n\t\t0% {\n\t\t\ttransform: scale(0.1, 0.1);\n\t\t\topacity: 0;\n\t\t\t-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)';\n\t\t\tfilter: alpha(opacity=0);\n\t\t}\n\t\t50% {\n\t\t\topacity: 1;\n\t\t\t-ms-filter: none;\n\t\t\tfilter: none;\n\t\t}\n\t\t100% {\n\t\t\ttransform: scale(1.2, 1.2);\n\t\t\topacity: 0;\n\t\t\t-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)';\n\t\t\tfilter: alpha(opacity=0);\n\t\t}\n\t}\n\t`,i.appendChild(e)}(this.clsPrefix),L.Util.setOptions(this,n),L.Layer.mergeOptions({clsPrefix:this.clsPrefix,cached:!1}),L.Control.mergeOptions({clsPrefix:this.clsPrefix}),L.Control.Zoom.mergeOptions({position:(null==(o=this.options.zoomControl)?void 0:o.position)||"topleft",zoomInTitle:_[this.lang].zoomIn,zoomOutTitle:_[this.lang].zoomOut}),this.layerMap=new e.HashMap,L.Map.prototype.initialize.call(this,i,this.options),this.on("layeradd",t=>{t.layer.options.cached&&this.layerMap.set(t.layer._leaflet_id,t.layer)}),L.DomEvent.on(this._container,"click",t=>{var e;const i=this._container.querySelector(".add");i&&(i.style.display="none"),null==(e=this.contextmenu)||e.hide()},this),n.debug?(document.onselectstart=()=>n.debug.allowSelect,i.oncontextmenu=()=>n.debug.allowContextmenu,document.onkeydown=function(t){if(t&&123===t.keyCode)return n.debug.allowDevtool}):"development"!==process.env.NODE_ENV&&(document.onkeydown=function(t){if(t&&123===t.keyCode)return!1},i.oncontextmenu=()=>!1),t[s||"$m"]=this},getCursor(){return this.getContainer().style.cursor||"default"},setCursor(t="default"){const e=this.getContainer();["auto","pointer","crosshair","move","text","wait","help","grab","default"].includes(t)?e.style.cursor=`${t}`:e.style.cursor="draw"===t?"url(data:application/octet-stream;base64,AAACAAEAEBAAAAMABgBoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AACxAAAs6/oAAIKEAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQUAAAAAAAAAAAAAAAAAAAUFBQAAAAAAAAAAAAAAAAAFAwQAAAAAAAAAAAAAAAAAAAMDBAAAAAAAAAEBAQAAAAADAwQAAAAAAAABAQEAAAAAAAMDBAQAAAAAAQEBAAAAAAADAwIAAAAAAAAAAAAAAAAAAAIBAQAAAAAAAAAAAAAAAAABAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAA/v8AAP4/AAD+HwAA/g8AAP4PAAD+BwAAxwcAAMcDAADHgwAA/8EAAP/BAAD/5wAA//8AAP//AAA=), auto":`url(${t}), auto`},setBackground:function(t){const i=this.getContainer();e.Color.isColor(t)?i.style.background=t:i.style.background=t?`url(${t}), no-repeat center center / cover`:"inherit"},flyTo(t,e=0,i={animate:!1}){t instanceof L.Marker?(t=t._latlng,L.Map.prototype.flyTo.call(this,t,e||this.getZoom(),i)):t instanceof L.Path||t instanceof L.FeatureGroup?(t=t.getBounds(),L.Map.prototype.flyToBounds.call(this,t,i)):L.Map.prototype.flyTo.call(this,t,e||this.getZoom(),i)},getLayer(t){return this._layers[t]},getLayers(){return Object.values(this._layers)},setLayerVisible(t,e){const i=this.layerMap.get(t);!i||!0!==e&&!1!==e||(e?i.addTo(this):i.remove())},getScaleDistance(){var t=this.getSize().x/2,e=this.getSize().y/2,i=96/2.54,n=L.point(t-i/2,e),s=L.point(t+i/2,e),o=this.containerPointToLatLng(n),a=this.containerPointToLatLng(s);return this.distance(o,a)},openWidget(t,e={},i={},n={}){this.fire("widget-mount",{name:t,options:e,events:{onClose:()=>this.closeWidget(t),...i},config:n})},closeWidget(t){this.fire("widget-unmount",{name:t})},closeAllWidget(){this.fire("widget-destory")}}),i.StatusBar=m,i.CRS.BaiDu=an,i.WebMercatorTiledLayer=Xn,i.BlinkMarker=Wn,i.CanvasMarker=Kn,i.HeatLayer=Qn,i.WMTS=ts,i.WMS=es,i.Knob=ss,i.Draw=ds,i.ContextMenu=_s,i.KeyBoard=ys,i.EagleMap=g,i.LayerManager=As,i.ImageOverlay.Rotated=Yn,i.Text=Vn,i.VertexMarkers=f,i.Measurement=y,i.Symbol=ps,i.PolylineDecorator=us,i.RadarCircle=cn,i.Plot=qn,i.GeoJSON.VT=Ks,t.L=i})(window),t.BaiDuCRS=an,t.BlinkMarker=Wn,t.CanvasMarker=Kn,t.CircleMaterialType=ln,t.ContextMenu=_s,t.Draw=ds,t.EagleMap=g,t.KeyBoard=ys,t.Knob=ss,t.LayerManager=As,t.MeasureMent=y,t.Plot=qn,t.RadarCircle=cn,t.StatusBar=m,t.TextMarker=Vn,t.VertexMarker=f,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});