xy-map 1.1.72 → 1.1.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/xy-map.common.js +24 -21
- package/xy-map.umd.js +24 -21
- package/xy-map.umd.min.js +3 -3
package/xy-map.umd.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue")):"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["xy-map"]=e(require("vue")):t["xy-map"]=e(t["Vue"])})("undefined"!==typeof self?self:this,(function(t){return function(){var e={1627:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=s()(r());a.push([t.id,":-webkit-full-screen .d[data-v-7e84ad1e]{color:red}:fullscreen .d[data-v-7e84ad1e]{color:red}",""]),e["default"]=a},8294:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=s()(r());a.push([t.id,".mapLoad[data-v-fa3ebcb8]{position:absolute;width:100%;height:100%;top:0;left:0;background-color:#d5f2fd;z-index:99999999;transition:all .5s;opacity:1;overflow:hidden}.loadOver[data-v-fa3ebcb8]{opacity:0;pointer-events:none}.progress-wrap[data-v-fa3ebcb8]{width:100%;height:12px;border-radius:8px;position:relative}.progress-inner[data-v-fa3ebcb8]{height:inherit;background:rgba(142,193,255,.2);border-radius:8px}.progress-nums[data-v-fa3ebcb8]{height:inherit;border-radius:6px;background:repeating-linear-gradient(-45deg,#008bdd 25%,#49beff 0,#49beff 50%,#008bdd 0,#008bdd 75%,#49beff 0);background-size:16px 16px;animation:panoramic-fa3ebcb8 30s linear infinite}@keyframes panoramic-fa3ebcb8{to{background-position:200% 0}}",""]),e["default"]=a},8475:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=s()(r());a.push([t.id,".snow[data-v-20664206]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;background-color:rgba(145,147,184,.103)}",""]),e["default"]=a},6918:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=s()(r());a.push([t.id,".tools[data-v-75551f36]{position:absolute;left:0;top:0;margin:15px;background-color:hsla(0,0%,100%,.9);padding:14px;border-radius:5px}.tools .tools-bar[data-v-75551f36]{cursor:pointer}.right-fixed[data-v-75551f36]{position:absolute;right:0;top:0;margin:15px}.split-tooltip[data-v-75551f36]{position:fixed;background-color:rgba(0,0,0,.8);color:#fff;padding:5px 10px;border-radius:4px;font-size:12px;pointer-events:none;z-index:1000}",""]),e["default"]=a},351:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=s()(r());a.push([t.id,".upload[data-v-5a5f8c5d]{position:relative}.upload input[data-v-5a5f8c5d]{position:absolute;width:100%;height:100%;left:0;top:0;opacity:0}",""]),e["default"]=a},4963:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=s()(r());a.push([t.id,".upload[data-v-7858f34f]{position:relative}.upload input[data-v-7858f34f]{position:absolute;width:100%;height:100%;left:0;top:0;opacity:0}",""]),e["default"]=a},2125:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=n(1979),l=n.n(a),c=new URL(n(192),n.b),u=new URL(n(263),n.b),h=new URL(n(4363),n.b),d=new URL(n(2780),n.b),A=new URL(n(4947),n.b),p=new URL(n(1706),n.b),f=s()(r()),g=l()(c),m=l()(u),_=l()(h),y=l()(d),v=l()(A),x=l()(p);f.push([t.id,".mapbox-gl-draw_ctrl-bottom-left,.mapbox-gl-draw_ctrl-top-left{margin-left:0;border-radius:0 4px 4px 0}.mapbox-gl-draw_ctrl-bottom-right,.mapbox-gl-draw_ctrl-top-right{margin-right:0;border-radius:4px 0 0 4px}.mapbox-gl-draw_ctrl-draw{background-color:rgba(0,0,0,.75);border-color:rgba(0,0,0,.9)}.mapbox-gl-draw_ctrl-draw>button{border-color:rgba(0,0,0,.9);color:hsla(0,0%,100%,.5);width:30px;height:30px}.mapbox-gl-draw_ctrl-draw>button:hover{background-color:rgba(0,0,0,.85);color:hsla(0,0%,100%,.75)}.mapbox-gl-draw_ctrl-draw>button.active,.mapbox-gl-draw_ctrl-draw>button.active:hover{background-color:rgba(0,0,0,.95);color:#fff}.mapbox-gl-draw_ctrl-draw-btn{background-repeat:no-repeat;background-position:50%}.mapbox-gl-draw_point{background-image:url("+g+")}.mapbox-gl-draw_polygon{background-image:url("+m+")}.mapbox-gl-draw_line{background-image:url("+_+")}.mapbox-gl-draw_trash{background-image:url("+y+")}.mapbox-gl-draw_uncombine{background-image:url("+v+")}.mapbox-gl-draw_combine{background-image:url("+x+")}.mapboxgl-map.mouse-pointer .mapboxgl-canvas-container.mapboxgl-interactive{cursor:pointer}.mapboxgl-map.mouse-move .mapboxgl-canvas-container.mapboxgl-interactive{cursor:move}.mapboxgl-map.mouse-add .mapboxgl-canvas-container.mapboxgl-interactive{cursor:crosshair}.mapboxgl-map.mouse-move.mode-direct_select .mapboxgl-canvas-container.mapboxgl-interactive{cursor:grab;cursor:-webkit-grab}.mapboxgl-map.mode-direct_select.feature-vertex.mouse-move .mapboxgl-canvas-container.mapboxgl-interactive{cursor:move}.mapboxgl-map.mode-direct_select.feature-midpoint.mouse-pointer .mapboxgl-canvas-container.mapboxgl-interactive{cursor:cell}.mapboxgl-map.mode-direct_select.feature-feature.mouse-move .mapboxgl-canvas-container.mapboxgl-interactive{cursor:move}.mapboxgl-map.mode-static.mouse-pointer .mapboxgl-canvas-container.mapboxgl-interactive{cursor:grab;cursor:-webkit-grab}.mapbox-gl-draw_boxselect{pointer-events:none;position:absolute;top:0;left:0;width:0;height:0;background:rgba(0,0,0,.1);border:2px dotted #fff;opacity:.5}",""]),e["default"]=f},6646:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=n(1979),l=n.n(a),c=new URL(n(7673),n.b),u=new URL(n(1570),n.b),h=new URL(n(6807),n.b),d=new URL(n(28),n.b),A=new URL(n(325),n.b),p=new URL(n(242),n.b),f=new URL(n(2931),n.b),g=new URL(n(752),n.b),m=new URL(n(323),n.b),_=new URL(n(551),n.b),y=new URL(n(1045),n.b),v=new URL(n(4871),n.b),x=new URL(n(3598),n.b),b=new URL(n(6043),n.b),w=new URL(n(4055),n.b),E=new URL(n(5758),n.b),C=new URL(n(3895),n.b),B=new URL(n(407),n.b),S=new URL(n(926),n.b),M=new URL(n(4943),n.b),T=new URL(n(6871),n.b),I=new URL(n(2154),n.b),L=new URL(n(9843),n.b),P=new URL(n(9920),n.b),F=new URL(n(4529),n.b),R=new URL(n(3939),n.b),D=new URL(n(5929),n.b),O=new URL(n(4026),n.b),U=new URL(n(2179),n.b),N=s()(r()),k=l()(c),z=l()(u),Q=l()(h),G=l()(d),H=l()(A),V=l()(p),j=l()(f),Z=l()(g),W=l()(m),X=l()(_),K=l()(y),q=l()(v),J=l()(x),Y=l()(b),$=l()(w),tt=l()(E),et=l()(C),nt=l()(B),it=l()(S),rt=l()(M),ot=l()(T),st=l()(I),at=l()(L),lt=l()(P),ct=l()(F),ut=l()(R),ht=l()(D),dt=l()(O),At=l()(U);N.push([t.id,".mapboxgl-map{-webkit-tap-highlight-color:rgb(0 0 0/0);font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative}.mapboxgl-canvas{left:0;position:absolute;top:0}.mapboxgl-map:-webkit-full-screen{height:100%;width:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer{cursor:pointer}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active{cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.mapboxgl-ctrl-top-left{left:0;top:0}.mapboxgl-ctrl-top-right{right:0;top:0}.mapboxgl-ctrl-bottom-left{bottom:0;left:0}.mapboxgl-ctrl-bottom-right{bottom:0;right:0}.mapboxgl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{float:left;margin:10px 0 0 10px}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{float:right;margin:10px 10px 0 0}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{float:left;margin:0 0 10px 10px}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{float:right;margin:0 10px 10px 0}.mapboxgl-ctrl-group{background:#fff;border-radius:4px}.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (-ms-high-contrast:active){.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.mapboxgl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;overflow:hidden;padding:0;width:29px}.mapboxgl-ctrl-group button+button{border-top:1px solid #ddd}.mapboxgl-ctrl button .mapboxgl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (-ms-high-contrast:active){.mapboxgl-ctrl-icon{background-color:transparent}.mapboxgl-ctrl-group button+button{border-top:1px solid ButtonText}}.mapboxgl-ctrl-attrib-button:focus,.mapboxgl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl button:disabled{cursor:not-allowed}.mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon{opacity:.25}.mapboxgl-ctrl-group button:first-child{border-radius:4px 4px 0 0}.mapboxgl-ctrl-group button:last-child{border-radius:0 0 4px 4px}.mapboxgl-ctrl-group button:only-child{border-radius:inherit}.mapboxgl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.mapboxgl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("+k+")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("+z+")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("+Q+")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("+G+")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("+H+")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("+V+")}}.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("+j+")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("+Z+")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("+W+")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("+X+")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("+K+")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("+Z+")}}.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("+q+")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("+J+")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("+Y+")}}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("+$+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("+tt+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("+et+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("+nt+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("+it+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("+rt+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting .mapboxgl-ctrl-icon{animation:mapboxgl-spin 2s linear infinite}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("+ot+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("+st+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("+et+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("+nt+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("+it+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("+rt+")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("+at+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("+lt+")}}@keyframes mapboxgl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.mapboxgl-ctrl-logo{background-image:url("+ct+");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:23px}@media (-ms-high-contrast:active){a.mapboxgl-ctrl-logo{background-color:transparent;background-image:url("+ut+")}}@media (-ms-high-contrast:black-on-white){a.mapboxgl-ctrl-logo{background-image:url("+ht+")}}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{background-color:#fff;border-radius:12px;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("+dt+");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-top-left .mapboxgl-ctrl-attrib-button{left:0}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{right:0;top:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{left:0;top:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("+At+")}}@media screen and (-ms-high-contrast:black-on-white){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("+dt+')}}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.mapboxgl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{flex-direction:column-reverse}.mapboxgl-popup-anchor-left{flex-direction:row}.mapboxgl-popup-anchor-right{flex-direction:row-reverse}.mapboxgl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.mapboxgl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.mapboxgl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.mapboxgl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto;position:relative}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-popup-track-pointer{display:none}.mapboxgl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.mapboxgl-map:hover .mapboxgl-popup-track-pointer{display:flex}.mapboxgl-map:active .mapboxgl-popup-track-pointer{display:none}.mapboxgl-marker{left:0;opacity:1;position:absolute;top:0;transition:opacity .2s;will-change:transform}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.mapboxgl-user-location-dot:before{animation:mapboxgl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.mapboxgl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading{height:0;width:0}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:after,.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:before{border-bottom:7.5px solid #4aa1eb;content:"";position:absolute}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:before{border-left:7.5px solid transparent;transform:translateY(-28px) skewY(-20deg)}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:after{border-right:7.5px solid transparent;transform:translate(7.5px,-28px) skewY(20deg)}@keyframes mapboxgl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}@media print{.mapbox-improve-map{display:none}}.mapboxgl-scroll-zoom-blocker,.mapboxgl-touch-pan-blocker{align-items:center;background:rgba(0,0,0,.7);color:#fff;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;height:100%;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;text-align:center;top:0;transition:opacity .75s ease-in-out;transition-delay:1s;width:100%}.mapboxgl-scroll-zoom-blocker-show,.mapboxgl-touch-pan-blocker-show{opacity:1;transition:opacity .1s ease-in-out}.mapboxgl-canvas-container.mapboxgl-touch-pan-blocker-override.mapboxgl-scrollable-page,.mapboxgl-canvas-container.mapboxgl-touch-pan-blocker-override.mapboxgl-scrollable-page .mapboxgl-canvas{touch-action:pan-x pan-y}',""]),e["default"]=N},8841:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=s()(r());a.push([t.id,".xy-hover-html .hover-item{display:flex}.xy-hover-html .hover-item .label{width:80px}.xy-hover-html .hover-item .value{flex:1}.xy-hover-html .waring-color{color:#e6a23c}.xy-hover-html .success-color{color:#67c23a}.xy-hover-html .error-color{color:#f56c6c}.xy-hover-html .info-color{color:#909399}",""]),e["default"]=a},2716:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=s()(r());a.push([t.id,".mapboxgl-ctrl-attrib{display:none}.mapboxgl-ctrl-logo{display:none!important}",""]),e["default"]=a},1374:function(t,e,n){!function(e,n){t.exports=n()}(0,(function(){"use strict";var t=function(t,e){var n={drag:[],click:[],mousemove:[],mousedown:[],mouseup:[],mouseout:[],keydown:[],keyup:[],touchstart:[],touchmove:[],touchend:[],tap:[]},i={on:function(t,e,i){if(void 0===n[t])throw new Error("Invalid event type: "+t);n[t].push({selector:e,fn:i})},render:function(t){e.store.featureChanged(t)}},r=function(t,r){for(var o=n[t],s=o.length;s--;){var a=o[s];if(a.selector(r)){a.fn.call(i,r)||e.store.render(),e.ui.updateMapClasses();break}}};return t.start.call(i),{render:t.render,stop:function(){t.stop&&t.stop()},trash:function(){t.trash&&(t.trash(),e.store.render())},combineFeatures:function(){t.combineFeatures&&t.combineFeatures()},uncombineFeatures:function(){t.uncombineFeatures&&t.uncombineFeatures()},drag:function(t){r("drag",t)},click:function(t){r("click",t)},mousemove:function(t){r("mousemove",t)},mousedown:function(t){r("mousedown",t)},mouseup:function(t){r("mouseup",t)},mouseout:function(t){r("mouseout",t)},keydown:function(t){r("keydown",t)},keyup:function(t){r("keyup",t)},touchstart:function(t){r("touchstart",t)},touchmove:function(t){r("touchmove",t)},touchend:function(t){r("touchend",t)},tap:function(t){r("tap",t)}}},e=6378137;function i(t){var e=0;if(t&&t.length>0){e+=Math.abs(r(t[0]));for(var n=1;n<t.length;n++)e-=Math.abs(r(t[n]))}return e}function r(t){var n,i,r,s,a,l,c=0,u=t.length;if(u>2){for(l=0;l<u;l++)l===u-2?(r=u-2,s=u-1,a=0):l===u-1?(r=u-1,s=0,a=1):(r=l,s=l+1,a=l+2),n=t[r],i=t[s],c+=(o(t[a][0])-o(n[0]))*Math.sin(o(i[1]));c=c*e*e/2}return c}function o(t){return t*Math.PI/180}var s={geometry:function t(e){var n,r=0;switch(e.type){case"Polygon":return i(e.coordinates);case"MultiPolygon":for(n=0;n<e.coordinates.length;n++)r+=i(e.coordinates[n]);return r;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(n=0;n<e.geometries.length;n++)r+=t(e.geometries[n]);return r}},ring:r},a="mapboxgl-ctrl",l="mapbox-gl-draw_ctrl-draw-btn",c="mapbox-gl-draw_line",u="mapbox-gl-draw_polygon",h="mapbox-gl-draw_point",d="mapbox-gl-draw_trash",A="mapbox-gl-draw_combine",p="mapbox-gl-draw_uncombine",f="mapboxgl-ctrl-group",g="active",m="mapbox-gl-draw_boxselect",_="mapbox-gl-draw-hot",y="mapbox-gl-draw-cold",v="add",x="move",b="drag",w="pointer",E="none",C={POLYGON:"polygon",LINE:"line_string",POINT:"point"},B="Feature",S="Polygon",M="LineString",T="Point",I="FeatureCollection",L="Multi",P="MultiPoint",F="MultiLineString",R="MultiPolygon",D={DRAW_LINE_STRING:"draw_line_string",DRAW_POLYGON:"draw_polygon",DRAW_POINT:"draw_point",SIMPLE_SELECT:"simple_select",DIRECT_SELECT:"direct_select",STATIC:"static"},O="draw.create",U="draw.delete",N="draw.update",k="draw.selectionchange",z="draw.modechange",Q="draw.actionable",G="draw.render",H="draw.combine",V="draw.uncombine",j="move",Z="change_coordinates",W="feature",X="midpoint",K="vertex",q="true",J="false",Y=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"],$={Point:0,LineString:1,Polygon:2};function tt(t,e){var n=$[t.geometry.type]-$[e.geometry.type];return 0===n&&t.geometry.type===S?t.area-e.area:n}function et(t){if(this._items={},this._nums={},this._length=t?t.length:0,t)for(var e=0,n=t.length;e<n;e++)this.add(t[e]),void 0!==t[e]&&("string"==typeof t[e]?this._items[t[e]]=e:this._nums[t[e]]=e)}et.prototype.add=function(t){return this.has(t)||(this._length++,"string"==typeof t?this._items[t]=this._length:this._nums[t]=this._length),this},et.prototype.delete=function(t){return!1===this.has(t)||(this._length--,delete this._items[t],delete this._nums[t]),this},et.prototype.has=function(t){return("string"==typeof t||"number"==typeof t)&&(void 0!==this._items[t]||void 0!==this._nums[t])},et.prototype.values=function(){var t=this,e=[];return Object.keys(this._items).forEach((function(n){e.push({k:n,v:t._items[n]})})),Object.keys(this._nums).forEach((function(n){e.push({k:JSON.parse(n),v:t._nums[n]})})),e.sort((function(t,e){return t.v-e.v})).map((function(t){return t.k}))},et.prototype.clear=function(){return this._length=0,this._items={},this._nums={},this};var nt=[W,X,K],it={click:function(t,e,n){return rt(t,e,n,n.options.clickBuffer)},touch:function(t,e,n){return rt(t,e,n,n.options.touchBuffer)}};function rt(t,e,n,i){if(null===n.map)return[];var r=t?function(t,e){return void 0===e&&(e=0),[[t.point.x-e,t.point.y-e],[t.point.x+e,t.point.y+e]]}(t,i):e,o={};n.options.styles&&(o.layers=n.options.styles.map((function(t){return t.id})));var a=n.map.queryRenderedFeatures(r,o).filter((function(t){return-1!==nt.indexOf(t.properties.meta)})),l=new et,c=[];return a.forEach((function(t){var e=t.properties.id;l.has(e)||(l.add(e),c.push(t))})),function(t){return t.map((function(t){return t.geometry.type===S&&(t.area=s.geometry({type:B,property:{},geometry:t.geometry})),t})).sort(tt).map((function(t){return delete t.area,t}))}(c)}function ot(t,e){var n=it.click(t,null,e),i={mouse:E};return n[0]&&(i.mouse=n[0].properties.active===q?x:w,i.feature=n[0].properties.meta),-1!==e.events.currentModeName().indexOf("draw")&&(i.mouse=v),e.ui.queueMapClasses(i),e.ui.updateMapClasses(),n[0]}function st(t,e){var n=t.x-e.x,i=t.y-e.y;return Math.sqrt(n*n+i*i)}function at(t,e,n){void 0===n&&(n={});var i=null!=n.fineTolerance?n.fineTolerance:4,r=null!=n.grossTolerance?n.grossTolerance:12,o=null!=n.interval?n.interval:500;t.point=t.point||e.point,t.time=t.time||e.time;var s=st(t.point,e.point);return s<i||s<r&&e.time-t.time<o}function lt(t,e,n){void 0===n&&(n={});var i=null!=n.tolerance?n.tolerance:25,r=null!=n.interval?n.interval:250;return t.point=t.point||e.point,t.time=t.time||e.time,st(t.point,e.point)<i&&e.time-t.time<r}function ct(t,e){return t(e={exports:{}},e.exports),e.exports}var ut=ct((function(t){var e=t.exports=function(t,n){if(n||(n=16),void 0===t&&(t=128),t<=0)return"0";for(var i=Math.log(Math.pow(2,t))/Math.log(n),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,t/r))/Math.log(n)*r;var o=i-Math.floor(i),s="";for(r=0;r<Math.floor(i);r++)s=Math.floor(Math.random()*n).toString(n)+s;if(o){var a=Math.pow(n,o);s=Math.floor(Math.random()*a).toString(n)+s}var l=parseInt(s,n);return l!==1/0&&l>=Math.pow(2,t)?e(t,n):s};e.rack=function(t,n,i){var r=function(r){var s=0;do{if(s++>10){if(!i)throw new Error("too many ID collisions, use more bits");t+=i}var a=e(t,n)}while(Object.hasOwnProperty.call(o,a));return o[a]=r,a},o=r.hats={};return r.get=function(t){return r.hats[t]},r.set=function(t,e){return r.hats[t]=e,r},r.bits=t||128,r.base=n||16,r}})),ht=function(t,e){this.ctx=t,this.properties=e.properties||{},this.coordinates=e.geometry.coordinates,this.id=e.id||ut(),this.type=e.geometry.type};ht.prototype.changed=function(){this.ctx.store.featureChanged(this.id)},ht.prototype.incomingCoords=function(t){this.setCoordinates(t)},ht.prototype.setCoordinates=function(t){this.coordinates=t,this.changed()},ht.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.coordinates))},ht.prototype.setProperty=function(t,e){this.properties[t]=e},ht.prototype.toGeoJSON=function(){return JSON.parse(JSON.stringify({id:this.id,type:B,properties:this.properties,geometry:{coordinates:this.getCoordinates(),type:this.type}}))},ht.prototype.internal=function(t){var e={id:this.id,meta:W,"meta:type":this.type,active:J,mode:t};if(this.ctx.options.userProperties)for(var n in this.properties)e["user_"+n]=this.properties[n];return{type:B,properties:e,geometry:{coordinates:this.getCoordinates(),type:this.type}}};var dt=function(t,e){ht.call(this,t,e)};(dt.prototype=Object.create(ht.prototype)).isValid=function(){return"number"==typeof this.coordinates[0]&&"number"==typeof this.coordinates[1]},dt.prototype.updateCoordinate=function(t,e,n){this.coordinates=3===arguments.length?[e,n]:[t,e],this.changed()},dt.prototype.getCoordinate=function(){return this.getCoordinates()};var At=function(t,e){ht.call(this,t,e)};(At.prototype=Object.create(ht.prototype)).isValid=function(){return this.coordinates.length>1},At.prototype.addCoordinate=function(t,e,n){this.changed();var i=parseInt(t,10);this.coordinates.splice(i,0,[e,n])},At.prototype.getCoordinate=function(t){var e=parseInt(t,10);return JSON.parse(JSON.stringify(this.coordinates[e]))},At.prototype.removeCoordinate=function(t){this.changed(),this.coordinates.splice(parseInt(t,10),1)},At.prototype.updateCoordinate=function(t,e,n){var i=parseInt(t,10);this.coordinates[i]=[e,n],this.changed()};var pt=function(t,e){ht.call(this,t,e),this.coordinates=this.coordinates.map((function(t){return t.slice(0,-1)}))};(pt.prototype=Object.create(ht.prototype)).isValid=function(){return 0!==this.coordinates.length&&this.coordinates.every((function(t){return t.length>2}))},pt.prototype.incomingCoords=function(t){this.coordinates=t.map((function(t){return t.slice(0,-1)})),this.changed()},pt.prototype.setCoordinates=function(t){this.coordinates=t,this.changed()},pt.prototype.addCoordinate=function(t,e,n){this.changed();var i=t.split(".").map((function(t){return parseInt(t,10)}));this.coordinates[i[0]].splice(i[1],0,[e,n])},pt.prototype.removeCoordinate=function(t){this.changed();var e=t.split(".").map((function(t){return parseInt(t,10)})),n=this.coordinates[e[0]];n&&(n.splice(e[1],1),n.length<3&&this.coordinates.splice(e[0],1))},pt.prototype.getCoordinate=function(t){var e=t.split(".").map((function(t){return parseInt(t,10)})),n=this.coordinates[e[0]];return JSON.parse(JSON.stringify(n[e[1]]))},pt.prototype.getCoordinates=function(){return this.coordinates.map((function(t){return t.concat([t[0]])}))},pt.prototype.updateCoordinate=function(t,e,n){this.changed();var i=t.split("."),r=parseInt(i[0],10),o=parseInt(i[1],10);void 0===this.coordinates[r]&&(this.coordinates[r]=[]),this.coordinates[r][o]=[e,n]};var ft={MultiPoint:dt,MultiLineString:At,MultiPolygon:pt},gt=function(t,e,n,i,r){var o=n.split("."),s=parseInt(o[0],10),a=o[1]?o.slice(1).join("."):null;return t[s][e](a,i,r)},mt=function(t,e){if(ht.call(this,t,e),delete this.coordinates,this.model=ft[e.geometry.type],void 0===this.model)throw new TypeError(e.geometry.type+" is not a valid type");this.features=this._coordinatesToFeatures(e.geometry.coordinates)};function _t(t){this.map=t.map,this.drawConfig=JSON.parse(JSON.stringify(t.options||{})),this._ctx=t}(mt.prototype=Object.create(ht.prototype))._coordinatesToFeatures=function(t){var e=this,n=this.model.bind(this);return t.map((function(t){return new n(e.ctx,{id:ut(),type:B,properties:{},geometry:{coordinates:t,type:e.type.replace("Multi","")}})}))},mt.prototype.isValid=function(){return this.features.every((function(t){return t.isValid()}))},mt.prototype.setCoordinates=function(t){this.features=this._coordinatesToFeatures(t),this.changed()},mt.prototype.getCoordinate=function(t){return gt(this.features,"getCoordinate",t)},mt.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.features.map((function(t){return t.type===S?t.getCoordinates():t.coordinates}))))},mt.prototype.updateCoordinate=function(t,e,n){gt(this.features,"updateCoordinate",t,e,n),this.changed()},mt.prototype.addCoordinate=function(t,e,n){gt(this.features,"addCoordinate",t,e,n),this.changed()},mt.prototype.removeCoordinate=function(t){gt(this.features,"removeCoordinate",t),this.changed()},mt.prototype.getFeatures=function(){return this.features},_t.prototype.setSelected=function(t){return this._ctx.store.setSelected(t)},_t.prototype.setSelectedCoordinates=function(t){var e=this;this._ctx.store.setSelectedCoordinates(t),t.reduce((function(t,n){return void 0===t[n.feature_id]&&(t[n.feature_id]=!0,e._ctx.store.get(n.feature_id).changed()),t}),{})},_t.prototype.getSelected=function(){return this._ctx.store.getSelected()},_t.prototype.getSelectedIds=function(){return this._ctx.store.getSelectedIds()},_t.prototype.isSelected=function(t){return this._ctx.store.isSelected(t)},_t.prototype.getFeature=function(t){return this._ctx.store.get(t)},_t.prototype.select=function(t){return this._ctx.store.select(t)},_t.prototype.deselect=function(t){return this._ctx.store.deselect(t)},_t.prototype.deleteFeature=function(t,e){return void 0===e&&(e={}),this._ctx.store.delete(t,e)},_t.prototype.addFeature=function(t){return this._ctx.store.add(t)},_t.prototype.clearSelectedFeatures=function(){return this._ctx.store.clearSelected()},_t.prototype.clearSelectedCoordinates=function(){return this._ctx.store.clearSelectedCoordinates()},_t.prototype.setActionableState=function(t){void 0===t&&(t={});var e={trash:t.trash||!1,combineFeatures:t.combineFeatures||!1,uncombineFeatures:t.uncombineFeatures||!1};return this._ctx.events.actionable(e)},_t.prototype.changeMode=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),this._ctx.events.changeMode(t,e,n)},_t.prototype.updateUIClasses=function(t){return this._ctx.ui.queueMapClasses(t)},_t.prototype.activateUIButton=function(t){return this._ctx.ui.setActiveButton(t)},_t.prototype.featuresAt=function(t,e,n){if(void 0===n&&(n="click"),"click"!==n&&"touch"!==n)throw new Error("invalid buffer type");return it[n](t,e,this._ctx)},_t.prototype.newFeature=function(t){var e=t.geometry.type;return e===T?new dt(this._ctx,t):e===M?new At(this._ctx,t):e===S?new pt(this._ctx,t):new mt(this._ctx,t)},_t.prototype.isInstanceOf=function(t,e){if(t===T)return e instanceof dt;if(t===M)return e instanceof At;if(t===S)return e instanceof pt;if("MultiFeature"===t)return e instanceof mt;throw new Error("Unknown feature class: "+t)},_t.prototype.doRender=function(t){return this._ctx.store.featureChanged(t)},_t.prototype.onSetup=function(){},_t.prototype.onDrag=function(){},_t.prototype.onClick=function(){},_t.prototype.onMouseMove=function(){},_t.prototype.onMouseDown=function(){},_t.prototype.onMouseUp=function(){},_t.prototype.onMouseOut=function(){},_t.prototype.onKeyUp=function(){},_t.prototype.onKeyDown=function(){},_t.prototype.onTouchStart=function(){},_t.prototype.onTouchMove=function(){},_t.prototype.onTouchEnd=function(){},_t.prototype.onTap=function(){},_t.prototype.onStop=function(){},_t.prototype.onTrash=function(){},_t.prototype.onCombineFeature=function(){},_t.prototype.onUncombineFeature=function(){},_t.prototype.toDisplayFeatures=function(){throw new Error("You must overwrite toDisplayFeatures")};var yt={drag:"onDrag",click:"onClick",mousemove:"onMouseMove",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseout:"onMouseOut",keyup:"onKeyUp",keydown:"onKeyDown",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",tap:"onTap"},vt=Object.keys(yt);function xt(t){var e=Object.keys(t);return function(n,i){void 0===i&&(i={});var r={},o=e.reduce((function(e,n){return e[n]=t[n],e}),new _t(n));return{start:function(){var e=this;r=o.onSetup(i),vt.forEach((function(n){var i,s=yt[n],a=function(){return!1};t[s]&&(a=function(){return!0}),e.on(n,a,(i=s,function(t){return o[i](r,t)}))}))},stop:function(){o.onStop(r)},trash:function(){o.onTrash(r)},combineFeatures:function(){o.onCombineFeatures(r)},uncombineFeatures:function(){o.onUncombineFeatures(r)},render:function(t,e){o.toDisplayFeatures(r,t,e)}}}}function bt(t){return[].concat(t).filter((function(t){return void 0!==t}))}function wt(){var t=this;if(!t.ctx.map||void 0===t.ctx.map.getSource(_))return l();var e=t.ctx.events.currentModeName();t.ctx.ui.queueMapClasses({mode:e});var n=[],i=[];t.isDirty?i=t.getAllIds():(n=t.getChangedIds().filter((function(e){return void 0!==t.get(e)})),i=t.sources.hot.filter((function(e){return e.properties.id&&-1===n.indexOf(e.properties.id)&&void 0!==t.get(e.properties.id)})).map((function(t){return t.properties.id}))),t.sources.hot=[];var r=t.sources.cold.length;t.sources.cold=t.isDirty?[]:t.sources.cold.filter((function(t){var e=t.properties.id||t.properties.parent;return-1===n.indexOf(e)}));var o=r!==t.sources.cold.length||i.length>0;function s(n,i){var r=t.get(n).internal(e);t.ctx.events.currentModeRender(r,(function(e){t.sources[i].push(e)}))}if(n.forEach((function(t){return s(t,"hot")})),i.forEach((function(t){return s(t,"cold")})),o&&t.ctx.map.getSource(y).setData({type:I,features:t.sources.cold}),t.ctx.map.getSource(_).setData({type:I,features:t.sources.hot}),t._emitSelectionChange&&(t.ctx.map.fire(k,{features:t.getSelected().map((function(t){return t.toGeoJSON()})),points:t.getSelectedCoordinates().map((function(t){return{type:B,properties:{},geometry:{type:T,coordinates:t.coordinates}}}))}),t._emitSelectionChange=!1),t._deletedFeaturesToEmit.length){var a=t._deletedFeaturesToEmit.map((function(t){return t.toGeoJSON()}));t._deletedFeaturesToEmit=[],t.ctx.map.fire(U,{features:a})}function l(){t.isDirty=!1,t.clearChangedIds()}l(),t.ctx.map.fire(G,{})}function Et(t){var e,n=this;this._features={},this._featureIds=new et,this._selectedFeatureIds=new et,this._selectedCoordinates=[],this._changedFeatureIds=new et,this._deletedFeaturesToEmit=[],this._emitSelectionChange=!1,this._mapInitialConfig={},this.ctx=t,this.sources={hot:[],cold:[]},this.render=function(){e||(e=requestAnimationFrame((function(){e=null,wt.call(n)})))},this.isDirty=!1}function Ct(t,e){var n=t._selectedCoordinates.filter((function(e){return t._selectedFeatureIds.has(e.feature_id)}));t._selectedCoordinates.length===n.length||e.silent||(t._emitSelectionChange=!0),t._selectedCoordinates=n}Et.prototype.createRenderBatch=function(){var t=this,e=this.render,n=0;return this.render=function(){n++},function(){t.render=e,n>0&&t.render()}},Et.prototype.setDirty=function(){return this.isDirty=!0,this},Et.prototype.featureChanged=function(t){return this._changedFeatureIds.add(t),this},Et.prototype.getChangedIds=function(){return this._changedFeatureIds.values()},Et.prototype.clearChangedIds=function(){return this._changedFeatureIds.clear(),this},Et.prototype.getAllIds=function(){return this._featureIds.values()},Et.prototype.add=function(t){return this.featureChanged(t.id),this._features[t.id]=t,this._featureIds.add(t.id),this},Et.prototype.delete=function(t,e){var n=this;return void 0===e&&(e={}),bt(t).forEach((function(t){n._featureIds.has(t)&&(n._featureIds.delete(t),n._selectedFeatureIds.delete(t),e.silent||-1===n._deletedFeaturesToEmit.indexOf(n._features[t])&&n._deletedFeaturesToEmit.push(n._features[t]),delete n._features[t],n.isDirty=!0)})),Ct(this,e),this},Et.prototype.get=function(t){return this._features[t]},Et.prototype.getAll=function(){var t=this;return Object.keys(this._features).map((function(e){return t._features[e]}))},Et.prototype.select=function(t,e){var n=this;return void 0===e&&(e={}),bt(t).forEach((function(t){n._selectedFeatureIds.has(t)||(n._selectedFeatureIds.add(t),n._changedFeatureIds.add(t),e.silent||(n._emitSelectionChange=!0))})),this},Et.prototype.deselect=function(t,e){var n=this;return void 0===e&&(e={}),bt(t).forEach((function(t){n._selectedFeatureIds.has(t)&&(n._selectedFeatureIds.delete(t),n._changedFeatureIds.add(t),e.silent||(n._emitSelectionChange=!0))})),Ct(this,e),this},Et.prototype.clearSelected=function(t){return void 0===t&&(t={}),this.deselect(this._selectedFeatureIds.values(),{silent:t.silent}),this},Et.prototype.setSelected=function(t,e){var n=this;return void 0===e&&(e={}),t=bt(t),this.deselect(this._selectedFeatureIds.values().filter((function(e){return-1===t.indexOf(e)})),{silent:e.silent}),this.select(t.filter((function(t){return!n._selectedFeatureIds.has(t)})),{silent:e.silent}),this},Et.prototype.setSelectedCoordinates=function(t){return this._selectedCoordinates=t,this._emitSelectionChange=!0,this},Et.prototype.clearSelectedCoordinates=function(){return this._selectedCoordinates=[],this._emitSelectionChange=!0,this},Et.prototype.getSelectedIds=function(){return this._selectedFeatureIds.values()},Et.prototype.getSelected=function(){var t=this;return this._selectedFeatureIds.values().map((function(e){return t.get(e)}))},Et.prototype.getSelectedCoordinates=function(){var t=this;return this._selectedCoordinates.map((function(e){return{coordinates:t.get(e.feature_id).getCoordinate(e.coord_path)}}))},Et.prototype.isSelected=function(t){return this._selectedFeatureIds.has(t)},Et.prototype.setFeatureProperty=function(t,e,n){this.get(t).setProperty(e,n),this.featureChanged(t)},Et.prototype.storeMapConfig=function(){var t=this;Y.forEach((function(e){t.ctx.map[e]&&(t._mapInitialConfig[e]=t.ctx.map[e].isEnabled())}))},Et.prototype.restoreMapConfig=function(){var t=this;Object.keys(this._mapInitialConfig).forEach((function(e){t._mapInitialConfig[e]?t.ctx.map[e].enable():t.ctx.map[e].disable()}))},Et.prototype.getInitialConfigValue=function(t){return void 0===this._mapInitialConfig[t]||this._mapInitialConfig[t]};var Bt=function(){for(var t=arguments,e={},n=0;n<arguments.length;n++){var i=t[n];for(var r in i)St.call(i,r)&&(e[r]=i[r])}return e},St=Object.prototype.hasOwnProperty,Mt=["mode","feature","mouse"];function Tt(e){var n=null,i=null,r={onRemove:function(){return e.map.off("load",r.connect),clearInterval(i),r.removeLayers(),e.store.restoreMapConfig(),e.ui.removeButtons(),e.events.removeEventListeners(),e.ui.clearMapClasses(),e.map=null,e.container=null,e.store=null,n&&n.parentNode&&n.parentNode.removeChild(n),n=null,this},connect:function(){e.map.off("load",r.connect),clearInterval(i),r.addLayers(),e.store.storeMapConfig(),e.events.addEventListeners()},onAdd:function(o){var s=o.fire;return o.fire=function(t,e){var n=arguments;return 1===s.length&&1!==arguments.length&&(n=[Bt({},{type:t},e)]),s.apply(o,n)},e.map=o,e.events=function(e){var n=Object.keys(e.options.modes).reduce((function(t,n){return t[n]=xt(e.options.modes[n]),t}),{}),i={},r={},o={},s=null,a=null;o.drag=function(t,n){n({point:t.point,time:(new Date).getTime()})?(e.ui.queueMapClasses({mouse:b}),a.drag(t)):t.originalEvent.stopPropagation()},o.mousedrag=function(t){o.drag(t,(function(t){return!at(i,t)}))},o.touchdrag=function(t){o.drag(t,(function(t){return!lt(r,t)}))},o.mousemove=function(t){if(1===(void 0!==t.originalEvent.buttons?t.originalEvent.buttons:t.originalEvent.which))return o.mousedrag(t);var n=ot(t,e);t.featureTarget=n,a.mousemove(t)},o.mousedown=function(t){i={time:(new Date).getTime(),point:t.point};var n=ot(t,e);t.featureTarget=n,a.mousedown(t)},o.mouseup=function(t){var n=ot(t,e);t.featureTarget=n,at(i,{point:t.point,time:(new Date).getTime()})?a.click(t):a.mouseup(t)},o.mouseout=function(t){a.mouseout(t)},o.touchstart=function(t){if(t.originalEvent.preventDefault(),e.options.touchEnabled){r={time:(new Date).getTime(),point:t.point};var n=it.touch(t,null,e)[0];t.featureTarget=n,a.touchstart(t)}},o.touchmove=function(t){if(t.originalEvent.preventDefault(),e.options.touchEnabled)return a.touchmove(t),o.touchdrag(t)},o.touchend=function(t){if(t.originalEvent.preventDefault(),e.options.touchEnabled){var n=it.touch(t,null,e)[0];t.featureTarget=n,lt(r,{time:(new Date).getTime(),point:t.point})?a.tap(t):a.touchend(t)}};var l=function(t){return!(8===t||46===t||t>=48&&t<=57)};function c(i,r,o){void 0===o&&(o={}),a.stop();var l=n[i];if(void 0===l)throw new Error(i+" is not valid");s=i;var c=l(e,r);a=t(c,e),o.silent||e.map.fire(z,{mode:i}),e.store.setDirty(),e.store.render()}o.keydown=function(t){"mapboxgl-canvas"===(t.srcElement||t.target).classList[0]&&(8!==t.keyCode&&46!==t.keyCode||!e.options.controls.trash?l(t.keyCode)?a.keydown(t):49===t.keyCode&&e.options.controls.point?c(D.DRAW_POINT):50===t.keyCode&&e.options.controls.line_string?c(D.DRAW_LINE_STRING):51===t.keyCode&&e.options.controls.polygon&&c(D.DRAW_POLYGON):(t.preventDefault(),a.trash()))},o.keyup=function(t){l(t.keyCode)&&a.keyup(t)},o.zoomend=function(){e.store.changeZoom()},o.data=function(t){if("style"===t.dataType){var n=e.setup,i=e.map,r=e.options,o=e.store;r.styles.some((function(t){return i.getLayer(t.id)}))||(n.addLayers(),o.setDirty(),o.render())}};var u={trash:!1,combineFeatures:!1,uncombineFeatures:!1};return{start:function(){s=e.options.defaultMode,a=t(n[s](e),e)},changeMode:c,actionable:function(t){var n=!1;Object.keys(t).forEach((function(e){if(void 0===u[e])throw new Error("Invalid action type");u[e]!==t[e]&&(n=!0),u[e]=t[e]})),n&&e.map.fire(Q,{actions:u})},currentModeName:function(){return s},currentModeRender:function(t,e){return a.render(t,e)},fire:function(t,e){o[t]&&o[t](e)},addEventListeners:function(){e.map.on("mousemove",o.mousemove),e.map.on("mousedown",o.mousedown),e.map.on("mouseup",o.mouseup),e.map.on("data",o.data),e.map.on("touchmove",o.touchmove),e.map.on("touchstart",o.touchstart),e.map.on("touchend",o.touchend),e.container.addEventListener("mouseout",o.mouseout),e.options.keybindings&&(e.container.addEventListener("keydown",o.keydown),e.container.addEventListener("keyup",o.keyup))},removeEventListeners:function(){e.map.off("mousemove",o.mousemove),e.map.off("mousedown",o.mousedown),e.map.off("mouseup",o.mouseup),e.map.off("data",o.data),e.map.off("touchmove",o.touchmove),e.map.off("touchstart",o.touchstart),e.map.off("touchend",o.touchend),e.container.removeEventListener("mouseout",o.mouseout),e.options.keybindings&&(e.container.removeEventListener("keydown",o.keydown),e.container.removeEventListener("keyup",o.keyup))},trash:function(t){a.trash(t)},combineFeatures:function(){a.combineFeatures()},uncombineFeatures:function(){a.uncombineFeatures()},getMode:function(){return s}}}(e),e.ui=function(t){var e={},n=null,i={mode:null,feature:null,mouse:null},r={mode:null,feature:null,mouse:null};function o(t){r=Bt(r,t)}function s(){var e,n;if(t.container){var o=[],s=[];Mt.forEach((function(t){r[t]!==i[t]&&(o.push(t+"-"+i[t]),null!==r[t]&&s.push(t+"-"+r[t]))})),o.length>0&&(e=t.container.classList).remove.apply(e,o),s.length>0&&(n=t.container.classList).add.apply(n,s),i=Bt(i,r)}}function m(t,e){void 0===e&&(e={});var i=document.createElement("button");return i.className=l+" "+e.className,i.setAttribute("title",e.title),e.container.appendChild(i),i.addEventListener("click",(function(i){if(i.preventDefault(),i.stopPropagation(),i.target===n)return _(),void e.onDeactivate();y(t),e.onActivate()}),!0),i}function _(){n&&(n.classList.remove(g),n=null)}function y(t){_();var i=e[t];i&&i&&"trash"!==t&&(i.classList.add(g),n=i)}return{setActiveButton:y,queueMapClasses:o,updateMapClasses:s,clearMapClasses:function(){o({mode:null,feature:null,mouse:null}),s()},addButtons:function(){var n=t.options.controls,i=document.createElement("div");return i.className=f+" "+a,n?(n[C.LINE]&&(e[C.LINE]=m(C.LINE,{container:i,className:c,title:"LineString tool "+(t.options.keybindings?"(l)":""),onActivate:function(){return t.events.changeMode(D.DRAW_LINE_STRING)},onDeactivate:function(){return t.events.trash()}})),n[C.POLYGON]&&(e[C.POLYGON]=m(C.POLYGON,{container:i,className:u,title:"Polygon tool "+(t.options.keybindings?"(p)":""),onActivate:function(){return t.events.changeMode(D.DRAW_POLYGON)},onDeactivate:function(){return t.events.trash()}})),n[C.POINT]&&(e[C.POINT]=m(C.POINT,{container:i,className:h,title:"Marker tool "+(t.options.keybindings?"(m)":""),onActivate:function(){return t.events.changeMode(D.DRAW_POINT)},onDeactivate:function(){return t.events.trash()}})),n.trash&&(e.trash=m("trash",{container:i,className:d,title:"Delete",onActivate:function(){t.events.trash()}})),n.combine_features&&(e.combine_features=m("combineFeatures",{container:i,className:A,title:"Combine",onActivate:function(){t.events.combineFeatures()}})),n.uncombine_features&&(e.uncombine_features=m("uncombineFeatures",{container:i,className:p,title:"Uncombine",onActivate:function(){t.events.uncombineFeatures()}})),i):i},removeButtons:function(){Object.keys(e).forEach((function(t){var n=e[t];n.parentNode&&n.parentNode.removeChild(n),delete e[t]}))}}}(e),e.container=o.getContainer(),e.store=new Et(e),n=e.ui.addButtons(),e.options.boxSelect&&(o.boxZoom.disable(),o.dragPan.disable(),o.dragPan.enable()),o.loaded()?r.connect():(o.on("load",r.connect),i=setInterval((function(){o.loaded()&&r.connect()}),16)),e.events.start(),n},addLayers:function(){e.map.addSource(y,{data:{type:I,features:[]},type:"geojson"}),e.map.addSource(_,{data:{type:I,features:[]},type:"geojson"}),e.options.styles.forEach((function(t){e.map.addLayer(t)})),e.store.setDirty(!0),e.store.render()},removeLayers:function(){e.options.styles.forEach((function(t){e.map.getLayer(t.id)&&e.map.removeLayer(t.id)})),e.map.getSource(y)&&e.map.removeSource(y),e.map.getSource(_)&&e.map.removeSource(_)}};return e.setup=r,r}function It(t){return function(e){var n=e.featureTarget;return!!n&&!!n.properties&&n.properties.meta===t}}function Lt(t){return!!t.featureTarget&&!!t.featureTarget.properties&&t.featureTarget.properties.active===q&&t.featureTarget.properties.meta===W}function Pt(t){return!!t.featureTarget&&!!t.featureTarget.properties&&t.featureTarget.properties.active===J&&t.featureTarget.properties.meta===W}function Ft(t){return void 0===t.featureTarget}function Rt(t){var e=t.featureTarget;return!!e&&!!e.properties&&e.properties.meta===K}function Dt(t){return!!t.originalEvent&&!0===t.originalEvent.shiftKey}function Ot(t){return 27===t.keyCode}function Ut(t){return 13===t.keyCode}var Nt=kt;function kt(t,e){this.x=t,this.y=e}function zt(t,e){var n=e.getBoundingClientRect();return new Nt(t.clientX-n.left-(e.clientLeft||0),t.clientY-n.top-(e.clientTop||0))}function Qt(t,e,n,i){return{type:B,properties:{meta:K,parent:t,coord_path:n,active:i?q:J},geometry:{type:T,coordinates:e}}}function Gt(t,e,n){void 0===e&&(e={}),void 0===n&&(n=null);var i,r=t.geometry,o=r.type,s=r.coordinates,a=t.properties&&t.properties.id,l=[];function c(t,n){var i="",r=null;t.forEach((function(t,o){var s=null!=n?n+"."+o:String(o),c=Qt(a,t,s,u(s));if(e.midpoints&&r){var h=function(t,e,n){var i=e.geometry.coordinates,r=n.geometry.coordinates;if(i[1]>85||i[1]<-85||r[1]>85||r[1]<-85)return null;var o={lng:(i[0]+r[0])/2,lat:(i[1]+r[1])/2};return{type:B,properties:{meta:X,parent:t,lng:o.lng,lat:o.lat,coord_path:n.properties.coord_path},geometry:{type:T,coordinates:[o.lng,o.lat]}}}(a,r,c);h&&l.push(h)}r=c;var d=JSON.stringify(t);i!==d&&l.push(c),0===o&&(i=d)}))}function u(t){return!!e.selectedPaths&&-1!==e.selectedPaths.indexOf(t)}return o===T?l.push(Qt(a,s,n,u(n))):o===S?s.forEach((function(t,e){c(t,null!==n?n+"."+e:String(e))})):o===M?c(s,n):0===o.indexOf(L)&&(i=o.replace(L,""),s.forEach((function(n,r){var o={type:B,properties:t.properties,geometry:{type:i,coordinates:n}};l=l.concat(Gt(o,e,r))}))),l}kt.prototype={clone:function(){return new kt(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,n=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=n,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),n=Math.sin(t),i=e*this.x-n*this.y,r=n*this.x+e*this.y;return this.x=i,this.y=r,this},_rotateAround:function(t,e){var n=Math.cos(t),i=Math.sin(t),r=e.x+n*(this.x-e.x)-i*(this.y-e.y),o=e.y+i*(this.x-e.x)+n*(this.y-e.y);return this.x=r,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},kt.convert=function(t){return t instanceof kt?t:Array.isArray(t)?new kt(t[0],t[1]):t};var Ht=function(t){setTimeout((function(){t.map&&t.map.doubleClickZoom&&t._ctx&&t._ctx.store&&t._ctx.store.getInitialConfigValue&&t._ctx.store.getInitialConfigValue("doubleClickZoom")&&t.map.doubleClickZoom.enable()}),0)},Vt=function(t){setTimeout((function(){t.map&&t.map.doubleClickZoom&&t.map.doubleClickZoom.disable()}),0)},jt=function(t){if(!t||!t.type)return null;var e=Zt[t.type];return e?"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featurecollection"===e?t:void 0:null},Zt={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featurecollection"};function Wt(t){switch(t&&t.type||null){case"FeatureCollection":return t.features=t.features.reduce((function(t,e){return t.concat(Wt(e))}),[]),t;case"Feature":return t.geometry?Wt(t.geometry).map((function(e){var n={type:"Feature",properties:JSON.parse(JSON.stringify(t.properties)),geometry:e};return void 0!==t.id&&(n.id=t.id),n})):[t];case"MultiPoint":return t.coordinates.map((function(t){return{type:"Point",coordinates:t}}));case"MultiPolygon":return t.coordinates.map((function(t){return{type:"Polygon",coordinates:t}}));case"MultiLineString":return t.coordinates.map((function(t){return{type:"LineString",coordinates:t}}));case"GeometryCollection":return t.geometries.map(Wt).reduce((function(t,e){return t.concat(e)}),[]);case"Point":case"Polygon":case"LineString":return[t]}}var Xt=function(t){if(!t)return[];var e=Wt(jt(t)),n=[];return e.features.forEach((function(t){t.geometry&&(n=n.concat(function t(e){return Array.isArray(e)&&e.length&&"number"==typeof e[0]?[e]:e.reduce((function(e,n){return Array.isArray(n)&&Array.isArray(n[0])?e.concat(t(n)):(e.push(n),e)}),[])}(t.geometry.coordinates)))})),n},Kt=ct((function(t){var e=t.exports=function(t){return new n(t)};function n(t){this.value=t}function i(t,e,n){var i=[],s=[],u=!0;return function t(h){var d=n?r(h):h,A={},p=!0,f={node:d,node_:h,path:[].concat(i),parent:s[s.length-1],parents:s,key:i.slice(-1)[0],isRoot:0===i.length,level:i.length,circular:null,update:function(t,e){f.isRoot||(f.parent.node[f.key]=t),f.node=t,e&&(p=!1)},delete:function(t){delete f.parent.node[f.key],t&&(p=!1)},remove:function(t){a(f.parent.node)?f.parent.node.splice(f.key,1):delete f.parent.node[f.key],t&&(p=!1)},keys:null,before:function(t){A.before=t},after:function(t){A.after=t},pre:function(t){A.pre=t},post:function(t){A.post=t},stop:function(){u=!1},block:function(){p=!1}};if(!u)return f;function g(){if("object"==typeof f.node&&null!==f.node){f.keys&&f.node_===f.node||(f.keys=o(f.node)),f.isLeaf=0==f.keys.length;for(var t=0;t<s.length;t++)if(s[t].node_===h){f.circular=s[t];break}}else f.isLeaf=!0,f.keys=null;f.notLeaf=!f.isLeaf,f.notRoot=!f.isRoot}g();var m=e.call(f,f.node);return void 0!==m&&f.update&&f.update(m),A.before&&A.before.call(f,f.node),p?("object"!=typeof f.node||null===f.node||f.circular||(s.push(f),g(),l(f.keys,(function(e,r){i.push(e),A.pre&&A.pre.call(f,f.node[e],e);var o=t(f.node[e]);n&&c.call(f.node,e)&&(f.node[e]=o.node),o.isLast=r==f.keys.length-1,o.isFirst=0==r,A.post&&A.post.call(f,o),i.pop()})),s.pop()),A.after&&A.after.call(f,f.node),f):f}(t).node}function r(t){if("object"==typeof t&&null!==t){var e;if(a(t))e=[];else if("[object Date]"===s(t))e=new Date(t.getTime?t.getTime():t);else if(function(t){return"[object RegExp]"===s(t)}(t))e=new RegExp(t);else if(function(t){return"[object Error]"===s(t)}(t))e={message:t.message};else if(function(t){return"[object Boolean]"===s(t)}(t))e=new Boolean(t);else if(function(t){return"[object Number]"===s(t)}(t))e=new Number(t);else if(function(t){return"[object String]"===s(t)}(t))e=new String(t);else if(Object.create&&Object.getPrototypeOf)e=Object.create(Object.getPrototypeOf(t));else if(t.constructor===Object)e={};else{var n=t.constructor&&t.constructor.prototype||t.__proto__||{},i=function(){};i.prototype=n,e=new i}return l(o(t),(function(n){e[n]=t[n]})),e}return t}n.prototype.get=function(t){for(var e=this.value,n=0;n<t.length;n++){var i=t[n];if(!e||!c.call(e,i)){e=void 0;break}e=e[i]}return e},n.prototype.has=function(t){for(var e=this.value,n=0;n<t.length;n++){var i=t[n];if(!e||!c.call(e,i))return!1;e=e[i]}return!0},n.prototype.set=function(t,e){for(var n=this.value,i=0;i<t.length-1;i++){var r=t[i];c.call(n,r)||(n[r]={}),n=n[r]}return n[t[i]]=e,e},n.prototype.map=function(t){return i(this.value,t,!0)},n.prototype.forEach=function(t){return this.value=i(this.value,t,!1),this.value},n.prototype.reduce=function(t,e){var n=1===arguments.length,i=n?this.value:e;return this.forEach((function(e){this.isRoot&&n||(i=t.call(this,i,e))})),i},n.prototype.paths=function(){var t=[];return this.forEach((function(e){t.push(this.path)})),t},n.prototype.nodes=function(){var t=[];return this.forEach((function(e){t.push(this.node)})),t},n.prototype.clone=function(){var t=[],e=[];return function n(i){for(var s=0;s<t.length;s++)if(t[s]===i)return e[s];if("object"==typeof i&&null!==i){var a=r(i);return t.push(i),e.push(a),l(o(i),(function(t){a[t]=n(i[t])})),t.pop(),e.pop(),a}return i}(this.value)};var o=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};function s(t){return Object.prototype.toString.call(t)}var a=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},l=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)};l(o(n.prototype),(function(t){e[t]=function(e){var i=[].slice.call(arguments,1),r=new n(e);return r[t].apply(r,i)}}));var c=Object.hasOwnProperty||function(t,e){return e in t}})),qt=Jt;function Jt(t){if(!(this instanceof Jt))return new Jt(t);this._bbox=t||[1/0,1/0,-1/0,-1/0],this._valid=!!t}Jt.prototype.include=function(t){return this._valid=!0,this._bbox[0]=Math.min(this._bbox[0],t[0]),this._bbox[1]=Math.min(this._bbox[1],t[1]),this._bbox[2]=Math.max(this._bbox[2],t[0]),this._bbox[3]=Math.max(this._bbox[3],t[1]),this},Jt.prototype.equals=function(t){var e;return e=t instanceof Jt?t.bbox():t,this._bbox[0]==e[0]&&this._bbox[1]==e[1]&&this._bbox[2]==e[2]&&this._bbox[3]==e[3]},Jt.prototype.center=function(t){return this._valid?[(this._bbox[0]+this._bbox[2])/2,(this._bbox[1]+this._bbox[3])/2]:null},Jt.prototype.union=function(t){var e;return this._valid=!0,e=t instanceof Jt?t.bbox():t,this._bbox[0]=Math.min(this._bbox[0],e[0]),this._bbox[1]=Math.min(this._bbox[1],e[1]),this._bbox[2]=Math.max(this._bbox[2],e[2]),this._bbox[3]=Math.max(this._bbox[3],e[3]),this},Jt.prototype.bbox=function(){return this._valid?this._bbox:null},Jt.prototype.contains=function(t){if(!t)return this._fastContains();if(!this._valid)return null;var e=t[0],n=t[1];return this._bbox[0]<=e&&this._bbox[1]<=n&&this._bbox[2]>=e&&this._bbox[3]>=n},Jt.prototype.intersect=function(t){return this._valid?(e=t instanceof Jt?t.bbox():t,!(this._bbox[0]>e[2]||this._bbox[2]<e[0]||this._bbox[3]<e[1]||this._bbox[1]>e[3])):null;var e},Jt.prototype._fastContains=function(){if(!this._valid)return new Function("return null;");var t="return "+this._bbox[0]+"<= ll[0] &&"+this._bbox[1]+"<= ll[1] &&"+this._bbox[2]+">= ll[0] &&"+this._bbox[3]+">= ll[1]";return new Function("ll",t)},Jt.prototype.polygon=function(){return this._valid?{type:"Polygon",coordinates:[[[this._bbox[0],this._bbox[1]],[this._bbox[2],this._bbox[1]],[this._bbox[2],this._bbox[3]],[this._bbox[0],this._bbox[3]],[this._bbox[0],this._bbox[1]]]]}:null};var Yt={features:["FeatureCollection"],coordinates:["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],geometry:["Feature"],geometries:["GeometryCollection"]},$t=Object.keys(Yt),te=function(t){return ee(t).bbox()};function ee(t){for(var e=qt(),n=Xt(t),i=0;i<n.length;i++)e.include(n[i]);return e}function ne(t,e){var n=-90,i=90,r=-90,o=90,s=270,a=-270;t.forEach((function(t){var e=te(t),l=e[1],c=e[3],u=e[0],h=e[2];l>n&&(n=l),c<i&&(i=c),c>r&&(r=c),l<o&&(o=l),u<s&&(s=u),h>a&&(a=h)}));var l=e;return n+l.lat>85&&(l.lat=85-n),r+l.lat>90&&(l.lat=90-r),i+l.lat<-85&&(l.lat=-85-i),o+l.lat<-90&&(l.lat=-90-o),s+l.lng<=-270&&(l.lng+=360*Math.ceil(Math.abs(l.lng)/360)),a+l.lng>=270&&(l.lng-=360*Math.ceil(Math.abs(l.lng)/360)),l}function ie(t,e){var n=ne(t.map((function(t){return t.toGeoJSON()})),e);t.forEach((function(t){var e,i=t.getCoordinates(),r=function(t){var e={lng:t[0]+n.lng,lat:t[1]+n.lat};return[e.lng,e.lat]},o=function(t){return t.map((function(t){return r(t)}))};t.type===T?e=r(i):t.type===M||t.type===P?e=i.map(r):t.type===S||t.type===F?e=i.map(o):t.type===R&&(e=i.map((function(t){return t.map((function(t){return o(t)}))}))),t.incomingCoords(e)}))}te.polygon=function(t){return ee(t).polygon()},te.bboxify=function(t){return Kt(t).map((function(t){t&&$t.some((function(e){return!!t[e]&&-1!==Yt[e].indexOf(t.type)}))&&(t.bbox=ee(t).bbox(),this.update(t))}))};var re={onSetup:function(t){var e=this,n={dragMoveLocation:null,boxSelectStartLocation:null,boxSelectElement:void 0,boxSelecting:!1,canBoxSelect:!1,dragMoving:!1,canDragMove:!1,initiallySelectedFeatureIds:t.featureIds||[]};return this.setSelected(n.initiallySelectedFeatureIds.filter((function(t){return void 0!==e.getFeature(t)}))),this.fireActionable(),this.setActionableState({combineFeatures:!0,uncombineFeatures:!0,trash:!0}),n},fireUpdate:function(){this.map.fire(N,{action:j,features:this.getSelected().map((function(t){return t.toGeoJSON()}))})},fireActionable:function(){var t=this,e=this.getSelected(),n=e.filter((function(e){return t.isInstanceOf("MultiFeature",e)})),i=!1;if(e.length>1){i=!0;var r=e[0].type.replace("Multi","");e.forEach((function(t){t.type.replace("Multi","")!==r&&(i=!1)}))}var o=n.length>0,s=e.length>0;this.setActionableState({combineFeatures:i,uncombineFeatures:o,trash:s})},getUniqueIds:function(t){return t.length?t.map((function(t){return t.properties.id})).filter((function(t){return void 0!==t})).reduce((function(t,e){return t.add(e),t}),new et).values():[]},stopExtendedInteractions:function(t){t.boxSelectElement&&(t.boxSelectElement.parentNode&&t.boxSelectElement.parentNode.removeChild(t.boxSelectElement),t.boxSelectElement=null),this.map.dragPan.enable(),t.boxSelecting=!1,t.canBoxSelect=!1,t.dragMoving=!1,t.canDragMove=!1},onStop:function(){Ht(this)},onMouseMove:function(t){return this.stopExtendedInteractions(t),!0},onMouseOut:function(t){return!t.dragMoving||this.fireUpdate()}};re.onTap=re.onClick=function(t,e){return Ft(e)?this.clickAnywhere(t,e):It(K)(e)?this.clickOnVertex(t,e):function(t){return!!t.featureTarget&&!!t.featureTarget.properties&&t.featureTarget.properties.meta===W}(e)?this.clickOnFeature(t,e):void 0},re.clickAnywhere=function(t){var e=this,n=this.getSelectedIds();n.length&&(this.clearSelectedFeatures(),n.forEach((function(t){return e.doRender(t)}))),Ht(this),this.stopExtendedInteractions(t)},re.clickOnVertex=function(t,e){this.changeMode(D.DIRECT_SELECT,{featureId:e.featureTarget.properties.parent,coordPath:e.featureTarget.properties.coord_path,startPos:e.lngLat}),this.updateUIClasses({mouse:x})},re.startOnActiveFeature=function(t,e){this.stopExtendedInteractions(t),this.map.dragPan.disable(),this.doRender(e.featureTarget.properties.id),t.canDragMove=!0,t.dragMoveLocation=e.lngLat},re.clickOnFeature=function(t,e){var n=this;Vt(this),this.stopExtendedInteractions(t);var i=Dt(e),r=this.getSelectedIds(),o=e.featureTarget.properties.id,s=this.isSelected(o);if(!i&&s&&this.getFeature(o).type!==T)return this.changeMode(D.DIRECT_SELECT,{featureId:o});s&&i?(this.deselect(o),this.updateUIClasses({mouse:w}),1===r.length&&Ht(this)):!s&&i?(this.select(o),this.updateUIClasses({mouse:x})):s||i||(r.forEach((function(t){return n.doRender(t)})),this.setSelected(o),this.updateUIClasses({mouse:x})),this.doRender(o)},re.onMouseDown=function(t,e){return Lt(e)?this.startOnActiveFeature(t,e):this.drawConfig.boxSelect&&function(t){return!!t.originalEvent&&!!t.originalEvent.shiftKey&&0===t.originalEvent.button}(e)?this.startBoxSelect(t,e):void 0},re.startBoxSelect=function(t,e){this.stopExtendedInteractions(t),this.map.dragPan.disable(),t.boxSelectStartLocation=zt(e.originalEvent,this.map.getContainer()),t.canBoxSelect=!0},re.onTouchStart=function(t,e){if(Lt(e))return this.startOnActiveFeature(t,e)},re.onDrag=function(t,e){return t.canDragMove?this.dragMove(t,e):this.drawConfig.boxSelect&&t.canBoxSelect?this.whileBoxSelect(t,e):void 0},re.whileBoxSelect=function(t,e){t.boxSelecting=!0,this.updateUIClasses({mouse:v}),t.boxSelectElement||(t.boxSelectElement=document.createElement("div"),t.boxSelectElement.classList.add(m),this.map.getContainer().appendChild(t.boxSelectElement));var n=zt(e.originalEvent,this.map.getContainer()),i=Math.min(t.boxSelectStartLocation.x,n.x),r=Math.max(t.boxSelectStartLocation.x,n.x),o=Math.min(t.boxSelectStartLocation.y,n.y),s=Math.max(t.boxSelectStartLocation.y,n.y),a="translate("+i+"px, "+o+"px)";t.boxSelectElement.style.transform=a,t.boxSelectElement.style.WebkitTransform=a,t.boxSelectElement.style.width=r-i+"px",t.boxSelectElement.style.height=s-o+"px"},re.dragMove=function(t,e){t.dragMoving=!0,e.originalEvent.stopPropagation();var n={lng:e.lngLat.lng-t.dragMoveLocation.lng,lat:e.lngLat.lat-t.dragMoveLocation.lat};ie(this.getSelected(),n),t.dragMoveLocation=e.lngLat},re.onMouseUp=function(t,e){var n=this;if(t.dragMoving)this.fireUpdate();else if(t.boxSelecting){var i=[t.boxSelectStartLocation,zt(e.originalEvent,this.map.getContainer())],r=this.featuresAt(null,i,"click"),o=this.getUniqueIds(r).filter((function(t){return!n.isSelected(t)}));o.length&&(this.select(o),o.forEach((function(t){return n.doRender(t)})),this.updateUIClasses({mouse:x}))}this.stopExtendedInteractions(t)},re.toDisplayFeatures=function(t,e,n){e.properties.active=this.isSelected(e.properties.id)?q:J,n(e),this.fireActionable(),e.properties.active===q&&e.geometry.type!==T&&Gt(e).forEach(n)},re.onTrash=function(){this.deleteFeature(this.getSelectedIds()),this.fireActionable()},re.onCombineFeatures=function(){var t=this.getSelected();if(!(0===t.length||t.length<2)){for(var e=[],n=[],i=t[0].type.replace("Multi",""),r=0;r<t.length;r++){var o=t[r];if(o.type.replace("Multi","")!==i)return;o.type.includes("Multi")?o.getCoordinates().forEach((function(t){e.push(t)})):e.push(o.getCoordinates()),n.push(o.toGeoJSON())}if(n.length>1){var s=this.newFeature({type:B,properties:n[0].properties,geometry:{type:"Multi"+i,coordinates:e}});this.addFeature(s),this.deleteFeature(this.getSelectedIds(),{silent:!0}),this.setSelected([s.id]),this.map.fire(H,{createdFeatures:[s.toGeoJSON()],deletedFeatures:n})}this.fireActionable()}},re.onUncombineFeatures=function(){var t=this,e=this.getSelected();if(0!==e.length){for(var n=[],i=[],r=function(r){var o=e[r];t.isInstanceOf("MultiFeature",o)&&(o.getFeatures().forEach((function(e){t.addFeature(e),e.properties=o.properties,n.push(e.toGeoJSON()),t.select([e.id])})),t.deleteFeature(o.id,{silent:!0}),i.push(o.toGeoJSON()))},o=0;o<e.length;o++)r(o);n.length>1&&this.map.fire(V,{createdFeatures:n,deletedFeatures:i}),this.fireActionable()}};var oe=It(K),se=It(X),ae={fireUpdate:function(){this.map.fire(N,{action:Z,features:this.getSelected().map((function(t){return t.toGeoJSON()}))})},fireActionable:function(t){this.setActionableState({combineFeatures:!1,uncombineFeatures:!1,trash:t.selectedCoordPaths.length>0})},startDragging:function(t,e){this.map.dragPan.disable(),t.canDragMove=!0,t.dragMoveLocation=e.lngLat},stopDragging:function(t){this.map.dragPan.enable(),t.dragMoving=!1,t.canDragMove=!1,t.dragMoveLocation=null},onVertex:function(t,e){this.startDragging(t,e);var n=e.featureTarget.properties,i=t.selectedCoordPaths.indexOf(n.coord_path);Dt(e)||-1!==i?Dt(e)&&-1===i&&t.selectedCoordPaths.push(n.coord_path):t.selectedCoordPaths=[n.coord_path];var r=this.pathsToCoordinates(t.featureId,t.selectedCoordPaths);this.setSelectedCoordinates(r)},onMidpoint:function(t,e){this.startDragging(t,e);var n=e.featureTarget.properties;t.feature.addCoordinate(n.coord_path,n.lng,n.lat),this.fireUpdate(),t.selectedCoordPaths=[n.coord_path]},pathsToCoordinates:function(t,e){return e.map((function(e){return{feature_id:t,coord_path:e}}))},onFeature:function(t,e){0===t.selectedCoordPaths.length?this.startDragging(t,e):this.stopDragging(t)},dragFeature:function(t,e,n){ie(this.getSelected(),n),t.dragMoveLocation=e.lngLat},dragVertex:function(t,e,n){for(var i=t.selectedCoordPaths.map((function(e){return t.feature.getCoordinate(e)})),r=ne(i.map((function(t){return{type:B,properties:{},geometry:{type:T,coordinates:t}}})),n),o=0;o<i.length;o++){var s=i[o];t.feature.updateCoordinate(t.selectedCoordPaths[o],s[0]+r.lng,s[1]+r.lat)}},clickNoTarget:function(){this.changeMode(D.SIMPLE_SELECT)},clickInactive:function(){this.changeMode(D.SIMPLE_SELECT)},clickActiveFeature:function(t){t.selectedCoordPaths=[],this.clearSelectedCoordinates(),t.feature.changed()},onSetup:function(t){var e=t.featureId,n=this.getFeature(e);if(!n)throw new Error("You must provide a featureId to enter direct_select mode");if(n.type===T)throw new TypeError("direct_select mode doesn't handle point features");var i={featureId:e,feature:n,dragMoveLocation:t.startPos||null,dragMoving:!1,canDragMove:!1,selectedCoordPaths:t.coordPath?[t.coordPath]:[]};return this.setSelectedCoordinates(this.pathsToCoordinates(e,i.selectedCoordPaths)),this.setSelected(e),Vt(this),this.setActionableState({trash:!0}),i},onStop:function(){Ht(this),this.clearSelectedCoordinates()},toDisplayFeatures:function(t,e,n){t.featureId===e.properties.id?(e.properties.active=q,n(e),Gt(e,{map:this.map,midpoints:!0,selectedPaths:t.selectedCoordPaths}).forEach(n)):(e.properties.active=J,n(e)),this.fireActionable(t)},onTrash:function(t){t.selectedCoordPaths.sort((function(t,e){return e.localeCompare(t,"en",{numeric:!0})})).forEach((function(e){return t.feature.removeCoordinate(e)})),this.fireUpdate(),t.selectedCoordPaths=[],this.clearSelectedCoordinates(),this.fireActionable(t),!1===t.feature.isValid()&&(this.deleteFeature([t.featureId]),this.changeMode(D.SIMPLE_SELECT,{}))},onMouseMove:function(t,e){var n=Lt(e),i=oe(e),r=0===t.selectedCoordPaths.length;return n&&r||i&&!r?this.updateUIClasses({mouse:x}):this.updateUIClasses({mouse:E}),this.stopDragging(t),!0},onMouseOut:function(t){return t.dragMoving&&this.fireUpdate(),!0}};ae.onTouchStart=ae.onMouseDown=function(t,e){return oe(e)?this.onVertex(t,e):Lt(e)?this.onFeature(t,e):se(e)?this.onMidpoint(t,e):void 0},ae.onDrag=function(t,e){if(!0===t.canDragMove){t.dragMoving=!0,e.originalEvent.stopPropagation();var n={lng:e.lngLat.lng-t.dragMoveLocation.lng,lat:e.lngLat.lat-t.dragMoveLocation.lat};t.selectedCoordPaths.length>0?this.dragVertex(t,e,n):this.dragFeature(t,e,n),t.dragMoveLocation=e.lngLat}},ae.onClick=function(t,e){return Ft(e)?this.clickNoTarget(t,e):Lt(e)?this.clickActiveFeature(t,e):Pt(e)?this.clickInactive(t,e):void this.stopDragging(t)},ae.onTap=function(t,e){return Ft(e)?this.clickNoTarget(t,e):Lt(e)?this.clickActiveFeature(t,e):Pt(e)?this.clickInactive(t,e):void 0},ae.onTouchEnd=ae.onMouseUp=function(t){t.dragMoving&&this.fireUpdate(),this.stopDragging(t)};var le={};function ce(t,e){return!!t.lngLat&&t.lngLat.lng===e[0]&&t.lngLat.lat===e[1]}le.onSetup=function(){var t=this.newFeature({type:B,properties:{},geometry:{type:T,coordinates:[]}});return this.addFeature(t),this.clearSelectedFeatures(),this.updateUIClasses({mouse:v}),this.activateUIButton(C.POINT),this.setActionableState({trash:!0}),{point:t}},le.stopDrawingAndRemove=function(t){this.deleteFeature([t.point.id],{silent:!0}),this.changeMode(D.SIMPLE_SELECT)},le.onTap=le.onClick=function(t,e){this.updateUIClasses({mouse:x}),t.point.updateCoordinate("",e.lngLat.lng,e.lngLat.lat),this.map.fire(O,{features:[t.point.toGeoJSON()]}),this.changeMode(D.SIMPLE_SELECT,{featureIds:[t.point.id]})},le.onStop=function(t){this.activateUIButton(),t.point.getCoordinate().length||this.deleteFeature([t.point.id],{silent:!0})},le.toDisplayFeatures=function(t,e,n){var i=e.properties.id===t.point.id;if(e.properties.active=i?q:J,!i)return n(e)},le.onTrash=le.stopDrawingAndRemove,le.onKeyUp=function(t,e){if(Ot(e)||Ut(e))return this.stopDrawingAndRemove(t,e)};var ue={onSetup:function(){var t=this.newFeature({type:B,properties:{},geometry:{type:S,coordinates:[[]]}});return this.addFeature(t),this.clearSelectedFeatures(),Vt(this),this.updateUIClasses({mouse:v}),this.activateUIButton(C.POLYGON),this.setActionableState({trash:!0}),{polygon:t,currentVertexPosition:0}},clickAnywhere:function(t,e){if(t.currentVertexPosition>0&&ce(e,t.polygon.coordinates[0][t.currentVertexPosition-1]))return this.changeMode(D.SIMPLE_SELECT,{featureIds:[t.polygon.id]});this.updateUIClasses({mouse:v}),t.polygon.updateCoordinate("0."+t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),t.currentVertexPosition++,t.polygon.updateCoordinate("0."+t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat)},clickOnVertex:function(t){return this.changeMode(D.SIMPLE_SELECT,{featureIds:[t.polygon.id]})},onMouseMove:function(t,e){t.polygon.updateCoordinate("0."+t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),Rt(e)&&this.updateUIClasses({mouse:w})}};ue.onTap=ue.onClick=function(t,e){return Rt(e)?this.clickOnVertex(t,e):this.clickAnywhere(t,e)},ue.onKeyUp=function(t,e){Ot(e)?(this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(D.SIMPLE_SELECT)):Ut(e)&&this.changeMode(D.SIMPLE_SELECT,{featureIds:[t.polygon.id]})},ue.onStop=function(t){this.updateUIClasses({mouse:E}),Ht(this),this.activateUIButton(),void 0!==this.getFeature(t.polygon.id)&&(t.polygon.removeCoordinate("0."+t.currentVertexPosition),t.polygon.isValid()?this.map.fire(O,{features:[t.polygon.toGeoJSON()]}):(this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(D.SIMPLE_SELECT,{},{silent:!0})))},ue.toDisplayFeatures=function(t,e,n){var i=e.properties.id===t.polygon.id;if(e.properties.active=i?q:J,!i)return n(e);if(0!==e.geometry.coordinates.length){var r=e.geometry.coordinates[0].length;if(!(r<3)){if(e.properties.meta=W,n(Qt(t.polygon.id,e.geometry.coordinates[0][0],"0.0",!1)),r>3){var o=e.geometry.coordinates[0].length-3;n(Qt(t.polygon.id,e.geometry.coordinates[0][o],"0."+o,!1))}if(r<=4){var s=[[e.geometry.coordinates[0][0][0],e.geometry.coordinates[0][0][1]],[e.geometry.coordinates[0][1][0],e.geometry.coordinates[0][1][1]]];if(n({type:B,properties:e.properties,geometry:{coordinates:s,type:M}}),3===r)return}return n(e)}}},ue.onTrash=function(t){this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(D.SIMPLE_SELECT)};var he={onSetup:function(t){var e,n,i=(t=t||{}).featureId,r="forward";if(i){if(!(e=this.getFeature(i)))throw new Error("Could not find a feature with the provided featureId");var o=t.from;if(o&&"Feature"===o.type&&o.geometry&&"Point"===o.geometry.type&&(o=o.geometry),o&&"Point"===o.type&&o.coordinates&&2===o.coordinates.length&&(o=o.coordinates),!o||!Array.isArray(o))throw new Error("Please use the `from` property to indicate which point to continue the line from");var s=e.coordinates.length-1;if(e.coordinates[s][0]===o[0]&&e.coordinates[s][1]===o[1])n=s+1,e.addCoordinate.apply(e,[n].concat(e.coordinates[s]));else{if(e.coordinates[0][0]!==o[0]||e.coordinates[0][1]!==o[1])throw new Error("`from` should match the point at either the start or the end of the provided LineString");r="backwards",n=0,e.addCoordinate.apply(e,[n].concat(e.coordinates[0]))}}else e=this.newFeature({type:B,properties:{},geometry:{type:M,coordinates:[]}}),n=0,this.addFeature(e);return this.clearSelectedFeatures(),Vt(this),this.updateUIClasses({mouse:v}),this.activateUIButton(C.LINE),this.setActionableState({trash:!0}),{line:e,currentVertexPosition:n,direction:r}},clickAnywhere:function(t,e){if(t.currentVertexPosition>0&&ce(e,t.line.coordinates[t.currentVertexPosition-1])||"backwards"===t.direction&&ce(e,t.line.coordinates[t.currentVertexPosition+1]))return this.changeMode(D.SIMPLE_SELECT,{featureIds:[t.line.id]});this.updateUIClasses({mouse:v}),t.line.updateCoordinate(t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),"forward"===t.direction?(t.currentVertexPosition++,t.line.updateCoordinate(t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat)):t.line.addCoordinate(0,e.lngLat.lng,e.lngLat.lat)},clickOnVertex:function(t){return this.changeMode(D.SIMPLE_SELECT,{featureIds:[t.line.id]})},onMouseMove:function(t,e){t.line.updateCoordinate(t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),Rt(e)&&this.updateUIClasses({mouse:w})}};he.onTap=he.onClick=function(t,e){if(Rt(e))return this.clickOnVertex(t,e);this.clickAnywhere(t,e)},he.onKeyUp=function(t,e){Ut(e)?this.changeMode(D.SIMPLE_SELECT,{featureIds:[t.line.id]}):Ot(e)&&(this.deleteFeature([t.line.id],{silent:!0}),this.changeMode(D.SIMPLE_SELECT))},he.onStop=function(t){Ht(this),this.activateUIButton(),void 0!==this.getFeature(t.line.id)&&(t.line.removeCoordinate(""+t.currentVertexPosition),t.line.isValid()?this.map.fire(O,{features:[t.line.toGeoJSON()]}):(this.deleteFeature([t.line.id],{silent:!0}),this.changeMode(D.SIMPLE_SELECT,{},{silent:!0})))},he.onTrash=function(t){this.deleteFeature([t.line.id],{silent:!0}),this.changeMode(D.SIMPLE_SELECT)},he.toDisplayFeatures=function(t,e,n){var i=e.properties.id===t.line.id;if(e.properties.active=i?q:J,!i)return n(e);e.geometry.coordinates.length<2||(e.properties.meta=W,n(Qt(t.line.id,e.geometry.coordinates["forward"===t.direction?e.geometry.coordinates.length-2:1],""+("forward"===t.direction?e.geometry.coordinates.length-2:1),!1)),n(e))};var de={simple_select:re,direct_select:ae,draw_point:le,draw_polygon:ue,draw_line_string:he},Ae={defaultMode:D.SIMPLE_SELECT,keybindings:!0,touchEnabled:!0,clickBuffer:2,touchBuffer:25,boxSelect:!0,displayControlsDefault:!0,styles:[{id:"gl-draw-polygon-fill-inactive",type:"fill",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],paint:{"fill-color":"#3bb2d0","fill-outline-color":"#3bb2d0","fill-opacity":.1}},{id:"gl-draw-polygon-fill-active",type:"fill",filter:["all",["==","active","true"],["==","$type","Polygon"]],paint:{"fill-color":"#fbb03b","fill-outline-color":"#fbb03b","fill-opacity":.1}},{id:"gl-draw-polygon-midpoint",type:"circle",filter:["all",["==","$type","Point"],["==","meta","midpoint"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-stroke-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-polygon-stroke-active",type:"line",filter:["all",["==","active","true"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-line-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","LineString"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-line-active",type:"line",filter:["all",["==","$type","LineString"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-polygon-and-line-vertex-stroke-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-color":"#fff"}},{id:"gl-draw-polygon-and-line-vertex-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-point-point-stroke-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-opacity":1,"circle-color":"#fff"}},{id:"gl-draw-point-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#3bb2d0"}},{id:"gl-draw-point-stroke-active",type:"circle",filter:["all",["==","$type","Point"],["==","active","true"],["!=","meta","midpoint"]],paint:{"circle-radius":7,"circle-color":"#fff"}},{id:"gl-draw-point-active",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["==","active","true"]],paint:{"circle-radius":5,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-fill-static",type:"fill",filter:["all",["==","mode","static"],["==","$type","Polygon"]],paint:{"fill-color":"#404040","fill-outline-color":"#404040","fill-opacity":.1}},{id:"gl-draw-polygon-stroke-static",type:"line",filter:["all",["==","mode","static"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-line-static",type:"line",filter:["all",["==","mode","static"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-point-static",type:"circle",filter:["all",["==","mode","static"],["==","$type","Point"]],paint:{"circle-radius":5,"circle-color":"#404040"}}],modes:de,controls:{},userProperties:!1},pe={point:!0,line_string:!0,polygon:!0,trash:!0,combine_features:!0,uncombine_features:!0},fe={point:!1,line_string:!1,polygon:!1,trash:!1,combine_features:!1,uncombine_features:!1};function ge(t,e){return t.map((function(t){return t.source?t:Bt(t,{id:t.id+"."+e,source:"hot"===e?_:y})}))}var me=ct((function(t,e){var i="[object Arguments]",r="[object Map]",o="[object Object]",s="[object Set]",a=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c[r]=c["[object Number]"]=c[o]=c["[object RegExp]"]=c[s]=c["[object String]"]=c["[object WeakMap]"]=!1;var u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,d=u||h||Function("return this")(),A=e&&!e.nodeType&&e,p=A&&t&&!t.nodeType&&t,f=p&&p.exports===A,g=f&&u.process,m=function(){try{return g&&g.binding&&g.binding("util")}catch(t){}}(),_=m&&m.isTypedArray;function y(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}function v(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n}function x(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var b,w,E,C=Array.prototype,B=Function.prototype,S=Object.prototype,M=d["__core-js_shared__"],T=B.toString,I=S.hasOwnProperty,L=(b=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||""))?"Symbol(src)_1."+b:"",P=S.toString,F=RegExp("^"+T.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=f?d.Buffer:void 0,D=d.Symbol,O=d.Uint8Array,U=S.propertyIsEnumerable,N=C.splice,k=D?D.toStringTag:void 0,z=Object.getOwnPropertySymbols,Q=R?R.isBuffer:void 0,G=(w=Object.keys,E=Object,function(t){return w(E(t))}),H=mt(d,"DataView"),V=mt(d,"Map"),j=mt(d,"Promise"),Z=mt(d,"Set"),W=mt(d,"WeakMap"),X=mt(Object,"create"),K=xt(H),q=xt(V),J=xt(j),Y=xt(Z),$=xt(W),tt=D?D.prototype:void 0,et=tt?tt.valueOf:void 0;function nt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function it(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function rt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function ot(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new rt;++e<n;)this.add(t[e])}function st(t){var e=this.__data__=new it(t);this.size=e.size}function at(t,e){var n=Et(t),i=!n&&wt(t),r=!n&&!i&&Ct(t),o=!n&&!i&&!r&&It(t),s=n||i||r||o,a=s?function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}(t.length,String):[],l=a.length;for(var c in t)!e&&!I.call(t,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vt(c,l))||a.push(c);return a}function lt(t,e){for(var n=t.length;n--;)if(bt(t[n][0],e))return n;return-1}function ct(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":k&&k in Object(t)?function(t){var e=I.call(t,k),n=t[k];try{t[k]=void 0;var i=!0}catch(t){}var r=P.call(t);return i&&(e?t[k]=n:delete t[k]),r}(t):function(t){return P.call(t)}(t)}function ut(t){return Tt(t)&&ct(t)==i}function ht(t,e,n,a,l){return t===e||(null==t||null==e||!Tt(t)&&!Tt(e)?t!=t&&e!=e:function(t,e,n,a,l,c){var u=Et(t),h=Et(e),d=u?"[object Array]":yt(t),A=h?"[object Array]":yt(e),p=(d=d==i?o:d)==o,f=(A=A==i?o:A)==o,g=d==A;if(g&&Ct(t)){if(!Ct(e))return!1;u=!0,p=!1}if(g&&!p)return c||(c=new st),u||It(t)?pt(t,e,n,a,l,c):function(t,e,n,i,o,a,l){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new O(t),new O(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return bt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case r:var c=v;case s:var u=1&i;if(c||(c=x),t.size!=e.size&&!u)return!1;var h=l.get(t);if(h)return h==e;i|=2,l.set(t,e);var d=pt(c(t),c(e),i,o,a,l);return l.delete(t),d;case"[object Symbol]":if(et)return et.call(t)==et.call(e)}return!1}(t,e,d,n,a,l,c);if(!(1&n)){var m=p&&I.call(t,"__wrapped__"),_=f&&I.call(e,"__wrapped__");if(m||_){var y=m?t.value():t,b=_?e.value():e;return c||(c=new st),l(y,b,n,a,c)}}return!!g&&(c||(c=new st),function(t,e,n,i,r,o){var s=1&n,a=ft(t),l=a.length,c=ft(e).length;if(l!=c&&!s)return!1;for(var u=l;u--;){var h=a[u];if(!(s?h in e:I.call(e,h)))return!1}var d=o.get(t);if(d&&o.get(e))return d==e;var A=!0;o.set(t,e),o.set(e,t);for(var p=s;++u<l;){h=a[u];var f=t[h],g=e[h];if(i)var m=s?i(g,f,h,e,t,o):i(f,g,h,t,e,o);if(!(void 0===m?f===g||r(f,g,n,i,o):m)){A=!1;break}p||(p="constructor"==h)}if(A&&!p){var _=t.constructor,y=e.constructor;_==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof y&&y instanceof y||(A=!1)}return o.delete(t),o.delete(e),A}(t,e,n,a,l,c))}(t,e,n,a,ht,l))}function dt(t){return!(!Mt(t)||function(t){return!!L&&L in t}(t))&&(Bt(t)?F:a).test(xt(t))}function At(t){if(n=(e=t)&&e.constructor,i="function"==typeof n&&n.prototype||S,e!==i)return G(t);var e,n,i,r=[];for(var o in Object(t))I.call(t,o)&&"constructor"!=o&&r.push(o);return r}function pt(t,e,n,i,r,o){var s=1&n,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(t);if(c&&o.get(e))return c==e;var u=-1,h=!0,d=2&n?new ot:void 0;for(o.set(t,e),o.set(e,t);++u<a;){var A=t[u],p=e[u];if(i)var f=s?i(p,A,u,e,t,o):i(A,p,u,t,e,o);if(void 0!==f){if(f)continue;h=!1;break}if(d){if(!y(e,(function(t,e){if(s=e,!d.has(s)&&(A===t||r(A,t,n,i,o)))return d.push(e);var s}))){h=!1;break}}else if(A!==p&&!r(A,p,n,i,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function ft(t){return function(t,e,n){var i=e(t);return Et(t)?i:function(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}(i,n(t))}(t,Lt,_t)}function gt(t,e){var n,i,r=t.__data__;return("string"==(i=typeof(n=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof e?"string":"hash"]:r.map}function mt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return dt(n)?n:void 0}nt.prototype.clear=function(){this.__data__=X?X(null):{},this.size=0},nt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},nt.prototype.get=function(t){var e=this.__data__;if(X){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return I.call(e,t)?e[t]:void 0},nt.prototype.has=function(t){var e=this.__data__;return X?void 0!==e[t]:I.call(e,t)},nt.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=X&&void 0===e?"__lodash_hash_undefined__":e,this},it.prototype.clear=function(){this.__data__=[],this.size=0},it.prototype.delete=function(t){var e=this.__data__,n=lt(e,t);return!(n<0)&&(n==e.length-1?e.pop():N.call(e,n,1),--this.size,!0)},it.prototype.get=function(t){var e=this.__data__,n=lt(e,t);return n<0?void 0:e[n][1]},it.prototype.has=function(t){return lt(this.__data__,t)>-1},it.prototype.set=function(t,e){var n=this.__data__,i=lt(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this},rt.prototype.clear=function(){this.size=0,this.__data__={hash:new nt,map:new(V||it),string:new nt}},rt.prototype.delete=function(t){var e=gt(this,t).delete(t);return this.size-=e?1:0,e},rt.prototype.get=function(t){return gt(this,t).get(t)},rt.prototype.has=function(t){return gt(this,t).has(t)},rt.prototype.set=function(t,e){var n=gt(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this},ot.prototype.add=ot.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},ot.prototype.has=function(t){return this.__data__.has(t)},st.prototype.clear=function(){this.__data__=new it,this.size=0},st.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},st.prototype.get=function(t){return this.__data__.get(t)},st.prototype.has=function(t){return this.__data__.has(t)},st.prototype.set=function(t,e){var n=this.__data__;if(n instanceof it){var i=n.__data__;if(!V||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new rt(i)}return n.set(t,e),this.size=n.size,this};var _t=z?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,o=[];++n<i;){var s=t[n];e(s,n,t)&&(o[r++]=s)}return o}(z(t),(function(e){return U.call(t,e)})))}:function(){return[]},yt=ct;function vt(t,e){return!!(e=null==e?9007199254740991:e)&&("number"==typeof t||l.test(t))&&t>-1&&t%1==0&&t<e}function xt(t){if(null!=t){try{return T.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function bt(t,e){return t===e||t!=t&&e!=e}(H&&"[object DataView]"!=yt(new H(new ArrayBuffer(1)))||V&&yt(new V)!=r||j&&"[object Promise]"!=yt(j.resolve())||Z&&yt(new Z)!=s||W&&"[object WeakMap]"!=yt(new W))&&(yt=function(t){var e=ct(t),n=e==o?t.constructor:void 0,i=n?xt(n):"";if(i)switch(i){case K:return"[object DataView]";case q:return r;case J:return"[object Promise]";case Y:return s;case $:return"[object WeakMap]"}return e});var wt=ut(function(){return arguments}())?ut:function(t){return Tt(t)&&I.call(t,"callee")&&!U.call(t,"callee")},Et=Array.isArray,Ct=Q||function(){return!1};function Bt(t){if(!Mt(t))return!1;var e=ct(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function St(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Mt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Tt(t){return null!=t&&"object"==typeof t}var It=_?function(t){return function(e){return t(e)}}(_):function(t){return Tt(t)&&St(t.length)&&!!c[ct(t)]};function Lt(t){return null!=(e=t)&&St(e.length)&&!Bt(e)?at(t):At(t);var e}t.exports=function(t,e){return ht(t,e)}})),_e={Polygon:pt,LineString:At,Point:dt,MultiPolygon:mt,MultiLineString:mt,MultiPoint:mt};function ye(t,e){return e.modes=D,e.getFeatureIdsAt=function(e){return it.click({point:e},null,t).map((function(t){return t.properties.id}))},e.getSelectedIds=function(){return t.store.getSelectedIds()},e.getSelected=function(){return{type:I,features:t.store.getSelectedIds().map((function(e){return t.store.get(e)})).map((function(t){return t.toGeoJSON()}))}},e.getSelectedPoints=function(){return{type:I,features:t.store.getSelectedCoordinates().map((function(t){return{type:B,properties:{},geometry:{type:T,coordinates:t.coordinates}}}))}},e.set=function(n){if(void 0===n.type||n.type!==I||!Array.isArray(n.features))throw new Error("Invalid FeatureCollection");var i=t.store.createRenderBatch(),r=t.store.getAllIds().slice(),o=e.add(n),s=new et(o);return(r=r.filter((function(t){return!s.has(t)}))).length&&e.delete(r),i(),o},e.add=function(e){var n=JSON.parse(JSON.stringify(jt(e))).features.map((function(e){if(e.id=e.id||ut(),null===e.geometry)throw new Error("Invalid geometry: null");if(void 0===t.store.get(e.id)||t.store.get(e.id).type!==e.geometry.type){var n=_e[e.geometry.type];if(void 0===n)throw new Error("Invalid geometry type: "+e.geometry.type+".");var i=new n(t,e);t.store.add(i)}else{var r=t.store.get(e.id);r.properties=e.properties,me(r.getCoordinates(),e.geometry.coordinates)||r.incomingCoords(e.geometry.coordinates)}return e.id}));return t.store.render(),n},e.get=function(e){var n=t.store.get(e);if(n)return n.toGeoJSON()},e.getAll=function(){return{type:I,features:t.store.getAll().map((function(t){return t.toGeoJSON()}))}},e.delete=function(n){return t.store.delete(n,{silent:!0}),e.getMode()!==D.DIRECT_SELECT||t.store.getSelectedIds().length?t.store.render():t.events.changeMode(D.SIMPLE_SELECT,void 0,{silent:!0}),e},e.deleteAll=function(){return t.store.delete(t.store.getAllIds(),{silent:!0}),e.getMode()===D.DIRECT_SELECT?t.events.changeMode(D.SIMPLE_SELECT,void 0,{silent:!0}):t.store.render(),e},e.changeMode=function(n,i){return void 0===i&&(i={}),n===D.SIMPLE_SELECT&&e.getMode()===D.SIMPLE_SELECT?(r=i.featureIds||[],o=t.store.getSelectedIds(),r.length===o.length&&JSON.stringify(r.map((function(t){return t})).sort())===JSON.stringify(o.map((function(t){return t})).sort())||(t.store.setSelected(i.featureIds,{silent:!0}),t.store.render()),e):(n===D.DIRECT_SELECT&&e.getMode()===D.DIRECT_SELECT&&i.featureId===t.store.getSelectedIds()[0]||t.events.changeMode(n,i,{silent:!0}),e);var r,o},e.getMode=function(){return t.events.getMode()},e.trash=function(){return t.events.trash({silent:!0}),e},e.combineFeatures=function(){return t.events.combineFeatures({silent:!0}),e},e.uncombineFeatures=function(){return t.events.uncombineFeatures({silent:!0}),e},e.setFeatureProperty=function(n,i,r){return t.store.setFeatureProperty(n,i,r),e},e}var ve=function(t,e){var n={options:t=function(t){void 0===t&&(t={});var e=Bt(t);return t.controls||(e.controls={}),!1===t.displayControlsDefault?e.controls=Bt(fe,t.controls):e.controls=Bt(pe,t.controls),(e=Bt(Ae,e)).styles=ge(e.styles,"cold").concat(ge(e.styles,"hot")),e}(t)};e=ye(n,e),n.api=e;var i=Tt(n);return e.onAdd=i.onAdd,e.onRemove=i.onRemove,e.types=C,e.options=t,e};function xe(t){ve(t,this)}return xe.modes=de,xe}))},3972:function(t){function e(t){if(t=Object.assign({},t),!(this instanceof e))throw new Error("MapboxLanguage needs to be called with the new keyword");this.setLanguage=this.setLanguage.bind(this),this._initialStyleUpdate=this._initialStyleUpdate.bind(this),this._defaultLanguage=t.defaultLanguage,this._isLanguageField=t.languageField||/^name_/,this._getLanguageField=t.getLanguageField||function(t){return"mul"===t?"name":`name_${t}`},this._languageSource=t.languageSource||null,this._languageTransform=t.languageTransform,this._excludedLayerIds=t.excludedLayerIds||[],this.supportedLanguages=t.supportedLanguages||["ar","de","en","es","fr","it","ja","ko","mul","pt","ru","vi","zh-Hans","zh-Hant"]}const n=/^\{name/;function i(t,e){const i=Array.isArray(e)&&"get"===e[0];return i&&n.test(e[1])&&console.warn("This plugin no longer supports the use of token syntax (e.g. {name}). Please use a get expression. See https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/ for more details."),i&&t.test(e[1])}function r(t,e,n){if(Array.isArray(e))for(let o=1;o<e.length;o++)Array.isArray(e[o])&&(i(t,e[o])&&(e[o][1]=n),r(t,e[o],n))}function o(t,e,n){if(i(t,e)&&(e[1]=n),r(t,e,n),"get"===e[0]&&"name"===e[1]){const t=e.slice(),i=["get",n];e=["coalesce",i,t]}return e}function s(t,e,n,i){return e.layout&&e.layout["text-field"]&&-1===i.indexOf(e.id)?Object.assign({},e,{layout:Object.assign({},e.layout,{"text-field":o(t,e.layout["text-field"],n)})}):e}function a(t){const e=Object.keys(t.sources).filter((e=>{const n=t.sources[e].url;return n&&n.indexOf("mapbox.mapbox-streets-v8")>-1||/mapbox-streets-v[1-9][1-9]/.test(n)}));if(!e.length)throw new Error('If using MapboxLanguage with a Mapbox style, the style must be based on vector tile version 8, e.g. "streets-v11"');return e[0]}function l(t){const e=navigator.languages?navigator.languages[0]:navigator.language||navigator.userLanguage,n=e&&e.split("-");let i=e;return n.length>1&&(i=n[0]),t.indexOf(i)>-1?i:null}e.prototype.setLanguage=function(t,e){if(this.supportedLanguages.indexOf(e)<0)throw new Error(`Language ${e} is not supported`);const n=this._languageSource||a(t);if(!n)return t;const i=this._getLanguageField(e),r=this._isLanguageField,o=this._excludedLayerIds,l=t.layers.map((t=>t.source===n?s(r,t,i,o):t)),c=Object.assign({},t,{layers:l});return this._languageTransform?this._languageTransform(c,e):c},e.prototype._initialStyleUpdate=function(){const t=this._map.getStyle(),e=this._defaultLanguage||l(this.supportedLanguages);this._map.setStyle(this.setLanguage(t,e))},e.prototype.onAdd=function(t){return this._map=t,this._map.on("style.load",this._initialStyleUpdate),this._container=document.createElement("div"),this._container},e.prototype.onRemove=function(){this._map.off("style.load",this._initialStyleUpdate),this._map=void 0},"undefined"!==typeof t.exports?t.exports=e:window.MapboxLanguage=e},5086:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var i=n(1042);function r(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}class o extends(r(Array)){clone(){return(new this.constructor).copy(this)}fromArray(t,e=0){for(let n=0;n<this.ELEMENTS;++n)this[n]=t[n+e];return this.check()}toArray(t=[],e=0){for(let n=0;n<this.ELEMENTS;++n)t[e+n]=this[n];return t}from(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}to(t){return t===this?this:(0,i.kJ)(t)?this.toArray(t):this.toObject(t)}toTarget(t){return t?this.to(t):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(i.vc)}formatString(t){let e="";for(let n=0;n<this.ELEMENTS;++n)e+=(n>0?", ":"")+(0,i.Bw)(this[n],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}equals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(!(0,i.fS)(this[e],t[e]))return!1;return!0}exactEquals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}negate(){for(let t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}lerp(t,e,n){if(void 0===n)return this.lerp(this,t,e);for(let i=0;i<this.ELEMENTS;++i){const r=t[i];this[i]=r+n*(e[i]-r)}return this.check()}min(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}max(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}clamp(t,e){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],t[n]),e[n]);return this.check()}add(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]+=e[t];return this.check()}subtract(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]-=e[t];return this.check()}scale(t){if("number"===typeof t)for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;else for(let e=0;e<this.ELEMENTS&&e<t.length;++e)this[e]*=t[e];return this.check()}multiplyByScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}check(){if(i.vc.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}validate(){let t=this.length===this.ELEMENTS;for(let e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}sub(t){return this.subtract(t)}setScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}addScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}subScalar(t){return this.addScalar(-t)}multiplyScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}divideScalar(t){return this.multiplyByScalar(1/t)}clampScalar(t,e){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],t),e);return this.check()}get elements(){return this}}},4584:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var i=n(5086),r=n(9164),o=n(1042);class s extends i.Z{toString(){let t="[";if(o.vc.printRowMajor){t+="row-major:";for(let e=0;e<this.RANK;++e)for(let n=0;n<this.RANK;++n)t+=" ".concat(this[n*this.RANK+e])}else{t+="column-major:";for(let e=0;e<this.ELEMENTS;++e)t+=" ".concat(this[e])}return t+="]",t}getElementIndex(t,e){return e*this.RANK+t}getElement(t,e){return this[e*this.RANK+t]}setElement(t,e,n){return this[e*this.RANK+t]=(0,r.u5)(n),this}getColumn(t,e=new Array(this.RANK).fill(-0)){const n=t*this.RANK;for(let i=0;i<this.RANK;++i)e[i]=this[n+i];return e}setColumn(t,e){const n=t*this.RANK;for(let i=0;i<this.RANK;++i)this[n+i]=e[i];return this}}},3998:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var i=n(5086),r=n(9164),o=n(7074);class s extends i.Z{get x(){return this[0]}set x(t){this[0]=(0,r.u5)(t)}get y(){return this[1]}set y(t){this[1]=(0,r.u5)(t)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let t=0;for(let e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}magnitudeSquared(){return this.lengthSquared()}distance(t){return Math.sqrt(this.distanceSquared(t))}distanceSquared(t){let e=0;for(let n=0;n<this.ELEMENTS;++n){const i=this[n]-t[n];e+=i*i}return(0,r.u5)(e)}dot(t){let e=0;for(let n=0;n<this.ELEMENTS;++n)e+=this[n]*t[n];return(0,r.u5)(e)}normalize(){const t=this.magnitude();if(0!==t)for(let e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}multiply(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]*=e[t];return this.check()}divide(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e[t];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(t){return this.distance(t)}distanceToSquared(t){return this.distanceSquared(t)}getComponent(t){return(0,o.Z)(t>=0&&t<this.ELEMENTS,"index is out of range"),(0,r.u5)(this[t])}setComponent(t,e){return(0,o.Z)(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}addVectors(t,e){return this.copy(t).add(e)}subVectors(t,e){return this.copy(t).subtract(e)}multiplyVectors(t,e){return this.copy(t).multiply(e)}addScaledVector(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}}},5821:function(t,e,n){"use strict";n.d(e,{Z:function(){return h}});var i,r=n(4584),o=n(9164),s=n(4417),a=n(5678),l=n(4928),c=n(8484);(function(t){t[t["COL0ROW0"]=0]="COL0ROW0",t[t["COL0ROW1"]=1]="COL0ROW1",t[t["COL0ROW2"]=2]="COL0ROW2",t[t["COL1ROW0"]=3]="COL1ROW0",t[t["COL1ROW1"]=4]="COL1ROW1",t[t["COL1ROW2"]=5]="COL1ROW2",t[t["COL2ROW0"]=6]="COL2ROW0",t[t["COL2ROW1"]=7]="COL2ROW1",t[t["COL2ROW2"]=8]="COL2ROW2"})(i||(i={}));const u=Object.freeze([1,0,0,0,1,0,0,0,1]);class h extends r.Z{static get IDENTITY(){return f()}static get ZERO(){return p()}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return i}constructor(t,...e){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):e.length>0?this.copy([t,...e]):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}identity(){return this.copy(u)}fromObject(t){return this.check()}fromQuaternion(t){return a.en(this,t),this.check()}set(t,e,n,i,r,o,s,a,l){return this[0]=t,this[1]=e,this[2]=n,this[3]=i,this[4]=r,this[5]=o,this[6]=s,this[7]=a,this[8]=l,this.check()}setRowMajor(t,e,n,i,r,o,s,a,l){return this[0]=t,this[1]=i,this[2]=s,this[3]=e,this[4]=r,this[5]=a,this[6]=n,this[7]=o,this[8]=l,this.check()}determinant(){return a.GH(this)}transpose(){return a.p4(this,this),this.check()}invert(){return a.U_(this,this),this.check()}multiplyLeft(t){return a.Jp(this,t,this),this.check()}multiplyRight(t){return a.Jp(this,this,t),this.check()}rotate(t){return a.U1(this,this,t),this.check()}scale(t){return Array.isArray(t)?a.bA(this,this,t):a.bA(this,this,[t,t]),this.check()}translate(t){return a.Iu(this,this,t),this.check()}transform(t,e){let n;switch(t.length){case 2:n=l.kK(e||[-0,-0],t,this);break;case 3:n=c.kK(e||[-0,-0,-0],t,this);break;case 4:n=(0,s._x)(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return(0,o.IL)(n,t.length),n}transformVector(t,e){return this.transform(t,e)}transformVector2(t,e){return this.transform(t,e)}transformVector3(t,e){return this.transform(t,e)}}let d,A;function p(){return d||(d=new h([0,0,0,0,0,0,0,0,0]),Object.freeze(d)),d}function f(){return A||(A=new h,Object.freeze(A)),A}},9484:function(t,e,n){"use strict";n.d(e,{Z:function(){return g}});var i,r=n(4584),o=n(9164),s=n(4417),a=n(6977),l=n(4928),c=n(8484),u=n(800);(function(t){t[t["COL0ROW0"]=0]="COL0ROW0",t[t["COL0ROW1"]=1]="COL0ROW1",t[t["COL0ROW2"]=2]="COL0ROW2",t[t["COL0ROW3"]=3]="COL0ROW3",t[t["COL1ROW0"]=4]="COL1ROW0",t[t["COL1ROW1"]=5]="COL1ROW1",t[t["COL1ROW2"]=6]="COL1ROW2",t[t["COL1ROW3"]=7]="COL1ROW3",t[t["COL2ROW0"]=8]="COL2ROW0",t[t["COL2ROW1"]=9]="COL2ROW1",t[t["COL2ROW2"]=10]="COL2ROW2",t[t["COL2ROW3"]=11]="COL2ROW3",t[t["COL3ROW0"]=12]="COL3ROW0",t[t["COL3ROW1"]=13]="COL3ROW1",t[t["COL3ROW2"]=14]="COL3ROW2",t[t["COL3ROW3"]=15]="COL3ROW3"})(i||(i={}));const h=45*Math.PI/180,d=1,A=.1,p=500,f=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);class g extends r.Z{static get IDENTITY(){return v()}static get ZERO(){return y()}get ELEMENTS(){return 16}get RANK(){return 4}get INDICES(){return i}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,e,n,i,r,o,s,a,l,c,u,h,d,A,p,f){return this[0]=t,this[1]=e,this[2]=n,this[3]=i,this[4]=r,this[5]=o,this[6]=s,this[7]=a,this[8]=l,this[9]=c,this[10]=u,this[11]=h,this[12]=d,this[13]=A,this[14]=p,this[15]=f,this.check()}setRowMajor(t,e,n,i,r,o,s,a,l,c,u,h,d,A,p,f){return this[0]=t,this[1]=r,this[2]=l,this[3]=d,this[4]=e,this[5]=o,this[6]=c,this[7]=A,this[8]=n,this[9]=s,this[10]=u,this[11]=p,this[12]=i,this[13]=a,this[14]=h,this[15]=f,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(f)}fromObject(t){return this.check()}fromQuaternion(t){return a.en(this,t),this.check()}frustum(t){const{left:e,right:n,bottom:i,top:r,near:o=A,far:s=p}=t;return s===1/0?b(this,e,n,i,r,o):a.oy(this,e,n,i,r,o,s),this.check()}lookAt(t){const{eye:e,center:n=[0,0,0],up:i=[0,1,0]}=t;return a.zB(this,e,n,i),this.check()}ortho(t){const{left:e,right:n,bottom:i,top:r,near:o=A,far:s=p}=t;return a.M5(this,e,n,i,r,o,s),this.check()}orthographic(t){const{fovy:e=h,aspect:n=d,focalDistance:i=1,near:r=A,far:o=p}=t;x(e);const s=e/2,a=i*Math.tan(s),l=a*n;return this.ortho({left:-l,right:l,bottom:-a,top:a,near:r,far:o})}perspective(t){const{fovy:e=45*Math.PI/180,aspect:n=1,near:i=.1,far:r=500}=t;return x(e),a.G3(this,e,n,i,r),this.check()}determinant(){return a.GH(this)}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t,e){t=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=e||[-0,-0,-0];const n=this.getScale(e),i=1/n[0],r=1/n[1],o=1/n[2];return t[0]=this[0]*i,t[1]=this[1]*r,t[2]=this[2]*o,t[3]=0,t[4]=this[4]*i,t[5]=this[5]*r,t[6]=this[6]*o,t[7]=0,t[8]=this[8]*i,t[9]=this[9]*r,t[10]=this[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t,e){t=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=e||[-0,-0,-0];const n=this.getScale(e),i=1/n[0],r=1/n[1],o=1/n[2];return t[0]=this[0]*i,t[1]=this[1]*r,t[2]=this[2]*o,t[3]=this[4]*i,t[4]=this[5]*r,t[5]=this[6]*o,t[6]=this[8]*i,t[7]=this[9]*r,t[8]=this[10]*o,t}transpose(){return a.p4(this,this),this.check()}invert(){return a.U_(this,this),this.check()}multiplyLeft(t){return a.Jp(this,t,this),this.check()}multiplyRight(t){return a.Jp(this,this,t),this.check()}rotateX(t){return a.lM(this,this,t),this.check()}rotateY(t){return a.uD(this,this,t),this.check()}rotateZ(t){return a.jI(this,this,t),this.check()}rotateXYZ(t){return this.rotateX(t[0]).rotateY(t[1]).rotateZ(t[2])}rotateAxis(t,e){return a.U1(this,this,t,e),this.check()}scale(t){return a.bA(this,this,Array.isArray(t)?t:[t,t,t]),this.check()}translate(t){return a.Iu(this,this,t),this.check()}transform(t,e){return 4===t.length?(e=u.fF(e||[-0,-0,-0,-0],t,this),(0,o.IL)(e,4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:n}=t;let i;switch(n){case 2:i=l.fF(e||[-0,-0],t,this);break;case 3:i=c.fF(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return(0,o.IL)(i,t.length),i}transformAsVector(t,e){let n;switch(t.length){case 2:n=(0,s.pb)(e||[-0,-0],t,this);break;case 3:n=(0,s.pL)(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return(0,o.IL)(n,t.length),n}transformPoint(t,e){return this.transformAsPoint(t,e)}transformVector(t,e){return this.transformAsPoint(t,e)}transformDirection(t,e){return this.transformAsVector(t,e)}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,n){return this.identity().translate([t,e,n])}}let m,_;function y(){return m||(m=new g([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Object.freeze(m)),m}function v(){return _||(_=new g,Object.freeze(_)),_}function x(t){if(t>2*Math.PI)throw Error("expected radians")}function b(t,e,n,i,r,o){const s=2*o/(n-e),a=2*o/(r-i),l=(n+e)/(n-e),c=(r+i)/(r-i),u=-1,h=-1,d=-2*o;return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=l,t[9]=c,t[10]=u,t[11]=h,t[12]=0,t[13]=0,t[14]=d,t[15]=0,t}},5414:function(t,e,n){"use strict";n.d(e,{Z:function(){return L}});var i=n(5086),r=n(9164),o=n(9886),s=n(1667),a=n(5678),l=n(8484),c=n(800);function u(){var t=new s.WT(4);return s.WT!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function h(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function d(t,e,n){n*=.5;var i=Math.sin(n);return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=Math.cos(n),t}function A(t,e,n){var i=e[0],r=e[1],o=e[2],s=e[3],a=n[0],l=n[1],c=n[2],u=n[3];return t[0]=i*u+s*a+r*c-o*l,t[1]=r*u+s*l+o*a-i*c,t[2]=o*u+s*c+i*l-r*a,t[3]=s*u-i*a-r*l-o*c,t}function p(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],s=e[3],a=Math.sin(n),l=Math.cos(n);return t[0]=i*l+s*a,t[1]=r*l+o*a,t[2]=o*l-r*a,t[3]=s*l-i*a,t}function f(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],s=e[3],a=Math.sin(n),l=Math.cos(n);return t[0]=i*l-o*a,t[1]=r*l+s*a,t[2]=o*l+i*a,t[3]=s*l-r*a,t}function g(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],s=e[3],a=Math.sin(n),l=Math.cos(n);return t[0]=i*l+r*a,t[1]=r*l-i*a,t[2]=o*l+s*a,t[3]=s*l-o*a,t}function m(t,e){var n=e[0],i=e[1],r=e[2];return t[0]=n,t[1]=i,t[2]=r,t[3]=Math.sqrt(Math.abs(1-n*n-i*i-r*r)),t}function _(t,e,n,i){var r,o,a,l,c,u=e[0],h=e[1],d=e[2],A=e[3],p=n[0],f=n[1],g=n[2],m=n[3];return o=u*p+h*f+d*g+A*m,o<0&&(o=-o,p=-p,f=-f,g=-g,m=-m),1-o>s.Ib?(r=Math.acos(o),a=Math.sin(r),l=Math.sin((1-i)*r)/a,c=Math.sin(i*r)/a):(l=1-i,c=i),t[0]=l*u+c*p,t[1]=l*h+c*f,t[2]=l*d+c*g,t[3]=l*A+c*m,t}function y(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],s=n*n+i*i+r*r+o*o,a=s?1/s:0;return t[0]=-n*a,t[1]=-i*a,t[2]=-r*a,t[3]=o*a,t}function v(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function x(t,e){var n,i=e[0]+e[4]+e[8];if(i>0)n=Math.sqrt(i+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);var o=(r+1)%3,s=(r+2)%3;n=Math.sqrt(e[3*r+r]-e[3*o+o]-e[3*s+s]+1),t[r]=.5*n,n=.5/n,t[3]=(e[3*o+s]-e[3*s+o])*n,t[o]=(e[3*o+r]+e[3*r+o])*n,t[s]=(e[3*s+r]+e[3*r+s])*n}return t}c.d9,c.al,c.JG,c.t8;var b=c.IH,w=c.bA,E=c.AK,C=c.t7,B=c.kE,S=c.we,M=c.Fv,T=(c.I6,c.fS,function(){var t=l.Ue(),e=l.al(1,0,0),n=l.al(0,1,0);return function(i,r,o){var s=l.AK(r,o);return s<-.999999?(l.kC(t,e,r),l.Zh(t)<1e-6&&l.kC(t,n,r),l.Fv(t,t),d(i,t,Math.PI),i):s>.999999?(i[0]=0,i[1]=0,i[2]=0,i[3]=1,i):(l.kC(t,r,o),i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=1+s,M(i,i))}}());(function(){var t=u(),e=u()})(),function(){var t=a.Ue()}();const I=[0,0,0,1];class L extends i.Z{constructor(t=0,e=0,n=0,i=1){super(-0,-0,-0,-0),Array.isArray(t)&&1===arguments.length?this.copy(t):this.set(t,e,n,i)}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}set(t,e,n,i){return this[0]=t,this[1]=e,this[2]=n,this[3]=i,this.check()}fromObject(t){return this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this.check()}fromMatrix3(t){return x(this,t),this.check()}fromAxisRotation(t,e){return d(this,t,e),this.check()}identity(){return h(this),this.check()}setAxisAngle(t,e){return this.fromAxisRotation(t,e)}get ELEMENTS(){return 4}get x(){return this[0]}set x(t){this[0]=(0,r.u5)(t)}get y(){return this[1]}set y(t){this[1]=(0,r.u5)(t)}get z(){return this[2]}set z(t){this[2]=(0,r.u5)(t)}get w(){return this[3]}set w(t){this[3]=(0,r.u5)(t)}len(){return B(this)}lengthSquared(){return S(this)}dot(t){return E(this,t)}rotationTo(t,e){return T(this,t,e),this.check()}add(t){return b(this,this,t),this.check()}calculateW(){return m(this,this),this.check()}conjugate(){return v(this,this),this.check()}invert(){return y(this,this),this.check()}lerp(t,e,n){return void 0===n?this.lerp(this,t,e):(C(this,t,e,n),this.check())}multiplyRight(t){return A(this,this,t),this.check()}multiplyLeft(t){return A(this,t,this),this.check()}normalize(){const t=this.len(),e=t>0?1/t:0;return this[0]=this[0]*e,this[1]=this[1]*e,this[2]=this[2]*e,this[3]=this[3]*e,0===t&&(this[3]=1),this.check()}rotateX(t){return p(this,this,t),this.check()}rotateY(t){return f(this,this,t),this.check()}rotateZ(t){return g(this,this,t),this.check()}scale(t){return w(this,this,t),this.check()}slerp(t,e,n){let i,r,o;switch(arguments.length){case 1:({start:i=I,target:r,ratio:o}=t);break;case 2:i=this,r=t,o=e;break;default:i=t,r=e,o=n}return _(this,i,r,o),this.check()}transformVector4(t,e=new o.Z){return c.VC(e,t,this),(0,r.IL)(e,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(t,e){return this.setAxisAngle(t,e)}premultiply(t){return this.multiplyLeft(t)}multiply(t){return this.multiplyRight(t)}}},5770:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var i=n(3998),r=n(1042),o=n(9164),s=n(4928),a=n(4417);class l extends i.Z{constructor(t=0,e=0){super(2),(0,r.kJ)(t)&&1===arguments.length?this.copy(t):(r.vc.debug&&((0,o.u5)(t),(0,o.u5)(e)),this[0]=t,this[1]=e)}set(t,e){return this[0]=t,this[1]=e,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this.check()}fromObject(t){return r.vc.debug&&((0,o.u5)(t.x),(0,o.u5)(t.y)),this[0]=t.x,this[1]=t.y,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t}get ELEMENTS(){return 2}horizontalAngle(){return Math.atan2(this.y,this.x)}verticalAngle(){return Math.atan2(this.x,this.y)}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return s.fF(this,this,t),this.check()}transformAsVector(t){return(0,a.pb)(this,this,t),this.check()}transformByMatrix3(t){return s.kK(this,this,t),this.check()}transformByMatrix2x3(t){return s.iu(this,this,t),this.check()}transformByMatrix2(t){return s.c(this,this,t),this.check()}}},3012:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var i=n(3998),r=n(1042),o=n(9164),s=n(8484),a=n(4417);const l=[0,0,0];let c;class u extends i.Z{static get ZERO(){return c||(c=new u(0,0,0),Object.freeze(c)),c}constructor(t=0,e=0,n=0){super(-0,-0,-0),1===arguments.length&&(0,r.kJ)(t)?this.copy(t):(r.vc.debug&&((0,o.u5)(t),(0,o.u5)(e),(0,o.u5)(n)),this[0]=t,this[1]=e,this[2]=n)}set(t,e,n){return this[0]=t,this[1]=e,this[2]=n,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}fromObject(t){return r.vc.debug&&((0,o.u5)(t.x),(0,o.u5)(t.y),(0,o.u5)(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}get ELEMENTS(){return 3}get z(){return this[2]}set z(t){this[2]=(0,o.u5)(t)}angle(t){return s.EU(this,t)}cross(t){return s.kC(this,this,t),this.check()}rotateX({radians:t,origin:e=l}){return s.lM(this,this,e,t),this.check()}rotateY({radians:t,origin:e=l}){return s.uD(this,this,e,t),this.check()}rotateZ({radians:t,origin:e=l}){return s.jI(this,this,e,t),this.check()}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return s.fF(this,this,t),this.check()}transformAsVector(t){return(0,a.pL)(this,this,t),this.check()}transformByMatrix3(t){return s.kK(this,this,t),this.check()}transformByMatrix2(t){return(0,a.eQ)(this,this,t),this.check()}transformByQuaternion(t){return s.VC(this,this,t),this.check()}}},9886:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var i=n(3998),r=n(1042),o=n(9164),s=n(8484),a=n(4417);let l;class c extends i.Z{static get ZERO(){return l||(l=new c(0,0,0,0),Object.freeze(l)),l}constructor(t=0,e=0,n=0,i=0){super(-0,-0,-0,-0),(0,r.kJ)(t)&&1===arguments.length?this.copy(t):(r.vc.debug&&((0,o.u5)(t),(0,o.u5)(e),(0,o.u5)(n),(0,o.u5)(i)),this[0]=t,this[1]=e,this[2]=n,this[3]=i)}set(t,e,n,i){return this[0]=t,this[1]=e,this[2]=n,this[3]=i,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}fromObject(t){return r.vc.debug&&((0,o.u5)(t.x),(0,o.u5)(t.y),(0,o.u5)(t.z),(0,o.u5)(t.w)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t.w=this[3],t}get ELEMENTS(){return 4}get z(){return this[2]}set z(t){this[2]=(0,o.u5)(t)}get w(){return this[3]}set w(t){this[3]=(0,o.u5)(t)}transform(t){return s.fF(this,this,t),this.check()}transformByMatrix3(t){return(0,a._x)(this,this,t),this.check()}transformByMatrix2(t){return(0,a.G7)(this,this,t),this.check()}transformByQuaternion(t){return s.VC(this,this,t),this.check()}applyMatrix4(t){return t.transform(this,this),this}}},4808:function(t,e,n){"use strict";n.r(e),n.d(e,{Euler:function(){return v},Matrix3:function(){return s.Z},Matrix4:function(){return a.Z},Pose:function(){return w},Quaternion:function(){return l.Z},SphericalCoordinates:function(){return p},Vector2:function(){return i.Z},Vector3:function(){return r.Z},Vector4:function(){return o.Z},_Euler:function(){return v},_MathUtils:function(){return E.Z},_Pose:function(){return w},_SphericalCoordinates:function(){return p},acos:function(){return u.Kh},asin:function(){return u.ZR},assert:function(){return C.Z},atan:function(){return u.z4},clamp:function(){return u.uZ},clone:function(){return u.d9},config:function(){return u.vc},configure:function(){return u.jQ},cos:function(){return u.mC},degrees:function(){return u.RW},equals:function(){return u.fS},exactEquals:function(){return u.I6},formatValue:function(){return u.Bw},isArray:function(){return u.kJ},lerp:function(){return u.t7},radians:function(){return u.uR},sin:function(){return u.O$},tan:function(){return u.OR},toDegrees:function(){return u.Ux},toRadians:function(){return u.Yr},withEpsilon:function(){return u.BJ}});var i=n(5770),r=n(3012),o=n(9886),s=n(5821),a=n(9484),l=n(5414),c=n(768),u=n(1042),h=n(8484);const d=1e-6,A=6371e3;class p{constructor({phi:t=0,theta:e=0,radius:n=1,bearing:i,pitch:r,altitude:o,radiusScale:s=A}={}){(0,c.Z)(this,"phi",void 0),(0,c.Z)(this,"theta",void 0),(0,c.Z)(this,"radius",void 0),(0,c.Z)(this,"radiusScale",void 0),this.phi=t,this.theta=e,this.radius=n||o||1,this.radiusScale=s||1,void 0!==i&&(this.bearing=i),void 0!==r&&(this.pitch=r),this.check()}toString(){return this.formatString(u.vc)}formatString({printTypes:t=!1}){const e=u.Bw;return"".concat(t?"Spherical":"","[rho:").concat(e(this.radius),",theta:").concat(e(this.theta),",phi:").concat(e(this.phi),"]")}equals(t){return(0,u.fS)(this.radius,t.radius)&&(0,u.fS)(this.theta,t.theta)&&(0,u.fS)(this.phi,t.phi)}exactEquals(t){return this.radius===t.radius&&this.theta===t.theta&&this.phi===t.phi}get bearing(){return 180-(0,u.RW)(this.phi)}set bearing(t){this.phi=Math.PI-(0,u.uR)(t)}get pitch(){return(0,u.RW)(this.theta)}set pitch(t){this.theta=(0,u.uR)(t)}get longitude(){return(0,u.RW)(this.phi)}get latitude(){return(0,u.RW)(this.theta)}get lng(){return(0,u.RW)(this.phi)}get lat(){return(0,u.RW)(this.theta)}get z(){return(this.radius-1)*this.radiusScale}set(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this.check()}clone(){return(new p).copy(this)}copy(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this.check()}fromLngLatZ([t,e,n]){return this.radius=1+n/this.radiusScale,this.phi=(0,u.uR)(e),this.theta=(0,u.uR)(t),this.check()}fromVector3(t){return this.radius=h.kE(t),this.radius>0&&(this.theta=Math.atan2(t[0],t[1]),this.phi=Math.acos((0,u.uZ)(t[2]/this.radius,-1,1))),this.check()}toVector3(){return new r.Z(0,0,this.radius).rotateX({radians:this.theta}).rotateZ({radians:this.phi})}makeSafe(){return this.phi=Math.max(d,Math.min(Math.PI-d,this.phi)),this}check(){if(!Number.isFinite(this.phi)||!Number.isFinite(this.theta)||!(this.radius>0))throw new Error("SphericalCoordinates: some fields set to invalid numbers");return this}}var f=n(5086),g=n(9164);const m="Unknown Euler angle order",_=.99999;var y;(function(t){t[t["ZYX"]=0]="ZYX",t[t["YXZ"]=1]="YXZ",t[t["XZY"]=2]="XZY",t[t["ZXY"]=3]="ZXY",t[t["YZX"]=4]="YZX",t[t["XYZ"]=5]="XYZ"})(y||(y={}));class v extends f.Z{static get ZYX(){return y.ZYX}static get YXZ(){return y.YXZ}static get XZY(){return y.XZY}static get ZXY(){return y.ZXY}static get YZX(){return y.YZX}static get XYZ(){return y.XYZ}static get RollPitchYaw(){return y.ZYX}static get DefaultOrder(){return y.ZYX}static get RotationOrders(){return y}static rotationOrder(t){return y[t]}get ELEMENTS(){return 4}constructor(t=0,e=0,n=0,i=v.DefaultOrder){super(-0,-0,-0,-0),arguments.length>0&&Array.isArray(arguments[0])?this.fromVector3(...arguments):this.set(t,e,n,i)}fromQuaternion(t){const[e,n,i,r]=t,o=n*n,s=-2*(o+i*i)+1,a=2*(e*n+r*i);let l=-2*(e*i-r*n);const c=2*(n*i+r*e),u=-2*(e*e+o)+1;l=l>1?1:l,l=l<-1?-1:l;const h=Math.atan2(c,u),d=Math.asin(l),A=Math.atan2(a,s);return this.set(h,d,A,v.RollPitchYaw)}fromObject(t){throw new Error("not implemented")}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=Number.isFinite(t[3])||this.order,this.check()}set(t=0,e=0,n=0,i){return this[0]=t,this[1]=e,this[2]=n,this[3]=Number.isFinite(i)?i:this[3],this.check()}validate(){return x(this[3])&&Number.isFinite(this[0])&&Number.isFinite(this[1])&&Number.isFinite(this[2])}toArray(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t}toArray4(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t[e+3]=this[3],t}toVector3(t=[-0,-0,-0]){return t[0]=this[0],t[1]=this[1],t[2]=this[2],t}get x(){return this[0]}set x(t){this[0]=(0,g.u5)(t)}get y(){return this[1]}set y(t){this[1]=(0,g.u5)(t)}get z(){return this[2]}set z(t){this[2]=(0,g.u5)(t)}get alpha(){return this[0]}set alpha(t){this[0]=(0,g.u5)(t)}get beta(){return this[1]}set beta(t){this[1]=(0,g.u5)(t)}get gamma(){return this[2]}set gamma(t){this[2]=(0,g.u5)(t)}get phi(){return this[0]}set phi(t){this[0]=(0,g.u5)(t)}get theta(){return this[1]}set theta(t){this[1]=(0,g.u5)(t)}get psi(){return this[2]}set psi(t){this[2]=(0,g.u5)(t)}get roll(){return this[0]}set roll(t){this[0]=(0,g.u5)(t)}get pitch(){return this[1]}set pitch(t){this[1]=(0,g.u5)(t)}get yaw(){return this[2]}set yaw(t){this[2]=(0,g.u5)(t)}get order(){return this[3]}set order(t){this[3]=b(t)}fromVector3(t,e){return this.set(t[0],t[1],t[2],Number.isFinite(e)?e:this[3])}fromArray(t,e=0){return this[0]=t[0+e],this[1]=t[1+e],this[2]=t[2+e],void 0!==t[3]&&(this[3]=t[3]),this.check()}fromRollPitchYaw(t,e,n){return this.set(t,e,n,y.ZYX)}fromRotationMatrix(t,e=v.DefaultOrder){return this._fromRotationMatrix(t,e),this.check()}getRotationMatrix(t){return this._getRotationMatrix(t)}getQuaternion(){const t=new l.Z;switch(this[4]){case y.XYZ:return t.rotateX(this[0]).rotateY(this[1]).rotateZ(this[2]);case y.YXZ:return t.rotateY(this[0]).rotateX(this[1]).rotateZ(this[2]);case y.ZXY:return t.rotateZ(this[0]).rotateX(this[1]).rotateY(this[2]);case y.ZYX:return t.rotateZ(this[0]).rotateY(this[1]).rotateX(this[2]);case y.YZX:return t.rotateY(this[0]).rotateZ(this[1]).rotateX(this[2]);case y.XZY:return t.rotateX(this[0]).rotateZ(this[1]).rotateY(this[2]);default:throw new Error(m)}}_fromRotationMatrix(t,e=v.DefaultOrder){const n=t[0],i=t[4],r=t[8],o=t[1],s=t[5],a=t[9],l=t[2],c=t[6],h=t[10];switch(e=e||this[3],e){case v.XYZ:this[1]=Math.asin((0,u.uZ)(r,-1,1)),Math.abs(r)<_?(this[0]=Math.atan2(-a,h),this[2]=Math.atan2(-i,n)):(this[0]=Math.atan2(c,s),this[2]=0);break;case v.YXZ:this[0]=Math.asin(-(0,u.uZ)(a,-1,1)),Math.abs(a)<_?(this[1]=Math.atan2(r,h),this[2]=Math.atan2(o,s)):(this[1]=Math.atan2(-l,n),this[2]=0);break;case v.ZXY:this[0]=Math.asin((0,u.uZ)(c,-1,1)),Math.abs(c)<_?(this[1]=Math.atan2(-l,h),this[2]=Math.atan2(-i,s)):(this[1]=0,this[2]=Math.atan2(o,n));break;case v.ZYX:this[1]=Math.asin(-(0,u.uZ)(l,-1,1)),Math.abs(l)<_?(this[0]=Math.atan2(c,h),this[2]=Math.atan2(o,n)):(this[0]=0,this[2]=Math.atan2(-i,s));break;case v.YZX:this[2]=Math.asin((0,u.uZ)(o,-1,1)),Math.abs(o)<_?(this[0]=Math.atan2(-a,s),this[1]=Math.atan2(-l,n)):(this[0]=0,this[1]=Math.atan2(r,h));break;case v.XZY:this[2]=Math.asin(-(0,u.uZ)(i,-1,1)),Math.abs(i)<_?(this[0]=Math.atan2(c,s),this[1]=Math.atan2(r,n)):(this[0]=Math.atan2(-a,h),this[1]=0);break;default:throw new Error(m)}return this[3]=e,this}_getRotationMatrix(t){const e=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],n=this.x,i=this.y,r=this.z,o=Math.cos(n),s=Math.cos(i),a=Math.cos(r),l=Math.sin(n),c=Math.sin(i),u=Math.sin(r);switch(this[3]){case v.XYZ:{const t=o*a,n=o*u,i=l*a,r=l*u;e[0]=s*a,e[4]=-s*u,e[8]=c,e[1]=n+i*c,e[5]=t-r*c,e[9]=-l*s,e[2]=r-t*c,e[6]=i+n*c,e[10]=o*s;break}case v.YXZ:{const t=s*a,n=s*u,i=c*a,r=c*u;e[0]=t+r*l,e[4]=i*l-n,e[8]=o*c,e[1]=o*u,e[5]=o*a,e[9]=-l,e[2]=n*l-i,e[6]=r+t*l,e[10]=o*s;break}case v.ZXY:{const t=s*a,n=s*u,i=c*a,r=c*u;e[0]=t-r*l,e[4]=-o*u,e[8]=i+n*l,e[1]=n+i*l,e[5]=o*a,e[9]=r-t*l,e[2]=-o*c,e[6]=l,e[10]=o*s;break}case v.ZYX:{const t=o*a,n=o*u,i=l*a,r=l*u;e[0]=s*a,e[4]=i*c-n,e[8]=t*c+r,e[1]=s*u,e[5]=r*c+t,e[9]=n*c-i,e[2]=-c,e[6]=l*s,e[10]=o*s;break}case v.YZX:{const t=o*s,n=o*c,i=l*s,r=l*c;e[0]=s*a,e[4]=r-t*u,e[8]=i*u+n,e[1]=u,e[5]=o*a,e[9]=-l*a,e[2]=-c*a,e[6]=n*u+i,e[10]=t-r*u;break}case v.XZY:{const t=o*s,n=o*c,i=l*s,r=l*c;e[0]=s*a,e[4]=-u,e[8]=c*a,e[1]=t*u+r,e[5]=o*a,e[9]=n*u-i,e[2]=i*u-n,e[6]=l*a,e[10]=r*u+t;break}default:throw new Error(m)}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}toQuaternion(){const t=Math.cos(.5*this.yaw),e=Math.sin(.5*this.yaw),n=Math.cos(.5*this.roll),i=Math.sin(.5*this.roll),r=Math.cos(.5*this.pitch),o=Math.sin(.5*this.pitch),s=t*n*r+e*i*o,a=t*i*r-e*n*o,c=t*n*o+e*i*r,u=e*n*r-t*i*o;return new l.Z(a,c,u,s)}}function x(t){return t>=0&&t<6}function b(t){if(t<0&&t>=6)throw new Error(m);return t}class w{constructor({x:t=0,y:e=0,z:n=0,roll:i=0,pitch:o=0,yaw:s=0,position:a,orientation:l}={}){(0,c.Z)(this,"position",void 0),(0,c.Z)(this,"orientation",void 0),Array.isArray(a)&&3===a.length?this.position=new r.Z(a):this.position=new r.Z(t,e,n),Array.isArray(l)&&4===l.length?this.orientation=new v(l,l[3]):this.orientation=new v(i,o,s,v.RollPitchYaw)}get x(){return this.position.x}set x(t){this.position.x=t}get y(){return this.position.y}set y(t){this.position.y=t}get z(){return this.position.z}set z(t){this.position.z=t}get roll(){return this.orientation.roll}set roll(t){this.orientation.roll=t}get pitch(){return this.orientation.pitch}set pitch(t){this.orientation.pitch=t}get yaw(){return this.orientation.yaw}set yaw(t){this.orientation.yaw=t}getPosition(){return this.position}getOrientation(){return this.orientation}equals(t){return!!t&&(this.position.equals(t.position)&&this.orientation.equals(t.orientation))}exactEquals(t){return!!t&&(this.position.exactEquals(t.position)&&this.orientation.exactEquals(t.orientation))}getTransformationMatrix(){const t=Math.sin(this.roll),e=Math.sin(this.pitch),n=Math.sin(this.yaw),i=Math.cos(this.roll),r=Math.cos(this.pitch),o=Math.cos(this.yaw);return(new a.Z).setRowMajor(o*r,-n*i+o*e*t,n*t+o*e*i,this.x,n*r,o*i+n*e*t,-o*t+n*e*i,this.y,-e,r*t,r*i,this.z,0,0,0,1)}getTransformationMatrixFromPose(t){return(new a.Z).multiplyRight(this.getTransformationMatrix()).multiplyRight(t.getTransformationMatrix().invert())}getTransformationMatrixToPose(t){return(new a.Z).multiplyRight(t.getTransformationMatrix()).multiplyRight(this.getTransformationMatrix().invert())}}var E=n(4505),C=n(7074)},7074:function(t,e,n){"use strict";function i(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}n.d(e,{Z:function(){return i}})},1042:function(t,e,n){"use strict";n.d(e,{BJ:function(){return C},Bw:function(){return l},I6:function(){return E},Kh:function(){return y},O$:function(){return f},OR:function(){return m},RW:function(){return p},Ux:function(){return d},Yr:function(){return h},ZR:function(){return _},d9:function(){return u},fS:function(){return w},jQ:function(){return a},kJ:function(){return c},mC:function(){return g},t7:function(){return b},uR:function(){return A},uZ:function(){return x},vc:function(){return s},z4:function(){return v}});var i=n(7074);const r=1/Math.PI*180,o=1/180*Math.PI,s={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0};function a(t){for(const e in t)(0,i.Z)(e in s),s[e]=t[e];return s}function l(t,{precision:e=s.precision}={}){return t=B(t),"".concat(parseFloat(t.toPrecision(e)))}function c(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function u(t){return"clone"in t?t.clone():t.slice()}function h(t){return A(t)}function d(t){return p(t)}function A(t,e){return M(t,(t=>t*o),e)}function p(t,e){return M(t,(t=>t*r),e)}function f(t,e){return M(t,(t=>Math.sin(t)),e)}function g(t,e){return M(t,(t=>Math.cos(t)),e)}function m(t,e){return M(t,(t=>Math.tan(t)),e)}function _(t,e){return M(t,(t=>Math.asin(t)),e)}function y(t,e){return M(t,(t=>Math.acos(t)),e)}function v(t,e){return M(t,(t=>Math.atan(t)),e)}function x(t,e,n){return M(t,(t=>Math.max(e,Math.min(n,t))))}function b(t,e,n){return c(t)?t.map(((t,i)=>b(t,e[i],n))):n*e+(1-n)*t}function w(t,e,n){const i=s.EPSILON;n&&(s.EPSILON=n);try{if(t===e)return!0;if(c(t)&&c(e)){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!w(t[n],e[n]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):"number"===typeof t&&"number"===typeof e&&Math.abs(t-e)<=s.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{s.EPSILON=i}}function E(t,e){if(t===e)return!0;if(t&&"object"===typeof t&&e&&"object"===typeof e){if(t.constructor!==e.constructor)return!1;if(t.exactEquals)return t.exactEquals(e)}if(c(t)&&c(e)){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!E(t[n],e[n]))return!1;return!0}return!1}function C(t,e){const n=s.EPSILON;let i;s.EPSILON=t;try{i=e()}finally{s.EPSILON=n}return i}function B(t){return Math.round(t/s.EPSILON)*s.EPSILON}function S(t){return t.clone?t.clone():new Array(t.length)}function M(t,e,n){if(c(t)){const i=t;n=n||S(i);for(let r=0;r<n.length&&r<i.length;++r)n[r]=e(t[r],r,n);return n}return e(t)}},4417:function(t,e,n){"use strict";function i(t,e,n){const i=e[0],r=e[1],o=n[3]*i+n[7]*r||1;return t[0]=(n[0]*i+n[4]*r)/o,t[1]=(n[1]*i+n[5]*r)/o,t}function r(t,e,n){const i=e[0],r=e[1],o=e[2],s=n[3]*i+n[7]*r+n[11]*o||1;return t[0]=(n[0]*i+n[4]*r+n[8]*o)/s,t[1]=(n[1]*i+n[5]*r+n[9]*o)/s,t[2]=(n[2]*i+n[6]*r+n[10]*o)/s,t}function o(t,e,n){const i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t[2]=e[2],t}function s(t,e,n){const i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t[2]=e[2],t[3]=e[3],t}function a(t,e,n){const i=e[0],r=e[1],o=e[2];return t[0]=n[0]*i+n[3]*r+n[6]*o,t[1]=n[1]*i+n[4]*r+n[7]*o,t[2]=n[2]*i+n[5]*r+n[8]*o,t[3]=e[3],t}n.d(e,{G7:function(){return s},_x:function(){return a},eQ:function(){return o},pL:function(){return r},pb:function(){return i}})},4505:function(t,e){"use strict";e["Z"]={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,PI_OVER_TWO:Math.PI/2,PI_OVER_FOUR:Math.PI/4,PI_OVER_SIX:Math.PI/6,TWO_PI:2*Math.PI}},9164:function(t,e,n){"use strict";n.d(e,{IL:function(){return s},u5:function(){return o}});var i=n(1042);function r(t,e){if(t.length!==e)return!1;for(let n=0;n<t.length;++n)if(!Number.isFinite(t[n]))return!1;return!0}function o(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function s(t,e,n=""){if(i.vc.debug&&!r(t,e))throw new Error("math.gl: ".concat(n," some fields set to invalid numbers'"));return t}},7971:function(t,e,n){"use strict";var i=n(7482);function r(t){var e=[1/0,1/0,-1/0,-1/0];return i.coordEach(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}r["default"]=r,e.Z=r},1746:function(t,e){"use strict";function n(t,e,n){void 0===n&&(n={});var i={type:"Feature"};return(0===n.id||n.id)&&(i.id=n.id),n.bbox&&(i.bbox=n.bbox),i.properties=e||{},i.geometry=t,i}function i(t,e,n){switch(void 0===n&&(n={}),t){case"Point":return r(e).geometry;case"LineString":return l(e).geometry;case"Polygon":return s(e).geometry;case"MultiPoint":return d(e).geometry;case"MultiLineString":return h(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}}function r(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(!E(t[0])||!E(t[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:t};return n(r,e,i)}function o(t,e,n){return void 0===n&&(n={}),u(t.map((function(t){return r(t,e)})),n)}function s(t,e,i){void 0===i&&(i={});for(var r=0,o=t;r<o.length;r++){var s=o[r];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}var l={type:"Polygon",coordinates:t};return n(l,e,i)}function a(t,e,n){return void 0===n&&(n={}),u(t.map((function(t){return s(t,e)})),n)}function l(t,e,i){if(void 0===i&&(i={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");var r={type:"LineString",coordinates:t};return n(r,e,i)}function c(t,e,n){return void 0===n&&(n={}),u(t.map((function(t){return l(t,e)})),n)}function u(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function h(t,e,i){void 0===i&&(i={});var r={type:"MultiLineString",coordinates:t};return n(r,e,i)}function d(t,e,i){void 0===i&&(i={});var r={type:"MultiPoint",coordinates:t};return n(r,e,i)}function A(t,e,i){void 0===i&&(i={});var r={type:"MultiPolygon",coordinates:t};return n(r,e,i)}function p(t,e,i){void 0===i&&(i={});var r={type:"GeometryCollection",geometries:t};return n(r,e,i)}function f(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n}function g(t,n){void 0===n&&(n="kilometers");var i=e.factors[n];if(!i)throw new Error(n+" units is invalid");return t*i}function m(t,n){void 0===n&&(n="kilometers");var i=e.factors[n];if(!i)throw new Error(n+" units is invalid");return t/i}function _(t,e){return v(m(t,e))}function y(t){var e=t%360;return e<0&&(e+=360),e}function v(t){var e=t%(2*Math.PI);return 180*e/Math.PI}function x(t){var e=t%360;return e*Math.PI/180}function b(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return g(m(t,e),n)}function w(t,n,i){if(void 0===n&&(n="meters"),void 0===i&&(i="kilometers"),!(t>=0))throw new Error("area must be a positive number");var r=e.areaFactors[n];if(!r)throw new Error("invalid original units");var o=e.areaFactors[i];if(!o)throw new Error("invalid final units");return t/r*o}function E(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function C(t){return!!t&&t.constructor===Object}function B(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(!E(t))throw new Error("bbox must only contain numbers")}))}function S(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")}Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.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/e.earthRadius,yards:1.0936133},e.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},e.feature=n,e.geometry=i,e.point=r,e.points=o,e.polygon=s,e.polygons=a,e.lineString=l,e.lineStrings=c,e.featureCollection=u,e.multiLineString=h,e.multiPoint=d,e.multiPolygon=A,e.geometryCollection=p,e.round=f,e.radiansToLength=g,e.lengthToRadians=m,e.lengthToDegrees=_,e.bearingToAzimuth=y,e.radiansToDegrees=v,e.degreesToRadians=x,e.convertLength=b,e.convertArea=w,e.isNumber=E,e.isObject=C,e.validateBBox=B,e.validateId=S},7482:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1746);function r(t,e,n){if(null!==t)for(var i,o,s,a,l,c,u,h,d=0,A=0,p=t.type,f="FeatureCollection"===p,g="Feature"===p,m=f?t.features.length:1,_=0;_<m;_++){u=f?t.features[_].geometry:g?t.geometry:t,h=!!u&&"GeometryCollection"===u.type,l=h?u.geometries.length:1;for(var y=0;y<l;y++){var v=0,x=0;if(a=h?u.geometries[y]:u,null!==a){c=a.coordinates;var b=a.type;switch(d=!n||"Polygon"!==b&&"MultiPolygon"!==b?0:1,b){case null:break;case"Point":if(!1===e(c,A,_,v,x))return!1;A++,v++;break;case"LineString":case"MultiPoint":for(i=0;i<c.length;i++){if(!1===e(c[i],A,_,v,x))return!1;A++,"MultiPoint"===b&&v++}"LineString"===b&&v++;break;case"Polygon":case"MultiLineString":for(i=0;i<c.length;i++){for(o=0;o<c[i].length-d;o++){if(!1===e(c[i][o],A,_,v,x))return!1;A++}"MultiLineString"===b&&v++,"Polygon"===b&&x++}"Polygon"===b&&v++;break;case"MultiPolygon":for(i=0;i<c.length;i++){for(x=0,o=0;o<c[i].length;o++){for(s=0;s<c[i][o].length-d;s++){if(!1===e(c[i][o][s],A,_,v,x))return!1;A++}x++}v++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(!1===r(a.geometries[i],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(t,e,n,i){var o=n;return r(t,(function(t,i,r,s,a){o=0===i&&void 0===n?t:e(o,t,i,r,s,a)}),i),o}function s(t,e){var n;switch(t.type){case"FeatureCollection":for(n=0;n<t.features.length;n++)if(!1===e(t.features[n].properties,n))break;break;case"Feature":e(t.properties,0);break}}function a(t,e,n){var i=n;return s(t,(function(t,r){i=0===r&&void 0===n?t:e(i,t,r)})),i}function l(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length;n++)if(!1===e(t.features[n],n))break}function c(t,e,n){var i=n;return l(t,(function(t,r){i=0===r&&void 0===n?t:e(i,t,r)})),i}function u(t){var e=[];return r(t,(function(t){e.push(t)})),e}function h(t,e){var n,i,r,o,s,a,l,c,u,h,d=0,A="FeatureCollection"===t.type,p="Feature"===t.type,f=A?t.features.length:1;for(n=0;n<f;n++){for(a=A?t.features[n].geometry:p?t.geometry:t,c=A?t.features[n].properties:p?t.properties:{},u=A?t.features[n].bbox:p?t.bbox:void 0,h=A?t.features[n].id:p?t.id:void 0,l=!!a&&"GeometryCollection"===a.type,s=l?a.geometries.length:1,r=0;r<s;r++)if(o=l?a.geometries[r]:a,null!==o)switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,d,c,u,h))return!1;break;case"GeometryCollection":for(i=0;i<o.geometries.length;i++)if(!1===e(o.geometries[i],d,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,d,c,u,h))return!1;d++}}function d(t,e,n){var i=n;return h(t,(function(t,r,o,s,a){i=0===r&&void 0===n?t:e(i,t,r,o,s,a)})),i}function A(t,e){h(t,(function(t,n,r,o,s){var a,l=null===t?null:t.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==e(i.feature(t,r,{bbox:o,id:s}),n,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon";break}for(var c=0;c<t.coordinates.length;c++){var u=t.coordinates[c],h={type:a,coordinates:u};if(!1===e(i.feature(h,r),n,c))return!1}}))}function p(t,e,n){var i=n;return A(t,(function(t,r,o){i=0===r&&0===o&&void 0===n?t:e(i,t,r,o)})),i}function f(t,e){A(t,(function(t,n,o){var s=0;if(t.geometry){var a=t.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var l,c=0,u=0,h=0;return!1!==r(t,(function(r,a,d,A,p){if(void 0===l||n>c||A>u||p>h)return l=r,c=n,u=A,h=p,void(s=0);var f=i.lineString([l,r],t.properties);if(!1===e(f,n,o,p,s))return!1;s++,l=r}))&&void 0}}}))}function g(t,e,n){var i=n,r=!1;return f(t,(function(t,o,s,a,l){i=!1===r&&void 0===n?t:e(i,t,o,s,a,l),r=!0})),i}function m(t,e){if(!t)throw new Error("geojson is required");A(t,(function(t,n,r){if(null!==t.geometry){var o=t.geometry.type,s=t.geometry.coordinates;switch(o){case"LineString":if(!1===e(t,n,r,0,0))return!1;break;case"Polygon":for(var a=0;a<s.length;a++)if(!1===e(i.lineString(s[a],t.properties),n,r,a))return!1;break}}}))}function _(t,e,n){var i=n;return m(t,(function(t,r,o,s){i=0===r&&void 0===n?t:e(i,t,r,o,s)})),i}function y(t,e){if(e=e||{},!i.isObject(e))throw new Error("options is invalid");var n,r=e.featureIndex||0,o=e.multiFeatureIndex||0,s=e.geometryIndex||0,a=e.segmentIndex||0,l=e.properties;switch(t.type){case"FeatureCollection":r<0&&(r=t.features.length+r),l=l||t.features[r].properties,n=t.features[r].geometry;break;case"Feature":l=l||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 c=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=c.length+a-1),i.lineString([c[a],c[a+1]],l,e);case"Polygon":return s<0&&(s=c.length+s),a<0&&(a=c[s].length+a-1),i.lineString([c[s][a],c[s][a+1]],l,e);case"MultiLineString":return o<0&&(o=c.length+o),a<0&&(a=c[o].length+a-1),i.lineString([c[o][a],c[o][a+1]],l,e);case"MultiPolygon":return o<0&&(o=c.length+o),s<0&&(s=c[o].length+s),a<0&&(a=c[o][s].length-a-1),i.lineString([c[o][s][a],c[o][s][a+1]],l,e)}throw new Error("geojson is invalid")}function v(t,e){if(e=e||{},!i.isObject(e))throw new Error("options is invalid");var n,r=e.featureIndex||0,o=e.multiFeatureIndex||0,s=e.geometryIndex||0,a=e.coordIndex||0,l=e.properties;switch(t.type){case"FeatureCollection":r<0&&(r=t.features.length+r),l=l||t.features[r].properties,n=t.features[r].geometry;break;case"Feature":l=l||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 c=n.coordinates;switch(n.type){case"Point":return i.point(c,l,e);case"MultiPoint":return o<0&&(o=c.length+o),i.point(c[o],l,e);case"LineString":return a<0&&(a=c.length+a),i.point(c[a],l,e);case"Polygon":return s<0&&(s=c.length+s),a<0&&(a=c[s].length+a),i.point(c[s][a],l,e);case"MultiLineString":return o<0&&(o=c.length+o),a<0&&(a=c[o].length+a),i.point(c[o][a],l,e);case"MultiPolygon":return o<0&&(o=c.length+o),s<0&&(s=c[o].length+s),a<0&&(a=c[o][s].length-a),i.point(c[o][s][a],l,e)}throw new Error("geojson is invalid")}e.coordAll=u,e.coordEach=r,e.coordReduce=o,e.featureEach=l,e.featureReduce=c,e.findPoint=v,e.findSegment=y,e.flattenEach=A,e.flattenReduce=p,e.geomEach=h,e.geomReduce=d,e.lineEach=m,e.lineReduce=_,e.propEach=s,e.propReduce=a,e.segmentEach=f,e.segmentReduce=g},8:function(t,e,n){"use strict";var i=n(434),r=n(1781),o=n(2108),s=n(8817);t.exports=s||i.call(o,r)},4971:function(t,e,n){"use strict";var i=n(434),r=n(1781),o=n(8);t.exports=function(){return o(i,r,arguments)}},1781:function(t){"use strict";t.exports=Function.prototype.apply},2108:function(t){"use strict";t.exports=Function.prototype.call},2426:function(t,e,n){"use strict";var i=n(434),r=n(4658),o=n(2108),s=n(8);t.exports=function(t){if(t.length<1||"function"!==typeof t[0])throw new r("a function is required");return s(i,o,t)}},8817:function(t){"use strict";t.exports="undefined"!==typeof Reflect&&Reflect&&Reflect.apply},2880:function(t,e,n){"use strict";var i=n(9643),r=n(8481),o=r(i("String.prototype.indexOf"));t.exports=function(t,e){var n=i(t,!!e);return"function"===typeof n&&o(t,".prototype.")>-1?r(n):n}},8481:function(t,e,n){"use strict";var i=n(3402),r=n(9265),o=n(2426),s=n(4971);t.exports=function(t){var e=o(arguments),n=t.length-(arguments.length-1);return i(e,1+(n>0?n:0),!0)},r?r(t.exports,"apply",{value:s}):t.exports.apply=s},3190:function(t,e,n){"use strict";var i=n(9643),r=n(2426),o=r([i("%String.prototype.indexOf%")]);t.exports=function(t,e){var n=i(t,!!e);return"function"===typeof n&&o(t,".prototype.")>-1?r([n]):n}},9440:function(t,e,n){"use strict";var i=n(5040),r=n(7053),o=n(8878),s=n(5164).orient2d;function a(t,e,n){e=Math.max(0,void 0===e?2:e),n=n||0;var r=g(t),o=new i(16);o.toBBox=function(t){return{minX:t[0],minY:t[1],maxX:t[0],maxY:t[1]}},o.compareMinX=function(t,e){return t[0]-e[0]},o.compareMinY=function(t,e){return t[1]-e[1]},o.load(t);for(var s,a=[],c=0;c<r.length;c++){var u=r[c];o.remove(u),s=m(u,s),a.push(s)}var h=new i(16);for(c=0;c<a.length;c++)h.insert(f(a[c]));var d=e*e,A=n*n;while(a.length){var p=a.shift(),y=p.p,v=p.next.p,x=_(y,v);if(!(x<A)){var b=x/d;u=l(o,p.prev.p,y,v,p.next.next.p,b,h),u&&Math.min(_(u,y),_(u,v))<=b&&(a.push(p),a.push(m(u,p)),o.remove(u),h.remove(p),h.insert(f(p)),h.insert(f(p.next)))}}p=s;var w=[];do{w.push(p.p),p=p.next}while(p!==s);return w.push(p.p),w}function l(t,e,n,i,o,s,a){var l=new r([],c),h=t.data;while(h){for(var A=0;A<h.children.length;A++){var p=h.children[A],f=h.leaf?y(p,n,i):u(n,i,p);f>s||l.push({node:p,dist:f})}while(l.length&&!l.peek().node.children){var g=l.pop(),m=g.node,_=y(m,e,n),v=y(m,i,o);if(g.dist<_&&g.dist<v&&d(n,m,a)&&d(i,m,a))return m}h=l.pop(),h&&(h=h.node)}return null}function c(t,e){return t.dist-e.dist}function u(t,e,n){if(h(t,n)||h(e,n))return 0;var i=v(t[0],t[1],e[0],e[1],n.minX,n.minY,n.maxX,n.minY);if(0===i)return 0;var r=v(t[0],t[1],e[0],e[1],n.minX,n.minY,n.minX,n.maxY);if(0===r)return 0;var o=v(t[0],t[1],e[0],e[1],n.maxX,n.minY,n.maxX,n.maxY);if(0===o)return 0;var s=v(t[0],t[1],e[0],e[1],n.minX,n.maxY,n.maxX,n.maxY);return 0===s?0:Math.min(i,r,o,s)}function h(t,e){return t[0]>=e.minX&&t[0]<=e.maxX&&t[1]>=e.minY&&t[1]<=e.maxY}function d(t,e,n){for(var i=Math.min(t[0],e[0]),r=Math.min(t[1],e[1]),o=Math.max(t[0],e[0]),s=Math.max(t[1],e[1]),a=n.search({minX:i,minY:r,maxX:o,maxY:s}),l=0;l<a.length;l++)if(p(a[l].p,a[l].next.p,t,e))return!1;return!0}function A(t,e,n){return s(t[0],t[1],e[0],e[1],n[0],n[1])}function p(t,e,n,i){return t!==i&&e!==n&&A(t,e,n)>0!==A(t,e,i)>0&&A(n,i,t)>0!==A(n,i,e)>0}function f(t){var e=t.p,n=t.next.p;return t.minX=Math.min(e[0],n[0]),t.minY=Math.min(e[1],n[1]),t.maxX=Math.max(e[0],n[0]),t.maxY=Math.max(e[1],n[1]),t}function g(t){for(var e=t[0],n=t[0],i=t[0],r=t[0],s=0;s<t.length;s++){var a=t[s];a[0]<e[0]&&(e=a),a[0]>i[0]&&(i=a),a[1]<n[1]&&(n=a),a[1]>r[1]&&(r=a)}var l=[e,n,i,r],c=l.slice();for(s=0;s<t.length;s++)o(t[s],l)||c.push(t[s]);return b(c)}function m(t,e){var n={p:t,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return e?(n.next=e.next,n.prev=e,e.next.prev=n,e.next=n):(n.prev=n,n.next=n),n}function _(t,e){var n=t[0]-e[0],i=t[1]-e[1];return n*n+i*i}function y(t,e,n){var i=e[0],r=e[1],o=n[0]-i,s=n[1]-r;if(0!==o||0!==s){var a=((t[0]-i)*o+(t[1]-r)*s)/(o*o+s*s);a>1?(i=n[0],r=n[1]):a>0&&(i+=o*a,r+=s*a)}return o=t[0]-i,s=t[1]-r,o*o+s*s}function v(t,e,n,i,r,o,s,a){var l,c,u,h,d=n-t,A=i-e,p=s-r,f=a-o,g=t-r,m=e-o,_=d*d+A*A,y=d*p+A*f,v=p*p+f*f,x=d*g+A*m,b=p*g+f*m,w=_*v-y*y,E=w,C=w;0===w?(c=0,E=1,h=b,C=v):(c=y*b-v*x,h=_*b-y*x,c<0?(c=0,h=b,C=v):c>E&&(c=E,h=b+y,C=v)),h<0?(h=0,-x<0?c=0:-x>_?c=E:(c=-x,E=_)):h>C&&(h=C,-x+y<0?c=0:-x+y>_?c=E:(c=-x+y,E=_)),l=0===c?0:c/E,u=0===h?0:h/C;var B=(1-l)*t+l*n,S=(1-l)*e+l*i,M=(1-u)*r+u*s,T=(1-u)*o+u*a,I=M-B,L=T-S;return I*I+L*L}function x(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}function b(t){t.sort(x);for(var e=[],n=0;n<t.length;n++){while(e.length>=2&&A(e[e.length-2],e[e.length-1],t[n])<=0)e.pop();e.push(t[n])}for(var i=[],r=t.length-1;r>=0;r--){while(i.length>=2&&A(i[i.length-2],i[i.length-1],t[r])<=0)i.pop();i.push(t[r])}return i.pop(),e.pop(),e.concat(i)}r.default&&(r=r.default),t.exports=a,t.exports["default"]=a},5040:function(t){!function(e,n){t.exports=n()}(0,(function(){"use strict";function t(t,i,r,o,s){!function t(n,i,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,l=i-r+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1),d=Math.max(r,Math.floor(i-l*u/a+h)),A=Math.min(o,Math.floor(i+(a-l)*u/a+h));t(n,i,d,A,s)}var p=n[i],f=r,g=o;for(e(n,r,i),s(n[o],p)>0&&e(n,r,o);f<g;){for(e(n,f,g),f++,g--;s(n[f],p)<0;)f++;for(;s(n[g],p)>0;)g--}0===s(n[r],p)?e(n,r,g):e(n,++g,o),g<=i&&(r=g+1),i<=g&&(o=g-1)}}(t,i,r||0,o||t.length-1,s||n)}function e(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function n(t,e){return t<e?-1:t>e?1:0}var i=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 r(t,e,n){if(!n)return e.indexOf(t);for(var i=0;i<e.length;i++)if(n(t,e[i]))return i;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,i,r){r||(r=p(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o=e;o<n;o++){var s=t.children[o];a(r,t.leaf?i(s):s)}return r}function a(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 l(t,e){return t.minX-e.minX}function c(t,e){return t.minY-e.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function A(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f(e,n,i,r,o){for(var s=[n,i];s.length;)if(!((i=s.pop())-(n=s.pop())<=r)){var a=n+Math.ceil((i-n)/r/2)*r;t(e,a,n,i,o),s.push(n,a,a,i)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var e=this.data,n=[];if(!A(t,e))return n;for(var i=this.toBBox,r=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?i(s):s;A(t,a)&&(e.leaf?n.push(s):d(t,a)?this._all(s,n):r.push(s))}e=r.pop()}return n},i.prototype.collides=function(t){var e=this.data;if(!A(t,e))return!1;for(var n=[];e;){for(var i=0;i<e.children.length;i++){var r=e.children[i],o=e.leaf?this.toBBox(r):r;if(A(t,o)){if(e.leaf||d(t,o))return!0;n.push(r)}}e=n.pop()}return!1},i.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 n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var i=this.data;this.data=n,n=i}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},i.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},i.prototype.clear=function(){return this.data=p([]),this},i.prototype.remove=function(t,e){if(!t)return this;for(var n,i,o,s=this.data,a=this.toBBox(t),l=[],c=[];s||l.length;){if(s||(s=l.pop(),i=l[l.length-1],n=c.pop(),o=!0),s.leaf){var u=r(t,s.children,e);if(-1!==u)return s.children.splice(u,1),l.push(s),this._condense(l),this}o||s.leaf||!d(s,a)?i?(n++,s=i.children[n],o=!1):s=null:(l.push(s),c.push(n),n=0,i=s,s=s.children[0])}return this},i.prototype.toBBox=function(t){return t},i.prototype.compareMinX=function(t,e){return t.minX-e.minX},i.prototype.compareMinY=function(t,e){return t.minY-e.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(t){return this.data=t,this},i.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},i.prototype._build=function(t,e,n,i){var r,s=n-e+1,a=this._maxEntries;if(s<=a)return o(r=p(t.slice(e,n+1)),this.toBBox),r;i||(i=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,i-1))),(r=p([])).leaf=!1,r.height=i;var l=Math.ceil(s/a),c=l*Math.ceil(Math.sqrt(a));f(t,e,n,c,this.compareMinX);for(var u=e;u<=n;u+=c){var h=Math.min(u+c-1,n);f(t,u,h,l,this.compareMinY);for(var d=u;d<=h;d+=l){var A=Math.min(d+l-1,h);r.children.push(this._build(t,d,A,i-1))}}return o(r,this.toBBox),r},i.prototype._chooseSubtree=function(t,e,n,i){for(;i.push(e),!e.leaf&&i.length-1!==n;){for(var r=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],c=u(l),h=(d=t,A=l,(Math.max(A.maxX,d.maxX)-Math.min(A.minX,d.minX))*(Math.max(A.maxY,d.maxY)-Math.min(A.minY,d.minY))-c);h<o?(o=h,r=c<r?c:r,s=l):h===o&&c<r&&(r=c,s=l)}e=s||e.children[0]}var d,A;return e},i.prototype._insert=function(t,e,n){var i=n?t:this.toBBox(t),r=[],o=this._chooseSubtree(i,this.data,e,r);for(o.children.push(t),a(o,i);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(i,r,e)},i.prototype._split=function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var s=this._chooseSplitIndex(n,r,i),a=p(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},i.prototype._splitRoot=function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,e,n){for(var i,r,o,a,l,c,h,d=1/0,A=1/0,p=e;p<=n-e;p++){var f=s(t,0,p,this.toBBox),g=s(t,p,n,this.toBBox),m=(r=f,o=g,a=void 0,l=void 0,c=void 0,h=void 0,a=Math.max(r.minX,o.minX),l=Math.max(r.minY,o.minY),c=Math.min(r.maxX,o.maxX),h=Math.min(r.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,h-l)),_=u(f)+u(g);m<d?(d=m,i=p,A=_<A?_:A):m===d&&_<A&&(A=_,i=p)}return i||n-e},i.prototype._chooseSplitAxis=function(t,e,n){var i=t.leaf?this.compareMinX:l,r=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,r)&&t.children.sort(i)},i.prototype._allDistMargin=function(t,e,n,i){t.children.sort(i);for(var r=this.toBBox,o=s(t,0,e,r),l=s(t,n-e,n,r),c=h(o)+h(l),u=e;u<n-e;u++){var d=t.children[u];a(o,t.leaf?r(d):d),c+=h(o)}for(var A=n-e-1;A>=e;A--){var p=t.children[A];a(l,t.leaf?r(p):p),c+=h(l)}return c},i.prototype._adjustParentBBoxes=function(t,e,n){for(var i=n;i>=0;i--)a(e[i],t)},i.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},i}))},1791:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i="undefined"!==typeof e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,r,o){"string"===typeof t&&(t=[[null,t,void 0]]);var s={};if(i)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);i&&s[u[0]]||("undefined"!==typeof o&&("undefined"===typeof u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},e}},1979:function(t){"use strict";t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},1356:function(t){"use strict";t.exports=function(t){return t[1]}},8422:function(t,e,n){var i=n(8961),r=n(4409),o=n(3039),s=n(6238),a=n(5062),l=n(408),c=Date.prototype.getTime;function u(t,e,n){var i=n||{};return!!(i.strict?o(t,e):t===e)||(!t||!e||"object"!==typeof t&&"object"!==typeof e?i.strict?o(t,e):t==e:A(t,e,i))}function h(t){return null===t||void 0===t}function d(t){return!(!t||"object"!==typeof t||"number"!==typeof t.length)&&("function"===typeof t.copy&&"function"===typeof t.slice&&!(t.length>0&&"number"!==typeof t[0]))}function A(t,e,n){var o,A;if(typeof t!==typeof e)return!1;if(h(t)||h(e))return!1;if(t.prototype!==e.prototype)return!1;if(r(t)!==r(e))return!1;var p=s(t),f=s(e);if(p!==f)return!1;if(p||f)return t.source===e.source&&a(t)===a(e);if(l(t)&&l(e))return c.call(t)===c.call(e);var g=d(t),m=d(e);if(g!==m)return!1;if(g||m){if(t.length!==e.length)return!1;for(o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}if(typeof t!==typeof e)return!1;try{var _=i(t),y=i(e)}catch(v){return!1}if(_.length!==y.length)return!1;for(_.sort(),y.sort(),o=_.length-1;o>=0;o--)if(_[o]!=y[o])return!1;for(o=_.length-1;o>=0;o--)if(A=_[o],!u(t[A],e[A],n))return!1;return!0}t.exports=u},9149:function(t,e,n){"use strict";var i=n(9265),r=n(5606),o=n(4658),s=n(233);t.exports=function(t,e,n){if(!t||"object"!==typeof t&&"function"!==typeof t)throw new o("`obj` must be an object or a function`");if("string"!==typeof e&&"symbol"!==typeof e)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],h=!!s&&s(t,e);if(i)i(t,e,{configurable:null===c&&h?h.configurable:!c,enumerable:null===a&&h?h.enumerable:!a,value:n,writable:null===l&&h?h.writable:!l});else{if(!u&&(a||l||c))throw new r("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=n}}},9477:function(t,e,n){"use strict";var i=n(8961),r="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=n(9149),l=function(t){return"function"===typeof t&&"[object Function]"===o.call(t)},c=n(5558)(),u=function(t,e,n,i){if(e in t)if(!0===i){if(t[e]===n)return}else if(!l(i)||!i())return;c?a(t,e,n,!0):a(t,e,n)},h=function(t,e){var n=arguments.length>2?arguments[2]:{},o=i(e);r&&(o=s.call(o,Object.getOwnPropertySymbols(e)));for(var a=0;a<o.length;a+=1)u(t,o[a],e[o[a]],n[o[a]])};h.supportsDescriptors=!!c,t.exports=h},6845:function(t){function e(t,e,n,i){this.dataset=[],this.epsilon=1,this.minPts=2,this.distance=this._euclideanDistance,this.clusters=[],this.noise=[],this._visited=[],this._assigned=[],this._datasetLength=0,this._init(t,e,n,i)}e.prototype.run=function(t,e,n,i){this._init(t,e,n,i);for(var r=0;r<this._datasetLength;r++)if(1!==this._visited[r]){this._visited[r]=1;var o=this._regionQuery(r);if(o.length<this.minPts)this.noise.push(r);else{var s=this.clusters.length;this.clusters.push([]),this._addToCluster(r,s),this._expandCluster(s,o)}}return this.clusters},e.prototype._init=function(t,e,n,i){if(t){if(!(t instanceof Array))throw Error("Dataset must be of type array, "+typeof t+" given");this.dataset=t,this.clusters=[],this.noise=[],this._datasetLength=t.length,this._visited=new Array(this._datasetLength),this._assigned=new Array(this._datasetLength)}e&&(this.epsilon=e),n&&(this.minPts=n),i&&(this.distance=i)},e.prototype._expandCluster=function(t,e){for(var n=0;n<e.length;n++){var i=e[n];if(1!==this._visited[i]){this._visited[i]=1;var r=this._regionQuery(i);r.length>=this.minPts&&(e=this._mergeArrays(e,r))}1!==this._assigned[i]&&this._addToCluster(i,t)}},e.prototype._addToCluster=function(t,e){this.clusters[e].push(t),this._assigned[t]=1},e.prototype._regionQuery=function(t){for(var e=[],n=0;n<this._datasetLength;n++){var i=this.distance(this.dataset[t],this.dataset[n]);i<this.epsilon&&e.push(n)}return e},e.prototype._mergeArrays=function(t,e){for(var n=e.length,i=0;i<n;i++){var r=e[i];t.indexOf(r)<0&&t.push(r)}return t},e.prototype._euclideanDistance=function(t,e){var n=0,i=Math.min(t.length,e.length);while(i--)n+=(t[i]-e[i])*(t[i]-e[i]);return Math.sqrt(n)},t.exports&&(t.exports=e)},5459:function(t){function e(t,e,n){this.k=3,this.dataset=[],this.assignments=[],this.centroids=[],this.init(t,e,n)}e.prototype.init=function(t,e,n){this.assignments=[],this.centroids=[],"undefined"!==typeof t&&(this.dataset=t),"undefined"!==typeof e&&(this.k=e),"undefined"!==typeof n&&(this.distance=n)},e.prototype.run=function(t,e){this.init(t,e);for(var n=this.dataset.length,i=0;i<this.k;i++)this.centroids[i]=this.randomCentroid();var r=!0;while(r){r=this.assign();for(var o=0;o<this.k;o++){for(var s=new Array(u),a=0,l=0;l<u;l++)s[l]=0;for(var c=0;c<n;c++){var u=this.dataset[c].length;if(o===this.assignments[c]){for(l=0;l<u;l++)s[l]+=this.dataset[c][l];a++}}if(a>0){for(l=0;l<u;l++)s[l]/=a;this.centroids[o]=s}else this.centroids[o]=this.randomCentroid(),r=!0}}return this.getClusters()},e.prototype.randomCentroid=function(){var t,e,n=this.dataset.length-1;do{e=Math.round(Math.random()*n),t=this.dataset[e]}while(this.centroids.indexOf(t)>=0);return t},e.prototype.assign=function(){for(var t,e=!1,n=this.dataset.length,i=0;i<n;i++)t=this.argmin(this.dataset[i],this.centroids,this.distance),t!=this.assignments[i]&&(this.assignments[i]=t,e=!0);return e},e.prototype.getClusters=function(){for(var t,e=new Array(this.k),n=0;n<this.assignments.length;n++)t=this.assignments[n],"undefined"===typeof e[t]&&(e[t]=[]),e[t].push(n);return e},e.prototype.argmin=function(t,e,n){for(var i,r=Number.MAX_VALUE,o=0,s=e.length,a=0;a<s;a++)i=n(t,e[a]),i<r&&(r=i,o=a);return o},e.prototype.distance=function(t,e){var n=0,i=Math.min(t.length,e.length);while(i--){var r=t[i]-e[i];n+=r*r}return Math.sqrt(n)},t.exports&&(t.exports=e)},2543:function(t,e,n){if(t.exports)var i=n(6401);function r(t,e,n,i){this.epsilon=1,this.minPts=1,this.distance=this._euclideanDistance,this._reachability=[],this._processed=[],this._coreDistance=0,this._orderedList=[],this._init(t,e,n,i)}r.prototype.run=function(t,e,n,r){this._init(t,e,n,r);for(var o=0,s=this.dataset.length;o<s;o++)if(1!==this._processed[o]){this._processed[o]=1,this.clusters.push([o]);var a=this.clusters.length-1;this._orderedList.push(o);var l=new i(null,null,"asc"),c=this._regionQuery(o);void 0!==this._distanceToCore(o)&&(this._updateQueue(o,c,l),this._expandCluster(a,l))}return this.clusters},r.prototype.getReachabilityPlot=function(){for(var t=[],e=0,n=this._orderedList.length;e<n;e++){var i=this._orderedList[e],r=this._reachability[i];t.push([i,r])}return t},r.prototype._init=function(t,e,n,i){if(t){if(!(t instanceof Array))throw Error("Dataset must be of type array, "+typeof t+" given");this.dataset=t,this.clusters=[],this._reachability=new Array(this.dataset.length),this._processed=new Array(this.dataset.length),this._coreDistance=0,this._orderedList=[]}e&&(this.epsilon=e),n&&(this.minPts=n),i&&(this.distance=i)},r.prototype._updateQueue=function(t,e,n){var i=this;this._coreDistance=this._distanceToCore(t),e.forEach((function(e){if(void 0===i._processed[e]){var r=i.distance(i.dataset[t],i.dataset[e]),o=Math.max(i._coreDistance,r);void 0===i._reachability[e]?(i._reachability[e]=o,n.insert(e,o)):o<i._reachability[e]&&(i._reachability[e]=o,n.remove(e),n.insert(e,o))}}))},r.prototype._expandCluster=function(t,e){for(var n=e.getElements(),i=0,r=n.length;i<r;i++){var o=n[i];if(void 0===this._processed[o]){var s=this._regionQuery(o);this._processed[o]=1,this.clusters[t].push(o),this._orderedList.push(o),void 0!==this._distanceToCore(o)&&(this._updateQueue(o,s,e),this._expandCluster(t,e))}}},r.prototype._distanceToCore=function(t){for(var e=this.epsilon,n=0;n<e;n++){var i=this._regionQuery(t,n);if(i.length>=this.minPts)return n}},r.prototype._regionQuery=function(t,e){e=e||this.epsilon;for(var n=[],i=0,r=this.dataset.length;i<r;i++)this.distance(this.dataset[t],this.dataset[i])<e&&n.push(i);return n},r.prototype._euclideanDistance=function(t,e){var n=0,i=Math.min(t.length,e.length);while(i--)n+=(t[i]-e[i])*(t[i]-e[i]);return Math.sqrt(n)},t.exports&&(t.exports=r)},6401:function(t){function e(t,e,n){this._queue=[],this._priorities=[],this._sorting="desc",this._init(t,e,n)}e.prototype.insert=function(t,e){var n=this._queue.length,i=n;while(i--){var r=this._priorities[i];"desc"===this._sorting?e>r&&(n=i):e<r&&(n=i)}this._insertAt(t,e,n)},e.prototype.remove=function(t){var e=this._queue.length;while(e--){var n=this._queue[e];if(t===n){this._queue.splice(e,1),this._priorities.splice(e,1);break}}},e.prototype.forEach=function(t){this._queue.forEach(t)},e.prototype.getElements=function(){return this._queue},e.prototype.getElementPriority=function(t){return this._priorities[t]},e.prototype.getPriorities=function(){return this._priorities},e.prototype.getElementsWithPriorities=function(){for(var t=[],e=0,n=this._queue.length;e<n;e++)t.push([this._queue[e],this._priorities[e]]);return t},e.prototype._init=function(t,e,n){if(t&&e){if(this._queue=[],this._priorities=[],t.length!==e.length)throw new Error("Arrays must have the same length");for(var i=0;i<t.length;i++)this.insert(t[i],e[i])}n&&(this._sorting=n)},e.prototype._insertAt=function(t,e,n){this._queue.length===n?(this._queue.push(t),this._priorities.push(e)):(this._queue.splice(n,0,t),this._priorities.splice(n,0,e))},t.exports&&(t.exports=e)},3700:function(t,e,n){t.exports&&(t.exports={DBSCAN:n(6845),KMEANS:n(5459),OPTICS:n(2543),PriorityQueue:n(6401)})},4621:function(t,e,n){"use strict";var i,r=n(2426),o=n(233);try{i=[].__proto__===Array.prototype}catch(c){if(!c||"object"!==typeof c||!("code"in c)||"ERR_PROTO_ACCESS"!==c.code)throw c}var s=!!i&&o&&o(Object.prototype,"__proto__"),a=Object,l=a.getPrototypeOf;t.exports=s&&"function"===typeof s.get?r([s.get]):"function"===typeof l&&function(t){return l(null==t?t:a(t))}},6120:function(t){"use strict";function e(t,e,i){i=i||2;var o,s,a,l,u,h,d,A=e&&e.length,p=A?e[0]*i:t.length,f=n(t,0,p,i,!0),g=[];if(!f||f.next===f.prev)return g;if(A&&(f=c(t,e,f,i)),t.length>80*i){o=a=t[0],s=l=t[1];for(var m=i;m<p;m+=i)u=t[m],h=t[m+1],u<o&&(o=u),h<s&&(s=h),u>a&&(a=u),h>l&&(l=h);d=Math.max(a-o,l-s),d=0!==d?32767/d:0}return r(f,g,i,o,s,d,0),g}function n(t,e,n,i,r){var o,s;if(r===P(t,e,n,i)>0)for(o=e;o<n;o+=i)s=T(o,t[o],t[o+1],s);else for(o=n-i;o>=e;o-=i)s=T(o,t[o],t[o+1],s);return s&&x(s,s.next)&&(I(s),s=s.next),s}function i(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!x(i,i.next)&&0!==v(i.prev,i,i.next))i=i.next;else{if(I(i),i=e=i.prev,i===i.next)break;n=!0}}while(n||i!==e);return e}function r(t,e,n,c,u,h,d){if(t){!d&&h&&p(t,c,u,h);var A,f,g=t;while(t.prev!==t.next)if(A=t.prev,f=t.next,h?s(t,c,u,h):o(t))e.push(A.i/n|0),e.push(t.i/n|0),e.push(f.i/n|0),I(t),t=f.next,g=f.next;else if(t=f,t===g){d?1===d?(t=a(i(t),e,n),r(t,e,n,c,u,h,2)):2===d&&l(t,e,n,c,u,h):r(i(t),e,n,c,u,h,1);break}}}function o(t){var e=t.prev,n=t,i=t.next;if(v(e,n,i)>=0)return!1;var r=e.x,o=n.x,s=i.x,a=e.y,l=n.y,c=i.y,u=r<o?r<s?r:s:o<s?o:s,h=a<l?a<c?a:c:l<c?l:c,d=r>o?r>s?r:s:o>s?o:s,A=a>l?a>c?a:c:l>c?l:c,p=i.next;while(p!==e){if(p.x>=u&&p.x<=d&&p.y>=h&&p.y<=A&&_(r,a,o,l,s,c,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function s(t,e,n,i){var r=t.prev,o=t,s=t.next;if(v(r,o,s)>=0)return!1;var a=r.x,l=o.x,c=s.x,u=r.y,h=o.y,d=s.y,A=a<l?a<c?a:c:l<c?l:c,p=u<h?u<d?u:d:h<d?h:d,f=a>l?a>c?a:c:l>c?l:c,m=u>h?u>d?u:d:h>d?h:d,y=g(A,p,e,n,i),x=g(f,m,e,n,i),b=t.prevZ,w=t.nextZ;while(b&&b.z>=y&&w&&w.z<=x){if(b.x>=A&&b.x<=f&&b.y>=p&&b.y<=m&&b!==r&&b!==s&&_(a,u,l,h,c,d,b.x,b.y)&&v(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,w.x>=A&&w.x<=f&&w.y>=p&&w.y<=m&&w!==r&&w!==s&&_(a,u,l,h,c,d,w.x,w.y)&&v(w.prev,w,w.next)>=0)return!1;w=w.nextZ}while(b&&b.z>=y){if(b.x>=A&&b.x<=f&&b.y>=p&&b.y<=m&&b!==r&&b!==s&&_(a,u,l,h,c,d,b.x,b.y)&&v(b.prev,b,b.next)>=0)return!1;b=b.prevZ}while(w&&w.z<=x){if(w.x>=A&&w.x<=f&&w.y>=p&&w.y<=m&&w!==r&&w!==s&&_(a,u,l,h,c,d,w.x,w.y)&&v(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function a(t,e,n){var r=t;do{var o=r.prev,s=r.next.next;!x(o,s)&&b(o,r,r.next,s)&&B(o,s)&&B(s,o)&&(e.push(o.i/n|0),e.push(r.i/n|0),e.push(s.i/n|0),I(r),I(r.next),r=t=s),r=r.next}while(r!==t);return i(r)}function l(t,e,n,o,s,a){var l=t;do{var c=l.next.next;while(c!==l.prev){if(l.i!==c.i&&y(l,c)){var u=M(l,c);return l=i(l,l.next),u=i(u,u.next),r(l,e,n,o,s,a,0),void r(u,e,n,o,s,a,0)}c=c.next}l=l.next}while(l!==t)}function c(t,e,i,r){var o,s,a,l,c,d=[];for(o=0,s=e.length;o<s;o++)a=e[o]*r,l=o<s-1?e[o+1]*r:t.length,c=n(t,a,l,r,!1),c===c.next&&(c.steiner=!0),d.push(m(c));for(d.sort(u),o=0;o<d.length;o++)i=h(d[o],i);return i}function u(t,e){return t.x-e.x}function h(t,e){var n=d(t,e);if(!n)return e;var r=M(n,t);return i(r,r.next),i(n,n.next)}function d(t,e){var n,i=e,r=t.x,o=t.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=r&&a>s&&(s=a,n=i.x<i.next.x?i:i.next,a===r))return n}i=i.next}while(i!==e);if(!n)return null;var l,c=n,u=n.x,h=n.y,d=1/0;i=n;do{r>=i.x&&i.x>=u&&r!==i.x&&_(o<h?r:s,o,u,h,o<h?s:r,o,i.x,i.y)&&(l=Math.abs(o-i.y)/(r-i.x),B(i,t)&&(l<d||l===d&&(i.x>n.x||i.x===n.x&&A(n,i)))&&(n=i,d=l)),i=i.next}while(i!==c);return n}function A(t,e){return v(t.prev,t,e.prev)<0&&v(e.next,t,t.next)<0}function p(t,e,n,i){var r=t;do{0===r.z&&(r.z=g(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,f(r)}function f(t){var e,n,i,r,o,s,a,l,c=1;do{n=t,t=null,o=null,s=0;while(n){for(s++,i=n,a=0,e=0;e<c;e++)if(a++,i=i.nextZ,!i)break;l=c;while(a>0||l>0&&i)0!==a&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,a--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,c*=2}while(s>1);return t}function g(t,e,n,i,r){return t=(t-n)*r|0,e=(e-i)*r|0,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function m(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function _(t,e,n,i,r,o,s,a){return(r-s)*(e-a)>=(t-s)*(o-a)&&(t-s)*(i-a)>=(n-s)*(e-a)&&(n-s)*(o-a)>=(r-s)*(i-a)}function y(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!C(t,e)&&(B(t,e)&&B(e,t)&&S(t,e)&&(v(t.prev,t,e.prev)||v(t,e.prev,e))||x(t,e)&&v(t.prev,t,t.next)>0&&v(e.prev,e,e.next)>0)}function v(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,n,i){var r=E(v(t,e,n)),o=E(v(t,e,i)),s=E(v(n,i,t)),a=E(v(n,i,e));return r!==o&&s!==a||(!(0!==r||!w(t,n,e))||(!(0!==o||!w(t,i,e))||(!(0!==s||!w(n,t,i))||!(0!==a||!w(n,e,i)))))}function w(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function E(t){return t>0?1:t<0?-1:0}function C(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&b(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function B(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function S(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!==n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}function M(t,e){var n=new L(t.i,t.x,t.y),i=new L(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function T(t,e,n,i){var r=new L(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function I(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function L(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function P(t,e,n,i){for(var r=0,o=e,s=n-i;o<n;o+=i)r+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return r}t.exports=e,t.exports["default"]=e,e.deviation=function(t,e,n,i){var r=e&&e.length,o=r?e[0]*n:t.length,s=Math.abs(P(t,0,o,n));if(r)for(var a=0,l=e.length;a<l;a++){var c=e[a]*n,u=a<l-1?e[a+1]*n:t.length;s-=Math.abs(P(t,c,u,n))}var h=0;for(a=0;a<i.length;a+=3){var d=i[a]*n,A=i[a+1]*n,p=i[a+2]*n;h+=Math.abs((t[d]-t[p])*(t[A+1]-t[d+1])-(t[d]-t[A])*(t[p+1]-t[d+1]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},e.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},i=0,r=0;r<t.length;r++){for(var o=0;o<t[r].length;o++)for(var s=0;s<e;s++)n.vertices.push(t[r][o][s]);r>0&&(i+=t[r-1].length,n.holes.push(i))}return n}},9265:function(t){"use strict";var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(n){e=!1}t.exports=e},83:function(t){"use strict";t.exports=EvalError},3387:function(t){"use strict";t.exports=Error},7429:function(t){"use strict";t.exports=RangeError},2916:function(t){"use strict";t.exports=ReferenceError},5606:function(t){"use strict";t.exports=SyntaxError},4658:function(t){"use strict";t.exports=TypeError},1760:function(t){"use strict";t.exports=URIError},9248:function(t){"use strict";t.exports=Object},6959:function(t){t.exports="object"==typeof self?self.FormData:window.FormData},337:function(t){"use strict";var e="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,i=Math.max,r="[object Function]",o=function(t,e){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var r=0;r<e.length;r+=1)n[r+t.length]=e[r];return n},s=function(t,e){for(var n=[],i=e||0,r=0;i<t.length;i+=1,r+=1)n[r]=t[i];return n},a=function(t,e){for(var n="",i=0;i<t.length;i+=1)n+=t[i],i+1<t.length&&(n+=e);return n};t.exports=function(t){var l=this;if("function"!==typeof l||n.apply(l)!==r)throw new TypeError(e+l);for(var c,u=s(arguments,1),h=function(){if(this instanceof c){var e=l.apply(this,o(u,arguments));return Object(e)===e?e:this}return l.apply(t,o(u,arguments))},d=i(0,l.length-u.length),A=[],p=0;p<d;p++)A[p]="$"+p;if(c=Function("binder","return function ("+a(A,",")+"){ return binder.apply(this,arguments); }")(h),l.prototype){var f=function(){};f.prototype=l.prototype,c.prototype=new f,f.prototype=null}return c}},434:function(t,e,n){"use strict";var i=n(337);t.exports=Function.prototype.bind||i},7998:function(t){"use strict";var e=function(){return"string"===typeof function(){}.name},n=Object.getOwnPropertyDescriptor;if(n)try{n([],"length")}catch(r){n=null}e.functionsHaveConfigurableNames=function(){if(!e()||!n)return!1;var t=n((function(){}),"name");return!!t&&!!t.configurable};var i=Function.prototype.bind;e.boundFunctionsHaveNames=function(){return e()&&"function"===typeof i&&""!==function(){}.bind().name},t.exports=e},343:function(t,e,n){var i=n(8422),r=function(t){this.precision=t&&t.precision?t.precision:17,this.direction=!(!t||!t.direction)&&t.direction,this.pseudoNode=!(!t||!t.pseudoNode)&&t.pseudoNode,this.objectComparator=t&&t.objectComparator?t.objectComparator:a};function o(t){return t.coordinates.map((function(e){return{type:t.type.replace("Multi",""),coordinates:e}}))}function s(t,e){return t.hasOwnProperty("coordinates")?t.coordinates.length===e.coordinates.length:t.length===e.length}function a(t,e){return i(t,e,{strict:!0})}r.prototype.compare=function(t,e){if(t.type!==e.type||!s(t,e))return!1;switch(t.type){case"Point":return this.compareCoord(t.coordinates,e.coordinates);case"LineString":return this.compareLine(t.coordinates,e.coordinates,0,!1);case"Polygon":return this.comparePolygon(t,e);case"Feature":return this.compareFeature(t,e);default:if(0===t.type.indexOf("Multi")){var n=this,i=o(t),r=o(e);return i.every((function(t){return this.some((function(e){return n.compare(t,e)}))}),r)}}return!1},r.prototype.compareCoord=function(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n].toFixed(this.precision)!==e[n].toFixed(this.precision))return!1;return!0},r.prototype.compareLine=function(t,e,n,i){if(!s(t,e))return!1;var r=this.pseudoNode?t:this.removePseudo(t),o=this.pseudoNode?e:this.removePseudo(e);if(!i||this.compareCoord(r[0],o[0])||(o=this.fixStartIndex(o,r),o)){var a=this.compareCoord(r[n],o[n]);return this.direction||a?this.comparePath(r,o):!!this.compareCoord(r[n],o[o.length-(1+n)])&&this.comparePath(r.slice().reverse(),o)}},r.prototype.fixStartIndex=function(t,e){for(var n,i=-1,r=0;r<t.length;r++)if(this.compareCoord(t[r],e[0])){i=r;break}return i>=0&&(n=[].concat(t.slice(i,t.length),t.slice(1,i+1))),n},r.prototype.comparePath=function(t,e){var n=this;return t.every((function(t,e){return n.compareCoord(t,this[e])}),e)},r.prototype.comparePolygon=function(t,e){if(this.compareLine(t.coordinates[0],e.coordinates[0],1,!0)){var n=t.coordinates.slice(1,t.coordinates.length),i=e.coordinates.slice(1,e.coordinates.length),r=this;return n.every((function(t){return this.some((function(e){return r.compareLine(t,e,1,!0)}))}),i)}return!1},r.prototype.compareFeature=function(t,e){return!(t.id!==e.id||!this.objectComparator(t.properties,e.properties)||!this.compareBBox(t,e))&&this.compare(t.geometry,e.geometry)},r.prototype.compareBBox=function(t,e){return!!(!t.bbox&&!e.bbox||t.bbox&&e.bbox&&this.compareCoord(t.bbox,e.bbox))},r.prototype.removePseudo=function(t){return t},t.exports=r},1494:function(t,e,n){var i=n(8866),r=n(1746),o=n(7482),s=n(7971).Z,a=o.featureEach,l=(o.coordEach,r.polygon,r.featureCollection);function c(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:s(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:s(t),e.push(t)})):a(t,(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:s(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:s(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 l(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 l(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=s(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=s(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}t.exports=c,t.exports["default"]=c},8866:function(t){!function(e,n){t.exports=n()}(0,(function(){"use strict";function t(t,i,r,o,s){!function t(n,i,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,l=i-r+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1),d=Math.max(r,Math.floor(i-l*u/a+h)),A=Math.min(o,Math.floor(i+(a-l)*u/a+h));t(n,i,d,A,s)}var p=n[i],f=r,g=o;for(e(n,r,i),s(n[o],p)>0&&e(n,r,o);f<g;){for(e(n,f,g),f++,g--;s(n[f],p)<0;)f++;for(;s(n[g],p)>0;)g--}0===s(n[r],p)?e(n,r,g):e(n,++g,o),g<=i&&(r=g+1),i<=g&&(o=g-1)}}(t,i,r||0,o||t.length-1,s||n)}function e(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function n(t,e){return t<e?-1:t>e?1:0}var i=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 r(t,e,n){if(!n)return e.indexOf(t);for(var i=0;i<e.length;i++)if(n(t,e[i]))return i;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,i,r){r||(r=p(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o=e;o<n;o++){var s=t.children[o];a(r,t.leaf?i(s):s)}return r}function a(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 l(t,e){return t.minX-e.minX}function c(t,e){return t.minY-e.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function A(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f(e,n,i,r,o){for(var s=[n,i];s.length;)if(!((i=s.pop())-(n=s.pop())<=r)){var a=n+Math.ceil((i-n)/r/2)*r;t(e,a,n,i,o),s.push(n,a,a,i)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var e=this.data,n=[];if(!A(t,e))return n;for(var i=this.toBBox,r=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?i(s):s;A(t,a)&&(e.leaf?n.push(s):d(t,a)?this._all(s,n):r.push(s))}e=r.pop()}return n},i.prototype.collides=function(t){var e=this.data;if(!A(t,e))return!1;for(var n=[];e;){for(var i=0;i<e.children.length;i++){var r=e.children[i],o=e.leaf?this.toBBox(r):r;if(A(t,o)){if(e.leaf||d(t,o))return!0;n.push(r)}}e=n.pop()}return!1},i.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 n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var i=this.data;this.data=n,n=i}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},i.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},i.prototype.clear=function(){return this.data=p([]),this},i.prototype.remove=function(t,e){if(!t)return this;for(var n,i,o,s=this.data,a=this.toBBox(t),l=[],c=[];s||l.length;){if(s||(s=l.pop(),i=l[l.length-1],n=c.pop(),o=!0),s.leaf){var u=r(t,s.children,e);if(-1!==u)return s.children.splice(u,1),l.push(s),this._condense(l),this}o||s.leaf||!d(s,a)?i?(n++,s=i.children[n],o=!1):s=null:(l.push(s),c.push(n),n=0,i=s,s=s.children[0])}return this},i.prototype.toBBox=function(t){return t},i.prototype.compareMinX=function(t,e){return t.minX-e.minX},i.prototype.compareMinY=function(t,e){return t.minY-e.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(t){return this.data=t,this},i.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},i.prototype._build=function(t,e,n,i){var r,s=n-e+1,a=this._maxEntries;if(s<=a)return o(r=p(t.slice(e,n+1)),this.toBBox),r;i||(i=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,i-1))),(r=p([])).leaf=!1,r.height=i;var l=Math.ceil(s/a),c=l*Math.ceil(Math.sqrt(a));f(t,e,n,c,this.compareMinX);for(var u=e;u<=n;u+=c){var h=Math.min(u+c-1,n);f(t,u,h,l,this.compareMinY);for(var d=u;d<=h;d+=l){var A=Math.min(d+l-1,h);r.children.push(this._build(t,d,A,i-1))}}return o(r,this.toBBox),r},i.prototype._chooseSubtree=function(t,e,n,i){for(;i.push(e),!e.leaf&&i.length-1!==n;){for(var r=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],c=u(l),h=(d=t,A=l,(Math.max(A.maxX,d.maxX)-Math.min(A.minX,d.minX))*(Math.max(A.maxY,d.maxY)-Math.min(A.minY,d.minY))-c);h<o?(o=h,r=c<r?c:r,s=l):h===o&&c<r&&(r=c,s=l)}e=s||e.children[0]}var d,A;return e},i.prototype._insert=function(t,e,n){var i=n?t:this.toBBox(t),r=[],o=this._chooseSubtree(i,this.data,e,r);for(o.children.push(t),a(o,i);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(i,r,e)},i.prototype._split=function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var s=this._chooseSplitIndex(n,r,i),a=p(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},i.prototype._splitRoot=function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,e,n){for(var i,r,o,a,l,c,h,d=1/0,A=1/0,p=e;p<=n-e;p++){var f=s(t,0,p,this.toBBox),g=s(t,p,n,this.toBBox),m=(r=f,o=g,a=void 0,l=void 0,c=void 0,h=void 0,a=Math.max(r.minX,o.minX),l=Math.max(r.minY,o.minY),c=Math.min(r.maxX,o.maxX),h=Math.min(r.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,h-l)),_=u(f)+u(g);m<d?(d=m,i=p,A=_<A?_:A):m===d&&_<A&&(A=_,i=p)}return i||n-e},i.prototype._chooseSplitAxis=function(t,e,n){var i=t.leaf?this.compareMinX:l,r=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,r)&&t.children.sort(i)},i.prototype._allDistMargin=function(t,e,n,i){t.children.sort(i);for(var r=this.toBBox,o=s(t,0,e,r),l=s(t,n-e,n,r),c=h(o)+h(l),u=e;u<n-e;u++){var d=t.children[u];a(o,t.leaf?r(d):d),c+=h(o)}for(var A=n-e-1;A>=e;A--){var p=t.children[A];a(l,t.leaf?r(p):p),c+=h(l)}return c},i.prototype._adjustParentBBoxes=function(t,e,n){for(var i=n;i>=0;i--)a(e[i],t)},i.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},i}))},9643:function(t,e,n){"use strict";var i,r=n(9248),o=n(3387),s=n(83),a=n(7429),l=n(2916),c=n(5606),u=n(4658),h=n(1760),d=n(9755),A=n(1569),p=n(1554),f=n(1838),g=n(9004),m=n(8214),_=n(360),y=Function,v=function(t){try{return y('"use strict"; return ('+t+").constructor;")()}catch(e){}},x=n(233),b=n(9265),w=function(){throw new u},E=x?function(){try{return w}catch(t){try{return x(arguments,"callee").get}catch(e){return w}}}():w,C=n(6608)(),B=n(9750),S=n(5605),M=n(3017),T=n(1781),I=n(2108),L={},P="undefined"!==typeof Uint8Array&&B?B(Uint8Array):i,F={__proto__:null,"%AggregateError%":"undefined"===typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":C&&B?B([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%Atomics%":"undefined"===typeof Atomics?i:Atomics,"%BigInt%":"undefined"===typeof BigInt?i:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"undefined"===typeof Float16Array?i:Float16Array,"%Float32Array%":"undefined"===typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":y,"%GeneratorFunction%":L,"%Int8Array%":"undefined"===typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&B?B(B([][Symbol.iterator]())):i,"%JSON%":"object"===typeof JSON?JSON:i,"%Map%":"undefined"===typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&C&&B?B((new Map)[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?i:Promise,"%Proxy%":"undefined"===typeof Proxy?i:Proxy,"%RangeError%":a,"%ReferenceError%":l,"%Reflect%":"undefined"===typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&C&&B?B((new Set)[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&B?B(""[Symbol.iterator]()):i,"%Symbol%":C?Symbol:i,"%SyntaxError%":c,"%ThrowTypeError%":E,"%TypedArray%":P,"%TypeError%":u,"%Uint8Array%":"undefined"===typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?i:Uint32Array,"%URIError%":h,"%WeakMap%":"undefined"===typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?i:WeakSet,"%Function.prototype.call%":I,"%Function.prototype.apply%":T,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":S,"%Math.abs%":d,"%Math.floor%":A,"%Math.max%":p,"%Math.min%":f,"%Math.pow%":g,"%Math.round%":m,"%Math.sign%":_,"%Reflect.getPrototypeOf%":M};if(B)try{null.error}catch(X){var R=B(B(X));F["%Error.prototype%"]=R}var D=function t(e){var n;if("%AsyncFunction%"===e)n=v("async function () {}");else if("%GeneratorFunction%"===e)n=v("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=v("async function* () {}");else if("%AsyncGenerator%"===e){var i=t("%AsyncGeneratorFunction%");i&&(n=i.prototype)}else if("%AsyncIteratorPrototype%"===e){var r=t("%AsyncGenerator%");r&&B&&(n=B(r.prototype))}return F[e]=n,n},O={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},U=n(434),N=n(7451),k=U.call(I,Array.prototype.concat),z=U.call(T,Array.prototype.splice),Q=U.call(I,String.prototype.replace),G=U.call(I,String.prototype.slice),H=U.call(I,RegExp.prototype.exec),V=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,Z=function(t){var e=G(t,0,1),n=G(t,-1);if("%"===e&&"%"!==n)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new c("invalid intrinsic syntax, expected opening `%`");var i=[];return Q(t,V,(function(t,e,n,r){i[i.length]=n?Q(r,j,"$1"):e||t})),i},W=function(t,e){var n,i=t;if(N(O,i)&&(n=O[i],i="%"+n[0]+"%"),N(F,i)){var r=F[i];if(r===L&&(r=D(i)),"undefined"===typeof r&&!e)throw new u("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:r}}throw new c("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!==typeof t||0===t.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof e)throw new u('"allowMissing" argument must be a boolean');if(null===H(/^%?[^%]*%?$/,t))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Z(t),i=n.length>0?n[0]:"",r=W("%"+i+"%",e),o=r.name,s=r.value,a=!1,l=r.alias;l&&(i=l[0],z(n,k([0,1],l)));for(var h=1,d=!0;h<n.length;h+=1){var A=n[h],p=G(A,0,1),f=G(A,-1);if(('"'===p||"'"===p||"`"===p||'"'===f||"'"===f||"`"===f)&&p!==f)throw new c("property names with quotes must have matching quotes");if("constructor"!==A&&d||(a=!0),i+="."+A,o="%"+i+"%",N(F,o))s=F[o];else if(null!=s){if(!(A in s)){if(!e)throw new u("base intrinsic for "+t+" exists, but the property is not available.");return}if(x&&h+1>=n.length){var g=x(s,A);d=!!g,s=d&&"get"in g&&!("originalValue"in g.get)?g.get:s[A]}else d=N(s,A),s=s[A];d&&!a&&(F[o]=s)}}return s}},5605:function(t,e,n){"use strict";var i=n(9248);t.exports=i.getPrototypeOf||null},3017:function(t){"use strict";t.exports="undefined"!==typeof Reflect&&Reflect.getPrototypeOf||null},9750:function(t,e,n){"use strict";var i=n(3017),r=n(5605),o=n(4621);t.exports=i?function(t){return i(t)}:r?function(t){if(!t||"object"!==typeof t&&"function"!==typeof t)throw new TypeError("getProto: not an object");return r(t)}:o?function(t){return o(t)}:null},1667:function(t,e,n){"use strict";n.d(e,{Ib:function(){return i},WT:function(){return r}});var i=1e-6,r="undefined"!==typeof Float32Array?Float32Array:Array;Math.random;Math.PI;Math.hypot||(Math.hypot=function(){var t=0,e=arguments.length;while(e--)t+=arguments[e]*arguments[e];return Math.sqrt(t)})},5678:function(t,e,n){"use strict";n.d(e,{GH:function(){return a},Iu:function(){return c},Jp:function(){return l},U1:function(){return u},U_:function(){return s},Ue:function(){return r},bA:function(){return h},en:function(){return d},p4:function(){return o}});var i=n(1667);function r(){var t=new i.WT(9);return i.WT!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function o(t,e){if(t===e){var n=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function s(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=u*s-a*c,d=-u*o+a*l,A=c*o-s*l,p=n*h+i*d+r*A;return p?(p=1/p,t[0]=h*p,t[1]=(-u*i+r*c)*p,t[2]=(a*i-r*s)*p,t[3]=d*p,t[4]=(u*n-r*l)*p,t[5]=(-a*n+r*o)*p,t[6]=A*p,t[7]=(-c*n+i*l)*p,t[8]=(s*n-i*o)*p,t):null}function a(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],s=t[5],a=t[6],l=t[7],c=t[8];return e*(c*o-s*l)+n*(-c*r+s*a)+i*(l*r-o*a)}function l(t,e,n){var i=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=n[0],A=n[1],p=n[2],f=n[3],g=n[4],m=n[5],_=n[6],y=n[7],v=n[8];return t[0]=d*i+A*s+p*c,t[1]=d*r+A*a+p*u,t[2]=d*o+A*l+p*h,t[3]=f*i+g*s+m*c,t[4]=f*r+g*a+m*u,t[5]=f*o+g*l+m*h,t[6]=_*i+y*s+v*c,t[7]=_*r+y*a+v*u,t[8]=_*o+y*l+v*h,t}function c(t,e,n){var i=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=n[0],A=n[1];return t[0]=i,t[1]=r,t[2]=o,t[3]=s,t[4]=a,t[5]=l,t[6]=d*i+A*s+c,t[7]=d*r+A*a+u,t[8]=d*o+A*l+h,t}function u(t,e,n){var i=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=Math.sin(n),A=Math.cos(n);return t[0]=A*i+d*s,t[1]=A*r+d*a,t[2]=A*o+d*l,t[3]=A*s-d*i,t[4]=A*a-d*r,t[5]=A*l-d*o,t[6]=c,t[7]=u,t[8]=h,t}function h(t,e,n){var i=n[0],r=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function d(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],s=n+n,a=i+i,l=r+r,c=n*s,u=i*s,h=i*a,d=r*s,A=r*a,p=r*l,f=o*s,g=o*a,m=o*l;return t[0]=1-h-p,t[3]=u-m,t[6]=d+g,t[1]=u+m,t[4]=1-c-p,t[7]=A-f,t[2]=d-g,t[5]=A+f,t[8]=1-c-h,t}},6977:function(t,e,n){"use strict";n.d(e,{G3:function(){return y},GH:function(){return a},Iu:function(){return c},Jp:function(){return l},M5:function(){return x},Q$:function(){return f},U1:function(){return h},U_:function(){return s},bA:function(){return u},en:function(){return g},jI:function(){return p},lM:function(){return d},oy:function(){return m},p4:function(){return o},uD:function(){return A},zB:function(){return b}});var i=n(1667);function r(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function o(t,e){if(t===e){var n=e[1],i=e[2],r=e[3],o=e[6],s=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=o,t[11]=e[14],t[12]=r,t[13]=s,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function s(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],A=e[11],p=e[12],f=e[13],g=e[14],m=e[15],_=n*a-i*s,y=n*l-r*s,v=n*c-o*s,x=i*l-r*a,b=i*c-o*a,w=r*c-o*l,E=u*f-h*p,C=u*g-d*p,B=u*m-A*p,S=h*g-d*f,M=h*m-A*f,T=d*m-A*g,I=_*T-y*M+v*S+x*B-b*C+w*E;return I?(I=1/I,t[0]=(a*T-l*M+c*S)*I,t[1]=(r*M-i*T-o*S)*I,t[2]=(f*w-g*b+m*x)*I,t[3]=(d*b-h*w-A*x)*I,t[4]=(l*B-s*T-c*C)*I,t[5]=(n*T-r*B+o*C)*I,t[6]=(g*v-p*w-m*y)*I,t[7]=(u*w-d*v+A*y)*I,t[8]=(s*M-a*B+c*E)*I,t[9]=(i*B-n*M-o*E)*I,t[10]=(p*b-f*v+m*_)*I,t[11]=(h*v-u*b-A*_)*I,t[12]=(a*C-s*S-l*E)*I,t[13]=(n*S-i*C+r*E)*I,t[14]=(f*y-p*x-g*_)*I,t[15]=(u*x-h*y+d*_)*I,t):null}function a(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],s=t[5],a=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11],A=t[12],p=t[13],f=t[14],g=t[15],m=e*s-n*o,_=e*a-i*o,y=e*l-r*o,v=n*a-i*s,x=n*l-r*s,b=i*l-r*a,w=c*p-u*A,E=c*f-h*A,C=c*g-d*A,B=u*f-h*p,S=u*g-d*p,M=h*g-d*f;return m*M-_*S+y*B+v*C-x*E+b*w}function l(t,e,n){var i=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=e[9],A=e[10],p=e[11],f=e[12],g=e[13],m=e[14],_=e[15],y=n[0],v=n[1],x=n[2],b=n[3];return t[0]=y*i+v*a+x*h+b*f,t[1]=y*r+v*l+x*d+b*g,t[2]=y*o+v*c+x*A+b*m,t[3]=y*s+v*u+x*p+b*_,y=n[4],v=n[5],x=n[6],b=n[7],t[4]=y*i+v*a+x*h+b*f,t[5]=y*r+v*l+x*d+b*g,t[6]=y*o+v*c+x*A+b*m,t[7]=y*s+v*u+x*p+b*_,y=n[8],v=n[9],x=n[10],b=n[11],t[8]=y*i+v*a+x*h+b*f,t[9]=y*r+v*l+x*d+b*g,t[10]=y*o+v*c+x*A+b*m,t[11]=y*s+v*u+x*p+b*_,y=n[12],v=n[13],x=n[14],b=n[15],t[12]=y*i+v*a+x*h+b*f,t[13]=y*r+v*l+x*d+b*g,t[14]=y*o+v*c+x*A+b*m,t[15]=y*s+v*u+x*p+b*_,t}function c(t,e,n){var i,r,o,s,a,l,c,u,h,d,A,p,f=n[0],g=n[1],m=n[2];return e===t?(t[12]=e[0]*f+e[4]*g+e[8]*m+e[12],t[13]=e[1]*f+e[5]*g+e[9]*m+e[13],t[14]=e[2]*f+e[6]*g+e[10]*m+e[14],t[15]=e[3]*f+e[7]*g+e[11]*m+e[15]):(i=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=e[9],A=e[10],p=e[11],t[0]=i,t[1]=r,t[2]=o,t[3]=s,t[4]=a,t[5]=l,t[6]=c,t[7]=u,t[8]=h,t[9]=d,t[10]=A,t[11]=p,t[12]=i*f+a*g+h*m+e[12],t[13]=r*f+l*g+d*m+e[13],t[14]=o*f+c*g+A*m+e[14],t[15]=s*f+u*g+p*m+e[15]),t}function u(t,e,n){var i=n[0],r=n[1],o=n[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function h(t,e,n,r){var o,s,a,l,c,u,h,d,A,p,f,g,m,_,y,v,x,b,w,E,C,B,S,M,T=r[0],I=r[1],L=r[2],P=Math.hypot(T,I,L);return P<i.Ib?null:(P=1/P,T*=P,I*=P,L*=P,o=Math.sin(n),s=Math.cos(n),a=1-s,l=e[0],c=e[1],u=e[2],h=e[3],d=e[4],A=e[5],p=e[6],f=e[7],g=e[8],m=e[9],_=e[10],y=e[11],v=T*T*a+s,x=I*T*a+L*o,b=L*T*a-I*o,w=T*I*a-L*o,E=I*I*a+s,C=L*I*a+T*o,B=T*L*a+I*o,S=I*L*a-T*o,M=L*L*a+s,t[0]=l*v+d*x+g*b,t[1]=c*v+A*x+m*b,t[2]=u*v+p*x+_*b,t[3]=h*v+f*x+y*b,t[4]=l*w+d*E+g*C,t[5]=c*w+A*E+m*C,t[6]=u*w+p*E+_*C,t[7]=h*w+f*E+y*C,t[8]=l*B+d*S+g*M,t[9]=c*B+A*S+m*M,t[10]=u*B+p*S+_*M,t[11]=h*B+f*S+y*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function d(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[4],s=e[5],a=e[6],l=e[7],c=e[8],u=e[9],h=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*r+c*i,t[5]=s*r+u*i,t[6]=a*r+h*i,t[7]=l*r+d*i,t[8]=c*r-o*i,t[9]=u*r-s*i,t[10]=h*r-a*i,t[11]=d*r-l*i,t}function A(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[0],s=e[1],a=e[2],l=e[3],c=e[8],u=e[9],h=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*r-c*i,t[1]=s*r-u*i,t[2]=a*r-h*i,t[3]=l*r-d*i,t[8]=o*i+c*r,t[9]=s*i+u*r,t[10]=a*i+h*r,t[11]=l*i+d*r,t}function p(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[0],s=e[1],a=e[2],l=e[3],c=e[4],u=e[5],h=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*r+c*i,t[1]=s*r+u*i,t[2]=a*r+h*i,t[3]=l*r+d*i,t[4]=c*r-o*i,t[5]=u*r-s*i,t[6]=h*r-a*i,t[7]=d*r-l*i,t}function f(t,e){var n=e[0],i=e[1],r=e[2],o=e[4],s=e[5],a=e[6],l=e[8],c=e[9],u=e[10];return t[0]=Math.hypot(n,i,r),t[1]=Math.hypot(o,s,a),t[2]=Math.hypot(l,c,u),t}function g(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],s=n+n,a=i+i,l=r+r,c=n*s,u=i*s,h=i*a,d=r*s,A=r*a,p=r*l,f=o*s,g=o*a,m=o*l;return t[0]=1-h-p,t[1]=u+m,t[2]=d-g,t[3]=0,t[4]=u-m,t[5]=1-c-p,t[6]=A+f,t[7]=0,t[8]=d+g,t[9]=A-f,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function m(t,e,n,i,r,o,s){var a=1/(n-e),l=1/(r-i),c=1/(o-s);return t[0]=2*o*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(n+e)*a,t[9]=(r+i)*l,t[10]=(s+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*o*2*c,t[15]=0,t}function _(t,e,n,i,r){var o,s=1/Math.tan(e/2);return t[0]=s/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=r&&r!==1/0?(o=1/(i-r),t[10]=(r+i)*o,t[14]=2*r*i*o):(t[10]=-1,t[14]=-2*i),t}var y=_;function v(t,e,n,i,r,o,s){var a=1/(e-n),l=1/(i-r),c=1/(o-s);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*a,t[13]=(r+i)*l,t[14]=(s+o)*c,t[15]=1,t}var x=v;function b(t,e,n,o){var s,a,l,c,u,h,d,A,p,f,g=e[0],m=e[1],_=e[2],y=o[0],v=o[1],x=o[2],b=n[0],w=n[1],E=n[2];return Math.abs(g-b)<i.Ib&&Math.abs(m-w)<i.Ib&&Math.abs(_-E)<i.Ib?r(t):(d=g-b,A=m-w,p=_-E,f=1/Math.hypot(d,A,p),d*=f,A*=f,p*=f,s=v*p-x*A,a=x*d-y*p,l=y*A-v*d,f=Math.hypot(s,a,l),f?(f=1/f,s*=f,a*=f,l*=f):(s=0,a=0,l=0),c=A*l-p*a,u=p*s-d*l,h=d*a-A*s,f=Math.hypot(c,u,h),f?(f=1/f,c*=f,u*=f,h*=f):(c=0,u=0,h=0),t[0]=s,t[1]=c,t[2]=d,t[3]=0,t[4]=a,t[5]=u,t[6]=A,t[7]=0,t[8]=l,t[9]=h,t[10]=p,t[11]=0,t[12]=-(s*g+a*m+l*_),t[13]=-(c*g+u*m+h*_),t[14]=-(d*g+A*m+p*_),t[15]=1,t)}},4928:function(t,e,n){"use strict";n.d(e,{IH:function(){return o},c:function(){return l},fF:function(){return h},iu:function(){return c},kK:function(){return u},t7:function(){return a},tk:function(){return s}});var i=n(1667);function r(){var t=new i.WT(2);return i.WT!=Float32Array&&(t[0]=0,t[1]=0),t}function o(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function s(t,e){return t[0]=-e[0],t[1]=-e[1],t}function a(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t}function l(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t}function c(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function u(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t}function h(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t}(function(){var t=r()})()},8484:function(t,e,n){"use strict";n.d(e,{AK:function(){return u},EU:function(){return _},Fv:function(){return c},Ue:function(){return r},VC:function(){return p},Zh:function(){return v},al:function(){return s},fF:function(){return d},jI:function(){return m},kC:function(){return h},kE:function(){return o},kK:function(){return A},lM:function(){return f},lu:function(){return y},tk:function(){return l},uD:function(){return g}});var i=n(1667);function r(){var t=new i.WT(3);return i.WT!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function o(t){var e=t[0],n=t[1],i=t[2];return Math.hypot(e,n,i)}function s(t,e,n){var r=new i.WT(3);return r[0]=t,r[1]=e,r[2]=n,r}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function l(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function c(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function u(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function h(t,e,n){var i=e[0],r=e[1],o=e[2],s=n[0],a=n[1],l=n[2];return t[0]=r*l-o*a,t[1]=o*s-i*l,t[2]=i*a-r*s,t}function d(t,e,n){var i=e[0],r=e[1],o=e[2],s=n[3]*i+n[7]*r+n[11]*o+n[15];return s=s||1,t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/s,t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/s,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/s,t}function A(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t}function p(t,e,n){var i=n[0],r=n[1],o=n[2],s=n[3],a=e[0],l=e[1],c=e[2],u=r*c-o*l,h=o*a-i*c,d=i*l-r*a,A=r*d-o*h,p=o*u-i*d,f=i*h-r*u,g=2*s;return u*=g,h*=g,d*=g,A*=2,p*=2,f*=2,t[0]=a+u+A,t[1]=l+h+p,t[2]=c+d+f,t}function f(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0],o[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),o[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function g(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),o[1]=r[1],o[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function m(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),o[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),o[2]=r[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function _(t,e){var n=t[0],i=t[1],r=t[2],o=e[0],s=e[1],a=e[2],l=Math.sqrt(n*n+i*i+r*r),c=Math.sqrt(o*o+s*s+a*a),h=l*c,d=h&&u(t,e)/h;return Math.acos(Math.min(Math.max(d,-1),1))}var y=a,v=o;(function(){var t=r()})()},800:function(t,e,n){"use strict";n.d(e,{AK:function(){return p},Fv:function(){return A},I6:function(){return _},IH:function(){return c},JG:function(){return a},VC:function(){return m},al:function(){return s},bA:function(){return u},d9:function(){return o},fF:function(){return g},fS:function(){return y},kE:function(){return h},t7:function(){return f},t8:function(){return l},we:function(){return d}});var i=n(1667);function r(){var t=new i.WT(4);return i.WT!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function o(t){var e=new i.WT(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function s(t,e,n,r){var o=new i.WT(4);return o[0]=t,o[1]=e,o[2]=n,o[3]=r,o}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function l(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function c(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function u(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function h(t){var e=t[0],n=t[1],i=t[2],r=t[3];return Math.hypot(e,n,i,r)}function d(t){var e=t[0],n=t[1],i=t[2],r=t[3];return e*e+n*n+i*i+r*r}function A(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],s=n*n+i*i+r*r+o*o;return s>0&&(s=1/Math.sqrt(s)),t[0]=n*s,t[1]=i*s,t[2]=r*s,t[3]=o*s,t}function p(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function f(t,e,n,i){var r=e[0],o=e[1],s=e[2],a=e[3];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=s+i*(n[2]-s),t[3]=a+i*(n[3]-a),t}function g(t,e,n){var i=e[0],r=e[1],o=e[2],s=e[3];return t[0]=n[0]*i+n[4]*r+n[8]*o+n[12]*s,t[1]=n[1]*i+n[5]*r+n[9]*o+n[13]*s,t[2]=n[2]*i+n[6]*r+n[10]*o+n[14]*s,t[3]=n[3]*i+n[7]*r+n[11]*o+n[15]*s,t}function m(t,e,n){var i=e[0],r=e[1],o=e[2],s=n[0],a=n[1],l=n[2],c=n[3],u=c*i+a*o-l*r,h=c*r+l*i-s*o,d=c*o+s*r-a*i,A=-s*i-a*r-l*o;return t[0]=u*c+A*-s+h*-l-d*-a,t[1]=h*c+A*-a+d*-s-u*-l,t[2]=d*c+A*-l+u*-a-h*-s,t[3]=e[3],t}function _(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function y(t,e){var n=t[0],r=t[1],o=t[2],s=t[3],a=e[0],l=e[1],c=e[2],u=e[3];return Math.abs(n-a)<=i.Ib*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-l)<=i.Ib*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(o-c)<=i.Ib*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(s-u)<=i.Ib*Math.max(1,Math.abs(s),Math.abs(u))}(function(){var t=r()})()},4727:function(t){"use strict";t.exports=Object.getOwnPropertyDescriptor},233:function(t,e,n){"use strict";var i=n(4727);if(i)try{i([],"length")}catch(r){i=null}t.exports=i},5974:function(t,e,n){var i;
|
|
1
|
+
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue")):"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["xy-map"]=e(require("vue")):t["xy-map"]=e(t["Vue"])})("undefined"!==typeof self?self:this,(function(t){return function(){var e={1627:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=s()(r());a.push([t.id,":-webkit-full-screen .d[data-v-7e84ad1e]{color:red}:fullscreen .d[data-v-7e84ad1e]{color:red}",""]),e["default"]=a},8294:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=s()(r());a.push([t.id,".mapLoad[data-v-fa3ebcb8]{position:absolute;width:100%;height:100%;top:0;left:0;background-color:#d5f2fd;z-index:99999999;transition:all .5s;opacity:1;overflow:hidden}.loadOver[data-v-fa3ebcb8]{opacity:0;pointer-events:none}.progress-wrap[data-v-fa3ebcb8]{width:100%;height:12px;border-radius:8px;position:relative}.progress-inner[data-v-fa3ebcb8]{height:inherit;background:rgba(142,193,255,.2);border-radius:8px}.progress-nums[data-v-fa3ebcb8]{height:inherit;border-radius:6px;background:repeating-linear-gradient(-45deg,#008bdd 25%,#49beff 0,#49beff 50%,#008bdd 0,#008bdd 75%,#49beff 0);background-size:16px 16px;animation:panoramic-fa3ebcb8 30s linear infinite}@keyframes panoramic-fa3ebcb8{to{background-position:200% 0}}",""]),e["default"]=a},8475:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=s()(r());a.push([t.id,".snow[data-v-20664206]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;background-color:rgba(145,147,184,.103)}",""]),e["default"]=a},8752:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=s()(r());a.push([t.id,".tools[data-v-4c4ff58c]{position:absolute;left:0;top:0;margin:15px;background-color:hsla(0,0%,100%,.9);padding:14px;border-radius:5px}.tools .tools-bar[data-v-4c4ff58c]{cursor:pointer}.right-fixed[data-v-4c4ff58c]{position:absolute;right:0;top:0;margin:15px}.split-tooltip[data-v-4c4ff58c]{position:fixed;background-color:rgba(0,0,0,.8);color:#fff;padding:5px 10px;border-radius:4px;font-size:12px;pointer-events:none;z-index:1000}",""]),e["default"]=a},351:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=s()(r());a.push([t.id,".upload[data-v-5a5f8c5d]{position:relative}.upload input[data-v-5a5f8c5d]{position:absolute;width:100%;height:100%;left:0;top:0;opacity:0}",""]),e["default"]=a},4963:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=s()(r());a.push([t.id,".upload[data-v-7858f34f]{position:relative}.upload input[data-v-7858f34f]{position:absolute;width:100%;height:100%;left:0;top:0;opacity:0}",""]),e["default"]=a},2125:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=n(1979),l=n.n(a),c=new URL(n(192),n.b),u=new URL(n(263),n.b),h=new URL(n(4363),n.b),d=new URL(n(2780),n.b),A=new URL(n(4947),n.b),p=new URL(n(1706),n.b),f=s()(r()),g=l()(c),m=l()(u),_=l()(h),y=l()(d),v=l()(A),x=l()(p);f.push([t.id,".mapbox-gl-draw_ctrl-bottom-left,.mapbox-gl-draw_ctrl-top-left{margin-left:0;border-radius:0 4px 4px 0}.mapbox-gl-draw_ctrl-bottom-right,.mapbox-gl-draw_ctrl-top-right{margin-right:0;border-radius:4px 0 0 4px}.mapbox-gl-draw_ctrl-draw{background-color:rgba(0,0,0,.75);border-color:rgba(0,0,0,.9)}.mapbox-gl-draw_ctrl-draw>button{border-color:rgba(0,0,0,.9);color:hsla(0,0%,100%,.5);width:30px;height:30px}.mapbox-gl-draw_ctrl-draw>button:hover{background-color:rgba(0,0,0,.85);color:hsla(0,0%,100%,.75)}.mapbox-gl-draw_ctrl-draw>button.active,.mapbox-gl-draw_ctrl-draw>button.active:hover{background-color:rgba(0,0,0,.95);color:#fff}.mapbox-gl-draw_ctrl-draw-btn{background-repeat:no-repeat;background-position:50%}.mapbox-gl-draw_point{background-image:url("+g+")}.mapbox-gl-draw_polygon{background-image:url("+m+")}.mapbox-gl-draw_line{background-image:url("+_+")}.mapbox-gl-draw_trash{background-image:url("+y+")}.mapbox-gl-draw_uncombine{background-image:url("+v+")}.mapbox-gl-draw_combine{background-image:url("+x+")}.mapboxgl-map.mouse-pointer .mapboxgl-canvas-container.mapboxgl-interactive{cursor:pointer}.mapboxgl-map.mouse-move .mapboxgl-canvas-container.mapboxgl-interactive{cursor:move}.mapboxgl-map.mouse-add .mapboxgl-canvas-container.mapboxgl-interactive{cursor:crosshair}.mapboxgl-map.mouse-move.mode-direct_select .mapboxgl-canvas-container.mapboxgl-interactive{cursor:grab;cursor:-webkit-grab}.mapboxgl-map.mode-direct_select.feature-vertex.mouse-move .mapboxgl-canvas-container.mapboxgl-interactive{cursor:move}.mapboxgl-map.mode-direct_select.feature-midpoint.mouse-pointer .mapboxgl-canvas-container.mapboxgl-interactive{cursor:cell}.mapboxgl-map.mode-direct_select.feature-feature.mouse-move .mapboxgl-canvas-container.mapboxgl-interactive{cursor:move}.mapboxgl-map.mode-static.mouse-pointer .mapboxgl-canvas-container.mapboxgl-interactive{cursor:grab;cursor:-webkit-grab}.mapbox-gl-draw_boxselect{pointer-events:none;position:absolute;top:0;left:0;width:0;height:0;background:rgba(0,0,0,.1);border:2px dotted #fff;opacity:.5}",""]),e["default"]=f},6646:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=n(1979),l=n.n(a),c=new URL(n(7673),n.b),u=new URL(n(1570),n.b),h=new URL(n(6807),n.b),d=new URL(n(28),n.b),A=new URL(n(325),n.b),p=new URL(n(242),n.b),f=new URL(n(2931),n.b),g=new URL(n(752),n.b),m=new URL(n(323),n.b),_=new URL(n(551),n.b),y=new URL(n(1045),n.b),v=new URL(n(4871),n.b),x=new URL(n(3598),n.b),b=new URL(n(6043),n.b),w=new URL(n(4055),n.b),E=new URL(n(5758),n.b),C=new URL(n(3895),n.b),B=new URL(n(407),n.b),S=new URL(n(926),n.b),M=new URL(n(4943),n.b),T=new URL(n(6871),n.b),I=new URL(n(2154),n.b),L=new URL(n(9843),n.b),P=new URL(n(9920),n.b),F=new URL(n(406),n.b),R=new URL(n(3939),n.b),D=new URL(n(5929),n.b),O=new URL(n(4026),n.b),U=new URL(n(2179),n.b),N=s()(r()),k=l()(c),z=l()(u),Q=l()(h),G=l()(d),H=l()(A),V=l()(p),j=l()(f),Z=l()(g),W=l()(m),X=l()(_),K=l()(y),q=l()(v),J=l()(x),Y=l()(b),$=l()(w),tt=l()(E),et=l()(C),nt=l()(B),it=l()(S),rt=l()(M),ot=l()(T),st=l()(I),at=l()(L),lt=l()(P),ct=l()(F),ut=l()(R),ht=l()(D),dt=l()(O),At=l()(U);N.push([t.id,".mapboxgl-map{-webkit-tap-highlight-color:rgb(0 0 0/0);font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative}.mapboxgl-canvas{left:0;position:absolute;top:0}.mapboxgl-map:-webkit-full-screen{height:100%;width:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer{cursor:pointer}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active{cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.mapboxgl-ctrl-top-left{left:0;top:0}.mapboxgl-ctrl-top-right{right:0;top:0}.mapboxgl-ctrl-bottom-left{bottom:0;left:0}.mapboxgl-ctrl-bottom-right{bottom:0;right:0}.mapboxgl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{float:left;margin:10px 0 0 10px}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{float:right;margin:10px 10px 0 0}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{float:left;margin:0 0 10px 10px}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{float:right;margin:0 10px 10px 0}.mapboxgl-ctrl-group{background:#fff;border-radius:4px}.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (-ms-high-contrast:active){.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.mapboxgl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;overflow:hidden;padding:0;width:29px}.mapboxgl-ctrl-group button+button{border-top:1px solid #ddd}.mapboxgl-ctrl button .mapboxgl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (-ms-high-contrast:active){.mapboxgl-ctrl-icon{background-color:transparent}.mapboxgl-ctrl-group button+button{border-top:1px solid ButtonText}}.mapboxgl-ctrl-attrib-button:focus,.mapboxgl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl button:disabled{cursor:not-allowed}.mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon{opacity:.25}.mapboxgl-ctrl-group button:first-child{border-radius:4px 4px 0 0}.mapboxgl-ctrl-group button:last-child{border-radius:0 0 4px 4px}.mapboxgl-ctrl-group button:only-child{border-radius:inherit}.mapboxgl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.mapboxgl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("+k+")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("+z+")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("+Q+")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("+G+")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("+H+")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("+V+")}}.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("+j+")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("+Z+")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("+W+")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("+X+")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("+K+")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("+Z+")}}.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("+q+")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("+J+")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("+Y+")}}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("+$+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("+tt+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("+et+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("+nt+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("+it+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("+rt+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting .mapboxgl-ctrl-icon{animation:mapboxgl-spin 2s linear infinite}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("+ot+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("+st+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("+et+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("+nt+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("+it+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("+rt+")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("+at+")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("+lt+")}}@keyframes mapboxgl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.mapboxgl-ctrl-logo{background-image:url("+ct+");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:23px}@media (-ms-high-contrast:active){a.mapboxgl-ctrl-logo{background-color:transparent;background-image:url("+ut+")}}@media (-ms-high-contrast:black-on-white){a.mapboxgl-ctrl-logo{background-image:url("+ht+")}}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{background-color:#fff;border-radius:12px;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("+dt+");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-top-left .mapboxgl-ctrl-attrib-button{left:0}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{right:0;top:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{left:0;top:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("+At+")}}@media screen and (-ms-high-contrast:black-on-white){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("+dt+')}}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.mapboxgl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{flex-direction:column-reverse}.mapboxgl-popup-anchor-left{flex-direction:row}.mapboxgl-popup-anchor-right{flex-direction:row-reverse}.mapboxgl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.mapboxgl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.mapboxgl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.mapboxgl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto;position:relative}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-popup-track-pointer{display:none}.mapboxgl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.mapboxgl-map:hover .mapboxgl-popup-track-pointer{display:flex}.mapboxgl-map:active .mapboxgl-popup-track-pointer{display:none}.mapboxgl-marker{left:0;opacity:1;position:absolute;top:0;transition:opacity .2s;will-change:transform}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.mapboxgl-user-location-dot:before{animation:mapboxgl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.mapboxgl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading{height:0;width:0}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:after,.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:before{border-bottom:7.5px solid #4aa1eb;content:"";position:absolute}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:before{border-left:7.5px solid transparent;transform:translateY(-28px) skewY(-20deg)}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:after{border-right:7.5px solid transparent;transform:translate(7.5px,-28px) skewY(20deg)}@keyframes mapboxgl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}@media print{.mapbox-improve-map{display:none}}.mapboxgl-scroll-zoom-blocker,.mapboxgl-touch-pan-blocker{align-items:center;background:rgba(0,0,0,.7);color:#fff;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;height:100%;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;text-align:center;top:0;transition:opacity .75s ease-in-out;transition-delay:1s;width:100%}.mapboxgl-scroll-zoom-blocker-show,.mapboxgl-touch-pan-blocker-show{opacity:1;transition:opacity .1s ease-in-out}.mapboxgl-canvas-container.mapboxgl-touch-pan-blocker-override.mapboxgl-scrollable-page,.mapboxgl-canvas-container.mapboxgl-touch-pan-blocker-override.mapboxgl-scrollable-page .mapboxgl-canvas{touch-action:pan-x pan-y}',""]),e["default"]=N},8841:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=s()(r());a.push([t.id,".xy-hover-html .hover-item{display:flex}.xy-hover-html .hover-item .label{width:80px}.xy-hover-html .hover-item .value{flex:1}.xy-hover-html .waring-color{color:#e6a23c}.xy-hover-html .success-color{color:#67c23a}.xy-hover-html .error-color{color:#f56c6c}.xy-hover-html .info-color{color:#909399}",""]),e["default"]=a},2716:function(t,e,n){"use strict";n.r(e);var i=n(1356),r=n.n(i),o=n(1791),s=n.n(o),a=s()(r());a.push([t.id,".mapboxgl-ctrl-attrib{display:none}.mapboxgl-ctrl-logo{display:none!important}",""]),e["default"]=a},1374:function(t,e,n){!function(e,n){t.exports=n()}(0,(function(){"use strict";var t=function(t,e){var n={drag:[],click:[],mousemove:[],mousedown:[],mouseup:[],mouseout:[],keydown:[],keyup:[],touchstart:[],touchmove:[],touchend:[],tap:[]},i={on:function(t,e,i){if(void 0===n[t])throw new Error("Invalid event type: "+t);n[t].push({selector:e,fn:i})},render:function(t){e.store.featureChanged(t)}},r=function(t,r){for(var o=n[t],s=o.length;s--;){var a=o[s];if(a.selector(r)){a.fn.call(i,r)||e.store.render(),e.ui.updateMapClasses();break}}};return t.start.call(i),{render:t.render,stop:function(){t.stop&&t.stop()},trash:function(){t.trash&&(t.trash(),e.store.render())},combineFeatures:function(){t.combineFeatures&&t.combineFeatures()},uncombineFeatures:function(){t.uncombineFeatures&&t.uncombineFeatures()},drag:function(t){r("drag",t)},click:function(t){r("click",t)},mousemove:function(t){r("mousemove",t)},mousedown:function(t){r("mousedown",t)},mouseup:function(t){r("mouseup",t)},mouseout:function(t){r("mouseout",t)},keydown:function(t){r("keydown",t)},keyup:function(t){r("keyup",t)},touchstart:function(t){r("touchstart",t)},touchmove:function(t){r("touchmove",t)},touchend:function(t){r("touchend",t)},tap:function(t){r("tap",t)}}},e=6378137;function i(t){var e=0;if(t&&t.length>0){e+=Math.abs(r(t[0]));for(var n=1;n<t.length;n++)e-=Math.abs(r(t[n]))}return e}function r(t){var n,i,r,s,a,l,c=0,u=t.length;if(u>2){for(l=0;l<u;l++)l===u-2?(r=u-2,s=u-1,a=0):l===u-1?(r=u-1,s=0,a=1):(r=l,s=l+1,a=l+2),n=t[r],i=t[s],c+=(o(t[a][0])-o(n[0]))*Math.sin(o(i[1]));c=c*e*e/2}return c}function o(t){return t*Math.PI/180}var s={geometry:function t(e){var n,r=0;switch(e.type){case"Polygon":return i(e.coordinates);case"MultiPolygon":for(n=0;n<e.coordinates.length;n++)r+=i(e.coordinates[n]);return r;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(n=0;n<e.geometries.length;n++)r+=t(e.geometries[n]);return r}},ring:r},a="mapboxgl-ctrl",l="mapbox-gl-draw_ctrl-draw-btn",c="mapbox-gl-draw_line",u="mapbox-gl-draw_polygon",h="mapbox-gl-draw_point",d="mapbox-gl-draw_trash",A="mapbox-gl-draw_combine",p="mapbox-gl-draw_uncombine",f="mapboxgl-ctrl-group",g="active",m="mapbox-gl-draw_boxselect",_="mapbox-gl-draw-hot",y="mapbox-gl-draw-cold",v="add",x="move",b="drag",w="pointer",E="none",C={POLYGON:"polygon",LINE:"line_string",POINT:"point"},B="Feature",S="Polygon",M="LineString",T="Point",I="FeatureCollection",L="Multi",P="MultiPoint",F="MultiLineString",R="MultiPolygon",D={DRAW_LINE_STRING:"draw_line_string",DRAW_POLYGON:"draw_polygon",DRAW_POINT:"draw_point",SIMPLE_SELECT:"simple_select",DIRECT_SELECT:"direct_select",STATIC:"static"},O="draw.create",U="draw.delete",N="draw.update",k="draw.selectionchange",z="draw.modechange",Q="draw.actionable",G="draw.render",H="draw.combine",V="draw.uncombine",j="move",Z="change_coordinates",W="feature",X="midpoint",K="vertex",q="true",J="false",Y=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"],$={Point:0,LineString:1,Polygon:2};function tt(t,e){var n=$[t.geometry.type]-$[e.geometry.type];return 0===n&&t.geometry.type===S?t.area-e.area:n}function et(t){if(this._items={},this._nums={},this._length=t?t.length:0,t)for(var e=0,n=t.length;e<n;e++)this.add(t[e]),void 0!==t[e]&&("string"==typeof t[e]?this._items[t[e]]=e:this._nums[t[e]]=e)}et.prototype.add=function(t){return this.has(t)||(this._length++,"string"==typeof t?this._items[t]=this._length:this._nums[t]=this._length),this},et.prototype.delete=function(t){return!1===this.has(t)||(this._length--,delete this._items[t],delete this._nums[t]),this},et.prototype.has=function(t){return("string"==typeof t||"number"==typeof t)&&(void 0!==this._items[t]||void 0!==this._nums[t])},et.prototype.values=function(){var t=this,e=[];return Object.keys(this._items).forEach((function(n){e.push({k:n,v:t._items[n]})})),Object.keys(this._nums).forEach((function(n){e.push({k:JSON.parse(n),v:t._nums[n]})})),e.sort((function(t,e){return t.v-e.v})).map((function(t){return t.k}))},et.prototype.clear=function(){return this._length=0,this._items={},this._nums={},this};var nt=[W,X,K],it={click:function(t,e,n){return rt(t,e,n,n.options.clickBuffer)},touch:function(t,e,n){return rt(t,e,n,n.options.touchBuffer)}};function rt(t,e,n,i){if(null===n.map)return[];var r=t?function(t,e){return void 0===e&&(e=0),[[t.point.x-e,t.point.y-e],[t.point.x+e,t.point.y+e]]}(t,i):e,o={};n.options.styles&&(o.layers=n.options.styles.map((function(t){return t.id})));var a=n.map.queryRenderedFeatures(r,o).filter((function(t){return-1!==nt.indexOf(t.properties.meta)})),l=new et,c=[];return a.forEach((function(t){var e=t.properties.id;l.has(e)||(l.add(e),c.push(t))})),function(t){return t.map((function(t){return t.geometry.type===S&&(t.area=s.geometry({type:B,property:{},geometry:t.geometry})),t})).sort(tt).map((function(t){return delete t.area,t}))}(c)}function ot(t,e){var n=it.click(t,null,e),i={mouse:E};return n[0]&&(i.mouse=n[0].properties.active===q?x:w,i.feature=n[0].properties.meta),-1!==e.events.currentModeName().indexOf("draw")&&(i.mouse=v),e.ui.queueMapClasses(i),e.ui.updateMapClasses(),n[0]}function st(t,e){var n=t.x-e.x,i=t.y-e.y;return Math.sqrt(n*n+i*i)}function at(t,e,n){void 0===n&&(n={});var i=null!=n.fineTolerance?n.fineTolerance:4,r=null!=n.grossTolerance?n.grossTolerance:12,o=null!=n.interval?n.interval:500;t.point=t.point||e.point,t.time=t.time||e.time;var s=st(t.point,e.point);return s<i||s<r&&e.time-t.time<o}function lt(t,e,n){void 0===n&&(n={});var i=null!=n.tolerance?n.tolerance:25,r=null!=n.interval?n.interval:250;return t.point=t.point||e.point,t.time=t.time||e.time,st(t.point,e.point)<i&&e.time-t.time<r}function ct(t,e){return t(e={exports:{}},e.exports),e.exports}var ut=ct((function(t){var e=t.exports=function(t,n){if(n||(n=16),void 0===t&&(t=128),t<=0)return"0";for(var i=Math.log(Math.pow(2,t))/Math.log(n),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,t/r))/Math.log(n)*r;var o=i-Math.floor(i),s="";for(r=0;r<Math.floor(i);r++)s=Math.floor(Math.random()*n).toString(n)+s;if(o){var a=Math.pow(n,o);s=Math.floor(Math.random()*a).toString(n)+s}var l=parseInt(s,n);return l!==1/0&&l>=Math.pow(2,t)?e(t,n):s};e.rack=function(t,n,i){var r=function(r){var s=0;do{if(s++>10){if(!i)throw new Error("too many ID collisions, use more bits");t+=i}var a=e(t,n)}while(Object.hasOwnProperty.call(o,a));return o[a]=r,a},o=r.hats={};return r.get=function(t){return r.hats[t]},r.set=function(t,e){return r.hats[t]=e,r},r.bits=t||128,r.base=n||16,r}})),ht=function(t,e){this.ctx=t,this.properties=e.properties||{},this.coordinates=e.geometry.coordinates,this.id=e.id||ut(),this.type=e.geometry.type};ht.prototype.changed=function(){this.ctx.store.featureChanged(this.id)},ht.prototype.incomingCoords=function(t){this.setCoordinates(t)},ht.prototype.setCoordinates=function(t){this.coordinates=t,this.changed()},ht.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.coordinates))},ht.prototype.setProperty=function(t,e){this.properties[t]=e},ht.prototype.toGeoJSON=function(){return JSON.parse(JSON.stringify({id:this.id,type:B,properties:this.properties,geometry:{coordinates:this.getCoordinates(),type:this.type}}))},ht.prototype.internal=function(t){var e={id:this.id,meta:W,"meta:type":this.type,active:J,mode:t};if(this.ctx.options.userProperties)for(var n in this.properties)e["user_"+n]=this.properties[n];return{type:B,properties:e,geometry:{coordinates:this.getCoordinates(),type:this.type}}};var dt=function(t,e){ht.call(this,t,e)};(dt.prototype=Object.create(ht.prototype)).isValid=function(){return"number"==typeof this.coordinates[0]&&"number"==typeof this.coordinates[1]},dt.prototype.updateCoordinate=function(t,e,n){this.coordinates=3===arguments.length?[e,n]:[t,e],this.changed()},dt.prototype.getCoordinate=function(){return this.getCoordinates()};var At=function(t,e){ht.call(this,t,e)};(At.prototype=Object.create(ht.prototype)).isValid=function(){return this.coordinates.length>1},At.prototype.addCoordinate=function(t,e,n){this.changed();var i=parseInt(t,10);this.coordinates.splice(i,0,[e,n])},At.prototype.getCoordinate=function(t){var e=parseInt(t,10);return JSON.parse(JSON.stringify(this.coordinates[e]))},At.prototype.removeCoordinate=function(t){this.changed(),this.coordinates.splice(parseInt(t,10),1)},At.prototype.updateCoordinate=function(t,e,n){var i=parseInt(t,10);this.coordinates[i]=[e,n],this.changed()};var pt=function(t,e){ht.call(this,t,e),this.coordinates=this.coordinates.map((function(t){return t.slice(0,-1)}))};(pt.prototype=Object.create(ht.prototype)).isValid=function(){return 0!==this.coordinates.length&&this.coordinates.every((function(t){return t.length>2}))},pt.prototype.incomingCoords=function(t){this.coordinates=t.map((function(t){return t.slice(0,-1)})),this.changed()},pt.prototype.setCoordinates=function(t){this.coordinates=t,this.changed()},pt.prototype.addCoordinate=function(t,e,n){this.changed();var i=t.split(".").map((function(t){return parseInt(t,10)}));this.coordinates[i[0]].splice(i[1],0,[e,n])},pt.prototype.removeCoordinate=function(t){this.changed();var e=t.split(".").map((function(t){return parseInt(t,10)})),n=this.coordinates[e[0]];n&&(n.splice(e[1],1),n.length<3&&this.coordinates.splice(e[0],1))},pt.prototype.getCoordinate=function(t){var e=t.split(".").map((function(t){return parseInt(t,10)})),n=this.coordinates[e[0]];return JSON.parse(JSON.stringify(n[e[1]]))},pt.prototype.getCoordinates=function(){return this.coordinates.map((function(t){return t.concat([t[0]])}))},pt.prototype.updateCoordinate=function(t,e,n){this.changed();var i=t.split("."),r=parseInt(i[0],10),o=parseInt(i[1],10);void 0===this.coordinates[r]&&(this.coordinates[r]=[]),this.coordinates[r][o]=[e,n]};var ft={MultiPoint:dt,MultiLineString:At,MultiPolygon:pt},gt=function(t,e,n,i,r){var o=n.split("."),s=parseInt(o[0],10),a=o[1]?o.slice(1).join("."):null;return t[s][e](a,i,r)},mt=function(t,e){if(ht.call(this,t,e),delete this.coordinates,this.model=ft[e.geometry.type],void 0===this.model)throw new TypeError(e.geometry.type+" is not a valid type");this.features=this._coordinatesToFeatures(e.geometry.coordinates)};function _t(t){this.map=t.map,this.drawConfig=JSON.parse(JSON.stringify(t.options||{})),this._ctx=t}(mt.prototype=Object.create(ht.prototype))._coordinatesToFeatures=function(t){var e=this,n=this.model.bind(this);return t.map((function(t){return new n(e.ctx,{id:ut(),type:B,properties:{},geometry:{coordinates:t,type:e.type.replace("Multi","")}})}))},mt.prototype.isValid=function(){return this.features.every((function(t){return t.isValid()}))},mt.prototype.setCoordinates=function(t){this.features=this._coordinatesToFeatures(t),this.changed()},mt.prototype.getCoordinate=function(t){return gt(this.features,"getCoordinate",t)},mt.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.features.map((function(t){return t.type===S?t.getCoordinates():t.coordinates}))))},mt.prototype.updateCoordinate=function(t,e,n){gt(this.features,"updateCoordinate",t,e,n),this.changed()},mt.prototype.addCoordinate=function(t,e,n){gt(this.features,"addCoordinate",t,e,n),this.changed()},mt.prototype.removeCoordinate=function(t){gt(this.features,"removeCoordinate",t),this.changed()},mt.prototype.getFeatures=function(){return this.features},_t.prototype.setSelected=function(t){return this._ctx.store.setSelected(t)},_t.prototype.setSelectedCoordinates=function(t){var e=this;this._ctx.store.setSelectedCoordinates(t),t.reduce((function(t,n){return void 0===t[n.feature_id]&&(t[n.feature_id]=!0,e._ctx.store.get(n.feature_id).changed()),t}),{})},_t.prototype.getSelected=function(){return this._ctx.store.getSelected()},_t.prototype.getSelectedIds=function(){return this._ctx.store.getSelectedIds()},_t.prototype.isSelected=function(t){return this._ctx.store.isSelected(t)},_t.prototype.getFeature=function(t){return this._ctx.store.get(t)},_t.prototype.select=function(t){return this._ctx.store.select(t)},_t.prototype.deselect=function(t){return this._ctx.store.deselect(t)},_t.prototype.deleteFeature=function(t,e){return void 0===e&&(e={}),this._ctx.store.delete(t,e)},_t.prototype.addFeature=function(t){return this._ctx.store.add(t)},_t.prototype.clearSelectedFeatures=function(){return this._ctx.store.clearSelected()},_t.prototype.clearSelectedCoordinates=function(){return this._ctx.store.clearSelectedCoordinates()},_t.prototype.setActionableState=function(t){void 0===t&&(t={});var e={trash:t.trash||!1,combineFeatures:t.combineFeatures||!1,uncombineFeatures:t.uncombineFeatures||!1};return this._ctx.events.actionable(e)},_t.prototype.changeMode=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),this._ctx.events.changeMode(t,e,n)},_t.prototype.updateUIClasses=function(t){return this._ctx.ui.queueMapClasses(t)},_t.prototype.activateUIButton=function(t){return this._ctx.ui.setActiveButton(t)},_t.prototype.featuresAt=function(t,e,n){if(void 0===n&&(n="click"),"click"!==n&&"touch"!==n)throw new Error("invalid buffer type");return it[n](t,e,this._ctx)},_t.prototype.newFeature=function(t){var e=t.geometry.type;return e===T?new dt(this._ctx,t):e===M?new At(this._ctx,t):e===S?new pt(this._ctx,t):new mt(this._ctx,t)},_t.prototype.isInstanceOf=function(t,e){if(t===T)return e instanceof dt;if(t===M)return e instanceof At;if(t===S)return e instanceof pt;if("MultiFeature"===t)return e instanceof mt;throw new Error("Unknown feature class: "+t)},_t.prototype.doRender=function(t){return this._ctx.store.featureChanged(t)},_t.prototype.onSetup=function(){},_t.prototype.onDrag=function(){},_t.prototype.onClick=function(){},_t.prototype.onMouseMove=function(){},_t.prototype.onMouseDown=function(){},_t.prototype.onMouseUp=function(){},_t.prototype.onMouseOut=function(){},_t.prototype.onKeyUp=function(){},_t.prototype.onKeyDown=function(){},_t.prototype.onTouchStart=function(){},_t.prototype.onTouchMove=function(){},_t.prototype.onTouchEnd=function(){},_t.prototype.onTap=function(){},_t.prototype.onStop=function(){},_t.prototype.onTrash=function(){},_t.prototype.onCombineFeature=function(){},_t.prototype.onUncombineFeature=function(){},_t.prototype.toDisplayFeatures=function(){throw new Error("You must overwrite toDisplayFeatures")};var yt={drag:"onDrag",click:"onClick",mousemove:"onMouseMove",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseout:"onMouseOut",keyup:"onKeyUp",keydown:"onKeyDown",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",tap:"onTap"},vt=Object.keys(yt);function xt(t){var e=Object.keys(t);return function(n,i){void 0===i&&(i={});var r={},o=e.reduce((function(e,n){return e[n]=t[n],e}),new _t(n));return{start:function(){var e=this;r=o.onSetup(i),vt.forEach((function(n){var i,s=yt[n],a=function(){return!1};t[s]&&(a=function(){return!0}),e.on(n,a,(i=s,function(t){return o[i](r,t)}))}))},stop:function(){o.onStop(r)},trash:function(){o.onTrash(r)},combineFeatures:function(){o.onCombineFeatures(r)},uncombineFeatures:function(){o.onUncombineFeatures(r)},render:function(t,e){o.toDisplayFeatures(r,t,e)}}}}function bt(t){return[].concat(t).filter((function(t){return void 0!==t}))}function wt(){var t=this;if(!t.ctx.map||void 0===t.ctx.map.getSource(_))return l();var e=t.ctx.events.currentModeName();t.ctx.ui.queueMapClasses({mode:e});var n=[],i=[];t.isDirty?i=t.getAllIds():(n=t.getChangedIds().filter((function(e){return void 0!==t.get(e)})),i=t.sources.hot.filter((function(e){return e.properties.id&&-1===n.indexOf(e.properties.id)&&void 0!==t.get(e.properties.id)})).map((function(t){return t.properties.id}))),t.sources.hot=[];var r=t.sources.cold.length;t.sources.cold=t.isDirty?[]:t.sources.cold.filter((function(t){var e=t.properties.id||t.properties.parent;return-1===n.indexOf(e)}));var o=r!==t.sources.cold.length||i.length>0;function s(n,i){var r=t.get(n).internal(e);t.ctx.events.currentModeRender(r,(function(e){t.sources[i].push(e)}))}if(n.forEach((function(t){return s(t,"hot")})),i.forEach((function(t){return s(t,"cold")})),o&&t.ctx.map.getSource(y).setData({type:I,features:t.sources.cold}),t.ctx.map.getSource(_).setData({type:I,features:t.sources.hot}),t._emitSelectionChange&&(t.ctx.map.fire(k,{features:t.getSelected().map((function(t){return t.toGeoJSON()})),points:t.getSelectedCoordinates().map((function(t){return{type:B,properties:{},geometry:{type:T,coordinates:t.coordinates}}}))}),t._emitSelectionChange=!1),t._deletedFeaturesToEmit.length){var a=t._deletedFeaturesToEmit.map((function(t){return t.toGeoJSON()}));t._deletedFeaturesToEmit=[],t.ctx.map.fire(U,{features:a})}function l(){t.isDirty=!1,t.clearChangedIds()}l(),t.ctx.map.fire(G,{})}function Et(t){var e,n=this;this._features={},this._featureIds=new et,this._selectedFeatureIds=new et,this._selectedCoordinates=[],this._changedFeatureIds=new et,this._deletedFeaturesToEmit=[],this._emitSelectionChange=!1,this._mapInitialConfig={},this.ctx=t,this.sources={hot:[],cold:[]},this.render=function(){e||(e=requestAnimationFrame((function(){e=null,wt.call(n)})))},this.isDirty=!1}function Ct(t,e){var n=t._selectedCoordinates.filter((function(e){return t._selectedFeatureIds.has(e.feature_id)}));t._selectedCoordinates.length===n.length||e.silent||(t._emitSelectionChange=!0),t._selectedCoordinates=n}Et.prototype.createRenderBatch=function(){var t=this,e=this.render,n=0;return this.render=function(){n++},function(){t.render=e,n>0&&t.render()}},Et.prototype.setDirty=function(){return this.isDirty=!0,this},Et.prototype.featureChanged=function(t){return this._changedFeatureIds.add(t),this},Et.prototype.getChangedIds=function(){return this._changedFeatureIds.values()},Et.prototype.clearChangedIds=function(){return this._changedFeatureIds.clear(),this},Et.prototype.getAllIds=function(){return this._featureIds.values()},Et.prototype.add=function(t){return this.featureChanged(t.id),this._features[t.id]=t,this._featureIds.add(t.id),this},Et.prototype.delete=function(t,e){var n=this;return void 0===e&&(e={}),bt(t).forEach((function(t){n._featureIds.has(t)&&(n._featureIds.delete(t),n._selectedFeatureIds.delete(t),e.silent||-1===n._deletedFeaturesToEmit.indexOf(n._features[t])&&n._deletedFeaturesToEmit.push(n._features[t]),delete n._features[t],n.isDirty=!0)})),Ct(this,e),this},Et.prototype.get=function(t){return this._features[t]},Et.prototype.getAll=function(){var t=this;return Object.keys(this._features).map((function(e){return t._features[e]}))},Et.prototype.select=function(t,e){var n=this;return void 0===e&&(e={}),bt(t).forEach((function(t){n._selectedFeatureIds.has(t)||(n._selectedFeatureIds.add(t),n._changedFeatureIds.add(t),e.silent||(n._emitSelectionChange=!0))})),this},Et.prototype.deselect=function(t,e){var n=this;return void 0===e&&(e={}),bt(t).forEach((function(t){n._selectedFeatureIds.has(t)&&(n._selectedFeatureIds.delete(t),n._changedFeatureIds.add(t),e.silent||(n._emitSelectionChange=!0))})),Ct(this,e),this},Et.prototype.clearSelected=function(t){return void 0===t&&(t={}),this.deselect(this._selectedFeatureIds.values(),{silent:t.silent}),this},Et.prototype.setSelected=function(t,e){var n=this;return void 0===e&&(e={}),t=bt(t),this.deselect(this._selectedFeatureIds.values().filter((function(e){return-1===t.indexOf(e)})),{silent:e.silent}),this.select(t.filter((function(t){return!n._selectedFeatureIds.has(t)})),{silent:e.silent}),this},Et.prototype.setSelectedCoordinates=function(t){return this._selectedCoordinates=t,this._emitSelectionChange=!0,this},Et.prototype.clearSelectedCoordinates=function(){return this._selectedCoordinates=[],this._emitSelectionChange=!0,this},Et.prototype.getSelectedIds=function(){return this._selectedFeatureIds.values()},Et.prototype.getSelected=function(){var t=this;return this._selectedFeatureIds.values().map((function(e){return t.get(e)}))},Et.prototype.getSelectedCoordinates=function(){var t=this;return this._selectedCoordinates.map((function(e){return{coordinates:t.get(e.feature_id).getCoordinate(e.coord_path)}}))},Et.prototype.isSelected=function(t){return this._selectedFeatureIds.has(t)},Et.prototype.setFeatureProperty=function(t,e,n){this.get(t).setProperty(e,n),this.featureChanged(t)},Et.prototype.storeMapConfig=function(){var t=this;Y.forEach((function(e){t.ctx.map[e]&&(t._mapInitialConfig[e]=t.ctx.map[e].isEnabled())}))},Et.prototype.restoreMapConfig=function(){var t=this;Object.keys(this._mapInitialConfig).forEach((function(e){t._mapInitialConfig[e]?t.ctx.map[e].enable():t.ctx.map[e].disable()}))},Et.prototype.getInitialConfigValue=function(t){return void 0===this._mapInitialConfig[t]||this._mapInitialConfig[t]};var Bt=function(){for(var t=arguments,e={},n=0;n<arguments.length;n++){var i=t[n];for(var r in i)St.call(i,r)&&(e[r]=i[r])}return e},St=Object.prototype.hasOwnProperty,Mt=["mode","feature","mouse"];function Tt(e){var n=null,i=null,r={onRemove:function(){return e.map.off("load",r.connect),clearInterval(i),r.removeLayers(),e.store.restoreMapConfig(),e.ui.removeButtons(),e.events.removeEventListeners(),e.ui.clearMapClasses(),e.map=null,e.container=null,e.store=null,n&&n.parentNode&&n.parentNode.removeChild(n),n=null,this},connect:function(){e.map.off("load",r.connect),clearInterval(i),r.addLayers(),e.store.storeMapConfig(),e.events.addEventListeners()},onAdd:function(o){var s=o.fire;return o.fire=function(t,e){var n=arguments;return 1===s.length&&1!==arguments.length&&(n=[Bt({},{type:t},e)]),s.apply(o,n)},e.map=o,e.events=function(e){var n=Object.keys(e.options.modes).reduce((function(t,n){return t[n]=xt(e.options.modes[n]),t}),{}),i={},r={},o={},s=null,a=null;o.drag=function(t,n){n({point:t.point,time:(new Date).getTime()})?(e.ui.queueMapClasses({mouse:b}),a.drag(t)):t.originalEvent.stopPropagation()},o.mousedrag=function(t){o.drag(t,(function(t){return!at(i,t)}))},o.touchdrag=function(t){o.drag(t,(function(t){return!lt(r,t)}))},o.mousemove=function(t){if(1===(void 0!==t.originalEvent.buttons?t.originalEvent.buttons:t.originalEvent.which))return o.mousedrag(t);var n=ot(t,e);t.featureTarget=n,a.mousemove(t)},o.mousedown=function(t){i={time:(new Date).getTime(),point:t.point};var n=ot(t,e);t.featureTarget=n,a.mousedown(t)},o.mouseup=function(t){var n=ot(t,e);t.featureTarget=n,at(i,{point:t.point,time:(new Date).getTime()})?a.click(t):a.mouseup(t)},o.mouseout=function(t){a.mouseout(t)},o.touchstart=function(t){if(t.originalEvent.preventDefault(),e.options.touchEnabled){r={time:(new Date).getTime(),point:t.point};var n=it.touch(t,null,e)[0];t.featureTarget=n,a.touchstart(t)}},o.touchmove=function(t){if(t.originalEvent.preventDefault(),e.options.touchEnabled)return a.touchmove(t),o.touchdrag(t)},o.touchend=function(t){if(t.originalEvent.preventDefault(),e.options.touchEnabled){var n=it.touch(t,null,e)[0];t.featureTarget=n,lt(r,{time:(new Date).getTime(),point:t.point})?a.tap(t):a.touchend(t)}};var l=function(t){return!(8===t||46===t||t>=48&&t<=57)};function c(i,r,o){void 0===o&&(o={}),a.stop();var l=n[i];if(void 0===l)throw new Error(i+" is not valid");s=i;var c=l(e,r);a=t(c,e),o.silent||e.map.fire(z,{mode:i}),e.store.setDirty(),e.store.render()}o.keydown=function(t){"mapboxgl-canvas"===(t.srcElement||t.target).classList[0]&&(8!==t.keyCode&&46!==t.keyCode||!e.options.controls.trash?l(t.keyCode)?a.keydown(t):49===t.keyCode&&e.options.controls.point?c(D.DRAW_POINT):50===t.keyCode&&e.options.controls.line_string?c(D.DRAW_LINE_STRING):51===t.keyCode&&e.options.controls.polygon&&c(D.DRAW_POLYGON):(t.preventDefault(),a.trash()))},o.keyup=function(t){l(t.keyCode)&&a.keyup(t)},o.zoomend=function(){e.store.changeZoom()},o.data=function(t){if("style"===t.dataType){var n=e.setup,i=e.map,r=e.options,o=e.store;r.styles.some((function(t){return i.getLayer(t.id)}))||(n.addLayers(),o.setDirty(),o.render())}};var u={trash:!1,combineFeatures:!1,uncombineFeatures:!1};return{start:function(){s=e.options.defaultMode,a=t(n[s](e),e)},changeMode:c,actionable:function(t){var n=!1;Object.keys(t).forEach((function(e){if(void 0===u[e])throw new Error("Invalid action type");u[e]!==t[e]&&(n=!0),u[e]=t[e]})),n&&e.map.fire(Q,{actions:u})},currentModeName:function(){return s},currentModeRender:function(t,e){return a.render(t,e)},fire:function(t,e){o[t]&&o[t](e)},addEventListeners:function(){e.map.on("mousemove",o.mousemove),e.map.on("mousedown",o.mousedown),e.map.on("mouseup",o.mouseup),e.map.on("data",o.data),e.map.on("touchmove",o.touchmove),e.map.on("touchstart",o.touchstart),e.map.on("touchend",o.touchend),e.container.addEventListener("mouseout",o.mouseout),e.options.keybindings&&(e.container.addEventListener("keydown",o.keydown),e.container.addEventListener("keyup",o.keyup))},removeEventListeners:function(){e.map.off("mousemove",o.mousemove),e.map.off("mousedown",o.mousedown),e.map.off("mouseup",o.mouseup),e.map.off("data",o.data),e.map.off("touchmove",o.touchmove),e.map.off("touchstart",o.touchstart),e.map.off("touchend",o.touchend),e.container.removeEventListener("mouseout",o.mouseout),e.options.keybindings&&(e.container.removeEventListener("keydown",o.keydown),e.container.removeEventListener("keyup",o.keyup))},trash:function(t){a.trash(t)},combineFeatures:function(){a.combineFeatures()},uncombineFeatures:function(){a.uncombineFeatures()},getMode:function(){return s}}}(e),e.ui=function(t){var e={},n=null,i={mode:null,feature:null,mouse:null},r={mode:null,feature:null,mouse:null};function o(t){r=Bt(r,t)}function s(){var e,n;if(t.container){var o=[],s=[];Mt.forEach((function(t){r[t]!==i[t]&&(o.push(t+"-"+i[t]),null!==r[t]&&s.push(t+"-"+r[t]))})),o.length>0&&(e=t.container.classList).remove.apply(e,o),s.length>0&&(n=t.container.classList).add.apply(n,s),i=Bt(i,r)}}function m(t,e){void 0===e&&(e={});var i=document.createElement("button");return i.className=l+" "+e.className,i.setAttribute("title",e.title),e.container.appendChild(i),i.addEventListener("click",(function(i){if(i.preventDefault(),i.stopPropagation(),i.target===n)return _(),void e.onDeactivate();y(t),e.onActivate()}),!0),i}function _(){n&&(n.classList.remove(g),n=null)}function y(t){_();var i=e[t];i&&i&&"trash"!==t&&(i.classList.add(g),n=i)}return{setActiveButton:y,queueMapClasses:o,updateMapClasses:s,clearMapClasses:function(){o({mode:null,feature:null,mouse:null}),s()},addButtons:function(){var n=t.options.controls,i=document.createElement("div");return i.className=f+" "+a,n?(n[C.LINE]&&(e[C.LINE]=m(C.LINE,{container:i,className:c,title:"LineString tool "+(t.options.keybindings?"(l)":""),onActivate:function(){return t.events.changeMode(D.DRAW_LINE_STRING)},onDeactivate:function(){return t.events.trash()}})),n[C.POLYGON]&&(e[C.POLYGON]=m(C.POLYGON,{container:i,className:u,title:"Polygon tool "+(t.options.keybindings?"(p)":""),onActivate:function(){return t.events.changeMode(D.DRAW_POLYGON)},onDeactivate:function(){return t.events.trash()}})),n[C.POINT]&&(e[C.POINT]=m(C.POINT,{container:i,className:h,title:"Marker tool "+(t.options.keybindings?"(m)":""),onActivate:function(){return t.events.changeMode(D.DRAW_POINT)},onDeactivate:function(){return t.events.trash()}})),n.trash&&(e.trash=m("trash",{container:i,className:d,title:"Delete",onActivate:function(){t.events.trash()}})),n.combine_features&&(e.combine_features=m("combineFeatures",{container:i,className:A,title:"Combine",onActivate:function(){t.events.combineFeatures()}})),n.uncombine_features&&(e.uncombine_features=m("uncombineFeatures",{container:i,className:p,title:"Uncombine",onActivate:function(){t.events.uncombineFeatures()}})),i):i},removeButtons:function(){Object.keys(e).forEach((function(t){var n=e[t];n.parentNode&&n.parentNode.removeChild(n),delete e[t]}))}}}(e),e.container=o.getContainer(),e.store=new Et(e),n=e.ui.addButtons(),e.options.boxSelect&&(o.boxZoom.disable(),o.dragPan.disable(),o.dragPan.enable()),o.loaded()?r.connect():(o.on("load",r.connect),i=setInterval((function(){o.loaded()&&r.connect()}),16)),e.events.start(),n},addLayers:function(){e.map.addSource(y,{data:{type:I,features:[]},type:"geojson"}),e.map.addSource(_,{data:{type:I,features:[]},type:"geojson"}),e.options.styles.forEach((function(t){e.map.addLayer(t)})),e.store.setDirty(!0),e.store.render()},removeLayers:function(){e.options.styles.forEach((function(t){e.map.getLayer(t.id)&&e.map.removeLayer(t.id)})),e.map.getSource(y)&&e.map.removeSource(y),e.map.getSource(_)&&e.map.removeSource(_)}};return e.setup=r,r}function It(t){return function(e){var n=e.featureTarget;return!!n&&!!n.properties&&n.properties.meta===t}}function Lt(t){return!!t.featureTarget&&!!t.featureTarget.properties&&t.featureTarget.properties.active===q&&t.featureTarget.properties.meta===W}function Pt(t){return!!t.featureTarget&&!!t.featureTarget.properties&&t.featureTarget.properties.active===J&&t.featureTarget.properties.meta===W}function Ft(t){return void 0===t.featureTarget}function Rt(t){var e=t.featureTarget;return!!e&&!!e.properties&&e.properties.meta===K}function Dt(t){return!!t.originalEvent&&!0===t.originalEvent.shiftKey}function Ot(t){return 27===t.keyCode}function Ut(t){return 13===t.keyCode}var Nt=kt;function kt(t,e){this.x=t,this.y=e}function zt(t,e){var n=e.getBoundingClientRect();return new Nt(t.clientX-n.left-(e.clientLeft||0),t.clientY-n.top-(e.clientTop||0))}function Qt(t,e,n,i){return{type:B,properties:{meta:K,parent:t,coord_path:n,active:i?q:J},geometry:{type:T,coordinates:e}}}function Gt(t,e,n){void 0===e&&(e={}),void 0===n&&(n=null);var i,r=t.geometry,o=r.type,s=r.coordinates,a=t.properties&&t.properties.id,l=[];function c(t,n){var i="",r=null;t.forEach((function(t,o){var s=null!=n?n+"."+o:String(o),c=Qt(a,t,s,u(s));if(e.midpoints&&r){var h=function(t,e,n){var i=e.geometry.coordinates,r=n.geometry.coordinates;if(i[1]>85||i[1]<-85||r[1]>85||r[1]<-85)return null;var o={lng:(i[0]+r[0])/2,lat:(i[1]+r[1])/2};return{type:B,properties:{meta:X,parent:t,lng:o.lng,lat:o.lat,coord_path:n.properties.coord_path},geometry:{type:T,coordinates:[o.lng,o.lat]}}}(a,r,c);h&&l.push(h)}r=c;var d=JSON.stringify(t);i!==d&&l.push(c),0===o&&(i=d)}))}function u(t){return!!e.selectedPaths&&-1!==e.selectedPaths.indexOf(t)}return o===T?l.push(Qt(a,s,n,u(n))):o===S?s.forEach((function(t,e){c(t,null!==n?n+"."+e:String(e))})):o===M?c(s,n):0===o.indexOf(L)&&(i=o.replace(L,""),s.forEach((function(n,r){var o={type:B,properties:t.properties,geometry:{type:i,coordinates:n}};l=l.concat(Gt(o,e,r))}))),l}kt.prototype={clone:function(){return new kt(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,n=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=n,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),n=Math.sin(t),i=e*this.x-n*this.y,r=n*this.x+e*this.y;return this.x=i,this.y=r,this},_rotateAround:function(t,e){var n=Math.cos(t),i=Math.sin(t),r=e.x+n*(this.x-e.x)-i*(this.y-e.y),o=e.y+i*(this.x-e.x)+n*(this.y-e.y);return this.x=r,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},kt.convert=function(t){return t instanceof kt?t:Array.isArray(t)?new kt(t[0],t[1]):t};var Ht=function(t){setTimeout((function(){t.map&&t.map.doubleClickZoom&&t._ctx&&t._ctx.store&&t._ctx.store.getInitialConfigValue&&t._ctx.store.getInitialConfigValue("doubleClickZoom")&&t.map.doubleClickZoom.enable()}),0)},Vt=function(t){setTimeout((function(){t.map&&t.map.doubleClickZoom&&t.map.doubleClickZoom.disable()}),0)},jt=function(t){if(!t||!t.type)return null;var e=Zt[t.type];return e?"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featurecollection"===e?t:void 0:null},Zt={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featurecollection"};function Wt(t){switch(t&&t.type||null){case"FeatureCollection":return t.features=t.features.reduce((function(t,e){return t.concat(Wt(e))}),[]),t;case"Feature":return t.geometry?Wt(t.geometry).map((function(e){var n={type:"Feature",properties:JSON.parse(JSON.stringify(t.properties)),geometry:e};return void 0!==t.id&&(n.id=t.id),n})):[t];case"MultiPoint":return t.coordinates.map((function(t){return{type:"Point",coordinates:t}}));case"MultiPolygon":return t.coordinates.map((function(t){return{type:"Polygon",coordinates:t}}));case"MultiLineString":return t.coordinates.map((function(t){return{type:"LineString",coordinates:t}}));case"GeometryCollection":return t.geometries.map(Wt).reduce((function(t,e){return t.concat(e)}),[]);case"Point":case"Polygon":case"LineString":return[t]}}var Xt=function(t){if(!t)return[];var e=Wt(jt(t)),n=[];return e.features.forEach((function(t){t.geometry&&(n=n.concat(function t(e){return Array.isArray(e)&&e.length&&"number"==typeof e[0]?[e]:e.reduce((function(e,n){return Array.isArray(n)&&Array.isArray(n[0])?e.concat(t(n)):(e.push(n),e)}),[])}(t.geometry.coordinates)))})),n},Kt=ct((function(t){var e=t.exports=function(t){return new n(t)};function n(t){this.value=t}function i(t,e,n){var i=[],s=[],u=!0;return function t(h){var d=n?r(h):h,A={},p=!0,f={node:d,node_:h,path:[].concat(i),parent:s[s.length-1],parents:s,key:i.slice(-1)[0],isRoot:0===i.length,level:i.length,circular:null,update:function(t,e){f.isRoot||(f.parent.node[f.key]=t),f.node=t,e&&(p=!1)},delete:function(t){delete f.parent.node[f.key],t&&(p=!1)},remove:function(t){a(f.parent.node)?f.parent.node.splice(f.key,1):delete f.parent.node[f.key],t&&(p=!1)},keys:null,before:function(t){A.before=t},after:function(t){A.after=t},pre:function(t){A.pre=t},post:function(t){A.post=t},stop:function(){u=!1},block:function(){p=!1}};if(!u)return f;function g(){if("object"==typeof f.node&&null!==f.node){f.keys&&f.node_===f.node||(f.keys=o(f.node)),f.isLeaf=0==f.keys.length;for(var t=0;t<s.length;t++)if(s[t].node_===h){f.circular=s[t];break}}else f.isLeaf=!0,f.keys=null;f.notLeaf=!f.isLeaf,f.notRoot=!f.isRoot}g();var m=e.call(f,f.node);return void 0!==m&&f.update&&f.update(m),A.before&&A.before.call(f,f.node),p?("object"!=typeof f.node||null===f.node||f.circular||(s.push(f),g(),l(f.keys,(function(e,r){i.push(e),A.pre&&A.pre.call(f,f.node[e],e);var o=t(f.node[e]);n&&c.call(f.node,e)&&(f.node[e]=o.node),o.isLast=r==f.keys.length-1,o.isFirst=0==r,A.post&&A.post.call(f,o),i.pop()})),s.pop()),A.after&&A.after.call(f,f.node),f):f}(t).node}function r(t){if("object"==typeof t&&null!==t){var e;if(a(t))e=[];else if("[object Date]"===s(t))e=new Date(t.getTime?t.getTime():t);else if(function(t){return"[object RegExp]"===s(t)}(t))e=new RegExp(t);else if(function(t){return"[object Error]"===s(t)}(t))e={message:t.message};else if(function(t){return"[object Boolean]"===s(t)}(t))e=new Boolean(t);else if(function(t){return"[object Number]"===s(t)}(t))e=new Number(t);else if(function(t){return"[object String]"===s(t)}(t))e=new String(t);else if(Object.create&&Object.getPrototypeOf)e=Object.create(Object.getPrototypeOf(t));else if(t.constructor===Object)e={};else{var n=t.constructor&&t.constructor.prototype||t.__proto__||{},i=function(){};i.prototype=n,e=new i}return l(o(t),(function(n){e[n]=t[n]})),e}return t}n.prototype.get=function(t){for(var e=this.value,n=0;n<t.length;n++){var i=t[n];if(!e||!c.call(e,i)){e=void 0;break}e=e[i]}return e},n.prototype.has=function(t){for(var e=this.value,n=0;n<t.length;n++){var i=t[n];if(!e||!c.call(e,i))return!1;e=e[i]}return!0},n.prototype.set=function(t,e){for(var n=this.value,i=0;i<t.length-1;i++){var r=t[i];c.call(n,r)||(n[r]={}),n=n[r]}return n[t[i]]=e,e},n.prototype.map=function(t){return i(this.value,t,!0)},n.prototype.forEach=function(t){return this.value=i(this.value,t,!1),this.value},n.prototype.reduce=function(t,e){var n=1===arguments.length,i=n?this.value:e;return this.forEach((function(e){this.isRoot&&n||(i=t.call(this,i,e))})),i},n.prototype.paths=function(){var t=[];return this.forEach((function(e){t.push(this.path)})),t},n.prototype.nodes=function(){var t=[];return this.forEach((function(e){t.push(this.node)})),t},n.prototype.clone=function(){var t=[],e=[];return function n(i){for(var s=0;s<t.length;s++)if(t[s]===i)return e[s];if("object"==typeof i&&null!==i){var a=r(i);return t.push(i),e.push(a),l(o(i),(function(t){a[t]=n(i[t])})),t.pop(),e.pop(),a}return i}(this.value)};var o=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};function s(t){return Object.prototype.toString.call(t)}var a=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},l=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)};l(o(n.prototype),(function(t){e[t]=function(e){var i=[].slice.call(arguments,1),r=new n(e);return r[t].apply(r,i)}}));var c=Object.hasOwnProperty||function(t,e){return e in t}})),qt=Jt;function Jt(t){if(!(this instanceof Jt))return new Jt(t);this._bbox=t||[1/0,1/0,-1/0,-1/0],this._valid=!!t}Jt.prototype.include=function(t){return this._valid=!0,this._bbox[0]=Math.min(this._bbox[0],t[0]),this._bbox[1]=Math.min(this._bbox[1],t[1]),this._bbox[2]=Math.max(this._bbox[2],t[0]),this._bbox[3]=Math.max(this._bbox[3],t[1]),this},Jt.prototype.equals=function(t){var e;return e=t instanceof Jt?t.bbox():t,this._bbox[0]==e[0]&&this._bbox[1]==e[1]&&this._bbox[2]==e[2]&&this._bbox[3]==e[3]},Jt.prototype.center=function(t){return this._valid?[(this._bbox[0]+this._bbox[2])/2,(this._bbox[1]+this._bbox[3])/2]:null},Jt.prototype.union=function(t){var e;return this._valid=!0,e=t instanceof Jt?t.bbox():t,this._bbox[0]=Math.min(this._bbox[0],e[0]),this._bbox[1]=Math.min(this._bbox[1],e[1]),this._bbox[2]=Math.max(this._bbox[2],e[2]),this._bbox[3]=Math.max(this._bbox[3],e[3]),this},Jt.prototype.bbox=function(){return this._valid?this._bbox:null},Jt.prototype.contains=function(t){if(!t)return this._fastContains();if(!this._valid)return null;var e=t[0],n=t[1];return this._bbox[0]<=e&&this._bbox[1]<=n&&this._bbox[2]>=e&&this._bbox[3]>=n},Jt.prototype.intersect=function(t){return this._valid?(e=t instanceof Jt?t.bbox():t,!(this._bbox[0]>e[2]||this._bbox[2]<e[0]||this._bbox[3]<e[1]||this._bbox[1]>e[3])):null;var e},Jt.prototype._fastContains=function(){if(!this._valid)return new Function("return null;");var t="return "+this._bbox[0]+"<= ll[0] &&"+this._bbox[1]+"<= ll[1] &&"+this._bbox[2]+">= ll[0] &&"+this._bbox[3]+">= ll[1]";return new Function("ll",t)},Jt.prototype.polygon=function(){return this._valid?{type:"Polygon",coordinates:[[[this._bbox[0],this._bbox[1]],[this._bbox[2],this._bbox[1]],[this._bbox[2],this._bbox[3]],[this._bbox[0],this._bbox[3]],[this._bbox[0],this._bbox[1]]]]}:null};var Yt={features:["FeatureCollection"],coordinates:["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],geometry:["Feature"],geometries:["GeometryCollection"]},$t=Object.keys(Yt),te=function(t){return ee(t).bbox()};function ee(t){for(var e=qt(),n=Xt(t),i=0;i<n.length;i++)e.include(n[i]);return e}function ne(t,e){var n=-90,i=90,r=-90,o=90,s=270,a=-270;t.forEach((function(t){var e=te(t),l=e[1],c=e[3],u=e[0],h=e[2];l>n&&(n=l),c<i&&(i=c),c>r&&(r=c),l<o&&(o=l),u<s&&(s=u),h>a&&(a=h)}));var l=e;return n+l.lat>85&&(l.lat=85-n),r+l.lat>90&&(l.lat=90-r),i+l.lat<-85&&(l.lat=-85-i),o+l.lat<-90&&(l.lat=-90-o),s+l.lng<=-270&&(l.lng+=360*Math.ceil(Math.abs(l.lng)/360)),a+l.lng>=270&&(l.lng-=360*Math.ceil(Math.abs(l.lng)/360)),l}function ie(t,e){var n=ne(t.map((function(t){return t.toGeoJSON()})),e);t.forEach((function(t){var e,i=t.getCoordinates(),r=function(t){var e={lng:t[0]+n.lng,lat:t[1]+n.lat};return[e.lng,e.lat]},o=function(t){return t.map((function(t){return r(t)}))};t.type===T?e=r(i):t.type===M||t.type===P?e=i.map(r):t.type===S||t.type===F?e=i.map(o):t.type===R&&(e=i.map((function(t){return t.map((function(t){return o(t)}))}))),t.incomingCoords(e)}))}te.polygon=function(t){return ee(t).polygon()},te.bboxify=function(t){return Kt(t).map((function(t){t&&$t.some((function(e){return!!t[e]&&-1!==Yt[e].indexOf(t.type)}))&&(t.bbox=ee(t).bbox(),this.update(t))}))};var re={onSetup:function(t){var e=this,n={dragMoveLocation:null,boxSelectStartLocation:null,boxSelectElement:void 0,boxSelecting:!1,canBoxSelect:!1,dragMoving:!1,canDragMove:!1,initiallySelectedFeatureIds:t.featureIds||[]};return this.setSelected(n.initiallySelectedFeatureIds.filter((function(t){return void 0!==e.getFeature(t)}))),this.fireActionable(),this.setActionableState({combineFeatures:!0,uncombineFeatures:!0,trash:!0}),n},fireUpdate:function(){this.map.fire(N,{action:j,features:this.getSelected().map((function(t){return t.toGeoJSON()}))})},fireActionable:function(){var t=this,e=this.getSelected(),n=e.filter((function(e){return t.isInstanceOf("MultiFeature",e)})),i=!1;if(e.length>1){i=!0;var r=e[0].type.replace("Multi","");e.forEach((function(t){t.type.replace("Multi","")!==r&&(i=!1)}))}var o=n.length>0,s=e.length>0;this.setActionableState({combineFeatures:i,uncombineFeatures:o,trash:s})},getUniqueIds:function(t){return t.length?t.map((function(t){return t.properties.id})).filter((function(t){return void 0!==t})).reduce((function(t,e){return t.add(e),t}),new et).values():[]},stopExtendedInteractions:function(t){t.boxSelectElement&&(t.boxSelectElement.parentNode&&t.boxSelectElement.parentNode.removeChild(t.boxSelectElement),t.boxSelectElement=null),this.map.dragPan.enable(),t.boxSelecting=!1,t.canBoxSelect=!1,t.dragMoving=!1,t.canDragMove=!1},onStop:function(){Ht(this)},onMouseMove:function(t){return this.stopExtendedInteractions(t),!0},onMouseOut:function(t){return!t.dragMoving||this.fireUpdate()}};re.onTap=re.onClick=function(t,e){return Ft(e)?this.clickAnywhere(t,e):It(K)(e)?this.clickOnVertex(t,e):function(t){return!!t.featureTarget&&!!t.featureTarget.properties&&t.featureTarget.properties.meta===W}(e)?this.clickOnFeature(t,e):void 0},re.clickAnywhere=function(t){var e=this,n=this.getSelectedIds();n.length&&(this.clearSelectedFeatures(),n.forEach((function(t){return e.doRender(t)}))),Ht(this),this.stopExtendedInteractions(t)},re.clickOnVertex=function(t,e){this.changeMode(D.DIRECT_SELECT,{featureId:e.featureTarget.properties.parent,coordPath:e.featureTarget.properties.coord_path,startPos:e.lngLat}),this.updateUIClasses({mouse:x})},re.startOnActiveFeature=function(t,e){this.stopExtendedInteractions(t),this.map.dragPan.disable(),this.doRender(e.featureTarget.properties.id),t.canDragMove=!0,t.dragMoveLocation=e.lngLat},re.clickOnFeature=function(t,e){var n=this;Vt(this),this.stopExtendedInteractions(t);var i=Dt(e),r=this.getSelectedIds(),o=e.featureTarget.properties.id,s=this.isSelected(o);if(!i&&s&&this.getFeature(o).type!==T)return this.changeMode(D.DIRECT_SELECT,{featureId:o});s&&i?(this.deselect(o),this.updateUIClasses({mouse:w}),1===r.length&&Ht(this)):!s&&i?(this.select(o),this.updateUIClasses({mouse:x})):s||i||(r.forEach((function(t){return n.doRender(t)})),this.setSelected(o),this.updateUIClasses({mouse:x})),this.doRender(o)},re.onMouseDown=function(t,e){return Lt(e)?this.startOnActiveFeature(t,e):this.drawConfig.boxSelect&&function(t){return!!t.originalEvent&&!!t.originalEvent.shiftKey&&0===t.originalEvent.button}(e)?this.startBoxSelect(t,e):void 0},re.startBoxSelect=function(t,e){this.stopExtendedInteractions(t),this.map.dragPan.disable(),t.boxSelectStartLocation=zt(e.originalEvent,this.map.getContainer()),t.canBoxSelect=!0},re.onTouchStart=function(t,e){if(Lt(e))return this.startOnActiveFeature(t,e)},re.onDrag=function(t,e){return t.canDragMove?this.dragMove(t,e):this.drawConfig.boxSelect&&t.canBoxSelect?this.whileBoxSelect(t,e):void 0},re.whileBoxSelect=function(t,e){t.boxSelecting=!0,this.updateUIClasses({mouse:v}),t.boxSelectElement||(t.boxSelectElement=document.createElement("div"),t.boxSelectElement.classList.add(m),this.map.getContainer().appendChild(t.boxSelectElement));var n=zt(e.originalEvent,this.map.getContainer()),i=Math.min(t.boxSelectStartLocation.x,n.x),r=Math.max(t.boxSelectStartLocation.x,n.x),o=Math.min(t.boxSelectStartLocation.y,n.y),s=Math.max(t.boxSelectStartLocation.y,n.y),a="translate("+i+"px, "+o+"px)";t.boxSelectElement.style.transform=a,t.boxSelectElement.style.WebkitTransform=a,t.boxSelectElement.style.width=r-i+"px",t.boxSelectElement.style.height=s-o+"px"},re.dragMove=function(t,e){t.dragMoving=!0,e.originalEvent.stopPropagation();var n={lng:e.lngLat.lng-t.dragMoveLocation.lng,lat:e.lngLat.lat-t.dragMoveLocation.lat};ie(this.getSelected(),n),t.dragMoveLocation=e.lngLat},re.onMouseUp=function(t,e){var n=this;if(t.dragMoving)this.fireUpdate();else if(t.boxSelecting){var i=[t.boxSelectStartLocation,zt(e.originalEvent,this.map.getContainer())],r=this.featuresAt(null,i,"click"),o=this.getUniqueIds(r).filter((function(t){return!n.isSelected(t)}));o.length&&(this.select(o),o.forEach((function(t){return n.doRender(t)})),this.updateUIClasses({mouse:x}))}this.stopExtendedInteractions(t)},re.toDisplayFeatures=function(t,e,n){e.properties.active=this.isSelected(e.properties.id)?q:J,n(e),this.fireActionable(),e.properties.active===q&&e.geometry.type!==T&&Gt(e).forEach(n)},re.onTrash=function(){this.deleteFeature(this.getSelectedIds()),this.fireActionable()},re.onCombineFeatures=function(){var t=this.getSelected();if(!(0===t.length||t.length<2)){for(var e=[],n=[],i=t[0].type.replace("Multi",""),r=0;r<t.length;r++){var o=t[r];if(o.type.replace("Multi","")!==i)return;o.type.includes("Multi")?o.getCoordinates().forEach((function(t){e.push(t)})):e.push(o.getCoordinates()),n.push(o.toGeoJSON())}if(n.length>1){var s=this.newFeature({type:B,properties:n[0].properties,geometry:{type:"Multi"+i,coordinates:e}});this.addFeature(s),this.deleteFeature(this.getSelectedIds(),{silent:!0}),this.setSelected([s.id]),this.map.fire(H,{createdFeatures:[s.toGeoJSON()],deletedFeatures:n})}this.fireActionable()}},re.onUncombineFeatures=function(){var t=this,e=this.getSelected();if(0!==e.length){for(var n=[],i=[],r=function(r){var o=e[r];t.isInstanceOf("MultiFeature",o)&&(o.getFeatures().forEach((function(e){t.addFeature(e),e.properties=o.properties,n.push(e.toGeoJSON()),t.select([e.id])})),t.deleteFeature(o.id,{silent:!0}),i.push(o.toGeoJSON()))},o=0;o<e.length;o++)r(o);n.length>1&&this.map.fire(V,{createdFeatures:n,deletedFeatures:i}),this.fireActionable()}};var oe=It(K),se=It(X),ae={fireUpdate:function(){this.map.fire(N,{action:Z,features:this.getSelected().map((function(t){return t.toGeoJSON()}))})},fireActionable:function(t){this.setActionableState({combineFeatures:!1,uncombineFeatures:!1,trash:t.selectedCoordPaths.length>0})},startDragging:function(t,e){this.map.dragPan.disable(),t.canDragMove=!0,t.dragMoveLocation=e.lngLat},stopDragging:function(t){this.map.dragPan.enable(),t.dragMoving=!1,t.canDragMove=!1,t.dragMoveLocation=null},onVertex:function(t,e){this.startDragging(t,e);var n=e.featureTarget.properties,i=t.selectedCoordPaths.indexOf(n.coord_path);Dt(e)||-1!==i?Dt(e)&&-1===i&&t.selectedCoordPaths.push(n.coord_path):t.selectedCoordPaths=[n.coord_path];var r=this.pathsToCoordinates(t.featureId,t.selectedCoordPaths);this.setSelectedCoordinates(r)},onMidpoint:function(t,e){this.startDragging(t,e);var n=e.featureTarget.properties;t.feature.addCoordinate(n.coord_path,n.lng,n.lat),this.fireUpdate(),t.selectedCoordPaths=[n.coord_path]},pathsToCoordinates:function(t,e){return e.map((function(e){return{feature_id:t,coord_path:e}}))},onFeature:function(t,e){0===t.selectedCoordPaths.length?this.startDragging(t,e):this.stopDragging(t)},dragFeature:function(t,e,n){ie(this.getSelected(),n),t.dragMoveLocation=e.lngLat},dragVertex:function(t,e,n){for(var i=t.selectedCoordPaths.map((function(e){return t.feature.getCoordinate(e)})),r=ne(i.map((function(t){return{type:B,properties:{},geometry:{type:T,coordinates:t}}})),n),o=0;o<i.length;o++){var s=i[o];t.feature.updateCoordinate(t.selectedCoordPaths[o],s[0]+r.lng,s[1]+r.lat)}},clickNoTarget:function(){this.changeMode(D.SIMPLE_SELECT)},clickInactive:function(){this.changeMode(D.SIMPLE_SELECT)},clickActiveFeature:function(t){t.selectedCoordPaths=[],this.clearSelectedCoordinates(),t.feature.changed()},onSetup:function(t){var e=t.featureId,n=this.getFeature(e);if(!n)throw new Error("You must provide a featureId to enter direct_select mode");if(n.type===T)throw new TypeError("direct_select mode doesn't handle point features");var i={featureId:e,feature:n,dragMoveLocation:t.startPos||null,dragMoving:!1,canDragMove:!1,selectedCoordPaths:t.coordPath?[t.coordPath]:[]};return this.setSelectedCoordinates(this.pathsToCoordinates(e,i.selectedCoordPaths)),this.setSelected(e),Vt(this),this.setActionableState({trash:!0}),i},onStop:function(){Ht(this),this.clearSelectedCoordinates()},toDisplayFeatures:function(t,e,n){t.featureId===e.properties.id?(e.properties.active=q,n(e),Gt(e,{map:this.map,midpoints:!0,selectedPaths:t.selectedCoordPaths}).forEach(n)):(e.properties.active=J,n(e)),this.fireActionable(t)},onTrash:function(t){t.selectedCoordPaths.sort((function(t,e){return e.localeCompare(t,"en",{numeric:!0})})).forEach((function(e){return t.feature.removeCoordinate(e)})),this.fireUpdate(),t.selectedCoordPaths=[],this.clearSelectedCoordinates(),this.fireActionable(t),!1===t.feature.isValid()&&(this.deleteFeature([t.featureId]),this.changeMode(D.SIMPLE_SELECT,{}))},onMouseMove:function(t,e){var n=Lt(e),i=oe(e),r=0===t.selectedCoordPaths.length;return n&&r||i&&!r?this.updateUIClasses({mouse:x}):this.updateUIClasses({mouse:E}),this.stopDragging(t),!0},onMouseOut:function(t){return t.dragMoving&&this.fireUpdate(),!0}};ae.onTouchStart=ae.onMouseDown=function(t,e){return oe(e)?this.onVertex(t,e):Lt(e)?this.onFeature(t,e):se(e)?this.onMidpoint(t,e):void 0},ae.onDrag=function(t,e){if(!0===t.canDragMove){t.dragMoving=!0,e.originalEvent.stopPropagation();var n={lng:e.lngLat.lng-t.dragMoveLocation.lng,lat:e.lngLat.lat-t.dragMoveLocation.lat};t.selectedCoordPaths.length>0?this.dragVertex(t,e,n):this.dragFeature(t,e,n),t.dragMoveLocation=e.lngLat}},ae.onClick=function(t,e){return Ft(e)?this.clickNoTarget(t,e):Lt(e)?this.clickActiveFeature(t,e):Pt(e)?this.clickInactive(t,e):void this.stopDragging(t)},ae.onTap=function(t,e){return Ft(e)?this.clickNoTarget(t,e):Lt(e)?this.clickActiveFeature(t,e):Pt(e)?this.clickInactive(t,e):void 0},ae.onTouchEnd=ae.onMouseUp=function(t){t.dragMoving&&this.fireUpdate(),this.stopDragging(t)};var le={};function ce(t,e){return!!t.lngLat&&t.lngLat.lng===e[0]&&t.lngLat.lat===e[1]}le.onSetup=function(){var t=this.newFeature({type:B,properties:{},geometry:{type:T,coordinates:[]}});return this.addFeature(t),this.clearSelectedFeatures(),this.updateUIClasses({mouse:v}),this.activateUIButton(C.POINT),this.setActionableState({trash:!0}),{point:t}},le.stopDrawingAndRemove=function(t){this.deleteFeature([t.point.id],{silent:!0}),this.changeMode(D.SIMPLE_SELECT)},le.onTap=le.onClick=function(t,e){this.updateUIClasses({mouse:x}),t.point.updateCoordinate("",e.lngLat.lng,e.lngLat.lat),this.map.fire(O,{features:[t.point.toGeoJSON()]}),this.changeMode(D.SIMPLE_SELECT,{featureIds:[t.point.id]})},le.onStop=function(t){this.activateUIButton(),t.point.getCoordinate().length||this.deleteFeature([t.point.id],{silent:!0})},le.toDisplayFeatures=function(t,e,n){var i=e.properties.id===t.point.id;if(e.properties.active=i?q:J,!i)return n(e)},le.onTrash=le.stopDrawingAndRemove,le.onKeyUp=function(t,e){if(Ot(e)||Ut(e))return this.stopDrawingAndRemove(t,e)};var ue={onSetup:function(){var t=this.newFeature({type:B,properties:{},geometry:{type:S,coordinates:[[]]}});return this.addFeature(t),this.clearSelectedFeatures(),Vt(this),this.updateUIClasses({mouse:v}),this.activateUIButton(C.POLYGON),this.setActionableState({trash:!0}),{polygon:t,currentVertexPosition:0}},clickAnywhere:function(t,e){if(t.currentVertexPosition>0&&ce(e,t.polygon.coordinates[0][t.currentVertexPosition-1]))return this.changeMode(D.SIMPLE_SELECT,{featureIds:[t.polygon.id]});this.updateUIClasses({mouse:v}),t.polygon.updateCoordinate("0."+t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),t.currentVertexPosition++,t.polygon.updateCoordinate("0."+t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat)},clickOnVertex:function(t){return this.changeMode(D.SIMPLE_SELECT,{featureIds:[t.polygon.id]})},onMouseMove:function(t,e){t.polygon.updateCoordinate("0."+t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),Rt(e)&&this.updateUIClasses({mouse:w})}};ue.onTap=ue.onClick=function(t,e){return Rt(e)?this.clickOnVertex(t,e):this.clickAnywhere(t,e)},ue.onKeyUp=function(t,e){Ot(e)?(this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(D.SIMPLE_SELECT)):Ut(e)&&this.changeMode(D.SIMPLE_SELECT,{featureIds:[t.polygon.id]})},ue.onStop=function(t){this.updateUIClasses({mouse:E}),Ht(this),this.activateUIButton(),void 0!==this.getFeature(t.polygon.id)&&(t.polygon.removeCoordinate("0."+t.currentVertexPosition),t.polygon.isValid()?this.map.fire(O,{features:[t.polygon.toGeoJSON()]}):(this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(D.SIMPLE_SELECT,{},{silent:!0})))},ue.toDisplayFeatures=function(t,e,n){var i=e.properties.id===t.polygon.id;if(e.properties.active=i?q:J,!i)return n(e);if(0!==e.geometry.coordinates.length){var r=e.geometry.coordinates[0].length;if(!(r<3)){if(e.properties.meta=W,n(Qt(t.polygon.id,e.geometry.coordinates[0][0],"0.0",!1)),r>3){var o=e.geometry.coordinates[0].length-3;n(Qt(t.polygon.id,e.geometry.coordinates[0][o],"0."+o,!1))}if(r<=4){var s=[[e.geometry.coordinates[0][0][0],e.geometry.coordinates[0][0][1]],[e.geometry.coordinates[0][1][0],e.geometry.coordinates[0][1][1]]];if(n({type:B,properties:e.properties,geometry:{coordinates:s,type:M}}),3===r)return}return n(e)}}},ue.onTrash=function(t){this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(D.SIMPLE_SELECT)};var he={onSetup:function(t){var e,n,i=(t=t||{}).featureId,r="forward";if(i){if(!(e=this.getFeature(i)))throw new Error("Could not find a feature with the provided featureId");var o=t.from;if(o&&"Feature"===o.type&&o.geometry&&"Point"===o.geometry.type&&(o=o.geometry),o&&"Point"===o.type&&o.coordinates&&2===o.coordinates.length&&(o=o.coordinates),!o||!Array.isArray(o))throw new Error("Please use the `from` property to indicate which point to continue the line from");var s=e.coordinates.length-1;if(e.coordinates[s][0]===o[0]&&e.coordinates[s][1]===o[1])n=s+1,e.addCoordinate.apply(e,[n].concat(e.coordinates[s]));else{if(e.coordinates[0][0]!==o[0]||e.coordinates[0][1]!==o[1])throw new Error("`from` should match the point at either the start or the end of the provided LineString");r="backwards",n=0,e.addCoordinate.apply(e,[n].concat(e.coordinates[0]))}}else e=this.newFeature({type:B,properties:{},geometry:{type:M,coordinates:[]}}),n=0,this.addFeature(e);return this.clearSelectedFeatures(),Vt(this),this.updateUIClasses({mouse:v}),this.activateUIButton(C.LINE),this.setActionableState({trash:!0}),{line:e,currentVertexPosition:n,direction:r}},clickAnywhere:function(t,e){if(t.currentVertexPosition>0&&ce(e,t.line.coordinates[t.currentVertexPosition-1])||"backwards"===t.direction&&ce(e,t.line.coordinates[t.currentVertexPosition+1]))return this.changeMode(D.SIMPLE_SELECT,{featureIds:[t.line.id]});this.updateUIClasses({mouse:v}),t.line.updateCoordinate(t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),"forward"===t.direction?(t.currentVertexPosition++,t.line.updateCoordinate(t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat)):t.line.addCoordinate(0,e.lngLat.lng,e.lngLat.lat)},clickOnVertex:function(t){return this.changeMode(D.SIMPLE_SELECT,{featureIds:[t.line.id]})},onMouseMove:function(t,e){t.line.updateCoordinate(t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),Rt(e)&&this.updateUIClasses({mouse:w})}};he.onTap=he.onClick=function(t,e){if(Rt(e))return this.clickOnVertex(t,e);this.clickAnywhere(t,e)},he.onKeyUp=function(t,e){Ut(e)?this.changeMode(D.SIMPLE_SELECT,{featureIds:[t.line.id]}):Ot(e)&&(this.deleteFeature([t.line.id],{silent:!0}),this.changeMode(D.SIMPLE_SELECT))},he.onStop=function(t){Ht(this),this.activateUIButton(),void 0!==this.getFeature(t.line.id)&&(t.line.removeCoordinate(""+t.currentVertexPosition),t.line.isValid()?this.map.fire(O,{features:[t.line.toGeoJSON()]}):(this.deleteFeature([t.line.id],{silent:!0}),this.changeMode(D.SIMPLE_SELECT,{},{silent:!0})))},he.onTrash=function(t){this.deleteFeature([t.line.id],{silent:!0}),this.changeMode(D.SIMPLE_SELECT)},he.toDisplayFeatures=function(t,e,n){var i=e.properties.id===t.line.id;if(e.properties.active=i?q:J,!i)return n(e);e.geometry.coordinates.length<2||(e.properties.meta=W,n(Qt(t.line.id,e.geometry.coordinates["forward"===t.direction?e.geometry.coordinates.length-2:1],""+("forward"===t.direction?e.geometry.coordinates.length-2:1),!1)),n(e))};var de={simple_select:re,direct_select:ae,draw_point:le,draw_polygon:ue,draw_line_string:he},Ae={defaultMode:D.SIMPLE_SELECT,keybindings:!0,touchEnabled:!0,clickBuffer:2,touchBuffer:25,boxSelect:!0,displayControlsDefault:!0,styles:[{id:"gl-draw-polygon-fill-inactive",type:"fill",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],paint:{"fill-color":"#3bb2d0","fill-outline-color":"#3bb2d0","fill-opacity":.1}},{id:"gl-draw-polygon-fill-active",type:"fill",filter:["all",["==","active","true"],["==","$type","Polygon"]],paint:{"fill-color":"#fbb03b","fill-outline-color":"#fbb03b","fill-opacity":.1}},{id:"gl-draw-polygon-midpoint",type:"circle",filter:["all",["==","$type","Point"],["==","meta","midpoint"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-stroke-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-polygon-stroke-active",type:"line",filter:["all",["==","active","true"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-line-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","LineString"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-line-active",type:"line",filter:["all",["==","$type","LineString"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-polygon-and-line-vertex-stroke-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-color":"#fff"}},{id:"gl-draw-polygon-and-line-vertex-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-point-point-stroke-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-opacity":1,"circle-color":"#fff"}},{id:"gl-draw-point-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#3bb2d0"}},{id:"gl-draw-point-stroke-active",type:"circle",filter:["all",["==","$type","Point"],["==","active","true"],["!=","meta","midpoint"]],paint:{"circle-radius":7,"circle-color":"#fff"}},{id:"gl-draw-point-active",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["==","active","true"]],paint:{"circle-radius":5,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-fill-static",type:"fill",filter:["all",["==","mode","static"],["==","$type","Polygon"]],paint:{"fill-color":"#404040","fill-outline-color":"#404040","fill-opacity":.1}},{id:"gl-draw-polygon-stroke-static",type:"line",filter:["all",["==","mode","static"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-line-static",type:"line",filter:["all",["==","mode","static"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-point-static",type:"circle",filter:["all",["==","mode","static"],["==","$type","Point"]],paint:{"circle-radius":5,"circle-color":"#404040"}}],modes:de,controls:{},userProperties:!1},pe={point:!0,line_string:!0,polygon:!0,trash:!0,combine_features:!0,uncombine_features:!0},fe={point:!1,line_string:!1,polygon:!1,trash:!1,combine_features:!1,uncombine_features:!1};function ge(t,e){return t.map((function(t){return t.source?t:Bt(t,{id:t.id+"."+e,source:"hot"===e?_:y})}))}var me=ct((function(t,e){var i="[object Arguments]",r="[object Map]",o="[object Object]",s="[object Set]",a=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c[r]=c["[object Number]"]=c[o]=c["[object RegExp]"]=c[s]=c["[object String]"]=c["[object WeakMap]"]=!1;var u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,d=u||h||Function("return this")(),A=e&&!e.nodeType&&e,p=A&&t&&!t.nodeType&&t,f=p&&p.exports===A,g=f&&u.process,m=function(){try{return g&&g.binding&&g.binding("util")}catch(t){}}(),_=m&&m.isTypedArray;function y(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}function v(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n}function x(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var b,w,E,C=Array.prototype,B=Function.prototype,S=Object.prototype,M=d["__core-js_shared__"],T=B.toString,I=S.hasOwnProperty,L=(b=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||""))?"Symbol(src)_1."+b:"",P=S.toString,F=RegExp("^"+T.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=f?d.Buffer:void 0,D=d.Symbol,O=d.Uint8Array,U=S.propertyIsEnumerable,N=C.splice,k=D?D.toStringTag:void 0,z=Object.getOwnPropertySymbols,Q=R?R.isBuffer:void 0,G=(w=Object.keys,E=Object,function(t){return w(E(t))}),H=mt(d,"DataView"),V=mt(d,"Map"),j=mt(d,"Promise"),Z=mt(d,"Set"),W=mt(d,"WeakMap"),X=mt(Object,"create"),K=xt(H),q=xt(V),J=xt(j),Y=xt(Z),$=xt(W),tt=D?D.prototype:void 0,et=tt?tt.valueOf:void 0;function nt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function it(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function rt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function ot(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new rt;++e<n;)this.add(t[e])}function st(t){var e=this.__data__=new it(t);this.size=e.size}function at(t,e){var n=Et(t),i=!n&&wt(t),r=!n&&!i&&Ct(t),o=!n&&!i&&!r&&It(t),s=n||i||r||o,a=s?function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}(t.length,String):[],l=a.length;for(var c in t)!e&&!I.call(t,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vt(c,l))||a.push(c);return a}function lt(t,e){for(var n=t.length;n--;)if(bt(t[n][0],e))return n;return-1}function ct(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":k&&k in Object(t)?function(t){var e=I.call(t,k),n=t[k];try{t[k]=void 0;var i=!0}catch(t){}var r=P.call(t);return i&&(e?t[k]=n:delete t[k]),r}(t):function(t){return P.call(t)}(t)}function ut(t){return Tt(t)&&ct(t)==i}function ht(t,e,n,a,l){return t===e||(null==t||null==e||!Tt(t)&&!Tt(e)?t!=t&&e!=e:function(t,e,n,a,l,c){var u=Et(t),h=Et(e),d=u?"[object Array]":yt(t),A=h?"[object Array]":yt(e),p=(d=d==i?o:d)==o,f=(A=A==i?o:A)==o,g=d==A;if(g&&Ct(t)){if(!Ct(e))return!1;u=!0,p=!1}if(g&&!p)return c||(c=new st),u||It(t)?pt(t,e,n,a,l,c):function(t,e,n,i,o,a,l){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new O(t),new O(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return bt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case r:var c=v;case s:var u=1&i;if(c||(c=x),t.size!=e.size&&!u)return!1;var h=l.get(t);if(h)return h==e;i|=2,l.set(t,e);var d=pt(c(t),c(e),i,o,a,l);return l.delete(t),d;case"[object Symbol]":if(et)return et.call(t)==et.call(e)}return!1}(t,e,d,n,a,l,c);if(!(1&n)){var m=p&&I.call(t,"__wrapped__"),_=f&&I.call(e,"__wrapped__");if(m||_){var y=m?t.value():t,b=_?e.value():e;return c||(c=new st),l(y,b,n,a,c)}}return!!g&&(c||(c=new st),function(t,e,n,i,r,o){var s=1&n,a=ft(t),l=a.length,c=ft(e).length;if(l!=c&&!s)return!1;for(var u=l;u--;){var h=a[u];if(!(s?h in e:I.call(e,h)))return!1}var d=o.get(t);if(d&&o.get(e))return d==e;var A=!0;o.set(t,e),o.set(e,t);for(var p=s;++u<l;){h=a[u];var f=t[h],g=e[h];if(i)var m=s?i(g,f,h,e,t,o):i(f,g,h,t,e,o);if(!(void 0===m?f===g||r(f,g,n,i,o):m)){A=!1;break}p||(p="constructor"==h)}if(A&&!p){var _=t.constructor,y=e.constructor;_==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof y&&y instanceof y||(A=!1)}return o.delete(t),o.delete(e),A}(t,e,n,a,l,c))}(t,e,n,a,ht,l))}function dt(t){return!(!Mt(t)||function(t){return!!L&&L in t}(t))&&(Bt(t)?F:a).test(xt(t))}function At(t){if(n=(e=t)&&e.constructor,i="function"==typeof n&&n.prototype||S,e!==i)return G(t);var e,n,i,r=[];for(var o in Object(t))I.call(t,o)&&"constructor"!=o&&r.push(o);return r}function pt(t,e,n,i,r,o){var s=1&n,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(t);if(c&&o.get(e))return c==e;var u=-1,h=!0,d=2&n?new ot:void 0;for(o.set(t,e),o.set(e,t);++u<a;){var A=t[u],p=e[u];if(i)var f=s?i(p,A,u,e,t,o):i(A,p,u,t,e,o);if(void 0!==f){if(f)continue;h=!1;break}if(d){if(!y(e,(function(t,e){if(s=e,!d.has(s)&&(A===t||r(A,t,n,i,o)))return d.push(e);var s}))){h=!1;break}}else if(A!==p&&!r(A,p,n,i,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function ft(t){return function(t,e,n){var i=e(t);return Et(t)?i:function(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}(i,n(t))}(t,Lt,_t)}function gt(t,e){var n,i,r=t.__data__;return("string"==(i=typeof(n=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof e?"string":"hash"]:r.map}function mt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return dt(n)?n:void 0}nt.prototype.clear=function(){this.__data__=X?X(null):{},this.size=0},nt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},nt.prototype.get=function(t){var e=this.__data__;if(X){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return I.call(e,t)?e[t]:void 0},nt.prototype.has=function(t){var e=this.__data__;return X?void 0!==e[t]:I.call(e,t)},nt.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=X&&void 0===e?"__lodash_hash_undefined__":e,this},it.prototype.clear=function(){this.__data__=[],this.size=0},it.prototype.delete=function(t){var e=this.__data__,n=lt(e,t);return!(n<0)&&(n==e.length-1?e.pop():N.call(e,n,1),--this.size,!0)},it.prototype.get=function(t){var e=this.__data__,n=lt(e,t);return n<0?void 0:e[n][1]},it.prototype.has=function(t){return lt(this.__data__,t)>-1},it.prototype.set=function(t,e){var n=this.__data__,i=lt(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this},rt.prototype.clear=function(){this.size=0,this.__data__={hash:new nt,map:new(V||it),string:new nt}},rt.prototype.delete=function(t){var e=gt(this,t).delete(t);return this.size-=e?1:0,e},rt.prototype.get=function(t){return gt(this,t).get(t)},rt.prototype.has=function(t){return gt(this,t).has(t)},rt.prototype.set=function(t,e){var n=gt(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this},ot.prototype.add=ot.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},ot.prototype.has=function(t){return this.__data__.has(t)},st.prototype.clear=function(){this.__data__=new it,this.size=0},st.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},st.prototype.get=function(t){return this.__data__.get(t)},st.prototype.has=function(t){return this.__data__.has(t)},st.prototype.set=function(t,e){var n=this.__data__;if(n instanceof it){var i=n.__data__;if(!V||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new rt(i)}return n.set(t,e),this.size=n.size,this};var _t=z?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,o=[];++n<i;){var s=t[n];e(s,n,t)&&(o[r++]=s)}return o}(z(t),(function(e){return U.call(t,e)})))}:function(){return[]},yt=ct;function vt(t,e){return!!(e=null==e?9007199254740991:e)&&("number"==typeof t||l.test(t))&&t>-1&&t%1==0&&t<e}function xt(t){if(null!=t){try{return T.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function bt(t,e){return t===e||t!=t&&e!=e}(H&&"[object DataView]"!=yt(new H(new ArrayBuffer(1)))||V&&yt(new V)!=r||j&&"[object Promise]"!=yt(j.resolve())||Z&&yt(new Z)!=s||W&&"[object WeakMap]"!=yt(new W))&&(yt=function(t){var e=ct(t),n=e==o?t.constructor:void 0,i=n?xt(n):"";if(i)switch(i){case K:return"[object DataView]";case q:return r;case J:return"[object Promise]";case Y:return s;case $:return"[object WeakMap]"}return e});var wt=ut(function(){return arguments}())?ut:function(t){return Tt(t)&&I.call(t,"callee")&&!U.call(t,"callee")},Et=Array.isArray,Ct=Q||function(){return!1};function Bt(t){if(!Mt(t))return!1;var e=ct(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function St(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Mt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Tt(t){return null!=t&&"object"==typeof t}var It=_?function(t){return function(e){return t(e)}}(_):function(t){return Tt(t)&&St(t.length)&&!!c[ct(t)]};function Lt(t){return null!=(e=t)&&St(e.length)&&!Bt(e)?at(t):At(t);var e}t.exports=function(t,e){return ht(t,e)}})),_e={Polygon:pt,LineString:At,Point:dt,MultiPolygon:mt,MultiLineString:mt,MultiPoint:mt};function ye(t,e){return e.modes=D,e.getFeatureIdsAt=function(e){return it.click({point:e},null,t).map((function(t){return t.properties.id}))},e.getSelectedIds=function(){return t.store.getSelectedIds()},e.getSelected=function(){return{type:I,features:t.store.getSelectedIds().map((function(e){return t.store.get(e)})).map((function(t){return t.toGeoJSON()}))}},e.getSelectedPoints=function(){return{type:I,features:t.store.getSelectedCoordinates().map((function(t){return{type:B,properties:{},geometry:{type:T,coordinates:t.coordinates}}}))}},e.set=function(n){if(void 0===n.type||n.type!==I||!Array.isArray(n.features))throw new Error("Invalid FeatureCollection");var i=t.store.createRenderBatch(),r=t.store.getAllIds().slice(),o=e.add(n),s=new et(o);return(r=r.filter((function(t){return!s.has(t)}))).length&&e.delete(r),i(),o},e.add=function(e){var n=JSON.parse(JSON.stringify(jt(e))).features.map((function(e){if(e.id=e.id||ut(),null===e.geometry)throw new Error("Invalid geometry: null");if(void 0===t.store.get(e.id)||t.store.get(e.id).type!==e.geometry.type){var n=_e[e.geometry.type];if(void 0===n)throw new Error("Invalid geometry type: "+e.geometry.type+".");var i=new n(t,e);t.store.add(i)}else{var r=t.store.get(e.id);r.properties=e.properties,me(r.getCoordinates(),e.geometry.coordinates)||r.incomingCoords(e.geometry.coordinates)}return e.id}));return t.store.render(),n},e.get=function(e){var n=t.store.get(e);if(n)return n.toGeoJSON()},e.getAll=function(){return{type:I,features:t.store.getAll().map((function(t){return t.toGeoJSON()}))}},e.delete=function(n){return t.store.delete(n,{silent:!0}),e.getMode()!==D.DIRECT_SELECT||t.store.getSelectedIds().length?t.store.render():t.events.changeMode(D.SIMPLE_SELECT,void 0,{silent:!0}),e},e.deleteAll=function(){return t.store.delete(t.store.getAllIds(),{silent:!0}),e.getMode()===D.DIRECT_SELECT?t.events.changeMode(D.SIMPLE_SELECT,void 0,{silent:!0}):t.store.render(),e},e.changeMode=function(n,i){return void 0===i&&(i={}),n===D.SIMPLE_SELECT&&e.getMode()===D.SIMPLE_SELECT?(r=i.featureIds||[],o=t.store.getSelectedIds(),r.length===o.length&&JSON.stringify(r.map((function(t){return t})).sort())===JSON.stringify(o.map((function(t){return t})).sort())||(t.store.setSelected(i.featureIds,{silent:!0}),t.store.render()),e):(n===D.DIRECT_SELECT&&e.getMode()===D.DIRECT_SELECT&&i.featureId===t.store.getSelectedIds()[0]||t.events.changeMode(n,i,{silent:!0}),e);var r,o},e.getMode=function(){return t.events.getMode()},e.trash=function(){return t.events.trash({silent:!0}),e},e.combineFeatures=function(){return t.events.combineFeatures({silent:!0}),e},e.uncombineFeatures=function(){return t.events.uncombineFeatures({silent:!0}),e},e.setFeatureProperty=function(n,i,r){return t.store.setFeatureProperty(n,i,r),e},e}var ve=function(t,e){var n={options:t=function(t){void 0===t&&(t={});var e=Bt(t);return t.controls||(e.controls={}),!1===t.displayControlsDefault?e.controls=Bt(fe,t.controls):e.controls=Bt(pe,t.controls),(e=Bt(Ae,e)).styles=ge(e.styles,"cold").concat(ge(e.styles,"hot")),e}(t)};e=ye(n,e),n.api=e;var i=Tt(n);return e.onAdd=i.onAdd,e.onRemove=i.onRemove,e.types=C,e.options=t,e};function xe(t){ve(t,this)}return xe.modes=de,xe}))},3972:function(t){function e(t){if(t=Object.assign({},t),!(this instanceof e))throw new Error("MapboxLanguage needs to be called with the new keyword");this.setLanguage=this.setLanguage.bind(this),this._initialStyleUpdate=this._initialStyleUpdate.bind(this),this._defaultLanguage=t.defaultLanguage,this._isLanguageField=t.languageField||/^name_/,this._getLanguageField=t.getLanguageField||function(t){return"mul"===t?"name":`name_${t}`},this._languageSource=t.languageSource||null,this._languageTransform=t.languageTransform,this._excludedLayerIds=t.excludedLayerIds||[],this.supportedLanguages=t.supportedLanguages||["ar","de","en","es","fr","it","ja","ko","mul","pt","ru","vi","zh-Hans","zh-Hant"]}const n=/^\{name/;function i(t,e){const i=Array.isArray(e)&&"get"===e[0];return i&&n.test(e[1])&&console.warn("This plugin no longer supports the use of token syntax (e.g. {name}). Please use a get expression. See https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/ for more details."),i&&t.test(e[1])}function r(t,e,n){if(Array.isArray(e))for(let o=1;o<e.length;o++)Array.isArray(e[o])&&(i(t,e[o])&&(e[o][1]=n),r(t,e[o],n))}function o(t,e,n){if(i(t,e)&&(e[1]=n),r(t,e,n),"get"===e[0]&&"name"===e[1]){const t=e.slice(),i=["get",n];e=["coalesce",i,t]}return e}function s(t,e,n,i){return e.layout&&e.layout["text-field"]&&-1===i.indexOf(e.id)?Object.assign({},e,{layout:Object.assign({},e.layout,{"text-field":o(t,e.layout["text-field"],n)})}):e}function a(t){const e=Object.keys(t.sources).filter((e=>{const n=t.sources[e].url;return n&&n.indexOf("mapbox.mapbox-streets-v8")>-1||/mapbox-streets-v[1-9][1-9]/.test(n)}));if(!e.length)throw new Error('If using MapboxLanguage with a Mapbox style, the style must be based on vector tile version 8, e.g. "streets-v11"');return e[0]}function l(t){const e=navigator.languages?navigator.languages[0]:navigator.language||navigator.userLanguage,n=e&&e.split("-");let i=e;return n.length>1&&(i=n[0]),t.indexOf(i)>-1?i:null}e.prototype.setLanguage=function(t,e){if(this.supportedLanguages.indexOf(e)<0)throw new Error(`Language ${e} is not supported`);const n=this._languageSource||a(t);if(!n)return t;const i=this._getLanguageField(e),r=this._isLanguageField,o=this._excludedLayerIds,l=t.layers.map((t=>t.source===n?s(r,t,i,o):t)),c=Object.assign({},t,{layers:l});return this._languageTransform?this._languageTransform(c,e):c},e.prototype._initialStyleUpdate=function(){const t=this._map.getStyle(),e=this._defaultLanguage||l(this.supportedLanguages);this._map.setStyle(this.setLanguage(t,e))},e.prototype.onAdd=function(t){return this._map=t,this._map.on("style.load",this._initialStyleUpdate),this._container=document.createElement("div"),this._container},e.prototype.onRemove=function(){this._map.off("style.load",this._initialStyleUpdate),this._map=void 0},"undefined"!==typeof t.exports?t.exports=e:window.MapboxLanguage=e},5086:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var i=n(1042);function r(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}class o extends(r(Array)){clone(){return(new this.constructor).copy(this)}fromArray(t,e=0){for(let n=0;n<this.ELEMENTS;++n)this[n]=t[n+e];return this.check()}toArray(t=[],e=0){for(let n=0;n<this.ELEMENTS;++n)t[e+n]=this[n];return t}from(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}to(t){return t===this?this:(0,i.kJ)(t)?this.toArray(t):this.toObject(t)}toTarget(t){return t?this.to(t):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(i.vc)}formatString(t){let e="";for(let n=0;n<this.ELEMENTS;++n)e+=(n>0?", ":"")+(0,i.Bw)(this[n],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}equals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(!(0,i.fS)(this[e],t[e]))return!1;return!0}exactEquals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}negate(){for(let t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}lerp(t,e,n){if(void 0===n)return this.lerp(this,t,e);for(let i=0;i<this.ELEMENTS;++i){const r=t[i];this[i]=r+n*(e[i]-r)}return this.check()}min(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}max(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}clamp(t,e){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],t[n]),e[n]);return this.check()}add(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]+=e[t];return this.check()}subtract(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]-=e[t];return this.check()}scale(t){if("number"===typeof t)for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;else for(let e=0;e<this.ELEMENTS&&e<t.length;++e)this[e]*=t[e];return this.check()}multiplyByScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}check(){if(i.vc.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}validate(){let t=this.length===this.ELEMENTS;for(let e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}sub(t){return this.subtract(t)}setScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}addScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}subScalar(t){return this.addScalar(-t)}multiplyScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}divideScalar(t){return this.multiplyByScalar(1/t)}clampScalar(t,e){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],t),e);return this.check()}get elements(){return this}}},4584:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var i=n(5086),r=n(9164),o=n(1042);class s extends i.Z{toString(){let t="[";if(o.vc.printRowMajor){t+="row-major:";for(let e=0;e<this.RANK;++e)for(let n=0;n<this.RANK;++n)t+=" ".concat(this[n*this.RANK+e])}else{t+="column-major:";for(let e=0;e<this.ELEMENTS;++e)t+=" ".concat(this[e])}return t+="]",t}getElementIndex(t,e){return e*this.RANK+t}getElement(t,e){return this[e*this.RANK+t]}setElement(t,e,n){return this[e*this.RANK+t]=(0,r.u5)(n),this}getColumn(t,e=new Array(this.RANK).fill(-0)){const n=t*this.RANK;for(let i=0;i<this.RANK;++i)e[i]=this[n+i];return e}setColumn(t,e){const n=t*this.RANK;for(let i=0;i<this.RANK;++i)this[n+i]=e[i];return this}}},3998:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var i=n(5086),r=n(9164),o=n(7074);class s extends i.Z{get x(){return this[0]}set x(t){this[0]=(0,r.u5)(t)}get y(){return this[1]}set y(t){this[1]=(0,r.u5)(t)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let t=0;for(let e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}magnitudeSquared(){return this.lengthSquared()}distance(t){return Math.sqrt(this.distanceSquared(t))}distanceSquared(t){let e=0;for(let n=0;n<this.ELEMENTS;++n){const i=this[n]-t[n];e+=i*i}return(0,r.u5)(e)}dot(t){let e=0;for(let n=0;n<this.ELEMENTS;++n)e+=this[n]*t[n];return(0,r.u5)(e)}normalize(){const t=this.magnitude();if(0!==t)for(let e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}multiply(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]*=e[t];return this.check()}divide(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e[t];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(t){return this.distance(t)}distanceToSquared(t){return this.distanceSquared(t)}getComponent(t){return(0,o.Z)(t>=0&&t<this.ELEMENTS,"index is out of range"),(0,r.u5)(this[t])}setComponent(t,e){return(0,o.Z)(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}addVectors(t,e){return this.copy(t).add(e)}subVectors(t,e){return this.copy(t).subtract(e)}multiplyVectors(t,e){return this.copy(t).multiply(e)}addScaledVector(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}}},5821:function(t,e,n){"use strict";n.d(e,{Z:function(){return h}});var i,r=n(4584),o=n(9164),s=n(4417),a=n(5678),l=n(4928),c=n(8484);(function(t){t[t["COL0ROW0"]=0]="COL0ROW0",t[t["COL0ROW1"]=1]="COL0ROW1",t[t["COL0ROW2"]=2]="COL0ROW2",t[t["COL1ROW0"]=3]="COL1ROW0",t[t["COL1ROW1"]=4]="COL1ROW1",t[t["COL1ROW2"]=5]="COL1ROW2",t[t["COL2ROW0"]=6]="COL2ROW0",t[t["COL2ROW1"]=7]="COL2ROW1",t[t["COL2ROW2"]=8]="COL2ROW2"})(i||(i={}));const u=Object.freeze([1,0,0,0,1,0,0,0,1]);class h extends r.Z{static get IDENTITY(){return f()}static get ZERO(){return p()}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return i}constructor(t,...e){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):e.length>0?this.copy([t,...e]):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}identity(){return this.copy(u)}fromObject(t){return this.check()}fromQuaternion(t){return a.en(this,t),this.check()}set(t,e,n,i,r,o,s,a,l){return this[0]=t,this[1]=e,this[2]=n,this[3]=i,this[4]=r,this[5]=o,this[6]=s,this[7]=a,this[8]=l,this.check()}setRowMajor(t,e,n,i,r,o,s,a,l){return this[0]=t,this[1]=i,this[2]=s,this[3]=e,this[4]=r,this[5]=a,this[6]=n,this[7]=o,this[8]=l,this.check()}determinant(){return a.GH(this)}transpose(){return a.p4(this,this),this.check()}invert(){return a.U_(this,this),this.check()}multiplyLeft(t){return a.Jp(this,t,this),this.check()}multiplyRight(t){return a.Jp(this,this,t),this.check()}rotate(t){return a.U1(this,this,t),this.check()}scale(t){return Array.isArray(t)?a.bA(this,this,t):a.bA(this,this,[t,t]),this.check()}translate(t){return a.Iu(this,this,t),this.check()}transform(t,e){let n;switch(t.length){case 2:n=l.kK(e||[-0,-0],t,this);break;case 3:n=c.kK(e||[-0,-0,-0],t,this);break;case 4:n=(0,s._x)(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return(0,o.IL)(n,t.length),n}transformVector(t,e){return this.transform(t,e)}transformVector2(t,e){return this.transform(t,e)}transformVector3(t,e){return this.transform(t,e)}}let d,A;function p(){return d||(d=new h([0,0,0,0,0,0,0,0,0]),Object.freeze(d)),d}function f(){return A||(A=new h,Object.freeze(A)),A}},9484:function(t,e,n){"use strict";n.d(e,{Z:function(){return g}});var i,r=n(4584),o=n(9164),s=n(4417),a=n(6977),l=n(4928),c=n(8484),u=n(800);(function(t){t[t["COL0ROW0"]=0]="COL0ROW0",t[t["COL0ROW1"]=1]="COL0ROW1",t[t["COL0ROW2"]=2]="COL0ROW2",t[t["COL0ROW3"]=3]="COL0ROW3",t[t["COL1ROW0"]=4]="COL1ROW0",t[t["COL1ROW1"]=5]="COL1ROW1",t[t["COL1ROW2"]=6]="COL1ROW2",t[t["COL1ROW3"]=7]="COL1ROW3",t[t["COL2ROW0"]=8]="COL2ROW0",t[t["COL2ROW1"]=9]="COL2ROW1",t[t["COL2ROW2"]=10]="COL2ROW2",t[t["COL2ROW3"]=11]="COL2ROW3",t[t["COL3ROW0"]=12]="COL3ROW0",t[t["COL3ROW1"]=13]="COL3ROW1",t[t["COL3ROW2"]=14]="COL3ROW2",t[t["COL3ROW3"]=15]="COL3ROW3"})(i||(i={}));const h=45*Math.PI/180,d=1,A=.1,p=500,f=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);class g extends r.Z{static get IDENTITY(){return v()}static get ZERO(){return y()}get ELEMENTS(){return 16}get RANK(){return 4}get INDICES(){return i}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,e,n,i,r,o,s,a,l,c,u,h,d,A,p,f){return this[0]=t,this[1]=e,this[2]=n,this[3]=i,this[4]=r,this[5]=o,this[6]=s,this[7]=a,this[8]=l,this[9]=c,this[10]=u,this[11]=h,this[12]=d,this[13]=A,this[14]=p,this[15]=f,this.check()}setRowMajor(t,e,n,i,r,o,s,a,l,c,u,h,d,A,p,f){return this[0]=t,this[1]=r,this[2]=l,this[3]=d,this[4]=e,this[5]=o,this[6]=c,this[7]=A,this[8]=n,this[9]=s,this[10]=u,this[11]=p,this[12]=i,this[13]=a,this[14]=h,this[15]=f,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(f)}fromObject(t){return this.check()}fromQuaternion(t){return a.en(this,t),this.check()}frustum(t){const{left:e,right:n,bottom:i,top:r,near:o=A,far:s=p}=t;return s===1/0?b(this,e,n,i,r,o):a.oy(this,e,n,i,r,o,s),this.check()}lookAt(t){const{eye:e,center:n=[0,0,0],up:i=[0,1,0]}=t;return a.zB(this,e,n,i),this.check()}ortho(t){const{left:e,right:n,bottom:i,top:r,near:o=A,far:s=p}=t;return a.M5(this,e,n,i,r,o,s),this.check()}orthographic(t){const{fovy:e=h,aspect:n=d,focalDistance:i=1,near:r=A,far:o=p}=t;x(e);const s=e/2,a=i*Math.tan(s),l=a*n;return this.ortho({left:-l,right:l,bottom:-a,top:a,near:r,far:o})}perspective(t){const{fovy:e=45*Math.PI/180,aspect:n=1,near:i=.1,far:r=500}=t;return x(e),a.G3(this,e,n,i,r),this.check()}determinant(){return a.GH(this)}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t,e){t=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=e||[-0,-0,-0];const n=this.getScale(e),i=1/n[0],r=1/n[1],o=1/n[2];return t[0]=this[0]*i,t[1]=this[1]*r,t[2]=this[2]*o,t[3]=0,t[4]=this[4]*i,t[5]=this[5]*r,t[6]=this[6]*o,t[7]=0,t[8]=this[8]*i,t[9]=this[9]*r,t[10]=this[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t,e){t=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=e||[-0,-0,-0];const n=this.getScale(e),i=1/n[0],r=1/n[1],o=1/n[2];return t[0]=this[0]*i,t[1]=this[1]*r,t[2]=this[2]*o,t[3]=this[4]*i,t[4]=this[5]*r,t[5]=this[6]*o,t[6]=this[8]*i,t[7]=this[9]*r,t[8]=this[10]*o,t}transpose(){return a.p4(this,this),this.check()}invert(){return a.U_(this,this),this.check()}multiplyLeft(t){return a.Jp(this,t,this),this.check()}multiplyRight(t){return a.Jp(this,this,t),this.check()}rotateX(t){return a.lM(this,this,t),this.check()}rotateY(t){return a.uD(this,this,t),this.check()}rotateZ(t){return a.jI(this,this,t),this.check()}rotateXYZ(t){return this.rotateX(t[0]).rotateY(t[1]).rotateZ(t[2])}rotateAxis(t,e){return a.U1(this,this,t,e),this.check()}scale(t){return a.bA(this,this,Array.isArray(t)?t:[t,t,t]),this.check()}translate(t){return a.Iu(this,this,t),this.check()}transform(t,e){return 4===t.length?(e=u.fF(e||[-0,-0,-0,-0],t,this),(0,o.IL)(e,4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:n}=t;let i;switch(n){case 2:i=l.fF(e||[-0,-0],t,this);break;case 3:i=c.fF(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return(0,o.IL)(i,t.length),i}transformAsVector(t,e){let n;switch(t.length){case 2:n=(0,s.pb)(e||[-0,-0],t,this);break;case 3:n=(0,s.pL)(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return(0,o.IL)(n,t.length),n}transformPoint(t,e){return this.transformAsPoint(t,e)}transformVector(t,e){return this.transformAsPoint(t,e)}transformDirection(t,e){return this.transformAsVector(t,e)}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,n){return this.identity().translate([t,e,n])}}let m,_;function y(){return m||(m=new g([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Object.freeze(m)),m}function v(){return _||(_=new g,Object.freeze(_)),_}function x(t){if(t>2*Math.PI)throw Error("expected radians")}function b(t,e,n,i,r,o){const s=2*o/(n-e),a=2*o/(r-i),l=(n+e)/(n-e),c=(r+i)/(r-i),u=-1,h=-1,d=-2*o;return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=l,t[9]=c,t[10]=u,t[11]=h,t[12]=0,t[13]=0,t[14]=d,t[15]=0,t}},5414:function(t,e,n){"use strict";n.d(e,{Z:function(){return L}});var i=n(5086),r=n(9164),o=n(9886),s=n(1667),a=n(5678),l=n(8484),c=n(800);function u(){var t=new s.WT(4);return s.WT!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function h(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function d(t,e,n){n*=.5;var i=Math.sin(n);return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=Math.cos(n),t}function A(t,e,n){var i=e[0],r=e[1],o=e[2],s=e[3],a=n[0],l=n[1],c=n[2],u=n[3];return t[0]=i*u+s*a+r*c-o*l,t[1]=r*u+s*l+o*a-i*c,t[2]=o*u+s*c+i*l-r*a,t[3]=s*u-i*a-r*l-o*c,t}function p(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],s=e[3],a=Math.sin(n),l=Math.cos(n);return t[0]=i*l+s*a,t[1]=r*l+o*a,t[2]=o*l-r*a,t[3]=s*l-i*a,t}function f(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],s=e[3],a=Math.sin(n),l=Math.cos(n);return t[0]=i*l-o*a,t[1]=r*l+s*a,t[2]=o*l+i*a,t[3]=s*l-r*a,t}function g(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],s=e[3],a=Math.sin(n),l=Math.cos(n);return t[0]=i*l+r*a,t[1]=r*l-i*a,t[2]=o*l+s*a,t[3]=s*l-o*a,t}function m(t,e){var n=e[0],i=e[1],r=e[2];return t[0]=n,t[1]=i,t[2]=r,t[3]=Math.sqrt(Math.abs(1-n*n-i*i-r*r)),t}function _(t,e,n,i){var r,o,a,l,c,u=e[0],h=e[1],d=e[2],A=e[3],p=n[0],f=n[1],g=n[2],m=n[3];return o=u*p+h*f+d*g+A*m,o<0&&(o=-o,p=-p,f=-f,g=-g,m=-m),1-o>s.Ib?(r=Math.acos(o),a=Math.sin(r),l=Math.sin((1-i)*r)/a,c=Math.sin(i*r)/a):(l=1-i,c=i),t[0]=l*u+c*p,t[1]=l*h+c*f,t[2]=l*d+c*g,t[3]=l*A+c*m,t}function y(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],s=n*n+i*i+r*r+o*o,a=s?1/s:0;return t[0]=-n*a,t[1]=-i*a,t[2]=-r*a,t[3]=o*a,t}function v(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function x(t,e){var n,i=e[0]+e[4]+e[8];if(i>0)n=Math.sqrt(i+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);var o=(r+1)%3,s=(r+2)%3;n=Math.sqrt(e[3*r+r]-e[3*o+o]-e[3*s+s]+1),t[r]=.5*n,n=.5/n,t[3]=(e[3*o+s]-e[3*s+o])*n,t[o]=(e[3*o+r]+e[3*r+o])*n,t[s]=(e[3*s+r]+e[3*r+s])*n}return t}c.d9,c.al,c.JG,c.t8;var b=c.IH,w=c.bA,E=c.AK,C=c.t7,B=c.kE,S=c.we,M=c.Fv,T=(c.I6,c.fS,function(){var t=l.Ue(),e=l.al(1,0,0),n=l.al(0,1,0);return function(i,r,o){var s=l.AK(r,o);return s<-.999999?(l.kC(t,e,r),l.Zh(t)<1e-6&&l.kC(t,n,r),l.Fv(t,t),d(i,t,Math.PI),i):s>.999999?(i[0]=0,i[1]=0,i[2]=0,i[3]=1,i):(l.kC(t,r,o),i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=1+s,M(i,i))}}());(function(){var t=u(),e=u()})(),function(){var t=a.Ue()}();const I=[0,0,0,1];class L extends i.Z{constructor(t=0,e=0,n=0,i=1){super(-0,-0,-0,-0),Array.isArray(t)&&1===arguments.length?this.copy(t):this.set(t,e,n,i)}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}set(t,e,n,i){return this[0]=t,this[1]=e,this[2]=n,this[3]=i,this.check()}fromObject(t){return this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this.check()}fromMatrix3(t){return x(this,t),this.check()}fromAxisRotation(t,e){return d(this,t,e),this.check()}identity(){return h(this),this.check()}setAxisAngle(t,e){return this.fromAxisRotation(t,e)}get ELEMENTS(){return 4}get x(){return this[0]}set x(t){this[0]=(0,r.u5)(t)}get y(){return this[1]}set y(t){this[1]=(0,r.u5)(t)}get z(){return this[2]}set z(t){this[2]=(0,r.u5)(t)}get w(){return this[3]}set w(t){this[3]=(0,r.u5)(t)}len(){return B(this)}lengthSquared(){return S(this)}dot(t){return E(this,t)}rotationTo(t,e){return T(this,t,e),this.check()}add(t){return b(this,this,t),this.check()}calculateW(){return m(this,this),this.check()}conjugate(){return v(this,this),this.check()}invert(){return y(this,this),this.check()}lerp(t,e,n){return void 0===n?this.lerp(this,t,e):(C(this,t,e,n),this.check())}multiplyRight(t){return A(this,this,t),this.check()}multiplyLeft(t){return A(this,t,this),this.check()}normalize(){const t=this.len(),e=t>0?1/t:0;return this[0]=this[0]*e,this[1]=this[1]*e,this[2]=this[2]*e,this[3]=this[3]*e,0===t&&(this[3]=1),this.check()}rotateX(t){return p(this,this,t),this.check()}rotateY(t){return f(this,this,t),this.check()}rotateZ(t){return g(this,this,t),this.check()}scale(t){return w(this,this,t),this.check()}slerp(t,e,n){let i,r,o;switch(arguments.length){case 1:({start:i=I,target:r,ratio:o}=t);break;case 2:i=this,r=t,o=e;break;default:i=t,r=e,o=n}return _(this,i,r,o),this.check()}transformVector4(t,e=new o.Z){return c.VC(e,t,this),(0,r.IL)(e,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(t,e){return this.setAxisAngle(t,e)}premultiply(t){return this.multiplyLeft(t)}multiply(t){return this.multiplyRight(t)}}},5770:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var i=n(3998),r=n(1042),o=n(9164),s=n(4928),a=n(4417);class l extends i.Z{constructor(t=0,e=0){super(2),(0,r.kJ)(t)&&1===arguments.length?this.copy(t):(r.vc.debug&&((0,o.u5)(t),(0,o.u5)(e)),this[0]=t,this[1]=e)}set(t,e){return this[0]=t,this[1]=e,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this.check()}fromObject(t){return r.vc.debug&&((0,o.u5)(t.x),(0,o.u5)(t.y)),this[0]=t.x,this[1]=t.y,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t}get ELEMENTS(){return 2}horizontalAngle(){return Math.atan2(this.y,this.x)}verticalAngle(){return Math.atan2(this.x,this.y)}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return s.fF(this,this,t),this.check()}transformAsVector(t){return(0,a.pb)(this,this,t),this.check()}transformByMatrix3(t){return s.kK(this,this,t),this.check()}transformByMatrix2x3(t){return s.iu(this,this,t),this.check()}transformByMatrix2(t){return s.c(this,this,t),this.check()}}},3012:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var i=n(3998),r=n(1042),o=n(9164),s=n(8484),a=n(4417);const l=[0,0,0];let c;class u extends i.Z{static get ZERO(){return c||(c=new u(0,0,0),Object.freeze(c)),c}constructor(t=0,e=0,n=0){super(-0,-0,-0),1===arguments.length&&(0,r.kJ)(t)?this.copy(t):(r.vc.debug&&((0,o.u5)(t),(0,o.u5)(e),(0,o.u5)(n)),this[0]=t,this[1]=e,this[2]=n)}set(t,e,n){return this[0]=t,this[1]=e,this[2]=n,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}fromObject(t){return r.vc.debug&&((0,o.u5)(t.x),(0,o.u5)(t.y),(0,o.u5)(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}get ELEMENTS(){return 3}get z(){return this[2]}set z(t){this[2]=(0,o.u5)(t)}angle(t){return s.EU(this,t)}cross(t){return s.kC(this,this,t),this.check()}rotateX({radians:t,origin:e=l}){return s.lM(this,this,e,t),this.check()}rotateY({radians:t,origin:e=l}){return s.uD(this,this,e,t),this.check()}rotateZ({radians:t,origin:e=l}){return s.jI(this,this,e,t),this.check()}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return s.fF(this,this,t),this.check()}transformAsVector(t){return(0,a.pL)(this,this,t),this.check()}transformByMatrix3(t){return s.kK(this,this,t),this.check()}transformByMatrix2(t){return(0,a.eQ)(this,this,t),this.check()}transformByQuaternion(t){return s.VC(this,this,t),this.check()}}},9886:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var i=n(3998),r=n(1042),o=n(9164),s=n(8484),a=n(4417);let l;class c extends i.Z{static get ZERO(){return l||(l=new c(0,0,0,0),Object.freeze(l)),l}constructor(t=0,e=0,n=0,i=0){super(-0,-0,-0,-0),(0,r.kJ)(t)&&1===arguments.length?this.copy(t):(r.vc.debug&&((0,o.u5)(t),(0,o.u5)(e),(0,o.u5)(n),(0,o.u5)(i)),this[0]=t,this[1]=e,this[2]=n,this[3]=i)}set(t,e,n,i){return this[0]=t,this[1]=e,this[2]=n,this[3]=i,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}fromObject(t){return r.vc.debug&&((0,o.u5)(t.x),(0,o.u5)(t.y),(0,o.u5)(t.z),(0,o.u5)(t.w)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t.w=this[3],t}get ELEMENTS(){return 4}get z(){return this[2]}set z(t){this[2]=(0,o.u5)(t)}get w(){return this[3]}set w(t){this[3]=(0,o.u5)(t)}transform(t){return s.fF(this,this,t),this.check()}transformByMatrix3(t){return(0,a._x)(this,this,t),this.check()}transformByMatrix2(t){return(0,a.G7)(this,this,t),this.check()}transformByQuaternion(t){return s.VC(this,this,t),this.check()}applyMatrix4(t){return t.transform(this,this),this}}},4808:function(t,e,n){"use strict";n.r(e),n.d(e,{Euler:function(){return v},Matrix3:function(){return s.Z},Matrix4:function(){return a.Z},Pose:function(){return w},Quaternion:function(){return l.Z},SphericalCoordinates:function(){return p},Vector2:function(){return i.Z},Vector3:function(){return r.Z},Vector4:function(){return o.Z},_Euler:function(){return v},_MathUtils:function(){return E.Z},_Pose:function(){return w},_SphericalCoordinates:function(){return p},acos:function(){return u.Kh},asin:function(){return u.ZR},assert:function(){return C.Z},atan:function(){return u.z4},clamp:function(){return u.uZ},clone:function(){return u.d9},config:function(){return u.vc},configure:function(){return u.jQ},cos:function(){return u.mC},degrees:function(){return u.RW},equals:function(){return u.fS},exactEquals:function(){return u.I6},formatValue:function(){return u.Bw},isArray:function(){return u.kJ},lerp:function(){return u.t7},radians:function(){return u.uR},sin:function(){return u.O$},tan:function(){return u.OR},toDegrees:function(){return u.Ux},toRadians:function(){return u.Yr},withEpsilon:function(){return u.BJ}});var i=n(5770),r=n(3012),o=n(9886),s=n(5821),a=n(9484),l=n(5414),c=n(768),u=n(1042),h=n(8484);const d=1e-6,A=6371e3;class p{constructor({phi:t=0,theta:e=0,radius:n=1,bearing:i,pitch:r,altitude:o,radiusScale:s=A}={}){(0,c.Z)(this,"phi",void 0),(0,c.Z)(this,"theta",void 0),(0,c.Z)(this,"radius",void 0),(0,c.Z)(this,"radiusScale",void 0),this.phi=t,this.theta=e,this.radius=n||o||1,this.radiusScale=s||1,void 0!==i&&(this.bearing=i),void 0!==r&&(this.pitch=r),this.check()}toString(){return this.formatString(u.vc)}formatString({printTypes:t=!1}){const e=u.Bw;return"".concat(t?"Spherical":"","[rho:").concat(e(this.radius),",theta:").concat(e(this.theta),",phi:").concat(e(this.phi),"]")}equals(t){return(0,u.fS)(this.radius,t.radius)&&(0,u.fS)(this.theta,t.theta)&&(0,u.fS)(this.phi,t.phi)}exactEquals(t){return this.radius===t.radius&&this.theta===t.theta&&this.phi===t.phi}get bearing(){return 180-(0,u.RW)(this.phi)}set bearing(t){this.phi=Math.PI-(0,u.uR)(t)}get pitch(){return(0,u.RW)(this.theta)}set pitch(t){this.theta=(0,u.uR)(t)}get longitude(){return(0,u.RW)(this.phi)}get latitude(){return(0,u.RW)(this.theta)}get lng(){return(0,u.RW)(this.phi)}get lat(){return(0,u.RW)(this.theta)}get z(){return(this.radius-1)*this.radiusScale}set(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this.check()}clone(){return(new p).copy(this)}copy(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this.check()}fromLngLatZ([t,e,n]){return this.radius=1+n/this.radiusScale,this.phi=(0,u.uR)(e),this.theta=(0,u.uR)(t),this.check()}fromVector3(t){return this.radius=h.kE(t),this.radius>0&&(this.theta=Math.atan2(t[0],t[1]),this.phi=Math.acos((0,u.uZ)(t[2]/this.radius,-1,1))),this.check()}toVector3(){return new r.Z(0,0,this.radius).rotateX({radians:this.theta}).rotateZ({radians:this.phi})}makeSafe(){return this.phi=Math.max(d,Math.min(Math.PI-d,this.phi)),this}check(){if(!Number.isFinite(this.phi)||!Number.isFinite(this.theta)||!(this.radius>0))throw new Error("SphericalCoordinates: some fields set to invalid numbers");return this}}var f=n(5086),g=n(9164);const m="Unknown Euler angle order",_=.99999;var y;(function(t){t[t["ZYX"]=0]="ZYX",t[t["YXZ"]=1]="YXZ",t[t["XZY"]=2]="XZY",t[t["ZXY"]=3]="ZXY",t[t["YZX"]=4]="YZX",t[t["XYZ"]=5]="XYZ"})(y||(y={}));class v extends f.Z{static get ZYX(){return y.ZYX}static get YXZ(){return y.YXZ}static get XZY(){return y.XZY}static get ZXY(){return y.ZXY}static get YZX(){return y.YZX}static get XYZ(){return y.XYZ}static get RollPitchYaw(){return y.ZYX}static get DefaultOrder(){return y.ZYX}static get RotationOrders(){return y}static rotationOrder(t){return y[t]}get ELEMENTS(){return 4}constructor(t=0,e=0,n=0,i=v.DefaultOrder){super(-0,-0,-0,-0),arguments.length>0&&Array.isArray(arguments[0])?this.fromVector3(...arguments):this.set(t,e,n,i)}fromQuaternion(t){const[e,n,i,r]=t,o=n*n,s=-2*(o+i*i)+1,a=2*(e*n+r*i);let l=-2*(e*i-r*n);const c=2*(n*i+r*e),u=-2*(e*e+o)+1;l=l>1?1:l,l=l<-1?-1:l;const h=Math.atan2(c,u),d=Math.asin(l),A=Math.atan2(a,s);return this.set(h,d,A,v.RollPitchYaw)}fromObject(t){throw new Error("not implemented")}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=Number.isFinite(t[3])||this.order,this.check()}set(t=0,e=0,n=0,i){return this[0]=t,this[1]=e,this[2]=n,this[3]=Number.isFinite(i)?i:this[3],this.check()}validate(){return x(this[3])&&Number.isFinite(this[0])&&Number.isFinite(this[1])&&Number.isFinite(this[2])}toArray(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t}toArray4(t=[],e=0){return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t[e+3]=this[3],t}toVector3(t=[-0,-0,-0]){return t[0]=this[0],t[1]=this[1],t[2]=this[2],t}get x(){return this[0]}set x(t){this[0]=(0,g.u5)(t)}get y(){return this[1]}set y(t){this[1]=(0,g.u5)(t)}get z(){return this[2]}set z(t){this[2]=(0,g.u5)(t)}get alpha(){return this[0]}set alpha(t){this[0]=(0,g.u5)(t)}get beta(){return this[1]}set beta(t){this[1]=(0,g.u5)(t)}get gamma(){return this[2]}set gamma(t){this[2]=(0,g.u5)(t)}get phi(){return this[0]}set phi(t){this[0]=(0,g.u5)(t)}get theta(){return this[1]}set theta(t){this[1]=(0,g.u5)(t)}get psi(){return this[2]}set psi(t){this[2]=(0,g.u5)(t)}get roll(){return this[0]}set roll(t){this[0]=(0,g.u5)(t)}get pitch(){return this[1]}set pitch(t){this[1]=(0,g.u5)(t)}get yaw(){return this[2]}set yaw(t){this[2]=(0,g.u5)(t)}get order(){return this[3]}set order(t){this[3]=b(t)}fromVector3(t,e){return this.set(t[0],t[1],t[2],Number.isFinite(e)?e:this[3])}fromArray(t,e=0){return this[0]=t[0+e],this[1]=t[1+e],this[2]=t[2+e],void 0!==t[3]&&(this[3]=t[3]),this.check()}fromRollPitchYaw(t,e,n){return this.set(t,e,n,y.ZYX)}fromRotationMatrix(t,e=v.DefaultOrder){return this._fromRotationMatrix(t,e),this.check()}getRotationMatrix(t){return this._getRotationMatrix(t)}getQuaternion(){const t=new l.Z;switch(this[4]){case y.XYZ:return t.rotateX(this[0]).rotateY(this[1]).rotateZ(this[2]);case y.YXZ:return t.rotateY(this[0]).rotateX(this[1]).rotateZ(this[2]);case y.ZXY:return t.rotateZ(this[0]).rotateX(this[1]).rotateY(this[2]);case y.ZYX:return t.rotateZ(this[0]).rotateY(this[1]).rotateX(this[2]);case y.YZX:return t.rotateY(this[0]).rotateZ(this[1]).rotateX(this[2]);case y.XZY:return t.rotateX(this[0]).rotateZ(this[1]).rotateY(this[2]);default:throw new Error(m)}}_fromRotationMatrix(t,e=v.DefaultOrder){const n=t[0],i=t[4],r=t[8],o=t[1],s=t[5],a=t[9],l=t[2],c=t[6],h=t[10];switch(e=e||this[3],e){case v.XYZ:this[1]=Math.asin((0,u.uZ)(r,-1,1)),Math.abs(r)<_?(this[0]=Math.atan2(-a,h),this[2]=Math.atan2(-i,n)):(this[0]=Math.atan2(c,s),this[2]=0);break;case v.YXZ:this[0]=Math.asin(-(0,u.uZ)(a,-1,1)),Math.abs(a)<_?(this[1]=Math.atan2(r,h),this[2]=Math.atan2(o,s)):(this[1]=Math.atan2(-l,n),this[2]=0);break;case v.ZXY:this[0]=Math.asin((0,u.uZ)(c,-1,1)),Math.abs(c)<_?(this[1]=Math.atan2(-l,h),this[2]=Math.atan2(-i,s)):(this[1]=0,this[2]=Math.atan2(o,n));break;case v.ZYX:this[1]=Math.asin(-(0,u.uZ)(l,-1,1)),Math.abs(l)<_?(this[0]=Math.atan2(c,h),this[2]=Math.atan2(o,n)):(this[0]=0,this[2]=Math.atan2(-i,s));break;case v.YZX:this[2]=Math.asin((0,u.uZ)(o,-1,1)),Math.abs(o)<_?(this[0]=Math.atan2(-a,s),this[1]=Math.atan2(-l,n)):(this[0]=0,this[1]=Math.atan2(r,h));break;case v.XZY:this[2]=Math.asin(-(0,u.uZ)(i,-1,1)),Math.abs(i)<_?(this[0]=Math.atan2(c,s),this[1]=Math.atan2(r,n)):(this[0]=Math.atan2(-a,h),this[1]=0);break;default:throw new Error(m)}return this[3]=e,this}_getRotationMatrix(t){const e=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],n=this.x,i=this.y,r=this.z,o=Math.cos(n),s=Math.cos(i),a=Math.cos(r),l=Math.sin(n),c=Math.sin(i),u=Math.sin(r);switch(this[3]){case v.XYZ:{const t=o*a,n=o*u,i=l*a,r=l*u;e[0]=s*a,e[4]=-s*u,e[8]=c,e[1]=n+i*c,e[5]=t-r*c,e[9]=-l*s,e[2]=r-t*c,e[6]=i+n*c,e[10]=o*s;break}case v.YXZ:{const t=s*a,n=s*u,i=c*a,r=c*u;e[0]=t+r*l,e[4]=i*l-n,e[8]=o*c,e[1]=o*u,e[5]=o*a,e[9]=-l,e[2]=n*l-i,e[6]=r+t*l,e[10]=o*s;break}case v.ZXY:{const t=s*a,n=s*u,i=c*a,r=c*u;e[0]=t-r*l,e[4]=-o*u,e[8]=i+n*l,e[1]=n+i*l,e[5]=o*a,e[9]=r-t*l,e[2]=-o*c,e[6]=l,e[10]=o*s;break}case v.ZYX:{const t=o*a,n=o*u,i=l*a,r=l*u;e[0]=s*a,e[4]=i*c-n,e[8]=t*c+r,e[1]=s*u,e[5]=r*c+t,e[9]=n*c-i,e[2]=-c,e[6]=l*s,e[10]=o*s;break}case v.YZX:{const t=o*s,n=o*c,i=l*s,r=l*c;e[0]=s*a,e[4]=r-t*u,e[8]=i*u+n,e[1]=u,e[5]=o*a,e[9]=-l*a,e[2]=-c*a,e[6]=n*u+i,e[10]=t-r*u;break}case v.XZY:{const t=o*s,n=o*c,i=l*s,r=l*c;e[0]=s*a,e[4]=-u,e[8]=c*a,e[1]=t*u+r,e[5]=o*a,e[9]=n*u-i,e[2]=i*u-n,e[6]=l*a,e[10]=r*u+t;break}default:throw new Error(m)}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}toQuaternion(){const t=Math.cos(.5*this.yaw),e=Math.sin(.5*this.yaw),n=Math.cos(.5*this.roll),i=Math.sin(.5*this.roll),r=Math.cos(.5*this.pitch),o=Math.sin(.5*this.pitch),s=t*n*r+e*i*o,a=t*i*r-e*n*o,c=t*n*o+e*i*r,u=e*n*r-t*i*o;return new l.Z(a,c,u,s)}}function x(t){return t>=0&&t<6}function b(t){if(t<0&&t>=6)throw new Error(m);return t}class w{constructor({x:t=0,y:e=0,z:n=0,roll:i=0,pitch:o=0,yaw:s=0,position:a,orientation:l}={}){(0,c.Z)(this,"position",void 0),(0,c.Z)(this,"orientation",void 0),Array.isArray(a)&&3===a.length?this.position=new r.Z(a):this.position=new r.Z(t,e,n),Array.isArray(l)&&4===l.length?this.orientation=new v(l,l[3]):this.orientation=new v(i,o,s,v.RollPitchYaw)}get x(){return this.position.x}set x(t){this.position.x=t}get y(){return this.position.y}set y(t){this.position.y=t}get z(){return this.position.z}set z(t){this.position.z=t}get roll(){return this.orientation.roll}set roll(t){this.orientation.roll=t}get pitch(){return this.orientation.pitch}set pitch(t){this.orientation.pitch=t}get yaw(){return this.orientation.yaw}set yaw(t){this.orientation.yaw=t}getPosition(){return this.position}getOrientation(){return this.orientation}equals(t){return!!t&&(this.position.equals(t.position)&&this.orientation.equals(t.orientation))}exactEquals(t){return!!t&&(this.position.exactEquals(t.position)&&this.orientation.exactEquals(t.orientation))}getTransformationMatrix(){const t=Math.sin(this.roll),e=Math.sin(this.pitch),n=Math.sin(this.yaw),i=Math.cos(this.roll),r=Math.cos(this.pitch),o=Math.cos(this.yaw);return(new a.Z).setRowMajor(o*r,-n*i+o*e*t,n*t+o*e*i,this.x,n*r,o*i+n*e*t,-o*t+n*e*i,this.y,-e,r*t,r*i,this.z,0,0,0,1)}getTransformationMatrixFromPose(t){return(new a.Z).multiplyRight(this.getTransformationMatrix()).multiplyRight(t.getTransformationMatrix().invert())}getTransformationMatrixToPose(t){return(new a.Z).multiplyRight(t.getTransformationMatrix()).multiplyRight(this.getTransformationMatrix().invert())}}var E=n(4505),C=n(7074)},7074:function(t,e,n){"use strict";function i(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}n.d(e,{Z:function(){return i}})},1042:function(t,e,n){"use strict";n.d(e,{BJ:function(){return C},Bw:function(){return l},I6:function(){return E},Kh:function(){return y},O$:function(){return f},OR:function(){return m},RW:function(){return p},Ux:function(){return d},Yr:function(){return h},ZR:function(){return _},d9:function(){return u},fS:function(){return w},jQ:function(){return a},kJ:function(){return c},mC:function(){return g},t7:function(){return b},uR:function(){return A},uZ:function(){return x},vc:function(){return s},z4:function(){return v}});var i=n(7074);const r=1/Math.PI*180,o=1/180*Math.PI,s={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0};function a(t){for(const e in t)(0,i.Z)(e in s),s[e]=t[e];return s}function l(t,{precision:e=s.precision}={}){return t=B(t),"".concat(parseFloat(t.toPrecision(e)))}function c(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function u(t){return"clone"in t?t.clone():t.slice()}function h(t){return A(t)}function d(t){return p(t)}function A(t,e){return M(t,(t=>t*o),e)}function p(t,e){return M(t,(t=>t*r),e)}function f(t,e){return M(t,(t=>Math.sin(t)),e)}function g(t,e){return M(t,(t=>Math.cos(t)),e)}function m(t,e){return M(t,(t=>Math.tan(t)),e)}function _(t,e){return M(t,(t=>Math.asin(t)),e)}function y(t,e){return M(t,(t=>Math.acos(t)),e)}function v(t,e){return M(t,(t=>Math.atan(t)),e)}function x(t,e,n){return M(t,(t=>Math.max(e,Math.min(n,t))))}function b(t,e,n){return c(t)?t.map(((t,i)=>b(t,e[i],n))):n*e+(1-n)*t}function w(t,e,n){const i=s.EPSILON;n&&(s.EPSILON=n);try{if(t===e)return!0;if(c(t)&&c(e)){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!w(t[n],e[n]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):"number"===typeof t&&"number"===typeof e&&Math.abs(t-e)<=s.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{s.EPSILON=i}}function E(t,e){if(t===e)return!0;if(t&&"object"===typeof t&&e&&"object"===typeof e){if(t.constructor!==e.constructor)return!1;if(t.exactEquals)return t.exactEquals(e)}if(c(t)&&c(e)){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!E(t[n],e[n]))return!1;return!0}return!1}function C(t,e){const n=s.EPSILON;let i;s.EPSILON=t;try{i=e()}finally{s.EPSILON=n}return i}function B(t){return Math.round(t/s.EPSILON)*s.EPSILON}function S(t){return t.clone?t.clone():new Array(t.length)}function M(t,e,n){if(c(t)){const i=t;n=n||S(i);for(let r=0;r<n.length&&r<i.length;++r)n[r]=e(t[r],r,n);return n}return e(t)}},4417:function(t,e,n){"use strict";function i(t,e,n){const i=e[0],r=e[1],o=n[3]*i+n[7]*r||1;return t[0]=(n[0]*i+n[4]*r)/o,t[1]=(n[1]*i+n[5]*r)/o,t}function r(t,e,n){const i=e[0],r=e[1],o=e[2],s=n[3]*i+n[7]*r+n[11]*o||1;return t[0]=(n[0]*i+n[4]*r+n[8]*o)/s,t[1]=(n[1]*i+n[5]*r+n[9]*o)/s,t[2]=(n[2]*i+n[6]*r+n[10]*o)/s,t}function o(t,e,n){const i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t[2]=e[2],t}function s(t,e,n){const i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t[2]=e[2],t[3]=e[3],t}function a(t,e,n){const i=e[0],r=e[1],o=e[2];return t[0]=n[0]*i+n[3]*r+n[6]*o,t[1]=n[1]*i+n[4]*r+n[7]*o,t[2]=n[2]*i+n[5]*r+n[8]*o,t[3]=e[3],t}n.d(e,{G7:function(){return s},_x:function(){return a},eQ:function(){return o},pL:function(){return r},pb:function(){return i}})},4505:function(t,e){"use strict";e["Z"]={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,PI_OVER_TWO:Math.PI/2,PI_OVER_FOUR:Math.PI/4,PI_OVER_SIX:Math.PI/6,TWO_PI:2*Math.PI}},9164:function(t,e,n){"use strict";n.d(e,{IL:function(){return s},u5:function(){return o}});var i=n(1042);function r(t,e){if(t.length!==e)return!1;for(let n=0;n<t.length;++n)if(!Number.isFinite(t[n]))return!1;return!0}function o(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function s(t,e,n=""){if(i.vc.debug&&!r(t,e))throw new Error("math.gl: ".concat(n," some fields set to invalid numbers'"));return t}},7971:function(t,e,n){"use strict";var i=n(7482);function r(t){var e=[1/0,1/0,-1/0,-1/0];return i.coordEach(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}r["default"]=r,e.Z=r},1746:function(t,e){"use strict";function n(t,e,n){void 0===n&&(n={});var i={type:"Feature"};return(0===n.id||n.id)&&(i.id=n.id),n.bbox&&(i.bbox=n.bbox),i.properties=e||{},i.geometry=t,i}function i(t,e,n){switch(void 0===n&&(n={}),t){case"Point":return r(e).geometry;case"LineString":return l(e).geometry;case"Polygon":return s(e).geometry;case"MultiPoint":return d(e).geometry;case"MultiLineString":return h(e).geometry;case"MultiPolygon":return A(e).geometry;default:throw new Error(t+" is invalid")}}function r(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(!E(t[0])||!E(t[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:t};return n(r,e,i)}function o(t,e,n){return void 0===n&&(n={}),u(t.map((function(t){return r(t,e)})),n)}function s(t,e,i){void 0===i&&(i={});for(var r=0,o=t;r<o.length;r++){var s=o[r];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}var l={type:"Polygon",coordinates:t};return n(l,e,i)}function a(t,e,n){return void 0===n&&(n={}),u(t.map((function(t){return s(t,e)})),n)}function l(t,e,i){if(void 0===i&&(i={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");var r={type:"LineString",coordinates:t};return n(r,e,i)}function c(t,e,n){return void 0===n&&(n={}),u(t.map((function(t){return l(t,e)})),n)}function u(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function h(t,e,i){void 0===i&&(i={});var r={type:"MultiLineString",coordinates:t};return n(r,e,i)}function d(t,e,i){void 0===i&&(i={});var r={type:"MultiPoint",coordinates:t};return n(r,e,i)}function A(t,e,i){void 0===i&&(i={});var r={type:"MultiPolygon",coordinates:t};return n(r,e,i)}function p(t,e,i){void 0===i&&(i={});var r={type:"GeometryCollection",geometries:t};return n(r,e,i)}function f(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n}function g(t,n){void 0===n&&(n="kilometers");var i=e.factors[n];if(!i)throw new Error(n+" units is invalid");return t*i}function m(t,n){void 0===n&&(n="kilometers");var i=e.factors[n];if(!i)throw new Error(n+" units is invalid");return t/i}function _(t,e){return v(m(t,e))}function y(t){var e=t%360;return e<0&&(e+=360),e}function v(t){var e=t%(2*Math.PI);return 180*e/Math.PI}function x(t){var e=t%360;return e*Math.PI/180}function b(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return g(m(t,e),n)}function w(t,n,i){if(void 0===n&&(n="meters"),void 0===i&&(i="kilometers"),!(t>=0))throw new Error("area must be a positive number");var r=e.areaFactors[n];if(!r)throw new Error("invalid original units");var o=e.areaFactors[i];if(!o)throw new Error("invalid final units");return t/r*o}function E(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function C(t){return!!t&&t.constructor===Object}function B(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(!E(t))throw new Error("bbox must only contain numbers")}))}function S(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")}Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.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/e.earthRadius,yards:1.0936133},e.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},e.feature=n,e.geometry=i,e.point=r,e.points=o,e.polygon=s,e.polygons=a,e.lineString=l,e.lineStrings=c,e.featureCollection=u,e.multiLineString=h,e.multiPoint=d,e.multiPolygon=A,e.geometryCollection=p,e.round=f,e.radiansToLength=g,e.lengthToRadians=m,e.lengthToDegrees=_,e.bearingToAzimuth=y,e.radiansToDegrees=v,e.degreesToRadians=x,e.convertLength=b,e.convertArea=w,e.isNumber=E,e.isObject=C,e.validateBBox=B,e.validateId=S},7482:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1746);function r(t,e,n){if(null!==t)for(var i,o,s,a,l,c,u,h,d=0,A=0,p=t.type,f="FeatureCollection"===p,g="Feature"===p,m=f?t.features.length:1,_=0;_<m;_++){u=f?t.features[_].geometry:g?t.geometry:t,h=!!u&&"GeometryCollection"===u.type,l=h?u.geometries.length:1;for(var y=0;y<l;y++){var v=0,x=0;if(a=h?u.geometries[y]:u,null!==a){c=a.coordinates;var b=a.type;switch(d=!n||"Polygon"!==b&&"MultiPolygon"!==b?0:1,b){case null:break;case"Point":if(!1===e(c,A,_,v,x))return!1;A++,v++;break;case"LineString":case"MultiPoint":for(i=0;i<c.length;i++){if(!1===e(c[i],A,_,v,x))return!1;A++,"MultiPoint"===b&&v++}"LineString"===b&&v++;break;case"Polygon":case"MultiLineString":for(i=0;i<c.length;i++){for(o=0;o<c[i].length-d;o++){if(!1===e(c[i][o],A,_,v,x))return!1;A++}"MultiLineString"===b&&v++,"Polygon"===b&&x++}"Polygon"===b&&v++;break;case"MultiPolygon":for(i=0;i<c.length;i++){for(x=0,o=0;o<c[i].length;o++){for(s=0;s<c[i][o].length-d;s++){if(!1===e(c[i][o][s],A,_,v,x))return!1;A++}x++}v++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(!1===r(a.geometries[i],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(t,e,n,i){var o=n;return r(t,(function(t,i,r,s,a){o=0===i&&void 0===n?t:e(o,t,i,r,s,a)}),i),o}function s(t,e){var n;switch(t.type){case"FeatureCollection":for(n=0;n<t.features.length;n++)if(!1===e(t.features[n].properties,n))break;break;case"Feature":e(t.properties,0);break}}function a(t,e,n){var i=n;return s(t,(function(t,r){i=0===r&&void 0===n?t:e(i,t,r)})),i}function l(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length;n++)if(!1===e(t.features[n],n))break}function c(t,e,n){var i=n;return l(t,(function(t,r){i=0===r&&void 0===n?t:e(i,t,r)})),i}function u(t){var e=[];return r(t,(function(t){e.push(t)})),e}function h(t,e){var n,i,r,o,s,a,l,c,u,h,d=0,A="FeatureCollection"===t.type,p="Feature"===t.type,f=A?t.features.length:1;for(n=0;n<f;n++){for(a=A?t.features[n].geometry:p?t.geometry:t,c=A?t.features[n].properties:p?t.properties:{},u=A?t.features[n].bbox:p?t.bbox:void 0,h=A?t.features[n].id:p?t.id:void 0,l=!!a&&"GeometryCollection"===a.type,s=l?a.geometries.length:1,r=0;r<s;r++)if(o=l?a.geometries[r]:a,null!==o)switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,d,c,u,h))return!1;break;case"GeometryCollection":for(i=0;i<o.geometries.length;i++)if(!1===e(o.geometries[i],d,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,d,c,u,h))return!1;d++}}function d(t,e,n){var i=n;return h(t,(function(t,r,o,s,a){i=0===r&&void 0===n?t:e(i,t,r,o,s,a)})),i}function A(t,e){h(t,(function(t,n,r,o,s){var a,l=null===t?null:t.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==e(i.feature(t,r,{bbox:o,id:s}),n,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon";break}for(var c=0;c<t.coordinates.length;c++){var u=t.coordinates[c],h={type:a,coordinates:u};if(!1===e(i.feature(h,r),n,c))return!1}}))}function p(t,e,n){var i=n;return A(t,(function(t,r,o){i=0===r&&0===o&&void 0===n?t:e(i,t,r,o)})),i}function f(t,e){A(t,(function(t,n,o){var s=0;if(t.geometry){var a=t.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var l,c=0,u=0,h=0;return!1!==r(t,(function(r,a,d,A,p){if(void 0===l||n>c||A>u||p>h)return l=r,c=n,u=A,h=p,void(s=0);var f=i.lineString([l,r],t.properties);if(!1===e(f,n,o,p,s))return!1;s++,l=r}))&&void 0}}}))}function g(t,e,n){var i=n,r=!1;return f(t,(function(t,o,s,a,l){i=!1===r&&void 0===n?t:e(i,t,o,s,a,l),r=!0})),i}function m(t,e){if(!t)throw new Error("geojson is required");A(t,(function(t,n,r){if(null!==t.geometry){var o=t.geometry.type,s=t.geometry.coordinates;switch(o){case"LineString":if(!1===e(t,n,r,0,0))return!1;break;case"Polygon":for(var a=0;a<s.length;a++)if(!1===e(i.lineString(s[a],t.properties),n,r,a))return!1;break}}}))}function _(t,e,n){var i=n;return m(t,(function(t,r,o,s){i=0===r&&void 0===n?t:e(i,t,r,o,s)})),i}function y(t,e){if(e=e||{},!i.isObject(e))throw new Error("options is invalid");var n,r=e.featureIndex||0,o=e.multiFeatureIndex||0,s=e.geometryIndex||0,a=e.segmentIndex||0,l=e.properties;switch(t.type){case"FeatureCollection":r<0&&(r=t.features.length+r),l=l||t.features[r].properties,n=t.features[r].geometry;break;case"Feature":l=l||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 c=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=c.length+a-1),i.lineString([c[a],c[a+1]],l,e);case"Polygon":return s<0&&(s=c.length+s),a<0&&(a=c[s].length+a-1),i.lineString([c[s][a],c[s][a+1]],l,e);case"MultiLineString":return o<0&&(o=c.length+o),a<0&&(a=c[o].length+a-1),i.lineString([c[o][a],c[o][a+1]],l,e);case"MultiPolygon":return o<0&&(o=c.length+o),s<0&&(s=c[o].length+s),a<0&&(a=c[o][s].length-a-1),i.lineString([c[o][s][a],c[o][s][a+1]],l,e)}throw new Error("geojson is invalid")}function v(t,e){if(e=e||{},!i.isObject(e))throw new Error("options is invalid");var n,r=e.featureIndex||0,o=e.multiFeatureIndex||0,s=e.geometryIndex||0,a=e.coordIndex||0,l=e.properties;switch(t.type){case"FeatureCollection":r<0&&(r=t.features.length+r),l=l||t.features[r].properties,n=t.features[r].geometry;break;case"Feature":l=l||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 c=n.coordinates;switch(n.type){case"Point":return i.point(c,l,e);case"MultiPoint":return o<0&&(o=c.length+o),i.point(c[o],l,e);case"LineString":return a<0&&(a=c.length+a),i.point(c[a],l,e);case"Polygon":return s<0&&(s=c.length+s),a<0&&(a=c[s].length+a),i.point(c[s][a],l,e);case"MultiLineString":return o<0&&(o=c.length+o),a<0&&(a=c[o].length+a),i.point(c[o][a],l,e);case"MultiPolygon":return o<0&&(o=c.length+o),s<0&&(s=c[o].length+s),a<0&&(a=c[o][s].length-a),i.point(c[o][s][a],l,e)}throw new Error("geojson is invalid")}e.coordAll=u,e.coordEach=r,e.coordReduce=o,e.featureEach=l,e.featureReduce=c,e.findPoint=v,e.findSegment=y,e.flattenEach=A,e.flattenReduce=p,e.geomEach=h,e.geomReduce=d,e.lineEach=m,e.lineReduce=_,e.propEach=s,e.propReduce=a,e.segmentEach=f,e.segmentReduce=g},8:function(t,e,n){"use strict";var i=n(434),r=n(1781),o=n(2108),s=n(8817);t.exports=s||i.call(o,r)},4971:function(t,e,n){"use strict";var i=n(434),r=n(1781),o=n(8);t.exports=function(){return o(i,r,arguments)}},1781:function(t){"use strict";t.exports=Function.prototype.apply},2108:function(t){"use strict";t.exports=Function.prototype.call},2426:function(t,e,n){"use strict";var i=n(434),r=n(4658),o=n(2108),s=n(8);t.exports=function(t){if(t.length<1||"function"!==typeof t[0])throw new r("a function is required");return s(i,o,t)}},8817:function(t){"use strict";t.exports="undefined"!==typeof Reflect&&Reflect&&Reflect.apply},2880:function(t,e,n){"use strict";var i=n(9643),r=n(8481),o=r(i("String.prototype.indexOf"));t.exports=function(t,e){var n=i(t,!!e);return"function"===typeof n&&o(t,".prototype.")>-1?r(n):n}},8481:function(t,e,n){"use strict";var i=n(3402),r=n(9265),o=n(2426),s=n(4971);t.exports=function(t){var e=o(arguments),n=t.length-(arguments.length-1);return i(e,1+(n>0?n:0),!0)},r?r(t.exports,"apply",{value:s}):t.exports.apply=s},3190:function(t,e,n){"use strict";var i=n(9643),r=n(2426),o=r([i("%String.prototype.indexOf%")]);t.exports=function(t,e){var n=i(t,!!e);return"function"===typeof n&&o(t,".prototype.")>-1?r([n]):n}},9440:function(t,e,n){"use strict";var i=n(5040),r=n(7053),o=n(8878),s=n(5164).orient2d;function a(t,e,n){e=Math.max(0,void 0===e?2:e),n=n||0;var r=g(t),o=new i(16);o.toBBox=function(t){return{minX:t[0],minY:t[1],maxX:t[0],maxY:t[1]}},o.compareMinX=function(t,e){return t[0]-e[0]},o.compareMinY=function(t,e){return t[1]-e[1]},o.load(t);for(var s,a=[],c=0;c<r.length;c++){var u=r[c];o.remove(u),s=m(u,s),a.push(s)}var h=new i(16);for(c=0;c<a.length;c++)h.insert(f(a[c]));var d=e*e,A=n*n;while(a.length){var p=a.shift(),y=p.p,v=p.next.p,x=_(y,v);if(!(x<A)){var b=x/d;u=l(o,p.prev.p,y,v,p.next.next.p,b,h),u&&Math.min(_(u,y),_(u,v))<=b&&(a.push(p),a.push(m(u,p)),o.remove(u),h.remove(p),h.insert(f(p)),h.insert(f(p.next)))}}p=s;var w=[];do{w.push(p.p),p=p.next}while(p!==s);return w.push(p.p),w}function l(t,e,n,i,o,s,a){var l=new r([],c),h=t.data;while(h){for(var A=0;A<h.children.length;A++){var p=h.children[A],f=h.leaf?y(p,n,i):u(n,i,p);f>s||l.push({node:p,dist:f})}while(l.length&&!l.peek().node.children){var g=l.pop(),m=g.node,_=y(m,e,n),v=y(m,i,o);if(g.dist<_&&g.dist<v&&d(n,m,a)&&d(i,m,a))return m}h=l.pop(),h&&(h=h.node)}return null}function c(t,e){return t.dist-e.dist}function u(t,e,n){if(h(t,n)||h(e,n))return 0;var i=v(t[0],t[1],e[0],e[1],n.minX,n.minY,n.maxX,n.minY);if(0===i)return 0;var r=v(t[0],t[1],e[0],e[1],n.minX,n.minY,n.minX,n.maxY);if(0===r)return 0;var o=v(t[0],t[1],e[0],e[1],n.maxX,n.minY,n.maxX,n.maxY);if(0===o)return 0;var s=v(t[0],t[1],e[0],e[1],n.minX,n.maxY,n.maxX,n.maxY);return 0===s?0:Math.min(i,r,o,s)}function h(t,e){return t[0]>=e.minX&&t[0]<=e.maxX&&t[1]>=e.minY&&t[1]<=e.maxY}function d(t,e,n){for(var i=Math.min(t[0],e[0]),r=Math.min(t[1],e[1]),o=Math.max(t[0],e[0]),s=Math.max(t[1],e[1]),a=n.search({minX:i,minY:r,maxX:o,maxY:s}),l=0;l<a.length;l++)if(p(a[l].p,a[l].next.p,t,e))return!1;return!0}function A(t,e,n){return s(t[0],t[1],e[0],e[1],n[0],n[1])}function p(t,e,n,i){return t!==i&&e!==n&&A(t,e,n)>0!==A(t,e,i)>0&&A(n,i,t)>0!==A(n,i,e)>0}function f(t){var e=t.p,n=t.next.p;return t.minX=Math.min(e[0],n[0]),t.minY=Math.min(e[1],n[1]),t.maxX=Math.max(e[0],n[0]),t.maxY=Math.max(e[1],n[1]),t}function g(t){for(var e=t[0],n=t[0],i=t[0],r=t[0],s=0;s<t.length;s++){var a=t[s];a[0]<e[0]&&(e=a),a[0]>i[0]&&(i=a),a[1]<n[1]&&(n=a),a[1]>r[1]&&(r=a)}var l=[e,n,i,r],c=l.slice();for(s=0;s<t.length;s++)o(t[s],l)||c.push(t[s]);return b(c)}function m(t,e){var n={p:t,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return e?(n.next=e.next,n.prev=e,e.next.prev=n,e.next=n):(n.prev=n,n.next=n),n}function _(t,e){var n=t[0]-e[0],i=t[1]-e[1];return n*n+i*i}function y(t,e,n){var i=e[0],r=e[1],o=n[0]-i,s=n[1]-r;if(0!==o||0!==s){var a=((t[0]-i)*o+(t[1]-r)*s)/(o*o+s*s);a>1?(i=n[0],r=n[1]):a>0&&(i+=o*a,r+=s*a)}return o=t[0]-i,s=t[1]-r,o*o+s*s}function v(t,e,n,i,r,o,s,a){var l,c,u,h,d=n-t,A=i-e,p=s-r,f=a-o,g=t-r,m=e-o,_=d*d+A*A,y=d*p+A*f,v=p*p+f*f,x=d*g+A*m,b=p*g+f*m,w=_*v-y*y,E=w,C=w;0===w?(c=0,E=1,h=b,C=v):(c=y*b-v*x,h=_*b-y*x,c<0?(c=0,h=b,C=v):c>E&&(c=E,h=b+y,C=v)),h<0?(h=0,-x<0?c=0:-x>_?c=E:(c=-x,E=_)):h>C&&(h=C,-x+y<0?c=0:-x+y>_?c=E:(c=-x+y,E=_)),l=0===c?0:c/E,u=0===h?0:h/C;var B=(1-l)*t+l*n,S=(1-l)*e+l*i,M=(1-u)*r+u*s,T=(1-u)*o+u*a,I=M-B,L=T-S;return I*I+L*L}function x(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}function b(t){t.sort(x);for(var e=[],n=0;n<t.length;n++){while(e.length>=2&&A(e[e.length-2],e[e.length-1],t[n])<=0)e.pop();e.push(t[n])}for(var i=[],r=t.length-1;r>=0;r--){while(i.length>=2&&A(i[i.length-2],i[i.length-1],t[r])<=0)i.pop();i.push(t[r])}return i.pop(),e.pop(),e.concat(i)}r.default&&(r=r.default),t.exports=a,t.exports["default"]=a},5040:function(t){!function(e,n){t.exports=n()}(0,(function(){"use strict";function t(t,i,r,o,s){!function t(n,i,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,l=i-r+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1),d=Math.max(r,Math.floor(i-l*u/a+h)),A=Math.min(o,Math.floor(i+(a-l)*u/a+h));t(n,i,d,A,s)}var p=n[i],f=r,g=o;for(e(n,r,i),s(n[o],p)>0&&e(n,r,o);f<g;){for(e(n,f,g),f++,g--;s(n[f],p)<0;)f++;for(;s(n[g],p)>0;)g--}0===s(n[r],p)?e(n,r,g):e(n,++g,o),g<=i&&(r=g+1),i<=g&&(o=g-1)}}(t,i,r||0,o||t.length-1,s||n)}function e(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function n(t,e){return t<e?-1:t>e?1:0}var i=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 r(t,e,n){if(!n)return e.indexOf(t);for(var i=0;i<e.length;i++)if(n(t,e[i]))return i;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,i,r){r||(r=p(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o=e;o<n;o++){var s=t.children[o];a(r,t.leaf?i(s):s)}return r}function a(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 l(t,e){return t.minX-e.minX}function c(t,e){return t.minY-e.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function A(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f(e,n,i,r,o){for(var s=[n,i];s.length;)if(!((i=s.pop())-(n=s.pop())<=r)){var a=n+Math.ceil((i-n)/r/2)*r;t(e,a,n,i,o),s.push(n,a,a,i)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var e=this.data,n=[];if(!A(t,e))return n;for(var i=this.toBBox,r=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?i(s):s;A(t,a)&&(e.leaf?n.push(s):d(t,a)?this._all(s,n):r.push(s))}e=r.pop()}return n},i.prototype.collides=function(t){var e=this.data;if(!A(t,e))return!1;for(var n=[];e;){for(var i=0;i<e.children.length;i++){var r=e.children[i],o=e.leaf?this.toBBox(r):r;if(A(t,o)){if(e.leaf||d(t,o))return!0;n.push(r)}}e=n.pop()}return!1},i.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 n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var i=this.data;this.data=n,n=i}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},i.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},i.prototype.clear=function(){return this.data=p([]),this},i.prototype.remove=function(t,e){if(!t)return this;for(var n,i,o,s=this.data,a=this.toBBox(t),l=[],c=[];s||l.length;){if(s||(s=l.pop(),i=l[l.length-1],n=c.pop(),o=!0),s.leaf){var u=r(t,s.children,e);if(-1!==u)return s.children.splice(u,1),l.push(s),this._condense(l),this}o||s.leaf||!d(s,a)?i?(n++,s=i.children[n],o=!1):s=null:(l.push(s),c.push(n),n=0,i=s,s=s.children[0])}return this},i.prototype.toBBox=function(t){return t},i.prototype.compareMinX=function(t,e){return t.minX-e.minX},i.prototype.compareMinY=function(t,e){return t.minY-e.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(t){return this.data=t,this},i.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},i.prototype._build=function(t,e,n,i){var r,s=n-e+1,a=this._maxEntries;if(s<=a)return o(r=p(t.slice(e,n+1)),this.toBBox),r;i||(i=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,i-1))),(r=p([])).leaf=!1,r.height=i;var l=Math.ceil(s/a),c=l*Math.ceil(Math.sqrt(a));f(t,e,n,c,this.compareMinX);for(var u=e;u<=n;u+=c){var h=Math.min(u+c-1,n);f(t,u,h,l,this.compareMinY);for(var d=u;d<=h;d+=l){var A=Math.min(d+l-1,h);r.children.push(this._build(t,d,A,i-1))}}return o(r,this.toBBox),r},i.prototype._chooseSubtree=function(t,e,n,i){for(;i.push(e),!e.leaf&&i.length-1!==n;){for(var r=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],c=u(l),h=(d=t,A=l,(Math.max(A.maxX,d.maxX)-Math.min(A.minX,d.minX))*(Math.max(A.maxY,d.maxY)-Math.min(A.minY,d.minY))-c);h<o?(o=h,r=c<r?c:r,s=l):h===o&&c<r&&(r=c,s=l)}e=s||e.children[0]}var d,A;return e},i.prototype._insert=function(t,e,n){var i=n?t:this.toBBox(t),r=[],o=this._chooseSubtree(i,this.data,e,r);for(o.children.push(t),a(o,i);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(i,r,e)},i.prototype._split=function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var s=this._chooseSplitIndex(n,r,i),a=p(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},i.prototype._splitRoot=function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,e,n){for(var i,r,o,a,l,c,h,d=1/0,A=1/0,p=e;p<=n-e;p++){var f=s(t,0,p,this.toBBox),g=s(t,p,n,this.toBBox),m=(r=f,o=g,a=void 0,l=void 0,c=void 0,h=void 0,a=Math.max(r.minX,o.minX),l=Math.max(r.minY,o.minY),c=Math.min(r.maxX,o.maxX),h=Math.min(r.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,h-l)),_=u(f)+u(g);m<d?(d=m,i=p,A=_<A?_:A):m===d&&_<A&&(A=_,i=p)}return i||n-e},i.prototype._chooseSplitAxis=function(t,e,n){var i=t.leaf?this.compareMinX:l,r=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,r)&&t.children.sort(i)},i.prototype._allDistMargin=function(t,e,n,i){t.children.sort(i);for(var r=this.toBBox,o=s(t,0,e,r),l=s(t,n-e,n,r),c=h(o)+h(l),u=e;u<n-e;u++){var d=t.children[u];a(o,t.leaf?r(d):d),c+=h(o)}for(var A=n-e-1;A>=e;A--){var p=t.children[A];a(l,t.leaf?r(p):p),c+=h(l)}return c},i.prototype._adjustParentBBoxes=function(t,e,n){for(var i=n;i>=0;i--)a(e[i],t)},i.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},i}))},1791:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i="undefined"!==typeof e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,r,o){"string"===typeof t&&(t=[[null,t,void 0]]);var s={};if(i)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);i&&s[u[0]]||("undefined"!==typeof o&&("undefined"===typeof u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},e}},1979:function(t){"use strict";t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},1356:function(t){"use strict";t.exports=function(t){return t[1]}},8422:function(t,e,n){var i=n(8961),r=n(4409),o=n(3039),s=n(6238),a=n(5062),l=n(408),c=Date.prototype.getTime;function u(t,e,n){var i=n||{};return!!(i.strict?o(t,e):t===e)||(!t||!e||"object"!==typeof t&&"object"!==typeof e?i.strict?o(t,e):t==e:A(t,e,i))}function h(t){return null===t||void 0===t}function d(t){return!(!t||"object"!==typeof t||"number"!==typeof t.length)&&("function"===typeof t.copy&&"function"===typeof t.slice&&!(t.length>0&&"number"!==typeof t[0]))}function A(t,e,n){var o,A;if(typeof t!==typeof e)return!1;if(h(t)||h(e))return!1;if(t.prototype!==e.prototype)return!1;if(r(t)!==r(e))return!1;var p=s(t),f=s(e);if(p!==f)return!1;if(p||f)return t.source===e.source&&a(t)===a(e);if(l(t)&&l(e))return c.call(t)===c.call(e);var g=d(t),m=d(e);if(g!==m)return!1;if(g||m){if(t.length!==e.length)return!1;for(o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}if(typeof t!==typeof e)return!1;try{var _=i(t),y=i(e)}catch(v){return!1}if(_.length!==y.length)return!1;for(_.sort(),y.sort(),o=_.length-1;o>=0;o--)if(_[o]!=y[o])return!1;for(o=_.length-1;o>=0;o--)if(A=_[o],!u(t[A],e[A],n))return!1;return!0}t.exports=u},9149:function(t,e,n){"use strict";var i=n(9265),r=n(5606),o=n(4658),s=n(233);t.exports=function(t,e,n){if(!t||"object"!==typeof t&&"function"!==typeof t)throw new o("`obj` must be an object or a function`");if("string"!==typeof e&&"symbol"!==typeof e)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],h=!!s&&s(t,e);if(i)i(t,e,{configurable:null===c&&h?h.configurable:!c,enumerable:null===a&&h?h.enumerable:!a,value:n,writable:null===l&&h?h.writable:!l});else{if(!u&&(a||l||c))throw new r("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=n}}},9477:function(t,e,n){"use strict";var i=n(8961),r="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=n(9149),l=function(t){return"function"===typeof t&&"[object Function]"===o.call(t)},c=n(5558)(),u=function(t,e,n,i){if(e in t)if(!0===i){if(t[e]===n)return}else if(!l(i)||!i())return;c?a(t,e,n,!0):a(t,e,n)},h=function(t,e){var n=arguments.length>2?arguments[2]:{},o=i(e);r&&(o=s.call(o,Object.getOwnPropertySymbols(e)));for(var a=0;a<o.length;a+=1)u(t,o[a],e[o[a]],n[o[a]])};h.supportsDescriptors=!!c,t.exports=h},6845:function(t){function e(t,e,n,i){this.dataset=[],this.epsilon=1,this.minPts=2,this.distance=this._euclideanDistance,this.clusters=[],this.noise=[],this._visited=[],this._assigned=[],this._datasetLength=0,this._init(t,e,n,i)}e.prototype.run=function(t,e,n,i){this._init(t,e,n,i);for(var r=0;r<this._datasetLength;r++)if(1!==this._visited[r]){this._visited[r]=1;var o=this._regionQuery(r);if(o.length<this.minPts)this.noise.push(r);else{var s=this.clusters.length;this.clusters.push([]),this._addToCluster(r,s),this._expandCluster(s,o)}}return this.clusters},e.prototype._init=function(t,e,n,i){if(t){if(!(t instanceof Array))throw Error("Dataset must be of type array, "+typeof t+" given");this.dataset=t,this.clusters=[],this.noise=[],this._datasetLength=t.length,this._visited=new Array(this._datasetLength),this._assigned=new Array(this._datasetLength)}e&&(this.epsilon=e),n&&(this.minPts=n),i&&(this.distance=i)},e.prototype._expandCluster=function(t,e){for(var n=0;n<e.length;n++){var i=e[n];if(1!==this._visited[i]){this._visited[i]=1;var r=this._regionQuery(i);r.length>=this.minPts&&(e=this._mergeArrays(e,r))}1!==this._assigned[i]&&this._addToCluster(i,t)}},e.prototype._addToCluster=function(t,e){this.clusters[e].push(t),this._assigned[t]=1},e.prototype._regionQuery=function(t){for(var e=[],n=0;n<this._datasetLength;n++){var i=this.distance(this.dataset[t],this.dataset[n]);i<this.epsilon&&e.push(n)}return e},e.prototype._mergeArrays=function(t,e){for(var n=e.length,i=0;i<n;i++){var r=e[i];t.indexOf(r)<0&&t.push(r)}return t},e.prototype._euclideanDistance=function(t,e){var n=0,i=Math.min(t.length,e.length);while(i--)n+=(t[i]-e[i])*(t[i]-e[i]);return Math.sqrt(n)},t.exports&&(t.exports=e)},5459:function(t){function e(t,e,n){this.k=3,this.dataset=[],this.assignments=[],this.centroids=[],this.init(t,e,n)}e.prototype.init=function(t,e,n){this.assignments=[],this.centroids=[],"undefined"!==typeof t&&(this.dataset=t),"undefined"!==typeof e&&(this.k=e),"undefined"!==typeof n&&(this.distance=n)},e.prototype.run=function(t,e){this.init(t,e);for(var n=this.dataset.length,i=0;i<this.k;i++)this.centroids[i]=this.randomCentroid();var r=!0;while(r){r=this.assign();for(var o=0;o<this.k;o++){for(var s=new Array(u),a=0,l=0;l<u;l++)s[l]=0;for(var c=0;c<n;c++){var u=this.dataset[c].length;if(o===this.assignments[c]){for(l=0;l<u;l++)s[l]+=this.dataset[c][l];a++}}if(a>0){for(l=0;l<u;l++)s[l]/=a;this.centroids[o]=s}else this.centroids[o]=this.randomCentroid(),r=!0}}return this.getClusters()},e.prototype.randomCentroid=function(){var t,e,n=this.dataset.length-1;do{e=Math.round(Math.random()*n),t=this.dataset[e]}while(this.centroids.indexOf(t)>=0);return t},e.prototype.assign=function(){for(var t,e=!1,n=this.dataset.length,i=0;i<n;i++)t=this.argmin(this.dataset[i],this.centroids,this.distance),t!=this.assignments[i]&&(this.assignments[i]=t,e=!0);return e},e.prototype.getClusters=function(){for(var t,e=new Array(this.k),n=0;n<this.assignments.length;n++)t=this.assignments[n],"undefined"===typeof e[t]&&(e[t]=[]),e[t].push(n);return e},e.prototype.argmin=function(t,e,n){for(var i,r=Number.MAX_VALUE,o=0,s=e.length,a=0;a<s;a++)i=n(t,e[a]),i<r&&(r=i,o=a);return o},e.prototype.distance=function(t,e){var n=0,i=Math.min(t.length,e.length);while(i--){var r=t[i]-e[i];n+=r*r}return Math.sqrt(n)},t.exports&&(t.exports=e)},2543:function(t,e,n){if(t.exports)var i=n(6401);function r(t,e,n,i){this.epsilon=1,this.minPts=1,this.distance=this._euclideanDistance,this._reachability=[],this._processed=[],this._coreDistance=0,this._orderedList=[],this._init(t,e,n,i)}r.prototype.run=function(t,e,n,r){this._init(t,e,n,r);for(var o=0,s=this.dataset.length;o<s;o++)if(1!==this._processed[o]){this._processed[o]=1,this.clusters.push([o]);var a=this.clusters.length-1;this._orderedList.push(o);var l=new i(null,null,"asc"),c=this._regionQuery(o);void 0!==this._distanceToCore(o)&&(this._updateQueue(o,c,l),this._expandCluster(a,l))}return this.clusters},r.prototype.getReachabilityPlot=function(){for(var t=[],e=0,n=this._orderedList.length;e<n;e++){var i=this._orderedList[e],r=this._reachability[i];t.push([i,r])}return t},r.prototype._init=function(t,e,n,i){if(t){if(!(t instanceof Array))throw Error("Dataset must be of type array, "+typeof t+" given");this.dataset=t,this.clusters=[],this._reachability=new Array(this.dataset.length),this._processed=new Array(this.dataset.length),this._coreDistance=0,this._orderedList=[]}e&&(this.epsilon=e),n&&(this.minPts=n),i&&(this.distance=i)},r.prototype._updateQueue=function(t,e,n){var i=this;this._coreDistance=this._distanceToCore(t),e.forEach((function(e){if(void 0===i._processed[e]){var r=i.distance(i.dataset[t],i.dataset[e]),o=Math.max(i._coreDistance,r);void 0===i._reachability[e]?(i._reachability[e]=o,n.insert(e,o)):o<i._reachability[e]&&(i._reachability[e]=o,n.remove(e),n.insert(e,o))}}))},r.prototype._expandCluster=function(t,e){for(var n=e.getElements(),i=0,r=n.length;i<r;i++){var o=n[i];if(void 0===this._processed[o]){var s=this._regionQuery(o);this._processed[o]=1,this.clusters[t].push(o),this._orderedList.push(o),void 0!==this._distanceToCore(o)&&(this._updateQueue(o,s,e),this._expandCluster(t,e))}}},r.prototype._distanceToCore=function(t){for(var e=this.epsilon,n=0;n<e;n++){var i=this._regionQuery(t,n);if(i.length>=this.minPts)return n}},r.prototype._regionQuery=function(t,e){e=e||this.epsilon;for(var n=[],i=0,r=this.dataset.length;i<r;i++)this.distance(this.dataset[t],this.dataset[i])<e&&n.push(i);return n},r.prototype._euclideanDistance=function(t,e){var n=0,i=Math.min(t.length,e.length);while(i--)n+=(t[i]-e[i])*(t[i]-e[i]);return Math.sqrt(n)},t.exports&&(t.exports=r)},6401:function(t){function e(t,e,n){this._queue=[],this._priorities=[],this._sorting="desc",this._init(t,e,n)}e.prototype.insert=function(t,e){var n=this._queue.length,i=n;while(i--){var r=this._priorities[i];"desc"===this._sorting?e>r&&(n=i):e<r&&(n=i)}this._insertAt(t,e,n)},e.prototype.remove=function(t){var e=this._queue.length;while(e--){var n=this._queue[e];if(t===n){this._queue.splice(e,1),this._priorities.splice(e,1);break}}},e.prototype.forEach=function(t){this._queue.forEach(t)},e.prototype.getElements=function(){return this._queue},e.prototype.getElementPriority=function(t){return this._priorities[t]},e.prototype.getPriorities=function(){return this._priorities},e.prototype.getElementsWithPriorities=function(){for(var t=[],e=0,n=this._queue.length;e<n;e++)t.push([this._queue[e],this._priorities[e]]);return t},e.prototype._init=function(t,e,n){if(t&&e){if(this._queue=[],this._priorities=[],t.length!==e.length)throw new Error("Arrays must have the same length");for(var i=0;i<t.length;i++)this.insert(t[i],e[i])}n&&(this._sorting=n)},e.prototype._insertAt=function(t,e,n){this._queue.length===n?(this._queue.push(t),this._priorities.push(e)):(this._queue.splice(n,0,t),this._priorities.splice(n,0,e))},t.exports&&(t.exports=e)},3700:function(t,e,n){t.exports&&(t.exports={DBSCAN:n(6845),KMEANS:n(5459),OPTICS:n(2543),PriorityQueue:n(6401)})},4621:function(t,e,n){"use strict";var i,r=n(2426),o=n(233);try{i=[].__proto__===Array.prototype}catch(c){if(!c||"object"!==typeof c||!("code"in c)||"ERR_PROTO_ACCESS"!==c.code)throw c}var s=!!i&&o&&o(Object.prototype,"__proto__"),a=Object,l=a.getPrototypeOf;t.exports=s&&"function"===typeof s.get?r([s.get]):"function"===typeof l&&function(t){return l(null==t?t:a(t))}},6120:function(t){"use strict";function e(t,e,i){i=i||2;var o,s,a,l,u,h,d,A=e&&e.length,p=A?e[0]*i:t.length,f=n(t,0,p,i,!0),g=[];if(!f||f.next===f.prev)return g;if(A&&(f=c(t,e,f,i)),t.length>80*i){o=a=t[0],s=l=t[1];for(var m=i;m<p;m+=i)u=t[m],h=t[m+1],u<o&&(o=u),h<s&&(s=h),u>a&&(a=u),h>l&&(l=h);d=Math.max(a-o,l-s),d=0!==d?32767/d:0}return r(f,g,i,o,s,d,0),g}function n(t,e,n,i,r){var o,s;if(r===P(t,e,n,i)>0)for(o=e;o<n;o+=i)s=T(o,t[o],t[o+1],s);else for(o=n-i;o>=e;o-=i)s=T(o,t[o],t[o+1],s);return s&&x(s,s.next)&&(I(s),s=s.next),s}function i(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!x(i,i.next)&&0!==v(i.prev,i,i.next))i=i.next;else{if(I(i),i=e=i.prev,i===i.next)break;n=!0}}while(n||i!==e);return e}function r(t,e,n,c,u,h,d){if(t){!d&&h&&p(t,c,u,h);var A,f,g=t;while(t.prev!==t.next)if(A=t.prev,f=t.next,h?s(t,c,u,h):o(t))e.push(A.i/n|0),e.push(t.i/n|0),e.push(f.i/n|0),I(t),t=f.next,g=f.next;else if(t=f,t===g){d?1===d?(t=a(i(t),e,n),r(t,e,n,c,u,h,2)):2===d&&l(t,e,n,c,u,h):r(i(t),e,n,c,u,h,1);break}}}function o(t){var e=t.prev,n=t,i=t.next;if(v(e,n,i)>=0)return!1;var r=e.x,o=n.x,s=i.x,a=e.y,l=n.y,c=i.y,u=r<o?r<s?r:s:o<s?o:s,h=a<l?a<c?a:c:l<c?l:c,d=r>o?r>s?r:s:o>s?o:s,A=a>l?a>c?a:c:l>c?l:c,p=i.next;while(p!==e){if(p.x>=u&&p.x<=d&&p.y>=h&&p.y<=A&&_(r,a,o,l,s,c,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function s(t,e,n,i){var r=t.prev,o=t,s=t.next;if(v(r,o,s)>=0)return!1;var a=r.x,l=o.x,c=s.x,u=r.y,h=o.y,d=s.y,A=a<l?a<c?a:c:l<c?l:c,p=u<h?u<d?u:d:h<d?h:d,f=a>l?a>c?a:c:l>c?l:c,m=u>h?u>d?u:d:h>d?h:d,y=g(A,p,e,n,i),x=g(f,m,e,n,i),b=t.prevZ,w=t.nextZ;while(b&&b.z>=y&&w&&w.z<=x){if(b.x>=A&&b.x<=f&&b.y>=p&&b.y<=m&&b!==r&&b!==s&&_(a,u,l,h,c,d,b.x,b.y)&&v(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,w.x>=A&&w.x<=f&&w.y>=p&&w.y<=m&&w!==r&&w!==s&&_(a,u,l,h,c,d,w.x,w.y)&&v(w.prev,w,w.next)>=0)return!1;w=w.nextZ}while(b&&b.z>=y){if(b.x>=A&&b.x<=f&&b.y>=p&&b.y<=m&&b!==r&&b!==s&&_(a,u,l,h,c,d,b.x,b.y)&&v(b.prev,b,b.next)>=0)return!1;b=b.prevZ}while(w&&w.z<=x){if(w.x>=A&&w.x<=f&&w.y>=p&&w.y<=m&&w!==r&&w!==s&&_(a,u,l,h,c,d,w.x,w.y)&&v(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function a(t,e,n){var r=t;do{var o=r.prev,s=r.next.next;!x(o,s)&&b(o,r,r.next,s)&&B(o,s)&&B(s,o)&&(e.push(o.i/n|0),e.push(r.i/n|0),e.push(s.i/n|0),I(r),I(r.next),r=t=s),r=r.next}while(r!==t);return i(r)}function l(t,e,n,o,s,a){var l=t;do{var c=l.next.next;while(c!==l.prev){if(l.i!==c.i&&y(l,c)){var u=M(l,c);return l=i(l,l.next),u=i(u,u.next),r(l,e,n,o,s,a,0),void r(u,e,n,o,s,a,0)}c=c.next}l=l.next}while(l!==t)}function c(t,e,i,r){var o,s,a,l,c,d=[];for(o=0,s=e.length;o<s;o++)a=e[o]*r,l=o<s-1?e[o+1]*r:t.length,c=n(t,a,l,r,!1),c===c.next&&(c.steiner=!0),d.push(m(c));for(d.sort(u),o=0;o<d.length;o++)i=h(d[o],i);return i}function u(t,e){return t.x-e.x}function h(t,e){var n=d(t,e);if(!n)return e;var r=M(n,t);return i(r,r.next),i(n,n.next)}function d(t,e){var n,i=e,r=t.x,o=t.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=r&&a>s&&(s=a,n=i.x<i.next.x?i:i.next,a===r))return n}i=i.next}while(i!==e);if(!n)return null;var l,c=n,u=n.x,h=n.y,d=1/0;i=n;do{r>=i.x&&i.x>=u&&r!==i.x&&_(o<h?r:s,o,u,h,o<h?s:r,o,i.x,i.y)&&(l=Math.abs(o-i.y)/(r-i.x),B(i,t)&&(l<d||l===d&&(i.x>n.x||i.x===n.x&&A(n,i)))&&(n=i,d=l)),i=i.next}while(i!==c);return n}function A(t,e){return v(t.prev,t,e.prev)<0&&v(e.next,t,t.next)<0}function p(t,e,n,i){var r=t;do{0===r.z&&(r.z=g(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,f(r)}function f(t){var e,n,i,r,o,s,a,l,c=1;do{n=t,t=null,o=null,s=0;while(n){for(s++,i=n,a=0,e=0;e<c;e++)if(a++,i=i.nextZ,!i)break;l=c;while(a>0||l>0&&i)0!==a&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,a--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,c*=2}while(s>1);return t}function g(t,e,n,i,r){return t=(t-n)*r|0,e=(e-i)*r|0,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function m(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function _(t,e,n,i,r,o,s,a){return(r-s)*(e-a)>=(t-s)*(o-a)&&(t-s)*(i-a)>=(n-s)*(e-a)&&(n-s)*(o-a)>=(r-s)*(i-a)}function y(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!C(t,e)&&(B(t,e)&&B(e,t)&&S(t,e)&&(v(t.prev,t,e.prev)||v(t,e.prev,e))||x(t,e)&&v(t.prev,t,t.next)>0&&v(e.prev,e,e.next)>0)}function v(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,n,i){var r=E(v(t,e,n)),o=E(v(t,e,i)),s=E(v(n,i,t)),a=E(v(n,i,e));return r!==o&&s!==a||(!(0!==r||!w(t,n,e))||(!(0!==o||!w(t,i,e))||(!(0!==s||!w(n,t,i))||!(0!==a||!w(n,e,i)))))}function w(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function E(t){return t>0?1:t<0?-1:0}function C(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&b(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function B(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function S(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!==n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}function M(t,e){var n=new L(t.i,t.x,t.y),i=new L(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function T(t,e,n,i){var r=new L(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function I(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function L(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function P(t,e,n,i){for(var r=0,o=e,s=n-i;o<n;o+=i)r+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return r}t.exports=e,t.exports["default"]=e,e.deviation=function(t,e,n,i){var r=e&&e.length,o=r?e[0]*n:t.length,s=Math.abs(P(t,0,o,n));if(r)for(var a=0,l=e.length;a<l;a++){var c=e[a]*n,u=a<l-1?e[a+1]*n:t.length;s-=Math.abs(P(t,c,u,n))}var h=0;for(a=0;a<i.length;a+=3){var d=i[a]*n,A=i[a+1]*n,p=i[a+2]*n;h+=Math.abs((t[d]-t[p])*(t[A+1]-t[d+1])-(t[d]-t[A])*(t[p+1]-t[d+1]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},e.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},i=0,r=0;r<t.length;r++){for(var o=0;o<t[r].length;o++)for(var s=0;s<e;s++)n.vertices.push(t[r][o][s]);r>0&&(i+=t[r-1].length,n.holes.push(i))}return n}},9265:function(t){"use strict";var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(n){e=!1}t.exports=e},83:function(t){"use strict";t.exports=EvalError},3387:function(t){"use strict";t.exports=Error},7429:function(t){"use strict";t.exports=RangeError},2916:function(t){"use strict";t.exports=ReferenceError},5606:function(t){"use strict";t.exports=SyntaxError},4658:function(t){"use strict";t.exports=TypeError},1760:function(t){"use strict";t.exports=URIError},9248:function(t){"use strict";t.exports=Object},6959:function(t){t.exports="object"==typeof self?self.FormData:window.FormData},337:function(t){"use strict";var e="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,i=Math.max,r="[object Function]",o=function(t,e){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var r=0;r<e.length;r+=1)n[r+t.length]=e[r];return n},s=function(t,e){for(var n=[],i=e||0,r=0;i<t.length;i+=1,r+=1)n[r]=t[i];return n},a=function(t,e){for(var n="",i=0;i<t.length;i+=1)n+=t[i],i+1<t.length&&(n+=e);return n};t.exports=function(t){var l=this;if("function"!==typeof l||n.apply(l)!==r)throw new TypeError(e+l);for(var c,u=s(arguments,1),h=function(){if(this instanceof c){var e=l.apply(this,o(u,arguments));return Object(e)===e?e:this}return l.apply(t,o(u,arguments))},d=i(0,l.length-u.length),A=[],p=0;p<d;p++)A[p]="$"+p;if(c=Function("binder","return function ("+a(A,",")+"){ return binder.apply(this,arguments); }")(h),l.prototype){var f=function(){};f.prototype=l.prototype,c.prototype=new f,f.prototype=null}return c}},434:function(t,e,n){"use strict";var i=n(337);t.exports=Function.prototype.bind||i},7998:function(t){"use strict";var e=function(){return"string"===typeof function(){}.name},n=Object.getOwnPropertyDescriptor;if(n)try{n([],"length")}catch(r){n=null}e.functionsHaveConfigurableNames=function(){if(!e()||!n)return!1;var t=n((function(){}),"name");return!!t&&!!t.configurable};var i=Function.prototype.bind;e.boundFunctionsHaveNames=function(){return e()&&"function"===typeof i&&""!==function(){}.bind().name},t.exports=e},343:function(t,e,n){var i=n(8422),r=function(t){this.precision=t&&t.precision?t.precision:17,this.direction=!(!t||!t.direction)&&t.direction,this.pseudoNode=!(!t||!t.pseudoNode)&&t.pseudoNode,this.objectComparator=t&&t.objectComparator?t.objectComparator:a};function o(t){return t.coordinates.map((function(e){return{type:t.type.replace("Multi",""),coordinates:e}}))}function s(t,e){return t.hasOwnProperty("coordinates")?t.coordinates.length===e.coordinates.length:t.length===e.length}function a(t,e){return i(t,e,{strict:!0})}r.prototype.compare=function(t,e){if(t.type!==e.type||!s(t,e))return!1;switch(t.type){case"Point":return this.compareCoord(t.coordinates,e.coordinates);case"LineString":return this.compareLine(t.coordinates,e.coordinates,0,!1);case"Polygon":return this.comparePolygon(t,e);case"Feature":return this.compareFeature(t,e);default:if(0===t.type.indexOf("Multi")){var n=this,i=o(t),r=o(e);return i.every((function(t){return this.some((function(e){return n.compare(t,e)}))}),r)}}return!1},r.prototype.compareCoord=function(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n].toFixed(this.precision)!==e[n].toFixed(this.precision))return!1;return!0},r.prototype.compareLine=function(t,e,n,i){if(!s(t,e))return!1;var r=this.pseudoNode?t:this.removePseudo(t),o=this.pseudoNode?e:this.removePseudo(e);if(!i||this.compareCoord(r[0],o[0])||(o=this.fixStartIndex(o,r),o)){var a=this.compareCoord(r[n],o[n]);return this.direction||a?this.comparePath(r,o):!!this.compareCoord(r[n],o[o.length-(1+n)])&&this.comparePath(r.slice().reverse(),o)}},r.prototype.fixStartIndex=function(t,e){for(var n,i=-1,r=0;r<t.length;r++)if(this.compareCoord(t[r],e[0])){i=r;break}return i>=0&&(n=[].concat(t.slice(i,t.length),t.slice(1,i+1))),n},r.prototype.comparePath=function(t,e){var n=this;return t.every((function(t,e){return n.compareCoord(t,this[e])}),e)},r.prototype.comparePolygon=function(t,e){if(this.compareLine(t.coordinates[0],e.coordinates[0],1,!0)){var n=t.coordinates.slice(1,t.coordinates.length),i=e.coordinates.slice(1,e.coordinates.length),r=this;return n.every((function(t){return this.some((function(e){return r.compareLine(t,e,1,!0)}))}),i)}return!1},r.prototype.compareFeature=function(t,e){return!(t.id!==e.id||!this.objectComparator(t.properties,e.properties)||!this.compareBBox(t,e))&&this.compare(t.geometry,e.geometry)},r.prototype.compareBBox=function(t,e){return!!(!t.bbox&&!e.bbox||t.bbox&&e.bbox&&this.compareCoord(t.bbox,e.bbox))},r.prototype.removePseudo=function(t){return t},t.exports=r},1494:function(t,e,n){var i=n(8866),r=n(1746),o=n(7482),s=n(7971).Z,a=o.featureEach,l=(o.coordEach,r.polygon,r.featureCollection);function c(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:s(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:s(t),e.push(t)})):a(t,(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:s(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:s(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 l(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 l(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=s(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=s(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}t.exports=c,t.exports["default"]=c},8866:function(t){!function(e,n){t.exports=n()}(0,(function(){"use strict";function t(t,i,r,o,s){!function t(n,i,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,l=i-r+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1),d=Math.max(r,Math.floor(i-l*u/a+h)),A=Math.min(o,Math.floor(i+(a-l)*u/a+h));t(n,i,d,A,s)}var p=n[i],f=r,g=o;for(e(n,r,i),s(n[o],p)>0&&e(n,r,o);f<g;){for(e(n,f,g),f++,g--;s(n[f],p)<0;)f++;for(;s(n[g],p)>0;)g--}0===s(n[r],p)?e(n,r,g):e(n,++g,o),g<=i&&(r=g+1),i<=g&&(o=g-1)}}(t,i,r||0,o||t.length-1,s||n)}function e(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function n(t,e){return t<e?-1:t>e?1:0}var i=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 r(t,e,n){if(!n)return e.indexOf(t);for(var i=0;i<e.length;i++)if(n(t,e[i]))return i;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,i,r){r||(r=p(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o=e;o<n;o++){var s=t.children[o];a(r,t.leaf?i(s):s)}return r}function a(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 l(t,e){return t.minX-e.minX}function c(t,e){return t.minY-e.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function A(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f(e,n,i,r,o){for(var s=[n,i];s.length;)if(!((i=s.pop())-(n=s.pop())<=r)){var a=n+Math.ceil((i-n)/r/2)*r;t(e,a,n,i,o),s.push(n,a,a,i)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var e=this.data,n=[];if(!A(t,e))return n;for(var i=this.toBBox,r=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?i(s):s;A(t,a)&&(e.leaf?n.push(s):d(t,a)?this._all(s,n):r.push(s))}e=r.pop()}return n},i.prototype.collides=function(t){var e=this.data;if(!A(t,e))return!1;for(var n=[];e;){for(var i=0;i<e.children.length;i++){var r=e.children[i],o=e.leaf?this.toBBox(r):r;if(A(t,o)){if(e.leaf||d(t,o))return!0;n.push(r)}}e=n.pop()}return!1},i.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 n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var i=this.data;this.data=n,n=i}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},i.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},i.prototype.clear=function(){return this.data=p([]),this},i.prototype.remove=function(t,e){if(!t)return this;for(var n,i,o,s=this.data,a=this.toBBox(t),l=[],c=[];s||l.length;){if(s||(s=l.pop(),i=l[l.length-1],n=c.pop(),o=!0),s.leaf){var u=r(t,s.children,e);if(-1!==u)return s.children.splice(u,1),l.push(s),this._condense(l),this}o||s.leaf||!d(s,a)?i?(n++,s=i.children[n],o=!1):s=null:(l.push(s),c.push(n),n=0,i=s,s=s.children[0])}return this},i.prototype.toBBox=function(t){return t},i.prototype.compareMinX=function(t,e){return t.minX-e.minX},i.prototype.compareMinY=function(t,e){return t.minY-e.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(t){return this.data=t,this},i.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},i.prototype._build=function(t,e,n,i){var r,s=n-e+1,a=this._maxEntries;if(s<=a)return o(r=p(t.slice(e,n+1)),this.toBBox),r;i||(i=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,i-1))),(r=p([])).leaf=!1,r.height=i;var l=Math.ceil(s/a),c=l*Math.ceil(Math.sqrt(a));f(t,e,n,c,this.compareMinX);for(var u=e;u<=n;u+=c){var h=Math.min(u+c-1,n);f(t,u,h,l,this.compareMinY);for(var d=u;d<=h;d+=l){var A=Math.min(d+l-1,h);r.children.push(this._build(t,d,A,i-1))}}return o(r,this.toBBox),r},i.prototype._chooseSubtree=function(t,e,n,i){for(;i.push(e),!e.leaf&&i.length-1!==n;){for(var r=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],c=u(l),h=(d=t,A=l,(Math.max(A.maxX,d.maxX)-Math.min(A.minX,d.minX))*(Math.max(A.maxY,d.maxY)-Math.min(A.minY,d.minY))-c);h<o?(o=h,r=c<r?c:r,s=l):h===o&&c<r&&(r=c,s=l)}e=s||e.children[0]}var d,A;return e},i.prototype._insert=function(t,e,n){var i=n?t:this.toBBox(t),r=[],o=this._chooseSubtree(i,this.data,e,r);for(o.children.push(t),a(o,i);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(i,r,e)},i.prototype._split=function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var s=this._chooseSplitIndex(n,r,i),a=p(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},i.prototype._splitRoot=function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,e,n){for(var i,r,o,a,l,c,h,d=1/0,A=1/0,p=e;p<=n-e;p++){var f=s(t,0,p,this.toBBox),g=s(t,p,n,this.toBBox),m=(r=f,o=g,a=void 0,l=void 0,c=void 0,h=void 0,a=Math.max(r.minX,o.minX),l=Math.max(r.minY,o.minY),c=Math.min(r.maxX,o.maxX),h=Math.min(r.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,h-l)),_=u(f)+u(g);m<d?(d=m,i=p,A=_<A?_:A):m===d&&_<A&&(A=_,i=p)}return i||n-e},i.prototype._chooseSplitAxis=function(t,e,n){var i=t.leaf?this.compareMinX:l,r=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,r)&&t.children.sort(i)},i.prototype._allDistMargin=function(t,e,n,i){t.children.sort(i);for(var r=this.toBBox,o=s(t,0,e,r),l=s(t,n-e,n,r),c=h(o)+h(l),u=e;u<n-e;u++){var d=t.children[u];a(o,t.leaf?r(d):d),c+=h(o)}for(var A=n-e-1;A>=e;A--){var p=t.children[A];a(l,t.leaf?r(p):p),c+=h(l)}return c},i.prototype._adjustParentBBoxes=function(t,e,n){for(var i=n;i>=0;i--)a(e[i],t)},i.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},i}))},9643:function(t,e,n){"use strict";var i,r=n(9248),o=n(3387),s=n(83),a=n(7429),l=n(2916),c=n(5606),u=n(4658),h=n(1760),d=n(9755),A=n(1569),p=n(1554),f=n(1838),g=n(9004),m=n(8214),_=n(360),y=Function,v=function(t){try{return y('"use strict"; return ('+t+").constructor;")()}catch(e){}},x=n(233),b=n(9265),w=function(){throw new u},E=x?function(){try{return w}catch(t){try{return x(arguments,"callee").get}catch(e){return w}}}():w,C=n(6608)(),B=n(9750),S=n(5605),M=n(3017),T=n(1781),I=n(2108),L={},P="undefined"!==typeof Uint8Array&&B?B(Uint8Array):i,F={__proto__:null,"%AggregateError%":"undefined"===typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":C&&B?B([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%Atomics%":"undefined"===typeof Atomics?i:Atomics,"%BigInt%":"undefined"===typeof BigInt?i:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"undefined"===typeof Float16Array?i:Float16Array,"%Float32Array%":"undefined"===typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":y,"%GeneratorFunction%":L,"%Int8Array%":"undefined"===typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&B?B(B([][Symbol.iterator]())):i,"%JSON%":"object"===typeof JSON?JSON:i,"%Map%":"undefined"===typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&C&&B?B((new Map)[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?i:Promise,"%Proxy%":"undefined"===typeof Proxy?i:Proxy,"%RangeError%":a,"%ReferenceError%":l,"%Reflect%":"undefined"===typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&C&&B?B((new Set)[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&B?B(""[Symbol.iterator]()):i,"%Symbol%":C?Symbol:i,"%SyntaxError%":c,"%ThrowTypeError%":E,"%TypedArray%":P,"%TypeError%":u,"%Uint8Array%":"undefined"===typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?i:Uint32Array,"%URIError%":h,"%WeakMap%":"undefined"===typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?i:WeakSet,"%Function.prototype.call%":I,"%Function.prototype.apply%":T,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":S,"%Math.abs%":d,"%Math.floor%":A,"%Math.max%":p,"%Math.min%":f,"%Math.pow%":g,"%Math.round%":m,"%Math.sign%":_,"%Reflect.getPrototypeOf%":M};if(B)try{null.error}catch(X){var R=B(B(X));F["%Error.prototype%"]=R}var D=function t(e){var n;if("%AsyncFunction%"===e)n=v("async function () {}");else if("%GeneratorFunction%"===e)n=v("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=v("async function* () {}");else if("%AsyncGenerator%"===e){var i=t("%AsyncGeneratorFunction%");i&&(n=i.prototype)}else if("%AsyncIteratorPrototype%"===e){var r=t("%AsyncGenerator%");r&&B&&(n=B(r.prototype))}return F[e]=n,n},O={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},U=n(434),N=n(7451),k=U.call(I,Array.prototype.concat),z=U.call(T,Array.prototype.splice),Q=U.call(I,String.prototype.replace),G=U.call(I,String.prototype.slice),H=U.call(I,RegExp.prototype.exec),V=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,Z=function(t){var e=G(t,0,1),n=G(t,-1);if("%"===e&&"%"!==n)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new c("invalid intrinsic syntax, expected opening `%`");var i=[];return Q(t,V,(function(t,e,n,r){i[i.length]=n?Q(r,j,"$1"):e||t})),i},W=function(t,e){var n,i=t;if(N(O,i)&&(n=O[i],i="%"+n[0]+"%"),N(F,i)){var r=F[i];if(r===L&&(r=D(i)),"undefined"===typeof r&&!e)throw new u("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:r}}throw new c("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!==typeof t||0===t.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof e)throw new u('"allowMissing" argument must be a boolean');if(null===H(/^%?[^%]*%?$/,t))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Z(t),i=n.length>0?n[0]:"",r=W("%"+i+"%",e),o=r.name,s=r.value,a=!1,l=r.alias;l&&(i=l[0],z(n,k([0,1],l)));for(var h=1,d=!0;h<n.length;h+=1){var A=n[h],p=G(A,0,1),f=G(A,-1);if(('"'===p||"'"===p||"`"===p||'"'===f||"'"===f||"`"===f)&&p!==f)throw new c("property names with quotes must have matching quotes");if("constructor"!==A&&d||(a=!0),i+="."+A,o="%"+i+"%",N(F,o))s=F[o];else if(null!=s){if(!(A in s)){if(!e)throw new u("base intrinsic for "+t+" exists, but the property is not available.");return}if(x&&h+1>=n.length){var g=x(s,A);d=!!g,s=d&&"get"in g&&!("originalValue"in g.get)?g.get:s[A]}else d=N(s,A),s=s[A];d&&!a&&(F[o]=s)}}return s}},5605:function(t,e,n){"use strict";var i=n(9248);t.exports=i.getPrototypeOf||null},3017:function(t){"use strict";t.exports="undefined"!==typeof Reflect&&Reflect.getPrototypeOf||null},9750:function(t,e,n){"use strict";var i=n(3017),r=n(5605),o=n(4621);t.exports=i?function(t){return i(t)}:r?function(t){if(!t||"object"!==typeof t&&"function"!==typeof t)throw new TypeError("getProto: not an object");return r(t)}:o?function(t){return o(t)}:null},1667:function(t,e,n){"use strict";n.d(e,{Ib:function(){return i},WT:function(){return r}});var i=1e-6,r="undefined"!==typeof Float32Array?Float32Array:Array;Math.random;Math.PI;Math.hypot||(Math.hypot=function(){var t=0,e=arguments.length;while(e--)t+=arguments[e]*arguments[e];return Math.sqrt(t)})},5678:function(t,e,n){"use strict";n.d(e,{GH:function(){return a},Iu:function(){return c},Jp:function(){return l},U1:function(){return u},U_:function(){return s},Ue:function(){return r},bA:function(){return h},en:function(){return d},p4:function(){return o}});var i=n(1667);function r(){var t=new i.WT(9);return i.WT!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function o(t,e){if(t===e){var n=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function s(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=u*s-a*c,d=-u*o+a*l,A=c*o-s*l,p=n*h+i*d+r*A;return p?(p=1/p,t[0]=h*p,t[1]=(-u*i+r*c)*p,t[2]=(a*i-r*s)*p,t[3]=d*p,t[4]=(u*n-r*l)*p,t[5]=(-a*n+r*o)*p,t[6]=A*p,t[7]=(-c*n+i*l)*p,t[8]=(s*n-i*o)*p,t):null}function a(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],s=t[5],a=t[6],l=t[7],c=t[8];return e*(c*o-s*l)+n*(-c*r+s*a)+i*(l*r-o*a)}function l(t,e,n){var i=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=n[0],A=n[1],p=n[2],f=n[3],g=n[4],m=n[5],_=n[6],y=n[7],v=n[8];return t[0]=d*i+A*s+p*c,t[1]=d*r+A*a+p*u,t[2]=d*o+A*l+p*h,t[3]=f*i+g*s+m*c,t[4]=f*r+g*a+m*u,t[5]=f*o+g*l+m*h,t[6]=_*i+y*s+v*c,t[7]=_*r+y*a+v*u,t[8]=_*o+y*l+v*h,t}function c(t,e,n){var i=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=n[0],A=n[1];return t[0]=i,t[1]=r,t[2]=o,t[3]=s,t[4]=a,t[5]=l,t[6]=d*i+A*s+c,t[7]=d*r+A*a+u,t[8]=d*o+A*l+h,t}function u(t,e,n){var i=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=Math.sin(n),A=Math.cos(n);return t[0]=A*i+d*s,t[1]=A*r+d*a,t[2]=A*o+d*l,t[3]=A*s-d*i,t[4]=A*a-d*r,t[5]=A*l-d*o,t[6]=c,t[7]=u,t[8]=h,t}function h(t,e,n){var i=n[0],r=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function d(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],s=n+n,a=i+i,l=r+r,c=n*s,u=i*s,h=i*a,d=r*s,A=r*a,p=r*l,f=o*s,g=o*a,m=o*l;return t[0]=1-h-p,t[3]=u-m,t[6]=d+g,t[1]=u+m,t[4]=1-c-p,t[7]=A-f,t[2]=d-g,t[5]=A+f,t[8]=1-c-h,t}},6977:function(t,e,n){"use strict";n.d(e,{G3:function(){return y},GH:function(){return a},Iu:function(){return c},Jp:function(){return l},M5:function(){return x},Q$:function(){return f},U1:function(){return h},U_:function(){return s},bA:function(){return u},en:function(){return g},jI:function(){return p},lM:function(){return d},oy:function(){return m},p4:function(){return o},uD:function(){return A},zB:function(){return b}});var i=n(1667);function r(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function o(t,e){if(t===e){var n=e[1],i=e[2],r=e[3],o=e[6],s=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=o,t[11]=e[14],t[12]=r,t[13]=s,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function s(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],A=e[11],p=e[12],f=e[13],g=e[14],m=e[15],_=n*a-i*s,y=n*l-r*s,v=n*c-o*s,x=i*l-r*a,b=i*c-o*a,w=r*c-o*l,E=u*f-h*p,C=u*g-d*p,B=u*m-A*p,S=h*g-d*f,M=h*m-A*f,T=d*m-A*g,I=_*T-y*M+v*S+x*B-b*C+w*E;return I?(I=1/I,t[0]=(a*T-l*M+c*S)*I,t[1]=(r*M-i*T-o*S)*I,t[2]=(f*w-g*b+m*x)*I,t[3]=(d*b-h*w-A*x)*I,t[4]=(l*B-s*T-c*C)*I,t[5]=(n*T-r*B+o*C)*I,t[6]=(g*v-p*w-m*y)*I,t[7]=(u*w-d*v+A*y)*I,t[8]=(s*M-a*B+c*E)*I,t[9]=(i*B-n*M-o*E)*I,t[10]=(p*b-f*v+m*_)*I,t[11]=(h*v-u*b-A*_)*I,t[12]=(a*C-s*S-l*E)*I,t[13]=(n*S-i*C+r*E)*I,t[14]=(f*y-p*x-g*_)*I,t[15]=(u*x-h*y+d*_)*I,t):null}function a(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],s=t[5],a=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11],A=t[12],p=t[13],f=t[14],g=t[15],m=e*s-n*o,_=e*a-i*o,y=e*l-r*o,v=n*a-i*s,x=n*l-r*s,b=i*l-r*a,w=c*p-u*A,E=c*f-h*A,C=c*g-d*A,B=u*f-h*p,S=u*g-d*p,M=h*g-d*f;return m*M-_*S+y*B+v*C-x*E+b*w}function l(t,e,n){var i=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=e[9],A=e[10],p=e[11],f=e[12],g=e[13],m=e[14],_=e[15],y=n[0],v=n[1],x=n[2],b=n[3];return t[0]=y*i+v*a+x*h+b*f,t[1]=y*r+v*l+x*d+b*g,t[2]=y*o+v*c+x*A+b*m,t[3]=y*s+v*u+x*p+b*_,y=n[4],v=n[5],x=n[6],b=n[7],t[4]=y*i+v*a+x*h+b*f,t[5]=y*r+v*l+x*d+b*g,t[6]=y*o+v*c+x*A+b*m,t[7]=y*s+v*u+x*p+b*_,y=n[8],v=n[9],x=n[10],b=n[11],t[8]=y*i+v*a+x*h+b*f,t[9]=y*r+v*l+x*d+b*g,t[10]=y*o+v*c+x*A+b*m,t[11]=y*s+v*u+x*p+b*_,y=n[12],v=n[13],x=n[14],b=n[15],t[12]=y*i+v*a+x*h+b*f,t[13]=y*r+v*l+x*d+b*g,t[14]=y*o+v*c+x*A+b*m,t[15]=y*s+v*u+x*p+b*_,t}function c(t,e,n){var i,r,o,s,a,l,c,u,h,d,A,p,f=n[0],g=n[1],m=n[2];return e===t?(t[12]=e[0]*f+e[4]*g+e[8]*m+e[12],t[13]=e[1]*f+e[5]*g+e[9]*m+e[13],t[14]=e[2]*f+e[6]*g+e[10]*m+e[14],t[15]=e[3]*f+e[7]*g+e[11]*m+e[15]):(i=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=e[9],A=e[10],p=e[11],t[0]=i,t[1]=r,t[2]=o,t[3]=s,t[4]=a,t[5]=l,t[6]=c,t[7]=u,t[8]=h,t[9]=d,t[10]=A,t[11]=p,t[12]=i*f+a*g+h*m+e[12],t[13]=r*f+l*g+d*m+e[13],t[14]=o*f+c*g+A*m+e[14],t[15]=s*f+u*g+p*m+e[15]),t}function u(t,e,n){var i=n[0],r=n[1],o=n[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function h(t,e,n,r){var o,s,a,l,c,u,h,d,A,p,f,g,m,_,y,v,x,b,w,E,C,B,S,M,T=r[0],I=r[1],L=r[2],P=Math.hypot(T,I,L);return P<i.Ib?null:(P=1/P,T*=P,I*=P,L*=P,o=Math.sin(n),s=Math.cos(n),a=1-s,l=e[0],c=e[1],u=e[2],h=e[3],d=e[4],A=e[5],p=e[6],f=e[7],g=e[8],m=e[9],_=e[10],y=e[11],v=T*T*a+s,x=I*T*a+L*o,b=L*T*a-I*o,w=T*I*a-L*o,E=I*I*a+s,C=L*I*a+T*o,B=T*L*a+I*o,S=I*L*a-T*o,M=L*L*a+s,t[0]=l*v+d*x+g*b,t[1]=c*v+A*x+m*b,t[2]=u*v+p*x+_*b,t[3]=h*v+f*x+y*b,t[4]=l*w+d*E+g*C,t[5]=c*w+A*E+m*C,t[6]=u*w+p*E+_*C,t[7]=h*w+f*E+y*C,t[8]=l*B+d*S+g*M,t[9]=c*B+A*S+m*M,t[10]=u*B+p*S+_*M,t[11]=h*B+f*S+y*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function d(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[4],s=e[5],a=e[6],l=e[7],c=e[8],u=e[9],h=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*r+c*i,t[5]=s*r+u*i,t[6]=a*r+h*i,t[7]=l*r+d*i,t[8]=c*r-o*i,t[9]=u*r-s*i,t[10]=h*r-a*i,t[11]=d*r-l*i,t}function A(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[0],s=e[1],a=e[2],l=e[3],c=e[8],u=e[9],h=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*r-c*i,t[1]=s*r-u*i,t[2]=a*r-h*i,t[3]=l*r-d*i,t[8]=o*i+c*r,t[9]=s*i+u*r,t[10]=a*i+h*r,t[11]=l*i+d*r,t}function p(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[0],s=e[1],a=e[2],l=e[3],c=e[4],u=e[5],h=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*r+c*i,t[1]=s*r+u*i,t[2]=a*r+h*i,t[3]=l*r+d*i,t[4]=c*r-o*i,t[5]=u*r-s*i,t[6]=h*r-a*i,t[7]=d*r-l*i,t}function f(t,e){var n=e[0],i=e[1],r=e[2],o=e[4],s=e[5],a=e[6],l=e[8],c=e[9],u=e[10];return t[0]=Math.hypot(n,i,r),t[1]=Math.hypot(o,s,a),t[2]=Math.hypot(l,c,u),t}function g(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],s=n+n,a=i+i,l=r+r,c=n*s,u=i*s,h=i*a,d=r*s,A=r*a,p=r*l,f=o*s,g=o*a,m=o*l;return t[0]=1-h-p,t[1]=u+m,t[2]=d-g,t[3]=0,t[4]=u-m,t[5]=1-c-p,t[6]=A+f,t[7]=0,t[8]=d+g,t[9]=A-f,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function m(t,e,n,i,r,o,s){var a=1/(n-e),l=1/(r-i),c=1/(o-s);return t[0]=2*o*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(n+e)*a,t[9]=(r+i)*l,t[10]=(s+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*o*2*c,t[15]=0,t}function _(t,e,n,i,r){var o,s=1/Math.tan(e/2);return t[0]=s/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=r&&r!==1/0?(o=1/(i-r),t[10]=(r+i)*o,t[14]=2*r*i*o):(t[10]=-1,t[14]=-2*i),t}var y=_;function v(t,e,n,i,r,o,s){var a=1/(e-n),l=1/(i-r),c=1/(o-s);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*a,t[13]=(r+i)*l,t[14]=(s+o)*c,t[15]=1,t}var x=v;function b(t,e,n,o){var s,a,l,c,u,h,d,A,p,f,g=e[0],m=e[1],_=e[2],y=o[0],v=o[1],x=o[2],b=n[0],w=n[1],E=n[2];return Math.abs(g-b)<i.Ib&&Math.abs(m-w)<i.Ib&&Math.abs(_-E)<i.Ib?r(t):(d=g-b,A=m-w,p=_-E,f=1/Math.hypot(d,A,p),d*=f,A*=f,p*=f,s=v*p-x*A,a=x*d-y*p,l=y*A-v*d,f=Math.hypot(s,a,l),f?(f=1/f,s*=f,a*=f,l*=f):(s=0,a=0,l=0),c=A*l-p*a,u=p*s-d*l,h=d*a-A*s,f=Math.hypot(c,u,h),f?(f=1/f,c*=f,u*=f,h*=f):(c=0,u=0,h=0),t[0]=s,t[1]=c,t[2]=d,t[3]=0,t[4]=a,t[5]=u,t[6]=A,t[7]=0,t[8]=l,t[9]=h,t[10]=p,t[11]=0,t[12]=-(s*g+a*m+l*_),t[13]=-(c*g+u*m+h*_),t[14]=-(d*g+A*m+p*_),t[15]=1,t)}},4928:function(t,e,n){"use strict";n.d(e,{IH:function(){return o},c:function(){return l},fF:function(){return h},iu:function(){return c},kK:function(){return u},t7:function(){return a},tk:function(){return s}});var i=n(1667);function r(){var t=new i.WT(2);return i.WT!=Float32Array&&(t[0]=0,t[1]=0),t}function o(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function s(t,e){return t[0]=-e[0],t[1]=-e[1],t}function a(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t}function l(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t}function c(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function u(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t}function h(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t}(function(){var t=r()})()},8484:function(t,e,n){"use strict";n.d(e,{AK:function(){return u},EU:function(){return _},Fv:function(){return c},Ue:function(){return r},VC:function(){return p},Zh:function(){return v},al:function(){return s},fF:function(){return d},jI:function(){return m},kC:function(){return h},kE:function(){return o},kK:function(){return A},lM:function(){return f},lu:function(){return y},tk:function(){return l},uD:function(){return g}});var i=n(1667);function r(){var t=new i.WT(3);return i.WT!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function o(t){var e=t[0],n=t[1],i=t[2];return Math.hypot(e,n,i)}function s(t,e,n){var r=new i.WT(3);return r[0]=t,r[1]=e,r[2]=n,r}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function l(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function c(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function u(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function h(t,e,n){var i=e[0],r=e[1],o=e[2],s=n[0],a=n[1],l=n[2];return t[0]=r*l-o*a,t[1]=o*s-i*l,t[2]=i*a-r*s,t}function d(t,e,n){var i=e[0],r=e[1],o=e[2],s=n[3]*i+n[7]*r+n[11]*o+n[15];return s=s||1,t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/s,t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/s,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/s,t}function A(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t}function p(t,e,n){var i=n[0],r=n[1],o=n[2],s=n[3],a=e[0],l=e[1],c=e[2],u=r*c-o*l,h=o*a-i*c,d=i*l-r*a,A=r*d-o*h,p=o*u-i*d,f=i*h-r*u,g=2*s;return u*=g,h*=g,d*=g,A*=2,p*=2,f*=2,t[0]=a+u+A,t[1]=l+h+p,t[2]=c+d+f,t}function f(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0],o[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),o[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function g(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),o[1]=r[1],o[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function m(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),o[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),o[2]=r[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function _(t,e){var n=t[0],i=t[1],r=t[2],o=e[0],s=e[1],a=e[2],l=Math.sqrt(n*n+i*i+r*r),c=Math.sqrt(o*o+s*s+a*a),h=l*c,d=h&&u(t,e)/h;return Math.acos(Math.min(Math.max(d,-1),1))}var y=a,v=o;(function(){var t=r()})()},800:function(t,e,n){"use strict";n.d(e,{AK:function(){return p},Fv:function(){return A},I6:function(){return _},IH:function(){return c},JG:function(){return a},VC:function(){return m},al:function(){return s},bA:function(){return u},d9:function(){return o},fF:function(){return g},fS:function(){return y},kE:function(){return h},t7:function(){return f},t8:function(){return l},we:function(){return d}});var i=n(1667);function r(){var t=new i.WT(4);return i.WT!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function o(t){var e=new i.WT(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function s(t,e,n,r){var o=new i.WT(4);return o[0]=t,o[1]=e,o[2]=n,o[3]=r,o}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function l(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function c(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function u(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function h(t){var e=t[0],n=t[1],i=t[2],r=t[3];return Math.hypot(e,n,i,r)}function d(t){var e=t[0],n=t[1],i=t[2],r=t[3];return e*e+n*n+i*i+r*r}function A(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],s=n*n+i*i+r*r+o*o;return s>0&&(s=1/Math.sqrt(s)),t[0]=n*s,t[1]=i*s,t[2]=r*s,t[3]=o*s,t}function p(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function f(t,e,n,i){var r=e[0],o=e[1],s=e[2],a=e[3];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=s+i*(n[2]-s),t[3]=a+i*(n[3]-a),t}function g(t,e,n){var i=e[0],r=e[1],o=e[2],s=e[3];return t[0]=n[0]*i+n[4]*r+n[8]*o+n[12]*s,t[1]=n[1]*i+n[5]*r+n[9]*o+n[13]*s,t[2]=n[2]*i+n[6]*r+n[10]*o+n[14]*s,t[3]=n[3]*i+n[7]*r+n[11]*o+n[15]*s,t}function m(t,e,n){var i=e[0],r=e[1],o=e[2],s=n[0],a=n[1],l=n[2],c=n[3],u=c*i+a*o-l*r,h=c*r+l*i-s*o,d=c*o+s*r-a*i,A=-s*i-a*r-l*o;return t[0]=u*c+A*-s+h*-l-d*-a,t[1]=h*c+A*-a+d*-s-u*-l,t[2]=d*c+A*-l+u*-a-h*-s,t[3]=e[3],t}function _(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function y(t,e){var n=t[0],r=t[1],o=t[2],s=t[3],a=e[0],l=e[1],c=e[2],u=e[3];return Math.abs(n-a)<=i.Ib*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-l)<=i.Ib*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(o-c)<=i.Ib*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(s-u)<=i.Ib*Math.max(1,Math.abs(s),Math.abs(u))}(function(){var t=r()})()},4727:function(t){"use strict";t.exports=Object.getOwnPropertyDescriptor},233:function(t,e,n){"use strict";var i=n(4727);if(i)try{i([],"length")}catch(r){i=null}t.exports=i},5974:function(t,e,n){var i;
|
|
2
2
|
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
3
3
|
* http://hammerjs.github.io/
|
|
4
4
|
*
|
|
@@ -34,7 +34,7 @@ object-assign
|
|
|
34
34
|
* @author Alexander Milevski <info@w8r.name>
|
|
35
35
|
* @license MIT
|
|
36
36
|
* @preserve
|
|
37
|
-
*/var i=function(){function t(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return t}();function r(t,e){return t>e?1:t<e?-1:0}function o(t,e,n){var r=new i(null,null),o=r,s=r;while(1){var a=n(t,e.key);if(a<0){if(null===e.left)break;if(n(t,e.left.key)<0){var l=e.left;if(e.left=l.right,l.right=e,e=l,null===e.left)break}s.left=e,s=e,e=e.left}else{if(!(a>0))break;if(null===e.right)break;if(n(t,e.right.key)>0){l=e.right;if(e.right=l.left,l.left=e,e=l,null===e.right)break}o.right=e,o=e,e=e.right}}return o.right=e.left,s.left=e.right,e.left=r.right,e.right=r.left,e}function s(t,e,n,r){var s=new i(t,e);if(null===n)return s.left=s.right=null,s;n=o(t,n,r);var a=r(t,n.key);return a<0?(s.left=n.left,s.right=n,n.left=null):a>=0&&(s.right=n.right,s.left=n,n.right=null),s}function a(t,e,n){var i=null,r=null;if(e){e=o(t,e,n);var s=n(e.key,t);0===s?(i=e.left,r=e.right):s<0?(r=e.right,e.right=null,i=e):(i=e.left,e.left=null,r=e)}return{left:i,right:r}}function l(t,e,n){return null===e?t:(null===t||(e=o(t.key,e,n),e.left=t),e)}function c(t,e,n,i,r){if(t){i(e+(n?"└── ":"├── ")+r(t)+"\n");var o=e+(n?" ":"│ ");t.left&&c(t.left,o,!1,i,r),t.right&&c(t.right,o,!0,i,r)}}var u=function(){function t(t){void 0===t&&(t=r),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,e){return this._size++,this._root=s(t,e,this._root,this._comparator)},t.prototype.add=function(t,e){var n=new i(t,e);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,s=o(t,this._root,r),a=r(t,s.key);return 0===a?this._root=s:(a<0?(n.left=s.left,n.right=s,s.left=null):a>0&&(n.right=s.right,n.left=s,s.right=null),this._size++,this._root=n),this._root},t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},t.prototype._remove=function(t,e,n){var i;if(null===e)return null;e=o(t,e,n);var r=n(t,e.key);return 0===r?(null===e.left?i=e.right:(i=o(t,e.left,n),i.right=e.right),this._size--,i):e},t.prototype.pop=function(){var t=this._root;if(t){while(t.left)t=t.left;return this._root=o(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},t.prototype.findStatic=function(t){var e=this._root,n=this._comparator;while(e){var i=n(t,e.key);if(0===i)return e;e=i<0?e.left:e.right}return null},t.prototype.find=function(t){return this._root&&(this._root=o(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},t.prototype.contains=function(t){var e=this._root,n=this._comparator;while(e){var i=n(t,e.key);if(0===i)return!0;e=i<0?e.left:e.right}return!1},t.prototype.forEach=function(t,e){var n=this._root,i=[],r=!1;while(!r)null!==n?(i.push(n),n=n.left):0!==i.length?(n=i.pop(),t.call(e,n),n=n.right):r=!0;return this},t.prototype.range=function(t,e,n,i){var r,o=[],s=this._comparator,a=this._root;while(0!==o.length||a)if(a)o.push(a),a=a.left;else{if(a=o.pop(),r=s(a.key,e),r>0)break;if(s(a.key,t)>=0&&n.call(i,a))return this;a=a.right}return this},t.prototype.keys=function(){var t=[];return this.forEach((function(e){var n=e.key;return t.push(n)})),t},t.prototype.values=function(){var t=[];return this.forEach((function(e){var n=e.data;return t.push(n)})),t},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)while(t.left)t=t.left;return t},t.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)while(t.right)t=t.right;return t},t.prototype.at=function(t){var e=this._root,n=!1,i=0,r=[];while(!n)if(e)r.push(e),e=e.left;else if(r.length>0){if(e=r.pop(),i===t)return e;i++,e=e.right}else n=!0;return null},t.prototype.next=function(t){var e=this._root,n=null;if(t.right){n=t.right;while(n.left)n=n.left;return n}var i=this._comparator;while(e){var r=i(t.key,e.key);if(0===r)break;r<0?(n=e,e=e.left):e=e.right}return n},t.prototype.prev=function(t){var e=this._root,n=null;if(null!==t.left){n=t.left;while(n.right)n=n.right;return n}var i=this._comparator;while(e){var r=i(t.key,e.key);if(0===r)break;r<0?e=e.left:(n=e,e=e.right)}return n},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return A(this._root)},t.prototype.load=function(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=!1);var i=t.length,r=this._comparator;if(n&&g(t,e,0,i-1,r),null===this._root)this._root=h(t,e,0,i),this._size=i;else{var o=f(this.toList(),d(t,e),r);i=this._size+i,this._root=p({head:o},0,i)}return this},t.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(t){void 0===t&&(t=function(t){return String(t.key)});var e=[];return c(this._root,"",!0,(function(t){return e.push(t)}),t),e.join("")},t.prototype.update=function(t,e,n){var i=this._comparator,r=a(t,this._root,i),o=r.left,c=r.right;i(t,e)<0?c=s(e,n,c,i):o=s(e,n,o,i),this._root=l(o,c,i)},t.prototype.split=function(t){return a(t,this._root,this._comparator)},t}();function h(t,e,n,r){var o=r-n;if(o>0){var s=n+Math.floor(o/2),a=t[s],l=e[s],c=new i(a,l);return c.left=h(t,e,n,s),c.right=h(t,e,s+1,r),c}return null}function d(t,e){for(var n=new i(null,null),r=n,o=0;o<t.length;o++)r=r.next=new i(t[o],e[o]);return r.next=null,n.next}function A(t){var e=t,n=[],r=!1,o=new i(null,null),s=o;while(!r)e?(n.push(e),e=e.left):n.length>0?(e=s=s.next=n.pop(),e=e.right):r=!0;return s.next=null,o.next}function p(t,e,n){var i=n-e;if(i>0){var r=e+Math.floor(i/2),o=p(t,e,r),s=t.head;return s.left=o,t.head=t.head.next,s.right=p(t,r+1,n),s}return null}function f(t,e,n){var r=new i(null,null),o=r,s=t,a=e;while(null!==s&&null!==a)n(s.key,a.key)<0?(o.next=s,s=s.next):(o.next=a,a=a.next),o=o.next;return null!==s?o.next=s:null!==a&&(o.next=a),r.next}function g(t,e,n,i,r){if(!(n>=i)){var o=t[n+i>>1],s=n-1,a=i+1;while(1){do{s++}while(r(t[s],o)<0);do{a--}while(r(t[a],o)>0);if(s>=a)break;var l=t[s];t[s]=t[a],t[a]=l,l=e[s],e[s]=e[a],e[a]=l}g(t,e,n,a,r),g(t,e,a+1,i,r)}}var m=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},_=function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var n=t.ll.x<e.ll.x?e.ll.x:t.ll.x,i=t.ur.x<e.ur.x?t.ur.x:e.ur.x,r=t.ll.y<e.ll.y?e.ll.y:t.ll.y,o=t.ur.y<e.ur.y?t.ur.y:e.ur.y;return{ll:{x:n,y:r},ur:{x:i,y:o}}},y=Number.EPSILON;void 0===y&&(y=Math.pow(2,-52));var v=y*y,x=function(t,e){if(-y<t&&t<y&&-y<e&&e<y)return 0;var n=t-e;return n*n<v*t*e?0:t<e?-1:1},b=function(){function e(){t(this,e),this.reset()}return n(e,[{key:"reset",value:function(){this.xRounder=new w,this.yRounder=new w}},{key:"round",value:function(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}]),e}(),w=function(){function e(){t(this,e),this.tree=new u,this.round(0)}return n(e,[{key:"round",value:function(t){var e=this.tree.add(t),n=this.tree.prev(e);if(null!==n&&0===x(e.key,n.key))return this.tree.remove(t),n.key;var i=this.tree.next(e);return null!==i&&0===x(e.key,i.key)?(this.tree.remove(t),i.key):t}}]),e}(),E=new b,C=function(t,e){return t.x*e.y-t.y*e.x},B=function(t,e){return t.x*e.x+t.y*e.y},S=function(t,e,n){var i={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y},o=C(i,r);return x(o,0)},M=function(t){return Math.sqrt(B(t,t))},T=function(t,e,n){var i={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y};return C(r,i)/M(r)/M(i)},I=function(t,e,n){var i={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y};return B(r,i)/M(r)/M(i)},L=function(t,e,n){return 0===e.y?null:{x:t.x+e.x/e.y*(n-t.y),y:n}},P=function(t,e,n){return 0===e.x?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}},F=function(t,e,n,i){if(0===e.x)return P(n,i,t.x);if(0===i.x)return P(t,e,n.x);if(0===e.y)return L(n,i,t.y);if(0===i.y)return L(t,e,n.y);var r=C(e,i);if(0==r)return null;var o={x:n.x-t.x,y:n.y-t.y},s=C(o,e)/r,a=C(o,i)/r,l=t.x+a*e.x,c=n.x+s*i.x,u=t.y+a*e.y,h=n.y+s*i.y,d=(l+c)/2,A=(u+h)/2;return{x:d,y:A}},R=function(){function e(n,i){t(this,e),void 0===n.events?n.events=[this]:n.events.push(this),this.point=n,this.isLeft=i}return n(e,null,[{key:"compare",value:function(t,n){var i=e.comparePoints(t.point,n.point);return 0!==i?i:(t.point!==n.point&&t.link(n),t.isLeft!==n.isLeft?t.isLeft?1:-1:O.compare(t.segment,n.segment))}},{key:"comparePoints",value:function(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}}]),n(e,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var e=t.point.events,n=0,i=e.length;n<i;n++){var r=e[n];this.point.events.push(r),r.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var t=this.point.events.length,e=0;e<t;e++){var n=this.point.events[e];if(void 0===n.segment.consumedBy)for(var i=e+1;i<t;i++){var r=this.point.events[i];void 0===r.consumedBy&&(n.otherSE.point.events===r.otherSE.point.events&&n.segment.consume(r.segment))}}}},{key:"getAvailableLinkedEvents",value:function(){for(var t=[],e=0,n=this.point.events.length;e<n;e++){var i=this.point.events[e];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}},{key:"getLeftmostComparator",value:function(t){var e=this,n=new Map,i=function(i){var r=i.otherSE;n.set(i,{sine:T(e.point,t.point,r.point),cosine:I(e.point,t.point,r.point)})};return function(t,e){n.has(t)||i(t),n.has(e)||i(e);var r=n.get(t),o=r.sine,s=r.cosine,a=n.get(e),l=a.sine,c=a.cosine;return o>=0&&l>=0?s<c?1:s>c?-1:0:o<0&&l<0?s<c?-1:s>c?1:0:l<o?-1:l>o?1:0}}}]),e}(),D=0,O=function(){function e(n,i,r,o){t(this,e),this.id=++D,this.leftSE=n,n.segment=this,n.otherSE=i,this.rightSE=i,i.segment=this,i.otherSE=n,this.rings=r,this.windings=o}return n(e,null,[{key:"compare",value:function(t,e){var n=t.leftSE.point.x,i=e.leftSE.point.x,r=t.rightSE.point.x,o=e.rightSE.point.x;if(o<n)return 1;if(r<i)return-1;var s=t.leftSE.point.y,a=e.leftSE.point.y,l=t.rightSE.point.y,c=e.rightSE.point.y;if(n<i){if(a<s&&a<l)return 1;if(a>s&&a>l)return-1;var u=t.comparePoint(e.leftSE.point);if(u<0)return 1;if(u>0)return-1;var h=e.comparePoint(t.rightSE.point);return 0!==h?h:-1}if(n>i){if(s<a&&s<c)return-1;if(s>a&&s>c)return 1;var d=e.comparePoint(t.leftSE.point);if(0!==d)return d;var A=t.comparePoint(e.rightSE.point);return A<0?1:A>0?-1:1}if(s<a)return-1;if(s>a)return 1;if(r<o){var p=e.comparePoint(t.rightSE.point);if(0!==p)return p}if(r>o){var f=t.comparePoint(e.rightSE.point);if(f<0)return 1;if(f>0)return-1}if(r!==o){var g=l-s,m=r-n,_=c-a,y=o-i;if(g>m&&_<y)return 1;if(g<m&&_>y)return-1}return r>o?1:r<o||l<c?-1:l>c?1:t.id<e.id?-1:t.id>e.id?1:0}}]),n(e,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}},{key:"comparePoint",value:function(t){if(this.isAnEndpoint(t))return 0;var e=this.leftSE.point,n=this.rightSE.point,i=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x<e.x?1:-1;var r=(t.y-e.y)/i.y,o=e.x+r*i.x;if(t.x===o)return 0;var s=(t.x-e.x)/i.x,a=e.y+s*i.y;return t.y===a?0:t.y<a?-1:1}},{key:"getIntersection",value:function(t){var e=this.bbox(),n=t.bbox(),i=_(e,n);if(null===i)return null;var r=this.leftSE.point,o=this.rightSE.point,s=t.leftSE.point,a=t.rightSE.point,l=m(e,s)&&0===this.comparePoint(s),c=m(n,r)&&0===t.comparePoint(r),u=m(e,a)&&0===this.comparePoint(a),h=m(n,o)&&0===t.comparePoint(o);if(c&&l)return h&&!u?o:!h&&u?a:null;if(c)return u&&r.x===a.x&&r.y===a.y?null:r;if(l)return h&&o.x===s.x&&o.y===s.y?null:s;if(h&&u)return null;if(h)return o;if(u)return a;var d=F(r,this.vector(),s,t.vector());return null===d?null:m(i,d)?E.round(d.x,d.y):null}},{key:"split",value:function(t){var n=[],i=void 0!==t.events,r=new R(t,!0),o=new R(t,!1),s=this.rightSE;this.replaceRightSE(o),n.push(o),n.push(r);var a=new e(r,s,this.rings.slice(),this.windings.slice());return R.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),R.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),i&&(r.checkForConsuming(),o.checkForConsuming()),n}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,n=this.windings.length;e<n;e++)this.windings[e]*=-1}},{key:"consume",value:function(t){var n=this,i=t;while(n.consumedBy)n=n.consumedBy;while(i.consumedBy)i=i.consumedBy;var r=e.compare(n,i);if(0!==r){if(r>0){var o=n;n=i,i=o}if(n.prev===i){var s=n;n=i,i=s}for(var a=0,l=i.rings.length;a<l;a++){var c=i.rings[a],u=i.windings[a],h=n.rings.indexOf(c);-1===h?(n.rings.push(c),n.windings.push(u)):n.windings[h]+=u}i.rings=null,i.windings=null,i.consumedBy=n,i.leftSE.consumedBy=n.leftSE,i.rightSE.consumedBy=n.rightSE}}},{key:"prevInResult",value:function(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}},{key:"beforeState",value:function(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){var t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}},{key:"afterState",value:function(){if(void 0!==this._afterState)return this._afterState;var t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};for(var e=this._afterState.rings,n=this._afterState.windings,i=this._afterState.multiPolys,r=0,o=this.rings.length;r<o;r++){var s=this.rings[r],a=this.windings[r],l=e.indexOf(s);-1===l?(e.push(s),n.push(a)):n[l]+=a}for(var c=[],u=[],h=0,d=e.length;h<d;h++)if(0!==n[h]){var A=e[h],p=A.poly;if(-1===u.indexOf(p))if(A.isExterior)c.push(p);else{-1===u.indexOf(p)&&u.push(p);var f=c.indexOf(A.poly);-1!==f&&c.splice(f,1)}}for(var g=0,m=c.length;g<m;g++){var _=c[g].multiPoly;-1===i.indexOf(_)&&i.push(_)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;var t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(W.type){case"union":var n=0===t.length,i=0===e.length;this._isInResult=n!==i;break;case"intersection":var r,o;t.length<e.length?(r=t.length,o=e.length):(r=e.length,o=t.length),this._isInResult=o===W.numMultiPolys&&r<o;break;case"xor":var s=Math.abs(t.length-e.length);this._isInResult=s%2===1;break;case"difference":var a=function(t){return 1===t.length&&t[0].isSubject};this._isInResult=a(t)!==a(e);break;default:throw new Error("Unrecognized operation type found ".concat(W.type))}return this._isInResult}}],[{key:"fromRing",value:function(t,n,i){var r,o,s,a=R.comparePoints(t,n);if(a<0)r=t,o=n,s=1;else{if(!(a>0))throw new Error("Tried to create degenerate segment at [".concat(t.x,", ").concat(t.y,"]"));r=n,o=t,s=-1}var l=new R(r,!0),c=new R(o,!1);return new e(l,c,[i],[s])}}]),e}(),U=function(){function e(n,i,r){if(t(this,e),!Array.isArray(n)||0===n.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=i,this.isExterior=r,this.segments=[],"number"!==typeof n[0][0]||"number"!==typeof n[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=E.round(n[0][0],n[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};for(var s=o,a=1,l=n.length;a<l;a++){if("number"!==typeof n[a][0]||"number"!==typeof n[a][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var c=E.round(n[a][0],n[a][1]);c.x===s.x&&c.y===s.y||(this.segments.push(O.fromRing(s,c,this)),c.x<this.bbox.ll.x&&(this.bbox.ll.x=c.x),c.y<this.bbox.ll.y&&(this.bbox.ll.y=c.y),c.x>this.bbox.ur.x&&(this.bbox.ur.x=c.x),c.y>this.bbox.ur.y&&(this.bbox.ur.y=c.y),s=c)}o.x===s.x&&o.y===s.y||this.segments.push(O.fromRing(s,o,this))}return n(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.segments.length;e<n;e++){var i=this.segments[e];t.push(i.leftSE),t.push(i.rightSE)}return t}}]),e}(),N=function(){function e(n,i){if(t(this,e),!Array.isArray(n))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new U(n[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(var r=1,o=n.length;r<o;r++){var s=new U(n[r],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=i}return n(e,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,n=this.interiorRings.length;e<n;e++)for(var i=this.interiorRings[e].getSweepEvents(),r=0,o=i.length;r<o;r++)t.push(i[r]);return t}}]),e}(),k=function(){function e(n,i){if(t(this,e),!Array.isArray(n))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"===typeof n[0][0][0]&&(n=[n])}catch(a){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var r=0,o=n.length;r<o;r++){var s=new N(n[r],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=i}return n(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.polys.length;e<n;e++)for(var i=this.polys[e].getSweepEvents(),r=0,o=i.length;r<o;r++)t.push(i[r]);return t}}]),e}(),z=function(){function e(n){t(this,e),this.events=n;for(var i=0,r=n.length;i<r;i++)n[i].segment.ringOut=this;this.poly=null}return n(e,null,[{key:"factory",value:function(t){for(var n=[],i=0,r=t.length;i<r;i++){var o=t[i];if(o.isInResult()&&!o.ringOut){var s=null,a=o.leftSE,l=o.rightSE,c=[a],u=a.point,h=[];while(1){if(s=a,a=l,c.push(a),a.point===u)break;while(1){var d=a.getAvailableLinkedEvents();if(0===d.length){var A=c[0].point,p=c[c.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(A.x,",")+" ".concat(A.y,"]. Last matching segment found ends at")+" [".concat(p.x,", ").concat(p.y,"]."))}if(1===d.length){l=d[0].otherSE;break}for(var f=null,g=0,m=h.length;g<m;g++)if(h[g].point===a.point){f=g;break}if(null===f){h.push({index:c.length,point:a.point});var _=a.getLeftmostComparator(s);l=d.sort(_)[0].otherSE;break}var y=h.splice(f)[0],v=c.splice(y.index);v.unshift(v[0].otherSE),n.push(new e(v.reverse()))}}n.push(new e(c))}}return n}}]),n(e,[{key:"getGeom",value:function(){for(var t=this.events[0].point,e=[t],n=1,i=this.events.length-1;n<i;n++){var r=this.events[n].point,o=this.events[n+1].point;0!==S(r,t,o)&&(e.push(r),t=r)}if(1===e.length)return null;var s=e[0],a=e[1];0===S(s,t,a)&&e.shift(),e.push(e[0]);for(var l=this.isExteriorRing()?1:-1,c=this.isExteriorRing()?0:e.length-1,u=this.isExteriorRing()?e.length:-1,h=[],d=c;d!=u;d+=l)h.push([e[d].x,e[d].y]);return h}},{key:"isExteriorRing",value:function(){if(void 0===this._isExteriorRing){var t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var t=this.events[0],e=1,n=this.events.length;e<n;e++){var i=this.events[e];R.compare(t,i)>0&&(t=i)}var r=t.segment.prevInResult(),o=r?r.prevInResult():null;while(1){if(!r)return null;if(!o)return r.ringOut;if(o.ringOut!==r.ringOut)return o.ringOut.enclosingRing()!==r.ringOut?r.ringOut:r.ringOut.enclosingRing();r=o.prevInResult(),o=r?r.prevInResult():null}}}]),e}(),Q=function(){function e(n){t(this,e),this.exteriorRing=n,n.poly=this,this.interiorRings=[]}return n(e,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(var e=0,n=this.interiorRings.length;e<n;e++){var i=this.interiorRings[e].getGeom();null!==i&&t.push(i)}return t}}]),e}(),G=function(){function e(n){t(this,e),this.rings=n,this.polys=this._composePolys(n)}return n(e,[{key:"getGeom",value:function(){for(var t=[],e=0,n=this.polys.length;e<n;e++){var i=this.polys[e].getGeom();null!==i&&t.push(i)}return t}},{key:"_composePolys",value:function(t){for(var e=[],n=0,i=t.length;n<i;n++){var r=t[n];if(!r.poly)if(r.isExteriorRing())e.push(new Q(r));else{var o=r.enclosingRing();o.poly||e.push(new Q(o)),o.poly.addInterior(r)}}return e}}]),e}(),H=function(){function e(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O.compare;t(this,e),this.queue=n,this.tree=new u(i),this.segments=[]}return n(e,[{key:"process",value:function(t){var e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;var i=t.isLeft?this.tree.insert(e):this.tree.find(e);if(!i)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");var r=i,o=i,s=void 0,a=void 0;while(void 0===s)r=this.tree.prev(r),null===r?s=null:void 0===r.key.consumedBy&&(s=r.key);while(void 0===a)o=this.tree.next(o),null===o?a=null:void 0===o.key.consumedBy&&(a=o.key);if(t.isLeft){var l=null;if(s){var c=s.getIntersection(e);if(null!==c&&(e.isAnEndpoint(c)||(l=c),!s.isAnEndpoint(c)))for(var u=this._splitSafely(s,c),h=0,d=u.length;h<d;h++)n.push(u[h])}var A=null;if(a){var p=a.getIntersection(e);if(null!==p&&(e.isAnEndpoint(p)||(A=p),!a.isAnEndpoint(p)))for(var f=this._splitSafely(a,p),g=0,m=f.length;g<m;g++)n.push(f[g])}if(null!==l||null!==A){var _=null;if(null===l)_=A;else if(null===A)_=l;else{var y=R.comparePoints(l,A);_=y<=0?l:A}this.queue.remove(e.rightSE),n.push(e.rightSE);for(var v=e.split(_),x=0,b=v.length;x<b;x++)n.push(v[x])}n.length>0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=s)}else{if(s&&a){var w=s.getIntersection(a);if(null!==w){if(!s.isAnEndpoint(w))for(var E=this._splitSafely(s,w),C=0,B=E.length;C<B;C++)n.push(E[C]);if(!a.isAnEndpoint(w))for(var S=this._splitSafely(a,w),M=0,T=S.length;M<T;M++)n.push(S[M])}}this.tree.remove(e)}return n}},{key:"_splitSafely",value:function(t,e){this.tree.remove(t);var n=t.rightSE;this.queue.remove(n);var i=t.split(e);return i.push(n),void 0===t.consumedBy&&this.tree.insert(t),i}}]),e}(),V="undefined"!==typeof process&&{NODE_ENV:"production",BASE_URL:"/"}.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,j="undefined"!==typeof process&&{NODE_ENV:"production",BASE_URL:"/"}.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,Z=function(){function e(){t(this,e)}return n(e,[{key:"run",value:function(t,e,n){W.type=t,E.reset();for(var i=[new k(e,!0)],r=0,o=n.length;r<o;r++)i.push(new k(n[r],!1));if(W.numMultiPolys=i.length,"difference"===W.type){var s=i[0],a=1;while(a<i.length)null!==_(i[a].bbox,s.bbox)?a++:i.splice(a,1)}if("intersection"===W.type)for(var l=0,c=i.length;l<c;l++)for(var h=i[l],d=l+1,A=i.length;d<A;d++)if(null===_(h.bbox,i[d].bbox))return[];for(var p=new u(R.compare),f=0,g=i.length;f<g;f++)for(var m=i[f].getSweepEvents(),y=0,v=m.length;y<v;y++)if(p.insert(m[y]),p.size>V)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");var x=new H(p),b=p.size,w=p.pop();while(w){var C=w.key;if(p.size===b){var B=C.segment;throw new Error("Unable to pop() ".concat(C.isLeft?"left":"right"," SweepEvent ")+"[".concat(C.point.x,", ").concat(C.point.y,"] from segment #").concat(B.id," ")+"[".concat(B.leftSE.point.x,", ").concat(B.leftSE.point.y,"] -> ")+"[".concat(B.rightSE.point.x,", ").concat(B.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(p.size>V)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(x.segments.length>j)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var S=x.process(C),M=0,T=S.length;M<T;M++){var I=S[M];void 0===I.consumedBy&&p.insert(I)}b=p.size,w=p.pop()}E.reset();var L=z.factory(x.segments),P=new G(L);return P.getGeom()}}]),e}(),W=new Z,X=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return W.run("union",t,n)},K=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return W.run("intersection",t,n)},q=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return W.run("xor",t,n)},J=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return W.run("difference",t,n)},Y={union:X,intersection:K,xor:q,difference:J};return Y}))},513:function(t,e,n){"use strict";t.exports=r,t.exports["default"]=r;var i=n(5492);function r(t,e){if(!(this instanceof r))return new r(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function o(t,e,n){if(!n)return e.indexOf(t);for(var i=0;i<e.length;i++)if(n(t,e[i]))return i;return-1}function s(t,e){a(t,0,t.children.length,e,t)}function a(t,e,n,i,r){r||(r=m(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,s=e;s<n;s++)o=t.children[s],l(r,t.leaf?i(o):o);return r}function l(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 c(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function d(t){return t.maxX-t.minX+(t.maxY-t.minY)}function A(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function p(t,e){var n=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),r=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,r-n)*Math.max(0,o-i)}function f(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function m(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(t,e,n,r,o){var s,a=[e,n];while(a.length)n=a.pop(),e=a.pop(),n-e<=r||(s=e+Math.ceil((n-e)/r/2)*r,i(t,s,e,n,o),a.push(e,s,s,n))}r.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],i=this.toBBox;if(!g(t,e))return n;var r,o,s,a,l=[];while(e){for(r=0,o=e.children.length;r<o;r++)s=e.children[r],a=e.leaf?i(s):s,g(t,a)&&(e.leaf?n.push(s):f(t,a)?this._all(s,n):l.push(s));e=l.pop()}return n},collides:function(t){var e=this.data,n=this.toBBox;if(!g(t,e))return!1;var i,r,o,s,a=[];while(e){for(i=0,r=e.children.length;i<r;i++)if(o=e.children[i],s=e.leaf?n(o):o,g(t,s)){if(e.leaf||f(t,s))return!0;a.push(o)}e=a.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,n=t.length;e<n;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 r=this.data;this.data=i,i=r}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=m([]),this},remove:function(t,e){if(!t)return this;var n,i,r,s,a=this.data,l=this.toBBox(t),c=[],u=[];while(a||c.length){if(a||(a=c.pop(),i=c[c.length-1],n=u.pop(),s=!0),a.leaf&&(r=o(t,a.children,e),-1!==r))return a.children.splice(r,1),c.push(a),this._condense(c),this;s||a.leaf||!f(a,l)?i?(n++,a=i.children[n],s=!1):a=null:(c.push(a),u.push(n),n=0,i=a,a=a.children[0])}return this},toBBox:function(t){return t},compareMinX:c,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){var n=[];while(t)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},_build:function(t,e,n,i){var r,o=n-e+1,a=this._maxEntries;if(o<=a)return r=m(t.slice(e,n+1)),s(r,this.toBBox),r;i||(i=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,i-1))),r=m([]),r.leaf=!1,r.height=i;var l,c,u,h,d=Math.ceil(o/a),A=d*Math.ceil(Math.sqrt(a));for(_(t,e,n,A,this.compareMinX),l=e;l<=n;l+=A)for(u=Math.min(l+A-1,n),_(t,l,u,d,this.compareMinY),c=l;c<=u;c+=d)h=Math.min(c+d-1,u),r.children.push(this._build(t,c,h,i-1));return s(r,this.toBBox),r},_chooseSubtree:function(t,e,n,i){var r,o,s,a,l,c,u,d;while(1){if(i.push(e),e.leaf||i.length-1===n)break;for(u=d=1/0,r=0,o=e.children.length;r<o;r++)s=e.children[r],l=h(s),c=A(t,s)-l,c<d?(d=c,u=l<u?l:u,a=s):c===d&&l<u&&(u=l,a=s);e=a||e.children[0]}return e},_insert:function(t,e,n){var i=this.toBBox,r=n?t:i(t),o=[],s=this._chooseSubtree(r,this.data,e,o);s.children.push(t),l(s,r);while(e>=0){if(!(o[e].children.length>this._maxEntries))break;this._split(o,e),e--}this._adjustParentBBoxes(r,o,e)},_split:function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var o=this._chooseSplitIndex(n,r,i),a=m(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,s(n,this.toBBox),s(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},_splitRoot:function(t,e){this.data=m([t,e]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var i,r,o,s,l,c,u,d;for(c=u=1/0,i=e;i<=n-e;i++)r=a(t,0,i,this.toBBox),o=a(t,i,n,this.toBBox),s=p(r,o),l=h(r)+h(o),s<c?(c=s,d=i,u=l<u?l:u):s===c&&l<u&&(u=l,d=i);return d},_chooseSplitAxis:function(t,e,n){var i=t.leaf?this.compareMinX:c,r=t.leaf?this.compareMinY:u,o=this._allDistMargin(t,e,n,i),s=this._allDistMargin(t,e,n,r);o<s&&t.children.sort(i)},_allDistMargin:function(t,e,n,i){t.children.sort(i);var r,o,s=this.toBBox,c=a(t,0,e,s),u=a(t,n-e,n,s),h=d(c)+d(u);for(r=e;r<n-e;r++)o=t.children[r],l(c,t.leaf?s(o):o),h+=d(c);for(r=n-e-1;r>=e;r--)o=t.children[r],l(u,t.leaf?s(o):o),h+=d(u);return h},_adjustParentBBoxes:function(t,e,n){for(var i=n;i>=0;i--)l(e[i],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children,e.splice(e.indexOf(t[n]),1)):this.clear():s(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},5492:function(t){(function(e,n){t.exports=n()})(0,(function(){"use strict";function t(t,n,r,o,s){e(t,n,r||0,o||t.length-1,s||i)}function e(t,i,r,o,s){while(o>r){if(o-r>600){var a=o-r+1,l=i-r+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1),d=Math.max(r,Math.floor(i-l*u/a+h)),A=Math.min(o,Math.floor(i+(a-l)*u/a+h));e(t,i,d,A,s)}var p=t[i],f=r,g=o;n(t,r,i),s(t[o],p)>0&&n(t,r,o);while(f<g){n(t,f,g),f++,g--;while(s(t[f],p)<0)f++;while(s(t[g],p)>0)g--}0===s(t[r],p)?n(t,r,g):(g++,n(t,g,o)),g<=i&&(r=g+1),i<=g&&(o=g-1)}}function n(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function i(t,e){return t<e?-1:t>e?1:0}return t}))},1868:function(t,e,n){"use strict";var i=n(8052),r=n(4658),o=Object;t.exports=i((function(){if(null==this||this!==o(this))throw new r("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},5062:function(t,e,n){"use strict";var i=n(9477),r=n(8481),o=n(1868),s=n(1861),a=n(5734),l=r(s());i(l,{getPolyfill:s,implementation:o,shim:a}),t.exports=l},1861:function(t,e,n){"use strict";var i=n(1868),r=n(9477).supportsDescriptors,o=Object.getOwnPropertyDescriptor;t.exports=function(){if(r&&"gim"===/a/gim.flags){var t=o(RegExp.prototype,"flags");if(t&&"function"===typeof t.get&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var e="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(n,"sticky",{get:function(){e+="y"}}),t.get.call(n),"dy"===e)return t.get}}return i}},5734:function(t,e,n){"use strict";var i=n(9477).supportsDescriptors,r=n(1861),o=n(233),s=Object.defineProperty,a=n(3387),l=n(9750),c=/a/;t.exports=function(){if(!i||!l)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=r(),e=l(c),n=o(e,"flags");return n&&n.get===t||s(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},5164:function(t,e){!function(t,n){n(e)}(0,(function(t){"use strict";const e=134217729,n=33306690738754706e-32;function i(t,e,n,i,r){let o,s,a,l,c=e[0],u=i[0],h=0,d=0;u>c==u>-c?(o=c,c=e[++h]):(o=u,u=i[++d]);let A=0;if(h<t&&d<n)for(u>c==u>-c?(a=o-((s=c+o)-c),c=e[++h]):(a=o-((s=u+o)-u),u=i[++d]),o=s,0!==a&&(r[A++]=a);h<t&&d<n;)u>c==u>-c?(a=o-((s=o+c)-(l=s-o))+(c-l),c=e[++h]):(a=o-((s=o+u)-(l=s-o))+(u-l),u=i[++d]),o=s,0!==a&&(r[A++]=a);for(;h<t;)a=o-((s=o+c)-(l=s-o))+(c-l),c=e[++h],o=s,0!==a&&(r[A++]=a);for(;d<n;)a=o-((s=o+u)-(l=s-o))+(u-l),u=i[++d],o=s,0!==a&&(r[A++]=a);return 0===o&&0!==A||(r[A++]=o),A}function r(t){return new Float64Array(t)}const o=33306690738754716e-32,s=22204460492503146e-32,a=11093356479670487e-47,l=r(4),c=r(8),u=r(12),h=r(16),d=r(4);t.orient2d=function(t,r,A,p,f,g){const m=(r-g)*(A-f),_=(t-f)*(p-g),y=m-_;if(0===m||0===_||m>0!=_>0)return y;const v=Math.abs(m+_);return Math.abs(y)>=o*v?y:-function(t,r,o,A,p,f,g){let m,_,y,v,x,b,w,E,C,B,S,M,T,I,L,P,F,R;const D=t-p,O=o-p,U=r-f,N=A-f;x=(L=(E=D-(w=(b=e*D)-(b-D)))*(B=N-(C=(b=e*N)-(b-N)))-((I=D*N)-w*C-E*C-w*B))-(S=L-(F=(E=U-(w=(b=e*U)-(b-U)))*(B=O-(C=(b=e*O)-(b-O)))-((P=U*O)-w*C-E*C-w*B))),l[0]=L-(S+x)+(x-F),x=(T=I-((M=I+S)-(x=M-I))+(S-x))-(S=T-P),l[1]=T-(S+x)+(x-P),x=(R=M+S)-M,l[2]=M-(R-x)+(S-x),l[3]=R;let k=function(t,e){let n=e[0];for(let i=1;i<t;i++)n+=e[i];return n}(4,l),z=s*g;if(k>=z||-k>=z)return k;if(m=t-(D+(x=t-D))+(x-p),y=o-(O+(x=o-O))+(x-p),_=r-(U+(x=r-U))+(x-f),v=A-(N+(x=A-N))+(x-f),0===m&&0===_&&0===y&&0===v)return k;if(z=a*g+n*Math.abs(k),(k+=D*v+N*m-(U*y+O*_))>=z||-k>=z)return k;x=(L=(E=m-(w=(b=e*m)-(b-m)))*(B=N-(C=(b=e*N)-(b-N)))-((I=m*N)-w*C-E*C-w*B))-(S=L-(F=(E=_-(w=(b=e*_)-(b-_)))*(B=O-(C=(b=e*O)-(b-O)))-((P=_*O)-w*C-E*C-w*B))),d[0]=L-(S+x)+(x-F),x=(T=I-((M=I+S)-(x=M-I))+(S-x))-(S=T-P),d[1]=T-(S+x)+(x-P),x=(R=M+S)-M,d[2]=M-(R-x)+(S-x),d[3]=R;const Q=i(4,l,4,d,c);x=(L=(E=D-(w=(b=e*D)-(b-D)))*(B=v-(C=(b=e*v)-(b-v)))-((I=D*v)-w*C-E*C-w*B))-(S=L-(F=(E=U-(w=(b=e*U)-(b-U)))*(B=y-(C=(b=e*y)-(b-y)))-((P=U*y)-w*C-E*C-w*B))),d[0]=L-(S+x)+(x-F),x=(T=I-((M=I+S)-(x=M-I))+(S-x))-(S=T-P),d[1]=T-(S+x)+(x-P),x=(R=M+S)-M,d[2]=M-(R-x)+(S-x),d[3]=R;const G=i(Q,c,4,d,u);x=(L=(E=m-(w=(b=e*m)-(b-m)))*(B=v-(C=(b=e*v)-(b-v)))-((I=m*v)-w*C-E*C-w*B))-(S=L-(F=(E=_-(w=(b=e*_)-(b-_)))*(B=y-(C=(b=e*y)-(b-y)))-((P=_*y)-w*C-E*C-w*B))),d[0]=L-(S+x)+(x-F),x=(T=I-((M=I+S)-(x=M-I))+(S-x))-(S=T-P),d[1]=T-(S+x)+(x-P),x=(R=M+S)-M,d[2]=M-(R-x)+(S-x),d[3]=R;const H=i(G,u,4,d,h);return h[H-1]}(t,r,A,p,f,g,v)},t.orient2dfast=function(t,e,n,i,r,o){return(e-o)*(n-r)-(t-r)*(i-o)},Object.defineProperty(t,"__esModule",{value:!0})}))},3402:function(t,e,n){"use strict";var i=n(9643),r=n(9149),o=n(5558)(),s=n(233),a=n(4658),l=i("%Math.floor%");t.exports=function(t,e){if("function"!==typeof t)throw new a("`fn` is not a function");if("number"!==typeof e||e<0||e>4294967295||l(e)!==e)throw new a("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,c=!0;if("length"in t&&s){var u=s(t,"length");u&&!u.configurable&&(i=!1),u&&!u.writable&&(c=!1)}return(i||c||!n)&&(o?r(t,"length",e,!0,!0):r(t,"length",e)),t}},8052:function(t,e,n){"use strict";var i=n(9149),r=n(5558)(),o=n(7998).functionsHaveConfigurableNames(),s=n(4658);t.exports=function(t,e){if("function"!==typeof t)throw new s("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return n&&!o||(r?i(t,"name",e,!0,!0):i(t,"name",e)),t}},2388:function(t,e,n){"use strict";function i(){return this._array=null,Promise.resolve()}function r(){var t=this._array;return this._array=null,Promise.resolve(t?{done:!1,value:t}:{done:!0,value:void 0})}function o(t){return new s(t instanceof Uint8Array?t:new Uint8Array(t))}function s(t){this._array=t}function a(t){return fetch(t).then((function(t){return t.body&&t.body.getReader?t.body.getReader():t.arrayBuffer().then(o)}))}function l(t){return new Promise((function(e,n){var i=new XMLHttpRequest;i.responseType="arraybuffer",i.onload=function(){e(o(i.response))},i.onerror=n,i.ontimeout=n,i.open("GET",t,!0),i.send()}))}function c(t){return("function"===typeof fetch?a:l)(t)}function u(t){return"function"===typeof t.read?t:t.getReader()}n.r(e),n.d(e,{open:function(){return J},openDbf:function(){return $},openShp:function(){return Y},read:function(){return tt}}),s.prototype.read=r,s.prototype.cancel=i;var h=new Uint8Array(0);function d(){return this._source.cancel()}function A(t,e){if(!t.length)return e;if(!e.length)return t;var n=new Uint8Array(t.length+e.length);return n.set(t),n.set(e,t.length),n}function p(){var t=this,e=t._array.subarray(t._index);return t._source.read().then((function(n){return t._array=h,t._index=0,n.done?e.length>0?{done:!1,value:e}:{done:!0,value:void 0}:{done:!1,value:A(e,n.value)}}))}function f(t){if((t|=0)<0)throw new Error("invalid length");var e=this,n=this._array.length-this._index;if(this._index+t<=this._array.length)return Promise.resolve(this._array.subarray(this._index,this._index+=t));var i=new Uint8Array(t);return i.set(this._array.subarray(this._index)),function r(){return e._source.read().then((function(o){return o.done?(e._array=h,e._index=0,n>0?i.subarray(0,n):null):n+o.value.length>=t?(e._array=o.value,e._index=t-n,i.set(o.value.subarray(0,t-n),n),i):(i.set(o.value,n),n+=o.value.length,r())}))}()}function g(t){return"function"===typeof t.slice?t:new m("function"===typeof t.read?t:t.getReader())}function m(t){this._source=t,this._array=h,this._index=0}function _(){return this._source.cancel()}function y(t){return!/^[nf]$/i.test(t)&&(!!/^[yt]$/i.test(t)||null)}function v(t){return new Date(+t.substring(0,4),t.substring(4,6)-1,+t.substring(6,8))}function x(t){return!(t=t.trim())||isNaN(t=+t)?null:t}function b(t){return t.trim()||null}m.prototype.read=p,m.prototype.slice=f,m.prototype.cancel=d;var w={B:x,C:b,D:v,F:x,L:y,M:x,N:x};function E(){var t=this,e=1;return t._source.slice(t._recordLength).then((function(n){return n&&26!==n[0]?{done:!1,value:t._fields.reduce((function(i,r){return i[r.name]=w[r.type](t._decode(n.subarray(e,e+=r.length))),i}),{})}:{done:!0,value:void 0}}))}function C(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function B(t,e){return t=g(t),t.slice(32).then((function(n){var i=C(n);return t.slice(i.getUint16(8,!0)-32).then((function(n){return new S(t,e,i,C(n))}))}))}function S(t,e,n,i){this._source=t,this._decode=e.decode.bind(e),this._recordLength=n.getUint16(10,!0),this._fields=[];for(var r=0;13!==i.getUint8(r);r+=32){for(var o=0;o<11;++o)if(0===i.getUint8(r+o))break;this._fields.push({name:this._decode(new Uint8Array(i.buffer,i.byteOffset+r,o)),type:String.fromCharCode(i.getUint8(r+11)),length:i.getUint8(r+16)})}}var M=S.prototype;function T(){return this._source.cancel()}function I(t){var e,n=40,i=t.getInt32(36,!0),r=new Array(i);for(e=0;e<i;++e,n+=16)r[e]=[t.getFloat64(n,!0),t.getFloat64(n+8,!0)];return{type:"MultiPoint",coordinates:r}}function L(){return null}function P(t){return{type:"Point",coordinates:[t.getFloat64(4,!0),t.getFloat64(12,!0)]}}function F(t){var e,n=44,i=t.getInt32(36,!0),r=t.getInt32(40,!0),o=new Array(i),s=new Array(r),a=[],l=[];for(e=0;e<i;++e,n+=4)o[e]=t.getInt32(n,!0);for(e=0;e<r;++e,n+=16)s[e]=[t.getFloat64(n,!0),t.getFloat64(n+8,!0)];return o.forEach((function(t,e){var n=s.slice(t,o[e+1]);R(n)?a.push([n]):l.push(n)})),l.forEach((function(t){a.some((function(e){if(D(e[0],t))return e.push(t),!0}))||a.push([t])})),1===a.length?{type:"Polygon",coordinates:a[0]}:{type:"MultiPolygon",coordinates:a}}function R(t){if((e=t.length)<4)return!1;var e,n=0,i=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];while(++n<e)i+=t[n-1][1]*t[n][0]-t[n-1][0]*t[n][1];return i>=0}function D(t,e){var n,i=-1,r=e.length;while(++i<r)if(n=O(t,e[i]))return n>0;return!1}function O(t,e){for(var n=e[0],i=e[1],r=-1,o=0,s=t.length,a=s-1;o<s;a=o++){var l=t[o],c=l[0],u=l[1],h=t[a],d=h[0],A=h[1];if(U(l,h,e))return 0;u>i!==A>i&&n<(d-c)*(i-u)/(A-u)+c&&(r=-r)}return r}function U(t,e,n){var i=n[0]-t[0],r=n[1]-t[1];if(0===i&&0===r)return!0;var o=e[0]-t[0],s=e[1]-t[1];if(0===o&&0===s)return!1;var a=(i*o+r*s)/(o*o+s*s);return!(a<0||a>1)&&(0===a||1===a||a*o===i&&a*s===r)}function N(t){var e,n=44,i=t.getInt32(36,!0),r=t.getInt32(40,!0),o=new Array(i),s=new Array(r);for(e=0;e<i;++e,n+=4)o[e]=t.getInt32(n,!0);for(e=0;e<r;++e,n+=16)s[e]=[t.getFloat64(n,!0),t.getFloat64(n+8,!0)];return 1===i?{type:"LineString",coordinates:s}:{type:"MultiLineString",coordinates:o.map((function(t,e){return s.slice(t,o[e+1])}))}}function k(t,e){var n=new Uint8Array(t.length+e.length);return n.set(t,0),n.set(e,t.length),n}function z(){var t=this;return++t._index,t._source.slice(12).then((function(e){if(null==e)return{done:!0,value:void 0};var n=C(e);function i(){return t._source.slice(4).then((function(o){return null==o?{done:!0,value:void 0}:(n=C(e=k(e.slice(4),o)),n.getInt32(0,!1)!==t._index?i():r())}))}function r(){var r=2*n.getInt32(4,!1)-4,o=n.getInt32(8,!0);return r<0||o&&o!==t._type?i():t._source.slice(r).then((function(n){return{done:!1,value:o?t._parse(C(k(e.slice(8),n))):null}}))}return r()}))}M.read=E,M.cancel=_;var Q={0:L,1:P,3:N,5:F,8:I,11:P,13:N,15:F,18:I,21:P,23:N,25:F,28:I};function G(t){return t=g(t),t.slice(100).then((function(e){return new H(t,C(e))}))}function H(t,e){var n=e.getInt32(32,!0);if(!(n in Q))throw new Error("unsupported shape type: "+n);this._source=t,this._type=n,this._index=0,this._parse=Q[n],this.bbox=[e.getFloat64(36,!0),e.getFloat64(44,!0),e.getFloat64(52,!0),e.getFloat64(60,!0)]}var V=H.prototype;function j(){}function Z(){return Promise.all([this._dbf&&this._dbf.cancel(),this._shp.cancel()]).then(j)}function W(){var t=this;return Promise.all([t._dbf?t._dbf.read():{value:{}},t._shp.read()]).then((function(t){var e=t[0],n=t[1];return n.done?n:{done:!1,value:{type:"Feature",properties:e.value,geometry:n.value}}}))}function X(t,e,n){return Promise.all([G(t),e&&B(e,n)]).then((function(t){return new K(t[0],t[1])}))}function K(t,e){this._shp=t,this._dbf=e,this.bbox=t.bbox}V.read=z,V.cancel=T;var q=K.prototype;function J(t,e,n){return"string"===typeof e?(/\.dbf$/.test(e)||(e+=".dbf"),e=c(e,n)):e instanceof ArrayBuffer||e instanceof Uint8Array?e=o(e):null!=e&&(e=u(e)),"string"===typeof t?(/\.shp$/.test(t)||(t+=".shp"),void 0===e&&(e=c(t.substring(0,t.length-4)+".dbf",n).catch((function(){}))),t=c(t,n)):t=t instanceof ArrayBuffer||t instanceof Uint8Array?o(t):u(t),Promise.all([t,e]).then((function(t){var e=t[0],i=t[1],r="windows-1252";return n&&null!=n.encoding&&(r=n.encoding),X(e,i,i&&new TextDecoder(r))}))}function Y(t,e){return"string"===typeof t?(/\.shp$/.test(t)||(t+=".shp"),t=c(t,e)):t=t instanceof ArrayBuffer||t instanceof Uint8Array?o(t):u(t),Promise.resolve(t).then(G)}function $(t,e){var n="windows-1252";return e&&null!=e.encoding&&(n=e.encoding),n=new TextDecoder(n),"string"===typeof t?(/\.dbf$/.test(t)||(t+=".dbf"),t=c(t,e)):t=t instanceof ArrayBuffer||t instanceof Uint8Array?o(t):u(t),Promise.resolve(t).then((function(t){return B(t,n)}))}function tt(t,e,n){return J(t,e,n).then((function(t){var e=[],n={type:"FeatureCollection",features:e,bbox:t.bbox};return t.read().then((function i(r){return r.done?n:(e.push(r.value),t.read().then(i))}))}))}q.read=W,q.cancel=Z},6912:function(t){"use strict";t.exports={eudist:function(t,e,n){for(var i=t.length,r=0,o=0;o<i;o++){var s=(t[o]||0)-(e[o]||0);r+=s*s}return n?Math.sqrt(r):r},mandist:function(t,e,n){for(var i=t.length,r=0,o=0;o<i;o++)r+=Math.abs((t[o]||0)-(e[o]||0));return n?Math.sqrt(r):r},dist:function(t,e,n){var i=Math.abs(t-e);return n?i:i*i}}},7225:function(t,e,n){"use strict";var i=n(6912),r=i.eudist,o=i.dist;t.exports={kmrand:function(t,e){var n={},i=[],r=e<<2,o=t.length,s=t[0].length>0;while(i.length<e&&r-- >0){var a=t[Math.floor(Math.random()*o)],l=s?a.join("_"):""+a;n[l]||(n[l]=!0,i.push(a))}if(i.length<e)throw new Error("Error initializating clusters");return i},kmpp:function(t,e){var n=t[0].length?r:o,i=[],s=t.length,a=t[0].length>0,l={},c=t[Math.floor(Math.random()*s)],u=a?c.join("_"):""+c;i.push(c),l[u]=!0;while(i.length<e){for(var h=[],d=i.length,A=0,p=[],f=0;f<s;f++){for(var g=1/0,m=0;m<d;m++){var _=n(t[f],i[m]);_<=g&&(g=_)}h[f]=g}for(var y=0;y<s;y++)A+=h[y];for(var v=0;v<s;v++)p[v]={i:v,v:t[v],pr:h[v]/A,cs:0};p.sort((function(t,e){return t.pr-e.pr})),p[0].cs=p[0].pr;for(var x=1;x<s;x++)p[x].cs=p[x-1].cs+p[x].pr;var b=Math.random(),w=0;while(w<s-1&&p[w++].cs<b);i.push(p[w-1].v)}return i}}},840:function(t,e,n){"use strict";var i=n(6912),r=n(7225),o=i.eudist,s=(i.mandist,i.dist,r.kmrand),a=r.kmpp,l=1e4;function c(t,e,n){n=n||[];for(var i=0;i<t;i++)n[i]=e;return n}function u(t,e,n,i){var r=[],u=[],h=[],d=[],A=!1,p=i||l,f=t.length,g=t[0].length,m=g>0,_=[];if(n)r="kmrand"==n?s(t,e):"kmpp"==n?a(t,e):n;else{var y={};while(r.length<e){var v=Math.floor(Math.random()*f);y[v]||(y[v]=!0,r.push(t[v]))}}do{c(e,0,_);for(var x=0;x<f;x++){for(var b=1/0,w=0,E=0;E<e;E++){d=m?o(t[x],r[E]):Math.abs(t[x]-r[E]);d<=b&&(b=d,w=E)}h[x]=w,_[w]++}for(var C=[],B=(u=[],0);B<e;B++)C[B]=m?c(g,0,C[B]):0,u[B]=r[B];if(m){for(var S=0;S<e;S++)r[S]=[];for(var M=0;M<f;M++)for(var T=h[M],I=C[T],L=t[M],P=0;P<g;P++)I[P]+=L[P];A=!0;for(var F=0;F<e;F++){for(var R=r[F],D=C[F],O=u[F],U=_[F],N=0;N<g;N++)R[N]=D[N]/U||0;if(A)for(var k=0;k<g;k++)if(O[k]!=R[k]){A=!1;break}}}else{for(var z=0;z<f;z++){var Q=h[z];C[Q]+=t[z]}for(var G=0;G<e;G++)r[G]=C[G]/_[G]||0;A=!0;for(var H=0;H<e;H++)if(u[H]!=r[H]){A=!1;break}}A=A||--p<=0}while(!A);return{it:l-p,k:e,idxs:h,centroids:r}}t.exports=u},7053:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return i}});class i{constructor(t=[],e=r){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:n}=this,i=e[t];while(t>0){const r=t-1>>1,o=e[r];if(n(i,o)>=0)break;e[t]=o,t=r}e[t]=i}_down(t){const{data:e,compare:n}=this,i=this.length>>1,r=e[t];while(t<i){let i=1+(t<<1),o=e[i];const s=i+1;if(s<this.length&&n(e[s],o)<0&&(i=s,o=e[s]),n(o,r)>=0)break;e[t]=o,t=i}e[t]=r}}function r(t,e){return t<e?-1:t>e?1:0}},8505:function(t,e){!function(t,n){n(e)}(0,(function(t){"use strict";function e(){}function n(t){this.message=t||""}function i(t){this.message=t||""}function r(t){this.message=t||""}function o(){}function s(t){return null===t?Rt:t.color}function a(t){return null===t?null:t.parent}function l(t,e){null!==t&&(t.color=e)}function c(t){return null===t?null:t.left}function u(t){return null===t?null:t.right}function h(){this.root_=null,this.size_=0}function d(){}function A(){this.array_=[],arguments[0]instanceof vt&&this.addAll(arguments[0])}function p(){}function f(t){this.message=t||""}function g(){this.array_=[]}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(void 0===this||null===this)throw new TypeError(this+" is not an object");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(n+i,0):Math.min(i,n);var r=2 in arguments&&void 0!==arguments[2]?parseInt(Number(arguments[2]),10)||0:n;for(r=r<0?Math.max(n+arguments[2],0):Math.min(r,n);i<r;)e[i]=t,++i;return e},writable:!0}),Number.isFinite=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(t){return t!=t},Math.trunc=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)};var m=function(){};m.prototype.interfaces_=function(){return[]},m.prototype.getClass=function(){return m},m.prototype.equalsWithTolerance=function(t,e,n){return Math.abs(t-e)<=n};var _=function(t){function e(e){t.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),y=function(){},v={MAX_VALUE:{configurable:!0}};y.isNaN=function(t){return Number.isNaN(t)},y.doubleToLongBits=function(t){return t},y.longBitsToDouble=function(t){return t},y.isInfinite=function(t){return!Number.isFinite(t)},v.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(y,v);var x=function(){},b=function(){},w=function(){},E=function t(){if(this.x=null,this.y=null,this.z=null,0===arguments.length)this.x=0,this.y=0,this.z=t.NULL_ORDINATE;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.z=e.z}else 2===arguments.length?(this.x=arguments[0],this.y=arguments[1],this.z=t.NULL_ORDINATE):3===arguments.length&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},C={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};E.prototype.setOrdinate=function(t,e){switch(t){case E.X:this.x=e;break;case E.Y:this.y=e;break;case E.Z:this.z=e;break;default:throw new _("Invalid ordinate index: "+t)}},E.prototype.equals2D=function(){if(1===arguments.length){var t=arguments[0];return this.x===t.x&&this.y===t.y}if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!m.equalsWithTolerance(this.x,e.x,n)&&!!m.equalsWithTolerance(this.y,e.y,n)}},E.prototype.getOrdinate=function(t){switch(t){case E.X:return this.x;case E.Y:return this.y;case E.Z:return this.z}throw new _("Invalid ordinate index: "+t)},E.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||y.isNaN(this.z))&&y.isNaN(t.z)},E.prototype.equals=function(t){return t instanceof E&&this.equals2D(t)},E.prototype.equalInZ=function(t,e){return m.equalsWithTolerance(this.z,t.z,e)},E.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},E.prototype.clone=function(){},E.prototype.copy=function(){return new E(this)},E.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},E.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+n*n+i*i)},E.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},E.prototype.hashCode=function(){var t=17;return t=37*t+E.hashCode(this.x),37*t+E.hashCode(this.y)},E.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},E.prototype.interfaces_=function(){return[x,b,e]},E.prototype.getClass=function(){return E},E.hashCode=function(){if(1===arguments.length){var t=arguments[0],e=y.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},C.DimensionalComparator.get=function(){return B},C.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},C.NULL_ORDINATE.get=function(){return y.NaN},C.X.get=function(){return 0},C.Y.get=function(){return 1},C.Z.get=function(){return 2},Object.defineProperties(E,C);var B=function(t){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var e=arguments[0];if(2!==e&&3!==e)throw new _("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};B.prototype.compare=function(t,e){var n=t,i=e,r=B.compare(n.x,i.x);if(0!==r)return r;var o=B.compare(n.y,i.y);return 0!==o?o:this._dimensionsToTest<=2?0:B.compare(n.z,i.z)},B.prototype.interfaces_=function(){return[w]},B.prototype.getClass=function(){return B},B.compare=function(t,e){return t<e?-1:t>e?1:y.isNaN(t)?y.isNaN(e)?0:-1:y.isNaN(e)?1:0};var S=function(){};S.prototype.create=function(){},S.prototype.interfaces_=function(){return[]},S.prototype.getClass=function(){return S};var M=function(){},T={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};M.prototype.interfaces_=function(){return[]},M.prototype.getClass=function(){return M},M.toLocationSymbol=function(t){switch(t){case M.EXTERIOR:return"e";case M.BOUNDARY:return"b";case M.INTERIOR:return"i";case M.NONE:return"-"}throw new _("Unknown location value: "+t)},T.INTERIOR.get=function(){return 0},T.BOUNDARY.get=function(){return 1},T.EXTERIOR.get=function(){return 2},T.NONE.get=function(){return-1},Object.defineProperties(M,T);var I=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},L=function(){},P={LOG_10:{configurable:!0}};L.prototype.interfaces_=function(){return[]},L.prototype.getClass=function(){return L},L.log10=function(t){var e=Math.log(t);return y.isInfinite(e)||y.isNaN(e)?e:e/L.LOG_10},L.min=function(t,e,n,i){var r=t;return e<r&&(r=e),n<r&&(r=n),i<r&&(r=i),r},L.clamp=function(){if("number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1],n=arguments[2];return t<e?e:t>n?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],r=arguments[1],o=arguments[2];return i<r?r:i>o?o:i}},L.wrap=function(t,e){return t<0?e- -t%e:t%e},L.max=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],i=t;return e>i&&(i=e),n>i&&(i=n),i}if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3],l=r;return o>l&&(l=o),s>l&&(l=s),a>l&&(l=a),l}},L.average=function(t,e){return(t+e)/2},P.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(L,P);var F=function(t){this.str=t};F.prototype.append=function(t){this.str+=t},F.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},F.prototype.toString=function(t){return this.str};var R=function(t){this.value=t};R.prototype.intValue=function(){return this.value},R.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},R.isNaN=function(t){return Number.isNaN(t)};var D=function(){};D.isWhitespace=function(t){return t<=32&&t>=0||127===t},D.toUpperCase=function(t){return t.toUpperCase()};var O=function t(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else if("string"==typeof arguments[0]){var i=arguments[0];t.call(this,t.parse(i))}}else if(2===arguments.length){var r=arguments[0],o=arguments[1];this.init(r,o)}},U={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};O.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},O.prototype.extractSignificantDigits=function(t,e){var n=this.abs(),i=O.magnitude(n._hi),r=O.TEN.pow(i);(n=n.divide(r)).gt(O.TEN)?(n=n.divide(O.TEN),i+=1):n.lt(O.ONE)&&(n=n.multiply(O.TEN),i-=1);for(var o=i+1,s=new F,a=O.MAX_PRINT_DIGITS-1,l=0;l<=a;l++){t&&l===o&&s.append(".");var c=Math.trunc(n._hi);if(c<0)break;var u=!1,h=0;c>9?(u=!0,h="9"):h="0"+c,s.append(h),n=n.subtract(O.valueOf(c)).multiply(O.TEN),u&&n.selfAdd(O.TEN);var d=!0,A=O.magnitude(n._hi);if(A<0&&Math.abs(A)>=a-l&&(d=!1),!d)break}return e[0]=i,s.toString()},O.prototype.sqr=function(){return this.multiply(this)},O.prototype.doubleValue=function(){return this._hi+this._lo},O.prototype.subtract=function(){if(arguments[0]instanceof O){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},O.prototype.equals=function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},O.prototype.isZero=function(){return 0===this._hi&&0===this._lo},O.prototype.selfSubtract=function(){if(arguments[0]instanceof O){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},O.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},O.prototype.min=function(t){return this.le(t)?this:t},O.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof O){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1],r=null,o=null,s=null,a=null,l=null,c=null,u=null,h=null;return l=this._hi/n,c=O.SPLIT*l,r=c-l,h=O.SPLIT*n,r=c-r,o=l-r,s=h-n,u=l*n,s=h-s,a=n-s,h=r*s-u+r*a+o*s+o*a,c=(this._hi-u-h+this._lo-l*i)/n,h=l+c,this._hi=h,this._lo=l-h+c,this}},O.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},O.prototype.divide=function(){if(arguments[0]instanceof O){var t=arguments[0],e=null,n=null,i=null,r=null,o=null,s=null,a=null,l=null;return n=(o=this._hi/t._hi)-(e=(s=O.SPLIT*o)-(e=s-o)),l=e*(i=(l=O.SPLIT*t._hi)-(i=l-t._hi))-(a=o*t._hi)+e*(r=t._hi-i)+n*i+n*r,s=(this._hi-a-l+this._lo-o*t._lo)/t._hi,new O(l=o+s,o-l+s)}if("number"==typeof arguments[0]){var c=arguments[0];return y.isNaN(c)?O.createNaN():O.copy(this).selfDivide(c,0)}},O.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},O.prototype.pow=function(t){if(0===t)return O.valueOf(1);var e=new O(this),n=O.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2==1&&n.selfMultiply(e),(i/=2)>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},O.prototype.ceil=function(){if(this.isNaN())return O.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new O(t,e)},O.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},O.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},O.prototype.setValue=function(){if(arguments[0]instanceof O){var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},O.prototype.max=function(t){return this.ge(t)?this:t},O.prototype.sqrt=function(){if(this.isZero())return O.valueOf(0);if(this.isNegative())return O.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=O.valueOf(e),i=this.subtract(n.sqr())._hi*(.5*t);return n.add(i)},O.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof O){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0],n=null,i=null,r=null,o=null,s=null,a=null;return r=this._hi+e,s=r-this._hi,o=r-s,o=e-s+(this._hi-o),a=o+this._lo,n=r+a,i=a+(r-n),this._hi=n+i,this._lo=i+(n-this._hi),this}}else if(2===arguments.length){var l=arguments[0],c=arguments[1],u=null,h=null,d=null,A=null,p=null,f=null,g=null;A=this._hi+l,h=this._lo+c,p=A-(f=A-this._hi),d=h-(g=h-this._lo);var m=(u=A+(f=(p=l-f+(this._hi-p))+h))+(f=(d=c-g+(this._lo-d))+(f+(A-u))),_=f+(u-m);return this._hi=m,this._lo=_,this}},O.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof O){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1],r=null,o=null,s=null,a=null,l=null,c=null;r=(l=O.SPLIT*this._hi)-this._hi,c=O.SPLIT*n,r=l-r,o=this._hi-r,s=c-n;var u=(l=this._hi*n)+(c=r*(s=c-s)-l+r*(a=n-s)+o*s+o*a+(this._hi*i+this._lo*n)),h=c+(r=l-u);return this._hi=u,this._lo=h,this}},O.prototype.selfSqr=function(){return this.selfMultiply(this)},O.prototype.floor=function(){if(this.isNaN())return O.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new O(t,e)},O.prototype.negate=function(){return this.isNaN()?this:new O(-this._hi,-this._lo)},O.prototype.clone=function(){},O.prototype.multiply=function(){if(arguments[0]instanceof O){var t=arguments[0];return t.isNaN()?O.createNaN():O.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return y.isNaN(e)?O.createNaN():O.copy(this).selfMultiply(e,0)}},O.prototype.isNaN=function(){return y.isNaN(this._hi)},O.prototype.intValue=function(){return Math.trunc(this._hi)},O.prototype.toString=function(){var t=O.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},O.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),i=e[0]+1,r=n;if("."===n.charAt(0))r="0"+n;else if(i<0)r="0."+O.stringOfChar("0",-i)+n;else if(-1===n.indexOf(".")){var o=i-n.length;r=n+O.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+r:r},O.prototype.reciprocal=function(){var t=null,e=null,n=null,i=null,r=null,o=null,s=null,a=null;e=(r=1/this._hi)-(t=(o=O.SPLIT*r)-(t=o-r)),n=(a=O.SPLIT*this._hi)-this._hi;var l=r+(o=(1-(s=r*this._hi)-(a=t*(n=a-n)-s+t*(i=this._hi-n)+e*n+e*i)-r*this._lo)/this._hi);return new O(l,r-l+o)},O.prototype.toSciNotation=function(){if(this.isZero())return O.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),i=O.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===n.charAt(0))throw new Error("Found leading zero: "+n);var r="";n.length>1&&(r=n.substring(1));var o=n.charAt(0)+"."+r;return this.isNegative()?"-"+o+i:o+i},O.prototype.abs=function(){return this.isNaN()?O.NaN:this.isNegative()?this.negate():new O(this)},O.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},O.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},O.prototype.add=function(){if(arguments[0]instanceof O){var t=arguments[0];return O.copy(this).selfAdd(t)}if("number"==typeof arguments[0]){var e=arguments[0];return O.copy(this).selfAdd(e)}},O.prototype.init=function(){if(1===arguments.length){if("number"==typeof arguments[0]){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof O){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this._hi=n,this._lo=i}},O.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},O.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},O.prototype.trunc=function(){return this.isNaN()?O.NaN:this.isPositive()?this.floor():this.ceil()},O.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},O.prototype.interfaces_=function(){return[e,x,b]},O.prototype.getClass=function(){return O},O.sqr=function(t){return O.valueOf(t).selfMultiply(t)},O.valueOf=function(){if("string"==typeof arguments[0]){var t=arguments[0];return O.parse(t)}if("number"==typeof arguments[0]){var e=arguments[0];return new O(e)}},O.sqrt=function(t){return O.valueOf(t).sqrt()},O.parse=function(t){for(var e=0,n=t.length;D.isWhitespace(t.charAt(e));)e++;var i=!1;if(e<n){var r=t.charAt(e);"-"!==r&&"+"!==r||(e++,"-"===r&&(i=!0))}for(var o=new O,s=0,a=0,l=0;!(e>=n);){var c=t.charAt(e);if(e++,D.isDigit(c)){var u=c-"0";o.selfMultiply(O.TEN),o.selfAdd(u),s++}else{if("."!==c){if("e"===c||"E"===c){var h=t.substring(e);try{l=R.parseInt(h)}catch(e){throw e instanceof Error?new Error("Invalid exponent "+h+" in string "+t):e}break}throw new Error("Unexpected character '"+c+"' at position "+e+" in string "+t)}a=s}}var d=o,A=s-a-l;if(0===A)d=o;else if(A>0){var p=O.TEN.pow(A);d=o.divide(p)}else if(A<0){var f=O.TEN.pow(-A);d=o.multiply(f)}return i?d.negate():d},O.createNaN=function(){return new O(y.NaN,y.NaN)},O.copy=function(t){return new O(t)},O.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),i=Math.trunc(Math.floor(n));return 10*Math.pow(10,i)<=e&&(i+=1),i},O.stringOfChar=function(t,e){for(var n=new F,i=0;i<e;i++)n.append(t);return n.toString()},U.PI.get=function(){return new O(3.141592653589793,12246467991473532e-32)},U.TWO_PI.get=function(){return new O(6.283185307179586,24492935982947064e-32)},U.PI_2.get=function(){return new O(1.5707963267948966,6123233995736766e-32)},U.E.get=function(){return new O(2.718281828459045,14456468917292502e-32)},U.NaN.get=function(){return new O(y.NaN,y.NaN)},U.EPS.get=function(){return 123259516440783e-46},U.SPLIT.get=function(){return 134217729},U.MAX_PRINT_DIGITS.get=function(){return 32},U.TEN.get=function(){return O.valueOf(10)},U.ONE.get=function(){return O.valueOf(1)},U.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},U.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(O,U);var N=function(){},k={DP_SAFE_EPSILON:{configurable:!0}};N.prototype.interfaces_=function(){return[]},N.prototype.getClass=function(){return N},N.orientationIndex=function(t,e,n){var i=N.orientationIndexFilter(t,e,n);if(i<=1)return i;var r=O.valueOf(e.x).selfAdd(-t.x),o=O.valueOf(e.y).selfAdd(-t.y),s=O.valueOf(n.x).selfAdd(-e.x),a=O.valueOf(n.y).selfAdd(-e.y);return r.selfMultiply(a).selfSubtract(o.selfMultiply(s)).signum()},N.signOfDet2x2=function(t,e,n,i){return t.multiply(i).selfSubtract(e.multiply(n)).signum()},N.intersection=function(t,e,n,i){var r=O.valueOf(i.y).selfSubtract(n.y).selfMultiply(O.valueOf(e.x).selfSubtract(t.x)),o=O.valueOf(i.x).selfSubtract(n.x).selfMultiply(O.valueOf(e.y).selfSubtract(t.y)),s=r.subtract(o),a=O.valueOf(i.x).selfSubtract(n.x).selfMultiply(O.valueOf(t.y).selfSubtract(n.y)),l=O.valueOf(i.y).selfSubtract(n.y).selfMultiply(O.valueOf(t.x).selfSubtract(n.x)),c=a.subtract(l).selfDivide(s).doubleValue(),u=O.valueOf(t.x).selfAdd(O.valueOf(e.x).selfSubtract(t.x).selfMultiply(c)).doubleValue(),h=O.valueOf(e.x).selfSubtract(t.x).selfMultiply(O.valueOf(t.y).selfSubtract(n.y)),d=O.valueOf(e.y).selfSubtract(t.y).selfMultiply(O.valueOf(t.x).selfSubtract(n.x)),A=h.subtract(d).selfDivide(s).doubleValue(),p=O.valueOf(n.y).selfAdd(O.valueOf(i.y).selfSubtract(n.y).selfMultiply(A)).doubleValue();return new E(u,p)},N.orientationIndexFilter=function(t,e,n){var i=null,r=(t.x-n.x)*(e.y-n.y),o=(t.y-n.y)*(e.x-n.x),s=r-o;if(r>0){if(o<=0)return N.signum(s);i=r+o}else{if(!(r<0))return N.signum(s);if(o>=0)return N.signum(s);i=-r-o}var a=N.DP_SAFE_EPSILON*i;return s>=a||-s>=a?N.signum(s):2},N.signum=function(t){return t>0?1:t<0?-1:0},k.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(N,k);var z=function(){},Q={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Q.X.get=function(){return 0},Q.Y.get=function(){return 1},Q.Z.get=function(){return 2},Q.M.get=function(){return 3},z.prototype.setOrdinate=function(t,e,n){},z.prototype.size=function(){},z.prototype.getOrdinate=function(t,e){},z.prototype.getCoordinate=function(){},z.prototype.getCoordinateCopy=function(t){},z.prototype.getDimension=function(){},z.prototype.getX=function(t){},z.prototype.clone=function(){},z.prototype.expandEnvelope=function(t){},z.prototype.copy=function(){},z.prototype.getY=function(t){},z.prototype.toCoordinateArray=function(){},z.prototype.interfaces_=function(){return[b]},z.prototype.getClass=function(){return z},Object.defineProperties(z,Q);var G=function(){},H=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(G),V=function(){};V.arraycopy=function(t,e,n,i,r){for(var o=0,s=e;s<e+r;s++)n[i+o]=t[s],o++},V.getProperty=function(t){return{"line.separator":"\n"}[t]};var j=function t(){if(this.x=null,this.y=null,this.w=null,0===arguments.length)this.x=0,this.y=0,this.w=1;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.w=1}else if(2===arguments.length){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var n=arguments[0],i=arguments[1];this.x=n,this.y=i,this.w=1}else if(arguments[0]instanceof t&&arguments[1]instanceof t){var r=arguments[0],o=arguments[1];this.x=r.y*o.w-o.y*r.w,this.y=o.x*r.w-r.x*o.w,this.w=r.x*o.y-o.x*r.y}else if(arguments[0]instanceof E&&arguments[1]instanceof E){var s=arguments[0],a=arguments[1];this.x=s.y-a.y,this.y=a.x-s.x,this.w=s.x*a.y-a.x*s.y}}else if(3===arguments.length){var l=arguments[0],c=arguments[1],u=arguments[2];this.x=l,this.y=c,this.w=u}else if(4===arguments.length){var h=arguments[0],d=arguments[1],A=arguments[2],p=arguments[3],f=h.y-d.y,g=d.x-h.x,m=h.x*d.y-d.x*h.y,_=A.y-p.y,y=p.x-A.x,v=A.x*p.y-p.x*A.y;this.x=g*v-y*m,this.y=_*m-f*v,this.w=f*y-_*g}};j.prototype.getY=function(){var t=this.y/this.w;if(y.isNaN(t)||y.isInfinite(t))throw new H;return t},j.prototype.getX=function(){var t=this.x/this.w;if(y.isNaN(t)||y.isInfinite(t))throw new H;return t},j.prototype.getCoordinate=function(){var t=new E;return t.x=this.getX(),t.y=this.getY(),t},j.prototype.interfaces_=function(){return[]},j.prototype.getClass=function(){return j},j.intersection=function(t,e,n,i){var r=t.y-e.y,o=e.x-t.x,s=t.x*e.y-e.x*t.y,a=n.y-i.y,l=i.x-n.x,c=n.x*i.y-i.x*n.y,u=r*l-a*o,h=(o*c-l*s)/u,d=(a*s-r*c)/u;if(y.isNaN(h)||y.isInfinite(h)||y.isNaN(d)||y.isInfinite(d))throw new H;return new E(h,d)};var Z=function t(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,0===arguments.length)this.init();else if(1===arguments.length){if(arguments[0]instanceof E){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.init(i.x,r.x,i.y,r.y)}else if(4===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2],l=arguments[3];this.init(o,s,a,l)}},W={serialVersionUID:{configurable:!0}};Z.prototype.getArea=function(){return this.getWidth()*this.getHeight()},Z.prototype.equals=function(t){if(!(t instanceof Z))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},Z.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new Z;var e=this._minx>t._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,i=this._maxx<t._maxx?this._maxx:t._maxx,r=this._maxy<t._maxy?this._maxy:t._maxy;return new Z(e,i,n,r)},Z.prototype.isNull=function(){return this._maxx<this._minx},Z.prototype.getMaxX=function(){return this._maxx},Z.prototype.covers=function(){if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];return this.covers(t.x,t.y)}if(arguments[0]instanceof Z){var e=arguments[0];return!this.isNull()&&!e.isNull()&&e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return!this.isNull()&&n>=this._minx&&n<=this._maxx&&i>=this._miny&&i<=this._maxy}},Z.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof Z){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}if(arguments[0]instanceof E){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return!this.isNull()&&!(n>this._maxx||n<this._minx||i>this._maxy||i<this._miny)}},Z.prototype.getMinY=function(){return this._miny},Z.prototype.getMinX=function(){return this._minx},Z.prototype.expandToInclude=function(){if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof Z){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=i,this._maxy=i):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},Z.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},Z.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},Z.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},Z.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},Z.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},Z.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},Z.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},Z.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},Z.prototype.expandBy=function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},Z.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof Z){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof E){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return this.covers(n,i)}},Z.prototype.centre=function(){return this.isNull()?null:new E((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},Z.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof Z){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];r<o?(this._minx=r,this._maxx=o):(this._minx=o,this._maxx=r),s<a?(this._miny=s,this._maxy=a):(this._miny=a,this._maxy=s)}},Z.prototype.getMaxY=function(){return this._maxy},Z.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxy<t._miny?n=t._miny-this._maxy:this._miny>t._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)},Z.prototype.hashCode=function(){var t=17;return t=37*t+E.hashCode(this._minx),t=37*t+E.hashCode(this._maxx),t=37*t+E.hashCode(this._miny),37*t+E.hashCode(this._maxy)},Z.prototype.interfaces_=function(){return[x,e]},Z.prototype.getClass=function(){return Z},Z.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.x<e.x?t.x:e.x)&&n.x<=(t.x>e.x?t.x:e.x)&&n.y>=(t.y<e.y?t.y:e.y)&&n.y<=(t.y>e.y?t.y:e.y)}if(4===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2],s=arguments[3],a=Math.min(o.x,s.x),l=Math.max(o.x,s.x),c=Math.min(i.x,r.x),u=Math.max(i.x,r.x);return!(c>l)&&!(u<a)&&(a=Math.min(o.y,s.y),l=Math.max(o.y,s.y),c=Math.min(i.y,r.y),u=Math.max(i.y,r.y),!(c>l)&&!(u<a))}},W.serialVersionUID.get=function(){return 0x51845cd552189800},Object.defineProperties(Z,W);var X={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},K=function(t){this.geometryFactory=t||new me};K.prototype.read=function(t){var e,n,i;t=t.replace(/[\n\r]/g," ");var r=X.typeStr.exec(t);if(-1!==t.search("EMPTY")&&((r=X.emptyTypeStr.exec(t))[2]=void 0),r&&(n=r[1].toLowerCase(),i=r[2],J[n]&&(e=J[n].apply(this,[i]))),void 0===e)throw new Error("Could not parse WKT "+t);return e},K.prototype.write=function(t){return this.extractGeometry(t)},K.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!q[e])return null;var n=e.toUpperCase();return t.isEmpty()?n+" EMPTY":n+"("+q[e].apply(this,[t])+")"};var q={coordinate:function(t){return t.x+" "+t.y},point:function(t){return q.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push("("+q.point.apply(this,[t._geometries[n]])+")");return e.join(",")},linestring:function(t){for(var e=[],n=0,i=t._points._coordinates.length;n<i;++n)e.push(q.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(",")},linearring:function(t){for(var e=[],n=0,i=t._points._coordinates.length;n<i;++n)e.push(q.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(",")},multilinestring:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push("("+q.linestring.apply(this,[t._geometries[n]])+")");return e.join(",")},polygon:function(t){var e=[];e.push("("+q.linestring.apply(this,[t._shell])+")");for(var n=0,i=t._holes.length;n<i;++n)e.push("("+q.linestring.apply(this,[t._holes[n]])+")");return e.join(",")},multipolygon:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push("("+q.polygon.apply(this,[t._geometries[n]])+")");return e.join(",")},geometrycollection:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push(this.extractGeometry(t._geometries[n]));return e.join(",")}},J={point:function(t){if(void 0===t)return this.geometryFactory.createPoint();var e=t.trim().split(X.spaces);return this.geometryFactory.createPoint(new E(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){if(void 0===t)return this.geometryFactory.createMultiPoint();for(var e,n=t.trim().split(","),i=[],r=0,o=n.length;r<o;++r)e=n[r].replace(X.trimParens,"$1"),i.push(J.point.apply(this,[e]));return this.geometryFactory.createMultiPoint(i)},linestring:function(t){if(void 0===t)return this.geometryFactory.createLineString();for(var e,n=t.trim().split(","),i=[],r=0,o=n.length;r<o;++r)e=n[r].trim().split(X.spaces),i.push(new E(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLineString(i)},linearring:function(t){if(void 0===t)return this.geometryFactory.createLinearRing();for(var e,n=t.trim().split(","),i=[],r=0,o=n.length;r<o;++r)e=n[r].trim().split(X.spaces),i.push(new E(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLinearRing(i)},multilinestring:function(t){if(void 0===t)return this.geometryFactory.createMultiLineString();for(var e,n=t.trim().split(X.parenComma),i=[],r=0,o=n.length;r<o;++r)e=n[r].replace(X.trimParens,"$1"),i.push(J.linestring.apply(this,[e]));return this.geometryFactory.createMultiLineString(i)},polygon:function(t){if(void 0===t)return this.geometryFactory.createPolygon();for(var e,n,i,r,o=t.trim().split(X.parenComma),s=[],a=0,l=o.length;a<l;++a)e=o[a].replace(X.trimParens,"$1"),n=J.linestring.apply(this,[e]),i=this.geometryFactory.createLinearRing(n._points),0===a?r=i:s.push(i);return this.geometryFactory.createPolygon(r,s)},multipolygon:function(t){if(void 0===t)return this.geometryFactory.createMultiPolygon();for(var e,n=t.trim().split(X.doubleParenComma),i=[],r=0,o=n.length;r<o;++r)e=n[r].replace(X.trimParens,"$1"),i.push(J.polygon.apply(this,[e]));return this.geometryFactory.createMultiPolygon(i)},geometrycollection:function(t){if(void 0===t)return this.geometryFactory.createGeometryCollection();for(var e=(t=t.replace(/,\s*([A-Za-z])/g,"|$1")).trim().split("|"),n=[],i=0,r=e.length;i<r;++i)n.push(this.read(e[i]));return this.geometryFactory.createGeometryCollection(n)}},Y=function(t){this.parser=new K(t)};Y.prototype.write=function(t){return this.parser.write(t)},Y.toLineString=function(t,e){if(2!==arguments.length)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var $=function(t){function e(e){t.call(this,e),this.name="RuntimeException",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),tt=function(t){function e(){if(t.call(this),0===arguments.length)t.call(this);else if(1===arguments.length){var e=arguments[0];t.call(this,e)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}($),et=function(){};et.prototype.interfaces_=function(){return[]},et.prototype.getClass=function(){return et},et.shouldNeverReachHere=function(){if(0===arguments.length)et.shouldNeverReachHere(null);else if(1===arguments.length){var t=arguments[0];throw new tt("Should never reach here"+(null!==t?": "+t:""))}},et.isTrue=function(){var t,e;if(1===arguments.length)t=arguments[0],et.isTrue(t,null);else if(2===arguments.length&&(t=arguments[0],e=arguments[1],!t))throw null===e?new tt:new tt(e)},et.equals=function(){var t,e,n;if(2===arguments.length)t=arguments[0],e=arguments[1],et.equals(t,e,null);else if(3===arguments.length&&(t=arguments[0],e=arguments[1],n=arguments[2],!e.equals(t)))throw new tt("Expected "+t+" but encountered "+e+(null!==n?": "+n:""))};var nt=function(){this._result=null,this._inputLines=Array(2).fill().map((function(){return Array(2)})),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new E,this._intPt[1]=new E,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},it={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};nt.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},nt.prototype.getTopologySummary=function(){var t=new F;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},nt.prototype.computeIntersection=function(t,e,n,i){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=n,this._inputLines[1][1]=i,this._result=this.computeIntersect(t,e,n,i)},nt.prototype.getIntersectionNum=function(){return this._result},nt.prototype.computeIntLineIndex=function(){if(0===arguments.length)null===this._intLineIndex&&(this._intLineIndex=Array(2).fill().map((function(){return Array(2)})),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(1===arguments.length){var t=arguments[0];this.getEdgeDistance(t,0)>this.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},nt.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},nt.prototype.setPrecisionModel=function(t){this._precisionModel=t},nt.prototype.isInteriorIntersection=function(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var t=arguments[0],e=0;e<this._result;e++)if(!this._intPt[e].equals2D(this._inputLines[t][0])&&!this._intPt[e].equals2D(this._inputLines[t][1]))return!0;return!1}},nt.prototype.getIntersection=function(t){return this._intPt[t]},nt.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},nt.prototype.hasIntersection=function(){return this._result!==nt.NO_INTERSECTION},nt.prototype.getEdgeDistance=function(t,e){return nt.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1])},nt.prototype.isCollinear=function(){return this._result===nt.COLLINEAR_INTERSECTION},nt.prototype.toString=function(){return Y.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+Y.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},nt.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},nt.prototype.isIntersection=function(t){for(var e=0;e<this._result;e++)if(this._intPt[e].equals2D(t))return!0;return!1},nt.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},nt.prototype.interfaces_=function(){return[]},nt.prototype.getClass=function(){return nt},nt.computeEdgeDistance=function(t,e,n){var i=Math.abs(n.x-e.x),r=Math.abs(n.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(n))o=i>r?i:r;else{var s=Math.abs(t.x-e.x),a=Math.abs(t.y-e.y);0!==(o=i>r?s:a)||t.equals(e)||(o=Math.max(s,a))}return et.isTrue(!(0===o&&!t.equals(e)),"Bad distance calculation"),o},nt.nonRobustComputeEdgeDistance=function(t,e,n){var i=t.x-e.x,r=t.y-e.y,o=Math.sqrt(i*i+r*r);return et.isTrue(!(0===o&&!t.equals(e)),"Invalid distance calculation"),o},it.DONT_INTERSECT.get=function(){return 0},it.DO_INTERSECT.get=function(){return 1},it.COLLINEAR.get=function(){return 2},it.NO_INTERSECTION.get=function(){return 0},it.POINT_INTERSECTION.get=function(){return 1},it.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(nt,it);var rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(t){var e=new Z(this._inputLines[0][0],this._inputLines[0][1]),n=new Z(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&n.contains(t)},e.prototype.computeIntersection=function(){if(3!==arguments.length)return t.prototype.computeIntersection.apply(this,arguments);var e=arguments[0],n=arguments[1],i=arguments[2];if(this._isProper=!1,Z.intersects(n,i,e)&&0===at.orientationIndex(n,i,e)&&0===at.orientationIndex(i,n,e))return this._isProper=!0,(e.equals(n)||e.equals(i))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION},e.prototype.normalizeToMinimum=function(t,e,n,i,r){r.x=this.smallestInAbsValue(t.x,e.x,n.x,i.x),r.y=this.smallestInAbsValue(t.y,e.y,n.y,i.y),t.x-=r.x,t.y-=r.y,e.x-=r.x,e.y-=r.y,n.x-=r.x,n.y-=r.y,i.x-=r.x,i.y-=r.y},e.prototype.safeHCoordinateIntersection=function(t,n,i,r){var o=null;try{o=j.intersection(t,n,i,r)}catch(s){if(!(s instanceof H))throw s;o=e.nearestEndpoint(t,n,i,r)}return o},e.prototype.intersection=function(t,n,i,r){var o=this.intersectionWithNormalization(t,n,i,r);return this.isInSegmentEnvelopes(o)||(o=new E(e.nearestEndpoint(t,n,i,r))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},e.prototype.smallestInAbsValue=function(t,e,n,i){var r=t,o=Math.abs(r);return Math.abs(e)<o&&(r=e,o=Math.abs(e)),Math.abs(n)<o&&(r=n,o=Math.abs(n)),Math.abs(i)<o&&(r=i),r},e.prototype.checkDD=function(t,e,n,i,r){var o=N.intersection(t,e,n,i),s=this.isInSegmentEnvelopes(o);V.out.println("DD in env = "+s+" --------------------- "+o),r.distance(o)>1e-4&&V.out.println("Distance = "+r.distance(o))},e.prototype.intersectionWithNormalization=function(t,e,n,i){var r=new E(t),o=new E(e),s=new E(n),a=new E(i),l=new E;this.normalizeToEnvCentre(r,o,s,a,l);var c=this.safeHCoordinateIntersection(r,o,s,a);return c.x+=l.x,c.y+=l.y,c},e.prototype.computeCollinearIntersection=function(e,n,i,r){var o=Z.intersects(e,n,i),s=Z.intersects(e,n,r),a=Z.intersects(i,r,e),l=Z.intersects(i,r,n);return o&&s?(this._intPt[0]=i,this._intPt[1]=r,t.COLLINEAR_INTERSECTION):a&&l?(this._intPt[0]=e,this._intPt[1]=n,t.COLLINEAR_INTERSECTION):o&&a?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||s||l?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&l?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||s||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&a?(this._intPt[0]=r,this._intPt[1]=e,!r.equals(e)||o||l?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&l?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||o||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(t,e,n,i,r){var o=t.x<e.x?t.x:e.x,s=t.y<e.y?t.y:e.y,a=t.x>e.x?t.x:e.x,l=t.y>e.y?t.y:e.y,c=n.x<i.x?n.x:i.x,u=n.y<i.y?n.y:i.y,h=n.x>i.x?n.x:i.x,d=n.y>i.y?n.y:i.y,A=((o>c?o:c)+(a<h?a:h))/2,p=((s>u?s:u)+(l<d?l:d))/2;r.x=A,r.y=p,t.x-=r.x,t.y-=r.y,e.x-=r.x,e.y-=r.y,n.x-=r.x,n.y-=r.y,i.x-=r.x,i.y-=r.y},e.prototype.computeIntersect=function(e,n,i,r){if(this._isProper=!1,!Z.intersects(e,n,i,r))return t.NO_INTERSECTION;var o=at.orientationIndex(e,n,i),s=at.orientationIndex(e,n,r);if(o>0&&s>0||o<0&&s<0)return t.NO_INTERSECTION;var a=at.orientationIndex(i,r,e),l=at.orientationIndex(i,r,n);return a>0&&l>0||a<0&&l<0?t.NO_INTERSECTION:0===o&&0===s&&0===a&&0===l?this.computeCollinearIntersection(e,n,i,r):(0===o||0===s||0===a||0===l?(this._isProper=!1,e.equals2D(i)||e.equals2D(r)?this._intPt[0]=e:n.equals2D(i)||n.equals2D(r)?this._intPt[0]=n:0===o?this._intPt[0]=new E(i):0===s?this._intPt[0]=new E(r):0===a?this._intPt[0]=new E(e):0===l&&(this._intPt[0]=new E(n))):(this._isProper=!0,this._intPt[0]=this.intersection(e,n,i,r)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(t,e,n,i){var r=t,o=at.distancePointLine(t,n,i),s=at.distancePointLine(e,n,i);return s<o&&(o=s,r=e),(s=at.distancePointLine(n,t,e))<o&&(o=s,r=n),(s=at.distancePointLine(i,t,e))<o&&(o=s,r=i),r},e}(nt),ot=function(){};ot.prototype.interfaces_=function(){return[]},ot.prototype.getClass=function(){return ot},ot.orientationIndex=function(t,e,n){var i=e.x-t.x,r=e.y-t.y,o=n.x-e.x,s=n.y-e.y;return ot.signOfDet2x2(i,r,o,s)},ot.signOfDet2x2=function(t,e,n,i){var r=null,o=null,s=null;if(r=1,0===t||0===i)return 0===e||0===n?0:e>0?n>0?-r:r:n>0?r:-r;if(0===e||0===n)return i>0?t>0?r:-r:t>0?-r:r;if(e>0?i>0?e<=i||(r=-r,o=t,t=n,n=o,o=e,e=i,i=o):e<=-i?(r=-r,n=-n,i=-i):(o=t,t=-n,n=o,o=e,e=-i,i=o):i>0?-e<=i?(r=-r,t=-t,e=-e):(o=-t,t=n,n=o,o=-e,e=i,i=o):e>=i?(t=-t,e=-e,n=-n,i=-i):(r=-r,o=-t,t=-n,n=o,o=-e,e=-i,i=o),t>0){if(!(n>0))return r;if(!(t<=n))return r}else{if(n>0)return-r;if(!(t>=n))return-r;r=-r,t=-t,n=-n}for(;;){if(s=Math.floor(n/t),n-=s*t,(i-=s*e)<0)return-r;if(i>e)return r;if(t>n+n){if(e<i+i)return r}else{if(e>i+i)return-r;n=t-n,i=e-i,r=-r}if(0===i)return 0===n?0:-r;if(0===n)return r;if(s=Math.floor(t/n),t-=s*n,(e-=s*i)<0)return r;if(e>i)return-r;if(n>t+t){if(i<e+e)return-r}else{if(i>e+e)return r;t=n-t,e=i-e,r=-r}if(0===e)return 0===t?0:r;if(0===t)return-r}};var st=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};st.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var n=t.x,i=e.x;return n>i&&(n=e.x,i=t.x),this._p.x>=n&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var r=t.x-this._p.x,o=t.y-this._p.y,s=e.x-this._p.x,a=e.y-this._p.y,l=ot.signOfDet2x2(r,o,s,a);if(0===l)return this._isPointOnSegment=!0,null;a<o&&(l=-l),l>0&&this._crossingCount++}},st.prototype.isPointInPolygon=function(){return this.getLocation()!==M.EXTERIOR},st.prototype.getLocation=function(){return this._isPointOnSegment?M.BOUNDARY:this._crossingCount%2==1?M.INTERIOR:M.EXTERIOR},st.prototype.isOnSegment=function(){return this._isPointOnSegment},st.prototype.interfaces_=function(){return[]},st.prototype.getClass=function(){return st},st.locatePointInRing=function(){if(arguments[0]instanceof E&&I(arguments[1],z)){for(var t=arguments[0],e=arguments[1],n=new st(t),i=new E,r=new E,o=1;o<e.size();o++)if(e.getCoordinate(o,i),e.getCoordinate(o-1,r),n.countSegment(i,r),n.isOnSegment())return n.getLocation();return n.getLocation()}if(arguments[0]instanceof E&&arguments[1]instanceof Array){for(var s=arguments[0],a=arguments[1],l=new st(s),c=1;c<a.length;c++){var u=a[c],h=a[c-1];if(l.countSegment(u,h),l.isOnSegment())return l.getLocation()}return l.getLocation()}};var at=function(){},lt={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.orientationIndex=function(t,e,n){return N.orientationIndex(t,e,n)},at.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,n=t[0].x,i=1;i<t.length-1;i++){var r=t[i].x-n,o=t[i+1].y;e+=r*(t[i-1].y-o)}return e/2}if(I(arguments[0],z)){var s=arguments[0],a=s.size();if(a<3)return 0;var l=new E,c=new E,u=new E;s.getCoordinate(0,c),s.getCoordinate(1,u);var h=c.x;u.x-=h;for(var d=0,A=1;A<a-1;A++)l.y=c.y,c.x=u.x,c.y=u.y,s.getCoordinate(A+1,u),u.x-=h,d+=c.x*(l.y-u.y);return d/2}},at.distanceLineLine=function(t,e,n,i){if(t.equals(e))return at.distancePointLine(t,n,i);if(n.equals(i))return at.distancePointLine(i,t,e);var r=!1;if(Z.intersects(t,e,n,i)){var o=(e.x-t.x)*(i.y-n.y)-(e.y-t.y)*(i.x-n.x);if(0===o)r=!0;else{var s=(t.y-n.y)*(i.x-n.x)-(t.x-n.x)*(i.y-n.y),a=((t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y))/o,l=s/o;(l<0||l>1||a<0||a>1)&&(r=!0)}}else r=!0;return r?L.min(at.distancePointLine(t,n,i),at.distancePointLine(e,n,i),at.distancePointLine(n,t,e),at.distancePointLine(i,t,e)):0},at.isPointInRing=function(t,e){return at.locatePointInRing(t,e)!==M.EXTERIOR},at.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,i=new E;t.getCoordinate(0,i);for(var r=i.x,o=i.y,s=1;s<e;s++){t.getCoordinate(s,i);var a=i.x,l=i.y,c=a-r,u=l-o;n+=Math.sqrt(c*c+u*u),r=a,o=l}return n},at.isCCW=function(t){var e=t.length-1;if(e<3)throw new _("Ring has fewer than 4 points, so orientation cannot be determined");for(var n=t[0],i=0,r=1;r<=e;r++){var o=t[r];o.y>n.y&&(n=o,i=r)}var s=i;do{(s-=1)<0&&(s=e)}while(t[s].equals2D(n)&&s!==i);var a=i;do{a=(a+1)%e}while(t[a].equals2D(n)&&a!==i);var l=t[s],c=t[a];if(l.equals2D(n)||c.equals2D(n)||l.equals2D(c))return!1;var u=at.computeOrientation(l,n,c),h=!1;return h=0===u?l.x>c.x:u>0,h},at.locatePointInRing=function(t,e){return st.locatePointInRing(t,e)},at.distancePointLinePerpendicular=function(t,e,n){var i=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),r=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/i;return Math.abs(r)*Math.sqrt(i)},at.computeOrientation=function(t,e,n){return at.orientationIndex(t,e,n)},at.distancePointLine=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new _("Line array must contain at least one vertex");for(var n=t.distance(e[0]),i=0;i<e.length-1;i++){var r=at.distancePointLine(t,e[i],e[i+1]);r<n&&(n=r)}return n}if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];if(s.x===a.x&&s.y===a.y)return o.distance(s);var l=(a.x-s.x)*(a.x-s.x)+(a.y-s.y)*(a.y-s.y),c=((o.x-s.x)*(a.x-s.x)+(o.y-s.y)*(a.y-s.y))/l;if(c<=0)return o.distance(s);if(c>=1)return o.distance(a);var u=((s.y-o.y)*(a.x-s.x)-(s.x-o.x)*(a.y-s.y))/l;return Math.abs(u)*Math.sqrt(l)}},at.isOnLine=function(t,e){for(var n=new rt,i=1;i<e.length;i++){var r=e[i-1],o=e[i];if(n.computeIntersection(t,r,o),n.hasIntersection())return!0}return!1},lt.CLOCKWISE.get=function(){return-1},lt.RIGHT.get=function(){return at.CLOCKWISE},lt.COUNTERCLOCKWISE.get=function(){return 1},lt.LEFT.get=function(){return at.COUNTERCLOCKWISE},lt.COLLINEAR.get=function(){return 0},lt.STRAIGHT.get=function(){return at.COLLINEAR},Object.defineProperties(at,lt);var ct=function(){};ct.prototype.filter=function(t){},ct.prototype.interfaces_=function(){return[]},ct.prototype.getClass=function(){return ct};var ut=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},ht={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};ut.prototype.isGeometryCollection=function(){return this.getSortIndex()===ut.SORTINDEX_GEOMETRYCOLLECTION},ut.prototype.getFactory=function(){return this._factory},ut.prototype.getGeometryN=function(t){return this},ut.prototype.getArea=function(){return 0},ut.prototype.isRectangle=function(){return!1},ut.prototype.equals=function(){if(arguments[0]instanceof ut){var t=arguments[0];return null!==t&&this.equalsTopo(t)}if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof ut))return!1;var n=e;return this.equalsExact(n)}},ut.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},ut.prototype.geometryChanged=function(){this.apply(ut.geometryChangedFilter)},ut.prototype.geometryChangedAction=function(){this._envelope=null},ut.prototype.equalsNorm=function(t){return null!==t&&this.norm().equalsExact(t.norm())},ut.prototype.getLength=function(){return 0},ut.prototype.getNumGeometries=function(){return 1},ut.prototype.compareTo=function(){if(1===arguments.length){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}if(2===arguments.length){var n=arguments[0],i=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,i)}},ut.prototype.getUserData=function(){return this._userData},ut.prototype.getSRID=function(){return this._SRID},ut.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},ut.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===ut.SORTINDEX_GEOMETRYCOLLECTION)throw new _("This method does not support GeometryCollection arguments")},ut.prototype.equal=function(t,e,n){return 0===n?t.equals(e):t.distance(e)<=n},ut.prototype.norm=function(){var t=this.copy();return t.normalize(),t},ut.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},ut.prototype.getEnvelopeInternal=function(){return null===this._envelope&&(this._envelope=this.computeEnvelopeInternal()),new Z(this._envelope)},ut.prototype.setSRID=function(t){this._SRID=t},ut.prototype.setUserData=function(t){this._userData=t},ut.prototype.compare=function(t,e){for(var n=t.iterator(),i=e.iterator();n.hasNext()&&i.hasNext();){var r=n.next(),o=i.next(),s=r.compareTo(o);if(0!==s)return s}return n.hasNext()?1:i.hasNext()?-1:0},ut.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},ut.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===ut.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===ut.SORTINDEX_MULTIPOINT||this.getSortIndex()===ut.SORTINDEX_MULTILINESTRING||this.getSortIndex()===ut.SORTINDEX_MULTIPOLYGON},ut.prototype.interfaces_=function(){return[b,x,e]},ut.prototype.getClass=function(){return ut},ut.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},ut.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(null===t[e])return!0;return!1},ht.serialVersionUID.get=function(){return 0x799ea46522854c00},ht.SORTINDEX_POINT.get=function(){return 0},ht.SORTINDEX_MULTIPOINT.get=function(){return 1},ht.SORTINDEX_LINESTRING.get=function(){return 2},ht.SORTINDEX_LINEARRING.get=function(){return 3},ht.SORTINDEX_MULTILINESTRING.get=function(){return 4},ht.SORTINDEX_POLYGON.get=function(){return 5},ht.SORTINDEX_MULTIPOLYGON.get=function(){return 6},ht.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},ht.geometryChangedFilter.get=function(){return dt},Object.defineProperties(ut,ht);var dt=function(){};dt.interfaces_=function(){return[ct]},dt.filter=function(t){t.geometryChangedAction()};var At=function(){};At.prototype.filter=function(t){},At.prototype.interfaces_=function(){return[]},At.prototype.getClass=function(){return At};var pt=function(){},ft={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};pt.prototype.isInBoundary=function(t){},pt.prototype.interfaces_=function(){return[]},pt.prototype.getClass=function(){return pt},ft.Mod2BoundaryNodeRule.get=function(){return gt},ft.EndPointBoundaryNodeRule.get=function(){return mt},ft.MultiValentEndPointBoundaryNodeRule.get=function(){return _t},ft.MonoValentEndPointBoundaryNodeRule.get=function(){return yt},ft.MOD2_BOUNDARY_RULE.get=function(){return new gt},ft.ENDPOINT_BOUNDARY_RULE.get=function(){return new mt},ft.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new _t},ft.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new yt},ft.OGC_SFS_BOUNDARY_RULE.get=function(){return pt.MOD2_BOUNDARY_RULE},Object.defineProperties(pt,ft);var gt=function(){};gt.prototype.isInBoundary=function(t){return t%2==1},gt.prototype.interfaces_=function(){return[pt]},gt.prototype.getClass=function(){return gt};var mt=function(){};mt.prototype.isInBoundary=function(t){return t>0},mt.prototype.interfaces_=function(){return[pt]},mt.prototype.getClass=function(){return mt};var _t=function(){};_t.prototype.isInBoundary=function(t){return t>1},_t.prototype.interfaces_=function(){return[pt]},_t.prototype.getClass=function(){return _t};var yt=function(){};yt.prototype.isInBoundary=function(t){return 1===t},yt.prototype.interfaces_=function(){return[pt]},yt.prototype.getClass=function(){return yt};var vt=function(){};vt.prototype.add=function(){},vt.prototype.addAll=function(){},vt.prototype.isEmpty=function(){},vt.prototype.iterator=function(){},vt.prototype.size=function(){},vt.prototype.toArray=function(){},vt.prototype.remove=function(){},(n.prototype=new Error).name="IndexOutOfBoundsException";var xt=function(){};xt.prototype.hasNext=function(){},xt.prototype.next=function(){},xt.prototype.remove=function(){};var bt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(vt);(i.prototype=new Error).name="NoSuchElementException";var wt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof vt&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,vt]},e.prototype.add=function(t){return 1===arguments.length?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.set=function(t,e){var n=this.array_[t];return this.array_[t]=e,n},e.prototype.iterator=function(){return new Et(this)},e.prototype.get=function(t){if(t<0||t>=this.size())throw new n;return this.array_[t]},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e.prototype.remove=function(t){for(var e=!1,n=0,i=this.array_.length;n<i;n++)if(this.array_[n]===t){this.array_.splice(n,1),e=!0;break}return e},e}(bt),Et=function(t){function e(e){t.call(this),this.arrayList_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new i;return this.arrayList_.get(this.position_++)},e.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},e.prototype.set=function(t){return this.arrayList_.set(this.position_-1,t)},e.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},e}(xt),Ct=function(t){function e(){if(t.call(this),0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.ensureCapacity(e.length),this.add(e,!0)}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.ensureCapacity(n.length),this.add(n,i)}}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={coordArrayType:{configurable:!0}};return n.coordArrayType.get=function(){return new Array(0).fill(null)},e.prototype.getCoordinate=function(t){return this.get(t)},e.prototype.addAll=function(){if(2===arguments.length){for(var e=arguments[0],n=arguments[1],i=!1,r=e.iterator();r.hasNext();)this.add(r.next(),n),i=!0;return i}return t.prototype.addAll.apply(this,arguments)},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=0;n<this.size();n++)e.add(n,this.get(n).copy());return e},e.prototype.toCoordinateArray=function(){return this.toArray(e.coordArrayType)},e.prototype.add=function(){if(1===arguments.length){var e=arguments[0];t.prototype.add.call(this,e)}else if(2===arguments.length){if(arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var n=arguments[0],i=arguments[1];return this.add(n,i,!0),!0}if(arguments[0]instanceof E&&"boolean"==typeof arguments[1]){var r=arguments[0];if(!arguments[1]&&this.size()>=1&&this.get(this.size()-1).equals2D(r))return null;t.prototype.add.call(this,r)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var o=arguments[0],s=arguments[1];return this.add(o,s),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var a=arguments[0],l=arguments[1];if(arguments[2])for(var c=0;c<a.length;c++)this.add(a[c],l);else for(var u=a.length-1;u>=0;u--)this.add(a[u],l);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof E){var h=arguments[0],d=arguments[1];if(!arguments[2]){var A=this.size();if(A>0){if(h>0&&this.get(h-1).equals2D(d))return null;if(h<A&&this.get(h).equals2D(d))return null}}t.prototype.add.call(this,h,d)}}else if(4===arguments.length){var p=arguments[0],f=arguments[1],g=arguments[2],m=arguments[3],_=1;g>m&&(_=-1);for(var y=g;y!==m;y+=_)this.add(p[y],f);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new E(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(wt),Bt=function(){},St={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};St.ForwardComparator.get=function(){return Mt},St.BidirectionalComparator.get=function(){return Tt},St.coordArrayType.get=function(){return new Array(0).fill(null)},Bt.prototype.interfaces_=function(){return[]},Bt.prototype.getClass=function(){return Bt},Bt.isRing=function(t){return!(t.length<4)&&!!t[0].equals2D(t[t.length-1])},Bt.ptNotInList=function(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(Bt.indexOf(i,e)<0)return i}return null},Bt.scroll=function(t,e){var n=Bt.indexOf(e,t);if(n<0)return null;var i=new Array(t.length).fill(null);V.arraycopy(t,n,i,0,t.length-n),V.arraycopy(t,0,i,t.length-n,n),V.arraycopy(i,0,t,0,t.length)},Bt.equals=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(null===t||null===e)return!1;if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0}if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];if(i===r)return!0;if(null===i||null===r)return!1;if(i.length!==r.length)return!1;for(var s=0;s<i.length;s++)if(0!==o.compare(i[s],r[s]))return!1;return!0}},Bt.intersection=function(t,e){for(var n=new Ct,i=0;i<t.length;i++)e.intersects(t[i])&&n.add(t[i],!0);return n.toCoordinateArray()},Bt.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},Bt.removeRepeatedPoints=function(t){return Bt.hasRepeatedPoints(t)?new Ct(t,!1).toCoordinateArray():t},Bt.reverse=function(t){for(var e=t.length-1,n=Math.trunc(e/2),i=0;i<=n;i++){var r=t[i];t[i]=t[e-i],t[e-i]=r}},Bt.removeNull=function(t){for(var e=0,n=0;n<t.length;n++)null!==t[n]&&e++;var i=new Array(e).fill(null);if(0===e)return i;for(var r=0,o=0;o<t.length;o++)null!==t[o]&&(i[r++]=t[o]);return i},Bt.copyDeep=function(){if(1===arguments.length){for(var t=arguments[0],e=new Array(t.length).fill(null),n=0;n<t.length;n++)e[n]=new E(t[n]);return e}if(5===arguments.length)for(var i=arguments[0],r=arguments[1],o=arguments[2],s=arguments[3],a=arguments[4],l=0;l<a;l++)o[s+l]=new E(i[r+l])},Bt.isEqualReversed=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],r=e[t.length-n-1];if(0!==i.compareTo(r))return!1}return!0},Bt.envelope=function(t){for(var e=new Z,n=0;n<t.length;n++)e.expandToInclude(t[n]);return e},Bt.toCoordinateArray=function(t){return t.toArray(Bt.coordArrayType)},Bt.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},Bt.indexOf=function(t,e){for(var n=0;n<e.length;n++)if(t.equals(e[n]))return n;return-1},Bt.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var n=t.length-1-e,i=t[e].compareTo(t[n]);if(0!==i)return i}return 1},Bt.compare=function(t,e){for(var n=0;n<t.length&&n<e.length;){var i=t[n].compareTo(e[n]);if(0!==i)return i;n++}return n<e.length?-1:n<t.length?1:0},Bt.minCoordinate=function(t){for(var e=null,n=0;n<t.length;n++)(null===e||e.compareTo(t[n])>0)&&(e=t[n]);return e},Bt.extract=function(t,e,n){e=L.clamp(e,0,t.length);var i=(n=L.clamp(n,-1,t.length))-e+1;n<0&&(i=0),e>=t.length&&(i=0),n<e&&(i=0);var r=new Array(i).fill(null);if(0===i)return r;for(var o=0,s=e;s<=n;s++)r[o++]=t[s];return r},Object.defineProperties(Bt,St);var Mt=function(){};Mt.prototype.compare=function(t,e){return Bt.compare(t,e)},Mt.prototype.interfaces_=function(){return[w]},Mt.prototype.getClass=function(){return Mt};var Tt=function(){};Tt.prototype.compare=function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(0===n.length)return 0;var r=Bt.compare(n,i);return Bt.isEqualReversed(n,i)?0:r},Tt.prototype.OLDcompare=function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(0===n.length)return 0;for(var r=Bt.increasingDirection(n),o=Bt.increasingDirection(i),s=r>0?0:n.length-1,a=o>0?0:n.length-1,l=0;l<n.length;l++){var c=n[s].compareTo(i[a]);if(0!==c)return c;s+=r,a+=o}return 0},Tt.prototype.interfaces_=function(){return[w]},Tt.prototype.getClass=function(){return Tt};var It=function(){};It.prototype.get=function(){},It.prototype.put=function(){},It.prototype.size=function(){},It.prototype.values=function(){},It.prototype.entrySet=function(){};var Lt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(It);(r.prototype=new Error).name="OperationNotSupported",(o.prototype=new vt).contains=function(){};var Pt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof vt&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contains=function(t){for(var e=0,n=this.array_.length;e<n;e++)if(this.array_[e]===t)return!0;return!1},e.prototype.add=function(t){return!this.contains(t)&&(this.array_.push(t),!0)},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.remove=function(t){throw new Error},e.prototype.size=function(){return this.array_.length},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e.prototype.iterator=function(){return new Ft(this)},e}(o),Ft=function(t){function e(e){t.call(this),this.hashSet_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new i;return this.hashSet_.array_[this.position_++]},e.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},e.prototype.remove=function(){throw new r},e}(xt),Rt=0;(h.prototype=new Lt).get=function(t){for(var e=this.root_;null!==e;){var n=t.compareTo(e.key);if(n<0)e=e.left;else{if(!(n>0))return e.value;e=e.right}}return null},h.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:Rt,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,i,r=this.root_;do{if(n=r,(i=t.compareTo(r.key))<0)r=r.left;else{if(!(i>0)){var o=r.value;return r.value=e,o}r=r.right}}while(null!==r);var s={key:t,left:null,right:null,value:e,parent:n,color:Rt,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?n.left=s:n.right=s,this.fixAfterInsertion(s),this.size_++,null},h.prototype.fixAfterInsertion=function(t){for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(a(t)===c(a(a(t)))){var e=u(a(a(t)));1===s(e)?(l(a(t),Rt),l(e,Rt),l(a(a(t)),1),t=a(a(t))):(t===u(a(t))&&(t=a(t),this.rotateLeft(t)),l(a(t),Rt),l(a(a(t)),1),this.rotateRight(a(a(t))))}else{var n=c(a(a(t)));1===s(n)?(l(a(t),Rt),l(n,Rt),l(a(a(t)),1),t=a(a(t))):(t===c(a(t))&&(t=a(t),this.rotateRight(t)),l(a(t),Rt),l(a(a(t)),1),this.rotateLeft(a(a(t))))}this.root_.color=Rt},h.prototype.values=function(){var t=new wt,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=h.successor(e));)t.add(e.value);return t},h.prototype.entrySet=function(){var t=new Pt,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=h.successor(e));)t.add(e);return t},h.prototype.rotateLeft=function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},h.prototype.rotateRight=function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},h.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},h.successor=function(t){if(null===t)return null;if(null!==t.right){for(var e=t.right;null!==e.left;)e=e.left;return e}for(var n=t.parent,i=t;null!==n&&i===n.right;)i=n,n=n.parent;return n},h.prototype.size=function(){return this.size_};var Dt=function(){};Dt.prototype.interfaces_=function(){return[]},Dt.prototype.getClass=function(){return Dt},d.prototype=new o,(A.prototype=new d).contains=function(t){for(var e=0,n=this.array_.length;e<n;e++)if(0===this.array_[e].compareTo(t))return!0;return!1},A.prototype.add=function(t){if(this.contains(t))return!1;for(var e=0,n=this.array_.length;e<n;e++)if(1===this.array_[e].compareTo(t))return this.array_.splice(e,0,t),!0;return this.array_.push(t),!0},A.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},A.prototype.remove=function(t){throw new r},A.prototype.size=function(){return this.array_.length},A.prototype.isEmpty=function(){return 0===this.array_.length},A.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},A.prototype.iterator=function(){return new Ot(this)};var Ot=function(t){this.treeSet_=t,this.position_=0};Ot.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new i;return this.treeSet_.array_[this.position_++]},Ot.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},Ot.prototype.remove=function(){throw new r};var Ut=function(){};Ut.sort=function(){var t,e,n,i,r=arguments[0];if(1===arguments.length)i=function(t,e){return t.compareTo(e)},r.sort(i);else if(2===arguments.length)n=arguments[1],i=function(t,e){return n.compare(t,e)},r.sort(i);else if(3===arguments.length){(e=r.slice(arguments[1],arguments[2])).sort();var o=r.slice(0,arguments[1]).concat(e,r.slice(arguments[2],r.length));for(r.splice(0,r.length),t=0;t<o.length;t++)r.push(o[t])}else if(4===arguments.length)for(e=r.slice(arguments[1],arguments[2]),n=arguments[3],i=function(t,e){return n.compare(t,e)},e.sort(i),o=r.slice(0,arguments[1]).concat(e,r.slice(arguments[2],r.length)),r.splice(0,r.length),t=0;t<o.length;t++)r.push(o[t])},Ut.asList=function(t){for(var e=new wt,n=0,i=t.length;n<i;n++)e.add(t[n]);return e};var Nt=function(){},kt={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};kt.P.get=function(){return 0},kt.L.get=function(){return 1},kt.A.get=function(){return 2},kt.FALSE.get=function(){return-1},kt.TRUE.get=function(){return-2},kt.DONTCARE.get=function(){return-3},kt.SYM_FALSE.get=function(){return"F"},kt.SYM_TRUE.get=function(){return"T"},kt.SYM_DONTCARE.get=function(){return"*"},kt.SYM_P.get=function(){return"0"},kt.SYM_L.get=function(){return"1"},kt.SYM_A.get=function(){return"2"},Nt.prototype.interfaces_=function(){return[]},Nt.prototype.getClass=function(){return Nt},Nt.toDimensionSymbol=function(t){switch(t){case Nt.FALSE:return Nt.SYM_FALSE;case Nt.TRUE:return Nt.SYM_TRUE;case Nt.DONTCARE:return Nt.SYM_DONTCARE;case Nt.P:return Nt.SYM_P;case Nt.L:return Nt.SYM_L;case Nt.A:return Nt.SYM_A}throw new _("Unknown dimension value: "+t)},Nt.toDimensionValue=function(t){switch(D.toUpperCase(t)){case Nt.SYM_FALSE:return Nt.FALSE;case Nt.SYM_TRUE:return Nt.TRUE;case Nt.SYM_DONTCARE:return Nt.DONTCARE;case Nt.SYM_P:return Nt.P;case Nt.SYM_L:return Nt.L;case Nt.SYM_A:return Nt.A}throw new _("Unknown dimension symbol: "+t)},Object.defineProperties(Nt,kt);var zt=function(){};zt.prototype.filter=function(t){},zt.prototype.interfaces_=function(){return[]},zt.prototype.getClass=function(){return zt};var Qt=function(){};Qt.prototype.filter=function(t,e){},Qt.prototype.isDone=function(){},Qt.prototype.isGeometryChanged=function(){},Qt.prototype.interfaces_=function(){return[]},Qt.prototype.getClass=function(){return Qt};var Gt=function(t){function e(e,n){if(t.call(this,n),this._geometries=e||[],t.hasNullElements(this._geometries))throw new _("geometries must not contain null elements")}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){for(var t=new Z,e=0;e<this._geometries.length;e++)t.expandToInclude(this._geometries[e].getEnvelopeInternal());return t},e.prototype.getGeometryN=function(t){return this._geometries[t]},e.prototype.getSortIndex=function(){return t.SORTINDEX_GEOMETRYCOLLECTION},e.prototype.getCoordinates=function(){for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=0;n<this._geometries.length;n++)for(var i=this._geometries[n].getCoordinates(),r=0;r<i.length;r++)t[++e]=i[r];return t},e.prototype.getArea=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getArea();return t},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var i=e;if(this._geometries.length!==i._geometries.length)return!1;for(var r=0;r<this._geometries.length;r++)if(!this._geometries[r].equalsExact(i._geometries[r],n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<this._geometries.length;t++)this._geometries[t].normalize();Ut.sort(this._geometries)},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},e.prototype.getBoundaryDimension=function(){for(var t=Nt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getBoundaryDimension());return t},e.prototype.getDimension=function(){for(var t=Nt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getDimension());return t},e.prototype.getLength=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getNumPoints();return t},e.prototype.getNumGeometries=function(){return this._geometries.length},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createGeometryCollection(e)},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0],e=new A(Ut.asList(this._geometries)),n=new A(Ut.asList(t._geometries));return this.compare(e,n)}if(2===arguments.length){for(var i=arguments[0],r=arguments[1],o=i,s=this.getNumGeometries(),a=o.getNumGeometries(),l=0;l<s&&l<a;){var c=this.getGeometryN(l),u=o.getGeometryN(l),h=c.compareToSameClass(u,r);if(0!==h)return h;l++}return l<s?1:l<a?-1:0}},e.prototype.apply=function(){if(I(arguments[0],At))for(var t=arguments[0],e=0;e<this._geometries.length;e++)this._geometries[e].apply(t);else if(I(arguments[0],Qt)){var n=arguments[0];if(0===this._geometries.length)return null;for(var i=0;i<this._geometries.length&&(this._geometries[i].apply(n),!n.isDone());i++);n.isGeometryChanged()&&this.geometryChanged()}else if(I(arguments[0],zt)){var r=arguments[0];r.filter(this);for(var o=0;o<this._geometries.length;o++)this._geometries[o].apply(r)}else if(I(arguments[0],ct)){var s=arguments[0];s.filter(this);for(var a=0;a<this._geometries.length;a++)this._geometries[a].apply(s)}},e.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),et.shouldNeverReachHere(),null},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._geometries=new Array(this._geometries.length).fill(null);for(var n=0;n<this._geometries.length;n++)e._geometries[n]=this._geometries[n].clone();return e},e.prototype.getGeometryType=function(){return"GeometryCollection"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.isEmpty=function(){for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isEmpty())return!1;return!0},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x4f07bcb1f857d800},Object.defineProperties(e,n),e}(ut),Ht=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ut.SORTINDEX_MULTILINESTRING},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Nt.FALSE:0},e.prototype.isClosed=function(){if(this.isEmpty())return!1;for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isClosed())return!1;return!0},e.prototype.getDimension=function(){return 1},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[t-1-n]=this._geometries[n].reverse();return this.getFactory().createMultiLineString(e)},e.prototype.getBoundary=function(){return new Vt(this).getBoundary()},e.prototype.getGeometryType=function(){return"MultiLineString"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[Dt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x7155d2ab4afa8000},Object.defineProperties(e,n),e}(Gt),Vt=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,1===arguments.length){var t=arguments[0],e=pt.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=i}};Vt.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return 1===e.length?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},Vt.prototype.getBoundary=function(){return this._geom instanceof Kt?this.boundaryLineString(this._geom):this._geom instanceof Ht?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},Vt.prototype.boundaryLineString=function(t){return this._geom.isEmpty()?this.getEmptyMultiPoint():t.isClosed()?this._bnRule.isInBoundary(2)?t.getStartPoint():this._geomFact.createMultiPoint():this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},Vt.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},Vt.prototype.computeBoundaryCoordinates=function(t){var e=new wt;this._endpointMap=new h;for(var n=0;n<t.getNumGeometries();n++){var i=t.getGeometryN(n);0!==i.getNumPoints()&&(this.addEndpoint(i.getCoordinateN(0)),this.addEndpoint(i.getCoordinateN(i.getNumPoints()-1)))}for(var r=this._endpointMap.entrySet().iterator();r.hasNext();){var o=r.next(),s=o.getValue().count;this._bnRule.isInBoundary(s)&&e.add(o.getKey())}return Bt.toCoordinateArray(e)},Vt.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);null===e&&(e=new jt,this._endpointMap.put(t,e)),e.count++},Vt.prototype.interfaces_=function(){return[]},Vt.prototype.getClass=function(){return Vt},Vt.getBoundary=function(){if(1===arguments.length){var t=arguments[0];return new Vt(t).getBoundary()}if(2===arguments.length){var e=arguments[0],n=arguments[1];return new Vt(e,n).getBoundary()}};var jt=function(){this.count=null};jt.prototype.interfaces_=function(){return[]},jt.prototype.getClass=function(){return jt};var Zt=function(){},Wt={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};Zt.prototype.interfaces_=function(){return[]},Zt.prototype.getClass=function(){return Zt},Zt.chars=function(t,e){for(var n=new Array(e).fill(null),i=0;i<e;i++)n[i]=t;return String(n)},Zt.getStackTrace=function(){if(1===arguments.length){var t=arguments[0],e=new function(){},n=new function(){}(e);return t.printStackTrace(n),e.toString()}if(2===arguments.length){for(var i=arguments[0],r=arguments[1],o="",s=new function(){}(new function(){}(Zt.getStackTrace(i))),a=0;a<r;a++)try{o+=s.readLine()+Zt.NEWLINE}catch(t){if(!(t instanceof p))throw t;et.shouldNeverReachHere()}return o}},Zt.split=function(t,e){for(var n=e.length,i=new wt,r=""+t,o=r.indexOf(e);o>=0;){var s=r.substring(0,o);i.add(s),o=(r=r.substring(o+n)).indexOf(e)}r.length>0&&i.add(r);for(var a=new Array(i.size()).fill(null),l=0;l<a.length;l++)a[l]=i.get(l);return a},Zt.toString=function(){if(1===arguments.length){var t=arguments[0];return Zt.SIMPLE_ORDINATE_FORMAT.format(t)}},Zt.spaces=function(t){return Zt.chars(" ",t)},Wt.NEWLINE.get=function(){return V.getProperty("line.separator")},Wt.SIMPLE_ORDINATE_FORMAT.get=function(){return new function(){}("0.#")},Object.defineProperties(Zt,Wt);var Xt=function(){};Xt.prototype.interfaces_=function(){return[]},Xt.prototype.getClass=function(){return Xt},Xt.copyCoord=function(t,e,n,i){for(var r=Math.min(t.getDimension(),n.getDimension()),o=0;o<r;o++)n.setOrdinate(i,o,t.getOrdinate(e,o))},Xt.isRing=function(t){var e=t.size();return 0===e||!(e<=3)&&t.getOrdinate(0,z.X)===t.getOrdinate(e-1,z.X)&&t.getOrdinate(0,z.Y)===t.getOrdinate(e-1,z.Y)},Xt.isEqual=function(t,e){var n=t.size();if(n!==e.size())return!1;for(var i=Math.min(t.getDimension(),e.getDimension()),r=0;r<n;r++)for(var o=0;o<i;o++){var s=t.getOrdinate(r,o),a=e.getOrdinate(r,o);if(t.getOrdinate(r,o)!==e.getOrdinate(r,o)&&(!y.isNaN(s)||!y.isNaN(a)))return!1}return!0},Xt.extend=function(t,e,n){var i=t.create(n,e.getDimension()),r=e.size();if(Xt.copy(e,0,i,0,r),r>0)for(var o=r;o<n;o++)Xt.copy(e,r-1,i,o,1);return i},Xt.reverse=function(t){for(var e=t.size()-1,n=Math.trunc(e/2),i=0;i<=n;i++)Xt.swap(t,i,e-i)},Xt.swap=function(t,e,n){if(e===n)return null;for(var i=0;i<t.getDimension();i++){var r=t.getOrdinate(e,i);t.setOrdinate(e,i,t.getOrdinate(n,i)),t.setOrdinate(n,i,r)}},Xt.copy=function(t,e,n,i,r){for(var o=0;o<r;o++)Xt.copyCoord(t,e+o,n,i+o)},Xt.toString=function(){if(1===arguments.length){var t=arguments[0],e=t.size();if(0===e)return"()";var n=t.getDimension(),i=new F;i.append("(");for(var r=0;r<e;r++){r>0&&i.append(" ");for(var o=0;o<n;o++)o>0&&i.append(","),i.append(Zt.toString(t.getOrdinate(r,o)))}return i.append(")"),i.toString()}},Xt.ensureValidRing=function(t,e){var n=e.size();return 0===n?e:n<=3?Xt.createClosedRing(t,e,4):e.getOrdinate(0,z.X)===e.getOrdinate(n-1,z.X)&&e.getOrdinate(0,z.Y)===e.getOrdinate(n-1,z.Y)?e:Xt.createClosedRing(t,e,n+1)},Xt.createClosedRing=function(t,e,n){var i=t.create(n,e.getDimension()),r=e.size();Xt.copy(e,0,i,0,r);for(var o=r;o<n;o++)Xt.copy(e,0,i,o,1);return i};var Kt=function(t){function e(e,n){t.call(this,n),this._points=null,this.init(e)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new Z:this._points.expandEnvelope(new Z)},e.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},e.prototype.getSortIndex=function(){return t.SORTINDEX_LINESTRING},e.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var i=e;if(this._points.size()!==i._points.size())return!1;for(var r=0;r<this._points.size();r++)if(!this.equal(this._points.getCoordinate(r),i._points.getCoordinate(r),n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<Math.trunc(this._points.size()/2);t++){var e=this._points.size()-1-t;if(!this._points.getCoordinate(t).equals(this._points.getCoordinate(e)))return this._points.getCoordinate(t).compareTo(this._points.getCoordinate(e))>0&&Xt.reverse(this._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Nt.FALSE:0},e.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return at.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var t=this._points.copy();return Xt.reverse(t),this.getFactory().createLineString(t)},e.prototype.compareToSameClass=function(){if(1===arguments.length){for(var t=arguments[0],e=0,n=0;e<this._points.size()&&n<t._points.size();){var i=this._points.getCoordinate(e).compareTo(t._points.getCoordinate(n));if(0!==i)return i;e++,n++}return e<this._points.size()?1:n<t._points.size()?-1:0}if(2===arguments.length){var r=arguments[0];return arguments[1].compare(this._points,r._points)}},e.prototype.apply=function(){if(I(arguments[0],At))for(var t=arguments[0],e=0;e<this._points.size();e++)t.filter(this._points.getCoordinate(e));else if(I(arguments[0],Qt)){var n=arguments[0];if(0===this._points.size())return null;for(var i=0;i<this._points.size()&&(n.filter(this._points,i),!n.isDone());i++);n.isGeometryChanged()&&this.geometryChanged()}else(I(arguments[0],zt)||I(arguments[0],ct))&&arguments[0].filter(this)},e.prototype.getBoundary=function(){return new Vt(this).getBoundary()},e.prototype.isEquivalentClass=function(t){return t instanceof e},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._points=this._points.clone(),e},e.prototype.getCoordinateN=function(t){return this._points.getCoordinate(t)},e.prototype.getGeometryType=function(){return"LineString"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._points},e.prototype.isEmpty=function(){return 0===this._points.size()},e.prototype.init=function(t){if(null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),1===t.size())throw new _("Invalid number of points in LineString (found "+t.size()+" - must be 0 or >= 2)");this._points=t},e.prototype.isCoordinate=function(t){for(var e=0;e<this._points.size();e++)if(this._points.getCoordinate(e).equals(t))return!0;return!1},e.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},e.prototype.getPointN=function(t){return this.getFactory().createPoint(this._points.getCoordinate(t))},e.prototype.interfaces_=function(){return[Dt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(e,n),e}(ut),qt=function(){};qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt};var Jt=function(t){function e(e,n){t.call(this,n),this._coordinates=e||null,this.init(this._coordinates)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new Z;var t=new Z;return t.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),t},e.prototype.getSortIndex=function(){return t.SORTINDEX_POINT},e.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&(!(!this.isEmpty()||!e.isEmpty())||this.isEmpty()===e.isEmpty()&&this.equal(e.getCoordinate(),this.getCoordinate(),n))}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){},e.prototype.getCoordinate=function(){return 0!==this._coordinates.size()?this._coordinates.getCoordinate(0):null},e.prototype.getBoundaryDimension=function(){return Nt.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getNumPoints=function(){return this.isEmpty()?0:1},e.prototype.reverse=function(){return this.copy()},e.prototype.getX=function(){if(null===this.getCoordinate())throw new Error("getX called on empty Point");return this.getCoordinate().x},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0];return this.getCoordinate().compareTo(t.getCoordinate())}if(2===arguments.length){var e=arguments[0];return arguments[1].compare(this._coordinates,e._coordinates)}},e.prototype.apply=function(){if(I(arguments[0],At)){var t=arguments[0];if(this.isEmpty())return null;t.filter(this.getCoordinate())}else if(I(arguments[0],Qt)){var e=arguments[0];if(this.isEmpty())return null;e.filter(this._coordinates,0),e.isGeometryChanged()&&this.geometryChanged()}else(I(arguments[0],zt)||I(arguments[0],ct))&&arguments[0].filter(this)},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._coordinates=this._coordinates.clone(),e},e.prototype.getGeometryType=function(){return"Point"},e.prototype.copy=function(){return new e(this._coordinates.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._coordinates},e.prototype.getY=function(){if(null===this.getCoordinate())throw new Error("getY called on empty Point");return this.getCoordinate().y},e.prototype.isEmpty=function(){return 0===this._coordinates.size()},e.prototype.init=function(t){null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),et.isTrue(t.size()<=1),this._coordinates=t},e.prototype.isSimple=function(){return!0},e.prototype.interfaces_=function(){return[qt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x44077bad161cbc00},Object.defineProperties(e,n),e}(ut),Yt=function(){};Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt};var $t=function(t){function e(e,n,i){if(t.call(this,i),this._shell=null,this._holes=null,null===e&&(e=this.getFactory().createLinearRing()),null===n&&(n=[]),t.hasNullElements(n))throw new _("holes must not contain null elements");if(e.isEmpty()&&t.hasNonEmptyElements(n))throw new _("shell is empty but holes are not");this._shell=e,this._holes=n}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},e.prototype.getSortIndex=function(){return t.SORTINDEX_POLYGON},e.prototype.getCoordinates=function(){if(this.isEmpty())return[];for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=this._shell.getCoordinates(),i=0;i<n.length;i++)t[++e]=n[i];for(var r=0;r<this._holes.length;r++)for(var o=this._holes[r].getCoordinates(),s=0;s<o.length;s++)t[++e]=o[s];return t},e.prototype.getArea=function(){var t=0;t+=Math.abs(at.signedArea(this._shell.getCoordinateSequence()));for(var e=0;e<this._holes.length;e++)t-=Math.abs(at.signedArea(this._holes[e].getCoordinateSequence()));return t},e.prototype.isRectangle=function(){if(0!==this.getNumInteriorRing())return!1;if(null===this._shell)return!1;if(5!==this._shell.getNumPoints())return!1;for(var t=this._shell.getCoordinateSequence(),e=this.getEnvelopeInternal(),n=0;n<5;n++){var i=t.getX(n);if(i!==e.getMinX()&&i!==e.getMaxX())return!1;var r=t.getY(n);if(r!==e.getMinY()&&r!==e.getMaxY())return!1}for(var o=t.getX(0),s=t.getY(0),a=1;a<=4;a++){var l=t.getX(a),c=t.getY(a);if(l!==o===(c!==s))return!1;o=l,s=c}return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var i=e,r=this._shell,o=i._shell;if(!r.equalsExact(o,n))return!1;if(this._holes.length!==i._holes.length)return!1;for(var s=0;s<this._holes.length;s++)if(!this._holes[s].equalsExact(i._holes[s],n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){if(0===arguments.length){this.normalize(this._shell,!0);for(var t=0;t<this._holes.length;t++)this.normalize(this._holes[t],!1);Ut.sort(this._holes)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(e.isEmpty())return null;var i=new Array(e.getCoordinates().length-1).fill(null);V.arraycopy(e.getCoordinates(),0,i,0,i.length);var r=Bt.minCoordinate(e.getCoordinates());Bt.scroll(i,r),V.arraycopy(i,0,e.getCoordinates(),0,i.length),e.getCoordinates()[i.length]=i[0],at.isCCW(e.getCoordinates())===n&&Bt.reverse(e.getCoordinates())}},e.prototype.getCoordinate=function(){return this._shell.getCoordinate()},e.prototype.getNumInteriorRing=function(){return this._holes.length},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.getLength=function(){var t=0;t+=this._shell.getLength();for(var e=0;e<this._holes.length;e++)t+=this._holes[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=this._shell.getNumPoints(),e=0;e<this._holes.length;e++)t+=this._holes[e].getNumPoints();return t},e.prototype.reverse=function(){var t=this.copy();t._shell=this._shell.copy().reverse(),t._holes=new Array(this._holes.length).fill(null);for(var e=0;e<this._holes.length;e++)t._holes[e]=this._holes[e].copy().reverse();return t},e.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0],e=this._shell,n=t._shell;return e.compareToSameClass(n)}if(2===arguments.length){var i=arguments[0],r=arguments[1],o=i,s=this._shell,a=o._shell,l=s.compareToSameClass(a,r);if(0!==l)return l;for(var c=this.getNumInteriorRing(),u=o.getNumInteriorRing(),h=0;h<c&&h<u;){var d=this.getInteriorRingN(h),A=o.getInteriorRingN(h),p=d.compareToSameClass(A,r);if(0!==p)return p;h++}return h<c?1:h<u?-1:0}},e.prototype.apply=function(t){if(I(t,At)){this._shell.apply(t);for(var e=0;e<this._holes.length;e++)this._holes[e].apply(t)}else if(I(t,Qt)){if(this._shell.apply(t),!t.isDone())for(var n=0;n<this._holes.length&&(this._holes[n].apply(t),!t.isDone());n++);t.isGeometryChanged()&&this.geometryChanged()}else if(I(t,zt))t.filter(this);else if(I(t,ct)){t.filter(this),this._shell.apply(t);for(var i=0;i<this._holes.length;i++)this._holes[i].apply(t)}},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();var t=new Array(this._holes.length+1).fill(null);t[0]=this._shell;for(var e=0;e<this._holes.length;e++)t[e+1]=this._holes[e];return t.length<=1?this.getFactory().createLinearRing(t[0].getCoordinateSequence()):this.getFactory().createMultiLineString(t)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._shell=this._shell.clone(),e._holes=new Array(this._holes.length).fill(null);for(var n=0;n<this._holes.length;n++)e._holes[n]=this._holes[n].clone();return e},e.prototype.getGeometryType=function(){return"Polygon"},e.prototype.copy=function(){for(var t=this._shell.copy(),n=new Array(this._holes.length).fill(null),i=0;i<n.length;i++)n[i]=this._holes[i].copy();return new e(t,n,this._factory)},e.prototype.getExteriorRing=function(){return this._shell},e.prototype.isEmpty=function(){return this._shell.isEmpty()},e.prototype.getInteriorRingN=function(t){return this._holes[t]},e.prototype.interfaces_=function(){return[Yt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(e,n),e}(ut),te=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ut.SORTINDEX_MULTIPOINT},e.prototype.isValid=function(){return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getCoordinate=function(){if(1===arguments.length){var e=arguments[0];return this._geometries[e].getCoordinate()}return t.prototype.getCoordinate.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return Nt.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.getGeometryType=function(){return"MultiPoint"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[qt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x6fb1ed4162e0fc00},Object.defineProperties(e,n),e}(Gt),ee=function(t){function e(e,n){e instanceof E&&n instanceof me&&(e=n.getCoordinateSequenceFactory().create(e)),t.call(this,e,n),this.validateConstruction()}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ut.SORTINDEX_LINEARRING},e.prototype.getBoundaryDimension=function(){return Nt.FALSE},e.prototype.isClosed=function(){return!!this.isEmpty()||t.prototype.isClosed.call(this)},e.prototype.reverse=function(){var t=this._points.copy();return Xt.reverse(t),this.getFactory().createLinearRing(t)},e.prototype.validateConstruction=function(){if(!this.isEmpty()&&!t.prototype.isClosed.call(this))throw new _("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<e.MINIMUM_VALID_SIZE)throw new _("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,n),e}(Kt),ne=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ut.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createMultiPolygon(e)},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var t=new wt,e=0;e<this._geometries.length;e++)for(var n=this._geometries[e].getBoundary(),i=0;i<n.getNumGeometries();i++)t.add(n.getGeometryN(i));var r=new Array(t.size()).fill(null);return this.getFactory().createMultiLineString(t.toArray(r))},e.prototype.getGeometryType=function(){return"MultiPolygon"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[Yt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(e,n),e}(Gt),ie=function(t){this._factory=t||null,this._isUserDataCopied=!1},re={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};ie.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},ie.prototype.edit=function(t,e){if(null===t)return null;var n=this.editInternal(t,e);return this._isUserDataCopied&&n.setUserData(t.getUserData()),n},ie.prototype.editInternal=function(t,e){return null===this._factory&&(this._factory=t.getFactory()),t instanceof Gt?this.editGeometryCollection(t,e):t instanceof $t?this.editPolygon(t,e):t instanceof Jt||t instanceof Kt?e.edit(t,this._factory):(et.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},ie.prototype.editGeometryCollection=function(t,e){for(var n=e.edit(t,this._factory),i=new wt,r=0;r<n.getNumGeometries();r++){var o=this.edit(n.getGeometryN(r),e);null===o||o.isEmpty()||i.add(o)}return n.getClass()===te?this._factory.createMultiPoint(i.toArray([])):n.getClass()===Ht?this._factory.createMultiLineString(i.toArray([])):n.getClass()===ne?this._factory.createMultiPolygon(i.toArray([])):this._factory.createGeometryCollection(i.toArray([]))},ie.prototype.editPolygon=function(t,e){var n=e.edit(t,this._factory);if(null===n&&(n=this._factory.createPolygon(null)),n.isEmpty())return n;var i=this.edit(n.getExteriorRing(),e);if(null===i||i.isEmpty())return this._factory.createPolygon();for(var r=new wt,o=0;o<n.getNumInteriorRing();o++){var s=this.edit(n.getInteriorRingN(o),e);null===s||s.isEmpty()||r.add(s)}return this._factory.createPolygon(i,r.toArray([]))},ie.prototype.interfaces_=function(){return[]},ie.prototype.getClass=function(){return ie},ie.GeometryEditorOperation=function(){},re.NoOpGeometryOperation.get=function(){return oe},re.CoordinateOperation.get=function(){return se},re.CoordinateSequenceOperation.get=function(){return ae},Object.defineProperties(ie,re);var oe=function(){};oe.prototype.edit=function(t,e){return t},oe.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},oe.prototype.getClass=function(){return oe};var se=function(){};se.prototype.edit=function(t,e){var n=this.editCoordinates(t.getCoordinates(),t);return null===n?t:t instanceof ee?e.createLinearRing(n):t instanceof Kt?e.createLineString(n):t instanceof Jt?n.length>0?e.createPoint(n[0]):e.createPoint():t},se.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},se.prototype.getClass=function(){return se};var ae=function(){};ae.prototype.edit=function(t,e){return t instanceof ee?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Kt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Jt?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},ae.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},ae.prototype.getClass=function(){return ae};var le=function(){if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var t=arguments[0];this._coordinates=new Array(t).fill(null);for(var e=0;e<t;e++)this._coordinates[e]=new E}else if(I(arguments[0],z)){var n=arguments[0];if(null===n)return this._coordinates=new Array(0).fill(null),null;this._dimension=n.getDimension(),this._coordinates=new Array(n.size()).fill(null);for(var i=0;i<this._coordinates.length;i++)this._coordinates[i]=n.getCoordinateCopy(i)}}else if(2===arguments.length)if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var r=arguments[0],o=arguments[1];this._coordinates=r,this._dimension=o,null===r&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var s=arguments[0],a=arguments[1];this._coordinates=new Array(s).fill(null),this._dimension=a;for(var l=0;l<s;l++)this._coordinates[l]=new E}},ce={serialVersionUID:{configurable:!0}};le.prototype.setOrdinate=function(t,e,n){switch(e){case z.X:this._coordinates[t].x=n;break;case z.Y:this._coordinates[t].y=n;break;case z.Z:this._coordinates[t].z=n;break;default:throw new _("invalid ordinateIndex")}},le.prototype.size=function(){return this._coordinates.length},le.prototype.getOrdinate=function(t,e){switch(e){case z.X:return this._coordinates[t].x;case z.Y:return this._coordinates[t].y;case z.Z:return this._coordinates[t].z}return y.NaN},le.prototype.getCoordinate=function(){if(1===arguments.length){var t=arguments[0];return this._coordinates[t]}if(2===arguments.length){var e=arguments[0],n=arguments[1];n.x=this._coordinates[e].x,n.y=this._coordinates[e].y,n.z=this._coordinates[e].z}},le.prototype.getCoordinateCopy=function(t){return new E(this._coordinates[t])},le.prototype.getDimension=function(){return this._dimension},le.prototype.getX=function(t){return this._coordinates[t].x},le.prototype.clone=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].clone();return new le(t,this._dimension)},le.prototype.expandEnvelope=function(t){for(var e=0;e<this._coordinates.length;e++)t.expandToInclude(this._coordinates[e]);return t},le.prototype.copy=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].copy();return new le(t,this._dimension)},le.prototype.toString=function(){if(this._coordinates.length>0){var t=new F(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var e=1;e<this._coordinates.length;e++)t.append(", "),t.append(this._coordinates[e]);return t.append(")"),t.toString()}return"()"},le.prototype.getY=function(t){return this._coordinates[t].y},le.prototype.toCoordinateArray=function(){return this._coordinates},le.prototype.interfaces_=function(){return[z,e]},le.prototype.getClass=function(){return le},ce.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(le,ce);var ue=function(){},he={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};ue.prototype.readResolve=function(){return ue.instance()},ue.prototype.create=function(){if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new le(t)}if(I(arguments[0],z)){var e=arguments[0];return new le(e)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new le(n):new le(n,i)}},ue.prototype.interfaces_=function(){return[S,e]},ue.prototype.getClass=function(){return ue},ue.instance=function(){return ue.instanceObject},he.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},he.instanceObject.get=function(){return new ue},Object.defineProperties(ue,he);var de=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return this.map_.get(t)||null},e.prototype.put=function(t,e){return this.map_.set(t,e),e},e.prototype.values=function(){for(var t=new wt,e=this.map_.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t},e.prototype.entrySet=function(){var t=new Pt;return this.map_.entries().forEach((function(e){return t.add(e)})),t},e.prototype.size=function(){return this.map_.size()},e}(It),Ae=function t(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=t.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof fe){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var i=arguments[0];this._modelType=i._modelType,this._scale=i._scale}},pe={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Ae.prototype.equals=function(t){if(!(t instanceof Ae))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},Ae.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new R(n).compareTo(new R(i))},Ae.prototype.getScale=function(){return this._scale},Ae.prototype.isFloating=function(){return this._modelType===Ae.FLOATING||this._modelType===Ae.FLOATING_SINGLE},Ae.prototype.getType=function(){return this._modelType},Ae.prototype.toString=function(){var t="UNKNOWN";return this._modelType===Ae.FLOATING?t="Floating":this._modelType===Ae.FLOATING_SINGLE?t="Floating-Single":this._modelType===Ae.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},Ae.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var t=arguments[0];return y.isNaN(t)||this._modelType===Ae.FLOATING_SINGLE?t:this._modelType===Ae.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof E){var e=arguments[0];if(this._modelType===Ae.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}},Ae.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===Ae.FLOATING?t=16:this._modelType===Ae.FLOATING_SINGLE?t=6:this._modelType===Ae.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},Ae.prototype.setScale=function(t){this._scale=Math.abs(t)},Ae.prototype.interfaces_=function(){return[e,x]},Ae.prototype.getClass=function(){return Ae},Ae.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},pe.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},pe.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(Ae,pe);var fe=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},ge={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};fe.prototype.readResolve=function(){return fe.nameToTypeMap.get(this._name)},fe.prototype.toString=function(){return this._name},fe.prototype.interfaces_=function(){return[e]},fe.prototype.getClass=function(){return fe},ge.serialVersionUID.get=function(){return-552860263173159e4},ge.nameToTypeMap.get=function(){return new de},Object.defineProperties(fe,ge),Ae.Type=fe,Ae.FIXED=new fe("FIXED"),Ae.FLOATING=new fe("FLOATING"),Ae.FLOATING_SINGLE=new fe("FLOATING SINGLE");var me=function t(){this._precisionModel=new Ae,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?I(arguments[0],S)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Ae&&(this._precisionModel=arguments[0]):2===arguments.length?(this._precisionModel=arguments[0],this._SRID=arguments[1]):3===arguments.length&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},_e={serialVersionUID:{configurable:!0}};me.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new E(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new E(t.getMinX(),t.getMinY()),new E(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new E(t.getMinX(),t.getMinY()),new E(t.getMinX(),t.getMaxY()),new E(t.getMaxX(),t.getMaxY()),new E(t.getMaxX(),t.getMinY()),new E(t.getMinX(),t.getMinY())]),null)},me.prototype.createLineString=function(t){return t?t instanceof Array?new Kt(this.getCoordinateSequenceFactory().create(t),this):I(t,z)?new Kt(t,this):void 0:new Kt(this.getCoordinateSequenceFactory().create([]),this)},me.prototype.createMultiLineString=function(){if(0===arguments.length)return new Ht(null,this);if(1===arguments.length){var t=arguments[0];return new Ht(t,this)}},me.prototype.buildGeometry=function(t){for(var e=null,n=!1,i=!1,r=t.iterator();r.hasNext();){var o=r.next(),s=o.getClass();null===e&&(e=s),s!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(null===e)return this.createGeometryCollection();if(n||i)return this.createGeometryCollection(me.toGeometryArray(t));var a=t.iterator().next();if(t.size()>1){if(a instanceof $t)return this.createMultiPolygon(me.toPolygonArray(t));if(a instanceof Kt)return this.createMultiLineString(me.toLineStringArray(t));if(a instanceof Jt)return this.createMultiPoint(me.toPointArray(t));et.shouldNeverReachHere("Unhandled class: "+a.getClass().getName())}return a},me.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)},me.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(I(arguments[0],z)){var e=arguments[0];return new Jt(e,this)}}},me.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},me.prototype.createPolygon=function(){if(0===arguments.length)return new $t(null,null,this);if(1===arguments.length){if(I(arguments[0],z)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof ee){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length){var i=arguments[0],r=arguments[1];return new $t(i,r,this)}},me.prototype.getSRID=function(){return this._SRID},me.prototype.createGeometryCollection=function(){if(0===arguments.length)return new Gt(null,this);if(1===arguments.length){var t=arguments[0];return new Gt(t,this)}},me.prototype.createGeometry=function(t){return new ie(this).edit(t,{edit:function(){if(2===arguments.length){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})},me.prototype.getPrecisionModel=function(){return this._precisionModel},me.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(I(arguments[0],z)){var e=arguments[0];return new ee(e,this)}}},me.prototype.createMultiPolygon=function(){if(0===arguments.length)return new ne(null,this);if(1===arguments.length){var t=arguments[0];return new ne(t,this)}},me.prototype.createMultiPoint=function(){if(0===arguments.length)return new te(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new te(t,this)}if(arguments[0]instanceof Array){var e=arguments[0];return this.createMultiPoint(null!==e?this.getCoordinateSequenceFactory().create(e):null)}if(I(arguments[0],z)){var n=arguments[0];if(null===n)return this.createMultiPoint(new Array(0).fill(null));for(var i=new Array(n.size()).fill(null),r=0;r<n.size();r++){var o=this.getCoordinateSequenceFactory().create(1,n.getDimension());Xt.copy(n,r,o,0,1),i[r]=this.createPoint(o)}return this.createMultiPoint(i)}}},me.prototype.interfaces_=function(){return[e]},me.prototype.getClass=function(){return me},me.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toGeometryArray=function(t){if(null===t)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},me.getDefaultCoordinateSequenceFactory=function(){return ue.instance()},me.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},_e.serialVersionUID.get=function(){return-0x5ea75f2051eeb400},Object.defineProperties(me,_e);var ye=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],ve=function(t){this.geometryFactory=t||new me};ve.prototype.read=function(t){var e,n=(e="string"==typeof t?JSON.parse(t):t).type;if(!xe[n])throw new Error("Unknown GeoJSON type: "+e.type);return-1!==ye.indexOf(n)?xe[n].apply(this,[e.coordinates]):"GeometryCollection"===n?xe[n].apply(this,[e.geometries]):xe[n].apply(this,[e])},ve.prototype.write=function(t){var e=t.getGeometryType();if(!be[e])throw new Error("Geometry is not supported");return be[e].apply(this,[t])};var xe={Feature:function(t){var e={};for(var n in t)e[n]=t[n];if(t.geometry){var i=t.geometry.type;if(!xe[i])throw new Error("Unknown GeoJSON type: "+t.type);e.geometry=this.read(t.geometry)}return t.bbox&&(e.bbox=xe.bbox.apply(this,[t.bbox])),e},FeatureCollection:function(t){var e={};if(t.features){e.features=[];for(var n=0;n<t.features.length;++n)e.features.push(this.read(t.features[n]))}return t.bbox&&(e.bbox=this.parse.bbox.apply(this,[t.bbox])),e},coordinates:function(t){for(var e=[],n=0;n<t.length;++n){var i=t[n];e.push(new E(i[0],i[1]))}return e},bbox:function(t){return this.geometryFactory.createLinearRing([new E(t[0],t[1]),new E(t[2],t[1]),new E(t[2],t[3]),new E(t[0],t[3]),new E(t[0],t[1])])},Point:function(t){var e=new E(t[0],t[1]);return this.geometryFactory.createPoint(e)},MultiPoint:function(t){for(var e=[],n=0;n<t.length;++n)e.push(xe.Point.apply(this,[t[n]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(t){var e=xe.coordinates.apply(this,[t]);return this.geometryFactory.createLineString(e)},MultiLineString:function(t){for(var e=[],n=0;n<t.length;++n)e.push(xe.LineString.apply(this,[t[n]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(t){for(var e=xe.coordinates.apply(this,[t[0]]),n=this.geometryFactory.createLinearRing(e),i=[],r=1;r<t.length;++r){var o=t[r],s=xe.coordinates.apply(this,[o]),a=this.geometryFactory.createLinearRing(s);i.push(a)}return this.geometryFactory.createPolygon(n,i)},MultiPolygon:function(t){for(var e=[],n=0;n<t.length;++n){var i=t[n];e.push(xe.Polygon.apply(this,[i]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(t){for(var e=[],n=0;n<t.length;++n){var i=t[n];e.push(this.read(i))}return this.geometryFactory.createGeometryCollection(e)}},be={coordinate:function(t){return[t.x,t.y]},Point:function(t){return{type:"Point",coordinates:be.coordinate.apply(this,[t.getCoordinate()])}},MultiPoint:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=be.Point.apply(this,[i]);e.push(r.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(t){for(var e=[],n=t.getCoordinates(),i=0;i<n.length;++i){var r=n[i];e.push(be.coordinate.apply(this,[r]))}return{type:"LineString",coordinates:e}},MultiLineString:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=be.LineString.apply(this,[i]);e.push(r.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(t){var e=[],n=be.LineString.apply(this,[t._shell]);e.push(n.coordinates);for(var i=0;i<t._holes.length;++i){var r=t._holes[i],o=be.LineString.apply(this,[r]);e.push(o.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=be.Polygon.apply(this,[i]);e.push(r.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=i.getGeometryType();e.push(be[r].apply(this,[i]))}return{type:"GeometryCollection",geometries:e}}},we=function(t){this.geometryFactory=t||new me,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new ve(this.geometryFactory)};we.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===Ae.FIXED&&this.reducePrecision(e),e},we.prototype.reducePrecision=function(t){var e,n;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(e=0,n=t.points.length;e<n;e++)this.precisionModel.makePrecise(t.points[e]);else if(t.geometries)for(e=0,n=t.geometries.length;e<n;e++)this.reducePrecision(t.geometries[e])};var Ee=function(){this.parser=new ve(this.geometryFactory)};Ee.prototype.write=function(t){return this.parser.write(t)};var Ce=function(){},Be={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};Ce.prototype.interfaces_=function(){return[]},Ce.prototype.getClass=function(){return Ce},Ce.opposite=function(t){return t===Ce.LEFT?Ce.RIGHT:t===Ce.RIGHT?Ce.LEFT:t},Be.ON.get=function(){return 0},Be.LEFT.get=function(){return 1},Be.RIGHT.get=function(){return 2},Object.defineProperties(Ce,Be),(f.prototype=new Error).name="EmptyStackException",(g.prototype=new bt).add=function(t){return this.array_.push(t),!0},g.prototype.get=function(t){if(t<0||t>=this.size())throw new Error;return this.array_[t]},g.prototype.push=function(t){return this.array_.push(t),t},g.prototype.pop=function(t){if(0===this.array_.length)throw new f;return this.array_.pop()},g.prototype.peek=function(){if(0===this.array_.length)throw new f;return this.array_[this.array_.length-1]},g.prototype.empty=function(){return 0===this.array_.length},g.prototype.isEmpty=function(){return this.empty()},g.prototype.search=function(t){return this.array_.indexOf(t)},g.prototype.size=function(){return this.array_.length},g.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t};var Se=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};Se.prototype.getCoordinate=function(){return this._minCoord},Se.prototype.getRightmostSide=function(t,e){var n=this.getRightmostSideOfSegment(t,e);return n<0&&(n=this.getRightmostSideOfSegment(t,e-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),n},Se.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();et.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],n=t[this._minIndex+1],i=at.computeOrientation(this._minCoord,n,e),r=!1;(e.y<this._minCoord.y&&n.y<this._minCoord.y&&i===at.COUNTERCLOCKWISE||e.y>this._minCoord.y&&n.y>this._minCoord.y&&i===at.CLOCKWISE)&&(r=!0),r&&(this._minIndex=this._minIndex-1)},Se.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length)return-1;if(n[e].y===n[e+1].y)return-1;var i=Ce.LEFT;return n[e].y<n[e+1].y&&(i=Ce.RIGHT),i},Se.prototype.getEdge=function(){return this._orientedDe},Se.prototype.checkForRightmostCoordinate=function(t){for(var e=t.getEdge().getCoordinates(),n=0;n<e.length-1;n++)(null===this._minCoord||e[n].x>this._minCoord.x)&&(this._minDe=t,this._minIndex=n,this._minCoord=e[n])},Se.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Se.prototype.findEdge=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}et.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===Ce.LEFT&&(this._orientedDe=this._minDe.getSym())},Se.prototype.interfaces_=function(){return[]},Se.prototype.getClass=function(){return Se};var Me=function(t){function e(n,i){t.call(this,e.msgWithCoord(n,i)),this.pt=i?new E(i):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(t,e){return e?t:t+" [ "+e+" ]"},e}($),Te=function(){this.array_=[]};Te.prototype.addLast=function(t){this.array_.push(t)},Te.prototype.removeFirst=function(){return this.array_.shift()},Te.prototype.isEmpty=function(){return 0===this.array_.length};var Ie=function(){this._finder=null,this._dirEdgeList=new wt,this._nodes=new wt,this._rightMostCoord=null,this._env=null,this._finder=new Se};Ie.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();)t.next().setVisited(!1)},Ie.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Ie.prototype.computeNodeDepth=function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var i=n.next();if(i.isVisited()||i.getSym().isVisited()){e=i;break}}if(null===e)throw new Me("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var r=t.getEdges().iterator();r.hasNext();){var o=r.next();o.setVisited(!0),this.copySymDepths(o)}},Ie.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(Ce.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Ie.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Ie.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(Ce.RIGHT)>=1&&e.getDepth(Ce.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Ie.prototype.computeDepths=function(t){var e=new Pt,n=new Te,i=t.getNode();for(n.addLast(i),e.add(i),t.setVisited(!0);!n.isEmpty();){var r=n.removeFirst();e.add(r),this.computeNodeDepth(r);for(var o=r.getEdges().iterator();o.hasNext();){var s=o.next().getSym();if(!s.isVisited()){var a=s.getNode();e.contains(a)||(n.addLast(a),e.add(a))}}}},Ie.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},Ie.prototype.getEnvelope=function(){if(null===this._env){for(var t=new Z,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),i=0;i<n.length-1;i++)t.expandToInclude(n[i]);this._env=t}return this._env},Ie.prototype.addReachable=function(t){var e=new g;for(e.add(t);!e.empty();){var n=e.pop();this.add(n,e)}},Ie.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(Ce.LEFT,t.getDepth(Ce.RIGHT)),e.setDepth(Ce.RIGHT,t.getDepth(Ce.LEFT))},Ie.prototype.add=function(t,e){t.setVisited(!0),this._nodes.add(t);for(var n=t.getEdges().iterator();n.hasNext();){var i=n.next();this._dirEdgeList.add(i);var r=i.getSym().getNode();r.isVisited()||e.push(r)}},Ie.prototype.getNodes=function(){return this._nodes},Ie.prototype.getDirectedEdges=function(){return this._dirEdgeList},Ie.prototype.interfaces_=function(){return[x]},Ie.prototype.getClass=function(){return Ie};var Le=function t(){if(this.location=null,1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var n=arguments[0];this.init(1),this.location[Ce.ON]=n}else if(arguments[0]instanceof t){var i=arguments[0];if(this.init(i.location.length),null!==i)for(var r=0;r<this.location.length;r++)this.location[r]=i.location[r]}}else if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];this.init(3),this.location[Ce.ON]=o,this.location[Ce.LEFT]=s,this.location[Ce.RIGHT]=a}};Le.prototype.setAllLocations=function(t){for(var e=0;e<this.location.length;e++)this.location[e]=t},Le.prototype.isNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]!==M.NONE)return!1;return!0},Le.prototype.setAllLocationsIfNull=function(t){for(var e=0;e<this.location.length;e++)this.location[e]===M.NONE&&(this.location[e]=t)},Le.prototype.isLine=function(){return 1===this.location.length},Le.prototype.merge=function(t){if(t.location.length>this.location.length){var e=new Array(3).fill(null);e[Ce.ON]=this.location[Ce.ON],e[Ce.LEFT]=M.NONE,e[Ce.RIGHT]=M.NONE,this.location=e}for(var n=0;n<this.location.length;n++)this.location[n]===M.NONE&&n<t.location.length&&(this.location[n]=t.location[n])},Le.prototype.getLocations=function(){return this.location},Le.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[Ce.LEFT];this.location[Ce.LEFT]=this.location[Ce.RIGHT],this.location[Ce.RIGHT]=t},Le.prototype.toString=function(){var t=new F;return this.location.length>1&&t.append(M.toLocationSymbol(this.location[Ce.LEFT])),t.append(M.toLocationSymbol(this.location[Ce.ON])),this.location.length>1&&t.append(M.toLocationSymbol(this.location[Ce.RIGHT])),t.toString()},Le.prototype.setLocations=function(t,e,n){this.location[Ce.ON]=t,this.location[Ce.LEFT]=e,this.location[Ce.RIGHT]=n},Le.prototype.get=function(t){return t<this.location.length?this.location[t]:M.NONE},Le.prototype.isArea=function(){return this.location.length>1},Le.prototype.isAnyNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]===M.NONE)return!0;return!1},Le.prototype.setLocation=function(){if(1===arguments.length){var t=arguments[0];this.setLocation(Ce.ON,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.location[e]=n}},Le.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(M.NONE)},Le.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},Le.prototype.allPositionsEqual=function(t){for(var e=0;e<this.location.length;e++)if(this.location[e]!==t)return!1;return!0},Le.prototype.interfaces_=function(){return[]},Le.prototype.getClass=function(){return Le};var Pe=function t(){if(this.elt=new Array(2).fill(null),1===arguments.length){if(Number.isInteger(arguments[0])){var e=arguments[0];this.elt[0]=new Le(e),this.elt[1]=new Le(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.elt[0]=new Le(n.elt[0]),this.elt[1]=new Le(n.elt[1])}}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.elt[0]=new Le(M.NONE),this.elt[1]=new Le(M.NONE),this.elt[i].setLocation(r)}else if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];this.elt[0]=new Le(o,s,a),this.elt[1]=new Le(o,s,a)}else if(4===arguments.length){var l=arguments[0],c=arguments[1],u=arguments[2],h=arguments[3];this.elt[0]=new Le(M.NONE,M.NONE,M.NONE),this.elt[1]=new Le(M.NONE,M.NONE,M.NONE),this.elt[l].setLocations(c,u,h)}};Pe.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Pe.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Pe.prototype.isNull=function(t){return this.elt[t].isNull()},Pe.prototype.setAllLocationsIfNull=function(){if(1===arguments.length){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.elt[e].setAllLocationsIfNull(n)}},Pe.prototype.isLine=function(t){return this.elt[t].isLine()},Pe.prototype.merge=function(t){for(var e=0;e<2;e++)null===this.elt[e]&&null!==t.elt[e]?this.elt[e]=new Le(t.elt[e]):this.elt[e].merge(t.elt[e])},Pe.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Pe.prototype.getLocation=function(){if(1===arguments.length){var t=arguments[0];return this.elt[t].get(Ce.ON)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return this.elt[e].get(n)}},Pe.prototype.toString=function(){var t=new F;return null!==this.elt[0]&&(t.append("A:"),t.append(this.elt[0].toString())),null!==this.elt[1]&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},Pe.prototype.isArea=function(){if(0===arguments.length)return this.elt[0].isArea()||this.elt[1].isArea();if(1===arguments.length){var t=arguments[0];return this.elt[t].isArea()}},Pe.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Pe.prototype.setLocation=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(Ce.ON,e)}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this.elt[n].setLocation(i,r)}},Pe.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Pe.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Pe.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new Le(this.elt[t].location[0]))},Pe.prototype.interfaces_=function(){return[]},Pe.prototype.getClass=function(){return Pe},Pe.toLineLabel=function(t){for(var e=new Pe(M.NONE),n=0;n<2;n++)e.setLocation(n,t.getLocation(n));return e};var Fe=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new wt,this._pts=new wt,this._label=new Pe(M.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new wt,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};Fe.prototype.computeRing=function(){if(null!==this._ring)return null;for(var t=new Array(this._pts.size()).fill(null),e=0;e<this._pts.size();e++)t[e]=this._pts.get(e);this._ring=this._geometryFactory.createLinearRing(t),this._isHole=at.isCCW(this._ring.getCoordinates())},Fe.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},Fe.prototype.computePoints=function(t){this._startDe=t;var e=t,n=!0;do{if(null===e)throw new Me("Found null DirectedEdge");if(e.getEdgeRing()===this)throw new Me("Directed Edge visited twice during ring-building at "+e.getCoordinate());this._edges.add(e);var i=e.getLabel();et.isTrue(i.isArea()),this.mergeLabel(i),this.addPoints(e.getEdge(),e.isForward(),n),n=!1,this.setEdgeRing(e,this),e=this.getNext(e)}while(e!==this._startDe)},Fe.prototype.getLinearRing=function(){return this._ring},Fe.prototype.getCoordinate=function(t){return this._pts.get(t)},Fe.prototype.computeMaxNodeDegree=function(){this._maxNodeDegree=0;var t=this._startDe;do{var e=t.getNode().getEdges().getOutgoingDegree(this);e>this._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},Fe.prototype.addPoints=function(t,e,n){var i=t.getCoordinates();if(e){var r=1;n&&(r=0);for(var o=r;o<i.length;o++)this._pts.add(i[o])}else{var s=i.length-2;n&&(s=i.length-1);for(var a=s;a>=0;a--)this._pts.add(i[a])}},Fe.prototype.isHole=function(){return this._isHole},Fe.prototype.setInResult=function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)},Fe.prototype.containsPoint=function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!at.isPointInRing(t,e.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();)if(n.next().containsPoint(t))return!1;return!0},Fe.prototype.addHole=function(t){this._holes.add(t)},Fe.prototype.isShell=function(){return null===this._shell},Fe.prototype.getLabel=function(){return this._label},Fe.prototype.getEdges=function(){return this._edges},Fe.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Fe.prototype.getShell=function(){return this._shell},Fe.prototype.mergeLabel=function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=e.getLocation(n,Ce.RIGHT);if(i===M.NONE)return null;if(this._label.getLocation(n)===M.NONE)return this._label.setLocation(n,i),null}},Fe.prototype.setShell=function(t){this._shell=t,null!==t&&t.addHole(this)},Fe.prototype.toPolygon=function(t){for(var e=new Array(this._holes.size()).fill(null),n=0;n<this._holes.size();n++)e[n]=this._holes.get(n).getLinearRing();return t.createPolygon(this.getLinearRing(),e)},Fe.prototype.interfaces_=function(){return[]},Fe.prototype.getClass=function(){return Fe};var Re=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setEdgeRing=function(t,e){t.setMinEdgeRing(e)},e.prototype.getNext=function(t){return t.getNextMin()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Fe),De=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildMinimalRings=function(){var t=new wt,e=this._startDe;do{if(null===e.getMinEdgeRing()){var n=new Re(e,this._geometryFactory);t.add(n)}e=e.getNext()}while(e!==this._startDe);return t},e.prototype.setEdgeRing=function(t,e){t.setEdgeRing(e)},e.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var t=this._startDe;do{t.getNode().getEdges().linkMinimalDirectedEdges(this),t=t.getNext()}while(t!==this._startDe)},e.prototype.getNext=function(t){return t.getNext()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Fe),Oe=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._label=t}};Oe.prototype.setVisited=function(t){this._isVisited=t},Oe.prototype.setInResult=function(t){this._isInResult=t},Oe.prototype.isCovered=function(){return this._isCovered},Oe.prototype.isCoveredSet=function(){return this._isCoveredSet},Oe.prototype.setLabel=function(t){this._label=t},Oe.prototype.getLabel=function(){return this._label},Oe.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},Oe.prototype.updateIM=function(t){et.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},Oe.prototype.isInResult=function(){return this._isInResult},Oe.prototype.isVisited=function(){return this._isVisited},Oe.prototype.interfaces_=function(){return[]},Oe.prototype.getClass=function(){return Oe};var Ue=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new Pe(0,M.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();)if(t.next().getEdge().isInResult())return!0;return!1},e.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(t){t.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(t){},e.prototype.computeMergedLocation=function(t,e){var n=M.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var i=t.getLocation(e);n!==M.BOUNDARY&&(n=i)}return n},e.prototype.setLabel=function(){if(2!==arguments.length)return t.prototype.setLabel.apply(this,arguments);var e=arguments[0],n=arguments[1];null===this._label?this._label=new Pe(e,n):this._label.setLocation(e,n)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){if(arguments[0]instanceof e){var t=arguments[0];this.mergeLabel(t._label)}else if(arguments[0]instanceof Pe)for(var n=arguments[0],i=0;i<2;i++){var r=this.computeMergedLocation(n,i);this._label.getLocation(i)===M.NONE&&this._label.setLocation(i,r)}},e.prototype.add=function(t){this._edges.insert(t),t.setNode(this)},e.prototype.setLabelBoundary=function(t){if(null===this._label)return null;var e=M.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case M.BOUNDARY:n=M.INTERIOR;break;case M.INTERIOR:default:n=M.BOUNDARY}this._label.setLocation(t,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Oe),Ne=function(){this.nodeMap=new h,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Ne.prototype.find=function(t){return this.nodeMap.get(t)},Ne.prototype.addNode=function(){if(arguments[0]instanceof E){var t=arguments[0],e=this.nodeMap.get(t);return null===e&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Ue){var n=arguments[0],i=this.nodeMap.get(n.getCoordinate());return null===i?(this.nodeMap.put(n.getCoordinate(),n),n):(i.mergeLabel(n),i)}},Ne.prototype.print=function(t){for(var e=this.iterator();e.hasNext();)e.next().print(t)},Ne.prototype.iterator=function(){return this.nodeMap.values().iterator()},Ne.prototype.values=function(){return this.nodeMap.values()},Ne.prototype.getBoundaryNodes=function(t){for(var e=new wt,n=this.iterator();n.hasNext();){var i=n.next();i.getLabel().getLocation(t)===M.BOUNDARY&&e.add(i)}return e},Ne.prototype.add=function(t){var e=t.getCoordinate();this.addNode(e).add(t)},Ne.prototype.interfaces_=function(){return[]},Ne.prototype.getClass=function(){return Ne};var ke=function(){},ze={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};ke.prototype.interfaces_=function(){return[]},ke.prototype.getClass=function(){return ke},ke.isNorthern=function(t){return t===ke.NE||t===ke.NW},ke.isOpposite=function(t,e){return t!==e&&2===(t-e+4)%4},ke.commonHalfPlane=function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var n=t<e?t:e;return 0===n&&3===(t>e?t:e)?3:n},ke.isInHalfPlane=function(t,e){return e===ke.SE?t===ke.SE||t===ke.SW:t===e||t===e+1},ke.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new _("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?ke.NE:ke.SE:e>=0?ke.NW:ke.SW}if(arguments[0]instanceof E&&arguments[1]instanceof E){var n=arguments[0],i=arguments[1];if(i.x===n.x&&i.y===n.y)throw new _("Cannot compute the quadrant for two identical points "+n);return i.x>=n.x?i.y>=n.y?ke.NE:ke.SE:i.y>=n.y?ke.NW:ke.SW}},ze.NE.get=function(){return 0},ze.NW.get=function(){return 1},ze.SW.get=function(){return 2},ze.SE.get=function(){return 3},Object.defineProperties(ke,ze);var Qe=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var t=arguments[0];this._edge=t}else if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];this._edge=e,this.init(n,i),this._label=null}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this._edge=r,this.init(o,s),this._label=a}};Qe.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:at.computeOrientation(t._p0,t._p1,this._p1)},Qe.prototype.getDy=function(){return this._dy},Qe.prototype.getCoordinate=function(){return this._p0},Qe.prototype.setNode=function(t){this._node=t},Qe.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),i=n.lastIndexOf("."),r=n.substring(i+1);t.print(" "+r+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label)},Qe.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},Qe.prototype.getDirectedCoordinate=function(){return this._p1},Qe.prototype.getDx=function(){return this._dx},Qe.prototype.getLabel=function(){return this._label},Qe.prototype.getEdge=function(){return this._edge},Qe.prototype.getQuadrant=function(){return this._quadrant},Qe.prototype.getNode=function(){return this._node},Qe.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),n=e.lastIndexOf(".");return" "+e.substring(n+1)+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label},Qe.prototype.computeLabel=function(t){},Qe.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=ke.quadrant(this._dx,this._dy),et.isTrue(!(0===this._dx&&0===this._dy),"EdgeEnd with identical endpoints found")},Qe.prototype.interfaces_=function(){return[x]},Qe.prototype.getClass=function(){return Qe};var Ge=function(t){function e(){var e=arguments[0],n=arguments[1];if(t.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=n,n)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var i=e.getNumPoints()-1;this.init(e.getCoordinate(i),e.getCoordinate(i-1))}this.computeDirectedLabel()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getNextMin=function(){return this._nextMin},e.prototype.getDepth=function(t){return this._depth[t]},e.prototype.setVisited=function(t){this._isVisited=t},e.prototype.computeDirectedLabel=function(){this._label=new Pe(this._edge.getLabel()),this._isForward||this._label.flip()},e.prototype.getNext=function(){return this._next},e.prototype.setDepth=function(t,e){if(-999!==this._depth[t]&&this._depth[t]!==e)throw new Me("assigned depths do not match",this.getCoordinate());this._depth[t]=e},e.prototype.isInteriorAreaEdge=function(){for(var t=!0,e=0;e<2;e++)this._label.isArea(e)&&this._label.getLocation(e,Ce.LEFT)===M.INTERIOR&&this._label.getLocation(e,Ce.RIGHT)===M.INTERIOR||(t=!1);return t},e.prototype.setNextMin=function(t){this._nextMin=t},e.prototype.print=function(e){t.prototype.print.call(this,e),e.print(" "+this._depth[Ce.LEFT]+"/"+this._depth[Ce.RIGHT]),e.print(" ("+this.getDepthDelta()+")"),this._isInResult&&e.print(" inResult")},e.prototype.setMinEdgeRing=function(t){this._minEdgeRing=t},e.prototype.isLineEdge=function(){var t=this._label.isLine(0)||this._label.isLine(1),e=!this._label.isArea(0)||this._label.allPositionsEqual(0,M.EXTERIOR),n=!this._label.isArea(1)||this._label.allPositionsEqual(1,M.EXTERIOR);return t&&e&&n},e.prototype.setEdgeRing=function(t){this._edgeRing=t},e.prototype.getMinEdgeRing=function(){return this._minEdgeRing},e.prototype.getDepthDelta=function(){var t=this._edge.getDepthDelta();return this._isForward||(t=-t),t},e.prototype.setInResult=function(t){this._isInResult=t},e.prototype.getSym=function(){return this._sym},e.prototype.isForward=function(){return this._isForward},e.prototype.getEdge=function(){return this._edge},e.prototype.printEdge=function(t){this.print(t),t.print(" "),this._isForward?this._edge.print(t):this._edge.printReverse(t)},e.prototype.setSym=function(t){this._sym=t},e.prototype.setVisitedEdge=function(t){this.setVisited(t),this._sym.setVisited(t)},e.prototype.setEdgeDepths=function(t,e){var n=this.getEdge().getDepthDelta();this._isForward||(n=-n);var i=1;t===Ce.LEFT&&(i=-1);var r=Ce.opposite(t),o=e+n*i;this.setDepth(t,e),this.setDepth(r,o)},e.prototype.getEdgeRing=function(){return this._edgeRing},e.prototype.isInResult=function(){return this._isInResult},e.prototype.setNext=function(t){this._next=t},e.prototype.isVisited=function(){return this._isVisited},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.depthFactor=function(t,e){return t===M.EXTERIOR&&e===M.INTERIOR?1:t===M.INTERIOR&&e===M.EXTERIOR?-1:0},e}(Qe),He=function(){};He.prototype.createNode=function(t){return new Ue(t,null)},He.prototype.interfaces_=function(){return[]},He.prototype.getClass=function(){return He};var Ve=function(){if(this._edges=new wt,this._nodes=null,this._edgeEndList=new wt,0===arguments.length)this._nodes=new Ne(new He);else if(1===arguments.length){var t=arguments[0];this._nodes=new Ne(t)}};Ve.prototype.printEdges=function(t){t.println("Edges:");for(var e=0;e<this._edges.size();e++){t.println("edge "+e+":");var n=this._edges.get(e);n.print(t),n.eiList.print(t)}},Ve.prototype.find=function(t){return this._nodes.find(t)},Ve.prototype.addNode=function(){if(arguments[0]instanceof Ue){var t=arguments[0];return this._nodes.addNode(t)}if(arguments[0]instanceof E){var e=arguments[0];return this._nodes.addNode(e)}},Ve.prototype.getNodeIterator=function(){return this._nodes.iterator()},Ve.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();)t.next().getEdges().linkResultDirectedEdges()},Ve.prototype.debugPrintln=function(t){V.out.println(t)},Ve.prototype.isBoundaryNode=function(t,e){var n=this._nodes.find(e);if(null===n)return!1;var i=n.getLabel();return null!==i&&i.getLocation(t)===M.BOUNDARY},Ve.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();)t.next().getEdges().linkAllDirectedEdges()},Ve.prototype.matchInSameDirection=function(t,e,n,i){return!!t.equals(n)&&at.computeOrientation(t,e,i)===at.COLLINEAR&&ke.quadrant(t,e)===ke.quadrant(n,i)},Ve.prototype.getEdgeEnds=function(){return this._edgeEndList},Ve.prototype.debugPrint=function(t){V.out.print(t)},Ve.prototype.getEdgeIterator=function(){return this._edges.iterator()},Ve.prototype.findEdgeInSameDirection=function(t,e){for(var n=0;n<this._edges.size();n++){var i=this._edges.get(n),r=i.getCoordinates();if(this.matchInSameDirection(t,e,r[0],r[1]))return i;if(this.matchInSameDirection(t,e,r[r.length-1],r[r.length-2]))return i}return null},Ve.prototype.insertEdge=function(t){this._edges.add(t)},Ve.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var n=e.next();if(n.getEdge()===t)return n}return null},Ve.prototype.addEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this._edges.add(n);var i=new Ge(n,!0),r=new Ge(n,!1);i.setSym(r),r.setSym(i),this.add(i),this.add(r)}},Ve.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},Ve.prototype.getNodes=function(){return this._nodes.values()},Ve.prototype.findEdge=function(t,e){for(var n=0;n<this._edges.size();n++){var i=this._edges.get(n),r=i.getCoordinates();if(t.equals(r[0])&&e.equals(r[1]))return i}return null},Ve.prototype.interfaces_=function(){return[]},Ve.prototype.getClass=function(){return Ve},Ve.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();)e.next().getEdges().linkResultDirectedEdges()};var je=function(){this._geometryFactory=null,this._shellList=new wt;var t=arguments[0];this._geometryFactory=t};je.prototype.sortShellsAndHoles=function(t,e,n){for(var i=t.iterator();i.hasNext();){var r=i.next();r.isHole()?n.add(r):e.add(r)}},je.prototype.computePolygons=function(t){for(var e=new wt,n=t.iterator();n.hasNext();){var i=n.next().toPolygon(this._geometryFactory);e.add(i)}return e},je.prototype.placeFreeHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();if(null===i.getShell()){var r=this.findEdgeRingContaining(i,t);if(null===r)throw new Me("unable to assign hole to a shell",i.getCoordinate(0));i.setShell(r)}}},je.prototype.buildMinimalEdgeRings=function(t,e,n){for(var i=new wt,r=t.iterator();r.hasNext();){var o=r.next();if(o.getMaxNodeDegree()>2){o.linkDirectedEdgesForMinimalEdgeRings();var s=o.buildMinimalRings(),a=this.findShell(s);null!==a?(this.placePolygonHoles(a,s),e.add(a)):n.addAll(s)}else i.add(o)}return i},je.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();)if(e.next().containsPoint(t))return!0;return!1},je.prototype.buildMaximalEdgeRings=function(t){for(var e=new wt,n=t.iterator();n.hasNext();){var i=n.next();if(i.isInResult()&&i.getLabel().isArea()&&null===i.getEdgeRing()){var r=new De(i,this._geometryFactory);e.add(r),r.setInResult()}}return e},je.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();i.isHole()&&i.setShell(t)}},je.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},je.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),i=n.getEnvelopeInternal(),r=n.getCoordinateN(0),o=null,s=null,a=e.iterator();a.hasNext();){var l=a.next(),c=l.getLinearRing(),u=c.getEnvelopeInternal();null!==o&&(s=o.getLinearRing().getEnvelopeInternal());var h=!1;u.contains(i)&&at.isPointInRing(r,c.getCoordinates())&&(h=!0),h&&(null===o||s.contains(u))&&(o=l)}return o},je.prototype.findShell=function(t){for(var e=0,n=null,i=t.iterator();i.hasNext();){var r=i.next();r.isHole()||(n=r,e++)}return et.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},je.prototype.add=function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],n=arguments[1];Ve.linkResultDirectedEdges(n);var i=this.buildMaximalEdgeRings(e),r=new wt,o=this.buildMinimalEdgeRings(i,this._shellList,r);this.sortShellsAndHoles(o,this._shellList,r),this.placeFreeHoles(this._shellList,r)}},je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je};var Ze=function(){};Ze.prototype.getBounds=function(){},Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze};var We=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};We.prototype.getItem=function(){return this._item},We.prototype.getBounds=function(){return this._bounds},We.prototype.interfaces_=function(){return[Ze,e]},We.prototype.getClass=function(){return We};var Xe=function(){this._size=null,this._items=null,this._size=0,this._items=new wt,this._items.add(null)};Xe.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},Xe.prototype.size=function(){return this._size},Xe.prototype.reorder=function(t){for(var e=null,n=this._items.get(t);2*t<=this._size&&((e=2*t)!==this._size&&this._items.get(e+1).compareTo(this._items.get(e))<0&&e++,this._items.get(e).compareTo(n)<0);t=e)this._items.set(t,this._items.get(e));this._items.set(t,n)},Xe.prototype.clear=function(){this._size=0,this._items.clear()},Xe.prototype.isEmpty=function(){return 0===this._size},Xe.prototype.add=function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe};var Ke=function(){};Ke.prototype.visitItem=function(t){},Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke};var qe=function(){};qe.prototype.insert=function(t,e){},qe.prototype.remove=function(t,e){},qe.prototype.query=function(){},qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe};var Je=function(){if(this._childBoundables=new wt,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}},Ye={serialVersionUID:{configurable:!0}};Je.prototype.getLevel=function(){return this._level},Je.prototype.size=function(){return this._childBoundables.size()},Je.prototype.getChildBoundables=function(){return this._childBoundables},Je.prototype.addChildBoundable=function(t){et.isTrue(null===this._bounds),this._childBoundables.add(t)},Je.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Je.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},Je.prototype.interfaces_=function(){return[Ze,e]},Je.prototype.getClass=function(){return Je},Ye.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(Je,Ye);var $e=function(){};$e.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}},$e.min=function(t){return $e.sort(t),t.get(0)},$e.sort=function(t,e){var n=t.toArray();e?Ut.sort(n,e):Ut.sort(n);for(var i=t.iterator(),r=0,o=n.length;r<o;r++)i.next(),i.set(n[r])},$e.singletonList=function(t){var e=new wt;return e.add(t),e};var tn=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=n,this._distance=this.distance()};tn.prototype.expandToQueue=function(t,e){var n=tn.isComposite(this._boundable1),i=tn.isComposite(this._boundable2);if(n&&i)return tn.area(this._boundable1)>tn.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new _("neither boundable is composite")},tn.prototype.isLeaves=function(){return!(tn.isComposite(this._boundable1)||tn.isComposite(this._boundable2))},tn.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},tn.prototype.expand=function(t,e,n,i){for(var r=t.getChildBoundables().iterator();r.hasNext();){var o=r.next(),s=new tn(o,e,this._itemDistance);s.getDistance()<i&&n.add(s)}},tn.prototype.getBoundable=function(t){return 0===t?this._boundable1:this._boundable2},tn.prototype.getDistance=function(){return this._distance},tn.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},tn.prototype.interfaces_=function(){return[x]},tn.prototype.getClass=function(){return tn},tn.area=function(t){return t.getBounds().getArea()},tn.isComposite=function(t){return t instanceof Je};var en=function t(){if(this._root=null,this._built=!1,this._itemBoundables=new wt,this._nodeCapacity=null,0===arguments.length){var e=t.DEFAULT_NODE_CAPACITY;this._nodeCapacity=e}else if(1===arguments.length){var n=arguments[0];et.isTrue(n>1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},nn={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};en.prototype.getNodeCapacity=function(){return this._nodeCapacity},en.prototype.lastNode=function(t){return t.get(t.size()-1)},en.prototype.size=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();n instanceof Je?t+=this.size(n):n instanceof We&&(t+=1)}return t}},en.prototype.removeItem=function(t,e){for(var n=null,i=t.getChildBoundables().iterator();i.hasNext();){var r=i.next();r instanceof We&&r.getItem()===e&&(n=r)}return null!==n&&(t.getChildBoundables().remove(n),!0)},en.prototype.itemsTree=function(){if(0===arguments.length){this.build();var t=this.itemsTree(this._root);return null===t?new wt:t}if(1===arguments.length){for(var e=arguments[0],n=new wt,i=e.getChildBoundables().iterator();i.hasNext();){var r=i.next();if(r instanceof Je){var o=this.itemsTree(r);null!==o&&n.add(o)}else r instanceof We?n.add(r.getItem()):et.shouldNeverReachHere()}return n.size()<=0?null:n}},en.prototype.insert=function(t,e){et.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new We(t,e))},en.prototype.boundablesAtLevel=function(){if(1===arguments.length){var t=arguments[0],e=new wt;return this.boundablesAtLevel(t,this._root,e),e}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];if(et.isTrue(n>-2),i.getLevel()===n)return r.add(i),null;for(var o=i.getChildBoundables().iterator();o.hasNext();){var s=o.next();s instanceof Je?this.boundablesAtLevel(n,s,r):(et.isTrue(s instanceof We),-1===n&&r.add(s))}return null}},en.prototype.query=function(){if(1===arguments.length){var t=arguments[0];this.build();var e=new wt;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,e),e}if(2===arguments.length){var n=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.query(n,this._root,i)}else if(3===arguments.length)if(I(arguments[2],Ke)&&arguments[0]instanceof Object&&arguments[1]instanceof Je)for(var r=arguments[0],o=arguments[1],s=arguments[2],a=o.getChildBoundables(),l=0;l<a.size();l++){var c=a.get(l);this.getIntersectsOp().intersects(c.getBounds(),r)&&(c instanceof Je?this.query(r,c,s):c instanceof We?s.visitItem(c.getItem()):et.shouldNeverReachHere())}else if(I(arguments[2],bt)&&arguments[0]instanceof Object&&arguments[1]instanceof Je)for(var u=arguments[0],h=arguments[1],d=arguments[2],A=h.getChildBoundables(),p=0;p<A.size();p++){var f=A.get(p);this.getIntersectsOp().intersects(f.getBounds(),u)&&(f instanceof Je?this.query(u,f,d):f instanceof We?d.add(f.getItem()):et.shouldNeverReachHere())}},en.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},en.prototype.getRoot=function(){return this.build(),this._root},en.prototype.remove=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.remove(t,this._root,e)}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],o=this.removeItem(i,r);if(o)return!0;for(var s=null,a=i.getChildBoundables().iterator();a.hasNext();){var l=a.next();if(this.getIntersectsOp().intersects(l.getBounds(),n)&&l instanceof Je&&(o=this.remove(n,l,r))){s=l;break}}return null!==s&&s.getChildBoundables().isEmpty()&&i.getChildBoundables().remove(s),o}},en.prototype.createHigherLevels=function(t,e){et.isTrue(!t.isEmpty());var n=this.createParentBoundables(t,e+1);return 1===n.size()?n.get(0):this.createHigherLevels(n,e+1)},en.prototype.depth=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();if(n instanceof Je){var i=this.depth(n);i>t&&(t=i)}}return t+1}},en.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var n=new wt;n.add(this.createNode(e));var i=new wt(t);$e.sort(i,this.getComparator());for(var r=i.iterator();r.hasNext();){var o=r.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(e)),this.lastNode(n).addChildBoundable(o)}return n},en.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},en.prototype.interfaces_=function(){return[e]},en.prototype.getClass=function(){return en},en.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},nn.IntersectsOp.get=function(){return rn},nn.serialVersionUID.get=function(){return-0x35ef64c82d4c5400},nn.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(en,nn);var rn=function(){},on=function(){};on.prototype.distance=function(t,e){},on.prototype.interfaces_=function(){return[]},on.prototype.getClass=function(){return on};var sn=function(t){function n(e){e=e||n.DEFAULT_NODE_CAPACITY,t.call(this,e)}t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n;var i={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return n.prototype.createParentBoundablesFromVerticalSlices=function(t,e){et.isTrue(t.length>0);for(var n=new wt,i=0;i<t.length;i++)n.addAll(this.createParentBoundablesFromVerticalSlice(t[i],e));return n},n.prototype.createNode=function(t){return new an(t)},n.prototype.size=function(){return 0===arguments.length?t.prototype.size.call(this):t.prototype.size.apply(this,arguments)},n.prototype.insert=function(){if(2!==arguments.length)return t.prototype.insert.apply(this,arguments);var e=arguments[0],n=arguments[1];if(e.isNull())return null;t.prototype.insert.call(this,e,n)},n.prototype.getIntersectsOp=function(){return n.intersectsOp},n.prototype.verticalSlices=function(t,e){for(var n=Math.trunc(Math.ceil(t.size()/e)),i=new Array(e).fill(null),r=t.iterator(),o=0;o<e;o++){i[o]=new wt;for(var s=0;r.hasNext()&&s<n;){var a=r.next();i[o].add(a),s++}}return i},n.prototype.query=function(){if(1===arguments.length){var e=arguments[0];return t.prototype.query.call(this,e)}if(2===arguments.length){var n=arguments[0],i=arguments[1];t.prototype.query.call(this,n,i)}else if(3===arguments.length)if(I(arguments[2],Ke)&&arguments[0]instanceof Object&&arguments[1]instanceof Je){var r=arguments[0],o=arguments[1],s=arguments[2];t.prototype.query.call(this,r,o,s)}else if(I(arguments[2],bt)&&arguments[0]instanceof Object&&arguments[1]instanceof Je){var a=arguments[0],l=arguments[1],c=arguments[2];t.prototype.query.call(this,a,l,c)}},n.prototype.getComparator=function(){return n.yComparator},n.prototype.createParentBoundablesFromVerticalSlice=function(e,n){return t.prototype.createParentBoundables.call(this,e,n)},n.prototype.remove=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return t.prototype.remove.call(this,e,n)}return t.prototype.remove.apply(this,arguments)},n.prototype.depth=function(){return 0===arguments.length?t.prototype.depth.call(this):t.prototype.depth.apply(this,arguments)},n.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var i=Math.trunc(Math.ceil(t.size()/this.getNodeCapacity())),r=new wt(t);$e.sort(r,n.xComparator);var o=this.verticalSlices(r,Math.trunc(Math.ceil(Math.sqrt(i))));return this.createParentBoundablesFromVerticalSlices(o,e)},n.prototype.nearestNeighbour=function(){if(1===arguments.length){if(I(arguments[0],on)){var t=arguments[0],e=new tn(this.getRoot(),this.getRoot(),t);return this.nearestNeighbour(e)}if(arguments[0]instanceof tn){var i=arguments[0];return this.nearestNeighbour(i,y.POSITIVE_INFINITY)}}else if(2===arguments.length){if(arguments[0]instanceof n&&I(arguments[1],on)){var r=arguments[0],o=arguments[1],s=new tn(this.getRoot(),r.getRoot(),o);return this.nearestNeighbour(s)}if(arguments[0]instanceof tn&&"number"==typeof arguments[1]){var a=arguments[0],l=arguments[1],c=null,u=new Xe;for(u.add(a);!u.isEmpty()&&l>0;){var h=u.poll(),d=h.getDistance();if(d>=l)break;h.isLeaves()?(l=d,c=h):h.expandToQueue(u,l)}return[c.getBoundable(0).getItem(),c.getBoundable(1).getItem()]}}else if(3===arguments.length){var A=arguments[0],p=arguments[1],f=arguments[2],g=new We(A,p),m=new tn(this.getRoot(),g,f);return this.nearestNeighbour(m)[0]}},n.prototype.interfaces_=function(){return[qe,e]},n.prototype.getClass=function(){return n},n.centreX=function(t){return n.avg(t.getMinX(),t.getMaxX())},n.avg=function(t,e){return(t+e)/2},n.centreY=function(t){return n.avg(t.getMinY(),t.getMaxY())},i.STRtreeNode.get=function(){return an},i.serialVersionUID.get=function(){return 0x39920f7d5f261e0},i.xComparator.get=function(){return{interfaces_:function(){return[w]},compare:function(e,i){return t.compareDoubles(n.centreX(e.getBounds()),n.centreX(i.getBounds()))}}},i.yComparator.get=function(){return{interfaces_:function(){return[w]},compare:function(e,i){return t.compareDoubles(n.centreY(e.getBounds()),n.centreY(i.getBounds()))}}},i.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},i.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(n,i),n}(en),an=function(t){function e(){var e=arguments[0];t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();null===t?t=new Z(n.getBounds()):t.expandToInclude(n.getBounds())}return t},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Je),ln=function(){};ln.prototype.interfaces_=function(){return[]},ln.prototype.getClass=function(){return ln},ln.relativeSign=function(t,e){return t<e?-1:t>e?1:0},ln.compare=function(t,e,n){if(e.equals2D(n))return 0;var i=ln.relativeSign(e.x,n.x),r=ln.relativeSign(e.y,n.y);switch(t){case 0:return ln.compareValue(i,r);case 1:return ln.compareValue(r,i);case 2:return ln.compareValue(r,-i);case 3:return ln.compareValue(-i,r);case 4:return ln.compareValue(-i,-r);case 5:return ln.compareValue(-r,-i);case 6:return ln.compareValue(-r,i);case 7:return ln.compareValue(i,-r)}return et.shouldNeverReachHere("invalid octant value"),0},ln.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var cn=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._segString=t,this.coord=new E(e),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(n))};cn.prototype.getCoordinate=function(){return this.coord},cn.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},cn.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:ln.compare(this._segmentOctant,this.coord,e.coord)},cn.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},cn.prototype.isInterior=function(){return this._isInterior},cn.prototype.interfaces_=function(){return[x]},cn.prototype.getClass=function(){return cn};var un=function(){this._nodeMap=new h,this._edge=null;var t=arguments[0];this._edge=t};un.prototype.getSplitCoordinates=function(){var t=new Ct;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next();this.addEdgeCoordinates(n,i,t),n=i}return t.toCoordinateArray()},un.prototype.addCollapsedNodes=function(){var t=new wt;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var n=e.next().intValue();this.add(this._edge.getCoordinate(n),n)}},un.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},un.prototype.findCollapsesFromExistingVertices=function(t){for(var e=0;e<this._edge.size()-2;e++){var n=this._edge.getCoordinate(e),i=this._edge.getCoordinate(e+2);n.equals2D(i)&&t.add(new R(e+1))}},un.prototype.addEdgeCoordinates=function(t,e,n){var i=this._edge.getCoordinate(e.segmentIndex),r=e.isInterior()||!e.coord.equals2D(i);n.add(new E(t.coord),!1);for(var o=t.segmentIndex+1;o<=e.segmentIndex;o++)n.add(this._edge.getCoordinate(o));r&&n.add(new E(e.coord))},un.prototype.iterator=function(){return this._nodeMap.values().iterator()},un.prototype.addSplitEdges=function(t){this.addEndpoints(),this.addCollapsedNodes();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next(),r=this.createSplitEdge(n,i);t.add(r),n=i}},un.prototype.findCollapseIndex=function(t,e,n){if(!t.coord.equals2D(e.coord))return!1;var i=e.segmentIndex-t.segmentIndex;return e.isInterior()||i--,1===i&&(n[0]=t.segmentIndex+1,!0)},un.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=new Array(1).fill(null),n=this.iterator(),i=n.next();n.hasNext();){var r=n.next();this.findCollapseIndex(i,r,e)&&t.add(new R(e[0])),i=r}},un.prototype.getEdge=function(){return this._edge},un.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},un.prototype.createSplitEdge=function(t,e){var n=e.segmentIndex-t.segmentIndex+2,i=this._edge.getCoordinate(e.segmentIndex),r=e.isInterior()||!e.coord.equals2D(i);r||n--;var o=new Array(n).fill(null),s=0;o[s++]=new E(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this._edge.getCoordinate(a);return r&&(o[s]=new E(e.coord)),new pn(o,this._edge.getData())},un.prototype.add=function(t,e){var n=new cn(this._edge,t,e,this._edge.getSegmentOctant(e)),i=this._nodeMap.get(n);return null!==i?(et.isTrue(i.coord.equals2D(t),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(n,n),n)},un.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),n=t.get(0).getCoordinate(0);if(!n.equals2D(e[0]))throw new $("bad split edge start point at "+n);var i=t.get(t.size()-1).getCoordinates(),r=i[i.length-1];if(!r.equals2D(e[e.length-1]))throw new $("bad split edge end point at "+r)},un.prototype.interfaces_=function(){return[]},un.prototype.getClass=function(){return un};var hn=function(){};hn.prototype.interfaces_=function(){return[]},hn.prototype.getClass=function(){return hn},hn.octant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new _("Cannot compute the octant for point ( "+t+", "+e+" )");var n=Math.abs(t),i=Math.abs(e);return t>=0?e>=0?n>=i?0:1:n>=i?7:6:e>=0?n>=i?3:2:n>=i?4:5}if(arguments[0]instanceof E&&arguments[1]instanceof E){var r=arguments[0],o=arguments[1],s=o.x-r.x,a=o.y-r.y;if(0===s&&0===a)throw new _("Cannot compute the octant for two identical points "+r);return hn.octant(s,a)}};var dn=function(){};dn.prototype.getCoordinates=function(){},dn.prototype.size=function(){},dn.prototype.getCoordinate=function(t){},dn.prototype.isClosed=function(){},dn.prototype.setData=function(t){},dn.prototype.getData=function(){},dn.prototype.interfaces_=function(){return[]},dn.prototype.getClass=function(){return dn};var An=function(){};An.prototype.addIntersection=function(t,e){},An.prototype.interfaces_=function(){return[dn]},An.prototype.getClass=function(){return An};var pn=function(){this._nodeList=new un(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};pn.prototype.getCoordinates=function(){return this._pts},pn.prototype.size=function(){return this._pts.length},pn.prototype.getCoordinate=function(t){return this._pts[t]},pn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},pn.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},pn.prototype.setData=function(t){this._data=t},pn.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:hn.octant(t,e)},pn.prototype.getData=function(){return this._data},pn.prototype.addIntersection=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[3],o=new E(n.getIntersection(r));this.addIntersection(o,i)}},pn.prototype.toString=function(){return Y.toLineString(new le(this._pts))},pn.prototype.getNodeList=function(){return this._nodeList},pn.prototype.addIntersectionNode=function(t,e){var n=e,i=n+1;if(i<this._pts.length){var r=this._pts[i];t.equals2D(r)&&(n=i)}return this._nodeList.add(t,n)},pn.prototype.addIntersections=function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++)this.addIntersection(t,e,n,i)},pn.prototype.interfaces_=function(){return[An]},pn.prototype.getClass=function(){return pn},pn.getNodedSubstrings=function(){if(1===arguments.length){var t=arguments[0],e=new wt;return pn.getNodedSubstrings(t,e),e}if(2===arguments.length)for(var n=arguments[0],i=arguments[1],r=n.iterator();r.hasNext();)r.next().getNodeList().addSplitEdges(i)};var fn=function(){if(this.p0=null,this.p1=null,0===arguments.length)this.p0=new E,this.p1=new E;else if(1===arguments.length){var t=arguments[0];this.p0=new E(t.p0),this.p1=new E(t.p1)}else if(2===arguments.length)this.p0=arguments[0],this.p1=arguments[1];else if(4===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2],r=arguments[3];this.p0=new E(e,n),this.p1=new E(i,r)}},gn={serialVersionUID:{configurable:!0}};fn.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},fn.prototype.orientationIndex=function(){if(arguments[0]instanceof fn){var t=arguments[0],e=at.orientationIndex(this.p0,this.p1,t.p0),n=at.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof E){var i=arguments[0];return at.orientationIndex(this.p0,this.p1,i)}},fn.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},fn.prototype.isVertical=function(){return this.p0.x===this.p1.x},fn.prototype.equals=function(t){if(!(t instanceof fn))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},fn.prototype.intersection=function(t){var e=new rt;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},fn.prototype.project=function(){if(arguments[0]instanceof E){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new E(t);var e=this.projectionFactor(t),n=new E;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof fn){var i=arguments[0],r=this.projectionFactor(i.p0),o=this.projectionFactor(i.p1);if(r>=1&&o>=1)return null;if(r<=0&&o<=0)return null;var s=this.project(i.p0);r<0&&(s=this.p0),r>1&&(s=this.p1);var a=this.project(i.p1);return o<0&&(a=this.p0),o>1&&(a=this.p1),new fn(s,a)}},fn.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},fn.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},fn.prototype.getCoordinate=function(t){return 0===t?this.p0:this.p1},fn.prototype.distancePerpendicular=function(t){return at.distancePointLinePerpendicular(t,this.p0,this.p1)},fn.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},fn.prototype.midPoint=function(){return fn.midPoint(this.p0,this.p1)},fn.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=e*e+n*n;return i<=0?y.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/i},fn.prototype.closestPoints=function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),i=y.MAX_VALUE,r=null,o=this.closestPoint(t.p0);i=o.distance(t.p0),n[0]=o,n[1]=t.p0;var s=this.closestPoint(t.p1);(r=s.distance(t.p1))<i&&(i=r,n[0]=s,n[1]=t.p1);var a=t.closestPoint(this.p0);(r=a.distance(this.p0))<i&&(i=r,n[0]=this.p0,n[1]=a);var l=t.closestPoint(this.p1);return(r=l.distance(this.p1))<i&&(i=r,n[0]=this.p1,n[1]=l),n},fn.prototype.closestPoint=function(t){var e=this.projectionFactor(t);return e>0&&e<1?this.project(t):this.p0.distance(t)<this.p1.distance(t)?this.p0:this.p1},fn.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},fn.prototype.getLength=function(){return this.p0.distance(this.p1)},fn.prototype.compareTo=function(t){var e=t,n=this.p0.compareTo(e.p0);return 0!==n?n:this.p1.compareTo(e.p1)},fn.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},fn.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},fn.prototype.lineIntersection=function(t){try{return j.intersection(this.p0,this.p1,t.p0,t.p1)}catch(t){if(!(t instanceof H))throw t}return null},fn.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},fn.prototype.pointAlongOffset=function(t,e){var n=this.p0.x+t*(this.p1.x-this.p0.x),i=this.p0.y+t*(this.p1.y-this.p0.y),r=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,s=Math.sqrt(r*r+o*o),a=0,l=0;if(0!==e){if(s<=0)throw new Error("Cannot compute offset from zero-length line segment");a=e*r/s,l=e*o/s}return new E(n-l,i+a)},fn.prototype.setCoordinates=function(){if(1===arguments.length){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=n.x,this.p1.y=n.y}},fn.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||y.isNaN(e))&&(e=1),e},fn.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},fn.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},fn.prototype.distance=function(){if(arguments[0]instanceof fn){var t=arguments[0];return at.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof E){var e=arguments[0];return at.distancePointLine(e,this.p0,this.p1)}},fn.prototype.pointAlong=function(t){var e=new E;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},fn.prototype.hashCode=function(){var t=y.doubleToLongBits(this.p0.x);t^=31*y.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=y.doubleToLongBits(this.p1.x);return n^=31*y.doubleToLongBits(this.p1.y),e^Math.trunc(n)^Math.trunc(n>>32)},fn.prototype.interfaces_=function(){return[x,e]},fn.prototype.getClass=function(){return fn},fn.midPoint=function(t,e){return new E((t.x+e.x)/2,(t.y+e.y)/2)},gn.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(fn,gn);var mn=function(){this.tempEnv1=new Z,this.tempEnv2=new Z,this._overlapSeg1=new fn,this._overlapSeg2=new fn};mn.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},mn.prototype.interfaces_=function(){return[]},mn.prototype.getClass=function(){return mn};var _n=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=i};_n.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},_n.prototype.computeSelect=function(t,e,n,i){var r=this._pts[e],o=this._pts[n];if(i.tempEnv1.init(r,o),n-e==1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var s=Math.trunc((e+n)/2);e<s&&this.computeSelect(t,e,s,i),s<n&&this.computeSelect(t,s,n,i)},_n.prototype.getCoordinates=function(){for(var t=new Array(this._end-this._start+1).fill(null),e=0,n=this._start;n<=this._end;n++)t[e++]=this._pts[n];return t},_n.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},_n.prototype.setId=function(t){this._id=t},_n.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},_n.prototype.getEnvelope=function(){if(null===this._env){var t=this._pts[this._start],e=this._pts[this._end];this._env=new Z(t,e)}return this._env},_n.prototype.getEndIndex=function(){return this._end},_n.prototype.getStartIndex=function(){return this._start},_n.prototype.getContext=function(){return this._context},_n.prototype.getId=function(){return this._id},_n.prototype.computeOverlapsInternal=function(t,e,n,i,r,o){var s=this._pts[t],a=this._pts[e],l=n._pts[i],c=n._pts[r];if(e-t==1&&r-i==1)return o.overlap(this,t,n,i),null;if(o.tempEnv1.init(s,a),o.tempEnv2.init(l,c),!o.tempEnv1.intersects(o.tempEnv2))return null;var u=Math.trunc((t+e)/2),h=Math.trunc((i+r)/2);t<u&&(i<h&&this.computeOverlapsInternal(t,u,n,i,h,o),h<r&&this.computeOverlapsInternal(t,u,n,h,r,o)),u<e&&(i<h&&this.computeOverlapsInternal(u,e,n,i,h,o),h<r&&this.computeOverlapsInternal(u,e,n,h,r,o))},_n.prototype.interfaces_=function(){return[]},_n.prototype.getClass=function(){return _n};var yn=function(){};yn.prototype.interfaces_=function(){return[]},yn.prototype.getClass=function(){return yn},yn.getChainStartIndices=function(t){var e=0,n=new wt;n.add(new R(e));do{var i=yn.findChainEnd(t,e);n.add(new R(i)),e=i}while(e<t.length-1);return yn.toIntArray(n)},yn.findChainEnd=function(t,e){for(var n=e;n<t.length-1&&t[n].equals2D(t[n+1]);)n++;if(n>=t.length-1)return t.length-1;for(var i=ke.quadrant(t[n],t[n+1]),r=e+1;r<t.length;){if(!t[r-1].equals2D(t[r])&&ke.quadrant(t[r-1],t[r])!==i)break;r++}return r-1},yn.getChains=function(){if(1===arguments.length){var t=arguments[0];return yn.getChains(t,null)}if(2===arguments.length){for(var e=arguments[0],n=arguments[1],i=new wt,r=yn.getChainStartIndices(e),o=0;o<r.length-1;o++){var s=new _n(e,r[o],r[o+1],n);i.add(s)}return i}},yn.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var vn=function(){};vn.prototype.computeNodes=function(t){},vn.prototype.getNodedSubstrings=function(){},vn.prototype.interfaces_=function(){return[]},vn.prototype.getClass=function(){return vn};var xn=function(){if(this._segInt=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.setSegmentIntersector(t)}};xn.prototype.setSegmentIntersector=function(t){this._segInt=t},xn.prototype.interfaces_=function(){return[vn]},xn.prototype.getClass=function(){return xn};var bn=function(t){function e(e){e?t.call(this,e):t.call(this),this._monoChains=new wt,this._index=new sn,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={SegmentOverlapAction:{configurable:!0}};return e.prototype.getMonotoneChains=function(){return this._monoChains},e.prototype.getNodedSubstrings=function(){return pn.getNodedSubstrings(this._nodedSegStrings)},e.prototype.getIndex=function(){return this._index},e.prototype.add=function(t){for(var e=yn.getChains(t.getCoordinates(),t).iterator();e.hasNext();){var n=e.next();n.setId(this._idCounter++),this._index.insert(n.getEnvelope(),n),this._monoChains.add(n)}},e.prototype.computeNodes=function(t){this._nodedSegStrings=t;for(var e=t.iterator();e.hasNext();)this.add(e.next());this.intersectChains()},e.prototype.intersectChains=function(){for(var t=new wn(this._segInt),e=this._monoChains.iterator();e.hasNext();)for(var n=e.next(),i=this._index.query(n.getEnvelope()).iterator();i.hasNext();){var r=i.next();if(r.getId()>n.getId()&&(n.computeOverlaps(r,t),this._nOverlaps++),this._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return wn},Object.defineProperties(e,n),e}(xn),wn=function(t){function e(){t.call(this),this._si=null;var e=arguments[0];this._si=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(4!==arguments.length)return t.prototype.overlap.apply(this,arguments);var e=arguments[0],n=arguments[1],i=arguments[2],r=arguments[3],o=e.getContext(),s=i.getContext();this._si.processIntersections(o,n,s,r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(mn),En=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(i)}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this.setQuadrantSegments(r),this.setEndCapStyle(o),this.setJoinStyle(s),this.setMitreLimit(a)}},Cn={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};En.prototype.getEndCapStyle=function(){return this._endCapStyle},En.prototype.isSingleSided=function(){return this._isSingleSided},En.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=En.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=En.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==En.JOIN_ROUND&&(this._quadrantSegments=En.DEFAULT_QUADRANT_SEGMENTS)},En.prototype.getJoinStyle=function(){return this._joinStyle},En.prototype.setJoinStyle=function(t){this._joinStyle=t},En.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},En.prototype.getSimplifyFactor=function(){return this._simplifyFactor},En.prototype.getQuadrantSegments=function(){return this._quadrantSegments},En.prototype.setEndCapStyle=function(t){this._endCapStyle=t},En.prototype.getMitreLimit=function(){return this._mitreLimit},En.prototype.setMitreLimit=function(t){this._mitreLimit=t},En.prototype.setSingleSided=function(t){this._isSingleSided=t},En.prototype.interfaces_=function(){return[]},En.prototype.getClass=function(){return En},En.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Cn.CAP_ROUND.get=function(){return 1},Cn.CAP_FLAT.get=function(){return 2},Cn.CAP_SQUARE.get=function(){return 3},Cn.JOIN_ROUND.get=function(){return 1},Cn.JOIN_MITRE.get=function(){return 2},Cn.JOIN_BEVEL.get=function(){return 3},Cn.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Cn.DEFAULT_MITRE_LIMIT.get=function(){return 5},Cn.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(En,Cn);var Bn=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=at.COUNTERCLOCKWISE,this._inputLine=t||null},Sn={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Bn.prototype.isDeletable=function(t,e,n,i){var r=this._inputLine[t],o=this._inputLine[e],s=this._inputLine[n];return!!this.isConcave(r,o,s)&&!!this.isShallow(r,o,s,i)&&this.isShallowSampled(r,o,t,n,i)},Bn.prototype.deleteShallowConcavities=function(){for(var t=1,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e),i=!1;n<this._inputLine.length;){var r=!1;this.isDeletable(t,e,n,this._distanceTol)&&(this._isDeleted[e]=Bn.DELETE,r=!0,i=!0),t=r?n:e,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e)}return i},Bn.prototype.isShallowConcavity=function(t,e,n,i){return at.computeOrientation(t,e,n)===this._angleOrientation&&at.distancePointLine(e,t,n)<i},Bn.prototype.isShallowSampled=function(t,e,n,i,r){var o=Math.trunc((i-n)/Bn.NUM_PTS_TO_CHECK);o<=0&&(o=1);for(var s=n;s<i;s+=o)if(!this.isShallow(t,e,this._inputLine[s],r))return!1;return!0},Bn.prototype.isConcave=function(t,e,n){var i=at.computeOrientation(t,e,n)===this._angleOrientation;return i},Bn.prototype.simplify=function(t){this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=at.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var e=!1;do{e=this.deleteShallowConcavities()}while(e);return this.collapseLine()},Bn.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===Bn.DELETE;)e++;return e},Bn.prototype.isShallow=function(t,e,n,i){return at.distancePointLine(e,t,n)<i},Bn.prototype.collapseLine=function(){for(var t=new Ct,e=0;e<this._inputLine.length;e++)this._isDeleted[e]!==Bn.DELETE&&t.add(this._inputLine[e]);return t.toCoordinateArray()},Bn.prototype.interfaces_=function(){return[]},Bn.prototype.getClass=function(){return Bn},Bn.simplify=function(t,e){return new Bn(t).simplify(e)},Sn.INIT.get=function(){return 0},Sn.DELETE.get=function(){return 1},Sn.KEEP.get=function(){return 1},Sn.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(Bn,Sn);var Mn=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new wt},Tn={COORDINATE_ARRAY_TYPE:{configurable:!0}};Mn.prototype.getCoordinates=function(){return this._ptList.toArray(Mn.COORDINATE_ARRAY_TYPE)},Mn.prototype.setPrecisionModel=function(t){this._precisionModel=t},Mn.prototype.addPt=function(t){var e=new E(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},Mn.prototype.revere=function(){},Mn.prototype.addPts=function(t,e){if(e)for(var n=0;n<t.length;n++)this.addPt(t[n]);else for(var i=t.length-1;i>=0;i--)this.addPt(t[i])},Mn.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)<this._minimimVertexDistance},Mn.prototype.toString=function(){return(new me).createLineString(this.getCoordinates()).toString()},Mn.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new E(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},Mn.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},Mn.prototype.interfaces_=function(){return[]},Mn.prototype.getClass=function(){return Mn},Tn.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(Mn,Tn);var In=function(){},Ln={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};In.prototype.interfaces_=function(){return[]},In.prototype.getClass=function(){return In},In.toDegrees=function(t){return 180*t/Math.PI},In.normalize=function(t){for(;t>Math.PI;)t-=In.PI_TIMES_2;for(;t<=-Math.PI;)t+=In.PI_TIMES_2;return t},In.angle=function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],i=n.x-e.x,r=n.y-e.y;return Math.atan2(r,i)}},In.isAcute=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return i*(n.x-e.x)+r*(n.y-e.y)>0},In.isObtuse=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return i*(n.x-e.x)+r*(n.y-e.y)<0},In.interiorAngle=function(t,e,n){var i=In.angle(e,t),r=In.angle(e,n);return Math.abs(r-i)},In.normalizePositive=function(t){if(t<0){for(;t<0;)t+=In.PI_TIMES_2;t>=In.PI_TIMES_2&&(t=0)}else{for(;t>=In.PI_TIMES_2;)t-=In.PI_TIMES_2;t<0&&(t=0)}return t},In.angleBetween=function(t,e,n){var i=In.angle(e,t),r=In.angle(e,n);return In.diff(i,r)},In.diff=function(t,e){var n=null;return(n=t<e?e-t:t-e)>Math.PI&&(n=2*Math.PI-n),n},In.toRadians=function(t){return t*Math.PI/180},In.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?In.COUNTERCLOCKWISE:n<0?In.CLOCKWISE:In.NONE},In.angleBetweenOriented=function(t,e,n){var i=In.angle(e,t),r=In.angle(e,n)-i;return r<=-Math.PI?r+In.PI_TIMES_2:r>Math.PI?r-In.PI_TIMES_2:r},Ln.PI_TIMES_2.get=function(){return 2*Math.PI},Ln.PI_OVER_2.get=function(){return Math.PI/2},Ln.PI_OVER_4.get=function(){return Math.PI/4},Ln.COUNTERCLOCKWISE.get=function(){return at.COUNTERCLOCKWISE},Ln.CLOCKWISE.get=function(){return at.CLOCKWISE},Ln.NONE.get=function(){return at.COLLINEAR},Object.defineProperties(In,Ln);var Pn=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new fn,this._seg1=new fn,this._offset0=new fn,this._offset1=new fn,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new rt,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===En.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(i)},Fn={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};Pn.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=at.computeOrientation(this._s0,this._s1,this._s2),i=n===at.CLOCKWISE&&this._side===Ce.LEFT||n===at.COUNTERCLOCKWISE&&this._side===Ce.RIGHT;0===n?this.addCollinear(e):i?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},Pn.prototype.addLineEndCap=function(t,e){var n=new fn(t,e),i=new fn;this.computeOffsetSegment(n,Ce.LEFT,this._distance,i);var r=new fn;this.computeOffsetSegment(n,Ce.RIGHT,this._distance,r);var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o);switch(this._bufParams.getEndCapStyle()){case En.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,a+Math.PI/2,a-Math.PI/2,at.CLOCKWISE,this._distance),this._segList.addPt(r.p1);break;case En.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(r.p1);break;case En.CAP_SQUARE:var l=new E;l.x=Math.abs(this._distance)*Math.cos(a),l.y=Math.abs(this._distance)*Math.sin(a);var c=new E(i.p1.x+l.x,i.p1.y+l.y),u=new E(r.p1.x+l.x,r.p1.y+l.y);this._segList.addPt(c),this._segList.addPt(u)}},Pn.prototype.getCoordinates=function(){return this._segList.getCoordinates()},Pn.prototype.addMitreJoin=function(t,e,n,i){var r=!0,o=null;try{o=j.intersection(e.p0,e.p1,n.p0,n.p1),(i<=0?1:o.distance(t)/Math.abs(i))>this._bufParams.getMitreLimit()&&(r=!1)}catch(t){if(!(t instanceof H))throw t;o=new E(0,0),r=!1}r?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,i,this._bufParams.getMitreLimit())},Pn.prototype.addFilletCorner=function(t,e,n,i,r){var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o),l=n.x-t.x,c=n.y-t.y,u=Math.atan2(c,l);i===at.CLOCKWISE?a<=u&&(a+=2*Math.PI):a>=u&&(a-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,a,u,i,r),this._segList.addPt(n)},Pn.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*Pn.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===En.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===En.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},Pn.prototype.createSquare=function(t){this._segList.addPt(new E(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new E(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new E(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new E(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},Pn.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},Pn.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},Pn.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},Pn.prototype.initSideSegments=function(t,e,n){this._s1=t,this._s2=e,this._side=n,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)},Pn.prototype.addLimitedMitreJoin=function(t,e,n,i){var r=this._seg0.p1,o=In.angle(r,this._seg0.p0),s=In.angleBetweenOriented(this._seg0.p0,r,this._seg1.p1)/2,a=In.normalize(o+s),l=In.normalize(a+Math.PI),c=i*n,u=n-c*Math.abs(Math.sin(s)),h=r.x+c*Math.cos(l),d=r.y+c*Math.sin(l),A=new E(h,d),p=new fn(r,A),f=p.pointAlongOffset(1,u),g=p.pointAlongOffset(1,-u);this._side===Ce.LEFT?(this._segList.addPt(f),this._segList.addPt(g)):(this._segList.addPt(g),this._segList.addPt(f))},Pn.prototype.computeOffsetSegment=function(t,e,n,i){var r=e===Ce.LEFT?1:-1,o=t.p1.x-t.p0.x,s=t.p1.y-t.p0.y,a=Math.sqrt(o*o+s*s),l=r*n*o/a,c=r*n*s/a;i.p0.x=t.p0.x-c,i.p0.y=t.p0.y+l,i.p1.x=t.p1.x-c,i.p1.y=t.p1.y+l},Pn.prototype.addFilletArc=function(t,e,n,i,r){var o=i===at.CLOCKWISE?-1:1,s=Math.abs(e-n),a=Math.trunc(s/this._filletAngleQuantum+.5);if(a<1)return null;for(var l=s/a,c=0,u=new E;c<s;){var h=e+o*c;u.x=t.x+r*Math.cos(h),u.y=t.y+r*Math.sin(h),this._segList.addPt(u),c+=l}},Pn.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*Pn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new E((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var i=new E((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},Pn.prototype.createCircle=function(t){var e=new E(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Pn.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},Pn.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Mn,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*Pn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Pn.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===En.JOIN_BEVEL||this._bufParams.getJoinStyle()===En.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,at.CLOCKWISE,this._distance))},Pn.prototype.closeRing=function(){this._segList.closeRing()},Pn.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Pn.prototype.interfaces_=function(){return[]},Pn.prototype.getClass=function(){return Pn},Fn.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},Fn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},Fn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Fn.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Pn,Fn);var Rn=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};Rn.prototype.getOffsetCurve=function(t,e){if(this._distance=e,0===e)return null;var n=e<0,i=Math.abs(e),r=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],r):this.computeOffsetCurve(t,n,r);var o=r.getCoordinates();return n&&Bt.reverse(o),o},Rn.prototype.computeSingleSidedBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var r=Bn.simplify(t,-i),o=r.length-1;n.initSideSegments(r[o],r[o-1],Ce.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(r[s],!0)}else{n.addSegments(t,!1);var a=Bn.simplify(t,i),l=a.length-1;n.initSideSegments(a[0],a[1],Ce.LEFT),n.addFirstSegment();for(var c=2;c<=l;c++)n.addNextSegment(a[c],!0)}n.addLastSegment(),n.closeRing()},Rn.prototype.computeRingBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);e===Ce.RIGHT&&(i=-i);var r=Bn.simplify(t,i),o=r.length-1;n.initSideSegments(r[o-1],r[0],e);for(var s=1;s<=o;s++){var a=1!==s;n.addNextSegment(r[s],a)}n.closeRing()},Rn.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),i=Bn.simplify(t,n),r=i.length-1;e.initSideSegments(i[0],i[1],Ce.LEFT);for(var o=2;o<=r;o++)e.addNextSegment(i[o],!0);e.addLastSegment(),e.addLineEndCap(i[r-1],i[r]);var s=Bn.simplify(t,-n),a=s.length-1;e.initSideSegments(s[a],s[a-1],Ce.LEFT);for(var l=a-2;l>=0;l--)e.addNextSegment(s[l],!0);e.addLastSegment(),e.addLineEndCap(s[1],s[0]),e.closeRing()},Rn.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case En.CAP_ROUND:e.createCircle(t);break;case En.CAP_SQUARE:e.createSquare(t)}},Rn.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided())return null;if(0===e)return null;var n=Math.abs(e),i=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var r=e<0;this.computeSingleSidedBufferCurve(t,r,i)}else this.computeLineBufferCurve(t,i);return i.getCoordinates()},Rn.prototype.getBufferParameters=function(){return this._bufParams},Rn.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},Rn.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(0===n)return Rn.copyCoordinates(t);var i=this.getSegGen(n);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},Rn.prototype.computeOffsetCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){var r=Bn.simplify(t,-i),o=r.length-1;n.initSideSegments(r[o],r[o-1],Ce.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(r[s],!0)}else{var a=Bn.simplify(t,i),l=a.length-1;n.initSideSegments(a[0],a[1],Ce.LEFT),n.addFirstSegment();for(var c=2;c<=l;c++)n.addNextSegment(a[c],!0)}n.addLastSegment()},Rn.prototype.getSegGen=function(t){return new Pn(this._precisionModel,this._bufParams,t)},Rn.prototype.interfaces_=function(){return[]},Rn.prototype.getClass=function(){return Rn},Rn.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;n<e.length;n++)e[n]=new E(t[n]);return e};var Dn=function(){this._subgraphs=null,this._seg=new fn,this._cga=new at;var t=arguments[0];this._subgraphs=t},On={DepthSegment:{configurable:!0}};Dn.prototype.findStabbedSegments=function(){if(1===arguments.length){for(var t=arguments[0],e=new wt,n=this._subgraphs.iterator();n.hasNext();){var i=n.next(),r=i.getEnvelope();t.y<r.getMinY()||t.y>r.getMaxY()||this.findStabbedSegments(t,i.getDirectedEdges(),e)}return e}if(3===arguments.length)if(I(arguments[2],bt)&&arguments[0]instanceof E&&arguments[1]instanceof Ge){for(var o=arguments[0],s=arguments[1],a=arguments[2],l=s.getEdge().getCoordinates(),c=0;c<l.length-1;c++)if(this._seg.p0=l[c],this._seg.p1=l[c+1],this._seg.p0.y>this._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)<o.x)&&!(this._seg.isHorizontal()||o.y<this._seg.p0.y||o.y>this._seg.p1.y||at.computeOrientation(this._seg.p0,this._seg.p1,o)===at.RIGHT)){var u=s.getDepth(Ce.LEFT);this._seg.p0.equals(l[c])||(u=s.getDepth(Ce.RIGHT));var h=new Un(this._seg,u);a.add(h)}}else if(I(arguments[2],bt)&&arguments[0]instanceof E&&I(arguments[1],bt))for(var d=arguments[0],A=arguments[1],p=arguments[2],f=A.iterator();f.hasNext();){var g=f.next();g.isForward()&&this.findStabbedSegments(d,g,p)}},Dn.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:$e.min(e)._leftDepth},Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn},On.DepthSegment.get=function(){return Un},Object.defineProperties(Dn,On);var Un=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new fn(t),this._leftDepth=e};Un.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n||0!=(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},Un.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},Un.prototype.toString=function(){return this._upwardSeg.toString()},Un.prototype.interfaces_=function(){return[x]},Un.prototype.getClass=function(){return Un};var Nn=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};Nn.prototype.area=function(){return Nn.area(this.p0,this.p1,this.p2)},Nn.prototype.signedArea=function(){return Nn.signedArea(this.p0,this.p1,this.p2)},Nn.prototype.interpolateZ=function(t){if(null===t)throw new _("Supplied point is null.");return Nn.interpolateZ(t,this.p0,this.p1,this.p2)},Nn.prototype.longestSideLength=function(){return Nn.longestSideLength(this.p0,this.p1,this.p2)},Nn.prototype.isAcute=function(){return Nn.isAcute(this.p0,this.p1,this.p2)},Nn.prototype.circumcentre=function(){return Nn.circumcentre(this.p0,this.p1,this.p2)},Nn.prototype.area3D=function(){return Nn.area3D(this.p0,this.p1,this.p2)},Nn.prototype.centroid=function(){return Nn.centroid(this.p0,this.p1,this.p2)},Nn.prototype.inCentre=function(){return Nn.inCentre(this.p0,this.p1,this.p2)},Nn.prototype.interfaces_=function(){return[]},Nn.prototype.getClass=function(){return Nn},Nn.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},Nn.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},Nn.det=function(t,e,n,i){return t*i-e*n},Nn.interpolateZ=function(t,e,n,i){var r=e.x,o=e.y,s=n.x-r,a=i.x-r,l=n.y-o,c=i.y-o,u=s*c-a*l,h=t.x-r,d=t.y-o,A=(c*h-a*d)/u,p=(-l*h+s*d)/u;return e.z+A*(n.z-e.z)+p*(i.z-e.z)},Nn.longestSideLength=function(t,e,n){var i=t.distance(e),r=e.distance(n),o=n.distance(t),s=i;return r>s&&(s=r),o>s&&(s=o),s},Nn.isAcute=function(t,e,n){return!!In.isAcute(t,e,n)&&!!In.isAcute(e,n,t)&&!!In.isAcute(n,t,e)},Nn.circumcentre=function(t,e,n){var i=n.x,r=n.y,o=t.x-i,s=t.y-r,a=e.x-i,l=e.y-r,c=2*Nn.det(o,s,a,l),u=Nn.det(s,o*o+s*s,l,a*a+l*l),h=Nn.det(o,o*o+s*s,a,a*a+l*l);return new E(i-u/c,r+h/c)},Nn.perpendicularBisector=function(t,e){var n=e.x-t.x,i=e.y-t.y,r=new j(t.x+n/2,t.y+i/2,1),o=new j(t.x-i+n/2,t.y+n+i/2,1);return new j(r,o)},Nn.angleBisector=function(t,e,n){var i=e.distance(t),r=i/(i+e.distance(n)),o=n.x-t.x,s=n.y-t.y;return new E(t.x+r*o,t.y+r*s)},Nn.area3D=function(t,e,n){var i=e.x-t.x,r=e.y-t.y,o=e.z-t.z,s=n.x-t.x,a=n.y-t.y,l=n.z-t.z,c=r*l-o*a,u=o*s-i*l,h=i*a-r*s,d=c*c+u*u+h*h,A=Math.sqrt(d)/2;return A},Nn.centroid=function(t,e,n){var i=(t.x+e.x+n.x)/3,r=(t.y+e.y+n.y)/3;return new E(i,r)},Nn.inCentre=function(t,e,n){var i=e.distance(n),r=t.distance(n),o=t.distance(e),s=i+r+o,a=(i*t.x+r*e.x+o*n.x)/s,l=(i*t.y+r*e.y+o*n.y)/s;return new E(a,l)};var kn=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new wt;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};kn.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,M.EXTERIOR,M.INTERIOR)},kn.prototype.addPolygon=function(t){var e=this._distance,n=Ce.LEFT;this._distance<0&&(e=-this._distance,n=Ce.RIGHT);var i=t.getExteriorRing(),r=Bt.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance))return null;if(this._distance<=0&&r.length<3)return null;this.addPolygonRing(r,e,n,M.EXTERIOR,M.INTERIOR);for(var o=0;o<t.getNumInteriorRing();o++){var s=t.getInteriorRingN(o),a=Bt.removeRepeatedPoints(s.getCoordinates());this._distance>0&&this.isErodedCompletely(s,-this._distance)||this.addPolygonRing(a,e,Ce.opposite(n),M.INTERIOR,M.EXTERIOR)}},kn.prototype.isTriangleErodedCompletely=function(t,e){var n=new Nn(t[0],t[1],t[2]),i=n.inCentre();return at.distancePointLine(i,n.p0,n.p1)<Math.abs(e)},kn.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=Bt.removeRepeatedPoints(t.getCoordinates()),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,M.EXTERIOR,M.INTERIOR)},kn.prototype.addCurve=function(t,e,n){if(null===t||t.length<2)return null;var i=new pn(t,new Pe(0,M.BOUNDARY,e,n));this._curveList.add(i)},kn.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},kn.prototype.addPolygonRing=function(t,e,n,i,r){if(0===e&&t.length<ee.MINIMUM_VALID_SIZE)return null;var o=i,s=r;t.length>=ee.MINIMUM_VALID_SIZE&&at.isCCW(t)&&(o=r,s=i,n=Ce.opposite(n));var a=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(a,o,s)},kn.prototype.add=function(t){if(t.isEmpty())return null;t instanceof $t?this.addPolygon(t):t instanceof Kt?this.addLineString(t):t instanceof Jt?this.addPoint(t):(t instanceof te||t instanceof Ht||t instanceof ne||t instanceof Gt)&&this.addCollection(t)},kn.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var i=t.getEnvelopeInternal(),r=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>r},kn.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},kn.prototype.interfaces_=function(){return[]},kn.prototype.getClass=function(){return kn};var zn=function(){};zn.prototype.locate=function(t){},zn.prototype.interfaces_=function(){return[]},zn.prototype.getClass=function(){return zn};var Qn=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};Qn.prototype.next=function(){if(this._atStart)return this._atStart=!1,Qn.isAtomic(this._parent)&&this._index++,this._parent;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new i;var t=this._parent.getGeometryN(this._index++);return t instanceof Gt?(this._subcollectionIterator=new Qn(t),this._subcollectionIterator.next()):t},Qn.prototype.remove=function(){throw new Error(this.getClass().getName())},Qn.prototype.hasNext=function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},Qn.prototype.interfaces_=function(){return[xt]},Qn.prototype.getClass=function(){return Qn},Qn.isAtomic=function(t){return!(t instanceof Gt)};var Gn=function(){this._geom=null;var t=arguments[0];this._geom=t};Gn.prototype.locate=function(t){return Gn.locate(t,this._geom)},Gn.prototype.interfaces_=function(){return[zn]},Gn.prototype.getClass=function(){return Gn},Gn.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&at.isPointInRing(t,e.getCoordinates())},Gn.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!Gn.isPointInRing(t,n))return!1;for(var i=0;i<e.getNumInteriorRing();i++){var r=e.getInteriorRingN(i);if(Gn.isPointInRing(t,r))return!1}return!0},Gn.containsPoint=function(t,e){if(e instanceof $t)return Gn.containsPointInPolygon(t,e);if(e instanceof Gt)for(var n=new Qn(e);n.hasNext();){var i=n.next();if(i!==e&&Gn.containsPoint(t,i))return!0}return!1},Gn.locate=function(t,e){return e.isEmpty()?M.EXTERIOR:Gn.containsPoint(t,e)?M.INTERIOR:M.EXTERIOR};var Hn=function(){this._edgeMap=new h,this._edgeList=null,this._ptInAreaLocation=[M.NONE,M.NONE]};Hn.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),n=e-1;return 0===e&&(n=this._edgeList.size()-1),this._edgeList.get(n)},Hn.prototype.propagateSideLabels=function(t){for(var e=M.NONE,n=this.iterator();n.hasNext();){var i=n.next().getLabel();i.isArea(t)&&i.getLocation(t,Ce.LEFT)!==M.NONE&&(e=i.getLocation(t,Ce.LEFT))}if(e===M.NONE)return null;for(var r=e,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getLabel();if(a.getLocation(t,Ce.ON)===M.NONE&&a.setLocation(t,Ce.ON,r),a.isArea(t)){var l=a.getLocation(t,Ce.LEFT),c=a.getLocation(t,Ce.RIGHT);if(c!==M.NONE){if(c!==r)throw new Me("side location conflict",s.getCoordinate());l===M.NONE&&et.shouldNeverReachHere("found single null side (at "+s.getCoordinate()+")"),r=l}else et.isTrue(a.getLocation(t,Ce.LEFT)===M.NONE,"found single null side"),a.setLocation(t,Ce.RIGHT,r),a.setLocation(t,Ce.LEFT,r)}}},Hn.prototype.getCoordinate=function(){var t=this.iterator();return t.hasNext()?t.next().getCoordinate():null},Hn.prototype.print=function(t){V.out.println("EdgeEndStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();)e.next().print(t)},Hn.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},Hn.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var n=e.size()-1,i=e.get(n).getLabel().getLocation(t,Ce.LEFT);et.isTrue(i!==M.NONE,"Found unlabelled area edge");for(var r=i,o=this.iterator();o.hasNext();){var s=o.next().getLabel();et.isTrue(s.isArea(t),"Found non-area edge");var a=s.getLocation(t,Ce.LEFT),l=s.getLocation(t,Ce.RIGHT);if(a===l)return!1;if(l!==r)return!1;r=a}return!0},Hn.prototype.findIndex=function(t){this.iterator();for(var e=0;e<this._edgeList.size();e++)if(this._edgeList.get(e)===t)return e;return-1},Hn.prototype.iterator=function(){return this.getEdges().iterator()},Hn.prototype.getEdges=function(){return null===this._edgeList&&(this._edgeList=new wt(this._edgeMap.values())),this._edgeList},Hn.prototype.getLocation=function(t,e,n){return this._ptInAreaLocation[t]===M.NONE&&(this._ptInAreaLocation[t]=Gn.locate(e,n[t].getGeometry())),this._ptInAreaLocation[t]},Hn.prototype.toString=function(){var t=new F;t.append("EdgeEndStar: "+this.getCoordinate()),t.append("\n");for(var e=this.iterator();e.hasNext();){var n=e.next();t.append(n),t.append("\n")}return t.toString()},Hn.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();)e.next().computeLabel(t)},Hn.prototype.computeLabelling=function(t){this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var e=[!1,!1],n=this.iterator();n.hasNext();)for(var i=n.next().getLabel(),r=0;r<2;r++)i.isLine(r)&&i.getLocation(r)===M.BOUNDARY&&(e[r]=!0);for(var o=this.iterator();o.hasNext();)for(var s=o.next(),a=s.getLabel(),l=0;l<2;l++)if(a.isAnyNull(l)){var c=M.NONE;if(e[l])c=M.EXTERIOR;else{var u=s.getCoordinate();c=this.getLocation(l,u,t)}a.setAllLocationsIfNull(l,c)}},Hn.prototype.getDegree=function(){return this._edgeMap.size()},Hn.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},Hn.prototype.interfaces_=function(){return[]},Hn.prototype.getClass=function(){return Hn};var Vn=function(t){function e(){t.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linkResultDirectedEdges=function(){this.getResultAreaEdges();for(var t=null,e=null,n=this._SCANNING_FOR_INCOMING,i=0;i<this._resultAreaEdgeList.size();i++){var r=this._resultAreaEdgeList.get(i),o=r.getSym();if(r.getLabel().isArea())switch(null===t&&r.isInResult()&&(t=r),n){case this._SCANNING_FOR_INCOMING:if(!o.isInResult())continue;e=o,n=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(!r.isInResult())continue;e.setNext(r),n=this._SCANNING_FOR_INCOMING}}if(n===this._LINKING_TO_OUTGOING){if(null===t)throw new Me("no outgoing dirEdge found",this.getCoordinate());et.isTrue(t.isInResult(),"unable to link last incoming dirEdge"),e.setNext(t)}},e.prototype.insert=function(t){var e=t;this.insertEdgeEnd(e,e)},e.prototype.getRightmostEdge=function(){var t=this.getEdges(),e=t.size();if(e<1)return null;var n=t.get(0);if(1===e)return n;var i=t.get(e-1),r=n.getQuadrant(),o=i.getQuadrant();return ke.isNorthern(r)&&ke.isNorthern(o)?n:ke.isNorthern(r)||ke.isNorthern(o)?0!==n.getDy()?n:0!==i.getDy()?i:(et.shouldNeverReachHere("found two horizontal edges incident on node"),null):i},e.prototype.print=function(t){V.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var n=e.next();t.print("out "),n.print(t),t.println(),t.print("in "),n.getSym().print(t),t.println()}},e.prototype.getResultAreaEdges=function(){if(null!==this._resultAreaEdgeList)return this._resultAreaEdgeList;this._resultAreaEdgeList=new wt;for(var t=this.iterator();t.hasNext();){var e=t.next();(e.isInResult()||e.getSym().isInResult())&&this._resultAreaEdgeList.add(e)}return this._resultAreaEdgeList},e.prototype.updateLabelling=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next().getLabel();n.setAllLocationsIfNull(0,t.getLocation(0)),n.setAllLocationsIfNull(1,t.getLocation(1))}},e.prototype.linkAllDirectedEdges=function(){this.getEdges();for(var t=null,e=null,n=this._edgeList.size()-1;n>=0;n--){var i=this._edgeList.get(n),r=i.getSym();null===e&&(e=r),null!==t&&r.setNext(t),t=i}e.setNext(t)},e.prototype.computeDepths=function(){if(1===arguments.length){var t=arguments[0],e=this.findIndex(t),n=t.getDepth(Ce.LEFT),i=t.getDepth(Ce.RIGHT),r=this.computeDepths(e+1,this._edgeList.size(),n);if(this.computeDepths(0,e,r)!==i)throw new Me("depth mismatch at "+t.getCoordinate())}else if(3===arguments.length){for(var o=arguments[0],s=arguments[1],a=arguments[2],l=o;l<s;l++){var c=this._edgeList.get(l);c.setEdgeDepths(Ce.RIGHT,a),a=c.getDepth(Ce.LEFT)}return a}},e.prototype.mergeSymLabels=function(){for(var t=this.iterator();t.hasNext();){var e=t.next();e.getLabel().merge(e.getSym().getLabel())}},e.prototype.linkMinimalDirectedEdges=function(t){for(var e=null,n=null,i=this._SCANNING_FOR_INCOMING,r=this._resultAreaEdgeList.size()-1;r>=0;r--){var o=this._resultAreaEdgeList.get(r),s=o.getSym();switch(null===e&&o.getEdgeRing()===t&&(e=o),i){case this._SCANNING_FOR_INCOMING:if(s.getEdgeRing()!==t)continue;n=s,i=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(o.getEdgeRing()!==t)continue;n.setNextMin(o),i=this._SCANNING_FOR_INCOMING}}i===this._LINKING_TO_OUTGOING&&(et.isTrue(null!==e,"found null for first outgoing dirEdge"),et.isTrue(e.getEdgeRing()===t,"unable to link last incoming dirEdge"),n.setNextMin(e))},e.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var t=0,e=this.iterator();e.hasNext();)e.next().isInResult()&&t++;return t}if(1===arguments.length){for(var n=arguments[0],i=0,r=this.iterator();r.hasNext();)r.next().getEdgeRing()===n&&i++;return i}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var t=M.NONE,e=this.iterator();e.hasNext();){var n=e.next(),i=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=M.INTERIOR;break}if(i.isInResult()){t=M.EXTERIOR;break}}}if(t===M.NONE)return null;for(var r=t,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getSym();s.isLineEdge()?s.getEdge().setCovered(r===M.INTERIOR):(s.isInResult()&&(r=M.EXTERIOR),a.isInResult()&&(r=M.INTERIOR))}},e.prototype.computeLabelling=function(e){t.prototype.computeLabelling.call(this,e),this._label=new Pe(M.NONE);for(var n=this.iterator();n.hasNext();)for(var i=n.next().getEdge().getLabel(),r=0;r<2;r++){var o=i.getLocation(r);o!==M.INTERIOR&&o!==M.BOUNDARY||this._label.setLocation(r,M.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Hn),jn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(t){return new Ue(t,new Vn)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(He),Zn=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};Zn.prototype.compareTo=function(t){var e=t;return Zn.compareOriented(this._pts,this._orientation,e._pts,e._orientation)},Zn.prototype.interfaces_=function(){return[x]},Zn.prototype.getClass=function(){return Zn},Zn.orientation=function(t){return 1===Bt.increasingDirection(t)},Zn.compareOriented=function(t,e,n,i){for(var r=e?1:-1,o=i?1:-1,s=e?t.length:-1,a=i?n.length:-1,l=e?0:t.length-1,c=i?0:n.length-1;;){var u=t[l].compareTo(n[c]);if(0!==u)return u;var h=(l+=r)===s,d=(c+=o)===a;if(h&&!d)return-1;if(!h&&d)return 1;if(h&&d)return 0}};var Wn=function(){this._edges=new wt,this._ocaMap=new h};Wn.prototype.print=function(t){t.print("MULTILINESTRING ( ");for(var e=0;e<this._edges.size();e++){var n=this._edges.get(e);e>0&&t.print(","),t.print("(");for(var i=n.getCoordinates(),r=0;r<i.length;r++)r>0&&t.print(","),t.print(i[r].x+" "+i[r].y);t.println(")")}t.print(") ")},Wn.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},Wn.prototype.findEdgeIndex=function(t){for(var e=0;e<this._edges.size();e++)if(this._edges.get(e).equals(t))return e;return-1},Wn.prototype.iterator=function(){return this._edges.iterator()},Wn.prototype.getEdges=function(){return this._edges},Wn.prototype.get=function(t){return this._edges.get(t)},Wn.prototype.findEqualEdge=function(t){var e=new Zn(t.getCoordinates());return this._ocaMap.get(e)},Wn.prototype.add=function(t){this._edges.add(t);var e=new Zn(t.getCoordinates());this._ocaMap.put(e,t)},Wn.prototype.interfaces_=function(){return[]},Wn.prototype.getClass=function(){return Wn};var Xn=function(){};Xn.prototype.processIntersections=function(t,e,n,i){},Xn.prototype.isDone=function(){},Xn.prototype.interfaces_=function(){return[]},Xn.prototype.getClass=function(){return Xn};var Kn=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};Kn.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&1===this._li.getIntersectionNum()){if(Kn.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var r=t.size()-1;if(0===e&&i===r||0===i&&e===r)return!0}}return!1},Kn.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Kn.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Kn.prototype.getLineIntersector=function(){return this._li},Kn.prototype.hasProperIntersection=function(){return this._hasProper},Kn.prototype.processIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},Kn.prototype.hasIntersection=function(){return this._hasIntersection},Kn.prototype.isDone=function(){return!1},Kn.prototype.hasInteriorIntersection=function(){return this._hasInterior},Kn.prototype.interfaces_=function(){return[Xn]},Kn.prototype.getClass=function(){return Kn},Kn.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var qn=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.coord=new E(t),this.segmentIndex=e,this.dist=n};qn.prototype.getSegmentIndex=function(){return this.segmentIndex},qn.prototype.getCoordinate=function(){return this.coord},qn.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},qn.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},qn.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&0===this.dist||this.segmentIndex===t},qn.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},qn.prototype.getDistance=function(){return this.dist},qn.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},qn.prototype.interfaces_=function(){return[x]},qn.prototype.getClass=function(){return qn};var Jn=function(){this._nodeMap=new h,this.edge=null;var t=arguments[0];this.edge=t};Jn.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},Jn.prototype.iterator=function(){return this._nodeMap.values().iterator()},Jn.prototype.addSplitEdges=function(t){this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next(),r=this.createSplitEdge(n,i);t.add(r),n=i}},Jn.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},Jn.prototype.createSplitEdge=function(t,e){var n=e.segmentIndex-t.segmentIndex+2,i=this.edge.pts[e.segmentIndex],r=e.dist>0||!e.coord.equals2D(i);r||n--;var o=new Array(n).fill(null),s=0;o[s++]=new E(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this.edge.pts[a];return r&&(o[s]=e.coord),new ni(o,new Pe(this.edge._label))},Jn.prototype.add=function(t,e,n){var i=new qn(t,e,n),r=this._nodeMap.get(i);return null!==r?r:(this._nodeMap.put(i,i),i)},Jn.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();)if(e.next().coord.equals(t))return!0;return!1},Jn.prototype.interfaces_=function(){return[]},Jn.prototype.getClass=function(){return Jn};var Yn=function(){};Yn.prototype.getChainStartIndices=function(t){var e=0,n=new wt;n.add(new R(e));do{var i=this.findChainEnd(t,e);n.add(new R(i)),e=i}while(e<t.length-1);return Yn.toIntArray(n)},Yn.prototype.findChainEnd=function(t,e){for(var n=ke.quadrant(t[e],t[e+1]),i=e+1;i<t.length;){if(ke.quadrant(t[i-1],t[i])!==n)break;i++}return i-1},Yn.prototype.interfaces_=function(){return[]},Yn.prototype.getClass=function(){return Yn},Yn.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var $n=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new Z,this.env2=new Z;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new Yn;this.startIndex=e.getChainStartIndices(this.pts)};$n.prototype.getCoordinates=function(){return this.pts},$n.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e>n?e:n},$n.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e<n?e:n},$n.prototype.computeIntersectsForChain=function(){if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[n],e.startIndex[n+1],i)}else if(6===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3],l=arguments[4],c=arguments[5],u=this.pts[r],h=this.pts[o],d=s.pts[a],A=s.pts[l];if(o-r==1&&l-a==1)return c.addIntersections(this.e,r,s.e,a),null;if(this.env1.init(u,h),this.env2.init(d,A),!this.env1.intersects(this.env2))return null;var p=Math.trunc((r+o)/2),f=Math.trunc((a+l)/2);r<p&&(a<f&&this.computeIntersectsForChain(r,p,s,a,f,c),f<l&&this.computeIntersectsForChain(r,p,s,f,l,c)),p<o&&(a<f&&this.computeIntersectsForChain(p,o,s,a,f,c),f<l&&this.computeIntersectsForChain(p,o,s,f,l,c))}},$n.prototype.getStartIndexes=function(){return this.startIndex},$n.prototype.computeIntersects=function(t,e){for(var n=0;n<this.startIndex.length-1;n++)for(var i=0;i<t.startIndex.length-1;i++)this.computeIntersectsForChain(n,t,i,e)},$n.prototype.interfaces_=function(){return[]},$n.prototype.getClass=function(){return $n};var ti=function t(){this._depth=Array(2).fill().map((function(){return Array(3)}));for(var e=0;e<2;e++)for(var n=0;n<3;n++)this._depth[e][n]=t.NULL_VALUE},ei={NULL_VALUE:{configurable:!0}};ti.prototype.getDepth=function(t,e){return this._depth[t][e]},ti.prototype.setDepth=function(t,e,n){this._depth[t][e]=n},ti.prototype.isNull=function(){if(0===arguments.length){for(var t=0;t<2;t++)for(var e=0;e<3;e++)if(this._depth[t][e]!==ti.NULL_VALUE)return!1;return!0}if(1===arguments.length){var n=arguments[0];return this._depth[n][1]===ti.NULL_VALUE}if(2===arguments.length){var i=arguments[0],r=arguments[1];return this._depth[i][r]===ti.NULL_VALUE}},ti.prototype.normalize=function(){for(var t=0;t<2;t++)if(!this.isNull(t)){var e=this._depth[t][1];this._depth[t][2]<e&&(e=this._depth[t][2]),e<0&&(e=0);for(var n=1;n<3;n++){var i=0;this._depth[t][n]>e&&(i=1),this._depth[t][n]=i}}},ti.prototype.getDelta=function(t){return this._depth[t][Ce.RIGHT]-this._depth[t][Ce.LEFT]},ti.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?M.EXTERIOR:M.INTERIOR},ti.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},ti.prototype.add=function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<2;e++)for(var n=1;n<3;n++){var i=t.getLocation(e,n);i!==M.EXTERIOR&&i!==M.INTERIOR||(this.isNull(e,n)?this._depth[e][n]=ti.depthAtLocation(i):this._depth[e][n]+=ti.depthAtLocation(i))}else if(3===arguments.length){var r=arguments[0],o=arguments[1];arguments[2]===M.INTERIOR&&this._depth[r][o]++}},ti.prototype.interfaces_=function(){return[]},ti.prototype.getClass=function(){return ti},ti.depthAtLocation=function(t){return t===M.EXTERIOR?0:t===M.INTERIOR?1:ti.NULL_VALUE},ei.NULL_VALUE.get=function(){return-1},Object.defineProperties(ti,ei);var ni=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new Jn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new ti,this._depthDelta=0,1===arguments.length){var n=arguments[0];e.call(this,n,null)}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.pts=i,this._label=r}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var t=new Array(2).fill(null);return t[0]=this.pts[0],t[1]=this.pts[1],new e(t,Pe.toLineLabel(this._label))},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(t){this._isIsolated=t},e.prototype.setName=function(t){this._name=t},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;if(this.pts.length!==n.pts.length)return!1;for(var i=!0,r=!0,o=this.pts.length,s=0;s<this.pts.length;s++)if(this.pts[s].equals2D(n.pts[s])||(i=!1),this.pts[s].equals2D(n.pts[--o])||(r=!1),!i&&!r)return!1;return!0},e.prototype.getCoordinate=function(){if(0===arguments.length)return this.pts.length>0?this.pts[0]:null;if(1===arguments.length){var t=arguments[0];return this.pts[t]}},e.prototype.print=function(t){t.print("edge "+this._name+": "),t.print("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.print(","),t.print(this.pts[e].x+" "+this.pts[e].y);t.print(") "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(t){e.updateIM(this._label,t)},e.prototype.isCollapsed=function(){return!!this._label.isArea()&&3===this.pts.length&&!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(t){t.print("edge "+this._name+": ");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+" ");t.println("")},e.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new $n(this)),this._mce},e.prototype.getEnvelope=function(){if(null===this._env){this._env=new Z;for(var t=0;t<this.pts.length;t++)this._env.expandToInclude(this.pts[t])}return this._env},e.prototype.addIntersection=function(t,e,n,i){var r=new E(t.getIntersection(i)),o=e,s=t.getEdgeDistance(n,i),a=o+1;if(a<this.pts.length){var l=this.pts[a];r.equals2D(l)&&(o=a,s=0)}this.eiList.add(r,o,s)},e.prototype.toString=function(){var t=new F;t.append("edge "+this._name+": "),t.append("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.append(","),t.append(this.pts[e].x+" "+this.pts[e].y);return t.append(") "+this._label+" "+this._depthDelta),t.toString()},e.prototype.isPointwiseEqual=function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;e<this.pts.length;e++)if(!this.pts[e].equals2D(t.pts[e]))return!1;return!0},e.prototype.setDepthDelta=function(t){this._depthDelta=t},e.prototype.getEdgeIntersectionList=function(){return this.eiList},e.prototype.addIntersections=function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++)this.addIntersection(t,e,n,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.updateIM=function(){if(2!==arguments.length)return t.prototype.updateIM.apply(this,arguments);var e=arguments[0],n=arguments[1];n.setAtLeastIfValid(e.getLocation(0,Ce.ON),e.getLocation(1,Ce.ON),1),e.isArea()&&(n.setAtLeastIfValid(e.getLocation(0,Ce.LEFT),e.getLocation(1,Ce.LEFT),2),n.setAtLeastIfValid(e.getLocation(0,Ce.RIGHT),e.getLocation(1,Ce.RIGHT),2))},e}(Oe),ii=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Wn,this._bufParams=t||null};ii.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},ii.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Pe(t.getLabel())).flip(),n.merge(i);var r=ii.depthDelta(i),o=e.getDepthDelta()+r;e.setDepthDelta(o)}else this._edgeList.add(t),t.setDepthDelta(ii.depthDelta(t.getLabel()))},ii.prototype.buildSubgraphs=function(t,e){for(var n=new wt,i=t.iterator();i.hasNext();){var r=i.next(),o=r.getRightmostCoordinate(),s=new Dn(n).getDepth(o);r.computeDepth(s),r.findResultEdges(),n.add(r),e.add(r.getDirectedEdges(),r.getNodes())}},ii.prototype.createSubgraphs=function(t){for(var e=new wt,n=t.getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isVisited()){var r=new Ie;r.create(i),e.add(r)}}return $e.sort(e,$e.reverseOrder()),e},ii.prototype.createEmptyResultGeometry=function(){return this._geomFact.createPolygon()},ii.prototype.getNoder=function(t){if(null!==this._workingNoder)return this._workingNoder;var e=new bn,n=new rt;return n.setPrecisionModel(t),e.setSegmentIntersector(new Kn(n)),e},ii.prototype.buffer=function(t,e){var n=this._workingPrecisionModel;null===n&&(n=t.getPrecisionModel()),this._geomFact=t.getFactory();var i=new Rn(n,this._bufParams),r=new kn(t,e,i).getCurves();if(r.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(r,n),this._graph=new Ve(new jn),this._graph.addEdges(this._edgeList.getEdges());var o=this.createSubgraphs(this._graph),s=new je(this._geomFact);this.buildSubgraphs(o,s);var a=s.getPolygons();return a.size()<=0?this.createEmptyResultGeometry():this._geomFact.buildGeometry(a)},ii.prototype.computeNodedEdges=function(t,e){var n=this.getNoder(e);n.computeNodes(t);for(var i=n.getNodedSubstrings().iterator();i.hasNext();){var r=i.next(),o=r.getCoordinates();if(2!==o.length||!o[0].equals2D(o[1])){var s=r.getData(),a=new ni(r.getCoordinates(),new Pe(s));this.insertUniqueEdge(a)}}},ii.prototype.setNoder=function(t){this._workingNoder=t},ii.prototype.interfaces_=function(){return[]},ii.prototype.getClass=function(){return ii},ii.depthDelta=function(t){var e=t.getLocation(0,Ce.LEFT),n=t.getLocation(0,Ce.RIGHT);return e===M.INTERIOR&&n===M.EXTERIOR?1:e===M.EXTERIOR&&n===M.INTERIOR?-1:0},ii.convertSegStrings=function(t){for(var e=new me,n=new wt;t.hasNext();){var i=t.next(),r=e.createLineString(i.getCoordinates());n.add(r)}return e.buildGeometry(n)};var ri=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,2===arguments.length){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(4===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],o=arguments[3];this._noder=n,this._scaleFactor=i,this._offsetX=r,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};ri.prototype.rescale=function(){if(I(arguments[0],vt))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.rescale(e.getCoordinates())}else if(arguments[0]instanceof Array){for(var n=arguments[0],i=0;i<n.length;i++)n[i].x=n[i].x/this._scaleFactor+this._offsetX,n[i].y=n[i].y/this._scaleFactor+this._offsetY;2===n.length&&n[0].equals2D(n[1])&&V.out.println(n)}},ri.prototype.scale=function(){if(I(arguments[0],vt)){for(var t=arguments[0],e=new wt,n=t.iterator();n.hasNext();){var i=n.next();e.add(new pn(this.scale(i.getCoordinates()),i.getData()))}return e}if(arguments[0]instanceof Array){for(var r=arguments[0],o=new Array(r.length).fill(null),s=0;s<r.length;s++)o[s]=new E(Math.round((r[s].x-this._offsetX)*this._scaleFactor),Math.round((r[s].y-this._offsetY)*this._scaleFactor),r[s].z);return Bt.removeRepeatedPoints(o)}},ri.prototype.isIntegerPrecision=function(){return 1===this._scaleFactor},ri.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},ri.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},ri.prototype.interfaces_=function(){return[vn]},ri.prototype.getClass=function(){return ri};var oi=function(){this._li=new rt,this._segStrings=null;var t=arguments[0];this._segStrings=t},si={fact:{configurable:!0}};oi.prototype.checkEndPtVertexIntersections=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next().getCoordinates();this.checkEndPtVertexIntersections(e[0],this._segStrings),this.checkEndPtVertexIntersections(e[e.length-1],this._segStrings)}else if(2===arguments.length)for(var n=arguments[0],i=arguments[1].iterator();i.hasNext();)for(var r=i.next().getCoordinates(),o=1;o<r.length-1;o++)if(r[o].equals(n))throw new $("found endpt/interior pt intersection at index "+o+" :pt "+n)},oi.prototype.checkInteriorIntersections=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();)for(var e=t.next(),n=this._segStrings.iterator();n.hasNext();){var i=n.next();this.checkInteriorIntersections(e,i)}else if(2===arguments.length)for(var r=arguments[0],o=arguments[1],s=r.getCoordinates(),a=o.getCoordinates(),l=0;l<s.length-1;l++)for(var c=0;c<a.length-1;c++)this.checkInteriorIntersections(r,l,o,c);else if(4===arguments.length){var u=arguments[0],h=arguments[1],d=arguments[2],A=arguments[3];if(u===d&&h===A)return null;var p=u.getCoordinates()[h],f=u.getCoordinates()[h+1],g=d.getCoordinates()[A],m=d.getCoordinates()[A+1];if(this._li.computeIntersection(p,f,g,m),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,p,f)||this.hasInteriorIntersection(this._li,g,m)))throw new $("found non-noded intersection at "+p+"-"+f+" and "+g+"-"+m)}},oi.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},oi.prototype.checkCollapses=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next();this.checkCollapses(e)}else if(1===arguments.length)for(var n=arguments[0].getCoordinates(),i=0;i<n.length-2;i++)this.checkCollapse(n[i],n[i+1],n[i+2])},oi.prototype.hasInteriorIntersection=function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++){var r=t.getIntersection(i);if(!r.equals(e)&&!r.equals(n))return!0}return!1},oi.prototype.checkCollapse=function(t,e,n){if(t.equals(n))throw new $("found non-noded collapse at "+oi.fact.createLineString([t,e,n]))},oi.prototype.interfaces_=function(){return[]},oi.prototype.getClass=function(){return oi},si.fact.get=function(){return new me},Object.defineProperties(oi,si);var ai=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=n,e<=0)throw new _("Scale factor must be non-zero");1!==e&&(this._pt=new E(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new E,this._p1Scaled=new E),this.initCorners(this._pt)},li={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};ai.prototype.intersectsScaled=function(t,e){var n=Math.min(t.x,e.x),i=Math.max(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.y,e.y),s=this._maxx<n||this._minx>i||this._maxy<r||this._miny>o;if(s)return!1;var a=this.intersectsToleranceSquare(t,e);return et.isTrue(!(s&&a),"Found bad envelope test"),a},ai.prototype.initCorners=function(t){this._minx=t.x-.5,this._maxx=t.x+.5,this._miny=t.y-.5,this._maxy=t.y+.5,this._corner[0]=new E(this._maxx,this._maxy),this._corner[1]=new E(this._minx,this._maxy),this._corner[2]=new E(this._minx,this._miny),this._corner[3]=new E(this._maxx,this._miny)},ai.prototype.intersects=function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},ai.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},ai.prototype.getCoordinate=function(){return this._originalPt},ai.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},ai.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var t=ai.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Z(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},ai.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},ai.prototype.intersectsToleranceSquare=function(t,e){var n=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!n||!i)||!!t.equals(this._pt)||!!e.equals(this._pt))))},ai.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),i=t.getCoordinate(e+1);return!!this.intersects(n,i)&&(t.addIntersection(this.getCoordinate(),e),!0)},ai.prototype.interfaces_=function(){return[]},ai.prototype.getClass=function(){return ai},li.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(ai,li);var ci=function(){this.tempEnv1=new Z,this.selectedSegment=new fn};ci.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}},ci.prototype.interfaces_=function(){return[]},ci.prototype.getClass=function(){return ci};var ui=function(){this._index=null;var t=arguments[0];this._index=t},hi={HotPixelSnapAction:{configurable:!0}};ui.prototype.snap=function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2],r=e.getSafeEnvelope(),o=new di(e,n,i);return this._index.query(r,{interfaces_:function(){return[Ke]},visitItem:function(t){t.select(r,o)}}),o.isNodeAdded()}},ui.prototype.interfaces_=function(){return[]},ui.prototype.getClass=function(){return ui},hi.HotPixelSnapAction.get=function(){return di},Object.defineProperties(ui,hi);var di=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(2!==arguments.length)return t.prototype.select.apply(this,arguments);var e=arguments[0],n=arguments[1],i=e.getContext();if(null!==this._parentEdge&&i===this._parentEdge&&n===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(i,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(ci),Ai=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new wt};Ai.prototype.processIntersections=function(t,e,n,i){if(t===n&&e===i)return null;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];if(this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var l=0;l<this._li.getIntersectionNum();l++)this._interiorIntersections.add(this._li.getIntersection(l));t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)}},Ai.prototype.isDone=function(){return!1},Ai.prototype.getInteriorIntersections=function(){return this._interiorIntersections},Ai.prototype.interfaces_=function(){return[Xn]},Ai.prototype.getClass=function(){return Ai};var pi=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new rt,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};pi.prototype.checkCorrectness=function(t){var e=pn.getNodedSubstrings(t),n=new oi(e);try{n.checkValid()}catch(t){if(!(t instanceof G))throw t;t.printStackTrace()}},pi.prototype.getNodedSubstrings=function(){return pn.getNodedSubstrings(this._nodedSegStrings)},pi.prototype.snapRound=function(t,e){var n=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(n),this.computeVertexSnaps(t)},pi.prototype.findInteriorIntersections=function(t,e){var n=new Ai(e);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(t),n.getInteriorIntersections()},pi.prototype.computeVertexSnaps=function(){if(I(arguments[0],vt))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.computeVertexSnaps(e)}else if(arguments[0]instanceof pn)for(var n=arguments[0],i=n.getCoordinates(),r=0;r<i.length;r++){var o=new ai(i[r],this._scaleFactor,this._li);this._pointSnapper.snap(o,n,r)&&n.addIntersection(i[r],r)}},pi.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new bn,this._pointSnapper=new ui(this._noder.getIndex()),this.snapRound(t,this._li)},pi.prototype.computeIntersectionSnaps=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),i=new ai(n,this._scaleFactor,this._li);this._pointSnapper.snap(i)}},pi.prototype.interfaces_=function(){return[vn]},pi.prototype.getClass=function(){return pi};var fi=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new En,this._resultGeometry=null,this._saveException=null,1===arguments.length){var t=arguments[0];this._argGeom=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._argGeom=e,this._bufParams=n}},gi={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};fi.prototype.bufferFixedPrecision=function(t){var e=new ri(new pi(new Ae(1)),t.getScale()),n=new ii(this._bufParams);n.setWorkingPrecisionModel(t),n.setNoder(e),this._resultGeometry=n.buffer(this._argGeom,this._distance)},fi.prototype.bufferReducedPrecision=function(){var t=this;if(0===arguments.length){for(var e=fi.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(e){if(!(e instanceof Me))throw e;t._saveException=e}if(null!==t._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],i=fi.precisionScaleFactor(this._argGeom,this._distance,n),r=new Ae(i);this.bufferFixedPrecision(r)}},fi.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===Ae.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},fi.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},fi.prototype.bufferOriginalPrecision=function(){try{var t=new ii(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof $))throw t;this._saveException=t}},fi.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},fi.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},fi.prototype.interfaces_=function(){return[]},fi.prototype.getClass=function(){return fi},fi.bufferOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new fi(t).getResultGeometry(e)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof ut&&"number"==typeof arguments[1]){var n=arguments[0],i=arguments[1],r=arguments[2],o=new fi(n);return o.setQuadrantSegments(r),o.getResultGeometry(i)}if(arguments[2]instanceof En&&arguments[0]instanceof ut&&"number"==typeof arguments[1]){var s=arguments[0],a=arguments[1],l=arguments[2];return new fi(s,l).getResultGeometry(a)}}else if(4===arguments.length){var c=arguments[0],u=arguments[1],h=arguments[2],d=arguments[3],A=new fi(c);return A.setQuadrantSegments(h),A.setEndCapStyle(d),A.getResultGeometry(u)}},fi.precisionScaleFactor=function(t,e,n){var i=t.getEnvelopeInternal(),r=L.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY()))+2*(e>0?e:0),o=n-Math.trunc(Math.log(r)/Math.log(10)+1);return Math.pow(10,o)},gi.CAP_ROUND.get=function(){return En.CAP_ROUND},gi.CAP_BUTT.get=function(){return En.CAP_FLAT},gi.CAP_FLAT.get=function(){return En.CAP_FLAT},gi.CAP_SQUARE.get=function(){return En.CAP_SQUARE},gi.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(fi,gi);var mi=function(){this._pt=[new E,new E],this._distance=y.NaN,this._isNull=!0};mi.prototype.getCoordinates=function(){return this._pt},mi.prototype.getCoordinate=function(t){return this._pt[t]},mi.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},mi.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=r,this._isNull=!1}},mi.prototype.getDistance=function(){return this._distance},mi.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},mi.prototype.interfaces_=function(){return[]},mi.prototype.getClass=function(){return mi};var _i=function(){};_i.prototype.interfaces_=function(){return[]},_i.prototype.getClass=function(){return _i},_i.computeDistance=function(){if(arguments[2]instanceof mi&&arguments[0]instanceof Kt&&arguments[1]instanceof E)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=t.getCoordinates(),r=new fn,o=0;o<i.length-1;o++){r.setCoordinates(i[o],i[o+1]);var s=r.closestPoint(e);n.setMinimum(s,e)}else if(arguments[2]instanceof mi&&arguments[0]instanceof $t&&arguments[1]instanceof E){var a=arguments[0],l=arguments[1],c=arguments[2];_i.computeDistance(a.getExteriorRing(),l,c);for(var u=0;u<a.getNumInteriorRing();u++)_i.computeDistance(a.getInteriorRingN(u),l,c)}else if(arguments[2]instanceof mi&&arguments[0]instanceof ut&&arguments[1]instanceof E){var h=arguments[0],d=arguments[1],A=arguments[2];if(h instanceof Kt)_i.computeDistance(h,d,A);else if(h instanceof $t)_i.computeDistance(h,d,A);else if(h instanceof Gt)for(var p=h,f=0;f<p.getNumGeometries();f++){var g=p.getGeometryN(f);_i.computeDistance(g,d,A)}else A.setMinimum(h.getCoordinate(),d)}else if(arguments[2]instanceof mi&&arguments[0]instanceof fn&&arguments[1]instanceof E){var m=arguments[0],_=arguments[1],y=arguments[2],v=m.closestPoint(_);y.setMinimum(v,_)}};var yi=function(t){this._maxPtDist=new mi,this._inputGeom=t||null},vi={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};yi.prototype.computeMaxMidpointDistance=function(t){var e=new bi(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},yi.prototype.computeMaxVertexDistance=function(t){var e=new xi(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},yi.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},yi.prototype.getDistancePoints=function(){return this._maxPtDist},yi.prototype.interfaces_=function(){return[]},yi.prototype.getClass=function(){return yi},vi.MaxPointDistanceFilter.get=function(){return xi},vi.MaxMidpointDistanceFilter.get=function(){return bi},Object.defineProperties(yi,vi);var xi=function(t){this._maxPtDist=new mi,this._minPtDist=new mi,this._geom=t||null};xi.prototype.filter=function(t){this._minPtDist.initialize(),_i.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},xi.prototype.getMaxPointDistance=function(){return this._maxPtDist},xi.prototype.interfaces_=function(){return[At]},xi.prototype.getClass=function(){return xi};var bi=function(t){this._maxPtDist=new mi,this._minPtDist=new mi,this._geom=t||null};bi.prototype.filter=function(t,e){if(0===e)return null;var n=t.getCoordinate(e-1),i=t.getCoordinate(e),r=new E((n.x+i.x)/2,(n.y+i.y)/2);this._minPtDist.initialize(),_i.computeDistance(this._geom,r,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},bi.prototype.isDone=function(){return!1},bi.prototype.isGeometryChanged=function(){return!1},bi.prototype.getMaxPointDistance=function(){return this._maxPtDist},bi.prototype.interfaces_=function(){return[Qt]},bi.prototype.getClass=function(){return bi};var wi=function(t){this._comps=t||null};wi.prototype.filter=function(t){t instanceof $t&&this._comps.add(t)},wi.prototype.interfaces_=function(){return[zt]},wi.prototype.getClass=function(){return wi},wi.getPolygons=function(){if(1===arguments.length){var t=arguments[0];return wi.getPolygons(t,new wt)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof $t?n.add(e):e instanceof Gt&&e.apply(new wi(n)),n}};var Ei=function(){if(this._lines=null,this._isForcedToLineString=!1,1===arguments.length){var t=arguments[0];this._lines=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._lines=e,this._isForcedToLineString=n}};Ei.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof ee){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof Kt&&this._lines.add(t)},Ei.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},Ei.prototype.interfaces_=function(){return[ct]},Ei.prototype.getClass=function(){return Ei},Ei.getGeometry=function(){if(1===arguments.length){var t=arguments[0];return t.getFactory().buildGeometry(Ei.getLines(t))}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().buildGeometry(Ei.getLines(e,n))}},Ei.getLines=function(){if(1===arguments.length){var t=arguments[0];return Ei.getLines(t,!1)}if(2===arguments.length){if(I(arguments[0],vt)&&I(arguments[1],vt)){for(var e=arguments[0],n=arguments[1],i=e.iterator();i.hasNext();){var r=i.next();Ei.getLines(r,n)}return n}if(arguments[0]instanceof ut&&"boolean"==typeof arguments[1]){var o=arguments[0],s=arguments[1],a=new wt;return o.apply(new Ei(a,s)),a}if(arguments[0]instanceof ut&&I(arguments[1],vt)){var l=arguments[0],c=arguments[1];return l instanceof Kt?c.add(l):l.apply(new Ei(c)),c}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&I(arguments[0],vt)&&I(arguments[1],vt)){for(var u=arguments[0],h=arguments[1],d=arguments[2],A=u.iterator();A.hasNext();){var p=A.next();Ei.getLines(p,h,d)}return h}if("boolean"==typeof arguments[2]&&arguments[0]instanceof ut&&I(arguments[1],vt)){var f=arguments[0],g=arguments[1],m=arguments[2];return f.apply(new Ei(g,m)),g}}};var Ci=function(){if(this._boundaryRule=pt.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];if(null===t)throw new _("Rule must be non-null");this._boundaryRule=t}};Ci.prototype.locateInternal=function(){if(arguments[0]instanceof E&&arguments[1]instanceof $t){var t=arguments[0],e=arguments[1];if(e.isEmpty())return M.EXTERIOR;var n=e.getExteriorRing(),i=this.locateInPolygonRing(t,n);if(i===M.EXTERIOR)return M.EXTERIOR;if(i===M.BOUNDARY)return M.BOUNDARY;for(var r=0;r<e.getNumInteriorRing();r++){var o=e.getInteriorRingN(r),s=this.locateInPolygonRing(t,o);if(s===M.INTERIOR)return M.EXTERIOR;if(s===M.BOUNDARY)return M.BOUNDARY}return M.INTERIOR}if(arguments[0]instanceof E&&arguments[1]instanceof Kt){var a=arguments[0],l=arguments[1];if(!l.getEnvelopeInternal().intersects(a))return M.EXTERIOR;var c=l.getCoordinates();return l.isClosed()||!a.equals(c[0])&&!a.equals(c[c.length-1])?at.isOnLine(a,c)?M.INTERIOR:M.EXTERIOR:M.BOUNDARY}if(arguments[0]instanceof E&&arguments[1]instanceof Jt){var u=arguments[0];return arguments[1].getCoordinate().equals2D(u)?M.INTERIOR:M.EXTERIOR}},Ci.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?at.locatePointInRing(t,e.getCoordinates()):M.EXTERIOR},Ci.prototype.intersects=function(t,e){return this.locate(t,e)!==M.EXTERIOR},Ci.prototype.updateLocationInfo=function(t){t===M.INTERIOR&&(this._isIn=!0),t===M.BOUNDARY&&this._numBoundaries++},Ci.prototype.computeLocation=function(t,e){if(e instanceof Jt&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof Kt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof $t)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Ht)for(var n=e,i=0;i<n.getNumGeometries();i++){var r=n.getGeometryN(i);this.updateLocationInfo(this.locateInternal(t,r))}else if(e instanceof ne)for(var o=e,s=0;s<o.getNumGeometries();s++){var a=o.getGeometryN(s);this.updateLocationInfo(this.locateInternal(t,a))}else if(e instanceof Gt)for(var l=new Qn(e);l.hasNext();){var c=l.next();c!==e&&this.computeLocation(t,c)}},Ci.prototype.locate=function(t,e){return e.isEmpty()?M.EXTERIOR:e instanceof Kt||e instanceof $t?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?M.BOUNDARY:this._numBoundaries>0||this._isIn?M.INTERIOR:M.EXTERIOR)},Ci.prototype.interfaces_=function(){return[]},Ci.prototype.getClass=function(){return Ci};var Bi=function t(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length){var e=arguments[0],n=arguments[1];t.call(this,e,t.INSIDE_AREA,n)}else if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];this._component=i,this._segIndex=r,this._pt=o}},Si={INSIDE_AREA:{configurable:!0}};Bi.prototype.isInsideArea=function(){return this._segIndex===Bi.INSIDE_AREA},Bi.prototype.getCoordinate=function(){return this._pt},Bi.prototype.getGeometryComponent=function(){return this._component},Bi.prototype.getSegmentIndex=function(){return this._segIndex},Bi.prototype.interfaces_=function(){return[]},Bi.prototype.getClass=function(){return Bi},Si.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Bi,Si);var Mi=function(t){this._pts=t||null};Mi.prototype.filter=function(t){t instanceof Jt&&this._pts.add(t)},Mi.prototype.interfaces_=function(){return[zt]},Mi.prototype.getClass=function(){return Mi},Mi.getPoints=function(){if(1===arguments.length){var t=arguments[0];return t instanceof Jt?$e.singletonList(t):Mi.getPoints(t,new wt)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Jt?n.add(e):e instanceof Gt&&e.apply(new Mi(n)),n}};var Ti=function(){this._locations=null;var t=arguments[0];this._locations=t};Ti.prototype.filter=function(t){(t instanceof Jt||t instanceof Kt||t instanceof $t)&&this._locations.add(new Bi(t,0,t.getCoordinate()))},Ti.prototype.interfaces_=function(){return[zt]},Ti.prototype.getClass=function(){return Ti},Ti.getLocations=function(t){var e=new wt;return t.apply(new Ti(e)),e};var Ii=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Ci,this._minDistanceLocation=null,this._minDistance=y.MAX_VALUE,2===arguments.length){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=i,this._terminateDistance=r}};Ii.prototype.computeContainmentDistance=function(){if(0===arguments.length){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=1-e,r=wi.getPolygons(this._geom[e]);if(r.size()>0){var o=Ti.getLocations(this._geom[i]);if(this.computeContainmentDistance(o,r,n),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[i]=n[0],this._minDistanceLocation[e]=n[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&I(arguments[0],bt)&&I(arguments[1],bt)){for(var s=arguments[0],a=arguments[1],l=arguments[2],c=0;c<s.size();c++)for(var u=s.get(c),h=0;h<a.size();h++)if(this.computeContainmentDistance(u,a.get(h),l),this._minDistance<=this._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Bi&&arguments[1]instanceof $t){var d=arguments[0],A=arguments[1],p=arguments[2],f=d.getCoordinate();if(M.EXTERIOR!==this._ptLocator.locate(f,A))return this._minDistance=0,p[0]=d,p[1]=new Bi(A,f),null}},Ii.prototype.computeMinDistanceLinesPoints=function(t,e,n){for(var i=0;i<t.size();i++)for(var r=t.get(i),o=0;o<e.size();o++){var s=e.get(o);if(this.computeMinDistance(r,s,n),this._minDistance<=this._terminateDistance)return null}},Ii.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=Ei.getLines(this._geom[0]),n=Ei.getLines(this._geom[1]),i=Mi.getPoints(this._geom[0]),r=Mi.getPoints(this._geom[1]);return this.computeMinDistanceLines(e,n,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,r,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(n,i,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistancePoints(i,r,t),void this.updateMinDistance(t,!1))))},Ii.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},Ii.prototype.updateMinDistance=function(t,e){if(null===t[0])return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},Ii.prototype.nearestPoints=function(){return this.computeMinDistance(),[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()]},Ii.prototype.computeMinDistance=function(){if(0===arguments.length){if(null!==this._minDistanceLocation)return null;if(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance)return null;this.computeFacetDistance()}else if(3===arguments.length)if(arguments[2]instanceof Array&&arguments[0]instanceof Kt&&arguments[1]instanceof Jt){var t=arguments[0],e=arguments[1],n=arguments[2];if(t.getEnvelopeInternal().distance(e.getEnvelopeInternal())>this._minDistance)return null;for(var i=t.getCoordinates(),r=e.getCoordinate(),o=0;o<i.length-1;o++){var s=at.distancePointLine(r,i[o],i[o+1]);if(s<this._minDistance){this._minDistance=s;var a=new fn(i[o],i[o+1]).closestPoint(r);n[0]=new Bi(t,o,a),n[1]=new Bi(e,0,r)}if(this._minDistance<=this._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof Kt&&arguments[1]instanceof Kt){var l=arguments[0],c=arguments[1],u=arguments[2];if(l.getEnvelopeInternal().distance(c.getEnvelopeInternal())>this._minDistance)return null;for(var h=l.getCoordinates(),d=c.getCoordinates(),A=0;A<h.length-1;A++)for(var p=0;p<d.length-1;p++){var f=at.distanceLineLine(h[A],h[A+1],d[p],d[p+1]);if(f<this._minDistance){this._minDistance=f;var g=new fn(h[A],h[A+1]),m=new fn(d[p],d[p+1]),_=g.closestPoints(m);u[0]=new Bi(l,A,_[0]),u[1]=new Bi(c,p,_[1])}if(this._minDistance<=this._terminateDistance)return null}}},Ii.prototype.computeMinDistancePoints=function(t,e,n){for(var i=0;i<t.size();i++)for(var r=t.get(i),o=0;o<e.size();o++){var s=e.get(o),a=r.getCoordinate().distance(s.getCoordinate());if(a<this._minDistance&&(this._minDistance=a,n[0]=new Bi(r,0,r.getCoordinate()),n[1]=new Bi(s,0,s.getCoordinate())),this._minDistance<=this._terminateDistance)return null}},Ii.prototype.distance=function(){if(null===this._geom[0]||null===this._geom[1])throw new _("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},Ii.prototype.computeMinDistanceLines=function(t,e,n){for(var i=0;i<t.size();i++)for(var r=t.get(i),o=0;o<e.size();o++){var s=e.get(o);if(this.computeMinDistance(r,s,n),this._minDistance<=this._terminateDistance)return null}},Ii.prototype.interfaces_=function(){return[]},Ii.prototype.getClass=function(){return Ii},Ii.distance=function(t,e){return new Ii(t,e).distance()},Ii.isWithinDistance=function(t,e,n){return new Ii(t,e,n).distance()<=n},Ii.nearestPoints=function(t,e){return new Ii(t,e).nearestPoints()};var Li=function(){this._pt=[new E,new E],this._distance=y.NaN,this._isNull=!0};Li.prototype.getCoordinates=function(){return this._pt},Li.prototype.getCoordinate=function(t){return this._pt[t]},Li.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},Li.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=r,this._isNull=!1}},Li.prototype.toString=function(){return Y.toLineString(this._pt[0],this._pt[1])},Li.prototype.getDistance=function(){return this._distance},Li.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},Li.prototype.interfaces_=function(){return[]},Li.prototype.getClass=function(){return Li};var Pi=function(){};Pi.prototype.interfaces_=function(){return[]},Pi.prototype.getClass=function(){return Pi},Pi.computeDistance=function(){if(arguments[2]instanceof Li&&arguments[0]instanceof Kt&&arguments[1]instanceof E)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=new fn,r=t.getCoordinates(),o=0;o<r.length-1;o++){i.setCoordinates(r[o],r[o+1]);var s=i.closestPoint(e);n.setMinimum(s,e)}else if(arguments[2]instanceof Li&&arguments[0]instanceof $t&&arguments[1]instanceof E){var a=arguments[0],l=arguments[1],c=arguments[2];Pi.computeDistance(a.getExteriorRing(),l,c);for(var u=0;u<a.getNumInteriorRing();u++)Pi.computeDistance(a.getInteriorRingN(u),l,c)}else if(arguments[2]instanceof Li&&arguments[0]instanceof ut&&arguments[1]instanceof E){var h=arguments[0],d=arguments[1],A=arguments[2];if(h instanceof Kt)Pi.computeDistance(h,d,A);else if(h instanceof $t)Pi.computeDistance(h,d,A);else if(h instanceof Gt)for(var p=h,f=0;f<p.getNumGeometries();f++){var g=p.getGeometryN(f);Pi.computeDistance(g,d,A)}else A.setMinimum(h.getCoordinate(),d)}else if(arguments[2]instanceof Li&&arguments[0]instanceof fn&&arguments[1]instanceof E){var m=arguments[0],_=arguments[1],y=arguments[2],v=m.closestPoint(_);y.setMinimum(v,_)}};var Fi=function(){this._g0=null,this._g1=null,this._ptDist=new Li,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},Ri={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};Fi.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},Fi.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new _("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},Fi.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},Fi.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Fi.prototype.computeOrientedDistance=function(t,e,n){var i=new Di(e);if(t.apply(i),n.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var r=new Oi(e,this._densifyFrac);t.apply(r),n.setMaximum(r.getMaxPointDistance())}},Fi.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Fi.prototype.interfaces_=function(){return[]},Fi.prototype.getClass=function(){return Fi},Fi.distance=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new Fi(t,e).distance()}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],o=new Fi(n,i);return o.setDensifyFraction(r),o.distance()}},Ri.MaxPointDistanceFilter.get=function(){return Di},Ri.MaxDensifiedByFractionDistanceFilter.get=function(){return Oi},Object.defineProperties(Fi,Ri);var Di=function(){this._maxPtDist=new Li,this._minPtDist=new Li,this._euclideanDist=new Pi,this._geom=null;var t=arguments[0];this._geom=t};Di.prototype.filter=function(t){this._minPtDist.initialize(),Pi.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Di.prototype.getMaxPointDistance=function(){return this._maxPtDist},Di.prototype.interfaces_=function(){return[At]},Di.prototype.getClass=function(){return Di};var Oi=function(){this._maxPtDist=new Li,this._minPtDist=new Li,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};Oi.prototype.filter=function(t,e){if(0===e)return null;for(var n=t.getCoordinate(e-1),i=t.getCoordinate(e),r=(i.x-n.x)/this._numSubSegs,o=(i.y-n.y)/this._numSubSegs,s=0;s<this._numSubSegs;s++){var a=n.x+s*r,l=n.y+s*o,c=new E(a,l);this._minPtDist.initialize(),Pi.computeDistance(this._geom,c,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)}},Oi.prototype.isDone=function(){return!1},Oi.prototype.isGeometryChanged=function(){return!1},Oi.prototype.getMaxPointDistance=function(){return this._maxPtDist},Oi.prototype.interfaces_=function(){return[Qt]},Oi.prototype.getClass=function(){return Oi};var Ui=function(t,e,n){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=n||null},Ni={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Ui.prototype.checkMaximumDistance=function(t,e,n){var i=new Fi(e,t);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var r=i.getCoordinates();this._errorLocation=r[1],this._errorIndicator=t.getFactory().createLineString(r),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Y.toLineString(r[0],r[1])+")"}},Ui.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Ui.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Ui.VERBOSE&&V.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Ui.prototype.checkNegativeValid=function(){if(!(this._input instanceof $t||this._input instanceof ne||this._input instanceof Gt))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Ui.prototype.getErrorIndicator=function(){return this._errorIndicator},Ui.prototype.checkMinimumDistance=function(t,e,n){var i=new Ii(t,e,n);if(this._minDistanceFound=i.distance(),this._minDistanceFound<n){this._isValid=!1;var r=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(r),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+Y.toLineString(r[0],r[1])+" )"}},Ui.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Ui.prototype.getErrorLocation=function(){return this._errorLocation},Ui.prototype.getPolygonLines=function(t){for(var e=new wt,n=new Ei(e),i=wi.getPolygons(t).iterator();i.hasNext();)i.next().apply(n);return t.getFactory().buildGeometry(e)},Ui.prototype.getErrorMessage=function(){return this._errMsg},Ui.prototype.interfaces_=function(){return[]},Ui.prototype.getClass=function(){return Ui},Ni.VERBOSE.get=function(){return!1},Ni.MAX_DISTANCE_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Ui,Ni);var ki=function(t,e,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=n||null},zi={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};ki.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},ki.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*ki.MAX_ENV_DIFF_FRAC;0===t&&(t=.001);var e=new Z(this._input.getEnvelopeInternal());e.expandBy(this._distance);var n=new Z(this._result.getEnvelopeInternal());n.expandBy(t),n.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report("Envelope")},ki.prototype.checkDistance=function(){var t=new Ui(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},ki.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},ki.prototype.checkPolygonal=function(){this._result instanceof $t||this._result instanceof ne||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},ki.prototype.getErrorIndicator=function(){return this._errorIndicator},ki.prototype.getErrorLocation=function(){return this._errorLocation},ki.prototype.checkExpectedEmpty=function(){return this._input.getDimension()>=2||this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},ki.prototype.report=function(t){if(!ki.VERBOSE)return null;V.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},ki.prototype.getErrorMessage=function(){return this._errorMsg},ki.prototype.interfaces_=function(){return[]},ki.prototype.getClass=function(){return ki},ki.isValidMsg=function(t,e,n){var i=new ki(t,e,n);return i.isValid()?null:i.getErrorMessage()},ki.isValid=function(t,e,n){return!!new ki(t,e,n).isValid()},zi.VERBOSE.get=function(){return!1},zi.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(ki,zi);var Qi=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Qi.prototype.getCoordinates=function(){return this._pts},Qi.prototype.size=function(){return this._pts.length},Qi.prototype.getCoordinate=function(t){return this._pts[t]},Qi.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Qi.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:hn.octant(this.getCoordinate(t),this.getCoordinate(t+1))},Qi.prototype.setData=function(t){this._data=t},Qi.prototype.getData=function(){return this._data},Qi.prototype.toString=function(){return Y.toLineString(new le(this._pts))},Qi.prototype.interfaces_=function(){return[dn]},Qi.prototype.getClass=function(){return Qi};var Gi=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new wt,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};Gi.prototype.getInteriorIntersection=function(){return this._interiorIntersection},Gi.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},Gi.prototype.getIntersectionSegments=function(){return this._intSegments},Gi.prototype.count=function(){return this._intersectionCount},Gi.prototype.getIntersections=function(){return this._intersections},Gi.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Gi.prototype.setKeepIntersections=function(t){this._keepIntersections=t},Gi.prototype.processIntersections=function(t,e,n,i){if(!this._findAllIntersections&&this.hasIntersection())return null;if(t===n&&e===i)return null;if(this._isCheckEndSegmentsOnly&&!this.isEndSegment(t,e)&&!this.isEndSegment(n,i))return null;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=r,this._intSegments[1]=o,this._intSegments[2]=s,this._intSegments[3]=a,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},Gi.prototype.isEndSegment=function(t,e){return 0===e||e>=t.size()-2},Gi.prototype.hasIntersection=function(){return null!==this._interiorIntersection},Gi.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},Gi.prototype.interfaces_=function(){return[Xn]},Gi.prototype.getClass=function(){return Gi},Gi.createAllIntersectionsFinder=function(t){var e=new Gi(t);return e.setFindAllIntersections(!0),e},Gi.createAnyIntersectionFinder=function(t){return new Gi(t)},Gi.createIntersectionCounter=function(t){var e=new Gi(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Hi=function(){this._li=new rt,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Hi.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},Hi.prototype.getIntersections=function(){return this._segInt.getIntersections()},Hi.prototype.isValid=function(){return this.execute(),this._isValid},Hi.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Hi.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Gi(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new bn;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Hi.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Me(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Hi.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Y.toLineString(t[0],t[1])+" and "+Y.toLineString(t[2],t[3])},Hi.prototype.interfaces_=function(){return[]},Hi.prototype.getClass=function(){return Hi},Hi.computeIntersections=function(t){var e=new Hi(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Vi=function t(){this._nv=null;var e=arguments[0];this._nv=new Hi(t.toSegmentStrings(e))};Vi.prototype.checkValid=function(){this._nv.checkValid()},Vi.prototype.interfaces_=function(){return[]},Vi.prototype.getClass=function(){return Vi},Vi.toSegmentStrings=function(t){for(var e=new wt,n=t.iterator();n.hasNext();){var i=n.next();e.add(new Qi(i.getCoordinates(),i))}return e},Vi.checkValid=function(t){new Vi(t).checkValid()};var ji=function(t){this._mapOp=t};ji.prototype.map=function(t){for(var e=new wt,n=0;n<t.getNumGeometries();n++){var i=this._mapOp.map(t.getGeometryN(n));i.isEmpty()||e.add(i)}return t.getFactory().createGeometryCollection(me.toGeometryArray(e))},ji.prototype.interfaces_=function(){return[]},ji.prototype.getClass=function(){return ji},ji.map=function(t,e){return new ji(e).map(t)};var Zi=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new wt,this._resultLineList=new wt;var t=arguments[0],e=arguments[1],n=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=n};Zi.prototype.collectLines=function(t){for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next();this.collectLineEdge(n,t,this._lineEdgesList),this.collectBoundaryTouchEdge(n,t,this._lineEdgesList)}},Zi.prototype.labelIsolatedLine=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,n)},Zi.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},Zi.prototype.collectLineEdge=function(t,e,n){var i=t.getLabel(),r=t.getEdge();t.isLineEdge()&&(t.isVisited()||!Br.isResultOfOp(i,e)||r.isCovered()||(n.add(r),t.setVisitedEdge(!0)))},Zi.prototype.findCoveredLineEdges=function(){for(var t=this._op.getGraph().getNodes().iterator();t.hasNext();)t.next().getEdges().findCoveredLineEdges();for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next(),i=n.getEdge();if(n.isLineEdge()&&!i.isCoveredSet()){var r=this._op.isCoveredByA(n.getCoordinate());i.setCovered(r)}}},Zi.prototype.labelIsolatedLines=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),i=n.getLabel();n.isIsolated()&&(i.isNull(0)?this.labelIsolatedLine(n,0):this.labelIsolatedLine(n,1))}},Zi.prototype.buildLines=function(t){for(var e=this._lineEdgesList.iterator();e.hasNext();){var n=e.next(),i=this._geometryFactory.createLineString(n.getCoordinates());this._resultLineList.add(i),n.setInResult(!0)}},Zi.prototype.collectBoundaryTouchEdge=function(t,e,n){var i=t.getLabel();return t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult()?null:(et.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),void(Br.isResultOfOp(i,e)&&e===Br.INTERSECTION&&(n.add(t.getEdge()),t.setVisitedEdge(!0))))},Zi.prototype.interfaces_=function(){return[]},Zi.prototype.getClass=function(){return Zi};var Wi=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new wt;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};Wi.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var n=this._geometryFactory.createPoint(e);this._resultPointList.add(n)}},Wi.prototype.extractNonCoveredResultNodes=function(t){for(var e=this._op.getGraph().getNodes().iterator();e.hasNext();){var n=e.next();if(!n.isInResult()&&!n.isIncidentEdgeInResult()&&(0===n.getEdges().getDegree()||t===Br.INTERSECTION)){var i=n.getLabel();Br.isResultOfOp(i,t)&&this.filterCoveredNodeToPoint(n)}}},Wi.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},Wi.prototype.interfaces_=function(){return[]},Wi.prototype.getClass=function(){return Wi};var Xi=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};Xi.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},Xi.prototype.transformPolygon=function(t,e){var n=!0,i=this.transformLinearRing(t.getExteriorRing(),t);null!==i&&i instanceof ee&&!i.isEmpty()||(n=!1);for(var r=new wt,o=0;o<t.getNumInteriorRing();o++){var s=this.transformLinearRing(t.getInteriorRingN(o),t);null===s||s.isEmpty()||(s instanceof ee||(n=!1),r.add(s))}if(n)return this._factory.createPolygon(i,r.toArray([]));var a=new wt;return null!==i&&a.add(i),a.addAll(r),this._factory.buildGeometry(a)},Xi.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},Xi.prototype.getInputGeometry=function(){return this._inputGeom},Xi.prototype.transformMultiLineString=function(t,e){for(var n=new wt,i=0;i<t.getNumGeometries();i++){var r=this.transformLineString(t.getGeometryN(i),t);null!==r&&(r.isEmpty()||n.add(r))}return this._factory.buildGeometry(n)},Xi.prototype.transformCoordinates=function(t,e){return this.copy(t)},Xi.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},Xi.prototype.transformMultiPoint=function(t,e){for(var n=new wt,i=0;i<t.getNumGeometries();i++){var r=this.transformPoint(t.getGeometryN(i),t);null!==r&&(r.isEmpty()||n.add(r))}return this._factory.buildGeometry(n)},Xi.prototype.transformMultiPolygon=function(t,e){for(var n=new wt,i=0;i<t.getNumGeometries();i++){var r=this.transformPolygon(t.getGeometryN(i),t);null!==r&&(r.isEmpty()||n.add(r))}return this._factory.buildGeometry(n)},Xi.prototype.copy=function(t){return t.copy()},Xi.prototype.transformGeometryCollection=function(t,e){for(var n=new wt,i=0;i<t.getNumGeometries();i++){var r=this.transform(t.getGeometryN(i));null!==r&&(this._pruneEmptyGeometry&&r.isEmpty()||n.add(r))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(me.toGeometryArray(n)):this._factory.buildGeometry(n)},Xi.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof Jt)return this.transformPoint(t,null);if(t instanceof te)return this.transformMultiPoint(t,null);if(t instanceof ee)return this.transformLinearRing(t,null);if(t instanceof Kt)return this.transformLineString(t,null);if(t instanceof Ht)return this.transformMultiLineString(t,null);if(t instanceof $t)return this.transformPolygon(t,null);if(t instanceof ne)return this.transformMultiPolygon(t,null);if(t instanceof Gt)return this.transformGeometryCollection(t,null);throw new _("Unknown Geometry subtype: "+t.getClass().getName())},Xi.prototype.transformLinearRing=function(t,e){var n=this.transformCoordinates(t.getCoordinateSequence(),t);if(null===n)return this._factory.createLinearRing(null);var i=n.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},Xi.prototype.interfaces_=function(){return[]},Xi.prototype.getClass=function(){return Xi};var Ki=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new fn,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Kt&&"number"==typeof arguments[1]){var e=arguments[0],n=arguments[1];t.call(this,e.getCoordinates(),n)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var i=arguments[0],r=arguments[1];this._srcPts=i,this._isClosed=t.isClosed(i),this._snapTolerance=r}};Ki.prototype.snapVertices=function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),i=0;i<n;i++){var r=t.get(i),o=this.findSnapForVertex(r,e);null!==o&&(t.set(i,new E(o)),0===i&&this._isClosed&&t.set(t.size()-1,new E(o)))}},Ki.prototype.findSnapForVertex=function(t,e){for(var n=0;n<e.length;n++){if(t.equals2D(e[n]))return null;if(t.distance(e[n])<this._snapTolerance)return e[n]}return null},Ki.prototype.snapTo=function(t){var e=new Ct(this._srcPts);return this.snapVertices(e,t),this.snapSegments(e,t),e.toCoordinateArray()},Ki.prototype.snapSegments=function(t,e){if(0===e.length)return null;var n=e.length;e[0].equals2D(e[e.length-1])&&(n=e.length-1);for(var i=0;i<n;i++){var r=e[i],o=this.findSegmentIndexToSnap(r,t);o>=0&&t.add(o+1,new E(r),!1)}},Ki.prototype.findSegmentIndexToSnap=function(t,e){for(var n=y.MAX_VALUE,i=-1,r=0;r<e.size()-1;r++){if(this._seg.p0=e.get(r),this._seg.p1=e.get(r+1),this._seg.p0.equals2D(t)||this._seg.p1.equals2D(t)){if(this._allowSnappingToSourceVertices)continue;return-1}var o=this._seg.distance(t);o<this._snapTolerance&&o<n&&(n=o,i=r)}return i},Ki.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},Ki.prototype.interfaces_=function(){return[]},Ki.prototype.getClass=function(){return Ki},Ki.isClosed=function(t){return!(t.length<=1)&&t[0].equals2D(t[t.length-1])};var qi=function(t){this._srcGeom=t||null},Ji={SNAP_PRECISION_FACTOR:{configurable:!0}};qi.prototype.snapTo=function(t,e){var n=this.extractTargetCoordinates(t);return new Yi(e,n).transform(this._srcGeom)},qi.prototype.snapToSelf=function(t,e){var n=this.extractTargetCoordinates(this._srcGeom),i=new Yi(t,n,!0).transform(this._srcGeom),r=i;return e&&I(r,Yt)&&(r=i.buffer(0)),r},qi.prototype.computeSnapTolerance=function(t){return this.computeMinimumSegmentLength(t)/10},qi.prototype.extractTargetCoordinates=function(t){for(var e=new A,n=t.getCoordinates(),i=0;i<n.length;i++)e.add(n[i]);return e.toArray(new Array(0).fill(null))},qi.prototype.computeMinimumSegmentLength=function(t){for(var e=y.MAX_VALUE,n=0;n<t.length-1;n++){var i=t[n].distance(t[n+1]);i<e&&(e=i)}return e},qi.prototype.interfaces_=function(){return[]},qi.prototype.getClass=function(){return qi},qi.snap=function(t,e,n){var i=new Array(2).fill(null),r=new qi(t);i[0]=r.snapTo(e,n);var o=new qi(e);return i[1]=o.snapTo(i[0],n),i},qi.computeOverlaySnapTolerance=function(){if(1===arguments.length){var t=arguments[0],e=qi.computeSizeBasedSnapTolerance(t),n=t.getPrecisionModel();if(n.getType()===Ae.FIXED){var i=1/n.getScale()*2/1.415;i>e&&(e=i)}return e}if(2===arguments.length){var r=arguments[0],o=arguments[1];return Math.min(qi.computeOverlaySnapTolerance(r),qi.computeOverlaySnapTolerance(o))}},qi.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*qi.SNAP_PRECISION_FACTOR},qi.snapToSelf=function(t,e,n){return new qi(t).snapToSelf(e,n)},Ji.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(qi,Ji);var Yi=function(t){function e(e,n,i){t.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=void 0!==i&&i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(t,e){var n=new Ki(t,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(e)},e.prototype.transformCoordinates=function(t,e){var n=t.toCoordinateArray(),i=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Xi),$i=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};$i.prototype.getCommon=function(){return y.longBitsToDouble(this._commonBits)},$i.prototype.add=function(t){var e=y.doubleToLongBits(t);return this._isFirst?(this._commonBits=e,this._commonSignExp=$i.signExpBits(this._commonBits),this._isFirst=!1,null):$i.signExpBits(e)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=$i.numCommonMostSigMantissaBits(this._commonBits,e),void(this._commonBits=$i.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},$i.prototype.toString=function(){if(1===arguments.length){var t=arguments[0],e=y.longBitsToDouble(t),n="0000000000000000000000000000000000000000000000000000000000000000"+y.toBinaryString(t),i=n.substring(n.length-64);return i.substring(0,1)+" "+i.substring(1,12)+"(exp) "+i.substring(12)+" [ "+e+" ]"}},$i.prototype.interfaces_=function(){return[]},$i.prototype.getClass=function(){return $i},$i.getBit=function(t,e){return 0!=(t&1<<e)?1:0},$i.signExpBits=function(t){return t>>52},$i.zeroLowerBits=function(t,e){return t&~((1<<e)-1)},$i.numCommonMostSigMantissaBits=function(t,e){for(var n=0,i=52;i>=0;i--){if($i.getBit(t,i)!==$i.getBit(e,i))return n;n++}return 52};var tr=function(){this._commonCoord=null,this._ccFilter=new nr},er={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};tr.prototype.addCommonBits=function(t){var e=new ir(this._commonCoord);t.apply(e),t.geometryChanged()},tr.prototype.removeCommonBits=function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new E(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new ir(e);return t.apply(n),t.geometryChanged(),t},tr.prototype.getCommonCoordinate=function(){return this._commonCoord},tr.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr},er.CommonCoordinateFilter.get=function(){return nr},er.Translater.get=function(){return ir},Object.defineProperties(tr,er);var nr=function(){this._commonBitsX=new $i,this._commonBitsY=new $i};nr.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},nr.prototype.getCommonCoordinate=function(){return new E(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},nr.prototype.interfaces_=function(){return[At]},nr.prototype.getClass=function(){return nr};var ir=function(){this.trans=null;var t=arguments[0];this.trans=t};ir.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,i)},ir.prototype.isDone=function(){return!1},ir.prototype.isGeometryChanged=function(){return!0},ir.prototype.interfaces_=function(){return[Qt]},ir.prototype.getClass=function(){return ir};var rr=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};rr.prototype.selfSnap=function(t){return new qi(t).snapTo(t,this._snapTolerance)},rr.prototype.removeCommonBits=function(t){this._cbr=new tr,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},rr.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},rr.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=Br.overlayOp(e[0],e[1],t);return this.prepareResult(n)},rr.prototype.checkValid=function(t){t.isValid()||V.out.println("Snapped geometry is invalid")},rr.prototype.computeSnapTolerance=function(){this._snapTolerance=qi.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},rr.prototype.snap=function(t){var e=this.removeCommonBits(t);return qi.snap(e[0],e[1],this._snapTolerance)},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},rr.overlayOp=function(t,e,n){return new rr(t,e).getResultGeometry(n)},rr.union=function(t,e){return rr.overlayOp(t,e,Br.UNION)},rr.intersection=function(t,e){return rr.overlayOp(t,e,Br.INTERSECTION)},rr.symDifference=function(t,e){return rr.overlayOp(t,e,Br.SYMDIFFERENCE)},rr.difference=function(t,e){return rr.overlayOp(t,e,Br.DIFFERENCE)};var or=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};or.prototype.getResultGeometry=function(t){var e=null,n=!1,i=null;try{e=Br.overlayOp(this._geom[0],this._geom[1],t),n=!0}catch(t){if(!(t instanceof $))throw t;i=t}if(!n)try{e=rr.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof $?i:t}return e},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or},or.overlayOp=function(t,e,n){return new or(t,e).getResultGeometry(n)},or.union=function(t,e){return or.overlayOp(t,e,Br.UNION)},or.intersection=function(t,e){return or.overlayOp(t,e,Br.INTERSECTION)},or.symDifference=function(t,e){return or.overlayOp(t,e,Br.SYMDIFFERENCE)},or.difference=function(t,e){return or.overlayOp(t,e,Br.DIFFERENCE)};var sr=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};sr.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr};var ar=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];this._eventType=t.INSERT,this._label=i,this._xValue=r,this._obj=o}},lr={INSERT:{configurable:!0},DELETE:{configurable:!0}};ar.prototype.isDelete=function(){return this._eventType===ar.DELETE},ar.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},ar.prototype.getObject=function(){return this._obj},ar.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},ar.prototype.getInsertEvent=function(){return this._insertEvent},ar.prototype.isInsert=function(){return this._eventType===ar.INSERT},ar.prototype.isSameLabel=function(t){return null!==this._label&&this._label===t._label},ar.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},ar.prototype.interfaces_=function(){return[x]},ar.prototype.getClass=function(){return ar},lr.INSERT.get=function(){return 1},lr.DELETE.get=function(){return 2},Object.defineProperties(ar,lr);var cr=function(){};cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr};var ur=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};ur.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&1===this._li.getIntersectionNum()){if(ur.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var r=t.getNumPoints()-1;if(0===e&&i===r||0===i&&e===r)return!0}}return!1},ur.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},ur.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},ur.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},ur.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next().getCoordinate();if(t.isIntersection(i))return!0}return!1},ur.prototype.hasProperIntersection=function(){return this._hasProper},ur.prototype.hasIntersection=function(){return this._hasIntersection},ur.prototype.isDone=function(){return this._isDone},ur.prototype.isBoundaryPoint=function(t,e){return null!==e&&(!!this.isBoundaryPointInternal(t,e[0])||!!this.isBoundaryPointInternal(t,e[1]))},ur.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},ur.prototype.addIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},ur.prototype.interfaces_=function(){return[]},ur.prototype.getClass=function(){return ur},ur.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var hr=function(t){function e(){t.call(this),this.events=new wt,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){$e.sort(this.events);for(var t=0;t<this.events.size();t++){var e=this.events.get(t);e.isDelete()&&e.getInsertEvent().setDeleteEventIndex(t)}},e.prototype.computeIntersections=function(){if(1===arguments.length){var t=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var e=0;e<this.events.size();e++){var n=this.events.get(e);if(n.isInsert()&&this.processOverlaps(e,n.getDeleteEventIndex(),n,t),t.isDone())break}}else if(3===arguments.length)if(arguments[2]instanceof ur&&I(arguments[0],bt)&&I(arguments[1],bt)){var i=arguments[0],r=arguments[1],o=arguments[2];this.addEdges(i,i),this.addEdges(r,r),this.computeIntersections(o)}else if("boolean"==typeof arguments[2]&&I(arguments[0],bt)&&arguments[1]instanceof ur){var s=arguments[0],a=arguments[1];arguments[2]?this.addEdges(s,null):this.addEdges(s),this.computeIntersections(a)}},e.prototype.addEdge=function(t,e){for(var n=t.getMonotoneChainEdge(),i=n.getStartIndexes(),r=0;r<i.length-1;r++){var o=new sr(n,r),s=new ar(e,n.getMinX(r),o);this.events.add(s),this.events.add(new ar(n.getMaxX(r),s))}},e.prototype.processOverlaps=function(t,e,n,i){for(var r=n.getObject(),o=t;o<e;o++){var s=this.events.get(o);if(s.isInsert()){var a=s.getObject();n.isSameLabel(s)||(r.computeIntersections(a,i),this.nOverlaps++)}}},e.prototype.addEdges=function(){if(1===arguments.length)for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.addEdge(e,e)}else if(2===arguments.length)for(var n=arguments[0],i=arguments[1],r=n.iterator();r.hasNext();){var o=r.next();this.addEdge(o,i)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(cr),dr=function(){this._min=y.POSITIVE_INFINITY,this._max=y.NEGATIVE_INFINITY},Ar={NodeComparator:{configurable:!0}};dr.prototype.getMin=function(){return this._min},dr.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},dr.prototype.getMax=function(){return this._max},dr.prototype.toString=function(){return Y.toLineString(new E(this._min,0),new E(this._max,0))},dr.prototype.interfaces_=function(){return[]},dr.prototype.getClass=function(){return dr},Ar.NodeComparator.get=function(){return pr},Object.defineProperties(dr,Ar);var pr=function(){};pr.prototype.compare=function(t,e){var n=t,i=e,r=(n._min+n._max)/2,o=(i._min+i._max)/2;return r<o?-1:r>o?1:0},pr.prototype.interfaces_=function(){return[w]},pr.prototype.getClass=function(){return pr};var fr=function(t){function e(){t.call(this),this._item=null;var e=arguments[0],n=arguments[1],i=arguments[2];this._min=e,this._max=n,this._item=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;n.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(dr),gr=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(t,e){this._min=Math.min(t._min,e._min),this._max=Math.max(t._max,e._max)},e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;null!==this._node1&&this._node1.query(t,e,n),null!==this._node2&&this._node2.query(t,e,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(dr),mr=function(){this._leaves=new wt,this._root=null,this._level=0};mr.prototype.buildTree=function(){$e.sort(this._leaves,new dr.NodeComparator);for(var t=this._leaves,e=null,n=new wt;;){if(this.buildLevel(t,n),1===n.size())return n.get(0);e=t,t=n,n=e}},mr.prototype.insert=function(t,e,n){if(null!==this._root)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new fr(t,e,n))},mr.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},mr.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},mr.prototype.printNode=function(t){V.out.println(Y.toLineString(new E(t._min,this._level),new E(t._max,this._level)))},mr.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},mr.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n<t.size();n+=2){var i=t.get(n);if(null===(n+1<t.size()?t.get(n):null))e.add(i);else{var r=new gr(t.get(n),t.get(n+1));e.add(r)}}},mr.prototype.interfaces_=function(){return[]},mr.prototype.getClass=function(){return mr};var _r=function(){this._items=new wt};_r.prototype.visitItem=function(t){this._items.add(t)},_r.prototype.getItems=function(){return this._items},_r.prototype.interfaces_=function(){return[Ke]},_r.prototype.getClass=function(){return _r};var yr=function(){this._index=null;var t=arguments[0];if(!I(t,Yt))throw new _("Argument must be Polygonal");this._index=new br(t)},vr={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};yr.prototype.locate=function(t){var e=new st(t),n=new xr(e);return this._index.query(t.y,t.y,n),e.getLocation()},yr.prototype.interfaces_=function(){return[zn]},yr.prototype.getClass=function(){return yr},vr.SegmentVisitor.get=function(){return xr},vr.IntervalIndexedGeometry.get=function(){return br},Object.defineProperties(yr,vr);var xr=function(){this._counter=null;var t=arguments[0];this._counter=t};xr.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},xr.prototype.interfaces_=function(){return[Ke]},xr.prototype.getClass=function(){return xr};var br=function(){this._index=new mr;var t=arguments[0];this.init(t)};br.prototype.init=function(t){for(var e=Ei.getLines(t).iterator();e.hasNext();){var n=e.next().getCoordinates();this.addLine(n)}},br.prototype.addLine=function(t){for(var e=1;e<t.length;e++){var n=new fn(t[e-1],t[e]),i=Math.min(n.p0.y,n.p1.y),r=Math.max(n.p0.y,n.p1.y);this._index.insert(i,r,n)}},br.prototype.query=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new _r;return this._index.query(t,e,n),n.getItems()}if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];this._index.query(i,r,o)}},br.prototype.interfaces_=function(){return[]},br.prototype.getClass=function(){return br};var wr=function(t){function e(){if(t.call(this),this._parentGeom=null,this._lineEdgeMap=new de,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Ci,2===arguments.length){var e=arguments[0],n=arguments[1],i=pt.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=n,this._boundaryNodeRule=i,null!==n&&this.add(n)}else if(3===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2];this._argIndex=r,this._parentGeom=o,this._boundaryNodeRule=s,null!==o&&this.add(o)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertBoundaryPoint=function(t,n){var i=this._nodes.addNode(n).getLabel(),r=1;M.NONE,i.getLocation(t,Ce.ON)===M.BOUNDARY&&r++;var o=e.determineBoundary(this._boundaryNodeRule,r);i.setLocation(t,o)},e.prototype.computeSelfNodes=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.computeSelfNodes(t,e,!1)}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],o=new ur(n,!0,!1);o.setIsDoneIfProperInt(r);var s=this.createEdgeSetIntersector(),a=this._parentGeom instanceof ee||this._parentGeom instanceof $t||this._parentGeom instanceof ne,l=i||!a;return s.computeIntersections(this._edges,o,l),this.addSelfIntersectionNodes(this._argIndex),o}},e.prototype.computeSplitEdges=function(t){for(var e=this._edges.iterator();e.hasNext();)e.next().eiList.addSplitEdges(t)},e.prototype.computeEdgeIntersections=function(t,e,n){var i=new ur(e,n,!0);return i.setBoundaryNodes(this.getBoundaryNodes(),t.getBoundaryNodes()),this.createEdgeSetIntersector().computeIntersections(this._edges,t._edges,i),i},e.prototype.getGeometry=function(){return this._parentGeom},e.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},e.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},e.prototype.addPoint=function(){if(arguments[0]instanceof Jt){var t=arguments[0].getCoordinate();this.insertPoint(this._argIndex,t,M.INTERIOR)}else if(arguments[0]instanceof E){var e=arguments[0];this.insertPoint(this._argIndex,e,M.INTERIOR)}},e.prototype.addPolygon=function(t){this.addPolygonRing(t.getExteriorRing(),M.EXTERIOR,M.INTERIOR);for(var e=0;e<t.getNumInteriorRing();e++){var n=t.getInteriorRingN(e);this.addPolygonRing(n,M.INTERIOR,M.EXTERIOR)}},e.prototype.addEdge=function(t){this.insertEdge(t);var e=t.getCoordinates();this.insertPoint(this._argIndex,e[0],M.BOUNDARY),this.insertPoint(this._argIndex,e[e.length-1],M.BOUNDARY)},e.prototype.addLineString=function(t){var e=Bt.removeRepeatedPoints(t.getCoordinates());if(e.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=e[0],null;var n=new ni(e,new Pe(this._argIndex,M.INTERIOR));this._lineEdgeMap.put(t,n),this.insertEdge(n),et.isTrue(e.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,e[0]),this.insertBoundaryPoint(this._argIndex,e[e.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),n=0,i=t.iterator();i.hasNext();){var r=i.next();e[n++]=r.getCoordinate().copy()}return e},e.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(t,e,n){if(this.isBoundaryNode(t,e))return null;n===M.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,n)},e.prototype.addPolygonRing=function(t,e,n){if(t.isEmpty())return null;var i=Bt.removeRepeatedPoints(t.getCoordinates());if(i.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var r=e,o=n;at.isCCW(i)&&(r=n,o=e);var s=new ni(i,new Pe(this._argIndex,M.BOUNDARY,r,o));this._lineEdgeMap.put(t,s),this.insertEdge(s),this.insertPoint(this._argIndex,i[0],M.BOUNDARY)},e.prototype.insertPoint=function(t,e,n){var i=this._nodes.addNode(e),r=i.getLabel();null===r?i._label=new Pe(t,n):r.setLocation(t,n)},e.prototype.createEdgeSetIntersector=function(){return new hr},e.prototype.addSelfIntersectionNodes=function(t){for(var e=this._edges.iterator();e.hasNext();)for(var n=e.next(),i=n.getLabel().getLocation(t),r=n.eiList.iterator();r.hasNext();){var o=r.next();this.addSelfIntersectionNode(t,o.coord,i)}},e.prototype.add=function(){if(1!==arguments.length)return t.prototype.add.apply(this,arguments);var e=arguments[0];if(e.isEmpty())return null;if(e instanceof ne&&(this._useBoundaryDeterminationRule=!1),e instanceof $t)this.addPolygon(e);else if(e instanceof Kt)this.addLineString(e);else if(e instanceof Jt)this.addPoint(e);else if(e instanceof te)this.addCollection(e);else if(e instanceof Ht)this.addCollection(e);else if(e instanceof ne)this.addCollection(e);else{if(!(e instanceof Gt))throw new Error(e.getClass().getName());this.addCollection(e)}},e.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},e.prototype.locate=function(t){return I(this._parentGeom,Yt)&&this._parentGeom.getNumGeometries()>50?(null===this._areaPtLocator&&(this._areaPtLocator=new yr(this._parentGeom)),this._areaPtLocator.locate(t)):this._ptLocator.locate(t,this._parentGeom)},e.prototype.findEdge=function(){if(1===arguments.length){var e=arguments[0];return this._lineEdgeMap.get(e)}return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(t,e){return t.isInBoundary(e)?M.BOUNDARY:M.INTERIOR},e}(Ve),Er=function(){if(this._li=new rt,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new wr(0,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=pt.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new wr(0,e,i),this._arg[1]=new wr(1,n,i)}else if(3===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2];r.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(r.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new wr(0,r,s),this._arg[1]=new wr(1,o,s)}};Er.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Er.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Er.prototype.interfaces_=function(){return[]},Er.prototype.getClass=function(){return Er};var Cr=function(){};Cr.prototype.interfaces_=function(){return[]},Cr.prototype.getClass=function(){return Cr},Cr.map=function(){if(arguments[0]instanceof ut&&I(arguments[1],Cr.MapOp)){for(var t=arguments[0],e=arguments[1],n=new wt,i=0;i<t.getNumGeometries();i++){var r=e.map(t.getGeometryN(i));null!==r&&n.add(r)}return t.getFactory().buildGeometry(n)}if(I(arguments[0],vt)&&I(arguments[1],Cr.MapOp)){for(var o=arguments[0],s=arguments[1],a=new wt,l=o.iterator();l.hasNext();){var c=l.next(),u=s.map(c);null!==u&&a.add(u)}return a}},Cr.MapOp=function(){};var Br=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n),this._ptLocator=new Ci,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Wn,this._resultPolyList=new wt,this._resultLineList=new wt,this._resultPointList=new wt,this._graph=new Ve(new jn),this._geomFact=e.getFactory()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Pe(t.getLabel())).flip();var r=e.getDepth();r.isNull()&&r.add(n),r.add(i),n.merge(i)}else this._edgeList.add(t)},e.prototype.getGraph=function(){return this._graph},e.prototype.cancelDuplicateResultEdges=function(){for(var t=this._graph.getEdgeEnds().iterator();t.hasNext();){var e=t.next(),n=e.getSym();e.isInResult()&&n.isInResult()&&(e.setInResult(!1),n.setInResult(!1))}},e.prototype.isCoveredByLA=function(t){return!!this.isCovered(t,this._resultLineList)||!!this.isCovered(t,this._resultPolyList)},e.prototype.computeGeometry=function(t,n,i,r){var o=new wt;return o.addAll(t),o.addAll(n),o.addAll(i),o.isEmpty()?e.createEmptyResult(r,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(o)},e.prototype.mergeSymLabels=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();)t.next().getEdges().mergeSymLabels()},e.prototype.isCovered=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();if(this._ptLocator.locate(t,i)!==M.EXTERIOR)return!0}return!1},e.prototype.replaceCollapsedEdges=function(){for(var t=new wt,e=this._edgeList.iterator();e.hasNext();){var n=e.next();n.isCollapsed()&&(e.remove(),t.add(n.getCollapsedEdge()))}this._edgeList.addAll(t)},e.prototype.updateNodeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getEdges().getLabel();e.getLabel().merge(n)}},e.prototype.getResultGeometry=function(t){return this.computeOverlay(t),this._resultGeom},e.prototype.insertUniqueEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.insertUniqueEdge(n)}},e.prototype.computeOverlay=function(t){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var e=new wt;this._arg[0].computeSplitEdges(e),this._arg[1].computeSplitEdges(e),this.insertUniqueEdges(e),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Vi.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(t),this.cancelDuplicateResultEdges();var n=new je(this._geomFact);n.add(this._graph),this._resultPolyList=n.getPolygons();var i=new Zi(this,this._geomFact,this._ptLocator);this._resultLineList=i.build(t);var r=new Wi(this,this._geomFact,this._ptLocator);this._resultPointList=r.build(t),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,t)},e.prototype.labelIncompleteNode=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._arg[e].getGeometry());t.getLabel().setLocation(e,n)},e.prototype.copyPoints=function(t){for(var e=this._arg[t].getNodeIterator();e.hasNext();){var n=e.next();this._graph.addNode(n.getCoordinate()).setLabel(t,n.getLabel().getLocation(t))}},e.prototype.findResultAreaEdges=function(t){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var i=n.next(),r=i.getLabel();r.isArea()&&!i.isInteriorAreaEdge()&&e.isResultOfOp(r.getLocation(0,Ce.RIGHT),r.getLocation(1,Ce.RIGHT),t)&&i.setInResult(!0)}},e.prototype.computeLabelsFromDepths=function(){for(var t=this._edgeList.iterator();t.hasNext();){var e=t.next(),n=e.getLabel(),i=e.getDepth();if(!i.isNull()){i.normalize();for(var r=0;r<2;r++)n.isNull(r)||!n.isArea()||i.isNull(r)||(0===i.getDelta(r)?n.toLine(r):(et.isTrue(!i.isNull(r,Ce.LEFT),"depth of LEFT side has not been initialized"),n.setLocation(r,Ce.LEFT,i.getLocation(r,Ce.LEFT)),et.isTrue(!i.isNull(r,Ce.RIGHT),"depth of RIGHT side has not been initialized"),n.setLocation(r,Ce.RIGHT,i.getLocation(r,Ce.RIGHT))))}}},e.prototype.computeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();)t.next().getEdges().computeLabelling(this._arg);this.mergeSymLabels(),this.updateNodeLabelling()},e.prototype.labelIncompleteNodes=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getLabel();e.isIsolated()&&(n.isNull(0)?this.labelIncompleteNode(e,0):this.labelIncompleteNode(e,1)),e.getEdges().updateLabelling(n)}},e.prototype.isCoveredByA=function(t){return!!this.isCovered(t,this._resultPolyList)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Er);Br.overlayOp=function(t,e,n){return new Br(t,e).getResultGeometry(n)},Br.intersection=function(t,e){if(t.isEmpty()||e.isEmpty())return Br.createEmptyResult(Br.INTERSECTION,t,e,t.getFactory());if(t.isGeometryCollection()){var n=e;return ji.map(t,{interfaces_:function(){return[Cr.MapOp]},map:function(t){return t.intersection(n)}})}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Br.INTERSECTION)},Br.symDifference=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Br.createEmptyResult(Br.SYMDIFFERENCE,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Br.SYMDIFFERENCE)},Br.resultDimension=function(t,e,n){var i=e.getDimension(),r=n.getDimension(),o=-1;switch(t){case Br.INTERSECTION:o=Math.min(i,r);break;case Br.UNION:o=Math.max(i,r);break;case Br.DIFFERENCE:o=i;break;case Br.SYMDIFFERENCE:o=Math.max(i,r)}return o},Br.createEmptyResult=function(t,e,n,i){var r=null;switch(Br.resultDimension(t,e,n)){case-1:r=i.createGeometryCollection(new Array(0).fill(null));break;case 0:r=i.createPoint();break;case 1:r=i.createLineString();break;case 2:r=i.createPolygon()}return r},Br.difference=function(t,e){return t.isEmpty()?Br.createEmptyResult(Br.DIFFERENCE,t,e,t.getFactory()):e.isEmpty()?t.copy():(t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Br.DIFFERENCE))},Br.isResultOfOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=t.getLocation(0),i=t.getLocation(1);return Br.isResultOfOp(n,i,e)}if(3===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2];switch(r===M.BOUNDARY&&(r=M.INTERIOR),o===M.BOUNDARY&&(o=M.INTERIOR),s){case Br.INTERSECTION:return r===M.INTERIOR&&o===M.INTERIOR;case Br.UNION:return r===M.INTERIOR||o===M.INTERIOR;case Br.DIFFERENCE:return r===M.INTERIOR&&o!==M.INTERIOR;case Br.SYMDIFFERENCE:return r===M.INTERIOR&&o!==M.INTERIOR||r!==M.INTERIOR&&o===M.INTERIOR}return!1}},Br.INTERSECTION=1,Br.UNION=2,Br.DIFFERENCE=3,Br.SYMDIFFERENCE=4;var Sr=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Ci,this._seg=new fn;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};Sr.prototype.isWithinToleranceOfBoundary=function(t){for(var e=0;e<this._linework.getNumGeometries();e++)for(var n=this._linework.getGeometryN(e).getCoordinateSequence(),i=0;i<n.size()-1;i++)if(n.getCoordinate(i,this._seg.p0),n.getCoordinate(i+1,this._seg.p1),this._seg.distance(t)<=this._boundaryDistanceTolerance)return!0;return!1},Sr.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?M.BOUNDARY:this._ptLocator.locate(t,this._g)},Sr.prototype.extractLinework=function(t){var e=new Mr;t.apply(e);var n=e.getLinework(),i=me.toLineStringArray(n);return t.getFactory().createMultiLineString(i)},Sr.prototype.interfaces_=function(){return[]},Sr.prototype.getClass=function(){return Sr};var Mr=function(){this._linework=null,this._linework=new wt};Mr.prototype.getLinework=function(){return this._linework},Mr.prototype.filter=function(t){if(t instanceof $t){var e=t;this._linework.add(e.getExteriorRing());for(var n=0;n<e.getNumInteriorRing();n++)this._linework.add(e.getInteriorRingN(n))}},Mr.prototype.interfaces_=function(){return[zt]},Mr.prototype.getClass=function(){return Mr};var Tr=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};Tr.prototype.extractPoints=function(t,e,n){for(var i=t.getCoordinates(),r=0;r<i.length-1;r++)this.computeOffsetPoints(i[r],i[r+1],e,n)},Tr.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},Tr.prototype.getPoints=function(t){for(var e=new wt,n=Ei.getLines(this._g).iterator();n.hasNext();){var i=n.next();this.extractPoints(i,t,e)}return e},Tr.prototype.computeOffsetPoints=function(t,e,n,i){var r=e.x-t.x,o=e.y-t.y,s=Math.sqrt(r*r+o*o),a=n*r/s,l=n*o/s,c=(e.x+t.x)/2,u=(e.y+t.y)/2;if(this._doLeft){var h=new E(c-l,u+a);i.add(h)}if(this._doRight){var d=new E(c+l,u-a);i.add(d)}},Tr.prototype.interfaces_=function(){return[]},Tr.prototype.getClass=function(){return Tr};var Ir=function t(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=t.TOLERANCE,this._testCoords=new wt;var e=arguments[0],n=arguments[1],i=arguments[2];this._boundaryDistanceTolerance=t.computeBoundaryDistanceTolerance(e,n),this._geom=[e,n,i],this._locFinder=[new Sr(this._geom[0],this._boundaryDistanceTolerance),new Sr(this._geom[1],this._boundaryDistanceTolerance),new Sr(this._geom[2],this._boundaryDistanceTolerance)]},Lr={TOLERANCE:{configurable:!0}};Ir.prototype.reportResult=function(t,e,n){V.out.println("Overlay result invalid - A:"+M.toLocationSymbol(e[0])+" B:"+M.toLocationSymbol(e[1])+" expected:"+(n?"i":"e")+" actual:"+M.toLocationSymbol(e[2]))},Ir.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var e=this.checkValid(t);return e},Ir.prototype.checkValid=function(){if(1===arguments.length){for(var t=arguments[0],e=0;e<this._testCoords.size();e++){var n=this._testCoords.get(e);if(!this.checkValid(t,n))return this._invalidLocation=n,!1}return!0}if(2===arguments.length){var i=arguments[0],r=arguments[1];return this._location[0]=this._locFinder[0].getLocation(r),this._location[1]=this._locFinder[1].getLocation(r),this._location[2]=this._locFinder[2].getLocation(r),!!Ir.hasLocation(this._location,M.BOUNDARY)||this.isValidResult(i,this._location)}},Ir.prototype.addTestPts=function(t){var e=new Tr(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},Ir.prototype.isValidResult=function(t,e){var n=Br.isResultOfOp(e[0],e[1],t),i=!(n^e[2]===M.INTERIOR);return i||this.reportResult(t,e,n),i},Ir.prototype.getInvalidLocation=function(){return this._invalidLocation},Ir.prototype.interfaces_=function(){return[]},Ir.prototype.getClass=function(){return Ir},Ir.hasLocation=function(t,e){for(var n=0;n<3;n++)if(t[n]===e)return!0;return!1},Ir.computeBoundaryDistanceTolerance=function(t,e){return Math.min(qi.computeSizeBasedSnapTolerance(t),qi.computeSizeBasedSnapTolerance(e))},Ir.isValid=function(t,e,n,i){return new Ir(t,e,i).isValid(n)},Lr.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Ir,Lr);var Pr=function t(e){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=t.extractFactory(e),this._inputGeoms=e};Pr.prototype.extractElements=function(t,e){if(null===t)return null;for(var n=0;n<t.getNumGeometries();n++){var i=t.getGeometryN(n);this._skipEmpty&&i.isEmpty()||e.add(i)}},Pr.prototype.combine=function(){for(var t=new wt,e=this._inputGeoms.iterator();e.hasNext();){var n=e.next();this.extractElements(n,t)}return 0===t.size()?null!==this._geomFactory?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(t)},Pr.prototype.interfaces_=function(){return[]},Pr.prototype.getClass=function(){return Pr},Pr.combine=function(){if(1===arguments.length){var t=arguments[0];return new Pr(t).combine()}if(2===arguments.length){var e=arguments[0],n=arguments[1];return new Pr(Pr.createList(e,n)).combine()}if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];return new Pr(Pr.createList(i,r,o)).combine()}},Pr.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Pr.createList=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new wt;return n.add(t),n.add(e),n}if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2],s=new wt;return s.add(i),s.add(r),s.add(o),s}};var Fr=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,null===this._inputPolys&&(this._inputPolys=new wt)},Rr={STRTREE_NODE_CAPACITY:{configurable:!0}};Fr.prototype.reduceToGeometries=function(t){for(var e=new wt,n=t.iterator();n.hasNext();){var i=n.next(),r=null;I(i,bt)?r=this.unionTree(i):i instanceof ut&&(r=i),e.add(r)}return e},Fr.prototype.extractByEnvelope=function(t,e,n){for(var i=new wt,r=0;r<e.getNumGeometries();r++){var o=e.getGeometryN(r);o.getEnvelopeInternal().intersects(t)?i.add(o):n.add(o)}return this._geomFactory.buildGeometry(i)},Fr.prototype.unionOptimized=function(t,e){var n=t.getEnvelopeInternal(),i=e.getEnvelopeInternal();if(!n.intersects(i))return Pr.combine(t,e);if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var r=n.intersection(i);return this.unionUsingEnvelopeIntersection(t,e,r)},Fr.prototype.union=function(){if(null===this._inputPolys)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new sn(Fr.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var n=e.next();t.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var i=t.itemsTree();return this.unionTree(i)},Fr.prototype.binaryUnion=function(){if(1===arguments.length){var t=arguments[0];return this.binaryUnion(t,0,t.size())}if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];if(i-n<=1){var r=Fr.getGeometry(e,n);return this.unionSafe(r,null)}if(i-n==2)return this.unionSafe(Fr.getGeometry(e,n),Fr.getGeometry(e,n+1));var o=Math.trunc((i+n)/2),s=this.binaryUnion(e,n,o),a=this.binaryUnion(e,o,i);return this.unionSafe(s,a)}},Fr.prototype.repeatedUnion=function(t){for(var e=null,n=t.iterator();n.hasNext();){var i=n.next();e=null===e?i.copy():e.union(i)}return e},Fr.prototype.unionSafe=function(t,e){return null===t&&null===e?null:null===t?e.copy():null===e?t.copy():this.unionOptimized(t,e)},Fr.prototype.unionActual=function(t,e){return Fr.restrictToPolygons(t.union(e))},Fr.prototype.unionTree=function(t){var e=this.reduceToGeometries(t);return this.binaryUnion(e)},Fr.prototype.unionUsingEnvelopeIntersection=function(t,e,n){var i=new wt,r=this.extractByEnvelope(n,t,i),o=this.extractByEnvelope(n,e,i),s=this.unionActual(r,o);return i.add(s),Pr.combine(i)},Fr.prototype.bufferUnion=function(){if(1===arguments.length){var t=arguments[0];return t.get(0).getFactory().buildGeometry(t).buffer(0)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().createGeometryCollection([e,n]).buffer(0)}},Fr.prototype.interfaces_=function(){return[]},Fr.prototype.getClass=function(){return Fr},Fr.restrictToPolygons=function(t){if(I(t,Yt))return t;var e=wi.getPolygons(t);return 1===e.size()?e.get(0):t.getFactory().createMultiPolygon(me.toPolygonArray(e))},Fr.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Fr.union=function(t){return new Fr(t).union()},Rr.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Fr,Rr);var Dr=function(){};Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr},Dr.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Br.createEmptyResult(Br.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Br.UNION)},t.GeoJSONReader=we,t.GeoJSONWriter=Ee,t.OverlayOp=Br,t.UnionOp=Dr,t.BufferOp=fi,Object.defineProperty(t,"__esModule",{value:!0})}))},4561:function(t,e,n){var i=n(1627);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("6c944acb",i,!0,{sourceMap:!1,shadowMode:!1})},4337:function(t,e,n){var i=n(8294);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("3f048bde",i,!0,{sourceMap:!1,shadowMode:!1})},6872:function(t,e,n){var i=n(8475);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("150ad29c",i,!0,{sourceMap:!1,shadowMode:!1})},7769:function(t,e,n){var i=n(6918);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("29cae21a",i,!0,{sourceMap:!1,shadowMode:!1})},1602:function(t,e,n){var i=n(351);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("433b4afa",i,!0,{sourceMap:!1,shadowMode:!1})},5375:function(t,e,n){var i=n(4963);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("7e462712",i,!0,{sourceMap:!1,shadowMode:!1})},3024:function(t,e,n){var i=n(2125);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("b6cb6cfc",i,!0,{sourceMap:!1,shadowMode:!1})},6782:function(t,e,n){var i=n(6646);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("75d232ea",i,!0,{sourceMap:!1,shadowMode:!1})},8499:function(t,e,n){var i=n(8841);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("30aa2cac",i,!0,{sourceMap:!1,shadowMode:!1})},2292:function(t,e,n){var i=n(2716);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("09ab9b54",i,!0,{sourceMap:!1,shadowMode:!1})},3650:function(t,e,n){"use strict";function i(t,e){for(var n=[],i={},r=0;r<e.length;r++){var o=e[r],s=o[0],a=o[1],l=o[2],c=o[3],u={id:t+":"+r,css:a,media:l,sourceMap:c};i[s]?i[s].parts.push(u):n.push(i[s]={id:s,parts:[u]})}return n}n.d(e,{Z:function(){return p}});var r="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!r)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},s=r&&(document.head||document.getElementsByTagName("head")[0]),a=null,l=0,c=!1,u=function(){},h=null,d="data-vue-ssr-id",A="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(t,e,n,r){c=n,h=r||{};var s=i(t,e);return f(s),function(e){for(var n=[],r=0;r<s.length;r++){var a=s[r],l=o[a.id];l.refs--,n.push(l)}e?(s=i(t,e),f(s)):s=[];for(r=0;r<n.length;r++){l=n[r];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete o[l.id]}}}}function f(t){for(var e=0;e<t.length;e++){var n=t[e],i=o[n.id];if(i){i.refs++;for(var r=0;r<i.parts.length;r++)i.parts[r](n.parts[r]);for(;r<n.parts.length;r++)i.parts.push(m(n.parts[r]));i.parts.length>n.parts.length&&(i.parts.length=n.parts.length)}else{var s=[];for(r=0;r<n.parts.length;r++)s.push(m(n.parts[r]));o[n.id]={id:n.id,refs:1,parts:s}}}}function g(){var t=document.createElement("style");return t.type="text/css",s.appendChild(t),t}function m(t){var e,n,i=document.querySelector("style["+d+'~="'+t.id+'"]');if(i){if(c)return u;i.parentNode.removeChild(i)}if(A){var r=l++;i=a||(a=g()),e=y.bind(null,i,r,!1),n=y.bind(null,i,r,!0)}else i=g(),e=v.bind(null,i),n=function(){i.parentNode.removeChild(i)};return e(t),function(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap)return;e(t=i)}else n()}}var _=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function y(t,e,n,i){var r=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=_(e,r);else{var o=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function v(t,e){var n=e.css,i=e.media,r=e.sourceMap;if(i&&t.setAttribute("media",i),h.ssrId&&t.setAttribute(d,e.id),r&&(n+="\n/*# sourceURL="+r.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}},2179:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill-rule=%27evenodd%27 fill=%27%23fff%27%3E%3Cpath d=%27M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0%27/%3E%3C/svg%3E"},4026:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill-rule=%27evenodd%27%3E%3Cpath d=%27M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0%27/%3E%3C/svg%3E"},4055:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23333%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},926:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%2333b5e5%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3C/svg%3E"},3895:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%2333b5e5%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},9920:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23666%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath d=%27m14 5 1 1-9 9-1-1 9-9z%27 fill=%27red%27/%3E%3C/svg%3E"},2154:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23999%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath d=%27m14 5 1 1-9 9-1-1 9-9z%27 fill=%27red%27/%3E%3C/svg%3E"},5758:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23aaa%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath d=%27m14 5 1 1-9 9-1-1 9-9z%27 fill=%27red%27/%3E%3C/svg%3E"},4943:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23e54e33%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3C/svg%3E"},407:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23e58978%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},6871:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},9843:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},7673:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z%27/%3E%3C/svg%3E"},1570:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z%27/%3E%3C/svg%3E"},2931:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z%27/%3E%3C/svg%3E"},4871:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8h-8z%27/%3E%3Cpath d=%27m10.5 16 4 8 4-8h-8z%27 fill=%27%23ccc%27/%3E%3C/svg%3E"},6807:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z%27/%3E%3C/svg%3E"},28:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z%27/%3E%3C/svg%3E"},551:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z%27/%3E%3C/svg%3E"},323:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z%27/%3E%3C/svg%3E"},3598:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8h-8z%27/%3E%3Cpath d=%27m10.5 16 4 8 4-8h-8z%27 fill=%27%23999%27/%3E%3C/svg%3E"},325:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z%27/%3E%3C/svg%3E"},242:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z%27/%3E%3C/svg%3E"},752:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z%27/%3E%3C/svg%3E"},1045:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z%27/%3E%3C/svg%3E"},6043:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8h-8z%27/%3E%3Cpath d=%27m10.5 16 4 8 4-8h-8z%27 fill=%27%23ccc%27/%3E%3C/svg%3E"},4529:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 xmlns:xlink=%27http://www.w3.org/1999/xlink%27 fill-rule=%27evenodd%27 viewBox=%270 0 88 23%27%3E%3Cdefs%3E%3Cpath id=%27a%27 d=%27M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 0 1 3.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z%27/%3E%3Cpath id=%27b%27 d=%27M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 0 0-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 0 0 4.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 0 1-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 0 1 .3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 0 1-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z%27/%3E%3C/defs%3E%3Cmask id=%27c%27%3E%3Crect width=%27100%25%27 height=%27100%25%27 fill=%27%23fff%27/%3E%3Cuse xlink:href=%27%23a%27/%3E%3Cuse xlink:href=%27%23b%27/%3E%3C/mask%3E%3Cg opacity=%27.3%27 stroke=%27%23000%27 stroke-width=%273%27%3E%3Ccircle mask=%27url%28%23c%29%27 cx=%2711.5%27 cy=%2711.5%27 r=%279.25%27/%3E%3Cuse xlink:href=%27%23b%27 mask=%27url%28%23c%29%27/%3E%3C/g%3E%3Cg opacity=%27.9%27 fill=%27%23fff%27%3E%3Cuse xlink:href=%27%23a%27/%3E%3Cuse xlink:href=%27%23b%27/%3E%3C/g%3E%3C/svg%3E"},3939:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 xmlns:xlink=%27http://www.w3.org/1999/xlink%27 fill-rule=%27evenodd%27 viewBox=%270 0 88 23%27%3E%3Cdefs%3E%3Cpath id=%27a%27 d=%27M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 0 1 3.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z%27/%3E%3Cpath id=%27b%27 d=%27M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 0 0-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 0 0 4.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 0 1-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 0 1 .3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 0 1-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z%27/%3E%3C/defs%3E%3Cmask id=%27c%27%3E%3Crect width=%27100%25%27 height=%27100%25%27 fill=%27%23fff%27/%3E%3Cuse xlink:href=%27%23a%27/%3E%3Cuse xlink:href=%27%23b%27/%3E%3C/mask%3E%3Cg stroke=%27%23000%27 stroke-width=%273%27%3E%3Ccircle mask=%27url%28%23c%29%27 cx=%2711.5%27 cy=%2711.5%27 r=%279.25%27/%3E%3Cuse xlink:href=%27%23b%27 mask=%27url%28%23c%29%27/%3E%3C/g%3E%3Cg fill=%27%23fff%27%3E%3Cuse xlink:href=%27%23a%27/%3E%3Cuse xlink:href=%27%23b%27/%3E%3C/g%3E%3C/svg%3E"},5929:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 xmlns:xlink=%27http://www.w3.org/1999/xlink%27 fill-rule=%27evenodd%27 viewBox=%270 0 88 23%27%3E%3Cdefs%3E%3Cpath id=%27a%27 d=%27M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 0 1 3.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z%27/%3E%3Cpath id=%27b%27 d=%27M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 0 0-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 0 0 4.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 0 1-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 0 1 .3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 0 1-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z%27/%3E%3C/defs%3E%3Cmask id=%27c%27%3E%3Crect width=%27100%25%27 height=%27100%25%27 fill=%27%23fff%27/%3E%3Cuse xlink:href=%27%23a%27/%3E%3Cuse xlink:href=%27%23b%27/%3E%3C/mask%3E%3Cg stroke=%27%23fff%27 stroke-width=%273%27 fill=%27%23fff%27%3E%3Ccircle mask=%27url%28%23c%29%27 cx=%2711.5%27 cy=%2711.5%27 r=%279.25%27/%3E%3Cuse xlink:href=%27%23b%27 mask=%27url%28%23c%29%27/%3E%3C/g%3E%3Cuse xlink:href=%27%23a%27/%3E%3Cuse xlink:href=%27%23b%27/%3E%3C/svg%3E"},2780:function(t){"use strict";t.exports='data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20">%3Cpath d="M10,3.4 c-0.8,0-1.5,0.5-1.8,1.2H5l-1,1v1h12v-1l-1-1h-3.2C11.5,3.9,10.8,3.4,10,3.4z M5,8v7c0,1,1,2,2,2h6c1,0,2-1,2-2V8h-2v5.5h-1.5V8h-3 v5.5H7V8H5z"/>%3C/svg>'},1706:function(t){"use strict";t.exports='data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20">%3Cpath d="M12.1,2c-0.3,0-0.5,0.1-0.7,0.3l-1,1c-0.4,0.4-0.4,1,0,1.4l4.9,4.9c0.4,0.4,1,0.4,1.4,0l1-1 c0.4-0.4,0.4-1,0-1.4l-4.9-4.9C12.6,2.1,12.3,2,12.1,2z M8,8C7,8,7,9,7.5,9.5c0.3,0.3,1,1,1,1l-1,1c0,0-0.5,0.5,0,1s1,0,1,0l1-1l1,1 C11,13,12,13,12,12V8H8z M4,10c-0.3,0-0.5,0.1-0.7,0.3l-1,1c-0.4,0.4-0.4,1,0,1.4l1,1c0.4,0.4,1,0.4,1.4,0l1-1c0.4-0.4,0.4-1,0-1.4 l-1-1C4.5,10.1,4.3,10,4,10z M8,14c-0.3,0-0.5,0.1-0.7,0.3l-1,1c-0.4,0.4-0.4,1,0,1.4l1,1c0.4,0.4,1,0.4,1.4,0l1-1 c0.4-0.4,0.4-1,0-1.4l-1-1C8.5,14.1,8.3,14,8,14z"/>%3C/svg>'},192:function(t){"use strict";t.exports='data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20">%3Cpath d="m10 2c-3.3 0-6 2.7-6 6s6 9 6 9 6-5.7 6-9-2.7-6-6-6zm0 2c2.1 0 3.8 1.7 3.8 3.8 0 1.5-1.8 3.9-2.9 5.2h-1.7c-1.1-1.4-2.9-3.8-2.9-5.2-.1-2.1 1.6-3.8 3.7-3.8z"/>%3C/svg>'},4947:function(t){"use strict";t.exports='data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20">%3Cpath d="m12 2c-.3 0-.5.1-.7.3l-1 1c-.4.4-.4 1 0 1.4l1 1c.4.4 1 .4 1.4 0l1-1c.4-.4.4-1 0-1.4l-1-1c-.2-.2-.4-.3-.7-.3zm4 4c-.3 0-.5.1-.7.3l-1 1c-.4.4-.4 1 0 1.4l1 1c.4.4 1 .4 1.4 0l1-1c.4-.4.4-1 0-1.4l-1-1c-.2-.2-.4-.3-.7-.3zm-7 1c-1 0-1 1-.5 1.5.3.3 1 1 1 1l-1 1s-.5.5 0 1 1 0 1 0l1-1 1 1c.5.5 1.5.5 1.5-.5v-4zm-5 3c-.3 0-.5.1-.7.3l-1 1c-.4.4-.4 1 0 1.4l4.9 4.9c.4.4 1 .4 1.4 0l1-1c.4-.4.4-1 0-1.4l-4.9-4.9c-.1-.2-.4-.3-.7-.3z"/>%3C/svg>'},4363:function(t){"use strict";t.exports='data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20">%3Cpath d="m13.5 3.5c-1.4 0-2.5 1.1-2.5 2.5 0 .3 0 .6.2.9l-3.8 3.8c-.3-.1-.6-.2-.9-.2-1.4 0-2.5 1.1-2.5 2.5s1.1 2.5 2.5 2.5 2.5-1.1 2.5-2.5c0-.3 0-.6-.2-.9l3.8-3.8c.3.1.6.2.9.2 1.4 0 2.5-1.1 2.5-2.5s-1.1-2.5-2.5-2.5z"/>%3C/svg>'},263:function(t){"use strict";t.exports='data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20">%3Cpath d="m15 12.3v-4.6c.6-.3 1-1 1-1.7 0-1.1-.9-2-2-2-.7 0-1.4.4-1.7 1h-4.6c-.3-.6-1-1-1.7-1-1.1 0-2 .9-2 2 0 .7.4 1.4 1 1.7v4.6c-.6.3-1 1-1 1.7 0 1.1.9 2 2 2 .7 0 1.4-.4 1.7-1h4.6c.3.6 1 1 1.7 1 1.1 0 2-.9 2-2 0-.7-.4-1.4-1-1.7zm-8-.3v-4l1-1h4l1 1v4l-1 1h-4z"/>%3C/svg>'},7203:function(e){"use strict";e.exports=t},9125:function(){},768:function(t,e,n){"use strict";function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{Z:function(){return i}})}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={id:t,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.exports}i.m=e,function(){i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,{a:e}),e}}(),function(){i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}}(),function(){i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){i.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){i.p=""}(),function(){i.b=document.baseURI||self.location.href}();var r={};return function(){"use strict";i.r(r),i.d(r,{MapboxDraw:function(){return bm()},default:function(){return Wtt},drawLine:function(){return Ott},drawPoint:function(){return Itt},drawPolygon:function(){return Gtt},drawTools:function(){return Ett},jsonFile:function(){return Att},mapDraw:function(){return Vtt},mapEvent:function(){return Ztt},mapFullScreen:function(){return H7},mapLayers:function(){return Htt},mapLoad:function(){return U7},mapMarker:function(){return C7},mapRain:function(){return L7},mapSdk:function(){return vm},mapStyle:function(){return K7},mapTools:function(){return jtt},shpFile:function(){return vtt},turf:function(){return l}});var t={};i.r(t),i.d(t,{areaFactors:function(){return E},bearingToAzimuth:function(){return G},convertArea:function(){return Z},convertLength:function(){return j},degreesToRadians:function(){return V},earthRadius:function(){return x},factors:function(){return b},feature:function(){return C},featureCollection:function(){return F},geometry:function(){return B},geometryCollection:function(){return U},isNumber:function(){return W},isObject:function(){return X},lengthToDegrees:function(){return Q},lengthToRadians:function(){return z},lineString:function(){return L},lineStrings:function(){return P},multiLineString:function(){return R},multiPoint:function(){return D},multiPolygon:function(){return O},point:function(){return S},points:function(){return M},polygon:function(){return T},polygons:function(){return I},radiansToDegrees:function(){return H},radiansToLength:function(){return k},round:function(){return N},unitsFactors:function(){return w},validateBBox:function(){return K},validateId:function(){return q}});var e={};i.r(e),i.d(e,{coordAll:function(){return it},coordEach:function(){return J},coordReduce:function(){return Y},featureEach:function(){return et},featureReduce:function(){return nt},findPoint:function(){return At},findSegment:function(){return dt},flattenEach:function(){return st},flattenReduce:function(){return at},geomEach:function(){return rt},geomReduce:function(){return ot},lineEach:function(){return ut},lineReduce:function(){return ht},propEach:function(){return $},propReduce:function(){return tt},segmentEach:function(){return lt},segmentReduce:function(){return ct}});var n={};i.r(n),i.d(n,{collectionOf:function(){return xt},containsNumber:function(){return _t},featureOf:function(){return vt},geojsonType:function(){return yt},getCoord:function(){return gt},getCoords:function(){return mt},getGeom:function(){return bt},getType:function(){return wt}});var o={};i.r(o),i.d(o,{toMercator:function(){return xu},toWgs84:function(){return bu}});var s={};i.r(s),i.d(s,{randomLineString:function(){return Lu},randomPoint:function(){return Tu},randomPolygon:function(){return Iu},randomPosition:function(){return Mu}});var a={};i.r(a),i.d(a,{applyFilter:function(){return Qu},clusterEach:function(){return Nu},clusterReduce:function(){return ku},createBins:function(){return zu},filterProperties:function(){return Hu},getCluster:function(){return Uu},propertiesContainsFilter:function(){return Gu}});var l={};i.r(l),i.d(l,{along:function(){return Vi},angle:function(){return hu},applyFilter:function(){return Qu},area:function(){return ki},areaFactors:function(){return E},bbox:function(){return ft},bboxClip:function(){return co},bboxPolygon:function(){return Fn},bearing:function(){return Qn},bearingToAngle:function(){return G},bearingToAzimuth:function(){return G},bezier:function(){return Sn},bezierSpline:function(){return Sn},booleanClockwise:function(){return Lo},booleanContains:function(){return _l},booleanCrosses:function(){return Dl},booleanDisjoint:function(){return ml},booleanEqual:function(){return kl},booleanIntersects:function(){return zl},booleanOverlap:function(){return Ul},booleanParallel:function(){return ql},booleanPointInPolygon:function(){return Vt},booleanPointOnLine:function(){return Yi},booleanWithin:function(){return ur},buffer:function(){return qd},center:function(){return Zn},centerMean:function(){return iu},centerMedian:function(){return su},centerOfMass:function(){return qn},centroid:function(){return Xn},circle:function(){return zn},cleanCoords:function(){return cn},clone:function(){return le},clusterEach:function(){return Nu},clusterReduce:function(){return ku},clusters:function(){return a},clustersDbscan:function(){return Hl},clustersKmeans:function(){return Zl},collect:function(){return en},collectionOf:function(){return xt},combine:function(){return Yn},concave:function(){return Ye},containsNumber:function(){return _t},convertArea:function(){return Z},convertDistance:function(){return j},convertLength:function(){return j},convex:function(){return Ht},coordAll:function(){return it},coordEach:function(){return J},coordReduce:function(){return Y},createBins:function(){return zu},degrees2radians:function(){return V},degreesToRadians:function(){return V},destination:function(){return Nn},difference:function(){return Zu},dissolve:function(){return eA},distance:function(){return qt},distanceToDegrees:function(){return Q},distanceToRadians:function(){return z},distanceWeight:function(){return mu},earthRadius:function(){return x},ellipse:function(){return eu},envelope:function(){return Dn},explode:function(){return ti},factors:function(){return b},feature:function(){return C},featureCollection:function(){return F},featureEach:function(){return et},featureOf:function(){return vt},featureReduce:function(){return nt},filterProperties:function(){return Hu},findPoint:function(){return At},findSegment:function(){return dt},flatten:function(){return mr},flattenEach:function(){return st},flattenReduce:function(){return at},flip:function(){return rn},geojsonType:function(){return yt},geomEach:function(){return rt},geomReduce:function(){return ot},geometry:function(){return B},geometryCollection:function(){return U},getCluster:function(){return Uu},getCoord:function(){return gt},getCoords:function(){return mt},getGeom:function(){return bt},getType:function(){return wt},greatCircle:function(){return Qr},helpers:function(){return t},hexGrid:function(){return oA},inside:function(){return Vt},interpolate:function(){return mA},intersect:function(){return $d},invariant:function(){return n},isNumber:function(){return W},isObject:function(){return X},isobands:function(){return Sa},isolines:function(){return Qt},kinks:function(){return Pi},length:function(){return ji},lengthToDegrees:function(){return Q},lengthToRadians:function(){return z},lineArc:function(){return Xr},lineChunk:function(){return vr},lineDistance:function(){return ji},lineEach:function(){return ut},lineIntersect:function(){return gi},lineOffset:function(){return Wa},lineOverlap:function(){return fo},lineReduce:function(){return ht},lineSegment:function(){return di},lineSlice:function(){return Wi},lineSliceAlong:function(){return Ki},lineSplit:function(){return Wr},lineString:function(){return L},lineStringToPolygon:function(){return ro},lineStrings:function(){return P},lineToPolygon:function(){return ro},mask:function(){return uA},meta:function(){return e},midpoint:function(){return Vn},moranIndex:function(){return _u},multiLineString:function(){return R},multiPoint:function(){return D},multiPolygon:function(){return O},nearest:function(){return ai},nearestPoint:function(){return ai},nearestPointOnLine:function(){return _i},nearestPointToLine:function(){return Ti},planepoint:function(){return Li},point:function(){return S},pointGrid:function(){return dr},pointOnFeature:function(){return Ui},pointOnLine:function(){return _i},pointOnSurface:function(){return Ui},pointToLineDistance:function(){return Bi},points:function(){return M},pointsWithinPolygon:function(){return Xt},polygon:function(){return T},polygonSmooth:function(){return fu},polygonTangents:function(){return Io},polygonToLine:function(){return qr},polygonToLineString:function(){return qr},polygonize:function(){return ll},polygons:function(){return I},projection:function(){return o},propEach:function(){return $},propReduce:function(){return tt},propertiesContainsFilter:function(){return Gu},radians2degrees:function(){return H},radiansToDegrees:function(){return H},radiansToDistance:function(){return k},radiansToLength:function(){return k},random:function(){return s},randomLineString:function(){return Lu},randomPoint:function(){return Tu},randomPolygon:function(){return Iu},randomPosition:function(){return Mu},rewind:function(){return Oo},rhumbBearing:function(){return xo},rhumbDestination:function(){return Eo},rhumbDistance:function(){return xi},round:function(){return N},sample:function(){return Pn},sector:function(){return _o},segmentEach:function(){return lt},segmentReduce:function(){return ct},shortestPath:function(){return oc},simplify:function(){return xn},square:function(){return Un},squareGrid:function(){return AA},standardDeviationalEllipse:function(){return cu},tag:function(){return Tn},tesselate:function(){return oi},tin:function(){return Jt},toMercator:function(){return xu},toWgs84:function(){return bu},transformRotate:function(){return Ta},transformScale:function(){return Fa},transformTranslate:function(){return Da},triangleGrid:function(){return fA},truncate:function(){return fr},union:function(){return Yd},unitsFactors:function(){return w},unkinkPolygon:function(){return Fr},validateBBox:function(){return K},validateId:function(){return q},voronoi:function(){return Yc},within:function(){return Xt}});var c={};i.r(c),i.d(c,{decode:function(){return Z$},name:function(){return j$}});var u={};i.r(u),i.d(u,{name:function(){return t0},preprocess:function(){return e0}});var h={};i.r(h),i.d(h,{name:function(){return i0},preprocess:function(){return r0}});var d={};i.r(d),i.d(d,{decode:function(){return f1},encode:function(){return g1},name:function(){return A1},preprocess:function(){return p1}});var A={};i.r(A),i.d(A,{decode:function(){return T1},name:function(){return C1}});var p={};i.r(p),i.d(p,{decode:function(){return k1},encode:function(){return z1},name:function(){return N1}});var f={};i.r(f),i.d(f,{decode:function(){return H1},encode:function(){return V1},name:function(){return G1}});var g={};i.r(g),i.d(g,{decode:function(){return W1},encode:function(){return X1},name:function(){return Z1}});var m={};i.r(m),i.d(m,{decode:function(){return $1},name:function(){return Y1}});var _={};if(i.r(_),i.d(_,{CT:function(){return bm()},pS:function(){return Ott},Qd:function(){return Itt},is:function(){return Gtt},Cx:function(){return Ett},tP:function(){return Att},Gx:function(){return Vtt},A:function(){return Ztt},C2:function(){return H7},LY:function(){return Htt},jH:function(){return U7},QT:function(){return C7},V_:function(){return L7},xt:function(){return vm},UC:function(){return K7},zg:function(){return jtt},zn:function(){return vtt},XR:function(){return l}}),"undefined"!==typeof window){var y=window.document.currentScript,v=y&&y.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);v&&(i.p=v[1])}i(7203);var x=6371008.8,b={centimeters:100*x,centimetres:100*x,degrees:x/111325,feet:3.28084*x,inches:39.37*x,kilometers:x/1e3,kilometres:x/1e3,meters:x,metres:x,miles:x/1609.344,millimeters:1e3*x,millimetres:1e3*x,nauticalmiles:x/1852,radians:1,yards:1.0936*x},w={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/x,yards:1.0936133},E={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};function C(t,e,n){void 0===n&&(n={});var i={type:"Feature"};return(0===n.id||n.id)&&(i.id=n.id),n.bbox&&(i.bbox=n.bbox),i.properties=e||{},i.geometry=t,i}function B(t,e,n){switch(void 0===n&&(n={}),t){case"Point":return S(e).geometry;case"LineString":return L(e).geometry;case"Polygon":return T(e).geometry;case"MultiPoint":return D(e).geometry;case"MultiLineString":return R(e).geometry;case"MultiPolygon":return O(e).geometry;default:throw new Error(t+" is invalid")}}function S(t,e,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(!W(t[0])||!W(t[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:t};return C(i,e,n)}function M(t,e,n){return void 0===n&&(n={}),F(t.map((function(t){return S(t,e)})),n)}function T(t,e,n){void 0===n&&(n={});for(var i=0,r=t;i<r.length;i++){var o=r[i];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:t};return C(a,e,n)}function I(t,e,n){return void 0===n&&(n={}),F(t.map((function(t){return T(t,e)})),n)}function L(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");var i={type:"LineString",coordinates:t};return C(i,e,n)}function P(t,e,n){return void 0===n&&(n={}),F(t.map((function(t){return L(t,e)})),n)}function F(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function R(t,e,n){void 0===n&&(n={});var i={type:"MultiLineString",coordinates:t};return C(i,e,n)}function D(t,e,n){void 0===n&&(n={});var i={type:"MultiPoint",coordinates:t};return C(i,e,n)}function O(t,e,n){void 0===n&&(n={});var i={type:"MultiPolygon",coordinates:t};return C(i,e,n)}function U(t,e,n){void 0===n&&(n={});var i={type:"GeometryCollection",geometries:t};return C(i,e,n)}function N(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n}function k(t,e){void 0===e&&(e="kilometers");var n=b[e];if(!n)throw new Error(e+" units is invalid");return t*n}function z(t,e){void 0===e&&(e="kilometers");var n=b[e];if(!n)throw new Error(e+" units is invalid");return t/n}function Q(t,e){return H(z(t,e))}function G(t){var e=t%360;return e<0&&(e+=360),e}function H(t){var e=t%(2*Math.PI);return 180*e/Math.PI}function V(t){var e=t%360;return e*Math.PI/180}function j(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return k(z(t,e),n)}function Z(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=E[e];if(!i)throw new Error("invalid original units");var r=E[n];if(!r)throw new Error("invalid final units");return t/i*r}function W(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function X(t){return!!t&&t.constructor===Object}function K(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(!W(t))throw new Error("bbox must only contain numbers")}))}function q(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")}function J(t,e,n){if(null!==t)for(var i,r,o,s,a,l,c,u,h=0,d=0,A=t.type,p="FeatureCollection"===A,f="Feature"===A,g=p?t.features.length:1,m=0;m<g;m++){c=p?t.features[m].geometry:f?t.geometry:t,u=!!c&&"GeometryCollection"===c.type,a=u?c.geometries.length:1;for(var _=0;_<a;_++){var y=0,v=0;if(s=u?c.geometries[_]:c,null!==s){l=s.coordinates;var x=s.type;switch(h=!n||"Polygon"!==x&&"MultiPolygon"!==x?0:1,x){case null:break;case"Point":if(!1===e(l,d,m,y,v))return!1;d++,y++;break;case"LineString":case"MultiPoint":for(i=0;i<l.length;i++){if(!1===e(l[i],d,m,y,v))return!1;d++,"MultiPoint"===x&&y++}"LineString"===x&&y++;break;case"Polygon":case"MultiLineString":for(i=0;i<l.length;i++){for(r=0;r<l[i].length-h;r++){if(!1===e(l[i][r],d,m,y,v))return!1;d++}"MultiLineString"===x&&y++,"Polygon"===x&&v++}"Polygon"===x&&y++;break;case"MultiPolygon":for(i=0;i<l.length;i++){for(v=0,r=0;r<l[i].length;r++){for(o=0;o<l[i][r].length-h;o++){if(!1===e(l[i][r][o],d,m,y,v))return!1;d++}v++}y++}break;case"GeometryCollection":for(i=0;i<s.geometries.length;i++)if(!1===J(s.geometries[i],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Y(t,e,n,i){var r=n;return J(t,(function(t,i,o,s,a){r=0===i&&void 0===n?t:e(r,t,i,o,s,a)}),i),r}function $(t,e){var n;switch(t.type){case"FeatureCollection":for(n=0;n<t.features.length;n++)if(!1===e(t.features[n].properties,n))break;break;case"Feature":e(t.properties,0);break}}function tt(t,e,n){var i=n;return $(t,(function(t,r){i=0===r&&void 0===n?t:e(i,t,r)})),i}function et(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length;n++)if(!1===e(t.features[n],n))break}function nt(t,e,n){var i=n;return et(t,(function(t,r){i=0===r&&void 0===n?t:e(i,t,r)})),i}function it(t){var e=[];return J(t,(function(t){e.push(t)})),e}function rt(t,e){var n,i,r,o,s,a,l,c,u,h,d=0,A="FeatureCollection"===t.type,p="Feature"===t.type,f=A?t.features.length:1;for(n=0;n<f;n++){for(a=A?t.features[n].geometry:p?t.geometry:t,c=A?t.features[n].properties:p?t.properties:{},u=A?t.features[n].bbox:p?t.bbox:void 0,h=A?t.features[n].id:p?t.id:void 0,l=!!a&&"GeometryCollection"===a.type,s=l?a.geometries.length:1,r=0;r<s;r++)if(o=l?a.geometries[r]:a,null!==o)switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,d,c,u,h))return!1;break;case"GeometryCollection":for(i=0;i<o.geometries.length;i++)if(!1===e(o.geometries[i],d,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,d,c,u,h))return!1;d++}}function ot(t,e,n){var i=n;return rt(t,(function(t,r,o,s,a){i=0===r&&void 0===n?t:e(i,t,r,o,s,a)})),i}function st(t,e){rt(t,(function(t,n,i,r,o){var s,a=null===t?null:t.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return!1!==e(C(t,i,{bbox:r,id:o}),n,0)&&void 0}switch(a){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon";break}for(var l=0;l<t.coordinates.length;l++){var c=t.coordinates[l],u={type:s,coordinates:c};if(!1===e(C(u,i),n,l))return!1}}))}function at(t,e,n){var i=n;return st(t,(function(t,r,o){i=0===r&&0===o&&void 0===n?t:e(i,t,r,o)})),i}function lt(t,e){st(t,(function(t,n,i){var r=0;if(t.geometry){var o=t.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var s,a=0,l=0,c=0;return!1!==J(t,(function(o,u,h,d,A){if(void 0===s||n>a||d>l||A>c)return s=o,a=n,l=d,c=A,void(r=0);var p=L([s,o],t.properties);if(!1===e(p,n,i,A,r))return!1;r++,s=o}))&&void 0}}}))}function ct(t,e,n){var i=n,r=!1;return lt(t,(function(t,o,s,a,l){i=!1===r&&void 0===n?t:e(i,t,o,s,a,l),r=!0})),i}function ut(t,e){if(!t)throw new Error("geojson is required");st(t,(function(t,n,i){if(null!==t.geometry){var r=t.geometry.type,o=t.geometry.coordinates;switch(r){case"LineString":if(!1===e(t,n,i,0,0))return!1;break;case"Polygon":for(var s=0;s<o.length;s++)if(!1===e(L(o[s],t.properties),n,i,s))return!1;break}}}))}function ht(t,e,n){var i=n;return ut(t,(function(t,r,o,s){i=0===r&&void 0===n?t:e(i,t,r,o,s)})),i}function dt(t,e){if(e=e||{},!X(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,r=e.multiFeatureIndex||0,o=e.geometryIndex||0,s=e.segmentIndex||0,a=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),a=a||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":a=a||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 s<0&&(s=l.length+s-1),L([l[s],l[s+1]],a,e);case"Polygon":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s-1),L([l[o][s],l[o][s+1]],a,e);case"MultiLineString":return r<0&&(r=l.length+r),s<0&&(s=l[r].length+s-1),L([l[r][s],l[r][s+1]],a,e);case"MultiPolygon":return r<0&&(r=l.length+r),o<0&&(o=l[r].length+o),s<0&&(s=l[r][o].length-s-1),L([l[r][o][s],l[r][o][s+1]],a,e)}throw new Error("geojson is invalid")}function At(t,e){if(e=e||{},!X(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,r=e.multiFeatureIndex||0,o=e.geometryIndex||0,s=e.coordIndex||0,a=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),a=a||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":a=a||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 S(l,a,e);case"MultiPoint":return r<0&&(r=l.length+r),S(l[r],a,e);case"LineString":return s<0&&(s=l.length+s),S(l[s],a,e);case"Polygon":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s),S(l[o][s],a,e);case"MultiLineString":return r<0&&(r=l.length+r),s<0&&(s=l[r].length+s),S(l[r][s],a,e);case"MultiPolygon":return r<0&&(r=l.length+r),o<0&&(o=l[r].length+o),s<0&&(s=l[r][o].length-s),S(l[r][o][s],a,e)}throw new Error("geojson is invalid")}function pt(t){var e=[1/0,1/0,-1/0,-1/0];return J(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}pt["default"]=pt;var ft=pt;function gt(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 mt(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 _t(t){if(t.length>1&&W(t[0])&&W(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return _t(t[0]);throw new Error("coordinates must only contain numbers")}function yt(t,e,n){if(!e||!n)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.type)}function vt(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)}function xt(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var i=0,r=t.features;i<r.length;i++){var o=r[i];if(!o||"Feature"!==o.type||!o.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!o.geometry||o.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+o.geometry.type)}}function bt(t){return"Feature"===t.type?t.geometry:t}function wt(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}var Et=i(4655),Ct={successCallback:null,verbose:!1},Bt={};function St(t,e,n){n=n||{};for(var i=Object.keys(Ct),r=0;r<i.length;r++){var o=i[r],s=n[o];s="undefined"!==typeof s&&null!==s?s:Ct[o],Bt[o]=s}Bt.verbose&&console.log("MarchingSquaresJS-isoContours: computing isocontour for "+e);var a=Rt(Tt(t,e));return"function"===typeof Bt.successCallback&&Bt.successCallback(a),a}function Mt(t,e,n){return(t-e)/(n-e)}function Tt(t,e){for(var n=t.length-1,i=t[0].length-1,r={rows:n,cols:i,cells:[]},o=0;o<n;++o){r.cells[o]=[];for(var s=0;s<i;++s){var a=0,l=t[o+1][s],c=t[o+1][s+1],u=t[o][s+1],h=t[o][s];if(!(isNaN(l)||isNaN(c)||isNaN(u)||isNaN(h))){a|=l>=e?8:0,a|=c>=e?4:0,a|=u>=e?2:0,a|=h>=e?1:0;var d,A,p,f,g=!1;if(5===a||10===a){var m=(l+c+u+h)/4;5===a&&m<e?(a=10,g=!0):10===a&&m<e&&(a=5,g=!0)}if(0!==a&&15!==a)d=A=p=f=.5,1===a?(p=1-Mt(e,l,h),A=1-Mt(e,u,h)):2===a?(A=Mt(e,h,u),f=1-Mt(e,c,u)):3===a?(p=1-Mt(e,l,h),f=1-Mt(e,c,u)):4===a?(d=Mt(e,l,c),f=Mt(e,u,c)):5===a?(d=Mt(e,l,c),f=Mt(e,u,c),A=1-Mt(e,u,h),p=1-Mt(e,l,h)):6===a?(A=Mt(e,h,u),d=Mt(e,l,c)):7===a?(p=1-Mt(e,l,h),d=Mt(e,l,c)):8===a?(p=Mt(e,h,l),d=1-Mt(e,c,l)):9===a?(A=1-Mt(e,u,h),d=1-Mt(e,c,l)):10===a?(d=1-Mt(e,c,l),f=1-Mt(e,c,u),A=Mt(e,h,u),p=Mt(e,h,l)):11===a?(d=1-Mt(e,c,l),f=1-Mt(e,c,u)):12===a?(p=Mt(e,h,l),f=Mt(e,u,c)):13===a?(A=1-Mt(e,u,h),f=Mt(e,u,c)):14===a?(p=Mt(e,h,l),A=Mt(e,h,u)):console.log("MarchingSquaresJS-isoContours: Illegal cval detected: "+a),r.cells[o][s]={cval:a,flipped:g,top:d,right:f,bottom:A,left:p}}}}return r}function It(t){return 5===t.cval||10===t.cval}function Lt(t){return 0===t.cval||15===t.cval}function Pt(t){Lt(t)||5===t.cval||10===t.cval||(t.cval=15)}function Ft(t,e){return"top"===e?[t.top,1]:"bottom"===e?[t.bottom,0]:"right"===e?[1,t.right]:"left"===e?[0,t.left]:void 0}function Rt(t){var e=[],n=0,i=1e-7;return t.cells.forEach((function(r,o){r.forEach((function(r,s){if("undefined"!==typeof r&&!It(r)&&!Lt(r)){var a=Dt(t.cells,o,s),l=!1;if("mergeable"===a.info)for(var c=a.path[a.path.length-1][0],u=a.path[a.path.length-1][1],h=n-1;h>=0;h--)if(Math.abs(e[h][0][0]-c)<=i&&Math.abs(e[h][0][1]-u)<=i){for(var d=a.path.length-2;d>=0;--d)e[h].unshift(a.path[d]);l=!0;break}l||(e[n++]=a.path)}}))})),e}function Dt(t,e,n){var i,r,o=t.length,s=[],a=[0,0,1,1,0,0,0,0,-1,0,1,1,-1,0,-1,0],l=[0,-1,0,0,1,1,1,1,0,-1,0,0,0,-1,0,0],c=["none","left","bottom","left","right","none","bottom","left","top","top","none","top","right","right","bottom","none"],u=["none","bottom","right","right","top","top","top","top","left","bottom","right","right","left","bottom","left","none"],h=t[e][n],d=h.cval,A=c[d],p=Ft(h,A);s.push([n+p[0],e+p[1]]),A=u[d],p=Ft(h,A),s.push([n+p[0],e+p[1]]),Pt(h);var f=n+a[d],g=e+l[d],m=d;while(f>=0&&g>=0&&g<o&&(f!=n||g!=e)){if(h=t[g][f],"undefined"===typeof h)break;if(d=h.cval,0===d||15===d)return{path:s,info:"mergeable"};A=u[d],i=a[d],r=l[d],5!==d&&10!==d||(5===d?h.flipped?-1===l[m]?(A="left",i=-1,r=0):(A="right",i=1,r=0):-1===a[m]&&(A="bottom",i=0,r=-1):10===d&&(h.flipped?-1===a[m]?(A="top",i=0,r=1):(A="bottom",i=0,r=-1):1===l[m]&&(A="left",i=-1,r=0))),p=Ft(h,A),s.push([f+p[0],g+p[1]]),Pt(h),f+=i,g+=r,m=d}return{path:s,info:"closed"}}function Ot(t,e){if(e=e||{},!X(e))throw new Error("options is invalid");var n=e.zProperty||"elevation",i=e.flip,r=e.flags;xt(t,"Point","input must contain Points");for(var o=Ut(t,i),s=[],a=0;a<o.length;a++){for(var l=o[a],c=[],u=0;u<l.length;u++){var h=l[u];h.properties[n]?c.push(h.properties[n]):c.push(0),!0===r&&(h.properties.matrixPosition=[a,u])}s.push(c)}return s}function Ut(t,e){var n={};et(t,(function(t){var e=mt(t)[1];n[e]||(n[e]=[]),n[e].push(t)}));var i=Object.keys(n).map((function(t){var e=n[t],i=e.sort((function(t,e){return mt(t)[0]-mt(e)[0]}));return i})),r=i.sort((function(t,n){return e?mt(t[0])[1]-mt(n[0])[1]:mt(n[0])[1]-mt(t[0])[1]}));return r}function Nt(t,e,n){if(n=n||{},!X(n))throw new Error("options is invalid");var i=n.zProperty||"elevation",r=n.commonProperties||{},o=n.breaksProperties||[];if(xt(t,"Point","Input must contain Points"),!e)throw new Error("breaks is required");if(!Array.isArray(e))throw new Error("breaks must be an Array");if(!X(r))throw new Error("commonProperties must be an Object");if(!Array.isArray(o))throw new Error("breaksProperties must be an Array");var s=Ot(t,{zProperty:i,flip:!0}),a=kt(s,e,i,r,o),l=zt(a,s,t);return F(l)}function kt(t,e,n,i,r){for(var o=[],s=1;s<e.length;s++){var a=+e[s],l=Et({},i,r[s]);l[n]=a;var c=R(St(t,a),l);o.push(c)}return o}function zt(t,e,n){var i=ft(n),r=i[2]-i[0],o=i[3]-i[1],s=i[0],a=i[1],l=e[0].length-1,c=e.length-1,u=r/l,h=o/c,d=function(t){t[0]=t[0]*u+s,t[1]=t[1]*h+a};return t.forEach((function(t){J(t,d)})),t}var Qt=Nt,Gt=i(9440);function Ht(t,e){void 0===e&&(e={}),e.concavity=e.concavity||1/0;var n=[];if(J(t,(function(t){n.push([t[0],t[1]])})),!n.length)return null;var i=Gt(n,e.concavity);return i.length>3?T([i]):null}function Vt(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var i=gt(t),r=bt(e),o=r.type,s=e.bbox,a=r.coordinates;if(s&&!1===Zt(i,s))return!1;"Polygon"===o&&(a=[a]);for(var l=!1,c=0;c<a.length&&!l;c++)if(jt(i,a[c][0],n.ignoreBoundary)){var u=!1,h=1;while(h<a[c].length&&!u)jt(i,a[c][h],!n.ignoreBoundary)&&(u=!0),h++;u||(l=!0)}return l}function jt(t,e,n){var i=!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 r=0,o=e.length-1;r<e.length;o=r++){var s=e[r][0],a=e[r][1],l=e[o][0],c=e[o][1],u=t[1]*(s-l)+a*(l-t[0])+c*(t[0]-s)===0&&(s-t[0])*(l-t[0])<=0&&(a-t[1])*(c-t[1])<=0;if(u)return!n;var h=a>t[1]!==c>t[1]&&t[0]<(l-s)*(t[1]-a)/(c-a)+s;h&&(i=!i)}return i}function Zt(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}function Wt(t,e){var n=[];return et(t,(function(t){var i=!1;if("Point"===t.geometry.type)rt(e,(function(e){Vt(t,e)&&(i=!0)})),i&&n.push(t);else{if("MultiPoint"!==t.geometry.type)throw new Error("Input geometry must be a Point or MultiPoint");var r=[];rt(e,(function(e){J(t,(function(t){Vt(t,e)&&(i=!0,r.push(t))}))})),i&&n.push(D(r))}})),F(n)}var Xt=Wt;function Kt(t,e,n){void 0===n&&(n={});var i=gt(t),r=gt(e),o=V(r[1]-i[1]),s=V(r[0]-i[0]),a=V(i[1]),l=V(r[1]),c=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(a)*Math.cos(l);return k(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),n.units)}var qt=Kt;function Jt(t,e){var n=!1;return F(ee(t.features.map((function(t){var i={x:t.geometry.coordinates[0],y:t.geometry.coordinates[1]};return e?i.z=t.properties[e]:3===t.geometry.coordinates.length&&(n=!0,i.z=t.geometry.coordinates[2]),i}))).map((function(t){var e=[t.a.x,t.a.y],i=[t.b.x,t.b.y],r=[t.c.x,t.c.y],o={};return n?(e.push(t.a.z),i.push(t.b.z),r.push(t.c.z)):o={a:t.a.z,b:t.b.z,c:t.c.z},T([[e,i,r,e]],o)})))}var Yt=function(){function t(t,e,n){this.a=t,this.b=e,this.c=n;var i,r,o=e.x-t.x,s=e.y-t.y,a=n.x-t.x,l=n.y-t.y,c=o*(t.x+e.x)+s*(t.y+e.y),u=a*(t.x+n.x)+l*(t.y+n.y),h=2*(o*(n.y-e.y)-s*(n.x-e.x));this.x=(l*c-s*u)/h,this.y=(o*u-a*c)/h,i=this.x-t.x,r=this.y-t.y,this.r=i*i+r*r}return t}();function $t(t,e){return e.x-t.x}function te(t){var e,n,i,r,o,s=t.length;t:while(s){n=t[--s],e=t[--s],i=s;while(i)if(o=t[--i],r=t[--i],e===r&&n===o||e===o&&n===r){t.splice(s,2),t.splice(i,2),s-=2;continue t}}}function ee(t){if(t.length<3)return[];t.sort($t);var e,n,i,r,o,s,a=t.length-1,l=t[a].x,c=t[0].x,u=t[a].y,h=u,d=1e-12;while(a--)t[a].y<u&&(u=t[a].y),t[a].y>h&&(h=t[a].y);var A,p=c-l,f=h-u,g=p>f?p:f,m=.5*(c+l),_=.5*(h+u),y=[new Yt({__sentinel:!0,x:m-20*g,y:_-g},{__sentinel:!0,x:m,y:_+20*g},{__sentinel:!0,x:m+20*g,y:_-g})],v=[],x=[];a=t.length;while(a--){x.length=0,A=y.length;while(A--)p=t[a].x-y[A].x,p>0&&p*p>y[A].r?(v.push(y[A]),y.splice(A,1)):(f=t[a].y-y[A].y,p*p+f*f>y[A].r||(x.push(y[A].a,y[A].b,y[A].b,y[A].c,y[A].c,y[A].a),y.splice(A,1)));te(x),A=x.length;while(A)n=x[--A],e=x[--A],i=t[a],r=n.x-e.x,o=n.y-e.y,s=2*(r*(i.y-n.y)-o*(i.x-n.x)),Math.abs(s)>d&&y.push(new Yt(e,n,i))}Array.prototype.push.apply(v,y),a=v.length;while(a--)(v[a].a.__sentinel||v[a].b.__sentinel||v[a].c.__sentinel)&&v.splice(a,1);return v}function ne(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return ie(t);case"FeatureCollection":return oe(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return se(t);default:throw new Error("unknown GeoJSON type")}}function ie(t){var e={type:"Feature"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"properties":case"geometry":return;default:e[n]=t[n]}})),e.properties=re(t.properties),e.geometry=se(t.geometry),e}function re(t){var e={};return t?(Object.keys(t).forEach((function(n){var i=t[n];"object"===typeof i?null===i?e[n]=null:Array.isArray(i)?e[n]=i.map((function(t){return t})):e[n]=re(i):e[n]=i})),e):e}function oe(t){var e={type:"FeatureCollection"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"features":return;default:e[n]=t[n]}})),e.features=t.features.map((function(t){return ie(t)})),e}function se(t){var e={type:t.type};return t.bbox&&(e.bbox=t.bbox),"GeometryCollection"===t.type?(e.geometries=t.geometries.map((function(t){return se(t)})),e):(e.coordinates=ae(t.coordinates),e)}function ae(t){var e=t;return"object"!==typeof e[0]?e.slice():e.map((function(t){return ae(t)}))}var le=ne;function ce(t,e){if(void 0===e&&(e={}),e=e||{},!X(e))throw new Error("options is invalid");var n=e.mutate;if("FeatureCollection"!==wt(t))throw new Error("geojson must be a FeatureCollection");if(!t.features.length)throw new Error("geojson is empty");!1!==n&&void 0!==n||(t=le(t));var i=[],r=ht(t,(function(t,e){var n=he(t,e);return n||(i.push(t),e)}));return r&&i.push(r),i.length?1===i.length?i[0]:R(i.map((function(t){return t.coordinates}))):null}function ue(t){return t[0].toString()+","+t[1].toString()}function he(t,e){var n,i=t.geometry.coordinates,r=e.geometry.coordinates,o=ue(i[0]),s=ue(i[i.length-1]),a=ue(r[0]),l=ue(r[r.length-1]);if(o===l)n=r.concat(i.slice(1));else if(a===s)n=i.concat(r.slice(1));else if(o===a)n=i.slice(1).reverse().concat(r);else{if(s!==l)return null;n=i.concat(r.reverse().slice(1))}return L(n)}var de=ce;function Ae(t,e){var n,i=t.length,r=i-e;while(r<--i)n=t[r],t[r++]=t[i],t[i]=n}function pe(t){return t}function fe(t){if(null==t)return pe;var e,n,i=t.scale[0],r=t.scale[1],o=t.translate[0],s=t.translate[1];return function(t,a){a||(e=n=0);var l=2,c=t.length,u=new Array(c);u[0]=(e+=t[0])*i+o,u[1]=(n+=t[1])*r+s;while(l<c)u[l]=t[l],++l;return u}}function ge(t,e){var n=fe(t.transform),i=t.arcs;function r(t,e){e.length&&e.pop();for(var r=i[t<0?~t:t],o=0,s=r.length;o<s;++o)e.push(n(r[o],o));t<0&&Ae(e,s)}function o(t){return n(t)}function s(t){for(var e=[],n=0,i=t.length;n<i;++n)r(t[n],e);return e.length<2&&e.push(e[0]),e}function a(t){var e=s(t);while(e.length<4)e.push(e[0]);return e}function l(t){return t.map(a)}function c(t){var e,n=t.type;switch(n){case"GeometryCollection":return{type:n,geometries:t.geometries.map(c)};case"Point":e=o(t.coordinates);break;case"MultiPoint":e=t.coordinates.map(o);break;case"LineString":e=s(t.arcs);break;case"MultiLineString":e=t.arcs.map(s);break;case"Polygon":e=l(t.arcs);break;case"MultiPolygon":e=t.arcs.map(l);break;default:return null}return{type:n,coordinates:e}}return c(e)}function me(t,e){var n={},i={},r={},o=[],s=-1;function a(e){var n,i=t.arcs[e<0?~e:e],r=i[0];return t.transform?(n=[0,0],i.forEach((function(t){n[0]+=t[0],n[1]+=t[1]}))):n=i[i.length-1],e<0?[n,r]:[r,n]}function l(t,e){for(var i in t){var r=t[i];delete e[r.start],delete r.start,delete r.end,r.forEach((function(t){n[t<0?~t:t]=1})),o.push(r)}}return e.forEach((function(n,i){var r,o=t.arcs[n<0?~n:n];o.length<3&&!o[1][0]&&!o[1][1]&&(r=e[++s],e[s]=n,e[i]=r)})),e.forEach((function(t){var e,n,o=a(t),s=o[0],l=o[1];if(e=r[s])if(delete r[e.end],e.push(t),e.end=l,n=i[l]){delete i[n.start];var c=n===e?e:e.concat(n);i[c.start=e.start]=r[c.end=n.end]=c}else i[e.start]=r[e.end]=e;else if(e=i[l])if(delete i[e.start],e.unshift(t),e.start=s,n=r[s]){delete r[n.end];var u=n===e?e:n.concat(e);i[u.start=n.start]=r[u.end=e.end]=u}else i[e.start]=r[e.end]=e;else e=[t],i[e.start=s]=r[e.end=l]=e})),l(r,i),l(i,r),e.forEach((function(t){n[t<0?~t:t]||o.push([t])})),o}function _e(t){var e,n=-1,i=t.length,r=t[i-1],o=0;while(++n<i)e=r,r=t[n],o+=e[0]*r[1]-e[1]*r[0];return Math.abs(o)}function ye(t){return ge(t,ve.apply(this,arguments))}function ve(t,e){var n={},i=[],r=[];function o(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(o);break;case"Polygon":s(t.arcs);break;case"MultiPolygon":t.arcs.forEach(s);break}}function s(t){t.forEach((function(e){e.forEach((function(e){(n[e=e<0?~e:e]||(n[e]=[])).push(t)}))})),i.push(t)}function a(e){return _e(ge(t,{type:"Polygon",arcs:[e]}).coordinates[0])}return e.forEach(o),i.forEach((function(t){if(!t._){var e=[],i=[t];t._=1,r.push(e);while(t=i.pop())e.push(t),t.forEach((function(t){t.forEach((function(t){n[t<0?~t:t].forEach((function(t){t._||(t._=1,i.push(t))}))}))}))}})),i.forEach((function(t){delete t._})),{type:"MultiPolygon",arcs:r.map((function(e){var i,r=[];if(e.forEach((function(t){t.forEach((function(t){t.forEach((function(t){n[t<0?~t:t].length<2&&r.push(t)}))}))})),r=me(t,r),(i=r.length)>1)for(var o,s,l=1,c=a(r[0]);l<i;++l)(o=a(r[l]))>c&&(s=r[0],r[0]=r[l],r[l]=s,c=o);return r})).filter((function(t){return t.length>0}))}}var xe=Object.prototype.hasOwnProperty;function be(t){var e=1/0,n=1/0,i=-1/0,r=-1/0;function o(t){null!=t&&xe.call(s,t.type)&&s[t.type](t)}var s={GeometryCollection:function(t){t.geometries.forEach(o)},Point:function(t){a(t.coordinates)},MultiPoint:function(t){t.coordinates.forEach(a)},LineString:function(t){l(t.arcs)},MultiLineString:function(t){t.arcs.forEach(l)},Polygon:function(t){t.arcs.forEach(l)},MultiPolygon:function(t){t.arcs.forEach(c)}};function a(t){var o=t[0],s=t[1];o<e&&(e=o),o>i&&(i=o),s<n&&(n=s),s>r&&(r=s)}function l(t){t.forEach(a)}function c(t){t.forEach(l)}for(var u in t)o(t[u]);return i>=e&&r>=n?[e,n,i,r]:void 0}function we(t,e,n,i,r){3===arguments.length&&(i=Array,r=null);for(var o=new i(t=1<<Math.max(4,Math.ceil(Math.log(t)/Math.LN2))),s=t-1,a=0;a<t;++a)o[a]=r;function l(i){var a=e(i)&s,l=o[a],c=0;while(l!=r){if(n(l,i))return!0;if(++c>=t)throw new Error("full hashset");l=o[a=a+1&s]}return o[a]=i,!0}function c(i){var a=e(i)&s,l=o[a],c=0;while(l!=r){if(n(l,i))return!0;if(++c>=t)break;l=o[a=a+1&s]}return!1}function u(){for(var t=[],e=0,n=o.length;e<n;++e){var i=o[e];i!=r&&t.push(i)}return t}return{add:l,has:c,values:u}}function Ee(t,e,n,i,r,o){3===arguments.length&&(i=o=Array,r=null);for(var s=new i(t=1<<Math.max(4,Math.ceil(Math.log(t)/Math.LN2))),a=new o(t),l=t-1,c=0;c<t;++c)s[c]=r;function u(i,o){var c=e(i)&l,u=s[c],h=0;while(u!=r){if(n(u,i))return a[c]=o;if(++h>=t)throw new Error("full hashmap");u=s[c=c+1&l]}return s[c]=i,a[c]=o,o}function h(i,o){var c=e(i)&l,u=s[c],h=0;while(u!=r){if(n(u,i))return a[c];if(++h>=t)throw new Error("full hashmap");u=s[c=c+1&l]}return s[c]=i,a[c]=o,o}function d(i,o){var c=e(i)&l,u=s[c],h=0;while(u!=r){if(n(u,i))return a[c];if(++h>=t)break;u=s[c=c+1&l]}return o}function A(){for(var t=[],e=0,n=s.length;e<n;++e){var i=s[e];i!=r&&t.push(i)}return t}return{set:u,maybeSet:h,get:d,keys:A}}function Ce(t,e){return t[0]===e[0]&&t[1]===e[1]}var Be=new ArrayBuffer(16),Se=new Float64Array(Be),Me=new Uint32Array(Be);function Te(t){Se[0]=t[0],Se[1]=t[1];var e=Me[0]^Me[1];return e=e<<5^e>>7^Me[2]^Me[3],2147483647&e}function Ie(t){var e,n,i,r,o,s=t.coordinates,a=t.lines,l=t.rings,c=b(),u=new Int32Array(s.length),h=new Int32Array(s.length),d=new Int32Array(s.length),A=new Int8Array(s.length),p=0;for(e=0,n=s.length;e<n;++e)u[e]=h[e]=d[e]=-1;for(e=0,n=a.length;e<n;++e){var f=a[e],g=f[0],m=f[1];r=c[g],o=c[++g],++p,A[r]=1;while(++g<=m)x(e,i=r,r=o,o=c[g]);++p,A[o]=1}for(e=0,n=s.length;e<n;++e)u[e]=-1;for(e=0,n=l.length;e<n;++e){var _=l[e],y=_[0]+1,v=_[1];i=c[v-1],r=c[y-1],o=c[y],x(e,i,r,o);while(++y<=v)x(e,i=r,r=o,o=c[y])}function x(t,e,n,i){if(u[n]!==t){u[n]=t;var r=h[n];if(r>=0){var o=d[n];r===e&&o===i||r===i&&o===e||(++p,A[n]=1)}else h[n]=e,d[n]=i}}function b(){for(var t=Ee(1.4*s.length,w,E,Int32Array,-1,Int32Array),e=new Int32Array(s.length),n=0,i=s.length;n<i;++n)e[n]=t.maybeSet(n,n);return e}function w(t){return Te(s[t])}function E(t,e){return Ce(s[t],s[e])}u=h=d=null;var C,B=we(1.4*p,Te,Ce);for(e=0,n=s.length;e<n;++e)A[C=c[e]]&&B.add(s[C]);return B}function Le(t){var e,n,i,r=Ie(t),o=t.coordinates,s=t.lines,a=t.rings;for(n=0,i=s.length;n<i;++n){var l=s[n],c=l[0],u=l[1];while(++c<u)r.has(o[c])&&(e={0:c,1:l[1]},l[1]=c,l=l.next=e)}for(n=0,i=a.length;n<i;++n){var h=a[n],d=h[0],A=d,p=h[1],f=r.has(o[d]);while(++A<p)r.has(o[A])&&(f?(e={0:A,1:h[1]},h[1]=A,h=h.next=e):(Pe(o,d,p,p-A),o[p]=o[d],f=!0,A=d))}return t}function Pe(t,e,n,i){Fe(t,e,n),Fe(t,e,e+i),Fe(t,e+i,n)}function Fe(t,e,n){for(var i,r=e+(n---e>>1);e<r;++e,--n)i=t[e],t[e]=t[n],t[n]=i}function Re(t){var e,n,i,r,o=t.coordinates,s=t.lines,a=t.rings,l=s.length+a.length;for(delete t.lines,delete t.rings,i=0,r=s.length;i<r;++i){e=s[i];while(e=e.next)++l}for(i=0,r=a.length;i<r;++i){n=a[i];while(n=n.next)++l}var c=Ee(2*l*1.4,Te,Ce),u=t.arcs=[];for(i=0,r=s.length;i<r;++i){e=s[i];do{h(e)}while(e=e.next)}for(i=0,r=a.length;i<r;++i)if(n=a[i],n.next)do{h(n)}while(n=n.next);else d(n);function h(t){var e,n,i,r,s,a,l,h;if(i=c.get(e=o[t[0]]))for(l=0,h=i.length;l<h;++l)if(r=i[l],A(r,t))return t[0]=r[0],void(t[1]=r[1]);if(s=c.get(n=o[t[1]]))for(l=0,h=s.length;l<h;++l)if(a=s[l],p(a,t))return t[1]=a[0],void(t[0]=a[1]);i?i.push(t):c.set(e,[t]),s?s.push(t):c.set(n,[t]),u.push(t)}function d(t){var e,n,i,r,s;if(n=c.get(e=o[t[0]]))for(r=0,s=n.length;r<s;++r){if(i=n[r],f(i,t))return t[0]=i[0],void(t[1]=i[1]);if(g(i,t))return t[0]=i[1],void(t[1]=i[0])}if(n=c.get(e=o[t[0]+m(t)]))for(r=0,s=n.length;r<s;++r){if(i=n[r],f(i,t))return t[0]=i[0],void(t[1]=i[1]);if(g(i,t))return t[0]=i[1],void(t[1]=i[0])}n?n.push(t):c.set(e,[t]),u.push(t)}function A(t,e){var n=t[0],i=e[0],r=t[1],s=e[1];if(n-r!==i-s)return!1;for(;n<=r;++n,++i)if(!Ce(o[n],o[i]))return!1;return!0}function p(t,e){var n=t[0],i=e[0],r=t[1],s=e[1];if(n-r!==i-s)return!1;for(;n<=r;++n,--s)if(!Ce(o[n],o[s]))return!1;return!0}function f(t,e){var n=t[0],i=e[0],r=t[1],s=e[1],a=r-n;if(a!==s-i)return!1;for(var l=m(t),c=m(e),u=0;u<a;++u)if(!Ce(o[n+(u+l)%a],o[i+(u+c)%a]))return!1;return!0}function g(t,e){var n=t[0],i=e[0],r=t[1],s=e[1],a=r-n;if(a!==s-i)return!1;for(var l=m(t),c=a-m(e),u=0;u<a;++u)if(!Ce(o[n+(u+l)%a],o[s-(u+c)%a]))return!1;return!0}function m(t){var e=t[0],n=t[1],i=e,r=i,s=o[i];while(++i<n){var a=o[i];(a[0]<s[0]||a[0]===s[0]&&a[1]<s[1])&&(r=i,s=a)}return r-e}return t}function De(t){var e=-1,n=t.length;while(++e<n){var i,r,o=t[e],s=0,a=1,l=o.length,c=o[0],u=c[0],h=c[1];while(++s<l)c=o[s],i=c[0],r=c[1],i===u&&r===h||(o[a++]=[i-u,r-h],u=i,h=r);1===a&&(o[a++]=[0,0]),o.length=a}return t}function Oe(t){var e=-1,n=[],i=[],r=[];function o(t){t&&xe.call(s,t.type)&&s[t.type](t)}var s={GeometryCollection:function(t){t.geometries.forEach(o)},LineString:function(t){t.arcs=a(t.arcs)},MultiLineString:function(t){t.arcs=t.arcs.map(a)},Polygon:function(t){t.arcs=t.arcs.map(l)},MultiPolygon:function(t){t.arcs=t.arcs.map(c)}};function a(t){for(var i=0,o=t.length;i<o;++i)r[++e]=t[i];var s={0:e-o+1,1:e};return n.push(s),s}function l(t){for(var n=0,o=t.length;n<o;++n)r[++e]=t[n];var s={0:e-o+1,1:e};return i.push(s),s}function c(t){return t.map(l)}for(var u in t)o(t[u]);return{type:"Topology",coordinates:r,lines:n,rings:i,objects:t}}function Ue(t){var e,n={};for(e in t)n[e]=Ne(t[e]);return n}function Ne(t){return null==t?{type:null}:("FeatureCollection"===t.type?ke:"Feature"===t.type?ze:Qe)(t)}function ke(t){var e={type:"GeometryCollection",geometries:t.features.map(ze)};return null!=t.bbox&&(e.bbox=t.bbox),e}function ze(t){var e,n=Qe(t.geometry);for(e in null!=t.id&&(n.id=t.id),null!=t.bbox&&(n.bbox=t.bbox),t.properties){n.properties=t.properties;break}return n}function Qe(t){if(null==t)return{type:null};var e="GeometryCollection"===t.type?{type:"GeometryCollection",geometries:t.geometries.map(Qe)}:"Point"===t.type||"MultiPoint"===t.type?{type:t.type,coordinates:t.coordinates}:{type:t.type,arcs:t.coordinates};return null!=t.bbox&&(e.bbox=t.bbox),e}function Ge(t,e,n){var i=e[0],r=e[1],o=e[2],s=e[3],a=o-i?(n-1)/(o-i):1,l=s-r?(n-1)/(s-r):1;function c(t){return[Math.round((t[0]-i)*a),Math.round((t[1]-r)*l)]}function u(t,e){var n,o,s,c,u,h=-1,d=0,A=t.length,p=new Array(A);while(++h<A)n=t[h],c=Math.round((n[0]-i)*a),u=Math.round((n[1]-r)*l),c===o&&u===s||(p[d++]=[o=c,s=u]);p.length=d;while(d<e)d=p.push([p[0][0],p[0][1]]);return p}function h(t){return u(t,2)}function d(t){return u(t,4)}function A(t){return t.map(d)}function p(t){null!=t&&xe.call(f,t.type)&&f[t.type](t)}var f={GeometryCollection:function(t){t.geometries.forEach(p)},Point:function(t){t.coordinates=c(t.coordinates)},MultiPoint:function(t){t.coordinates=t.coordinates.map(c)},LineString:function(t){t.arcs=h(t.arcs)},MultiLineString:function(t){t.arcs=t.arcs.map(h)},Polygon:function(t){t.arcs=A(t.arcs)},MultiPolygon:function(t){t.arcs=t.arcs.map(A)}};for(var g in t)p(t[g]);return{scale:[1/a,1/l],translate:[i,r]}}function He(t,e){var n=be(t=Ue(t)),i=e>0&&n&&Ge(t,n,e),r=Re(Le(Oe(t))),o=r.coordinates,s=Ee(1.4*r.arcs.length,Ve,je);function a(t){t&&xe.call(l,t.type)&&l[t.type](t)}t=r.objects,r.bbox=n,r.arcs=r.arcs.map((function(t,e){return s.set(t,e),o.slice(t[0],t[1]+1)})),delete r.coordinates,o=null;var l={GeometryCollection:function(t){t.geometries.forEach(a)},LineString:function(t){t.arcs=c(t.arcs)},MultiLineString:function(t){t.arcs=t.arcs.map(c)},Polygon:function(t){t.arcs=t.arcs.map(c)},MultiPolygon:function(t){t.arcs=t.arcs.map(u)}};function c(t){var e=[];do{var n=s.get(t);e.push(t[0]<t[1]?n:~n)}while(t=t.next);return e}function u(t){return t.map(c)}for(var h in t)a(t[h]);return i&&(r.transform=i,r.arcs=De(r.arcs)),r}function Ve(t){var e,n=t[0],i=t[1];return i<n&&(e=n,n=i,i=e),n+31*i}function je(t,e){var n,i=t[0],r=t[1],o=e[0],s=e[1];return r<i&&(n=i,i=r,r=n),s<o&&(n=o,o=s,s=n),i===o&&r===s}function Ze(t,e){if(void 0===e&&(e={}),"FeatureCollection"!==wt(t))throw new Error("geojson must be a FeatureCollection");if(!t.features.length)throw new Error("geojson is empty");!1!==e.mutate&&void 0!==e.mutate||(t=le(t));var n=[];st(t,(function(t){n.push(t.geometry)}));var i=He({geoms:U(n).geometry}),r=ye(i,i.objects.geoms.geometries);return r}function We(t,e){if(void 0===e&&(e={}),e=e||{},!X(e))throw new Error("options is invalid");var n=e.mutate;if("FeatureCollection"!==wt(t))throw new Error("geojson must be a FeatureCollection");if(!t.features.length)throw new Error("geojson is empty");!1!==n&&void 0!==n||(t=le(t));var i=Xe(t);if(!i)throw new Error("geojson must be homogenous");var r=t;switch(i){case"LineString":return de(r,e);case"Polygon":return Ze(r,e);default:throw new Error(i+" is not supported")}}function Xe(t){var e={};st(t,(function(t){e[t.geometry.type]=!0}));var n=Object.keys(e);return 1===n.length?n[0]:null}var Ke=We;function qe(t,e){void 0===e&&(e={});var n=e.maxEdge||1/0,i=Je(t),r=Jt(i);if(r.features=r.features.filter((function(t){var i=t.geometry.coordinates[0][0],r=t.geometry.coordinates[0][1],o=t.geometry.coordinates[0][2],s=qt(i,r,e),a=qt(r,o,e),l=qt(i,o,e);return s<=n&&a<=n&&l<=n})),r.features.length<1)return null;var o=Ke(r);return 1===o.coordinates.length&&(o.coordinates=o.coordinates[0],o.type="Polygon"),C(o)}function Je(t){var e=[],n={};return et(t,(function(t){if(t.geometry){var i=t.geometry.coordinates.join("-");Object.prototype.hasOwnProperty.call(n,i)||(e.push(t),n[i]=!0)}})),F(e)}var Ye=qe,$e=i(513);function tn(t,e,n,i){var r=$e(6),o=e.features.map((function(t){var e;return{minX:t.geometry.coordinates[0],minY:t.geometry.coordinates[1],maxX:t.geometry.coordinates[0],maxY:t.geometry.coordinates[1],property:null===(e=t.properties)||void 0===e?void 0:e[n]}}));return r.load(o),t.features.forEach((function(t){t.properties||(t.properties={});var e=ft(t),n=r.search({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}),o=[];n.forEach((function(e){Vt([e.minX,e.minY],t)&&o.push(e.property)})),t.properties[i]=o})),t}var en=tn;function nn(t,e){if(e=e||{},!X(e))throw new Error("options is invalid");var n=e.mutate;if(!t)throw new Error("geojson is required");return!1!==n&&void 0!==n||(t=le(t)),J(t,(function(t){var e=t[0],n=t[1];t[0]=n,t[1]=e})),t}var rn=nn;function on(t,e){void 0===e&&(e={});var n="object"===typeof e?e.mutate:e;if(!t)throw new Error("geojson is required");var i=wt(t),r=[];switch(i){case"LineString":r=sn(t);break;case"MultiLineString":case"Polygon":mt(t).forEach((function(t){r.push(sn(t))}));break;case"MultiPolygon":mt(t).forEach((function(t){var e=[];t.forEach((function(t){e.push(sn(t))})),r.push(e)}));break;case"Point":return t;case"MultiPoint":var o={};mt(t).forEach((function(t){var e=t.join("-");Object.prototype.hasOwnProperty.call(o,e)||(r.push(t),o[e]=!0)}));break;default:throw new Error(i+" geometry not supported")}return t.coordinates?!0===n?(t.coordinates=r,t):{type:i,coordinates:r}:!0===n?(t.geometry.coordinates=r,t):C({type:i,coordinates:r},t.properties,{bbox:t.bbox,id:t.id})}function sn(t){var e=mt(t);if(2===e.length&&!an(e[0],e[1]))return e;var n=[],i=e.length-1,r=n.length;n.push(e[0]);for(var o=1;o<i;o++){var s=n[n.length-1];e[o][0]===s[0]&&e[o][1]===s[1]||(n.push(e[o]),r=n.length,r>2&&ln(n[r-3],n[r-1],n[r-2])&&n.splice(n.length-2,1))}if(n.push(e[e.length-1]),r=n.length,an(e[0],e[e.length-1])&&r<4)throw new Error("invalid polygon");return ln(n[r-3],n[r-1],n[r-2])&&n.splice(n.length-2,1),n}function an(t,e){return t[0]===e[0]&&t[1]===e[1]}function ln(t,e,n){var i=n[0],r=n[1],o=t[0],s=t[1],a=e[0],l=e[1],c=i-o,u=r-s,h=a-o,d=l-s,A=c*d-u*h;return 0===A&&(Math.abs(h)>=Math.abs(d)?h>0?o<=i&&i<=a:a<=i&&i<=o:d>0?s<=r&&r<=l:l<=r&&r<=s)}var cn=on;function un(t,e){var n=t.x-e.x,i=t.y-e.y;return n*n+i*i}function hn(t,e,n){var i=e.x,r=e.y,o=n.x-i,s=n.y-r;if(0!==o||0!==s){var a=((t.x-i)*o+(t.y-r)*s)/(o*o+s*s);a>1?(i=n.x,r=n.y):a>0&&(i+=o*a,r+=s*a)}return o=t.x-i,s=t.y-r,o*o+s*s}function dn(t,e){for(var n,i=t[0],r=[i],o=1,s=t.length;o<s;o++)n=t[o],un(n,i)>e&&(r.push(n),i=n);return i!==n&&r.push(n),r}function An(t,e,n,i,r){for(var o,s=i,a=e+1;a<n;a++){var l=hn(t[a],t[e],t[n]);l>s&&(o=a,s=l)}s>i&&(o-e>1&&An(t,e,o,i,r),r.push(t[o]),n-o>1&&An(t,o,n,i,r))}function pn(t,e){var n=t.length-1,i=[t[0]];return An(t,0,n,e,i),i.push(t[n]),i}function fn(t,e,n){if(t.length<=2)return t;var i=void 0!==e?e*e:1;return t=n?t:dn(t,i),t=pn(t,i),t}function gn(t,e){if(e=e||{},!X(e))throw new Error("options is invalid");var n=void 0!==e.tolerance?e.tolerance:1,i=e.highQuality||!1,r=e.mutate||!1;if(!t)throw new Error("geojson is required");if(n&&n<0)throw new Error("invalid tolerance");return!0!==r&&(t=le(t)),rt(t,(function(t){mn(t,n,i)})),t}function mn(t,e,n){var i=t.type;if("Point"===i||"MultiPoint"===i)return t;cn(t,!0);var r=t.coordinates;switch(i){case"LineString":t["coordinates"]=_n(r,e,n);break;case"MultiLineString":t["coordinates"]=r.map((function(t){return _n(t,e,n)}));break;case"Polygon":t["coordinates"]=yn(r,e,n);break;case"MultiPolygon":t["coordinates"]=r.map((function(t){return yn(t,e,n)}))}return t}function _n(t,e,n){return fn(t.map((function(t){return{x:t[0],y:t[1],z:t[2]}})),e,n).map((function(t){return t.z?[t.x,t.y,t.z]:[t.x,t.y]}))}function yn(t,e,n){return t.map((function(t){var i=t.map((function(t){return{x:t[0],y:t[1]}}));if(i.length<4)throw new Error("invalid polygon");var r=fn(i,e,n).map((function(t){return[t.x,t.y]}));while(!vn(r))e-=.01*e,r=fn(i,e,n).map((function(t){return[t.x,t.y]}));return r[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||r.push(r[0]),r}))}function vn(t){return!(t.length<3)&&!(3===t.length&&t[2][0]===t[0][0]&&t[2][1]===t[0][1])}var xn=gn,bn=function(){function t(t){this.points=t.points||[],this.duration=t.duration||1e4,this.sharpness=t.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=t.stepLength||60,this.length=this.points.length,this.delay=0;for(var e=0;e<this.length;e++)this.points[e].z=this.points[e].z||0;for(e=0;e<this.length-1;e++){var n=this.points[e],i=this.points[e+1];this.centers.push({x:(n.x+i.x)/2,y:(n.y+i.y)/2,z:(n.z+i.z)/2})}this.controls.push([this.points[0],this.points[0]]);for(e=0;e<this.centers.length-1;e++){var r=this.points[e+1].x-(this.centers[e].x+this.centers[e+1].x)/2,o=this.points[e+1].y-(this.centers[e].y+this.centers[e+1].y)/2,s=this.points[e+1].z-(this.centers[e].y+this.centers[e+1].z)/2;this.controls.push([{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e].x+r),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e].y+o),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e].z+s)},{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e+1].x+r),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e+1].y+o),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e+1].z+s)}])}return this.controls.push([this.points[this.length-1],this.points[this.length-1]]),this.steps=this.cacheSteps(this.stepLength),this}return t.prototype.cacheSteps=function(t){var e=[],n=this.pos(0);e.push(0);for(var i=0;i<this.duration;i+=10){var r=this.pos(i),o=Math.sqrt((r.x-n.x)*(r.x-n.x)+(r.y-n.y)*(r.y-n.y)+(r.z-n.z)*(r.z-n.z));o>t&&(e.push(i),n=r)}return e},t.prototype.vector=function(t){var e=this.pos(t+10),n=this.pos(t-10);return{angle:180*Math.atan2(e.y-n.y,e.x-n.x)/3.14,speed:Math.sqrt((n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y)+(n.z-e.z)*(n.z-e.z))}},t.prototype.pos=function(t){var e=t-this.delay;e<0&&(e=0),e>this.duration&&(e=this.duration-1);var n=e/this.duration;if(n>=1)return this.points[this.length-1];var i=Math.floor((this.points.length-1)*n),r=(this.length-1)*n-i;return En(r,this.points[i],this.controls[i][1],this.controls[i+1][0],this.points[i+1])},t}(),wn=bn;function En(t,e,n,i,r){var o=Cn(t),s={x:r.x*o[0]+i.x*o[1]+n.x*o[2]+e.x*o[3],y:r.y*o[0]+i.y*o[1]+n.y*o[2]+e.y*o[3],z:r.z*o[0]+i.z*o[1]+n.z*o[2]+e.z*o[3]};return s}function Cn(t){var e=t*t,n=e*t;return[n,3*e*(1-t),3*t*(1-t)*(1-t),(1-t)*(1-t)*(1-t)]}function Bn(t,e){void 0===e&&(e={});for(var n=e.resolution||1e4,i=e.sharpness||.85,r=[],o=bt(t).coordinates.map((function(t){return{x:t[0],y:t[1]}})),s=new wn({duration:n,points:o,sharpness:i}),a=function(t){var e=s.pos(t);Math.floor(t/100)%2===0&&r.push([e.x,e.y])},l=0;l<s.duration;l+=10)a(l);return a(s.duration),L(r,e.properties)}var Sn=Bn;function Mn(t,e,n,i){return t=le(t),e=le(e),et(t,(function(t){t.properties||(t.properties={}),et(e,(function(e){void 0===t.properties[i]&&Vt(t,e)&&(t.properties[i]=e.properties[n])}))})),t}var Tn=Mn;function In(t,e){if(!t)throw new Error("featurecollection is required");if(null===e||void 0===e)throw new Error("num is required");if("number"!==typeof e)throw new Error("num must be a number");var n=F(Ln(t.features,e));return n}function Ln(t,e){var n,i,r=t.slice(0),o=t.length,s=o-e;while(o-- >s)i=Math.floor((o+1)*Math.random()),n=r[i],r[i]=r[o],r[o]=n;return r.slice(s)}var Pn=In;function Fn(t,e){void 0===e&&(e={});var n=Number(t[0]),i=Number(t[1]),r=Number(t[2]),o=Number(t[3]);if(6===t.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var s=[n,i],a=[n,o],l=[r,o],c=[r,i];return T([[s,c,l,a,s]],e.properties,{bbox:t,id:e.id})}function Rn(t){return Fn(ft(t))}var Dn=Rn;function On(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=qt(t.slice(0,2),[i,n]),s=qt(t.slice(0,2),[e,r]);if(o>=s){var a=(n+r)/2;return[e,a-(i-e)/2,i,a+(i-e)/2]}var l=(e+i)/2;return[l-(r-n)/2,n,l+(r-n)/2,r]}var Un=On;function Nn(t,e,n,i){void 0===i&&(i={});var r=gt(t),o=V(r[0]),s=V(r[1]),a=V(n),l=z(e,i.units),c=Math.asin(Math.sin(s)*Math.cos(l)+Math.cos(s)*Math.sin(l)*Math.cos(a)),u=o+Math.atan2(Math.sin(a)*Math.sin(l)*Math.cos(s),Math.cos(l)-Math.sin(s)*Math.sin(c)),h=H(u),d=H(c);return S([h,d],i.properties)}function kn(t,e,n){void 0===n&&(n={});for(var i=n.steps||64,r=n.properties?n.properties:!Array.isArray(t)&&"Feature"===t.type&&t.properties?t.properties:{},o=[],s=0;s<i;s++)o.push(Nn(t,e,-360*s/i,n).geometry.coordinates);return o.push(o[0]),T([o],r)}var zn=kn;function Qn(t,e,n){if(void 0===n&&(n={}),!0===n.final)return Gn(t,e);var i=gt(t),r=gt(e),o=V(i[0]),s=V(r[0]),a=V(i[1]),l=V(r[1]),c=Math.sin(s-o)*Math.cos(l),u=Math.cos(a)*Math.sin(l)-Math.sin(a)*Math.cos(l)*Math.cos(s-o);return H(Math.atan2(c,u))}function Gn(t,e){var n=Qn(e,t);return n=(n+180)%360,n}function Hn(t,e){var n=qt(t,e),i=Qn(t,e),r=Nn(t,n/2,i);return r}var Vn=Hn;function jn(t,e){void 0===e&&(e={});var n=ft(t),i=(n[0]+n[2])/2,r=(n[1]+n[3])/2;return S([i,r],e.properties,e)}var Zn=jn;function Wn(t,e){void 0===e&&(e={});var n=0,i=0,r=0;return J(t,(function(t){n+=t[0],i+=t[1],r++}),!0),S([n/r,i/r],e.properties)}var Xn=Wn;function Kn(t,e){switch(void 0===e&&(e={}),wt(t)){case"Point":return S(gt(t),e.properties);case"Polygon":var n=[];J(t,(function(t){n.push(t)}));var i,r,o,s,a,l,c,u,h=Xn(t,{properties:e.properties}),d=h.geometry.coordinates,A=0,p=0,f=0,g=n.map((function(t){return[t[0]-d[0],t[1]-d[1]]}));for(i=0;i<n.length-1;i++)r=g[i],s=r[0],l=r[1],o=g[i+1],a=o[0],c=o[1],u=s*c-a*l,f+=u,A+=(s+a)*u,p+=(l+c)*u;if(0===f)return h;var m=.5*f,_=1/(6*m);return S([d[0]+_*A,d[1]+_*p],e.properties);default:var y=Ht(t);return y?Kn(y,{properties:e.properties}):Xn(t,{properties:e.properties})}}var qn=Kn;function Jn(t){var e={MultiPoint:{coordinates:[],properties:[]},MultiLineString:{coordinates:[],properties:[]},MultiPolygon:{coordinates:[],properties:[]}};return et(t,(function(t){var n,i,r,o;switch(null===(o=t.geometry)||void 0===o?void 0:o.type){case"Point":e.MultiPoint.coordinates.push(t.geometry.coordinates),e.MultiPoint.properties.push(t.properties);break;case"MultiPoint":(n=e.MultiPoint.coordinates).push.apply(n,t.geometry.coordinates),e.MultiPoint.properties.push(t.properties);break;case"LineString":e.MultiLineString.coordinates.push(t.geometry.coordinates),e.MultiLineString.properties.push(t.properties);break;case"MultiLineString":(i=e.MultiLineString.coordinates).push.apply(i,t.geometry.coordinates),e.MultiLineString.properties.push(t.properties);break;case"Polygon":e.MultiPolygon.coordinates.push(t.geometry.coordinates),e.MultiPolygon.properties.push(t.properties);break;case"MultiPolygon":(r=e.MultiPolygon.coordinates).push.apply(r,t.geometry.coordinates),e.MultiPolygon.properties.push(t.properties);break;default:break}})),F(Object.keys(e).filter((function(t){return e[t].coordinates.length})).sort().map((function(t){var n={type:t,coordinates:e[t].coordinates},i={collectedProperties:e[t].properties};return C(n,i)})))}var Yn=Jn;function $n(t){var e=[];return"FeatureCollection"===t.type?et(t,(function(t){J(t,(function(n){e.push(S(n,t.properties))}))})):J(t,(function(n){e.push(S(n,t.properties))})),F(e)}var ti=$n,ei=i(6120);function ni(t){if(!t.geometry||"Polygon"!==t.geometry.type&&"MultiPolygon"!==t.geometry.type)throw new Error("input must be a Polygon or MultiPolygon");var e={type:"FeatureCollection",features:[]};return"Polygon"===t.geometry.type?e.features=ii(t.geometry.coordinates):t.geometry.coordinates.forEach((function(t){e.features=e.features.concat(ii(t))})),e}function ii(t){var e=ri(t),n=2,i=ei(e.vertices,e.holes,n),r=[],o=[];i.forEach((function(t,r){var s=i[r];o.push([e.vertices[s*n],e.vertices[s*n+1]])}));for(var s=0;s<o.length;s+=3){var a=o.slice(s,s+3);a.push(o[s]),r.push(T([a]))}return r}function ri(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},i=0,r=0;r<t.length;r++){for(var o=0;o<t[r].length;o++)for(var s=0;s<e;s++)n.vertices.push(t[r][o][s]);r>0&&(i+=t[r-1].length,n.holes.push(i))}return n}var oi=ni;function si(t,e){if(!t)throw new Error("targetPoint is required");if(!e)throw new Error("points is required");var n,i=1/0,r=0;return et(e,(function(e,n){var o=qt(t,e);o<i&&(r=n,i=o)})),n=le(e.features[r]),n.properties.featureIndex=r,n.properties.distanceToPoint=i,n}var ai=si;function li(t){if(!t)throw new Error("geojson is required");var e=[];return st(t,(function(t){ci(t,e)})),F(e)}function ci(t,e){var n=[],i=t.geometry;if(null!==i){switch(i.type){case"Polygon":n=mt(i);break;case"LineString":n=[mt(i)]}n.forEach((function(n){var i=ui(n,t.properties);i.forEach((function(t){t.id=e.length,e.push(t)}))}))}}function ui(t,e){var n=[];return t.reduce((function(t,i){var r=L([t,i],e);return r.bbox=hi(t,i),n.push(r),i})),n}function hi(t,e){var n=t[0],i=t[1],r=e[0],o=e[1],s=n<r?n:r,a=i<o?i:o,l=n>r?n:r,c=i>o?i:o;return[s,a,l,c]}var di=li,Ai=i(1494);function pi(t,e){var n={},i=[];if("LineString"===t.type&&(t=C(t)),"LineString"===e.type&&(e=C(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 r=fi(t,e);return r&&i.push(r),F(i)}var o=Ai();return o.load(di(e)),et(di(t),(function(t){et(o.search(t),(function(e){var r=fi(t,e);if(r){var o=mt(r).join(",");n[o]||(n[o]=!0,i.push(r))}}))})),F(i)}function fi(t,e){var n=mt(t),i=mt(e);if(2!==n.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==i.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var r=n[0][0],o=n[0][1],s=n[1][0],a=n[1][1],l=i[0][0],c=i[0][1],u=i[1][0],h=i[1][1],d=(h-c)*(s-r)-(u-l)*(a-o),A=(u-l)*(o-c)-(h-c)*(r-l),p=(s-r)*(o-c)-(a-o)*(r-l);if(0===d)return null;var f=A/d,g=p/d;if(f>=0&&f<=1&&g>=0&&g<=1){var m=r+f*(s-r),_=o+f*(a-o);return S([m,_])}return null}var gi=pi;function mi(t,e,n){void 0===n&&(n={});var i=S([1/0,1/0],{dist:1/0}),r=0;return st(t,(function(t){for(var o=mt(t),s=0;s<o.length-1;s++){var a=S(o[s]);a.properties.dist=qt(e,a,n);var l=S(o[s+1]);l.properties.dist=qt(e,l,n);var c=qt(a,l,n),u=Math.max(a.properties.dist,l.properties.dist),h=Qn(a,l),d=Nn(e,u,h+90,n),A=Nn(e,u,h-90,n),p=gi(L([d.geometry.coordinates,A.geometry.coordinates]),L([a.geometry.coordinates,l.geometry.coordinates])),f=null;p.features.length>0&&(f=p.features[0],f.properties.dist=qt(e,f,n),f.properties.location=r+qt(a,f,n)),a.properties.dist<i.properties.dist&&(i=a,i.properties.index=s,i.properties.location=r),l.properties.dist<i.properties.dist&&(i=l,i.properties.index=s+1,i.properties.location=r+c),f&&f.properties.dist<i.properties.dist&&(i=f,i.properties.index=s),r+=c}})),i}var _i=mi;function yi(t,e,n){void 0===n&&(n={});var i=gt(t),r=gt(e);r[0]+=r[0]-i[0]>180?-360:i[0]-r[0]>180?360:0;var o=vi(i,r),s=j(o,"meters",n.units);return s}function vi(t,e,n){n=void 0===n?x:Number(n);var i=n,r=t[1]*Math.PI/180,o=e[1]*Math.PI/180,s=o-r,a=Math.abs(e[0]-t[0])*Math.PI/180;a>Math.PI&&(a-=2*Math.PI);var l=Math.log(Math.tan(o/2+Math.PI/4)/Math.tan(r/2+Math.PI/4)),c=Math.abs(l)>1e-11?s/l:Math.cos(r),u=Math.sqrt(s*s+c*c*a*a),h=u*i;return h}var xi=yi;function bi(t,e,n){if(void 0===n&&(n={}),n.method||(n.method="geodesic"),n.units||(n.units="kilometers"),!t)throw new Error("pt is required");if(Array.isArray(t)?t=S(t):"Point"===t.type?t=C(t):vt(t,"Point","point"),!e)throw new Error("line is required");Array.isArray(e)?e=L(e):"LineString"===e.type?e=C(e):vt(e,"LineString","line");var i=1/0,r=t.geometry.coordinates;return lt(e,(function(t){var e=t.geometry.coordinates[0],o=t.geometry.coordinates[1],s=wi(r,e,o,n);s<i&&(i=s)})),j(i,"degrees",n.units)}function wi(t,e,n,i){var r=[n[0]-e[0],n[1]-e[1]],o=[t[0]-e[0],t[1]-e[1]],s=Ei(o,r);if(s<=0)return Ci(t,e,{method:i.method,units:"degrees"});var a=Ei(r,r);if(a<=s)return Ci(t,n,{method:i.method,units:"degrees"});var l=s/a,c=[e[0]+l*r[0],e[1]+l*r[1]];return Ci(t,c,{method:i.method,units:"degrees"})}function Ei(t,e){return t[0]*e[0]+t[1]*e[1]}function Ci(t,e,n){return"planar"===n.method?xi(t,e,n):qt(t,e,n)}var Bi=bi;function Si(t,e,n){void 0===n&&(n={});var i=n.units,r=n.properties||{},o=Mi(t);if(!o.features.length)throw new Error("points must contain features");if(!e)throw new Error("line is required");if("LineString"!==wt(e))throw new Error("line must be a LineString");var s=1/0,a=null;return et(o,(function(t){var n=Bi(t,e,{units:i});n<s&&(s=n,a=t)})),a&&(a.properties=Et({dist:s},a.properties,r)),a}function Mi(t){var e=[],n=t.geometry?t.geometry.type:t.type;switch(n){case"GeometryCollection":return rt(t,(function(t){"Point"===t.type&&e.push({type:"Feature",properties:{},geometry:t})})),{type:"FeatureCollection",features:e};case"FeatureCollection":return t.features=t.features.filter((function(t){return"Point"===t.geometry.type})),t;default:throw new Error("points must be a Point Collection")}}var Ti=Si;function Ii(t,e){var n=gt(t),i=bt(e),r=i.coordinates,o=r[0];if(o.length<4)throw new Error("OuterRing of a Polygon must have 4 or more Positions.");var s=e.properties||{},a=s.a,l=s.b,c=s.c,u=n[0],h=n[1],d=o[0][0],A=o[0][1],p=void 0!==a?a:o[0][2],f=o[1][0],g=o[1][1],m=void 0!==l?l:o[1][2],_=o[2][0],y=o[2][1],v=void 0!==c?c:o[2][2],x=(v*(u-d)*(h-g)+p*(u-f)*(h-y)+m*(u-_)*(h-A)-m*(u-d)*(h-y)-v*(u-f)*(h-A)-p*(u-_)*(h-g))/((u-d)*(h-g)+(u-f)*(h-y)+(u-_)*(h-A)-(u-d)*(h-y)-(u-f)*(h-A)-(u-_)*(h-g));return x}var Li=Ii;function Pi(t){var e,n,i={type:"FeatureCollection",features:[]};if(n="Feature"===t.type?t.geometry:t,"LineString"===n.type)e=[n.coordinates];else if("MultiLineString"===n.type)e=n.coordinates;else if("MultiPolygon"===n.type)e=[].concat.apply([],n.coordinates);else{if("Polygon"!==n.type)throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");e=n.coordinates}return e.forEach((function(t){e.forEach((function(e){for(var n=0;n<t.length-1;n++)for(var r=n;r<e.length-1;r++){if(t===e){if(1===Math.abs(n-r))continue;if(0===n&&r===t.length-2&&t[n][0]===t[t.length-1][0]&&t[n][1]===t[t.length-1][1])continue}var o=Fi(t[n][0],t[n][1],t[n+1][0],t[n+1][1],e[r][0],e[r][1],e[r+1][0],e[r+1][1]);o&&i.features.push(S([o[0],o[1]]))}}))})),i}function Fi(t,e,n,i,r,o,s,a){var l,c,u,h,d,A={x:null,y:null,onLine1:!1,onLine2:!1};return l=(a-o)*(n-t)-(s-r)*(i-e),0===l?null!==A.x&&null!==A.y&&A:(c=e-o,u=t-r,h=(s-r)*c-(a-o)*u,d=(n-t)*c-(i-e)*u,c=h/l,u=d/l,A.x=t+c*(n-t),A.y=e+c*(i-e),c>=0&&c<=1&&(A.onLine1=!0),u>=0&&u<=1&&(A.onLine2=!0),!(!A.onLine1||!A.onLine2)&&[A.x,A.y])}function Ri(t){var e=Di(t),n=Zn(e),i=!1,r=0;while(!i&&r<e.features.length){var o,s,a,l,c,u,h,d=e.features[r].geometry,A=!1;if("Point"===d.type)n.geometry.coordinates[0]===d.coordinates[0]&&n.geometry.coordinates[1]===d.coordinates[1]&&(i=!0);else if("MultiPoint"===d.type){var p=!1;h=0;while(!p&&h<d.coordinates.length)n.geometry.coordinates[0]===d.coordinates[h][0]&&n.geometry.coordinates[1]===d.coordinates[h][1]&&(i=!0,p=!0),h++}else if("LineString"===d.type){h=0;while(!A&&h<d.coordinates.length-1)o=n.geometry.coordinates[0],s=n.geometry.coordinates[1],a=d.coordinates[h][0],l=d.coordinates[h][1],c=d.coordinates[h+1][0],u=d.coordinates[h+1][1],Oi(o,s,a,l,c,u)&&(A=!0,i=!0),h++}else if("MultiLineString"===d.type){var f=0;while(f<d.coordinates.length){A=!1,h=0;var g=d.coordinates[f];while(!A&&h<g.length-1)o=n.geometry.coordinates[0],s=n.geometry.coordinates[1],a=g[h][0],l=g[h][1],c=g[h+1][0],u=g[h+1][1],Oi(o,s,a,l,c,u)&&(A=!0,i=!0),h++;f++}}else"Polygon"!==d.type&&"MultiPolygon"!==d.type||Vt(n,d)&&(i=!0);r++}if(i)return n;var m=F([]);for(r=0;r<e.features.length;r++)m.features=m.features.concat(ti(e.features[r]).features);return S(ai(n,m).geometry.coordinates)}function Di(t){return"FeatureCollection"!==t.type?"Feature"!==t.type?F([C(t)]):F([t]):t}function Oi(t,e,n,i,r,o){var s=Math.sqrt((r-n)*(r-n)+(o-i)*(o-i)),a=Math.sqrt((t-n)*(t-n)+(e-i)*(e-i)),l=Math.sqrt((r-t)*(r-t)+(o-e)*(o-e));return s===a+l}var Ui=Ri,Ni=6378137;function ki(t){return ot(t,(function(t,e){return t+zi(e)}),0)}function zi(t){var e,n=0;switch(t.type){case"Polygon":return Qi(t.coordinates);case"MultiPolygon":for(e=0;e<t.coordinates.length;e++)n+=Qi(t.coordinates[e]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function Qi(t){var e=0;if(t&&t.length>0){e+=Math.abs(Gi(t[0]));for(var n=1;n<t.length;n++)e-=Math.abs(Gi(t[n]))}return e}function Gi(t){var e,n,i,r,o,s,a,l=0,c=t.length;if(c>2){for(a=0;a<c;a++)a===c-2?(r=c-2,o=c-1,s=0):a===c-1?(r=c-1,o=0,s=1):(r=a,o=a+1,s=a+2),e=t[r],n=t[o],i=t[s],l+=(Hi(i[0])-Hi(e[0]))*Math.sin(Hi(n[1]));l=l*Ni*Ni/2}return l}function Hi(t){return t*Math.PI/180}function Vi(t,e,n){void 0===n&&(n={});for(var i=bt(t),r=i.coordinates,o=0,s=0;s<r.length;s++){if(e>=o&&s===r.length-1)break;if(o>=e){var a=e-o;if(a){var l=Qn(r[s],r[s-1])-180,c=Nn(r[s],a,l,n);return c}return S(r[s])}o+=qt(r[s],r[s+1],n)}return S(r[r.length-1])}function ji(t,e){return void 0===e&&(e={}),ct(t,(function(t,n){var i=n.geometry.coordinates;return t+qt(i[0],i[1],e)}),0)}function Zi(t,e,n){var i=mt(n);if("LineString"!==wt(n))throw new Error("line must be a LineString");var r,o=_i(n,t),s=_i(n,e);r=o.properties.index<=s.properties.index?[o,s]:[s,o];for(var a=[r[0].geometry.coordinates],l=r[0].properties.index+1;l<r[1].properties.index+1;l++)a.push(i[l]);return a.push(r[1].geometry.coordinates),L(a,n.properties)}var Wi=Zi;function Xi(t,e,n,i){if(i=i||{},!X(i))throw new Error("options is invalid");var r,o=[];if("Feature"===t.type)r=t.geometry.coordinates;else{if("LineString"!==t.type)throw new Error("input must be a LineString Feature or Geometry");r=t.coordinates}for(var s,a,l,c=r.length,u=0,h=0;h<r.length;h++){if(e>=u&&h===r.length-1)break;if(u>e&&0===o.length){if(s=e-u,!s)return o.push(r[h]),L(o);a=Qn(r[h],r[h-1])-180,l=Nn(r[h],s,a,i),o.push(l.geometry.coordinates)}if(u>=n)return s=n-u,s?(a=Qn(r[h],r[h-1])-180,l=Nn(r[h],s,a,i),o.push(l.geometry.coordinates),L(o)):(o.push(r[h]),L(o));if(u>=e&&o.push(r[h]),h===r.length-1)return L(o);u+=qt(r[h],r[h+1],i)}if(u<e&&r.length===c)throw new Error("Start position is beyond line");var d=r[r.length-1];return L([d,d])}var Ki=Xi;function qi(t,e,n){void 0===n&&(n={});for(var i=gt(t),r=mt(e),o=0;o<r.length-1;o++){var s=!1;if(n.ignoreEndVertices&&(0===o&&(s="start"),o===r.length-2&&(s="end"),0===o&&o+1===r.length-1&&(s="both")),Ji(r[o],r[o+1],i,s,"undefined"===typeof n.epsilon?null:n.epsilon))return!0}return!1}function Ji(t,e,n,i,r){var o=n[0],s=n[1],a=t[0],l=t[1],c=e[0],u=e[1],h=n[0]-a,d=n[1]-l,A=c-a,p=u-l,f=h*p-d*A;if(null!==r){if(Math.abs(f)>r)return!1}else if(0!==f)return!1;return i?"start"===i?Math.abs(A)>=Math.abs(p)?A>0?a<o&&o<=c:c<=o&&o<a:p>0?l<s&&s<=u:u<=s&&s<l:"end"===i?Math.abs(A)>=Math.abs(p)?A>0?a<=o&&o<c:c<o&&o<=a:p>0?l<=s&&s<u:u<s&&s<=l:"both"===i&&(Math.abs(A)>=Math.abs(p)?A>0?a<o&&o<c:c<o&&o<a:p>0?l<s&&s<u:u<s&&s<l):Math.abs(A)>=Math.abs(p)?A>0?a<=o&&o<=c:c<=o&&o<=a:p>0?l<=s&&s<=u:u<=s&&s<=l}var Yi=qi;function $i(t,e){var n=bt(t),i=bt(e),r=n.type,o=i.type;switch(r){case"Point":switch(o){case"MultiPoint":return tr(n,i);case"LineString":return Yi(n,i,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return Vt(n,i,{ignoreBoundary:!0});default:throw new Error("feature2 "+o+" geometry not supported")}case"MultiPoint":switch(o){case"MultiPoint":return er(n,i);case"LineString":return nr(n,i);case"Polygon":case"MultiPolygon":return ir(n,i);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"LineString":return rr(n,i);case"Polygon":case"MultiPolygon":return or(n,i);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"Polygon":case"MultiPolygon":return sr(n,i);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+r+" geometry not supported")}}function tr(t,e){var n,i=!1;for(n=0;n<e.coordinates.length;n++)if(lr(e.coordinates[n],t.coordinates)){i=!0;break}return i}function er(t,e){for(var n=0;n<t.coordinates.length;n++){for(var i=!1,r=0;r<e.coordinates.length;r++)lr(t.coordinates[n],e.coordinates[r])&&(i=!0);if(!i)return!1}return!0}function nr(t,e){for(var n=!1,i=0;i<t.coordinates.length;i++){if(!Yi(t.coordinates[i],e))return!1;n||(n=Yi(t.coordinates[i],e,{ignoreEndVertices:!0}))}return n}function ir(t,e){for(var n=!0,i=!1,r=!1,o=0;o<t.coordinates.length;o++){if(r=Vt(t.coordinates[1],e),!r){n=!1;break}i||(r=Vt(t.coordinates[1],e,{ignoreBoundary:!0}))}return n&&r}function rr(t,e){for(var n=0;n<t.coordinates.length;n++)if(!Yi(t.coordinates[n],e))return!1;return!0}function or(t,e){var n=ft(e),i=ft(t);if(!ar(n,i))return!1;for(var r=!1,o=0;o<t.coordinates.length-1;o++){if(!Vt(t.coordinates[o],e))return!1;if(r||(r=Vt(t.coordinates[o],e,{ignoreBoundary:!0})),!r){var s=cr(t.coordinates[o],t.coordinates[o+1]);r=Vt(s,e,{ignoreBoundary:!0})}}return r}function sr(t,e){var n=ft(t),i=ft(e);if(!ar(i,n))return!1;for(var r=0;r<t.coordinates[0].length;r++)if(!Vt(t.coordinates[0][r],e))return!1;return!0}function ar(t,e){return!(t[0]>e[0])&&(!(t[2]<e[2])&&(!(t[1]>e[1])&&!(t[3]<e[3])))}function lr(t,e){return t[0]===e[0]&&t[1]===e[1]}function cr(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}var ur=$i;function hr(t,e,n){void 0===n&&(n={}),n.mask&&!n.units&&(n.units="kilometers");var i=[],r=t[0],o=t[1],s=t[2],a=t[3],l=e/qt([r,o],[s,o],n),c=l*(s-r),u=e/qt([r,o],[r,a],n),h=u*(a-o),d=s-r,A=a-o,p=Math.floor(d/c),f=Math.floor(A/h),g=(d-p*c)/2,m=(A-f*h)/2,_=r+g;while(_<=s){var y=o+m;while(y<=a){var v=S([_,y],n.properties);n.mask?ur(v,n.mask)&&i.push(v):i.push(v),y+=h}_+=c}return F(i)}var dr=hr;function Ar(t,e){void 0===e&&(e={});var n=e.precision,i=e.coordinates,r=e.mutate;if(n=void 0===n||null===n||isNaN(n)?6:n,i=void 0===i||null===i||isNaN(i)?3:i,!t)throw new Error("<geojson> is required");if("number"!==typeof n)throw new Error("<precision> must be a number");if("number"!==typeof i)throw new Error("<coordinates> must be a number");!1!==r&&void 0!==r||(t=JSON.parse(JSON.stringify(t)));var o=Math.pow(10,n);return J(t,(function(t){pr(t,o,i)})),t}function pr(t,e,n){t.length>n&&t.splice(n,t.length);for(var i=0;i<t.length;i++)t[i]=Math.round(t[i]*e)/e;return t}var fr=Ar;function gr(t){if(!t)throw new Error("geojson is required");var e=[];return st(t,(function(t){e.push(t)})),F(e)}var mr=gr;function _r(t,e,n){if(n=n||{},!X(n))throw new Error("options is invalid");var i=n.units,r=n.reverse;if(!t)throw new Error("geojson is required");if(e<=0)throw new Error("segmentLength must be greater than 0");var o=[];return st(t,(function(t){r&&(t.geometry.coordinates=t.geometry.coordinates.reverse()),yr(t,e,i,(function(t){o.push(t)}))})),F(o)}function yr(t,e,n,i){var r=ji(t,{units:n});if(r<=e)return i(t);var o=r/e;Number.isInteger(o)||(o=Math.floor(o)+1);for(var s=0;s<o;s++){var a=Ki(t,e*s,e*(s+1),{units:n});i(a,s)}}var vr=_r;function xr(t,e,n){if("Polygon"!==t.geometry.type)throw new Error("The input feature must be a Polygon");void 0===n&&(n=1);var i=t.geometry.coordinates,r=[],o={};if(n){for(var s=[],a=0;a<i.length;a++)for(var l=0;l<i[a].length-1;l++)s.push(g(a,l));var c=$e();c.load(s)}for(var u=0;u<i.length;u++)for(var h=0;h<i[u].length-1;h++)if(n){var d=c.search(g(u,h));d.forEach((function(t){var e=t.ring,n=t.edge;f(u,h,e,n)}))}else for(var A=0;A<i.length;A++)for(var p=0;p<i[A].length-1;p++)f(u,h,A,p);return e||(r={type:"Feature",geometry:{type:"MultiPoint",coordinates:r}}),r;function f(t,n,s,a){var l,c,u=i[t][n],h=i[t][n+1],d=i[s][a],A=i[s][a+1],p=br(u,h,d,A);if(null!==p&&(l=h[0]!==u[0]?(p[0]-u[0])/(h[0]-u[0]):(p[1]-u[1])/(h[1]-u[1]),c=A[0]!==d[0]?(p[0]-d[0])/(A[0]-d[0]):(p[1]-d[1])/(A[1]-d[1]),!(l>=1||l<=0||c>=1||c<=0))){var f=p,g=!o[f];g&&(o[f]=!0),e?r.push(e(p,t,n,u,h,l,s,a,d,A,c,g)):r.push(p)}}function g(t,e){var n,r,o,s,a=i[t][e],l=i[t][e+1];return a[0]<l[0]?(n=a[0],r=l[0]):(n=l[0],r=a[0]),a[1]<l[1]?(o=a[1],s=l[1]):(o=l[1],s=a[1]),{minX:n,minY:o,maxX:r,maxY:s,ring:t,edge:e}}}function br(t,e,n,i){if(wr(t,n)||wr(t,i)||wr(e,n)||wr(i,n))return null;var r=t[0],o=t[1],s=e[0],a=e[1],l=n[0],c=n[1],u=i[0],h=i[1],d=(r-s)*(c-h)-(o-a)*(l-u);if(0===d)return null;var A=((r*a-o*s)*(l-u)-(r-s)*(l*h-c*u))/d,p=((r*a-o*s)*(c-h)-(o-a)*(l*h-c*u))/d;return[A,p]}function wr(t,e){if(!t||!e)return!1;if(t.length!==e.length)return!1;for(var n=0,i=t.length;n<i;n++)if(t[n]instanceof Array&&e[n]instanceof Array){if(!wr(t[n],e[n]))return!1}else if(t[n]!==e[n])return!1;return!0}function Er(t){if("Feature"!=t.type)throw new Error("The input must a geojson object of type Feature");if(void 0===t.geometry||null==t.geometry)throw new Error("The input must a geojson object with a non-empty geometry");if("Polygon"!=t.geometry.type)throw new Error("The input must be a geojson Polygon");for(var e=t.geometry.coordinates.length,n=[],i=0;i<e;i++){var r=t.geometry.coordinates[i];Tr(r[0],r[r.length-1])||r.push(r[0]),n.push.apply(n,r.slice(0,r.length-1))}if(!Lr(n))throw new Error("The input polygon may not have duplicate vertices (except for the first and last vertex of each ring)");var o=n.length,s=xr(t,(function(t,e,n,i,r,o,s,a,l,c,u,h){return[t,e,n,i,r,o,s,a,l,c,u,h]})),a=s.length;if(0==a){var l=[];for(i=0;i<e;i++)l.push(T([t.geometry.coordinates[i]],{parent:-1,winding:Mr(t.geometry.coordinates[i])}));var c=F(l);return N(),k(),c}var u=[],h=[];for(i=0;i<e;i++){u.push([]);for(var d=0;d<t.geometry.coordinates[i].length-1;d++)u[i].push([new Cr(t.geometry.coordinates[i][Ir(d+1,t.geometry.coordinates[i].length-1)],1,[i,d],[i,Ir(d+1,t.geometry.coordinates[i].length-1)],void 0)]),h.push(new Br(t.geometry.coordinates[i][d],[i,Ir(d-1,t.geometry.coordinates[i].length-1)],[i,d],void 0,void 0,!1,!0))}for(i=0;i<a;i++)u[s[i][1]][s[i][2]].push(new Cr(s[i][0],s[i][5],[s[i][1],s[i][2]],[s[i][6],s[i][7]],void 0)),s[i][11]&&h.push(new Br(s[i][0],[s[i][1],s[i][2]],[s[i][6],s[i][7]],void 0,void 0,!0,!0));var A=h.length;for(i=0;i<u.length;i++)for(d=0;d<u[i].length;d++)u[i][d].sort((function(t,e){return t.param<e.param?-1:1}));var p=[];for(i=0;i<A;i++)p.push({minX:h[i].coord[0],minY:h[i].coord[1],maxX:h[i].coord[0],maxY:h[i].coord[1],index:i});var f=$e();f.load(p);for(i=0;i<u.length;i++)for(d=0;d<u[i].length;d++)for(var g=0;g<u[i][d].length;g++){_=g==u[i][d].length-1?u[i][Ir(d+1,t.geometry.coordinates[i].length-1)][0].coord:u[i][d][g+1].coord;var m=f.search({minX:_[0],minY:_[1],maxX:_[0],maxY:_[1]})[0];u[i][d][g].nxtIsectAlongEdgeIn=m.index}for(i=0;i<u.length;i++)for(d=0;d<u[i].length;d++)for(g=0;g<u[i][d].length;g++){var _=u[i][d][g].coord,y=(m=f.search({minX:_[0],minY:_[1],maxX:_[0],maxY:_[1]})[0],m.index);y<o?h[y].nxtIsectAlongRingAndEdge2=u[i][d][g].nxtIsectAlongEdgeIn:Tr(h[y].ringAndEdge1,u[i][d][g].ringAndEdgeIn)?h[y].nxtIsectAlongRingAndEdge1=u[i][d][g].nxtIsectAlongEdgeIn:h[y].nxtIsectAlongRingAndEdge2=u[i][d][g].nxtIsectAlongEdgeIn}var v=[];for(i=0,d=0;d<e;d++){var x=i;for(g=0;g<t.geometry.coordinates[d].length-1;g++)h[i].coord[0]<h[x].coord[0]&&(x=i),i++;var b=h[x].nxtIsectAlongRingAndEdge2;for(g=0;g<h.length;g++)if(h[g].nxtIsectAlongRingAndEdge1==x||h[g].nxtIsectAlongRingAndEdge2==x){var w=g;break}var E=Sr([h[w].coord,h[x].coord,h[b].coord],!0)?1:-1;v.push({isect:x,parent:-1,winding:E})}v.sort((function(t,e){return h[t.isect].coord>h[e.isect].coord?-1:1}));l=[];while(v.length>0){var C=v.pop(),B=C.isect,S=C.parent,M=C.winding,I=l.length,L=[h[B].coord],P=B;if(h[B].ringAndEdge1Walkable)var R=h[B].ringAndEdge1,D=h[B].nxtIsectAlongRingAndEdge1;else R=h[B].ringAndEdge2,D=h[B].nxtIsectAlongRingAndEdge2;while(!Tr(h[B].coord,h[D].coord)){L.push(h[D].coord);var O=void 0;for(i=0;i<v.length;i++)if(v[i].isect==D){O=i;break}if(void 0!=O&&v.splice(O,1),Tr(R,h[D].ringAndEdge1)){if(R=h[D].ringAndEdge2,h[D].ringAndEdge2Walkable=!1,h[D].ringAndEdge1Walkable){var U={isect:D};Sr([h[P].coord,h[D].coord,h[h[D].nxtIsectAlongRingAndEdge2].coord],1==M)?(U.parent=S,U.winding=-M):(U.parent=I,U.winding=M),v.push(U)}P=D,D=h[D].nxtIsectAlongRingAndEdge2}else{if(R=h[D].ringAndEdge1,h[D].ringAndEdge1Walkable=!1,h[D].ringAndEdge2Walkable){U={isect:D};Sr([h[P].coord,h[D].coord,h[h[D].nxtIsectAlongRingAndEdge1].coord],1==M)?(U.parent=S,U.winding=-M):(U.parent=I,U.winding=M),v.push(U)}P=D,D=h[D].nxtIsectAlongRingAndEdge1}}L.push(h[D].coord),l.push(T([L],{index:I,parent:S,winding:M,netWinding:void 0}))}c=F(l);function N(){for(var t=[],e=0;e<c.features.length;e++)-1==c.features[e].properties.parent&&t.push(e);if(t.length>1)for(e=0;e<t.length;e++){for(var n=-1,i=1/0,r=0;r<c.features.length;r++)t[e]!=r&&Vt(c.features[t[e]].geometry.coordinates[0][0],c.features[r],{ignoreBoundary:!0})&&ki(c.features[r])<i&&(n=r);c.features[t[e]].properties.parent=n}}function k(){for(var t=0;t<c.features.length;t++)if(-1==c.features[t].properties.parent){var e=c.features[t].properties.winding;c.features[t].properties.netWinding=e,z(t,e)}}function z(t,e){for(var n=0;n<c.features.length;n++)if(c.features[n].properties.parent==t){var i=e+c.features[n].properties.winding;c.features[n].properties.netWinding=i,z(n,i)}}return N(),k(),c}var Cr=function(t,e,n,i,r){this.coord=t,this.param=e,this.ringAndEdgeIn=n,this.ringAndEdgeOut=i,this.nxtIsectAlongEdgeIn=r},Br=function(t,e,n,i,r,o,s){this.coord=t,this.ringAndEdge1=e,this.ringAndEdge2=n,this.nxtIsectAlongRingAndEdge1=i,this.nxtIsectAlongRingAndEdge2=r,this.ringAndEdge1Walkable=o,this.ringAndEdge2Walkable=s};function Sr(t,e){if("undefined"===typeof e&&(e=!0),3!=t.length)throw new Error("This function requires an array of three points [x,y]");var n=(t[1][0]-t[0][0])*(t[2][1]-t[0][1])-(t[1][1]-t[0][1])*(t[2][0]-t[0][0]);return n>=0==e}function Mr(t){for(var e=0,n=0;n<t.length-1;n++)t[n][0]<t[e][0]&&(e=n);if(Sr([t[Ir(e-1,t.length-1)],t[e],t[Ir(e+1,t.length-1)]],!0))var i=1;else i=-1;return i}function Tr(t,e){if(!t||!e)return!1;if(t.length!=e.length)return!1;for(var n=0,i=t.length;n<i;n++)if(t[n]instanceof Array&&e[n]instanceof Array){if(!Tr(t[n],e[n]))return!1}else if(t[n]!=e[n])return!1;return!0}function Ir(t,e){return(t%e+e)%e}function Lr(t){for(var e={},n=1,i=0,r=t.length;i<r;++i){if(Object.prototype.hasOwnProperty.call(e,t[i])){n=0;break}e[t[i]]=1}return n}function Pr(t){var e=[];return st(t,(function(t){"Polygon"===t.geometry.type&&et(Er(t),(function(n){e.push(T(n.geometry.coordinates,t.properties))}))})),F(e)}var Fr=Pr,Rr=Math.PI/180,Dr=180/Math.PI,Or=function(t,e){this.lon=t,this.lat=e,this.x=Rr*t,this.y=Rr*e};Or.prototype.view=function(){return String(this.lon).slice(0,4)+","+String(this.lat).slice(0,4)},Or.prototype.antipode=function(){var t=-1*this.lat,e=this.lon<0?180+this.lon:-1*(180-this.lon);return new Or(e,t)};var Ur=function(){this.coords=[],this.length=0};Ur.prototype.move_to=function(t){this.length++,this.coords.push(t)};var Nr=function(t){this.properties=t||{},this.geometries=[]};Nr.prototype.json=function(){if(this.geometries.length<=0)return{geometry:{type:"LineString",coordinates:null},type:"Feature",properties:this.properties};if(1===this.geometries.length)return{geometry:{type:"LineString",coordinates:this.geometries[0].coords},type:"Feature",properties:this.properties};for(var t=[],e=0;e<this.geometries.length;e++)t.push(this.geometries[e].coords);return{geometry:{type:"MultiLineString",coordinates:t},type:"Feature",properties:this.properties}},Nr.prototype.wkt=function(){for(var t="",e="LINESTRING(",n=function(t){e+=t[0]+" "+t[1]+","},i=0;i<this.geometries.length;i++){if(0===this.geometries[i].coords.length)return"LINESTRING(empty)";var r=this.geometries[i].coords;r.forEach(n),t+=e.substring(0,e.length-1)+")"}return t};var kr=function(t,e,n){if(!t||void 0===t.x||void 0===t.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");if(!e||void 0===e.x||void 0===e.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");this.start=new Or(t.x,t.y),this.end=new Or(e.x,e.y),this.properties=n||{};var i=this.start.x-this.end.x,r=this.start.y-this.end.y,o=Math.pow(Math.sin(r/2),2)+Math.cos(this.start.y)*Math.cos(this.end.y)*Math.pow(Math.sin(i/2),2);if(this.g=2*Math.asin(Math.sqrt(o)),this.g===Math.PI)throw new Error("it appears "+t.view()+" and "+e.view()+" are 'antipodal', e.g diametrically opposite, thus there is no single route but rather infinite");if(isNaN(this.g))throw new Error("could not calculate great circle between "+t+" and "+e)};function zr(t,e,n){if(n=n||{},"object"!==typeof n)throw new Error("options is invalid");var i=n.properties,r=n.npoints,o=n.offset;t=gt(t),e=gt(e),i=i||{},r=r||100,o=o||10;var s=new kr({x:t[0],y:t[1]},{x:e[0],y:e[1]},i),a=s.Arc(r,{offset:o});return a.json()}kr.prototype.interpolate=function(t){var e=Math.sin((1-t)*this.g)/Math.sin(this.g),n=Math.sin(t*this.g)/Math.sin(this.g),i=e*Math.cos(this.start.y)*Math.cos(this.start.x)+n*Math.cos(this.end.y)*Math.cos(this.end.x),r=e*Math.cos(this.start.y)*Math.sin(this.start.x)+n*Math.cos(this.end.y)*Math.sin(this.end.x),o=e*Math.sin(this.start.y)+n*Math.sin(this.end.y),s=Dr*Math.atan2(o,Math.sqrt(Math.pow(i,2)+Math.pow(r,2))),a=Dr*Math.atan2(r,i);return[a,s]},kr.prototype.Arc=function(t,e){var n=[];if(!t||t<=2)n.push([this.start.lon,this.start.lat]),n.push([this.end.lon,this.end.lat]);else for(var i=1/(t-1),r=0;r<t;++r){var o=i*r,s=this.interpolate(o);n.push(s)}for(var a=!1,l=0,c=e&&e.offset?e.offset:10,u=180-c,h=-180+c,d=360-c,A=1;A<n.length;++A){var p=n[A-1][0],f=n[A][0],g=Math.abs(f-p);g>d&&(f>u&&p<h||p>u&&f<h)?a=!0:g>l&&(l=g)}var m=[];if(a&&l<c){var _=[];m.push(_);for(var y=0;y<n.length;++y){var v=parseFloat(n[y][0]);if(y>0&&Math.abs(v-n[y-1][0])>d){var x=parseFloat(n[y-1][0]),b=parseFloat(n[y-1][1]),w=parseFloat(n[y][0]),E=parseFloat(n[y][1]);if(x>-180&&x<h&&180===w&&y+1<n.length&&n[y-1][0]>-180&&n[y-1][0]<h){_.push([-180,n[y][1]]),y++,_.push([n[y][0],n[y][1]]);continue}if(x>u&&x<180&&-180===w&&y+1<n.length&&n[y-1][0]>u&&n[y-1][0]<180){_.push([180,n[y][1]]),y++,_.push([n[y][0],n[y][1]]);continue}if(x<h&&w>u){var C=x;x=w,w=C;var B=b;b=E,E=B}if(x>u&&w<h&&(w+=360),x<=180&&w>=180&&x<w){var S=(180-x)/(w-x),M=S*E+(1-S)*b;_.push([n[y-1][0]>u?180:-180,M]),_=[],_.push([n[y-1][0]>u?-180:180,M]),m.push(_)}else _=[],m.push(_);_.push([v,n[y][1]])}else _.push([n[y][0],n[y][1]])}}else{var T=[];m.push(T);for(var I=0;I<n.length;++I)T.push([n[I][0],n[I][1]])}for(var L=new Nr(this.properties),P=0;P<m.length;++P){var F=new Ur;L.geometries.push(F);for(var R=m[P],D=0;D<R.length;++D)F.move_to(R[D])}return L};var Qr=zr;function Gr(t,e){if(!t)throw new Error("line is required");if(!e)throw new Error("splitter is required");var n=wt(t),i=wt(e);if("LineString"!==n)throw new Error("line must be LineString");if("FeatureCollection"===i)throw new Error("splitter cannot be a FeatureCollection");if("GeometryCollection"===i)throw new Error("splitter cannot be a GeometryCollection");var r=fr(e,{precision:7});switch(i){case"Point":return Vr(t,r);case"MultiPoint":return Hr(t,r);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return Hr(t,gi(t,r))}}function Hr(t,e){var n=[],i=Ai();return st(e,(function(e){if(n.forEach((function(t,e){t.id=e})),n.length){var r=i.search(e);if(r.features.length){var o=jr(e,r);n=n.filter((function(t){return t.id!==o.id})),i.remove(o),et(Vr(o,e),(function(t){n.push(t),i.insert(t)}))}}else n=Vr(t,e).features,n.forEach((function(t){t.bbox||(t.bbox=Un(ft(t)))})),i.load(F(n))})),F(n)}function Vr(t,e){var n=[],i=mt(t)[0],r=mt(t)[t.geometry.coordinates.length-1];if(Zr(i,gt(e))||Zr(r,gt(e)))return F([t]);var o=Ai(),s=di(t);o.load(s);var a=o.search(e);if(!a.features.length)return F([t]);var l=jr(e,a),c=[i],u=nt(s,(function(t,i,r){var o=mt(i)[1],s=gt(e);return r===l.id?(t.push(s),n.push(L(t)),Zr(s,o)?[s]:[s,o]):(t.push(o),t)}),c);return u.length>1&&n.push(L(u)),F(n)}function jr(t,e){if(!e.features.length)throw new Error("lines must contain features");if(1===e.features.length)return e.features[0];var n,i=1/0;return et(e,(function(e){var r=_i(e,t),o=r.properties.dist;o<i&&(n=e,i=o)})),n}function Zr(t,e){return t[0]===e[0]&&t[1]===e[1]}var Wr=Gr;function Xr(t,e,n,i,r){void 0===r&&(r={});var o=r.steps||64,s=Kr(n),a=Kr(i),l=Array.isArray(t)||"Feature"!==t.type?{}:t.properties;if(s===a)return L(zn(t,e,r).geometry.coordinates[0],l);var c=s,u=s<a?a:a+360,h=c,d=[],A=0;while(h<u)d.push(Nn(t,e,h,r).geometry.coordinates),A++,h=c+360*A/o;return h>u&&d.push(Nn(t,e,u,r).geometry.coordinates),L(d,l)}function Kr(t){var e=t%360;return e<0&&(e+=360),e}function qr(t,e){void 0===e&&(e={});var n=bt(t);switch(e.properties||"Feature"!==t.type||(e.properties=t.properties),n.type){case"Polygon":return Jr(n,e);case"MultiPolygon":return Yr(n,e);default:throw new Error("invalid poly")}}function Jr(t,e){void 0===e&&(e={});var n=bt(t),i=n.coordinates,r=e.properties?e.properties:"Feature"===t.type?t.properties:{};return $r(i,r)}function Yr(t,e){void 0===e&&(e={});var n=bt(t),i=n.coordinates,r=e.properties?e.properties:"Feature"===t.type?t.properties:{},o=[];return i.forEach((function(t){o.push($r(t,r))})),F(o)}function $r(t,e){return t.length>1?R(t,e):L(t[0],e)}function to(t,e){var n,i,r;void 0===e&&(e={});var o=e.properties,s=null===(n=e.autoComplete)||void 0===n||n,a=null===(i=e.orderCoords)||void 0===i||i,l=null!==(r=e.mutate)&&void 0!==r&&r;switch(l||(t=le(t)),t.type){case"FeatureCollection":var c=[];return t.features.forEach((function(t){c.push(mt(eo(t,{},s,a)))})),O(c,o);default:return eo(t,o,s,a)}}function eo(t,e,n,i){e=e||("Feature"===t.type?t.properties:{});var r=bt(t),o=r.coordinates,s=r.type;if(!o.length)throw new Error("line must contain coordinates");switch(s){case"LineString":return n&&(o=no(o)),T([o],e);case"MultiLineString":var a=[],l=0;return o.forEach((function(t){if(n&&(t=no(t)),i){var e=io(ft(L(t)));e>l?(a.unshift(t),l=e):a.push(t)}else a.push(t)})),T(a,e);default:throw new Error("geometry type "+s+" is not supported")}}function no(t){var e=t[0],n=e[0],i=e[1],r=t[t.length-1],o=r[0],s=r[1];return n===o&&i===s||t.push(e),t}function io(t){var e=t[0],n=t[1],i=t[2],r=t[3];return Math.abs(e-i)*Math.abs(n-r)}var ro=to;function oo(t,e,n){var i,r,o,s,a,l=t.length,c=lo(t[0],e),u=[];for(n||(n=[]),i=1;i<l;i++){s=t[i-1],a=t[i],r=o=lo(a,e);while(1){if(!(c|r)){u.push(s),r!==o?(u.push(a),i<l-1&&(n.push(u),u=[])):i===l-1&&u.push(a);break}if(c&r)break;c?(s=ao(s,a,c,e),c=lo(s,e)):(a=ao(s,a,r,e),r=lo(a,e))}c=o}return u.length&&n.push(u),n}function so(t,e){var n,i,r,o,s,a,l;for(i=1;i<=8;i*=2){for(n=[],r=t[t.length-1],o=!(lo(r,e)&i),s=0;s<t.length;s++)a=t[s],l=!(lo(a,e)&i),l!==o&&n.push(ao(r,a,i,e)),l&&n.push(a),r=a,o=l;if(t=n,!t.length)break}return n}function ao(t,e,n,i){return 8&n?[t[0]+(e[0]-t[0])*(i[3]-t[1])/(e[1]-t[1]),i[3]]:4&n?[t[0]+(e[0]-t[0])*(i[1]-t[1])/(e[1]-t[1]),i[1]]:2&n?[i[2],t[1]+(e[1]-t[1])*(i[2]-t[0])/(e[0]-t[0])]:1&n?[i[0],t[1]+(e[1]-t[1])*(i[0]-t[0])/(e[0]-t[0])]:null}function lo(t,e){var n=0;return t[0]<e[0]?n|=1:t[0]>e[2]&&(n|=2),t[1]<e[1]?n|=4:t[1]>e[3]&&(n|=8),n}function co(t,e){var n=bt(t),i=n.type,r="Feature"===t.type?t.properties:{},o=n.coordinates;switch(i){case"LineString":case"MultiLineString":var s=[];return"LineString"===i&&(o=[o]),o.forEach((function(t){oo(t,e,s)})),1===s.length?L(s[0],r):R(s,r);case"Polygon":return T(uo(o,e),r);case"MultiPolygon":return O(o.map((function(t){return uo(t,e)})),r);default:throw new Error("geometry "+i+" not supported")}}function uo(t,e){for(var n=[],i=0,r=t;i<r.length;i++){var o=r[i],s=so(o,e);s.length>0&&(s[0][0]===s[s.length-1][0]&&s[0][1]===s[s.length-1][1]||s.push(s[0]),s.length>=4&&n.push(s))}return n}var ho=i(8422);function Ao(t,e,n){if(void 0===n&&(n={}),n=n||{},!X(n))throw new Error("options is invalid");var i,r=n.tolerance||0,o=[],s=Ai(),a=di(t);return s.load(a),lt(e,(function(t){var e=!1;t&&(et(s.search(t),(function(n){if(!1===e){var o=mt(t).sort(),s=mt(n).sort();ho(o,s)||(0===r?Yi(o[0],n)&&Yi(o[1],n):_i(n,o[0]).properties.dist<=r&&_i(n,o[1]).properties.dist<=r)?(e=!0,i=i?po(i,t):t):(0===r?Yi(s[0],t)&&Yi(s[1],t):_i(t,s[0]).properties.dist<=r&&_i(t,s[1]).properties.dist<=r)&&(i=i?po(i,n):n)}})),!1===e&&i&&(o.push(i),i=void 0))})),i&&o.push(i),F(o)}function po(t,e){var n=mt(e),i=mt(t),r=i[0],o=i[i.length-1],s=t.geometry.coordinates;return ho(n[0],r)?s.unshift(n[1]):ho(n[0],o)?s.push(n[1]):ho(n[1],r)?s.unshift(n[0]):ho(n[1],o)&&s.push(n[0]),t}var fo=Ao;function go(t,e,n,i,r){if(r=r||{},!X(r))throw new Error("options is invalid");var o=r.properties;if(!t)throw new Error("center is required");if(void 0===n||null===n)throw new Error("bearing1 is required");if(void 0===i||null===i)throw new Error("bearing2 is required");if(!e)throw new Error("radius is required");if("object"!==typeof r)throw new Error("options must be an object");if(mo(n)===mo(i))return zn(t,e,r);var s=mt(t),a=Xr(t,e,n,i,r),l=[[s]];return J(a,(function(t){l[0].push(t)})),l[0].push(s),T(l,o)}function mo(t){var e=t%360;return e<0&&(e+=360),e}var _o=go;function yo(t,e,n){var i;void 0===n&&(n={}),i=n.final?vo(gt(e),gt(t)):vo(gt(t),gt(e));var r=i>180?-(360-i):i;return r}function vo(t,e){var n=V(t[1]),i=V(e[1]),r=V(e[0]-t[0]);r>Math.PI&&(r-=2*Math.PI),r<-Math.PI&&(r+=2*Math.PI);var o=Math.log(Math.tan(i/2+Math.PI/4)/Math.tan(n/2+Math.PI/4)),s=Math.atan2(r,o);return(H(s)+360)%360}var xo=yo;function bo(t,e,n,i){void 0===i&&(i={});var r=e<0,o=j(Math.abs(e),i.units,"meters");r&&(o=-Math.abs(o));var s=gt(t),a=wo(s,o,n);return a[0]+=a[0]-s[0]>180?-360:s[0]-a[0]>180?360:0,S(a,i.properties)}function wo(t,e,n,i){i=void 0===i?x:Number(i);var r=e/i,o=t[0]*Math.PI/180,s=V(t[1]),a=V(n),l=r*Math.cos(a),c=s+l;Math.abs(c)>Math.PI/2&&(c=c>0?Math.PI-c:-Math.PI-c);var u=Math.log(Math.tan(c/2+Math.PI/4)/Math.tan(s/2+Math.PI/4)),h=Math.abs(u)>1e-11?l/u:Math.cos(s),d=r*Math.sin(a)/h,A=o+d;return[(180*A/Math.PI+540)%360-180,180*c/Math.PI]}var Eo=bo;function Co(t,e){var n,i,r,o,s=mt(t),a=mt(e),l=ft(e),c=0,u=null;s[0]>l[0]&&s[0]<l[2]&&s[1]>l[1]&&s[1]<l[3]&&(u=ai(t,ti(e)),c=u.properties.featureIndex);var h=wt(e);switch(h){case"Polygon":n=a[0][c],i=a[0][0],null!==u&&u.geometry.coordinates[1]<s[1]&&(i=a[0][c]),o=To(a[0][0],a[0][a[0].length-1],s);var d=Bo(a[0],s,o,r,n,i);n=d[0],i=d[1];break;case"MultiPolygon":for(var A=0,p=0,f=0,g=0;g<a[0].length;g++){A=g;for(var m=!1,_=0;_<a[0][g].length;_++){if(p=_,f===c){m=!0;break}f++}if(m)break}n=a[0][A][p],i=a[0][A][p],o=To(a[0][0][0],a[0][0][a[0][0].length-1],s),a.forEach((function(t){var e=Bo(t[0],s,o,r,n,i);n=e[0],i=e[1]}));break}return F([S(n),S(i)])}function Bo(t,e,n,i,r,o){for(var s=0;s<t.length;s++){var a=t[s],l=t[s+1];s===t.length-1&&(l=t[0]),i=To(a,l,e),n<=0&&i>0?Mo(e,a,r)||(r=a):n>0&&i<=0&&(So(e,a,o)||(o=a)),n=i}return[r,o]}function So(t,e,n){return To(t,e,n)>0}function Mo(t,e,n){return To(t,e,n)<0}function To(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(n[0]-t[0])*(e[1]-t[1])}var Io=Co;function Lo(t){var e,n,i=mt(t),r=0,o=1;while(o<i.length)e=n||i[0],n=i[o],r+=(n[0]-e[0])*(n[1]+e[1]),o++;return r>0}function Po(t,e){if(e=e||{},!X(e))throw new Error("options is invalid");var n=e.reverse||!1,i=e.mutate||!1;if(!t)throw new Error("<geojson> is required");if("boolean"!==typeof n)throw new Error("<reverse> must be a boolean");if("boolean"!==typeof i)throw new Error("<mutate> must be a boolean");!1===i&&(t=le(t));var r=[];switch(t.type){case"GeometryCollection":return rt(t,(function(t){Fo(t,n)})),t;case"FeatureCollection":return et(t,(function(t){et(Fo(t,n),(function(t){r.push(t)}))})),F(r)}return Fo(t,n)}function Fo(t,e){var n="Feature"===t.type?t.geometry.type:t.type;switch(n){case"GeometryCollection":return rt(t,(function(t){Fo(t,e)})),t;case"LineString":return Ro(mt(t),e),t;case"Polygon":return Do(mt(t),e),t;case"MultiLineString":return mt(t).forEach((function(t){Ro(t,e)})),t;case"MultiPolygon":return mt(t).forEach((function(t){Do(t,e)})),t;case"Point":case"MultiPoint":return t}}function Ro(t,e){Lo(t)===e&&t.reverse()}function Do(t,e){Lo(t[0])!==e&&t[0].reverse();for(var n=1;n<t.length;n++)Lo(t[n])===e&&t[n].reverse()}var Oo=Po;function Uo(t,e){if(e=e||{},!X(e))throw new Error("options is invalid");var n=e.zProperty||"elevation",i=e.flip,r=e.flags;xt(t,"Point","input must contain Points");for(var o=No(t,i),s=[],a=0;a<o.length;a++){for(var l=o[a],c=[],u=0;u<l.length;u++){var h=l[u];h.properties[n]?c.push(h.properties[n]):c.push(0),!0===r&&(h.properties.matrixPosition=[a,u])}s.push(c)}return s}function No(t,e){var n={};et(t,(function(t){var e=mt(t)[1];n[e]||(n[e]=[]),n[e].push(t)}));var i=Object.keys(n).map((function(t){var e=n[t],i=e.sort((function(t,e){return mt(t)[0]-mt(e)[0]}));return i})),r=i.sort((function(t,n){return e?mt(t[0])[1]-mt(n[0])[1]:mt(n[0])[1]-mt(t[0])[1]}));return r}
|
|
37
|
+
*/var i=function(){function t(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return t}();function r(t,e){return t>e?1:t<e?-1:0}function o(t,e,n){var r=new i(null,null),o=r,s=r;while(1){var a=n(t,e.key);if(a<0){if(null===e.left)break;if(n(t,e.left.key)<0){var l=e.left;if(e.left=l.right,l.right=e,e=l,null===e.left)break}s.left=e,s=e,e=e.left}else{if(!(a>0))break;if(null===e.right)break;if(n(t,e.right.key)>0){l=e.right;if(e.right=l.left,l.left=e,e=l,null===e.right)break}o.right=e,o=e,e=e.right}}return o.right=e.left,s.left=e.right,e.left=r.right,e.right=r.left,e}function s(t,e,n,r){var s=new i(t,e);if(null===n)return s.left=s.right=null,s;n=o(t,n,r);var a=r(t,n.key);return a<0?(s.left=n.left,s.right=n,n.left=null):a>=0&&(s.right=n.right,s.left=n,n.right=null),s}function a(t,e,n){var i=null,r=null;if(e){e=o(t,e,n);var s=n(e.key,t);0===s?(i=e.left,r=e.right):s<0?(r=e.right,e.right=null,i=e):(i=e.left,e.left=null,r=e)}return{left:i,right:r}}function l(t,e,n){return null===e?t:(null===t||(e=o(t.key,e,n),e.left=t),e)}function c(t,e,n,i,r){if(t){i(e+(n?"└── ":"├── ")+r(t)+"\n");var o=e+(n?" ":"│ ");t.left&&c(t.left,o,!1,i,r),t.right&&c(t.right,o,!0,i,r)}}var u=function(){function t(t){void 0===t&&(t=r),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,e){return this._size++,this._root=s(t,e,this._root,this._comparator)},t.prototype.add=function(t,e){var n=new i(t,e);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,s=o(t,this._root,r),a=r(t,s.key);return 0===a?this._root=s:(a<0?(n.left=s.left,n.right=s,s.left=null):a>0&&(n.right=s.right,n.left=s,s.right=null),this._size++,this._root=n),this._root},t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},t.prototype._remove=function(t,e,n){var i;if(null===e)return null;e=o(t,e,n);var r=n(t,e.key);return 0===r?(null===e.left?i=e.right:(i=o(t,e.left,n),i.right=e.right),this._size--,i):e},t.prototype.pop=function(){var t=this._root;if(t){while(t.left)t=t.left;return this._root=o(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},t.prototype.findStatic=function(t){var e=this._root,n=this._comparator;while(e){var i=n(t,e.key);if(0===i)return e;e=i<0?e.left:e.right}return null},t.prototype.find=function(t){return this._root&&(this._root=o(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},t.prototype.contains=function(t){var e=this._root,n=this._comparator;while(e){var i=n(t,e.key);if(0===i)return!0;e=i<0?e.left:e.right}return!1},t.prototype.forEach=function(t,e){var n=this._root,i=[],r=!1;while(!r)null!==n?(i.push(n),n=n.left):0!==i.length?(n=i.pop(),t.call(e,n),n=n.right):r=!0;return this},t.prototype.range=function(t,e,n,i){var r,o=[],s=this._comparator,a=this._root;while(0!==o.length||a)if(a)o.push(a),a=a.left;else{if(a=o.pop(),r=s(a.key,e),r>0)break;if(s(a.key,t)>=0&&n.call(i,a))return this;a=a.right}return this},t.prototype.keys=function(){var t=[];return this.forEach((function(e){var n=e.key;return t.push(n)})),t},t.prototype.values=function(){var t=[];return this.forEach((function(e){var n=e.data;return t.push(n)})),t},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)while(t.left)t=t.left;return t},t.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)while(t.right)t=t.right;return t},t.prototype.at=function(t){var e=this._root,n=!1,i=0,r=[];while(!n)if(e)r.push(e),e=e.left;else if(r.length>0){if(e=r.pop(),i===t)return e;i++,e=e.right}else n=!0;return null},t.prototype.next=function(t){var e=this._root,n=null;if(t.right){n=t.right;while(n.left)n=n.left;return n}var i=this._comparator;while(e){var r=i(t.key,e.key);if(0===r)break;r<0?(n=e,e=e.left):e=e.right}return n},t.prototype.prev=function(t){var e=this._root,n=null;if(null!==t.left){n=t.left;while(n.right)n=n.right;return n}var i=this._comparator;while(e){var r=i(t.key,e.key);if(0===r)break;r<0?e=e.left:(n=e,e=e.right)}return n},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return A(this._root)},t.prototype.load=function(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=!1);var i=t.length,r=this._comparator;if(n&&g(t,e,0,i-1,r),null===this._root)this._root=h(t,e,0,i),this._size=i;else{var o=f(this.toList(),d(t,e),r);i=this._size+i,this._root=p({head:o},0,i)}return this},t.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(t){void 0===t&&(t=function(t){return String(t.key)});var e=[];return c(this._root,"",!0,(function(t){return e.push(t)}),t),e.join("")},t.prototype.update=function(t,e,n){var i=this._comparator,r=a(t,this._root,i),o=r.left,c=r.right;i(t,e)<0?c=s(e,n,c,i):o=s(e,n,o,i),this._root=l(o,c,i)},t.prototype.split=function(t){return a(t,this._root,this._comparator)},t}();function h(t,e,n,r){var o=r-n;if(o>0){var s=n+Math.floor(o/2),a=t[s],l=e[s],c=new i(a,l);return c.left=h(t,e,n,s),c.right=h(t,e,s+1,r),c}return null}function d(t,e){for(var n=new i(null,null),r=n,o=0;o<t.length;o++)r=r.next=new i(t[o],e[o]);return r.next=null,n.next}function A(t){var e=t,n=[],r=!1,o=new i(null,null),s=o;while(!r)e?(n.push(e),e=e.left):n.length>0?(e=s=s.next=n.pop(),e=e.right):r=!0;return s.next=null,o.next}function p(t,e,n){var i=n-e;if(i>0){var r=e+Math.floor(i/2),o=p(t,e,r),s=t.head;return s.left=o,t.head=t.head.next,s.right=p(t,r+1,n),s}return null}function f(t,e,n){var r=new i(null,null),o=r,s=t,a=e;while(null!==s&&null!==a)n(s.key,a.key)<0?(o.next=s,s=s.next):(o.next=a,a=a.next),o=o.next;return null!==s?o.next=s:null!==a&&(o.next=a),r.next}function g(t,e,n,i,r){if(!(n>=i)){var o=t[n+i>>1],s=n-1,a=i+1;while(1){do{s++}while(r(t[s],o)<0);do{a--}while(r(t[a],o)>0);if(s>=a)break;var l=t[s];t[s]=t[a],t[a]=l,l=e[s],e[s]=e[a],e[a]=l}g(t,e,n,a,r),g(t,e,a+1,i,r)}}var m=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},_=function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var n=t.ll.x<e.ll.x?e.ll.x:t.ll.x,i=t.ur.x<e.ur.x?t.ur.x:e.ur.x,r=t.ll.y<e.ll.y?e.ll.y:t.ll.y,o=t.ur.y<e.ur.y?t.ur.y:e.ur.y;return{ll:{x:n,y:r},ur:{x:i,y:o}}},y=Number.EPSILON;void 0===y&&(y=Math.pow(2,-52));var v=y*y,x=function(t,e){if(-y<t&&t<y&&-y<e&&e<y)return 0;var n=t-e;return n*n<v*t*e?0:t<e?-1:1},b=function(){function e(){t(this,e),this.reset()}return n(e,[{key:"reset",value:function(){this.xRounder=new w,this.yRounder=new w}},{key:"round",value:function(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}]),e}(),w=function(){function e(){t(this,e),this.tree=new u,this.round(0)}return n(e,[{key:"round",value:function(t){var e=this.tree.add(t),n=this.tree.prev(e);if(null!==n&&0===x(e.key,n.key))return this.tree.remove(t),n.key;var i=this.tree.next(e);return null!==i&&0===x(e.key,i.key)?(this.tree.remove(t),i.key):t}}]),e}(),E=new b,C=function(t,e){return t.x*e.y-t.y*e.x},B=function(t,e){return t.x*e.x+t.y*e.y},S=function(t,e,n){var i={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y},o=C(i,r);return x(o,0)},M=function(t){return Math.sqrt(B(t,t))},T=function(t,e,n){var i={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y};return C(r,i)/M(r)/M(i)},I=function(t,e,n){var i={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y};return B(r,i)/M(r)/M(i)},L=function(t,e,n){return 0===e.y?null:{x:t.x+e.x/e.y*(n-t.y),y:n}},P=function(t,e,n){return 0===e.x?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}},F=function(t,e,n,i){if(0===e.x)return P(n,i,t.x);if(0===i.x)return P(t,e,n.x);if(0===e.y)return L(n,i,t.y);if(0===i.y)return L(t,e,n.y);var r=C(e,i);if(0==r)return null;var o={x:n.x-t.x,y:n.y-t.y},s=C(o,e)/r,a=C(o,i)/r,l=t.x+a*e.x,c=n.x+s*i.x,u=t.y+a*e.y,h=n.y+s*i.y,d=(l+c)/2,A=(u+h)/2;return{x:d,y:A}},R=function(){function e(n,i){t(this,e),void 0===n.events?n.events=[this]:n.events.push(this),this.point=n,this.isLeft=i}return n(e,null,[{key:"compare",value:function(t,n){var i=e.comparePoints(t.point,n.point);return 0!==i?i:(t.point!==n.point&&t.link(n),t.isLeft!==n.isLeft?t.isLeft?1:-1:O.compare(t.segment,n.segment))}},{key:"comparePoints",value:function(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}}]),n(e,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var e=t.point.events,n=0,i=e.length;n<i;n++){var r=e[n];this.point.events.push(r),r.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var t=this.point.events.length,e=0;e<t;e++){var n=this.point.events[e];if(void 0===n.segment.consumedBy)for(var i=e+1;i<t;i++){var r=this.point.events[i];void 0===r.consumedBy&&(n.otherSE.point.events===r.otherSE.point.events&&n.segment.consume(r.segment))}}}},{key:"getAvailableLinkedEvents",value:function(){for(var t=[],e=0,n=this.point.events.length;e<n;e++){var i=this.point.events[e];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}},{key:"getLeftmostComparator",value:function(t){var e=this,n=new Map,i=function(i){var r=i.otherSE;n.set(i,{sine:T(e.point,t.point,r.point),cosine:I(e.point,t.point,r.point)})};return function(t,e){n.has(t)||i(t),n.has(e)||i(e);var r=n.get(t),o=r.sine,s=r.cosine,a=n.get(e),l=a.sine,c=a.cosine;return o>=0&&l>=0?s<c?1:s>c?-1:0:o<0&&l<0?s<c?-1:s>c?1:0:l<o?-1:l>o?1:0}}}]),e}(),D=0,O=function(){function e(n,i,r,o){t(this,e),this.id=++D,this.leftSE=n,n.segment=this,n.otherSE=i,this.rightSE=i,i.segment=this,i.otherSE=n,this.rings=r,this.windings=o}return n(e,null,[{key:"compare",value:function(t,e){var n=t.leftSE.point.x,i=e.leftSE.point.x,r=t.rightSE.point.x,o=e.rightSE.point.x;if(o<n)return 1;if(r<i)return-1;var s=t.leftSE.point.y,a=e.leftSE.point.y,l=t.rightSE.point.y,c=e.rightSE.point.y;if(n<i){if(a<s&&a<l)return 1;if(a>s&&a>l)return-1;var u=t.comparePoint(e.leftSE.point);if(u<0)return 1;if(u>0)return-1;var h=e.comparePoint(t.rightSE.point);return 0!==h?h:-1}if(n>i){if(s<a&&s<c)return-1;if(s>a&&s>c)return 1;var d=e.comparePoint(t.leftSE.point);if(0!==d)return d;var A=t.comparePoint(e.rightSE.point);return A<0?1:A>0?-1:1}if(s<a)return-1;if(s>a)return 1;if(r<o){var p=e.comparePoint(t.rightSE.point);if(0!==p)return p}if(r>o){var f=t.comparePoint(e.rightSE.point);if(f<0)return 1;if(f>0)return-1}if(r!==o){var g=l-s,m=r-n,_=c-a,y=o-i;if(g>m&&_<y)return 1;if(g<m&&_>y)return-1}return r>o?1:r<o||l<c?-1:l>c?1:t.id<e.id?-1:t.id>e.id?1:0}}]),n(e,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}},{key:"comparePoint",value:function(t){if(this.isAnEndpoint(t))return 0;var e=this.leftSE.point,n=this.rightSE.point,i=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x<e.x?1:-1;var r=(t.y-e.y)/i.y,o=e.x+r*i.x;if(t.x===o)return 0;var s=(t.x-e.x)/i.x,a=e.y+s*i.y;return t.y===a?0:t.y<a?-1:1}},{key:"getIntersection",value:function(t){var e=this.bbox(),n=t.bbox(),i=_(e,n);if(null===i)return null;var r=this.leftSE.point,o=this.rightSE.point,s=t.leftSE.point,a=t.rightSE.point,l=m(e,s)&&0===this.comparePoint(s),c=m(n,r)&&0===t.comparePoint(r),u=m(e,a)&&0===this.comparePoint(a),h=m(n,o)&&0===t.comparePoint(o);if(c&&l)return h&&!u?o:!h&&u?a:null;if(c)return u&&r.x===a.x&&r.y===a.y?null:r;if(l)return h&&o.x===s.x&&o.y===s.y?null:s;if(h&&u)return null;if(h)return o;if(u)return a;var d=F(r,this.vector(),s,t.vector());return null===d?null:m(i,d)?E.round(d.x,d.y):null}},{key:"split",value:function(t){var n=[],i=void 0!==t.events,r=new R(t,!0),o=new R(t,!1),s=this.rightSE;this.replaceRightSE(o),n.push(o),n.push(r);var a=new e(r,s,this.rings.slice(),this.windings.slice());return R.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),R.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),i&&(r.checkForConsuming(),o.checkForConsuming()),n}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,n=this.windings.length;e<n;e++)this.windings[e]*=-1}},{key:"consume",value:function(t){var n=this,i=t;while(n.consumedBy)n=n.consumedBy;while(i.consumedBy)i=i.consumedBy;var r=e.compare(n,i);if(0!==r){if(r>0){var o=n;n=i,i=o}if(n.prev===i){var s=n;n=i,i=s}for(var a=0,l=i.rings.length;a<l;a++){var c=i.rings[a],u=i.windings[a],h=n.rings.indexOf(c);-1===h?(n.rings.push(c),n.windings.push(u)):n.windings[h]+=u}i.rings=null,i.windings=null,i.consumedBy=n,i.leftSE.consumedBy=n.leftSE,i.rightSE.consumedBy=n.rightSE}}},{key:"prevInResult",value:function(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}},{key:"beforeState",value:function(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){var t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}},{key:"afterState",value:function(){if(void 0!==this._afterState)return this._afterState;var t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};for(var e=this._afterState.rings,n=this._afterState.windings,i=this._afterState.multiPolys,r=0,o=this.rings.length;r<o;r++){var s=this.rings[r],a=this.windings[r],l=e.indexOf(s);-1===l?(e.push(s),n.push(a)):n[l]+=a}for(var c=[],u=[],h=0,d=e.length;h<d;h++)if(0!==n[h]){var A=e[h],p=A.poly;if(-1===u.indexOf(p))if(A.isExterior)c.push(p);else{-1===u.indexOf(p)&&u.push(p);var f=c.indexOf(A.poly);-1!==f&&c.splice(f,1)}}for(var g=0,m=c.length;g<m;g++){var _=c[g].multiPoly;-1===i.indexOf(_)&&i.push(_)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;var t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(W.type){case"union":var n=0===t.length,i=0===e.length;this._isInResult=n!==i;break;case"intersection":var r,o;t.length<e.length?(r=t.length,o=e.length):(r=e.length,o=t.length),this._isInResult=o===W.numMultiPolys&&r<o;break;case"xor":var s=Math.abs(t.length-e.length);this._isInResult=s%2===1;break;case"difference":var a=function(t){return 1===t.length&&t[0].isSubject};this._isInResult=a(t)!==a(e);break;default:throw new Error("Unrecognized operation type found ".concat(W.type))}return this._isInResult}}],[{key:"fromRing",value:function(t,n,i){var r,o,s,a=R.comparePoints(t,n);if(a<0)r=t,o=n,s=1;else{if(!(a>0))throw new Error("Tried to create degenerate segment at [".concat(t.x,", ").concat(t.y,"]"));r=n,o=t,s=-1}var l=new R(r,!0),c=new R(o,!1);return new e(l,c,[i],[s])}}]),e}(),U=function(){function e(n,i,r){if(t(this,e),!Array.isArray(n)||0===n.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=i,this.isExterior=r,this.segments=[],"number"!==typeof n[0][0]||"number"!==typeof n[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=E.round(n[0][0],n[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};for(var s=o,a=1,l=n.length;a<l;a++){if("number"!==typeof n[a][0]||"number"!==typeof n[a][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var c=E.round(n[a][0],n[a][1]);c.x===s.x&&c.y===s.y||(this.segments.push(O.fromRing(s,c,this)),c.x<this.bbox.ll.x&&(this.bbox.ll.x=c.x),c.y<this.bbox.ll.y&&(this.bbox.ll.y=c.y),c.x>this.bbox.ur.x&&(this.bbox.ur.x=c.x),c.y>this.bbox.ur.y&&(this.bbox.ur.y=c.y),s=c)}o.x===s.x&&o.y===s.y||this.segments.push(O.fromRing(s,o,this))}return n(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.segments.length;e<n;e++){var i=this.segments[e];t.push(i.leftSE),t.push(i.rightSE)}return t}}]),e}(),N=function(){function e(n,i){if(t(this,e),!Array.isArray(n))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new U(n[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(var r=1,o=n.length;r<o;r++){var s=new U(n[r],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=i}return n(e,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,n=this.interiorRings.length;e<n;e++)for(var i=this.interiorRings[e].getSweepEvents(),r=0,o=i.length;r<o;r++)t.push(i[r]);return t}}]),e}(),k=function(){function e(n,i){if(t(this,e),!Array.isArray(n))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"===typeof n[0][0][0]&&(n=[n])}catch(a){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var r=0,o=n.length;r<o;r++){var s=new N(n[r],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=i}return n(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.polys.length;e<n;e++)for(var i=this.polys[e].getSweepEvents(),r=0,o=i.length;r<o;r++)t.push(i[r]);return t}}]),e}(),z=function(){function e(n){t(this,e),this.events=n;for(var i=0,r=n.length;i<r;i++)n[i].segment.ringOut=this;this.poly=null}return n(e,null,[{key:"factory",value:function(t){for(var n=[],i=0,r=t.length;i<r;i++){var o=t[i];if(o.isInResult()&&!o.ringOut){var s=null,a=o.leftSE,l=o.rightSE,c=[a],u=a.point,h=[];while(1){if(s=a,a=l,c.push(a),a.point===u)break;while(1){var d=a.getAvailableLinkedEvents();if(0===d.length){var A=c[0].point,p=c[c.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(A.x,",")+" ".concat(A.y,"]. Last matching segment found ends at")+" [".concat(p.x,", ").concat(p.y,"]."))}if(1===d.length){l=d[0].otherSE;break}for(var f=null,g=0,m=h.length;g<m;g++)if(h[g].point===a.point){f=g;break}if(null===f){h.push({index:c.length,point:a.point});var _=a.getLeftmostComparator(s);l=d.sort(_)[0].otherSE;break}var y=h.splice(f)[0],v=c.splice(y.index);v.unshift(v[0].otherSE),n.push(new e(v.reverse()))}}n.push(new e(c))}}return n}}]),n(e,[{key:"getGeom",value:function(){for(var t=this.events[0].point,e=[t],n=1,i=this.events.length-1;n<i;n++){var r=this.events[n].point,o=this.events[n+1].point;0!==S(r,t,o)&&(e.push(r),t=r)}if(1===e.length)return null;var s=e[0],a=e[1];0===S(s,t,a)&&e.shift(),e.push(e[0]);for(var l=this.isExteriorRing()?1:-1,c=this.isExteriorRing()?0:e.length-1,u=this.isExteriorRing()?e.length:-1,h=[],d=c;d!=u;d+=l)h.push([e[d].x,e[d].y]);return h}},{key:"isExteriorRing",value:function(){if(void 0===this._isExteriorRing){var t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var t=this.events[0],e=1,n=this.events.length;e<n;e++){var i=this.events[e];R.compare(t,i)>0&&(t=i)}var r=t.segment.prevInResult(),o=r?r.prevInResult():null;while(1){if(!r)return null;if(!o)return r.ringOut;if(o.ringOut!==r.ringOut)return o.ringOut.enclosingRing()!==r.ringOut?r.ringOut:r.ringOut.enclosingRing();r=o.prevInResult(),o=r?r.prevInResult():null}}}]),e}(),Q=function(){function e(n){t(this,e),this.exteriorRing=n,n.poly=this,this.interiorRings=[]}return n(e,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(var e=0,n=this.interiorRings.length;e<n;e++){var i=this.interiorRings[e].getGeom();null!==i&&t.push(i)}return t}}]),e}(),G=function(){function e(n){t(this,e),this.rings=n,this.polys=this._composePolys(n)}return n(e,[{key:"getGeom",value:function(){for(var t=[],e=0,n=this.polys.length;e<n;e++){var i=this.polys[e].getGeom();null!==i&&t.push(i)}return t}},{key:"_composePolys",value:function(t){for(var e=[],n=0,i=t.length;n<i;n++){var r=t[n];if(!r.poly)if(r.isExteriorRing())e.push(new Q(r));else{var o=r.enclosingRing();o.poly||e.push(new Q(o)),o.poly.addInterior(r)}}return e}}]),e}(),H=function(){function e(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O.compare;t(this,e),this.queue=n,this.tree=new u(i),this.segments=[]}return n(e,[{key:"process",value:function(t){var e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;var i=t.isLeft?this.tree.insert(e):this.tree.find(e);if(!i)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");var r=i,o=i,s=void 0,a=void 0;while(void 0===s)r=this.tree.prev(r),null===r?s=null:void 0===r.key.consumedBy&&(s=r.key);while(void 0===a)o=this.tree.next(o),null===o?a=null:void 0===o.key.consumedBy&&(a=o.key);if(t.isLeft){var l=null;if(s){var c=s.getIntersection(e);if(null!==c&&(e.isAnEndpoint(c)||(l=c),!s.isAnEndpoint(c)))for(var u=this._splitSafely(s,c),h=0,d=u.length;h<d;h++)n.push(u[h])}var A=null;if(a){var p=a.getIntersection(e);if(null!==p&&(e.isAnEndpoint(p)||(A=p),!a.isAnEndpoint(p)))for(var f=this._splitSafely(a,p),g=0,m=f.length;g<m;g++)n.push(f[g])}if(null!==l||null!==A){var _=null;if(null===l)_=A;else if(null===A)_=l;else{var y=R.comparePoints(l,A);_=y<=0?l:A}this.queue.remove(e.rightSE),n.push(e.rightSE);for(var v=e.split(_),x=0,b=v.length;x<b;x++)n.push(v[x])}n.length>0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=s)}else{if(s&&a){var w=s.getIntersection(a);if(null!==w){if(!s.isAnEndpoint(w))for(var E=this._splitSafely(s,w),C=0,B=E.length;C<B;C++)n.push(E[C]);if(!a.isAnEndpoint(w))for(var S=this._splitSafely(a,w),M=0,T=S.length;M<T;M++)n.push(S[M])}}this.tree.remove(e)}return n}},{key:"_splitSafely",value:function(t,e){this.tree.remove(t);var n=t.rightSE;this.queue.remove(n);var i=t.split(e);return i.push(n),void 0===t.consumedBy&&this.tree.insert(t),i}}]),e}(),V="undefined"!==typeof process&&{NODE_ENV:"production",BASE_URL:"/"}.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,j="undefined"!==typeof process&&{NODE_ENV:"production",BASE_URL:"/"}.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,Z=function(){function e(){t(this,e)}return n(e,[{key:"run",value:function(t,e,n){W.type=t,E.reset();for(var i=[new k(e,!0)],r=0,o=n.length;r<o;r++)i.push(new k(n[r],!1));if(W.numMultiPolys=i.length,"difference"===W.type){var s=i[0],a=1;while(a<i.length)null!==_(i[a].bbox,s.bbox)?a++:i.splice(a,1)}if("intersection"===W.type)for(var l=0,c=i.length;l<c;l++)for(var h=i[l],d=l+1,A=i.length;d<A;d++)if(null===_(h.bbox,i[d].bbox))return[];for(var p=new u(R.compare),f=0,g=i.length;f<g;f++)for(var m=i[f].getSweepEvents(),y=0,v=m.length;y<v;y++)if(p.insert(m[y]),p.size>V)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");var x=new H(p),b=p.size,w=p.pop();while(w){var C=w.key;if(p.size===b){var B=C.segment;throw new Error("Unable to pop() ".concat(C.isLeft?"left":"right"," SweepEvent ")+"[".concat(C.point.x,", ").concat(C.point.y,"] from segment #").concat(B.id," ")+"[".concat(B.leftSE.point.x,", ").concat(B.leftSE.point.y,"] -> ")+"[".concat(B.rightSE.point.x,", ").concat(B.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(p.size>V)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(x.segments.length>j)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var S=x.process(C),M=0,T=S.length;M<T;M++){var I=S[M];void 0===I.consumedBy&&p.insert(I)}b=p.size,w=p.pop()}E.reset();var L=z.factory(x.segments),P=new G(L);return P.getGeom()}}]),e}(),W=new Z,X=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return W.run("union",t,n)},K=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return W.run("intersection",t,n)},q=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return W.run("xor",t,n)},J=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return W.run("difference",t,n)},Y={union:X,intersection:K,xor:q,difference:J};return Y}))},513:function(t,e,n){"use strict";t.exports=r,t.exports["default"]=r;var i=n(5492);function r(t,e){if(!(this instanceof r))return new r(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function o(t,e,n){if(!n)return e.indexOf(t);for(var i=0;i<e.length;i++)if(n(t,e[i]))return i;return-1}function s(t,e){a(t,0,t.children.length,e,t)}function a(t,e,n,i,r){r||(r=m(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,s=e;s<n;s++)o=t.children[s],l(r,t.leaf?i(o):o);return r}function l(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 c(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function d(t){return t.maxX-t.minX+(t.maxY-t.minY)}function A(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function p(t,e){var n=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),r=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,r-n)*Math.max(0,o-i)}function f(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function m(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(t,e,n,r,o){var s,a=[e,n];while(a.length)n=a.pop(),e=a.pop(),n-e<=r||(s=e+Math.ceil((n-e)/r/2)*r,i(t,s,e,n,o),a.push(e,s,s,n))}r.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],i=this.toBBox;if(!g(t,e))return n;var r,o,s,a,l=[];while(e){for(r=0,o=e.children.length;r<o;r++)s=e.children[r],a=e.leaf?i(s):s,g(t,a)&&(e.leaf?n.push(s):f(t,a)?this._all(s,n):l.push(s));e=l.pop()}return n},collides:function(t){var e=this.data,n=this.toBBox;if(!g(t,e))return!1;var i,r,o,s,a=[];while(e){for(i=0,r=e.children.length;i<r;i++)if(o=e.children[i],s=e.leaf?n(o):o,g(t,s)){if(e.leaf||f(t,s))return!0;a.push(o)}e=a.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,n=t.length;e<n;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 r=this.data;this.data=i,i=r}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=m([]),this},remove:function(t,e){if(!t)return this;var n,i,r,s,a=this.data,l=this.toBBox(t),c=[],u=[];while(a||c.length){if(a||(a=c.pop(),i=c[c.length-1],n=u.pop(),s=!0),a.leaf&&(r=o(t,a.children,e),-1!==r))return a.children.splice(r,1),c.push(a),this._condense(c),this;s||a.leaf||!f(a,l)?i?(n++,a=i.children[n],s=!1):a=null:(c.push(a),u.push(n),n=0,i=a,a=a.children[0])}return this},toBBox:function(t){return t},compareMinX:c,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){var n=[];while(t)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},_build:function(t,e,n,i){var r,o=n-e+1,a=this._maxEntries;if(o<=a)return r=m(t.slice(e,n+1)),s(r,this.toBBox),r;i||(i=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,i-1))),r=m([]),r.leaf=!1,r.height=i;var l,c,u,h,d=Math.ceil(o/a),A=d*Math.ceil(Math.sqrt(a));for(_(t,e,n,A,this.compareMinX),l=e;l<=n;l+=A)for(u=Math.min(l+A-1,n),_(t,l,u,d,this.compareMinY),c=l;c<=u;c+=d)h=Math.min(c+d-1,u),r.children.push(this._build(t,c,h,i-1));return s(r,this.toBBox),r},_chooseSubtree:function(t,e,n,i){var r,o,s,a,l,c,u,d;while(1){if(i.push(e),e.leaf||i.length-1===n)break;for(u=d=1/0,r=0,o=e.children.length;r<o;r++)s=e.children[r],l=h(s),c=A(t,s)-l,c<d?(d=c,u=l<u?l:u,a=s):c===d&&l<u&&(u=l,a=s);e=a||e.children[0]}return e},_insert:function(t,e,n){var i=this.toBBox,r=n?t:i(t),o=[],s=this._chooseSubtree(r,this.data,e,o);s.children.push(t),l(s,r);while(e>=0){if(!(o[e].children.length>this._maxEntries))break;this._split(o,e),e--}this._adjustParentBBoxes(r,o,e)},_split:function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var o=this._chooseSplitIndex(n,r,i),a=m(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,s(n,this.toBBox),s(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},_splitRoot:function(t,e){this.data=m([t,e]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var i,r,o,s,l,c,u,d;for(c=u=1/0,i=e;i<=n-e;i++)r=a(t,0,i,this.toBBox),o=a(t,i,n,this.toBBox),s=p(r,o),l=h(r)+h(o),s<c?(c=s,d=i,u=l<u?l:u):s===c&&l<u&&(u=l,d=i);return d},_chooseSplitAxis:function(t,e,n){var i=t.leaf?this.compareMinX:c,r=t.leaf?this.compareMinY:u,o=this._allDistMargin(t,e,n,i),s=this._allDistMargin(t,e,n,r);o<s&&t.children.sort(i)},_allDistMargin:function(t,e,n,i){t.children.sort(i);var r,o,s=this.toBBox,c=a(t,0,e,s),u=a(t,n-e,n,s),h=d(c)+d(u);for(r=e;r<n-e;r++)o=t.children[r],l(c,t.leaf?s(o):o),h+=d(c);for(r=n-e-1;r>=e;r--)o=t.children[r],l(u,t.leaf?s(o):o),h+=d(u);return h},_adjustParentBBoxes:function(t,e,n){for(var i=n;i>=0;i--)l(e[i],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children,e.splice(e.indexOf(t[n]),1)):this.clear():s(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},5492:function(t){(function(e,n){t.exports=n()})(0,(function(){"use strict";function t(t,n,r,o,s){e(t,n,r||0,o||t.length-1,s||i)}function e(t,i,r,o,s){while(o>r){if(o-r>600){var a=o-r+1,l=i-r+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1),d=Math.max(r,Math.floor(i-l*u/a+h)),A=Math.min(o,Math.floor(i+(a-l)*u/a+h));e(t,i,d,A,s)}var p=t[i],f=r,g=o;n(t,r,i),s(t[o],p)>0&&n(t,r,o);while(f<g){n(t,f,g),f++,g--;while(s(t[f],p)<0)f++;while(s(t[g],p)>0)g--}0===s(t[r],p)?n(t,r,g):(g++,n(t,g,o)),g<=i&&(r=g+1),i<=g&&(o=g-1)}}function n(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function i(t,e){return t<e?-1:t>e?1:0}return t}))},1868:function(t,e,n){"use strict";var i=n(8052),r=n(4658),o=Object;t.exports=i((function(){if(null==this||this!==o(this))throw new r("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},5062:function(t,e,n){"use strict";var i=n(9477),r=n(8481),o=n(1868),s=n(1861),a=n(5734),l=r(s());i(l,{getPolyfill:s,implementation:o,shim:a}),t.exports=l},1861:function(t,e,n){"use strict";var i=n(1868),r=n(9477).supportsDescriptors,o=Object.getOwnPropertyDescriptor;t.exports=function(){if(r&&"gim"===/a/gim.flags){var t=o(RegExp.prototype,"flags");if(t&&"function"===typeof t.get&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var e="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(n,"sticky",{get:function(){e+="y"}}),t.get.call(n),"dy"===e)return t.get}}return i}},5734:function(t,e,n){"use strict";var i=n(9477).supportsDescriptors,r=n(1861),o=n(233),s=Object.defineProperty,a=n(3387),l=n(9750),c=/a/;t.exports=function(){if(!i||!l)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=r(),e=l(c),n=o(e,"flags");return n&&n.get===t||s(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},5164:function(t,e){!function(t,n){n(e)}(0,(function(t){"use strict";const e=134217729,n=33306690738754706e-32;function i(t,e,n,i,r){let o,s,a,l,c=e[0],u=i[0],h=0,d=0;u>c==u>-c?(o=c,c=e[++h]):(o=u,u=i[++d]);let A=0;if(h<t&&d<n)for(u>c==u>-c?(a=o-((s=c+o)-c),c=e[++h]):(a=o-((s=u+o)-u),u=i[++d]),o=s,0!==a&&(r[A++]=a);h<t&&d<n;)u>c==u>-c?(a=o-((s=o+c)-(l=s-o))+(c-l),c=e[++h]):(a=o-((s=o+u)-(l=s-o))+(u-l),u=i[++d]),o=s,0!==a&&(r[A++]=a);for(;h<t;)a=o-((s=o+c)-(l=s-o))+(c-l),c=e[++h],o=s,0!==a&&(r[A++]=a);for(;d<n;)a=o-((s=o+u)-(l=s-o))+(u-l),u=i[++d],o=s,0!==a&&(r[A++]=a);return 0===o&&0!==A||(r[A++]=o),A}function r(t){return new Float64Array(t)}const o=33306690738754716e-32,s=22204460492503146e-32,a=11093356479670487e-47,l=r(4),c=r(8),u=r(12),h=r(16),d=r(4);t.orient2d=function(t,r,A,p,f,g){const m=(r-g)*(A-f),_=(t-f)*(p-g),y=m-_;if(0===m||0===_||m>0!=_>0)return y;const v=Math.abs(m+_);return Math.abs(y)>=o*v?y:-function(t,r,o,A,p,f,g){let m,_,y,v,x,b,w,E,C,B,S,M,T,I,L,P,F,R;const D=t-p,O=o-p,U=r-f,N=A-f;x=(L=(E=D-(w=(b=e*D)-(b-D)))*(B=N-(C=(b=e*N)-(b-N)))-((I=D*N)-w*C-E*C-w*B))-(S=L-(F=(E=U-(w=(b=e*U)-(b-U)))*(B=O-(C=(b=e*O)-(b-O)))-((P=U*O)-w*C-E*C-w*B))),l[0]=L-(S+x)+(x-F),x=(T=I-((M=I+S)-(x=M-I))+(S-x))-(S=T-P),l[1]=T-(S+x)+(x-P),x=(R=M+S)-M,l[2]=M-(R-x)+(S-x),l[3]=R;let k=function(t,e){let n=e[0];for(let i=1;i<t;i++)n+=e[i];return n}(4,l),z=s*g;if(k>=z||-k>=z)return k;if(m=t-(D+(x=t-D))+(x-p),y=o-(O+(x=o-O))+(x-p),_=r-(U+(x=r-U))+(x-f),v=A-(N+(x=A-N))+(x-f),0===m&&0===_&&0===y&&0===v)return k;if(z=a*g+n*Math.abs(k),(k+=D*v+N*m-(U*y+O*_))>=z||-k>=z)return k;x=(L=(E=m-(w=(b=e*m)-(b-m)))*(B=N-(C=(b=e*N)-(b-N)))-((I=m*N)-w*C-E*C-w*B))-(S=L-(F=(E=_-(w=(b=e*_)-(b-_)))*(B=O-(C=(b=e*O)-(b-O)))-((P=_*O)-w*C-E*C-w*B))),d[0]=L-(S+x)+(x-F),x=(T=I-((M=I+S)-(x=M-I))+(S-x))-(S=T-P),d[1]=T-(S+x)+(x-P),x=(R=M+S)-M,d[2]=M-(R-x)+(S-x),d[3]=R;const Q=i(4,l,4,d,c);x=(L=(E=D-(w=(b=e*D)-(b-D)))*(B=v-(C=(b=e*v)-(b-v)))-((I=D*v)-w*C-E*C-w*B))-(S=L-(F=(E=U-(w=(b=e*U)-(b-U)))*(B=y-(C=(b=e*y)-(b-y)))-((P=U*y)-w*C-E*C-w*B))),d[0]=L-(S+x)+(x-F),x=(T=I-((M=I+S)-(x=M-I))+(S-x))-(S=T-P),d[1]=T-(S+x)+(x-P),x=(R=M+S)-M,d[2]=M-(R-x)+(S-x),d[3]=R;const G=i(Q,c,4,d,u);x=(L=(E=m-(w=(b=e*m)-(b-m)))*(B=v-(C=(b=e*v)-(b-v)))-((I=m*v)-w*C-E*C-w*B))-(S=L-(F=(E=_-(w=(b=e*_)-(b-_)))*(B=y-(C=(b=e*y)-(b-y)))-((P=_*y)-w*C-E*C-w*B))),d[0]=L-(S+x)+(x-F),x=(T=I-((M=I+S)-(x=M-I))+(S-x))-(S=T-P),d[1]=T-(S+x)+(x-P),x=(R=M+S)-M,d[2]=M-(R-x)+(S-x),d[3]=R;const H=i(G,u,4,d,h);return h[H-1]}(t,r,A,p,f,g,v)},t.orient2dfast=function(t,e,n,i,r,o){return(e-o)*(n-r)-(t-r)*(i-o)},Object.defineProperty(t,"__esModule",{value:!0})}))},3402:function(t,e,n){"use strict";var i=n(9643),r=n(9149),o=n(5558)(),s=n(233),a=n(4658),l=i("%Math.floor%");t.exports=function(t,e){if("function"!==typeof t)throw new a("`fn` is not a function");if("number"!==typeof e||e<0||e>4294967295||l(e)!==e)throw new a("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,c=!0;if("length"in t&&s){var u=s(t,"length");u&&!u.configurable&&(i=!1),u&&!u.writable&&(c=!1)}return(i||c||!n)&&(o?r(t,"length",e,!0,!0):r(t,"length",e)),t}},8052:function(t,e,n){"use strict";var i=n(9149),r=n(5558)(),o=n(7998).functionsHaveConfigurableNames(),s=n(4658);t.exports=function(t,e){if("function"!==typeof t)throw new s("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return n&&!o||(r?i(t,"name",e,!0,!0):i(t,"name",e)),t}},2388:function(t,e,n){"use strict";function i(){return this._array=null,Promise.resolve()}function r(){var t=this._array;return this._array=null,Promise.resolve(t?{done:!1,value:t}:{done:!0,value:void 0})}function o(t){return new s(t instanceof Uint8Array?t:new Uint8Array(t))}function s(t){this._array=t}function a(t){return fetch(t).then((function(t){return t.body&&t.body.getReader?t.body.getReader():t.arrayBuffer().then(o)}))}function l(t){return new Promise((function(e,n){var i=new XMLHttpRequest;i.responseType="arraybuffer",i.onload=function(){e(o(i.response))},i.onerror=n,i.ontimeout=n,i.open("GET",t,!0),i.send()}))}function c(t){return("function"===typeof fetch?a:l)(t)}function u(t){return"function"===typeof t.read?t:t.getReader()}n.r(e),n.d(e,{open:function(){return J},openDbf:function(){return $},openShp:function(){return Y},read:function(){return tt}}),s.prototype.read=r,s.prototype.cancel=i;var h=new Uint8Array(0);function d(){return this._source.cancel()}function A(t,e){if(!t.length)return e;if(!e.length)return t;var n=new Uint8Array(t.length+e.length);return n.set(t),n.set(e,t.length),n}function p(){var t=this,e=t._array.subarray(t._index);return t._source.read().then((function(n){return t._array=h,t._index=0,n.done?e.length>0?{done:!1,value:e}:{done:!0,value:void 0}:{done:!1,value:A(e,n.value)}}))}function f(t){if((t|=0)<0)throw new Error("invalid length");var e=this,n=this._array.length-this._index;if(this._index+t<=this._array.length)return Promise.resolve(this._array.subarray(this._index,this._index+=t));var i=new Uint8Array(t);return i.set(this._array.subarray(this._index)),function r(){return e._source.read().then((function(o){return o.done?(e._array=h,e._index=0,n>0?i.subarray(0,n):null):n+o.value.length>=t?(e._array=o.value,e._index=t-n,i.set(o.value.subarray(0,t-n),n),i):(i.set(o.value,n),n+=o.value.length,r())}))}()}function g(t){return"function"===typeof t.slice?t:new m("function"===typeof t.read?t:t.getReader())}function m(t){this._source=t,this._array=h,this._index=0}function _(){return this._source.cancel()}function y(t){return!/^[nf]$/i.test(t)&&(!!/^[yt]$/i.test(t)||null)}function v(t){return new Date(+t.substring(0,4),t.substring(4,6)-1,+t.substring(6,8))}function x(t){return!(t=t.trim())||isNaN(t=+t)?null:t}function b(t){return t.trim()||null}m.prototype.read=p,m.prototype.slice=f,m.prototype.cancel=d;var w={B:x,C:b,D:v,F:x,L:y,M:x,N:x};function E(){var t=this,e=1;return t._source.slice(t._recordLength).then((function(n){return n&&26!==n[0]?{done:!1,value:t._fields.reduce((function(i,r){return i[r.name]=w[r.type](t._decode(n.subarray(e,e+=r.length))),i}),{})}:{done:!0,value:void 0}}))}function C(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function B(t,e){return t=g(t),t.slice(32).then((function(n){var i=C(n);return t.slice(i.getUint16(8,!0)-32).then((function(n){return new S(t,e,i,C(n))}))}))}function S(t,e,n,i){this._source=t,this._decode=e.decode.bind(e),this._recordLength=n.getUint16(10,!0),this._fields=[];for(var r=0;13!==i.getUint8(r);r+=32){for(var o=0;o<11;++o)if(0===i.getUint8(r+o))break;this._fields.push({name:this._decode(new Uint8Array(i.buffer,i.byteOffset+r,o)),type:String.fromCharCode(i.getUint8(r+11)),length:i.getUint8(r+16)})}}var M=S.prototype;function T(){return this._source.cancel()}function I(t){var e,n=40,i=t.getInt32(36,!0),r=new Array(i);for(e=0;e<i;++e,n+=16)r[e]=[t.getFloat64(n,!0),t.getFloat64(n+8,!0)];return{type:"MultiPoint",coordinates:r}}function L(){return null}function P(t){return{type:"Point",coordinates:[t.getFloat64(4,!0),t.getFloat64(12,!0)]}}function F(t){var e,n=44,i=t.getInt32(36,!0),r=t.getInt32(40,!0),o=new Array(i),s=new Array(r),a=[],l=[];for(e=0;e<i;++e,n+=4)o[e]=t.getInt32(n,!0);for(e=0;e<r;++e,n+=16)s[e]=[t.getFloat64(n,!0),t.getFloat64(n+8,!0)];return o.forEach((function(t,e){var n=s.slice(t,o[e+1]);R(n)?a.push([n]):l.push(n)})),l.forEach((function(t){a.some((function(e){if(D(e[0],t))return e.push(t),!0}))||a.push([t])})),1===a.length?{type:"Polygon",coordinates:a[0]}:{type:"MultiPolygon",coordinates:a}}function R(t){if((e=t.length)<4)return!1;var e,n=0,i=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];while(++n<e)i+=t[n-1][1]*t[n][0]-t[n-1][0]*t[n][1];return i>=0}function D(t,e){var n,i=-1,r=e.length;while(++i<r)if(n=O(t,e[i]))return n>0;return!1}function O(t,e){for(var n=e[0],i=e[1],r=-1,o=0,s=t.length,a=s-1;o<s;a=o++){var l=t[o],c=l[0],u=l[1],h=t[a],d=h[0],A=h[1];if(U(l,h,e))return 0;u>i!==A>i&&n<(d-c)*(i-u)/(A-u)+c&&(r=-r)}return r}function U(t,e,n){var i=n[0]-t[0],r=n[1]-t[1];if(0===i&&0===r)return!0;var o=e[0]-t[0],s=e[1]-t[1];if(0===o&&0===s)return!1;var a=(i*o+r*s)/(o*o+s*s);return!(a<0||a>1)&&(0===a||1===a||a*o===i&&a*s===r)}function N(t){var e,n=44,i=t.getInt32(36,!0),r=t.getInt32(40,!0),o=new Array(i),s=new Array(r);for(e=0;e<i;++e,n+=4)o[e]=t.getInt32(n,!0);for(e=0;e<r;++e,n+=16)s[e]=[t.getFloat64(n,!0),t.getFloat64(n+8,!0)];return 1===i?{type:"LineString",coordinates:s}:{type:"MultiLineString",coordinates:o.map((function(t,e){return s.slice(t,o[e+1])}))}}function k(t,e){var n=new Uint8Array(t.length+e.length);return n.set(t,0),n.set(e,t.length),n}function z(){var t=this;return++t._index,t._source.slice(12).then((function(e){if(null==e)return{done:!0,value:void 0};var n=C(e);function i(){return t._source.slice(4).then((function(o){return null==o?{done:!0,value:void 0}:(n=C(e=k(e.slice(4),o)),n.getInt32(0,!1)!==t._index?i():r())}))}function r(){var r=2*n.getInt32(4,!1)-4,o=n.getInt32(8,!0);return r<0||o&&o!==t._type?i():t._source.slice(r).then((function(n){return{done:!1,value:o?t._parse(C(k(e.slice(8),n))):null}}))}return r()}))}M.read=E,M.cancel=_;var Q={0:L,1:P,3:N,5:F,8:I,11:P,13:N,15:F,18:I,21:P,23:N,25:F,28:I};function G(t){return t=g(t),t.slice(100).then((function(e){return new H(t,C(e))}))}function H(t,e){var n=e.getInt32(32,!0);if(!(n in Q))throw new Error("unsupported shape type: "+n);this._source=t,this._type=n,this._index=0,this._parse=Q[n],this.bbox=[e.getFloat64(36,!0),e.getFloat64(44,!0),e.getFloat64(52,!0),e.getFloat64(60,!0)]}var V=H.prototype;function j(){}function Z(){return Promise.all([this._dbf&&this._dbf.cancel(),this._shp.cancel()]).then(j)}function W(){var t=this;return Promise.all([t._dbf?t._dbf.read():{value:{}},t._shp.read()]).then((function(t){var e=t[0],n=t[1];return n.done?n:{done:!1,value:{type:"Feature",properties:e.value,geometry:n.value}}}))}function X(t,e,n){return Promise.all([G(t),e&&B(e,n)]).then((function(t){return new K(t[0],t[1])}))}function K(t,e){this._shp=t,this._dbf=e,this.bbox=t.bbox}V.read=z,V.cancel=T;var q=K.prototype;function J(t,e,n){return"string"===typeof e?(/\.dbf$/.test(e)||(e+=".dbf"),e=c(e,n)):e instanceof ArrayBuffer||e instanceof Uint8Array?e=o(e):null!=e&&(e=u(e)),"string"===typeof t?(/\.shp$/.test(t)||(t+=".shp"),void 0===e&&(e=c(t.substring(0,t.length-4)+".dbf",n).catch((function(){}))),t=c(t,n)):t=t instanceof ArrayBuffer||t instanceof Uint8Array?o(t):u(t),Promise.all([t,e]).then((function(t){var e=t[0],i=t[1],r="windows-1252";return n&&null!=n.encoding&&(r=n.encoding),X(e,i,i&&new TextDecoder(r))}))}function Y(t,e){return"string"===typeof t?(/\.shp$/.test(t)||(t+=".shp"),t=c(t,e)):t=t instanceof ArrayBuffer||t instanceof Uint8Array?o(t):u(t),Promise.resolve(t).then(G)}function $(t,e){var n="windows-1252";return e&&null!=e.encoding&&(n=e.encoding),n=new TextDecoder(n),"string"===typeof t?(/\.dbf$/.test(t)||(t+=".dbf"),t=c(t,e)):t=t instanceof ArrayBuffer||t instanceof Uint8Array?o(t):u(t),Promise.resolve(t).then((function(t){return B(t,n)}))}function tt(t,e,n){return J(t,e,n).then((function(t){var e=[],n={type:"FeatureCollection",features:e,bbox:t.bbox};return t.read().then((function i(r){return r.done?n:(e.push(r.value),t.read().then(i))}))}))}q.read=W,q.cancel=Z},6912:function(t){"use strict";t.exports={eudist:function(t,e,n){for(var i=t.length,r=0,o=0;o<i;o++){var s=(t[o]||0)-(e[o]||0);r+=s*s}return n?Math.sqrt(r):r},mandist:function(t,e,n){for(var i=t.length,r=0,o=0;o<i;o++)r+=Math.abs((t[o]||0)-(e[o]||0));return n?Math.sqrt(r):r},dist:function(t,e,n){var i=Math.abs(t-e);return n?i:i*i}}},7225:function(t,e,n){"use strict";var i=n(6912),r=i.eudist,o=i.dist;t.exports={kmrand:function(t,e){var n={},i=[],r=e<<2,o=t.length,s=t[0].length>0;while(i.length<e&&r-- >0){var a=t[Math.floor(Math.random()*o)],l=s?a.join("_"):""+a;n[l]||(n[l]=!0,i.push(a))}if(i.length<e)throw new Error("Error initializating clusters");return i},kmpp:function(t,e){var n=t[0].length?r:o,i=[],s=t.length,a=t[0].length>0,l={},c=t[Math.floor(Math.random()*s)],u=a?c.join("_"):""+c;i.push(c),l[u]=!0;while(i.length<e){for(var h=[],d=i.length,A=0,p=[],f=0;f<s;f++){for(var g=1/0,m=0;m<d;m++){var _=n(t[f],i[m]);_<=g&&(g=_)}h[f]=g}for(var y=0;y<s;y++)A+=h[y];for(var v=0;v<s;v++)p[v]={i:v,v:t[v],pr:h[v]/A,cs:0};p.sort((function(t,e){return t.pr-e.pr})),p[0].cs=p[0].pr;for(var x=1;x<s;x++)p[x].cs=p[x-1].cs+p[x].pr;var b=Math.random(),w=0;while(w<s-1&&p[w++].cs<b);i.push(p[w-1].v)}return i}}},840:function(t,e,n){"use strict";var i=n(6912),r=n(7225),o=i.eudist,s=(i.mandist,i.dist,r.kmrand),a=r.kmpp,l=1e4;function c(t,e,n){n=n||[];for(var i=0;i<t;i++)n[i]=e;return n}function u(t,e,n,i){var r=[],u=[],h=[],d=[],A=!1,p=i||l,f=t.length,g=t[0].length,m=g>0,_=[];if(n)r="kmrand"==n?s(t,e):"kmpp"==n?a(t,e):n;else{var y={};while(r.length<e){var v=Math.floor(Math.random()*f);y[v]||(y[v]=!0,r.push(t[v]))}}do{c(e,0,_);for(var x=0;x<f;x++){for(var b=1/0,w=0,E=0;E<e;E++){d=m?o(t[x],r[E]):Math.abs(t[x]-r[E]);d<=b&&(b=d,w=E)}h[x]=w,_[w]++}for(var C=[],B=(u=[],0);B<e;B++)C[B]=m?c(g,0,C[B]):0,u[B]=r[B];if(m){for(var S=0;S<e;S++)r[S]=[];for(var M=0;M<f;M++)for(var T=h[M],I=C[T],L=t[M],P=0;P<g;P++)I[P]+=L[P];A=!0;for(var F=0;F<e;F++){for(var R=r[F],D=C[F],O=u[F],U=_[F],N=0;N<g;N++)R[N]=D[N]/U||0;if(A)for(var k=0;k<g;k++)if(O[k]!=R[k]){A=!1;break}}}else{for(var z=0;z<f;z++){var Q=h[z];C[Q]+=t[z]}for(var G=0;G<e;G++)r[G]=C[G]/_[G]||0;A=!0;for(var H=0;H<e;H++)if(u[H]!=r[H]){A=!1;break}}A=A||--p<=0}while(!A);return{it:l-p,k:e,idxs:h,centroids:r}}t.exports=u},7053:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return i}});class i{constructor(t=[],e=r){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:n}=this,i=e[t];while(t>0){const r=t-1>>1,o=e[r];if(n(i,o)>=0)break;e[t]=o,t=r}e[t]=i}_down(t){const{data:e,compare:n}=this,i=this.length>>1,r=e[t];while(t<i){let i=1+(t<<1),o=e[i];const s=i+1;if(s<this.length&&n(e[s],o)<0&&(i=s,o=e[s]),n(o,r)>=0)break;e[t]=o,t=i}e[t]=r}}function r(t,e){return t<e?-1:t>e?1:0}},8505:function(t,e){!function(t,n){n(e)}(0,(function(t){"use strict";function e(){}function n(t){this.message=t||""}function i(t){this.message=t||""}function r(t){this.message=t||""}function o(){}function s(t){return null===t?Rt:t.color}function a(t){return null===t?null:t.parent}function l(t,e){null!==t&&(t.color=e)}function c(t){return null===t?null:t.left}function u(t){return null===t?null:t.right}function h(){this.root_=null,this.size_=0}function d(){}function A(){this.array_=[],arguments[0]instanceof vt&&this.addAll(arguments[0])}function p(){}function f(t){this.message=t||""}function g(){this.array_=[]}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(void 0===this||null===this)throw new TypeError(this+" is not an object");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(n+i,0):Math.min(i,n);var r=2 in arguments&&void 0!==arguments[2]?parseInt(Number(arguments[2]),10)||0:n;for(r=r<0?Math.max(n+arguments[2],0):Math.min(r,n);i<r;)e[i]=t,++i;return e},writable:!0}),Number.isFinite=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(t){return t!=t},Math.trunc=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)};var m=function(){};m.prototype.interfaces_=function(){return[]},m.prototype.getClass=function(){return m},m.prototype.equalsWithTolerance=function(t,e,n){return Math.abs(t-e)<=n};var _=function(t){function e(e){t.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),y=function(){},v={MAX_VALUE:{configurable:!0}};y.isNaN=function(t){return Number.isNaN(t)},y.doubleToLongBits=function(t){return t},y.longBitsToDouble=function(t){return t},y.isInfinite=function(t){return!Number.isFinite(t)},v.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(y,v);var x=function(){},b=function(){},w=function(){},E=function t(){if(this.x=null,this.y=null,this.z=null,0===arguments.length)this.x=0,this.y=0,this.z=t.NULL_ORDINATE;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.z=e.z}else 2===arguments.length?(this.x=arguments[0],this.y=arguments[1],this.z=t.NULL_ORDINATE):3===arguments.length&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},C={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};E.prototype.setOrdinate=function(t,e){switch(t){case E.X:this.x=e;break;case E.Y:this.y=e;break;case E.Z:this.z=e;break;default:throw new _("Invalid ordinate index: "+t)}},E.prototype.equals2D=function(){if(1===arguments.length){var t=arguments[0];return this.x===t.x&&this.y===t.y}if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!m.equalsWithTolerance(this.x,e.x,n)&&!!m.equalsWithTolerance(this.y,e.y,n)}},E.prototype.getOrdinate=function(t){switch(t){case E.X:return this.x;case E.Y:return this.y;case E.Z:return this.z}throw new _("Invalid ordinate index: "+t)},E.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||y.isNaN(this.z))&&y.isNaN(t.z)},E.prototype.equals=function(t){return t instanceof E&&this.equals2D(t)},E.prototype.equalInZ=function(t,e){return m.equalsWithTolerance(this.z,t.z,e)},E.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},E.prototype.clone=function(){},E.prototype.copy=function(){return new E(this)},E.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},E.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+n*n+i*i)},E.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},E.prototype.hashCode=function(){var t=17;return t=37*t+E.hashCode(this.x),37*t+E.hashCode(this.y)},E.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},E.prototype.interfaces_=function(){return[x,b,e]},E.prototype.getClass=function(){return E},E.hashCode=function(){if(1===arguments.length){var t=arguments[0],e=y.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},C.DimensionalComparator.get=function(){return B},C.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},C.NULL_ORDINATE.get=function(){return y.NaN},C.X.get=function(){return 0},C.Y.get=function(){return 1},C.Z.get=function(){return 2},Object.defineProperties(E,C);var B=function(t){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var e=arguments[0];if(2!==e&&3!==e)throw new _("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};B.prototype.compare=function(t,e){var n=t,i=e,r=B.compare(n.x,i.x);if(0!==r)return r;var o=B.compare(n.y,i.y);return 0!==o?o:this._dimensionsToTest<=2?0:B.compare(n.z,i.z)},B.prototype.interfaces_=function(){return[w]},B.prototype.getClass=function(){return B},B.compare=function(t,e){return t<e?-1:t>e?1:y.isNaN(t)?y.isNaN(e)?0:-1:y.isNaN(e)?1:0};var S=function(){};S.prototype.create=function(){},S.prototype.interfaces_=function(){return[]},S.prototype.getClass=function(){return S};var M=function(){},T={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};M.prototype.interfaces_=function(){return[]},M.prototype.getClass=function(){return M},M.toLocationSymbol=function(t){switch(t){case M.EXTERIOR:return"e";case M.BOUNDARY:return"b";case M.INTERIOR:return"i";case M.NONE:return"-"}throw new _("Unknown location value: "+t)},T.INTERIOR.get=function(){return 0},T.BOUNDARY.get=function(){return 1},T.EXTERIOR.get=function(){return 2},T.NONE.get=function(){return-1},Object.defineProperties(M,T);var I=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},L=function(){},P={LOG_10:{configurable:!0}};L.prototype.interfaces_=function(){return[]},L.prototype.getClass=function(){return L},L.log10=function(t){var e=Math.log(t);return y.isInfinite(e)||y.isNaN(e)?e:e/L.LOG_10},L.min=function(t,e,n,i){var r=t;return e<r&&(r=e),n<r&&(r=n),i<r&&(r=i),r},L.clamp=function(){if("number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1],n=arguments[2];return t<e?e:t>n?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],r=arguments[1],o=arguments[2];return i<r?r:i>o?o:i}},L.wrap=function(t,e){return t<0?e- -t%e:t%e},L.max=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],i=t;return e>i&&(i=e),n>i&&(i=n),i}if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3],l=r;return o>l&&(l=o),s>l&&(l=s),a>l&&(l=a),l}},L.average=function(t,e){return(t+e)/2},P.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(L,P);var F=function(t){this.str=t};F.prototype.append=function(t){this.str+=t},F.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},F.prototype.toString=function(t){return this.str};var R=function(t){this.value=t};R.prototype.intValue=function(){return this.value},R.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},R.isNaN=function(t){return Number.isNaN(t)};var D=function(){};D.isWhitespace=function(t){return t<=32&&t>=0||127===t},D.toUpperCase=function(t){return t.toUpperCase()};var O=function t(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else if("string"==typeof arguments[0]){var i=arguments[0];t.call(this,t.parse(i))}}else if(2===arguments.length){var r=arguments[0],o=arguments[1];this.init(r,o)}},U={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};O.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},O.prototype.extractSignificantDigits=function(t,e){var n=this.abs(),i=O.magnitude(n._hi),r=O.TEN.pow(i);(n=n.divide(r)).gt(O.TEN)?(n=n.divide(O.TEN),i+=1):n.lt(O.ONE)&&(n=n.multiply(O.TEN),i-=1);for(var o=i+1,s=new F,a=O.MAX_PRINT_DIGITS-1,l=0;l<=a;l++){t&&l===o&&s.append(".");var c=Math.trunc(n._hi);if(c<0)break;var u=!1,h=0;c>9?(u=!0,h="9"):h="0"+c,s.append(h),n=n.subtract(O.valueOf(c)).multiply(O.TEN),u&&n.selfAdd(O.TEN);var d=!0,A=O.magnitude(n._hi);if(A<0&&Math.abs(A)>=a-l&&(d=!1),!d)break}return e[0]=i,s.toString()},O.prototype.sqr=function(){return this.multiply(this)},O.prototype.doubleValue=function(){return this._hi+this._lo},O.prototype.subtract=function(){if(arguments[0]instanceof O){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},O.prototype.equals=function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},O.prototype.isZero=function(){return 0===this._hi&&0===this._lo},O.prototype.selfSubtract=function(){if(arguments[0]instanceof O){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},O.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},O.prototype.min=function(t){return this.le(t)?this:t},O.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof O){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1],r=null,o=null,s=null,a=null,l=null,c=null,u=null,h=null;return l=this._hi/n,c=O.SPLIT*l,r=c-l,h=O.SPLIT*n,r=c-r,o=l-r,s=h-n,u=l*n,s=h-s,a=n-s,h=r*s-u+r*a+o*s+o*a,c=(this._hi-u-h+this._lo-l*i)/n,h=l+c,this._hi=h,this._lo=l-h+c,this}},O.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},O.prototype.divide=function(){if(arguments[0]instanceof O){var t=arguments[0],e=null,n=null,i=null,r=null,o=null,s=null,a=null,l=null;return n=(o=this._hi/t._hi)-(e=(s=O.SPLIT*o)-(e=s-o)),l=e*(i=(l=O.SPLIT*t._hi)-(i=l-t._hi))-(a=o*t._hi)+e*(r=t._hi-i)+n*i+n*r,s=(this._hi-a-l+this._lo-o*t._lo)/t._hi,new O(l=o+s,o-l+s)}if("number"==typeof arguments[0]){var c=arguments[0];return y.isNaN(c)?O.createNaN():O.copy(this).selfDivide(c,0)}},O.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},O.prototype.pow=function(t){if(0===t)return O.valueOf(1);var e=new O(this),n=O.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2==1&&n.selfMultiply(e),(i/=2)>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},O.prototype.ceil=function(){if(this.isNaN())return O.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new O(t,e)},O.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},O.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},O.prototype.setValue=function(){if(arguments[0]instanceof O){var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},O.prototype.max=function(t){return this.ge(t)?this:t},O.prototype.sqrt=function(){if(this.isZero())return O.valueOf(0);if(this.isNegative())return O.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=O.valueOf(e),i=this.subtract(n.sqr())._hi*(.5*t);return n.add(i)},O.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof O){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0],n=null,i=null,r=null,o=null,s=null,a=null;return r=this._hi+e,s=r-this._hi,o=r-s,o=e-s+(this._hi-o),a=o+this._lo,n=r+a,i=a+(r-n),this._hi=n+i,this._lo=i+(n-this._hi),this}}else if(2===arguments.length){var l=arguments[0],c=arguments[1],u=null,h=null,d=null,A=null,p=null,f=null,g=null;A=this._hi+l,h=this._lo+c,p=A-(f=A-this._hi),d=h-(g=h-this._lo);var m=(u=A+(f=(p=l-f+(this._hi-p))+h))+(f=(d=c-g+(this._lo-d))+(f+(A-u))),_=f+(u-m);return this._hi=m,this._lo=_,this}},O.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof O){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1],r=null,o=null,s=null,a=null,l=null,c=null;r=(l=O.SPLIT*this._hi)-this._hi,c=O.SPLIT*n,r=l-r,o=this._hi-r,s=c-n;var u=(l=this._hi*n)+(c=r*(s=c-s)-l+r*(a=n-s)+o*s+o*a+(this._hi*i+this._lo*n)),h=c+(r=l-u);return this._hi=u,this._lo=h,this}},O.prototype.selfSqr=function(){return this.selfMultiply(this)},O.prototype.floor=function(){if(this.isNaN())return O.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new O(t,e)},O.prototype.negate=function(){return this.isNaN()?this:new O(-this._hi,-this._lo)},O.prototype.clone=function(){},O.prototype.multiply=function(){if(arguments[0]instanceof O){var t=arguments[0];return t.isNaN()?O.createNaN():O.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return y.isNaN(e)?O.createNaN():O.copy(this).selfMultiply(e,0)}},O.prototype.isNaN=function(){return y.isNaN(this._hi)},O.prototype.intValue=function(){return Math.trunc(this._hi)},O.prototype.toString=function(){var t=O.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},O.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),i=e[0]+1,r=n;if("."===n.charAt(0))r="0"+n;else if(i<0)r="0."+O.stringOfChar("0",-i)+n;else if(-1===n.indexOf(".")){var o=i-n.length;r=n+O.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+r:r},O.prototype.reciprocal=function(){var t=null,e=null,n=null,i=null,r=null,o=null,s=null,a=null;e=(r=1/this._hi)-(t=(o=O.SPLIT*r)-(t=o-r)),n=(a=O.SPLIT*this._hi)-this._hi;var l=r+(o=(1-(s=r*this._hi)-(a=t*(n=a-n)-s+t*(i=this._hi-n)+e*n+e*i)-r*this._lo)/this._hi);return new O(l,r-l+o)},O.prototype.toSciNotation=function(){if(this.isZero())return O.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),i=O.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===n.charAt(0))throw new Error("Found leading zero: "+n);var r="";n.length>1&&(r=n.substring(1));var o=n.charAt(0)+"."+r;return this.isNegative()?"-"+o+i:o+i},O.prototype.abs=function(){return this.isNaN()?O.NaN:this.isNegative()?this.negate():new O(this)},O.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},O.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},O.prototype.add=function(){if(arguments[0]instanceof O){var t=arguments[0];return O.copy(this).selfAdd(t)}if("number"==typeof arguments[0]){var e=arguments[0];return O.copy(this).selfAdd(e)}},O.prototype.init=function(){if(1===arguments.length){if("number"==typeof arguments[0]){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof O){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this._hi=n,this._lo=i}},O.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},O.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},O.prototype.trunc=function(){return this.isNaN()?O.NaN:this.isPositive()?this.floor():this.ceil()},O.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},O.prototype.interfaces_=function(){return[e,x,b]},O.prototype.getClass=function(){return O},O.sqr=function(t){return O.valueOf(t).selfMultiply(t)},O.valueOf=function(){if("string"==typeof arguments[0]){var t=arguments[0];return O.parse(t)}if("number"==typeof arguments[0]){var e=arguments[0];return new O(e)}},O.sqrt=function(t){return O.valueOf(t).sqrt()},O.parse=function(t){for(var e=0,n=t.length;D.isWhitespace(t.charAt(e));)e++;var i=!1;if(e<n){var r=t.charAt(e);"-"!==r&&"+"!==r||(e++,"-"===r&&(i=!0))}for(var o=new O,s=0,a=0,l=0;!(e>=n);){var c=t.charAt(e);if(e++,D.isDigit(c)){var u=c-"0";o.selfMultiply(O.TEN),o.selfAdd(u),s++}else{if("."!==c){if("e"===c||"E"===c){var h=t.substring(e);try{l=R.parseInt(h)}catch(e){throw e instanceof Error?new Error("Invalid exponent "+h+" in string "+t):e}break}throw new Error("Unexpected character '"+c+"' at position "+e+" in string "+t)}a=s}}var d=o,A=s-a-l;if(0===A)d=o;else if(A>0){var p=O.TEN.pow(A);d=o.divide(p)}else if(A<0){var f=O.TEN.pow(-A);d=o.multiply(f)}return i?d.negate():d},O.createNaN=function(){return new O(y.NaN,y.NaN)},O.copy=function(t){return new O(t)},O.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),i=Math.trunc(Math.floor(n));return 10*Math.pow(10,i)<=e&&(i+=1),i},O.stringOfChar=function(t,e){for(var n=new F,i=0;i<e;i++)n.append(t);return n.toString()},U.PI.get=function(){return new O(3.141592653589793,12246467991473532e-32)},U.TWO_PI.get=function(){return new O(6.283185307179586,24492935982947064e-32)},U.PI_2.get=function(){return new O(1.5707963267948966,6123233995736766e-32)},U.E.get=function(){return new O(2.718281828459045,14456468917292502e-32)},U.NaN.get=function(){return new O(y.NaN,y.NaN)},U.EPS.get=function(){return 123259516440783e-46},U.SPLIT.get=function(){return 134217729},U.MAX_PRINT_DIGITS.get=function(){return 32},U.TEN.get=function(){return O.valueOf(10)},U.ONE.get=function(){return O.valueOf(1)},U.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},U.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(O,U);var N=function(){},k={DP_SAFE_EPSILON:{configurable:!0}};N.prototype.interfaces_=function(){return[]},N.prototype.getClass=function(){return N},N.orientationIndex=function(t,e,n){var i=N.orientationIndexFilter(t,e,n);if(i<=1)return i;var r=O.valueOf(e.x).selfAdd(-t.x),o=O.valueOf(e.y).selfAdd(-t.y),s=O.valueOf(n.x).selfAdd(-e.x),a=O.valueOf(n.y).selfAdd(-e.y);return r.selfMultiply(a).selfSubtract(o.selfMultiply(s)).signum()},N.signOfDet2x2=function(t,e,n,i){return t.multiply(i).selfSubtract(e.multiply(n)).signum()},N.intersection=function(t,e,n,i){var r=O.valueOf(i.y).selfSubtract(n.y).selfMultiply(O.valueOf(e.x).selfSubtract(t.x)),o=O.valueOf(i.x).selfSubtract(n.x).selfMultiply(O.valueOf(e.y).selfSubtract(t.y)),s=r.subtract(o),a=O.valueOf(i.x).selfSubtract(n.x).selfMultiply(O.valueOf(t.y).selfSubtract(n.y)),l=O.valueOf(i.y).selfSubtract(n.y).selfMultiply(O.valueOf(t.x).selfSubtract(n.x)),c=a.subtract(l).selfDivide(s).doubleValue(),u=O.valueOf(t.x).selfAdd(O.valueOf(e.x).selfSubtract(t.x).selfMultiply(c)).doubleValue(),h=O.valueOf(e.x).selfSubtract(t.x).selfMultiply(O.valueOf(t.y).selfSubtract(n.y)),d=O.valueOf(e.y).selfSubtract(t.y).selfMultiply(O.valueOf(t.x).selfSubtract(n.x)),A=h.subtract(d).selfDivide(s).doubleValue(),p=O.valueOf(n.y).selfAdd(O.valueOf(i.y).selfSubtract(n.y).selfMultiply(A)).doubleValue();return new E(u,p)},N.orientationIndexFilter=function(t,e,n){var i=null,r=(t.x-n.x)*(e.y-n.y),o=(t.y-n.y)*(e.x-n.x),s=r-o;if(r>0){if(o<=0)return N.signum(s);i=r+o}else{if(!(r<0))return N.signum(s);if(o>=0)return N.signum(s);i=-r-o}var a=N.DP_SAFE_EPSILON*i;return s>=a||-s>=a?N.signum(s):2},N.signum=function(t){return t>0?1:t<0?-1:0},k.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(N,k);var z=function(){},Q={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Q.X.get=function(){return 0},Q.Y.get=function(){return 1},Q.Z.get=function(){return 2},Q.M.get=function(){return 3},z.prototype.setOrdinate=function(t,e,n){},z.prototype.size=function(){},z.prototype.getOrdinate=function(t,e){},z.prototype.getCoordinate=function(){},z.prototype.getCoordinateCopy=function(t){},z.prototype.getDimension=function(){},z.prototype.getX=function(t){},z.prototype.clone=function(){},z.prototype.expandEnvelope=function(t){},z.prototype.copy=function(){},z.prototype.getY=function(t){},z.prototype.toCoordinateArray=function(){},z.prototype.interfaces_=function(){return[b]},z.prototype.getClass=function(){return z},Object.defineProperties(z,Q);var G=function(){},H=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(G),V=function(){};V.arraycopy=function(t,e,n,i,r){for(var o=0,s=e;s<e+r;s++)n[i+o]=t[s],o++},V.getProperty=function(t){return{"line.separator":"\n"}[t]};var j=function t(){if(this.x=null,this.y=null,this.w=null,0===arguments.length)this.x=0,this.y=0,this.w=1;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.w=1}else if(2===arguments.length){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var n=arguments[0],i=arguments[1];this.x=n,this.y=i,this.w=1}else if(arguments[0]instanceof t&&arguments[1]instanceof t){var r=arguments[0],o=arguments[1];this.x=r.y*o.w-o.y*r.w,this.y=o.x*r.w-r.x*o.w,this.w=r.x*o.y-o.x*r.y}else if(arguments[0]instanceof E&&arguments[1]instanceof E){var s=arguments[0],a=arguments[1];this.x=s.y-a.y,this.y=a.x-s.x,this.w=s.x*a.y-a.x*s.y}}else if(3===arguments.length){var l=arguments[0],c=arguments[1],u=arguments[2];this.x=l,this.y=c,this.w=u}else if(4===arguments.length){var h=arguments[0],d=arguments[1],A=arguments[2],p=arguments[3],f=h.y-d.y,g=d.x-h.x,m=h.x*d.y-d.x*h.y,_=A.y-p.y,y=p.x-A.x,v=A.x*p.y-p.x*A.y;this.x=g*v-y*m,this.y=_*m-f*v,this.w=f*y-_*g}};j.prototype.getY=function(){var t=this.y/this.w;if(y.isNaN(t)||y.isInfinite(t))throw new H;return t},j.prototype.getX=function(){var t=this.x/this.w;if(y.isNaN(t)||y.isInfinite(t))throw new H;return t},j.prototype.getCoordinate=function(){var t=new E;return t.x=this.getX(),t.y=this.getY(),t},j.prototype.interfaces_=function(){return[]},j.prototype.getClass=function(){return j},j.intersection=function(t,e,n,i){var r=t.y-e.y,o=e.x-t.x,s=t.x*e.y-e.x*t.y,a=n.y-i.y,l=i.x-n.x,c=n.x*i.y-i.x*n.y,u=r*l-a*o,h=(o*c-l*s)/u,d=(a*s-r*c)/u;if(y.isNaN(h)||y.isInfinite(h)||y.isNaN(d)||y.isInfinite(d))throw new H;return new E(h,d)};var Z=function t(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,0===arguments.length)this.init();else if(1===arguments.length){if(arguments[0]instanceof E){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.init(i.x,r.x,i.y,r.y)}else if(4===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2],l=arguments[3];this.init(o,s,a,l)}},W={serialVersionUID:{configurable:!0}};Z.prototype.getArea=function(){return this.getWidth()*this.getHeight()},Z.prototype.equals=function(t){if(!(t instanceof Z))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},Z.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new Z;var e=this._minx>t._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,i=this._maxx<t._maxx?this._maxx:t._maxx,r=this._maxy<t._maxy?this._maxy:t._maxy;return new Z(e,i,n,r)},Z.prototype.isNull=function(){return this._maxx<this._minx},Z.prototype.getMaxX=function(){return this._maxx},Z.prototype.covers=function(){if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];return this.covers(t.x,t.y)}if(arguments[0]instanceof Z){var e=arguments[0];return!this.isNull()&&!e.isNull()&&e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return!this.isNull()&&n>=this._minx&&n<=this._maxx&&i>=this._miny&&i<=this._maxy}},Z.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof Z){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}if(arguments[0]instanceof E){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return!this.isNull()&&!(n>this._maxx||n<this._minx||i>this._maxy||i<this._miny)}},Z.prototype.getMinY=function(){return this._miny},Z.prototype.getMinX=function(){return this._minx},Z.prototype.expandToInclude=function(){if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof Z){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=i,this._maxy=i):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},Z.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},Z.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},Z.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},Z.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},Z.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},Z.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},Z.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},Z.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},Z.prototype.expandBy=function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},Z.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof Z){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof E){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return this.covers(n,i)}},Z.prototype.centre=function(){return this.isNull()?null:new E((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},Z.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof Z){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];r<o?(this._minx=r,this._maxx=o):(this._minx=o,this._maxx=r),s<a?(this._miny=s,this._maxy=a):(this._miny=a,this._maxy=s)}},Z.prototype.getMaxY=function(){return this._maxy},Z.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxy<t._miny?n=t._miny-this._maxy:this._miny>t._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)},Z.prototype.hashCode=function(){var t=17;return t=37*t+E.hashCode(this._minx),t=37*t+E.hashCode(this._maxx),t=37*t+E.hashCode(this._miny),37*t+E.hashCode(this._maxy)},Z.prototype.interfaces_=function(){return[x,e]},Z.prototype.getClass=function(){return Z},Z.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.x<e.x?t.x:e.x)&&n.x<=(t.x>e.x?t.x:e.x)&&n.y>=(t.y<e.y?t.y:e.y)&&n.y<=(t.y>e.y?t.y:e.y)}if(4===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2],s=arguments[3],a=Math.min(o.x,s.x),l=Math.max(o.x,s.x),c=Math.min(i.x,r.x),u=Math.max(i.x,r.x);return!(c>l)&&!(u<a)&&(a=Math.min(o.y,s.y),l=Math.max(o.y,s.y),c=Math.min(i.y,r.y),u=Math.max(i.y,r.y),!(c>l)&&!(u<a))}},W.serialVersionUID.get=function(){return 0x51845cd552189800},Object.defineProperties(Z,W);var X={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},K=function(t){this.geometryFactory=t||new me};K.prototype.read=function(t){var e,n,i;t=t.replace(/[\n\r]/g," ");var r=X.typeStr.exec(t);if(-1!==t.search("EMPTY")&&((r=X.emptyTypeStr.exec(t))[2]=void 0),r&&(n=r[1].toLowerCase(),i=r[2],J[n]&&(e=J[n].apply(this,[i]))),void 0===e)throw new Error("Could not parse WKT "+t);return e},K.prototype.write=function(t){return this.extractGeometry(t)},K.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!q[e])return null;var n=e.toUpperCase();return t.isEmpty()?n+" EMPTY":n+"("+q[e].apply(this,[t])+")"};var q={coordinate:function(t){return t.x+" "+t.y},point:function(t){return q.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push("("+q.point.apply(this,[t._geometries[n]])+")");return e.join(",")},linestring:function(t){for(var e=[],n=0,i=t._points._coordinates.length;n<i;++n)e.push(q.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(",")},linearring:function(t){for(var e=[],n=0,i=t._points._coordinates.length;n<i;++n)e.push(q.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(",")},multilinestring:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push("("+q.linestring.apply(this,[t._geometries[n]])+")");return e.join(",")},polygon:function(t){var e=[];e.push("("+q.linestring.apply(this,[t._shell])+")");for(var n=0,i=t._holes.length;n<i;++n)e.push("("+q.linestring.apply(this,[t._holes[n]])+")");return e.join(",")},multipolygon:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push("("+q.polygon.apply(this,[t._geometries[n]])+")");return e.join(",")},geometrycollection:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push(this.extractGeometry(t._geometries[n]));return e.join(",")}},J={point:function(t){if(void 0===t)return this.geometryFactory.createPoint();var e=t.trim().split(X.spaces);return this.geometryFactory.createPoint(new E(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){if(void 0===t)return this.geometryFactory.createMultiPoint();for(var e,n=t.trim().split(","),i=[],r=0,o=n.length;r<o;++r)e=n[r].replace(X.trimParens,"$1"),i.push(J.point.apply(this,[e]));return this.geometryFactory.createMultiPoint(i)},linestring:function(t){if(void 0===t)return this.geometryFactory.createLineString();for(var e,n=t.trim().split(","),i=[],r=0,o=n.length;r<o;++r)e=n[r].trim().split(X.spaces),i.push(new E(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLineString(i)},linearring:function(t){if(void 0===t)return this.geometryFactory.createLinearRing();for(var e,n=t.trim().split(","),i=[],r=0,o=n.length;r<o;++r)e=n[r].trim().split(X.spaces),i.push(new E(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLinearRing(i)},multilinestring:function(t){if(void 0===t)return this.geometryFactory.createMultiLineString();for(var e,n=t.trim().split(X.parenComma),i=[],r=0,o=n.length;r<o;++r)e=n[r].replace(X.trimParens,"$1"),i.push(J.linestring.apply(this,[e]));return this.geometryFactory.createMultiLineString(i)},polygon:function(t){if(void 0===t)return this.geometryFactory.createPolygon();for(var e,n,i,r,o=t.trim().split(X.parenComma),s=[],a=0,l=o.length;a<l;++a)e=o[a].replace(X.trimParens,"$1"),n=J.linestring.apply(this,[e]),i=this.geometryFactory.createLinearRing(n._points),0===a?r=i:s.push(i);return this.geometryFactory.createPolygon(r,s)},multipolygon:function(t){if(void 0===t)return this.geometryFactory.createMultiPolygon();for(var e,n=t.trim().split(X.doubleParenComma),i=[],r=0,o=n.length;r<o;++r)e=n[r].replace(X.trimParens,"$1"),i.push(J.polygon.apply(this,[e]));return this.geometryFactory.createMultiPolygon(i)},geometrycollection:function(t){if(void 0===t)return this.geometryFactory.createGeometryCollection();for(var e=(t=t.replace(/,\s*([A-Za-z])/g,"|$1")).trim().split("|"),n=[],i=0,r=e.length;i<r;++i)n.push(this.read(e[i]));return this.geometryFactory.createGeometryCollection(n)}},Y=function(t){this.parser=new K(t)};Y.prototype.write=function(t){return this.parser.write(t)},Y.toLineString=function(t,e){if(2!==arguments.length)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var $=function(t){function e(e){t.call(this,e),this.name="RuntimeException",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),tt=function(t){function e(){if(t.call(this),0===arguments.length)t.call(this);else if(1===arguments.length){var e=arguments[0];t.call(this,e)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}($),et=function(){};et.prototype.interfaces_=function(){return[]},et.prototype.getClass=function(){return et},et.shouldNeverReachHere=function(){if(0===arguments.length)et.shouldNeverReachHere(null);else if(1===arguments.length){var t=arguments[0];throw new tt("Should never reach here"+(null!==t?": "+t:""))}},et.isTrue=function(){var t,e;if(1===arguments.length)t=arguments[0],et.isTrue(t,null);else if(2===arguments.length&&(t=arguments[0],e=arguments[1],!t))throw null===e?new tt:new tt(e)},et.equals=function(){var t,e,n;if(2===arguments.length)t=arguments[0],e=arguments[1],et.equals(t,e,null);else if(3===arguments.length&&(t=arguments[0],e=arguments[1],n=arguments[2],!e.equals(t)))throw new tt("Expected "+t+" but encountered "+e+(null!==n?": "+n:""))};var nt=function(){this._result=null,this._inputLines=Array(2).fill().map((function(){return Array(2)})),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new E,this._intPt[1]=new E,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},it={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};nt.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},nt.prototype.getTopologySummary=function(){var t=new F;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},nt.prototype.computeIntersection=function(t,e,n,i){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=n,this._inputLines[1][1]=i,this._result=this.computeIntersect(t,e,n,i)},nt.prototype.getIntersectionNum=function(){return this._result},nt.prototype.computeIntLineIndex=function(){if(0===arguments.length)null===this._intLineIndex&&(this._intLineIndex=Array(2).fill().map((function(){return Array(2)})),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(1===arguments.length){var t=arguments[0];this.getEdgeDistance(t,0)>this.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},nt.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},nt.prototype.setPrecisionModel=function(t){this._precisionModel=t},nt.prototype.isInteriorIntersection=function(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var t=arguments[0],e=0;e<this._result;e++)if(!this._intPt[e].equals2D(this._inputLines[t][0])&&!this._intPt[e].equals2D(this._inputLines[t][1]))return!0;return!1}},nt.prototype.getIntersection=function(t){return this._intPt[t]},nt.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},nt.prototype.hasIntersection=function(){return this._result!==nt.NO_INTERSECTION},nt.prototype.getEdgeDistance=function(t,e){return nt.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1])},nt.prototype.isCollinear=function(){return this._result===nt.COLLINEAR_INTERSECTION},nt.prototype.toString=function(){return Y.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+Y.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},nt.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},nt.prototype.isIntersection=function(t){for(var e=0;e<this._result;e++)if(this._intPt[e].equals2D(t))return!0;return!1},nt.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},nt.prototype.interfaces_=function(){return[]},nt.prototype.getClass=function(){return nt},nt.computeEdgeDistance=function(t,e,n){var i=Math.abs(n.x-e.x),r=Math.abs(n.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(n))o=i>r?i:r;else{var s=Math.abs(t.x-e.x),a=Math.abs(t.y-e.y);0!==(o=i>r?s:a)||t.equals(e)||(o=Math.max(s,a))}return et.isTrue(!(0===o&&!t.equals(e)),"Bad distance calculation"),o},nt.nonRobustComputeEdgeDistance=function(t,e,n){var i=t.x-e.x,r=t.y-e.y,o=Math.sqrt(i*i+r*r);return et.isTrue(!(0===o&&!t.equals(e)),"Invalid distance calculation"),o},it.DONT_INTERSECT.get=function(){return 0},it.DO_INTERSECT.get=function(){return 1},it.COLLINEAR.get=function(){return 2},it.NO_INTERSECTION.get=function(){return 0},it.POINT_INTERSECTION.get=function(){return 1},it.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(nt,it);var rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(t){var e=new Z(this._inputLines[0][0],this._inputLines[0][1]),n=new Z(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&n.contains(t)},e.prototype.computeIntersection=function(){if(3!==arguments.length)return t.prototype.computeIntersection.apply(this,arguments);var e=arguments[0],n=arguments[1],i=arguments[2];if(this._isProper=!1,Z.intersects(n,i,e)&&0===at.orientationIndex(n,i,e)&&0===at.orientationIndex(i,n,e))return this._isProper=!0,(e.equals(n)||e.equals(i))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION},e.prototype.normalizeToMinimum=function(t,e,n,i,r){r.x=this.smallestInAbsValue(t.x,e.x,n.x,i.x),r.y=this.smallestInAbsValue(t.y,e.y,n.y,i.y),t.x-=r.x,t.y-=r.y,e.x-=r.x,e.y-=r.y,n.x-=r.x,n.y-=r.y,i.x-=r.x,i.y-=r.y},e.prototype.safeHCoordinateIntersection=function(t,n,i,r){var o=null;try{o=j.intersection(t,n,i,r)}catch(s){if(!(s instanceof H))throw s;o=e.nearestEndpoint(t,n,i,r)}return o},e.prototype.intersection=function(t,n,i,r){var o=this.intersectionWithNormalization(t,n,i,r);return this.isInSegmentEnvelopes(o)||(o=new E(e.nearestEndpoint(t,n,i,r))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},e.prototype.smallestInAbsValue=function(t,e,n,i){var r=t,o=Math.abs(r);return Math.abs(e)<o&&(r=e,o=Math.abs(e)),Math.abs(n)<o&&(r=n,o=Math.abs(n)),Math.abs(i)<o&&(r=i),r},e.prototype.checkDD=function(t,e,n,i,r){var o=N.intersection(t,e,n,i),s=this.isInSegmentEnvelopes(o);V.out.println("DD in env = "+s+" --------------------- "+o),r.distance(o)>1e-4&&V.out.println("Distance = "+r.distance(o))},e.prototype.intersectionWithNormalization=function(t,e,n,i){var r=new E(t),o=new E(e),s=new E(n),a=new E(i),l=new E;this.normalizeToEnvCentre(r,o,s,a,l);var c=this.safeHCoordinateIntersection(r,o,s,a);return c.x+=l.x,c.y+=l.y,c},e.prototype.computeCollinearIntersection=function(e,n,i,r){var o=Z.intersects(e,n,i),s=Z.intersects(e,n,r),a=Z.intersects(i,r,e),l=Z.intersects(i,r,n);return o&&s?(this._intPt[0]=i,this._intPt[1]=r,t.COLLINEAR_INTERSECTION):a&&l?(this._intPt[0]=e,this._intPt[1]=n,t.COLLINEAR_INTERSECTION):o&&a?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||s||l?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&l?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||s||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&a?(this._intPt[0]=r,this._intPt[1]=e,!r.equals(e)||o||l?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&l?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||o||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(t,e,n,i,r){var o=t.x<e.x?t.x:e.x,s=t.y<e.y?t.y:e.y,a=t.x>e.x?t.x:e.x,l=t.y>e.y?t.y:e.y,c=n.x<i.x?n.x:i.x,u=n.y<i.y?n.y:i.y,h=n.x>i.x?n.x:i.x,d=n.y>i.y?n.y:i.y,A=((o>c?o:c)+(a<h?a:h))/2,p=((s>u?s:u)+(l<d?l:d))/2;r.x=A,r.y=p,t.x-=r.x,t.y-=r.y,e.x-=r.x,e.y-=r.y,n.x-=r.x,n.y-=r.y,i.x-=r.x,i.y-=r.y},e.prototype.computeIntersect=function(e,n,i,r){if(this._isProper=!1,!Z.intersects(e,n,i,r))return t.NO_INTERSECTION;var o=at.orientationIndex(e,n,i),s=at.orientationIndex(e,n,r);if(o>0&&s>0||o<0&&s<0)return t.NO_INTERSECTION;var a=at.orientationIndex(i,r,e),l=at.orientationIndex(i,r,n);return a>0&&l>0||a<0&&l<0?t.NO_INTERSECTION:0===o&&0===s&&0===a&&0===l?this.computeCollinearIntersection(e,n,i,r):(0===o||0===s||0===a||0===l?(this._isProper=!1,e.equals2D(i)||e.equals2D(r)?this._intPt[0]=e:n.equals2D(i)||n.equals2D(r)?this._intPt[0]=n:0===o?this._intPt[0]=new E(i):0===s?this._intPt[0]=new E(r):0===a?this._intPt[0]=new E(e):0===l&&(this._intPt[0]=new E(n))):(this._isProper=!0,this._intPt[0]=this.intersection(e,n,i,r)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(t,e,n,i){var r=t,o=at.distancePointLine(t,n,i),s=at.distancePointLine(e,n,i);return s<o&&(o=s,r=e),(s=at.distancePointLine(n,t,e))<o&&(o=s,r=n),(s=at.distancePointLine(i,t,e))<o&&(o=s,r=i),r},e}(nt),ot=function(){};ot.prototype.interfaces_=function(){return[]},ot.prototype.getClass=function(){return ot},ot.orientationIndex=function(t,e,n){var i=e.x-t.x,r=e.y-t.y,o=n.x-e.x,s=n.y-e.y;return ot.signOfDet2x2(i,r,o,s)},ot.signOfDet2x2=function(t,e,n,i){var r=null,o=null,s=null;if(r=1,0===t||0===i)return 0===e||0===n?0:e>0?n>0?-r:r:n>0?r:-r;if(0===e||0===n)return i>0?t>0?r:-r:t>0?-r:r;if(e>0?i>0?e<=i||(r=-r,o=t,t=n,n=o,o=e,e=i,i=o):e<=-i?(r=-r,n=-n,i=-i):(o=t,t=-n,n=o,o=e,e=-i,i=o):i>0?-e<=i?(r=-r,t=-t,e=-e):(o=-t,t=n,n=o,o=-e,e=i,i=o):e>=i?(t=-t,e=-e,n=-n,i=-i):(r=-r,o=-t,t=-n,n=o,o=-e,e=-i,i=o),t>0){if(!(n>0))return r;if(!(t<=n))return r}else{if(n>0)return-r;if(!(t>=n))return-r;r=-r,t=-t,n=-n}for(;;){if(s=Math.floor(n/t),n-=s*t,(i-=s*e)<0)return-r;if(i>e)return r;if(t>n+n){if(e<i+i)return r}else{if(e>i+i)return-r;n=t-n,i=e-i,r=-r}if(0===i)return 0===n?0:-r;if(0===n)return r;if(s=Math.floor(t/n),t-=s*n,(e-=s*i)<0)return r;if(e>i)return-r;if(n>t+t){if(i<e+e)return-r}else{if(i>e+e)return r;t=n-t,e=i-e,r=-r}if(0===e)return 0===t?0:r;if(0===t)return-r}};var st=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};st.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var n=t.x,i=e.x;return n>i&&(n=e.x,i=t.x),this._p.x>=n&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var r=t.x-this._p.x,o=t.y-this._p.y,s=e.x-this._p.x,a=e.y-this._p.y,l=ot.signOfDet2x2(r,o,s,a);if(0===l)return this._isPointOnSegment=!0,null;a<o&&(l=-l),l>0&&this._crossingCount++}},st.prototype.isPointInPolygon=function(){return this.getLocation()!==M.EXTERIOR},st.prototype.getLocation=function(){return this._isPointOnSegment?M.BOUNDARY:this._crossingCount%2==1?M.INTERIOR:M.EXTERIOR},st.prototype.isOnSegment=function(){return this._isPointOnSegment},st.prototype.interfaces_=function(){return[]},st.prototype.getClass=function(){return st},st.locatePointInRing=function(){if(arguments[0]instanceof E&&I(arguments[1],z)){for(var t=arguments[0],e=arguments[1],n=new st(t),i=new E,r=new E,o=1;o<e.size();o++)if(e.getCoordinate(o,i),e.getCoordinate(o-1,r),n.countSegment(i,r),n.isOnSegment())return n.getLocation();return n.getLocation()}if(arguments[0]instanceof E&&arguments[1]instanceof Array){for(var s=arguments[0],a=arguments[1],l=new st(s),c=1;c<a.length;c++){var u=a[c],h=a[c-1];if(l.countSegment(u,h),l.isOnSegment())return l.getLocation()}return l.getLocation()}};var at=function(){},lt={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.orientationIndex=function(t,e,n){return N.orientationIndex(t,e,n)},at.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,n=t[0].x,i=1;i<t.length-1;i++){var r=t[i].x-n,o=t[i+1].y;e+=r*(t[i-1].y-o)}return e/2}if(I(arguments[0],z)){var s=arguments[0],a=s.size();if(a<3)return 0;var l=new E,c=new E,u=new E;s.getCoordinate(0,c),s.getCoordinate(1,u);var h=c.x;u.x-=h;for(var d=0,A=1;A<a-1;A++)l.y=c.y,c.x=u.x,c.y=u.y,s.getCoordinate(A+1,u),u.x-=h,d+=c.x*(l.y-u.y);return d/2}},at.distanceLineLine=function(t,e,n,i){if(t.equals(e))return at.distancePointLine(t,n,i);if(n.equals(i))return at.distancePointLine(i,t,e);var r=!1;if(Z.intersects(t,e,n,i)){var o=(e.x-t.x)*(i.y-n.y)-(e.y-t.y)*(i.x-n.x);if(0===o)r=!0;else{var s=(t.y-n.y)*(i.x-n.x)-(t.x-n.x)*(i.y-n.y),a=((t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y))/o,l=s/o;(l<0||l>1||a<0||a>1)&&(r=!0)}}else r=!0;return r?L.min(at.distancePointLine(t,n,i),at.distancePointLine(e,n,i),at.distancePointLine(n,t,e),at.distancePointLine(i,t,e)):0},at.isPointInRing=function(t,e){return at.locatePointInRing(t,e)!==M.EXTERIOR},at.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,i=new E;t.getCoordinate(0,i);for(var r=i.x,o=i.y,s=1;s<e;s++){t.getCoordinate(s,i);var a=i.x,l=i.y,c=a-r,u=l-o;n+=Math.sqrt(c*c+u*u),r=a,o=l}return n},at.isCCW=function(t){var e=t.length-1;if(e<3)throw new _("Ring has fewer than 4 points, so orientation cannot be determined");for(var n=t[0],i=0,r=1;r<=e;r++){var o=t[r];o.y>n.y&&(n=o,i=r)}var s=i;do{(s-=1)<0&&(s=e)}while(t[s].equals2D(n)&&s!==i);var a=i;do{a=(a+1)%e}while(t[a].equals2D(n)&&a!==i);var l=t[s],c=t[a];if(l.equals2D(n)||c.equals2D(n)||l.equals2D(c))return!1;var u=at.computeOrientation(l,n,c),h=!1;return h=0===u?l.x>c.x:u>0,h},at.locatePointInRing=function(t,e){return st.locatePointInRing(t,e)},at.distancePointLinePerpendicular=function(t,e,n){var i=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),r=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/i;return Math.abs(r)*Math.sqrt(i)},at.computeOrientation=function(t,e,n){return at.orientationIndex(t,e,n)},at.distancePointLine=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new _("Line array must contain at least one vertex");for(var n=t.distance(e[0]),i=0;i<e.length-1;i++){var r=at.distancePointLine(t,e[i],e[i+1]);r<n&&(n=r)}return n}if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];if(s.x===a.x&&s.y===a.y)return o.distance(s);var l=(a.x-s.x)*(a.x-s.x)+(a.y-s.y)*(a.y-s.y),c=((o.x-s.x)*(a.x-s.x)+(o.y-s.y)*(a.y-s.y))/l;if(c<=0)return o.distance(s);if(c>=1)return o.distance(a);var u=((s.y-o.y)*(a.x-s.x)-(s.x-o.x)*(a.y-s.y))/l;return Math.abs(u)*Math.sqrt(l)}},at.isOnLine=function(t,e){for(var n=new rt,i=1;i<e.length;i++){var r=e[i-1],o=e[i];if(n.computeIntersection(t,r,o),n.hasIntersection())return!0}return!1},lt.CLOCKWISE.get=function(){return-1},lt.RIGHT.get=function(){return at.CLOCKWISE},lt.COUNTERCLOCKWISE.get=function(){return 1},lt.LEFT.get=function(){return at.COUNTERCLOCKWISE},lt.COLLINEAR.get=function(){return 0},lt.STRAIGHT.get=function(){return at.COLLINEAR},Object.defineProperties(at,lt);var ct=function(){};ct.prototype.filter=function(t){},ct.prototype.interfaces_=function(){return[]},ct.prototype.getClass=function(){return ct};var ut=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},ht={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};ut.prototype.isGeometryCollection=function(){return this.getSortIndex()===ut.SORTINDEX_GEOMETRYCOLLECTION},ut.prototype.getFactory=function(){return this._factory},ut.prototype.getGeometryN=function(t){return this},ut.prototype.getArea=function(){return 0},ut.prototype.isRectangle=function(){return!1},ut.prototype.equals=function(){if(arguments[0]instanceof ut){var t=arguments[0];return null!==t&&this.equalsTopo(t)}if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof ut))return!1;var n=e;return this.equalsExact(n)}},ut.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},ut.prototype.geometryChanged=function(){this.apply(ut.geometryChangedFilter)},ut.prototype.geometryChangedAction=function(){this._envelope=null},ut.prototype.equalsNorm=function(t){return null!==t&&this.norm().equalsExact(t.norm())},ut.prototype.getLength=function(){return 0},ut.prototype.getNumGeometries=function(){return 1},ut.prototype.compareTo=function(){if(1===arguments.length){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}if(2===arguments.length){var n=arguments[0],i=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,i)}},ut.prototype.getUserData=function(){return this._userData},ut.prototype.getSRID=function(){return this._SRID},ut.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},ut.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===ut.SORTINDEX_GEOMETRYCOLLECTION)throw new _("This method does not support GeometryCollection arguments")},ut.prototype.equal=function(t,e,n){return 0===n?t.equals(e):t.distance(e)<=n},ut.prototype.norm=function(){var t=this.copy();return t.normalize(),t},ut.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},ut.prototype.getEnvelopeInternal=function(){return null===this._envelope&&(this._envelope=this.computeEnvelopeInternal()),new Z(this._envelope)},ut.prototype.setSRID=function(t){this._SRID=t},ut.prototype.setUserData=function(t){this._userData=t},ut.prototype.compare=function(t,e){for(var n=t.iterator(),i=e.iterator();n.hasNext()&&i.hasNext();){var r=n.next(),o=i.next(),s=r.compareTo(o);if(0!==s)return s}return n.hasNext()?1:i.hasNext()?-1:0},ut.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},ut.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===ut.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===ut.SORTINDEX_MULTIPOINT||this.getSortIndex()===ut.SORTINDEX_MULTILINESTRING||this.getSortIndex()===ut.SORTINDEX_MULTIPOLYGON},ut.prototype.interfaces_=function(){return[b,x,e]},ut.prototype.getClass=function(){return ut},ut.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},ut.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(null===t[e])return!0;return!1},ht.serialVersionUID.get=function(){return 0x799ea46522854c00},ht.SORTINDEX_POINT.get=function(){return 0},ht.SORTINDEX_MULTIPOINT.get=function(){return 1},ht.SORTINDEX_LINESTRING.get=function(){return 2},ht.SORTINDEX_LINEARRING.get=function(){return 3},ht.SORTINDEX_MULTILINESTRING.get=function(){return 4},ht.SORTINDEX_POLYGON.get=function(){return 5},ht.SORTINDEX_MULTIPOLYGON.get=function(){return 6},ht.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},ht.geometryChangedFilter.get=function(){return dt},Object.defineProperties(ut,ht);var dt=function(){};dt.interfaces_=function(){return[ct]},dt.filter=function(t){t.geometryChangedAction()};var At=function(){};At.prototype.filter=function(t){},At.prototype.interfaces_=function(){return[]},At.prototype.getClass=function(){return At};var pt=function(){},ft={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};pt.prototype.isInBoundary=function(t){},pt.prototype.interfaces_=function(){return[]},pt.prototype.getClass=function(){return pt},ft.Mod2BoundaryNodeRule.get=function(){return gt},ft.EndPointBoundaryNodeRule.get=function(){return mt},ft.MultiValentEndPointBoundaryNodeRule.get=function(){return _t},ft.MonoValentEndPointBoundaryNodeRule.get=function(){return yt},ft.MOD2_BOUNDARY_RULE.get=function(){return new gt},ft.ENDPOINT_BOUNDARY_RULE.get=function(){return new mt},ft.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new _t},ft.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new yt},ft.OGC_SFS_BOUNDARY_RULE.get=function(){return pt.MOD2_BOUNDARY_RULE},Object.defineProperties(pt,ft);var gt=function(){};gt.prototype.isInBoundary=function(t){return t%2==1},gt.prototype.interfaces_=function(){return[pt]},gt.prototype.getClass=function(){return gt};var mt=function(){};mt.prototype.isInBoundary=function(t){return t>0},mt.prototype.interfaces_=function(){return[pt]},mt.prototype.getClass=function(){return mt};var _t=function(){};_t.prototype.isInBoundary=function(t){return t>1},_t.prototype.interfaces_=function(){return[pt]},_t.prototype.getClass=function(){return _t};var yt=function(){};yt.prototype.isInBoundary=function(t){return 1===t},yt.prototype.interfaces_=function(){return[pt]},yt.prototype.getClass=function(){return yt};var vt=function(){};vt.prototype.add=function(){},vt.prototype.addAll=function(){},vt.prototype.isEmpty=function(){},vt.prototype.iterator=function(){},vt.prototype.size=function(){},vt.prototype.toArray=function(){},vt.prototype.remove=function(){},(n.prototype=new Error).name="IndexOutOfBoundsException";var xt=function(){};xt.prototype.hasNext=function(){},xt.prototype.next=function(){},xt.prototype.remove=function(){};var bt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(vt);(i.prototype=new Error).name="NoSuchElementException";var wt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof vt&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,vt]},e.prototype.add=function(t){return 1===arguments.length?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.set=function(t,e){var n=this.array_[t];return this.array_[t]=e,n},e.prototype.iterator=function(){return new Et(this)},e.prototype.get=function(t){if(t<0||t>=this.size())throw new n;return this.array_[t]},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e.prototype.remove=function(t){for(var e=!1,n=0,i=this.array_.length;n<i;n++)if(this.array_[n]===t){this.array_.splice(n,1),e=!0;break}return e},e}(bt),Et=function(t){function e(e){t.call(this),this.arrayList_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new i;return this.arrayList_.get(this.position_++)},e.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},e.prototype.set=function(t){return this.arrayList_.set(this.position_-1,t)},e.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},e}(xt),Ct=function(t){function e(){if(t.call(this),0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.ensureCapacity(e.length),this.add(e,!0)}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.ensureCapacity(n.length),this.add(n,i)}}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={coordArrayType:{configurable:!0}};return n.coordArrayType.get=function(){return new Array(0).fill(null)},e.prototype.getCoordinate=function(t){return this.get(t)},e.prototype.addAll=function(){if(2===arguments.length){for(var e=arguments[0],n=arguments[1],i=!1,r=e.iterator();r.hasNext();)this.add(r.next(),n),i=!0;return i}return t.prototype.addAll.apply(this,arguments)},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=0;n<this.size();n++)e.add(n,this.get(n).copy());return e},e.prototype.toCoordinateArray=function(){return this.toArray(e.coordArrayType)},e.prototype.add=function(){if(1===arguments.length){var e=arguments[0];t.prototype.add.call(this,e)}else if(2===arguments.length){if(arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var n=arguments[0],i=arguments[1];return this.add(n,i,!0),!0}if(arguments[0]instanceof E&&"boolean"==typeof arguments[1]){var r=arguments[0];if(!arguments[1]&&this.size()>=1&&this.get(this.size()-1).equals2D(r))return null;t.prototype.add.call(this,r)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var o=arguments[0],s=arguments[1];return this.add(o,s),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var a=arguments[0],l=arguments[1];if(arguments[2])for(var c=0;c<a.length;c++)this.add(a[c],l);else for(var u=a.length-1;u>=0;u--)this.add(a[u],l);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof E){var h=arguments[0],d=arguments[1];if(!arguments[2]){var A=this.size();if(A>0){if(h>0&&this.get(h-1).equals2D(d))return null;if(h<A&&this.get(h).equals2D(d))return null}}t.prototype.add.call(this,h,d)}}else if(4===arguments.length){var p=arguments[0],f=arguments[1],g=arguments[2],m=arguments[3],_=1;g>m&&(_=-1);for(var y=g;y!==m;y+=_)this.add(p[y],f);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new E(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(wt),Bt=function(){},St={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};St.ForwardComparator.get=function(){return Mt},St.BidirectionalComparator.get=function(){return Tt},St.coordArrayType.get=function(){return new Array(0).fill(null)},Bt.prototype.interfaces_=function(){return[]},Bt.prototype.getClass=function(){return Bt},Bt.isRing=function(t){return!(t.length<4)&&!!t[0].equals2D(t[t.length-1])},Bt.ptNotInList=function(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(Bt.indexOf(i,e)<0)return i}return null},Bt.scroll=function(t,e){var n=Bt.indexOf(e,t);if(n<0)return null;var i=new Array(t.length).fill(null);V.arraycopy(t,n,i,0,t.length-n),V.arraycopy(t,0,i,t.length-n,n),V.arraycopy(i,0,t,0,t.length)},Bt.equals=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(null===t||null===e)return!1;if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0}if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];if(i===r)return!0;if(null===i||null===r)return!1;if(i.length!==r.length)return!1;for(var s=0;s<i.length;s++)if(0!==o.compare(i[s],r[s]))return!1;return!0}},Bt.intersection=function(t,e){for(var n=new Ct,i=0;i<t.length;i++)e.intersects(t[i])&&n.add(t[i],!0);return n.toCoordinateArray()},Bt.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},Bt.removeRepeatedPoints=function(t){return Bt.hasRepeatedPoints(t)?new Ct(t,!1).toCoordinateArray():t},Bt.reverse=function(t){for(var e=t.length-1,n=Math.trunc(e/2),i=0;i<=n;i++){var r=t[i];t[i]=t[e-i],t[e-i]=r}},Bt.removeNull=function(t){for(var e=0,n=0;n<t.length;n++)null!==t[n]&&e++;var i=new Array(e).fill(null);if(0===e)return i;for(var r=0,o=0;o<t.length;o++)null!==t[o]&&(i[r++]=t[o]);return i},Bt.copyDeep=function(){if(1===arguments.length){for(var t=arguments[0],e=new Array(t.length).fill(null),n=0;n<t.length;n++)e[n]=new E(t[n]);return e}if(5===arguments.length)for(var i=arguments[0],r=arguments[1],o=arguments[2],s=arguments[3],a=arguments[4],l=0;l<a;l++)o[s+l]=new E(i[r+l])},Bt.isEqualReversed=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],r=e[t.length-n-1];if(0!==i.compareTo(r))return!1}return!0},Bt.envelope=function(t){for(var e=new Z,n=0;n<t.length;n++)e.expandToInclude(t[n]);return e},Bt.toCoordinateArray=function(t){return t.toArray(Bt.coordArrayType)},Bt.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},Bt.indexOf=function(t,e){for(var n=0;n<e.length;n++)if(t.equals(e[n]))return n;return-1},Bt.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var n=t.length-1-e,i=t[e].compareTo(t[n]);if(0!==i)return i}return 1},Bt.compare=function(t,e){for(var n=0;n<t.length&&n<e.length;){var i=t[n].compareTo(e[n]);if(0!==i)return i;n++}return n<e.length?-1:n<t.length?1:0},Bt.minCoordinate=function(t){for(var e=null,n=0;n<t.length;n++)(null===e||e.compareTo(t[n])>0)&&(e=t[n]);return e},Bt.extract=function(t,e,n){e=L.clamp(e,0,t.length);var i=(n=L.clamp(n,-1,t.length))-e+1;n<0&&(i=0),e>=t.length&&(i=0),n<e&&(i=0);var r=new Array(i).fill(null);if(0===i)return r;for(var o=0,s=e;s<=n;s++)r[o++]=t[s];return r},Object.defineProperties(Bt,St);var Mt=function(){};Mt.prototype.compare=function(t,e){return Bt.compare(t,e)},Mt.prototype.interfaces_=function(){return[w]},Mt.prototype.getClass=function(){return Mt};var Tt=function(){};Tt.prototype.compare=function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(0===n.length)return 0;var r=Bt.compare(n,i);return Bt.isEqualReversed(n,i)?0:r},Tt.prototype.OLDcompare=function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(0===n.length)return 0;for(var r=Bt.increasingDirection(n),o=Bt.increasingDirection(i),s=r>0?0:n.length-1,a=o>0?0:n.length-1,l=0;l<n.length;l++){var c=n[s].compareTo(i[a]);if(0!==c)return c;s+=r,a+=o}return 0},Tt.prototype.interfaces_=function(){return[w]},Tt.prototype.getClass=function(){return Tt};var It=function(){};It.prototype.get=function(){},It.prototype.put=function(){},It.prototype.size=function(){},It.prototype.values=function(){},It.prototype.entrySet=function(){};var Lt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(It);(r.prototype=new Error).name="OperationNotSupported",(o.prototype=new vt).contains=function(){};var Pt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof vt&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contains=function(t){for(var e=0,n=this.array_.length;e<n;e++)if(this.array_[e]===t)return!0;return!1},e.prototype.add=function(t){return!this.contains(t)&&(this.array_.push(t),!0)},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.remove=function(t){throw new Error},e.prototype.size=function(){return this.array_.length},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e.prototype.iterator=function(){return new Ft(this)},e}(o),Ft=function(t){function e(e){t.call(this),this.hashSet_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new i;return this.hashSet_.array_[this.position_++]},e.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},e.prototype.remove=function(){throw new r},e}(xt),Rt=0;(h.prototype=new Lt).get=function(t){for(var e=this.root_;null!==e;){var n=t.compareTo(e.key);if(n<0)e=e.left;else{if(!(n>0))return e.value;e=e.right}}return null},h.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:Rt,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,i,r=this.root_;do{if(n=r,(i=t.compareTo(r.key))<0)r=r.left;else{if(!(i>0)){var o=r.value;return r.value=e,o}r=r.right}}while(null!==r);var s={key:t,left:null,right:null,value:e,parent:n,color:Rt,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?n.left=s:n.right=s,this.fixAfterInsertion(s),this.size_++,null},h.prototype.fixAfterInsertion=function(t){for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(a(t)===c(a(a(t)))){var e=u(a(a(t)));1===s(e)?(l(a(t),Rt),l(e,Rt),l(a(a(t)),1),t=a(a(t))):(t===u(a(t))&&(t=a(t),this.rotateLeft(t)),l(a(t),Rt),l(a(a(t)),1),this.rotateRight(a(a(t))))}else{var n=c(a(a(t)));1===s(n)?(l(a(t),Rt),l(n,Rt),l(a(a(t)),1),t=a(a(t))):(t===c(a(t))&&(t=a(t),this.rotateRight(t)),l(a(t),Rt),l(a(a(t)),1),this.rotateLeft(a(a(t))))}this.root_.color=Rt},h.prototype.values=function(){var t=new wt,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=h.successor(e));)t.add(e.value);return t},h.prototype.entrySet=function(){var t=new Pt,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=h.successor(e));)t.add(e);return t},h.prototype.rotateLeft=function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},h.prototype.rotateRight=function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},h.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},h.successor=function(t){if(null===t)return null;if(null!==t.right){for(var e=t.right;null!==e.left;)e=e.left;return e}for(var n=t.parent,i=t;null!==n&&i===n.right;)i=n,n=n.parent;return n},h.prototype.size=function(){return this.size_};var Dt=function(){};Dt.prototype.interfaces_=function(){return[]},Dt.prototype.getClass=function(){return Dt},d.prototype=new o,(A.prototype=new d).contains=function(t){for(var e=0,n=this.array_.length;e<n;e++)if(0===this.array_[e].compareTo(t))return!0;return!1},A.prototype.add=function(t){if(this.contains(t))return!1;for(var e=0,n=this.array_.length;e<n;e++)if(1===this.array_[e].compareTo(t))return this.array_.splice(e,0,t),!0;return this.array_.push(t),!0},A.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},A.prototype.remove=function(t){throw new r},A.prototype.size=function(){return this.array_.length},A.prototype.isEmpty=function(){return 0===this.array_.length},A.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},A.prototype.iterator=function(){return new Ot(this)};var Ot=function(t){this.treeSet_=t,this.position_=0};Ot.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new i;return this.treeSet_.array_[this.position_++]},Ot.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},Ot.prototype.remove=function(){throw new r};var Ut=function(){};Ut.sort=function(){var t,e,n,i,r=arguments[0];if(1===arguments.length)i=function(t,e){return t.compareTo(e)},r.sort(i);else if(2===arguments.length)n=arguments[1],i=function(t,e){return n.compare(t,e)},r.sort(i);else if(3===arguments.length){(e=r.slice(arguments[1],arguments[2])).sort();var o=r.slice(0,arguments[1]).concat(e,r.slice(arguments[2],r.length));for(r.splice(0,r.length),t=0;t<o.length;t++)r.push(o[t])}else if(4===arguments.length)for(e=r.slice(arguments[1],arguments[2]),n=arguments[3],i=function(t,e){return n.compare(t,e)},e.sort(i),o=r.slice(0,arguments[1]).concat(e,r.slice(arguments[2],r.length)),r.splice(0,r.length),t=0;t<o.length;t++)r.push(o[t])},Ut.asList=function(t){for(var e=new wt,n=0,i=t.length;n<i;n++)e.add(t[n]);return e};var Nt=function(){},kt={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};kt.P.get=function(){return 0},kt.L.get=function(){return 1},kt.A.get=function(){return 2},kt.FALSE.get=function(){return-1},kt.TRUE.get=function(){return-2},kt.DONTCARE.get=function(){return-3},kt.SYM_FALSE.get=function(){return"F"},kt.SYM_TRUE.get=function(){return"T"},kt.SYM_DONTCARE.get=function(){return"*"},kt.SYM_P.get=function(){return"0"},kt.SYM_L.get=function(){return"1"},kt.SYM_A.get=function(){return"2"},Nt.prototype.interfaces_=function(){return[]},Nt.prototype.getClass=function(){return Nt},Nt.toDimensionSymbol=function(t){switch(t){case Nt.FALSE:return Nt.SYM_FALSE;case Nt.TRUE:return Nt.SYM_TRUE;case Nt.DONTCARE:return Nt.SYM_DONTCARE;case Nt.P:return Nt.SYM_P;case Nt.L:return Nt.SYM_L;case Nt.A:return Nt.SYM_A}throw new _("Unknown dimension value: "+t)},Nt.toDimensionValue=function(t){switch(D.toUpperCase(t)){case Nt.SYM_FALSE:return Nt.FALSE;case Nt.SYM_TRUE:return Nt.TRUE;case Nt.SYM_DONTCARE:return Nt.DONTCARE;case Nt.SYM_P:return Nt.P;case Nt.SYM_L:return Nt.L;case Nt.SYM_A:return Nt.A}throw new _("Unknown dimension symbol: "+t)},Object.defineProperties(Nt,kt);var zt=function(){};zt.prototype.filter=function(t){},zt.prototype.interfaces_=function(){return[]},zt.prototype.getClass=function(){return zt};var Qt=function(){};Qt.prototype.filter=function(t,e){},Qt.prototype.isDone=function(){},Qt.prototype.isGeometryChanged=function(){},Qt.prototype.interfaces_=function(){return[]},Qt.prototype.getClass=function(){return Qt};var Gt=function(t){function e(e,n){if(t.call(this,n),this._geometries=e||[],t.hasNullElements(this._geometries))throw new _("geometries must not contain null elements")}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){for(var t=new Z,e=0;e<this._geometries.length;e++)t.expandToInclude(this._geometries[e].getEnvelopeInternal());return t},e.prototype.getGeometryN=function(t){return this._geometries[t]},e.prototype.getSortIndex=function(){return t.SORTINDEX_GEOMETRYCOLLECTION},e.prototype.getCoordinates=function(){for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=0;n<this._geometries.length;n++)for(var i=this._geometries[n].getCoordinates(),r=0;r<i.length;r++)t[++e]=i[r];return t},e.prototype.getArea=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getArea();return t},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var i=e;if(this._geometries.length!==i._geometries.length)return!1;for(var r=0;r<this._geometries.length;r++)if(!this._geometries[r].equalsExact(i._geometries[r],n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<this._geometries.length;t++)this._geometries[t].normalize();Ut.sort(this._geometries)},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},e.prototype.getBoundaryDimension=function(){for(var t=Nt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getBoundaryDimension());return t},e.prototype.getDimension=function(){for(var t=Nt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getDimension());return t},e.prototype.getLength=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getNumPoints();return t},e.prototype.getNumGeometries=function(){return this._geometries.length},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createGeometryCollection(e)},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0],e=new A(Ut.asList(this._geometries)),n=new A(Ut.asList(t._geometries));return this.compare(e,n)}if(2===arguments.length){for(var i=arguments[0],r=arguments[1],o=i,s=this.getNumGeometries(),a=o.getNumGeometries(),l=0;l<s&&l<a;){var c=this.getGeometryN(l),u=o.getGeometryN(l),h=c.compareToSameClass(u,r);if(0!==h)return h;l++}return l<s?1:l<a?-1:0}},e.prototype.apply=function(){if(I(arguments[0],At))for(var t=arguments[0],e=0;e<this._geometries.length;e++)this._geometries[e].apply(t);else if(I(arguments[0],Qt)){var n=arguments[0];if(0===this._geometries.length)return null;for(var i=0;i<this._geometries.length&&(this._geometries[i].apply(n),!n.isDone());i++);n.isGeometryChanged()&&this.geometryChanged()}else if(I(arguments[0],zt)){var r=arguments[0];r.filter(this);for(var o=0;o<this._geometries.length;o++)this._geometries[o].apply(r)}else if(I(arguments[0],ct)){var s=arguments[0];s.filter(this);for(var a=0;a<this._geometries.length;a++)this._geometries[a].apply(s)}},e.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),et.shouldNeverReachHere(),null},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._geometries=new Array(this._geometries.length).fill(null);for(var n=0;n<this._geometries.length;n++)e._geometries[n]=this._geometries[n].clone();return e},e.prototype.getGeometryType=function(){return"GeometryCollection"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.isEmpty=function(){for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isEmpty())return!1;return!0},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x4f07bcb1f857d800},Object.defineProperties(e,n),e}(ut),Ht=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ut.SORTINDEX_MULTILINESTRING},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Nt.FALSE:0},e.prototype.isClosed=function(){if(this.isEmpty())return!1;for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isClosed())return!1;return!0},e.prototype.getDimension=function(){return 1},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[t-1-n]=this._geometries[n].reverse();return this.getFactory().createMultiLineString(e)},e.prototype.getBoundary=function(){return new Vt(this).getBoundary()},e.prototype.getGeometryType=function(){return"MultiLineString"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[Dt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x7155d2ab4afa8000},Object.defineProperties(e,n),e}(Gt),Vt=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,1===arguments.length){var t=arguments[0],e=pt.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=i}};Vt.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return 1===e.length?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},Vt.prototype.getBoundary=function(){return this._geom instanceof Kt?this.boundaryLineString(this._geom):this._geom instanceof Ht?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},Vt.prototype.boundaryLineString=function(t){return this._geom.isEmpty()?this.getEmptyMultiPoint():t.isClosed()?this._bnRule.isInBoundary(2)?t.getStartPoint():this._geomFact.createMultiPoint():this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},Vt.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},Vt.prototype.computeBoundaryCoordinates=function(t){var e=new wt;this._endpointMap=new h;for(var n=0;n<t.getNumGeometries();n++){var i=t.getGeometryN(n);0!==i.getNumPoints()&&(this.addEndpoint(i.getCoordinateN(0)),this.addEndpoint(i.getCoordinateN(i.getNumPoints()-1)))}for(var r=this._endpointMap.entrySet().iterator();r.hasNext();){var o=r.next(),s=o.getValue().count;this._bnRule.isInBoundary(s)&&e.add(o.getKey())}return Bt.toCoordinateArray(e)},Vt.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);null===e&&(e=new jt,this._endpointMap.put(t,e)),e.count++},Vt.prototype.interfaces_=function(){return[]},Vt.prototype.getClass=function(){return Vt},Vt.getBoundary=function(){if(1===arguments.length){var t=arguments[0];return new Vt(t).getBoundary()}if(2===arguments.length){var e=arguments[0],n=arguments[1];return new Vt(e,n).getBoundary()}};var jt=function(){this.count=null};jt.prototype.interfaces_=function(){return[]},jt.prototype.getClass=function(){return jt};var Zt=function(){},Wt={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};Zt.prototype.interfaces_=function(){return[]},Zt.prototype.getClass=function(){return Zt},Zt.chars=function(t,e){for(var n=new Array(e).fill(null),i=0;i<e;i++)n[i]=t;return String(n)},Zt.getStackTrace=function(){if(1===arguments.length){var t=arguments[0],e=new function(){},n=new function(){}(e);return t.printStackTrace(n),e.toString()}if(2===arguments.length){for(var i=arguments[0],r=arguments[1],o="",s=new function(){}(new function(){}(Zt.getStackTrace(i))),a=0;a<r;a++)try{o+=s.readLine()+Zt.NEWLINE}catch(t){if(!(t instanceof p))throw t;et.shouldNeverReachHere()}return o}},Zt.split=function(t,e){for(var n=e.length,i=new wt,r=""+t,o=r.indexOf(e);o>=0;){var s=r.substring(0,o);i.add(s),o=(r=r.substring(o+n)).indexOf(e)}r.length>0&&i.add(r);for(var a=new Array(i.size()).fill(null),l=0;l<a.length;l++)a[l]=i.get(l);return a},Zt.toString=function(){if(1===arguments.length){var t=arguments[0];return Zt.SIMPLE_ORDINATE_FORMAT.format(t)}},Zt.spaces=function(t){return Zt.chars(" ",t)},Wt.NEWLINE.get=function(){return V.getProperty("line.separator")},Wt.SIMPLE_ORDINATE_FORMAT.get=function(){return new function(){}("0.#")},Object.defineProperties(Zt,Wt);var Xt=function(){};Xt.prototype.interfaces_=function(){return[]},Xt.prototype.getClass=function(){return Xt},Xt.copyCoord=function(t,e,n,i){for(var r=Math.min(t.getDimension(),n.getDimension()),o=0;o<r;o++)n.setOrdinate(i,o,t.getOrdinate(e,o))},Xt.isRing=function(t){var e=t.size();return 0===e||!(e<=3)&&t.getOrdinate(0,z.X)===t.getOrdinate(e-1,z.X)&&t.getOrdinate(0,z.Y)===t.getOrdinate(e-1,z.Y)},Xt.isEqual=function(t,e){var n=t.size();if(n!==e.size())return!1;for(var i=Math.min(t.getDimension(),e.getDimension()),r=0;r<n;r++)for(var o=0;o<i;o++){var s=t.getOrdinate(r,o),a=e.getOrdinate(r,o);if(t.getOrdinate(r,o)!==e.getOrdinate(r,o)&&(!y.isNaN(s)||!y.isNaN(a)))return!1}return!0},Xt.extend=function(t,e,n){var i=t.create(n,e.getDimension()),r=e.size();if(Xt.copy(e,0,i,0,r),r>0)for(var o=r;o<n;o++)Xt.copy(e,r-1,i,o,1);return i},Xt.reverse=function(t){for(var e=t.size()-1,n=Math.trunc(e/2),i=0;i<=n;i++)Xt.swap(t,i,e-i)},Xt.swap=function(t,e,n){if(e===n)return null;for(var i=0;i<t.getDimension();i++){var r=t.getOrdinate(e,i);t.setOrdinate(e,i,t.getOrdinate(n,i)),t.setOrdinate(n,i,r)}},Xt.copy=function(t,e,n,i,r){for(var o=0;o<r;o++)Xt.copyCoord(t,e+o,n,i+o)},Xt.toString=function(){if(1===arguments.length){var t=arguments[0],e=t.size();if(0===e)return"()";var n=t.getDimension(),i=new F;i.append("(");for(var r=0;r<e;r++){r>0&&i.append(" ");for(var o=0;o<n;o++)o>0&&i.append(","),i.append(Zt.toString(t.getOrdinate(r,o)))}return i.append(")"),i.toString()}},Xt.ensureValidRing=function(t,e){var n=e.size();return 0===n?e:n<=3?Xt.createClosedRing(t,e,4):e.getOrdinate(0,z.X)===e.getOrdinate(n-1,z.X)&&e.getOrdinate(0,z.Y)===e.getOrdinate(n-1,z.Y)?e:Xt.createClosedRing(t,e,n+1)},Xt.createClosedRing=function(t,e,n){var i=t.create(n,e.getDimension()),r=e.size();Xt.copy(e,0,i,0,r);for(var o=r;o<n;o++)Xt.copy(e,0,i,o,1);return i};var Kt=function(t){function e(e,n){t.call(this,n),this._points=null,this.init(e)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new Z:this._points.expandEnvelope(new Z)},e.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},e.prototype.getSortIndex=function(){return t.SORTINDEX_LINESTRING},e.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var i=e;if(this._points.size()!==i._points.size())return!1;for(var r=0;r<this._points.size();r++)if(!this.equal(this._points.getCoordinate(r),i._points.getCoordinate(r),n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<Math.trunc(this._points.size()/2);t++){var e=this._points.size()-1-t;if(!this._points.getCoordinate(t).equals(this._points.getCoordinate(e)))return this._points.getCoordinate(t).compareTo(this._points.getCoordinate(e))>0&&Xt.reverse(this._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Nt.FALSE:0},e.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return at.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var t=this._points.copy();return Xt.reverse(t),this.getFactory().createLineString(t)},e.prototype.compareToSameClass=function(){if(1===arguments.length){for(var t=arguments[0],e=0,n=0;e<this._points.size()&&n<t._points.size();){var i=this._points.getCoordinate(e).compareTo(t._points.getCoordinate(n));if(0!==i)return i;e++,n++}return e<this._points.size()?1:n<t._points.size()?-1:0}if(2===arguments.length){var r=arguments[0];return arguments[1].compare(this._points,r._points)}},e.prototype.apply=function(){if(I(arguments[0],At))for(var t=arguments[0],e=0;e<this._points.size();e++)t.filter(this._points.getCoordinate(e));else if(I(arguments[0],Qt)){var n=arguments[0];if(0===this._points.size())return null;for(var i=0;i<this._points.size()&&(n.filter(this._points,i),!n.isDone());i++);n.isGeometryChanged()&&this.geometryChanged()}else(I(arguments[0],zt)||I(arguments[0],ct))&&arguments[0].filter(this)},e.prototype.getBoundary=function(){return new Vt(this).getBoundary()},e.prototype.isEquivalentClass=function(t){return t instanceof e},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._points=this._points.clone(),e},e.prototype.getCoordinateN=function(t){return this._points.getCoordinate(t)},e.prototype.getGeometryType=function(){return"LineString"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._points},e.prototype.isEmpty=function(){return 0===this._points.size()},e.prototype.init=function(t){if(null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),1===t.size())throw new _("Invalid number of points in LineString (found "+t.size()+" - must be 0 or >= 2)");this._points=t},e.prototype.isCoordinate=function(t){for(var e=0;e<this._points.size();e++)if(this._points.getCoordinate(e).equals(t))return!0;return!1},e.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},e.prototype.getPointN=function(t){return this.getFactory().createPoint(this._points.getCoordinate(t))},e.prototype.interfaces_=function(){return[Dt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(e,n),e}(ut),qt=function(){};qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt};var Jt=function(t){function e(e,n){t.call(this,n),this._coordinates=e||null,this.init(this._coordinates)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new Z;var t=new Z;return t.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),t},e.prototype.getSortIndex=function(){return t.SORTINDEX_POINT},e.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&(!(!this.isEmpty()||!e.isEmpty())||this.isEmpty()===e.isEmpty()&&this.equal(e.getCoordinate(),this.getCoordinate(),n))}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){},e.prototype.getCoordinate=function(){return 0!==this._coordinates.size()?this._coordinates.getCoordinate(0):null},e.prototype.getBoundaryDimension=function(){return Nt.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getNumPoints=function(){return this.isEmpty()?0:1},e.prototype.reverse=function(){return this.copy()},e.prototype.getX=function(){if(null===this.getCoordinate())throw new Error("getX called on empty Point");return this.getCoordinate().x},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0];return this.getCoordinate().compareTo(t.getCoordinate())}if(2===arguments.length){var e=arguments[0];return arguments[1].compare(this._coordinates,e._coordinates)}},e.prototype.apply=function(){if(I(arguments[0],At)){var t=arguments[0];if(this.isEmpty())return null;t.filter(this.getCoordinate())}else if(I(arguments[0],Qt)){var e=arguments[0];if(this.isEmpty())return null;e.filter(this._coordinates,0),e.isGeometryChanged()&&this.geometryChanged()}else(I(arguments[0],zt)||I(arguments[0],ct))&&arguments[0].filter(this)},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._coordinates=this._coordinates.clone(),e},e.prototype.getGeometryType=function(){return"Point"},e.prototype.copy=function(){return new e(this._coordinates.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._coordinates},e.prototype.getY=function(){if(null===this.getCoordinate())throw new Error("getY called on empty Point");return this.getCoordinate().y},e.prototype.isEmpty=function(){return 0===this._coordinates.size()},e.prototype.init=function(t){null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),et.isTrue(t.size()<=1),this._coordinates=t},e.prototype.isSimple=function(){return!0},e.prototype.interfaces_=function(){return[qt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x44077bad161cbc00},Object.defineProperties(e,n),e}(ut),Yt=function(){};Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt};var $t=function(t){function e(e,n,i){if(t.call(this,i),this._shell=null,this._holes=null,null===e&&(e=this.getFactory().createLinearRing()),null===n&&(n=[]),t.hasNullElements(n))throw new _("holes must not contain null elements");if(e.isEmpty()&&t.hasNonEmptyElements(n))throw new _("shell is empty but holes are not");this._shell=e,this._holes=n}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},e.prototype.getSortIndex=function(){return t.SORTINDEX_POLYGON},e.prototype.getCoordinates=function(){if(this.isEmpty())return[];for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=this._shell.getCoordinates(),i=0;i<n.length;i++)t[++e]=n[i];for(var r=0;r<this._holes.length;r++)for(var o=this._holes[r].getCoordinates(),s=0;s<o.length;s++)t[++e]=o[s];return t},e.prototype.getArea=function(){var t=0;t+=Math.abs(at.signedArea(this._shell.getCoordinateSequence()));for(var e=0;e<this._holes.length;e++)t-=Math.abs(at.signedArea(this._holes[e].getCoordinateSequence()));return t},e.prototype.isRectangle=function(){if(0!==this.getNumInteriorRing())return!1;if(null===this._shell)return!1;if(5!==this._shell.getNumPoints())return!1;for(var t=this._shell.getCoordinateSequence(),e=this.getEnvelopeInternal(),n=0;n<5;n++){var i=t.getX(n);if(i!==e.getMinX()&&i!==e.getMaxX())return!1;var r=t.getY(n);if(r!==e.getMinY()&&r!==e.getMaxY())return!1}for(var o=t.getX(0),s=t.getY(0),a=1;a<=4;a++){var l=t.getX(a),c=t.getY(a);if(l!==o===(c!==s))return!1;o=l,s=c}return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var i=e,r=this._shell,o=i._shell;if(!r.equalsExact(o,n))return!1;if(this._holes.length!==i._holes.length)return!1;for(var s=0;s<this._holes.length;s++)if(!this._holes[s].equalsExact(i._holes[s],n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){if(0===arguments.length){this.normalize(this._shell,!0);for(var t=0;t<this._holes.length;t++)this.normalize(this._holes[t],!1);Ut.sort(this._holes)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(e.isEmpty())return null;var i=new Array(e.getCoordinates().length-1).fill(null);V.arraycopy(e.getCoordinates(),0,i,0,i.length);var r=Bt.minCoordinate(e.getCoordinates());Bt.scroll(i,r),V.arraycopy(i,0,e.getCoordinates(),0,i.length),e.getCoordinates()[i.length]=i[0],at.isCCW(e.getCoordinates())===n&&Bt.reverse(e.getCoordinates())}},e.prototype.getCoordinate=function(){return this._shell.getCoordinate()},e.prototype.getNumInteriorRing=function(){return this._holes.length},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.getLength=function(){var t=0;t+=this._shell.getLength();for(var e=0;e<this._holes.length;e++)t+=this._holes[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=this._shell.getNumPoints(),e=0;e<this._holes.length;e++)t+=this._holes[e].getNumPoints();return t},e.prototype.reverse=function(){var t=this.copy();t._shell=this._shell.copy().reverse(),t._holes=new Array(this._holes.length).fill(null);for(var e=0;e<this._holes.length;e++)t._holes[e]=this._holes[e].copy().reverse();return t},e.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0],e=this._shell,n=t._shell;return e.compareToSameClass(n)}if(2===arguments.length){var i=arguments[0],r=arguments[1],o=i,s=this._shell,a=o._shell,l=s.compareToSameClass(a,r);if(0!==l)return l;for(var c=this.getNumInteriorRing(),u=o.getNumInteriorRing(),h=0;h<c&&h<u;){var d=this.getInteriorRingN(h),A=o.getInteriorRingN(h),p=d.compareToSameClass(A,r);if(0!==p)return p;h++}return h<c?1:h<u?-1:0}},e.prototype.apply=function(t){if(I(t,At)){this._shell.apply(t);for(var e=0;e<this._holes.length;e++)this._holes[e].apply(t)}else if(I(t,Qt)){if(this._shell.apply(t),!t.isDone())for(var n=0;n<this._holes.length&&(this._holes[n].apply(t),!t.isDone());n++);t.isGeometryChanged()&&this.geometryChanged()}else if(I(t,zt))t.filter(this);else if(I(t,ct)){t.filter(this),this._shell.apply(t);for(var i=0;i<this._holes.length;i++)this._holes[i].apply(t)}},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();var t=new Array(this._holes.length+1).fill(null);t[0]=this._shell;for(var e=0;e<this._holes.length;e++)t[e+1]=this._holes[e];return t.length<=1?this.getFactory().createLinearRing(t[0].getCoordinateSequence()):this.getFactory().createMultiLineString(t)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._shell=this._shell.clone(),e._holes=new Array(this._holes.length).fill(null);for(var n=0;n<this._holes.length;n++)e._holes[n]=this._holes[n].clone();return e},e.prototype.getGeometryType=function(){return"Polygon"},e.prototype.copy=function(){for(var t=this._shell.copy(),n=new Array(this._holes.length).fill(null),i=0;i<n.length;i++)n[i]=this._holes[i].copy();return new e(t,n,this._factory)},e.prototype.getExteriorRing=function(){return this._shell},e.prototype.isEmpty=function(){return this._shell.isEmpty()},e.prototype.getInteriorRingN=function(t){return this._holes[t]},e.prototype.interfaces_=function(){return[Yt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(e,n),e}(ut),te=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ut.SORTINDEX_MULTIPOINT},e.prototype.isValid=function(){return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getCoordinate=function(){if(1===arguments.length){var e=arguments[0];return this._geometries[e].getCoordinate()}return t.prototype.getCoordinate.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return Nt.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.getGeometryType=function(){return"MultiPoint"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[qt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x6fb1ed4162e0fc00},Object.defineProperties(e,n),e}(Gt),ee=function(t){function e(e,n){e instanceof E&&n instanceof me&&(e=n.getCoordinateSequenceFactory().create(e)),t.call(this,e,n),this.validateConstruction()}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ut.SORTINDEX_LINEARRING},e.prototype.getBoundaryDimension=function(){return Nt.FALSE},e.prototype.isClosed=function(){return!!this.isEmpty()||t.prototype.isClosed.call(this)},e.prototype.reverse=function(){var t=this._points.copy();return Xt.reverse(t),this.getFactory().createLinearRing(t)},e.prototype.validateConstruction=function(){if(!this.isEmpty()&&!t.prototype.isClosed.call(this))throw new _("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<e.MINIMUM_VALID_SIZE)throw new _("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,n),e}(Kt),ne=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ut.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createMultiPolygon(e)},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var t=new wt,e=0;e<this._geometries.length;e++)for(var n=this._geometries[e].getBoundary(),i=0;i<n.getNumGeometries();i++)t.add(n.getGeometryN(i));var r=new Array(t.size()).fill(null);return this.getFactory().createMultiLineString(t.toArray(r))},e.prototype.getGeometryType=function(){return"MultiPolygon"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[Yt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(e,n),e}(Gt),ie=function(t){this._factory=t||null,this._isUserDataCopied=!1},re={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};ie.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},ie.prototype.edit=function(t,e){if(null===t)return null;var n=this.editInternal(t,e);return this._isUserDataCopied&&n.setUserData(t.getUserData()),n},ie.prototype.editInternal=function(t,e){return null===this._factory&&(this._factory=t.getFactory()),t instanceof Gt?this.editGeometryCollection(t,e):t instanceof $t?this.editPolygon(t,e):t instanceof Jt||t instanceof Kt?e.edit(t,this._factory):(et.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},ie.prototype.editGeometryCollection=function(t,e){for(var n=e.edit(t,this._factory),i=new wt,r=0;r<n.getNumGeometries();r++){var o=this.edit(n.getGeometryN(r),e);null===o||o.isEmpty()||i.add(o)}return n.getClass()===te?this._factory.createMultiPoint(i.toArray([])):n.getClass()===Ht?this._factory.createMultiLineString(i.toArray([])):n.getClass()===ne?this._factory.createMultiPolygon(i.toArray([])):this._factory.createGeometryCollection(i.toArray([]))},ie.prototype.editPolygon=function(t,e){var n=e.edit(t,this._factory);if(null===n&&(n=this._factory.createPolygon(null)),n.isEmpty())return n;var i=this.edit(n.getExteriorRing(),e);if(null===i||i.isEmpty())return this._factory.createPolygon();for(var r=new wt,o=0;o<n.getNumInteriorRing();o++){var s=this.edit(n.getInteriorRingN(o),e);null===s||s.isEmpty()||r.add(s)}return this._factory.createPolygon(i,r.toArray([]))},ie.prototype.interfaces_=function(){return[]},ie.prototype.getClass=function(){return ie},ie.GeometryEditorOperation=function(){},re.NoOpGeometryOperation.get=function(){return oe},re.CoordinateOperation.get=function(){return se},re.CoordinateSequenceOperation.get=function(){return ae},Object.defineProperties(ie,re);var oe=function(){};oe.prototype.edit=function(t,e){return t},oe.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},oe.prototype.getClass=function(){return oe};var se=function(){};se.prototype.edit=function(t,e){var n=this.editCoordinates(t.getCoordinates(),t);return null===n?t:t instanceof ee?e.createLinearRing(n):t instanceof Kt?e.createLineString(n):t instanceof Jt?n.length>0?e.createPoint(n[0]):e.createPoint():t},se.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},se.prototype.getClass=function(){return se};var ae=function(){};ae.prototype.edit=function(t,e){return t instanceof ee?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Kt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Jt?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},ae.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},ae.prototype.getClass=function(){return ae};var le=function(){if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var t=arguments[0];this._coordinates=new Array(t).fill(null);for(var e=0;e<t;e++)this._coordinates[e]=new E}else if(I(arguments[0],z)){var n=arguments[0];if(null===n)return this._coordinates=new Array(0).fill(null),null;this._dimension=n.getDimension(),this._coordinates=new Array(n.size()).fill(null);for(var i=0;i<this._coordinates.length;i++)this._coordinates[i]=n.getCoordinateCopy(i)}}else if(2===arguments.length)if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var r=arguments[0],o=arguments[1];this._coordinates=r,this._dimension=o,null===r&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var s=arguments[0],a=arguments[1];this._coordinates=new Array(s).fill(null),this._dimension=a;for(var l=0;l<s;l++)this._coordinates[l]=new E}},ce={serialVersionUID:{configurable:!0}};le.prototype.setOrdinate=function(t,e,n){switch(e){case z.X:this._coordinates[t].x=n;break;case z.Y:this._coordinates[t].y=n;break;case z.Z:this._coordinates[t].z=n;break;default:throw new _("invalid ordinateIndex")}},le.prototype.size=function(){return this._coordinates.length},le.prototype.getOrdinate=function(t,e){switch(e){case z.X:return this._coordinates[t].x;case z.Y:return this._coordinates[t].y;case z.Z:return this._coordinates[t].z}return y.NaN},le.prototype.getCoordinate=function(){if(1===arguments.length){var t=arguments[0];return this._coordinates[t]}if(2===arguments.length){var e=arguments[0],n=arguments[1];n.x=this._coordinates[e].x,n.y=this._coordinates[e].y,n.z=this._coordinates[e].z}},le.prototype.getCoordinateCopy=function(t){return new E(this._coordinates[t])},le.prototype.getDimension=function(){return this._dimension},le.prototype.getX=function(t){return this._coordinates[t].x},le.prototype.clone=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].clone();return new le(t,this._dimension)},le.prototype.expandEnvelope=function(t){for(var e=0;e<this._coordinates.length;e++)t.expandToInclude(this._coordinates[e]);return t},le.prototype.copy=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].copy();return new le(t,this._dimension)},le.prototype.toString=function(){if(this._coordinates.length>0){var t=new F(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var e=1;e<this._coordinates.length;e++)t.append(", "),t.append(this._coordinates[e]);return t.append(")"),t.toString()}return"()"},le.prototype.getY=function(t){return this._coordinates[t].y},le.prototype.toCoordinateArray=function(){return this._coordinates},le.prototype.interfaces_=function(){return[z,e]},le.prototype.getClass=function(){return le},ce.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(le,ce);var ue=function(){},he={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};ue.prototype.readResolve=function(){return ue.instance()},ue.prototype.create=function(){if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new le(t)}if(I(arguments[0],z)){var e=arguments[0];return new le(e)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new le(n):new le(n,i)}},ue.prototype.interfaces_=function(){return[S,e]},ue.prototype.getClass=function(){return ue},ue.instance=function(){return ue.instanceObject},he.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},he.instanceObject.get=function(){return new ue},Object.defineProperties(ue,he);var de=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return this.map_.get(t)||null},e.prototype.put=function(t,e){return this.map_.set(t,e),e},e.prototype.values=function(){for(var t=new wt,e=this.map_.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t},e.prototype.entrySet=function(){var t=new Pt;return this.map_.entries().forEach((function(e){return t.add(e)})),t},e.prototype.size=function(){return this.map_.size()},e}(It),Ae=function t(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=t.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof fe){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var i=arguments[0];this._modelType=i._modelType,this._scale=i._scale}},pe={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Ae.prototype.equals=function(t){if(!(t instanceof Ae))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},Ae.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new R(n).compareTo(new R(i))},Ae.prototype.getScale=function(){return this._scale},Ae.prototype.isFloating=function(){return this._modelType===Ae.FLOATING||this._modelType===Ae.FLOATING_SINGLE},Ae.prototype.getType=function(){return this._modelType},Ae.prototype.toString=function(){var t="UNKNOWN";return this._modelType===Ae.FLOATING?t="Floating":this._modelType===Ae.FLOATING_SINGLE?t="Floating-Single":this._modelType===Ae.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},Ae.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var t=arguments[0];return y.isNaN(t)||this._modelType===Ae.FLOATING_SINGLE?t:this._modelType===Ae.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof E){var e=arguments[0];if(this._modelType===Ae.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}},Ae.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===Ae.FLOATING?t=16:this._modelType===Ae.FLOATING_SINGLE?t=6:this._modelType===Ae.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},Ae.prototype.setScale=function(t){this._scale=Math.abs(t)},Ae.prototype.interfaces_=function(){return[e,x]},Ae.prototype.getClass=function(){return Ae},Ae.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},pe.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},pe.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(Ae,pe);var fe=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},ge={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};fe.prototype.readResolve=function(){return fe.nameToTypeMap.get(this._name)},fe.prototype.toString=function(){return this._name},fe.prototype.interfaces_=function(){return[e]},fe.prototype.getClass=function(){return fe},ge.serialVersionUID.get=function(){return-552860263173159e4},ge.nameToTypeMap.get=function(){return new de},Object.defineProperties(fe,ge),Ae.Type=fe,Ae.FIXED=new fe("FIXED"),Ae.FLOATING=new fe("FLOATING"),Ae.FLOATING_SINGLE=new fe("FLOATING SINGLE");var me=function t(){this._precisionModel=new Ae,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?I(arguments[0],S)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Ae&&(this._precisionModel=arguments[0]):2===arguments.length?(this._precisionModel=arguments[0],this._SRID=arguments[1]):3===arguments.length&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},_e={serialVersionUID:{configurable:!0}};me.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new E(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new E(t.getMinX(),t.getMinY()),new E(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new E(t.getMinX(),t.getMinY()),new E(t.getMinX(),t.getMaxY()),new E(t.getMaxX(),t.getMaxY()),new E(t.getMaxX(),t.getMinY()),new E(t.getMinX(),t.getMinY())]),null)},me.prototype.createLineString=function(t){return t?t instanceof Array?new Kt(this.getCoordinateSequenceFactory().create(t),this):I(t,z)?new Kt(t,this):void 0:new Kt(this.getCoordinateSequenceFactory().create([]),this)},me.prototype.createMultiLineString=function(){if(0===arguments.length)return new Ht(null,this);if(1===arguments.length){var t=arguments[0];return new Ht(t,this)}},me.prototype.buildGeometry=function(t){for(var e=null,n=!1,i=!1,r=t.iterator();r.hasNext();){var o=r.next(),s=o.getClass();null===e&&(e=s),s!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(null===e)return this.createGeometryCollection();if(n||i)return this.createGeometryCollection(me.toGeometryArray(t));var a=t.iterator().next();if(t.size()>1){if(a instanceof $t)return this.createMultiPolygon(me.toPolygonArray(t));if(a instanceof Kt)return this.createMultiLineString(me.toLineStringArray(t));if(a instanceof Jt)return this.createMultiPoint(me.toPointArray(t));et.shouldNeverReachHere("Unhandled class: "+a.getClass().getName())}return a},me.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)},me.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(I(arguments[0],z)){var e=arguments[0];return new Jt(e,this)}}},me.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},me.prototype.createPolygon=function(){if(0===arguments.length)return new $t(null,null,this);if(1===arguments.length){if(I(arguments[0],z)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof ee){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length){var i=arguments[0],r=arguments[1];return new $t(i,r,this)}},me.prototype.getSRID=function(){return this._SRID},me.prototype.createGeometryCollection=function(){if(0===arguments.length)return new Gt(null,this);if(1===arguments.length){var t=arguments[0];return new Gt(t,this)}},me.prototype.createGeometry=function(t){return new ie(this).edit(t,{edit:function(){if(2===arguments.length){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})},me.prototype.getPrecisionModel=function(){return this._precisionModel},me.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(I(arguments[0],z)){var e=arguments[0];return new ee(e,this)}}},me.prototype.createMultiPolygon=function(){if(0===arguments.length)return new ne(null,this);if(1===arguments.length){var t=arguments[0];return new ne(t,this)}},me.prototype.createMultiPoint=function(){if(0===arguments.length)return new te(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new te(t,this)}if(arguments[0]instanceof Array){var e=arguments[0];return this.createMultiPoint(null!==e?this.getCoordinateSequenceFactory().create(e):null)}if(I(arguments[0],z)){var n=arguments[0];if(null===n)return this.createMultiPoint(new Array(0).fill(null));for(var i=new Array(n.size()).fill(null),r=0;r<n.size();r++){var o=this.getCoordinateSequenceFactory().create(1,n.getDimension());Xt.copy(n,r,o,0,1),i[r]=this.createPoint(o)}return this.createMultiPoint(i)}}},me.prototype.interfaces_=function(){return[e]},me.prototype.getClass=function(){return me},me.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toGeometryArray=function(t){if(null===t)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},me.getDefaultCoordinateSequenceFactory=function(){return ue.instance()},me.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},_e.serialVersionUID.get=function(){return-0x5ea75f2051eeb400},Object.defineProperties(me,_e);var ye=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],ve=function(t){this.geometryFactory=t||new me};ve.prototype.read=function(t){var e,n=(e="string"==typeof t?JSON.parse(t):t).type;if(!xe[n])throw new Error("Unknown GeoJSON type: "+e.type);return-1!==ye.indexOf(n)?xe[n].apply(this,[e.coordinates]):"GeometryCollection"===n?xe[n].apply(this,[e.geometries]):xe[n].apply(this,[e])},ve.prototype.write=function(t){var e=t.getGeometryType();if(!be[e])throw new Error("Geometry is not supported");return be[e].apply(this,[t])};var xe={Feature:function(t){var e={};for(var n in t)e[n]=t[n];if(t.geometry){var i=t.geometry.type;if(!xe[i])throw new Error("Unknown GeoJSON type: "+t.type);e.geometry=this.read(t.geometry)}return t.bbox&&(e.bbox=xe.bbox.apply(this,[t.bbox])),e},FeatureCollection:function(t){var e={};if(t.features){e.features=[];for(var n=0;n<t.features.length;++n)e.features.push(this.read(t.features[n]))}return t.bbox&&(e.bbox=this.parse.bbox.apply(this,[t.bbox])),e},coordinates:function(t){for(var e=[],n=0;n<t.length;++n){var i=t[n];e.push(new E(i[0],i[1]))}return e},bbox:function(t){return this.geometryFactory.createLinearRing([new E(t[0],t[1]),new E(t[2],t[1]),new E(t[2],t[3]),new E(t[0],t[3]),new E(t[0],t[1])])},Point:function(t){var e=new E(t[0],t[1]);return this.geometryFactory.createPoint(e)},MultiPoint:function(t){for(var e=[],n=0;n<t.length;++n)e.push(xe.Point.apply(this,[t[n]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(t){var e=xe.coordinates.apply(this,[t]);return this.geometryFactory.createLineString(e)},MultiLineString:function(t){for(var e=[],n=0;n<t.length;++n)e.push(xe.LineString.apply(this,[t[n]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(t){for(var e=xe.coordinates.apply(this,[t[0]]),n=this.geometryFactory.createLinearRing(e),i=[],r=1;r<t.length;++r){var o=t[r],s=xe.coordinates.apply(this,[o]),a=this.geometryFactory.createLinearRing(s);i.push(a)}return this.geometryFactory.createPolygon(n,i)},MultiPolygon:function(t){for(var e=[],n=0;n<t.length;++n){var i=t[n];e.push(xe.Polygon.apply(this,[i]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(t){for(var e=[],n=0;n<t.length;++n){var i=t[n];e.push(this.read(i))}return this.geometryFactory.createGeometryCollection(e)}},be={coordinate:function(t){return[t.x,t.y]},Point:function(t){return{type:"Point",coordinates:be.coordinate.apply(this,[t.getCoordinate()])}},MultiPoint:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=be.Point.apply(this,[i]);e.push(r.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(t){for(var e=[],n=t.getCoordinates(),i=0;i<n.length;++i){var r=n[i];e.push(be.coordinate.apply(this,[r]))}return{type:"LineString",coordinates:e}},MultiLineString:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=be.LineString.apply(this,[i]);e.push(r.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(t){var e=[],n=be.LineString.apply(this,[t._shell]);e.push(n.coordinates);for(var i=0;i<t._holes.length;++i){var r=t._holes[i],o=be.LineString.apply(this,[r]);e.push(o.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=be.Polygon.apply(this,[i]);e.push(r.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=i.getGeometryType();e.push(be[r].apply(this,[i]))}return{type:"GeometryCollection",geometries:e}}},we=function(t){this.geometryFactory=t||new me,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new ve(this.geometryFactory)};we.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===Ae.FIXED&&this.reducePrecision(e),e},we.prototype.reducePrecision=function(t){var e,n;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(e=0,n=t.points.length;e<n;e++)this.precisionModel.makePrecise(t.points[e]);else if(t.geometries)for(e=0,n=t.geometries.length;e<n;e++)this.reducePrecision(t.geometries[e])};var Ee=function(){this.parser=new ve(this.geometryFactory)};Ee.prototype.write=function(t){return this.parser.write(t)};var Ce=function(){},Be={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};Ce.prototype.interfaces_=function(){return[]},Ce.prototype.getClass=function(){return Ce},Ce.opposite=function(t){return t===Ce.LEFT?Ce.RIGHT:t===Ce.RIGHT?Ce.LEFT:t},Be.ON.get=function(){return 0},Be.LEFT.get=function(){return 1},Be.RIGHT.get=function(){return 2},Object.defineProperties(Ce,Be),(f.prototype=new Error).name="EmptyStackException",(g.prototype=new bt).add=function(t){return this.array_.push(t),!0},g.prototype.get=function(t){if(t<0||t>=this.size())throw new Error;return this.array_[t]},g.prototype.push=function(t){return this.array_.push(t),t},g.prototype.pop=function(t){if(0===this.array_.length)throw new f;return this.array_.pop()},g.prototype.peek=function(){if(0===this.array_.length)throw new f;return this.array_[this.array_.length-1]},g.prototype.empty=function(){return 0===this.array_.length},g.prototype.isEmpty=function(){return this.empty()},g.prototype.search=function(t){return this.array_.indexOf(t)},g.prototype.size=function(){return this.array_.length},g.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t};var Se=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};Se.prototype.getCoordinate=function(){return this._minCoord},Se.prototype.getRightmostSide=function(t,e){var n=this.getRightmostSideOfSegment(t,e);return n<0&&(n=this.getRightmostSideOfSegment(t,e-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),n},Se.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();et.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],n=t[this._minIndex+1],i=at.computeOrientation(this._minCoord,n,e),r=!1;(e.y<this._minCoord.y&&n.y<this._minCoord.y&&i===at.COUNTERCLOCKWISE||e.y>this._minCoord.y&&n.y>this._minCoord.y&&i===at.CLOCKWISE)&&(r=!0),r&&(this._minIndex=this._minIndex-1)},Se.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length)return-1;if(n[e].y===n[e+1].y)return-1;var i=Ce.LEFT;return n[e].y<n[e+1].y&&(i=Ce.RIGHT),i},Se.prototype.getEdge=function(){return this._orientedDe},Se.prototype.checkForRightmostCoordinate=function(t){for(var e=t.getEdge().getCoordinates(),n=0;n<e.length-1;n++)(null===this._minCoord||e[n].x>this._minCoord.x)&&(this._minDe=t,this._minIndex=n,this._minCoord=e[n])},Se.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Se.prototype.findEdge=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}et.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===Ce.LEFT&&(this._orientedDe=this._minDe.getSym())},Se.prototype.interfaces_=function(){return[]},Se.prototype.getClass=function(){return Se};var Me=function(t){function e(n,i){t.call(this,e.msgWithCoord(n,i)),this.pt=i?new E(i):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(t,e){return e?t:t+" [ "+e+" ]"},e}($),Te=function(){this.array_=[]};Te.prototype.addLast=function(t){this.array_.push(t)},Te.prototype.removeFirst=function(){return this.array_.shift()},Te.prototype.isEmpty=function(){return 0===this.array_.length};var Ie=function(){this._finder=null,this._dirEdgeList=new wt,this._nodes=new wt,this._rightMostCoord=null,this._env=null,this._finder=new Se};Ie.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();)t.next().setVisited(!1)},Ie.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Ie.prototype.computeNodeDepth=function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var i=n.next();if(i.isVisited()||i.getSym().isVisited()){e=i;break}}if(null===e)throw new Me("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var r=t.getEdges().iterator();r.hasNext();){var o=r.next();o.setVisited(!0),this.copySymDepths(o)}},Ie.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(Ce.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Ie.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Ie.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(Ce.RIGHT)>=1&&e.getDepth(Ce.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Ie.prototype.computeDepths=function(t){var e=new Pt,n=new Te,i=t.getNode();for(n.addLast(i),e.add(i),t.setVisited(!0);!n.isEmpty();){var r=n.removeFirst();e.add(r),this.computeNodeDepth(r);for(var o=r.getEdges().iterator();o.hasNext();){var s=o.next().getSym();if(!s.isVisited()){var a=s.getNode();e.contains(a)||(n.addLast(a),e.add(a))}}}},Ie.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},Ie.prototype.getEnvelope=function(){if(null===this._env){for(var t=new Z,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),i=0;i<n.length-1;i++)t.expandToInclude(n[i]);this._env=t}return this._env},Ie.prototype.addReachable=function(t){var e=new g;for(e.add(t);!e.empty();){var n=e.pop();this.add(n,e)}},Ie.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(Ce.LEFT,t.getDepth(Ce.RIGHT)),e.setDepth(Ce.RIGHT,t.getDepth(Ce.LEFT))},Ie.prototype.add=function(t,e){t.setVisited(!0),this._nodes.add(t);for(var n=t.getEdges().iterator();n.hasNext();){var i=n.next();this._dirEdgeList.add(i);var r=i.getSym().getNode();r.isVisited()||e.push(r)}},Ie.prototype.getNodes=function(){return this._nodes},Ie.prototype.getDirectedEdges=function(){return this._dirEdgeList},Ie.prototype.interfaces_=function(){return[x]},Ie.prototype.getClass=function(){return Ie};var Le=function t(){if(this.location=null,1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var n=arguments[0];this.init(1),this.location[Ce.ON]=n}else if(arguments[0]instanceof t){var i=arguments[0];if(this.init(i.location.length),null!==i)for(var r=0;r<this.location.length;r++)this.location[r]=i.location[r]}}else if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];this.init(3),this.location[Ce.ON]=o,this.location[Ce.LEFT]=s,this.location[Ce.RIGHT]=a}};Le.prototype.setAllLocations=function(t){for(var e=0;e<this.location.length;e++)this.location[e]=t},Le.prototype.isNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]!==M.NONE)return!1;return!0},Le.prototype.setAllLocationsIfNull=function(t){for(var e=0;e<this.location.length;e++)this.location[e]===M.NONE&&(this.location[e]=t)},Le.prototype.isLine=function(){return 1===this.location.length},Le.prototype.merge=function(t){if(t.location.length>this.location.length){var e=new Array(3).fill(null);e[Ce.ON]=this.location[Ce.ON],e[Ce.LEFT]=M.NONE,e[Ce.RIGHT]=M.NONE,this.location=e}for(var n=0;n<this.location.length;n++)this.location[n]===M.NONE&&n<t.location.length&&(this.location[n]=t.location[n])},Le.prototype.getLocations=function(){return this.location},Le.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[Ce.LEFT];this.location[Ce.LEFT]=this.location[Ce.RIGHT],this.location[Ce.RIGHT]=t},Le.prototype.toString=function(){var t=new F;return this.location.length>1&&t.append(M.toLocationSymbol(this.location[Ce.LEFT])),t.append(M.toLocationSymbol(this.location[Ce.ON])),this.location.length>1&&t.append(M.toLocationSymbol(this.location[Ce.RIGHT])),t.toString()},Le.prototype.setLocations=function(t,e,n){this.location[Ce.ON]=t,this.location[Ce.LEFT]=e,this.location[Ce.RIGHT]=n},Le.prototype.get=function(t){return t<this.location.length?this.location[t]:M.NONE},Le.prototype.isArea=function(){return this.location.length>1},Le.prototype.isAnyNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]===M.NONE)return!0;return!1},Le.prototype.setLocation=function(){if(1===arguments.length){var t=arguments[0];this.setLocation(Ce.ON,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.location[e]=n}},Le.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(M.NONE)},Le.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},Le.prototype.allPositionsEqual=function(t){for(var e=0;e<this.location.length;e++)if(this.location[e]!==t)return!1;return!0},Le.prototype.interfaces_=function(){return[]},Le.prototype.getClass=function(){return Le};var Pe=function t(){if(this.elt=new Array(2).fill(null),1===arguments.length){if(Number.isInteger(arguments[0])){var e=arguments[0];this.elt[0]=new Le(e),this.elt[1]=new Le(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.elt[0]=new Le(n.elt[0]),this.elt[1]=new Le(n.elt[1])}}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.elt[0]=new Le(M.NONE),this.elt[1]=new Le(M.NONE),this.elt[i].setLocation(r)}else if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];this.elt[0]=new Le(o,s,a),this.elt[1]=new Le(o,s,a)}else if(4===arguments.length){var l=arguments[0],c=arguments[1],u=arguments[2],h=arguments[3];this.elt[0]=new Le(M.NONE,M.NONE,M.NONE),this.elt[1]=new Le(M.NONE,M.NONE,M.NONE),this.elt[l].setLocations(c,u,h)}};Pe.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Pe.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Pe.prototype.isNull=function(t){return this.elt[t].isNull()},Pe.prototype.setAllLocationsIfNull=function(){if(1===arguments.length){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.elt[e].setAllLocationsIfNull(n)}},Pe.prototype.isLine=function(t){return this.elt[t].isLine()},Pe.prototype.merge=function(t){for(var e=0;e<2;e++)null===this.elt[e]&&null!==t.elt[e]?this.elt[e]=new Le(t.elt[e]):this.elt[e].merge(t.elt[e])},Pe.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Pe.prototype.getLocation=function(){if(1===arguments.length){var t=arguments[0];return this.elt[t].get(Ce.ON)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return this.elt[e].get(n)}},Pe.prototype.toString=function(){var t=new F;return null!==this.elt[0]&&(t.append("A:"),t.append(this.elt[0].toString())),null!==this.elt[1]&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},Pe.prototype.isArea=function(){if(0===arguments.length)return this.elt[0].isArea()||this.elt[1].isArea();if(1===arguments.length){var t=arguments[0];return this.elt[t].isArea()}},Pe.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Pe.prototype.setLocation=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(Ce.ON,e)}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this.elt[n].setLocation(i,r)}},Pe.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Pe.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Pe.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new Le(this.elt[t].location[0]))},Pe.prototype.interfaces_=function(){return[]},Pe.prototype.getClass=function(){return Pe},Pe.toLineLabel=function(t){for(var e=new Pe(M.NONE),n=0;n<2;n++)e.setLocation(n,t.getLocation(n));return e};var Fe=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new wt,this._pts=new wt,this._label=new Pe(M.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new wt,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};Fe.prototype.computeRing=function(){if(null!==this._ring)return null;for(var t=new Array(this._pts.size()).fill(null),e=0;e<this._pts.size();e++)t[e]=this._pts.get(e);this._ring=this._geometryFactory.createLinearRing(t),this._isHole=at.isCCW(this._ring.getCoordinates())},Fe.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},Fe.prototype.computePoints=function(t){this._startDe=t;var e=t,n=!0;do{if(null===e)throw new Me("Found null DirectedEdge");if(e.getEdgeRing()===this)throw new Me("Directed Edge visited twice during ring-building at "+e.getCoordinate());this._edges.add(e);var i=e.getLabel();et.isTrue(i.isArea()),this.mergeLabel(i),this.addPoints(e.getEdge(),e.isForward(),n),n=!1,this.setEdgeRing(e,this),e=this.getNext(e)}while(e!==this._startDe)},Fe.prototype.getLinearRing=function(){return this._ring},Fe.prototype.getCoordinate=function(t){return this._pts.get(t)},Fe.prototype.computeMaxNodeDegree=function(){this._maxNodeDegree=0;var t=this._startDe;do{var e=t.getNode().getEdges().getOutgoingDegree(this);e>this._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},Fe.prototype.addPoints=function(t,e,n){var i=t.getCoordinates();if(e){var r=1;n&&(r=0);for(var o=r;o<i.length;o++)this._pts.add(i[o])}else{var s=i.length-2;n&&(s=i.length-1);for(var a=s;a>=0;a--)this._pts.add(i[a])}},Fe.prototype.isHole=function(){return this._isHole},Fe.prototype.setInResult=function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)},Fe.prototype.containsPoint=function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!at.isPointInRing(t,e.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();)if(n.next().containsPoint(t))return!1;return!0},Fe.prototype.addHole=function(t){this._holes.add(t)},Fe.prototype.isShell=function(){return null===this._shell},Fe.prototype.getLabel=function(){return this._label},Fe.prototype.getEdges=function(){return this._edges},Fe.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Fe.prototype.getShell=function(){return this._shell},Fe.prototype.mergeLabel=function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=e.getLocation(n,Ce.RIGHT);if(i===M.NONE)return null;if(this._label.getLocation(n)===M.NONE)return this._label.setLocation(n,i),null}},Fe.prototype.setShell=function(t){this._shell=t,null!==t&&t.addHole(this)},Fe.prototype.toPolygon=function(t){for(var e=new Array(this._holes.size()).fill(null),n=0;n<this._holes.size();n++)e[n]=this._holes.get(n).getLinearRing();return t.createPolygon(this.getLinearRing(),e)},Fe.prototype.interfaces_=function(){return[]},Fe.prototype.getClass=function(){return Fe};var Re=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setEdgeRing=function(t,e){t.setMinEdgeRing(e)},e.prototype.getNext=function(t){return t.getNextMin()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Fe),De=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildMinimalRings=function(){var t=new wt,e=this._startDe;do{if(null===e.getMinEdgeRing()){var n=new Re(e,this._geometryFactory);t.add(n)}e=e.getNext()}while(e!==this._startDe);return t},e.prototype.setEdgeRing=function(t,e){t.setEdgeRing(e)},e.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var t=this._startDe;do{t.getNode().getEdges().linkMinimalDirectedEdges(this),t=t.getNext()}while(t!==this._startDe)},e.prototype.getNext=function(t){return t.getNext()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Fe),Oe=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._label=t}};Oe.prototype.setVisited=function(t){this._isVisited=t},Oe.prototype.setInResult=function(t){this._isInResult=t},Oe.prototype.isCovered=function(){return this._isCovered},Oe.prototype.isCoveredSet=function(){return this._isCoveredSet},Oe.prototype.setLabel=function(t){this._label=t},Oe.prototype.getLabel=function(){return this._label},Oe.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},Oe.prototype.updateIM=function(t){et.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},Oe.prototype.isInResult=function(){return this._isInResult},Oe.prototype.isVisited=function(){return this._isVisited},Oe.prototype.interfaces_=function(){return[]},Oe.prototype.getClass=function(){return Oe};var Ue=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new Pe(0,M.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();)if(t.next().getEdge().isInResult())return!0;return!1},e.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(t){t.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(t){},e.prototype.computeMergedLocation=function(t,e){var n=M.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var i=t.getLocation(e);n!==M.BOUNDARY&&(n=i)}return n},e.prototype.setLabel=function(){if(2!==arguments.length)return t.prototype.setLabel.apply(this,arguments);var e=arguments[0],n=arguments[1];null===this._label?this._label=new Pe(e,n):this._label.setLocation(e,n)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){if(arguments[0]instanceof e){var t=arguments[0];this.mergeLabel(t._label)}else if(arguments[0]instanceof Pe)for(var n=arguments[0],i=0;i<2;i++){var r=this.computeMergedLocation(n,i);this._label.getLocation(i)===M.NONE&&this._label.setLocation(i,r)}},e.prototype.add=function(t){this._edges.insert(t),t.setNode(this)},e.prototype.setLabelBoundary=function(t){if(null===this._label)return null;var e=M.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case M.BOUNDARY:n=M.INTERIOR;break;case M.INTERIOR:default:n=M.BOUNDARY}this._label.setLocation(t,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Oe),Ne=function(){this.nodeMap=new h,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Ne.prototype.find=function(t){return this.nodeMap.get(t)},Ne.prototype.addNode=function(){if(arguments[0]instanceof E){var t=arguments[0],e=this.nodeMap.get(t);return null===e&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Ue){var n=arguments[0],i=this.nodeMap.get(n.getCoordinate());return null===i?(this.nodeMap.put(n.getCoordinate(),n),n):(i.mergeLabel(n),i)}},Ne.prototype.print=function(t){for(var e=this.iterator();e.hasNext();)e.next().print(t)},Ne.prototype.iterator=function(){return this.nodeMap.values().iterator()},Ne.prototype.values=function(){return this.nodeMap.values()},Ne.prototype.getBoundaryNodes=function(t){for(var e=new wt,n=this.iterator();n.hasNext();){var i=n.next();i.getLabel().getLocation(t)===M.BOUNDARY&&e.add(i)}return e},Ne.prototype.add=function(t){var e=t.getCoordinate();this.addNode(e).add(t)},Ne.prototype.interfaces_=function(){return[]},Ne.prototype.getClass=function(){return Ne};var ke=function(){},ze={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};ke.prototype.interfaces_=function(){return[]},ke.prototype.getClass=function(){return ke},ke.isNorthern=function(t){return t===ke.NE||t===ke.NW},ke.isOpposite=function(t,e){return t!==e&&2===(t-e+4)%4},ke.commonHalfPlane=function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var n=t<e?t:e;return 0===n&&3===(t>e?t:e)?3:n},ke.isInHalfPlane=function(t,e){return e===ke.SE?t===ke.SE||t===ke.SW:t===e||t===e+1},ke.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new _("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?ke.NE:ke.SE:e>=0?ke.NW:ke.SW}if(arguments[0]instanceof E&&arguments[1]instanceof E){var n=arguments[0],i=arguments[1];if(i.x===n.x&&i.y===n.y)throw new _("Cannot compute the quadrant for two identical points "+n);return i.x>=n.x?i.y>=n.y?ke.NE:ke.SE:i.y>=n.y?ke.NW:ke.SW}},ze.NE.get=function(){return 0},ze.NW.get=function(){return 1},ze.SW.get=function(){return 2},ze.SE.get=function(){return 3},Object.defineProperties(ke,ze);var Qe=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var t=arguments[0];this._edge=t}else if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];this._edge=e,this.init(n,i),this._label=null}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this._edge=r,this.init(o,s),this._label=a}};Qe.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:at.computeOrientation(t._p0,t._p1,this._p1)},Qe.prototype.getDy=function(){return this._dy},Qe.prototype.getCoordinate=function(){return this._p0},Qe.prototype.setNode=function(t){this._node=t},Qe.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),i=n.lastIndexOf("."),r=n.substring(i+1);t.print(" "+r+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label)},Qe.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},Qe.prototype.getDirectedCoordinate=function(){return this._p1},Qe.prototype.getDx=function(){return this._dx},Qe.prototype.getLabel=function(){return this._label},Qe.prototype.getEdge=function(){return this._edge},Qe.prototype.getQuadrant=function(){return this._quadrant},Qe.prototype.getNode=function(){return this._node},Qe.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),n=e.lastIndexOf(".");return" "+e.substring(n+1)+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label},Qe.prototype.computeLabel=function(t){},Qe.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=ke.quadrant(this._dx,this._dy),et.isTrue(!(0===this._dx&&0===this._dy),"EdgeEnd with identical endpoints found")},Qe.prototype.interfaces_=function(){return[x]},Qe.prototype.getClass=function(){return Qe};var Ge=function(t){function e(){var e=arguments[0],n=arguments[1];if(t.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=n,n)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var i=e.getNumPoints()-1;this.init(e.getCoordinate(i),e.getCoordinate(i-1))}this.computeDirectedLabel()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getNextMin=function(){return this._nextMin},e.prototype.getDepth=function(t){return this._depth[t]},e.prototype.setVisited=function(t){this._isVisited=t},e.prototype.computeDirectedLabel=function(){this._label=new Pe(this._edge.getLabel()),this._isForward||this._label.flip()},e.prototype.getNext=function(){return this._next},e.prototype.setDepth=function(t,e){if(-999!==this._depth[t]&&this._depth[t]!==e)throw new Me("assigned depths do not match",this.getCoordinate());this._depth[t]=e},e.prototype.isInteriorAreaEdge=function(){for(var t=!0,e=0;e<2;e++)this._label.isArea(e)&&this._label.getLocation(e,Ce.LEFT)===M.INTERIOR&&this._label.getLocation(e,Ce.RIGHT)===M.INTERIOR||(t=!1);return t},e.prototype.setNextMin=function(t){this._nextMin=t},e.prototype.print=function(e){t.prototype.print.call(this,e),e.print(" "+this._depth[Ce.LEFT]+"/"+this._depth[Ce.RIGHT]),e.print(" ("+this.getDepthDelta()+")"),this._isInResult&&e.print(" inResult")},e.prototype.setMinEdgeRing=function(t){this._minEdgeRing=t},e.prototype.isLineEdge=function(){var t=this._label.isLine(0)||this._label.isLine(1),e=!this._label.isArea(0)||this._label.allPositionsEqual(0,M.EXTERIOR),n=!this._label.isArea(1)||this._label.allPositionsEqual(1,M.EXTERIOR);return t&&e&&n},e.prototype.setEdgeRing=function(t){this._edgeRing=t},e.prototype.getMinEdgeRing=function(){return this._minEdgeRing},e.prototype.getDepthDelta=function(){var t=this._edge.getDepthDelta();return this._isForward||(t=-t),t},e.prototype.setInResult=function(t){this._isInResult=t},e.prototype.getSym=function(){return this._sym},e.prototype.isForward=function(){return this._isForward},e.prototype.getEdge=function(){return this._edge},e.prototype.printEdge=function(t){this.print(t),t.print(" "),this._isForward?this._edge.print(t):this._edge.printReverse(t)},e.prototype.setSym=function(t){this._sym=t},e.prototype.setVisitedEdge=function(t){this.setVisited(t),this._sym.setVisited(t)},e.prototype.setEdgeDepths=function(t,e){var n=this.getEdge().getDepthDelta();this._isForward||(n=-n);var i=1;t===Ce.LEFT&&(i=-1);var r=Ce.opposite(t),o=e+n*i;this.setDepth(t,e),this.setDepth(r,o)},e.prototype.getEdgeRing=function(){return this._edgeRing},e.prototype.isInResult=function(){return this._isInResult},e.prototype.setNext=function(t){this._next=t},e.prototype.isVisited=function(){return this._isVisited},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.depthFactor=function(t,e){return t===M.EXTERIOR&&e===M.INTERIOR?1:t===M.INTERIOR&&e===M.EXTERIOR?-1:0},e}(Qe),He=function(){};He.prototype.createNode=function(t){return new Ue(t,null)},He.prototype.interfaces_=function(){return[]},He.prototype.getClass=function(){return He};var Ve=function(){if(this._edges=new wt,this._nodes=null,this._edgeEndList=new wt,0===arguments.length)this._nodes=new Ne(new He);else if(1===arguments.length){var t=arguments[0];this._nodes=new Ne(t)}};Ve.prototype.printEdges=function(t){t.println("Edges:");for(var e=0;e<this._edges.size();e++){t.println("edge "+e+":");var n=this._edges.get(e);n.print(t),n.eiList.print(t)}},Ve.prototype.find=function(t){return this._nodes.find(t)},Ve.prototype.addNode=function(){if(arguments[0]instanceof Ue){var t=arguments[0];return this._nodes.addNode(t)}if(arguments[0]instanceof E){var e=arguments[0];return this._nodes.addNode(e)}},Ve.prototype.getNodeIterator=function(){return this._nodes.iterator()},Ve.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();)t.next().getEdges().linkResultDirectedEdges()},Ve.prototype.debugPrintln=function(t){V.out.println(t)},Ve.prototype.isBoundaryNode=function(t,e){var n=this._nodes.find(e);if(null===n)return!1;var i=n.getLabel();return null!==i&&i.getLocation(t)===M.BOUNDARY},Ve.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();)t.next().getEdges().linkAllDirectedEdges()},Ve.prototype.matchInSameDirection=function(t,e,n,i){return!!t.equals(n)&&at.computeOrientation(t,e,i)===at.COLLINEAR&&ke.quadrant(t,e)===ke.quadrant(n,i)},Ve.prototype.getEdgeEnds=function(){return this._edgeEndList},Ve.prototype.debugPrint=function(t){V.out.print(t)},Ve.prototype.getEdgeIterator=function(){return this._edges.iterator()},Ve.prototype.findEdgeInSameDirection=function(t,e){for(var n=0;n<this._edges.size();n++){var i=this._edges.get(n),r=i.getCoordinates();if(this.matchInSameDirection(t,e,r[0],r[1]))return i;if(this.matchInSameDirection(t,e,r[r.length-1],r[r.length-2]))return i}return null},Ve.prototype.insertEdge=function(t){this._edges.add(t)},Ve.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var n=e.next();if(n.getEdge()===t)return n}return null},Ve.prototype.addEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this._edges.add(n);var i=new Ge(n,!0),r=new Ge(n,!1);i.setSym(r),r.setSym(i),this.add(i),this.add(r)}},Ve.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},Ve.prototype.getNodes=function(){return this._nodes.values()},Ve.prototype.findEdge=function(t,e){for(var n=0;n<this._edges.size();n++){var i=this._edges.get(n),r=i.getCoordinates();if(t.equals(r[0])&&e.equals(r[1]))return i}return null},Ve.prototype.interfaces_=function(){return[]},Ve.prototype.getClass=function(){return Ve},Ve.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();)e.next().getEdges().linkResultDirectedEdges()};var je=function(){this._geometryFactory=null,this._shellList=new wt;var t=arguments[0];this._geometryFactory=t};je.prototype.sortShellsAndHoles=function(t,e,n){for(var i=t.iterator();i.hasNext();){var r=i.next();r.isHole()?n.add(r):e.add(r)}},je.prototype.computePolygons=function(t){for(var e=new wt,n=t.iterator();n.hasNext();){var i=n.next().toPolygon(this._geometryFactory);e.add(i)}return e},je.prototype.placeFreeHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();if(null===i.getShell()){var r=this.findEdgeRingContaining(i,t);if(null===r)throw new Me("unable to assign hole to a shell",i.getCoordinate(0));i.setShell(r)}}},je.prototype.buildMinimalEdgeRings=function(t,e,n){for(var i=new wt,r=t.iterator();r.hasNext();){var o=r.next();if(o.getMaxNodeDegree()>2){o.linkDirectedEdgesForMinimalEdgeRings();var s=o.buildMinimalRings(),a=this.findShell(s);null!==a?(this.placePolygonHoles(a,s),e.add(a)):n.addAll(s)}else i.add(o)}return i},je.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();)if(e.next().containsPoint(t))return!0;return!1},je.prototype.buildMaximalEdgeRings=function(t){for(var e=new wt,n=t.iterator();n.hasNext();){var i=n.next();if(i.isInResult()&&i.getLabel().isArea()&&null===i.getEdgeRing()){var r=new De(i,this._geometryFactory);e.add(r),r.setInResult()}}return e},je.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();i.isHole()&&i.setShell(t)}},je.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},je.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),i=n.getEnvelopeInternal(),r=n.getCoordinateN(0),o=null,s=null,a=e.iterator();a.hasNext();){var l=a.next(),c=l.getLinearRing(),u=c.getEnvelopeInternal();null!==o&&(s=o.getLinearRing().getEnvelopeInternal());var h=!1;u.contains(i)&&at.isPointInRing(r,c.getCoordinates())&&(h=!0),h&&(null===o||s.contains(u))&&(o=l)}return o},je.prototype.findShell=function(t){for(var e=0,n=null,i=t.iterator();i.hasNext();){var r=i.next();r.isHole()||(n=r,e++)}return et.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},je.prototype.add=function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],n=arguments[1];Ve.linkResultDirectedEdges(n);var i=this.buildMaximalEdgeRings(e),r=new wt,o=this.buildMinimalEdgeRings(i,this._shellList,r);this.sortShellsAndHoles(o,this._shellList,r),this.placeFreeHoles(this._shellList,r)}},je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je};var Ze=function(){};Ze.prototype.getBounds=function(){},Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze};var We=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};We.prototype.getItem=function(){return this._item},We.prototype.getBounds=function(){return this._bounds},We.prototype.interfaces_=function(){return[Ze,e]},We.prototype.getClass=function(){return We};var Xe=function(){this._size=null,this._items=null,this._size=0,this._items=new wt,this._items.add(null)};Xe.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},Xe.prototype.size=function(){return this._size},Xe.prototype.reorder=function(t){for(var e=null,n=this._items.get(t);2*t<=this._size&&((e=2*t)!==this._size&&this._items.get(e+1).compareTo(this._items.get(e))<0&&e++,this._items.get(e).compareTo(n)<0);t=e)this._items.set(t,this._items.get(e));this._items.set(t,n)},Xe.prototype.clear=function(){this._size=0,this._items.clear()},Xe.prototype.isEmpty=function(){return 0===this._size},Xe.prototype.add=function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe};var Ke=function(){};Ke.prototype.visitItem=function(t){},Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke};var qe=function(){};qe.prototype.insert=function(t,e){},qe.prototype.remove=function(t,e){},qe.prototype.query=function(){},qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe};var Je=function(){if(this._childBoundables=new wt,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}},Ye={serialVersionUID:{configurable:!0}};Je.prototype.getLevel=function(){return this._level},Je.prototype.size=function(){return this._childBoundables.size()},Je.prototype.getChildBoundables=function(){return this._childBoundables},Je.prototype.addChildBoundable=function(t){et.isTrue(null===this._bounds),this._childBoundables.add(t)},Je.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Je.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},Je.prototype.interfaces_=function(){return[Ze,e]},Je.prototype.getClass=function(){return Je},Ye.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(Je,Ye);var $e=function(){};$e.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}},$e.min=function(t){return $e.sort(t),t.get(0)},$e.sort=function(t,e){var n=t.toArray();e?Ut.sort(n,e):Ut.sort(n);for(var i=t.iterator(),r=0,o=n.length;r<o;r++)i.next(),i.set(n[r])},$e.singletonList=function(t){var e=new wt;return e.add(t),e};var tn=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=n,this._distance=this.distance()};tn.prototype.expandToQueue=function(t,e){var n=tn.isComposite(this._boundable1),i=tn.isComposite(this._boundable2);if(n&&i)return tn.area(this._boundable1)>tn.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new _("neither boundable is composite")},tn.prototype.isLeaves=function(){return!(tn.isComposite(this._boundable1)||tn.isComposite(this._boundable2))},tn.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},tn.prototype.expand=function(t,e,n,i){for(var r=t.getChildBoundables().iterator();r.hasNext();){var o=r.next(),s=new tn(o,e,this._itemDistance);s.getDistance()<i&&n.add(s)}},tn.prototype.getBoundable=function(t){return 0===t?this._boundable1:this._boundable2},tn.prototype.getDistance=function(){return this._distance},tn.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},tn.prototype.interfaces_=function(){return[x]},tn.prototype.getClass=function(){return tn},tn.area=function(t){return t.getBounds().getArea()},tn.isComposite=function(t){return t instanceof Je};var en=function t(){if(this._root=null,this._built=!1,this._itemBoundables=new wt,this._nodeCapacity=null,0===arguments.length){var e=t.DEFAULT_NODE_CAPACITY;this._nodeCapacity=e}else if(1===arguments.length){var n=arguments[0];et.isTrue(n>1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},nn={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};en.prototype.getNodeCapacity=function(){return this._nodeCapacity},en.prototype.lastNode=function(t){return t.get(t.size()-1)},en.prototype.size=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();n instanceof Je?t+=this.size(n):n instanceof We&&(t+=1)}return t}},en.prototype.removeItem=function(t,e){for(var n=null,i=t.getChildBoundables().iterator();i.hasNext();){var r=i.next();r instanceof We&&r.getItem()===e&&(n=r)}return null!==n&&(t.getChildBoundables().remove(n),!0)},en.prototype.itemsTree=function(){if(0===arguments.length){this.build();var t=this.itemsTree(this._root);return null===t?new wt:t}if(1===arguments.length){for(var e=arguments[0],n=new wt,i=e.getChildBoundables().iterator();i.hasNext();){var r=i.next();if(r instanceof Je){var o=this.itemsTree(r);null!==o&&n.add(o)}else r instanceof We?n.add(r.getItem()):et.shouldNeverReachHere()}return n.size()<=0?null:n}},en.prototype.insert=function(t,e){et.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new We(t,e))},en.prototype.boundablesAtLevel=function(){if(1===arguments.length){var t=arguments[0],e=new wt;return this.boundablesAtLevel(t,this._root,e),e}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];if(et.isTrue(n>-2),i.getLevel()===n)return r.add(i),null;for(var o=i.getChildBoundables().iterator();o.hasNext();){var s=o.next();s instanceof Je?this.boundablesAtLevel(n,s,r):(et.isTrue(s instanceof We),-1===n&&r.add(s))}return null}},en.prototype.query=function(){if(1===arguments.length){var t=arguments[0];this.build();var e=new wt;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,e),e}if(2===arguments.length){var n=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.query(n,this._root,i)}else if(3===arguments.length)if(I(arguments[2],Ke)&&arguments[0]instanceof Object&&arguments[1]instanceof Je)for(var r=arguments[0],o=arguments[1],s=arguments[2],a=o.getChildBoundables(),l=0;l<a.size();l++){var c=a.get(l);this.getIntersectsOp().intersects(c.getBounds(),r)&&(c instanceof Je?this.query(r,c,s):c instanceof We?s.visitItem(c.getItem()):et.shouldNeverReachHere())}else if(I(arguments[2],bt)&&arguments[0]instanceof Object&&arguments[1]instanceof Je)for(var u=arguments[0],h=arguments[1],d=arguments[2],A=h.getChildBoundables(),p=0;p<A.size();p++){var f=A.get(p);this.getIntersectsOp().intersects(f.getBounds(),u)&&(f instanceof Je?this.query(u,f,d):f instanceof We?d.add(f.getItem()):et.shouldNeverReachHere())}},en.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},en.prototype.getRoot=function(){return this.build(),this._root},en.prototype.remove=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.remove(t,this._root,e)}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],o=this.removeItem(i,r);if(o)return!0;for(var s=null,a=i.getChildBoundables().iterator();a.hasNext();){var l=a.next();if(this.getIntersectsOp().intersects(l.getBounds(),n)&&l instanceof Je&&(o=this.remove(n,l,r))){s=l;break}}return null!==s&&s.getChildBoundables().isEmpty()&&i.getChildBoundables().remove(s),o}},en.prototype.createHigherLevels=function(t,e){et.isTrue(!t.isEmpty());var n=this.createParentBoundables(t,e+1);return 1===n.size()?n.get(0):this.createHigherLevels(n,e+1)},en.prototype.depth=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();if(n instanceof Je){var i=this.depth(n);i>t&&(t=i)}}return t+1}},en.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var n=new wt;n.add(this.createNode(e));var i=new wt(t);$e.sort(i,this.getComparator());for(var r=i.iterator();r.hasNext();){var o=r.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(e)),this.lastNode(n).addChildBoundable(o)}return n},en.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},en.prototype.interfaces_=function(){return[e]},en.prototype.getClass=function(){return en},en.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},nn.IntersectsOp.get=function(){return rn},nn.serialVersionUID.get=function(){return-0x35ef64c82d4c5400},nn.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(en,nn);var rn=function(){},on=function(){};on.prototype.distance=function(t,e){},on.prototype.interfaces_=function(){return[]},on.prototype.getClass=function(){return on};var sn=function(t){function n(e){e=e||n.DEFAULT_NODE_CAPACITY,t.call(this,e)}t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n;var i={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return n.prototype.createParentBoundablesFromVerticalSlices=function(t,e){et.isTrue(t.length>0);for(var n=new wt,i=0;i<t.length;i++)n.addAll(this.createParentBoundablesFromVerticalSlice(t[i],e));return n},n.prototype.createNode=function(t){return new an(t)},n.prototype.size=function(){return 0===arguments.length?t.prototype.size.call(this):t.prototype.size.apply(this,arguments)},n.prototype.insert=function(){if(2!==arguments.length)return t.prototype.insert.apply(this,arguments);var e=arguments[0],n=arguments[1];if(e.isNull())return null;t.prototype.insert.call(this,e,n)},n.prototype.getIntersectsOp=function(){return n.intersectsOp},n.prototype.verticalSlices=function(t,e){for(var n=Math.trunc(Math.ceil(t.size()/e)),i=new Array(e).fill(null),r=t.iterator(),o=0;o<e;o++){i[o]=new wt;for(var s=0;r.hasNext()&&s<n;){var a=r.next();i[o].add(a),s++}}return i},n.prototype.query=function(){if(1===arguments.length){var e=arguments[0];return t.prototype.query.call(this,e)}if(2===arguments.length){var n=arguments[0],i=arguments[1];t.prototype.query.call(this,n,i)}else if(3===arguments.length)if(I(arguments[2],Ke)&&arguments[0]instanceof Object&&arguments[1]instanceof Je){var r=arguments[0],o=arguments[1],s=arguments[2];t.prototype.query.call(this,r,o,s)}else if(I(arguments[2],bt)&&arguments[0]instanceof Object&&arguments[1]instanceof Je){var a=arguments[0],l=arguments[1],c=arguments[2];t.prototype.query.call(this,a,l,c)}},n.prototype.getComparator=function(){return n.yComparator},n.prototype.createParentBoundablesFromVerticalSlice=function(e,n){return t.prototype.createParentBoundables.call(this,e,n)},n.prototype.remove=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return t.prototype.remove.call(this,e,n)}return t.prototype.remove.apply(this,arguments)},n.prototype.depth=function(){return 0===arguments.length?t.prototype.depth.call(this):t.prototype.depth.apply(this,arguments)},n.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var i=Math.trunc(Math.ceil(t.size()/this.getNodeCapacity())),r=new wt(t);$e.sort(r,n.xComparator);var o=this.verticalSlices(r,Math.trunc(Math.ceil(Math.sqrt(i))));return this.createParentBoundablesFromVerticalSlices(o,e)},n.prototype.nearestNeighbour=function(){if(1===arguments.length){if(I(arguments[0],on)){var t=arguments[0],e=new tn(this.getRoot(),this.getRoot(),t);return this.nearestNeighbour(e)}if(arguments[0]instanceof tn){var i=arguments[0];return this.nearestNeighbour(i,y.POSITIVE_INFINITY)}}else if(2===arguments.length){if(arguments[0]instanceof n&&I(arguments[1],on)){var r=arguments[0],o=arguments[1],s=new tn(this.getRoot(),r.getRoot(),o);return this.nearestNeighbour(s)}if(arguments[0]instanceof tn&&"number"==typeof arguments[1]){var a=arguments[0],l=arguments[1],c=null,u=new Xe;for(u.add(a);!u.isEmpty()&&l>0;){var h=u.poll(),d=h.getDistance();if(d>=l)break;h.isLeaves()?(l=d,c=h):h.expandToQueue(u,l)}return[c.getBoundable(0).getItem(),c.getBoundable(1).getItem()]}}else if(3===arguments.length){var A=arguments[0],p=arguments[1],f=arguments[2],g=new We(A,p),m=new tn(this.getRoot(),g,f);return this.nearestNeighbour(m)[0]}},n.prototype.interfaces_=function(){return[qe,e]},n.prototype.getClass=function(){return n},n.centreX=function(t){return n.avg(t.getMinX(),t.getMaxX())},n.avg=function(t,e){return(t+e)/2},n.centreY=function(t){return n.avg(t.getMinY(),t.getMaxY())},i.STRtreeNode.get=function(){return an},i.serialVersionUID.get=function(){return 0x39920f7d5f261e0},i.xComparator.get=function(){return{interfaces_:function(){return[w]},compare:function(e,i){return t.compareDoubles(n.centreX(e.getBounds()),n.centreX(i.getBounds()))}}},i.yComparator.get=function(){return{interfaces_:function(){return[w]},compare:function(e,i){return t.compareDoubles(n.centreY(e.getBounds()),n.centreY(i.getBounds()))}}},i.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},i.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(n,i),n}(en),an=function(t){function e(){var e=arguments[0];t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();null===t?t=new Z(n.getBounds()):t.expandToInclude(n.getBounds())}return t},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Je),ln=function(){};ln.prototype.interfaces_=function(){return[]},ln.prototype.getClass=function(){return ln},ln.relativeSign=function(t,e){return t<e?-1:t>e?1:0},ln.compare=function(t,e,n){if(e.equals2D(n))return 0;var i=ln.relativeSign(e.x,n.x),r=ln.relativeSign(e.y,n.y);switch(t){case 0:return ln.compareValue(i,r);case 1:return ln.compareValue(r,i);case 2:return ln.compareValue(r,-i);case 3:return ln.compareValue(-i,r);case 4:return ln.compareValue(-i,-r);case 5:return ln.compareValue(-r,-i);case 6:return ln.compareValue(-r,i);case 7:return ln.compareValue(i,-r)}return et.shouldNeverReachHere("invalid octant value"),0},ln.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var cn=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._segString=t,this.coord=new E(e),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(n))};cn.prototype.getCoordinate=function(){return this.coord},cn.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},cn.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:ln.compare(this._segmentOctant,this.coord,e.coord)},cn.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},cn.prototype.isInterior=function(){return this._isInterior},cn.prototype.interfaces_=function(){return[x]},cn.prototype.getClass=function(){return cn};var un=function(){this._nodeMap=new h,this._edge=null;var t=arguments[0];this._edge=t};un.prototype.getSplitCoordinates=function(){var t=new Ct;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next();this.addEdgeCoordinates(n,i,t),n=i}return t.toCoordinateArray()},un.prototype.addCollapsedNodes=function(){var t=new wt;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var n=e.next().intValue();this.add(this._edge.getCoordinate(n),n)}},un.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},un.prototype.findCollapsesFromExistingVertices=function(t){for(var e=0;e<this._edge.size()-2;e++){var n=this._edge.getCoordinate(e),i=this._edge.getCoordinate(e+2);n.equals2D(i)&&t.add(new R(e+1))}},un.prototype.addEdgeCoordinates=function(t,e,n){var i=this._edge.getCoordinate(e.segmentIndex),r=e.isInterior()||!e.coord.equals2D(i);n.add(new E(t.coord),!1);for(var o=t.segmentIndex+1;o<=e.segmentIndex;o++)n.add(this._edge.getCoordinate(o));r&&n.add(new E(e.coord))},un.prototype.iterator=function(){return this._nodeMap.values().iterator()},un.prototype.addSplitEdges=function(t){this.addEndpoints(),this.addCollapsedNodes();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next(),r=this.createSplitEdge(n,i);t.add(r),n=i}},un.prototype.findCollapseIndex=function(t,e,n){if(!t.coord.equals2D(e.coord))return!1;var i=e.segmentIndex-t.segmentIndex;return e.isInterior()||i--,1===i&&(n[0]=t.segmentIndex+1,!0)},un.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=new Array(1).fill(null),n=this.iterator(),i=n.next();n.hasNext();){var r=n.next();this.findCollapseIndex(i,r,e)&&t.add(new R(e[0])),i=r}},un.prototype.getEdge=function(){return this._edge},un.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},un.prototype.createSplitEdge=function(t,e){var n=e.segmentIndex-t.segmentIndex+2,i=this._edge.getCoordinate(e.segmentIndex),r=e.isInterior()||!e.coord.equals2D(i);r||n--;var o=new Array(n).fill(null),s=0;o[s++]=new E(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this._edge.getCoordinate(a);return r&&(o[s]=new E(e.coord)),new pn(o,this._edge.getData())},un.prototype.add=function(t,e){var n=new cn(this._edge,t,e,this._edge.getSegmentOctant(e)),i=this._nodeMap.get(n);return null!==i?(et.isTrue(i.coord.equals2D(t),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(n,n),n)},un.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),n=t.get(0).getCoordinate(0);if(!n.equals2D(e[0]))throw new $("bad split edge start point at "+n);var i=t.get(t.size()-1).getCoordinates(),r=i[i.length-1];if(!r.equals2D(e[e.length-1]))throw new $("bad split edge end point at "+r)},un.prototype.interfaces_=function(){return[]},un.prototype.getClass=function(){return un};var hn=function(){};hn.prototype.interfaces_=function(){return[]},hn.prototype.getClass=function(){return hn},hn.octant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new _("Cannot compute the octant for point ( "+t+", "+e+" )");var n=Math.abs(t),i=Math.abs(e);return t>=0?e>=0?n>=i?0:1:n>=i?7:6:e>=0?n>=i?3:2:n>=i?4:5}if(arguments[0]instanceof E&&arguments[1]instanceof E){var r=arguments[0],o=arguments[1],s=o.x-r.x,a=o.y-r.y;if(0===s&&0===a)throw new _("Cannot compute the octant for two identical points "+r);return hn.octant(s,a)}};var dn=function(){};dn.prototype.getCoordinates=function(){},dn.prototype.size=function(){},dn.prototype.getCoordinate=function(t){},dn.prototype.isClosed=function(){},dn.prototype.setData=function(t){},dn.prototype.getData=function(){},dn.prototype.interfaces_=function(){return[]},dn.prototype.getClass=function(){return dn};var An=function(){};An.prototype.addIntersection=function(t,e){},An.prototype.interfaces_=function(){return[dn]},An.prototype.getClass=function(){return An};var pn=function(){this._nodeList=new un(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};pn.prototype.getCoordinates=function(){return this._pts},pn.prototype.size=function(){return this._pts.length},pn.prototype.getCoordinate=function(t){return this._pts[t]},pn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},pn.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},pn.prototype.setData=function(t){this._data=t},pn.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:hn.octant(t,e)},pn.prototype.getData=function(){return this._data},pn.prototype.addIntersection=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[3],o=new E(n.getIntersection(r));this.addIntersection(o,i)}},pn.prototype.toString=function(){return Y.toLineString(new le(this._pts))},pn.prototype.getNodeList=function(){return this._nodeList},pn.prototype.addIntersectionNode=function(t,e){var n=e,i=n+1;if(i<this._pts.length){var r=this._pts[i];t.equals2D(r)&&(n=i)}return this._nodeList.add(t,n)},pn.prototype.addIntersections=function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++)this.addIntersection(t,e,n,i)},pn.prototype.interfaces_=function(){return[An]},pn.prototype.getClass=function(){return pn},pn.getNodedSubstrings=function(){if(1===arguments.length){var t=arguments[0],e=new wt;return pn.getNodedSubstrings(t,e),e}if(2===arguments.length)for(var n=arguments[0],i=arguments[1],r=n.iterator();r.hasNext();)r.next().getNodeList().addSplitEdges(i)};var fn=function(){if(this.p0=null,this.p1=null,0===arguments.length)this.p0=new E,this.p1=new E;else if(1===arguments.length){var t=arguments[0];this.p0=new E(t.p0),this.p1=new E(t.p1)}else if(2===arguments.length)this.p0=arguments[0],this.p1=arguments[1];else if(4===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2],r=arguments[3];this.p0=new E(e,n),this.p1=new E(i,r)}},gn={serialVersionUID:{configurable:!0}};fn.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},fn.prototype.orientationIndex=function(){if(arguments[0]instanceof fn){var t=arguments[0],e=at.orientationIndex(this.p0,this.p1,t.p0),n=at.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof E){var i=arguments[0];return at.orientationIndex(this.p0,this.p1,i)}},fn.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},fn.prototype.isVertical=function(){return this.p0.x===this.p1.x},fn.prototype.equals=function(t){if(!(t instanceof fn))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},fn.prototype.intersection=function(t){var e=new rt;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},fn.prototype.project=function(){if(arguments[0]instanceof E){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new E(t);var e=this.projectionFactor(t),n=new E;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof fn){var i=arguments[0],r=this.projectionFactor(i.p0),o=this.projectionFactor(i.p1);if(r>=1&&o>=1)return null;if(r<=0&&o<=0)return null;var s=this.project(i.p0);r<0&&(s=this.p0),r>1&&(s=this.p1);var a=this.project(i.p1);return o<0&&(a=this.p0),o>1&&(a=this.p1),new fn(s,a)}},fn.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},fn.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},fn.prototype.getCoordinate=function(t){return 0===t?this.p0:this.p1},fn.prototype.distancePerpendicular=function(t){return at.distancePointLinePerpendicular(t,this.p0,this.p1)},fn.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},fn.prototype.midPoint=function(){return fn.midPoint(this.p0,this.p1)},fn.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=e*e+n*n;return i<=0?y.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/i},fn.prototype.closestPoints=function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),i=y.MAX_VALUE,r=null,o=this.closestPoint(t.p0);i=o.distance(t.p0),n[0]=o,n[1]=t.p0;var s=this.closestPoint(t.p1);(r=s.distance(t.p1))<i&&(i=r,n[0]=s,n[1]=t.p1);var a=t.closestPoint(this.p0);(r=a.distance(this.p0))<i&&(i=r,n[0]=this.p0,n[1]=a);var l=t.closestPoint(this.p1);return(r=l.distance(this.p1))<i&&(i=r,n[0]=this.p1,n[1]=l),n},fn.prototype.closestPoint=function(t){var e=this.projectionFactor(t);return e>0&&e<1?this.project(t):this.p0.distance(t)<this.p1.distance(t)?this.p0:this.p1},fn.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},fn.prototype.getLength=function(){return this.p0.distance(this.p1)},fn.prototype.compareTo=function(t){var e=t,n=this.p0.compareTo(e.p0);return 0!==n?n:this.p1.compareTo(e.p1)},fn.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},fn.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},fn.prototype.lineIntersection=function(t){try{return j.intersection(this.p0,this.p1,t.p0,t.p1)}catch(t){if(!(t instanceof H))throw t}return null},fn.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},fn.prototype.pointAlongOffset=function(t,e){var n=this.p0.x+t*(this.p1.x-this.p0.x),i=this.p0.y+t*(this.p1.y-this.p0.y),r=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,s=Math.sqrt(r*r+o*o),a=0,l=0;if(0!==e){if(s<=0)throw new Error("Cannot compute offset from zero-length line segment");a=e*r/s,l=e*o/s}return new E(n-l,i+a)},fn.prototype.setCoordinates=function(){if(1===arguments.length){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=n.x,this.p1.y=n.y}},fn.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||y.isNaN(e))&&(e=1),e},fn.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},fn.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},fn.prototype.distance=function(){if(arguments[0]instanceof fn){var t=arguments[0];return at.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof E){var e=arguments[0];return at.distancePointLine(e,this.p0,this.p1)}},fn.prototype.pointAlong=function(t){var e=new E;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},fn.prototype.hashCode=function(){var t=y.doubleToLongBits(this.p0.x);t^=31*y.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=y.doubleToLongBits(this.p1.x);return n^=31*y.doubleToLongBits(this.p1.y),e^Math.trunc(n)^Math.trunc(n>>32)},fn.prototype.interfaces_=function(){return[x,e]},fn.prototype.getClass=function(){return fn},fn.midPoint=function(t,e){return new E((t.x+e.x)/2,(t.y+e.y)/2)},gn.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(fn,gn);var mn=function(){this.tempEnv1=new Z,this.tempEnv2=new Z,this._overlapSeg1=new fn,this._overlapSeg2=new fn};mn.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},mn.prototype.interfaces_=function(){return[]},mn.prototype.getClass=function(){return mn};var _n=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=i};_n.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},_n.prototype.computeSelect=function(t,e,n,i){var r=this._pts[e],o=this._pts[n];if(i.tempEnv1.init(r,o),n-e==1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var s=Math.trunc((e+n)/2);e<s&&this.computeSelect(t,e,s,i),s<n&&this.computeSelect(t,s,n,i)},_n.prototype.getCoordinates=function(){for(var t=new Array(this._end-this._start+1).fill(null),e=0,n=this._start;n<=this._end;n++)t[e++]=this._pts[n];return t},_n.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},_n.prototype.setId=function(t){this._id=t},_n.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},_n.prototype.getEnvelope=function(){if(null===this._env){var t=this._pts[this._start],e=this._pts[this._end];this._env=new Z(t,e)}return this._env},_n.prototype.getEndIndex=function(){return this._end},_n.prototype.getStartIndex=function(){return this._start},_n.prototype.getContext=function(){return this._context},_n.prototype.getId=function(){return this._id},_n.prototype.computeOverlapsInternal=function(t,e,n,i,r,o){var s=this._pts[t],a=this._pts[e],l=n._pts[i],c=n._pts[r];if(e-t==1&&r-i==1)return o.overlap(this,t,n,i),null;if(o.tempEnv1.init(s,a),o.tempEnv2.init(l,c),!o.tempEnv1.intersects(o.tempEnv2))return null;var u=Math.trunc((t+e)/2),h=Math.trunc((i+r)/2);t<u&&(i<h&&this.computeOverlapsInternal(t,u,n,i,h,o),h<r&&this.computeOverlapsInternal(t,u,n,h,r,o)),u<e&&(i<h&&this.computeOverlapsInternal(u,e,n,i,h,o),h<r&&this.computeOverlapsInternal(u,e,n,h,r,o))},_n.prototype.interfaces_=function(){return[]},_n.prototype.getClass=function(){return _n};var yn=function(){};yn.prototype.interfaces_=function(){return[]},yn.prototype.getClass=function(){return yn},yn.getChainStartIndices=function(t){var e=0,n=new wt;n.add(new R(e));do{var i=yn.findChainEnd(t,e);n.add(new R(i)),e=i}while(e<t.length-1);return yn.toIntArray(n)},yn.findChainEnd=function(t,e){for(var n=e;n<t.length-1&&t[n].equals2D(t[n+1]);)n++;if(n>=t.length-1)return t.length-1;for(var i=ke.quadrant(t[n],t[n+1]),r=e+1;r<t.length;){if(!t[r-1].equals2D(t[r])&&ke.quadrant(t[r-1],t[r])!==i)break;r++}return r-1},yn.getChains=function(){if(1===arguments.length){var t=arguments[0];return yn.getChains(t,null)}if(2===arguments.length){for(var e=arguments[0],n=arguments[1],i=new wt,r=yn.getChainStartIndices(e),o=0;o<r.length-1;o++){var s=new _n(e,r[o],r[o+1],n);i.add(s)}return i}},yn.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var vn=function(){};vn.prototype.computeNodes=function(t){},vn.prototype.getNodedSubstrings=function(){},vn.prototype.interfaces_=function(){return[]},vn.prototype.getClass=function(){return vn};var xn=function(){if(this._segInt=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.setSegmentIntersector(t)}};xn.prototype.setSegmentIntersector=function(t){this._segInt=t},xn.prototype.interfaces_=function(){return[vn]},xn.prototype.getClass=function(){return xn};var bn=function(t){function e(e){e?t.call(this,e):t.call(this),this._monoChains=new wt,this._index=new sn,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={SegmentOverlapAction:{configurable:!0}};return e.prototype.getMonotoneChains=function(){return this._monoChains},e.prototype.getNodedSubstrings=function(){return pn.getNodedSubstrings(this._nodedSegStrings)},e.prototype.getIndex=function(){return this._index},e.prototype.add=function(t){for(var e=yn.getChains(t.getCoordinates(),t).iterator();e.hasNext();){var n=e.next();n.setId(this._idCounter++),this._index.insert(n.getEnvelope(),n),this._monoChains.add(n)}},e.prototype.computeNodes=function(t){this._nodedSegStrings=t;for(var e=t.iterator();e.hasNext();)this.add(e.next());this.intersectChains()},e.prototype.intersectChains=function(){for(var t=new wn(this._segInt),e=this._monoChains.iterator();e.hasNext();)for(var n=e.next(),i=this._index.query(n.getEnvelope()).iterator();i.hasNext();){var r=i.next();if(r.getId()>n.getId()&&(n.computeOverlaps(r,t),this._nOverlaps++),this._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return wn},Object.defineProperties(e,n),e}(xn),wn=function(t){function e(){t.call(this),this._si=null;var e=arguments[0];this._si=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(4!==arguments.length)return t.prototype.overlap.apply(this,arguments);var e=arguments[0],n=arguments[1],i=arguments[2],r=arguments[3],o=e.getContext(),s=i.getContext();this._si.processIntersections(o,n,s,r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(mn),En=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(i)}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this.setQuadrantSegments(r),this.setEndCapStyle(o),this.setJoinStyle(s),this.setMitreLimit(a)}},Cn={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};En.prototype.getEndCapStyle=function(){return this._endCapStyle},En.prototype.isSingleSided=function(){return this._isSingleSided},En.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=En.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=En.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==En.JOIN_ROUND&&(this._quadrantSegments=En.DEFAULT_QUADRANT_SEGMENTS)},En.prototype.getJoinStyle=function(){return this._joinStyle},En.prototype.setJoinStyle=function(t){this._joinStyle=t},En.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},En.prototype.getSimplifyFactor=function(){return this._simplifyFactor},En.prototype.getQuadrantSegments=function(){return this._quadrantSegments},En.prototype.setEndCapStyle=function(t){this._endCapStyle=t},En.prototype.getMitreLimit=function(){return this._mitreLimit},En.prototype.setMitreLimit=function(t){this._mitreLimit=t},En.prototype.setSingleSided=function(t){this._isSingleSided=t},En.prototype.interfaces_=function(){return[]},En.prototype.getClass=function(){return En},En.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Cn.CAP_ROUND.get=function(){return 1},Cn.CAP_FLAT.get=function(){return 2},Cn.CAP_SQUARE.get=function(){return 3},Cn.JOIN_ROUND.get=function(){return 1},Cn.JOIN_MITRE.get=function(){return 2},Cn.JOIN_BEVEL.get=function(){return 3},Cn.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Cn.DEFAULT_MITRE_LIMIT.get=function(){return 5},Cn.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(En,Cn);var Bn=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=at.COUNTERCLOCKWISE,this._inputLine=t||null},Sn={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Bn.prototype.isDeletable=function(t,e,n,i){var r=this._inputLine[t],o=this._inputLine[e],s=this._inputLine[n];return!!this.isConcave(r,o,s)&&!!this.isShallow(r,o,s,i)&&this.isShallowSampled(r,o,t,n,i)},Bn.prototype.deleteShallowConcavities=function(){for(var t=1,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e),i=!1;n<this._inputLine.length;){var r=!1;this.isDeletable(t,e,n,this._distanceTol)&&(this._isDeleted[e]=Bn.DELETE,r=!0,i=!0),t=r?n:e,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e)}return i},Bn.prototype.isShallowConcavity=function(t,e,n,i){return at.computeOrientation(t,e,n)===this._angleOrientation&&at.distancePointLine(e,t,n)<i},Bn.prototype.isShallowSampled=function(t,e,n,i,r){var o=Math.trunc((i-n)/Bn.NUM_PTS_TO_CHECK);o<=0&&(o=1);for(var s=n;s<i;s+=o)if(!this.isShallow(t,e,this._inputLine[s],r))return!1;return!0},Bn.prototype.isConcave=function(t,e,n){var i=at.computeOrientation(t,e,n)===this._angleOrientation;return i},Bn.prototype.simplify=function(t){this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=at.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var e=!1;do{e=this.deleteShallowConcavities()}while(e);return this.collapseLine()},Bn.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===Bn.DELETE;)e++;return e},Bn.prototype.isShallow=function(t,e,n,i){return at.distancePointLine(e,t,n)<i},Bn.prototype.collapseLine=function(){for(var t=new Ct,e=0;e<this._inputLine.length;e++)this._isDeleted[e]!==Bn.DELETE&&t.add(this._inputLine[e]);return t.toCoordinateArray()},Bn.prototype.interfaces_=function(){return[]},Bn.prototype.getClass=function(){return Bn},Bn.simplify=function(t,e){return new Bn(t).simplify(e)},Sn.INIT.get=function(){return 0},Sn.DELETE.get=function(){return 1},Sn.KEEP.get=function(){return 1},Sn.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(Bn,Sn);var Mn=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new wt},Tn={COORDINATE_ARRAY_TYPE:{configurable:!0}};Mn.prototype.getCoordinates=function(){return this._ptList.toArray(Mn.COORDINATE_ARRAY_TYPE)},Mn.prototype.setPrecisionModel=function(t){this._precisionModel=t},Mn.prototype.addPt=function(t){var e=new E(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},Mn.prototype.revere=function(){},Mn.prototype.addPts=function(t,e){if(e)for(var n=0;n<t.length;n++)this.addPt(t[n]);else for(var i=t.length-1;i>=0;i--)this.addPt(t[i])},Mn.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)<this._minimimVertexDistance},Mn.prototype.toString=function(){return(new me).createLineString(this.getCoordinates()).toString()},Mn.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new E(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},Mn.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},Mn.prototype.interfaces_=function(){return[]},Mn.prototype.getClass=function(){return Mn},Tn.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(Mn,Tn);var In=function(){},Ln={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};In.prototype.interfaces_=function(){return[]},In.prototype.getClass=function(){return In},In.toDegrees=function(t){return 180*t/Math.PI},In.normalize=function(t){for(;t>Math.PI;)t-=In.PI_TIMES_2;for(;t<=-Math.PI;)t+=In.PI_TIMES_2;return t},In.angle=function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],i=n.x-e.x,r=n.y-e.y;return Math.atan2(r,i)}},In.isAcute=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return i*(n.x-e.x)+r*(n.y-e.y)>0},In.isObtuse=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return i*(n.x-e.x)+r*(n.y-e.y)<0},In.interiorAngle=function(t,e,n){var i=In.angle(e,t),r=In.angle(e,n);return Math.abs(r-i)},In.normalizePositive=function(t){if(t<0){for(;t<0;)t+=In.PI_TIMES_2;t>=In.PI_TIMES_2&&(t=0)}else{for(;t>=In.PI_TIMES_2;)t-=In.PI_TIMES_2;t<0&&(t=0)}return t},In.angleBetween=function(t,e,n){var i=In.angle(e,t),r=In.angle(e,n);return In.diff(i,r)},In.diff=function(t,e){var n=null;return(n=t<e?e-t:t-e)>Math.PI&&(n=2*Math.PI-n),n},In.toRadians=function(t){return t*Math.PI/180},In.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?In.COUNTERCLOCKWISE:n<0?In.CLOCKWISE:In.NONE},In.angleBetweenOriented=function(t,e,n){var i=In.angle(e,t),r=In.angle(e,n)-i;return r<=-Math.PI?r+In.PI_TIMES_2:r>Math.PI?r-In.PI_TIMES_2:r},Ln.PI_TIMES_2.get=function(){return 2*Math.PI},Ln.PI_OVER_2.get=function(){return Math.PI/2},Ln.PI_OVER_4.get=function(){return Math.PI/4},Ln.COUNTERCLOCKWISE.get=function(){return at.COUNTERCLOCKWISE},Ln.CLOCKWISE.get=function(){return at.CLOCKWISE},Ln.NONE.get=function(){return at.COLLINEAR},Object.defineProperties(In,Ln);var Pn=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new fn,this._seg1=new fn,this._offset0=new fn,this._offset1=new fn,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new rt,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===En.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(i)},Fn={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};Pn.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=at.computeOrientation(this._s0,this._s1,this._s2),i=n===at.CLOCKWISE&&this._side===Ce.LEFT||n===at.COUNTERCLOCKWISE&&this._side===Ce.RIGHT;0===n?this.addCollinear(e):i?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},Pn.prototype.addLineEndCap=function(t,e){var n=new fn(t,e),i=new fn;this.computeOffsetSegment(n,Ce.LEFT,this._distance,i);var r=new fn;this.computeOffsetSegment(n,Ce.RIGHT,this._distance,r);var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o);switch(this._bufParams.getEndCapStyle()){case En.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,a+Math.PI/2,a-Math.PI/2,at.CLOCKWISE,this._distance),this._segList.addPt(r.p1);break;case En.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(r.p1);break;case En.CAP_SQUARE:var l=new E;l.x=Math.abs(this._distance)*Math.cos(a),l.y=Math.abs(this._distance)*Math.sin(a);var c=new E(i.p1.x+l.x,i.p1.y+l.y),u=new E(r.p1.x+l.x,r.p1.y+l.y);this._segList.addPt(c),this._segList.addPt(u)}},Pn.prototype.getCoordinates=function(){return this._segList.getCoordinates()},Pn.prototype.addMitreJoin=function(t,e,n,i){var r=!0,o=null;try{o=j.intersection(e.p0,e.p1,n.p0,n.p1),(i<=0?1:o.distance(t)/Math.abs(i))>this._bufParams.getMitreLimit()&&(r=!1)}catch(t){if(!(t instanceof H))throw t;o=new E(0,0),r=!1}r?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,i,this._bufParams.getMitreLimit())},Pn.prototype.addFilletCorner=function(t,e,n,i,r){var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o),l=n.x-t.x,c=n.y-t.y,u=Math.atan2(c,l);i===at.CLOCKWISE?a<=u&&(a+=2*Math.PI):a>=u&&(a-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,a,u,i,r),this._segList.addPt(n)},Pn.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*Pn.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===En.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===En.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},Pn.prototype.createSquare=function(t){this._segList.addPt(new E(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new E(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new E(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new E(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},Pn.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},Pn.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},Pn.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},Pn.prototype.initSideSegments=function(t,e,n){this._s1=t,this._s2=e,this._side=n,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)},Pn.prototype.addLimitedMitreJoin=function(t,e,n,i){var r=this._seg0.p1,o=In.angle(r,this._seg0.p0),s=In.angleBetweenOriented(this._seg0.p0,r,this._seg1.p1)/2,a=In.normalize(o+s),l=In.normalize(a+Math.PI),c=i*n,u=n-c*Math.abs(Math.sin(s)),h=r.x+c*Math.cos(l),d=r.y+c*Math.sin(l),A=new E(h,d),p=new fn(r,A),f=p.pointAlongOffset(1,u),g=p.pointAlongOffset(1,-u);this._side===Ce.LEFT?(this._segList.addPt(f),this._segList.addPt(g)):(this._segList.addPt(g),this._segList.addPt(f))},Pn.prototype.computeOffsetSegment=function(t,e,n,i){var r=e===Ce.LEFT?1:-1,o=t.p1.x-t.p0.x,s=t.p1.y-t.p0.y,a=Math.sqrt(o*o+s*s),l=r*n*o/a,c=r*n*s/a;i.p0.x=t.p0.x-c,i.p0.y=t.p0.y+l,i.p1.x=t.p1.x-c,i.p1.y=t.p1.y+l},Pn.prototype.addFilletArc=function(t,e,n,i,r){var o=i===at.CLOCKWISE?-1:1,s=Math.abs(e-n),a=Math.trunc(s/this._filletAngleQuantum+.5);if(a<1)return null;for(var l=s/a,c=0,u=new E;c<s;){var h=e+o*c;u.x=t.x+r*Math.cos(h),u.y=t.y+r*Math.sin(h),this._segList.addPt(u),c+=l}},Pn.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*Pn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new E((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var i=new E((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},Pn.prototype.createCircle=function(t){var e=new E(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Pn.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},Pn.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Mn,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*Pn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Pn.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===En.JOIN_BEVEL||this._bufParams.getJoinStyle()===En.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,at.CLOCKWISE,this._distance))},Pn.prototype.closeRing=function(){this._segList.closeRing()},Pn.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Pn.prototype.interfaces_=function(){return[]},Pn.prototype.getClass=function(){return Pn},Fn.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},Fn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},Fn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Fn.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Pn,Fn);var Rn=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};Rn.prototype.getOffsetCurve=function(t,e){if(this._distance=e,0===e)return null;var n=e<0,i=Math.abs(e),r=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],r):this.computeOffsetCurve(t,n,r);var o=r.getCoordinates();return n&&Bt.reverse(o),o},Rn.prototype.computeSingleSidedBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var r=Bn.simplify(t,-i),o=r.length-1;n.initSideSegments(r[o],r[o-1],Ce.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(r[s],!0)}else{n.addSegments(t,!1);var a=Bn.simplify(t,i),l=a.length-1;n.initSideSegments(a[0],a[1],Ce.LEFT),n.addFirstSegment();for(var c=2;c<=l;c++)n.addNextSegment(a[c],!0)}n.addLastSegment(),n.closeRing()},Rn.prototype.computeRingBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);e===Ce.RIGHT&&(i=-i);var r=Bn.simplify(t,i),o=r.length-1;n.initSideSegments(r[o-1],r[0],e);for(var s=1;s<=o;s++){var a=1!==s;n.addNextSegment(r[s],a)}n.closeRing()},Rn.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),i=Bn.simplify(t,n),r=i.length-1;e.initSideSegments(i[0],i[1],Ce.LEFT);for(var o=2;o<=r;o++)e.addNextSegment(i[o],!0);e.addLastSegment(),e.addLineEndCap(i[r-1],i[r]);var s=Bn.simplify(t,-n),a=s.length-1;e.initSideSegments(s[a],s[a-1],Ce.LEFT);for(var l=a-2;l>=0;l--)e.addNextSegment(s[l],!0);e.addLastSegment(),e.addLineEndCap(s[1],s[0]),e.closeRing()},Rn.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case En.CAP_ROUND:e.createCircle(t);break;case En.CAP_SQUARE:e.createSquare(t)}},Rn.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided())return null;if(0===e)return null;var n=Math.abs(e),i=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var r=e<0;this.computeSingleSidedBufferCurve(t,r,i)}else this.computeLineBufferCurve(t,i);return i.getCoordinates()},Rn.prototype.getBufferParameters=function(){return this._bufParams},Rn.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},Rn.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(0===n)return Rn.copyCoordinates(t);var i=this.getSegGen(n);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},Rn.prototype.computeOffsetCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){var r=Bn.simplify(t,-i),o=r.length-1;n.initSideSegments(r[o],r[o-1],Ce.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(r[s],!0)}else{var a=Bn.simplify(t,i),l=a.length-1;n.initSideSegments(a[0],a[1],Ce.LEFT),n.addFirstSegment();for(var c=2;c<=l;c++)n.addNextSegment(a[c],!0)}n.addLastSegment()},Rn.prototype.getSegGen=function(t){return new Pn(this._precisionModel,this._bufParams,t)},Rn.prototype.interfaces_=function(){return[]},Rn.prototype.getClass=function(){return Rn},Rn.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;n<e.length;n++)e[n]=new E(t[n]);return e};var Dn=function(){this._subgraphs=null,this._seg=new fn,this._cga=new at;var t=arguments[0];this._subgraphs=t},On={DepthSegment:{configurable:!0}};Dn.prototype.findStabbedSegments=function(){if(1===arguments.length){for(var t=arguments[0],e=new wt,n=this._subgraphs.iterator();n.hasNext();){var i=n.next(),r=i.getEnvelope();t.y<r.getMinY()||t.y>r.getMaxY()||this.findStabbedSegments(t,i.getDirectedEdges(),e)}return e}if(3===arguments.length)if(I(arguments[2],bt)&&arguments[0]instanceof E&&arguments[1]instanceof Ge){for(var o=arguments[0],s=arguments[1],a=arguments[2],l=s.getEdge().getCoordinates(),c=0;c<l.length-1;c++)if(this._seg.p0=l[c],this._seg.p1=l[c+1],this._seg.p0.y>this._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)<o.x)&&!(this._seg.isHorizontal()||o.y<this._seg.p0.y||o.y>this._seg.p1.y||at.computeOrientation(this._seg.p0,this._seg.p1,o)===at.RIGHT)){var u=s.getDepth(Ce.LEFT);this._seg.p0.equals(l[c])||(u=s.getDepth(Ce.RIGHT));var h=new Un(this._seg,u);a.add(h)}}else if(I(arguments[2],bt)&&arguments[0]instanceof E&&I(arguments[1],bt))for(var d=arguments[0],A=arguments[1],p=arguments[2],f=A.iterator();f.hasNext();){var g=f.next();g.isForward()&&this.findStabbedSegments(d,g,p)}},Dn.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:$e.min(e)._leftDepth},Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn},On.DepthSegment.get=function(){return Un},Object.defineProperties(Dn,On);var Un=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new fn(t),this._leftDepth=e};Un.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n||0!=(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},Un.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},Un.prototype.toString=function(){return this._upwardSeg.toString()},Un.prototype.interfaces_=function(){return[x]},Un.prototype.getClass=function(){return Un};var Nn=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};Nn.prototype.area=function(){return Nn.area(this.p0,this.p1,this.p2)},Nn.prototype.signedArea=function(){return Nn.signedArea(this.p0,this.p1,this.p2)},Nn.prototype.interpolateZ=function(t){if(null===t)throw new _("Supplied point is null.");return Nn.interpolateZ(t,this.p0,this.p1,this.p2)},Nn.prototype.longestSideLength=function(){return Nn.longestSideLength(this.p0,this.p1,this.p2)},Nn.prototype.isAcute=function(){return Nn.isAcute(this.p0,this.p1,this.p2)},Nn.prototype.circumcentre=function(){return Nn.circumcentre(this.p0,this.p1,this.p2)},Nn.prototype.area3D=function(){return Nn.area3D(this.p0,this.p1,this.p2)},Nn.prototype.centroid=function(){return Nn.centroid(this.p0,this.p1,this.p2)},Nn.prototype.inCentre=function(){return Nn.inCentre(this.p0,this.p1,this.p2)},Nn.prototype.interfaces_=function(){return[]},Nn.prototype.getClass=function(){return Nn},Nn.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},Nn.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},Nn.det=function(t,e,n,i){return t*i-e*n},Nn.interpolateZ=function(t,e,n,i){var r=e.x,o=e.y,s=n.x-r,a=i.x-r,l=n.y-o,c=i.y-o,u=s*c-a*l,h=t.x-r,d=t.y-o,A=(c*h-a*d)/u,p=(-l*h+s*d)/u;return e.z+A*(n.z-e.z)+p*(i.z-e.z)},Nn.longestSideLength=function(t,e,n){var i=t.distance(e),r=e.distance(n),o=n.distance(t),s=i;return r>s&&(s=r),o>s&&(s=o),s},Nn.isAcute=function(t,e,n){return!!In.isAcute(t,e,n)&&!!In.isAcute(e,n,t)&&!!In.isAcute(n,t,e)},Nn.circumcentre=function(t,e,n){var i=n.x,r=n.y,o=t.x-i,s=t.y-r,a=e.x-i,l=e.y-r,c=2*Nn.det(o,s,a,l),u=Nn.det(s,o*o+s*s,l,a*a+l*l),h=Nn.det(o,o*o+s*s,a,a*a+l*l);return new E(i-u/c,r+h/c)},Nn.perpendicularBisector=function(t,e){var n=e.x-t.x,i=e.y-t.y,r=new j(t.x+n/2,t.y+i/2,1),o=new j(t.x-i+n/2,t.y+n+i/2,1);return new j(r,o)},Nn.angleBisector=function(t,e,n){var i=e.distance(t),r=i/(i+e.distance(n)),o=n.x-t.x,s=n.y-t.y;return new E(t.x+r*o,t.y+r*s)},Nn.area3D=function(t,e,n){var i=e.x-t.x,r=e.y-t.y,o=e.z-t.z,s=n.x-t.x,a=n.y-t.y,l=n.z-t.z,c=r*l-o*a,u=o*s-i*l,h=i*a-r*s,d=c*c+u*u+h*h,A=Math.sqrt(d)/2;return A},Nn.centroid=function(t,e,n){var i=(t.x+e.x+n.x)/3,r=(t.y+e.y+n.y)/3;return new E(i,r)},Nn.inCentre=function(t,e,n){var i=e.distance(n),r=t.distance(n),o=t.distance(e),s=i+r+o,a=(i*t.x+r*e.x+o*n.x)/s,l=(i*t.y+r*e.y+o*n.y)/s;return new E(a,l)};var kn=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new wt;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};kn.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,M.EXTERIOR,M.INTERIOR)},kn.prototype.addPolygon=function(t){var e=this._distance,n=Ce.LEFT;this._distance<0&&(e=-this._distance,n=Ce.RIGHT);var i=t.getExteriorRing(),r=Bt.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance))return null;if(this._distance<=0&&r.length<3)return null;this.addPolygonRing(r,e,n,M.EXTERIOR,M.INTERIOR);for(var o=0;o<t.getNumInteriorRing();o++){var s=t.getInteriorRingN(o),a=Bt.removeRepeatedPoints(s.getCoordinates());this._distance>0&&this.isErodedCompletely(s,-this._distance)||this.addPolygonRing(a,e,Ce.opposite(n),M.INTERIOR,M.EXTERIOR)}},kn.prototype.isTriangleErodedCompletely=function(t,e){var n=new Nn(t[0],t[1],t[2]),i=n.inCentre();return at.distancePointLine(i,n.p0,n.p1)<Math.abs(e)},kn.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=Bt.removeRepeatedPoints(t.getCoordinates()),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,M.EXTERIOR,M.INTERIOR)},kn.prototype.addCurve=function(t,e,n){if(null===t||t.length<2)return null;var i=new pn(t,new Pe(0,M.BOUNDARY,e,n));this._curveList.add(i)},kn.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},kn.prototype.addPolygonRing=function(t,e,n,i,r){if(0===e&&t.length<ee.MINIMUM_VALID_SIZE)return null;var o=i,s=r;t.length>=ee.MINIMUM_VALID_SIZE&&at.isCCW(t)&&(o=r,s=i,n=Ce.opposite(n));var a=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(a,o,s)},kn.prototype.add=function(t){if(t.isEmpty())return null;t instanceof $t?this.addPolygon(t):t instanceof Kt?this.addLineString(t):t instanceof Jt?this.addPoint(t):(t instanceof te||t instanceof Ht||t instanceof ne||t instanceof Gt)&&this.addCollection(t)},kn.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var i=t.getEnvelopeInternal(),r=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>r},kn.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},kn.prototype.interfaces_=function(){return[]},kn.prototype.getClass=function(){return kn};var zn=function(){};zn.prototype.locate=function(t){},zn.prototype.interfaces_=function(){return[]},zn.prototype.getClass=function(){return zn};var Qn=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};Qn.prototype.next=function(){if(this._atStart)return this._atStart=!1,Qn.isAtomic(this._parent)&&this._index++,this._parent;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new i;var t=this._parent.getGeometryN(this._index++);return t instanceof Gt?(this._subcollectionIterator=new Qn(t),this._subcollectionIterator.next()):t},Qn.prototype.remove=function(){throw new Error(this.getClass().getName())},Qn.prototype.hasNext=function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},Qn.prototype.interfaces_=function(){return[xt]},Qn.prototype.getClass=function(){return Qn},Qn.isAtomic=function(t){return!(t instanceof Gt)};var Gn=function(){this._geom=null;var t=arguments[0];this._geom=t};Gn.prototype.locate=function(t){return Gn.locate(t,this._geom)},Gn.prototype.interfaces_=function(){return[zn]},Gn.prototype.getClass=function(){return Gn},Gn.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&at.isPointInRing(t,e.getCoordinates())},Gn.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!Gn.isPointInRing(t,n))return!1;for(var i=0;i<e.getNumInteriorRing();i++){var r=e.getInteriorRingN(i);if(Gn.isPointInRing(t,r))return!1}return!0},Gn.containsPoint=function(t,e){if(e instanceof $t)return Gn.containsPointInPolygon(t,e);if(e instanceof Gt)for(var n=new Qn(e);n.hasNext();){var i=n.next();if(i!==e&&Gn.containsPoint(t,i))return!0}return!1},Gn.locate=function(t,e){return e.isEmpty()?M.EXTERIOR:Gn.containsPoint(t,e)?M.INTERIOR:M.EXTERIOR};var Hn=function(){this._edgeMap=new h,this._edgeList=null,this._ptInAreaLocation=[M.NONE,M.NONE]};Hn.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),n=e-1;return 0===e&&(n=this._edgeList.size()-1),this._edgeList.get(n)},Hn.prototype.propagateSideLabels=function(t){for(var e=M.NONE,n=this.iterator();n.hasNext();){var i=n.next().getLabel();i.isArea(t)&&i.getLocation(t,Ce.LEFT)!==M.NONE&&(e=i.getLocation(t,Ce.LEFT))}if(e===M.NONE)return null;for(var r=e,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getLabel();if(a.getLocation(t,Ce.ON)===M.NONE&&a.setLocation(t,Ce.ON,r),a.isArea(t)){var l=a.getLocation(t,Ce.LEFT),c=a.getLocation(t,Ce.RIGHT);if(c!==M.NONE){if(c!==r)throw new Me("side location conflict",s.getCoordinate());l===M.NONE&&et.shouldNeverReachHere("found single null side (at "+s.getCoordinate()+")"),r=l}else et.isTrue(a.getLocation(t,Ce.LEFT)===M.NONE,"found single null side"),a.setLocation(t,Ce.RIGHT,r),a.setLocation(t,Ce.LEFT,r)}}},Hn.prototype.getCoordinate=function(){var t=this.iterator();return t.hasNext()?t.next().getCoordinate():null},Hn.prototype.print=function(t){V.out.println("EdgeEndStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();)e.next().print(t)},Hn.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},Hn.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var n=e.size()-1,i=e.get(n).getLabel().getLocation(t,Ce.LEFT);et.isTrue(i!==M.NONE,"Found unlabelled area edge");for(var r=i,o=this.iterator();o.hasNext();){var s=o.next().getLabel();et.isTrue(s.isArea(t),"Found non-area edge");var a=s.getLocation(t,Ce.LEFT),l=s.getLocation(t,Ce.RIGHT);if(a===l)return!1;if(l!==r)return!1;r=a}return!0},Hn.prototype.findIndex=function(t){this.iterator();for(var e=0;e<this._edgeList.size();e++)if(this._edgeList.get(e)===t)return e;return-1},Hn.prototype.iterator=function(){return this.getEdges().iterator()},Hn.prototype.getEdges=function(){return null===this._edgeList&&(this._edgeList=new wt(this._edgeMap.values())),this._edgeList},Hn.prototype.getLocation=function(t,e,n){return this._ptInAreaLocation[t]===M.NONE&&(this._ptInAreaLocation[t]=Gn.locate(e,n[t].getGeometry())),this._ptInAreaLocation[t]},Hn.prototype.toString=function(){var t=new F;t.append("EdgeEndStar: "+this.getCoordinate()),t.append("\n");for(var e=this.iterator();e.hasNext();){var n=e.next();t.append(n),t.append("\n")}return t.toString()},Hn.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();)e.next().computeLabel(t)},Hn.prototype.computeLabelling=function(t){this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var e=[!1,!1],n=this.iterator();n.hasNext();)for(var i=n.next().getLabel(),r=0;r<2;r++)i.isLine(r)&&i.getLocation(r)===M.BOUNDARY&&(e[r]=!0);for(var o=this.iterator();o.hasNext();)for(var s=o.next(),a=s.getLabel(),l=0;l<2;l++)if(a.isAnyNull(l)){var c=M.NONE;if(e[l])c=M.EXTERIOR;else{var u=s.getCoordinate();c=this.getLocation(l,u,t)}a.setAllLocationsIfNull(l,c)}},Hn.prototype.getDegree=function(){return this._edgeMap.size()},Hn.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},Hn.prototype.interfaces_=function(){return[]},Hn.prototype.getClass=function(){return Hn};var Vn=function(t){function e(){t.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linkResultDirectedEdges=function(){this.getResultAreaEdges();for(var t=null,e=null,n=this._SCANNING_FOR_INCOMING,i=0;i<this._resultAreaEdgeList.size();i++){var r=this._resultAreaEdgeList.get(i),o=r.getSym();if(r.getLabel().isArea())switch(null===t&&r.isInResult()&&(t=r),n){case this._SCANNING_FOR_INCOMING:if(!o.isInResult())continue;e=o,n=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(!r.isInResult())continue;e.setNext(r),n=this._SCANNING_FOR_INCOMING}}if(n===this._LINKING_TO_OUTGOING){if(null===t)throw new Me("no outgoing dirEdge found",this.getCoordinate());et.isTrue(t.isInResult(),"unable to link last incoming dirEdge"),e.setNext(t)}},e.prototype.insert=function(t){var e=t;this.insertEdgeEnd(e,e)},e.prototype.getRightmostEdge=function(){var t=this.getEdges(),e=t.size();if(e<1)return null;var n=t.get(0);if(1===e)return n;var i=t.get(e-1),r=n.getQuadrant(),o=i.getQuadrant();return ke.isNorthern(r)&&ke.isNorthern(o)?n:ke.isNorthern(r)||ke.isNorthern(o)?0!==n.getDy()?n:0!==i.getDy()?i:(et.shouldNeverReachHere("found two horizontal edges incident on node"),null):i},e.prototype.print=function(t){V.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var n=e.next();t.print("out "),n.print(t),t.println(),t.print("in "),n.getSym().print(t),t.println()}},e.prototype.getResultAreaEdges=function(){if(null!==this._resultAreaEdgeList)return this._resultAreaEdgeList;this._resultAreaEdgeList=new wt;for(var t=this.iterator();t.hasNext();){var e=t.next();(e.isInResult()||e.getSym().isInResult())&&this._resultAreaEdgeList.add(e)}return this._resultAreaEdgeList},e.prototype.updateLabelling=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next().getLabel();n.setAllLocationsIfNull(0,t.getLocation(0)),n.setAllLocationsIfNull(1,t.getLocation(1))}},e.prototype.linkAllDirectedEdges=function(){this.getEdges();for(var t=null,e=null,n=this._edgeList.size()-1;n>=0;n--){var i=this._edgeList.get(n),r=i.getSym();null===e&&(e=r),null!==t&&r.setNext(t),t=i}e.setNext(t)},e.prototype.computeDepths=function(){if(1===arguments.length){var t=arguments[0],e=this.findIndex(t),n=t.getDepth(Ce.LEFT),i=t.getDepth(Ce.RIGHT),r=this.computeDepths(e+1,this._edgeList.size(),n);if(this.computeDepths(0,e,r)!==i)throw new Me("depth mismatch at "+t.getCoordinate())}else if(3===arguments.length){for(var o=arguments[0],s=arguments[1],a=arguments[2],l=o;l<s;l++){var c=this._edgeList.get(l);c.setEdgeDepths(Ce.RIGHT,a),a=c.getDepth(Ce.LEFT)}return a}},e.prototype.mergeSymLabels=function(){for(var t=this.iterator();t.hasNext();){var e=t.next();e.getLabel().merge(e.getSym().getLabel())}},e.prototype.linkMinimalDirectedEdges=function(t){for(var e=null,n=null,i=this._SCANNING_FOR_INCOMING,r=this._resultAreaEdgeList.size()-1;r>=0;r--){var o=this._resultAreaEdgeList.get(r),s=o.getSym();switch(null===e&&o.getEdgeRing()===t&&(e=o),i){case this._SCANNING_FOR_INCOMING:if(s.getEdgeRing()!==t)continue;n=s,i=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(o.getEdgeRing()!==t)continue;n.setNextMin(o),i=this._SCANNING_FOR_INCOMING}}i===this._LINKING_TO_OUTGOING&&(et.isTrue(null!==e,"found null for first outgoing dirEdge"),et.isTrue(e.getEdgeRing()===t,"unable to link last incoming dirEdge"),n.setNextMin(e))},e.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var t=0,e=this.iterator();e.hasNext();)e.next().isInResult()&&t++;return t}if(1===arguments.length){for(var n=arguments[0],i=0,r=this.iterator();r.hasNext();)r.next().getEdgeRing()===n&&i++;return i}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var t=M.NONE,e=this.iterator();e.hasNext();){var n=e.next(),i=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=M.INTERIOR;break}if(i.isInResult()){t=M.EXTERIOR;break}}}if(t===M.NONE)return null;for(var r=t,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getSym();s.isLineEdge()?s.getEdge().setCovered(r===M.INTERIOR):(s.isInResult()&&(r=M.EXTERIOR),a.isInResult()&&(r=M.INTERIOR))}},e.prototype.computeLabelling=function(e){t.prototype.computeLabelling.call(this,e),this._label=new Pe(M.NONE);for(var n=this.iterator();n.hasNext();)for(var i=n.next().getEdge().getLabel(),r=0;r<2;r++){var o=i.getLocation(r);o!==M.INTERIOR&&o!==M.BOUNDARY||this._label.setLocation(r,M.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Hn),jn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(t){return new Ue(t,new Vn)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(He),Zn=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};Zn.prototype.compareTo=function(t){var e=t;return Zn.compareOriented(this._pts,this._orientation,e._pts,e._orientation)},Zn.prototype.interfaces_=function(){return[x]},Zn.prototype.getClass=function(){return Zn},Zn.orientation=function(t){return 1===Bt.increasingDirection(t)},Zn.compareOriented=function(t,e,n,i){for(var r=e?1:-1,o=i?1:-1,s=e?t.length:-1,a=i?n.length:-1,l=e?0:t.length-1,c=i?0:n.length-1;;){var u=t[l].compareTo(n[c]);if(0!==u)return u;var h=(l+=r)===s,d=(c+=o)===a;if(h&&!d)return-1;if(!h&&d)return 1;if(h&&d)return 0}};var Wn=function(){this._edges=new wt,this._ocaMap=new h};Wn.prototype.print=function(t){t.print("MULTILINESTRING ( ");for(var e=0;e<this._edges.size();e++){var n=this._edges.get(e);e>0&&t.print(","),t.print("(");for(var i=n.getCoordinates(),r=0;r<i.length;r++)r>0&&t.print(","),t.print(i[r].x+" "+i[r].y);t.println(")")}t.print(") ")},Wn.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},Wn.prototype.findEdgeIndex=function(t){for(var e=0;e<this._edges.size();e++)if(this._edges.get(e).equals(t))return e;return-1},Wn.prototype.iterator=function(){return this._edges.iterator()},Wn.prototype.getEdges=function(){return this._edges},Wn.prototype.get=function(t){return this._edges.get(t)},Wn.prototype.findEqualEdge=function(t){var e=new Zn(t.getCoordinates());return this._ocaMap.get(e)},Wn.prototype.add=function(t){this._edges.add(t);var e=new Zn(t.getCoordinates());this._ocaMap.put(e,t)},Wn.prototype.interfaces_=function(){return[]},Wn.prototype.getClass=function(){return Wn};var Xn=function(){};Xn.prototype.processIntersections=function(t,e,n,i){},Xn.prototype.isDone=function(){},Xn.prototype.interfaces_=function(){return[]},Xn.prototype.getClass=function(){return Xn};var Kn=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};Kn.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&1===this._li.getIntersectionNum()){if(Kn.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var r=t.size()-1;if(0===e&&i===r||0===i&&e===r)return!0}}return!1},Kn.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Kn.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Kn.prototype.getLineIntersector=function(){return this._li},Kn.prototype.hasProperIntersection=function(){return this._hasProper},Kn.prototype.processIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},Kn.prototype.hasIntersection=function(){return this._hasIntersection},Kn.prototype.isDone=function(){return!1},Kn.prototype.hasInteriorIntersection=function(){return this._hasInterior},Kn.prototype.interfaces_=function(){return[Xn]},Kn.prototype.getClass=function(){return Kn},Kn.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var qn=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.coord=new E(t),this.segmentIndex=e,this.dist=n};qn.prototype.getSegmentIndex=function(){return this.segmentIndex},qn.prototype.getCoordinate=function(){return this.coord},qn.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},qn.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},qn.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&0===this.dist||this.segmentIndex===t},qn.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},qn.prototype.getDistance=function(){return this.dist},qn.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},qn.prototype.interfaces_=function(){return[x]},qn.prototype.getClass=function(){return qn};var Jn=function(){this._nodeMap=new h,this.edge=null;var t=arguments[0];this.edge=t};Jn.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},Jn.prototype.iterator=function(){return this._nodeMap.values().iterator()},Jn.prototype.addSplitEdges=function(t){this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next(),r=this.createSplitEdge(n,i);t.add(r),n=i}},Jn.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},Jn.prototype.createSplitEdge=function(t,e){var n=e.segmentIndex-t.segmentIndex+2,i=this.edge.pts[e.segmentIndex],r=e.dist>0||!e.coord.equals2D(i);r||n--;var o=new Array(n).fill(null),s=0;o[s++]=new E(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this.edge.pts[a];return r&&(o[s]=e.coord),new ni(o,new Pe(this.edge._label))},Jn.prototype.add=function(t,e,n){var i=new qn(t,e,n),r=this._nodeMap.get(i);return null!==r?r:(this._nodeMap.put(i,i),i)},Jn.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();)if(e.next().coord.equals(t))return!0;return!1},Jn.prototype.interfaces_=function(){return[]},Jn.prototype.getClass=function(){return Jn};var Yn=function(){};Yn.prototype.getChainStartIndices=function(t){var e=0,n=new wt;n.add(new R(e));do{var i=this.findChainEnd(t,e);n.add(new R(i)),e=i}while(e<t.length-1);return Yn.toIntArray(n)},Yn.prototype.findChainEnd=function(t,e){for(var n=ke.quadrant(t[e],t[e+1]),i=e+1;i<t.length;){if(ke.quadrant(t[i-1],t[i])!==n)break;i++}return i-1},Yn.prototype.interfaces_=function(){return[]},Yn.prototype.getClass=function(){return Yn},Yn.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var $n=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new Z,this.env2=new Z;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new Yn;this.startIndex=e.getChainStartIndices(this.pts)};$n.prototype.getCoordinates=function(){return this.pts},$n.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e>n?e:n},$n.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e<n?e:n},$n.prototype.computeIntersectsForChain=function(){if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[n],e.startIndex[n+1],i)}else if(6===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3],l=arguments[4],c=arguments[5],u=this.pts[r],h=this.pts[o],d=s.pts[a],A=s.pts[l];if(o-r==1&&l-a==1)return c.addIntersections(this.e,r,s.e,a),null;if(this.env1.init(u,h),this.env2.init(d,A),!this.env1.intersects(this.env2))return null;var p=Math.trunc((r+o)/2),f=Math.trunc((a+l)/2);r<p&&(a<f&&this.computeIntersectsForChain(r,p,s,a,f,c),f<l&&this.computeIntersectsForChain(r,p,s,f,l,c)),p<o&&(a<f&&this.computeIntersectsForChain(p,o,s,a,f,c),f<l&&this.computeIntersectsForChain(p,o,s,f,l,c))}},$n.prototype.getStartIndexes=function(){return this.startIndex},$n.prototype.computeIntersects=function(t,e){for(var n=0;n<this.startIndex.length-1;n++)for(var i=0;i<t.startIndex.length-1;i++)this.computeIntersectsForChain(n,t,i,e)},$n.prototype.interfaces_=function(){return[]},$n.prototype.getClass=function(){return $n};var ti=function t(){this._depth=Array(2).fill().map((function(){return Array(3)}));for(var e=0;e<2;e++)for(var n=0;n<3;n++)this._depth[e][n]=t.NULL_VALUE},ei={NULL_VALUE:{configurable:!0}};ti.prototype.getDepth=function(t,e){return this._depth[t][e]},ti.prototype.setDepth=function(t,e,n){this._depth[t][e]=n},ti.prototype.isNull=function(){if(0===arguments.length){for(var t=0;t<2;t++)for(var e=0;e<3;e++)if(this._depth[t][e]!==ti.NULL_VALUE)return!1;return!0}if(1===arguments.length){var n=arguments[0];return this._depth[n][1]===ti.NULL_VALUE}if(2===arguments.length){var i=arguments[0],r=arguments[1];return this._depth[i][r]===ti.NULL_VALUE}},ti.prototype.normalize=function(){for(var t=0;t<2;t++)if(!this.isNull(t)){var e=this._depth[t][1];this._depth[t][2]<e&&(e=this._depth[t][2]),e<0&&(e=0);for(var n=1;n<3;n++){var i=0;this._depth[t][n]>e&&(i=1),this._depth[t][n]=i}}},ti.prototype.getDelta=function(t){return this._depth[t][Ce.RIGHT]-this._depth[t][Ce.LEFT]},ti.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?M.EXTERIOR:M.INTERIOR},ti.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},ti.prototype.add=function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<2;e++)for(var n=1;n<3;n++){var i=t.getLocation(e,n);i!==M.EXTERIOR&&i!==M.INTERIOR||(this.isNull(e,n)?this._depth[e][n]=ti.depthAtLocation(i):this._depth[e][n]+=ti.depthAtLocation(i))}else if(3===arguments.length){var r=arguments[0],o=arguments[1];arguments[2]===M.INTERIOR&&this._depth[r][o]++}},ti.prototype.interfaces_=function(){return[]},ti.prototype.getClass=function(){return ti},ti.depthAtLocation=function(t){return t===M.EXTERIOR?0:t===M.INTERIOR?1:ti.NULL_VALUE},ei.NULL_VALUE.get=function(){return-1},Object.defineProperties(ti,ei);var ni=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new Jn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new ti,this._depthDelta=0,1===arguments.length){var n=arguments[0];e.call(this,n,null)}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.pts=i,this._label=r}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var t=new Array(2).fill(null);return t[0]=this.pts[0],t[1]=this.pts[1],new e(t,Pe.toLineLabel(this._label))},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(t){this._isIsolated=t},e.prototype.setName=function(t){this._name=t},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;if(this.pts.length!==n.pts.length)return!1;for(var i=!0,r=!0,o=this.pts.length,s=0;s<this.pts.length;s++)if(this.pts[s].equals2D(n.pts[s])||(i=!1),this.pts[s].equals2D(n.pts[--o])||(r=!1),!i&&!r)return!1;return!0},e.prototype.getCoordinate=function(){if(0===arguments.length)return this.pts.length>0?this.pts[0]:null;if(1===arguments.length){var t=arguments[0];return this.pts[t]}},e.prototype.print=function(t){t.print("edge "+this._name+": "),t.print("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.print(","),t.print(this.pts[e].x+" "+this.pts[e].y);t.print(") "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(t){e.updateIM(this._label,t)},e.prototype.isCollapsed=function(){return!!this._label.isArea()&&3===this.pts.length&&!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(t){t.print("edge "+this._name+": ");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+" ");t.println("")},e.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new $n(this)),this._mce},e.prototype.getEnvelope=function(){if(null===this._env){this._env=new Z;for(var t=0;t<this.pts.length;t++)this._env.expandToInclude(this.pts[t])}return this._env},e.prototype.addIntersection=function(t,e,n,i){var r=new E(t.getIntersection(i)),o=e,s=t.getEdgeDistance(n,i),a=o+1;if(a<this.pts.length){var l=this.pts[a];r.equals2D(l)&&(o=a,s=0)}this.eiList.add(r,o,s)},e.prototype.toString=function(){var t=new F;t.append("edge "+this._name+": "),t.append("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.append(","),t.append(this.pts[e].x+" "+this.pts[e].y);return t.append(") "+this._label+" "+this._depthDelta),t.toString()},e.prototype.isPointwiseEqual=function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;e<this.pts.length;e++)if(!this.pts[e].equals2D(t.pts[e]))return!1;return!0},e.prototype.setDepthDelta=function(t){this._depthDelta=t},e.prototype.getEdgeIntersectionList=function(){return this.eiList},e.prototype.addIntersections=function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++)this.addIntersection(t,e,n,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.updateIM=function(){if(2!==arguments.length)return t.prototype.updateIM.apply(this,arguments);var e=arguments[0],n=arguments[1];n.setAtLeastIfValid(e.getLocation(0,Ce.ON),e.getLocation(1,Ce.ON),1),e.isArea()&&(n.setAtLeastIfValid(e.getLocation(0,Ce.LEFT),e.getLocation(1,Ce.LEFT),2),n.setAtLeastIfValid(e.getLocation(0,Ce.RIGHT),e.getLocation(1,Ce.RIGHT),2))},e}(Oe),ii=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Wn,this._bufParams=t||null};ii.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},ii.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Pe(t.getLabel())).flip(),n.merge(i);var r=ii.depthDelta(i),o=e.getDepthDelta()+r;e.setDepthDelta(o)}else this._edgeList.add(t),t.setDepthDelta(ii.depthDelta(t.getLabel()))},ii.prototype.buildSubgraphs=function(t,e){for(var n=new wt,i=t.iterator();i.hasNext();){var r=i.next(),o=r.getRightmostCoordinate(),s=new Dn(n).getDepth(o);r.computeDepth(s),r.findResultEdges(),n.add(r),e.add(r.getDirectedEdges(),r.getNodes())}},ii.prototype.createSubgraphs=function(t){for(var e=new wt,n=t.getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isVisited()){var r=new Ie;r.create(i),e.add(r)}}return $e.sort(e,$e.reverseOrder()),e},ii.prototype.createEmptyResultGeometry=function(){return this._geomFact.createPolygon()},ii.prototype.getNoder=function(t){if(null!==this._workingNoder)return this._workingNoder;var e=new bn,n=new rt;return n.setPrecisionModel(t),e.setSegmentIntersector(new Kn(n)),e},ii.prototype.buffer=function(t,e){var n=this._workingPrecisionModel;null===n&&(n=t.getPrecisionModel()),this._geomFact=t.getFactory();var i=new Rn(n,this._bufParams),r=new kn(t,e,i).getCurves();if(r.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(r,n),this._graph=new Ve(new jn),this._graph.addEdges(this._edgeList.getEdges());var o=this.createSubgraphs(this._graph),s=new je(this._geomFact);this.buildSubgraphs(o,s);var a=s.getPolygons();return a.size()<=0?this.createEmptyResultGeometry():this._geomFact.buildGeometry(a)},ii.prototype.computeNodedEdges=function(t,e){var n=this.getNoder(e);n.computeNodes(t);for(var i=n.getNodedSubstrings().iterator();i.hasNext();){var r=i.next(),o=r.getCoordinates();if(2!==o.length||!o[0].equals2D(o[1])){var s=r.getData(),a=new ni(r.getCoordinates(),new Pe(s));this.insertUniqueEdge(a)}}},ii.prototype.setNoder=function(t){this._workingNoder=t},ii.prototype.interfaces_=function(){return[]},ii.prototype.getClass=function(){return ii},ii.depthDelta=function(t){var e=t.getLocation(0,Ce.LEFT),n=t.getLocation(0,Ce.RIGHT);return e===M.INTERIOR&&n===M.EXTERIOR?1:e===M.EXTERIOR&&n===M.INTERIOR?-1:0},ii.convertSegStrings=function(t){for(var e=new me,n=new wt;t.hasNext();){var i=t.next(),r=e.createLineString(i.getCoordinates());n.add(r)}return e.buildGeometry(n)};var ri=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,2===arguments.length){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(4===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],o=arguments[3];this._noder=n,this._scaleFactor=i,this._offsetX=r,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};ri.prototype.rescale=function(){if(I(arguments[0],vt))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.rescale(e.getCoordinates())}else if(arguments[0]instanceof Array){for(var n=arguments[0],i=0;i<n.length;i++)n[i].x=n[i].x/this._scaleFactor+this._offsetX,n[i].y=n[i].y/this._scaleFactor+this._offsetY;2===n.length&&n[0].equals2D(n[1])&&V.out.println(n)}},ri.prototype.scale=function(){if(I(arguments[0],vt)){for(var t=arguments[0],e=new wt,n=t.iterator();n.hasNext();){var i=n.next();e.add(new pn(this.scale(i.getCoordinates()),i.getData()))}return e}if(arguments[0]instanceof Array){for(var r=arguments[0],o=new Array(r.length).fill(null),s=0;s<r.length;s++)o[s]=new E(Math.round((r[s].x-this._offsetX)*this._scaleFactor),Math.round((r[s].y-this._offsetY)*this._scaleFactor),r[s].z);return Bt.removeRepeatedPoints(o)}},ri.prototype.isIntegerPrecision=function(){return 1===this._scaleFactor},ri.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},ri.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},ri.prototype.interfaces_=function(){return[vn]},ri.prototype.getClass=function(){return ri};var oi=function(){this._li=new rt,this._segStrings=null;var t=arguments[0];this._segStrings=t},si={fact:{configurable:!0}};oi.prototype.checkEndPtVertexIntersections=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next().getCoordinates();this.checkEndPtVertexIntersections(e[0],this._segStrings),this.checkEndPtVertexIntersections(e[e.length-1],this._segStrings)}else if(2===arguments.length)for(var n=arguments[0],i=arguments[1].iterator();i.hasNext();)for(var r=i.next().getCoordinates(),o=1;o<r.length-1;o++)if(r[o].equals(n))throw new $("found endpt/interior pt intersection at index "+o+" :pt "+n)},oi.prototype.checkInteriorIntersections=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();)for(var e=t.next(),n=this._segStrings.iterator();n.hasNext();){var i=n.next();this.checkInteriorIntersections(e,i)}else if(2===arguments.length)for(var r=arguments[0],o=arguments[1],s=r.getCoordinates(),a=o.getCoordinates(),l=0;l<s.length-1;l++)for(var c=0;c<a.length-1;c++)this.checkInteriorIntersections(r,l,o,c);else if(4===arguments.length){var u=arguments[0],h=arguments[1],d=arguments[2],A=arguments[3];if(u===d&&h===A)return null;var p=u.getCoordinates()[h],f=u.getCoordinates()[h+1],g=d.getCoordinates()[A],m=d.getCoordinates()[A+1];if(this._li.computeIntersection(p,f,g,m),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,p,f)||this.hasInteriorIntersection(this._li,g,m)))throw new $("found non-noded intersection at "+p+"-"+f+" and "+g+"-"+m)}},oi.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},oi.prototype.checkCollapses=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next();this.checkCollapses(e)}else if(1===arguments.length)for(var n=arguments[0].getCoordinates(),i=0;i<n.length-2;i++)this.checkCollapse(n[i],n[i+1],n[i+2])},oi.prototype.hasInteriorIntersection=function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++){var r=t.getIntersection(i);if(!r.equals(e)&&!r.equals(n))return!0}return!1},oi.prototype.checkCollapse=function(t,e,n){if(t.equals(n))throw new $("found non-noded collapse at "+oi.fact.createLineString([t,e,n]))},oi.prototype.interfaces_=function(){return[]},oi.prototype.getClass=function(){return oi},si.fact.get=function(){return new me},Object.defineProperties(oi,si);var ai=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=n,e<=0)throw new _("Scale factor must be non-zero");1!==e&&(this._pt=new E(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new E,this._p1Scaled=new E),this.initCorners(this._pt)},li={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};ai.prototype.intersectsScaled=function(t,e){var n=Math.min(t.x,e.x),i=Math.max(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.y,e.y),s=this._maxx<n||this._minx>i||this._maxy<r||this._miny>o;if(s)return!1;var a=this.intersectsToleranceSquare(t,e);return et.isTrue(!(s&&a),"Found bad envelope test"),a},ai.prototype.initCorners=function(t){this._minx=t.x-.5,this._maxx=t.x+.5,this._miny=t.y-.5,this._maxy=t.y+.5,this._corner[0]=new E(this._maxx,this._maxy),this._corner[1]=new E(this._minx,this._maxy),this._corner[2]=new E(this._minx,this._miny),this._corner[3]=new E(this._maxx,this._miny)},ai.prototype.intersects=function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},ai.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},ai.prototype.getCoordinate=function(){return this._originalPt},ai.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},ai.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var t=ai.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Z(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},ai.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},ai.prototype.intersectsToleranceSquare=function(t,e){var n=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!n||!i)||!!t.equals(this._pt)||!!e.equals(this._pt))))},ai.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),i=t.getCoordinate(e+1);return!!this.intersects(n,i)&&(t.addIntersection(this.getCoordinate(),e),!0)},ai.prototype.interfaces_=function(){return[]},ai.prototype.getClass=function(){return ai},li.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(ai,li);var ci=function(){this.tempEnv1=new Z,this.selectedSegment=new fn};ci.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}},ci.prototype.interfaces_=function(){return[]},ci.prototype.getClass=function(){return ci};var ui=function(){this._index=null;var t=arguments[0];this._index=t},hi={HotPixelSnapAction:{configurable:!0}};ui.prototype.snap=function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2],r=e.getSafeEnvelope(),o=new di(e,n,i);return this._index.query(r,{interfaces_:function(){return[Ke]},visitItem:function(t){t.select(r,o)}}),o.isNodeAdded()}},ui.prototype.interfaces_=function(){return[]},ui.prototype.getClass=function(){return ui},hi.HotPixelSnapAction.get=function(){return di},Object.defineProperties(ui,hi);var di=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(2!==arguments.length)return t.prototype.select.apply(this,arguments);var e=arguments[0],n=arguments[1],i=e.getContext();if(null!==this._parentEdge&&i===this._parentEdge&&n===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(i,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(ci),Ai=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new wt};Ai.prototype.processIntersections=function(t,e,n,i){if(t===n&&e===i)return null;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];if(this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var l=0;l<this._li.getIntersectionNum();l++)this._interiorIntersections.add(this._li.getIntersection(l));t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)}},Ai.prototype.isDone=function(){return!1},Ai.prototype.getInteriorIntersections=function(){return this._interiorIntersections},Ai.prototype.interfaces_=function(){return[Xn]},Ai.prototype.getClass=function(){return Ai};var pi=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new rt,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};pi.prototype.checkCorrectness=function(t){var e=pn.getNodedSubstrings(t),n=new oi(e);try{n.checkValid()}catch(t){if(!(t instanceof G))throw t;t.printStackTrace()}},pi.prototype.getNodedSubstrings=function(){return pn.getNodedSubstrings(this._nodedSegStrings)},pi.prototype.snapRound=function(t,e){var n=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(n),this.computeVertexSnaps(t)},pi.prototype.findInteriorIntersections=function(t,e){var n=new Ai(e);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(t),n.getInteriorIntersections()},pi.prototype.computeVertexSnaps=function(){if(I(arguments[0],vt))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.computeVertexSnaps(e)}else if(arguments[0]instanceof pn)for(var n=arguments[0],i=n.getCoordinates(),r=0;r<i.length;r++){var o=new ai(i[r],this._scaleFactor,this._li);this._pointSnapper.snap(o,n,r)&&n.addIntersection(i[r],r)}},pi.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new bn,this._pointSnapper=new ui(this._noder.getIndex()),this.snapRound(t,this._li)},pi.prototype.computeIntersectionSnaps=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),i=new ai(n,this._scaleFactor,this._li);this._pointSnapper.snap(i)}},pi.prototype.interfaces_=function(){return[vn]},pi.prototype.getClass=function(){return pi};var fi=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new En,this._resultGeometry=null,this._saveException=null,1===arguments.length){var t=arguments[0];this._argGeom=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._argGeom=e,this._bufParams=n}},gi={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};fi.prototype.bufferFixedPrecision=function(t){var e=new ri(new pi(new Ae(1)),t.getScale()),n=new ii(this._bufParams);n.setWorkingPrecisionModel(t),n.setNoder(e),this._resultGeometry=n.buffer(this._argGeom,this._distance)},fi.prototype.bufferReducedPrecision=function(){var t=this;if(0===arguments.length){for(var e=fi.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(e){if(!(e instanceof Me))throw e;t._saveException=e}if(null!==t._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],i=fi.precisionScaleFactor(this._argGeom,this._distance,n),r=new Ae(i);this.bufferFixedPrecision(r)}},fi.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===Ae.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},fi.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},fi.prototype.bufferOriginalPrecision=function(){try{var t=new ii(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof $))throw t;this._saveException=t}},fi.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},fi.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},fi.prototype.interfaces_=function(){return[]},fi.prototype.getClass=function(){return fi},fi.bufferOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new fi(t).getResultGeometry(e)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof ut&&"number"==typeof arguments[1]){var n=arguments[0],i=arguments[1],r=arguments[2],o=new fi(n);return o.setQuadrantSegments(r),o.getResultGeometry(i)}if(arguments[2]instanceof En&&arguments[0]instanceof ut&&"number"==typeof arguments[1]){var s=arguments[0],a=arguments[1],l=arguments[2];return new fi(s,l).getResultGeometry(a)}}else if(4===arguments.length){var c=arguments[0],u=arguments[1],h=arguments[2],d=arguments[3],A=new fi(c);return A.setQuadrantSegments(h),A.setEndCapStyle(d),A.getResultGeometry(u)}},fi.precisionScaleFactor=function(t,e,n){var i=t.getEnvelopeInternal(),r=L.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY()))+2*(e>0?e:0),o=n-Math.trunc(Math.log(r)/Math.log(10)+1);return Math.pow(10,o)},gi.CAP_ROUND.get=function(){return En.CAP_ROUND},gi.CAP_BUTT.get=function(){return En.CAP_FLAT},gi.CAP_FLAT.get=function(){return En.CAP_FLAT},gi.CAP_SQUARE.get=function(){return En.CAP_SQUARE},gi.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(fi,gi);var mi=function(){this._pt=[new E,new E],this._distance=y.NaN,this._isNull=!0};mi.prototype.getCoordinates=function(){return this._pt},mi.prototype.getCoordinate=function(t){return this._pt[t]},mi.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},mi.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=r,this._isNull=!1}},mi.prototype.getDistance=function(){return this._distance},mi.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},mi.prototype.interfaces_=function(){return[]},mi.prototype.getClass=function(){return mi};var _i=function(){};_i.prototype.interfaces_=function(){return[]},_i.prototype.getClass=function(){return _i},_i.computeDistance=function(){if(arguments[2]instanceof mi&&arguments[0]instanceof Kt&&arguments[1]instanceof E)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=t.getCoordinates(),r=new fn,o=0;o<i.length-1;o++){r.setCoordinates(i[o],i[o+1]);var s=r.closestPoint(e);n.setMinimum(s,e)}else if(arguments[2]instanceof mi&&arguments[0]instanceof $t&&arguments[1]instanceof E){var a=arguments[0],l=arguments[1],c=arguments[2];_i.computeDistance(a.getExteriorRing(),l,c);for(var u=0;u<a.getNumInteriorRing();u++)_i.computeDistance(a.getInteriorRingN(u),l,c)}else if(arguments[2]instanceof mi&&arguments[0]instanceof ut&&arguments[1]instanceof E){var h=arguments[0],d=arguments[1],A=arguments[2];if(h instanceof Kt)_i.computeDistance(h,d,A);else if(h instanceof $t)_i.computeDistance(h,d,A);else if(h instanceof Gt)for(var p=h,f=0;f<p.getNumGeometries();f++){var g=p.getGeometryN(f);_i.computeDistance(g,d,A)}else A.setMinimum(h.getCoordinate(),d)}else if(arguments[2]instanceof mi&&arguments[0]instanceof fn&&arguments[1]instanceof E){var m=arguments[0],_=arguments[1],y=arguments[2],v=m.closestPoint(_);y.setMinimum(v,_)}};var yi=function(t){this._maxPtDist=new mi,this._inputGeom=t||null},vi={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};yi.prototype.computeMaxMidpointDistance=function(t){var e=new bi(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},yi.prototype.computeMaxVertexDistance=function(t){var e=new xi(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},yi.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},yi.prototype.getDistancePoints=function(){return this._maxPtDist},yi.prototype.interfaces_=function(){return[]},yi.prototype.getClass=function(){return yi},vi.MaxPointDistanceFilter.get=function(){return xi},vi.MaxMidpointDistanceFilter.get=function(){return bi},Object.defineProperties(yi,vi);var xi=function(t){this._maxPtDist=new mi,this._minPtDist=new mi,this._geom=t||null};xi.prototype.filter=function(t){this._minPtDist.initialize(),_i.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},xi.prototype.getMaxPointDistance=function(){return this._maxPtDist},xi.prototype.interfaces_=function(){return[At]},xi.prototype.getClass=function(){return xi};var bi=function(t){this._maxPtDist=new mi,this._minPtDist=new mi,this._geom=t||null};bi.prototype.filter=function(t,e){if(0===e)return null;var n=t.getCoordinate(e-1),i=t.getCoordinate(e),r=new E((n.x+i.x)/2,(n.y+i.y)/2);this._minPtDist.initialize(),_i.computeDistance(this._geom,r,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},bi.prototype.isDone=function(){return!1},bi.prototype.isGeometryChanged=function(){return!1},bi.prototype.getMaxPointDistance=function(){return this._maxPtDist},bi.prototype.interfaces_=function(){return[Qt]},bi.prototype.getClass=function(){return bi};var wi=function(t){this._comps=t||null};wi.prototype.filter=function(t){t instanceof $t&&this._comps.add(t)},wi.prototype.interfaces_=function(){return[zt]},wi.prototype.getClass=function(){return wi},wi.getPolygons=function(){if(1===arguments.length){var t=arguments[0];return wi.getPolygons(t,new wt)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof $t?n.add(e):e instanceof Gt&&e.apply(new wi(n)),n}};var Ei=function(){if(this._lines=null,this._isForcedToLineString=!1,1===arguments.length){var t=arguments[0];this._lines=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._lines=e,this._isForcedToLineString=n}};Ei.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof ee){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof Kt&&this._lines.add(t)},Ei.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},Ei.prototype.interfaces_=function(){return[ct]},Ei.prototype.getClass=function(){return Ei},Ei.getGeometry=function(){if(1===arguments.length){var t=arguments[0];return t.getFactory().buildGeometry(Ei.getLines(t))}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().buildGeometry(Ei.getLines(e,n))}},Ei.getLines=function(){if(1===arguments.length){var t=arguments[0];return Ei.getLines(t,!1)}if(2===arguments.length){if(I(arguments[0],vt)&&I(arguments[1],vt)){for(var e=arguments[0],n=arguments[1],i=e.iterator();i.hasNext();){var r=i.next();Ei.getLines(r,n)}return n}if(arguments[0]instanceof ut&&"boolean"==typeof arguments[1]){var o=arguments[0],s=arguments[1],a=new wt;return o.apply(new Ei(a,s)),a}if(arguments[0]instanceof ut&&I(arguments[1],vt)){var l=arguments[0],c=arguments[1];return l instanceof Kt?c.add(l):l.apply(new Ei(c)),c}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&I(arguments[0],vt)&&I(arguments[1],vt)){for(var u=arguments[0],h=arguments[1],d=arguments[2],A=u.iterator();A.hasNext();){var p=A.next();Ei.getLines(p,h,d)}return h}if("boolean"==typeof arguments[2]&&arguments[0]instanceof ut&&I(arguments[1],vt)){var f=arguments[0],g=arguments[1],m=arguments[2];return f.apply(new Ei(g,m)),g}}};var Ci=function(){if(this._boundaryRule=pt.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];if(null===t)throw new _("Rule must be non-null");this._boundaryRule=t}};Ci.prototype.locateInternal=function(){if(arguments[0]instanceof E&&arguments[1]instanceof $t){var t=arguments[0],e=arguments[1];if(e.isEmpty())return M.EXTERIOR;var n=e.getExteriorRing(),i=this.locateInPolygonRing(t,n);if(i===M.EXTERIOR)return M.EXTERIOR;if(i===M.BOUNDARY)return M.BOUNDARY;for(var r=0;r<e.getNumInteriorRing();r++){var o=e.getInteriorRingN(r),s=this.locateInPolygonRing(t,o);if(s===M.INTERIOR)return M.EXTERIOR;if(s===M.BOUNDARY)return M.BOUNDARY}return M.INTERIOR}if(arguments[0]instanceof E&&arguments[1]instanceof Kt){var a=arguments[0],l=arguments[1];if(!l.getEnvelopeInternal().intersects(a))return M.EXTERIOR;var c=l.getCoordinates();return l.isClosed()||!a.equals(c[0])&&!a.equals(c[c.length-1])?at.isOnLine(a,c)?M.INTERIOR:M.EXTERIOR:M.BOUNDARY}if(arguments[0]instanceof E&&arguments[1]instanceof Jt){var u=arguments[0];return arguments[1].getCoordinate().equals2D(u)?M.INTERIOR:M.EXTERIOR}},Ci.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?at.locatePointInRing(t,e.getCoordinates()):M.EXTERIOR},Ci.prototype.intersects=function(t,e){return this.locate(t,e)!==M.EXTERIOR},Ci.prototype.updateLocationInfo=function(t){t===M.INTERIOR&&(this._isIn=!0),t===M.BOUNDARY&&this._numBoundaries++},Ci.prototype.computeLocation=function(t,e){if(e instanceof Jt&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof Kt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof $t)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Ht)for(var n=e,i=0;i<n.getNumGeometries();i++){var r=n.getGeometryN(i);this.updateLocationInfo(this.locateInternal(t,r))}else if(e instanceof ne)for(var o=e,s=0;s<o.getNumGeometries();s++){var a=o.getGeometryN(s);this.updateLocationInfo(this.locateInternal(t,a))}else if(e instanceof Gt)for(var l=new Qn(e);l.hasNext();){var c=l.next();c!==e&&this.computeLocation(t,c)}},Ci.prototype.locate=function(t,e){return e.isEmpty()?M.EXTERIOR:e instanceof Kt||e instanceof $t?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?M.BOUNDARY:this._numBoundaries>0||this._isIn?M.INTERIOR:M.EXTERIOR)},Ci.prototype.interfaces_=function(){return[]},Ci.prototype.getClass=function(){return Ci};var Bi=function t(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length){var e=arguments[0],n=arguments[1];t.call(this,e,t.INSIDE_AREA,n)}else if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];this._component=i,this._segIndex=r,this._pt=o}},Si={INSIDE_AREA:{configurable:!0}};Bi.prototype.isInsideArea=function(){return this._segIndex===Bi.INSIDE_AREA},Bi.prototype.getCoordinate=function(){return this._pt},Bi.prototype.getGeometryComponent=function(){return this._component},Bi.prototype.getSegmentIndex=function(){return this._segIndex},Bi.prototype.interfaces_=function(){return[]},Bi.prototype.getClass=function(){return Bi},Si.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Bi,Si);var Mi=function(t){this._pts=t||null};Mi.prototype.filter=function(t){t instanceof Jt&&this._pts.add(t)},Mi.prototype.interfaces_=function(){return[zt]},Mi.prototype.getClass=function(){return Mi},Mi.getPoints=function(){if(1===arguments.length){var t=arguments[0];return t instanceof Jt?$e.singletonList(t):Mi.getPoints(t,new wt)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Jt?n.add(e):e instanceof Gt&&e.apply(new Mi(n)),n}};var Ti=function(){this._locations=null;var t=arguments[0];this._locations=t};Ti.prototype.filter=function(t){(t instanceof Jt||t instanceof Kt||t instanceof $t)&&this._locations.add(new Bi(t,0,t.getCoordinate()))},Ti.prototype.interfaces_=function(){return[zt]},Ti.prototype.getClass=function(){return Ti},Ti.getLocations=function(t){var e=new wt;return t.apply(new Ti(e)),e};var Ii=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Ci,this._minDistanceLocation=null,this._minDistance=y.MAX_VALUE,2===arguments.length){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=i,this._terminateDistance=r}};Ii.prototype.computeContainmentDistance=function(){if(0===arguments.length){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=1-e,r=wi.getPolygons(this._geom[e]);if(r.size()>0){var o=Ti.getLocations(this._geom[i]);if(this.computeContainmentDistance(o,r,n),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[i]=n[0],this._minDistanceLocation[e]=n[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&I(arguments[0],bt)&&I(arguments[1],bt)){for(var s=arguments[0],a=arguments[1],l=arguments[2],c=0;c<s.size();c++)for(var u=s.get(c),h=0;h<a.size();h++)if(this.computeContainmentDistance(u,a.get(h),l),this._minDistance<=this._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Bi&&arguments[1]instanceof $t){var d=arguments[0],A=arguments[1],p=arguments[2],f=d.getCoordinate();if(M.EXTERIOR!==this._ptLocator.locate(f,A))return this._minDistance=0,p[0]=d,p[1]=new Bi(A,f),null}},Ii.prototype.computeMinDistanceLinesPoints=function(t,e,n){for(var i=0;i<t.size();i++)for(var r=t.get(i),o=0;o<e.size();o++){var s=e.get(o);if(this.computeMinDistance(r,s,n),this._minDistance<=this._terminateDistance)return null}},Ii.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=Ei.getLines(this._geom[0]),n=Ei.getLines(this._geom[1]),i=Mi.getPoints(this._geom[0]),r=Mi.getPoints(this._geom[1]);return this.computeMinDistanceLines(e,n,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,r,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(n,i,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistancePoints(i,r,t),void this.updateMinDistance(t,!1))))},Ii.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},Ii.prototype.updateMinDistance=function(t,e){if(null===t[0])return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},Ii.prototype.nearestPoints=function(){return this.computeMinDistance(),[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()]},Ii.prototype.computeMinDistance=function(){if(0===arguments.length){if(null!==this._minDistanceLocation)return null;if(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance)return null;this.computeFacetDistance()}else if(3===arguments.length)if(arguments[2]instanceof Array&&arguments[0]instanceof Kt&&arguments[1]instanceof Jt){var t=arguments[0],e=arguments[1],n=arguments[2];if(t.getEnvelopeInternal().distance(e.getEnvelopeInternal())>this._minDistance)return null;for(var i=t.getCoordinates(),r=e.getCoordinate(),o=0;o<i.length-1;o++){var s=at.distancePointLine(r,i[o],i[o+1]);if(s<this._minDistance){this._minDistance=s;var a=new fn(i[o],i[o+1]).closestPoint(r);n[0]=new Bi(t,o,a),n[1]=new Bi(e,0,r)}if(this._minDistance<=this._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof Kt&&arguments[1]instanceof Kt){var l=arguments[0],c=arguments[1],u=arguments[2];if(l.getEnvelopeInternal().distance(c.getEnvelopeInternal())>this._minDistance)return null;for(var h=l.getCoordinates(),d=c.getCoordinates(),A=0;A<h.length-1;A++)for(var p=0;p<d.length-1;p++){var f=at.distanceLineLine(h[A],h[A+1],d[p],d[p+1]);if(f<this._minDistance){this._minDistance=f;var g=new fn(h[A],h[A+1]),m=new fn(d[p],d[p+1]),_=g.closestPoints(m);u[0]=new Bi(l,A,_[0]),u[1]=new Bi(c,p,_[1])}if(this._minDistance<=this._terminateDistance)return null}}},Ii.prototype.computeMinDistancePoints=function(t,e,n){for(var i=0;i<t.size();i++)for(var r=t.get(i),o=0;o<e.size();o++){var s=e.get(o),a=r.getCoordinate().distance(s.getCoordinate());if(a<this._minDistance&&(this._minDistance=a,n[0]=new Bi(r,0,r.getCoordinate()),n[1]=new Bi(s,0,s.getCoordinate())),this._minDistance<=this._terminateDistance)return null}},Ii.prototype.distance=function(){if(null===this._geom[0]||null===this._geom[1])throw new _("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},Ii.prototype.computeMinDistanceLines=function(t,e,n){for(var i=0;i<t.size();i++)for(var r=t.get(i),o=0;o<e.size();o++){var s=e.get(o);if(this.computeMinDistance(r,s,n),this._minDistance<=this._terminateDistance)return null}},Ii.prototype.interfaces_=function(){return[]},Ii.prototype.getClass=function(){return Ii},Ii.distance=function(t,e){return new Ii(t,e).distance()},Ii.isWithinDistance=function(t,e,n){return new Ii(t,e,n).distance()<=n},Ii.nearestPoints=function(t,e){return new Ii(t,e).nearestPoints()};var Li=function(){this._pt=[new E,new E],this._distance=y.NaN,this._isNull=!0};Li.prototype.getCoordinates=function(){return this._pt},Li.prototype.getCoordinate=function(t){return this._pt[t]},Li.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},Li.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=r,this._isNull=!1}},Li.prototype.toString=function(){return Y.toLineString(this._pt[0],this._pt[1])},Li.prototype.getDistance=function(){return this._distance},Li.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},Li.prototype.interfaces_=function(){return[]},Li.prototype.getClass=function(){return Li};var Pi=function(){};Pi.prototype.interfaces_=function(){return[]},Pi.prototype.getClass=function(){return Pi},Pi.computeDistance=function(){if(arguments[2]instanceof Li&&arguments[0]instanceof Kt&&arguments[1]instanceof E)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=new fn,r=t.getCoordinates(),o=0;o<r.length-1;o++){i.setCoordinates(r[o],r[o+1]);var s=i.closestPoint(e);n.setMinimum(s,e)}else if(arguments[2]instanceof Li&&arguments[0]instanceof $t&&arguments[1]instanceof E){var a=arguments[0],l=arguments[1],c=arguments[2];Pi.computeDistance(a.getExteriorRing(),l,c);for(var u=0;u<a.getNumInteriorRing();u++)Pi.computeDistance(a.getInteriorRingN(u),l,c)}else if(arguments[2]instanceof Li&&arguments[0]instanceof ut&&arguments[1]instanceof E){var h=arguments[0],d=arguments[1],A=arguments[2];if(h instanceof Kt)Pi.computeDistance(h,d,A);else if(h instanceof $t)Pi.computeDistance(h,d,A);else if(h instanceof Gt)for(var p=h,f=0;f<p.getNumGeometries();f++){var g=p.getGeometryN(f);Pi.computeDistance(g,d,A)}else A.setMinimum(h.getCoordinate(),d)}else if(arguments[2]instanceof Li&&arguments[0]instanceof fn&&arguments[1]instanceof E){var m=arguments[0],_=arguments[1],y=arguments[2],v=m.closestPoint(_);y.setMinimum(v,_)}};var Fi=function(){this._g0=null,this._g1=null,this._ptDist=new Li,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},Ri={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};Fi.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},Fi.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new _("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},Fi.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},Fi.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Fi.prototype.computeOrientedDistance=function(t,e,n){var i=new Di(e);if(t.apply(i),n.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var r=new Oi(e,this._densifyFrac);t.apply(r),n.setMaximum(r.getMaxPointDistance())}},Fi.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Fi.prototype.interfaces_=function(){return[]},Fi.prototype.getClass=function(){return Fi},Fi.distance=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new Fi(t,e).distance()}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],o=new Fi(n,i);return o.setDensifyFraction(r),o.distance()}},Ri.MaxPointDistanceFilter.get=function(){return Di},Ri.MaxDensifiedByFractionDistanceFilter.get=function(){return Oi},Object.defineProperties(Fi,Ri);var Di=function(){this._maxPtDist=new Li,this._minPtDist=new Li,this._euclideanDist=new Pi,this._geom=null;var t=arguments[0];this._geom=t};Di.prototype.filter=function(t){this._minPtDist.initialize(),Pi.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Di.prototype.getMaxPointDistance=function(){return this._maxPtDist},Di.prototype.interfaces_=function(){return[At]},Di.prototype.getClass=function(){return Di};var Oi=function(){this._maxPtDist=new Li,this._minPtDist=new Li,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};Oi.prototype.filter=function(t,e){if(0===e)return null;for(var n=t.getCoordinate(e-1),i=t.getCoordinate(e),r=(i.x-n.x)/this._numSubSegs,o=(i.y-n.y)/this._numSubSegs,s=0;s<this._numSubSegs;s++){var a=n.x+s*r,l=n.y+s*o,c=new E(a,l);this._minPtDist.initialize(),Pi.computeDistance(this._geom,c,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)}},Oi.prototype.isDone=function(){return!1},Oi.prototype.isGeometryChanged=function(){return!1},Oi.prototype.getMaxPointDistance=function(){return this._maxPtDist},Oi.prototype.interfaces_=function(){return[Qt]},Oi.prototype.getClass=function(){return Oi};var Ui=function(t,e,n){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=n||null},Ni={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Ui.prototype.checkMaximumDistance=function(t,e,n){var i=new Fi(e,t);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var r=i.getCoordinates();this._errorLocation=r[1],this._errorIndicator=t.getFactory().createLineString(r),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Y.toLineString(r[0],r[1])+")"}},Ui.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Ui.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Ui.VERBOSE&&V.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Ui.prototype.checkNegativeValid=function(){if(!(this._input instanceof $t||this._input instanceof ne||this._input instanceof Gt))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Ui.prototype.getErrorIndicator=function(){return this._errorIndicator},Ui.prototype.checkMinimumDistance=function(t,e,n){var i=new Ii(t,e,n);if(this._minDistanceFound=i.distance(),this._minDistanceFound<n){this._isValid=!1;var r=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(r),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+Y.toLineString(r[0],r[1])+" )"}},Ui.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Ui.prototype.getErrorLocation=function(){return this._errorLocation},Ui.prototype.getPolygonLines=function(t){for(var e=new wt,n=new Ei(e),i=wi.getPolygons(t).iterator();i.hasNext();)i.next().apply(n);return t.getFactory().buildGeometry(e)},Ui.prototype.getErrorMessage=function(){return this._errMsg},Ui.prototype.interfaces_=function(){return[]},Ui.prototype.getClass=function(){return Ui},Ni.VERBOSE.get=function(){return!1},Ni.MAX_DISTANCE_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Ui,Ni);var ki=function(t,e,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=n||null},zi={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};ki.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},ki.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*ki.MAX_ENV_DIFF_FRAC;0===t&&(t=.001);var e=new Z(this._input.getEnvelopeInternal());e.expandBy(this._distance);var n=new Z(this._result.getEnvelopeInternal());n.expandBy(t),n.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report("Envelope")},ki.prototype.checkDistance=function(){var t=new Ui(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},ki.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},ki.prototype.checkPolygonal=function(){this._result instanceof $t||this._result instanceof ne||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},ki.prototype.getErrorIndicator=function(){return this._errorIndicator},ki.prototype.getErrorLocation=function(){return this._errorLocation},ki.prototype.checkExpectedEmpty=function(){return this._input.getDimension()>=2||this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},ki.prototype.report=function(t){if(!ki.VERBOSE)return null;V.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},ki.prototype.getErrorMessage=function(){return this._errorMsg},ki.prototype.interfaces_=function(){return[]},ki.prototype.getClass=function(){return ki},ki.isValidMsg=function(t,e,n){var i=new ki(t,e,n);return i.isValid()?null:i.getErrorMessage()},ki.isValid=function(t,e,n){return!!new ki(t,e,n).isValid()},zi.VERBOSE.get=function(){return!1},zi.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(ki,zi);var Qi=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Qi.prototype.getCoordinates=function(){return this._pts},Qi.prototype.size=function(){return this._pts.length},Qi.prototype.getCoordinate=function(t){return this._pts[t]},Qi.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Qi.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:hn.octant(this.getCoordinate(t),this.getCoordinate(t+1))},Qi.prototype.setData=function(t){this._data=t},Qi.prototype.getData=function(){return this._data},Qi.prototype.toString=function(){return Y.toLineString(new le(this._pts))},Qi.prototype.interfaces_=function(){return[dn]},Qi.prototype.getClass=function(){return Qi};var Gi=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new wt,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};Gi.prototype.getInteriorIntersection=function(){return this._interiorIntersection},Gi.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},Gi.prototype.getIntersectionSegments=function(){return this._intSegments},Gi.prototype.count=function(){return this._intersectionCount},Gi.prototype.getIntersections=function(){return this._intersections},Gi.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Gi.prototype.setKeepIntersections=function(t){this._keepIntersections=t},Gi.prototype.processIntersections=function(t,e,n,i){if(!this._findAllIntersections&&this.hasIntersection())return null;if(t===n&&e===i)return null;if(this._isCheckEndSegmentsOnly&&!this.isEndSegment(t,e)&&!this.isEndSegment(n,i))return null;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=r,this._intSegments[1]=o,this._intSegments[2]=s,this._intSegments[3]=a,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},Gi.prototype.isEndSegment=function(t,e){return 0===e||e>=t.size()-2},Gi.prototype.hasIntersection=function(){return null!==this._interiorIntersection},Gi.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},Gi.prototype.interfaces_=function(){return[Xn]},Gi.prototype.getClass=function(){return Gi},Gi.createAllIntersectionsFinder=function(t){var e=new Gi(t);return e.setFindAllIntersections(!0),e},Gi.createAnyIntersectionFinder=function(t){return new Gi(t)},Gi.createIntersectionCounter=function(t){var e=new Gi(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Hi=function(){this._li=new rt,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Hi.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},Hi.prototype.getIntersections=function(){return this._segInt.getIntersections()},Hi.prototype.isValid=function(){return this.execute(),this._isValid},Hi.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Hi.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Gi(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new bn;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Hi.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Me(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Hi.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Y.toLineString(t[0],t[1])+" and "+Y.toLineString(t[2],t[3])},Hi.prototype.interfaces_=function(){return[]},Hi.prototype.getClass=function(){return Hi},Hi.computeIntersections=function(t){var e=new Hi(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Vi=function t(){this._nv=null;var e=arguments[0];this._nv=new Hi(t.toSegmentStrings(e))};Vi.prototype.checkValid=function(){this._nv.checkValid()},Vi.prototype.interfaces_=function(){return[]},Vi.prototype.getClass=function(){return Vi},Vi.toSegmentStrings=function(t){for(var e=new wt,n=t.iterator();n.hasNext();){var i=n.next();e.add(new Qi(i.getCoordinates(),i))}return e},Vi.checkValid=function(t){new Vi(t).checkValid()};var ji=function(t){this._mapOp=t};ji.prototype.map=function(t){for(var e=new wt,n=0;n<t.getNumGeometries();n++){var i=this._mapOp.map(t.getGeometryN(n));i.isEmpty()||e.add(i)}return t.getFactory().createGeometryCollection(me.toGeometryArray(e))},ji.prototype.interfaces_=function(){return[]},ji.prototype.getClass=function(){return ji},ji.map=function(t,e){return new ji(e).map(t)};var Zi=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new wt,this._resultLineList=new wt;var t=arguments[0],e=arguments[1],n=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=n};Zi.prototype.collectLines=function(t){for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next();this.collectLineEdge(n,t,this._lineEdgesList),this.collectBoundaryTouchEdge(n,t,this._lineEdgesList)}},Zi.prototype.labelIsolatedLine=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,n)},Zi.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},Zi.prototype.collectLineEdge=function(t,e,n){var i=t.getLabel(),r=t.getEdge();t.isLineEdge()&&(t.isVisited()||!Br.isResultOfOp(i,e)||r.isCovered()||(n.add(r),t.setVisitedEdge(!0)))},Zi.prototype.findCoveredLineEdges=function(){for(var t=this._op.getGraph().getNodes().iterator();t.hasNext();)t.next().getEdges().findCoveredLineEdges();for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next(),i=n.getEdge();if(n.isLineEdge()&&!i.isCoveredSet()){var r=this._op.isCoveredByA(n.getCoordinate());i.setCovered(r)}}},Zi.prototype.labelIsolatedLines=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),i=n.getLabel();n.isIsolated()&&(i.isNull(0)?this.labelIsolatedLine(n,0):this.labelIsolatedLine(n,1))}},Zi.prototype.buildLines=function(t){for(var e=this._lineEdgesList.iterator();e.hasNext();){var n=e.next(),i=this._geometryFactory.createLineString(n.getCoordinates());this._resultLineList.add(i),n.setInResult(!0)}},Zi.prototype.collectBoundaryTouchEdge=function(t,e,n){var i=t.getLabel();return t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult()?null:(et.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),void(Br.isResultOfOp(i,e)&&e===Br.INTERSECTION&&(n.add(t.getEdge()),t.setVisitedEdge(!0))))},Zi.prototype.interfaces_=function(){return[]},Zi.prototype.getClass=function(){return Zi};var Wi=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new wt;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};Wi.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var n=this._geometryFactory.createPoint(e);this._resultPointList.add(n)}},Wi.prototype.extractNonCoveredResultNodes=function(t){for(var e=this._op.getGraph().getNodes().iterator();e.hasNext();){var n=e.next();if(!n.isInResult()&&!n.isIncidentEdgeInResult()&&(0===n.getEdges().getDegree()||t===Br.INTERSECTION)){var i=n.getLabel();Br.isResultOfOp(i,t)&&this.filterCoveredNodeToPoint(n)}}},Wi.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},Wi.prototype.interfaces_=function(){return[]},Wi.prototype.getClass=function(){return Wi};var Xi=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};Xi.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},Xi.prototype.transformPolygon=function(t,e){var n=!0,i=this.transformLinearRing(t.getExteriorRing(),t);null!==i&&i instanceof ee&&!i.isEmpty()||(n=!1);for(var r=new wt,o=0;o<t.getNumInteriorRing();o++){var s=this.transformLinearRing(t.getInteriorRingN(o),t);null===s||s.isEmpty()||(s instanceof ee||(n=!1),r.add(s))}if(n)return this._factory.createPolygon(i,r.toArray([]));var a=new wt;return null!==i&&a.add(i),a.addAll(r),this._factory.buildGeometry(a)},Xi.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},Xi.prototype.getInputGeometry=function(){return this._inputGeom},Xi.prototype.transformMultiLineString=function(t,e){for(var n=new wt,i=0;i<t.getNumGeometries();i++){var r=this.transformLineString(t.getGeometryN(i),t);null!==r&&(r.isEmpty()||n.add(r))}return this._factory.buildGeometry(n)},Xi.prototype.transformCoordinates=function(t,e){return this.copy(t)},Xi.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},Xi.prototype.transformMultiPoint=function(t,e){for(var n=new wt,i=0;i<t.getNumGeometries();i++){var r=this.transformPoint(t.getGeometryN(i),t);null!==r&&(r.isEmpty()||n.add(r))}return this._factory.buildGeometry(n)},Xi.prototype.transformMultiPolygon=function(t,e){for(var n=new wt,i=0;i<t.getNumGeometries();i++){var r=this.transformPolygon(t.getGeometryN(i),t);null!==r&&(r.isEmpty()||n.add(r))}return this._factory.buildGeometry(n)},Xi.prototype.copy=function(t){return t.copy()},Xi.prototype.transformGeometryCollection=function(t,e){for(var n=new wt,i=0;i<t.getNumGeometries();i++){var r=this.transform(t.getGeometryN(i));null!==r&&(this._pruneEmptyGeometry&&r.isEmpty()||n.add(r))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(me.toGeometryArray(n)):this._factory.buildGeometry(n)},Xi.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof Jt)return this.transformPoint(t,null);if(t instanceof te)return this.transformMultiPoint(t,null);if(t instanceof ee)return this.transformLinearRing(t,null);if(t instanceof Kt)return this.transformLineString(t,null);if(t instanceof Ht)return this.transformMultiLineString(t,null);if(t instanceof $t)return this.transformPolygon(t,null);if(t instanceof ne)return this.transformMultiPolygon(t,null);if(t instanceof Gt)return this.transformGeometryCollection(t,null);throw new _("Unknown Geometry subtype: "+t.getClass().getName())},Xi.prototype.transformLinearRing=function(t,e){var n=this.transformCoordinates(t.getCoordinateSequence(),t);if(null===n)return this._factory.createLinearRing(null);var i=n.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},Xi.prototype.interfaces_=function(){return[]},Xi.prototype.getClass=function(){return Xi};var Ki=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new fn,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Kt&&"number"==typeof arguments[1]){var e=arguments[0],n=arguments[1];t.call(this,e.getCoordinates(),n)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var i=arguments[0],r=arguments[1];this._srcPts=i,this._isClosed=t.isClosed(i),this._snapTolerance=r}};Ki.prototype.snapVertices=function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),i=0;i<n;i++){var r=t.get(i),o=this.findSnapForVertex(r,e);null!==o&&(t.set(i,new E(o)),0===i&&this._isClosed&&t.set(t.size()-1,new E(o)))}},Ki.prototype.findSnapForVertex=function(t,e){for(var n=0;n<e.length;n++){if(t.equals2D(e[n]))return null;if(t.distance(e[n])<this._snapTolerance)return e[n]}return null},Ki.prototype.snapTo=function(t){var e=new Ct(this._srcPts);return this.snapVertices(e,t),this.snapSegments(e,t),e.toCoordinateArray()},Ki.prototype.snapSegments=function(t,e){if(0===e.length)return null;var n=e.length;e[0].equals2D(e[e.length-1])&&(n=e.length-1);for(var i=0;i<n;i++){var r=e[i],o=this.findSegmentIndexToSnap(r,t);o>=0&&t.add(o+1,new E(r),!1)}},Ki.prototype.findSegmentIndexToSnap=function(t,e){for(var n=y.MAX_VALUE,i=-1,r=0;r<e.size()-1;r++){if(this._seg.p0=e.get(r),this._seg.p1=e.get(r+1),this._seg.p0.equals2D(t)||this._seg.p1.equals2D(t)){if(this._allowSnappingToSourceVertices)continue;return-1}var o=this._seg.distance(t);o<this._snapTolerance&&o<n&&(n=o,i=r)}return i},Ki.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},Ki.prototype.interfaces_=function(){return[]},Ki.prototype.getClass=function(){return Ki},Ki.isClosed=function(t){return!(t.length<=1)&&t[0].equals2D(t[t.length-1])};var qi=function(t){this._srcGeom=t||null},Ji={SNAP_PRECISION_FACTOR:{configurable:!0}};qi.prototype.snapTo=function(t,e){var n=this.extractTargetCoordinates(t);return new Yi(e,n).transform(this._srcGeom)},qi.prototype.snapToSelf=function(t,e){var n=this.extractTargetCoordinates(this._srcGeom),i=new Yi(t,n,!0).transform(this._srcGeom),r=i;return e&&I(r,Yt)&&(r=i.buffer(0)),r},qi.prototype.computeSnapTolerance=function(t){return this.computeMinimumSegmentLength(t)/10},qi.prototype.extractTargetCoordinates=function(t){for(var e=new A,n=t.getCoordinates(),i=0;i<n.length;i++)e.add(n[i]);return e.toArray(new Array(0).fill(null))},qi.prototype.computeMinimumSegmentLength=function(t){for(var e=y.MAX_VALUE,n=0;n<t.length-1;n++){var i=t[n].distance(t[n+1]);i<e&&(e=i)}return e},qi.prototype.interfaces_=function(){return[]},qi.prototype.getClass=function(){return qi},qi.snap=function(t,e,n){var i=new Array(2).fill(null),r=new qi(t);i[0]=r.snapTo(e,n);var o=new qi(e);return i[1]=o.snapTo(i[0],n),i},qi.computeOverlaySnapTolerance=function(){if(1===arguments.length){var t=arguments[0],e=qi.computeSizeBasedSnapTolerance(t),n=t.getPrecisionModel();if(n.getType()===Ae.FIXED){var i=1/n.getScale()*2/1.415;i>e&&(e=i)}return e}if(2===arguments.length){var r=arguments[0],o=arguments[1];return Math.min(qi.computeOverlaySnapTolerance(r),qi.computeOverlaySnapTolerance(o))}},qi.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*qi.SNAP_PRECISION_FACTOR},qi.snapToSelf=function(t,e,n){return new qi(t).snapToSelf(e,n)},Ji.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(qi,Ji);var Yi=function(t){function e(e,n,i){t.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=void 0!==i&&i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(t,e){var n=new Ki(t,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(e)},e.prototype.transformCoordinates=function(t,e){var n=t.toCoordinateArray(),i=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Xi),$i=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};$i.prototype.getCommon=function(){return y.longBitsToDouble(this._commonBits)},$i.prototype.add=function(t){var e=y.doubleToLongBits(t);return this._isFirst?(this._commonBits=e,this._commonSignExp=$i.signExpBits(this._commonBits),this._isFirst=!1,null):$i.signExpBits(e)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=$i.numCommonMostSigMantissaBits(this._commonBits,e),void(this._commonBits=$i.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},$i.prototype.toString=function(){if(1===arguments.length){var t=arguments[0],e=y.longBitsToDouble(t),n="0000000000000000000000000000000000000000000000000000000000000000"+y.toBinaryString(t),i=n.substring(n.length-64);return i.substring(0,1)+" "+i.substring(1,12)+"(exp) "+i.substring(12)+" [ "+e+" ]"}},$i.prototype.interfaces_=function(){return[]},$i.prototype.getClass=function(){return $i},$i.getBit=function(t,e){return 0!=(t&1<<e)?1:0},$i.signExpBits=function(t){return t>>52},$i.zeroLowerBits=function(t,e){return t&~((1<<e)-1)},$i.numCommonMostSigMantissaBits=function(t,e){for(var n=0,i=52;i>=0;i--){if($i.getBit(t,i)!==$i.getBit(e,i))return n;n++}return 52};var tr=function(){this._commonCoord=null,this._ccFilter=new nr},er={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};tr.prototype.addCommonBits=function(t){var e=new ir(this._commonCoord);t.apply(e),t.geometryChanged()},tr.prototype.removeCommonBits=function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new E(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new ir(e);return t.apply(n),t.geometryChanged(),t},tr.prototype.getCommonCoordinate=function(){return this._commonCoord},tr.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr},er.CommonCoordinateFilter.get=function(){return nr},er.Translater.get=function(){return ir},Object.defineProperties(tr,er);var nr=function(){this._commonBitsX=new $i,this._commonBitsY=new $i};nr.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},nr.prototype.getCommonCoordinate=function(){return new E(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},nr.prototype.interfaces_=function(){return[At]},nr.prototype.getClass=function(){return nr};var ir=function(){this.trans=null;var t=arguments[0];this.trans=t};ir.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,i)},ir.prototype.isDone=function(){return!1},ir.prototype.isGeometryChanged=function(){return!0},ir.prototype.interfaces_=function(){return[Qt]},ir.prototype.getClass=function(){return ir};var rr=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};rr.prototype.selfSnap=function(t){return new qi(t).snapTo(t,this._snapTolerance)},rr.prototype.removeCommonBits=function(t){this._cbr=new tr,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},rr.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},rr.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=Br.overlayOp(e[0],e[1],t);return this.prepareResult(n)},rr.prototype.checkValid=function(t){t.isValid()||V.out.println("Snapped geometry is invalid")},rr.prototype.computeSnapTolerance=function(){this._snapTolerance=qi.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},rr.prototype.snap=function(t){var e=this.removeCommonBits(t);return qi.snap(e[0],e[1],this._snapTolerance)},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},rr.overlayOp=function(t,e,n){return new rr(t,e).getResultGeometry(n)},rr.union=function(t,e){return rr.overlayOp(t,e,Br.UNION)},rr.intersection=function(t,e){return rr.overlayOp(t,e,Br.INTERSECTION)},rr.symDifference=function(t,e){return rr.overlayOp(t,e,Br.SYMDIFFERENCE)},rr.difference=function(t,e){return rr.overlayOp(t,e,Br.DIFFERENCE)};var or=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};or.prototype.getResultGeometry=function(t){var e=null,n=!1,i=null;try{e=Br.overlayOp(this._geom[0],this._geom[1],t),n=!0}catch(t){if(!(t instanceof $))throw t;i=t}if(!n)try{e=rr.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof $?i:t}return e},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or},or.overlayOp=function(t,e,n){return new or(t,e).getResultGeometry(n)},or.union=function(t,e){return or.overlayOp(t,e,Br.UNION)},or.intersection=function(t,e){return or.overlayOp(t,e,Br.INTERSECTION)},or.symDifference=function(t,e){return or.overlayOp(t,e,Br.SYMDIFFERENCE)},or.difference=function(t,e){return or.overlayOp(t,e,Br.DIFFERENCE)};var sr=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};sr.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr};var ar=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];this._eventType=t.INSERT,this._label=i,this._xValue=r,this._obj=o}},lr={INSERT:{configurable:!0},DELETE:{configurable:!0}};ar.prototype.isDelete=function(){return this._eventType===ar.DELETE},ar.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},ar.prototype.getObject=function(){return this._obj},ar.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},ar.prototype.getInsertEvent=function(){return this._insertEvent},ar.prototype.isInsert=function(){return this._eventType===ar.INSERT},ar.prototype.isSameLabel=function(t){return null!==this._label&&this._label===t._label},ar.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},ar.prototype.interfaces_=function(){return[x]},ar.prototype.getClass=function(){return ar},lr.INSERT.get=function(){return 1},lr.DELETE.get=function(){return 2},Object.defineProperties(ar,lr);var cr=function(){};cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr};var ur=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};ur.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&1===this._li.getIntersectionNum()){if(ur.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var r=t.getNumPoints()-1;if(0===e&&i===r||0===i&&e===r)return!0}}return!1},ur.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},ur.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},ur.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},ur.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next().getCoordinate();if(t.isIntersection(i))return!0}return!1},ur.prototype.hasProperIntersection=function(){return this._hasProper},ur.prototype.hasIntersection=function(){return this._hasIntersection},ur.prototype.isDone=function(){return this._isDone},ur.prototype.isBoundaryPoint=function(t,e){return null!==e&&(!!this.isBoundaryPointInternal(t,e[0])||!!this.isBoundaryPointInternal(t,e[1]))},ur.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},ur.prototype.addIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},ur.prototype.interfaces_=function(){return[]},ur.prototype.getClass=function(){return ur},ur.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var hr=function(t){function e(){t.call(this),this.events=new wt,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){$e.sort(this.events);for(var t=0;t<this.events.size();t++){var e=this.events.get(t);e.isDelete()&&e.getInsertEvent().setDeleteEventIndex(t)}},e.prototype.computeIntersections=function(){if(1===arguments.length){var t=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var e=0;e<this.events.size();e++){var n=this.events.get(e);if(n.isInsert()&&this.processOverlaps(e,n.getDeleteEventIndex(),n,t),t.isDone())break}}else if(3===arguments.length)if(arguments[2]instanceof ur&&I(arguments[0],bt)&&I(arguments[1],bt)){var i=arguments[0],r=arguments[1],o=arguments[2];this.addEdges(i,i),this.addEdges(r,r),this.computeIntersections(o)}else if("boolean"==typeof arguments[2]&&I(arguments[0],bt)&&arguments[1]instanceof ur){var s=arguments[0],a=arguments[1];arguments[2]?this.addEdges(s,null):this.addEdges(s),this.computeIntersections(a)}},e.prototype.addEdge=function(t,e){for(var n=t.getMonotoneChainEdge(),i=n.getStartIndexes(),r=0;r<i.length-1;r++){var o=new sr(n,r),s=new ar(e,n.getMinX(r),o);this.events.add(s),this.events.add(new ar(n.getMaxX(r),s))}},e.prototype.processOverlaps=function(t,e,n,i){for(var r=n.getObject(),o=t;o<e;o++){var s=this.events.get(o);if(s.isInsert()){var a=s.getObject();n.isSameLabel(s)||(r.computeIntersections(a,i),this.nOverlaps++)}}},e.prototype.addEdges=function(){if(1===arguments.length)for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.addEdge(e,e)}else if(2===arguments.length)for(var n=arguments[0],i=arguments[1],r=n.iterator();r.hasNext();){var o=r.next();this.addEdge(o,i)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(cr),dr=function(){this._min=y.POSITIVE_INFINITY,this._max=y.NEGATIVE_INFINITY},Ar={NodeComparator:{configurable:!0}};dr.prototype.getMin=function(){return this._min},dr.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},dr.prototype.getMax=function(){return this._max},dr.prototype.toString=function(){return Y.toLineString(new E(this._min,0),new E(this._max,0))},dr.prototype.interfaces_=function(){return[]},dr.prototype.getClass=function(){return dr},Ar.NodeComparator.get=function(){return pr},Object.defineProperties(dr,Ar);var pr=function(){};pr.prototype.compare=function(t,e){var n=t,i=e,r=(n._min+n._max)/2,o=(i._min+i._max)/2;return r<o?-1:r>o?1:0},pr.prototype.interfaces_=function(){return[w]},pr.prototype.getClass=function(){return pr};var fr=function(t){function e(){t.call(this),this._item=null;var e=arguments[0],n=arguments[1],i=arguments[2];this._min=e,this._max=n,this._item=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;n.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(dr),gr=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(t,e){this._min=Math.min(t._min,e._min),this._max=Math.max(t._max,e._max)},e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;null!==this._node1&&this._node1.query(t,e,n),null!==this._node2&&this._node2.query(t,e,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(dr),mr=function(){this._leaves=new wt,this._root=null,this._level=0};mr.prototype.buildTree=function(){$e.sort(this._leaves,new dr.NodeComparator);for(var t=this._leaves,e=null,n=new wt;;){if(this.buildLevel(t,n),1===n.size())return n.get(0);e=t,t=n,n=e}},mr.prototype.insert=function(t,e,n){if(null!==this._root)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new fr(t,e,n))},mr.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},mr.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},mr.prototype.printNode=function(t){V.out.println(Y.toLineString(new E(t._min,this._level),new E(t._max,this._level)))},mr.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},mr.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n<t.size();n+=2){var i=t.get(n);if(null===(n+1<t.size()?t.get(n):null))e.add(i);else{var r=new gr(t.get(n),t.get(n+1));e.add(r)}}},mr.prototype.interfaces_=function(){return[]},mr.prototype.getClass=function(){return mr};var _r=function(){this._items=new wt};_r.prototype.visitItem=function(t){this._items.add(t)},_r.prototype.getItems=function(){return this._items},_r.prototype.interfaces_=function(){return[Ke]},_r.prototype.getClass=function(){return _r};var yr=function(){this._index=null;var t=arguments[0];if(!I(t,Yt))throw new _("Argument must be Polygonal");this._index=new br(t)},vr={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};yr.prototype.locate=function(t){var e=new st(t),n=new xr(e);return this._index.query(t.y,t.y,n),e.getLocation()},yr.prototype.interfaces_=function(){return[zn]},yr.prototype.getClass=function(){return yr},vr.SegmentVisitor.get=function(){return xr},vr.IntervalIndexedGeometry.get=function(){return br},Object.defineProperties(yr,vr);var xr=function(){this._counter=null;var t=arguments[0];this._counter=t};xr.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},xr.prototype.interfaces_=function(){return[Ke]},xr.prototype.getClass=function(){return xr};var br=function(){this._index=new mr;var t=arguments[0];this.init(t)};br.prototype.init=function(t){for(var e=Ei.getLines(t).iterator();e.hasNext();){var n=e.next().getCoordinates();this.addLine(n)}},br.prototype.addLine=function(t){for(var e=1;e<t.length;e++){var n=new fn(t[e-1],t[e]),i=Math.min(n.p0.y,n.p1.y),r=Math.max(n.p0.y,n.p1.y);this._index.insert(i,r,n)}},br.prototype.query=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new _r;return this._index.query(t,e,n),n.getItems()}if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];this._index.query(i,r,o)}},br.prototype.interfaces_=function(){return[]},br.prototype.getClass=function(){return br};var wr=function(t){function e(){if(t.call(this),this._parentGeom=null,this._lineEdgeMap=new de,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Ci,2===arguments.length){var e=arguments[0],n=arguments[1],i=pt.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=n,this._boundaryNodeRule=i,null!==n&&this.add(n)}else if(3===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2];this._argIndex=r,this._parentGeom=o,this._boundaryNodeRule=s,null!==o&&this.add(o)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertBoundaryPoint=function(t,n){var i=this._nodes.addNode(n).getLabel(),r=1;M.NONE,i.getLocation(t,Ce.ON)===M.BOUNDARY&&r++;var o=e.determineBoundary(this._boundaryNodeRule,r);i.setLocation(t,o)},e.prototype.computeSelfNodes=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.computeSelfNodes(t,e,!1)}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],o=new ur(n,!0,!1);o.setIsDoneIfProperInt(r);var s=this.createEdgeSetIntersector(),a=this._parentGeom instanceof ee||this._parentGeom instanceof $t||this._parentGeom instanceof ne,l=i||!a;return s.computeIntersections(this._edges,o,l),this.addSelfIntersectionNodes(this._argIndex),o}},e.prototype.computeSplitEdges=function(t){for(var e=this._edges.iterator();e.hasNext();)e.next().eiList.addSplitEdges(t)},e.prototype.computeEdgeIntersections=function(t,e,n){var i=new ur(e,n,!0);return i.setBoundaryNodes(this.getBoundaryNodes(),t.getBoundaryNodes()),this.createEdgeSetIntersector().computeIntersections(this._edges,t._edges,i),i},e.prototype.getGeometry=function(){return this._parentGeom},e.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},e.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},e.prototype.addPoint=function(){if(arguments[0]instanceof Jt){var t=arguments[0].getCoordinate();this.insertPoint(this._argIndex,t,M.INTERIOR)}else if(arguments[0]instanceof E){var e=arguments[0];this.insertPoint(this._argIndex,e,M.INTERIOR)}},e.prototype.addPolygon=function(t){this.addPolygonRing(t.getExteriorRing(),M.EXTERIOR,M.INTERIOR);for(var e=0;e<t.getNumInteriorRing();e++){var n=t.getInteriorRingN(e);this.addPolygonRing(n,M.INTERIOR,M.EXTERIOR)}},e.prototype.addEdge=function(t){this.insertEdge(t);var e=t.getCoordinates();this.insertPoint(this._argIndex,e[0],M.BOUNDARY),this.insertPoint(this._argIndex,e[e.length-1],M.BOUNDARY)},e.prototype.addLineString=function(t){var e=Bt.removeRepeatedPoints(t.getCoordinates());if(e.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=e[0],null;var n=new ni(e,new Pe(this._argIndex,M.INTERIOR));this._lineEdgeMap.put(t,n),this.insertEdge(n),et.isTrue(e.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,e[0]),this.insertBoundaryPoint(this._argIndex,e[e.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),n=0,i=t.iterator();i.hasNext();){var r=i.next();e[n++]=r.getCoordinate().copy()}return e},e.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(t,e,n){if(this.isBoundaryNode(t,e))return null;n===M.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,n)},e.prototype.addPolygonRing=function(t,e,n){if(t.isEmpty())return null;var i=Bt.removeRepeatedPoints(t.getCoordinates());if(i.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var r=e,o=n;at.isCCW(i)&&(r=n,o=e);var s=new ni(i,new Pe(this._argIndex,M.BOUNDARY,r,o));this._lineEdgeMap.put(t,s),this.insertEdge(s),this.insertPoint(this._argIndex,i[0],M.BOUNDARY)},e.prototype.insertPoint=function(t,e,n){var i=this._nodes.addNode(e),r=i.getLabel();null===r?i._label=new Pe(t,n):r.setLocation(t,n)},e.prototype.createEdgeSetIntersector=function(){return new hr},e.prototype.addSelfIntersectionNodes=function(t){for(var e=this._edges.iterator();e.hasNext();)for(var n=e.next(),i=n.getLabel().getLocation(t),r=n.eiList.iterator();r.hasNext();){var o=r.next();this.addSelfIntersectionNode(t,o.coord,i)}},e.prototype.add=function(){if(1!==arguments.length)return t.prototype.add.apply(this,arguments);var e=arguments[0];if(e.isEmpty())return null;if(e instanceof ne&&(this._useBoundaryDeterminationRule=!1),e instanceof $t)this.addPolygon(e);else if(e instanceof Kt)this.addLineString(e);else if(e instanceof Jt)this.addPoint(e);else if(e instanceof te)this.addCollection(e);else if(e instanceof Ht)this.addCollection(e);else if(e instanceof ne)this.addCollection(e);else{if(!(e instanceof Gt))throw new Error(e.getClass().getName());this.addCollection(e)}},e.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},e.prototype.locate=function(t){return I(this._parentGeom,Yt)&&this._parentGeom.getNumGeometries()>50?(null===this._areaPtLocator&&(this._areaPtLocator=new yr(this._parentGeom)),this._areaPtLocator.locate(t)):this._ptLocator.locate(t,this._parentGeom)},e.prototype.findEdge=function(){if(1===arguments.length){var e=arguments[0];return this._lineEdgeMap.get(e)}return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(t,e){return t.isInBoundary(e)?M.BOUNDARY:M.INTERIOR},e}(Ve),Er=function(){if(this._li=new rt,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new wr(0,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=pt.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new wr(0,e,i),this._arg[1]=new wr(1,n,i)}else if(3===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2];r.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(r.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new wr(0,r,s),this._arg[1]=new wr(1,o,s)}};Er.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Er.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Er.prototype.interfaces_=function(){return[]},Er.prototype.getClass=function(){return Er};var Cr=function(){};Cr.prototype.interfaces_=function(){return[]},Cr.prototype.getClass=function(){return Cr},Cr.map=function(){if(arguments[0]instanceof ut&&I(arguments[1],Cr.MapOp)){for(var t=arguments[0],e=arguments[1],n=new wt,i=0;i<t.getNumGeometries();i++){var r=e.map(t.getGeometryN(i));null!==r&&n.add(r)}return t.getFactory().buildGeometry(n)}if(I(arguments[0],vt)&&I(arguments[1],Cr.MapOp)){for(var o=arguments[0],s=arguments[1],a=new wt,l=o.iterator();l.hasNext();){var c=l.next(),u=s.map(c);null!==u&&a.add(u)}return a}},Cr.MapOp=function(){};var Br=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n),this._ptLocator=new Ci,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Wn,this._resultPolyList=new wt,this._resultLineList=new wt,this._resultPointList=new wt,this._graph=new Ve(new jn),this._geomFact=e.getFactory()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Pe(t.getLabel())).flip();var r=e.getDepth();r.isNull()&&r.add(n),r.add(i),n.merge(i)}else this._edgeList.add(t)},e.prototype.getGraph=function(){return this._graph},e.prototype.cancelDuplicateResultEdges=function(){for(var t=this._graph.getEdgeEnds().iterator();t.hasNext();){var e=t.next(),n=e.getSym();e.isInResult()&&n.isInResult()&&(e.setInResult(!1),n.setInResult(!1))}},e.prototype.isCoveredByLA=function(t){return!!this.isCovered(t,this._resultLineList)||!!this.isCovered(t,this._resultPolyList)},e.prototype.computeGeometry=function(t,n,i,r){var o=new wt;return o.addAll(t),o.addAll(n),o.addAll(i),o.isEmpty()?e.createEmptyResult(r,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(o)},e.prototype.mergeSymLabels=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();)t.next().getEdges().mergeSymLabels()},e.prototype.isCovered=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();if(this._ptLocator.locate(t,i)!==M.EXTERIOR)return!0}return!1},e.prototype.replaceCollapsedEdges=function(){for(var t=new wt,e=this._edgeList.iterator();e.hasNext();){var n=e.next();n.isCollapsed()&&(e.remove(),t.add(n.getCollapsedEdge()))}this._edgeList.addAll(t)},e.prototype.updateNodeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getEdges().getLabel();e.getLabel().merge(n)}},e.prototype.getResultGeometry=function(t){return this.computeOverlay(t),this._resultGeom},e.prototype.insertUniqueEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.insertUniqueEdge(n)}},e.prototype.computeOverlay=function(t){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var e=new wt;this._arg[0].computeSplitEdges(e),this._arg[1].computeSplitEdges(e),this.insertUniqueEdges(e),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Vi.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(t),this.cancelDuplicateResultEdges();var n=new je(this._geomFact);n.add(this._graph),this._resultPolyList=n.getPolygons();var i=new Zi(this,this._geomFact,this._ptLocator);this._resultLineList=i.build(t);var r=new Wi(this,this._geomFact,this._ptLocator);this._resultPointList=r.build(t),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,t)},e.prototype.labelIncompleteNode=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._arg[e].getGeometry());t.getLabel().setLocation(e,n)},e.prototype.copyPoints=function(t){for(var e=this._arg[t].getNodeIterator();e.hasNext();){var n=e.next();this._graph.addNode(n.getCoordinate()).setLabel(t,n.getLabel().getLocation(t))}},e.prototype.findResultAreaEdges=function(t){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var i=n.next(),r=i.getLabel();r.isArea()&&!i.isInteriorAreaEdge()&&e.isResultOfOp(r.getLocation(0,Ce.RIGHT),r.getLocation(1,Ce.RIGHT),t)&&i.setInResult(!0)}},e.prototype.computeLabelsFromDepths=function(){for(var t=this._edgeList.iterator();t.hasNext();){var e=t.next(),n=e.getLabel(),i=e.getDepth();if(!i.isNull()){i.normalize();for(var r=0;r<2;r++)n.isNull(r)||!n.isArea()||i.isNull(r)||(0===i.getDelta(r)?n.toLine(r):(et.isTrue(!i.isNull(r,Ce.LEFT),"depth of LEFT side has not been initialized"),n.setLocation(r,Ce.LEFT,i.getLocation(r,Ce.LEFT)),et.isTrue(!i.isNull(r,Ce.RIGHT),"depth of RIGHT side has not been initialized"),n.setLocation(r,Ce.RIGHT,i.getLocation(r,Ce.RIGHT))))}}},e.prototype.computeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();)t.next().getEdges().computeLabelling(this._arg);this.mergeSymLabels(),this.updateNodeLabelling()},e.prototype.labelIncompleteNodes=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getLabel();e.isIsolated()&&(n.isNull(0)?this.labelIncompleteNode(e,0):this.labelIncompleteNode(e,1)),e.getEdges().updateLabelling(n)}},e.prototype.isCoveredByA=function(t){return!!this.isCovered(t,this._resultPolyList)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Er);Br.overlayOp=function(t,e,n){return new Br(t,e).getResultGeometry(n)},Br.intersection=function(t,e){if(t.isEmpty()||e.isEmpty())return Br.createEmptyResult(Br.INTERSECTION,t,e,t.getFactory());if(t.isGeometryCollection()){var n=e;return ji.map(t,{interfaces_:function(){return[Cr.MapOp]},map:function(t){return t.intersection(n)}})}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Br.INTERSECTION)},Br.symDifference=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Br.createEmptyResult(Br.SYMDIFFERENCE,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Br.SYMDIFFERENCE)},Br.resultDimension=function(t,e,n){var i=e.getDimension(),r=n.getDimension(),o=-1;switch(t){case Br.INTERSECTION:o=Math.min(i,r);break;case Br.UNION:o=Math.max(i,r);break;case Br.DIFFERENCE:o=i;break;case Br.SYMDIFFERENCE:o=Math.max(i,r)}return o},Br.createEmptyResult=function(t,e,n,i){var r=null;switch(Br.resultDimension(t,e,n)){case-1:r=i.createGeometryCollection(new Array(0).fill(null));break;case 0:r=i.createPoint();break;case 1:r=i.createLineString();break;case 2:r=i.createPolygon()}return r},Br.difference=function(t,e){return t.isEmpty()?Br.createEmptyResult(Br.DIFFERENCE,t,e,t.getFactory()):e.isEmpty()?t.copy():(t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Br.DIFFERENCE))},Br.isResultOfOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=t.getLocation(0),i=t.getLocation(1);return Br.isResultOfOp(n,i,e)}if(3===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2];switch(r===M.BOUNDARY&&(r=M.INTERIOR),o===M.BOUNDARY&&(o=M.INTERIOR),s){case Br.INTERSECTION:return r===M.INTERIOR&&o===M.INTERIOR;case Br.UNION:return r===M.INTERIOR||o===M.INTERIOR;case Br.DIFFERENCE:return r===M.INTERIOR&&o!==M.INTERIOR;case Br.SYMDIFFERENCE:return r===M.INTERIOR&&o!==M.INTERIOR||r!==M.INTERIOR&&o===M.INTERIOR}return!1}},Br.INTERSECTION=1,Br.UNION=2,Br.DIFFERENCE=3,Br.SYMDIFFERENCE=4;var Sr=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Ci,this._seg=new fn;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};Sr.prototype.isWithinToleranceOfBoundary=function(t){for(var e=0;e<this._linework.getNumGeometries();e++)for(var n=this._linework.getGeometryN(e).getCoordinateSequence(),i=0;i<n.size()-1;i++)if(n.getCoordinate(i,this._seg.p0),n.getCoordinate(i+1,this._seg.p1),this._seg.distance(t)<=this._boundaryDistanceTolerance)return!0;return!1},Sr.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?M.BOUNDARY:this._ptLocator.locate(t,this._g)},Sr.prototype.extractLinework=function(t){var e=new Mr;t.apply(e);var n=e.getLinework(),i=me.toLineStringArray(n);return t.getFactory().createMultiLineString(i)},Sr.prototype.interfaces_=function(){return[]},Sr.prototype.getClass=function(){return Sr};var Mr=function(){this._linework=null,this._linework=new wt};Mr.prototype.getLinework=function(){return this._linework},Mr.prototype.filter=function(t){if(t instanceof $t){var e=t;this._linework.add(e.getExteriorRing());for(var n=0;n<e.getNumInteriorRing();n++)this._linework.add(e.getInteriorRingN(n))}},Mr.prototype.interfaces_=function(){return[zt]},Mr.prototype.getClass=function(){return Mr};var Tr=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};Tr.prototype.extractPoints=function(t,e,n){for(var i=t.getCoordinates(),r=0;r<i.length-1;r++)this.computeOffsetPoints(i[r],i[r+1],e,n)},Tr.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},Tr.prototype.getPoints=function(t){for(var e=new wt,n=Ei.getLines(this._g).iterator();n.hasNext();){var i=n.next();this.extractPoints(i,t,e)}return e},Tr.prototype.computeOffsetPoints=function(t,e,n,i){var r=e.x-t.x,o=e.y-t.y,s=Math.sqrt(r*r+o*o),a=n*r/s,l=n*o/s,c=(e.x+t.x)/2,u=(e.y+t.y)/2;if(this._doLeft){var h=new E(c-l,u+a);i.add(h)}if(this._doRight){var d=new E(c+l,u-a);i.add(d)}},Tr.prototype.interfaces_=function(){return[]},Tr.prototype.getClass=function(){return Tr};var Ir=function t(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=t.TOLERANCE,this._testCoords=new wt;var e=arguments[0],n=arguments[1],i=arguments[2];this._boundaryDistanceTolerance=t.computeBoundaryDistanceTolerance(e,n),this._geom=[e,n,i],this._locFinder=[new Sr(this._geom[0],this._boundaryDistanceTolerance),new Sr(this._geom[1],this._boundaryDistanceTolerance),new Sr(this._geom[2],this._boundaryDistanceTolerance)]},Lr={TOLERANCE:{configurable:!0}};Ir.prototype.reportResult=function(t,e,n){V.out.println("Overlay result invalid - A:"+M.toLocationSymbol(e[0])+" B:"+M.toLocationSymbol(e[1])+" expected:"+(n?"i":"e")+" actual:"+M.toLocationSymbol(e[2]))},Ir.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var e=this.checkValid(t);return e},Ir.prototype.checkValid=function(){if(1===arguments.length){for(var t=arguments[0],e=0;e<this._testCoords.size();e++){var n=this._testCoords.get(e);if(!this.checkValid(t,n))return this._invalidLocation=n,!1}return!0}if(2===arguments.length){var i=arguments[0],r=arguments[1];return this._location[0]=this._locFinder[0].getLocation(r),this._location[1]=this._locFinder[1].getLocation(r),this._location[2]=this._locFinder[2].getLocation(r),!!Ir.hasLocation(this._location,M.BOUNDARY)||this.isValidResult(i,this._location)}},Ir.prototype.addTestPts=function(t){var e=new Tr(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},Ir.prototype.isValidResult=function(t,e){var n=Br.isResultOfOp(e[0],e[1],t),i=!(n^e[2]===M.INTERIOR);return i||this.reportResult(t,e,n),i},Ir.prototype.getInvalidLocation=function(){return this._invalidLocation},Ir.prototype.interfaces_=function(){return[]},Ir.prototype.getClass=function(){return Ir},Ir.hasLocation=function(t,e){for(var n=0;n<3;n++)if(t[n]===e)return!0;return!1},Ir.computeBoundaryDistanceTolerance=function(t,e){return Math.min(qi.computeSizeBasedSnapTolerance(t),qi.computeSizeBasedSnapTolerance(e))},Ir.isValid=function(t,e,n,i){return new Ir(t,e,i).isValid(n)},Lr.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Ir,Lr);var Pr=function t(e){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=t.extractFactory(e),this._inputGeoms=e};Pr.prototype.extractElements=function(t,e){if(null===t)return null;for(var n=0;n<t.getNumGeometries();n++){var i=t.getGeometryN(n);this._skipEmpty&&i.isEmpty()||e.add(i)}},Pr.prototype.combine=function(){for(var t=new wt,e=this._inputGeoms.iterator();e.hasNext();){var n=e.next();this.extractElements(n,t)}return 0===t.size()?null!==this._geomFactory?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(t)},Pr.prototype.interfaces_=function(){return[]},Pr.prototype.getClass=function(){return Pr},Pr.combine=function(){if(1===arguments.length){var t=arguments[0];return new Pr(t).combine()}if(2===arguments.length){var e=arguments[0],n=arguments[1];return new Pr(Pr.createList(e,n)).combine()}if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];return new Pr(Pr.createList(i,r,o)).combine()}},Pr.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Pr.createList=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new wt;return n.add(t),n.add(e),n}if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2],s=new wt;return s.add(i),s.add(r),s.add(o),s}};var Fr=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,null===this._inputPolys&&(this._inputPolys=new wt)},Rr={STRTREE_NODE_CAPACITY:{configurable:!0}};Fr.prototype.reduceToGeometries=function(t){for(var e=new wt,n=t.iterator();n.hasNext();){var i=n.next(),r=null;I(i,bt)?r=this.unionTree(i):i instanceof ut&&(r=i),e.add(r)}return e},Fr.prototype.extractByEnvelope=function(t,e,n){for(var i=new wt,r=0;r<e.getNumGeometries();r++){var o=e.getGeometryN(r);o.getEnvelopeInternal().intersects(t)?i.add(o):n.add(o)}return this._geomFactory.buildGeometry(i)},Fr.prototype.unionOptimized=function(t,e){var n=t.getEnvelopeInternal(),i=e.getEnvelopeInternal();if(!n.intersects(i))return Pr.combine(t,e);if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var r=n.intersection(i);return this.unionUsingEnvelopeIntersection(t,e,r)},Fr.prototype.union=function(){if(null===this._inputPolys)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new sn(Fr.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var n=e.next();t.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var i=t.itemsTree();return this.unionTree(i)},Fr.prototype.binaryUnion=function(){if(1===arguments.length){var t=arguments[0];return this.binaryUnion(t,0,t.size())}if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];if(i-n<=1){var r=Fr.getGeometry(e,n);return this.unionSafe(r,null)}if(i-n==2)return this.unionSafe(Fr.getGeometry(e,n),Fr.getGeometry(e,n+1));var o=Math.trunc((i+n)/2),s=this.binaryUnion(e,n,o),a=this.binaryUnion(e,o,i);return this.unionSafe(s,a)}},Fr.prototype.repeatedUnion=function(t){for(var e=null,n=t.iterator();n.hasNext();){var i=n.next();e=null===e?i.copy():e.union(i)}return e},Fr.prototype.unionSafe=function(t,e){return null===t&&null===e?null:null===t?e.copy():null===e?t.copy():this.unionOptimized(t,e)},Fr.prototype.unionActual=function(t,e){return Fr.restrictToPolygons(t.union(e))},Fr.prototype.unionTree=function(t){var e=this.reduceToGeometries(t);return this.binaryUnion(e)},Fr.prototype.unionUsingEnvelopeIntersection=function(t,e,n){var i=new wt,r=this.extractByEnvelope(n,t,i),o=this.extractByEnvelope(n,e,i),s=this.unionActual(r,o);return i.add(s),Pr.combine(i)},Fr.prototype.bufferUnion=function(){if(1===arguments.length){var t=arguments[0];return t.get(0).getFactory().buildGeometry(t).buffer(0)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().createGeometryCollection([e,n]).buffer(0)}},Fr.prototype.interfaces_=function(){return[]},Fr.prototype.getClass=function(){return Fr},Fr.restrictToPolygons=function(t){if(I(t,Yt))return t;var e=wi.getPolygons(t);return 1===e.size()?e.get(0):t.getFactory().createMultiPolygon(me.toPolygonArray(e))},Fr.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Fr.union=function(t){return new Fr(t).union()},Rr.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Fr,Rr);var Dr=function(){};Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr},Dr.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Br.createEmptyResult(Br.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Br.UNION)},t.GeoJSONReader=we,t.GeoJSONWriter=Ee,t.OverlayOp=Br,t.UnionOp=Dr,t.BufferOp=fi,Object.defineProperty(t,"__esModule",{value:!0})}))},4561:function(t,e,n){var i=n(1627);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("6c944acb",i,!0,{sourceMap:!1,shadowMode:!1})},4337:function(t,e,n){var i=n(8294);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("3f048bde",i,!0,{sourceMap:!1,shadowMode:!1})},6872:function(t,e,n){var i=n(8475);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("150ad29c",i,!0,{sourceMap:!1,shadowMode:!1})},8434:function(t,e,n){var i=n(8752);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("bc6b24d6",i,!0,{sourceMap:!1,shadowMode:!1})},1602:function(t,e,n){var i=n(351);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("433b4afa",i,!0,{sourceMap:!1,shadowMode:!1})},5375:function(t,e,n){var i=n(4963);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("7e462712",i,!0,{sourceMap:!1,shadowMode:!1})},3024:function(t,e,n){var i=n(2125);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("b6cb6cfc",i,!0,{sourceMap:!1,shadowMode:!1})},6782:function(t,e,n){var i=n(6646);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("75d232ea",i,!0,{sourceMap:!1,shadowMode:!1})},8499:function(t,e,n){var i=n(8841);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("30aa2cac",i,!0,{sourceMap:!1,shadowMode:!1})},2292:function(t,e,n){var i=n(2716);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3650).Z;r("09ab9b54",i,!0,{sourceMap:!1,shadowMode:!1})},3650:function(t,e,n){"use strict";function i(t,e){for(var n=[],i={},r=0;r<e.length;r++){var o=e[r],s=o[0],a=o[1],l=o[2],c=o[3],u={id:t+":"+r,css:a,media:l,sourceMap:c};i[s]?i[s].parts.push(u):n.push(i[s]={id:s,parts:[u]})}return n}n.d(e,{Z:function(){return p}});var r="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!r)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},s=r&&(document.head||document.getElementsByTagName("head")[0]),a=null,l=0,c=!1,u=function(){},h=null,d="data-vue-ssr-id",A="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(t,e,n,r){c=n,h=r||{};var s=i(t,e);return f(s),function(e){for(var n=[],r=0;r<s.length;r++){var a=s[r],l=o[a.id];l.refs--,n.push(l)}e?(s=i(t,e),f(s)):s=[];for(r=0;r<n.length;r++){l=n[r];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete o[l.id]}}}}function f(t){for(var e=0;e<t.length;e++){var n=t[e],i=o[n.id];if(i){i.refs++;for(var r=0;r<i.parts.length;r++)i.parts[r](n.parts[r]);for(;r<n.parts.length;r++)i.parts.push(m(n.parts[r]));i.parts.length>n.parts.length&&(i.parts.length=n.parts.length)}else{var s=[];for(r=0;r<n.parts.length;r++)s.push(m(n.parts[r]));o[n.id]={id:n.id,refs:1,parts:s}}}}function g(){var t=document.createElement("style");return t.type="text/css",s.appendChild(t),t}function m(t){var e,n,i=document.querySelector("style["+d+'~="'+t.id+'"]');if(i){if(c)return u;i.parentNode.removeChild(i)}if(A){var r=l++;i=a||(a=g()),e=y.bind(null,i,r,!1),n=y.bind(null,i,r,!0)}else i=g(),e=v.bind(null,i),n=function(){i.parentNode.removeChild(i)};return e(t),function(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap)return;e(t=i)}else n()}}var _=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function y(t,e,n,i){var r=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=_(e,r);else{var o=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function v(t,e){var n=e.css,i=e.media,r=e.sourceMap;if(i&&t.setAttribute("media",i),h.ssrId&&t.setAttribute(d,e.id),r&&(n+="\n/*# sourceURL="+r.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}},2179:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill-rule=%27evenodd%27 fill=%27%23fff%27%3E%3Cpath d=%27M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0%27/%3E%3C/svg%3E"},4026:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill-rule=%27evenodd%27%3E%3Cpath d=%27M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0%27/%3E%3C/svg%3E"},4055:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23333%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},926:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%2333b5e5%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3C/svg%3E"},3895:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%2333b5e5%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},9920:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23666%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath d=%27m14 5 1 1-9 9-1-1 9-9z%27 fill=%27red%27/%3E%3C/svg%3E"},2154:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23999%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath d=%27m14 5 1 1-9 9-1-1 9-9z%27 fill=%27red%27/%3E%3C/svg%3E"},5758:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23aaa%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath d=%27m14 5 1 1-9 9-1-1 9-9z%27 fill=%27red%27/%3E%3C/svg%3E"},4943:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23e54e33%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3C/svg%3E"},407:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23e58978%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},6871:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},9843:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg viewBox=%270 0 20 20%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},7673:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z%27/%3E%3C/svg%3E"},1570:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z%27/%3E%3C/svg%3E"},2931:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z%27/%3E%3C/svg%3E"},4871:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8h-8z%27/%3E%3Cpath d=%27m10.5 16 4 8 4-8h-8z%27 fill=%27%23ccc%27/%3E%3C/svg%3E"},6807:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z%27/%3E%3C/svg%3E"},28:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z%27/%3E%3C/svg%3E"},551:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z%27/%3E%3C/svg%3E"},323:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z%27/%3E%3C/svg%3E"},3598:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8h-8z%27/%3E%3Cpath d=%27m10.5 16 4 8 4-8h-8z%27 fill=%27%23999%27/%3E%3C/svg%3E"},325:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z%27/%3E%3C/svg%3E"},242:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z%27/%3E%3C/svg%3E"},752:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z%27/%3E%3C/svg%3E"},1045:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z%27/%3E%3C/svg%3E"},6043:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8h-8z%27/%3E%3Cpath d=%27m10.5 16 4 8 4-8h-8z%27 fill=%27%23ccc%27/%3E%3C/svg%3E"},406:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 xmlns:xlink=%27http://www.w3.org/1999/xlink%27 fill-rule=%27evenodd%27 viewBox=%270 0 88 23%27%3E%3Cdefs%3E%3Cpath id=%27a%27 d=%27M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 0 1 3.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z%27/%3E%3Cpath id=%27b%27 d=%27M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 0 0-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 0 0 4.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 0 1-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 0 1 .3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 0 1-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z%27/%3E%3C/defs%3E%3Cmask id=%27c%27%3E%3Crect width=%27100%25%27 height=%27100%25%27 fill=%27%23fff%27/%3E%3Cuse xlink:href=%27%23a%27/%3E%3Cuse xlink:href=%27%23b%27/%3E%3C/mask%3E%3Cg opacity=%27.3%27 stroke=%27%23000%27 stroke-width=%273%27%3E%3Ccircle mask=%27url%28%23c%29%27 cx=%2711.5%27 cy=%2711.5%27 r=%279.25%27/%3E%3Cuse xlink:href=%27%23b%27 mask=%27url%28%23c%29%27/%3E%3C/g%3E%3Cg opacity=%27.9%27 fill=%27%23fff%27%3E%3Cuse xlink:href=%27%23a%27/%3E%3Cuse xlink:href=%27%23b%27/%3E%3C/g%3E%3C/svg%3E"},3939:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 xmlns:xlink=%27http://www.w3.org/1999/xlink%27 fill-rule=%27evenodd%27 viewBox=%270 0 88 23%27%3E%3Cdefs%3E%3Cpath id=%27a%27 d=%27M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 0 1 3.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z%27/%3E%3Cpath id=%27b%27 d=%27M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 0 0-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 0 0 4.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 0 1-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 0 1 .3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 0 1-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z%27/%3E%3C/defs%3E%3Cmask id=%27c%27%3E%3Crect width=%27100%25%27 height=%27100%25%27 fill=%27%23fff%27/%3E%3Cuse xlink:href=%27%23a%27/%3E%3Cuse xlink:href=%27%23b%27/%3E%3C/mask%3E%3Cg stroke=%27%23000%27 stroke-width=%273%27%3E%3Ccircle mask=%27url%28%23c%29%27 cx=%2711.5%27 cy=%2711.5%27 r=%279.25%27/%3E%3Cuse xlink:href=%27%23b%27 mask=%27url%28%23c%29%27/%3E%3C/g%3E%3Cg fill=%27%23fff%27%3E%3Cuse xlink:href=%27%23a%27/%3E%3Cuse xlink:href=%27%23b%27/%3E%3C/g%3E%3C/svg%3E"},5929:function(t){"use strict";t.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 xmlns:xlink=%27http://www.w3.org/1999/xlink%27 fill-rule=%27evenodd%27 viewBox=%270 0 88 23%27%3E%3Cdefs%3E%3Cpath id=%27a%27 d=%27M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 0 1 3.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z%27/%3E%3Cpath id=%27b%27 d=%27M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 0 0-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 0 0 4.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 0 1-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 0 1 .3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 0 1-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z%27/%3E%3C/defs%3E%3Cmask id=%27c%27%3E%3Crect width=%27100%25%27 height=%27100%25%27 fill=%27%23fff%27/%3E%3Cuse xlink:href=%27%23a%27/%3E%3Cuse xlink:href=%27%23b%27/%3E%3C/mask%3E%3Cg stroke=%27%23fff%27 stroke-width=%273%27 fill=%27%23fff%27%3E%3Ccircle mask=%27url%28%23c%29%27 cx=%2711.5%27 cy=%2711.5%27 r=%279.25%27/%3E%3Cuse xlink:href=%27%23b%27 mask=%27url%28%23c%29%27/%3E%3C/g%3E%3Cuse xlink:href=%27%23a%27/%3E%3Cuse xlink:href=%27%23b%27/%3E%3C/svg%3E"},2780:function(t){"use strict";t.exports='data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20">%3Cpath d="M10,3.4 c-0.8,0-1.5,0.5-1.8,1.2H5l-1,1v1h12v-1l-1-1h-3.2C11.5,3.9,10.8,3.4,10,3.4z M5,8v7c0,1,1,2,2,2h6c1,0,2-1,2-2V8h-2v5.5h-1.5V8h-3 v5.5H7V8H5z"/>%3C/svg>'},1706:function(t){"use strict";t.exports='data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20">%3Cpath d="M12.1,2c-0.3,0-0.5,0.1-0.7,0.3l-1,1c-0.4,0.4-0.4,1,0,1.4l4.9,4.9c0.4,0.4,1,0.4,1.4,0l1-1 c0.4-0.4,0.4-1,0-1.4l-4.9-4.9C12.6,2.1,12.3,2,12.1,2z M8,8C7,8,7,9,7.5,9.5c0.3,0.3,1,1,1,1l-1,1c0,0-0.5,0.5,0,1s1,0,1,0l1-1l1,1 C11,13,12,13,12,12V8H8z M4,10c-0.3,0-0.5,0.1-0.7,0.3l-1,1c-0.4,0.4-0.4,1,0,1.4l1,1c0.4,0.4,1,0.4,1.4,0l1-1c0.4-0.4,0.4-1,0-1.4 l-1-1C4.5,10.1,4.3,10,4,10z M8,14c-0.3,0-0.5,0.1-0.7,0.3l-1,1c-0.4,0.4-0.4,1,0,1.4l1,1c0.4,0.4,1,0.4,1.4,0l1-1 c0.4-0.4,0.4-1,0-1.4l-1-1C8.5,14.1,8.3,14,8,14z"/>%3C/svg>'},192:function(t){"use strict";t.exports='data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20">%3Cpath d="m10 2c-3.3 0-6 2.7-6 6s6 9 6 9 6-5.7 6-9-2.7-6-6-6zm0 2c2.1 0 3.8 1.7 3.8 3.8 0 1.5-1.8 3.9-2.9 5.2h-1.7c-1.1-1.4-2.9-3.8-2.9-5.2-.1-2.1 1.6-3.8 3.7-3.8z"/>%3C/svg>'},4947:function(t){"use strict";t.exports='data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20">%3Cpath d="m12 2c-.3 0-.5.1-.7.3l-1 1c-.4.4-.4 1 0 1.4l1 1c.4.4 1 .4 1.4 0l1-1c.4-.4.4-1 0-1.4l-1-1c-.2-.2-.4-.3-.7-.3zm4 4c-.3 0-.5.1-.7.3l-1 1c-.4.4-.4 1 0 1.4l1 1c.4.4 1 .4 1.4 0l1-1c.4-.4.4-1 0-1.4l-1-1c-.2-.2-.4-.3-.7-.3zm-7 1c-1 0-1 1-.5 1.5.3.3 1 1 1 1l-1 1s-.5.5 0 1 1 0 1 0l1-1 1 1c.5.5 1.5.5 1.5-.5v-4zm-5 3c-.3 0-.5.1-.7.3l-1 1c-.4.4-.4 1 0 1.4l4.9 4.9c.4.4 1 .4 1.4 0l1-1c.4-.4.4-1 0-1.4l-4.9-4.9c-.1-.2-.4-.3-.7-.3z"/>%3C/svg>'},4363:function(t){"use strict";t.exports='data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20">%3Cpath d="m13.5 3.5c-1.4 0-2.5 1.1-2.5 2.5 0 .3 0 .6.2.9l-3.8 3.8c-.3-.1-.6-.2-.9-.2-1.4 0-2.5 1.1-2.5 2.5s1.1 2.5 2.5 2.5 2.5-1.1 2.5-2.5c0-.3 0-.6-.2-.9l3.8-3.8c.3.1.6.2.9.2 1.4 0 2.5-1.1 2.5-2.5s-1.1-2.5-2.5-2.5z"/>%3C/svg>'},263:function(t){"use strict";t.exports='data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20">%3Cpath d="m15 12.3v-4.6c.6-.3 1-1 1-1.7 0-1.1-.9-2-2-2-.7 0-1.4.4-1.7 1h-4.6c-.3-.6-1-1-1.7-1-1.1 0-2 .9-2 2 0 .7.4 1.4 1 1.7v4.6c-.6.3-1 1-1 1.7 0 1.1.9 2 2 2 .7 0 1.4-.4 1.7-1h4.6c.3.6 1 1 1.7 1 1.1 0 2-.9 2-2 0-.7-.4-1.4-1-1.7zm-8-.3v-4l1-1h4l1 1v4l-1 1h-4z"/>%3C/svg>'},7203:function(e){"use strict";e.exports=t},9125:function(){},768:function(t,e,n){"use strict";function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{Z:function(){return i}})}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={id:t,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.exports}i.m=e,function(){i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,{a:e}),e}}(),function(){i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}}(),function(){i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){i.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){i.p=""}(),function(){i.b=document.baseURI||self.location.href}();var r={};return function(){"use strict";i.r(r),i.d(r,{MapboxDraw:function(){return bm()},default:function(){return Wtt},drawLine:function(){return Ott},drawPoint:function(){return Itt},drawPolygon:function(){return Gtt},drawTools:function(){return Ett},jsonFile:function(){return Att},mapDraw:function(){return Vtt},mapEvent:function(){return Ztt},mapFullScreen:function(){return H7},mapLayers:function(){return Htt},mapLoad:function(){return U7},mapMarker:function(){return C7},mapRain:function(){return L7},mapSdk:function(){return vm},mapStyle:function(){return K7},mapTools:function(){return jtt},shpFile:function(){return vtt},turf:function(){return l}});var t={};i.r(t),i.d(t,{areaFactors:function(){return E},bearingToAzimuth:function(){return G},convertArea:function(){return Z},convertLength:function(){return j},degreesToRadians:function(){return V},earthRadius:function(){return x},factors:function(){return b},feature:function(){return C},featureCollection:function(){return F},geometry:function(){return B},geometryCollection:function(){return U},isNumber:function(){return W},isObject:function(){return X},lengthToDegrees:function(){return Q},lengthToRadians:function(){return z},lineString:function(){return L},lineStrings:function(){return P},multiLineString:function(){return R},multiPoint:function(){return D},multiPolygon:function(){return O},point:function(){return S},points:function(){return M},polygon:function(){return T},polygons:function(){return I},radiansToDegrees:function(){return H},radiansToLength:function(){return k},round:function(){return N},unitsFactors:function(){return w},validateBBox:function(){return K},validateId:function(){return q}});var e={};i.r(e),i.d(e,{coordAll:function(){return it},coordEach:function(){return J},coordReduce:function(){return Y},featureEach:function(){return et},featureReduce:function(){return nt},findPoint:function(){return At},findSegment:function(){return dt},flattenEach:function(){return st},flattenReduce:function(){return at},geomEach:function(){return rt},geomReduce:function(){return ot},lineEach:function(){return ut},lineReduce:function(){return ht},propEach:function(){return $},propReduce:function(){return tt},segmentEach:function(){return lt},segmentReduce:function(){return ct}});var n={};i.r(n),i.d(n,{collectionOf:function(){return xt},containsNumber:function(){return _t},featureOf:function(){return vt},geojsonType:function(){return yt},getCoord:function(){return gt},getCoords:function(){return mt},getGeom:function(){return bt},getType:function(){return wt}});var o={};i.r(o),i.d(o,{toMercator:function(){return xu},toWgs84:function(){return bu}});var s={};i.r(s),i.d(s,{randomLineString:function(){return Lu},randomPoint:function(){return Tu},randomPolygon:function(){return Iu},randomPosition:function(){return Mu}});var a={};i.r(a),i.d(a,{applyFilter:function(){return Qu},clusterEach:function(){return Nu},clusterReduce:function(){return ku},createBins:function(){return zu},filterProperties:function(){return Hu},getCluster:function(){return Uu},propertiesContainsFilter:function(){return Gu}});var l={};i.r(l),i.d(l,{along:function(){return Vi},angle:function(){return hu},applyFilter:function(){return Qu},area:function(){return ki},areaFactors:function(){return E},bbox:function(){return ft},bboxClip:function(){return co},bboxPolygon:function(){return Fn},bearing:function(){return Qn},bearingToAngle:function(){return G},bearingToAzimuth:function(){return G},bezier:function(){return Sn},bezierSpline:function(){return Sn},booleanClockwise:function(){return Lo},booleanContains:function(){return _l},booleanCrosses:function(){return Dl},booleanDisjoint:function(){return ml},booleanEqual:function(){return kl},booleanIntersects:function(){return zl},booleanOverlap:function(){return Ul},booleanParallel:function(){return ql},booleanPointInPolygon:function(){return Vt},booleanPointOnLine:function(){return Yi},booleanWithin:function(){return ur},buffer:function(){return qd},center:function(){return Zn},centerMean:function(){return iu},centerMedian:function(){return su},centerOfMass:function(){return qn},centroid:function(){return Xn},circle:function(){return zn},cleanCoords:function(){return cn},clone:function(){return le},clusterEach:function(){return Nu},clusterReduce:function(){return ku},clusters:function(){return a},clustersDbscan:function(){return Hl},clustersKmeans:function(){return Zl},collect:function(){return en},collectionOf:function(){return xt},combine:function(){return Yn},concave:function(){return Ye},containsNumber:function(){return _t},convertArea:function(){return Z},convertDistance:function(){return j},convertLength:function(){return j},convex:function(){return Ht},coordAll:function(){return it},coordEach:function(){return J},coordReduce:function(){return Y},createBins:function(){return zu},degrees2radians:function(){return V},degreesToRadians:function(){return V},destination:function(){return Nn},difference:function(){return Zu},dissolve:function(){return eA},distance:function(){return qt},distanceToDegrees:function(){return Q},distanceToRadians:function(){return z},distanceWeight:function(){return mu},earthRadius:function(){return x},ellipse:function(){return eu},envelope:function(){return Dn},explode:function(){return ti},factors:function(){return b},feature:function(){return C},featureCollection:function(){return F},featureEach:function(){return et},featureOf:function(){return vt},featureReduce:function(){return nt},filterProperties:function(){return Hu},findPoint:function(){return At},findSegment:function(){return dt},flatten:function(){return mr},flattenEach:function(){return st},flattenReduce:function(){return at},flip:function(){return rn},geojsonType:function(){return yt},geomEach:function(){return rt},geomReduce:function(){return ot},geometry:function(){return B},geometryCollection:function(){return U},getCluster:function(){return Uu},getCoord:function(){return gt},getCoords:function(){return mt},getGeom:function(){return bt},getType:function(){return wt},greatCircle:function(){return Qr},helpers:function(){return t},hexGrid:function(){return oA},inside:function(){return Vt},interpolate:function(){return mA},intersect:function(){return $d},invariant:function(){return n},isNumber:function(){return W},isObject:function(){return X},isobands:function(){return Sa},isolines:function(){return Qt},kinks:function(){return Pi},length:function(){return ji},lengthToDegrees:function(){return Q},lengthToRadians:function(){return z},lineArc:function(){return Xr},lineChunk:function(){return vr},lineDistance:function(){return ji},lineEach:function(){return ut},lineIntersect:function(){return gi},lineOffset:function(){return Wa},lineOverlap:function(){return fo},lineReduce:function(){return ht},lineSegment:function(){return di},lineSlice:function(){return Wi},lineSliceAlong:function(){return Ki},lineSplit:function(){return Wr},lineString:function(){return L},lineStringToPolygon:function(){return ro},lineStrings:function(){return P},lineToPolygon:function(){return ro},mask:function(){return uA},meta:function(){return e},midpoint:function(){return Vn},moranIndex:function(){return _u},multiLineString:function(){return R},multiPoint:function(){return D},multiPolygon:function(){return O},nearest:function(){return ai},nearestPoint:function(){return ai},nearestPointOnLine:function(){return _i},nearestPointToLine:function(){return Ti},planepoint:function(){return Li},point:function(){return S},pointGrid:function(){return dr},pointOnFeature:function(){return Ui},pointOnLine:function(){return _i},pointOnSurface:function(){return Ui},pointToLineDistance:function(){return Bi},points:function(){return M},pointsWithinPolygon:function(){return Xt},polygon:function(){return T},polygonSmooth:function(){return fu},polygonTangents:function(){return Io},polygonToLine:function(){return qr},polygonToLineString:function(){return qr},polygonize:function(){return ll},polygons:function(){return I},projection:function(){return o},propEach:function(){return $},propReduce:function(){return tt},propertiesContainsFilter:function(){return Gu},radians2degrees:function(){return H},radiansToDegrees:function(){return H},radiansToDistance:function(){return k},radiansToLength:function(){return k},random:function(){return s},randomLineString:function(){return Lu},randomPoint:function(){return Tu},randomPolygon:function(){return Iu},randomPosition:function(){return Mu},rewind:function(){return Oo},rhumbBearing:function(){return xo},rhumbDestination:function(){return Eo},rhumbDistance:function(){return xi},round:function(){return N},sample:function(){return Pn},sector:function(){return _o},segmentEach:function(){return lt},segmentReduce:function(){return ct},shortestPath:function(){return oc},simplify:function(){return xn},square:function(){return Un},squareGrid:function(){return AA},standardDeviationalEllipse:function(){return cu},tag:function(){return Tn},tesselate:function(){return oi},tin:function(){return Jt},toMercator:function(){return xu},toWgs84:function(){return bu},transformRotate:function(){return Ta},transformScale:function(){return Fa},transformTranslate:function(){return Da},triangleGrid:function(){return fA},truncate:function(){return fr},union:function(){return Yd},unitsFactors:function(){return w},unkinkPolygon:function(){return Fr},validateBBox:function(){return K},validateId:function(){return q},voronoi:function(){return Yc},within:function(){return Xt}});var c={};i.r(c),i.d(c,{decode:function(){return Z$},name:function(){return j$}});var u={};i.r(u),i.d(u,{name:function(){return t0},preprocess:function(){return e0}});var h={};i.r(h),i.d(h,{name:function(){return i0},preprocess:function(){return r0}});var d={};i.r(d),i.d(d,{decode:function(){return f1},encode:function(){return g1},name:function(){return A1},preprocess:function(){return p1}});var A={};i.r(A),i.d(A,{decode:function(){return T1},name:function(){return C1}});var p={};i.r(p),i.d(p,{decode:function(){return k1},encode:function(){return z1},name:function(){return N1}});var f={};i.r(f),i.d(f,{decode:function(){return H1},encode:function(){return V1},name:function(){return G1}});var g={};i.r(g),i.d(g,{decode:function(){return W1},encode:function(){return X1},name:function(){return Z1}});var m={};i.r(m),i.d(m,{decode:function(){return $1},name:function(){return Y1}});var _={};if(i.r(_),i.d(_,{CT:function(){return bm()},pS:function(){return Ott},Qd:function(){return Itt},is:function(){return Gtt},Cx:function(){return Ett},tP:function(){return Att},Gx:function(){return Vtt},A:function(){return Ztt},C2:function(){return H7},LY:function(){return Htt},jH:function(){return U7},QT:function(){return C7},V_:function(){return L7},xt:function(){return vm},UC:function(){return K7},zg:function(){return jtt},zn:function(){return vtt},XR:function(){return l}}),"undefined"!==typeof window){var y=window.document.currentScript,v=y&&y.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);v&&(i.p=v[1])}i(7203);var x=6371008.8,b={centimeters:100*x,centimetres:100*x,degrees:x/111325,feet:3.28084*x,inches:39.37*x,kilometers:x/1e3,kilometres:x/1e3,meters:x,metres:x,miles:x/1609.344,millimeters:1e3*x,millimetres:1e3*x,nauticalmiles:x/1852,radians:1,yards:1.0936*x},w={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/x,yards:1.0936133},E={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};function C(t,e,n){void 0===n&&(n={});var i={type:"Feature"};return(0===n.id||n.id)&&(i.id=n.id),n.bbox&&(i.bbox=n.bbox),i.properties=e||{},i.geometry=t,i}function B(t,e,n){switch(void 0===n&&(n={}),t){case"Point":return S(e).geometry;case"LineString":return L(e).geometry;case"Polygon":return T(e).geometry;case"MultiPoint":return D(e).geometry;case"MultiLineString":return R(e).geometry;case"MultiPolygon":return O(e).geometry;default:throw new Error(t+" is invalid")}}function S(t,e,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(!W(t[0])||!W(t[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:t};return C(i,e,n)}function M(t,e,n){return void 0===n&&(n={}),F(t.map((function(t){return S(t,e)})),n)}function T(t,e,n){void 0===n&&(n={});for(var i=0,r=t;i<r.length;i++){var o=r[i];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:t};return C(a,e,n)}function I(t,e,n){return void 0===n&&(n={}),F(t.map((function(t){return T(t,e)})),n)}function L(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");var i={type:"LineString",coordinates:t};return C(i,e,n)}function P(t,e,n){return void 0===n&&(n={}),F(t.map((function(t){return L(t,e)})),n)}function F(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function R(t,e,n){void 0===n&&(n={});var i={type:"MultiLineString",coordinates:t};return C(i,e,n)}function D(t,e,n){void 0===n&&(n={});var i={type:"MultiPoint",coordinates:t};return C(i,e,n)}function O(t,e,n){void 0===n&&(n={});var i={type:"MultiPolygon",coordinates:t};return C(i,e,n)}function U(t,e,n){void 0===n&&(n={});var i={type:"GeometryCollection",geometries:t};return C(i,e,n)}function N(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n}function k(t,e){void 0===e&&(e="kilometers");var n=b[e];if(!n)throw new Error(e+" units is invalid");return t*n}function z(t,e){void 0===e&&(e="kilometers");var n=b[e];if(!n)throw new Error(e+" units is invalid");return t/n}function Q(t,e){return H(z(t,e))}function G(t){var e=t%360;return e<0&&(e+=360),e}function H(t){var e=t%(2*Math.PI);return 180*e/Math.PI}function V(t){var e=t%360;return e*Math.PI/180}function j(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return k(z(t,e),n)}function Z(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=E[e];if(!i)throw new Error("invalid original units");var r=E[n];if(!r)throw new Error("invalid final units");return t/i*r}function W(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function X(t){return!!t&&t.constructor===Object}function K(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(!W(t))throw new Error("bbox must only contain numbers")}))}function q(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")}function J(t,e,n){if(null!==t)for(var i,r,o,s,a,l,c,u,h=0,d=0,A=t.type,p="FeatureCollection"===A,f="Feature"===A,g=p?t.features.length:1,m=0;m<g;m++){c=p?t.features[m].geometry:f?t.geometry:t,u=!!c&&"GeometryCollection"===c.type,a=u?c.geometries.length:1;for(var _=0;_<a;_++){var y=0,v=0;if(s=u?c.geometries[_]:c,null!==s){l=s.coordinates;var x=s.type;switch(h=!n||"Polygon"!==x&&"MultiPolygon"!==x?0:1,x){case null:break;case"Point":if(!1===e(l,d,m,y,v))return!1;d++,y++;break;case"LineString":case"MultiPoint":for(i=0;i<l.length;i++){if(!1===e(l[i],d,m,y,v))return!1;d++,"MultiPoint"===x&&y++}"LineString"===x&&y++;break;case"Polygon":case"MultiLineString":for(i=0;i<l.length;i++){for(r=0;r<l[i].length-h;r++){if(!1===e(l[i][r],d,m,y,v))return!1;d++}"MultiLineString"===x&&y++,"Polygon"===x&&v++}"Polygon"===x&&y++;break;case"MultiPolygon":for(i=0;i<l.length;i++){for(v=0,r=0;r<l[i].length;r++){for(o=0;o<l[i][r].length-h;o++){if(!1===e(l[i][r][o],d,m,y,v))return!1;d++}v++}y++}break;case"GeometryCollection":for(i=0;i<s.geometries.length;i++)if(!1===J(s.geometries[i],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Y(t,e,n,i){var r=n;return J(t,(function(t,i,o,s,a){r=0===i&&void 0===n?t:e(r,t,i,o,s,a)}),i),r}function $(t,e){var n;switch(t.type){case"FeatureCollection":for(n=0;n<t.features.length;n++)if(!1===e(t.features[n].properties,n))break;break;case"Feature":e(t.properties,0);break}}function tt(t,e,n){var i=n;return $(t,(function(t,r){i=0===r&&void 0===n?t:e(i,t,r)})),i}function et(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length;n++)if(!1===e(t.features[n],n))break}function nt(t,e,n){var i=n;return et(t,(function(t,r){i=0===r&&void 0===n?t:e(i,t,r)})),i}function it(t){var e=[];return J(t,(function(t){e.push(t)})),e}function rt(t,e){var n,i,r,o,s,a,l,c,u,h,d=0,A="FeatureCollection"===t.type,p="Feature"===t.type,f=A?t.features.length:1;for(n=0;n<f;n++){for(a=A?t.features[n].geometry:p?t.geometry:t,c=A?t.features[n].properties:p?t.properties:{},u=A?t.features[n].bbox:p?t.bbox:void 0,h=A?t.features[n].id:p?t.id:void 0,l=!!a&&"GeometryCollection"===a.type,s=l?a.geometries.length:1,r=0;r<s;r++)if(o=l?a.geometries[r]:a,null!==o)switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,d,c,u,h))return!1;break;case"GeometryCollection":for(i=0;i<o.geometries.length;i++)if(!1===e(o.geometries[i],d,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,d,c,u,h))return!1;d++}}function ot(t,e,n){var i=n;return rt(t,(function(t,r,o,s,a){i=0===r&&void 0===n?t:e(i,t,r,o,s,a)})),i}function st(t,e){rt(t,(function(t,n,i,r,o){var s,a=null===t?null:t.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return!1!==e(C(t,i,{bbox:r,id:o}),n,0)&&void 0}switch(a){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon";break}for(var l=0;l<t.coordinates.length;l++){var c=t.coordinates[l],u={type:s,coordinates:c};if(!1===e(C(u,i),n,l))return!1}}))}function at(t,e,n){var i=n;return st(t,(function(t,r,o){i=0===r&&0===o&&void 0===n?t:e(i,t,r,o)})),i}function lt(t,e){st(t,(function(t,n,i){var r=0;if(t.geometry){var o=t.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var s,a=0,l=0,c=0;return!1!==J(t,(function(o,u,h,d,A){if(void 0===s||n>a||d>l||A>c)return s=o,a=n,l=d,c=A,void(r=0);var p=L([s,o],t.properties);if(!1===e(p,n,i,A,r))return!1;r++,s=o}))&&void 0}}}))}function ct(t,e,n){var i=n,r=!1;return lt(t,(function(t,o,s,a,l){i=!1===r&&void 0===n?t:e(i,t,o,s,a,l),r=!0})),i}function ut(t,e){if(!t)throw new Error("geojson is required");st(t,(function(t,n,i){if(null!==t.geometry){var r=t.geometry.type,o=t.geometry.coordinates;switch(r){case"LineString":if(!1===e(t,n,i,0,0))return!1;break;case"Polygon":for(var s=0;s<o.length;s++)if(!1===e(L(o[s],t.properties),n,i,s))return!1;break}}}))}function ht(t,e,n){var i=n;return ut(t,(function(t,r,o,s){i=0===r&&void 0===n?t:e(i,t,r,o,s)})),i}function dt(t,e){if(e=e||{},!X(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,r=e.multiFeatureIndex||0,o=e.geometryIndex||0,s=e.segmentIndex||0,a=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),a=a||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":a=a||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 s<0&&(s=l.length+s-1),L([l[s],l[s+1]],a,e);case"Polygon":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s-1),L([l[o][s],l[o][s+1]],a,e);case"MultiLineString":return r<0&&(r=l.length+r),s<0&&(s=l[r].length+s-1),L([l[r][s],l[r][s+1]],a,e);case"MultiPolygon":return r<0&&(r=l.length+r),o<0&&(o=l[r].length+o),s<0&&(s=l[r][o].length-s-1),L([l[r][o][s],l[r][o][s+1]],a,e)}throw new Error("geojson is invalid")}function At(t,e){if(e=e||{},!X(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,r=e.multiFeatureIndex||0,o=e.geometryIndex||0,s=e.coordIndex||0,a=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),a=a||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":a=a||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 S(l,a,e);case"MultiPoint":return r<0&&(r=l.length+r),S(l[r],a,e);case"LineString":return s<0&&(s=l.length+s),S(l[s],a,e);case"Polygon":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s),S(l[o][s],a,e);case"MultiLineString":return r<0&&(r=l.length+r),s<0&&(s=l[r].length+s),S(l[r][s],a,e);case"MultiPolygon":return r<0&&(r=l.length+r),o<0&&(o=l[r].length+o),s<0&&(s=l[r][o].length-s),S(l[r][o][s],a,e)}throw new Error("geojson is invalid")}function pt(t){var e=[1/0,1/0,-1/0,-1/0];return J(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}pt["default"]=pt;var ft=pt;function gt(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 mt(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 _t(t){if(t.length>1&&W(t[0])&&W(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return _t(t[0]);throw new Error("coordinates must only contain numbers")}function yt(t,e,n){if(!e||!n)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.type)}function vt(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)}function xt(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var i=0,r=t.features;i<r.length;i++){var o=r[i];if(!o||"Feature"!==o.type||!o.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!o.geometry||o.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+o.geometry.type)}}function bt(t){return"Feature"===t.type?t.geometry:t}function wt(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}var Et=i(4655),Ct={successCallback:null,verbose:!1},Bt={};function St(t,e,n){n=n||{};for(var i=Object.keys(Ct),r=0;r<i.length;r++){var o=i[r],s=n[o];s="undefined"!==typeof s&&null!==s?s:Ct[o],Bt[o]=s}Bt.verbose&&console.log("MarchingSquaresJS-isoContours: computing isocontour for "+e);var a=Rt(Tt(t,e));return"function"===typeof Bt.successCallback&&Bt.successCallback(a),a}function Mt(t,e,n){return(t-e)/(n-e)}function Tt(t,e){for(var n=t.length-1,i=t[0].length-1,r={rows:n,cols:i,cells:[]},o=0;o<n;++o){r.cells[o]=[];for(var s=0;s<i;++s){var a=0,l=t[o+1][s],c=t[o+1][s+1],u=t[o][s+1],h=t[o][s];if(!(isNaN(l)||isNaN(c)||isNaN(u)||isNaN(h))){a|=l>=e?8:0,a|=c>=e?4:0,a|=u>=e?2:0,a|=h>=e?1:0;var d,A,p,f,g=!1;if(5===a||10===a){var m=(l+c+u+h)/4;5===a&&m<e?(a=10,g=!0):10===a&&m<e&&(a=5,g=!0)}if(0!==a&&15!==a)d=A=p=f=.5,1===a?(p=1-Mt(e,l,h),A=1-Mt(e,u,h)):2===a?(A=Mt(e,h,u),f=1-Mt(e,c,u)):3===a?(p=1-Mt(e,l,h),f=1-Mt(e,c,u)):4===a?(d=Mt(e,l,c),f=Mt(e,u,c)):5===a?(d=Mt(e,l,c),f=Mt(e,u,c),A=1-Mt(e,u,h),p=1-Mt(e,l,h)):6===a?(A=Mt(e,h,u),d=Mt(e,l,c)):7===a?(p=1-Mt(e,l,h),d=Mt(e,l,c)):8===a?(p=Mt(e,h,l),d=1-Mt(e,c,l)):9===a?(A=1-Mt(e,u,h),d=1-Mt(e,c,l)):10===a?(d=1-Mt(e,c,l),f=1-Mt(e,c,u),A=Mt(e,h,u),p=Mt(e,h,l)):11===a?(d=1-Mt(e,c,l),f=1-Mt(e,c,u)):12===a?(p=Mt(e,h,l),f=Mt(e,u,c)):13===a?(A=1-Mt(e,u,h),f=Mt(e,u,c)):14===a?(p=Mt(e,h,l),A=Mt(e,h,u)):console.log("MarchingSquaresJS-isoContours: Illegal cval detected: "+a),r.cells[o][s]={cval:a,flipped:g,top:d,right:f,bottom:A,left:p}}}}return r}function It(t){return 5===t.cval||10===t.cval}function Lt(t){return 0===t.cval||15===t.cval}function Pt(t){Lt(t)||5===t.cval||10===t.cval||(t.cval=15)}function Ft(t,e){return"top"===e?[t.top,1]:"bottom"===e?[t.bottom,0]:"right"===e?[1,t.right]:"left"===e?[0,t.left]:void 0}function Rt(t){var e=[],n=0,i=1e-7;return t.cells.forEach((function(r,o){r.forEach((function(r,s){if("undefined"!==typeof r&&!It(r)&&!Lt(r)){var a=Dt(t.cells,o,s),l=!1;if("mergeable"===a.info)for(var c=a.path[a.path.length-1][0],u=a.path[a.path.length-1][1],h=n-1;h>=0;h--)if(Math.abs(e[h][0][0]-c)<=i&&Math.abs(e[h][0][1]-u)<=i){for(var d=a.path.length-2;d>=0;--d)e[h].unshift(a.path[d]);l=!0;break}l||(e[n++]=a.path)}}))})),e}function Dt(t,e,n){var i,r,o=t.length,s=[],a=[0,0,1,1,0,0,0,0,-1,0,1,1,-1,0,-1,0],l=[0,-1,0,0,1,1,1,1,0,-1,0,0,0,-1,0,0],c=["none","left","bottom","left","right","none","bottom","left","top","top","none","top","right","right","bottom","none"],u=["none","bottom","right","right","top","top","top","top","left","bottom","right","right","left","bottom","left","none"],h=t[e][n],d=h.cval,A=c[d],p=Ft(h,A);s.push([n+p[0],e+p[1]]),A=u[d],p=Ft(h,A),s.push([n+p[0],e+p[1]]),Pt(h);var f=n+a[d],g=e+l[d],m=d;while(f>=0&&g>=0&&g<o&&(f!=n||g!=e)){if(h=t[g][f],"undefined"===typeof h)break;if(d=h.cval,0===d||15===d)return{path:s,info:"mergeable"};A=u[d],i=a[d],r=l[d],5!==d&&10!==d||(5===d?h.flipped?-1===l[m]?(A="left",i=-1,r=0):(A="right",i=1,r=0):-1===a[m]&&(A="bottom",i=0,r=-1):10===d&&(h.flipped?-1===a[m]?(A="top",i=0,r=1):(A="bottom",i=0,r=-1):1===l[m]&&(A="left",i=-1,r=0))),p=Ft(h,A),s.push([f+p[0],g+p[1]]),Pt(h),f+=i,g+=r,m=d}return{path:s,info:"closed"}}function Ot(t,e){if(e=e||{},!X(e))throw new Error("options is invalid");var n=e.zProperty||"elevation",i=e.flip,r=e.flags;xt(t,"Point","input must contain Points");for(var o=Ut(t,i),s=[],a=0;a<o.length;a++){for(var l=o[a],c=[],u=0;u<l.length;u++){var h=l[u];h.properties[n]?c.push(h.properties[n]):c.push(0),!0===r&&(h.properties.matrixPosition=[a,u])}s.push(c)}return s}function Ut(t,e){var n={};et(t,(function(t){var e=mt(t)[1];n[e]||(n[e]=[]),n[e].push(t)}));var i=Object.keys(n).map((function(t){var e=n[t],i=e.sort((function(t,e){return mt(t)[0]-mt(e)[0]}));return i})),r=i.sort((function(t,n){return e?mt(t[0])[1]-mt(n[0])[1]:mt(n[0])[1]-mt(t[0])[1]}));return r}function Nt(t,e,n){if(n=n||{},!X(n))throw new Error("options is invalid");var i=n.zProperty||"elevation",r=n.commonProperties||{},o=n.breaksProperties||[];if(xt(t,"Point","Input must contain Points"),!e)throw new Error("breaks is required");if(!Array.isArray(e))throw new Error("breaks must be an Array");if(!X(r))throw new Error("commonProperties must be an Object");if(!Array.isArray(o))throw new Error("breaksProperties must be an Array");var s=Ot(t,{zProperty:i,flip:!0}),a=kt(s,e,i,r,o),l=zt(a,s,t);return F(l)}function kt(t,e,n,i,r){for(var o=[],s=1;s<e.length;s++){var a=+e[s],l=Et({},i,r[s]);l[n]=a;var c=R(St(t,a),l);o.push(c)}return o}function zt(t,e,n){var i=ft(n),r=i[2]-i[0],o=i[3]-i[1],s=i[0],a=i[1],l=e[0].length-1,c=e.length-1,u=r/l,h=o/c,d=function(t){t[0]=t[0]*u+s,t[1]=t[1]*h+a};return t.forEach((function(t){J(t,d)})),t}var Qt=Nt,Gt=i(9440);function Ht(t,e){void 0===e&&(e={}),e.concavity=e.concavity||1/0;var n=[];if(J(t,(function(t){n.push([t[0],t[1]])})),!n.length)return null;var i=Gt(n,e.concavity);return i.length>3?T([i]):null}function Vt(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var i=gt(t),r=bt(e),o=r.type,s=e.bbox,a=r.coordinates;if(s&&!1===Zt(i,s))return!1;"Polygon"===o&&(a=[a]);for(var l=!1,c=0;c<a.length&&!l;c++)if(jt(i,a[c][0],n.ignoreBoundary)){var u=!1,h=1;while(h<a[c].length&&!u)jt(i,a[c][h],!n.ignoreBoundary)&&(u=!0),h++;u||(l=!0)}return l}function jt(t,e,n){var i=!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 r=0,o=e.length-1;r<e.length;o=r++){var s=e[r][0],a=e[r][1],l=e[o][0],c=e[o][1],u=t[1]*(s-l)+a*(l-t[0])+c*(t[0]-s)===0&&(s-t[0])*(l-t[0])<=0&&(a-t[1])*(c-t[1])<=0;if(u)return!n;var h=a>t[1]!==c>t[1]&&t[0]<(l-s)*(t[1]-a)/(c-a)+s;h&&(i=!i)}return i}function Zt(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}function Wt(t,e){var n=[];return et(t,(function(t){var i=!1;if("Point"===t.geometry.type)rt(e,(function(e){Vt(t,e)&&(i=!0)})),i&&n.push(t);else{if("MultiPoint"!==t.geometry.type)throw new Error("Input geometry must be a Point or MultiPoint");var r=[];rt(e,(function(e){J(t,(function(t){Vt(t,e)&&(i=!0,r.push(t))}))})),i&&n.push(D(r))}})),F(n)}var Xt=Wt;function Kt(t,e,n){void 0===n&&(n={});var i=gt(t),r=gt(e),o=V(r[1]-i[1]),s=V(r[0]-i[0]),a=V(i[1]),l=V(r[1]),c=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(a)*Math.cos(l);return k(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),n.units)}var qt=Kt;function Jt(t,e){var n=!1;return F(ee(t.features.map((function(t){var i={x:t.geometry.coordinates[0],y:t.geometry.coordinates[1]};return e?i.z=t.properties[e]:3===t.geometry.coordinates.length&&(n=!0,i.z=t.geometry.coordinates[2]),i}))).map((function(t){var e=[t.a.x,t.a.y],i=[t.b.x,t.b.y],r=[t.c.x,t.c.y],o={};return n?(e.push(t.a.z),i.push(t.b.z),r.push(t.c.z)):o={a:t.a.z,b:t.b.z,c:t.c.z},T([[e,i,r,e]],o)})))}var Yt=function(){function t(t,e,n){this.a=t,this.b=e,this.c=n;var i,r,o=e.x-t.x,s=e.y-t.y,a=n.x-t.x,l=n.y-t.y,c=o*(t.x+e.x)+s*(t.y+e.y),u=a*(t.x+n.x)+l*(t.y+n.y),h=2*(o*(n.y-e.y)-s*(n.x-e.x));this.x=(l*c-s*u)/h,this.y=(o*u-a*c)/h,i=this.x-t.x,r=this.y-t.y,this.r=i*i+r*r}return t}();function $t(t,e){return e.x-t.x}function te(t){var e,n,i,r,o,s=t.length;t:while(s){n=t[--s],e=t[--s],i=s;while(i)if(o=t[--i],r=t[--i],e===r&&n===o||e===o&&n===r){t.splice(s,2),t.splice(i,2),s-=2;continue t}}}function ee(t){if(t.length<3)return[];t.sort($t);var e,n,i,r,o,s,a=t.length-1,l=t[a].x,c=t[0].x,u=t[a].y,h=u,d=1e-12;while(a--)t[a].y<u&&(u=t[a].y),t[a].y>h&&(h=t[a].y);var A,p=c-l,f=h-u,g=p>f?p:f,m=.5*(c+l),_=.5*(h+u),y=[new Yt({__sentinel:!0,x:m-20*g,y:_-g},{__sentinel:!0,x:m,y:_+20*g},{__sentinel:!0,x:m+20*g,y:_-g})],v=[],x=[];a=t.length;while(a--){x.length=0,A=y.length;while(A--)p=t[a].x-y[A].x,p>0&&p*p>y[A].r?(v.push(y[A]),y.splice(A,1)):(f=t[a].y-y[A].y,p*p+f*f>y[A].r||(x.push(y[A].a,y[A].b,y[A].b,y[A].c,y[A].c,y[A].a),y.splice(A,1)));te(x),A=x.length;while(A)n=x[--A],e=x[--A],i=t[a],r=n.x-e.x,o=n.y-e.y,s=2*(r*(i.y-n.y)-o*(i.x-n.x)),Math.abs(s)>d&&y.push(new Yt(e,n,i))}Array.prototype.push.apply(v,y),a=v.length;while(a--)(v[a].a.__sentinel||v[a].b.__sentinel||v[a].c.__sentinel)&&v.splice(a,1);return v}function ne(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return ie(t);case"FeatureCollection":return oe(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return se(t);default:throw new Error("unknown GeoJSON type")}}function ie(t){var e={type:"Feature"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"properties":case"geometry":return;default:e[n]=t[n]}})),e.properties=re(t.properties),e.geometry=se(t.geometry),e}function re(t){var e={};return t?(Object.keys(t).forEach((function(n){var i=t[n];"object"===typeof i?null===i?e[n]=null:Array.isArray(i)?e[n]=i.map((function(t){return t})):e[n]=re(i):e[n]=i})),e):e}function oe(t){var e={type:"FeatureCollection"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"features":return;default:e[n]=t[n]}})),e.features=t.features.map((function(t){return ie(t)})),e}function se(t){var e={type:t.type};return t.bbox&&(e.bbox=t.bbox),"GeometryCollection"===t.type?(e.geometries=t.geometries.map((function(t){return se(t)})),e):(e.coordinates=ae(t.coordinates),e)}function ae(t){var e=t;return"object"!==typeof e[0]?e.slice():e.map((function(t){return ae(t)}))}var le=ne;function ce(t,e){if(void 0===e&&(e={}),e=e||{},!X(e))throw new Error("options is invalid");var n=e.mutate;if("FeatureCollection"!==wt(t))throw new Error("geojson must be a FeatureCollection");if(!t.features.length)throw new Error("geojson is empty");!1!==n&&void 0!==n||(t=le(t));var i=[],r=ht(t,(function(t,e){var n=he(t,e);return n||(i.push(t),e)}));return r&&i.push(r),i.length?1===i.length?i[0]:R(i.map((function(t){return t.coordinates}))):null}function ue(t){return t[0].toString()+","+t[1].toString()}function he(t,e){var n,i=t.geometry.coordinates,r=e.geometry.coordinates,o=ue(i[0]),s=ue(i[i.length-1]),a=ue(r[0]),l=ue(r[r.length-1]);if(o===l)n=r.concat(i.slice(1));else if(a===s)n=i.concat(r.slice(1));else if(o===a)n=i.slice(1).reverse().concat(r);else{if(s!==l)return null;n=i.concat(r.reverse().slice(1))}return L(n)}var de=ce;function Ae(t,e){var n,i=t.length,r=i-e;while(r<--i)n=t[r],t[r++]=t[i],t[i]=n}function pe(t){return t}function fe(t){if(null==t)return pe;var e,n,i=t.scale[0],r=t.scale[1],o=t.translate[0],s=t.translate[1];return function(t,a){a||(e=n=0);var l=2,c=t.length,u=new Array(c);u[0]=(e+=t[0])*i+o,u[1]=(n+=t[1])*r+s;while(l<c)u[l]=t[l],++l;return u}}function ge(t,e){var n=fe(t.transform),i=t.arcs;function r(t,e){e.length&&e.pop();for(var r=i[t<0?~t:t],o=0,s=r.length;o<s;++o)e.push(n(r[o],o));t<0&&Ae(e,s)}function o(t){return n(t)}function s(t){for(var e=[],n=0,i=t.length;n<i;++n)r(t[n],e);return e.length<2&&e.push(e[0]),e}function a(t){var e=s(t);while(e.length<4)e.push(e[0]);return e}function l(t){return t.map(a)}function c(t){var e,n=t.type;switch(n){case"GeometryCollection":return{type:n,geometries:t.geometries.map(c)};case"Point":e=o(t.coordinates);break;case"MultiPoint":e=t.coordinates.map(o);break;case"LineString":e=s(t.arcs);break;case"MultiLineString":e=t.arcs.map(s);break;case"Polygon":e=l(t.arcs);break;case"MultiPolygon":e=t.arcs.map(l);break;default:return null}return{type:n,coordinates:e}}return c(e)}function me(t,e){var n={},i={},r={},o=[],s=-1;function a(e){var n,i=t.arcs[e<0?~e:e],r=i[0];return t.transform?(n=[0,0],i.forEach((function(t){n[0]+=t[0],n[1]+=t[1]}))):n=i[i.length-1],e<0?[n,r]:[r,n]}function l(t,e){for(var i in t){var r=t[i];delete e[r.start],delete r.start,delete r.end,r.forEach((function(t){n[t<0?~t:t]=1})),o.push(r)}}return e.forEach((function(n,i){var r,o=t.arcs[n<0?~n:n];o.length<3&&!o[1][0]&&!o[1][1]&&(r=e[++s],e[s]=n,e[i]=r)})),e.forEach((function(t){var e,n,o=a(t),s=o[0],l=o[1];if(e=r[s])if(delete r[e.end],e.push(t),e.end=l,n=i[l]){delete i[n.start];var c=n===e?e:e.concat(n);i[c.start=e.start]=r[c.end=n.end]=c}else i[e.start]=r[e.end]=e;else if(e=i[l])if(delete i[e.start],e.unshift(t),e.start=s,n=r[s]){delete r[n.end];var u=n===e?e:n.concat(e);i[u.start=n.start]=r[u.end=e.end]=u}else i[e.start]=r[e.end]=e;else e=[t],i[e.start=s]=r[e.end=l]=e})),l(r,i),l(i,r),e.forEach((function(t){n[t<0?~t:t]||o.push([t])})),o}function _e(t){var e,n=-1,i=t.length,r=t[i-1],o=0;while(++n<i)e=r,r=t[n],o+=e[0]*r[1]-e[1]*r[0];return Math.abs(o)}function ye(t){return ge(t,ve.apply(this,arguments))}function ve(t,e){var n={},i=[],r=[];function o(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(o);break;case"Polygon":s(t.arcs);break;case"MultiPolygon":t.arcs.forEach(s);break}}function s(t){t.forEach((function(e){e.forEach((function(e){(n[e=e<0?~e:e]||(n[e]=[])).push(t)}))})),i.push(t)}function a(e){return _e(ge(t,{type:"Polygon",arcs:[e]}).coordinates[0])}return e.forEach(o),i.forEach((function(t){if(!t._){var e=[],i=[t];t._=1,r.push(e);while(t=i.pop())e.push(t),t.forEach((function(t){t.forEach((function(t){n[t<0?~t:t].forEach((function(t){t._||(t._=1,i.push(t))}))}))}))}})),i.forEach((function(t){delete t._})),{type:"MultiPolygon",arcs:r.map((function(e){var i,r=[];if(e.forEach((function(t){t.forEach((function(t){t.forEach((function(t){n[t<0?~t:t].length<2&&r.push(t)}))}))})),r=me(t,r),(i=r.length)>1)for(var o,s,l=1,c=a(r[0]);l<i;++l)(o=a(r[l]))>c&&(s=r[0],r[0]=r[l],r[l]=s,c=o);return r})).filter((function(t){return t.length>0}))}}var xe=Object.prototype.hasOwnProperty;function be(t){var e=1/0,n=1/0,i=-1/0,r=-1/0;function o(t){null!=t&&xe.call(s,t.type)&&s[t.type](t)}var s={GeometryCollection:function(t){t.geometries.forEach(o)},Point:function(t){a(t.coordinates)},MultiPoint:function(t){t.coordinates.forEach(a)},LineString:function(t){l(t.arcs)},MultiLineString:function(t){t.arcs.forEach(l)},Polygon:function(t){t.arcs.forEach(l)},MultiPolygon:function(t){t.arcs.forEach(c)}};function a(t){var o=t[0],s=t[1];o<e&&(e=o),o>i&&(i=o),s<n&&(n=s),s>r&&(r=s)}function l(t){t.forEach(a)}function c(t){t.forEach(l)}for(var u in t)o(t[u]);return i>=e&&r>=n?[e,n,i,r]:void 0}function we(t,e,n,i,r){3===arguments.length&&(i=Array,r=null);for(var o=new i(t=1<<Math.max(4,Math.ceil(Math.log(t)/Math.LN2))),s=t-1,a=0;a<t;++a)o[a]=r;function l(i){var a=e(i)&s,l=o[a],c=0;while(l!=r){if(n(l,i))return!0;if(++c>=t)throw new Error("full hashset");l=o[a=a+1&s]}return o[a]=i,!0}function c(i){var a=e(i)&s,l=o[a],c=0;while(l!=r){if(n(l,i))return!0;if(++c>=t)break;l=o[a=a+1&s]}return!1}function u(){for(var t=[],e=0,n=o.length;e<n;++e){var i=o[e];i!=r&&t.push(i)}return t}return{add:l,has:c,values:u}}function Ee(t,e,n,i,r,o){3===arguments.length&&(i=o=Array,r=null);for(var s=new i(t=1<<Math.max(4,Math.ceil(Math.log(t)/Math.LN2))),a=new o(t),l=t-1,c=0;c<t;++c)s[c]=r;function u(i,o){var c=e(i)&l,u=s[c],h=0;while(u!=r){if(n(u,i))return a[c]=o;if(++h>=t)throw new Error("full hashmap");u=s[c=c+1&l]}return s[c]=i,a[c]=o,o}function h(i,o){var c=e(i)&l,u=s[c],h=0;while(u!=r){if(n(u,i))return a[c];if(++h>=t)throw new Error("full hashmap");u=s[c=c+1&l]}return s[c]=i,a[c]=o,o}function d(i,o){var c=e(i)&l,u=s[c],h=0;while(u!=r){if(n(u,i))return a[c];if(++h>=t)break;u=s[c=c+1&l]}return o}function A(){for(var t=[],e=0,n=s.length;e<n;++e){var i=s[e];i!=r&&t.push(i)}return t}return{set:u,maybeSet:h,get:d,keys:A}}function Ce(t,e){return t[0]===e[0]&&t[1]===e[1]}var Be=new ArrayBuffer(16),Se=new Float64Array(Be),Me=new Uint32Array(Be);function Te(t){Se[0]=t[0],Se[1]=t[1];var e=Me[0]^Me[1];return e=e<<5^e>>7^Me[2]^Me[3],2147483647&e}function Ie(t){var e,n,i,r,o,s=t.coordinates,a=t.lines,l=t.rings,c=b(),u=new Int32Array(s.length),h=new Int32Array(s.length),d=new Int32Array(s.length),A=new Int8Array(s.length),p=0;for(e=0,n=s.length;e<n;++e)u[e]=h[e]=d[e]=-1;for(e=0,n=a.length;e<n;++e){var f=a[e],g=f[0],m=f[1];r=c[g],o=c[++g],++p,A[r]=1;while(++g<=m)x(e,i=r,r=o,o=c[g]);++p,A[o]=1}for(e=0,n=s.length;e<n;++e)u[e]=-1;for(e=0,n=l.length;e<n;++e){var _=l[e],y=_[0]+1,v=_[1];i=c[v-1],r=c[y-1],o=c[y],x(e,i,r,o);while(++y<=v)x(e,i=r,r=o,o=c[y])}function x(t,e,n,i){if(u[n]!==t){u[n]=t;var r=h[n];if(r>=0){var o=d[n];r===e&&o===i||r===i&&o===e||(++p,A[n]=1)}else h[n]=e,d[n]=i}}function b(){for(var t=Ee(1.4*s.length,w,E,Int32Array,-1,Int32Array),e=new Int32Array(s.length),n=0,i=s.length;n<i;++n)e[n]=t.maybeSet(n,n);return e}function w(t){return Te(s[t])}function E(t,e){return Ce(s[t],s[e])}u=h=d=null;var C,B=we(1.4*p,Te,Ce);for(e=0,n=s.length;e<n;++e)A[C=c[e]]&&B.add(s[C]);return B}function Le(t){var e,n,i,r=Ie(t),o=t.coordinates,s=t.lines,a=t.rings;for(n=0,i=s.length;n<i;++n){var l=s[n],c=l[0],u=l[1];while(++c<u)r.has(o[c])&&(e={0:c,1:l[1]},l[1]=c,l=l.next=e)}for(n=0,i=a.length;n<i;++n){var h=a[n],d=h[0],A=d,p=h[1],f=r.has(o[d]);while(++A<p)r.has(o[A])&&(f?(e={0:A,1:h[1]},h[1]=A,h=h.next=e):(Pe(o,d,p,p-A),o[p]=o[d],f=!0,A=d))}return t}function Pe(t,e,n,i){Fe(t,e,n),Fe(t,e,e+i),Fe(t,e+i,n)}function Fe(t,e,n){for(var i,r=e+(n---e>>1);e<r;++e,--n)i=t[e],t[e]=t[n],t[n]=i}function Re(t){var e,n,i,r,o=t.coordinates,s=t.lines,a=t.rings,l=s.length+a.length;for(delete t.lines,delete t.rings,i=0,r=s.length;i<r;++i){e=s[i];while(e=e.next)++l}for(i=0,r=a.length;i<r;++i){n=a[i];while(n=n.next)++l}var c=Ee(2*l*1.4,Te,Ce),u=t.arcs=[];for(i=0,r=s.length;i<r;++i){e=s[i];do{h(e)}while(e=e.next)}for(i=0,r=a.length;i<r;++i)if(n=a[i],n.next)do{h(n)}while(n=n.next);else d(n);function h(t){var e,n,i,r,s,a,l,h;if(i=c.get(e=o[t[0]]))for(l=0,h=i.length;l<h;++l)if(r=i[l],A(r,t))return t[0]=r[0],void(t[1]=r[1]);if(s=c.get(n=o[t[1]]))for(l=0,h=s.length;l<h;++l)if(a=s[l],p(a,t))return t[1]=a[0],void(t[0]=a[1]);i?i.push(t):c.set(e,[t]),s?s.push(t):c.set(n,[t]),u.push(t)}function d(t){var e,n,i,r,s;if(n=c.get(e=o[t[0]]))for(r=0,s=n.length;r<s;++r){if(i=n[r],f(i,t))return t[0]=i[0],void(t[1]=i[1]);if(g(i,t))return t[0]=i[1],void(t[1]=i[0])}if(n=c.get(e=o[t[0]+m(t)]))for(r=0,s=n.length;r<s;++r){if(i=n[r],f(i,t))return t[0]=i[0],void(t[1]=i[1]);if(g(i,t))return t[0]=i[1],void(t[1]=i[0])}n?n.push(t):c.set(e,[t]),u.push(t)}function A(t,e){var n=t[0],i=e[0],r=t[1],s=e[1];if(n-r!==i-s)return!1;for(;n<=r;++n,++i)if(!Ce(o[n],o[i]))return!1;return!0}function p(t,e){var n=t[0],i=e[0],r=t[1],s=e[1];if(n-r!==i-s)return!1;for(;n<=r;++n,--s)if(!Ce(o[n],o[s]))return!1;return!0}function f(t,e){var n=t[0],i=e[0],r=t[1],s=e[1],a=r-n;if(a!==s-i)return!1;for(var l=m(t),c=m(e),u=0;u<a;++u)if(!Ce(o[n+(u+l)%a],o[i+(u+c)%a]))return!1;return!0}function g(t,e){var n=t[0],i=e[0],r=t[1],s=e[1],a=r-n;if(a!==s-i)return!1;for(var l=m(t),c=a-m(e),u=0;u<a;++u)if(!Ce(o[n+(u+l)%a],o[s-(u+c)%a]))return!1;return!0}function m(t){var e=t[0],n=t[1],i=e,r=i,s=o[i];while(++i<n){var a=o[i];(a[0]<s[0]||a[0]===s[0]&&a[1]<s[1])&&(r=i,s=a)}return r-e}return t}function De(t){var e=-1,n=t.length;while(++e<n){var i,r,o=t[e],s=0,a=1,l=o.length,c=o[0],u=c[0],h=c[1];while(++s<l)c=o[s],i=c[0],r=c[1],i===u&&r===h||(o[a++]=[i-u,r-h],u=i,h=r);1===a&&(o[a++]=[0,0]),o.length=a}return t}function Oe(t){var e=-1,n=[],i=[],r=[];function o(t){t&&xe.call(s,t.type)&&s[t.type](t)}var s={GeometryCollection:function(t){t.geometries.forEach(o)},LineString:function(t){t.arcs=a(t.arcs)},MultiLineString:function(t){t.arcs=t.arcs.map(a)},Polygon:function(t){t.arcs=t.arcs.map(l)},MultiPolygon:function(t){t.arcs=t.arcs.map(c)}};function a(t){for(var i=0,o=t.length;i<o;++i)r[++e]=t[i];var s={0:e-o+1,1:e};return n.push(s),s}function l(t){for(var n=0,o=t.length;n<o;++n)r[++e]=t[n];var s={0:e-o+1,1:e};return i.push(s),s}function c(t){return t.map(l)}for(var u in t)o(t[u]);return{type:"Topology",coordinates:r,lines:n,rings:i,objects:t}}function Ue(t){var e,n={};for(e in t)n[e]=Ne(t[e]);return n}function Ne(t){return null==t?{type:null}:("FeatureCollection"===t.type?ke:"Feature"===t.type?ze:Qe)(t)}function ke(t){var e={type:"GeometryCollection",geometries:t.features.map(ze)};return null!=t.bbox&&(e.bbox=t.bbox),e}function ze(t){var e,n=Qe(t.geometry);for(e in null!=t.id&&(n.id=t.id),null!=t.bbox&&(n.bbox=t.bbox),t.properties){n.properties=t.properties;break}return n}function Qe(t){if(null==t)return{type:null};var e="GeometryCollection"===t.type?{type:"GeometryCollection",geometries:t.geometries.map(Qe)}:"Point"===t.type||"MultiPoint"===t.type?{type:t.type,coordinates:t.coordinates}:{type:t.type,arcs:t.coordinates};return null!=t.bbox&&(e.bbox=t.bbox),e}function Ge(t,e,n){var i=e[0],r=e[1],o=e[2],s=e[3],a=o-i?(n-1)/(o-i):1,l=s-r?(n-1)/(s-r):1;function c(t){return[Math.round((t[0]-i)*a),Math.round((t[1]-r)*l)]}function u(t,e){var n,o,s,c,u,h=-1,d=0,A=t.length,p=new Array(A);while(++h<A)n=t[h],c=Math.round((n[0]-i)*a),u=Math.round((n[1]-r)*l),c===o&&u===s||(p[d++]=[o=c,s=u]);p.length=d;while(d<e)d=p.push([p[0][0],p[0][1]]);return p}function h(t){return u(t,2)}function d(t){return u(t,4)}function A(t){return t.map(d)}function p(t){null!=t&&xe.call(f,t.type)&&f[t.type](t)}var f={GeometryCollection:function(t){t.geometries.forEach(p)},Point:function(t){t.coordinates=c(t.coordinates)},MultiPoint:function(t){t.coordinates=t.coordinates.map(c)},LineString:function(t){t.arcs=h(t.arcs)},MultiLineString:function(t){t.arcs=t.arcs.map(h)},Polygon:function(t){t.arcs=A(t.arcs)},MultiPolygon:function(t){t.arcs=t.arcs.map(A)}};for(var g in t)p(t[g]);return{scale:[1/a,1/l],translate:[i,r]}}function He(t,e){var n=be(t=Ue(t)),i=e>0&&n&&Ge(t,n,e),r=Re(Le(Oe(t))),o=r.coordinates,s=Ee(1.4*r.arcs.length,Ve,je);function a(t){t&&xe.call(l,t.type)&&l[t.type](t)}t=r.objects,r.bbox=n,r.arcs=r.arcs.map((function(t,e){return s.set(t,e),o.slice(t[0],t[1]+1)})),delete r.coordinates,o=null;var l={GeometryCollection:function(t){t.geometries.forEach(a)},LineString:function(t){t.arcs=c(t.arcs)},MultiLineString:function(t){t.arcs=t.arcs.map(c)},Polygon:function(t){t.arcs=t.arcs.map(c)},MultiPolygon:function(t){t.arcs=t.arcs.map(u)}};function c(t){var e=[];do{var n=s.get(t);e.push(t[0]<t[1]?n:~n)}while(t=t.next);return e}function u(t){return t.map(c)}for(var h in t)a(t[h]);return i&&(r.transform=i,r.arcs=De(r.arcs)),r}function Ve(t){var e,n=t[0],i=t[1];return i<n&&(e=n,n=i,i=e),n+31*i}function je(t,e){var n,i=t[0],r=t[1],o=e[0],s=e[1];return r<i&&(n=i,i=r,r=n),s<o&&(n=o,o=s,s=n),i===o&&r===s}function Ze(t,e){if(void 0===e&&(e={}),"FeatureCollection"!==wt(t))throw new Error("geojson must be a FeatureCollection");if(!t.features.length)throw new Error("geojson is empty");!1!==e.mutate&&void 0!==e.mutate||(t=le(t));var n=[];st(t,(function(t){n.push(t.geometry)}));var i=He({geoms:U(n).geometry}),r=ye(i,i.objects.geoms.geometries);return r}function We(t,e){if(void 0===e&&(e={}),e=e||{},!X(e))throw new Error("options is invalid");var n=e.mutate;if("FeatureCollection"!==wt(t))throw new Error("geojson must be a FeatureCollection");if(!t.features.length)throw new Error("geojson is empty");!1!==n&&void 0!==n||(t=le(t));var i=Xe(t);if(!i)throw new Error("geojson must be homogenous");var r=t;switch(i){case"LineString":return de(r,e);case"Polygon":return Ze(r,e);default:throw new Error(i+" is not supported")}}function Xe(t){var e={};st(t,(function(t){e[t.geometry.type]=!0}));var n=Object.keys(e);return 1===n.length?n[0]:null}var Ke=We;function qe(t,e){void 0===e&&(e={});var n=e.maxEdge||1/0,i=Je(t),r=Jt(i);if(r.features=r.features.filter((function(t){var i=t.geometry.coordinates[0][0],r=t.geometry.coordinates[0][1],o=t.geometry.coordinates[0][2],s=qt(i,r,e),a=qt(r,o,e),l=qt(i,o,e);return s<=n&&a<=n&&l<=n})),r.features.length<1)return null;var o=Ke(r);return 1===o.coordinates.length&&(o.coordinates=o.coordinates[0],o.type="Polygon"),C(o)}function Je(t){var e=[],n={};return et(t,(function(t){if(t.geometry){var i=t.geometry.coordinates.join("-");Object.prototype.hasOwnProperty.call(n,i)||(e.push(t),n[i]=!0)}})),F(e)}var Ye=qe,$e=i(513);function tn(t,e,n,i){var r=$e(6),o=e.features.map((function(t){var e;return{minX:t.geometry.coordinates[0],minY:t.geometry.coordinates[1],maxX:t.geometry.coordinates[0],maxY:t.geometry.coordinates[1],property:null===(e=t.properties)||void 0===e?void 0:e[n]}}));return r.load(o),t.features.forEach((function(t){t.properties||(t.properties={});var e=ft(t),n=r.search({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}),o=[];n.forEach((function(e){Vt([e.minX,e.minY],t)&&o.push(e.property)})),t.properties[i]=o})),t}var en=tn;function nn(t,e){if(e=e||{},!X(e))throw new Error("options is invalid");var n=e.mutate;if(!t)throw new Error("geojson is required");return!1!==n&&void 0!==n||(t=le(t)),J(t,(function(t){var e=t[0],n=t[1];t[0]=n,t[1]=e})),t}var rn=nn;function on(t,e){void 0===e&&(e={});var n="object"===typeof e?e.mutate:e;if(!t)throw new Error("geojson is required");var i=wt(t),r=[];switch(i){case"LineString":r=sn(t);break;case"MultiLineString":case"Polygon":mt(t).forEach((function(t){r.push(sn(t))}));break;case"MultiPolygon":mt(t).forEach((function(t){var e=[];t.forEach((function(t){e.push(sn(t))})),r.push(e)}));break;case"Point":return t;case"MultiPoint":var o={};mt(t).forEach((function(t){var e=t.join("-");Object.prototype.hasOwnProperty.call(o,e)||(r.push(t),o[e]=!0)}));break;default:throw new Error(i+" geometry not supported")}return t.coordinates?!0===n?(t.coordinates=r,t):{type:i,coordinates:r}:!0===n?(t.geometry.coordinates=r,t):C({type:i,coordinates:r},t.properties,{bbox:t.bbox,id:t.id})}function sn(t){var e=mt(t);if(2===e.length&&!an(e[0],e[1]))return e;var n=[],i=e.length-1,r=n.length;n.push(e[0]);for(var o=1;o<i;o++){var s=n[n.length-1];e[o][0]===s[0]&&e[o][1]===s[1]||(n.push(e[o]),r=n.length,r>2&&ln(n[r-3],n[r-1],n[r-2])&&n.splice(n.length-2,1))}if(n.push(e[e.length-1]),r=n.length,an(e[0],e[e.length-1])&&r<4)throw new Error("invalid polygon");return ln(n[r-3],n[r-1],n[r-2])&&n.splice(n.length-2,1),n}function an(t,e){return t[0]===e[0]&&t[1]===e[1]}function ln(t,e,n){var i=n[0],r=n[1],o=t[0],s=t[1],a=e[0],l=e[1],c=i-o,u=r-s,h=a-o,d=l-s,A=c*d-u*h;return 0===A&&(Math.abs(h)>=Math.abs(d)?h>0?o<=i&&i<=a:a<=i&&i<=o:d>0?s<=r&&r<=l:l<=r&&r<=s)}var cn=on;function un(t,e){var n=t.x-e.x,i=t.y-e.y;return n*n+i*i}function hn(t,e,n){var i=e.x,r=e.y,o=n.x-i,s=n.y-r;if(0!==o||0!==s){var a=((t.x-i)*o+(t.y-r)*s)/(o*o+s*s);a>1?(i=n.x,r=n.y):a>0&&(i+=o*a,r+=s*a)}return o=t.x-i,s=t.y-r,o*o+s*s}function dn(t,e){for(var n,i=t[0],r=[i],o=1,s=t.length;o<s;o++)n=t[o],un(n,i)>e&&(r.push(n),i=n);return i!==n&&r.push(n),r}function An(t,e,n,i,r){for(var o,s=i,a=e+1;a<n;a++){var l=hn(t[a],t[e],t[n]);l>s&&(o=a,s=l)}s>i&&(o-e>1&&An(t,e,o,i,r),r.push(t[o]),n-o>1&&An(t,o,n,i,r))}function pn(t,e){var n=t.length-1,i=[t[0]];return An(t,0,n,e,i),i.push(t[n]),i}function fn(t,e,n){if(t.length<=2)return t;var i=void 0!==e?e*e:1;return t=n?t:dn(t,i),t=pn(t,i),t}function gn(t,e){if(e=e||{},!X(e))throw new Error("options is invalid");var n=void 0!==e.tolerance?e.tolerance:1,i=e.highQuality||!1,r=e.mutate||!1;if(!t)throw new Error("geojson is required");if(n&&n<0)throw new Error("invalid tolerance");return!0!==r&&(t=le(t)),rt(t,(function(t){mn(t,n,i)})),t}function mn(t,e,n){var i=t.type;if("Point"===i||"MultiPoint"===i)return t;cn(t,!0);var r=t.coordinates;switch(i){case"LineString":t["coordinates"]=_n(r,e,n);break;case"MultiLineString":t["coordinates"]=r.map((function(t){return _n(t,e,n)}));break;case"Polygon":t["coordinates"]=yn(r,e,n);break;case"MultiPolygon":t["coordinates"]=r.map((function(t){return yn(t,e,n)}))}return t}function _n(t,e,n){return fn(t.map((function(t){return{x:t[0],y:t[1],z:t[2]}})),e,n).map((function(t){return t.z?[t.x,t.y,t.z]:[t.x,t.y]}))}function yn(t,e,n){return t.map((function(t){var i=t.map((function(t){return{x:t[0],y:t[1]}}));if(i.length<4)throw new Error("invalid polygon");var r=fn(i,e,n).map((function(t){return[t.x,t.y]}));while(!vn(r))e-=.01*e,r=fn(i,e,n).map((function(t){return[t.x,t.y]}));return r[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||r.push(r[0]),r}))}function vn(t){return!(t.length<3)&&!(3===t.length&&t[2][0]===t[0][0]&&t[2][1]===t[0][1])}var xn=gn,bn=function(){function t(t){this.points=t.points||[],this.duration=t.duration||1e4,this.sharpness=t.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=t.stepLength||60,this.length=this.points.length,this.delay=0;for(var e=0;e<this.length;e++)this.points[e].z=this.points[e].z||0;for(e=0;e<this.length-1;e++){var n=this.points[e],i=this.points[e+1];this.centers.push({x:(n.x+i.x)/2,y:(n.y+i.y)/2,z:(n.z+i.z)/2})}this.controls.push([this.points[0],this.points[0]]);for(e=0;e<this.centers.length-1;e++){var r=this.points[e+1].x-(this.centers[e].x+this.centers[e+1].x)/2,o=this.points[e+1].y-(this.centers[e].y+this.centers[e+1].y)/2,s=this.points[e+1].z-(this.centers[e].y+this.centers[e+1].z)/2;this.controls.push([{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e].x+r),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e].y+o),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e].z+s)},{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e+1].x+r),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e+1].y+o),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e+1].z+s)}])}return this.controls.push([this.points[this.length-1],this.points[this.length-1]]),this.steps=this.cacheSteps(this.stepLength),this}return t.prototype.cacheSteps=function(t){var e=[],n=this.pos(0);e.push(0);for(var i=0;i<this.duration;i+=10){var r=this.pos(i),o=Math.sqrt((r.x-n.x)*(r.x-n.x)+(r.y-n.y)*(r.y-n.y)+(r.z-n.z)*(r.z-n.z));o>t&&(e.push(i),n=r)}return e},t.prototype.vector=function(t){var e=this.pos(t+10),n=this.pos(t-10);return{angle:180*Math.atan2(e.y-n.y,e.x-n.x)/3.14,speed:Math.sqrt((n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y)+(n.z-e.z)*(n.z-e.z))}},t.prototype.pos=function(t){var e=t-this.delay;e<0&&(e=0),e>this.duration&&(e=this.duration-1);var n=e/this.duration;if(n>=1)return this.points[this.length-1];var i=Math.floor((this.points.length-1)*n),r=(this.length-1)*n-i;return En(r,this.points[i],this.controls[i][1],this.controls[i+1][0],this.points[i+1])},t}(),wn=bn;function En(t,e,n,i,r){var o=Cn(t),s={x:r.x*o[0]+i.x*o[1]+n.x*o[2]+e.x*o[3],y:r.y*o[0]+i.y*o[1]+n.y*o[2]+e.y*o[3],z:r.z*o[0]+i.z*o[1]+n.z*o[2]+e.z*o[3]};return s}function Cn(t){var e=t*t,n=e*t;return[n,3*e*(1-t),3*t*(1-t)*(1-t),(1-t)*(1-t)*(1-t)]}function Bn(t,e){void 0===e&&(e={});for(var n=e.resolution||1e4,i=e.sharpness||.85,r=[],o=bt(t).coordinates.map((function(t){return{x:t[0],y:t[1]}})),s=new wn({duration:n,points:o,sharpness:i}),a=function(t){var e=s.pos(t);Math.floor(t/100)%2===0&&r.push([e.x,e.y])},l=0;l<s.duration;l+=10)a(l);return a(s.duration),L(r,e.properties)}var Sn=Bn;function Mn(t,e,n,i){return t=le(t),e=le(e),et(t,(function(t){t.properties||(t.properties={}),et(e,(function(e){void 0===t.properties[i]&&Vt(t,e)&&(t.properties[i]=e.properties[n])}))})),t}var Tn=Mn;function In(t,e){if(!t)throw new Error("featurecollection is required");if(null===e||void 0===e)throw new Error("num is required");if("number"!==typeof e)throw new Error("num must be a number");var n=F(Ln(t.features,e));return n}function Ln(t,e){var n,i,r=t.slice(0),o=t.length,s=o-e;while(o-- >s)i=Math.floor((o+1)*Math.random()),n=r[i],r[i]=r[o],r[o]=n;return r.slice(s)}var Pn=In;function Fn(t,e){void 0===e&&(e={});var n=Number(t[0]),i=Number(t[1]),r=Number(t[2]),o=Number(t[3]);if(6===t.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var s=[n,i],a=[n,o],l=[r,o],c=[r,i];return T([[s,c,l,a,s]],e.properties,{bbox:t,id:e.id})}function Rn(t){return Fn(ft(t))}var Dn=Rn;function On(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=qt(t.slice(0,2),[i,n]),s=qt(t.slice(0,2),[e,r]);if(o>=s){var a=(n+r)/2;return[e,a-(i-e)/2,i,a+(i-e)/2]}var l=(e+i)/2;return[l-(r-n)/2,n,l+(r-n)/2,r]}var Un=On;function Nn(t,e,n,i){void 0===i&&(i={});var r=gt(t),o=V(r[0]),s=V(r[1]),a=V(n),l=z(e,i.units),c=Math.asin(Math.sin(s)*Math.cos(l)+Math.cos(s)*Math.sin(l)*Math.cos(a)),u=o+Math.atan2(Math.sin(a)*Math.sin(l)*Math.cos(s),Math.cos(l)-Math.sin(s)*Math.sin(c)),h=H(u),d=H(c);return S([h,d],i.properties)}function kn(t,e,n){void 0===n&&(n={});for(var i=n.steps||64,r=n.properties?n.properties:!Array.isArray(t)&&"Feature"===t.type&&t.properties?t.properties:{},o=[],s=0;s<i;s++)o.push(Nn(t,e,-360*s/i,n).geometry.coordinates);return o.push(o[0]),T([o],r)}var zn=kn;function Qn(t,e,n){if(void 0===n&&(n={}),!0===n.final)return Gn(t,e);var i=gt(t),r=gt(e),o=V(i[0]),s=V(r[0]),a=V(i[1]),l=V(r[1]),c=Math.sin(s-o)*Math.cos(l),u=Math.cos(a)*Math.sin(l)-Math.sin(a)*Math.cos(l)*Math.cos(s-o);return H(Math.atan2(c,u))}function Gn(t,e){var n=Qn(e,t);return n=(n+180)%360,n}function Hn(t,e){var n=qt(t,e),i=Qn(t,e),r=Nn(t,n/2,i);return r}var Vn=Hn;function jn(t,e){void 0===e&&(e={});var n=ft(t),i=(n[0]+n[2])/2,r=(n[1]+n[3])/2;return S([i,r],e.properties,e)}var Zn=jn;function Wn(t,e){void 0===e&&(e={});var n=0,i=0,r=0;return J(t,(function(t){n+=t[0],i+=t[1],r++}),!0),S([n/r,i/r],e.properties)}var Xn=Wn;function Kn(t,e){switch(void 0===e&&(e={}),wt(t)){case"Point":return S(gt(t),e.properties);case"Polygon":var n=[];J(t,(function(t){n.push(t)}));var i,r,o,s,a,l,c,u,h=Xn(t,{properties:e.properties}),d=h.geometry.coordinates,A=0,p=0,f=0,g=n.map((function(t){return[t[0]-d[0],t[1]-d[1]]}));for(i=0;i<n.length-1;i++)r=g[i],s=r[0],l=r[1],o=g[i+1],a=o[0],c=o[1],u=s*c-a*l,f+=u,A+=(s+a)*u,p+=(l+c)*u;if(0===f)return h;var m=.5*f,_=1/(6*m);return S([d[0]+_*A,d[1]+_*p],e.properties);default:var y=Ht(t);return y?Kn(y,{properties:e.properties}):Xn(t,{properties:e.properties})}}var qn=Kn;function Jn(t){var e={MultiPoint:{coordinates:[],properties:[]},MultiLineString:{coordinates:[],properties:[]},MultiPolygon:{coordinates:[],properties:[]}};return et(t,(function(t){var n,i,r,o;switch(null===(o=t.geometry)||void 0===o?void 0:o.type){case"Point":e.MultiPoint.coordinates.push(t.geometry.coordinates),e.MultiPoint.properties.push(t.properties);break;case"MultiPoint":(n=e.MultiPoint.coordinates).push.apply(n,t.geometry.coordinates),e.MultiPoint.properties.push(t.properties);break;case"LineString":e.MultiLineString.coordinates.push(t.geometry.coordinates),e.MultiLineString.properties.push(t.properties);break;case"MultiLineString":(i=e.MultiLineString.coordinates).push.apply(i,t.geometry.coordinates),e.MultiLineString.properties.push(t.properties);break;case"Polygon":e.MultiPolygon.coordinates.push(t.geometry.coordinates),e.MultiPolygon.properties.push(t.properties);break;case"MultiPolygon":(r=e.MultiPolygon.coordinates).push.apply(r,t.geometry.coordinates),e.MultiPolygon.properties.push(t.properties);break;default:break}})),F(Object.keys(e).filter((function(t){return e[t].coordinates.length})).sort().map((function(t){var n={type:t,coordinates:e[t].coordinates},i={collectedProperties:e[t].properties};return C(n,i)})))}var Yn=Jn;function $n(t){var e=[];return"FeatureCollection"===t.type?et(t,(function(t){J(t,(function(n){e.push(S(n,t.properties))}))})):J(t,(function(n){e.push(S(n,t.properties))})),F(e)}var ti=$n,ei=i(6120);function ni(t){if(!t.geometry||"Polygon"!==t.geometry.type&&"MultiPolygon"!==t.geometry.type)throw new Error("input must be a Polygon or MultiPolygon");var e={type:"FeatureCollection",features:[]};return"Polygon"===t.geometry.type?e.features=ii(t.geometry.coordinates):t.geometry.coordinates.forEach((function(t){e.features=e.features.concat(ii(t))})),e}function ii(t){var e=ri(t),n=2,i=ei(e.vertices,e.holes,n),r=[],o=[];i.forEach((function(t,r){var s=i[r];o.push([e.vertices[s*n],e.vertices[s*n+1]])}));for(var s=0;s<o.length;s+=3){var a=o.slice(s,s+3);a.push(o[s]),r.push(T([a]))}return r}function ri(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},i=0,r=0;r<t.length;r++){for(var o=0;o<t[r].length;o++)for(var s=0;s<e;s++)n.vertices.push(t[r][o][s]);r>0&&(i+=t[r-1].length,n.holes.push(i))}return n}var oi=ni;function si(t,e){if(!t)throw new Error("targetPoint is required");if(!e)throw new Error("points is required");var n,i=1/0,r=0;return et(e,(function(e,n){var o=qt(t,e);o<i&&(r=n,i=o)})),n=le(e.features[r]),n.properties.featureIndex=r,n.properties.distanceToPoint=i,n}var ai=si;function li(t){if(!t)throw new Error("geojson is required");var e=[];return st(t,(function(t){ci(t,e)})),F(e)}function ci(t,e){var n=[],i=t.geometry;if(null!==i){switch(i.type){case"Polygon":n=mt(i);break;case"LineString":n=[mt(i)]}n.forEach((function(n){var i=ui(n,t.properties);i.forEach((function(t){t.id=e.length,e.push(t)}))}))}}function ui(t,e){var n=[];return t.reduce((function(t,i){var r=L([t,i],e);return r.bbox=hi(t,i),n.push(r),i})),n}function hi(t,e){var n=t[0],i=t[1],r=e[0],o=e[1],s=n<r?n:r,a=i<o?i:o,l=n>r?n:r,c=i>o?i:o;return[s,a,l,c]}var di=li,Ai=i(1494);function pi(t,e){var n={},i=[];if("LineString"===t.type&&(t=C(t)),"LineString"===e.type&&(e=C(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 r=fi(t,e);return r&&i.push(r),F(i)}var o=Ai();return o.load(di(e)),et(di(t),(function(t){et(o.search(t),(function(e){var r=fi(t,e);if(r){var o=mt(r).join(",");n[o]||(n[o]=!0,i.push(r))}}))})),F(i)}function fi(t,e){var n=mt(t),i=mt(e);if(2!==n.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==i.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var r=n[0][0],o=n[0][1],s=n[1][0],a=n[1][1],l=i[0][0],c=i[0][1],u=i[1][0],h=i[1][1],d=(h-c)*(s-r)-(u-l)*(a-o),A=(u-l)*(o-c)-(h-c)*(r-l),p=(s-r)*(o-c)-(a-o)*(r-l);if(0===d)return null;var f=A/d,g=p/d;if(f>=0&&f<=1&&g>=0&&g<=1){var m=r+f*(s-r),_=o+f*(a-o);return S([m,_])}return null}var gi=pi;function mi(t,e,n){void 0===n&&(n={});var i=S([1/0,1/0],{dist:1/0}),r=0;return st(t,(function(t){for(var o=mt(t),s=0;s<o.length-1;s++){var a=S(o[s]);a.properties.dist=qt(e,a,n);var l=S(o[s+1]);l.properties.dist=qt(e,l,n);var c=qt(a,l,n),u=Math.max(a.properties.dist,l.properties.dist),h=Qn(a,l),d=Nn(e,u,h+90,n),A=Nn(e,u,h-90,n),p=gi(L([d.geometry.coordinates,A.geometry.coordinates]),L([a.geometry.coordinates,l.geometry.coordinates])),f=null;p.features.length>0&&(f=p.features[0],f.properties.dist=qt(e,f,n),f.properties.location=r+qt(a,f,n)),a.properties.dist<i.properties.dist&&(i=a,i.properties.index=s,i.properties.location=r),l.properties.dist<i.properties.dist&&(i=l,i.properties.index=s+1,i.properties.location=r+c),f&&f.properties.dist<i.properties.dist&&(i=f,i.properties.index=s),r+=c}})),i}var _i=mi;function yi(t,e,n){void 0===n&&(n={});var i=gt(t),r=gt(e);r[0]+=r[0]-i[0]>180?-360:i[0]-r[0]>180?360:0;var o=vi(i,r),s=j(o,"meters",n.units);return s}function vi(t,e,n){n=void 0===n?x:Number(n);var i=n,r=t[1]*Math.PI/180,o=e[1]*Math.PI/180,s=o-r,a=Math.abs(e[0]-t[0])*Math.PI/180;a>Math.PI&&(a-=2*Math.PI);var l=Math.log(Math.tan(o/2+Math.PI/4)/Math.tan(r/2+Math.PI/4)),c=Math.abs(l)>1e-11?s/l:Math.cos(r),u=Math.sqrt(s*s+c*c*a*a),h=u*i;return h}var xi=yi;function bi(t,e,n){if(void 0===n&&(n={}),n.method||(n.method="geodesic"),n.units||(n.units="kilometers"),!t)throw new Error("pt is required");if(Array.isArray(t)?t=S(t):"Point"===t.type?t=C(t):vt(t,"Point","point"),!e)throw new Error("line is required");Array.isArray(e)?e=L(e):"LineString"===e.type?e=C(e):vt(e,"LineString","line");var i=1/0,r=t.geometry.coordinates;return lt(e,(function(t){var e=t.geometry.coordinates[0],o=t.geometry.coordinates[1],s=wi(r,e,o,n);s<i&&(i=s)})),j(i,"degrees",n.units)}function wi(t,e,n,i){var r=[n[0]-e[0],n[1]-e[1]],o=[t[0]-e[0],t[1]-e[1]],s=Ei(o,r);if(s<=0)return Ci(t,e,{method:i.method,units:"degrees"});var a=Ei(r,r);if(a<=s)return Ci(t,n,{method:i.method,units:"degrees"});var l=s/a,c=[e[0]+l*r[0],e[1]+l*r[1]];return Ci(t,c,{method:i.method,units:"degrees"})}function Ei(t,e){return t[0]*e[0]+t[1]*e[1]}function Ci(t,e,n){return"planar"===n.method?xi(t,e,n):qt(t,e,n)}var Bi=bi;function Si(t,e,n){void 0===n&&(n={});var i=n.units,r=n.properties||{},o=Mi(t);if(!o.features.length)throw new Error("points must contain features");if(!e)throw new Error("line is required");if("LineString"!==wt(e))throw new Error("line must be a LineString");var s=1/0,a=null;return et(o,(function(t){var n=Bi(t,e,{units:i});n<s&&(s=n,a=t)})),a&&(a.properties=Et({dist:s},a.properties,r)),a}function Mi(t){var e=[],n=t.geometry?t.geometry.type:t.type;switch(n){case"GeometryCollection":return rt(t,(function(t){"Point"===t.type&&e.push({type:"Feature",properties:{},geometry:t})})),{type:"FeatureCollection",features:e};case"FeatureCollection":return t.features=t.features.filter((function(t){return"Point"===t.geometry.type})),t;default:throw new Error("points must be a Point Collection")}}var Ti=Si;function Ii(t,e){var n=gt(t),i=bt(e),r=i.coordinates,o=r[0];if(o.length<4)throw new Error("OuterRing of a Polygon must have 4 or more Positions.");var s=e.properties||{},a=s.a,l=s.b,c=s.c,u=n[0],h=n[1],d=o[0][0],A=o[0][1],p=void 0!==a?a:o[0][2],f=o[1][0],g=o[1][1],m=void 0!==l?l:o[1][2],_=o[2][0],y=o[2][1],v=void 0!==c?c:o[2][2],x=(v*(u-d)*(h-g)+p*(u-f)*(h-y)+m*(u-_)*(h-A)-m*(u-d)*(h-y)-v*(u-f)*(h-A)-p*(u-_)*(h-g))/((u-d)*(h-g)+(u-f)*(h-y)+(u-_)*(h-A)-(u-d)*(h-y)-(u-f)*(h-A)-(u-_)*(h-g));return x}var Li=Ii;function Pi(t){var e,n,i={type:"FeatureCollection",features:[]};if(n="Feature"===t.type?t.geometry:t,"LineString"===n.type)e=[n.coordinates];else if("MultiLineString"===n.type)e=n.coordinates;else if("MultiPolygon"===n.type)e=[].concat.apply([],n.coordinates);else{if("Polygon"!==n.type)throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");e=n.coordinates}return e.forEach((function(t){e.forEach((function(e){for(var n=0;n<t.length-1;n++)for(var r=n;r<e.length-1;r++){if(t===e){if(1===Math.abs(n-r))continue;if(0===n&&r===t.length-2&&t[n][0]===t[t.length-1][0]&&t[n][1]===t[t.length-1][1])continue}var o=Fi(t[n][0],t[n][1],t[n+1][0],t[n+1][1],e[r][0],e[r][1],e[r+1][0],e[r+1][1]);o&&i.features.push(S([o[0],o[1]]))}}))})),i}function Fi(t,e,n,i,r,o,s,a){var l,c,u,h,d,A={x:null,y:null,onLine1:!1,onLine2:!1};return l=(a-o)*(n-t)-(s-r)*(i-e),0===l?null!==A.x&&null!==A.y&&A:(c=e-o,u=t-r,h=(s-r)*c-(a-o)*u,d=(n-t)*c-(i-e)*u,c=h/l,u=d/l,A.x=t+c*(n-t),A.y=e+c*(i-e),c>=0&&c<=1&&(A.onLine1=!0),u>=0&&u<=1&&(A.onLine2=!0),!(!A.onLine1||!A.onLine2)&&[A.x,A.y])}function Ri(t){var e=Di(t),n=Zn(e),i=!1,r=0;while(!i&&r<e.features.length){var o,s,a,l,c,u,h,d=e.features[r].geometry,A=!1;if("Point"===d.type)n.geometry.coordinates[0]===d.coordinates[0]&&n.geometry.coordinates[1]===d.coordinates[1]&&(i=!0);else if("MultiPoint"===d.type){var p=!1;h=0;while(!p&&h<d.coordinates.length)n.geometry.coordinates[0]===d.coordinates[h][0]&&n.geometry.coordinates[1]===d.coordinates[h][1]&&(i=!0,p=!0),h++}else if("LineString"===d.type){h=0;while(!A&&h<d.coordinates.length-1)o=n.geometry.coordinates[0],s=n.geometry.coordinates[1],a=d.coordinates[h][0],l=d.coordinates[h][1],c=d.coordinates[h+1][0],u=d.coordinates[h+1][1],Oi(o,s,a,l,c,u)&&(A=!0,i=!0),h++}else if("MultiLineString"===d.type){var f=0;while(f<d.coordinates.length){A=!1,h=0;var g=d.coordinates[f];while(!A&&h<g.length-1)o=n.geometry.coordinates[0],s=n.geometry.coordinates[1],a=g[h][0],l=g[h][1],c=g[h+1][0],u=g[h+1][1],Oi(o,s,a,l,c,u)&&(A=!0,i=!0),h++;f++}}else"Polygon"!==d.type&&"MultiPolygon"!==d.type||Vt(n,d)&&(i=!0);r++}if(i)return n;var m=F([]);for(r=0;r<e.features.length;r++)m.features=m.features.concat(ti(e.features[r]).features);return S(ai(n,m).geometry.coordinates)}function Di(t){return"FeatureCollection"!==t.type?"Feature"!==t.type?F([C(t)]):F([t]):t}function Oi(t,e,n,i,r,o){var s=Math.sqrt((r-n)*(r-n)+(o-i)*(o-i)),a=Math.sqrt((t-n)*(t-n)+(e-i)*(e-i)),l=Math.sqrt((r-t)*(r-t)+(o-e)*(o-e));return s===a+l}var Ui=Ri,Ni=6378137;function ki(t){return ot(t,(function(t,e){return t+zi(e)}),0)}function zi(t){var e,n=0;switch(t.type){case"Polygon":return Qi(t.coordinates);case"MultiPolygon":for(e=0;e<t.coordinates.length;e++)n+=Qi(t.coordinates[e]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function Qi(t){var e=0;if(t&&t.length>0){e+=Math.abs(Gi(t[0]));for(var n=1;n<t.length;n++)e-=Math.abs(Gi(t[n]))}return e}function Gi(t){var e,n,i,r,o,s,a,l=0,c=t.length;if(c>2){for(a=0;a<c;a++)a===c-2?(r=c-2,o=c-1,s=0):a===c-1?(r=c-1,o=0,s=1):(r=a,o=a+1,s=a+2),e=t[r],n=t[o],i=t[s],l+=(Hi(i[0])-Hi(e[0]))*Math.sin(Hi(n[1]));l=l*Ni*Ni/2}return l}function Hi(t){return t*Math.PI/180}function Vi(t,e,n){void 0===n&&(n={});for(var i=bt(t),r=i.coordinates,o=0,s=0;s<r.length;s++){if(e>=o&&s===r.length-1)break;if(o>=e){var a=e-o;if(a){var l=Qn(r[s],r[s-1])-180,c=Nn(r[s],a,l,n);return c}return S(r[s])}o+=qt(r[s],r[s+1],n)}return S(r[r.length-1])}function ji(t,e){return void 0===e&&(e={}),ct(t,(function(t,n){var i=n.geometry.coordinates;return t+qt(i[0],i[1],e)}),0)}function Zi(t,e,n){var i=mt(n);if("LineString"!==wt(n))throw new Error("line must be a LineString");var r,o=_i(n,t),s=_i(n,e);r=o.properties.index<=s.properties.index?[o,s]:[s,o];for(var a=[r[0].geometry.coordinates],l=r[0].properties.index+1;l<r[1].properties.index+1;l++)a.push(i[l]);return a.push(r[1].geometry.coordinates),L(a,n.properties)}var Wi=Zi;function Xi(t,e,n,i){if(i=i||{},!X(i))throw new Error("options is invalid");var r,o=[];if("Feature"===t.type)r=t.geometry.coordinates;else{if("LineString"!==t.type)throw new Error("input must be a LineString Feature or Geometry");r=t.coordinates}for(var s,a,l,c=r.length,u=0,h=0;h<r.length;h++){if(e>=u&&h===r.length-1)break;if(u>e&&0===o.length){if(s=e-u,!s)return o.push(r[h]),L(o);a=Qn(r[h],r[h-1])-180,l=Nn(r[h],s,a,i),o.push(l.geometry.coordinates)}if(u>=n)return s=n-u,s?(a=Qn(r[h],r[h-1])-180,l=Nn(r[h],s,a,i),o.push(l.geometry.coordinates),L(o)):(o.push(r[h]),L(o));if(u>=e&&o.push(r[h]),h===r.length-1)return L(o);u+=qt(r[h],r[h+1],i)}if(u<e&&r.length===c)throw new Error("Start position is beyond line");var d=r[r.length-1];return L([d,d])}var Ki=Xi;function qi(t,e,n){void 0===n&&(n={});for(var i=gt(t),r=mt(e),o=0;o<r.length-1;o++){var s=!1;if(n.ignoreEndVertices&&(0===o&&(s="start"),o===r.length-2&&(s="end"),0===o&&o+1===r.length-1&&(s="both")),Ji(r[o],r[o+1],i,s,"undefined"===typeof n.epsilon?null:n.epsilon))return!0}return!1}function Ji(t,e,n,i,r){var o=n[0],s=n[1],a=t[0],l=t[1],c=e[0],u=e[1],h=n[0]-a,d=n[1]-l,A=c-a,p=u-l,f=h*p-d*A;if(null!==r){if(Math.abs(f)>r)return!1}else if(0!==f)return!1;return i?"start"===i?Math.abs(A)>=Math.abs(p)?A>0?a<o&&o<=c:c<=o&&o<a:p>0?l<s&&s<=u:u<=s&&s<l:"end"===i?Math.abs(A)>=Math.abs(p)?A>0?a<=o&&o<c:c<o&&o<=a:p>0?l<=s&&s<u:u<s&&s<=l:"both"===i&&(Math.abs(A)>=Math.abs(p)?A>0?a<o&&o<c:c<o&&o<a:p>0?l<s&&s<u:u<s&&s<l):Math.abs(A)>=Math.abs(p)?A>0?a<=o&&o<=c:c<=o&&o<=a:p>0?l<=s&&s<=u:u<=s&&s<=l}var Yi=qi;function $i(t,e){var n=bt(t),i=bt(e),r=n.type,o=i.type;switch(r){case"Point":switch(o){case"MultiPoint":return tr(n,i);case"LineString":return Yi(n,i,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return Vt(n,i,{ignoreBoundary:!0});default:throw new Error("feature2 "+o+" geometry not supported")}case"MultiPoint":switch(o){case"MultiPoint":return er(n,i);case"LineString":return nr(n,i);case"Polygon":case"MultiPolygon":return ir(n,i);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"LineString":return rr(n,i);case"Polygon":case"MultiPolygon":return or(n,i);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"Polygon":case"MultiPolygon":return sr(n,i);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+r+" geometry not supported")}}function tr(t,e){var n,i=!1;for(n=0;n<e.coordinates.length;n++)if(lr(e.coordinates[n],t.coordinates)){i=!0;break}return i}function er(t,e){for(var n=0;n<t.coordinates.length;n++){for(var i=!1,r=0;r<e.coordinates.length;r++)lr(t.coordinates[n],e.coordinates[r])&&(i=!0);if(!i)return!1}return!0}function nr(t,e){for(var n=!1,i=0;i<t.coordinates.length;i++){if(!Yi(t.coordinates[i],e))return!1;n||(n=Yi(t.coordinates[i],e,{ignoreEndVertices:!0}))}return n}function ir(t,e){for(var n=!0,i=!1,r=!1,o=0;o<t.coordinates.length;o++){if(r=Vt(t.coordinates[1],e),!r){n=!1;break}i||(r=Vt(t.coordinates[1],e,{ignoreBoundary:!0}))}return n&&r}function rr(t,e){for(var n=0;n<t.coordinates.length;n++)if(!Yi(t.coordinates[n],e))return!1;return!0}function or(t,e){var n=ft(e),i=ft(t);if(!ar(n,i))return!1;for(var r=!1,o=0;o<t.coordinates.length-1;o++){if(!Vt(t.coordinates[o],e))return!1;if(r||(r=Vt(t.coordinates[o],e,{ignoreBoundary:!0})),!r){var s=cr(t.coordinates[o],t.coordinates[o+1]);r=Vt(s,e,{ignoreBoundary:!0})}}return r}function sr(t,e){var n=ft(t),i=ft(e);if(!ar(i,n))return!1;for(var r=0;r<t.coordinates[0].length;r++)if(!Vt(t.coordinates[0][r],e))return!1;return!0}function ar(t,e){return!(t[0]>e[0])&&(!(t[2]<e[2])&&(!(t[1]>e[1])&&!(t[3]<e[3])))}function lr(t,e){return t[0]===e[0]&&t[1]===e[1]}function cr(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}var ur=$i;function hr(t,e,n){void 0===n&&(n={}),n.mask&&!n.units&&(n.units="kilometers");var i=[],r=t[0],o=t[1],s=t[2],a=t[3],l=e/qt([r,o],[s,o],n),c=l*(s-r),u=e/qt([r,o],[r,a],n),h=u*(a-o),d=s-r,A=a-o,p=Math.floor(d/c),f=Math.floor(A/h),g=(d-p*c)/2,m=(A-f*h)/2,_=r+g;while(_<=s){var y=o+m;while(y<=a){var v=S([_,y],n.properties);n.mask?ur(v,n.mask)&&i.push(v):i.push(v),y+=h}_+=c}return F(i)}var dr=hr;function Ar(t,e){void 0===e&&(e={});var n=e.precision,i=e.coordinates,r=e.mutate;if(n=void 0===n||null===n||isNaN(n)?6:n,i=void 0===i||null===i||isNaN(i)?3:i,!t)throw new Error("<geojson> is required");if("number"!==typeof n)throw new Error("<precision> must be a number");if("number"!==typeof i)throw new Error("<coordinates> must be a number");!1!==r&&void 0!==r||(t=JSON.parse(JSON.stringify(t)));var o=Math.pow(10,n);return J(t,(function(t){pr(t,o,i)})),t}function pr(t,e,n){t.length>n&&t.splice(n,t.length);for(var i=0;i<t.length;i++)t[i]=Math.round(t[i]*e)/e;return t}var fr=Ar;function gr(t){if(!t)throw new Error("geojson is required");var e=[];return st(t,(function(t){e.push(t)})),F(e)}var mr=gr;function _r(t,e,n){if(n=n||{},!X(n))throw new Error("options is invalid");var i=n.units,r=n.reverse;if(!t)throw new Error("geojson is required");if(e<=0)throw new Error("segmentLength must be greater than 0");var o=[];return st(t,(function(t){r&&(t.geometry.coordinates=t.geometry.coordinates.reverse()),yr(t,e,i,(function(t){o.push(t)}))})),F(o)}function yr(t,e,n,i){var r=ji(t,{units:n});if(r<=e)return i(t);var o=r/e;Number.isInteger(o)||(o=Math.floor(o)+1);for(var s=0;s<o;s++){var a=Ki(t,e*s,e*(s+1),{units:n});i(a,s)}}var vr=_r;function xr(t,e,n){if("Polygon"!==t.geometry.type)throw new Error("The input feature must be a Polygon");void 0===n&&(n=1);var i=t.geometry.coordinates,r=[],o={};if(n){for(var s=[],a=0;a<i.length;a++)for(var l=0;l<i[a].length-1;l++)s.push(g(a,l));var c=$e();c.load(s)}for(var u=0;u<i.length;u++)for(var h=0;h<i[u].length-1;h++)if(n){var d=c.search(g(u,h));d.forEach((function(t){var e=t.ring,n=t.edge;f(u,h,e,n)}))}else for(var A=0;A<i.length;A++)for(var p=0;p<i[A].length-1;p++)f(u,h,A,p);return e||(r={type:"Feature",geometry:{type:"MultiPoint",coordinates:r}}),r;function f(t,n,s,a){var l,c,u=i[t][n],h=i[t][n+1],d=i[s][a],A=i[s][a+1],p=br(u,h,d,A);if(null!==p&&(l=h[0]!==u[0]?(p[0]-u[0])/(h[0]-u[0]):(p[1]-u[1])/(h[1]-u[1]),c=A[0]!==d[0]?(p[0]-d[0])/(A[0]-d[0]):(p[1]-d[1])/(A[1]-d[1]),!(l>=1||l<=0||c>=1||c<=0))){var f=p,g=!o[f];g&&(o[f]=!0),e?r.push(e(p,t,n,u,h,l,s,a,d,A,c,g)):r.push(p)}}function g(t,e){var n,r,o,s,a=i[t][e],l=i[t][e+1];return a[0]<l[0]?(n=a[0],r=l[0]):(n=l[0],r=a[0]),a[1]<l[1]?(o=a[1],s=l[1]):(o=l[1],s=a[1]),{minX:n,minY:o,maxX:r,maxY:s,ring:t,edge:e}}}function br(t,e,n,i){if(wr(t,n)||wr(t,i)||wr(e,n)||wr(i,n))return null;var r=t[0],o=t[1],s=e[0],a=e[1],l=n[0],c=n[1],u=i[0],h=i[1],d=(r-s)*(c-h)-(o-a)*(l-u);if(0===d)return null;var A=((r*a-o*s)*(l-u)-(r-s)*(l*h-c*u))/d,p=((r*a-o*s)*(c-h)-(o-a)*(l*h-c*u))/d;return[A,p]}function wr(t,e){if(!t||!e)return!1;if(t.length!==e.length)return!1;for(var n=0,i=t.length;n<i;n++)if(t[n]instanceof Array&&e[n]instanceof Array){if(!wr(t[n],e[n]))return!1}else if(t[n]!==e[n])return!1;return!0}function Er(t){if("Feature"!=t.type)throw new Error("The input must a geojson object of type Feature");if(void 0===t.geometry||null==t.geometry)throw new Error("The input must a geojson object with a non-empty geometry");if("Polygon"!=t.geometry.type)throw new Error("The input must be a geojson Polygon");for(var e=t.geometry.coordinates.length,n=[],i=0;i<e;i++){var r=t.geometry.coordinates[i];Tr(r[0],r[r.length-1])||r.push(r[0]),n.push.apply(n,r.slice(0,r.length-1))}if(!Lr(n))throw new Error("The input polygon may not have duplicate vertices (except for the first and last vertex of each ring)");var o=n.length,s=xr(t,(function(t,e,n,i,r,o,s,a,l,c,u,h){return[t,e,n,i,r,o,s,a,l,c,u,h]})),a=s.length;if(0==a){var l=[];for(i=0;i<e;i++)l.push(T([t.geometry.coordinates[i]],{parent:-1,winding:Mr(t.geometry.coordinates[i])}));var c=F(l);return N(),k(),c}var u=[],h=[];for(i=0;i<e;i++){u.push([]);for(var d=0;d<t.geometry.coordinates[i].length-1;d++)u[i].push([new Cr(t.geometry.coordinates[i][Ir(d+1,t.geometry.coordinates[i].length-1)],1,[i,d],[i,Ir(d+1,t.geometry.coordinates[i].length-1)],void 0)]),h.push(new Br(t.geometry.coordinates[i][d],[i,Ir(d-1,t.geometry.coordinates[i].length-1)],[i,d],void 0,void 0,!1,!0))}for(i=0;i<a;i++)u[s[i][1]][s[i][2]].push(new Cr(s[i][0],s[i][5],[s[i][1],s[i][2]],[s[i][6],s[i][7]],void 0)),s[i][11]&&h.push(new Br(s[i][0],[s[i][1],s[i][2]],[s[i][6],s[i][7]],void 0,void 0,!0,!0));var A=h.length;for(i=0;i<u.length;i++)for(d=0;d<u[i].length;d++)u[i][d].sort((function(t,e){return t.param<e.param?-1:1}));var p=[];for(i=0;i<A;i++)p.push({minX:h[i].coord[0],minY:h[i].coord[1],maxX:h[i].coord[0],maxY:h[i].coord[1],index:i});var f=$e();f.load(p);for(i=0;i<u.length;i++)for(d=0;d<u[i].length;d++)for(var g=0;g<u[i][d].length;g++){_=g==u[i][d].length-1?u[i][Ir(d+1,t.geometry.coordinates[i].length-1)][0].coord:u[i][d][g+1].coord;var m=f.search({minX:_[0],minY:_[1],maxX:_[0],maxY:_[1]})[0];u[i][d][g].nxtIsectAlongEdgeIn=m.index}for(i=0;i<u.length;i++)for(d=0;d<u[i].length;d++)for(g=0;g<u[i][d].length;g++){var _=u[i][d][g].coord,y=(m=f.search({minX:_[0],minY:_[1],maxX:_[0],maxY:_[1]})[0],m.index);y<o?h[y].nxtIsectAlongRingAndEdge2=u[i][d][g].nxtIsectAlongEdgeIn:Tr(h[y].ringAndEdge1,u[i][d][g].ringAndEdgeIn)?h[y].nxtIsectAlongRingAndEdge1=u[i][d][g].nxtIsectAlongEdgeIn:h[y].nxtIsectAlongRingAndEdge2=u[i][d][g].nxtIsectAlongEdgeIn}var v=[];for(i=0,d=0;d<e;d++){var x=i;for(g=0;g<t.geometry.coordinates[d].length-1;g++)h[i].coord[0]<h[x].coord[0]&&(x=i),i++;var b=h[x].nxtIsectAlongRingAndEdge2;for(g=0;g<h.length;g++)if(h[g].nxtIsectAlongRingAndEdge1==x||h[g].nxtIsectAlongRingAndEdge2==x){var w=g;break}var E=Sr([h[w].coord,h[x].coord,h[b].coord],!0)?1:-1;v.push({isect:x,parent:-1,winding:E})}v.sort((function(t,e){return h[t.isect].coord>h[e.isect].coord?-1:1}));l=[];while(v.length>0){var C=v.pop(),B=C.isect,S=C.parent,M=C.winding,I=l.length,L=[h[B].coord],P=B;if(h[B].ringAndEdge1Walkable)var R=h[B].ringAndEdge1,D=h[B].nxtIsectAlongRingAndEdge1;else R=h[B].ringAndEdge2,D=h[B].nxtIsectAlongRingAndEdge2;while(!Tr(h[B].coord,h[D].coord)){L.push(h[D].coord);var O=void 0;for(i=0;i<v.length;i++)if(v[i].isect==D){O=i;break}if(void 0!=O&&v.splice(O,1),Tr(R,h[D].ringAndEdge1)){if(R=h[D].ringAndEdge2,h[D].ringAndEdge2Walkable=!1,h[D].ringAndEdge1Walkable){var U={isect:D};Sr([h[P].coord,h[D].coord,h[h[D].nxtIsectAlongRingAndEdge2].coord],1==M)?(U.parent=S,U.winding=-M):(U.parent=I,U.winding=M),v.push(U)}P=D,D=h[D].nxtIsectAlongRingAndEdge2}else{if(R=h[D].ringAndEdge1,h[D].ringAndEdge1Walkable=!1,h[D].ringAndEdge2Walkable){U={isect:D};Sr([h[P].coord,h[D].coord,h[h[D].nxtIsectAlongRingAndEdge1].coord],1==M)?(U.parent=S,U.winding=-M):(U.parent=I,U.winding=M),v.push(U)}P=D,D=h[D].nxtIsectAlongRingAndEdge1}}L.push(h[D].coord),l.push(T([L],{index:I,parent:S,winding:M,netWinding:void 0}))}c=F(l);function N(){for(var t=[],e=0;e<c.features.length;e++)-1==c.features[e].properties.parent&&t.push(e);if(t.length>1)for(e=0;e<t.length;e++){for(var n=-1,i=1/0,r=0;r<c.features.length;r++)t[e]!=r&&Vt(c.features[t[e]].geometry.coordinates[0][0],c.features[r],{ignoreBoundary:!0})&&ki(c.features[r])<i&&(n=r);c.features[t[e]].properties.parent=n}}function k(){for(var t=0;t<c.features.length;t++)if(-1==c.features[t].properties.parent){var e=c.features[t].properties.winding;c.features[t].properties.netWinding=e,z(t,e)}}function z(t,e){for(var n=0;n<c.features.length;n++)if(c.features[n].properties.parent==t){var i=e+c.features[n].properties.winding;c.features[n].properties.netWinding=i,z(n,i)}}return N(),k(),c}var Cr=function(t,e,n,i,r){this.coord=t,this.param=e,this.ringAndEdgeIn=n,this.ringAndEdgeOut=i,this.nxtIsectAlongEdgeIn=r},Br=function(t,e,n,i,r,o,s){this.coord=t,this.ringAndEdge1=e,this.ringAndEdge2=n,this.nxtIsectAlongRingAndEdge1=i,this.nxtIsectAlongRingAndEdge2=r,this.ringAndEdge1Walkable=o,this.ringAndEdge2Walkable=s};function Sr(t,e){if("undefined"===typeof e&&(e=!0),3!=t.length)throw new Error("This function requires an array of three points [x,y]");var n=(t[1][0]-t[0][0])*(t[2][1]-t[0][1])-(t[1][1]-t[0][1])*(t[2][0]-t[0][0]);return n>=0==e}function Mr(t){for(var e=0,n=0;n<t.length-1;n++)t[n][0]<t[e][0]&&(e=n);if(Sr([t[Ir(e-1,t.length-1)],t[e],t[Ir(e+1,t.length-1)]],!0))var i=1;else i=-1;return i}function Tr(t,e){if(!t||!e)return!1;if(t.length!=e.length)return!1;for(var n=0,i=t.length;n<i;n++)if(t[n]instanceof Array&&e[n]instanceof Array){if(!Tr(t[n],e[n]))return!1}else if(t[n]!=e[n])return!1;return!0}function Ir(t,e){return(t%e+e)%e}function Lr(t){for(var e={},n=1,i=0,r=t.length;i<r;++i){if(Object.prototype.hasOwnProperty.call(e,t[i])){n=0;break}e[t[i]]=1}return n}function Pr(t){var e=[];return st(t,(function(t){"Polygon"===t.geometry.type&&et(Er(t),(function(n){e.push(T(n.geometry.coordinates,t.properties))}))})),F(e)}var Fr=Pr,Rr=Math.PI/180,Dr=180/Math.PI,Or=function(t,e){this.lon=t,this.lat=e,this.x=Rr*t,this.y=Rr*e};Or.prototype.view=function(){return String(this.lon).slice(0,4)+","+String(this.lat).slice(0,4)},Or.prototype.antipode=function(){var t=-1*this.lat,e=this.lon<0?180+this.lon:-1*(180-this.lon);return new Or(e,t)};var Ur=function(){this.coords=[],this.length=0};Ur.prototype.move_to=function(t){this.length++,this.coords.push(t)};var Nr=function(t){this.properties=t||{},this.geometries=[]};Nr.prototype.json=function(){if(this.geometries.length<=0)return{geometry:{type:"LineString",coordinates:null},type:"Feature",properties:this.properties};if(1===this.geometries.length)return{geometry:{type:"LineString",coordinates:this.geometries[0].coords},type:"Feature",properties:this.properties};for(var t=[],e=0;e<this.geometries.length;e++)t.push(this.geometries[e].coords);return{geometry:{type:"MultiLineString",coordinates:t},type:"Feature",properties:this.properties}},Nr.prototype.wkt=function(){for(var t="",e="LINESTRING(",n=function(t){e+=t[0]+" "+t[1]+","},i=0;i<this.geometries.length;i++){if(0===this.geometries[i].coords.length)return"LINESTRING(empty)";var r=this.geometries[i].coords;r.forEach(n),t+=e.substring(0,e.length-1)+")"}return t};var kr=function(t,e,n){if(!t||void 0===t.x||void 0===t.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");if(!e||void 0===e.x||void 0===e.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");this.start=new Or(t.x,t.y),this.end=new Or(e.x,e.y),this.properties=n||{};var i=this.start.x-this.end.x,r=this.start.y-this.end.y,o=Math.pow(Math.sin(r/2),2)+Math.cos(this.start.y)*Math.cos(this.end.y)*Math.pow(Math.sin(i/2),2);if(this.g=2*Math.asin(Math.sqrt(o)),this.g===Math.PI)throw new Error("it appears "+t.view()+" and "+e.view()+" are 'antipodal', e.g diametrically opposite, thus there is no single route but rather infinite");if(isNaN(this.g))throw new Error("could not calculate great circle between "+t+" and "+e)};function zr(t,e,n){if(n=n||{},"object"!==typeof n)throw new Error("options is invalid");var i=n.properties,r=n.npoints,o=n.offset;t=gt(t),e=gt(e),i=i||{},r=r||100,o=o||10;var s=new kr({x:t[0],y:t[1]},{x:e[0],y:e[1]},i),a=s.Arc(r,{offset:o});return a.json()}kr.prototype.interpolate=function(t){var e=Math.sin((1-t)*this.g)/Math.sin(this.g),n=Math.sin(t*this.g)/Math.sin(this.g),i=e*Math.cos(this.start.y)*Math.cos(this.start.x)+n*Math.cos(this.end.y)*Math.cos(this.end.x),r=e*Math.cos(this.start.y)*Math.sin(this.start.x)+n*Math.cos(this.end.y)*Math.sin(this.end.x),o=e*Math.sin(this.start.y)+n*Math.sin(this.end.y),s=Dr*Math.atan2(o,Math.sqrt(Math.pow(i,2)+Math.pow(r,2))),a=Dr*Math.atan2(r,i);return[a,s]},kr.prototype.Arc=function(t,e){var n=[];if(!t||t<=2)n.push([this.start.lon,this.start.lat]),n.push([this.end.lon,this.end.lat]);else for(var i=1/(t-1),r=0;r<t;++r){var o=i*r,s=this.interpolate(o);n.push(s)}for(var a=!1,l=0,c=e&&e.offset?e.offset:10,u=180-c,h=-180+c,d=360-c,A=1;A<n.length;++A){var p=n[A-1][0],f=n[A][0],g=Math.abs(f-p);g>d&&(f>u&&p<h||p>u&&f<h)?a=!0:g>l&&(l=g)}var m=[];if(a&&l<c){var _=[];m.push(_);for(var y=0;y<n.length;++y){var v=parseFloat(n[y][0]);if(y>0&&Math.abs(v-n[y-1][0])>d){var x=parseFloat(n[y-1][0]),b=parseFloat(n[y-1][1]),w=parseFloat(n[y][0]),E=parseFloat(n[y][1]);if(x>-180&&x<h&&180===w&&y+1<n.length&&n[y-1][0]>-180&&n[y-1][0]<h){_.push([-180,n[y][1]]),y++,_.push([n[y][0],n[y][1]]);continue}if(x>u&&x<180&&-180===w&&y+1<n.length&&n[y-1][0]>u&&n[y-1][0]<180){_.push([180,n[y][1]]),y++,_.push([n[y][0],n[y][1]]);continue}if(x<h&&w>u){var C=x;x=w,w=C;var B=b;b=E,E=B}if(x>u&&w<h&&(w+=360),x<=180&&w>=180&&x<w){var S=(180-x)/(w-x),M=S*E+(1-S)*b;_.push([n[y-1][0]>u?180:-180,M]),_=[],_.push([n[y-1][0]>u?-180:180,M]),m.push(_)}else _=[],m.push(_);_.push([v,n[y][1]])}else _.push([n[y][0],n[y][1]])}}else{var T=[];m.push(T);for(var I=0;I<n.length;++I)T.push([n[I][0],n[I][1]])}for(var L=new Nr(this.properties),P=0;P<m.length;++P){var F=new Ur;L.geometries.push(F);for(var R=m[P],D=0;D<R.length;++D)F.move_to(R[D])}return L};var Qr=zr;function Gr(t,e){if(!t)throw new Error("line is required");if(!e)throw new Error("splitter is required");var n=wt(t),i=wt(e);if("LineString"!==n)throw new Error("line must be LineString");if("FeatureCollection"===i)throw new Error("splitter cannot be a FeatureCollection");if("GeometryCollection"===i)throw new Error("splitter cannot be a GeometryCollection");var r=fr(e,{precision:7});switch(i){case"Point":return Vr(t,r);case"MultiPoint":return Hr(t,r);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return Hr(t,gi(t,r))}}function Hr(t,e){var n=[],i=Ai();return st(e,(function(e){if(n.forEach((function(t,e){t.id=e})),n.length){var r=i.search(e);if(r.features.length){var o=jr(e,r);n=n.filter((function(t){return t.id!==o.id})),i.remove(o),et(Vr(o,e),(function(t){n.push(t),i.insert(t)}))}}else n=Vr(t,e).features,n.forEach((function(t){t.bbox||(t.bbox=Un(ft(t)))})),i.load(F(n))})),F(n)}function Vr(t,e){var n=[],i=mt(t)[0],r=mt(t)[t.geometry.coordinates.length-1];if(Zr(i,gt(e))||Zr(r,gt(e)))return F([t]);var o=Ai(),s=di(t);o.load(s);var a=o.search(e);if(!a.features.length)return F([t]);var l=jr(e,a),c=[i],u=nt(s,(function(t,i,r){var o=mt(i)[1],s=gt(e);return r===l.id?(t.push(s),n.push(L(t)),Zr(s,o)?[s]:[s,o]):(t.push(o),t)}),c);return u.length>1&&n.push(L(u)),F(n)}function jr(t,e){if(!e.features.length)throw new Error("lines must contain features");if(1===e.features.length)return e.features[0];var n,i=1/0;return et(e,(function(e){var r=_i(e,t),o=r.properties.dist;o<i&&(n=e,i=o)})),n}function Zr(t,e){return t[0]===e[0]&&t[1]===e[1]}var Wr=Gr;function Xr(t,e,n,i,r){void 0===r&&(r={});var o=r.steps||64,s=Kr(n),a=Kr(i),l=Array.isArray(t)||"Feature"!==t.type?{}:t.properties;if(s===a)return L(zn(t,e,r).geometry.coordinates[0],l);var c=s,u=s<a?a:a+360,h=c,d=[],A=0;while(h<u)d.push(Nn(t,e,h,r).geometry.coordinates),A++,h=c+360*A/o;return h>u&&d.push(Nn(t,e,u,r).geometry.coordinates),L(d,l)}function Kr(t){var e=t%360;return e<0&&(e+=360),e}function qr(t,e){void 0===e&&(e={});var n=bt(t);switch(e.properties||"Feature"!==t.type||(e.properties=t.properties),n.type){case"Polygon":return Jr(n,e);case"MultiPolygon":return Yr(n,e);default:throw new Error("invalid poly")}}function Jr(t,e){void 0===e&&(e={});var n=bt(t),i=n.coordinates,r=e.properties?e.properties:"Feature"===t.type?t.properties:{};return $r(i,r)}function Yr(t,e){void 0===e&&(e={});var n=bt(t),i=n.coordinates,r=e.properties?e.properties:"Feature"===t.type?t.properties:{},o=[];return i.forEach((function(t){o.push($r(t,r))})),F(o)}function $r(t,e){return t.length>1?R(t,e):L(t[0],e)}function to(t,e){var n,i,r;void 0===e&&(e={});var o=e.properties,s=null===(n=e.autoComplete)||void 0===n||n,a=null===(i=e.orderCoords)||void 0===i||i,l=null!==(r=e.mutate)&&void 0!==r&&r;switch(l||(t=le(t)),t.type){case"FeatureCollection":var c=[];return t.features.forEach((function(t){c.push(mt(eo(t,{},s,a)))})),O(c,o);default:return eo(t,o,s,a)}}function eo(t,e,n,i){e=e||("Feature"===t.type?t.properties:{});var r=bt(t),o=r.coordinates,s=r.type;if(!o.length)throw new Error("line must contain coordinates");switch(s){case"LineString":return n&&(o=no(o)),T([o],e);case"MultiLineString":var a=[],l=0;return o.forEach((function(t){if(n&&(t=no(t)),i){var e=io(ft(L(t)));e>l?(a.unshift(t),l=e):a.push(t)}else a.push(t)})),T(a,e);default:throw new Error("geometry type "+s+" is not supported")}}function no(t){var e=t[0],n=e[0],i=e[1],r=t[t.length-1],o=r[0],s=r[1];return n===o&&i===s||t.push(e),t}function io(t){var e=t[0],n=t[1],i=t[2],r=t[3];return Math.abs(e-i)*Math.abs(n-r)}var ro=to;function oo(t,e,n){var i,r,o,s,a,l=t.length,c=lo(t[0],e),u=[];for(n||(n=[]),i=1;i<l;i++){s=t[i-1],a=t[i],r=o=lo(a,e);while(1){if(!(c|r)){u.push(s),r!==o?(u.push(a),i<l-1&&(n.push(u),u=[])):i===l-1&&u.push(a);break}if(c&r)break;c?(s=ao(s,a,c,e),c=lo(s,e)):(a=ao(s,a,r,e),r=lo(a,e))}c=o}return u.length&&n.push(u),n}function so(t,e){var n,i,r,o,s,a,l;for(i=1;i<=8;i*=2){for(n=[],r=t[t.length-1],o=!(lo(r,e)&i),s=0;s<t.length;s++)a=t[s],l=!(lo(a,e)&i),l!==o&&n.push(ao(r,a,i,e)),l&&n.push(a),r=a,o=l;if(t=n,!t.length)break}return n}function ao(t,e,n,i){return 8&n?[t[0]+(e[0]-t[0])*(i[3]-t[1])/(e[1]-t[1]),i[3]]:4&n?[t[0]+(e[0]-t[0])*(i[1]-t[1])/(e[1]-t[1]),i[1]]:2&n?[i[2],t[1]+(e[1]-t[1])*(i[2]-t[0])/(e[0]-t[0])]:1&n?[i[0],t[1]+(e[1]-t[1])*(i[0]-t[0])/(e[0]-t[0])]:null}function lo(t,e){var n=0;return t[0]<e[0]?n|=1:t[0]>e[2]&&(n|=2),t[1]<e[1]?n|=4:t[1]>e[3]&&(n|=8),n}function co(t,e){var n=bt(t),i=n.type,r="Feature"===t.type?t.properties:{},o=n.coordinates;switch(i){case"LineString":case"MultiLineString":var s=[];return"LineString"===i&&(o=[o]),o.forEach((function(t){oo(t,e,s)})),1===s.length?L(s[0],r):R(s,r);case"Polygon":return T(uo(o,e),r);case"MultiPolygon":return O(o.map((function(t){return uo(t,e)})),r);default:throw new Error("geometry "+i+" not supported")}}function uo(t,e){for(var n=[],i=0,r=t;i<r.length;i++){var o=r[i],s=so(o,e);s.length>0&&(s[0][0]===s[s.length-1][0]&&s[0][1]===s[s.length-1][1]||s.push(s[0]),s.length>=4&&n.push(s))}return n}var ho=i(8422);function Ao(t,e,n){if(void 0===n&&(n={}),n=n||{},!X(n))throw new Error("options is invalid");var i,r=n.tolerance||0,o=[],s=Ai(),a=di(t);return s.load(a),lt(e,(function(t){var e=!1;t&&(et(s.search(t),(function(n){if(!1===e){var o=mt(t).sort(),s=mt(n).sort();ho(o,s)||(0===r?Yi(o[0],n)&&Yi(o[1],n):_i(n,o[0]).properties.dist<=r&&_i(n,o[1]).properties.dist<=r)?(e=!0,i=i?po(i,t):t):(0===r?Yi(s[0],t)&&Yi(s[1],t):_i(t,s[0]).properties.dist<=r&&_i(t,s[1]).properties.dist<=r)&&(i=i?po(i,n):n)}})),!1===e&&i&&(o.push(i),i=void 0))})),i&&o.push(i),F(o)}function po(t,e){var n=mt(e),i=mt(t),r=i[0],o=i[i.length-1],s=t.geometry.coordinates;return ho(n[0],r)?s.unshift(n[1]):ho(n[0],o)?s.push(n[1]):ho(n[1],r)?s.unshift(n[0]):ho(n[1],o)&&s.push(n[0]),t}var fo=Ao;function go(t,e,n,i,r){if(r=r||{},!X(r))throw new Error("options is invalid");var o=r.properties;if(!t)throw new Error("center is required");if(void 0===n||null===n)throw new Error("bearing1 is required");if(void 0===i||null===i)throw new Error("bearing2 is required");if(!e)throw new Error("radius is required");if("object"!==typeof r)throw new Error("options must be an object");if(mo(n)===mo(i))return zn(t,e,r);var s=mt(t),a=Xr(t,e,n,i,r),l=[[s]];return J(a,(function(t){l[0].push(t)})),l[0].push(s),T(l,o)}function mo(t){var e=t%360;return e<0&&(e+=360),e}var _o=go;function yo(t,e,n){var i;void 0===n&&(n={}),i=n.final?vo(gt(e),gt(t)):vo(gt(t),gt(e));var r=i>180?-(360-i):i;return r}function vo(t,e){var n=V(t[1]),i=V(e[1]),r=V(e[0]-t[0]);r>Math.PI&&(r-=2*Math.PI),r<-Math.PI&&(r+=2*Math.PI);var o=Math.log(Math.tan(i/2+Math.PI/4)/Math.tan(n/2+Math.PI/4)),s=Math.atan2(r,o);return(H(s)+360)%360}var xo=yo;function bo(t,e,n,i){void 0===i&&(i={});var r=e<0,o=j(Math.abs(e),i.units,"meters");r&&(o=-Math.abs(o));var s=gt(t),a=wo(s,o,n);return a[0]+=a[0]-s[0]>180?-360:s[0]-a[0]>180?360:0,S(a,i.properties)}function wo(t,e,n,i){i=void 0===i?x:Number(i);var r=e/i,o=t[0]*Math.PI/180,s=V(t[1]),a=V(n),l=r*Math.cos(a),c=s+l;Math.abs(c)>Math.PI/2&&(c=c>0?Math.PI-c:-Math.PI-c);var u=Math.log(Math.tan(c/2+Math.PI/4)/Math.tan(s/2+Math.PI/4)),h=Math.abs(u)>1e-11?l/u:Math.cos(s),d=r*Math.sin(a)/h,A=o+d;return[(180*A/Math.PI+540)%360-180,180*c/Math.PI]}var Eo=bo;function Co(t,e){var n,i,r,o,s=mt(t),a=mt(e),l=ft(e),c=0,u=null;s[0]>l[0]&&s[0]<l[2]&&s[1]>l[1]&&s[1]<l[3]&&(u=ai(t,ti(e)),c=u.properties.featureIndex);var h=wt(e);switch(h){case"Polygon":n=a[0][c],i=a[0][0],null!==u&&u.geometry.coordinates[1]<s[1]&&(i=a[0][c]),o=To(a[0][0],a[0][a[0].length-1],s);var d=Bo(a[0],s,o,r,n,i);n=d[0],i=d[1];break;case"MultiPolygon":for(var A=0,p=0,f=0,g=0;g<a[0].length;g++){A=g;for(var m=!1,_=0;_<a[0][g].length;_++){if(p=_,f===c){m=!0;break}f++}if(m)break}n=a[0][A][p],i=a[0][A][p],o=To(a[0][0][0],a[0][0][a[0][0].length-1],s),a.forEach((function(t){var e=Bo(t[0],s,o,r,n,i);n=e[0],i=e[1]}));break}return F([S(n),S(i)])}function Bo(t,e,n,i,r,o){for(var s=0;s<t.length;s++){var a=t[s],l=t[s+1];s===t.length-1&&(l=t[0]),i=To(a,l,e),n<=0&&i>0?Mo(e,a,r)||(r=a):n>0&&i<=0&&(So(e,a,o)||(o=a)),n=i}return[r,o]}function So(t,e,n){return To(t,e,n)>0}function Mo(t,e,n){return To(t,e,n)<0}function To(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(n[0]-t[0])*(e[1]-t[1])}var Io=Co;function Lo(t){var e,n,i=mt(t),r=0,o=1;while(o<i.length)e=n||i[0],n=i[o],r+=(n[0]-e[0])*(n[1]+e[1]),o++;return r>0}function Po(t,e){if(e=e||{},!X(e))throw new Error("options is invalid");var n=e.reverse||!1,i=e.mutate||!1;if(!t)throw new Error("<geojson> is required");if("boolean"!==typeof n)throw new Error("<reverse> must be a boolean");if("boolean"!==typeof i)throw new Error("<mutate> must be a boolean");!1===i&&(t=le(t));var r=[];switch(t.type){case"GeometryCollection":return rt(t,(function(t){Fo(t,n)})),t;case"FeatureCollection":return et(t,(function(t){et(Fo(t,n),(function(t){r.push(t)}))})),F(r)}return Fo(t,n)}function Fo(t,e){var n="Feature"===t.type?t.geometry.type:t.type;switch(n){case"GeometryCollection":return rt(t,(function(t){Fo(t,e)})),t;case"LineString":return Ro(mt(t),e),t;case"Polygon":return Do(mt(t),e),t;case"MultiLineString":return mt(t).forEach((function(t){Ro(t,e)})),t;case"MultiPolygon":return mt(t).forEach((function(t){Do(t,e)})),t;case"Point":case"MultiPoint":return t}}function Ro(t,e){Lo(t)===e&&t.reverse()}function Do(t,e){Lo(t[0])!==e&&t[0].reverse();for(var n=1;n<t.length;n++)Lo(t[n])===e&&t[n].reverse()}var Oo=Po;function Uo(t,e){if(e=e||{},!X(e))throw new Error("options is invalid");var n=e.zProperty||"elevation",i=e.flip,r=e.flags;xt(t,"Point","input must contain Points");for(var o=No(t,i),s=[],a=0;a<o.length;a++){for(var l=o[a],c=[],u=0;u<l.length;u++){var h=l[u];h.properties[n]?c.push(h.properties[n]):c.push(0),!0===r&&(h.properties.matrixPosition=[a,u])}s.push(c)}return s}function No(t,e){var n={};et(t,(function(t){var e=mt(t)[1];n[e]||(n[e]=[]),n[e].push(t)}));var i=Object.keys(n).map((function(t){var e=n[t],i=e.sort((function(t,e){return mt(t)[0]-mt(e)[0]}));return i})),r=i.sort((function(t,n){return e?mt(t[0])[1]-mt(n[0])[1]:mt(n[0])[1]-mt(t[0])[1]}));return r}
|
|
38
38
|
/*!
|
|
39
39
|
* @license GNU Affero General Public License.
|
|
40
40
|
* Copyright (c) 2015, 2015 Ronny Lorenz <ronny@tbi.univie.ac.at>
|
|
@@ -91,4 +91,4 @@ object-assign
|
|
|
91
91
|
*
|
|
92
92
|
* SPDX-License-Identifier: Apache-2.0
|
|
93
93
|
*/
|
|
94
|
-
var D8=null;try{D8=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(Ktt){}function O8(t,e,n){this.low=0|t,this.high=0|e,this.unsigned=!!n}function U8(t){return!0===(t&&t["__isLong__"])}function N8(t){var e=Math.clz32(t&-t);return t?31-e:e}O8.prototype.__isLong__,Object.defineProperty(O8.prototype,"__isLong__",{value:!0}),O8.isLong=U8;var k8={},z8={};function Q8(t,e){var n,i,r;return e?(t>>>=0,(r=0<=t&&t<256)&&(i=z8[t],i)?i:(n=H8(t,0,!0),r&&(z8[t]=n),n)):(t|=0,(r=-128<=t&&t<128)&&(i=k8[t],i)?i:(n=H8(t,t<0?-1:0,!1),r&&(k8[t]=n),n))}function G8(t,e){if(isNaN(t))return e?t9:$8;if(e){if(t<0)return t9;if(t>=q8)return o9}else{if(t<=-J8)return s9;if(t+1>=J8)return r9}return t<0?G8(-t,e).neg():H8(t%K8|0,t/K8|0,e)}function H8(t,e,n){return new O8(t,e,n)}O8.fromInt=Q8,O8.fromNumber=G8,O8.fromBits=H8;var V8=Math.pow;function j8(t,e,n){if(0===t.length)throw Error("empty string");if("number"===typeof e?(n=e,e=!1):e=!!e,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e?t9:$8;if(n=n||10,n<2||36<n)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return j8(t.substring(1),e,n).neg();for(var r=G8(V8(n,8)),o=$8,s=0;s<t.length;s+=8){var a=Math.min(8,t.length-s),l=parseInt(t.substring(s,s+a),n);if(a<8){var c=G8(V8(n,a));o=o.mul(c).add(G8(l))}else o=o.mul(r),o=o.add(G8(l))}return o.unsigned=e,o}function Z8(t,e){return"number"===typeof t?G8(t,e):"string"===typeof t?j8(t,e):H8(t.low,t.high,"boolean"===typeof e?e:t.unsigned)}O8.fromString=j8,O8.fromValue=Z8;var W8=65536,X8=1<<24,K8=W8*W8,q8=K8*K8,J8=q8/2,Y8=Q8(X8),$8=Q8(0);O8.ZERO=$8;var t9=Q8(0,!0);O8.UZERO=t9;var e9=Q8(1);O8.ONE=e9;var n9=Q8(1,!0);O8.UONE=n9;var i9=Q8(-1);O8.NEG_ONE=i9;var r9=H8(-1,2147483647,!1);O8.MAX_VALUE=r9;var o9=H8(-1,-1,!0);O8.MAX_UNSIGNED_VALUE=o9;var s9=H8(0,-2147483648,!1);O8.MIN_VALUE=s9;var a9=O8.prototype;a9.toInt=function(){return this.unsigned?this.low>>>0:this.low},a9.toNumber=function(){return this.unsigned?(this.high>>>0)*K8+(this.low>>>0):this.high*K8+(this.low>>>0)},a9.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(s9)){var e=G8(t),n=this.div(e),i=n.mul(e).sub(this);return n.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}var r=G8(V8(t,6),this.unsigned),o=this,s="";while(1){var a=o.div(r),l=o.sub(a.mul(r)).toInt()>>>0,c=l.toString(t);if(o=a,o.isZero())return c+s;while(c.length<6)c="0"+c;s=""+c+s}},a9.getHighBits=function(){return this.high},a9.getHighBitsUnsigned=function(){return this.high>>>0},a9.getLowBits=function(){return this.low},a9.getLowBitsUnsigned=function(){return this.low>>>0},a9.getNumBitsAbs=function(){if(this.isNegative())return this.eq(s9)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0;e--)if(0!=(t&1<<e))break;return 0!=this.high?e+33:e+1},a9.isZero=function(){return 0===this.high&&0===this.low},a9.eqz=a9.isZero,a9.isNegative=function(){return!this.unsigned&&this.high<0},a9.isPositive=function(){return this.unsigned||this.high>=0},a9.isOdd=function(){return 1===(1&this.low)},a9.isEven=function(){return 0===(1&this.low)},a9.equals=function(t){return U8(t)||(t=Z8(t)),(this.unsigned===t.unsigned||this.high>>>31!==1||t.high>>>31!==1)&&(this.high===t.high&&this.low===t.low)},a9.eq=a9.equals,a9.notEquals=function(t){return!this.eq(t)},a9.neq=a9.notEquals,a9.ne=a9.notEquals,a9.lessThan=function(t){return this.comp(t)<0},a9.lt=a9.lessThan,a9.lessThanOrEqual=function(t){return this.comp(t)<=0},a9.lte=a9.lessThanOrEqual,a9.le=a9.lessThanOrEqual,a9.greaterThan=function(t){return this.comp(t)>0},a9.gt=a9.greaterThan,a9.greaterThanOrEqual=function(t){return this.comp(t)>=0},a9.gte=a9.greaterThanOrEqual,a9.ge=a9.greaterThanOrEqual,a9.compare=function(t){if(U8(t)||(t=Z8(t)),this.eq(t))return 0;var e=this.isNegative(),n=t.isNegative();return e&&!n?-1:!e&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},a9.comp=a9.compare,a9.negate=function(){return!this.unsigned&&this.eq(s9)?s9:this.not().add(e9)},a9.neg=a9.negate,a9.add=function(t){U8(t)||(t=Z8(t));var e=this.high>>>16,n=65535&this.high,i=this.low>>>16,r=65535&this.low,o=t.high>>>16,s=65535&t.high,a=t.low>>>16,l=65535&t.low,c=0,u=0,h=0,d=0;return d+=r+l,h+=d>>>16,d&=65535,h+=i+a,u+=h>>>16,h&=65535,u+=n+s,c+=u>>>16,u&=65535,c+=e+o,c&=65535,H8(h<<16|d,c<<16|u,this.unsigned)},a9.subtract=function(t){return U8(t)||(t=Z8(t)),this.add(t.neg())},a9.sub=a9.subtract,a9.multiply=function(t){if(this.isZero())return this;if(U8(t)||(t=Z8(t)),D8){var e=D8["mul"](this.low,this.high,t.low,t.high);return H8(e,D8["get_high"](),this.unsigned)}if(t.isZero())return this.unsigned?t9:$8;if(this.eq(s9))return t.isOdd()?s9:$8;if(t.eq(s9))return this.isOdd()?s9:$8;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(Y8)&&t.lt(Y8))return G8(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,r=this.low>>>16,o=65535&this.low,s=t.high>>>16,a=65535&t.high,l=t.low>>>16,c=65535&t.low,u=0,h=0,d=0,A=0;return A+=o*c,d+=A>>>16,A&=65535,d+=r*c,h+=d>>>16,d&=65535,d+=o*l,h+=d>>>16,d&=65535,h+=i*c,u+=h>>>16,h&=65535,h+=r*l,u+=h>>>16,h&=65535,h+=o*a,u+=h>>>16,h&=65535,u+=n*c+i*l+r*a+o*s,u&=65535,H8(d<<16|A,u<<16|h,this.unsigned)},a9.mul=a9.multiply,a9.divide=function(t){if(U8(t)||(t=Z8(t)),t.isZero())throw Error("division by zero");if(D8){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;var e=(this.unsigned?D8["div_u"]:D8["div_s"])(this.low,this.high,t.low,t.high);return H8(e,D8["get_high"](),this.unsigned)}if(this.isZero())return this.unsigned?t9:$8;var n,i,r;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return t9;if(t.gt(this.shru(1)))return n9;r=t9}else{if(this.eq(s9)){if(t.eq(e9)||t.eq(i9))return s9;if(t.eq(s9))return e9;var o=this.shr(1);return n=o.div(t).shl(1),n.eq($8)?t.isNegative()?e9:i9:(i=this.sub(t.mul(n)),r=n.add(i.div(t)),r)}if(t.eq(s9))return this.unsigned?t9:$8;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();r=$8}i=this;while(i.gte(t)){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));var s=Math.ceil(Math.log(n)/Math.LN2),a=s<=48?1:V8(2,s-48),l=G8(n),c=l.mul(t);while(c.isNegative()||c.gt(i))n-=a,l=G8(n,this.unsigned),c=l.mul(t);l.isZero()&&(l=e9),r=r.add(l),i=i.sub(c)}return r},a9.div=a9.divide,a9.modulo=function(t){if(U8(t)||(t=Z8(t)),D8){var e=(this.unsigned?D8["rem_u"]:D8["rem_s"])(this.low,this.high,t.low,t.high);return H8(e,D8["get_high"](),this.unsigned)}return this.sub(this.div(t).mul(t))},a9.mod=a9.modulo,a9.rem=a9.modulo,a9.not=function(){return H8(~this.low,~this.high,this.unsigned)},a9.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},a9.clz=a9.countLeadingZeros,a9.countTrailingZeros=function(){return this.low?N8(this.low):N8(this.high)+32},a9.ctz=a9.countTrailingZeros,a9.and=function(t){return U8(t)||(t=Z8(t)),H8(this.low&t.low,this.high&t.high,this.unsigned)},a9.or=function(t){return U8(t)||(t=Z8(t)),H8(this.low|t.low,this.high|t.high,this.unsigned)},a9.xor=function(t){return U8(t)||(t=Z8(t)),H8(this.low^t.low,this.high^t.high,this.unsigned)},a9.shiftLeft=function(t){return U8(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?H8(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):H8(0,this.low<<t-32,this.unsigned)},a9.shl=a9.shiftLeft,a9.shiftRight=function(t){return U8(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?H8(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):H8(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},a9.shr=a9.shiftRight,a9.shiftRightUnsigned=function(t){return U8(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?H8(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):H8(32===t?this.high:this.high>>>t-32,0,this.unsigned)},a9.shru=a9.shiftRightUnsigned,a9.shr_u=a9.shiftRightUnsigned,a9.rotateLeft=function(t){var e;return U8(t)&&(t=t.toInt()),0===(t&=63)?this:32===t?H8(this.high,this.low,this.unsigned):t<32?(e=32-t,H8(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned)):(t-=32,e=32-t,H8(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned))},a9.rotl=a9.rotateLeft,a9.rotateRight=function(t){var e;return U8(t)&&(t=t.toInt()),0===(t&=63)?this:32===t?H8(this.high,this.low,this.unsigned):t<32?(e=32-t,H8(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned)):(t-=32,e=32-t,H8(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned))},a9.rotr=a9.rotateRight,a9.toSigned=function(){return this.unsigned?H8(this.low,this.high,!1):this},a9.toUnsigned=function(){return this.unsigned?this:H8(this.low,this.high,!0)},a9.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},a9.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},a9.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},O8.fromBytes=function(t,e,n){return n?O8.fromBytesLE(t,e):O8.fromBytesBE(t,e)},O8.fromBytesLE=function(t,e){return new O8(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},O8.fromBytesBE=function(t,e){return new O8(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)};var l9=O8;const c9=16;function u9(t){"X"===t&&(t="");const e=t.padEnd(c9,"0");return l9.fromString(e,!0,16)}function h9(t){if(t.isZero())return"X";let e=t.countTrailingZeros();const n=e%4;e=(e-n)/4;const i=e;e*=4;const r=t.shiftRightUnsigned(e),o=r.toString(16).replace(/0+$/,""),s=Array(17-i-o.length).join("0");return s+o}function d9(t,e){const n=A9(t).shiftRightUnsigned(2),i=t.add(l9.fromNumber(2*e+1-4).multiply(n));return i}function A9(t){return t.and(t.not().add(1))}const p9=3,f9=30,g9=2*f9+1,m9=180/Math.PI;function _9(t){if(0===t.length)throw new Error("Invalid Hilbert quad key ".concat(t));const e=t.split("/"),n=parseInt(e[0],10),i=e[1],r=i.length;let o=0;const s=[0,0];for(let a=r-1;a>=0;a--){o=r-a;const t=i[a];let e=0,n=0;"1"===t?n=1:"2"===t?(e=1,n=1):"3"===t&&(e=1);const l=Math.pow(2,o-1);C9(l,s,e,n),s[0]+=l*e,s[1]+=l*n}if(n%2===1){const t=s[0];s[0]=s[1],s[1]=t}return{face:n,ij:s,level:o}}function y9(t){if(t.isZero())return"";let e=t.toString(2);while(e.length<p9+g9)e="0"+e;const n=e.lastIndexOf("1"),i=e.substring(0,3),r=e.substring(3,n),o=r.length/2,s=l9.fromString(i,!0,2).toString(10);let a="";if(0!==o){a=l9.fromString(r,!0,2).toString(4);while(a.length<o)a="0"+a}return"".concat(s,"/").concat(a)}function v9(t,e,n){const i=1<<e;return[(t[0]+n[0])/i,(t[1]+n[1])/i]}function x9(t){return t>=.5?1/3*(4*t*t-1):1/3*(1-4*(1-t)*(1-t))}function b9(t){return[x9(t[0]),x9(t[1])]}function w9(t,e){let[n,i]=e;switch(t){case 0:return[1,n,i];case 1:return[-n,1,i];case 2:return[-n,-i,1];case 3:return[-1,-i,-n];case 4:return[i,-1,-n];case 5:return[i,n,-1];default:throw new Error("Invalid face")}}function E9(t){let[e,n,i]=t;const r=Math.atan2(i,Math.sqrt(e*e+n*n)),o=Math.atan2(n,e);return[o*m9,r*m9]}function C9(t,e,n,i){if(0===i){1===n&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);const i=e[0];e[0]=e[1],e[1]=i}}function B9(t){const e=v9(t.ij,t.level,[.5,.5]),n=b9(e),i=w9(t.face,n);return E9(i)}function S9(t){const e=M9(t),n=_9(e);return n}function M9(t){if(t.indexOf("/")>0)return t;const e=u9(t);return y9(e)}const T9=100;function I9(t){const{face:e,ij:n,level:i}=t,r=[[0,0],[0,1],[1,1],[1,0],[0,0]],o=Math.max(1,Math.ceil(T9*Math.pow(2,-i))),s=new Float64Array(4*o*2+2);let a=0,l=0;for(let c=0;c<4;c++){const t=r[c].slice(0),u=r[c+1],h=(u[0]-t[0])/o,d=(u[1]-t[1])/o;for(let r=0;r<o;r++){t[0]+=h,t[1]+=d;const r=v9(n,i,t),o=b9(r),c=w9(e,o),u=E9(c);Math.abs(u[1])>89.999&&(u[0]=l);const A=u[0]-l;u[0]+=A>180?-360:A<-180?360:0,s[a++]=u[0],s[a++]=u[1],l=u[0]}}return s[a++]=s[0],s[a++]=s[1],s}function L9(t){let e;if(2===t.face||5===t.face){let n=null,i=0;for(let e=0;e<4;e++){const r="".concat(t.face,"/").concat(e),o=S9(r),s=I9(o);"undefined"!==typeof n&&null!==n||(n=new Float64Array(4*s.length)),n.set(s,i),i+=s.length}e=P9(n)}else{const n=I9(t);e=P9(n)}return e}function P9(t){if(t.length%2!==0)throw new Error("Invalid corners");const e=[],n=[];for(let i=0;i<t.length;i+=2)e.push(t[i]),n.push(t[i+1]);return e.sort(((t,e)=>t-e)),n.sort(((t,e)=>t-e)),{west:e[0],east:e[e.length-1],north:n[n.length-1],south:n[0]}}function F9(t,e){const n=(null===e||void 0===e?void 0:e.minimumHeight)||0,i=(null===e||void 0===e?void 0:e.maximumHeight)||0,r=S9(t),o=L9(r),s=o.west,a=o.south,l=o.east,c=o.north,u=[];return u.push(new PO.Z(s,c,n)),u.push(new PO.Z(l,c,n)),u.push(new PO.Z(l,a,n)),u.push(new PO.Z(s,a,n)),u.push(new PO.Z(s,c,i)),u.push(new PO.Z(l,c,i)),u.push(new PO.Z(l,a,i)),u.push(new PO.Z(s,a,i)),u}function R9(t){const e=S9(t);return B9(e)}function D9(t){const e=t.token,n={minimumHeight:t.minimumHeight,maximumHeight:t.maximumHeight},i=F9(e,n),r=R9(e),o=r[0],s=r[1],a=q3.WGS84.cartographicToCartesian([o,s,n.maximumHeight]),l=new PO.Z(a[0],a[1],a[2]);i.push(l);const c=K4(i),u=[...c.center,...c.halfAxes];return u}const O9=4,U9=8,N9={QUADTREE:O9,OCTREE:U9};function k9(t,e,n){if(null!==t&&void 0!==t&&t.box){const i=u9(t.s2VolumeInfo.token),r=d9(i,e),o=h9(r),s={...t.s2VolumeInfo};switch(s.token=o,n){case"OCTREE":const e=t.s2VolumeInfo,n=e.maximumHeight-e.minimumHeight,i=n/2,r=e.minimumHeight+n/2;e.minimumHeight=r-i,e.maximumHeight=r+i;break;default:break}const a=D9(s),l={box:a,s2VolumeInfo:s};return l}}async function z9(t){const{options:e,parentData:n={mortonIndex:0,x:0,y:0,z:0},childIndex:i=0,globalData:r={level:0,mortonIndex:0,x:0,y:0,z:0},s2VolumeBox:o}=t;let{subtree:s,level:a=0}=t;const{subdivisionScheme:l,subtreeLevels:c,maximumLevel:u,contentUrlTemplate:h,subtreesUriTemplate:d,basePath:A}=e,p={children:[],lodMetricValue:0,contentUrl:""},f=N9[l],g=1&i,m=i>>1&1,_=i>>2&1,y=(f**a-1)/(f-1);let v=V9(n.mortonIndex,i),x=y+v,b=V9(n.x,g),w=V9(n.y,m),E=V9(n.z,_),C=!1;a+1>c&&(C=Q9(s.childSubtreeAvailability,v));const B=V9(r.x,b),S=V9(r.y,w),M=V9(r.z,E),T=a+r.level;if(C){const t="".concat(A,"/").concat(d),e=j9(t,T,B,S,M),n=await SO(e,R8);s=n,r.mortonIndex=v,r.x=b,r.y=w,r.z=E,r.level=a,v=0,x=0,b=0,w=0,E=0,a=0}const I=Q9(s.tileAvailability,x);if(!I||a>u)return p;const L=Q9(s.contentAvailability,x);L&&(p.contentUrl=j9(h,T,B,S,M));const P=a+1,F={mortonIndex:v,x:b,y:w,z:E};for(let R=0;R<f;R++){const t=k9(o,R,l),n=await z9({subtree:s,options:e,parentData:F,childIndex:R,level:P,globalData:r,s2VolumeBox:t});if(n.contentUrl||n.children.length){const t=T+1,i={childTileX:b,childTileY:w,childTileZ:E},r=G9(n,t,i,e,o);p.children.push(r)}}return p}function Q9(t,e){return"constant"in t?Boolean(t.constant):!!t.explicitBitstream&&W9(e,t.explicitBitstream)}function G9(t,e,n,i,r){const{basePath:o,refine:s,getRefine:a,lodMetricType:l,getTileType:c,rootLodMetricValue:u,rootBoundingVolume:h}=i,d=t.contentUrl&&t.contentUrl.replace("".concat(o,"/"),""),A=u/2**e,p=null!==r&&void 0!==r&&r.box?{box:r.box}:h,f=H9(e,p,n);return{children:t.children,contentUrl:t.contentUrl,content:{uri:d},id:t.contentUrl,refine:a(s),type:c(t),lodMetricType:l,lodMetricValue:A,geometricError:A,transform:t.transform,boundingVolume:f}}function H9(t,e,n){if(e.region){const{childTileX:i,childTileY:r,childTileZ:o}=n,[s,a,l,c,u,h]=e.region,d=2**t,A=(l-s)/d,p=(c-a)/d,f=(h-u)/d,[g,m]=[s+A*i,s+A*(i+1)],[_,y]=[a+p*r,a+p*(r+1)],[v,x]=[u+f*o,u+f*(o+1)];return{region:[g,_,m,y,v,x]}}if(e.box)return e;throw new Error("Unsupported bounding volume type ".concat(e))}function V9(t,e){return parseInt(t.toString(2)+e.toString(2),2)}function j9(t,e,n,i,r){const o=Z9({level:e,x:n,y:i,z:r});return t.replace(/{level}|{x}|{y}|{z}/gi,(t=>o[t]))}function Z9(t){const e={};for(const n in t)e["{".concat(n,"}")]=t[n];return e}function W9(t,e){const n=Math.floor(t/8),i=t%8,r=e[n]>>i&1;return 1===r}function X9(t){if(!t.contentUrl)return p5.EMPTY;const e=t.contentUrl.split("?")[0],n=e.split(".").pop();switch(n){case"pnts":return p5.POINTCLOUD;case"i3dm":case"b3dm":case"glb":case"gltf":return p5.SCENEGRAPH;default:return n}}function K9(t){switch(t){case"REPLACE":case"replace":return A5.REPLACE;case"ADD":case"add":return A5.ADD;default:return t}}function q9(t,e){const n=/^[a-z][0-9a-z+.-]*:/i;if(n.test(e)){const n=new URL(t,"".concat(e,"/"));return decodeURI(n.toString())}return t.startsWith("/")?t:"".concat(e,"/").concat(t)}function J9(t,e){if(!t)return null;if(t.content){const n=t.content.uri||t.content.url;t.contentUrl=q9(n,e.basePath)}return t.id=t.contentUrl,t.lodMetricType=g5.GEOMETRIC_ERROR,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform,t.type=X9(t),t.refine=K9(t.refine),t}async function Y9(t,e){const n=t.basePath;let i;const r=e7(null===t||void 0===t?void 0:t.root);i=r&&t.root?await $9(t.root,t,r,e):J9(t.root,t);const o=[];o.push(i);while(o.length>0){const i=o.pop()||{},r=i.children||[];for(let s of r){const i=e7(s);i?s=await $9(s,t,i,e):J9(s,{basePath:n}),o.push(s)}}return i}async function $9(t,e,n,i){var r,o;const s=e.basePath,{subdivisionScheme:a,maximumLevel:l,subtreeLevels:c,subtrees:{uri:u}}=n,h=j9(u,0,0,0,0),d=q9(h,s),A=await SO(d,R8,i),p=q9(t.content.uri,s),f=null===e||void 0===e||null===(r=e.root)||void 0===r?void 0:r.refine,g=t.geometricError,m=null===(o=t.boundingVolume.extensions)||void 0===o?void 0:o["3DTILES_bounding_volume_S2"];if(m){const e=D9(m),n={box:e,s2VolumeInfo:m};t.boundingVolume=n}const _=t.boundingVolume,y={contentUrlTemplate:p,subtreesUriTemplate:u,subdivisionScheme:a,subtreeLevels:c,maximumLevel:l,refine:f,basePath:s,lodMetricType:g5.GEOMETRIC_ERROR,rootLodMetricValue:g,rootBoundingVolume:_,getTileType:X9,getRefine:K9};return await t7(t,A,y)}async function t7(t,e,n){if(!t)return null;t.lodMetricType=g5.GEOMETRIC_ERROR,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform;const{children:i,contentUrl:r}=await z9({subtree:e,options:n,s2VolumeBox:t});return r&&(t.contentUrl=r,t.content={uri:r.replace("".concat(n.basePath,"/"),"")}),t.refine=K9(t.refine),t.type=X9(t),t.children=i,t.id=t.contentUrl,t}function e7(t){var e;return(null===t||void 0===t||null===(e=t.extensions)||void 0===e?void 0:e["3DTILES_implicit_tiling"])||(null===t||void 0===t?void 0:t.implicitTiling)}const n7={id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:A6,extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:s7,options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};function i7(t){return nO(t.url)}async function r7(t,e,n){const i={content:{featureIds:null}},r=0;return await S8(t,r,e,n,i.content),i.content}async function o7(t,e,n){var i;const r=JSON.parse((new TextDecoder).decode(t));return r.loader=e.loader||n7,r.url=n.url,r.queryString=n.queryString,r.basePath=i7(r),r.root=await Y9(r,e),r.type=f5.TILES3D,r.lodMetricType=g5.GEOMETRIC_ERROR,r.lodMetricValue=(null===(i=r.root)||void 0===i?void 0:i.lodMetricValue)||0,r}async function s7(t,e,n){const i=e["3d-tiles"]||{};let r;return r="auto"===i.isTileset?n.url&&-1!==n.url.indexOf(".json"):i.isTileset,t=r?await o7(t,e,n):await r7(t,e,n),t}const a7=[0],l7={getPointColor:{type:"accessor",value:[0,0,0,255]},pointSize:1,data:"",loader:n7,onTilesetLoad:{type:"function",value:t=>{}},onTileLoad:{type:"function",value:t=>{}},onTileUnload:{type:"function",value:t=>{}},onTileError:{type:"function",value:(t,e,n)=>{}},_getMeshColor:{type:"function",value:t=>[255,255,255]}};class c7 extends mJ{constructor(...t){super(...t),(0,NP.Z)(this,"state",void 0)}initializeState(){"onTileLoadFail"in this.props&&EF.removed("onTileLoadFail","onTileError")(),this.state={layerMap:{},tileset3d:null,activeViewports:{},lastUpdatedViewports:null}}get isLoaded(){const{tileset3d:t}=this.state;return null!==t&&t.isLoaded()}shouldUpdateState({changeFlags:t}){return t.somethingChanged}updateState({props:t,oldProps:e,changeFlags:n}){if(t.data&&t.data!==e.data&&this._loadTileset(t.data),n.viewportChanged){const{activeViewports:t}=this.state,e=Object.keys(t).length;e&&(this._updateTileset(t),this.state.lastUpdatedViewports=t,this.state.activeViewports={})}if(n.propsChanged){const{layerMap:t}=this.state;for(const e in t)t[e].needsUpdate=!0}}activateViewport(t){const{activeViewports:e,lastUpdatedViewports:n}=this.state;this.internalState.viewport=t,e[t.id]=t;const i=null===n||void 0===n?void 0:n[t.id];i&&t.equals(i)||(this.setChangeFlags({viewportChanged:!0}),this.setNeedsUpdate())}getPickingInfo({info:t,sourceLayer:e}){const n=e&&e.props.tile;return t.picked&&(t.object=n),t.sourceTile=n,t}filterSubLayer({layer:t,viewport:e}){const{tile:n}=t.props,{id:i}=e;return n.selected&&n.viewportIds.includes(i)}_updateAutoHighlight(t){const e=t.sourceTile,n=this.state.layerMap[null===e||void 0===e?void 0:e.id];n&&n.layer&&n.layer.updateAutoHighlight(t)}async _loadTileset(t){const{loadOptions:e={}}=this.props;let n=this.props.loader||this.props.loaders;Array.isArray(n)&&(n=n[0]);const i={loadOptions:{...e}};if(n.preload){const r=await n.preload(t,e);r.headers&&(i.loadOptions.fetch={...i.loadOptions.fetch,headers:r.headers}),Object.assign(i,r)}const r=await SO(t,n,i.loadOptions),o=new d6(r,{onTileLoad:this._onTileLoad.bind(this),onTileUnload:this._onTileUnload.bind(this),onTileError:this.props.onTileError,...i});this.setState({tileset3d:o,layerMap:{}}),this._updateTileset(this.state.activeViewports),this.props.onTilesetLoad(o)}_onTileLoad(t){const{lastUpdatedViewports:e}=this.state;this.props.onTileLoad(t),this._updateTileset(e),this.setNeedsUpdate()}_onTileUnload(t){delete this.state.layerMap[t.id],this.props.onTileUnload(t)}_updateTileset(t){if(!t)return;const{tileset3d:e}=this.state,{timeline:n}=this.context,i=Object.keys(t).length;n&&i&&e&&e.selectTiles(Object.values(t)).then((t=>{const e=this.state.frameNumber!==t;e&&this.setState({frameNumber:t})}))}_getSubLayer(t,e){if(!t.content)return null;switch(t.type){case p5.POINTCLOUD:return this._makePointCloudLayer(t,e);case p5.SCENEGRAPH:return this._make3DModelLayer(t);case p5.MESH:return this._makeSimpleMeshLayer(t,e);default:throw new Error("Tile3DLayer: Failed to render layer of type ".concat(t.content.type))}}_makePointCloudLayer(t,e){const{attributes:n,pointCount:i,constantRGBA:r,cartographicOrigin:o,modelMatrix:s}=t.content,{positions:a,normals:l,colors:c}=n;if(!a)return null;const u=e&&e.props.data||{header:{vertexCount:i},attributes:{POSITION:a,NORMAL:l,COLOR_0:c}},{pointSize:h,getPointColor:d}=this.props,A=this.getSubLayerClass("pointcloud",jJ);return new A({pointSize:h},this.getSubLayerProps({id:"pointcloud"}),{id:"".concat(this.id,"-pointcloud-").concat(t.id),tile:t,data:u,coordinateSystem:TU.METER_OFFSETS,coordinateOrigin:o,modelMatrix:s,getColor:r||d,_offset:0})}_make3DModelLayer(t){const{gltf:e,instances:n,cartographicOrigin:i,modelMatrix:r}=t.content,o=this.getSubLayerClass("scenegraph",l3);return new o({_lighting:"pbr"},this.getSubLayerProps({id:"scenegraph"}),{id:"".concat(this.id,"-scenegraph-").concat(t.id),tile:t,data:n||a7,scenegraph:e,coordinateSystem:TU.METER_OFFSETS,coordinateOrigin:i,modelMatrix:r,getTransformMatrix:t=>t.modelMatrix,getPosition:[0,0,0],_offset:0})}_makeSimpleMeshLayer(t,e){const n=t.content,{attributes:i,indices:r,modelMatrix:o,cartographicOrigin:s,coordinateSystem:a=TU.METER_OFFSETS,material:l,featureIds:c}=n,{_getMeshColor:u}=this.props,h=e&&e.props.mesh||new pX({drawMode:4,attributes:u7(i),indices:r}),d=this.getSubLayerClass("mesh",v3);return new d(this.getSubLayerProps({id:"mesh"}),{id:"".concat(this.id,"-mesh-").concat(t.id),tile:t,mesh:h,data:a7,getColor:u(t),pbrMaterial:l,modelMatrix:o,coordinateOrigin:s,coordinateSystem:a,featureIds:c,_offset:0})}renderLayers(){const{tileset3d:t,layerMap:e}=this.state;return t?t.tiles.map((t=>{const n=e[t.id]=e[t.id]||{tile:t};let{layer:i}=n;return t.selected&&(i?n.needsUpdate&&(i=this._getSubLayer(t,i),n.needsUpdate=!1):i=this._getSubLayer(t)),n.layer=i,i})).filter(Boolean):null}}function u7(t){const e={};return e.positions={...t.positions,value:new Float32Array(t.positions.value)},t.normals&&(e.normals=t.normals),t.texCoords&&(e.texCoords=t.texCoords),t.colors&&(e.colors=t.colors),t.uvRegions&&(e.uvRegions=t.uvRegions),e}(0,NP.Z)(c7,"defaultProps",l7),(0,NP.Z)(c7,"layerName","Tile3DLayer");const h7=i(4808),d7=(t,e="")=>new Promise((n=>{const{map:i}=vm;let r=new dX({id:t.id,type:c7,data:t.url,loader:n7,pickable:!0,onTilesetLoad:e=>{e.setProps({maximumScreenSpaceError:1});const{cartographicCenter:i,zoom:r}=e;let o=t.translation||{x:0,y:0,z:0},s=(new h7.Matrix4).makeTranslation(o.x,o.y,o.z);e.modelMatrix=s;let a=t.centerOffset||{x:0,y:0};vm.flyTo({center:[i[0]+a.x,i[1]+a.y],zoom:r+4,pitch:72,bearing:15});const l=[i[0]+a.x,i[1]+a.y];n({center:l})},onClick:(t,e)=>{console.log("onClick",t,e)},onTileError:t=>{console.log(t)}});om(t.id)&&lm(t.id),i.addLayer(r,e)}));class A7 extends Zb{constructor(t,e={}){super(t),this.isWater=!0;const n=this,i=void 0!==e.textureWidth?e.textureWidth:512,r=void 0!==e.textureHeight?e.textureHeight:512,o=void 0!==e.clipBias?e.clipBias:0,s=void 0!==e.alpha?e.alpha:1,a=void 0!==e.time?e.time:0,l=void 0!==e.waterNormals?e.waterNormals:null,c=void 0!==e.sunDirection?e.sunDirection:new $v(.70707,.70707,0),u=new Qv(void 0!==e.sunColor?e.sunColor:16777215),h=new Qv(void 0!==e.waterColor?e.waterColor:8355711),d=void 0!==e.eye?e.eye:new $v(0,0,0),A=void 0!==e.distortionScale?e.distortionScale:20,p=void 0!==e.side?e.side:Ym,f=void 0!==e.fog&&e.fog,g=new Aw,m=new $v,_=new $v,y=new $v,v=new Tx,x=new $v(0,0,-1),b=new Xv,w=new $v,E=new $v,C=new Xv,B=new Tx,S=new rw,M=new Kv(i,r),T={uniforms:$b.merge([$C.fog,$C.lights,{normalSampler:{value:null},mirrorSampler:{value:null},alpha:{value:1},time:{value:0},size:{value:1},distortionScale:{value:20},textureMatrix:{value:new Tx},sunColor:{value:new Qv(8355711)},sunDirection:{value:new $v(.70707,.70707,0)},eye:{value:new $v},waterColor:{value:new Qv(5592405)}}]),vertexShader:"\n\t\t\t\tuniform mat4 textureMatrix;\n\t\t\t\tuniform float time;\n\n\t\t\t\tvarying vec4 mirrorCoord;\n\t\t\t\tvarying vec4 worldPosition;\n\n\t\t\t\t#include <common>\n\t\t\t\t#include <fog_pars_vertex>\n\t\t\t\t#include <shadowmap_pars_vertex>\n\t\t\t\t#include <logdepthbuf_pars_vertex>\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tmirrorCoord = modelMatrix * vec4( position, 1.0 );\n\t\t\t\t\tworldPosition = mirrorCoord.xyzw;\n\t\t\t\t\tmirrorCoord = textureMatrix * mirrorCoord;\n\t\t\t\t\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t\tgl_Position = projectionMatrix * mvPosition;\n\n\t\t\t\t#include <beginnormal_vertex>\n\t\t\t\t#include <defaultnormal_vertex>\n\t\t\t\t#include <logdepthbuf_vertex>\n\t\t\t\t#include <fog_vertex>\n\t\t\t\t#include <shadowmap_vertex>\n\t\t\t}",fragmentShader:"\n\t\t\t\tuniform sampler2D mirrorSampler;\n\t\t\t\tuniform float alpha;\n\t\t\t\tuniform float time;\n\t\t\t\tuniform float size;\n\t\t\t\tuniform float distortionScale;\n\t\t\t\tuniform sampler2D normalSampler;\n\t\t\t\tuniform vec3 sunColor;\n\t\t\t\tuniform vec3 sunDirection;\n\t\t\t\tuniform vec3 eye;\n\t\t\t\tuniform vec3 waterColor;\n\n\t\t\t\tvarying vec4 mirrorCoord;\n\t\t\t\tvarying vec4 worldPosition;\n\n\t\t\t\tvec4 getNoise( vec2 uv ) {\n\t\t\t\t\tvec2 uv0 = ( uv / 103.0 ) + vec2(time / 17.0, time / 29.0);\n\t\t\t\t\tvec2 uv1 = uv / 107.0-vec2( time / -19.0, time / 31.0 );\n\t\t\t\t\tvec2 uv2 = uv / vec2( 8907.0, 9803.0 ) + vec2( time / 101.0, time / 97.0 );\n\t\t\t\t\tvec2 uv3 = uv / vec2( 1091.0, 1027.0 ) - vec2( time / 109.0, time / -113.0 );\n\t\t\t\t\tvec4 noise = texture2D( normalSampler, uv0 ) +\n\t\t\t\t\t\ttexture2D( normalSampler, uv1 ) +\n\t\t\t\t\t\ttexture2D( normalSampler, uv2 ) +\n\t\t\t\t\t\ttexture2D( normalSampler, uv3 );\n\t\t\t\t\treturn noise * 0.5 - 1.0;\n\t\t\t\t}\n\n\t\t\t\tvoid sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor ) {\n\t\t\t\t\tvec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) );\n\t\t\t\t\tfloat direction = max( 0.0, dot( eyeDirection, reflection ) );\n\t\t\t\t\tspecularColor += pow( direction, shiny ) * sunColor * spec;\n\t\t\t\t\tdiffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * sunColor * diffuse;\n\t\t\t\t}\n\n\t\t\t\t#include <common>\n\t\t\t\t#include <packing>\n\t\t\t\t#include <bsdfs>\n\t\t\t\t#include <fog_pars_fragment>\n\t\t\t\t#include <logdepthbuf_pars_fragment>\n\t\t\t\t#include <lights_pars_begin>\n\t\t\t\t#include <shadowmap_pars_fragment>\n\t\t\t\t#include <shadowmask_pars_fragment>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\t#include <logdepthbuf_fragment>\n\t\t\t\t\tvec4 noise = getNoise( worldPosition.xz * size );\n\t\t\t\t\tvec3 surfaceNormal = normalize( noise.xzy * vec3( 1.5, 1.0, 1.5 ) );\n\n\t\t\t\t\tvec3 diffuseLight = vec3(0.0);\n\t\t\t\t\tvec3 specularLight = vec3(0.0);\n\n\t\t\t\t\tvec3 worldToEye = eye-worldPosition.xyz;\n\t\t\t\t\tvec3 eyeDirection = normalize( worldToEye );\n\t\t\t\t\tsunLight( surfaceNormal, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight );\n\n\t\t\t\t\tfloat distance = length(worldToEye);\n\n\t\t\t\t\tvec2 distortion = surfaceNormal.xz * ( 0.001 + 1.0 / distance ) * distortionScale;\n\t\t\t\t\tvec3 reflectionSample = vec3( texture2D( mirrorSampler, mirrorCoord.xy / mirrorCoord.w + distortion ) );\n\n\t\t\t\t\tfloat theta = max( dot( eyeDirection, surfaceNormal ), 0.0 );\n\t\t\t\t\tfloat rf0 = 0.3;\n\t\t\t\t\tfloat reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 );\n\t\t\t\t\tvec3 scatter = max( 0.0, dot( surfaceNormal, eyeDirection ) ) * waterColor;\n\t\t\t\t\tvec3 albedo = mix( ( sunColor * diffuseLight * 0.3 + scatter ) * getShadowMask(), ( vec3( 0.1 ) + reflectionSample * 0.9 + reflectionSample * specularLight ), reflectance);\n\t\t\t\t\tvec3 outgoingLight = albedo;\n\t\t\t\t\tgl_FragColor = vec4( outgoingLight, alpha );\n\n\t\t\t\t\t#include <tonemapping_fragment>\n\t\t\t\t\t#include <fog_fragment>\n\t\t\t\t}"},I=new nw({fragmentShader:T.fragmentShader,vertexShader:T.vertexShader,uniforms:$b.clone(T.uniforms),lights:!0,side:p,fog:f});I.uniforms["mirrorSampler"].value=M.texture,I.uniforms["textureMatrix"].value=B,I.uniforms["alpha"].value=s,I.uniforms["time"].value=a,I.uniforms["normalSampler"].value=l,I.uniforms["sunColor"].value=u,I.uniforms["waterColor"].value=h,I.uniforms["sunDirection"].value=c,I.uniforms["distortionScale"].value=A,I.uniforms["eye"].value=d,n.material=I,n.onBeforeRender=function(t,e,i){if(_.setFromMatrixPosition(n.matrixWorld),y.setFromMatrixPosition(i.matrixWorld),v.extractRotation(n.matrixWorld),m.set(0,0,1),m.applyMatrix4(v),w.subVectors(_,y),w.dot(m)>0)return;w.reflect(m).negate(),w.add(_),v.extractRotation(i.matrixWorld),x.set(0,0,-1),x.applyMatrix4(v),x.add(y),E.subVectors(_,x),E.reflect(m).negate(),E.add(_),S.position.copy(w),S.up.set(0,1,0),S.up.applyMatrix4(v),S.up.reflect(m),S.lookAt(E),S.far=i.far,S.updateMatrixWorld(),S.projectionMatrix.copy(i.projectionMatrix),B.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),B.multiply(S.projectionMatrix),B.multiply(S.matrixWorldInverse),g.setFromNormalAndCoplanarPoint(m,_),g.applyMatrix4(S.matrixWorldInverse),b.set(g.normal.x,g.normal.y,g.normal.z,g.constant);const r=S.projectionMatrix;C.x=(Math.sign(b.x)+r.elements[8])/r.elements[0],C.y=(Math.sign(b.y)+r.elements[9])/r.elements[5],C.z=-1,C.w=(1+r.elements[10])/r.elements[14],b.multiplyScalar(2/b.dot(C)),r.elements[2]=b.x,r.elements[6]=b.y,r.elements[10]=b.z+1-o,r.elements[14]=b.w,d.setFromMatrixPosition(i.matrixWorld);const s=t.getRenderTarget(),a=t.xr.enabled,l=t.shadowMap.autoUpdate;n.visible=!1,t.xr.enabled=!1,t.shadowMap.autoUpdate=!1,t.setRenderTarget(M),t.state.buffers.depth.setMask(!0),!1===t.autoClear&&t.clear(),t.render(e,S),n.visible=!0,t.xr.enabled=a,t.shadowMap.autoUpdate=l,t.setRenderTarget(s);const c=i.viewport;void 0!==c&&t.state.viewport(c)}}}const p7={id:"water",position:[103.353557,23.362395],hight:0,size:[4e3,4e3],edit:!1},f7=(t,e="")=>new Promise((n=>{let{map:i}=vm,r=Object.assign({},p7,t),o="",s="",a="",l="",c="",u="",h="";function d(){const t=r.position,e=r.elevation,n=[Math.PI/2,0,0],d=eg().MercatorCoordinate.fromLngLat(t,e),A={translateX:d.x,translateY:d.y,translateZ:d.z,rotateX:n[0],rotateY:n[1],rotateZ:n[2],scale:d.meterInMercatorCoordinateUnits()};return c={id:r.id,type:"custom",renderingMode:"3d",onAdd:(t,e)=>{const n=t.getCanvas();o=new rw(50,n.clientWidth/n.clientHeight,1,5e3),s=new WM,a=new UM,a.name="water",s.add(a);let i=p(d,r);const c=new pb({color:r.color||7706588,opacity:.5,side:t_,transparent:!0}),A=new pb;A.wireframe=!0,h=new Zb(i,c),u=new A7(i,{textureWidth:64,textureHeight:64,waterNormals:(new OI).load("/img/waternormals.jpg",(t=>{t.wrapS=t.wrapT=Z_})),alpha:.3,side:t_,sunColor:16777215,waterColor:16777215,distortionScale:3.7,fog:void 0!==s.fog}),u.material.transparent=!0,s.position.y=r.hight,a.add(u),a.add(h),a.rotation.x=-Math.PI/2,l=new jM({canvas:t.getCanvas(),context:e,logarithmicDepthBuffer:!0,antialias:!0}),l.autoClear=!1,l.physicallyCorrectLights=!0,l.setSize(n.clientWidth,n.clientHeight),window.addEventListener("resize",(()=>{l.setSize(n.clientWidth,n.clientHeight),o.aspect=n.clientWidth/n.clientHeight,o.updateProjectionMatrix()}))},render:(t,e)=>{const n=(new Tx).makeRotationAxis(new $v(1,0,0),A.rotateX),r=(new Tx).makeRotationAxis(new $v(0,1,0),A.rotateY),a=(new Tx).makeRotationAxis(new $v(0,0,1),A.rotateZ),c=(new Tx).fromArray(e),h=(new Tx).makeTranslation(A.translateX,A.translateY,A.translateZ).scale(new $v(A.scale,-A.scale,A.scale)).multiply(n).multiply(r).multiply(a);o.projectionMatrix.elements=e,o.projectionMatrix=c.multiply(h),l.resetState(),l.render(s,o),i.triggerRepaint(),u.material.uniforms["time"].value+=1/60}},c;function p(t,e){if(e.data){var n=[];e.data.features.forEach((e=>{e.geometry.coordinates.forEach((e=>{e.forEach((e=>{let i=eg().MercatorCoordinate.fromLngLat(e,0),r=i.meterInMercatorCoordinateUnits();n.push(new Sv((i.x-t.x)/r,-1*(i.y-t.y)/r))}))}))}));const i=new IT(n),r=f(i);return r}return new yw(e.size[0],e.size[1])}function f(t){const e=new dI(t,{depth:-200,steps:1,bevelEnabled:!1,bevelThickness:0,bevelSize:0,bebelSegments:0,curveSegments:0});return e}}om(r.id)&&lm(r.id),d(),i.addLayer(c,e),n(a)}));i(8499);const g7=(t,e,n,i)=>{const r=e.properties;if(!Array.isArray(t))return console.error("hover-html:入参异常!"),console.log(r),void console.log(t);if(0===t.length)return void console.error("hover-html:入参数组为空!");let o="",s=[];n&&(o+=n),t.forEach((t=>{let e=t.label||"",n=r[t.key];n=n||0===n?n:"-",t.dicData&&t.dicData.length>0&&(n=t.dicData.find((e=>e.value==r[t.key])).label||"-"),t.suffixText&&(n+=t.suffixText),s.push(`<p class="hover-item ${t.customItemClass||""}">\n <span class="label ${t.labelValueClass||""}">${e}:</span>\n <span class="value ${t.customValueClass||""}">${n}</span>\n </p>`)})),s.map((t=>o+=t)),i&&(o+=i),vm.addPopup([e.properties.lgtd,e.properties.lttd],`<div class="xy-hover-html line-height-2">${o}</div>`)};function m7(t,e=!0){return new Promise((n=>{e&&(t=zg(t)),$f.get(`https://restapi.amap.com/v3/geocode/regeo?key=39d46e3fcb4c9740d08e8ecb1f15ff8c&location=${t[0]},${t[1]}&extensions=all`).then((({data:t})=>{if("1"===t.status){let e={formattedAddress:t.regeocode.formatted_address,...t.regeocode.addressComponent};n(e)}}))}))}function _7(){return new Promise((t=>{new AMap.plugin("AMap.Geolocation",(()=>{const e=new AMap.Geolocation({enableHighAccuracy:!0,timeout:1e4,buttonOffset:new AMap.Pixel(10,20),zoomToAccuracy:!0,buttonPosition:"RB"});function n(e){const n={lng:e.position.lng,lat:e.position.lat,formattedAddress:e.formattedAddress,...e.addressComponent};t(n)}function i(t){}e.getCurrentPosition(((t,e)=>{"complete"===t?n(e):i(e)}))}))}))}var y7=function(){var t=this,e=t._self._c;return e("div",{ref:"dom"},[t._t("default")],2)},v7=[],x7={props:{position:{type:Array,default:()=>[]},drag:{type:Boolean,default:!1}},data(){return{}},mounted(){this.createdMarker()},methods:{createdMarker(){let{map:t}=vm,e=this.$refs.dom;const n=new(eg().Marker)(e,{draggable:this.drag}).setLngLat(this.position).addTo(t);this.drag&&n.on("dragend",(()=>{const t=n.getLngLat();this.$emit("dragEnd",t)}))}}},b7=x7;function w7(t,e,n,i,r,o,s,a){var l,c="function"===typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}var E7=w7(b7,y7,v7,!1,null,"35de8978",null),C7=E7.exports,B7=function(){var t=this,e=t._self._c;return e("canvas",{staticClass:"snow",attrs:{id:t.id}},[t._v("不支持canvas")])},S7=[],M7={props:{id:{type:String,default:"rain"},angle:{type:Number,default:-5},status:{type:String,default:"default"},len:{type:Number,default:70},lineWidth:{type:Number,default:1.5},isRain:{type:Boolean,default:!0}},data(){return{timer:"",ctx:null,count:500}},destroyed(){window.clearInterval(this.timer)},mounted(){this.start()},watch:{status(){window.clearInterval(this.timer),this.start()}},methods:{start(){this.$nextTick((()=>{const t=document.getElementById(this.id),e=t.clientWidth,n=t.clientHeight;"small"===this.status&&(this.count=100),"default"===this.status&&(this.count=300),"large"===this.status&&(this.count=1e3),t.width=e,t.height=n,this.ctx=t.getContext("2d"),this.timer=setInterval((()=>{this.isRain?(this.clearCanvas(),this.draws()):this.clearCanvas()}),50)}))},draws(){const t=this,e=document.getElementById(this.id),n=e.clientWidth,i=e.clientHeight;for(let o=1;o<=this.count;o++)r(Math.random()*n,Math.random()*i);function r(e,n){let i=t.ctx,r=i.createLinearGradient(e,n,e+t.angle,5*(n+t.len));r.addColorStop(0,"rgba(255,255,255,0.1)"),r.addColorStop(.5,"rgba(105,105,105,0.3)"),r.addColorStop(1,"rgba(255,255,255,0.5)"),i.strokeStyle=r,i.beginPath(),i.moveTo(e,n),i.lineTo(e+t.angle,n+t.len),i.lineWidth=t.lineWidth,i.stroke(),i.closePath()}},clearCanvas(){const t=document.getElementById(this.id),e=t.clientWidth,n=t.clientHeight;this.ctx.clearRect(0,0,e,n)}}},T7=M7,I7=(i(6872),w7(T7,B7,S7,!1,null,"20664206",null)),L7=I7.exports,P7=function(){var t=this,e=t._self._c;return e("div",{staticClass:"mapLoad flex flex-col flex-align-center",class:{loadOver:!t.show}},[e("img",{staticStyle:{"margin-top":"10%"},attrs:{src:"/img/loading.gif",width:"400"}}),e("div",{staticClass:"text-center",staticStyle:{width:"400px","margin-top":"-90px"}},[e("div",{staticClass:"mb-20"},[t._v("正在努力加载中..."+t._s(t.progress.toFixed(0))+"%")]),e("div",{staticClass:"progress-wrap"},[e("div",{staticClass:"progress-inner"},[e("div",{staticClass:"progress-nums",style:`width: ${t.progress}%`})])])])])},F7=[],R7={props:{loading:{type:Boolean,default:!0},loadTime:{type:Number,default:5e3}},data(){return{progress:0,timer:"",show:!0}},watch:{loading:{handler(t){t||(this.show=!1,this.progress=100,window.clearInterval(this.timer))},immediate:!0}},destroyed(){window.clearInterval(this.timer)},created(){this.timer=setInterval((()=>{this.progress+=3,this.progress>=99&&window.clearInterval(this.timer)}),this.loadTime/30)}},D7=R7,O7=(i(4337),w7(D7,P7,F7,!1,null,"fa3ebcb8",null)),U7=O7.exports,N7=function(){var t=this,e=t._self._c;return e("span",[t.isSlot?e("span",{attrs:{title:t.isFullScreen?"退出全屏":"进入全屏"},on:{click:t.handleFullScreen}},[t._t("default")],2):e("span",{attrs:{title:t.isFullScreen?"退出全屏":"进入全屏"},on:{click:t.handleFullScreen}},[e("i",{staticClass:"el-icon-full-screen mr-5"}),t._v(" "+t._s(t.isFullScreen?"退出全屏":"全屏")+" ")])])},k7=[],z7={props:{isSlot:{type:Boolean,default:!1},dom:{type:String,default:""}},data(){return{isFullScreen:!1}},watch:{isFullScreen(t){console.log("isFullScreen",t),this.$emit("change",t)}},methods:{handleFullScreen(){const t=this.dom?document.getElementById(this.dom):document.documentElement;this.isFUllScreenEnabled()?this.hasFullScreenElement()?this.exitFullScreen():this.setFullScreen(t):console.log("此浏览器不支持全屏"),this.listenfullscreen((()=>{this.isFullScreen=this.hasFullScreenElement()}))},isFUllScreenEnabled(){return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled},hasFullScreenElement(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},setFullScreen(t){t.requestFullscreen&&t.requestFullscreen(),t.webkitRequestFullscreen&&t.webkitRequestFullscreen(),t.mozRequestFullScreen&&t.mozRequestFullScreen(),t.msRequestFullscreen&&t.msRequestFullscreen()},exitFullScreen(){document.exitFullscreen&&document.exitFullscreen(),document.webkitExitFullscreen&&document.webkitExitFullscreen(),document.mozCancelFullScreen&&document.mozCancelFullScreen(),document.msExitFullscreen&&document.msExitFullscreen()},listenfullscreen(t){function e(){t()}document.addEventListener("fullscreenchange",(function(){e()})),document.addEventListener("mozfullscreenchange",(function(){e()})),document.addEventListener("webkitfullscreenchange",(function(){e()})),document.addEventListener("msfullscreenchange",(function(){e()}))}}},Q7=z7,G7=(i(4561),w7(Q7,N7,k7,!1,null,"7e84ad1e",null)),H7=G7.exports,V7=function(){var t=this,e=t._self._c;return e("div",[e("el-radio-group",{attrs:{size:"small"},model:{value:t.radio,callback:function(e){t.radio=e},expression:"radio"}},[e("el-radio-button",{attrs:{label:1}},[t._v("卫星图")]),e("el-radio-button",{attrs:{label:2}},[t._v("矢量图")])],1)],1)},j7=[],Z7={props:{type:{type:Number,default:1}},data(){return{radio:1,default:""}},watch:{radio(t){1===t?vm.checkStyle(this.default).then((()=>{this.$emit("checkStyle",t)})):vm.checkStyle("mapbox://styles/mapbox/streets-v11").then((()=>{this.$emit("checkStyle",t)}))}},mounted(){this.radio=this.type,setTimeout((()=>{this.default=vm.map.getStyle()}),1e3)}},W7=Z7,X7=w7(W7,V7,j7,!1,null,"1a040aed",null),K7=X7.exports,q7=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"tools"},[e("div",{staticClass:"tools-bar flex flex-align-center"},[e("div",{class:{"main-color":"move"===t.type},attrs:{title:"移动"},on:{click:function(e){return t.startDraw("move")}}},[e("i",{staticClass:"el-icon-rank mr-5"}),t._v("移动 ")]),t._l(t.action,(function(n){return e("div",{key:n.type,staticClass:"ml-20",class:{"main-color":n.type===t.type},attrs:{title:n.name,label:n.type},on:{click:function(e){return t.startDraw(n.type)}}},[e("i",{staticClass:"mr-5",class:n.icon}),t._v(t._s(n.name)+" ")])})),t.showCombine?e("div",{staticClass:"ml-20",attrs:{title:"合并"},on:{click:t.combineFeatures}},[e("i",{staticClass:"el-icon-connection mr-5"}),t._v("合并 ")]):t._e(),t.showUnCombine?e("div",{staticClass:"ml-20",attrs:{title:"拆分"},on:{click:t.uncombineFeatures}},[e("i",{staticClass:"el-icon-scissors mr-5"}),t._v("拆分 ")]):t._e(),t.showDeleteBtn?e("div",{staticClass:"ml-20",attrs:{title:"删除"},on:{click:t.drawDelete}},[e("i",{staticClass:"el-icon-close mr-5"}),t._v("删除 ")]):t._e(),t.showClearBtn?e("div",{staticClass:"ml-20",attrs:{title:"清空"},on:{click:t.clear}},[e("i",{staticClass:"el-icon-delete mr-5"}),t._v("清空")]):t._e(),t.showFullBtn?e("map-full-screen",{staticClass:"ml-20",attrs:{dom:t.fullDom},on:{change:t.changeFullscreen}}):t._e(),e("div",{staticClass:"ml-20 red tip-text"},[t._v("* 点击图形编辑")]),t.showMapStyle?e("map-style",{staticClass:"margin-left",on:{checkStyle:t.checkStyle}}):t._e()],2),t.showMoveInput?e("div",{staticClass:"margin-top flex"},[e("div",{staticClass:"flex flex-align-center"},[e("span",{staticClass:"flex-child-noshrink"},[t._v("经度:")]),e("el-input",{attrs:{size:"small",placeholder:"请输入纬度"},model:{value:t.lng,callback:function(e){t.lng=e},expression:"lng"}})],1),e("div",{staticClass:"flex flex-align-center margin-left"},[e("span",{staticClass:"flex-child-noshrink"},[t._v("纬度:")]),e("el-input",{attrs:{size:"small",placeholder:"请输入经度"},model:{value:t.lat,callback:function(e){t.lat=e},expression:"lat"}})],1),e("div",{staticClass:"margin-left"},[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.search}},[t._v("搜索")])],1)]):t._e(),t.uploadShp||t.uploadJson?e("div",{staticClass:"mt-15"},[t.uploadShp?e("shp-file",{attrs:{requireDbf:t.requireDbf,encoding:t.encoding},on:{upload:t.getUpload,uploadName:t.getUploadName}}):t._e(),t.uploadJson?e("json-file",{attrs:{requireDbf:t.requireDbf,encoding:t.encoding},on:{upload:t.getUpload}}):t._e()],1):t._e(),t._t("tools")],2),e("div",{staticClass:"right-fixed"},[t._t("right-fixed")],2),t.tooltip.show?e("div",{staticClass:"split-tooltip",style:t.tooltip.style},[t._v(t._s(t.tooltip.text))]):t._e()])},J7=[];i(3024);let Y7=null,$7={coordinates:[],isAdsorb:!1,properties:{}},ttt={layerId:null,boundP:20},ett=null,ntt=null;const itt=(t={},e=vm.map)=>{ett=e,ttt=Object.assign(ttt,t),ttt.layerId&&(Y7||stt(),ett.on("mousemove",(t=>{if(Y7){let e=t.lngLat;$7=rtt([e.lng,e.lat]),Y7.setLngLat($7.coordinates)}})))},rtt=t=>{let e=!1,n=null;if(om(ttt.layerId)){const r=S(t);var i=ett.project(t);const o=[[i.x-ttt.boundP,i.y-ttt.boundP],[i.x+ttt.boundP,i.y+ttt.boundP]],s=ett.queryRenderedFeatures(o,{layers:[ttt.layerId]});let a,l=1/0;if(s.forEach((t=>{const e=L(t.geometry.coordinates),i=Bi(r,e,{units:"meters"});i<l&&(l=i,a=e,n=t.properties)})),a){const n=_i(a,r);t=n.geometry.coordinates,e=!0}}return{coordinates:t,isAdsorb:e,properties:n}},ott=(t=ntt,e)=>(ntt=t,$7.isAdsorb&&ntt&&e&&(ntt.delete(e.id),e.geometry.coordinates=$7.coordinates,setTimeout((()=>{ntt.add(e)}),300),ntt.changeMode("simple_select",{features:[e]})),att(),ett.off("mousemove"),$7),stt=()=>{const t=document.createElement("div");t.className="marker",t.style.backgroundImage="url(/img/marker2.png)",t.style.width="10px",t.style.height="10px",t.style.backgroundSize="100%",Y7=new(eg().Marker)(t).setLngLat([0,0]).addTo(ett)},att=()=>{Y7&&Y7.remove(),Y7=null};var ltt=function(){var t=this,e=t._self._c;return e("el-button",{staticClass:"upload",attrs:{size:"small",type:"warning"}},[t._v(" JSON上传 "),e("input",{staticClass:"file",attrs:{type:"file",accept:".json"},on:{input:t.getFile}})])},ctt=[],utt={data(){return{}},methods:{getFile(t){const e=t.target.files?t.target.files[0]:"";if(e){let n=new FileReader;n.readAsText(e,"UTF-8"),n.onload=e=>{let n=e.target.result;if(n){n=JSON.parse(n),n.features||(n=kg(n));const e=ft(n);if(e.length>0&&e[0]>180)return this.$message.error("不属于WGS84坐标系,请使用其他工具进行数据转换");this.$emit("upload",n),t.target.value=""}}}}}},htt=utt,dtt=(i(1602),w7(htt,ltt,ctt,!1,null,"5a5f8c5d",null)),Att=dtt.exports,ptt=function(){var t=this,e=t._self._c;return e("el-button",{staticClass:"upload",attrs:{size:"small",type:"warning"}},[t._v(" SHP上传 "),e("input",{staticClass:"file",attrs:{type:"file",accept:t.requireDbf?".shp,.dbf":".shp",multiple:t.requireDbf},on:{input:t.getFile}})])},ftt=[];const gtt=i(2388);var mtt={props:{requireDbf:{type:Boolean,default:!0,required:!1},encoding:{type:String,default:"utf-8"}},data(){return{fileName:""}},methods:{readFileAsArrayBuffer(t){return new Promise(((e,n)=>{const i=new FileReader;i.onload=t=>e(t.target.result),i.onerror=n,i.readAsArrayBuffer(t)}))},validateAndProcessGeoJSON(t){if(t.features||(t=kg(t)),!t.features||0==t.features.length)return this.$message.error("当前导入SHP没有数据!"),!1;const e=ft(t);return e.length>0&&e[0]>180?(this.$message.error("不属于WGS84坐标系,请使用其他工具进行数据转换"),!1):(this.$emit("upload",t),this.$emit("uploadName",{json:t,fileName:this.fileName}),!0)},getFile(t){const e=Array.from(t.target.files||[]);if(0===e.length)return;t.target.value="";const n=e.find((t=>t.name.toLowerCase().endsWith(".shp"))),i=e.find((t=>t.name.toLowerCase().endsWith(".dbf")));return n?(this.fileName=n.name.split(".")[0],this.requireDbf&&!i?this.$message.error("请同时上传.dbf文件以获取属性数据"):void(i?this.readWithDbf(n,i):this.readShpOnly(n))):this.$message.error("请上传.shp文件")},readWithDbf(t,e){Promise.all([this.readFileAsArrayBuffer(t),this.readFileAsArrayBuffer(e)]).then((async([t,e])=>{let n=this.detectEncoding(e);gtt.open(t,e,{encoding:n||this.encoding}).then((t=>{const e=[],n=()=>t.read().then((t=>{if(!t.done)return e.push(t.value),n();{const t={type:"FeatureCollection",features:e};this.validateAndProcessGeoJSON(t)}}));return n()})).catch((t=>{console.error("读取文件错误:",t),this.$message.error("读取文件失败,请检查文件格式是否正确")}))}))},readShpOnly(t){this.readFileAsArrayBuffer(t).then((t=>{gtt.read(t).then((t=>{this.validateAndProcessGeoJSON(t)})).catch((t=>{console.error("读取文件错误:",t),this.$message.error("读取文件失败,请检查文件格式是否正确")}))}))},detectEncoding(t){const e=new Uint8Array(t)[29],n={87:"gb2312",200:"latin1",77:"utf-8",3:"cp437"};let i=n[e];return i}}},_tt=mtt,ytt=(i(5375),w7(_tt,ptt,ftt,!1,null,"7858f34f",null)),vtt=ytt.exports,xtt={components:{mapFullScreen:H7,mapStyle:K7,jsonFile:Att,shpFile:vtt},props:{fullDom:{type:String,default:"fullScreen"},list:{type:Array,default:()=>[]},single:{type:Boolean,default:!0},showFullBtn:{type:Boolean,default:!0},showDeleteBtn:{type:Boolean,default:!0},showClearBtn:{type:Boolean,default:!0},showMoveInput:{type:Boolean,default:!0},showMapStyle:{type:Boolean,default:!1},showMarker:{type:Boolean,default:!0},showCombine:{type:Boolean,default:!1},showUnCombine:{type:Boolean,default:!1},uploadJson:{type:Boolean,default:!1},uploadShp:{type:Boolean,default:!1},requireDbf:{type:Boolean,default:!1},encoding:{type:String,default:"utf-8"},isAdsorb:{type:Boolean,default:!1},adsorbParams:{type:Object,default:()=>{}},props:{type:Object,default:()=>({lglt:"lglt",lgltType:"lgltType",name:"name"})}},data(){return{type:"move",isEdit:!1,draw:"",activeFeatures:"",lng:"",lat:"",geoJson:"",selectPoint:[],conbineDrawFeature:null,tooltip:{show:!1,text:"",style:{}}}},computed:{action(){let t=[{id:"point",type:"draw_point",name:"绘制点",icon:"el-icon-coordinate"},{id:"line",type:"draw_line_string",name:"绘制线",icon:"el-icon-arrow-up"},{id:"polygon",type:"draw_polygon",name:"绘制面",icon:"el-icon-house"}],e=this.list.length>0?t.filter((t=>this.list.includes(t.id))):t;return e}},mounted(){},methods:{initDraw(t,e){this.map=t;const n=this.draw=new(bm())(Object.assign({},{displayControlsDefault:!1,controls:{}},e));t.addControl(n),t.on("draw.create",this.drawEnd),t.on("draw.update",this.drawUpdate),t.on("draw.selectionchange",this.select),t.on("mousemove",this.updateTooltipPosition),t.on("draw.modechange",this.handleModeChange),document.onkeydown=t=>{if(0===this.selectPoint.length||0===this.activeFeatures.length)return;const e=this.activeFeatures[0].geometry.type,n=t.keyCode||t.which||t.charCode;if(46==n){console.log("删除锚点",this.selectPoint,this.activeFeatures[0].geometry.coordinates);let t=!0;this.selectPoint.forEach((n=>{if("Polygon"===e){if(4==this.activeFeatures[0].geometry.coordinates[0].length)return this.$message.warning("面图层至少绘制3个点,无法删除!"),void(t=!1);this.activeFeatures[0].geometry.coordinates[0].forEach(((t,e)=>{JSON.stringify(t)===JSON.stringify(n.geometry.coordinates)&&(console.log(t,e),this.activeFeatures[0].geometry.coordinates[0].splice(e,1))}))}else if("LineString"===e){if(2==this.activeFeatures[0].geometry.coordinates.length)return this.$message.warning("线图层至少绘制2个点,无法删除!"),void(t=!1);this.activeFeatures[0].geometry.coordinates.forEach(((t,e)=>{JSON.stringify(t)===JSON.stringify(n.geometry.coordinates)&&this.activeFeatures[0].geometry.coordinates.splice(e,1)}))}})),this.updateGeometry(this.activeFeatures[0]),t&&this.$emit("deletePoint",{selectPoint:[...this.selectPoint],data:this.getDraw()}),this.selectPoint=[]}}},updateGeometry(t){const e=t.geometry;this.draw.delete(t.id),this.draw.add(e),this.drawUpdate()},getDraw(){const t=this.draw.getAll();return t},startDraw(t){this.type=t,"move"!==t&&(this.single&&this.clear(),console.log("开始绘制"),this.draw.changeMode(t),this.isAdsorb&&itt(this.adsorbParams,this.map),this.$emit("start"))},drawEnd(t){const e=this.getDraw();if(console.log("绘制结束",e,t),this.conbineDrawFeature)this.splitFeature(this.conbineDrawFeature,t.features[0]),this.conbineDrawFeature=null,this.tooltip.show=!1;else{if(this.type="move",this.geoJson=e,this.isAdsorb){let n=t.features[0];e.lastPosition=ott(this.draw,n)}this.$emit("end",e)}},drawUpdate(t){const e=this.getDraw();console.log("修改结束",e),this.geoJson=e,this.$emit("update",e)},drawEdit(t){this.geoJson=t,t&&t.features&&t.features.forEach((t=>{this.draw.add(t)}))},drawDelete(){this.activeFeatures&&this.activeFeatures.length>0?(this.$emit("deleteId",this.activeFeatures),this.activeFeatures.forEach((t=>{this.draw.delete(t.id);const e=this.getDraw();e.features&&e.features.length>0?this.$emit("delete",e):this.$emit("clear"),console.log("删除选中对象",this.activeFeatures[0]),this.activeFeatures=[]}))):this.$message.warning("未选择删除的对象")},clear(){this.draw&&(this.draw.deleteAll(),this.$emit("clear")),om("search-marker")&&um("search-marker",!1)},select(t){t.points&&t.points.length>0&&(console.log("选中锚点",t.points),this.selectPoint=t.points,this.$emit("selectpoint",t)),this.activeFeatures=t.features,console.log("选中对象",this.activeFeatures),this.$emit("select",t.features)},search(){if(!this.lng||!this.lat)return this.$message.error("请输入正确的经纬度信息");this.map.easeTo({center:[this.lng,this.lat]}),this.showMarker&&this.addMarker()},combineFeatures(){const t=this.draw.getSelected().features;if(t.length<2)return void this.$message.warning("请按住Shift键,至少选择两个"+this.getDrawType()+"进行合并!");const e=new Set(t.map((t=>t.geometry.type.replace("Multi",""))));if(e.size>1)return void this.$message.warning("只能合并相同类型的要素!");this.draw.combineFeatures();let n=this.draw.getSelected().features[0];n.properties&&(n.properties[this.props.lglt]=n.geometry.coordinates,n.properties[this.props.lgltType]=n.geometry.type),this.$emit("conbine",{combineFeature:n,selectedFeatures:t}),console.log("合并成功")},uncombineFeatures(){const t=this.draw.getSelected().features;if(1!==t.length)return void this.$message.warning("请选择一个"+this.getDrawType()+"进行拆分!");if("Point"===t[0].geometry.type)return void this.$message.warning("不支持拆分点图层!");this.conbineDrawFeature=t[0];let e=this.conbineDrawFeature.geometry.type.includes("LineString")?"线":"面";this.tooltip.text="请绘制切割线,并与要拆分"+e+"相交",this.tooltip.show=!0,this.draw.changeMode("draw_line_string",{continueDrawing:!1}),this.$emit("start-uncombine")},splitFeature(t,e){try{let n=[];"LineString"===t.geometry.type?n=[L(t.geometry.coordinates)]:"MultiLineString"===t.geometry.type?n=t.geometry.coordinates.map((t=>L(t))):"Polygon"===polygonFeature.geometry.type?n=[T(polygonFeature.geometry.coordinates)]:"MultiPolygon"===polygonFeature.geometry.type&&(n=polygonFeature.geometry.coordinates.map((t=>T(t))));const i=L(e.geometry.coordinates);let r=[];n.forEach((t=>{const e=Wr(t,i);r=r.concat(e.features)}));const o=r.map(((e,n)=>({type:"Feature",id:`${t.id}_${n}`,geometry:e.geometry,properties:Object.assign({},t.properties)})));this.draw.delete(t.id),this.draw.delete(e.id),this.draw.add({type:"FeatureCollection",features:o});let s=o.map((t=>t.id));this.draw.changeMode("simple_select",{featureIds:s}),o.map(((t,e)=>{t.properties&&(t.properties.id=null,t.properties[this.props.name]=t.properties[this.props.name]+"_"+e,t.properties[this.props.lglt]=t.geometry.coordinates,t.properties[this.props.lgltType]=t.geometry.type)})),this.$emit("unconbine",{uncombineFeature:o,oldFeature:t}),console.log("拆分成功,要素被拆分为"+o.length+"段")}catch(sk){console.error("线拆分失败:",sk),this.$message.warning("拆分线失败,请确保分割线有效!")}},getDrawType(){return 1==this.list.length&&"line"==this.list[0]?"条线":1==this.list.length&&"polygon"==this.list[0]?"个面":"要素"},updateTooltipPosition(t){this.tooltip.show&&(this.tooltip.style={left:`${t.originalEvent.clientX+10}px`,top:`${t.originalEvent.clientY+10}px`})},handleModeChange(t){"draw_line_string"!==t.mode&&this.tooltip.show&&(this.tooltip.show=!1)},getCenter(){const{lng:t,lat:e}=this.map.getCenter();this.lng=t,this.lat=e},checkStyle(t){this.geoJson&&(this.clear(),this.drawEdit(this.geoJson),this.$emit("checkStyle",t))},addMarker(){const t=[{id:1,name:"当前位置",lnglat:[this.lng,this.lat]}],e=Ug(t,"Point","lnglat");Om({id:"search-marker",data:e}),om("search-marker")&&um("search-marker",!0)},getUpload(t){this.$emit("getUpload",t)},getUploadName(t){this.$emit("getUploadName",t)},changeFullscreen(t){console.log("全屏状态",t),this.$emit("changeFullscreen",t)}}},btt=xtt,wtt=(i(7769),w7(btt,q7,J7,!1,null,"75551f36",null)),Ett=wtt.exports,Ctt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"full-height relative overflow",attrs:{id:"fullScreen"}},[e("div",{staticClass:"full-height",attrs:{id:"map"}}),e("draw-tools",t._b({ref:"draw",attrs:{list:["point"],showMoveInput:!1,showDeleteBtn:!1,isAdsorb:t.isAdsorb},on:{update:t.drawUpdate,end:t.drawUpdate,delete:t.drawUpdate,getUpload:t.getUpload,getUploadName:t.getUploadName,clear:t.clear}},"draw-tools",t.$attrs,!1),[e("div",{staticClass:"mt-15",attrs:{slot:"tools"},slot:"tools"},[e("div",{staticClass:"flex"},[e("el-input",{staticClass:"full-width margin-right",attrs:{value:t.position.toString(),size:"small",placeholder:"点击地图获取坐标",readonly:""}}),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.save}},[t._v("保存")])],1),t.address&&t.address.formattedAddress?e("div",{staticClass:"margin-top font-12"},[t._v(" 地址:"+t._s(t.address.formattedAddress)+" ")]):t._e()])])],1)},Btt=[],Stt={components:{drawTools:Ett},props:{config:{type:Object,default:()=>{}},geoData:{type:[Object,String],default:""},lng:{type:[Number,String],default:""},lat:{type:[Number,String],default:""},zoom:{type:Number,default:14},isAdsorb:{type:Boolean,default:!1}},data(){return{geoJson:"",position:"",address:"",lastPosition:""}},watch:{lng(){this.draw()},geoData(){this.draw()}},mounted(){this.init()},methods:{init(){let t=Object.assign({},{accessToken:"pk.eyJ1IjoiaGo0NjI3NzEzOTYiLCJhIjoiY2w5YzNjOTZvMDF6NDNwb2d6YmJkYWRpMCJ9.-fW-OChGB1oY2DCMO_c8sg",zoom:this.zoom,center:[102.83643451528434,24.81972792178513],is3d:!1},this.config);vm.initMap(t).then((t=>{this.$refs.draw.initDraw(t),this.draw(),this.$emit("map-load",t)}))},draw(){this.lng&&this.lat?this.geoJson={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[1*this.lng,1*this.lat]},properties:{}}]}:this.geoJson=this.geoData,this.drawUpdate(this.geoJson),this.geoJson&&this.$refs.draw.drawEdit(this.geoJson)},drawUpdate(t){if(!t)return;const e=t.features;this.geoJson=t,e.length>0?(this.position=e[0].geometry.coordinates,this.position=this.position.map((t=>Number(t).toFixed(6))),this.$nextTick((()=>{vm.easeTo(this.position),m7(this.position).then((t=>{this.address=t}))})),this.lastPosition=t.lastPosition):(this.position="",this.address="",this.lastPosition=""),this.$emit("update",{data:t,position:this.position})},save(){let t={geoJson:this.geoJson,position:this.position,lng:this.position[0],lat:this.position[1],address:this.address,lastPosition:this.lastPosition};this.$emit("save",t)},clear(){this.geoJson="",this.position="",this.address=""},getUpload(t){this.$emit("getUpload",t)},getUploadName(t){this.$emit("getUploadName",t)}}},Mtt=Stt,Ttt=w7(Mtt,Ctt,Btt,!1,null,null,null),Itt=Ttt.exports,Ltt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"full-height relative overflow",attrs:{id:"fullScreen"}},[e("div",{staticClass:"full-height",attrs:{id:"map"}}),e("draw-tools",t._b({ref:"draw",attrs:{list:["line"],single:t.single,showMoveInput:!1},on:{update:t.drawUpdate,end:t.drawUpdate,delete:t.drawUpdate,clear:t.clear,getUpload:t.getUpload,getUploadName:t.getUploadName}},"draw-tools",t.$attrs,!1),[e("div",{staticClass:"mt-15 flex flex-wrap",attrs:{slot:"tools"},slot:"tools"},[e("el-input",{staticClass:"flex-child-grow",staticStyle:{width:"300px","margin-right":"10px"},attrs:{value:t.position.toString(),size:"small",placeholder:"点击地图获取坐标",readonly:t.readonly}}),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.save}},[t._v("保存")]),t._t("default")],2)])],1)},Ptt=[],Ftt={components:{drawTools:Ett},props:{config:{type:Object,default:()=>{}},readonly:{type:Boolean,default:!1},autoZoom:{type:Boolean,default:!1},single:{type:Boolean,default:!1},geoData:{type:[Object,String],default:""},pointList:{type:[Array,String],default:""}},data(){return{geoJson:"",position:""}},watch:{pointList(){this.draw()},geoData(){this.draw()}},mounted(){this.init()},methods:{init(){let t=Object.assign({},{accessToken:"pk.eyJ1IjoiaGo0NjI3NzEzOTYiLCJhIjoiY2w5YzNjOTZvMDF6NDNwb2d6YmJkYWRpMCJ9.-fW-OChGB1oY2DCMO_c8sg",center:[102.83643451528434,24.81972792178513],is3d:!1},this.config);vm.initMap(t).then((t=>{this.$refs.draw.initDraw(t),this.draw(),this.$emit("map-load",t)}))},draw(){if(this.pointList&&this.pointList.length>0){let t=this.pointList.map((t=>({type:"Feature",geometry:{type:"LineString",coordinates:t},properties:{}})));this.geoJson={type:"FeatureCollection",features:t}}else this.geoJson=this.geoData;this.drawUpdate(this.geoJson,!0),this.edit()},edit(){this.geoJson&&this.$refs.draw.drawEdit(this.geoJson)},drawUpdate(t,e=!1){t&&t.features&&(this.geoJson=t,this.position=t.features.map((t=>t.geometry.coordinates.flat(1/0))),this.position=Yg(2,...this.position),this.position.forEach((t=>{t[0]=Number(t[0]).toFixed(6),t[1]=Number(t[1]).toFixed(6)})),(this.autoZoom||e)&&this.$nextTick((()=>{vm.fitJsonBounds(t,{padding:100})})),this.$emit("update",{data:t,position:this.position}))},save(){let t={geoJson:this.geoJson,position:this.position};console.log(t),this.$emit("save",t)},clear(){this.geoJson="",this.position=""},getUpload(t){console.log(t),this.$refs.draw.clear(),this.drawUpdate(t,!0),this.edit()},getUploadName(t){this.$emit("getUploadName",t)}}},Rtt=Ftt,Dtt=w7(Rtt,Ltt,Ptt,!1,null,null,null),Ott=Dtt.exports,Utt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"full-height relative overflow",attrs:{id:"fullScreen"}},[e("div",{staticClass:"full-height",attrs:{id:"map"}}),e("draw-tools",t._b({ref:"draw",attrs:{list:["polygon"],single:t.single,showMoveInput:!1},on:{update:t.drawUpdate,end:t.drawUpdate,delete:t.drawUpdate,clear:t.clear,getUpload:t.getUpload,getUploadName:t.getUploadName}},"draw-tools",t.$attrs,!1),[e("div",{staticClass:"mt-15 flex flex-wrap",attrs:{slot:"tools"},slot:"tools"},[e("el-input",{staticClass:"flex-child-grow",staticStyle:{width:"300px","margin-right":"10px"},attrs:{value:t.position.toString(),size:"small",placeholder:"点击地图获取坐标",readonly:t.readonly}}),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.save}},[t._v("保存")]),t._t("default")],2)])],1)},Ntt=[],ktt={components:{drawTools:Ett},props:{config:{type:Object,default:()=>{}},single:{type:Boolean,default:!1},autoZoom:{type:Boolean,default:!1},readonly:{type:Boolean,default:!0},geoData:{type:[Object,String],default:""},pointList:{type:[Array,String],default:""}},data(){return{geoJson:"",position:""}},watch:{pointList(){this.draw()},geoData(){this.draw()}},mounted(){this.init()},methods:{init(){let t=Object.assign({},{accessToken:"pk.eyJ1IjoiaGo0NjI3NzEzOTYiLCJhIjoiY2w5YzNjOTZvMDF6NDNwb2d6YmJkYWRpMCJ9.-fW-OChGB1oY2DCMO_c8sg",center:[102.83643451528434,24.81972792178513],is3d:!1},this.config);vm.initMap(t).then((t=>{this.$refs.draw.initDraw(t),this.draw(),this.$emit("map-load",t)}))},draw(){if(this.pointList&&this.pointList.length>0){let t=this.pointList.map((t=>({type:"Feature",geometry:{type:"Polygon",coordinates:[t]},properties:{}})));this.geoJson={type:"FeatureCollection",features:t}}else this.geoJson=this.geoData;this.drawUpdate(this.geoJson,!0),this.edit()},edit(){this.geoJson&&this.$refs.draw.drawEdit(this.geoJson)},drawUpdate(t,e=!1){t&&t.features&&(this.geoJson=t,this.position=t.features.map((t=>t.geometry.coordinates.flat(1/0))),this.position=Yg(2,...this.position),this.position.forEach((t=>{t[0]=Number(t[0]).toFixed(6),t[1]=Number(t[1]).toFixed(6)})),(this.autoZoom||e)&&this.$nextTick((()=>{vm.fitJsonBounds(t,{padding:100})})),this.$emit("update",{data:t,position:this.position}))},save(){let t={geoJson:this.geoJson,position:this.position};console.log(t),this.$emit("save",t)},clear(){this.geoJson="",this.position=""},getUpload(t){console.log(t),this.$refs.draw.clear(),this.drawUpdate(t,!0),this.edit()},getUploadName(t){this.$emit("getUploadName",t)}}},ztt=ktt,Qtt=w7(ztt,Utt,Ntt,!1,null,null,null),Gtt=Qtt.exports;const Htt={showLayerText:hm,setSource:rm,hasSource:sm,showLayer:um,hasLayer:om,removeLayer:lm,removeSource:am,setLayout:dm,setPaint:Am,setFilter:pm,setHigh:fm,getLayerAll:cm},Vtt={addLayerText:wm,addLayerLine:Mm,addLayerLineAnimation:Tm,addLayerPoint:Fm,addDiyPoint:Dm,addFlashPoint:Rm,addLayerImagePoint:Om,addLayerPolygon:km,addLayerCircle:Qm,addCircleAnimate:Vm,addLayerModel:DP,addLayerPipe:UP,addLayerWater:f7,load3DTiles:d7},jtt={toGeoJson:Ug,pointToGeoJson:Ng,loadImage:jg,ranging:Zg,drawArea:Wg,spArray:Yg,clearDraw:Xg,distance:Kg,lineCenter:qg,polygonCenter:Jg,GeoAddress:m7,Geolocation:_7,getElevation:$g,geometryCollectionToFeatureCollection:kg,wgs84ToGcj02:zg,gcj02ToWgs84:Qg},Ztt={mapHover:Cm,mapClick:Em,changeMapCursor:Bm,mapHoverHtml:g7};var Wtt=_["default"]}(),r}()}));
|
|
94
|
+
var D8=null;try{D8=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(Ktt){}function O8(t,e,n){this.low=0|t,this.high=0|e,this.unsigned=!!n}function U8(t){return!0===(t&&t["__isLong__"])}function N8(t){var e=Math.clz32(t&-t);return t?31-e:e}O8.prototype.__isLong__,Object.defineProperty(O8.prototype,"__isLong__",{value:!0}),O8.isLong=U8;var k8={},z8={};function Q8(t,e){var n,i,r;return e?(t>>>=0,(r=0<=t&&t<256)&&(i=z8[t],i)?i:(n=H8(t,0,!0),r&&(z8[t]=n),n)):(t|=0,(r=-128<=t&&t<128)&&(i=k8[t],i)?i:(n=H8(t,t<0?-1:0,!1),r&&(k8[t]=n),n))}function G8(t,e){if(isNaN(t))return e?t9:$8;if(e){if(t<0)return t9;if(t>=q8)return o9}else{if(t<=-J8)return s9;if(t+1>=J8)return r9}return t<0?G8(-t,e).neg():H8(t%K8|0,t/K8|0,e)}function H8(t,e,n){return new O8(t,e,n)}O8.fromInt=Q8,O8.fromNumber=G8,O8.fromBits=H8;var V8=Math.pow;function j8(t,e,n){if(0===t.length)throw Error("empty string");if("number"===typeof e?(n=e,e=!1):e=!!e,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e?t9:$8;if(n=n||10,n<2||36<n)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return j8(t.substring(1),e,n).neg();for(var r=G8(V8(n,8)),o=$8,s=0;s<t.length;s+=8){var a=Math.min(8,t.length-s),l=parseInt(t.substring(s,s+a),n);if(a<8){var c=G8(V8(n,a));o=o.mul(c).add(G8(l))}else o=o.mul(r),o=o.add(G8(l))}return o.unsigned=e,o}function Z8(t,e){return"number"===typeof t?G8(t,e):"string"===typeof t?j8(t,e):H8(t.low,t.high,"boolean"===typeof e?e:t.unsigned)}O8.fromString=j8,O8.fromValue=Z8;var W8=65536,X8=1<<24,K8=W8*W8,q8=K8*K8,J8=q8/2,Y8=Q8(X8),$8=Q8(0);O8.ZERO=$8;var t9=Q8(0,!0);O8.UZERO=t9;var e9=Q8(1);O8.ONE=e9;var n9=Q8(1,!0);O8.UONE=n9;var i9=Q8(-1);O8.NEG_ONE=i9;var r9=H8(-1,2147483647,!1);O8.MAX_VALUE=r9;var o9=H8(-1,-1,!0);O8.MAX_UNSIGNED_VALUE=o9;var s9=H8(0,-2147483648,!1);O8.MIN_VALUE=s9;var a9=O8.prototype;a9.toInt=function(){return this.unsigned?this.low>>>0:this.low},a9.toNumber=function(){return this.unsigned?(this.high>>>0)*K8+(this.low>>>0):this.high*K8+(this.low>>>0)},a9.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(s9)){var e=G8(t),n=this.div(e),i=n.mul(e).sub(this);return n.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}var r=G8(V8(t,6),this.unsigned),o=this,s="";while(1){var a=o.div(r),l=o.sub(a.mul(r)).toInt()>>>0,c=l.toString(t);if(o=a,o.isZero())return c+s;while(c.length<6)c="0"+c;s=""+c+s}},a9.getHighBits=function(){return this.high},a9.getHighBitsUnsigned=function(){return this.high>>>0},a9.getLowBits=function(){return this.low},a9.getLowBitsUnsigned=function(){return this.low>>>0},a9.getNumBitsAbs=function(){if(this.isNegative())return this.eq(s9)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0;e--)if(0!=(t&1<<e))break;return 0!=this.high?e+33:e+1},a9.isZero=function(){return 0===this.high&&0===this.low},a9.eqz=a9.isZero,a9.isNegative=function(){return!this.unsigned&&this.high<0},a9.isPositive=function(){return this.unsigned||this.high>=0},a9.isOdd=function(){return 1===(1&this.low)},a9.isEven=function(){return 0===(1&this.low)},a9.equals=function(t){return U8(t)||(t=Z8(t)),(this.unsigned===t.unsigned||this.high>>>31!==1||t.high>>>31!==1)&&(this.high===t.high&&this.low===t.low)},a9.eq=a9.equals,a9.notEquals=function(t){return!this.eq(t)},a9.neq=a9.notEquals,a9.ne=a9.notEquals,a9.lessThan=function(t){return this.comp(t)<0},a9.lt=a9.lessThan,a9.lessThanOrEqual=function(t){return this.comp(t)<=0},a9.lte=a9.lessThanOrEqual,a9.le=a9.lessThanOrEqual,a9.greaterThan=function(t){return this.comp(t)>0},a9.gt=a9.greaterThan,a9.greaterThanOrEqual=function(t){return this.comp(t)>=0},a9.gte=a9.greaterThanOrEqual,a9.ge=a9.greaterThanOrEqual,a9.compare=function(t){if(U8(t)||(t=Z8(t)),this.eq(t))return 0;var e=this.isNegative(),n=t.isNegative();return e&&!n?-1:!e&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},a9.comp=a9.compare,a9.negate=function(){return!this.unsigned&&this.eq(s9)?s9:this.not().add(e9)},a9.neg=a9.negate,a9.add=function(t){U8(t)||(t=Z8(t));var e=this.high>>>16,n=65535&this.high,i=this.low>>>16,r=65535&this.low,o=t.high>>>16,s=65535&t.high,a=t.low>>>16,l=65535&t.low,c=0,u=0,h=0,d=0;return d+=r+l,h+=d>>>16,d&=65535,h+=i+a,u+=h>>>16,h&=65535,u+=n+s,c+=u>>>16,u&=65535,c+=e+o,c&=65535,H8(h<<16|d,c<<16|u,this.unsigned)},a9.subtract=function(t){return U8(t)||(t=Z8(t)),this.add(t.neg())},a9.sub=a9.subtract,a9.multiply=function(t){if(this.isZero())return this;if(U8(t)||(t=Z8(t)),D8){var e=D8["mul"](this.low,this.high,t.low,t.high);return H8(e,D8["get_high"](),this.unsigned)}if(t.isZero())return this.unsigned?t9:$8;if(this.eq(s9))return t.isOdd()?s9:$8;if(t.eq(s9))return this.isOdd()?s9:$8;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(Y8)&&t.lt(Y8))return G8(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,r=this.low>>>16,o=65535&this.low,s=t.high>>>16,a=65535&t.high,l=t.low>>>16,c=65535&t.low,u=0,h=0,d=0,A=0;return A+=o*c,d+=A>>>16,A&=65535,d+=r*c,h+=d>>>16,d&=65535,d+=o*l,h+=d>>>16,d&=65535,h+=i*c,u+=h>>>16,h&=65535,h+=r*l,u+=h>>>16,h&=65535,h+=o*a,u+=h>>>16,h&=65535,u+=n*c+i*l+r*a+o*s,u&=65535,H8(d<<16|A,u<<16|h,this.unsigned)},a9.mul=a9.multiply,a9.divide=function(t){if(U8(t)||(t=Z8(t)),t.isZero())throw Error("division by zero");if(D8){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;var e=(this.unsigned?D8["div_u"]:D8["div_s"])(this.low,this.high,t.low,t.high);return H8(e,D8["get_high"](),this.unsigned)}if(this.isZero())return this.unsigned?t9:$8;var n,i,r;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return t9;if(t.gt(this.shru(1)))return n9;r=t9}else{if(this.eq(s9)){if(t.eq(e9)||t.eq(i9))return s9;if(t.eq(s9))return e9;var o=this.shr(1);return n=o.div(t).shl(1),n.eq($8)?t.isNegative()?e9:i9:(i=this.sub(t.mul(n)),r=n.add(i.div(t)),r)}if(t.eq(s9))return this.unsigned?t9:$8;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();r=$8}i=this;while(i.gte(t)){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));var s=Math.ceil(Math.log(n)/Math.LN2),a=s<=48?1:V8(2,s-48),l=G8(n),c=l.mul(t);while(c.isNegative()||c.gt(i))n-=a,l=G8(n,this.unsigned),c=l.mul(t);l.isZero()&&(l=e9),r=r.add(l),i=i.sub(c)}return r},a9.div=a9.divide,a9.modulo=function(t){if(U8(t)||(t=Z8(t)),D8){var e=(this.unsigned?D8["rem_u"]:D8["rem_s"])(this.low,this.high,t.low,t.high);return H8(e,D8["get_high"](),this.unsigned)}return this.sub(this.div(t).mul(t))},a9.mod=a9.modulo,a9.rem=a9.modulo,a9.not=function(){return H8(~this.low,~this.high,this.unsigned)},a9.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},a9.clz=a9.countLeadingZeros,a9.countTrailingZeros=function(){return this.low?N8(this.low):N8(this.high)+32},a9.ctz=a9.countTrailingZeros,a9.and=function(t){return U8(t)||(t=Z8(t)),H8(this.low&t.low,this.high&t.high,this.unsigned)},a9.or=function(t){return U8(t)||(t=Z8(t)),H8(this.low|t.low,this.high|t.high,this.unsigned)},a9.xor=function(t){return U8(t)||(t=Z8(t)),H8(this.low^t.low,this.high^t.high,this.unsigned)},a9.shiftLeft=function(t){return U8(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?H8(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):H8(0,this.low<<t-32,this.unsigned)},a9.shl=a9.shiftLeft,a9.shiftRight=function(t){return U8(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?H8(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):H8(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},a9.shr=a9.shiftRight,a9.shiftRightUnsigned=function(t){return U8(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?H8(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):H8(32===t?this.high:this.high>>>t-32,0,this.unsigned)},a9.shru=a9.shiftRightUnsigned,a9.shr_u=a9.shiftRightUnsigned,a9.rotateLeft=function(t){var e;return U8(t)&&(t=t.toInt()),0===(t&=63)?this:32===t?H8(this.high,this.low,this.unsigned):t<32?(e=32-t,H8(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned)):(t-=32,e=32-t,H8(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned))},a9.rotl=a9.rotateLeft,a9.rotateRight=function(t){var e;return U8(t)&&(t=t.toInt()),0===(t&=63)?this:32===t?H8(this.high,this.low,this.unsigned):t<32?(e=32-t,H8(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned)):(t-=32,e=32-t,H8(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned))},a9.rotr=a9.rotateRight,a9.toSigned=function(){return this.unsigned?H8(this.low,this.high,!1):this},a9.toUnsigned=function(){return this.unsigned?this:H8(this.low,this.high,!0)},a9.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},a9.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},a9.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},O8.fromBytes=function(t,e,n){return n?O8.fromBytesLE(t,e):O8.fromBytesBE(t,e)},O8.fromBytesLE=function(t,e){return new O8(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},O8.fromBytesBE=function(t,e){return new O8(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)};var l9=O8;const c9=16;function u9(t){"X"===t&&(t="");const e=t.padEnd(c9,"0");return l9.fromString(e,!0,16)}function h9(t){if(t.isZero())return"X";let e=t.countTrailingZeros();const n=e%4;e=(e-n)/4;const i=e;e*=4;const r=t.shiftRightUnsigned(e),o=r.toString(16).replace(/0+$/,""),s=Array(17-i-o.length).join("0");return s+o}function d9(t,e){const n=A9(t).shiftRightUnsigned(2),i=t.add(l9.fromNumber(2*e+1-4).multiply(n));return i}function A9(t){return t.and(t.not().add(1))}const p9=3,f9=30,g9=2*f9+1,m9=180/Math.PI;function _9(t){if(0===t.length)throw new Error("Invalid Hilbert quad key ".concat(t));const e=t.split("/"),n=parseInt(e[0],10),i=e[1],r=i.length;let o=0;const s=[0,0];for(let a=r-1;a>=0;a--){o=r-a;const t=i[a];let e=0,n=0;"1"===t?n=1:"2"===t?(e=1,n=1):"3"===t&&(e=1);const l=Math.pow(2,o-1);C9(l,s,e,n),s[0]+=l*e,s[1]+=l*n}if(n%2===1){const t=s[0];s[0]=s[1],s[1]=t}return{face:n,ij:s,level:o}}function y9(t){if(t.isZero())return"";let e=t.toString(2);while(e.length<p9+g9)e="0"+e;const n=e.lastIndexOf("1"),i=e.substring(0,3),r=e.substring(3,n),o=r.length/2,s=l9.fromString(i,!0,2).toString(10);let a="";if(0!==o){a=l9.fromString(r,!0,2).toString(4);while(a.length<o)a="0"+a}return"".concat(s,"/").concat(a)}function v9(t,e,n){const i=1<<e;return[(t[0]+n[0])/i,(t[1]+n[1])/i]}function x9(t){return t>=.5?1/3*(4*t*t-1):1/3*(1-4*(1-t)*(1-t))}function b9(t){return[x9(t[0]),x9(t[1])]}function w9(t,e){let[n,i]=e;switch(t){case 0:return[1,n,i];case 1:return[-n,1,i];case 2:return[-n,-i,1];case 3:return[-1,-i,-n];case 4:return[i,-1,-n];case 5:return[i,n,-1];default:throw new Error("Invalid face")}}function E9(t){let[e,n,i]=t;const r=Math.atan2(i,Math.sqrt(e*e+n*n)),o=Math.atan2(n,e);return[o*m9,r*m9]}function C9(t,e,n,i){if(0===i){1===n&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);const i=e[0];e[0]=e[1],e[1]=i}}function B9(t){const e=v9(t.ij,t.level,[.5,.5]),n=b9(e),i=w9(t.face,n);return E9(i)}function S9(t){const e=M9(t),n=_9(e);return n}function M9(t){if(t.indexOf("/")>0)return t;const e=u9(t);return y9(e)}const T9=100;function I9(t){const{face:e,ij:n,level:i}=t,r=[[0,0],[0,1],[1,1],[1,0],[0,0]],o=Math.max(1,Math.ceil(T9*Math.pow(2,-i))),s=new Float64Array(4*o*2+2);let a=0,l=0;for(let c=0;c<4;c++){const t=r[c].slice(0),u=r[c+1],h=(u[0]-t[0])/o,d=(u[1]-t[1])/o;for(let r=0;r<o;r++){t[0]+=h,t[1]+=d;const r=v9(n,i,t),o=b9(r),c=w9(e,o),u=E9(c);Math.abs(u[1])>89.999&&(u[0]=l);const A=u[0]-l;u[0]+=A>180?-360:A<-180?360:0,s[a++]=u[0],s[a++]=u[1],l=u[0]}}return s[a++]=s[0],s[a++]=s[1],s}function L9(t){let e;if(2===t.face||5===t.face){let n=null,i=0;for(let e=0;e<4;e++){const r="".concat(t.face,"/").concat(e),o=S9(r),s=I9(o);"undefined"!==typeof n&&null!==n||(n=new Float64Array(4*s.length)),n.set(s,i),i+=s.length}e=P9(n)}else{const n=I9(t);e=P9(n)}return e}function P9(t){if(t.length%2!==0)throw new Error("Invalid corners");const e=[],n=[];for(let i=0;i<t.length;i+=2)e.push(t[i]),n.push(t[i+1]);return e.sort(((t,e)=>t-e)),n.sort(((t,e)=>t-e)),{west:e[0],east:e[e.length-1],north:n[n.length-1],south:n[0]}}function F9(t,e){const n=(null===e||void 0===e?void 0:e.minimumHeight)||0,i=(null===e||void 0===e?void 0:e.maximumHeight)||0,r=S9(t),o=L9(r),s=o.west,a=o.south,l=o.east,c=o.north,u=[];return u.push(new PO.Z(s,c,n)),u.push(new PO.Z(l,c,n)),u.push(new PO.Z(l,a,n)),u.push(new PO.Z(s,a,n)),u.push(new PO.Z(s,c,i)),u.push(new PO.Z(l,c,i)),u.push(new PO.Z(l,a,i)),u.push(new PO.Z(s,a,i)),u}function R9(t){const e=S9(t);return B9(e)}function D9(t){const e=t.token,n={minimumHeight:t.minimumHeight,maximumHeight:t.maximumHeight},i=F9(e,n),r=R9(e),o=r[0],s=r[1],a=q3.WGS84.cartographicToCartesian([o,s,n.maximumHeight]),l=new PO.Z(a[0],a[1],a[2]);i.push(l);const c=K4(i),u=[...c.center,...c.halfAxes];return u}const O9=4,U9=8,N9={QUADTREE:O9,OCTREE:U9};function k9(t,e,n){if(null!==t&&void 0!==t&&t.box){const i=u9(t.s2VolumeInfo.token),r=d9(i,e),o=h9(r),s={...t.s2VolumeInfo};switch(s.token=o,n){case"OCTREE":const e=t.s2VolumeInfo,n=e.maximumHeight-e.minimumHeight,i=n/2,r=e.minimumHeight+n/2;e.minimumHeight=r-i,e.maximumHeight=r+i;break;default:break}const a=D9(s),l={box:a,s2VolumeInfo:s};return l}}async function z9(t){const{options:e,parentData:n={mortonIndex:0,x:0,y:0,z:0},childIndex:i=0,globalData:r={level:0,mortonIndex:0,x:0,y:0,z:0},s2VolumeBox:o}=t;let{subtree:s,level:a=0}=t;const{subdivisionScheme:l,subtreeLevels:c,maximumLevel:u,contentUrlTemplate:h,subtreesUriTemplate:d,basePath:A}=e,p={children:[],lodMetricValue:0,contentUrl:""},f=N9[l],g=1&i,m=i>>1&1,_=i>>2&1,y=(f**a-1)/(f-1);let v=V9(n.mortonIndex,i),x=y+v,b=V9(n.x,g),w=V9(n.y,m),E=V9(n.z,_),C=!1;a+1>c&&(C=Q9(s.childSubtreeAvailability,v));const B=V9(r.x,b),S=V9(r.y,w),M=V9(r.z,E),T=a+r.level;if(C){const t="".concat(A,"/").concat(d),e=j9(t,T,B,S,M),n=await SO(e,R8);s=n,r.mortonIndex=v,r.x=b,r.y=w,r.z=E,r.level=a,v=0,x=0,b=0,w=0,E=0,a=0}const I=Q9(s.tileAvailability,x);if(!I||a>u)return p;const L=Q9(s.contentAvailability,x);L&&(p.contentUrl=j9(h,T,B,S,M));const P=a+1,F={mortonIndex:v,x:b,y:w,z:E};for(let R=0;R<f;R++){const t=k9(o,R,l),n=await z9({subtree:s,options:e,parentData:F,childIndex:R,level:P,globalData:r,s2VolumeBox:t});if(n.contentUrl||n.children.length){const t=T+1,i={childTileX:b,childTileY:w,childTileZ:E},r=G9(n,t,i,e,o);p.children.push(r)}}return p}function Q9(t,e){return"constant"in t?Boolean(t.constant):!!t.explicitBitstream&&W9(e,t.explicitBitstream)}function G9(t,e,n,i,r){const{basePath:o,refine:s,getRefine:a,lodMetricType:l,getTileType:c,rootLodMetricValue:u,rootBoundingVolume:h}=i,d=t.contentUrl&&t.contentUrl.replace("".concat(o,"/"),""),A=u/2**e,p=null!==r&&void 0!==r&&r.box?{box:r.box}:h,f=H9(e,p,n);return{children:t.children,contentUrl:t.contentUrl,content:{uri:d},id:t.contentUrl,refine:a(s),type:c(t),lodMetricType:l,lodMetricValue:A,geometricError:A,transform:t.transform,boundingVolume:f}}function H9(t,e,n){if(e.region){const{childTileX:i,childTileY:r,childTileZ:o}=n,[s,a,l,c,u,h]=e.region,d=2**t,A=(l-s)/d,p=(c-a)/d,f=(h-u)/d,[g,m]=[s+A*i,s+A*(i+1)],[_,y]=[a+p*r,a+p*(r+1)],[v,x]=[u+f*o,u+f*(o+1)];return{region:[g,_,m,y,v,x]}}if(e.box)return e;throw new Error("Unsupported bounding volume type ".concat(e))}function V9(t,e){return parseInt(t.toString(2)+e.toString(2),2)}function j9(t,e,n,i,r){const o=Z9({level:e,x:n,y:i,z:r});return t.replace(/{level}|{x}|{y}|{z}/gi,(t=>o[t]))}function Z9(t){const e={};for(const n in t)e["{".concat(n,"}")]=t[n];return e}function W9(t,e){const n=Math.floor(t/8),i=t%8,r=e[n]>>i&1;return 1===r}function X9(t){if(!t.contentUrl)return p5.EMPTY;const e=t.contentUrl.split("?")[0],n=e.split(".").pop();switch(n){case"pnts":return p5.POINTCLOUD;case"i3dm":case"b3dm":case"glb":case"gltf":return p5.SCENEGRAPH;default:return n}}function K9(t){switch(t){case"REPLACE":case"replace":return A5.REPLACE;case"ADD":case"add":return A5.ADD;default:return t}}function q9(t,e){const n=/^[a-z][0-9a-z+.-]*:/i;if(n.test(e)){const n=new URL(t,"".concat(e,"/"));return decodeURI(n.toString())}return t.startsWith("/")?t:"".concat(e,"/").concat(t)}function J9(t,e){if(!t)return null;if(t.content){const n=t.content.uri||t.content.url;t.contentUrl=q9(n,e.basePath)}return t.id=t.contentUrl,t.lodMetricType=g5.GEOMETRIC_ERROR,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform,t.type=X9(t),t.refine=K9(t.refine),t}async function Y9(t,e){const n=t.basePath;let i;const r=e7(null===t||void 0===t?void 0:t.root);i=r&&t.root?await $9(t.root,t,r,e):J9(t.root,t);const o=[];o.push(i);while(o.length>0){const i=o.pop()||{},r=i.children||[];for(let s of r){const i=e7(s);i?s=await $9(s,t,i,e):J9(s,{basePath:n}),o.push(s)}}return i}async function $9(t,e,n,i){var r,o;const s=e.basePath,{subdivisionScheme:a,maximumLevel:l,subtreeLevels:c,subtrees:{uri:u}}=n,h=j9(u,0,0,0,0),d=q9(h,s),A=await SO(d,R8,i),p=q9(t.content.uri,s),f=null===e||void 0===e||null===(r=e.root)||void 0===r?void 0:r.refine,g=t.geometricError,m=null===(o=t.boundingVolume.extensions)||void 0===o?void 0:o["3DTILES_bounding_volume_S2"];if(m){const e=D9(m),n={box:e,s2VolumeInfo:m};t.boundingVolume=n}const _=t.boundingVolume,y={contentUrlTemplate:p,subtreesUriTemplate:u,subdivisionScheme:a,subtreeLevels:c,maximumLevel:l,refine:f,basePath:s,lodMetricType:g5.GEOMETRIC_ERROR,rootLodMetricValue:g,rootBoundingVolume:_,getTileType:X9,getRefine:K9};return await t7(t,A,y)}async function t7(t,e,n){if(!t)return null;t.lodMetricType=g5.GEOMETRIC_ERROR,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform;const{children:i,contentUrl:r}=await z9({subtree:e,options:n,s2VolumeBox:t});return r&&(t.contentUrl=r,t.content={uri:r.replace("".concat(n.basePath,"/"),"")}),t.refine=K9(t.refine),t.type=X9(t),t.children=i,t.id=t.contentUrl,t}function e7(t){var e;return(null===t||void 0===t||null===(e=t.extensions)||void 0===e?void 0:e["3DTILES_implicit_tiling"])||(null===t||void 0===t?void 0:t.implicitTiling)}const n7={id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:A6,extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:s7,options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};function i7(t){return nO(t.url)}async function r7(t,e,n){const i={content:{featureIds:null}},r=0;return await S8(t,r,e,n,i.content),i.content}async function o7(t,e,n){var i;const r=JSON.parse((new TextDecoder).decode(t));return r.loader=e.loader||n7,r.url=n.url,r.queryString=n.queryString,r.basePath=i7(r),r.root=await Y9(r,e),r.type=f5.TILES3D,r.lodMetricType=g5.GEOMETRIC_ERROR,r.lodMetricValue=(null===(i=r.root)||void 0===i?void 0:i.lodMetricValue)||0,r}async function s7(t,e,n){const i=e["3d-tiles"]||{};let r;return r="auto"===i.isTileset?n.url&&-1!==n.url.indexOf(".json"):i.isTileset,t=r?await o7(t,e,n):await r7(t,e,n),t}const a7=[0],l7={getPointColor:{type:"accessor",value:[0,0,0,255]},pointSize:1,data:"",loader:n7,onTilesetLoad:{type:"function",value:t=>{}},onTileLoad:{type:"function",value:t=>{}},onTileUnload:{type:"function",value:t=>{}},onTileError:{type:"function",value:(t,e,n)=>{}},_getMeshColor:{type:"function",value:t=>[255,255,255]}};class c7 extends mJ{constructor(...t){super(...t),(0,NP.Z)(this,"state",void 0)}initializeState(){"onTileLoadFail"in this.props&&EF.removed("onTileLoadFail","onTileError")(),this.state={layerMap:{},tileset3d:null,activeViewports:{},lastUpdatedViewports:null}}get isLoaded(){const{tileset3d:t}=this.state;return null!==t&&t.isLoaded()}shouldUpdateState({changeFlags:t}){return t.somethingChanged}updateState({props:t,oldProps:e,changeFlags:n}){if(t.data&&t.data!==e.data&&this._loadTileset(t.data),n.viewportChanged){const{activeViewports:t}=this.state,e=Object.keys(t).length;e&&(this._updateTileset(t),this.state.lastUpdatedViewports=t,this.state.activeViewports={})}if(n.propsChanged){const{layerMap:t}=this.state;for(const e in t)t[e].needsUpdate=!0}}activateViewport(t){const{activeViewports:e,lastUpdatedViewports:n}=this.state;this.internalState.viewport=t,e[t.id]=t;const i=null===n||void 0===n?void 0:n[t.id];i&&t.equals(i)||(this.setChangeFlags({viewportChanged:!0}),this.setNeedsUpdate())}getPickingInfo({info:t,sourceLayer:e}){const n=e&&e.props.tile;return t.picked&&(t.object=n),t.sourceTile=n,t}filterSubLayer({layer:t,viewport:e}){const{tile:n}=t.props,{id:i}=e;return n.selected&&n.viewportIds.includes(i)}_updateAutoHighlight(t){const e=t.sourceTile,n=this.state.layerMap[null===e||void 0===e?void 0:e.id];n&&n.layer&&n.layer.updateAutoHighlight(t)}async _loadTileset(t){const{loadOptions:e={}}=this.props;let n=this.props.loader||this.props.loaders;Array.isArray(n)&&(n=n[0]);const i={loadOptions:{...e}};if(n.preload){const r=await n.preload(t,e);r.headers&&(i.loadOptions.fetch={...i.loadOptions.fetch,headers:r.headers}),Object.assign(i,r)}const r=await SO(t,n,i.loadOptions),o=new d6(r,{onTileLoad:this._onTileLoad.bind(this),onTileUnload:this._onTileUnload.bind(this),onTileError:this.props.onTileError,...i});this.setState({tileset3d:o,layerMap:{}}),this._updateTileset(this.state.activeViewports),this.props.onTilesetLoad(o)}_onTileLoad(t){const{lastUpdatedViewports:e}=this.state;this.props.onTileLoad(t),this._updateTileset(e),this.setNeedsUpdate()}_onTileUnload(t){delete this.state.layerMap[t.id],this.props.onTileUnload(t)}_updateTileset(t){if(!t)return;const{tileset3d:e}=this.state,{timeline:n}=this.context,i=Object.keys(t).length;n&&i&&e&&e.selectTiles(Object.values(t)).then((t=>{const e=this.state.frameNumber!==t;e&&this.setState({frameNumber:t})}))}_getSubLayer(t,e){if(!t.content)return null;switch(t.type){case p5.POINTCLOUD:return this._makePointCloudLayer(t,e);case p5.SCENEGRAPH:return this._make3DModelLayer(t);case p5.MESH:return this._makeSimpleMeshLayer(t,e);default:throw new Error("Tile3DLayer: Failed to render layer of type ".concat(t.content.type))}}_makePointCloudLayer(t,e){const{attributes:n,pointCount:i,constantRGBA:r,cartographicOrigin:o,modelMatrix:s}=t.content,{positions:a,normals:l,colors:c}=n;if(!a)return null;const u=e&&e.props.data||{header:{vertexCount:i},attributes:{POSITION:a,NORMAL:l,COLOR_0:c}},{pointSize:h,getPointColor:d}=this.props,A=this.getSubLayerClass("pointcloud",jJ);return new A({pointSize:h},this.getSubLayerProps({id:"pointcloud"}),{id:"".concat(this.id,"-pointcloud-").concat(t.id),tile:t,data:u,coordinateSystem:TU.METER_OFFSETS,coordinateOrigin:o,modelMatrix:s,getColor:r||d,_offset:0})}_make3DModelLayer(t){const{gltf:e,instances:n,cartographicOrigin:i,modelMatrix:r}=t.content,o=this.getSubLayerClass("scenegraph",l3);return new o({_lighting:"pbr"},this.getSubLayerProps({id:"scenegraph"}),{id:"".concat(this.id,"-scenegraph-").concat(t.id),tile:t,data:n||a7,scenegraph:e,coordinateSystem:TU.METER_OFFSETS,coordinateOrigin:i,modelMatrix:r,getTransformMatrix:t=>t.modelMatrix,getPosition:[0,0,0],_offset:0})}_makeSimpleMeshLayer(t,e){const n=t.content,{attributes:i,indices:r,modelMatrix:o,cartographicOrigin:s,coordinateSystem:a=TU.METER_OFFSETS,material:l,featureIds:c}=n,{_getMeshColor:u}=this.props,h=e&&e.props.mesh||new pX({drawMode:4,attributes:u7(i),indices:r}),d=this.getSubLayerClass("mesh",v3);return new d(this.getSubLayerProps({id:"mesh"}),{id:"".concat(this.id,"-mesh-").concat(t.id),tile:t,mesh:h,data:a7,getColor:u(t),pbrMaterial:l,modelMatrix:o,coordinateOrigin:s,coordinateSystem:a,featureIds:c,_offset:0})}renderLayers(){const{tileset3d:t,layerMap:e}=this.state;return t?t.tiles.map((t=>{const n=e[t.id]=e[t.id]||{tile:t};let{layer:i}=n;return t.selected&&(i?n.needsUpdate&&(i=this._getSubLayer(t,i),n.needsUpdate=!1):i=this._getSubLayer(t)),n.layer=i,i})).filter(Boolean):null}}function u7(t){const e={};return e.positions={...t.positions,value:new Float32Array(t.positions.value)},t.normals&&(e.normals=t.normals),t.texCoords&&(e.texCoords=t.texCoords),t.colors&&(e.colors=t.colors),t.uvRegions&&(e.uvRegions=t.uvRegions),e}(0,NP.Z)(c7,"defaultProps",l7),(0,NP.Z)(c7,"layerName","Tile3DLayer");const h7=i(4808),d7=(t,e="")=>new Promise((n=>{const{map:i}=vm;let r=new dX({id:t.id,type:c7,data:t.url,loader:n7,pickable:!0,onTilesetLoad:e=>{e.setProps({maximumScreenSpaceError:1});const{cartographicCenter:i,zoom:r}=e;let o=t.translation||{x:0,y:0,z:0},s=(new h7.Matrix4).makeTranslation(o.x,o.y,o.z);e.modelMatrix=s;let a=t.centerOffset||{x:0,y:0};vm.flyTo({center:[i[0]+a.x,i[1]+a.y],zoom:r+4,pitch:72,bearing:15});const l=[i[0]+a.x,i[1]+a.y];n({center:l})},onClick:(t,e)=>{console.log("onClick",t,e)},onTileError:t=>{console.log(t)}});om(t.id)&&lm(t.id),i.addLayer(r,e)}));class A7 extends Zb{constructor(t,e={}){super(t),this.isWater=!0;const n=this,i=void 0!==e.textureWidth?e.textureWidth:512,r=void 0!==e.textureHeight?e.textureHeight:512,o=void 0!==e.clipBias?e.clipBias:0,s=void 0!==e.alpha?e.alpha:1,a=void 0!==e.time?e.time:0,l=void 0!==e.waterNormals?e.waterNormals:null,c=void 0!==e.sunDirection?e.sunDirection:new $v(.70707,.70707,0),u=new Qv(void 0!==e.sunColor?e.sunColor:16777215),h=new Qv(void 0!==e.waterColor?e.waterColor:8355711),d=void 0!==e.eye?e.eye:new $v(0,0,0),A=void 0!==e.distortionScale?e.distortionScale:20,p=void 0!==e.side?e.side:Ym,f=void 0!==e.fog&&e.fog,g=new Aw,m=new $v,_=new $v,y=new $v,v=new Tx,x=new $v(0,0,-1),b=new Xv,w=new $v,E=new $v,C=new Xv,B=new Tx,S=new rw,M=new Kv(i,r),T={uniforms:$b.merge([$C.fog,$C.lights,{normalSampler:{value:null},mirrorSampler:{value:null},alpha:{value:1},time:{value:0},size:{value:1},distortionScale:{value:20},textureMatrix:{value:new Tx},sunColor:{value:new Qv(8355711)},sunDirection:{value:new $v(.70707,.70707,0)},eye:{value:new $v},waterColor:{value:new Qv(5592405)}}]),vertexShader:"\n\t\t\t\tuniform mat4 textureMatrix;\n\t\t\t\tuniform float time;\n\n\t\t\t\tvarying vec4 mirrorCoord;\n\t\t\t\tvarying vec4 worldPosition;\n\n\t\t\t\t#include <common>\n\t\t\t\t#include <fog_pars_vertex>\n\t\t\t\t#include <shadowmap_pars_vertex>\n\t\t\t\t#include <logdepthbuf_pars_vertex>\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tmirrorCoord = modelMatrix * vec4( position, 1.0 );\n\t\t\t\t\tworldPosition = mirrorCoord.xyzw;\n\t\t\t\t\tmirrorCoord = textureMatrix * mirrorCoord;\n\t\t\t\t\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t\tgl_Position = projectionMatrix * mvPosition;\n\n\t\t\t\t#include <beginnormal_vertex>\n\t\t\t\t#include <defaultnormal_vertex>\n\t\t\t\t#include <logdepthbuf_vertex>\n\t\t\t\t#include <fog_vertex>\n\t\t\t\t#include <shadowmap_vertex>\n\t\t\t}",fragmentShader:"\n\t\t\t\tuniform sampler2D mirrorSampler;\n\t\t\t\tuniform float alpha;\n\t\t\t\tuniform float time;\n\t\t\t\tuniform float size;\n\t\t\t\tuniform float distortionScale;\n\t\t\t\tuniform sampler2D normalSampler;\n\t\t\t\tuniform vec3 sunColor;\n\t\t\t\tuniform vec3 sunDirection;\n\t\t\t\tuniform vec3 eye;\n\t\t\t\tuniform vec3 waterColor;\n\n\t\t\t\tvarying vec4 mirrorCoord;\n\t\t\t\tvarying vec4 worldPosition;\n\n\t\t\t\tvec4 getNoise( vec2 uv ) {\n\t\t\t\t\tvec2 uv0 = ( uv / 103.0 ) + vec2(time / 17.0, time / 29.0);\n\t\t\t\t\tvec2 uv1 = uv / 107.0-vec2( time / -19.0, time / 31.0 );\n\t\t\t\t\tvec2 uv2 = uv / vec2( 8907.0, 9803.0 ) + vec2( time / 101.0, time / 97.0 );\n\t\t\t\t\tvec2 uv3 = uv / vec2( 1091.0, 1027.0 ) - vec2( time / 109.0, time / -113.0 );\n\t\t\t\t\tvec4 noise = texture2D( normalSampler, uv0 ) +\n\t\t\t\t\t\ttexture2D( normalSampler, uv1 ) +\n\t\t\t\t\t\ttexture2D( normalSampler, uv2 ) +\n\t\t\t\t\t\ttexture2D( normalSampler, uv3 );\n\t\t\t\t\treturn noise * 0.5 - 1.0;\n\t\t\t\t}\n\n\t\t\t\tvoid sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor ) {\n\t\t\t\t\tvec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) );\n\t\t\t\t\tfloat direction = max( 0.0, dot( eyeDirection, reflection ) );\n\t\t\t\t\tspecularColor += pow( direction, shiny ) * sunColor * spec;\n\t\t\t\t\tdiffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * sunColor * diffuse;\n\t\t\t\t}\n\n\t\t\t\t#include <common>\n\t\t\t\t#include <packing>\n\t\t\t\t#include <bsdfs>\n\t\t\t\t#include <fog_pars_fragment>\n\t\t\t\t#include <logdepthbuf_pars_fragment>\n\t\t\t\t#include <lights_pars_begin>\n\t\t\t\t#include <shadowmap_pars_fragment>\n\t\t\t\t#include <shadowmask_pars_fragment>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\t#include <logdepthbuf_fragment>\n\t\t\t\t\tvec4 noise = getNoise( worldPosition.xz * size );\n\t\t\t\t\tvec3 surfaceNormal = normalize( noise.xzy * vec3( 1.5, 1.0, 1.5 ) );\n\n\t\t\t\t\tvec3 diffuseLight = vec3(0.0);\n\t\t\t\t\tvec3 specularLight = vec3(0.0);\n\n\t\t\t\t\tvec3 worldToEye = eye-worldPosition.xyz;\n\t\t\t\t\tvec3 eyeDirection = normalize( worldToEye );\n\t\t\t\t\tsunLight( surfaceNormal, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight );\n\n\t\t\t\t\tfloat distance = length(worldToEye);\n\n\t\t\t\t\tvec2 distortion = surfaceNormal.xz * ( 0.001 + 1.0 / distance ) * distortionScale;\n\t\t\t\t\tvec3 reflectionSample = vec3( texture2D( mirrorSampler, mirrorCoord.xy / mirrorCoord.w + distortion ) );\n\n\t\t\t\t\tfloat theta = max( dot( eyeDirection, surfaceNormal ), 0.0 );\n\t\t\t\t\tfloat rf0 = 0.3;\n\t\t\t\t\tfloat reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 );\n\t\t\t\t\tvec3 scatter = max( 0.0, dot( surfaceNormal, eyeDirection ) ) * waterColor;\n\t\t\t\t\tvec3 albedo = mix( ( sunColor * diffuseLight * 0.3 + scatter ) * getShadowMask(), ( vec3( 0.1 ) + reflectionSample * 0.9 + reflectionSample * specularLight ), reflectance);\n\t\t\t\t\tvec3 outgoingLight = albedo;\n\t\t\t\t\tgl_FragColor = vec4( outgoingLight, alpha );\n\n\t\t\t\t\t#include <tonemapping_fragment>\n\t\t\t\t\t#include <fog_fragment>\n\t\t\t\t}"},I=new nw({fragmentShader:T.fragmentShader,vertexShader:T.vertexShader,uniforms:$b.clone(T.uniforms),lights:!0,side:p,fog:f});I.uniforms["mirrorSampler"].value=M.texture,I.uniforms["textureMatrix"].value=B,I.uniforms["alpha"].value=s,I.uniforms["time"].value=a,I.uniforms["normalSampler"].value=l,I.uniforms["sunColor"].value=u,I.uniforms["waterColor"].value=h,I.uniforms["sunDirection"].value=c,I.uniforms["distortionScale"].value=A,I.uniforms["eye"].value=d,n.material=I,n.onBeforeRender=function(t,e,i){if(_.setFromMatrixPosition(n.matrixWorld),y.setFromMatrixPosition(i.matrixWorld),v.extractRotation(n.matrixWorld),m.set(0,0,1),m.applyMatrix4(v),w.subVectors(_,y),w.dot(m)>0)return;w.reflect(m).negate(),w.add(_),v.extractRotation(i.matrixWorld),x.set(0,0,-1),x.applyMatrix4(v),x.add(y),E.subVectors(_,x),E.reflect(m).negate(),E.add(_),S.position.copy(w),S.up.set(0,1,0),S.up.applyMatrix4(v),S.up.reflect(m),S.lookAt(E),S.far=i.far,S.updateMatrixWorld(),S.projectionMatrix.copy(i.projectionMatrix),B.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),B.multiply(S.projectionMatrix),B.multiply(S.matrixWorldInverse),g.setFromNormalAndCoplanarPoint(m,_),g.applyMatrix4(S.matrixWorldInverse),b.set(g.normal.x,g.normal.y,g.normal.z,g.constant);const r=S.projectionMatrix;C.x=(Math.sign(b.x)+r.elements[8])/r.elements[0],C.y=(Math.sign(b.y)+r.elements[9])/r.elements[5],C.z=-1,C.w=(1+r.elements[10])/r.elements[14],b.multiplyScalar(2/b.dot(C)),r.elements[2]=b.x,r.elements[6]=b.y,r.elements[10]=b.z+1-o,r.elements[14]=b.w,d.setFromMatrixPosition(i.matrixWorld);const s=t.getRenderTarget(),a=t.xr.enabled,l=t.shadowMap.autoUpdate;n.visible=!1,t.xr.enabled=!1,t.shadowMap.autoUpdate=!1,t.setRenderTarget(M),t.state.buffers.depth.setMask(!0),!1===t.autoClear&&t.clear(),t.render(e,S),n.visible=!0,t.xr.enabled=a,t.shadowMap.autoUpdate=l,t.setRenderTarget(s);const c=i.viewport;void 0!==c&&t.state.viewport(c)}}}const p7={id:"water",position:[103.353557,23.362395],hight:0,size:[4e3,4e3],edit:!1},f7=(t,e="")=>new Promise((n=>{let{map:i}=vm,r=Object.assign({},p7,t),o="",s="",a="",l="",c="",u="",h="";function d(){const t=r.position,e=r.elevation,n=[Math.PI/2,0,0],d=eg().MercatorCoordinate.fromLngLat(t,e),A={translateX:d.x,translateY:d.y,translateZ:d.z,rotateX:n[0],rotateY:n[1],rotateZ:n[2],scale:d.meterInMercatorCoordinateUnits()};return c={id:r.id,type:"custom",renderingMode:"3d",onAdd:(t,e)=>{const n=t.getCanvas();o=new rw(50,n.clientWidth/n.clientHeight,1,5e3),s=new WM,a=new UM,a.name="water",s.add(a);let i=p(d,r);const c=new pb({color:r.color||7706588,opacity:.5,side:t_,transparent:!0}),A=new pb;A.wireframe=!0,h=new Zb(i,c),u=new A7(i,{textureWidth:64,textureHeight:64,waterNormals:(new OI).load("/img/waternormals.jpg",(t=>{t.wrapS=t.wrapT=Z_})),alpha:.3,side:t_,sunColor:16777215,waterColor:16777215,distortionScale:3.7,fog:void 0!==s.fog}),u.material.transparent=!0,s.position.y=r.hight,a.add(u),a.add(h),a.rotation.x=-Math.PI/2,l=new jM({canvas:t.getCanvas(),context:e,logarithmicDepthBuffer:!0,antialias:!0}),l.autoClear=!1,l.physicallyCorrectLights=!0,l.setSize(n.clientWidth,n.clientHeight),window.addEventListener("resize",(()=>{l.setSize(n.clientWidth,n.clientHeight),o.aspect=n.clientWidth/n.clientHeight,o.updateProjectionMatrix()}))},render:(t,e)=>{const n=(new Tx).makeRotationAxis(new $v(1,0,0),A.rotateX),r=(new Tx).makeRotationAxis(new $v(0,1,0),A.rotateY),a=(new Tx).makeRotationAxis(new $v(0,0,1),A.rotateZ),c=(new Tx).fromArray(e),h=(new Tx).makeTranslation(A.translateX,A.translateY,A.translateZ).scale(new $v(A.scale,-A.scale,A.scale)).multiply(n).multiply(r).multiply(a);o.projectionMatrix.elements=e,o.projectionMatrix=c.multiply(h),l.resetState(),l.render(s,o),i.triggerRepaint(),u.material.uniforms["time"].value+=1/60}},c;function p(t,e){if(e.data){var n=[];e.data.features.forEach((e=>{e.geometry.coordinates.forEach((e=>{e.forEach((e=>{let i=eg().MercatorCoordinate.fromLngLat(e,0),r=i.meterInMercatorCoordinateUnits();n.push(new Sv((i.x-t.x)/r,-1*(i.y-t.y)/r))}))}))}));const i=new IT(n),r=f(i);return r}return new yw(e.size[0],e.size[1])}function f(t){const e=new dI(t,{depth:-200,steps:1,bevelEnabled:!1,bevelThickness:0,bevelSize:0,bebelSegments:0,curveSegments:0});return e}}om(r.id)&&lm(r.id),d(),i.addLayer(c,e),n(a)}));i(8499);const g7=(t,e,n,i)=>{const r=e.properties;if(!Array.isArray(t))return console.error("hover-html:入参异常!"),console.log(r),void console.log(t);if(0===t.length)return void console.error("hover-html:入参数组为空!");let o="",s=[];n&&(o+=n),t.forEach((t=>{let e=t.label||"",n=r[t.key];n=n||0===n?n:"-",t.dicData&&t.dicData.length>0&&(n=t.dicData.find((e=>e.value==r[t.key])).label||"-"),t.suffixText&&(n+=t.suffixText),s.push(`<p class="hover-item ${t.customItemClass||""}">\n <span class="label ${t.labelValueClass||""}">${e}:</span>\n <span class="value ${t.customValueClass||""}">${n}</span>\n </p>`)})),s.map((t=>o+=t)),i&&(o+=i),vm.addPopup([e.properties.lgtd,e.properties.lttd],`<div class="xy-hover-html line-height-2">${o}</div>`)};function m7(t,e=!0){return new Promise((n=>{e&&(t=zg(t)),$f.get(`https://restapi.amap.com/v3/geocode/regeo?key=39d46e3fcb4c9740d08e8ecb1f15ff8c&location=${t[0]},${t[1]}&extensions=all`).then((({data:t})=>{if("1"===t.status){let e={formattedAddress:t.regeocode.formatted_address,...t.regeocode.addressComponent};n(e)}}))}))}function _7(){return new Promise((t=>{new AMap.plugin("AMap.Geolocation",(()=>{const e=new AMap.Geolocation({enableHighAccuracy:!0,timeout:1e4,buttonOffset:new AMap.Pixel(10,20),zoomToAccuracy:!0,buttonPosition:"RB"});function n(e){const n={lng:e.position.lng,lat:e.position.lat,formattedAddress:e.formattedAddress,...e.addressComponent};t(n)}function i(t){}e.getCurrentPosition(((t,e)=>{"complete"===t?n(e):i(e)}))}))}))}var y7=function(){var t=this,e=t._self._c;return e("div",{ref:"dom"},[t._t("default")],2)},v7=[],x7={props:{position:{type:Array,default:()=>[]},drag:{type:Boolean,default:!1}},data(){return{}},mounted(){this.createdMarker()},methods:{createdMarker(){let{map:t}=vm,e=this.$refs.dom;const n=new(eg().Marker)(e,{draggable:this.drag}).setLngLat(this.position).addTo(t);this.drag&&n.on("dragend",(()=>{const t=n.getLngLat();this.$emit("dragEnd",t)}))}}},b7=x7;function w7(t,e,n,i,r,o,s,a){var l,c="function"===typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}var E7=w7(b7,y7,v7,!1,null,"35de8978",null),C7=E7.exports,B7=function(){var t=this,e=t._self._c;return e("canvas",{staticClass:"snow",attrs:{id:t.id}},[t._v("不支持canvas")])},S7=[],M7={props:{id:{type:String,default:"rain"},angle:{type:Number,default:-5},status:{type:String,default:"default"},len:{type:Number,default:70},lineWidth:{type:Number,default:1.5},isRain:{type:Boolean,default:!0}},data(){return{timer:"",ctx:null,count:500}},destroyed(){window.clearInterval(this.timer)},mounted(){this.start()},watch:{status(){window.clearInterval(this.timer),this.start()}},methods:{start(){this.$nextTick((()=>{const t=document.getElementById(this.id),e=t.clientWidth,n=t.clientHeight;"small"===this.status&&(this.count=100),"default"===this.status&&(this.count=300),"large"===this.status&&(this.count=1e3),t.width=e,t.height=n,this.ctx=t.getContext("2d"),this.timer=setInterval((()=>{this.isRain?(this.clearCanvas(),this.draws()):this.clearCanvas()}),50)}))},draws(){const t=this,e=document.getElementById(this.id),n=e.clientWidth,i=e.clientHeight;for(let o=1;o<=this.count;o++)r(Math.random()*n,Math.random()*i);function r(e,n){let i=t.ctx,r=i.createLinearGradient(e,n,e+t.angle,5*(n+t.len));r.addColorStop(0,"rgba(255,255,255,0.1)"),r.addColorStop(.5,"rgba(105,105,105,0.3)"),r.addColorStop(1,"rgba(255,255,255,0.5)"),i.strokeStyle=r,i.beginPath(),i.moveTo(e,n),i.lineTo(e+t.angle,n+t.len),i.lineWidth=t.lineWidth,i.stroke(),i.closePath()}},clearCanvas(){const t=document.getElementById(this.id),e=t.clientWidth,n=t.clientHeight;this.ctx.clearRect(0,0,e,n)}}},T7=M7,I7=(i(6872),w7(T7,B7,S7,!1,null,"20664206",null)),L7=I7.exports,P7=function(){var t=this,e=t._self._c;return e("div",{staticClass:"mapLoad flex flex-col flex-align-center",class:{loadOver:!t.show}},[e("img",{staticStyle:{"margin-top":"10%"},attrs:{src:"/img/loading.gif",width:"400"}}),e("div",{staticClass:"text-center",staticStyle:{width:"400px","margin-top":"-90px"}},[e("div",{staticClass:"mb-20"},[t._v("正在努力加载中..."+t._s(t.progress.toFixed(0))+"%")]),e("div",{staticClass:"progress-wrap"},[e("div",{staticClass:"progress-inner"},[e("div",{staticClass:"progress-nums",style:`width: ${t.progress}%`})])])])])},F7=[],R7={props:{loading:{type:Boolean,default:!0},loadTime:{type:Number,default:5e3}},data(){return{progress:0,timer:"",show:!0}},watch:{loading:{handler(t){t||(this.show=!1,this.progress=100,window.clearInterval(this.timer))},immediate:!0}},destroyed(){window.clearInterval(this.timer)},created(){this.timer=setInterval((()=>{this.progress+=3,this.progress>=99&&window.clearInterval(this.timer)}),this.loadTime/30)}},D7=R7,O7=(i(4337),w7(D7,P7,F7,!1,null,"fa3ebcb8",null)),U7=O7.exports,N7=function(){var t=this,e=t._self._c;return e("span",[t.isSlot?e("span",{attrs:{title:t.isFullScreen?"退出全屏":"进入全屏"},on:{click:t.handleFullScreen}},[t._t("default")],2):e("span",{attrs:{title:t.isFullScreen?"退出全屏":"进入全屏"},on:{click:t.handleFullScreen}},[e("i",{staticClass:"el-icon-full-screen mr-5"}),t._v(" "+t._s(t.isFullScreen?"退出全屏":"全屏")+" ")])])},k7=[],z7={props:{isSlot:{type:Boolean,default:!1},dom:{type:String,default:""}},data(){return{isFullScreen:!1}},watch:{isFullScreen(t){console.log("isFullScreen",t),this.$emit("change",t)}},methods:{handleFullScreen(){const t=this.dom?document.getElementById(this.dom):document.documentElement;this.isFUllScreenEnabled()?this.hasFullScreenElement()?this.exitFullScreen():this.setFullScreen(t):console.log("此浏览器不支持全屏"),this.listenfullscreen((()=>{this.isFullScreen=this.hasFullScreenElement()}))},isFUllScreenEnabled(){return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled},hasFullScreenElement(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},setFullScreen(t){t.requestFullscreen&&t.requestFullscreen(),t.webkitRequestFullscreen&&t.webkitRequestFullscreen(),t.mozRequestFullScreen&&t.mozRequestFullScreen(),t.msRequestFullscreen&&t.msRequestFullscreen()},exitFullScreen(){document.exitFullscreen&&document.exitFullscreen(),document.webkitExitFullscreen&&document.webkitExitFullscreen(),document.mozCancelFullScreen&&document.mozCancelFullScreen(),document.msExitFullscreen&&document.msExitFullscreen()},listenfullscreen(t){function e(){t()}document.addEventListener("fullscreenchange",(function(){e()})),document.addEventListener("mozfullscreenchange",(function(){e()})),document.addEventListener("webkitfullscreenchange",(function(){e()})),document.addEventListener("msfullscreenchange",(function(){e()}))}}},Q7=z7,G7=(i(4561),w7(Q7,N7,k7,!1,null,"7e84ad1e",null)),H7=G7.exports,V7=function(){var t=this,e=t._self._c;return e("div",[e("el-radio-group",{attrs:{size:"small"},model:{value:t.radio,callback:function(e){t.radio=e},expression:"radio"}},[e("el-radio-button",{attrs:{label:1}},[t._v("卫星图")]),e("el-radio-button",{attrs:{label:2}},[t._v("矢量图")])],1)],1)},j7=[],Z7={props:{type:{type:Number,default:1}},data(){return{radio:1,default:""}},watch:{radio(t){1===t?vm.checkStyle(this.default).then((()=>{this.$emit("checkStyle",t)})):vm.checkStyle("mapbox://styles/mapbox/streets-v11").then((()=>{this.$emit("checkStyle",t)}))}},mounted(){this.radio=this.type,setTimeout((()=>{this.default=vm.map.getStyle()}),1e3)}},W7=Z7,X7=w7(W7,V7,j7,!1,null,"1a040aed",null),K7=X7.exports,q7=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"tools"},[e("div",{staticClass:"tools-bar flex flex-align-center"},[e("div",{class:{"main-color":"move"===t.type},attrs:{title:"移动"},on:{click:function(e){return t.startDraw("move")}}},[e("i",{staticClass:"el-icon-rank mr-5"}),t._v("移动 ")]),t._l(t.action,(function(n){return e("div",{key:n.type,staticClass:"ml-20",class:{"main-color":n.type===t.type},attrs:{title:n.name,label:n.type},on:{click:function(e){return t.startDraw(n.type)}}},[e("i",{staticClass:"mr-5",class:n.icon}),t._v(t._s(n.name)+" ")])})),t.showCombine?e("div",{staticClass:"ml-20",attrs:{title:"合并"},on:{click:t.combineFeatures}},[e("i",{staticClass:"el-icon-connection mr-5"}),t._v("合并 ")]):t._e(),t.showUnCombine?e("div",{staticClass:"ml-20",attrs:{title:"拆分"},on:{click:t.uncombineFeatures}},[e("i",{staticClass:"el-icon-scissors mr-5"}),t._v("拆分 ")]):t._e(),t.showDeleteBtn?e("div",{staticClass:"ml-20",attrs:{title:"删除"},on:{click:t.drawDelete}},[e("i",{staticClass:"el-icon-close mr-5"}),t._v("删除 ")]):t._e(),t.showClearBtn?e("div",{staticClass:"ml-20",attrs:{title:"清空"},on:{click:t.clear}},[e("i",{staticClass:"el-icon-delete mr-5"}),t._v("清空")]):t._e(),t.showFullBtn?e("map-full-screen",{staticClass:"ml-20",attrs:{dom:t.fullDom},on:{change:t.changeFullscreen}}):t._e(),e("div",{staticClass:"ml-20 red tip-text"},[t._v("* 点击图形编辑")]),t.showMapStyle?e("map-style",{staticClass:"margin-left",on:{checkStyle:t.checkStyle}}):t._e()],2),t.showMoveInput?e("div",{staticClass:"margin-top flex"},[e("div",{staticClass:"flex flex-align-center"},[e("span",{staticClass:"flex-child-noshrink"},[t._v("经度:")]),e("el-input",{attrs:{size:"small",placeholder:"请输入纬度"},model:{value:t.lng,callback:function(e){t.lng=e},expression:"lng"}})],1),e("div",{staticClass:"flex flex-align-center margin-left"},[e("span",{staticClass:"flex-child-noshrink"},[t._v("纬度:")]),e("el-input",{attrs:{size:"small",placeholder:"请输入经度"},model:{value:t.lat,callback:function(e){t.lat=e},expression:"lat"}})],1),e("div",{staticClass:"margin-left"},[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.search}},[t._v("搜索")])],1)]):t._e(),t.uploadShp||t.uploadJson?e("div",{staticClass:"mt-15"},[t.uploadShp?e("shp-file",{attrs:{requireDbf:t.requireDbf,encoding:t.encoding},on:{upload:t.getUpload,uploadName:t.getUploadName}}):t._e(),t.uploadJson?e("json-file",{attrs:{requireDbf:t.requireDbf,encoding:t.encoding},on:{upload:t.getUpload}}):t._e()],1):t._e(),t._t("tools")],2),e("div",{staticClass:"right-fixed"},[t._t("right-fixed")],2),t.tooltip.show?e("div",{staticClass:"split-tooltip",style:t.tooltip.style},[t._v(t._s(t.tooltip.text))]):t._e()])},J7=[];i(3024);let Y7=null,$7={coordinates:[],isAdsorb:!1,properties:{}},ttt={layerId:null,boundP:20},ett=null,ntt=null;const itt=(t={},e=vm.map)=>{ett=e,ttt=Object.assign(ttt,t),ttt.layerId&&(Y7||stt(),ett.on("mousemove",(t=>{if(Y7){let e=t.lngLat;$7=rtt([e.lng,e.lat]),Y7.setLngLat($7.coordinates)}})))},rtt=t=>{let e=!1,n=null;if(om(ttt.layerId)){const r=S(t);var i=ett.project(t);const o=[[i.x-ttt.boundP,i.y-ttt.boundP],[i.x+ttt.boundP,i.y+ttt.boundP]],s=ett.queryRenderedFeatures(o,{layers:[ttt.layerId]});let a,l=1/0;if(s.forEach((t=>{const e=L(t.geometry.coordinates),i=Bi(r,e,{units:"meters"});i<l&&(l=i,a=e,n=t.properties)})),a){const n=_i(a,r);t=n.geometry.coordinates,e=!0}}return{coordinates:t,isAdsorb:e,properties:n}},ott=(t=ntt,e)=>(ntt=t,$7.isAdsorb&&ntt&&e&&(ntt.delete(e.id),e.geometry.coordinates=$7.coordinates,setTimeout((()=>{ntt.add(e)}),300),ntt.changeMode("simple_select",{features:[e]})),att(),ett.off("mousemove"),$7),stt=()=>{const t=document.createElement("div");t.className="marker",t.style.backgroundImage="url(/img/marker2.png)",t.style.width="10px",t.style.height="10px",t.style.backgroundSize="100%",Y7=new(eg().Marker)(t).setLngLat([0,0]).addTo(ett)},att=()=>{Y7&&Y7.remove(),Y7=null};var ltt=function(){var t=this,e=t._self._c;return e("el-button",{staticClass:"upload",attrs:{size:"small",type:"warning"}},[t._v(" JSON上传 "),e("input",{staticClass:"file",attrs:{type:"file",accept:".json"},on:{input:t.getFile}})])},ctt=[],utt={data(){return{}},methods:{getFile(t){const e=t.target.files?t.target.files[0]:"";if(e){let n=new FileReader;n.readAsText(e,"UTF-8"),n.onload=e=>{let n=e.target.result;if(n){n=JSON.parse(n),n.features||(n=kg(n));const e=ft(n);if(e.length>0&&e[0]>180)return this.$message.error("不属于WGS84坐标系,请使用其他工具进行数据转换");this.$emit("upload",n),t.target.value=""}}}}}},htt=utt,dtt=(i(1602),w7(htt,ltt,ctt,!1,null,"5a5f8c5d",null)),Att=dtt.exports,ptt=function(){var t=this,e=t._self._c;return e("el-button",{staticClass:"upload",attrs:{size:"small",type:"warning"}},[t._v(" SHP上传 "),e("input",{staticClass:"file",attrs:{type:"file",accept:t.requireDbf?".shp,.dbf":".shp",multiple:t.requireDbf},on:{input:t.getFile}})])},ftt=[];const gtt=i(2388);var mtt={props:{requireDbf:{type:Boolean,default:!0,required:!1},encoding:{type:String,default:"utf-8"}},data(){return{fileName:""}},methods:{readFileAsArrayBuffer(t){return new Promise(((e,n)=>{const i=new FileReader;i.onload=t=>e(t.target.result),i.onerror=n,i.readAsArrayBuffer(t)}))},validateAndProcessGeoJSON(t){if(t.features||(t=kg(t)),!t.features||0==t.features.length)return this.$message.error("当前导入SHP没有数据!"),!1;const e=ft(t);return e.length>0&&e[0]>180?(this.$message.error("不属于WGS84坐标系,请使用其他工具进行数据转换"),!1):(this.$emit("upload",t),this.$emit("uploadName",{json:t,fileName:this.fileName}),!0)},getFile(t){const e=Array.from(t.target.files||[]);if(0===e.length)return;t.target.value="";const n=e.find((t=>t.name.toLowerCase().endsWith(".shp"))),i=e.find((t=>t.name.toLowerCase().endsWith(".dbf")));return n?(this.fileName=n.name.split(".")[0],this.requireDbf&&!i?this.$message.error("请同时上传.dbf文件以获取属性数据"):void(i?this.readWithDbf(n,i):this.readShpOnly(n))):this.$message.error("请上传.shp文件")},readWithDbf(t,e){Promise.all([this.readFileAsArrayBuffer(t),this.readFileAsArrayBuffer(e)]).then((async([t,e])=>{let n=this.detectEncoding(e);gtt.open(t,e,{encoding:n||this.encoding}).then((t=>{const e=[],n=()=>t.read().then((t=>{if(!t.done)return e.push(t.value),n();{const t={type:"FeatureCollection",features:e};this.validateAndProcessGeoJSON(t)}}));return n()})).catch((t=>{console.error("读取文件错误:",t),this.$message.error("读取文件失败,请检查文件格式是否正确")}))}))},readShpOnly(t){this.readFileAsArrayBuffer(t).then((t=>{gtt.read(t).then((t=>{this.validateAndProcessGeoJSON(t)})).catch((t=>{console.error("读取文件错误:",t),this.$message.error("读取文件失败,请检查文件格式是否正确")}))}))},detectEncoding(t){const e=new Uint8Array(t)[29],n={87:"gb2312",200:"latin1",77:"utf-8",3:"cp437"};let i=n[e];return i}}},_tt=mtt,ytt=(i(5375),w7(_tt,ptt,ftt,!1,null,"7858f34f",null)),vtt=ytt.exports,xtt={components:{mapFullScreen:H7,mapStyle:K7,jsonFile:Att,shpFile:vtt},props:{fullDom:{type:String,default:"fullScreen"},list:{type:Array,default:()=>[]},single:{type:Boolean,default:!0},showFullBtn:{type:Boolean,default:!0},showDeleteBtn:{type:Boolean,default:!0},showClearBtn:{type:Boolean,default:!0},showMoveInput:{type:Boolean,default:!0},showMapStyle:{type:Boolean,default:!1},showMarker:{type:Boolean,default:!0},showCombine:{type:Boolean,default:!1},showUnCombine:{type:Boolean,default:!1},uploadJson:{type:Boolean,default:!1},uploadShp:{type:Boolean,default:!1},requireDbf:{type:Boolean,default:!1},encoding:{type:String,default:"utf-8"},isAdsorb:{type:Boolean,default:!1},adsorbParams:{type:Object,default:()=>{}},props:{type:Object,default:()=>({lglt:"lglt",lgltType:"lgltType",name:"name"})}},data(){return{type:"move",isEdit:!1,draw:"",activeFeatures:"",lng:"",lat:"",geoJson:"",selectPoint:[],conbineDrawFeature:null,tooltip:{show:!1,text:"",style:{}}}},computed:{action(){let t=[{id:"point",type:"draw_point",name:"绘制点",icon:"el-icon-coordinate"},{id:"line",type:"draw_line_string",name:"绘制线",icon:"el-icon-arrow-up"},{id:"polygon",type:"draw_polygon",name:"绘制面",icon:"el-icon-house"}],e=this.list.length>0?t.filter((t=>this.list.includes(t.id))):t;return e}},mounted(){},methods:{initDraw(t,e){this.map=t;const n=this.draw=new(bm())(Object.assign({},{displayControlsDefault:!1,controls:{}},e));t.addControl(n),t.on("draw.create",this.drawEnd),t.on("draw.update",this.drawUpdate),t.on("draw.selectionchange",this.select),t.on("mousemove",this.updateTooltipPosition),t.on("draw.modechange",this.handleModeChange),document.onkeydown=t=>{if(0===this.selectPoint.length||0===this.activeFeatures.length)return;const e=this.activeFeatures[0].geometry.type,n=t.keyCode||t.which||t.charCode;if(46==n){console.log("删除锚点",this.selectPoint,this.activeFeatures[0].geometry.coordinates);let t=!0;this.selectPoint.forEach((n=>{if("Polygon"===e){if(4==this.activeFeatures[0].geometry.coordinates[0].length)return this.$message.warning("面图层至少绘制3个点,无法删除!"),void(t=!1);this.activeFeatures[0].geometry.coordinates[0].forEach(((t,e)=>{JSON.stringify(t)===JSON.stringify(n.geometry.coordinates)&&(console.log(t,e),this.activeFeatures[0].geometry.coordinates[0].splice(e,1))}))}else if("LineString"===e){if(2==this.activeFeatures[0].geometry.coordinates.length)return this.$message.warning("线图层至少绘制2个点,无法删除!"),void(t=!1);this.activeFeatures[0].geometry.coordinates.forEach(((t,e)=>{JSON.stringify(t)===JSON.stringify(n.geometry.coordinates)&&this.activeFeatures[0].geometry.coordinates.splice(e,1)}))}})),this.updateGeometry(this.activeFeatures[0]),t&&this.$emit("deletePoint",{selectPoint:[...this.selectPoint],data:this.getDraw()}),this.selectPoint=[]}}},updateGeometry(t){const e=t.geometry;this.draw.delete(t.id),this.draw.add(e),this.drawUpdate()},getDraw(){const t=this.draw.getAll();return t},startDraw(t){this.type=t,"move"!==t&&(this.single&&this.clear(),console.log("开始绘制"),this.draw.changeMode(t),this.isAdsorb&&itt(this.adsorbParams,this.map),this.$emit("start"))},drawEnd(t){const e=this.getDraw();if(console.log("绘制结束",e,t),this.conbineDrawFeature)this.splitFeature(this.conbineDrawFeature,t.features[0]),this.conbineDrawFeature=null,this.tooltip.show=!1;else{if(this.type="move",this.geoJson=e,this.isAdsorb){let n=t.features[0];e.lastPosition=ott(this.draw,n)}this.$emit("end",e)}},drawUpdate(t){const e=this.getDraw();console.log("修改结束",e),this.geoJson=e,this.$emit("update",e)},drawEdit(t){this.geoJson=t,t&&t.features&&t.features.forEach((t=>{this.draw.add(t)}))},drawDelete(){this.activeFeatures&&this.activeFeatures.length>0?(this.$emit("deleteId",this.activeFeatures),this.activeFeatures.forEach((t=>{this.draw.delete(t.id);const e=this.getDraw();e.features&&e.features.length>0?this.$emit("delete",e):this.$emit("clear"),console.log("删除选中对象",this.activeFeatures[0]),this.activeFeatures=[]}))):this.$message.warning("未选择删除的对象")},clear(){this.draw&&(this.draw.deleteAll(),this.$emit("clear")),om("search-marker")&&um("search-marker",!1)},select(t){t.points&&t.points.length>0&&(console.log("选中锚点",t.points),this.selectPoint=t.points,this.$emit("selectpoint",t)),this.activeFeatures=t.features,console.log("选中对象",this.activeFeatures),this.$emit("select",t.features)},search(){if(!this.lng||!this.lat)return this.$message.error("请输入正确的经纬度信息");this.map.easeTo({center:[this.lng,this.lat]}),this.showMarker&&this.addMarker()},combineFeatures(){const t=this.draw.getSelected().features;if(t.length<2)return void this.$message.warning("请按住Shift键,至少选择两个"+this.getDrawType()+"进行合并!");const e=new Set(t.map((t=>t.geometry.type.replace("Multi",""))));if(e.size>1)return void this.$message.warning("只能合并相同类型的要素!");this.draw.combineFeatures();let n=this.draw.getSelected().features[0];n.properties&&(n.properties[this.props.lglt]=n.geometry.coordinates,n.properties[this.props.lgltType]=n.geometry.type),this.$emit("conbine",{combineFeature:n,selectedFeatures:t}),console.log("合并成功")},uncombineFeatures(){const t=this.draw.getSelected().features;if(1!==t.length)return void this.$message.warning("请选择一个"+this.getDrawType()+"进行拆分!");if("Point"===t[0].geometry.type)return void this.$message.warning("不支持拆分点图层!");this.conbineDrawFeature=t[0];let e=this.conbineDrawFeature.geometry.type.includes("LineString")?"线":"面";this.tooltip.text="请绘制切割线,并与要拆分"+e+"相交",this.tooltip.show=!0,this.draw.changeMode("draw_line_string",{continueDrawing:!1}),this.$emit("start-uncombine")},splitFeature(t,e){try{let n=[];"LineString"===t.geometry.type?n=[L(t.geometry.coordinates)]:"MultiLineString"===t.geometry.type?n=t.geometry.coordinates.map((t=>L(t))):"Polygon"===polygonFeature.geometry.type?n=[T(polygonFeature.geometry.coordinates)]:"MultiPolygon"===polygonFeature.geometry.type&&(n=polygonFeature.geometry.coordinates.map((t=>T(t))));const i=L(e.geometry.coordinates);let r=[];n.forEach((t=>{const e=Wr(t,i);0==e.features.length?r.push(t):r=r.concat(e.features)}));const o=r.map(((e,n)=>({type:"Feature",id:`${t.id}_${n}`,geometry:e.geometry,properties:Object.assign({},t.properties)})));if(this.draw.delete(e.id),1==o.length)return void this.$message.error("拆分失败,拆分线之间无交集!");this.draw.delete(t.id),this.draw.add({type:"FeatureCollection",features:o});let s=o.map((t=>t.id));this.draw.changeMode("simple_select",{featureIds:s}),o.map(((t,e)=>{t.properties&&(t.properties.id=null,t.properties[this.props.name]=t.properties[this.props.name]+"_"+e,t.properties[this.props.lglt]=t.geometry.coordinates,t.properties[this.props.lgltType]=t.geometry.type)})),this.$emit("unconbine",{uncombineFeature:o,oldFeature:t}),console.log("拆分成功,要素被拆分为"+o.length+"段",o)}catch(sk){console.error("线拆分失败:",sk),this.$message.warning("拆分线失败,请确保分割线有效!")}},getDrawType(){return 1==this.list.length&&"line"==this.list[0]?"条线":1==this.list.length&&"polygon"==this.list[0]?"个面":"要素"},updateTooltipPosition(t){this.tooltip.show&&(this.tooltip.style={left:`${t.originalEvent.clientX+10}px`,top:`${t.originalEvent.clientY+10}px`})},handleModeChange(t){"draw_line_string"!==t.mode&&this.tooltip.show&&(this.tooltip.show=!1)},getCenter(){const{lng:t,lat:e}=this.map.getCenter();this.lng=t,this.lat=e},checkStyle(t){this.geoJson&&(this.clear(),this.drawEdit(this.geoJson),this.$emit("checkStyle",t))},addMarker(){const t=[{id:1,name:"当前位置",lnglat:[this.lng,this.lat]}],e=Ug(t,"Point","lnglat");Om({id:"search-marker",data:e}),om("search-marker")&&um("search-marker",!0)},getUpload(t){this.$emit("getUpload",t)},getUploadName(t){this.$emit("getUploadName",t)},changeFullscreen(t){this.$emit("changeFullscreen",t)}}},btt=xtt,wtt=(i(8434),w7(btt,q7,J7,!1,null,"4c4ff58c",null)),Ett=wtt.exports,Ctt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"full-height relative overflow",attrs:{id:"fullScreen"}},[e("div",{staticClass:"full-height",attrs:{id:"map"}}),e("draw-tools",t._b({ref:"draw",attrs:{list:["point"],showMoveInput:!1,showDeleteBtn:!1,isAdsorb:t.isAdsorb},on:{update:t.drawUpdate,end:t.drawUpdate,delete:t.drawUpdate,getUpload:t.getUpload,getUploadName:t.getUploadName,clear:t.clear}},"draw-tools",t.$attrs,!1),[e("div",{staticClass:"mt-15",attrs:{slot:"tools"},slot:"tools"},[e("div",{staticClass:"flex"},[e("el-input",{staticClass:"full-width margin-right",attrs:{value:t.position.toString(),size:"small",placeholder:"点击地图获取坐标",readonly:""}}),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.save}},[t._v("保存")])],1),t.address&&t.address.formattedAddress?e("div",{staticClass:"margin-top font-12"},[t._v(" 地址:"+t._s(t.address.formattedAddress)+" ")]):t._e()])])],1)},Btt=[],Stt={components:{drawTools:Ett},props:{config:{type:Object,default:()=>{}},geoData:{type:[Object,String],default:""},lng:{type:[Number,String],default:""},lat:{type:[Number,String],default:""},zoom:{type:Number,default:14},isAdsorb:{type:Boolean,default:!1}},data(){return{geoJson:"",position:"",address:"",lastPosition:""}},watch:{lng(){this.draw()},geoData(){this.draw()}},mounted(){this.init()},methods:{init(){let t=Object.assign({},{accessToken:"pk.eyJ1IjoiaGo0NjI3NzEzOTYiLCJhIjoiY2w5YzNjOTZvMDF6NDNwb2d6YmJkYWRpMCJ9.-fW-OChGB1oY2DCMO_c8sg",zoom:this.zoom,center:[102.83643451528434,24.81972792178513],is3d:!1},this.config);vm.initMap(t).then((t=>{this.$refs.draw.initDraw(t),this.draw(),this.$emit("map-load",t)}))},draw(){this.lng&&this.lat?this.geoJson={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[1*this.lng,1*this.lat]},properties:{}}]}:this.geoJson=this.geoData,this.drawUpdate(this.geoJson),this.geoJson&&this.$refs.draw.drawEdit(this.geoJson)},drawUpdate(t){if(!t)return;const e=t.features;this.geoJson=t,e.length>0?(this.position=e[0].geometry.coordinates,this.position=this.position.map((t=>Number(t).toFixed(6))),this.$nextTick((()=>{vm.easeTo(this.position),m7(this.position).then((t=>{this.address=t}))})),this.lastPosition=t.lastPosition):(this.position="",this.address="",this.lastPosition=""),this.$emit("update",{data:t,position:this.position})},save(){let t={geoJson:this.geoJson,position:this.position,lng:this.position[0],lat:this.position[1],address:this.address,lastPosition:this.lastPosition};this.$emit("save",t)},clear(){this.geoJson="",this.position="",this.address=""},getUpload(t){this.$emit("getUpload",t)},getUploadName(t){this.$emit("getUploadName",t)}}},Mtt=Stt,Ttt=w7(Mtt,Ctt,Btt,!1,null,null,null),Itt=Ttt.exports,Ltt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"full-height relative overflow",attrs:{id:"fullScreen"}},[e("div",{staticClass:"full-height",attrs:{id:"map"}}),e("draw-tools",t._b({ref:"draw",attrs:{list:["line"],single:t.single,showMoveInput:!1},on:{update:t.drawUpdate,end:t.drawUpdate,delete:t.drawUpdate,clear:t.clear,getUpload:t.getUpload,getUploadName:t.getUploadName}},"draw-tools",t.$attrs,!1),[e("div",{staticClass:"mt-15 flex flex-wrap",attrs:{slot:"tools"},slot:"tools"},[e("el-input",{staticClass:"flex-child-grow",staticStyle:{width:"300px","margin-right":"10px"},attrs:{value:t.position.toString(),size:"small",placeholder:"点击地图获取坐标",readonly:t.readonly}}),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.save}},[t._v("保存")]),t._t("default")],2)])],1)},Ptt=[],Ftt={components:{drawTools:Ett},props:{config:{type:Object,default:()=>{}},readonly:{type:Boolean,default:!1},autoZoom:{type:Boolean,default:!1},single:{type:Boolean,default:!1},geoData:{type:[Object,String],default:""},pointList:{type:[Array,String],default:""}},data(){return{geoJson:"",position:""}},watch:{pointList(){this.draw()},geoData(){this.draw()}},mounted(){this.init()},methods:{init(){let t=Object.assign({},{accessToken:"pk.eyJ1IjoiaGo0NjI3NzEzOTYiLCJhIjoiY2w5YzNjOTZvMDF6NDNwb2d6YmJkYWRpMCJ9.-fW-OChGB1oY2DCMO_c8sg",center:[102.83643451528434,24.81972792178513],is3d:!1},this.config);vm.initMap(t).then((t=>{this.$refs.draw.initDraw(t),this.draw(),this.$emit("map-load",t)}))},draw(){if(this.pointList&&this.pointList.length>0){let t=this.pointList.map((t=>({type:"Feature",geometry:{type:"LineString",coordinates:t},properties:{}})));this.geoJson={type:"FeatureCollection",features:t}}else this.geoJson=this.geoData;this.drawUpdate(this.geoJson,!0),this.edit()},edit(){this.geoJson&&this.$refs.draw.drawEdit(this.geoJson)},drawUpdate(t,e=!1){t&&t.features&&(this.geoJson=t,this.position=t.features.map((t=>t.geometry.coordinates.flat(1/0))),this.position=Yg(2,...this.position),this.position.forEach((t=>{t[0]=Number(t[0]).toFixed(6),t[1]=Number(t[1]).toFixed(6)})),(this.autoZoom||e)&&this.$nextTick((()=>{vm.fitJsonBounds(t,{padding:100})})),this.$emit("update",{data:t,position:this.position}))},save(){let t={geoJson:this.geoJson,position:this.position};console.log(t),this.$emit("save",t)},clear(){this.geoJson="",this.position=""},getUpload(t){console.log(t),this.$refs.draw.clear(),this.drawUpdate(t,!0),this.edit()},getUploadName(t){this.$emit("getUploadName",t)}}},Rtt=Ftt,Dtt=w7(Rtt,Ltt,Ptt,!1,null,null,null),Ott=Dtt.exports,Utt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"full-height relative overflow",attrs:{id:"fullScreen"}},[e("div",{staticClass:"full-height",attrs:{id:"map"}}),e("draw-tools",t._b({ref:"draw",attrs:{list:["polygon"],single:t.single,showMoveInput:!1},on:{update:t.drawUpdate,end:t.drawUpdate,delete:t.drawUpdate,clear:t.clear,getUpload:t.getUpload,getUploadName:t.getUploadName}},"draw-tools",t.$attrs,!1),[e("div",{staticClass:"mt-15 flex flex-wrap",attrs:{slot:"tools"},slot:"tools"},[e("el-input",{staticClass:"flex-child-grow",staticStyle:{width:"300px","margin-right":"10px"},attrs:{value:t.position.toString(),size:"small",placeholder:"点击地图获取坐标",readonly:t.readonly}}),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.save}},[t._v("保存")]),t._t("default")],2)])],1)},Ntt=[],ktt={components:{drawTools:Ett},props:{config:{type:Object,default:()=>{}},single:{type:Boolean,default:!1},autoZoom:{type:Boolean,default:!1},readonly:{type:Boolean,default:!0},geoData:{type:[Object,String],default:""},pointList:{type:[Array,String],default:""}},data(){return{geoJson:"",position:""}},watch:{pointList(){this.draw()},geoData(){this.draw()}},mounted(){this.init()},methods:{init(){let t=Object.assign({},{accessToken:"pk.eyJ1IjoiaGo0NjI3NzEzOTYiLCJhIjoiY2w5YzNjOTZvMDF6NDNwb2d6YmJkYWRpMCJ9.-fW-OChGB1oY2DCMO_c8sg",center:[102.83643451528434,24.81972792178513],is3d:!1},this.config);vm.initMap(t).then((t=>{this.$refs.draw.initDraw(t),this.draw(),this.$emit("map-load",t)}))},draw(){if(this.pointList&&this.pointList.length>0){let t=this.pointList.map((t=>({type:"Feature",geometry:{type:"Polygon",coordinates:[t]},properties:{}})));this.geoJson={type:"FeatureCollection",features:t}}else this.geoJson=this.geoData;this.drawUpdate(this.geoJson,!0),this.edit()},edit(){this.geoJson&&this.$refs.draw.drawEdit(this.geoJson)},drawUpdate(t,e=!1){t&&t.features&&(this.geoJson=t,this.position=t.features.map((t=>t.geometry.coordinates.flat(1/0))),this.position=Yg(2,...this.position),this.position.forEach((t=>{t[0]=Number(t[0]).toFixed(6),t[1]=Number(t[1]).toFixed(6)})),(this.autoZoom||e)&&this.$nextTick((()=>{vm.fitJsonBounds(t,{padding:100})})),this.$emit("update",{data:t,position:this.position}))},save(){let t={geoJson:this.geoJson,position:this.position};console.log(t),this.$emit("save",t)},clear(){this.geoJson="",this.position=""},getUpload(t){console.log(t),this.$refs.draw.clear(),this.drawUpdate(t,!0),this.edit()},getUploadName(t){this.$emit("getUploadName",t)}}},ztt=ktt,Qtt=w7(ztt,Utt,Ntt,!1,null,null,null),Gtt=Qtt.exports;const Htt={showLayerText:hm,setSource:rm,hasSource:sm,showLayer:um,hasLayer:om,removeLayer:lm,removeSource:am,setLayout:dm,setPaint:Am,setFilter:pm,setHigh:fm,getLayerAll:cm},Vtt={addLayerText:wm,addLayerLine:Mm,addLayerLineAnimation:Tm,addLayerPoint:Fm,addDiyPoint:Dm,addFlashPoint:Rm,addLayerImagePoint:Om,addLayerPolygon:km,addLayerCircle:Qm,addCircleAnimate:Vm,addLayerModel:DP,addLayerPipe:UP,addLayerWater:f7,load3DTiles:d7},jtt={toGeoJson:Ug,pointToGeoJson:Ng,loadImage:jg,ranging:Zg,drawArea:Wg,spArray:Yg,clearDraw:Xg,distance:Kg,lineCenter:qg,polygonCenter:Jg,GeoAddress:m7,Geolocation:_7,getElevation:$g,geometryCollectionToFeatureCollection:kg,wgs84ToGcj02:zg,gcj02ToWgs84:Qg},Ztt={mapHover:Cm,mapClick:Em,changeMapCursor:Bm,mapHoverHtml:g7};var Wtt=_["default"]}(),r}()}));
|