!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=204)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"earthRadius",function(){return r}),n.d(e,"factors",function(){return i}),n.d(e,"unitsFactors",function(){return o}),n.d(e,"areaFactors",function(){return a}),e.feature=s,e.geometry=function(t,e,n){void 0===n&&(n={});switch(t){case"Point":return u(e).geometry;case"LineString":return l(e).geometry;case"Polygon":return c(e).geometry;case"MultiPoint":return p(e).geometry;case"MultiLineString":return f(e).geometry;case"MultiPolygon":return d(e).geometry;default:throw new Error(t+" is invalid")}},e.point=u,e.points=function(t,e,n){void 0===n&&(n={});return h(t.map(function(t){return u(t,e)}),n)},e.polygon=c,e.polygons=function(t,e,n){void 0===n&&(n={});return h(t.map(function(t){return c(t,e)}),n)},e.lineString=l,e.lineStrings=function(t,e,n){void 0===n&&(n={});return h(t.map(function(t){return l(t,e)}),n)},e.featureCollection=h,e.multiLineString=f,e.multiPoint=p,e.multiPolygon=d,e.geometryCollection=function(t,e,n){void 0===n&&(n={});return s({type:"GeometryCollection",geometries:t},e,n)},e.round=function(t,e){void 0===e&&(e=0);if(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},e.radiansToLength=g,e.lengthToRadians=y,e.lengthToDegrees=function(t,e){return v(y(t,e))},e.bearingToAzimuth=function(t){var e=t%360;e<0&&(e+=360);return e},e.radiansToDegrees=v,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,n){void 0===e&&(e="kilometers");void 0===n&&(n="kilometers");if(!(t>=0))throw new Error("length must be a positive number");return g(y(t,e),n)},e.convertArea=function(t,e,n){void 0===e&&(e="meters");void 0===n&&(n="kilometers");if(!(t>=0))throw new Error("area must be a positive number");var r=a[e];if(!r)throw new Error("invalid original units");var i=a[n];if(!i)throw new Error("invalid final units");return t/r*i},e.isNumber=m,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!m(t))throw new Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")};var r=6371008.8,i={centimeters:100*r,centimetres:100*r,degrees:r/111325,feet:3.28084*r,inches:39.37*r,kilometers:r/1e3,kilometres:r/1e3,meters:r,metres:r,miles:r/1609.344,millimeters:1e3*r,millimetres:1e3*r,nauticalmiles:r/1852,radians:1,yards:1.0936*r},o={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/r,yards:1.0936133},a={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:3.86e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function s(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function u(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(!m(t[0])||!m(t[1]))throw new Error("coordinates must contain numbers");return s({type:"Point",coordinates:t},e,n)}function c(t,e,n){void 0===n&&(n={});for(var r=0,i=t;rc||p>l||d>h)return u=i,c=n,l=p,h=d,void(a=0);var g=Object(r.lineString)([u,i],t.properties);if(!1===e(g,n,o,d,a))return!1;a++,u=i})&&void 0}}})}function y(t,e,n){var r=n,i=!1;return g(t,function(t,o,a,s,u){r=!1===i&&void 0===n?t:e(r,t,o,a,s,u),i=!0}),r}function v(t,e){if(!t)throw new Error("geojson is required");p(t,function(t,n,i){if(null!==t.geometry){var o=t.geometry.type,a=t.geometry.coordinates;switch(o){case"LineString":if(!1===e(t,n,i,0,0))return!1;break;case"Polygon":for(var s=0;s=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")},e.getCoords=function(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")},e.containsNumber=function t(e){if(e.length>1&&Object(r.isNumber)(e[0])&&Object(r.isNumber)(e[1]))return!0;if(Array.isArray(e[0])&&e[0].length)return t(e[0]);throw new Error("coordinates must only contain numbers")},e.geojsonType=function(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)},e.featureOf=function(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)},e.collectionOf=function(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 r=0,i=t.features;r1?0:t<-1?o:Math.acos(t)},e.c=function(t){return t>1?a:t<-1?-a:Math.asin(t)},e.m=function(t){return(t=_(t/2))*t};var r=1e-6,i=1e-12,o=Math.PI,a=o/2,s=o/4,u=2*o,c=180/o,l=o/180,h=Math.abs,f=Math.atan,p=Math.atan2,d=Math.cos,g=Math.ceil,y=Math.exp,v=(Math.floor,Math.log),m=Math.pow,_=Math.sin,b=Math.sign||function(t){return t>0?1:t<0?-1:0},w=Math.sqrt,E=Math.tan},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.JSControlPosition={LEFT_BOTTOM:Symbol("bottomleft"),LEFT_CENTER:Symbol("centerleft"),LEFT_TOP:Symbol("topleft"),RIGHT_TOP:Symbol("topright"),RIGHT_CENTER:Symbol("centerright"),RIGHT_BOTTOM:Symbol("bottomright"),CENTER_TOP:Symbol("topcenter"),CENTER:Symbol("center"),CENTER_BOTTOM:Symbol("bottomcenter")},e.JSPOSITION_DEFAULT_RATIO=1e7,e.JSLayerType={POINT_MARKER_LAYER:"pointmarkerlayer",IMAGE_MARKER_LAYER:"imagemarkerlayer",LABEL_MARKER_LAYER:"labelmarkerlayer",LINE_MARKER_LAYER:"linemarkerlayer",POLYGON_MARKER_LAYER:"polygonmarkerlayer",POPINFO_MARKER_LAYER:"popinfomarkerlayer",ICON_TEXT_MARKER_LAYER:"icontextmarkerlayer",CIRCLE_MARKER_LAYER:"circlemarkerlayer",DOM_MARKER_LAYER:"dommarkerlayer",RECTANGLE_MARKER_LAYER:"rectanglemarkerlayer"},e.JSIconTextType={LEFTICON_RIGHTTEXT:Symbol("lefticonrighttext"),LEFTTEXT_RIGHTICON:Symbol("lefttextrighticon"),TOPICON_BOTTOMTEXT:Symbol("topiconbottomtext"),TOPTEXT_BOTTOMICON:Symbol("toptextbottomicon")},e.JSDrawMode={POINT:Symbol("point"),POLYLINE:Symbol("polyline"),POLYGON:Symbol("polygon"),CIRCLE:Symbol("circle"),RECTANGLE:Symbol("rectangle"),EDITED:Symbol("edited")};var r=e.JSNodeType={FLOOR:Symbol("floor"),IMAGE_MARKER:Symbol("imagemarker"),LABEL_MARKER:Symbol("labelmarker"),LINE_MARKER:Symbol("linemarker"),POINT_MARKER:Symbol("pointmarker"),POLYGON_MARKER:Symbol("polygonmarker"),POPINFO_MARKER:Symbol("popinfomarker"),ICON_TEXT_MARKER:Symbol("icontextmaker"),CIRCLE_MARKER:Symbol("circlemarker"),DOM_MARKER:Symbol("dommarker"),RECTANGLE_MARKER:Symbol("rectanglemarker"),NONE:Symbol("none")};e.JSLineType={DASH:Symbol("dash"),ARROW:Symbol("arrow"),FILL:Symbol("fill")},e.JSImageryProviderType={IMAGE_TDT:Symbol("image_tdt"),VECTOR_TDT:Symbol("vector_tdt"),TERRAIN_TDT:Symbol("terrain_tdt"),IMAGE_GD:Symbol("image_gd"),VECTOR_GD:Symbol("vector_gd"),VECTOR_OSM:Symbol("vector_osm"),IMAGE_ARCGIS:Symbol("image_arcgis"),VECTOR_GEOQ:Symbol("vector_geoq"),VECTOR_GEOQ_GRAY:Symbol("vector_geoq_gray"),VECTOR_GEOQ_PINCINE:Symbol("vector_geoq_pincine"),VECTOR_GEOQ_WARM:Symbol("vector_geoq_warm"),IMAGE_MAPBOX:Symbol("image_mapbox"),VECTOR_MAPBOX:Symbol("vector_mapbox")},e.JSMarkerType=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n24?24:Math.round(n));var _=void 0;p&&p.center&&(_=p.center),v||(v=o.JSImageryProviderType.IMAGE_TDT),this._options={showGlobe:void 0==g||g,defaultMapScaleLevel:c||18,maxZoom:n,minZoom:r,center:_,container:d,mapServerURL:a,showLoading:void 0==m||m},f.default.leafletSettings(y),this._map=y.map(e.container,{attributionControl:!1,zoomControl:!1,minZoom:r,maxZoom:n,tag:!1}),this._layerManager=new i.default(this),this._eventManager=new s.default(this),this._baseLayerManager=new h.default(this),this.imageryProvider=v,l.default.printVersion()}return r(t,[{key:"openMapById",value:function(t,e){var n=this;n._mapId=t;var r=n._options.mapServerURL,i=r+"/"+t+"/mapConfig.json";a.default.fetchJson({url:i}).then(function(i){n._mapConfig=i;var o=i.root,a=i.floors,s=i.format,c=s||"jpg";if(void 0!=o||void 0!=a){var l=void 0;if(o){var h=o.minZoom,f=o.maxZoom,p=o.leftBottom,d=o.rightTop,g=y.latLngBounds(y.latLng(p.y,p.x),y.latLng(d.y,d.x));if("raster"==c)n._rootLayer=y.tileLayer(r+"/"+t+"/map/G/{z}/{x}/{y}.png",{minZoom:h||12,maxZoom:24,maxNativeZoom:f||21,bounds:g}),n._rootLayer._bounds=g,n._rootLayer.bringToFront();else{var v=r+"/"+t+"/map/G."+c;n._rootLayer=y.imageOverlay(v,g)}n._rootLayer.addTo(n._map)}if(a){n._floorLayerSet=new Map,l=u.default.getFloorItemsByFloorNos(Object.keys(a));var m=!0,_=!1,b=void 0;try{for(var w,E=l[Symbol.iterator]();!(m=(w=E.next()).done);m=!0){var x=w.value,O=x.floorId,M=x.floorNo,S=a[M],P=void 0,C=y.latLngBounds(y.latLng(S.leftBottom.y,S.leftBottom.x),y.latLng(S.rightTop.y,S.rightTop.x));"raster"==s?((P=y.tileLayer(r+"/"+t+"/map/"+M+"/{z}/{x}/{y}.png",{minZoom:S.minZoom||12,maxZoom:24,maxNativeZoom:S.maxZoom||21,bounds:C}))._bounds=C,P.bringToFront()):P=y.imageOverlay(r+"/"+t+"/map/"+M+"."+c,C),P.addTo(n._map),n._floorLayerSet.set(M,{layer:P,floorId:O})}}catch(t){_=!0,b=t}finally{try{!m&&E.return&&E.return()}finally{if(_)throw b}}}var T=0;e&&void 0!==e.focusFloorId?T=e.focusFloorId:void 0==n._rootLayer&&void 0!=n._floorLayerSet&&(T=l[0].floorId),n.focusFloorId=T,n.resetView(),n._layerManager.initLayerGroups(),n._eventManager.raise("loadComplete",{target:n._map})}else console.error("The mapConfig is wrong")}).otherwise(function(t){console.error(t)})}},{key:"addMarker",value:function(t){var e=this._layerManager.addMarker(t);return this._eventManager.registerMarkerClickEvent(e),e}},{key:"removeMarker",value:function(t){return this._layerManager.removeMarker(t)}},{key:"updateMarkerPosition",value:function(t,e){this._layerManager.updateMarkerPosition(t,e)}},{key:"removeAllIconTextMarker",value:function(){this._layerManager.removeAllMarker(o.JSLayerType.ICON_TEXT_MARKER_LAYER)}},{key:"removeAllImageMarker",value:function(){this._layerManager.removeAllMarker(o.JSLayerType.IMAGE_MARKER_LAYER)}},{key:"removeAllPointMarker",value:function(){this._layerManager.removeAllMarker(o.JSLayerType.POINT_MARKER_LAYER)}},{key:"removeAllPolygonMarker",value:function(){this._layerManager.removeAllMarker(o.JSLayerType.POLYGON_MARKER_LAYER)}},{key:"removeAllLineMarker",value:function(){this._layerManager.removeAllMarker(o.JSLayerType.LINE_MARKER_LAYER)}},{key:"removeAllDomMarker",value:function(){this._layerManager.removeAllMarker(o.JSLayerType.DOM_MARKER_LAYER)}},{key:"removeAllCircleMarker",value:function(){this._layerManager.removeAllMarker(o.JSLayerType.CIRCLE_MARKER_LAYER)}},{key:"removeAllMarker",value:function(){this._layerManager.removeAllMarker()}},{key:"removeMarkerByFilter",value:function(t,e){this._layerManager.removeMarkerByFilter(t,e)}},{key:"setMarkerVisibleByFilter",value:function(t,e,n){this._layerManager.setMarkerVisibleByFilter(t,e,n)}},{key:"setMarkerOnlyVisibleByFilter",value:function(t,e,n){this._layerManager.setMarkerOnlyVisibleByFilter(t,e,n)}},{key:"resetView",value:function(){var t=this._options,e=t.center,n=t.defaultMapScaleLevel;if(e)this._map.setView([e.y,e.x],n);else{var r=this.focusFloorId;if(0===r&&this._rootLayer)this._map.fitBounds(this._rootLayer._bounds);else if(this._floorLayerSet){var i=u.default.getFloorNoByFloorId(r),o=this._floorLayerSet.get(i);o&&this._map.fitBounds(o.layer._bounds)}}}},{key:"removeControl",value:function(t){t&&(t.removeFromMap(),t.destroy())}},{key:"addControl",value:function(t){t.addToMap(this)}},{key:"flyToPosition",value:function(t,e){var n=1e3;e&&(0,c.isNumber)(e.duration)&&(n=e.duration);var r=g/2,i=void 0;if(t instanceof Array){var o=u.default.getEnvelope(t);r=o.radius+g/2,i=o.center}else i=t;var a=i,s=a.x,l=a.y;this._map.fitBounds([[l-r,s-r],[l+r,s+r]],{zoom:{animate:n>0},pan:{animate:n>0,duration:n/1e3,easeLinearity:1}})}},{key:"flyToMarker",value:function(t,e){if(t)if(t.destroyed())console.error("The marker has been removed!");else{var n=1e3,r=0;e&&((0,c.isNumber)(e.duration)&&(n=e.duration),e.offset&&(0,c.isNumber)(e.offset.range)&&(r=e.offset.range)),this.focusFloorId=t.floorId;var i=t.boundingSphere,o=i.center,a=i.radius,s=0===r?a:r,u=o.x,l=o.y;this._map.fitBounds([[l-s,u-s],[l+s,u+s]],{animate:!0,duration:n/1e3})}else console.error("The marker can not be empty!")}},{key:"trackMarker",value:function(t,e){t?t.destroyed()?console.error("The marker has been removed!"):this._layerManager.trackMarker(t,e):console.error("The marker can not be empty!")}},{key:"cancelTrack",value:function(){this._layerManager.cancelTrack()}},{key:"on",value:function(t,e){this._eventManager.on(t,e)}},{key:"off",value:function(t,e){this._eventManager.off(t,e)}},{key:"getFloorList",value:function(){return this._layerManager.getFloorList()}},{key:"_setLayerBounds",value:function(t,e){if(e&&e instanceof p.default){var n=e.west,r=e.south,i=e.east,o=[[r,n],[e.north,i]];if(0===t)return this._rootLayer?void this._rootLayer.setBounds(o):void console.error("This floorId is wrong!");var a=u.default.getFloorNoByFloorId(t),s=this._floorLayerSet.get(a);s?s.layer.setBounds(o):console.error("The floorId is wrong!!")}else console.error("The bounds is not been supported!!")}},{key:"_setLayerOpacity",value:function(t,e){if(0===t)return this._rootLayer?void this._rootLayer.setOpacity(e):void console.error("This floorId is wrong!");var n=u.default.getFloorNoByFloorId(t),r=this._floorLayerSet.get(n);r?r.layer.setOpacity(e):console.error("The floorId is wrong!!")}},{key:"_updateFocusFloorId",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this._focusFloorId;if(this._focusFloorId=t,t!=n){if(0===t){if(!this._rootLayer)return void console.error("This floorId is wrong!");this._rootLayer.setOpacity(1),this._floorLayerSet&&this._floorLayerSet.forEach(function(t){t.layer.setOpacity(0)}),e&&this._eventManager.raise("floorChange",n,t)}else{if(!this._floorLayerSet)return void console.error("This floorId is wrong!");var r=!1;if(this._floorLayerSet.forEach(function(e){var n=e.layer;e.floorId===t?(n.setOpacity(1),r=!0):n.setOpacity(0)}),this._rootLayer&&this._rootLayer.setOpacity(0),!r)return void console.error("This floorId is wrong!");e&&this._eventManager.raise("floorChange",n,t)}this._layerManager.changeFloor(t)}}},{key:"zoomIn",value:function(){this._map.zoomIn()}},{key:"zoomOut",value:function(){this._map.zoomOut()}},{key:"destroy",value:function(){this._layerManager&&this._layerManager.destroy(),this._eventManager&&this._eventManager.destroy(),this._baseLayerManager&&this._baseLayerManager.destroy(),this._map&&this._map.remove(),this._map=void 0,this._floorLayerSet=void 0,this._rootLayer=void 0,this._options=void 0,this._focusFloorId=void 0}},{key:"focusFloorId",get:function(){return this._focusFloorId},set:function(t){this._updateFocusFloorId(t)}},{key:"imageryProvider",set:function(t){t?this._baseLayerManager.setBaseLayer(t,this._options.showGlobe):console.error("The type of imageryProvider can not be empty!!")},get:function(){return this._baseLayerManager._currentImageryProvider}},{key:"showGlobe",set:function(t){this._baseLayerManager.setBaseLayer(this.imageryProvider,t)},get:function(){return this._options.showGlobe}}]),t}();e.default=v},function(t,e,n){"use strict";var r=n(2),i=n(0);e.a=function(t,e,n){void 0===n&&(n={});var o=Object(r.getCoord)(t),a=Object(r.getCoord)(e),s=Object(i.degreesToRadians)(a[1]-o[1]),u=Object(i.degreesToRadians)(a[0]-o[0]),c=Object(i.degreesToRadians)(o[1]),l=Object(i.degreesToRadians)(a[1]),h=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(c)*Math.cos(l);return Object(i.radiansToLength)(2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h)),n.units)}},function(t,e,n){"use strict";function r(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=function t(e){var n={};if(!e)return n;Object.keys(e).forEach(function(r){var i=e[r];"object"==typeof i?null===i?n[r]=null:Array.isArray(i)?n[r]=i.map(function(t){return t}):n[r]=t(i):n[r]=i});return n}(t.properties),e.geometry=i(t.geometry),e}function i(t){var e={type:t.type};return t.bbox&&(e.bbox=t.bbox),"GeometryCollection"===t.type?(e.geometries=t.geometries.map(function(t){return i(t)}),e):(e.coordinates=function t(e){var n=e;if("object"!=typeof n[0])return n.slice();return n.map(function(e){return t(e)})}(t.coordinates),e)}e.a=function(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return r(t);case"FeatureCollection":return function(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 r(t)}),e}(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return i(t);default:throw new Error("unknown GeoJSON type")}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1);function i(t){var e=[1/0,1/0,-1/0,-1/0];return Object(r.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[3]>=t[1]}(o,u))return!1;"Polygon"===s&&(c=[c]);for(var l=!1,h=0;ht[1]!=c>t[1]&&t[0]<(u-a)*(t[1]-s)/(c-s)+a&&(r=!r)}return r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:1e3,n=arguments[2],r=this,s=arguments[3],u=arguments[4];if(this._node){if(this._position.x==t.x&&this._position.y==t.y)return;if(0==e)this.setPosition(t);else{this.clearAnimators();var c=this;c._positionChangeCallback&&c._positionChangeCallback(t,e),c._moveAnimator=new i.default({x:this._position.x*a.JSPOSITION_DEFAULT_RATIO,y:this._position.y*a.JSPOSITION_DEFAULT_RATIO},{x:t.x*a.JSPOSITION_DEFAULT_RATIO,y:t.y*a.JSPOSITION_DEFAULT_RATIO},{update:function(t){c._node&&(c._position=new o.default(t.x/a.JSPOSITION_DEFAULT_RATIO,t.y/a.JSPOSITION_DEFAULT_RATIO,0),c._node.setLatLng([c._position.y,c._position.x]),n&&n(r._position))},duration:e,begin:u,complete:s})}}}},{key:"setProperties",value:function(t){if(this._node){if(!Object.entries){var e=Function.bind.call(Function.call,Array.prototype.reduce),n=Function.bind.call(Function.call,Object.prototype.propertyIsEnumerable),r=Function.bind.call(Function.call,Array.prototype.concat),i=Reflect.ownKeys;Object.entries=function(t){return e(i(t),function(e,i){return r(e,"string"==typeof i&&n(t,i)?[[i,t[i]]]:[])},[])}}null==t||0==t.size?this._node.properties=new Map:t instanceof Map?this._node.properties=t:t instanceof Object&&(this._node.properties=new Map(Object.entries(t)))}}},{key:"addProperty",value:function(t,e){this._node.properties||(this._node.properties=new Map);var n=this._node.properties;n.has(t)||n.set(t,e)}},{key:"getProperties",value:function(){return this.node&&this.node.properties?this.node.properties:new Map}},{key:"clearAnimators",value:function(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._moveAnimator&&this._moveAnimator.clear()}},{key:"destroy",value:function(){this.clearAnimators(!0),this._id=void 0,this._nodeId=void 0,this._floorId=void 0,this._node=void 0,this._show=void 0,this._callback=void 0,this._position=void 0,this._moveAnimator=void 0,this._positionChangeCallback=void 0,this._updateCallback=void 0}},{key:"destroyed",value:function(){return!this._node}},{key:"node",get:function(){return this._node}},{key:"position",get:function(){return this._position},set:function(t){this._position=t,this._positionChangeCallback&&this._positionChangeCallback(this._position)}},{key:"floorId",get:function(){return this._floorId},set:function(t){this._floorId=t}},{key:"show",get:function(){return this._show},set:function(t){t!=this._show&&(this._show=t,this._node.setOpacity(t?1:0))}},{key:"callback",get:function(){return this._callback}},{key:"boundingSphere",get:function(){return null}},{key:"positionChangeCallback",get:function(){return this._positionChangeCallback},set:function(t){this._positionChangeCallback=t}}]),t}();e.default=u},function(t,e,n){"use strict";function r(t,e){return void 0!==t&&null!==t?t:e}Object.defineProperty(e,"__esModule",{value:!0}),r.EMPTY_OBJECT=Object.freeze({}),e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;nt.x&&(n=t.x),r>t.y&&(r=t.y),ie&&(n=e),r>i&&(r=i),a0?"F"+t:t<0?"B"+-t:"G":t<0?"U"+Math.ceil(-t):"M"+Math.floor(t)}},{key:"getLeafletPosition",value:function(t){var e=void 0;switch(t){case a.JSControlPosition.RIGHT_TOP:e="topright";break;case a.JSControlPosition.RIGHT_BOTTOM:e="bottomright";break;case a.JSControlPosition.LEFT_BOTTOM:e="bottomleft";break;default:e="topleft"}return e}},{key:"iconTextToImage",value:function(t){var e=document.createElement("canvas"),n=e.getContext("2d"),r=t._font||"20px Tahoma",i=this.getNumFromString(r),o=4*t._backgroundRadius,s=4*t._backgroundStrokeWidth,u=t._backgroundStrokeColor,c=t._fontStrokeColor,l=t._fontStrokeWidth;isNaN(i)||(0==i?(i=10,r="40px "+r):r=r.replace(i+"",4*i+"")),i*=4,n.font=r;var h=n.measureText(t._text).width,f=h/i,p=f>2?f<4?2:1.2:3,d=1.6*i,g=h*p,y=4*t._imageWidth||d,v=4*t._imageHeight||d,m=void 0;t._image instanceof Image||((m=new Image).src=t._image),m.setAttribute("crossOrigin","Anonymous");var _=void 0,b=void 0,w=void 0,E=void 0,x=void 0,O=void 0;switch(t._iconTextType){case a.JSIconTextType.LEFTTEXT_RIGHTICON:e.height=Math.max(d+8,v+8),e.width=h*p+y+16,x=4,O=.5*e.height-.5*d,w=4+.5*g-.5*h,E=e.height/2,_=g+12,b=.5*e.height-.5*v;break;case a.JSIconTextType.TOPICON_BOTTOMTEXT:e.width=Math.max(g+8,v+8),e.height=d+v+16,_=.5*(e.width-y),b=4,x=.5*(e.width-g),O=12+v,w=.5*(e.width-h),E=O+.5*d;break;case a.JSIconTextType.TOPTEXT_BOTTOMICON:e.width=Math.max(g+8,v+8),e.height=d+v+16,x=.5*(e.width-g),O=4,w=.5*(e.width-h),E=O+.5*d,_=.5*(e.width-y),b=12+d;break;default:e.height=Math.max(d+8,v+8),e.width=h*p+y+16,_=4,b=.5*e.height-.5*v,x=12+y,O=.5*e.height-.5*d,w=4+.5*g-.5*h+y,E=e.height/2}n.drawImage(m,_,b,y,v),2*o<=g&&2*o<=d?(n.save(),n.translate(x+s,O+s),this.drawRoundRectPath(n,g-2*s,d-2*s,o),n.fillStyle=t._backgroundColor,n.fill(),n.lineWidth=s,n.strokeStyle=u,n.stroke(),n.restore()):(n.fillStyle=t._backgroundColor,n.fillRect(x,O,g,d)),n.fillStyle=t._fontColor,n.textBaseline="middle",n.font=r,n.strokeStyle=c,n.lineWidth=l,n.strokeText(t._text,w,E),n.fillText(t._text,w,E);var M=document.createElement("div");return M.appendChild(e),{image:M,width:e.width,height:e.height}}},{key:"getImageMarkerOffsetAnchor",value:function(t){var e=t.height,n=t.width,r=[n/2,e/2];switch(t._offset){case a.JSControlPosition.LEFT_TOP:r=[0,0];break;case a.JSControlPosition.LEFT_CENTER:r=[0,e/2];break;case a.JSControlPosition.LEFT_BOTTOM:r=[0,e];break;case a.JSControlPosition.CENTER_TOP:r=[n/2,0];break;case a.JSControlPosition.CENTER_BOTTOM:r=[n/2,e];break;case a.JSControlPosition.RIGHT_TOP:r=[n,0];break;case a.JSControlPosition.RIGHT_CENTER:r=[n,e/2];break;case a.JSControlPosition.RIGHT_BOTTOM:r=[n,e]}return r}},{key:"getLineOrPolygonLatlngs",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[],r=void 0;return(r=t instanceof u.default?e?c.default.simpleLine(t.points,1e-6,!0):t.points:t instanceof s.default?t.points:e?c.default.simpleLine(t,1e-6,!0):t).forEach(function(t){n.push([t.y,t.x])}),{latlngs:n,points:r}}},{key:"getNumFromString",value:function(t){var e=t.replace(/[^0-9]/gi,"");return Number(e)}},{key:"drawRoundRectPath",value:function(t,e,n,r){t.beginPath(0),t.arc(e-r,n-r,r,0,Math.PI/2),t.lineTo(r,n),t.arc(r,n-r,r,Math.PI/2,Math.PI),t.lineTo(0,r),t.arc(r,r,r,Math.PI,3*Math.PI/2),t.lineTo(e-r,0),t.arc(e-r,r,r,3*Math.PI/2,2*Math.PI),t.lineTo(e,n-r),t.closePath()}}]),t}();e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n2?t[2]%360*u.r:0,F()):[S*u.h,P*u.h,C*u.h]},j.precision=function(t){return arguments.length?(k=Object(f.a)(D,N=t*t),z()):Object(u.u)(N)},j.fitExtent=function(t,e){return Object(h.a)(j,t,e)},j.fitSize=function(t,e){return Object(h.b)(j,t,e)},function(){return e=t.apply(this,arguments),j.invert=e.invert&&R,F()}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n._points=t,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),r(e,[{key:"clone",value:function(){var t=[];return this._points.forEach(function(e){t.push(new i.default(e.x,e.y,e.z))}),new e(t)}},{key:"getEnvelope",value:function(){return this.envelope}},{key:"toGeoJSONCoordinates",value:function(){var t=[];this.points.forEach(function(e){t.push([e.x,e.y])});var e=t[0],n=t[t.length-1];return e[0]==n[0]&&e[1]==n[1]||t.push([this.points[0].x,this.points[0].y]),[t]}},{key:"toGeoJSON",value:function(){return s.polygon(this.toGeoJSONCoordinates())}},{key:"points",get:function(){return this._points},set:function(t){this._points=t}},{key:"envelope",get:function(){return o.default.getEnvelope(this._points)}},{key:"center",get:function(){return this.envelope.center}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"EPSILON",function(){return r}),n.d(e,"ARRAY_TYPE",function(){return i}),n.d(e,"RANDOM",function(){return o}),e.setMatrixArrayType=function(t){i=t},e.toRadian=function(t){return t*a},e.equals=function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))};var r=1e-6,i="undefined"!=typeof Float32Array?Float32Array:Array,o=Math.random;var a=Math.PI/180},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n._points=t,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default),r(e,[{key:"clone",value:function(){var t=[];return this._points.forEach(function(e){t.push(new i.default(e.x,e.y,e.z))}),new e(t)}},{key:"getEnvelope",value:function(){return this.envelope}},{key:"toGeoJSONCoordinates",value:function(){var t=[];return this.points.forEach(function(e){t.push([e.x,e.y])}),t}},{key:"toGeoJSON",value:function(){return a.lineString(this.toGeoJSONCoordinates())}},{key:"points",get:function(){return this._points},set:function(t){this._points=t}},{key:"envelope",get:function(){return o.default.getEnvelope(this._points)}},{key:"center",get:function(){return this.envelope.center}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1])||arguments[1]}},{key:"removeMarker",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!!t&&(e&&t.clearAnimators(),this._layer.removeLayer(t._node),e&&(t._removeCallback&&t._removeCallback(),t.destroy()),!0)}},{key:"removeAll",value:function(){var t=this;t._layer.eachLayer(function(e){t.removeMarker(e.parentMarker)})}},{key:"removeMarkerByFilter",value:function(t){var e=this;if(t instanceof Function)this._layer.eachLayer(function(n){t(n.properties)&&e.removeMarker(n.parentMarker)});else{var n=i.default.getFilter(t);if(3==n.length&&n[2]){var r=n[0],o=n[1],a=i.default.isString(n[2]),s=null===a?Number(n[2]):a;e._layer.eachLayer(function(t){var n=t.properties.get(r);r&&i.default.getResultByOperation(n,o,s)&&e.removeMarker(t.parentMarker)})}else console.error("filter表达式不正确")}}},{key:"setMarkerVisibleByFilter",value:function(t,e){if(e instanceof Function)this._layer.eachLayer(function(n){e(n.properties)&&(n.parentMarker.show=t)});else{var n=i.default.getFilter(e);if(3==n.length&&n[2]){var r=n[0],o=n[1],a=i.default.isString(n[2]),s=null===a?Number(n[2]):a;this._layer.eachLayer(function(e){var n=e.properties.get(r);r&&i.default.getResultByOperation(n,o,s)&&(e.parentMarker.show=t)})}else console.error("filter表达式不正确")}}},{key:"setMarkerOnlyVisibleByFilter",value:function(t,e){if(e instanceof Function)this._layer.eachLayer(function(n){e(n.properties)?n.parentMarker.show=t:n.parentMarker.show=!t});else{var n=i.default.getFilter(e);if(3==n.length&&n[2]){var r=n[0],o=n[1],a=i.default.isString(n[2]),s=null===a?Number(n[2]):a;this._layer.eachLayer(function(e){var n=e.properties.get(r);r&&i.default.getResultByOperation(n,o,s)?e.parentMarker.show=t:e.parentMarker.show=!t})}else console.error("filter表达式不正确")}}},{key:"show",value:function(t){this._pane.style.display=t?"block":"none"}}]),t}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enableTextSelection=e.disableTextSelection=e.TRANSITION_END=e.TRANSITION=e.TRANSFORM=void 0,e.get=function(t){return"string"==typeof t?document.getElementById(t):t},e.getStyle=function(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var r=document.defaultView.getComputedStyle(t,null);n=r?r[e]:null}return"auto"===n?null:n},e.create=function(t,e,n){var r=document.createElement(t);r.className=e||"",n&&n.appendChild(r);return r},e.remove=function(t){var e=t.parentNode;e&&e.removeChild(t)},e.empty=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},e.toFront=function(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)},e.toBack=function(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)},e.hasClass=h,e.addClass=function(t,e){if(void 0!==t.classList)for(var n=i.splitWords(e),r=0,o=n.length;r0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function f(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}function p(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function d(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function g(t){for(var e=document.documentElement.style,n=0;n0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._xMin=e,this._yMin=n,this._xMax=r,this._yMax=i}return i(t,[{key:"extent",value:function(t){var e=t.xMin,n=t.yMin,r=t.xMax,i=t.yMax;ethis._xMax&&(this._xMax=r),nthis._yMax&&(this._yMax=i)}},{key:"xMin",get:function(){return this._xMin},set:function(t){this._xMin=t}},{key:"yMin",get:function(){return this._yMin},set:function(t){this._yMin=t}},{key:"xMax",get:function(){return this._xMax},set:function(t){this._xMax=t}},{key:"yMax",get:function(){return this._yMax},set:function(t){this._yMax=t}},{key:"center",get:function(){var t=(this._xMax+this._xMin)/2,e=(this._yMax+this._yMin)/2;return new a.default(t,e,0)}},{key:"radius",get:function(){var t=Math.abs(this._yMax-this._yMin),e=Math.abs(this._xMax-this._xMin);return t>e?t/2:e/2}}]),t}();e.default=s},function(t,e,n){"use strict";e.a=function(t,e,n,o){void 0===o&&(o={});var a=Object(i.getCoord)(t),s=Object(r.degreesToRadians)(a[0]),u=Object(r.degreesToRadians)(a[1]),c=Object(r.degreesToRadians)(n),l=Object(r.lengthToRadians)(e,o.units),h=Math.asin(Math.sin(u)*Math.cos(l)+Math.cos(u)*Math.sin(l)*Math.cos(c)),f=s+Math.atan2(Math.sin(c)*Math.sin(l)*Math.cos(u),Math.cos(l)-Math.sin(u)*Math.sin(h)),p=Object(r.radiansToDegrees)(f),d=Object(r.radiansToDegrees)(h);return Object(r.point)([p,d],o.properties)};var r=n(0),i=n(2)},function(t,e,n){"use strict";var r=n(1),i=n(0);e.a=function(t,e){void 0===e&&(e={});var n=0,o=0,a=0;return Object(r.coordEach)(t,function(t){n+=t[0],o+=t[1],a++},!0),Object(i.point)([n/a,o/a],e.properties)}},function(t,e,n){"use strict";function r(t,e){t&&o.hasOwnProperty(t.type)&&o[t.type](t,e)}var i={Feature:function(t,e){r(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,o=n.length;++i100&&n<500||t.target._simulatedClick&&!t._simulated?(r.DomEvent.stop(t),!1):(r.DomEvent._lastClick=e,!0)},_onTouchStart:function(t){if(this._map._loaded){var e=i.TOUCHSTART;this._touchEvent(t,e)}},_onTouchEnd:function(t){if(this._map._loaded){var e=i.TOUCHEND;this._touchEvent(t,e)}},_onTouchCancel:function(t){if(this._map._loaded){var e=i.TOUCHCANCEL;this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},_onTouchLeave:function(t){if(this._map._loaded){var e=i.TOUCHLEAVE;this._touchEvent(t,e)}},_onTouchMove:function(t){if(this._map._loaded){var e=i.TOUCHMOVE;this._touchEvent(t,e)}},_detectIE:function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var n=t.indexOf("rv:");return parseInt(t.substring(n+3,t.indexOf(".",n)),10)}var r=t.indexOf("Edge/");return r>0&&parseInt(t.substring(r+5,t.indexOf(".",r)),10)}}),e.JSTouchMarker=r.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?r.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var t=this._icon,e=[i.DBLCLICK,i.MOUSEDOWN,i.MOUSEOVER,i.MOUSEOUT,i.CONTEXTMENU,i.TOUCHSTART,i.TOUCHEND,i.TOUCHMOVE];this._detectIE?e.concat([i.MSPOINTERDOWN,i.MSPOINTERUP,i.MSPOINTERMOVE,i.MSPOINTERCANCEL]):e.concat([i.TOUCHCANCEL]),r.DomUtil.addClass(t,"leaflet-clickable"),r.DomEvent.on(t,i.CLICK,this._onMouseClick,this),r.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var n=0;n0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var n=t.indexOf("rv:");return parseInt(t.substring(n+3,t.indexOf(".",n)),10)}var r=t.indexOf("Edge/");return r>0&&parseInt(t.substring(r+5,t.indexOf(".",r)),10)}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.JSDrawEvent={CREATED:"draw:created",EDITED:"draw:edited",DELETED:"draw:deleted",DRAWSTART:"draw:drawstart",DRAWSTOP:"draw:drawstop",DRAWVERTEX:"draw:drawvertex",EDITSTART:"draw:editstart",EDITMOVE:"draw:editmove",EDITRESIZE:"draw:editresize",EDITVERTEX:"draw:editvertex",EDITSTOP:"draw:editstop",DELETESTART:"draw:deletestart",DELETESTOP:"draw:deletestop",TOOLBAROPENED:"draw:toolbaropened",TOOLBARCLOSED:"draw:toolbarclosed",MARKERCONTEXT:"draw:markercontext"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n line1 must only contain 2 coordinates");if(2!==o.length)throw new Error(" line2 must only contain 2 coordinates");var a=n[0][0],s=n[0][1],u=n[1][0],c=n[1][1],l=o[0][0],h=o[0][1],f=o[1][0],p=o[1][1],d=(p-h)*(u-a)-(f-l)*(c-s),g=(f-l)*(s-h)-(p-h)*(a-l),y=(u-a)*(s-h)-(c-s)*(a-l);if(0===d)return null;var v=g/d,m=y/d;if(v>=0&&v<=1&&m>=0&&m<=1){var _=a+v*(u-a),b=s+v*(c-s);return Object(r.point)([_,b])}return null}e.a=function(t,e){var n={},s=[];if("LineString"===t.type&&(t=Object(r.feature)(t)),"LineString"===e.type&&(e=Object(r.feature)(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 l=c(t,e);return l&&s.push(l),Object(r.featureCollection)(s)}var h=u()();return h.load(Object(o.a)(e)),Object(a.featureEach)(Object(o.a)(t),function(t){Object(a.featureEach)(h.search(t),function(e){var r=c(t,e);if(r){var o=Object(i.getCoords)(r).join(",");n[o]||(n[o]=!0,s.push(r))}})}),Object(r.featureCollection)(s)}},function(t,e,n){"use strict";function r(){this.reset()}e.a=function(){return new r},r.prototype={constructor:r,reset:function(){this.s=this.t=0},add:function(t){o(i,t,this.t),o(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new r;function o(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}},function(t,e,n){"use strict";e.a=function(t,e){return te?1:t>=e?0:NaN}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return o._east=t,o._south=n,o._west=r,o._north=i,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),r(e,[{key:"clone",value:function(){return new e(this._east,this._south,this._west,this._north)}},{key:"getEnvelope",value:function(){return this.envelope}},{key:"toGeoJSONCoordinates",value:function(){return[[[this._east,this._south],[this._east,this._north],[this._west,this._north],[this._west,this._south],[this._east,this._south]]]}},{key:"toGeoJSON",value:function(){return s.polygon(this.toGeoJSONCoordinates())}},{key:"east",get:function(){return this._east},set:function(t){this._east=t}},{key:"south",get:function(){return this._south},set:function(t){this._south=t}},{key:"west",get:function(){return this._west},set:function(t){this._west=t}},{key:"north",get:function(){return this._north},set:function(t){this._north=t}},{key:"envelope",get:function(){return new o.default(this._east,this._south,this._west,this._north)}},{key:"center",get:function(){return new a.default((this._east+this._west)/2,(this._south+this._north)/2,0)}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=a(n(6)),o=a(n(16));function a(t){return t&&t.__esModule?t:{default:t}}var s={};function u(t,e,n){return"Expected "+n+" to be typeof "+e+", actual typeof was "+t}s.typeOf={},s.defined=function(t,e){if(!(0,i.default)(e))throw new o.default(function(t){return t+" is required, actual value was undefined"}(t))},s.typeOf.func=function(t,e){if("function"!=typeof e)throw new o.default(u(void 0===e?"undefined":r(e),"function",t))},s.typeOf.string=function(t,e){if("string"!=typeof e)throw new o.default(u(void 0===e?"undefined":r(e),"string",t))},s.typeOf.number=function(t,e){if("number"!=typeof e)throw new o.default(u(void 0===e?"undefined":r(e),"number",t))},s.typeOf.number.lessThan=function(t,e,n){if(s.typeOf.number(t,e),e>=n)throw new o.default("Expected "+t+" to be less than "+n+", actual value was "+e)},s.typeOf.number.lessThanOrEquals=function(t,e,n){if(s.typeOf.number(t,e),e>n)throw new o.default("Expected "+t+" to be less than or equal to "+n+", actual value was "+e)},s.typeOf.number.greaterThan=function(t,e,n){if(s.typeOf.number(t,e),e<=n)throw new o.default("Expected "+t+" to be greater than "+n+", actual value was "+e)},s.typeOf.number.greaterThanOrEquals=function(t,e,n){if(s.typeOf.number(t,e),e2&&s(n[o-3],n[o-1],n[o-2])&&n.splice(n.length-2,1))}if(n.push(e[e.length-1]),o=n.length,a(e[0],e[e.length-1])&&o<4)throw new Error("invalid polygon");return s(n[o-3],n[o-1],n[o-2])&&n.splice(n.length-2,1),n}function a(t,e){return t[0]===e[0]&&t[1]===e[1]}function s(t,e,n){var r=n[0],i=n[1],o=t[0],a=t[1],s=e[0],u=e[1],c=s-o,l=u-a;return 0===(r-o)*l-(i-a)*c&&(Math.abs(c)>=Math.abs(l)?c>0?o<=r&&r<=s:s<=r&&r<=o:l>0?a<=i&&i<=u:u<=i&&i<=a)}e.a=function(t,e){void 0===e&&(e={});var n="object"==typeof e?e.mutate:e;if(!t)throw new Error("geojson is required");var a=Object(i.getType)(t),s=[];switch(a){case"LineString":s=o(t);break;case"MultiLineString":case"Polygon":Object(i.getCoords)(t).forEach(function(t){s.push(o(t))});break;case"MultiPolygon":Object(i.getCoords)(t).forEach(function(t){var e=[];t.forEach(function(t){e.push(o(t))}),s.push(e)});break;case"Point":return t;case"MultiPoint":var u={};Object(i.getCoords)(t).forEach(function(t){var e=t.join("-");Object.prototype.hasOwnProperty.call(u,e)||(s.push(t),u[e]=!0)});break;default:throw new Error(a+" geometry not supported")}return t.coordinates?!0===n?(t.coordinates=s,t):{type:a,coordinates:s}:!0===n?(t.geometry.coordinates=s,t):Object(r.feature)({type:a,coordinates:s},t.properties,{bbox:t.bbox,id:t.id})}},function(t,e,n){"use strict";var r=n(0),i=n(2),o=n(1);e.a=function(t){if(!t)throw new Error("geojson is required");var e=[];return Object(o.flattenEach)(t,function(t){!function(t,e){var n=[],o=t.geometry;if(null!==o){switch(o.type){case"Polygon":n=Object(i.getCoords)(o);break;case"LineString":n=[Object(i.getCoords)(o)]}n.forEach(function(n){var i=function(t,e){var n=[];return t.reduce(function(t,i){var o,a,s,u,c,l,h=Object(r.lineString)([t,i],e);return h.bbox=(a=i,s=(o=t)[0],u=o[1],c=a[0],l=a[1],[sc?s:c,u>l?u:l]),n.push(h),i}),n}(n,t.properties);i.forEach(function(t){t.id=e.length,e.push(t)})})}}(t,e)}),Object(r.featureCollection)(e)}},function(t,e,n){"use strict";var r=n(130),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,u=s&&function(){var t={};try{for(var e in s(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),c=function(t,e,n,r){var i;e in t&&("function"!=typeof(i=r)||"[object Function]"!==o.call(i)||!r())||(u?s(t,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):t[e]=n)},l=function(t,e){var n=arguments.length>2?arguments[2]:{},o=r(e);i&&(o=a.call(o,Object.getOwnPropertySymbols(e)));for(var s=0;sMath.PI&&(o-=2*Math.PI),o<-Math.PI&&(o+=2*Math.PI);var a=Math.log(Math.tan(i/2+Math.PI/4)/Math.tan(n/2+Math.PI/4)),s=Math.atan2(o,a);return(Object(r.radiansToDegrees)(s)+360)%360}e.a=function(t,e,n){var r;return void 0===n&&(n={}),(r=n.final?o(Object(i.getCoord)(e),Object(i.getCoord)(t)):o(Object(i.getCoord)(t),Object(i.getCoord)(e)))>180?-(360-r):r}},function(t,e,n){"use strict";var r=n(0),i=n(2);e.a=function(t,e,n,o){void 0===o&&(o={});var a=e<0,s=Object(r.convertLength)(Math.abs(e),o.units,"meters");a&&(s=-Math.abs(s));var u=Object(i.getCoord)(t),c=function(t,e,n,i){i=void 0===i?r.earthRadius:Number(i);var o=e/i,a=t[0]*Math.PI/180,s=Object(r.degreesToRadians)(t[1]),u=Object(r.degreesToRadians)(n),c=o*Math.cos(u),l=s+c;Math.abs(l)>Math.PI/2&&(l=l>0?Math.PI-l:-Math.PI-l);var h=Math.log(Math.tan(l/2+Math.PI/4)/Math.tan(s/2+Math.PI/4)),f=Math.abs(h)>1e-11?c/h:Math.cos(s),p=o*Math.sin(u)/f;return[(180*(a+p)/Math.PI+540)%360-180,180*l/Math.PI]}(u,s,n);return c[0]+=c[0]-u[0]>180?-360:u[0]-c[0]>180?360:0,Object(r.point)(c,o.properties)}},function(t,e,n){"use strict";n.d(e,"f",function(){return f}),n.d(e,"g",function(){return p}),n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i}),n.d(e,"c",function(){return o}),n.d(e,"e",function(){return a}),e.d=g;var r,i,o,a,s=n(308),u=n(148),c=n(149),l=n(86),h=n(85),f=1e-6,p=1e-12;function d(t,e){return e[1]-t[1]||e[0]-t[0]}function g(t,e){var n,f,p,g=t.sort(d).pop();for(a=[],i=new Array(t.length),r=new h.b,o=new h.b;;)if(p=c.c,g&&(!p||g[1]=s)return null;var u=t-i.site[0],c=e-i.site[1],l=u*u+c*c;do{i=o.cells[r=a],a=null,i.halfedges.forEach(function(n){var r=o.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var u=t-s[0],c=e-s[1],h=u*u+c*c;he.x?1:t.ye.y?1:0}}]),a(t,[{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,r=e.length;n=0&&u>=0?ac?-1:0:o<0&&u<0?ac?1:0:uo?1:0}}}]),t}(),E=0,x=function(){function t(e,n,r,o){i(this,t),this.id=++E,this.leftSE=e,e.segment=this,e.otherSE=n,this.rightSE=n,n.segment=this,n.otherSE=e,this.rings=r,this.windings=o}return a(t,null,[{key:"compare",value:function(t,e){var n=t.leftSE.point.x,r=e.leftSE.point.x,i=t.rightSE.point.x,o=e.rightSE.point.x;if(oa&&s>u)return-1;var l=t.comparePoint(e.leftSE.point);if(l<0)return 1;if(l>0)return-1;var h=e.comparePoint(t.rightSE.point);return 0!==h?h:-1}if(n>r){if(as&&a>c)return 1;var f=e.comparePoint(t.leftSE.point);if(0!==f)return f;var p=t.comparePoint(e.rightSE.point);return p<0?1:p>0?-1:1}if(as)return 1;if(io){var g=t.comparePoint(e.rightSE.point);if(g<0)return 1;if(g>0)return-1}if(i!==o){var y=u-a,v=i-n,m=c-s,_=o-r;if(y>v&&m<_)return 1;if(y_)return-1}return i>o?1:ic?1:t.ide.id?1:0}}]),a(t,[{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:te?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,r=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x0&&s.swapEvents(),w.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.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;e0){var o=n;n=r,r=o}if(n.prev===r){var a=n;n=r,r=a}for(var s=0,u=r.rings.length;s0))throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));i=n,o=e,a=-1}return new t(new w(i,!0),new w(o,!1),[r],[a])}}]),t}(),O=function(){function t(e,n,r){if(i(this,t),!Array.isArray(e)||0===e.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=n,this.isExterior=r,this.segments=[],"number"!=typeof e[0][0]||"number"!=typeof e[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=d.round(e[0][0],e[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};for(var a=o,s=1,u=e.length;sthis.bbox.ur.x&&(this.bbox.ur.x=c.x),c.y>this.bbox.ur.y&&(this.bbox.ur.y=c.y),a=c)}o.x===a.x&&o.y===a.y||this.segments.push(x.fromRing(a,o,this))}return a(t,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.segments.length;ethis.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.interiorRings.push(a)}this.multiPoly=n}return a(t,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,n=this.interiorRings.length;ethis.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.polys.push(a)}this.isSubject=n}return a(t,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.polys.length;e0&&(t=r)}for(var i=t.segment.prevInResult(),o=i?i.prevInResult():null;;){if(!i)return null;if(!o)return i.ringOut;if(o.ringOut!==i.ringOut)return o.ringOut.enclosingRing()!==i.ringOut?i.ringOut:i.ringOut.enclosingRing();o=(i=o.prevInResult())?i.prevInResult():null}}}]),t}(),C=function(){function t(e){i(this,t),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}return a(t,[{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;e1&&void 0!==arguments[1]?arguments[1]:x.compare;i(this,t),this.queue=e,this.tree=new r.a(n),this.segments=[]}return a(t,[{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 r=t.isLeft?this.tree.insert(e):this.tree.find(e);if(!r)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.");for(var i=r,o=r,a=void 0,s=void 0;void 0===a;)null===(i=this.tree.prev(i))?a=null:void 0===i.key.consumedBy&&(a=i.key);for(;void 0===s;)null===(o=this.tree.next(o))?s=null:void 0===o.key.consumedBy&&(s=o.key);if(t.isLeft){var u=null;if(a){var c=a.getIntersection(e);if(null!==c&&(e.isAnEndpoint(c)||(u=c),!a.isAnEndpoint(c)))for(var l=this._splitSafely(a,c),h=0,f=l.length;h0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=a)}else{if(a&&s){var x=a.getIntersection(s);if(null!==x){if(!a.isAnEndpoint(x))for(var O=this._splitSafely(a,x),M=0,S=O.length;ML)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var x=new I(y),O=y.size,M=y.pop();M;){var C=M.key;if(y.size===O){var k=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(k.id," ")+"[".concat(k.leftSE.point.x,", ").concat(k.leftSE.point.y,"] -> ")+"[".concat(k.rightSE.point.x,", ").concat(k.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(y.size>L)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(x.segments.length>A)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var j=x.process(C),R=0,D=j.length;R1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;r1,e.passiveEvents=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",i.falseFn,e),window.removeEventListener("testPassiveEventSupport",i.falseFn,e)}catch(t){}return t}(),e.canvas=!!document.createElement("canvas").getContext,e.svg=!(!document.createElementNS||!(0,o.svgCreate)("svg").createSVGRect));e.vml=!O&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"===r(e.adj)}catch(t){return!1}}();function M(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}},function(t,e,n){"use strict";function r(t){if(t instanceof r)this.scheme=t.scheme,this.authority=t.authority,this.path=t.path,this.query=t.query,this.fragment=t.fragment;else if(t){var e=i.exec(t);this.scheme=e[1],this.authority=e[2],this.path=e[3],this.query=e[4],this.fragment=e[5]}}Object.defineProperty(e,"__esModule",{value:!0}),r.prototype.scheme=null,r.prototype.authority=null,r.prototype.path="",r.prototype.query=null,r.prototype.fragment=null;var i=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$");r.prototype.getScheme=function(){return this.scheme},r.prototype.getAuthority=function(){return this.authority},r.prototype.getPath=function(){return this.path},r.prototype.getQuery=function(){return this.query},r.prototype.getFragment=function(){return this.fragment},r.prototype.isAbsolute=function(){return!!this.scheme&&!this.fragment},r.prototype.isSameDocumentAs=function(t){return t.scheme==this.scheme&&t.authority==this.authority&&t.path==this.path&&t.query==this.query},r.prototype.equals=function(t){return this.isSameDocumentAs(t)&&t.fragment==this.fragment},r.prototype.normalize=function(){this.removeDotSegments(),this.scheme&&(this.scheme=this.scheme.toLowerCase()),this.authority&&(this.authority=this.authority.replace(s,c).replace(o,u)),this.path&&(this.path=this.path.replace(o,u)),this.query&&(this.query=this.query.replace(o,u)),this.fragment&&(this.fragment=this.fragment.replace(o,u))};var o=/%[0-9a-z]{2}/gi,a=/[a-zA-Z0-9\-\._~]/,s=/(.*@)?([^@:]*)(:.*)?/;function u(t){var e=unescape(t);return a.test(e)?e:t.toUpperCase()}function c(t,e,n,r){return(e||"")+n.toLowerCase()+(r||"")}r.prototype.resolve=function(t){var e=new r;return this.scheme?(e.scheme=this.scheme,e.authority=this.authority,e.path=this.path,e.query=this.query):(e.scheme=t.scheme,this.authority?(e.authority=this.authority,e.path=this.path,e.query=this.query):(e.authority=t.authority,""==this.path?(e.path=t.path,e.query=this.query||t.query):("/"==this.path.charAt(0)?(e.path=this.path,e.removeDotSegments()):(t.authority&&""==t.path?e.path="/"+this.path:e.path=t.path.substring(0,t.path.lastIndexOf("/")+1)+this.path,e.removeDotSegments()),e.query=this.query))),e.fragment=this.fragment,e},r.prototype.removeDotSegments=function(){var t,e=this.path.split("/"),n=[],r=""==e[0];r&&e.shift();for(""==e[0]&&e.shift();e.length;)".."==(t=e.shift())?n.pop():"."!=t&&n.push(t);"."!=t&&".."!=t||n.push(""),r&&n.unshift(""),this.path=n.join("/")},r.prototype.toString=function(){var t="";return this.scheme&&(t+=this.scheme+":"),this.authority&&(t+="//"+this.authority),t+=this.path,this.query&&(t+="?"+this.query),this.fragment&&(t+="#"+this.fragment),t},e.default=r},function(t,e,n){"use strict";function r(t){return"string"==typeof t}function i(t){return Array.isArray(t)}function o(t){return t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY}function a(t){return"number"==typeof t&&!isNaN(t)&&!o(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isNull=function(t){return void 0===t||null===t},e.isString=r,e.emptyString=function(t){return""===t},e.nonEmptyString=function(t){return r(0)&&""!==t},e.isArray=i,e.emptyArray=function(t){return i(t)&&0===t.length},e.nonEmptyArray=function(t){return i(t)&&0!==t.length},e.isInfinity=o,e.isNumber=a,e.isInteger=function(t){return a(t)&&t%1==0},e.isFunction=function(t){return"function"==typeof t},e.isObject=function(t){return"[object Object]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=Object.prototype.hasOwnProperty},function(t,e,n){"use strict";var r=n(10),i=n(0);e.a=function(t,e){void 0===e&&(e={});var n=Object(r.default)(t),o=(n[0]+n[2])/2,a=(n[1]+n[3])/2;return Object(i.point)([o,a],e.properties,e)}},function(t,e,n){"use strict";var r=n(1),i=n(0);e.a=function(t){var e=[];return"FeatureCollection"===t.type?Object(r.featureEach)(t,function(t){Object(r.coordEach)(t,function(n){e.push(Object(i.point)(n,t.properties))})}):Object(r.coordEach)(t,function(n){e.push(Object(i.point)(n,t.properties))}),Object(i.featureCollection)(e)}},function(t,e,n){"use strict";var r=n(34),i=n(8),o=n(27),a=n(35),s=n(1),u=n(0),c=n(2);e.a=function(t,e,n){void 0===n&&(n={});var l=Object(u.point)([1/0,1/0],{dist:1/0}),h=0;return Object(s.flattenEach)(t,function(t){for(var s=Object(c.getCoords)(t),f=0;f0&&((w=b.features[0]).properties.dist=Object(i.a)(e,w,n),w.properties.location=h+Object(i.a)(p,w,n)),p.properties.dist180?-360:o[0]-a[0]>180?360:0;var s=function(t,e,n){var i=n=void 0===n?r.earthRadius:Number(n),o=t[1]*Math.PI/180,a=e[1]*Math.PI/180,s=a-o,u=Math.abs(e[0]-t[0])*Math.PI/180;u>Math.PI&&(u-=2*Math.PI);var c=Math.log(Math.tan(a/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),l=Math.abs(c)>1e-11?s/c:Math.cos(o);return Math.sqrt(s*s+l*l*u*u)*i}(o,a);return Object(r.convertLength)(s,"meters",n.units)}},function(t,e,n){"use strict";var r=n(2);function i(t,e,n,r,i){var o=n[0],a=n[1],s=t[0],u=t[1],c=e[0],l=e[1],h=c-s,f=l-u,p=(n[0]-s)*f-(n[1]-u)*h;if(null!==i){if(Math.abs(p)>i)return!1}else if(0!==p)return!1;return r?"start"===r?Math.abs(h)>=Math.abs(f)?h>0?s0?u=Math.abs(f)?h>0?s<=o&&o0?u<=a&&a=Math.abs(f)?h>0?s0?u=Math.abs(f)?h>0?s<=o&&o<=c:c<=o&&o<=s:f>0?u<=a&&a<=l:l<=a&&a<=u}e.a=function(t,e,n){void 0===n&&(n={});for(var o=Object(r.getCoord)(t),a=Object(r.getCoords)(e),s=0;si.o?t-i.w:t<-i.o?t+i.w:t,e]}function a(t,e,n){return(t%=i.w)?e||n?Object(r.a)(u(t),c(e,n)):u(t):e||n?c(e,n):o}function s(t){return function(e,n){return[(e+=t)>i.o?e-i.w:e<-i.o?e+i.w:e,n]}}function u(t){var e=s(t);return e.invert=s(-t),e}function c(t,e){var n=Object(i.g)(t),r=Object(i.t)(t),o=Object(i.g)(e),a=Object(i.t)(e);function s(t,e){var s=Object(i.g)(e),u=Object(i.g)(t)*s,c=Object(i.t)(t)*s,l=Object(i.t)(e),h=l*n+u*r;return[Object(i.e)(c*o-h*a,u*n-l*r),Object(i.c)(h*o+c*a)]}return s.invert=function(t,e){var s=Object(i.g)(e),u=Object(i.g)(t)*s,c=Object(i.t)(t)*s,l=Object(i.t)(e),h=l*o-c*a;return[Object(i.e)(c*o+l*a,u*n+h*r),Object(i.c)(h*n-u*r)]},s}o.invert=o,e.a=function(t){function e(e){return(e=t(e[0]*i.r,e[1]*i.r))[0]*=i.h,e[1]*=i.h,e}return t=a(t[0]*i.r,t[1]*i.r,t.length>2?t[2]*i.r:0),e.invert=function(e){return(e=t.invert(e[0]*i.r,e[1]*i.r))[0]*=i.h,e[1]*=i.h,e},e}},function(t,e,n){"use strict";e.a=r;function r(t){return function(e){var n=new i;for(var r in t)n[r]=t[r];return n.stream=e,n}}function i(){}i.prototype={constructor:i,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:1e3,r=arguments[2],o=arguments[3],a=arguments[4];i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"moveTo",this).call(this,t,n,r,o,a),this.setPosition(t)}},{key:"destroy",value:function(){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this),this._color=void 0,this._strokeColor=void 0}},{key:"color",get:function(){return this._color},set:function(t){t!=this._color&&(this._color=t,this._node.setStyle({fillColor:t,fillOpacity:this._show?s.default.getAlphafromCssString(t):0}))}},{key:"strokeColor",get:function(){return this._strokeColor},set:function(t){t!=this._strokeColor&&(this._strokeColor=t,this._node.setStyle({color:t,opacity:this._show?s.default.getAlphafromCssString(t):0}))}},{key:"show",get:function(){return this._show},set:function(t){t!=this._show&&(t?this._node.setStyle({opacity:s.default.getAlphafromCssString(this._strokeColor),fillOpacity:s.default.getAlphafromCssString(this._color)}):this._node.setStyle({opacity:0,fillOpacity:0}),this._show=t)}},{key:"boundingSphere",get:function(){var t=this._position.envelope;return new c.default(t.center,t.radius)}}]),e}();e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],arguments[2],arguments[3],arguments[4];this.setPosition(t)}},{key:"destroy",value:function(){(function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this),this._color=void 0,this._width=void 0,this._smooth=void 0}},{key:"width",get:function(){return this._width},set:function(t){if(t!=this._width){this._width=t;var e=this._show?a.default.getAlphafromCssString(this._color):0;this._lineType==c.JSLineType.DASH?this._node.setWidthAndColor(t,this._color,e,!1):(this._node.setStyle({weight:t,opacity:e}),this._node._symbol&&this._node._symbol.setWidthAndColor(t,this._color,e))}}},{key:"lineType",get:function(){return this._lineType},set:function(t){t!==this._lineType&&(this._updateLineType(this,t),this._lineType=t)}},{key:"color",get:function(){return this._color},set:function(t){if(t!=this._color){this._color=t;var e=this._show?a.default.getAlphafromCssString(t):0;this._lineType==c.JSLineType.DASH?this._node.setWidthAndColor(this._width,t,e,!1):(this._node.setStyle({color:t,opacity:e}),this._node._symbol&&this._node._symbol.setWidthAndColor(this._width,t,e))}}},{key:"smooth",get:function(){return this._smooth}},{key:"show",get:function(){return this._show},set:function(t){if(t!=this._show){this._show=t;var e=t?a.default.getAlphafromCssString(this._color):0;this._lineType==c.JSLineType.DASH?this._node.setWidthAndColor(this._width,this._color,e,!1):(this._node.setStyle({opacity:e}),this._node._symbol&&this._node._symbol.setWidthAndColor(this._width,this._color,e))}}},{key:"boundingSphere",get:function(){var t=this._position.envelope;return new s.default(t.center,t.radius)}}]),e}();e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeListener=e.addListener=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.on=h,e.off=p,e.stopPropagation=m,e.disableScrollPropagation=function(t){return y(t,"wheel",m),this},e.disableClickPropagation=function(t){return h(t,"mousedown touchstart dblclick",m),y(t,"click",E),this},e.preventDefault=_,e.stop=function(t){return _(t),m(t),this},e.getMousePosition=function(t,e){if(!e)return new i.Point(t.clientX,t.clientY);var n=(0,c.getScale)(e),r=n.boundingClientRect;return new i.Point((t.clientX-r.left)/n.x-e.clientLeft,(t.clientY-r.top)/n.y-e.clientTop)},e.getWheelDelta=function(t){return a.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/b:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0},e.fakeStop=E,e.skipped=x,e.isExternalTarget=O;var i=n(190),o=l(n(52)),a=l(n(53)),s=n(389),u=n(390),c=n(23);function l(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function h(t,e,n,i){if("object"===(void 0===e?"undefined":r(e)))for(var a in e)y(t,a,e[a],n);else for(var s=0,u=(e=o.splitWords(e)).length;s1&&void 0!==arguments[1]?arguments[1]:1e3,r=arguments[2],o=arguments[3],a=arguments[4];i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"moveTo",this).call(this,t,n,r,o,a),this.setPosition(t)}},{key:"destroy",value:function(){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this),this._color=void 0,this._strokeColor=void 0}},{key:"color",get:function(){return this._color},set:function(t){t!=this._color&&(this._color=t,this._node.setStyle({fillColor:t,fillOpacity:this._show?a.default.getAlphafromCssString(t):0}))}},{key:"strokeColor",get:function(){return this._strokeColor},set:function(t){t!=this._strokeColor&&(this._strokeColor=t,this._node.setStyle({color:t,opacity:this._show?a.default.getAlphafromCssString(t):0}))}},{key:"show",get:function(){return this._show},set:function(t){t!=this._show&&(t?this._node.setStyle({opacity:a.default.getAlphafromCssString(this._strokeColor),fillOpacity:a.default.getAlphafromCssString(this._color)}):this._node.setStyle({opacity:0,fillOpacity:0}),this._show=t)}},{key:"boundingSphere",get:function(){var t=this._position.envelope;return new s.default(t.center,t.radius)}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&t.screenY>0&&e.getContainer().focus()}},{key:"destroy",value:function(){this._map=void 0,this._container=void 0,this._options=void 0}}]),t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return void 0!==t&&null!==t}},function(t,e,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,s=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u=t)throw new Error("full hashmap");l=a[c=c+1&u]}return a[c]=r,s[c]=o,o},maybeSet:function(r,o){for(var c=e(r)&u,l=a[c],h=0;l!=i;){if(n(l,r))return s[c];if(++h>=t)throw new Error("full hashmap");l=a[c=c+1&u]}return a[c]=r,s[c]=o,o},get:function(r,o){for(var c=e(r)&u,l=a[c],h=0;l!=i;){if(n(l,r))return s[c];if(++h>=t)break;l=a[c=c+1&u]}return o},keys:function(){for(var t=[],e=0,n=a.length;e0){e+=Math.abs(a(t[0]));for(var n=1;n2){for(u=0;u1?Object(r.multiLineString)(t,e):Object(r.lineString)(t[0],e)}e.a=function(t,e){void 0===e&&(e={});var n=Object(i.getGeom)(t);switch(e.properties||"Feature"!==t.type||(e.properties=t.properties),n.type){case"Polygon":return o(n,e);case"MultiPolygon":return function(t,e){void 0===e&&(e={});var n=Object(i.getGeom)(t).coordinates,o=e.properties?e.properties:"Feature"===t.type?t.properties:{},s=[];return n.forEach(function(t){s.push(a(t,o))}),Object(r.featureCollection)(s)}(n,e);default:throw new Error("invalid poly")}}},function(t,e,n){"use strict";var r=n(132);t.exports=function(){return r()&&!!Symbol.toStringTag}},function(t,e,n){"use strict";var r=n(271);t.exports=Function.prototype.bind||r},function(t,e,n){"use strict";var r=n(82),i=n(134),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||r.call(a,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(r,a,arguments);u&&c&&(u(e,"length").configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))}));return e};var h=function(){return s(r,o,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h},function(t,e,n){"use strict";e.d=function(t,e,n){var r=e[0]-t[0],i=e[1]-t[1],o=n[0]-e[0],a=n[1]-e[1];return s=r*a-o*i,(s>0)-(s<0)||+s;var s},e.c=function(t,e){var n=t.geometry.coordinates[0].map(function(t){return t[0]}),r=t.geometry.coordinates[0].map(function(t){return t[1]}),i=e.geometry.coordinates[0].map(function(t){return t[0]}),o=e.geometry.coordinates[0].map(function(t){return t[1]});return Math.max.apply(null,n)===Math.max.apply(null,i)&&Math.max.apply(null,r)===Math.max.apply(null,o)&&Math.min.apply(null,n)===Math.min.apply(null,i)&&Math.min.apply(null,r)===Math.min.apply(null,o)},e.b=function(t,e){return e.geometry.coordinates[0].every(function(e){return Object(r.a)(Object(i.point)(e),t)})},e.a=function(t,e){return t[0]===e[0]&&t[1]===e[1]};var r=n(11),i=n(0)},function(t,e,n){"use strict";function r(){this._=null}function i(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function o(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function a(t){for(;t.L;)t=t.L;return t}e.a=function(t){t.U=t.C=t.L=t.R=t.P=t.N=null},r.prototype={constructor:r,insert:function(t,e){var n,r,s;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=a(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(s=r.R)&&s.C?(n.C=s.C=!1,r.C=!0,t=r):(t===n.R&&(i(this,n),n=(t=n).U),n.C=!1,r.C=!0,o(this,r)):(s=r.L)&&s.C?(n.C=s.C=!1,r.C=!0,t=r):(t===n.L&&(o(this,n),n=(t=n).U),n.C=!1,r.C=!0,i(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,s=t.U,u=t.L,c=t.R;if(n=u?c?a(c):u:c,s?s.L===t?s.L=n:s.R=n:this._=n,u&&c?(r=n.C,n.C=t.C,n.L=u,u.U=n,n!==c?(s=n.U,n.U=t.U,t=n.R,s.L=t,n.R=c,c.U=n):(n.U=s,s=n,t=n.R)):(r=t.C,t=n),t&&(t.U=s),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===s.L){if((e=s.R).C&&(e.C=!1,s.C=!0,i(this,s),e=s.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,o(this,e),e=s.R),e.C=s.C,s.C=e.R.C=!1,i(this,s),t=this._;break}}else if((e=s.L).C&&(e.C=!1,s.C=!0,o(this,s),e=s.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,i(this,e),e=s.L),e.C=s.C,s.C=e.L.C=!1,o(this,s),t=this._;break}e.C=!0,t=s,s=s.U}while(!t.C);t&&(t.C=!1)}}},e.b=r},function(t,e,n){"use strict";e.c=function(t,e,n,o){var a=[null,null],s=r.e.push(a)-1;a.left=t,a.right=e,n&&i(a,t,e,n);o&&i(a,e,t,o);return r.b[t.index].halfedges.push(s),r.b[e.index].halfedges.push(s),a},e.b=function(t,e,n){var r=[e,n];return r.left=t,r},e.d=i,e.a=function(t,e,n,i){var s,u=r.e.length;for(;u--;)a(s=r.e[u],t,e,n,i)&&o(s,t,e,n,i)&&(Math.abs(s[0][0]-s[1][0])>r.f||Math.abs(s[0][1]-s[1][1])>r.f)||delete r.e[u]};var r=n(46);function i(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function o(t,e,n,r,i){var o,a=t[0],s=t[1],u=a[0],c=a[1],l=0,h=1,f=s[0]-u,p=s[1]-c;if(o=e-u,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>h)return;o>l&&(l=o)}if(o=r-u,f||!(o<0)){if(o/=f,f<0){if(o>h)return;o>l&&(l=o)}else if(f>0){if(o0)){if(o/=p,p<0){if(o0){if(o>h)return;o>l&&(l=o)}if(o=i-c,p||!(o<0)){if(o/=p,p<0){if(o>h)return;o>l&&(l=o)}else if(p>0){if(o0||h<1)||(l>0&&(t[0]=[u+l*f,c+l*p]),h<1&&(t[1]=[u+h*f,c+h*p]),!0)}}}}}function a(t,e,n,r,i){var o=t[1];if(o)return!0;var a,s,u=t[0],c=t.left,l=t.right,h=c[0],f=c[1],p=l[0],d=l[1],g=(h+p)/2,y=(f+d)/2;if(d===f){if(g=r)return;if(h>p){if(u){if(u[1]>=i)return}else u=[g,n];o=[g,i]}else{if(u){if(u[1]1)if(h>p){if(u){if(u[1]>=i)return}else u=[(n-s)/a,n];o=[(i-s)/a,i]}else{if(u){if(u[1]=r)return}else u=[e,a*e+s];o=[r,a*r+s]}else{if(u){if(u[0]0&&Object(r.coordEach)(t,function(t){n+=t[0]*c,o+=t[1]*c,a+=c})}),Object(i.point)([n/a,o/a],e.properties,e)}},function(t,e,n){"use strict";e.a=l;var r=n(3),i=n(158),o=n(323),a=n(159),s=n(89),u=1e9,c=-u;function l(t,e,n,l){function h(r,i){return t<=r&&r<=n&&e<=i&&i<=l}function f(r,i,o,a){var s=0,u=0;if(null==r||(s=p(r,o))!==(u=p(i,o))||g(r,i)<0^o>0)do{a.point(0===s||3===s?t:n,s>1?l:e)}while((s=(s+o+4)%4)!==u);else a.point(i[0],i[1])}function p(i,o){return Object(r.a)(i[0]-t)0?0:3:Object(r.a)(i[0]-n)0?2:1:Object(r.a)(i[1]-e)0?1:0:o>0?3:2}function d(t,e){return g(t.x,e.x)}function g(t,e){var n=p(t,1),r=p(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var p,g,y,v,m,_,b,w,E,x,O,M=r,S=Object(i.a)(),P={point:C,lineStart:function(){P.point=T,g&&g.push(y=[]);x=!0,E=!1,b=w=NaN},lineEnd:function(){p&&(T(v,m),_&&E&&S.rejoin(),p.push(S.result()));P.point=C,E&&M.lineEnd()},polygonStart:function(){M=S,p=[],g=[],O=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,r=g.length;nl&&(h-i)*(l-o)>(f-o)*(t-i)&&++e:f<=l&&(h-i)*(l-o)<(f-o)*(t-i)&&--e;return e}(),n=O&&e,i=(p=Object(s.a)(p)).length;(n||i)&&(r.polygonStart(),n&&(r.lineStart(),f(null,null,1,r),r.lineEnd()),i&&Object(a.a)(p,d,e,f,r),r.polygonEnd());M=r,p=g=y=null}};function C(t,e){h(t,e)&&M.point(t,e)}function T(r,i){var a=h(r,i);if(g&&y.push([r,i]),x)v=r,m=i,_=a,x=!1,a&&(M.lineStart(),M.point(r,i));else if(a&&E)M.point(r,i);else{var s=[b=Math.max(c,Math.min(u,b)),w=Math.max(c,Math.min(u,w))],f=[r=Math.max(c,Math.min(u,r)),i=Math.max(c,Math.min(u,i))];Object(o.a)(s,f,t,e,n,l)?(E||(M.lineStart(),M.point(s[0],s[1])),M.point(f[0],f[1]),a||M.lineEnd(),O=!1):a&&(M.lineStart(),M.point(r,i),O=!1)}b=r,w=i,E=a}return P}}},function(t,e,n){"use strict";n(161),n(37),n(162),n(324),n(325),n(164),n(166),n(326),n(329),n(330),n(170),n(331),n(332),n(333);var r=n(334);n.d(e,"a",function(){return r.a});n(171),n(163),n(335),n(90);var i=n(168);n.d(e,"b",function(){return i.a});n(336),n(337),n(338),n(169),n(172),n(165),n(339)},function(t,e,n){"use strict";var r=n(49);e.a=function(t,e,n){if(null==n&&(n=r.a),i=t.length){if((e=+e)<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,o=(i-1)*e,a=Math.floor(o),s=+n(t[a],a,t);return s+(+n(t[a+1],a+1,t)-s)*(o-a)}}},function(t,e,n){"use strict";e.a=function(t){return t}},function(t,e,n){"use strict";var r=n(3),i=n(93),o=n(352);function a(t,e){var n=Object(r.t)(t),i=(n+Object(r.t)(e))/2;if(Object(r.a)(i)3)return Object(r.polygon)([o]);return null};var r=n(0),i=n(1),o=n(213),a=n.n(o)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(214);function i(t,e,n){if(!n)return e.indexOf(t);for(let r=0;r=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y(t,e,n,i,o){const a=[e,n];for(;a.length;){if((n=a.pop())-(e=a.pop())<=i)continue;const s=e+Math.ceil((n-e)/i/2)*i;Object(r.a)(t,s,e,n,o),a.push(e,s,s,n)}}e.default=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const n=[];if(!d(t,e))return n;const r=this.toBBox,i=[];for(;e;){for(let o=0;o=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)}_split(t,e){const n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const a=this._chooseSplitIndex(n,i,r),s=g(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,o(n,this.toBBox),o(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(n,s)}_splitRoot(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let r,i=1/0,o=1/0;for(let s=e;s<=n-e;s++){const e=a(t,0,s,this.toBBox),u=a(t,s,n,this.toBBox),c=f(e,u),h=l(e)+l(u);c=e;r--){const e=t.children[r];s(u,t.leaf?i(e):e),c+=h(u)}return c}_adjustParentBBoxes(t,e,n){for(let r=n;r>=0;r--)s(e[r],t)}_condense(t){for(let e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():o(t[n],this.toBBox)}}},function(t,e,n){"use strict";var r=n(11),i=n(0),o=n(1);e.a=function(t,e){var n=[];return Object(o.featureEach)(t,function(t){var a=!1;if("Point"===t.geometry.type)Object(o.geomEach)(e,function(e){Object(r.a)(t,e)&&(a=!0)}),a&&n.push(t);else{if("MultiPoint"!==t.geometry.type)throw new Error("Input geometry must be a Point or MultiPoint");var s=[];Object(o.geomEach)(e,function(e){Object(o.coordEach)(t,function(t){Object(r.a)(t,e)&&(a=!0,s.push(t))})}),a&&n.push(Object(i.multiPoint)(s))}}),Object(i.featureCollection)(n)}},function(t,e,n){"use strict";e.a=function(t,e){var n=!1;return Object(r.featureCollection)(function(t){if(t.length<3)return[];t.sort(o);var e,n,r,s,u,c,l=t.length-1,h=t[l].x,f=t[0].x,p=t[l].y,d=p;for(;l--;)t[l].yd&&(d=t[l].y);var g,y=f-h,v=d-p,m=y>v?y:v,_=.5*(f+h),b=.5*(d+p),w=[new i({__sentinel:!0,x:_-20*m,y:b-m},{__sentinel:!0,x:_,y:b+20*m},{__sentinel:!0,x:_+20*m,y:b-m})],E=[],x=[];l=t.length;for(;l--;){for(x.length=0,g=w.length;g--;)(y=t[l].x-w[g].x)>0&&y*y>w[g].r?(E.push(w[g]),w.splice(g,1)):(v=t[l].y-w[g].y,y*y+v*v>w[g].r||(x.push(w[g].a,w[g].b,w[g].b,w[g].c,w[g].c,w[g].a),w.splice(g,1)));for(a(x),g=x.length;g;)n=x[--g],e=x[--g],r=t[l],s=n.x-e.x,u=n.y-e.y,c=2*(s*(r.y-n.y)-u*(r.x-n.x)),Math.abs(c)>1e-12&&w.push(new i(e,n,r))}Array.prototype.push.apply(E,w),l=E.length;for(;l--;)(E[l].a.__sentinel||E[l].b.__sentinel||E[l].c.__sentinel)&&E.splice(l,1);return E}(t.features.map(function(t){var r={x:t.geometry.coordinates[0],y:t.geometry.coordinates[1]};return e?r.z=t.properties[e]:3===t.geometry.coordinates.length&&(n=!0,r.z=t.geometry.coordinates[2]),r})).map(function(t){var e=[t.a.x,t.a.y],i=[t.b.x,t.b.y],o=[t.c.x,t.c.y],a={};return n?(e.push(t.a.z),i.push(t.b.z),o.push(t.c.z)):a={a:t.a.z,b:t.b.z,c:t.c.z},Object(r.polygon)([[e,i,o,e]],a)}))};var r=n(0);var i=function(){return function(t,e,n){this.a=t,this.b=e,this.c=n;var r,i,o=e.x-t.x,a=e.y-t.y,s=n.x-t.x,u=n.y-t.y,c=o*(t.x+e.x)+a*(t.y+e.y),l=s*(t.x+n.x)+u*(t.y+n.y),h=2*(o*(n.y-e.y)-a*(n.x-e.x));this.x=(u*c-a*l)/h,this.y=(o*l-s*c)/h,r=this.x-t.x,i=this.y-t.y,this.r=r*r+i*i}}();function o(t,e){return e.x-t.x}function a(t){var e,n,r,i,o,a=t.length;t:for(;a;)for(n=t[--a],e=t[--a],r=a;r;)if(o=t[--r],e===(i=t[--r])&&n===o||e===o&&n===i){t.splice(a,2),t.splice(r,2),a-=2;continue t}}},function(t,e,n){"use strict";var r=n(72);e.a=function(t){var e,n=Object(r.a)(t.transform),i=1/0,o=i,a=-i,s=-i;function u(t){(t=n(t))[0]a&&(a=t[0]),t[1]s&&(s=t[1])}function c(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(c);break;case"Point":u(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(u)}}for(e in t.arcs.forEach(function(t){for(var e,r=-1,u=t.length;++ra&&(a=e[0]),e[1]s&&(s=e[1])}),t.objects)c(t.objects[e]);return[i,o,a,s]}},function(t,e,n){"use strict";e.a=function(t){return t}},function(t,e,n){"use strict";e.a=function(t,e){var n={},r={},i={},o=[],a=-1;function s(t,e){for(var r in t){var i=t[r];delete e[i.start],delete i.start,delete i.end,i.forEach(function(t){n[t<0?~t:t]=1}),o.push(i)}}return e.forEach(function(n,r){var i,o=t.arcs[n<0?~n:n];o.length<3&&!o[1][0]&&!o[1][1]&&(i=e[++a],e[a]=n,e[r]=i)}),e.forEach(function(e){var n,o,a=function(e){var n,r=t.arcs[e<0?~e:e],i=r[0];t.transform?(n=[0,0],r.forEach(function(t){n[0]+=t[0],n[1]+=t[1]})):n=r[r.length-1];return e<0?[n,i]:[i,n]}(e),s=a[0],u=a[1];if(n=i[s])if(delete i[n.end],n.push(e),n.end=u,o=r[u]){delete r[o.start];var c=o===n?n:n.concat(o);r[c.start=n.start]=i[c.end=o.end]=c}else r[n.start]=i[n.end]=n;else if(n=r[u])if(delete r[n.start],n.unshift(e),n.start=s,o=i[s]){delete i[o.end];var l=o===n?n:o.concat(n);r[l.start=o.start]=i[l.end=n.end]=l}else r[n.start]=i[n.end]=n;else r[(n=[e]).start=s]=i[n.end=u]=n}),s(i,r),s(r,i),e.forEach(function(t){n[t<0?~t:t]||o.push([t])}),o}},function(t,e,n){"use strict";var r=n(112);e.a=function(t){if(null==t)return r.a;var e,n,i=t.scale[0],o=t.scale[1],a=t.translate[0],s=t.translate[1];return function(t,r){r||(e=n=0);var u=2,c=t.length,l=new Array(c),h=Math.round((t[0]-a)/i),f=Math.round((t[1]-s)/o);for(l[0]=h-e,e=h,l[1]=f-n,n=f;u>7^o[2]^o[3])}},function(t,e,n){"use strict";t.exports=i,t.exports.default=i;var r=n(243);function i(t,e){if(!(this instanceof i))return new i(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 r=0;r=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y(t,e,n,i,o){for(var a,s=[e,n];s.length;)(n=s.pop())-(e=s.pop())<=i||(a=e+Math.ceil((n-e)/i/2)*i,r(t,a,e,n,o),s.push(e,a,a,n))}i.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],r=this.toBBox;if(!d(t,e))return n;for(var i,o,a,s,u=[];e;){for(i=0,o=e.children.length;i=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(i,o,e)},_split:function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var o=this._chooseSplitIndex(n,i,r),s=g(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,a(n,this.toBBox),a(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(n,s)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var r,i,o,a,u,c,l,f,p,d,g,y,v,m;for(c=l=1/0,r=e;r<=n-e;r++)i=s(t,0,r,this.toBBox),o=s(t,r,n,this.toBBox),p=i,d=o,void 0,void 0,void 0,void 0,g=Math.max(p.minX,d.minX),y=Math.max(p.minY,d.minY),v=Math.min(p.maxX,d.maxX),m=Math.min(p.maxY,d.maxY),a=Math.max(0,v-g)*Math.max(0,m-y),u=h(i)+h(o),a=e;i--)o=t.children[i],u(l,t.leaf?a(o):o),h+=f(l);return h},_adjustParentBBoxes:function(t,e,n){for(var r=n;r>=0;r--)u(e[r],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).splice(e.indexOf(t[n]),1):this.clear():a(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]+"};")}}},function(t,e,n){"use strict";var r=n(10),i=n(75);e.a=function(t){return Object(i.a)(Object(r.default)(t))}},function(t,e,n){"use strict";var r=n(8);e.a=function(t){var e=t[0],n=t[1],i=t[2],o=t[3];if(Object(r.a)(t.slice(0,2),[i,n])>=Object(r.a)(t.slice(0,2),[e,o])){var a=(n+o)/2;return[e,a-(i-e)/2,i,a+(i-e)/2]}var s=(e+i)/2;return[s-(o-n)/2,n,s+(o-n)/2,o]}},function(t,e,n){"use strict";var r=n(8),i=n(0),o=n(2),a=n(1),s=n(60);function u(t,e){return t[0]*e[0]+t[1]*e[1]}function c(t,e,n){return"planar"===n.method?Object(s.a)(t,e,n):Object(r.a)(t,e,n)}e.a=function(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=Object(i.point)(t):"Point"===t.type?t=Object(i.feature)(t):Object(o.featureOf)(t,"Point","point"),!e)throw new Error("line is required");Array.isArray(e)?e=Object(i.lineString)(e):"LineString"===e.type?e=Object(i.feature)(e):Object(o.featureOf)(e,"LineString","line");var r=1/0,s=t.geometry.coordinates;return Object(a.segmentEach)(e,function(t){var e=t.geometry.coordinates[0],i=t.geometry.coordinates[1],o=function(t,e,n,r){var i=[n[0]-e[0],n[1]-e[1]],o=u([t[0]-e[0],t[1]-e[1]],i);if(o<=0)return c(t,e,{method:r.method,units:"degrees"});var a=u(i,i);if(a<=o)return c(t,n,{method:r.method,units:"degrees"});var s=o/a,l=[e[0]+s*i[0],e[1]+s*i[1]];return c(t,l,{method:r.method,units:"degrees"})}(s,e,i,n);o=d&&g===u.length-1);g++){if(d>e&&0===c.length){if(!(l=e-d))return c.push(u[g]),Object(a.lineString)(c);h=Object(r.a)(u[g],u[g-1])-180,f=Object(o.a)(u[g],l,h,s),c.push(f.geometry.coordinates)}if(d>=n)return(l=n-d)?(h=Object(r.a)(u[g],u[g-1])-180,f=Object(o.a)(u[g],l,h,s),c.push(f.geometry.coordinates),Object(a.lineString)(c)):(c.push(u[g]),Object(a.lineString)(c));if(d>=e&&c.push(u[g]),g===u.length-1)return Object(a.lineString)(c);d+=Object(i.a)(u[g],u[g+1],s)}if(de[0])&&(!(t[2]e[1])&&!(t[3] is required");if("number"!=typeof n)throw new Error(" must be a number");if("number"!=typeof i)throw new Error(" must be a number");!1!==o&&void 0!==o||(t=JSON.parse(JSON.stringify(t)));var a=Math.pow(10,n);return Object(r.coordEach)(t,function(t){!function(t,e,n){t.length>n&&t.splice(n,t.length);for(var r=0;rd&&y.push(Object(i.a)(t,e,d,u).geometry.coordinates);return Object(o.lineString)(y,f)};var r=n(76),i=n(27),o=n(0);function a(t){var e=t%360;return e<0&&(e+=360),e}},function(t,e,n){"use strict";var r=n(78),i=n.n(r),o=n(42),a=n(59),s=n(61),u=n(2),c=n(1),l=n(0),h=n(129),f=n.n(h);function p(t,e){var n=Object(u.getCoords)(e),r=Object(u.getCoords)(t),i=r[0],o=r[r.length-1],a=t.geometry.coordinates;return f()(n[0],i)?a.unshift(n[1]):f()(n[0],o)?a.push(n[1]):f()(n[1],i)?a.unshift(n[0]):f()(n[1],o)&&a.push(n[0]),t}e.a=function(t,e,n){if(void 0===n&&(n={}),n=n||{},!Object(l.isObject)(n))throw new Error("options is invalid");var r,h=n.tolerance||0,d=[],g=i()(),y=Object(o.a)(t);return g.load(y),Object(c.segmentEach)(e,function(t){var e=!1;t&&(Object(c.featureEach)(g.search(t),function(n){if(!1===e){var i=Object(u.getCoords)(t).sort(),o=Object(u.getCoords)(n).sort();f()(i,o)?(e=!0,r=r?p(r,t):t):(0===h?Object(s.a)(i[0],n)&&Object(s.a)(i[1],n):Object(a.a)(n,i[0]).properties.dist<=h&&Object(a.a)(n,i[1]).properties.dist<=h)?(e=!0,r=r?p(r,t):t):(0===h?Object(s.a)(o[0],t)&&Object(s.a)(o[1],t):Object(a.a)(t,o[0]).properties.dist<=h&&Object(a.a)(t,o[1]).properties.dist<=h)&&(r=r?p(r,n):n)}}),!1===e&&r&&(d.push(r),r=void 0))}),r&&d.push(r),Object(l.featureCollection)(d)}},function(t,e,n){var r=n(130),i=n(269),o=n(273),a=n(275),s=n(276),u=n(278),c=Date.prototype.getTime;function l(t,e,n){var p=n||{};return!(p.strict?!o(t,e):t!==e)||(!t||!e||"object"!=typeof t&&"object"!=typeof e?p.strict?o(t,e):t==e:function(t,e,n){var o,p;if(typeof t!=typeof e)return!1;if(h(t)||h(e))return!1;if(t.prototype!==e.prototype)return!1;if(i(t)!==i(e))return!1;var d=a(t),g=a(e);if(d!==g)return!1;if(d||g)return t.source===e.source&&s(t)===s(e);if(u(t)&&u(e))return c.call(t)===c.call(e);var y=f(t),v=f(e);if(y!==v)return!1;if(y||v){if(t.length!==e.length)return!1;for(o=0;o=0;o--)if(m[o]!=_[o])return!1;for(o=m.length-1;o>=0;o--)if(p=m[o],!l(t[p],e[p],n))return!1;return!0}(t,e,p))}function h(t){return null===t||void 0===t}function f(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]))}t.exports=l},function(t,e,n){"use strict";var r=Array.prototype.slice,i=n(131),o=Object.keys,a=o?function(t){return o(t)}:n(268),s=Object.keys;a.shim=function(){Object.keys?function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)||(Object.keys=function(t){return i(t)?s(r.call(t)):s(t)}):Object.keys=a;return Object.keys||a},t.exports=a},function(t,e,n){"use strict";var r=Object.prototype.toString;t.exports=function(t){var e=r.call(t),n="[object Arguments]"===e;return n||(n="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===r.call(t.callee)),n}},function(t,e,n){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},function(t,e,n){"use strict";var r=n(134),i=n(83),o=i(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&o(t,".prototype.")>-1?i(n):n}},function(t,e,n){"use strict";var r=SyntaxError,i=Function,o=TypeError,a=function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch(t){}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch(t){s=null}var u=function(){throw new o},c=s?function(){try{return arguments.callee,u}catch(t){try{return s(arguments,"callee").get}catch(t){return u}}}():u,l=n(270)(),h=Object.getPrototypeOf||function(t){return t.__proto__},f={},p="undefined"==typeof Uint8Array?void 0:h(Uint8Array),d={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":l?h([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":f,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l?h(h([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l?h((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l?h((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l?h(""[Symbol.iterator]()):void 0,"%Symbol%":l?Symbol:void 0,"%SyntaxError%":r,"%ThrowTypeError%":c,"%TypedArray%":p,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},g={"%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"]},y=n(82),v=n(272),m=y.call(Function.call,Array.prototype.concat),_=y.call(Function.apply,Array.prototype.splice),b=y.call(Function.call,String.prototype.replace),w=y.call(Function.call,String.prototype.slice),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,x=/\\(\\)?/g,O=function(t,e){var n,i=t;if(v(g,i)&&(i="%"+(n=g[i])[0]+"%"),v(d,i)){var s=d[i];if(s===f&&(s=function t(e){var n;if("%AsyncFunction%"===e)n=a("async function () {}");else if("%GeneratorFunction%"===e)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=a("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&(n=h(i.prototype))}return d[e]=n,n}(i)),void 0===s&&!e)throw new o("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:s}}throw new r("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new o('"allowMissing" argument must be a boolean');var n=function(t){var e=w(t,0,1),n=w(t,-1);if("%"===e&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new r("invalid intrinsic syntax, expected opening `%`");var i=[];return b(t,E,function(t,e,n,r){i[i.length]=n?b(r,x,"$1"):e||t}),i}(t),i=n.length>0?n[0]:"",a=O("%"+i+"%",e),u=a.name,c=a.value,l=!1,h=a.alias;h&&(i=h[0],_(n,m([0,1],h)));for(var f=1,p=!0;f=n.length){var S=s(c,g);c=(p=!!S)&&"get"in S&&!("originalValue"in S.get)?S.get:c[g]}else p=v(c,g),c=c[g];p&&!l&&(d[u]=c)}}return c}},function(t,e,n){"use strict";var r=function(t){return t!=t};t.exports=function(t,e){return 0===t&&0===e?1/t==1/e:t===e||!(!r(t)||!r(e))}},function(t,e,n){"use strict";var r=n(135);t.exports=function(){return"function"==typeof Object.is?Object.is:r}},function(t,e,n){"use strict";var r=Object,i=TypeError;t.exports=function(){if(null!=this&&this!==r(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.sticky&&(t+="y"),t}},function(t,e,n){"use strict";var r=n(137),i=n(43).supportsDescriptors,o=Object.getOwnPropertyDescriptor,a=TypeError;t.exports=function(){if(!i)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var t=o(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof/a/.dotAll)return t.get}return r}},function(t,e,n){"use strict";e.a=function(t){var e,n,i=Object(r.getCoords)(t),o=0,a=1;for(;a0};var r=n(2)},function(t,e,n){"use strict";var r=n(28),i=n(44),o=n(60),a=n(45),s=n(9),u=n(1),c=n(2),l=n(0);e.a=function(t,e,n){if(n=n||{},!Object(l.isObject)(n))throw new Error("options is invalid");var h=n.pivot,f=n.mutate;if(!t)throw new Error("geojson is required");if(void 0===e||null===e||isNaN(e))throw new Error("angle is required");return 0===e?t:(h||(h=Object(r.a)(t)),!1!==f&&void 0!==f||(t=Object(s.a)(t)),Object(u.coordEach)(t,function(t){var n=Object(i.a)(h,t)+e,r=Object(o.a)(h,t),s=Object(c.getCoords)(Object(a.a)(h,r,n));t[0]=s[0],t[1]=s[1]}),t)}},function(t,e,n){"use strict";var r=n(9),i=n(57),o=n(28),a=n(10),s=n(44),u=n(60),c=n(45),l=n(1),h=n(0),f=n(2);function p(t,e,n){var r="Point"===Object(f.getType)(t);return n=function(t,e){void 0!==e&&null!==e||(e="centroid");if(Array.isArray(e)||"object"==typeof e)return Object(f.getCoord)(e);var n=t.bbox?t.bbox:Object(a.default)(t),r=n[0],s=n[1],u=n[2],c=n[3];switch(e){case"sw":case"southwest":case"westsouth":case"bottomleft":return Object(h.point)([r,s]);case"se":case"southeast":case"eastsouth":case"bottomright":return Object(h.point)([u,s]);case"nw":case"northwest":case"westnorth":case"topleft":return Object(h.point)([r,c]);case"ne":case"northeast":case"eastnorth":case"topright":return Object(h.point)([u,c]);case"center":return Object(i.a)(t);case void 0:case null:case"centroid":return Object(o.a)(t);default:throw new Error("invalid origin")}}(t,n),1===e||r?t:(Object(l.coordEach)(t,function(t){var r=Object(u.a)(n,t),i=Object(s.a)(n,t),o=r*e,a=Object(f.getCoords)(Object(c.a)(n,o,i));t[0]=a[0],t[1]=a[1],3===t.length&&(t[2]*=e)}),t)}e.a=function(t,e,n){if(n=n||{},!Object(h.isObject)(n))throw new Error("options is invalid");var i=n.origin,o=n.mutate;if(!t)throw new Error("geojson required");if("number"!=typeof e||0===e)throw new Error("invalid factor");var a=Array.isArray(i)||"object"==typeof i;return!0!==o&&(t=Object(r.a)(t)),"FeatureCollection"!==t.type||a?p(t,e,i):(Object(l.featureEach)(t,function(n,r){t.features[r]=p(n,e,i)}),t)}},function(t,e,n){"use strict";var r=n(84),i=n(0),o=n(118),a=n(11),s=function(){function t(){this.edges=[],this.polygon=void 0,this.envelope=void 0}return t.prototype.push=function(t){this.edges.push(t),this.polygon=this.envelope=void 0},t.prototype.get=function(t){return this.edges[t]},Object.defineProperty(t.prototype,"length",{get:function(){return this.edges.length},enumerable:!0,configurable:!0}),t.prototype.forEach=function(t){this.edges.forEach(t)},t.prototype.map=function(t){return this.edges.map(t)},t.prototype.some=function(t){return this.edges.some(t)},t.prototype.isValid=function(){return!0},t.prototype.isHole=function(){var t=this,e=this.edges.reduce(function(e,n,r){return n.from.coordinates[1]>t.edges[e].from.coordinates[1]&&(e=r),e},0),n=(0===e?this.length:e)-1,i=(e+1)%this.length,o=Object(r.d)(this.edges[n].from.coordinates,this.edges[e].from.coordinates,this.edges[i].from.coordinates);return 0===o?this.edges[n].from.coordinates[0]>this.edges[i].from.coordinates[0]:o>0},t.prototype.toMultiPoint=function(){return Object(i.multiPoint)(this.edges.map(function(t){return t.from.coordinates}))},t.prototype.toPolygon=function(){if(this.polygon)return this.polygon;var t=this.edges.map(function(t){return t.from.coordinates});return t.push(this.edges[0].from.coordinates),this.polygon=Object(i.polygon)([t])},t.prototype.getEnvelope=function(){return this.envelope?this.envelope:this.envelope=Object(o.a)(this.toPolygon())},t.findEdgeRingContaining=function(t,e){var n,o,a=t.getEnvelope();return e.forEach(function(e){var s=e.getEnvelope();if(o&&(n=o.getEnvelope()),!Object(r.c)(s,a)&&Object(r.b)(s,a)){for(var u=void 0,c=function(t){e.some(function(e){return Object(r.a)(t,e.from.coordinates)})||(u=t)},l=0,h=t.map(function(t){return t.from.coordinates});l0}function c(t,e,n){var r=n[0]-t[0],i=n[1]-t[1],o=e[0]-t[0],a=e[1]-t[1];return 0==r*a-i*o&&(Math.abs(o)>=Math.abs(a)?o>0?t[0]<=n[0]&&n[0]<=e[0]:e[0]<=n[0]&&n[0]<=t[0]:a>0?t[1]<=n[1]&&n[1]<=e[1]:e[1]<=n[1]&&n[1]<=t[1])}e.a=function(t,e){var n=!0;return Object(o.flattenEach)(t,function(t){Object(o.flattenEach)(e,function(e){if(!1===n)return!1;n=function(t,e){switch(t.type){case"Point":switch(e.type){case"Point":return c=t.coordinates,l=e.coordinates,!(c[0]===l[0]&&c[1]===l[1]);case"LineString":return!s(e,t);case"Polygon":return!Object(r.a)(t,e)}break;case"LineString":switch(e.type){case"Point":return!s(t,e);case"LineString":return n=t,o=e,!(Object(i.a)(n,o).features.length>0);case"Polygon":return!u(e,t)}break;case"Polygon":switch(e.type){case"Point":return!Object(r.a)(e,t);case"LineString":return!u(t,e);case"Polygon":return!function(t,e){for(var n=0,o=t.coordinates[0];n0}(e,t)}}var n,o,c,l;return!1}(t.geometry,e.geometry)})}),n}},function(t,e,n){var r=n(129),i=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:s};function o(t){return t.coordinates.map(function(e){return{type:t.type.replace("Multi",""),coordinates:e}})}function a(t,e){return t.hasOwnProperty("coordinates")?t.coordinates.length===e.coordinates.length:t.length===e.length}function s(t,e){return r(t,e,{strict:!0})}i.prototype.compare=function(t,e){if(t.type!==e.type||!a(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,r=o(t),i=o(e);return r.every(function(t){return this.some(function(e){return n.compare(t,e)})},i)}}return!1},i.prototype.compareCoord=function(t,e){if(t.length!==e.length)return!1;for(var n=0;n=0&&(n=[].concat(t.slice(r,t.length),t.slice(1,r+1))),n},i.prototype.comparePath=function(t,e){var n=this;return t.every(function(t,e){return n.compareCoord(t,this[e])},e)},i.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),r=e.coordinates.slice(1,e.coordinates.length),i=this;return n.every(function(t){return this.some(function(e){return i.compareLine(t,e,1,!0)})},r)}return!1},i.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)},i.prototype.compareBBox=function(t,e){return!!(!t.bbox&&!e.bbox||t.bbox&&e.bbox&&this.compareCoord(t.bbox,e.bbox))},i.prototype.removePseudo=function(t){return t},t.exports=i},function(t,e,n){"use strict";e.a=function(t,e){var n=!1;return Object(i.flattenEach)(t,function(t){Object(i.flattenEach)(e,function(e){if(!0===n)return!0;n=!Object(r.a)(t.geometry,e.geometry)})}),n};var r=n(143),i=n(1)},function(t,e){function n(t,e,n){this._queue=[],this._priorities=[],this._sorting="desc",this._init(t,e,n)}n.prototype.insert=function(t,e){for(var n=this._queue.length,r=n;r--;){var i=this._priorities[r];"desc"===this._sorting?e>i&&(n=r):ei.f||Math.abs(_-y)>i.f)&&(f.splice(h,0,i.e.push(Object(r.b)(l,v,Math.abs(m-t)i.f?[t,Math.abs(g-t)i.f?[Math.abs(y-o)i.f?[n,Math.abs(g-n)i.f?[Math.abs(y-e)=-o.g)return;var v=f*f+p*p,m=d*d+g*g,_=(g*v-p*m)/y,b=(f*m-d*v)/y,w=a.pop()||new function(){Object(i.a)(this),this.x=this.y=this.arc=this.site=this.cy=null};w.arc=t,w.site=u,w.x=_+l,w.y=(w.cy=b+h)+Math.sqrt(_*_+b*b),t.circle=w;var E=null,x=o.c._;for(;x;)if(w.y=-270&&(_=-_),m<-180&&m>=-360&&(b=-b),"degrees"===l){var w=_*Math.cos(g)+b*Math.sin(g),E=b*Math.cos(g)-_*Math.sin(g);_=w,b=E}y.push([_+d[0],b+d[1]])}return y.push(y[0]),"degrees"===l?Object(r.polygon)([y],p):Object(o.a)(Object(r.polygon)([y],p),h,{pivot:f})}},function(t,e,n){"use strict";e.a=function(t,e){var n=(e=e||{}).threshold||1e4,i=e.p||2,s=e.binary||!1,u=e.alpha||-1,c=e.standardization||!1,l=[];Object(o.featureEach)(t,function(t){l.push(Object(r.a)(t))});for(var h=[],f=0;f0?1:0))*n,r*Math.log(Math.tan(.25*Math.PI+.5*t[1]*n))];return o[0]>i&&(o[0]=i),o[0]<-i&&(o[0]=-i),o[1]>i&&(o[1]=i),o[1]<-i&&(o[1]=-i),o}function u(t){var e=180/Math.PI,n=6378137;return[t[0]*e/n,(.5*Math.PI-2*Math.atan(Math.exp(-t[1]/n)))*e]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomPosition=o,e.randomPoint=function(t,e){void 0===e&&(e={});void 0!==t&&null!==t||(t=1);for(var n=[],i=0;i0?t+n[e-1]:t}),u.forEach(function(t){t=2*t*Math.PI/u[u.length-1];var n=Math.random();s.push([n*(e.max_radial_length||10)*Math.sin(t),n*(e.max_radial_length||10)*Math.cos(t)])}),s[s.length-1]=s[0],s=s.map((a=o(e.bbox),function(t){return[t[0]+a[0],t[1]+a[1]]})),n.push(Object(r.polygon)([s]))},s=0;s=0?1:-1,i=r*n,u=Object(c.g)(e),l=Object(c.t)(e),f=s*l,p=a*u+f*Object(c.g)(i),d=f*r*Object(c.t)(i);h.add(Object(c.e)(d,p)),o=t,a=u,s=l}},function(t,e,n){"use strict";e.a=o;var r=n(48),i=(n(322),n(3));n(62);function o(t,e,n,o,s,u){if(n){var c=Object(i.g)(e),l=Object(i.t)(e),h=o*n;null==s?(s=e+o*i.w,u=e-h/2):(s=a(c,s),u=a(c,u),(o>0?su)&&(s+=o*i.w));for(var f,p=s;o>0?p>u:p1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}},function(t,e,n){"use strict";var r=n(160);function i(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function o(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0;--u)s.point((p=f[u])[0],p[1]);else a(g.x,g.p.x,-1,s);g=g.p}f=(g=g.o).z,y=!y}while(!g.v);s.lineEnd()}}}},function(t,e,n){"use strict";var r=n(3);e.a=function(t,e){return Object(r.a)(t[0]-e[0])>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}},function(t,e,n){"use strict";e.a=r;function r(t,e){return[t,e]}},function(t,e,n){"use strict";var r=n(165);e.a=function(t,e){var n=Object(r.a)(t,e);return n?Math.sqrt(n):n}},function(t,e,n){"use strict";var r=n(49);e.a=function(t,e){var n,i,o=t.length,a=0,s=-1,u=0,c=0;if(null==e)for(;++s1)return c/(a-1)}},function(t,e,n){"use strict";e.a=function(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a=n)for(r=i=n;++an&&(r=n),i=n)for(r=i=n;++an&&(r=n),i=r?s*=10:u>=i?s*=5:u>=o&&(s*=2);return e=n)for(r=n;++on&&(r=n)}else for(;++o=n)for(r=n;++on&&(r=n);return r}},function(t,e,n){"use strict";var r=n(171);function i(t){return t.length}e.a=function(t){if(!(a=t.length))return[];for(var e=-1,n=Object(r.a)(t,i),o=new Array(n);++e=0?1:-1,P=S*M,C=P>o.o,T=v*x;if(a.add(Object(o.e)(T*S*Object(o.t)(P),m*O+T*Object(o.g)(P))),u+=C?M+S*o.w:M,C^g>=n^w>=n){var I=Object(i.c)(Object(i.a)(d),Object(i.a)(b));Object(i.e)(I);var L=Object(i.c)(s,I);Object(i.e)(L);var A=(C^M>=0?-1:1)*Object(o.c)(L[2]);(r>A||r===A&&(I[0]||I[1]))&&(c+=C^M>=0?1:-1)}}return(u<-o.i||ua&&(a=t);es&&(s=e)},lineStart:r.a,lineEnd:r.a,polygonStart:r.a,polygonEnd:r.a,result:function(){var t=[[i,o],[a,s]];return a=s=-(o=i=1/0),t}};e.a=u},function(t,e,n){"use strict";var r=n(92);e.a=function(){return Object(r.a)().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}},function(t,e,n){"use strict";var r=n(158),i=n(159),o=n(3),a=n(173),s=n(89);function u(t){return t.length>1}function c(t,e){return((t=t.x)[0]<0?t[1]-o.l-o.i:o.l-t[1])-((e=e.x)[0]<0?e[1]-o.l-o.i:o.l-e[1])}e.a=function(t,e,n,o){return function(l,h){var f,p,d,g=e(h),y=l.invert(o[0],o[1]),v=Object(r.a)(),m=e(v),_=!1,b={point:w,lineStart:x,lineEnd:O,polygonStart:function(){b.point=M,b.lineStart=S,b.lineEnd=P,p=[],f=[]},polygonEnd:function(){b.point=w,b.lineStart=x,b.lineEnd=O,p=Object(s.a)(p);var t=Object(a.a)(f,y);p.length?(_||(h.polygonStart(),_=!0),Object(i.a)(p,c,t,n,h)):t&&(_||(h.polygonStart(),_=!0),h.lineStart(),n(null,null,1,h),h.lineEnd()),_&&(h.polygonEnd(),_=!1),p=f=null},sphere:function(){h.polygonStart(),h.lineStart(),n(null,null,1,h),h.lineEnd(),h.polygonEnd()}};function w(e,n){var r=l(e,n);t(e=r[0],n=r[1])&&h.point(e,n)}function E(t,e){var n=l(t,e);g.point(n[0],n[1])}function x(){b.point=E,g.lineStart()}function O(){b.point=w,g.lineEnd()}function M(t,e){d.push([t,e]);var n=l(t,e);m.point(n[0],n[1])}function S(){m.lineStart(),d=[]}function P(){M(d[0][0],d[0][1]),m.lineEnd();var t,e,n,r,i=m.clean(),o=v.result(),a=o.length;if(d.pop(),f.push(d),d=null,a)if(1&i){if((e=(n=o[0]).length-1)>0){for(_||(h.polygonStart(),_=!0),h.lineStart(),t=0;t1&&2&i&&o.push(o.pop().concat(o.shift())),p.push(o.filter(u))}return b}}},function(t,e,n){"use strict";e.a=r;n(17);function r(t,e){return[t,e]}r.invert=r},function(t,e,n){"use strict";var r=n(8),i=n(96),o=n(0);function a(t,e,n,r,i,a){for(var s=[],u=0;u<6;u++){var c=t[0]+e*i[u],l=t[1]+n*a[u];s.push([c,l])}return s.push(s[0].slice()),Object(o.polygon)([s],r)}function s(t,e,n,r,i,a){for(var s=[],u=0;u<6;u++){var c=[];c.push(t),c.push([t[0]+e*i[u],t[1]+n*a[u]]),c.push([t[0]+e*i[(u+1)%6],t[1]+n*a[(u+1)%6]]),c.push(t),s.push(Object(o.polygon)([c],r))}return s}e.a=function(t,e,n){void 0===n&&(n={});var u=JSON.stringify(n.properties||{}),c=t[0],l=t[1],h=t[2],f=t[3],p=(l+f)/2,d=(c+h)/2,g=2*e/Object(r.a)([c,p],[h,p],n)*(h-c),y=2*e/Object(r.a)([d,l],[d,f],n)*(f-l),v=g/2,m=2*v,_=Math.sqrt(3)/2*y,b=h-c,w=f-l,E=.75*m,x=_,O=(b-m)/(m-v/2),M=Math.floor(O),S=(M*E-v/2-b)/2-v/2+E/2,P=Math.floor((w-_)/_),C=(w-P*_)/2,T=P*_-w>_/2;T&&(C-=_/4);for(var I=[],L=[],A=0;A<6;A++){var N=2*Math.PI/6*A;I.push(Math.cos(N)),L.push(Math.sin(N))}for(var k=[],j=0;j<=M;j++)for(var R=0;R<=P;R++){var D=j%2==1;if(!(0===R&&D||0===R&&T)){var F=j*E+c-S,z=R*x+l+C;if(D&&(z-=_/2),!0===n.triangles)s([F,z],g/2,y/2,JSON.parse(u),I,L).forEach(function(t){n.mask?Object(i.a)(n.mask,t)&&k.push(t):k.push(t)});else{var B=a([F,z],g/2,y/2,JSON.parse(u),I,L);n.mask?Object(i.a)(n.mask,B)&&k.push(B):k.push(B)}}}return Object(o.featureCollection)(k)}},function(t,e,n){"use strict";e.a=function(t,e,n){void 0===n&&(n={});return Object(r.a)(t,e,e,n)};var r=n(367)},function(t,e,n){"use strict";var r=n(8),i=n(96),o=n(0);e.a=function(t,e,n){void 0===n&&(n={});for(var a=[],s=e/Object(r.a)([t[0],t[1]],[t[2],t[1]],n)*(t[2]-t[0]),u=e/Object(r.a)([t[0],t[1]],[t[0],t[3]],n)*(t[3]-t[1]),c=0,l=t[0];l<=t[2];){for(var h=0,f=t[1];f<=t[3];){var p=null,d=null;c%2==0&&h%2==0?(p=Object(o.polygon)([[[l,f],[l,f+u],[l+s,f],[l,f]]],n.properties),d=Object(o.polygon)([[[l,f+u],[l+s,f+u],[l+s,f],[l,f+u]]],n.properties)):c%2==0&&h%2==1?(p=Object(o.polygon)([[[l,f],[l+s,f+u],[l+s,f],[l,f]]],n.properties),d=Object(o.polygon)([[[l,f],[l,f+u],[l+s,f+u],[l,f]]],n.properties)):h%2==0&&c%2==1?(p=Object(o.polygon)([[[l,f],[l,f+u],[l+s,f+u],[l,f]]],n.properties),d=Object(o.polygon)([[[l,f],[l+s,f+u],[l+s,f],[l,f]]],n.properties)):h%2==1&&c%2==1&&(p=Object(o.polygon)([[[l,f],[l,f+u],[l+s,f],[l,f]]],n.properties),d=Object(o.polygon)([[[l,f+u],[l+s,f+u],[l+s,f],[l,f+u]]],n.properties)),n.mask?(Object(i.a)(n.mask,p)&&a.push(p),Object(i.a)(n.mask,d)&&a.push(d)):(a.push(p),a.push(d)),f+=u,h++}c++,l+=s}return Object(o.featureCollection)(a)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n0?(n[0]=2*(c*u+f*i+l*s-h*o)/p,n[1]=2*(l*u+f*o+h*i-c*s)/p,n[2]=2*(h*u+f*s+c*o-l*i)/p):(n[0]=2*(c*u+f*i+l*s-h*o),n[1]=2*(l*u+f*o+h*i-c*s),n[2]=2*(h*u+f*s+c*o-l*i));return a(t,e,n),t},e.getTranslation=function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},e.getScaling=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],c=e[9],l=e[10];return t[0]=Math.sqrt(n*n+r*r+i*i),t[1]=Math.sqrt(o*o+a*a+s*s),t[2]=Math.sqrt(u*u+c*c+l*l),t},e.getRotation=function(t,e){var n=e[0]+e[5]+e[10],r=0;n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(e[6]-e[9])/r,t[1]=(e[8]-e[2])/r,t[2]=(e[1]-e[4])/r):e[0]>e[5]&&e[0]>e[10]?(r=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/r,t[0]=.25*r,t[1]=(e[1]+e[4])/r,t[2]=(e[8]+e[2])/r):e[5]>e[10]?(r=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/r,t[0]=(e[1]+e[4])/r,t[1]=.25*r,t[2]=(e[6]+e[9])/r):(r=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/r,t[0]=(e[8]+e[2])/r,t[1]=(e[6]+e[9])/r,t[2]=.25*r);return t},e.fromRotationTranslationScale=function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,c=o+o,l=a+a,h=i*u,f=i*c,p=i*l,d=o*c,g=o*l,y=a*l,v=s*u,m=s*c,_=s*l,b=r[0],w=r[1],E=r[2];return t[0]=(1-(d+y))*b,t[1]=(f+_)*b,t[2]=(p-m)*b,t[3]=0,t[4]=(f-_)*w,t[5]=(1-(h+y))*w,t[6]=(g+v)*w,t[7]=0,t[8]=(p+m)*E,t[9]=(g-v)*E,t[10]=(1-(h+d))*E,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},e.fromRotationTranslationScaleOrigin=function(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],u=e[3],c=o+o,l=a+a,h=s+s,f=o*c,p=o*l,d=o*h,g=a*l,y=a*h,v=s*h,m=u*c,_=u*l,b=u*h,w=r[0],E=r[1],x=r[2],O=i[0],M=i[1],S=i[2],P=(1-(g+v))*w,C=(p+b)*w,T=(d-_)*w,I=(p-b)*E,L=(1-(f+v))*E,A=(y+m)*E,N=(d+_)*x,k=(y-m)*x,j=(1-(f+g))*x;return t[0]=P,t[1]=C,t[2]=T,t[3]=0,t[4]=I,t[5]=L,t[6]=A,t[7]=0,t[8]=N,t[9]=k,t[10]=j,t[11]=0,t[12]=n[0]+O-(P*O+I*M+N*S),t[13]=n[1]+M-(C*O+L*M+k*S),t[14]=n[2]+S-(T*O+A*M+j*S),t[15]=1,t},e.fromQuat=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,l=r*a,h=r*s,f=i*a,p=i*s,d=i*u,g=o*a,y=o*s,v=o*u;return t[0]=1-h-d,t[1]=l+v,t[2]=f-y,t[3]=0,t[4]=l-v,t[5]=1-c-d,t[6]=p+g,t[7]=0,t[8]=f+y,t[9]=p-g,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.frustum=function(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t},e.perspective=function(t,e,n,r,i){var o=1/Math.tan(e/2),a=void 0;t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,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!=i&&i!==1/0?(a=1/(r-i),t[10]=(i+r)*a,t[14]=2*i*r*a):(t[10]=-1,t[14]=-2*r);return t},e.perspectiveFromFieldOfView=function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),c=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*c*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},e.ortho=function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*c,t[15]=1,t},e.lookAt=function(t,e,n,o){var a=void 0,s=void 0,u=void 0,c=void 0,l=void 0,h=void 0,f=void 0,p=void 0,d=void 0,g=void 0,y=e[0],v=e[1],m=e[2],_=o[0],b=o[1],w=o[2],E=n[0],x=n[1],O=n[2];if(Math.abs(y-E)0&&(p=1/Math.sqrt(p),l*=p,h*=p,f*=p);var d=u*f-c*h,g=c*l-s*f,y=s*h-u*l;(p=d*d+g*g+y*y)>0&&(p=1/Math.sqrt(p),d*=p,g*=p,y*=p);return t[0]=d,t[1]=g,t[2]=y,t[3]=0,t[4]=h*y-f*g,t[5]=f*d-l*y,t[6]=l*g-h*d,t[7]=0,t[8]=l,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t},e.str=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2)+Math.pow(t[9],2)+Math.pow(t[10],2)+Math.pow(t[11],2)+Math.pow(t[12],2)+Math.pow(t[13],2)+Math.pow(t[14],2)+Math.pow(t[15],2))},e.add=function(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[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},e.subtract=s,e.multiplyScalar=function(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[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},e.multiplyScalarAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&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]},e.equals=function(t,e){var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],f=t[9],p=t[10],d=t[11],g=t[12],y=t[13],v=t[14],m=t[15],_=e[0],b=e[1],w=e[2],E=e[3],x=e[4],O=e[5],M=e[6],S=e[7],P=e[8],C=e[9],T=e[10],I=e[11],L=e[12],A=e[13],N=e[14],k=e[15];return Math.abs(n-_)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(_))&&Math.abs(i-b)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(o-w)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(a-E)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(E))&&Math.abs(s-x)<=r.EPSILON*Math.max(1,Math.abs(s),Math.abs(x))&&Math.abs(u-O)<=r.EPSILON*Math.max(1,Math.abs(u),Math.abs(O))&&Math.abs(c-M)<=r.EPSILON*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(l-S)<=r.EPSILON*Math.max(1,Math.abs(l),Math.abs(S))&&Math.abs(h-P)<=r.EPSILON*Math.max(1,Math.abs(h),Math.abs(P))&&Math.abs(f-C)<=r.EPSILON*Math.max(1,Math.abs(f),Math.abs(C))&&Math.abs(p-T)<=r.EPSILON*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(d-I)<=r.EPSILON*Math.max(1,Math.abs(d),Math.abs(I))&&Math.abs(g-L)<=r.EPSILON*Math.max(1,Math.abs(g),Math.abs(L))&&Math.abs(y-A)<=r.EPSILON*Math.max(1,Math.abs(y),Math.abs(A))&&Math.abs(v-N)<=r.EPSILON*Math.max(1,Math.abs(v),Math.abs(N))&&Math.abs(m-k)<=r.EPSILON*Math.max(1,Math.abs(m),Math.abs(k))},n.d(e,"mul",function(){return u}),n.d(e,"sub",function(){return c});var r=n(19);function i(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,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],p=e[10],d=e[11],g=e[12],y=e[13],v=e[14],m=e[15],_=n[0],b=n[1],w=n[2],E=n[3];return t[0]=_*r+b*s+w*h+E*g,t[1]=_*i+b*u+w*f+E*y,t[2]=_*o+b*c+w*p+E*v,t[3]=_*a+b*l+w*d+E*m,_=n[4],b=n[5],w=n[6],E=n[7],t[4]=_*r+b*s+w*h+E*g,t[5]=_*i+b*u+w*f+E*y,t[6]=_*o+b*c+w*p+E*v,t[7]=_*a+b*l+w*d+E*m,_=n[8],b=n[9],w=n[10],E=n[11],t[8]=_*r+b*s+w*h+E*g,t[9]=_*i+b*u+w*f+E*y,t[10]=_*o+b*c+w*p+E*v,t[11]=_*a+b*l+w*d+E*m,_=n[12],b=n[13],w=n[14],E=n[15],t[12]=_*r+b*s+w*h+E*g,t[13]=_*i+b*u+w*f+E*y,t[14]=_*o+b*c+w*p+E*v,t[15]=_*a+b*l+w*d+E*m,t}function a(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,c=o+o,l=r*s,h=r*u,f=r*c,p=i*u,d=i*c,g=o*c,y=a*s,v=a*u,m=a*c;return t[0]=1-(p+g),t[1]=h+m,t[2]=f-v,t[3]=0,t[4]=h-m,t[5]=1-(l+g),t[6]=d+y,t[7]=0,t[8]=f+v,t[9]=d-y,t[10]=1-(l+p),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function s(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[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var u=o,c=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=s,e.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},e.setAxisAngle=u,e.getAxisAngle=function(t,e){var n=2*Math.acos(e[3]),i=Math.sin(n/2);i>r.EPSILON?(t[0]=e[0]/i,t[1]=e[1]/i,t[2]=e[2]/i):(t[0]=1,t[1]=0,t[2]=0);return n},e.multiply=c,e.rotateX=function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+a*s,t[1]=i*u+o*s,t[2]=o*u-i*s,t[3]=a*u-r*s,t},e.rotateY=function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u-o*s,t[1]=i*u+a*s,t[2]=o*u+r*s,t[3]=a*u-i*s,t},e.rotateZ=function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+i*s,t[1]=i*u-r*s,t[2]=o*u+a*s,t[3]=a*u-o*s,t},e.calculateW=function(t,e){var n=e[0],r=e[1],i=e[2];return t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),t},e.slerp=l,e.random=function(t){var e=r.RANDOM(),n=r.RANDOM(),i=r.RANDOM(),o=Math.sqrt(1-e),a=Math.sqrt(e);return t[0]=o*Math.sin(2*Math.PI*n),t[1]=o*Math.cos(2*Math.PI*n),t[2]=a*Math.sin(2*Math.PI*i),t[3]=a*Math.cos(2*Math.PI*i),t},e.invert=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=o*s,t},e.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},e.fromMat3=h,e.fromEuler=function(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),s=Math.sin(n),u=Math.cos(n),c=Math.sin(r),l=Math.cos(r);return t[0]=o*u*l-a*s*c,t[1]=a*s*l+o*u*c,t[2]=a*u*c-o*s*l,t[3]=a*u*l+o*s*c,t},e.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},n.d(e,"clone",function(){return m}),n.d(e,"fromValues",function(){return _}),n.d(e,"copy",function(){return b}),n.d(e,"set",function(){return w}),n.d(e,"add",function(){return E}),n.d(e,"mul",function(){return x}),n.d(e,"scale",function(){return O}),n.d(e,"dot",function(){return M}),n.d(e,"lerp",function(){return S}),n.d(e,"length",function(){return P}),n.d(e,"len",function(){return C}),n.d(e,"squaredLength",function(){return T}),n.d(e,"sqrLen",function(){return I}),n.d(e,"normalize",function(){return L}),n.d(e,"exactEquals",function(){return A}),n.d(e,"equals",function(){return N}),n.d(e,"rotationTo",function(){return k}),n.d(e,"sqlerp",function(){return j}),n.d(e,"setAxes",function(){return R});var r=n(19),i=n(184),o=n(187),a=n(188);function s(){var t=new r.ARRAY_TYPE(4);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function u(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function c(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],c=n[2],l=n[3];return t[0]=r*l+a*s+i*c-o*u,t[1]=i*l+a*u+o*s-r*c,t[2]=o*l+a*c+r*u-i*s,t[3]=a*l-r*s-i*u-o*c,t}function l(t,e,n,i){var o=e[0],a=e[1],s=e[2],u=e[3],c=n[0],l=n[1],h=n[2],f=n[3],p=void 0,d=void 0,g=void 0,y=void 0,v=void 0;return(d=o*c+a*l+s*h+u*f)<0&&(d=-d,c=-c,l=-l,h=-h,f=-f),1-d>r.EPSILON?(p=Math.acos(d),g=Math.sin(p),y=Math.sin((1-i)*p)/g,v=Math.sin(i*p)/g):(y=1-i,v=i),t[0]=y*o+v*c,t[1]=y*a+v*l,t[2]=y*s+v*h,t[3]=y*u+v*f,t}function h(t,e){var n=e[0]+e[4]+e[8],r=void 0;if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;r=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*a+a]+1),t[i]=.5*r,r=.5/r,t[3]=(e[3*o+a]-e[3*a+o])*r,t[o]=(e[3*o+i]+e[3*i+o])*r,t[a]=(e[3*a+i]+e[3*i+a])*r}return t}var f,p,d,g,y,v,m=a.clone,_=a.fromValues,b=a.copy,w=a.set,E=a.add,x=c,O=a.scale,M=a.dot,S=a.lerp,P=a.length,C=P,T=a.squaredLength,I=T,L=a.normalize,A=a.exactEquals,N=a.equals,k=(f=o.create(),p=o.fromValues(1,0,0),d=o.fromValues(0,1,0),function(t,e,n){var r=o.dot(e,n);return r<-.999999?(o.cross(f,p,e),o.len(f)<1e-6&&o.cross(f,d,e),o.normalize(f,f),u(t,f,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(o.cross(f,e,n),t[0]=f[0],t[1]=f[1],t[2]=f[2],t[3]=1+r,L(t,t))}),j=(g=s(),y=s(),function(t,e,n,r,i,o){return l(g,e,i,o),l(y,n,r,o),l(t,g,y,2*o*(1-o)),t}),R=(v=i.create(),function(t,e,n,r){return v[0]=n[0],v[3]=n[1],v[6]=n[2],v[1]=r[0],v[4]=r[1],v[7]=r[2],v[2]=-e[0],v[5]=-e[1],v[8]=-e[2],L(t,h(t,v))})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=i,e.clone=function(t){var e=new r.ARRAY_TYPE(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},e.length=o,e.fromValues=a,e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.set=function(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t},e.subtract=s,e.multiply=u,e.divide=c,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t},e.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t},e.distance=l,e.squaredDistance=h,e.squaredLength=f,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},e.normalize=p,e.dot=d,e.cross=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t},e.lerp=function(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t},e.hermite=function(t,e,n,r,i,o){var a=o*o,s=a*(2*o-3)+1,u=a*(o-2)+o,c=a*(o-1),l=a*(3-2*o);return t[0]=e[0]*s+n[0]*u+r[0]*c+i[0]*l,t[1]=e[1]*s+n[1]*u+r[1]*c+i[1]*l,t[2]=e[2]*s+n[2]*u+r[2]*c+i[2]*l,t},e.bezier=function(t,e,n,r,i,o){var a=1-o,s=a*a,u=o*o,c=s*a,l=3*o*s,h=3*u*a,f=u*o;return t[0]=e[0]*c+n[0]*l+r[0]*h+i[0]*f,t[1]=e[1]*c+n[1]*l+r[1]*h+i[1]*f,t[2]=e[2]*c+n[2]*l+r[2]*h+i[2]*f,t},e.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI,i=2*r.RANDOM()-1,o=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=i*e,t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t},e.transformMat3=function(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t},e.transformQuat=function(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=e[0],u=e[1],c=e[2],l=i*c-o*u,h=o*s-r*c,f=r*u-i*s,p=i*f-o*h,d=o*l-r*f,g=r*h-i*l,y=2*a;return l*=y,h*=y,f*=y,p*=2,d*=2,g*=2,t[0]=s+l+p,t[1]=u+h+d,t[2]=c+f+g,t},e.rotateX=function(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},e.rotateY=function(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},e.rotateZ=function(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},e.angle=function(t,e){var n=a(t[0],t[1],t[2]),r=a(e[0],e[1],e[2]);p(n,n),p(r,r);var i=d(n,r);return i>1?0:i<-1?Math.PI:Math.acos(i)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],i=t[1],o=t[2],a=e[0],s=e[1],u=e[2];return Math.abs(n-a)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-s)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-u)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(u))},n.d(e,"sub",function(){return y}),n.d(e,"mul",function(){return v}),n.d(e,"div",function(){return m}),n.d(e,"dist",function(){return _}),n.d(e,"sqrDist",function(){return b}),n.d(e,"len",function(){return w}),n.d(e,"sqrLen",function(){return E}),n.d(e,"forEach",function(){return x});var r=n(19);function i(){var t=new r.ARRAY_TYPE(3);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function o(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function a(t,e,n){var i=new r.ARRAY_TYPE(3);return i[0]=t,i[1]=e,i[2]=n,i}function s(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function u(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],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}function l(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function h(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function f(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function p(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;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 d(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}var g,y=s,v=u,m=c,_=l,b=h,w=o,E=f,x=(g=i(),function(t,e,n,r,i,o){var a=void 0,s=void 0;for(e||(e=3),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,a=n;a0&&(a=1/Math.sqrt(a),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a);return t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},e.lerp=function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=s+r*(n[3]-s),t},e.random=function(t,e){var n,i,o,a,s,u;e=e||1;do{n=2*r.RANDOM()-1,i=2*r.RANDOM()-1,s=n*n+i*i}while(s>=1);do{o=2*r.RANDOM()-1,a=2*r.RANDOM()-1,u=o*o+a*a}while(u>=1);var c=Math.sqrt((1-s)/u);return t[0]=e*n,t[1]=e*i,t[2]=e*o*c,t[3]=e*a*c,t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t},e.transformQuat=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],c=n[3],l=c*r+s*o-u*i,h=c*i+u*r-a*o,f=c*o+a*i-s*r,p=-a*r-s*i-u*o;return t[0]=l*c+p*-a+h*-u-f*-s,t[1]=h*c+p*-s+f*-a-l*-u,t[2]=f*c+p*-u+l*-s-h*-a,t[3]=e[3],t},e.str=function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},e.equals=function(t,e){var n=t[0],i=t[1],o=t[2],a=t[3],s=e[0],u=e[1],c=e[2],l=e[3];return Math.abs(n-s)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-u)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-c)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(a-l)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(l))},n.d(e,"sub",function(){return p}),n.d(e,"mul",function(){return d}),n.d(e,"div",function(){return g}),n.d(e,"dist",function(){return y}),n.d(e,"sqrDist",function(){return v}),n.d(e,"len",function(){return m}),n.d(e,"sqrLen",function(){return _}),n.d(e,"forEach",function(){return b});var r=n(19);function i(){var t=new r.ARRAY_TYPE(4);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function o(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 a(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 s(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){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+r*r+i*i+o*o)}function c(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+r*r+i*i+o*o}function l(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.sqrt(e*e+n*n+r*r+i*i)}function h(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}var f,p=o,d=a,g=s,y=u,v=c,m=l,_=h,b=(f=i(),function(t,e,n,r,i,o){var a=void 0,s=void 0;for(e||(e=4),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,a=n;a0?Math.floor(t):Math.ceil(t)};function s(t,e,n){return t instanceof o?t:(0,i.isArray)(t)?new o(t[0],t[1]):void 0===t||null===t?t:"object"===(void 0===t?"undefined":r(t))&&"x"in t&&"y"in t?new o(t.x,t.y):new o(t,e,n)}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(t){return this.clone()._add(s(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(s(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new o(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new o(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=a(this.x),this.y=a(this.y),this},distanceTo:function(t){var e=(t=s(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=s(t)).x===this.x&&t.y===this.y},contains:function(t){return t=s(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+(0,i.formatNum)(this.x)+", "+(0,i.formatNum)(this.y)+")"}}},function(t,e,n){"use strict";var r,i,o;function a(t,e,n,r){return s(t).then(e,n,r)}function s(t){var e,n,r;return t instanceof u?e=t:h(t)?(n=l(),t.then(function(t){n.resolve(t)},function(t){n.reject(t)},function(t){n.progress(t)}),e=n.promise):(r=t,e=new u(function(t){try{return s(t?t(r):r)}catch(t){return c(t)}})),e}function u(t){this.then=t}function c(t){return new u(function(e,n){try{return n?s(n(t)):c(t)}catch(t){return c(t)}})}function l(){var t,e,n,r,i,a;return t=new u(h),e=[],n=[],r=function(t,r,i){var o,a;return o=l(),a="function"==typeof i?function(t){try{o.progress(i(t))}catch(t){o.progress(t)}}:function(t){o.progress(t)},e.push(function(e){e.then(t,r).then(o.resolve,o.reject,a)}),n.push(a),o.promise},i=function(t){return g(n,t),t},a=function(t){return t=s(t),r=t.then,a=s,i=v,g(e,t),n=e=o,t},{then:h,resolve:f,reject:p,progress:d,promise:t,resolver:{resolve:f,reject:p,progress:d}};function h(t,e,n){return r(t,e,n)}function f(t){return a(t)}function p(t){return a(c(t))}function d(t){return i(t)}}function h(t){return t&&"function"==typeof t.then}function f(t,e,n,r,i){return y(2,arguments),a(t,function(t){var o,s,u,c,h,f,p,d,g,y;if(g=t.length>>>0,o=Math.max(0,Math.min(e,g)),u=[],s=g-o+1,c=[],h=l(),o)for(d=h.progress,p=function(t){c.push(t),--s||(f=p=v,h.reject(c))},f=function(t){u.push(t),--o||(f=p=v,h.resolve(u))},y=0;y>>0,n=[],u=l(),i)for(o=function(t,r){a(t,e).then(function(t){n[r]=t,--i||u.resolve(n)},u.reject)},s=0;st;)if(null!=(n=e[--r])&&"function"!=typeof n)throw new Error("arg "+r+" must be a function")}function v(){}function m(t){return t}Object.defineProperty(e,"__esModule",{value:!0}),a.defer=l,a.resolve=s,a.reject=function(t){return a(t,c)},a.join=function(){return d(arguments,m)},a.all=p,a.map=d,a.reduce=function(t,e){var n=i.call(arguments,1);return a(t,function(t){var i;return i=t.length,n[0]=function(t,n,r){return a(t,function(t){return a(n,function(n){return e(t,n,r,i)})})},r.apply(t,n)})},a.any=function(t,e,n,r){return f(t,1,function(t){return e?e(t[0]):t[0]},n,r)},a.some=f,a.chain=function(t,e,n){var r=arguments.length>2;return a(t,function(t){return t=r?n:t,e.resolve(t),t},function(t){return e.reject(t),c(t)},e.progress)},a.isPromise=h,u.prototype={always:function(t,e){return this.then(t,t,e)},otherwise:function(t){return this.then(o,t)},yield:function(t){return this.then(function(){return t})},spread:function(t){return this.then(function(e){return p(e,function(e){return t.apply(o,e)})})}},i=[].slice,r=[].reduce||function(t){var e,n,r,i,o;if(o=0,i=(e=Object(this)).length>>>0,(n=arguments).length<=1)for(;;){if(o in e){r=e[o++];break}if(++o>=i)throw new TypeError}else r=n[1];for(;o>>0,o=Math.max(0,Math.min(e,g)),u=[],s=g-o+1,c=[],h=l(),o)for(d=h.progress,p=function(t){c.push(t),--s||(f=p=v,h.reject(c))},f=function(t){u.push(t),--o||(f=p=v,h.resolve(u))},y=0;y>>0,n=[],u=l(),i)for(o=function(t,r){a(t,e).then(function(t){n[r]=t,--i||u.resolve(n)},u.reject)},s=0;st;)if(null!=(n=e[--r])&&"function"!=typeof n)throw new Error("arg "+r+" must be a function")}function v(){}function m(t){return t}Object.defineProperty(e,"__esModule",{value:!0}),a.defer=l,a.resolve=s,a.reject=function(t){return a(t,c)},a.join=function(){return d(arguments,m)},a.all=p,a.map=d,a.reduce=function(t,e){var n=i.call(arguments,1);return a(t,function(t){var i;return i=t.length,n[0]=function(t,n,r){return a(t,function(t){return a(n,function(n){return e(t,n,r,i)})})},r.apply(t,n)})},a.any=function(t,e,n,r){return f(t,1,function(t){return e?e(t[0]):t[0]},n,r)},a.some=f,a.chain=function(t,e,n){var r=arguments.length>2;return a(t,function(t){return t=r?n:t,e.resolve(t),t},function(t){return e.reject(t),c(t)},e.progress)},a.isPromise=h,u.prototype={always:function(t,e){return this.then(t,t,e)},otherwise:function(t){return this.then(o,t)},yield:function(t){return this.then(function(){return t})},spread:function(t){return this.then(function(e){return p(e,function(e){return t.apply(o,e)})})}},i=[].slice,r=[].reduce||function(t){var e,n,r,i,o;if(o=0,i=(e=Object(this)).length>>>0,(n=arguments).length<=1)for(;;){if(o in e){r=e[o++];break}if(++o>=i)throw new TypeError}else r=n[1];for(;o0){for(a.sort(s),t=0;t73.66&&t<135.05&&e>3.86&&e<53.55)}}]),t}();e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n3?r-3:0),a=3;a0&&o.map(function(t){!function(t,e,n,r,i){var o=e[n];if(o)if(r){if(i===t&&(i=null),o)for(var a=0;a1?e-1:0),r=1;r0&&a.map(function(e){!function(t,e,n,r,i){var o=e[n];o||(o=[],e[n]=o),i===t&&(i=null);var a={fn:r,ctx:i};if(o){var s=!0,u=!1,c=void 0;try{for(var l,h=o[Symbol.iterator]();!(s=(l=h.next()).done);s=!0){var f=l.value,p=f.fn,d=f.ctx;if(r===p&&i===d)return}}catch(t){u=!0,c=t}finally{try{!s&&h.return&&h.return()}finally{if(u)throw c}}}o.push(a)}(o,t,e,n,r)}),this}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSDrawSimpleShape=void 0;var r=n(105),i=n(30),o=window.L;e.JSDrawSimpleShape=r.JSDrawFeature.extend({options:{repeatMode:!1},initialize:function(t,e){r.JSDrawFeature.prototype.initialize.call(this,t,e)},addHooks:function(){r.JSDrawFeature.prototype.addHooks.call(this),this._map&&(this._container.style.cursor="crosshair",this._mouseMarker||(this._mouseMarker=o.marker(this._map.getCenter(),{icon:o.divIcon({className:"jsmap2d-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on(i.JSMapEvents.CLICK,this._onMouseDown,this).on(i.JSMapEvents.MOUSEMOVE,this._onMouseMove,this).on(i.JSMapEvents.CONTEXTMENU,this._onRightMouseDown,this).addTo(this._map),this._map.on(i.JSMapEvents.MOUSEMOVE,this._onMouseMove,this).on(i.JSMapEvents.TOUCHMOVE,this._onMouseMove,this).on(i.JSMapEvents.CONTEXTMENU,this._onRightMouseDown,this),document.addEventListener(i.JSMapEvents.TOUCHSTART,o.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){r.JSDrawFeature.prototype.removeHooks.call(this),this._map&&(this._container.style.cursor="",this._map.off(i.JSMapEvents.MOUSEMOVE,this._onMouseMove,this).off(i.JSMapEvents.TOUCHMOVE,this._onMouseMove,this).off(i.JSMapEvents.CONTEXTMENU,this._onRightMouseDown,this),this._mouseMarker.off(i.JSMapEvents.MOUSEMOVE,this._onMouseMove,this).off(i.JSMapEvents.CLICK,this._onMouseDown,this).off(i.JSMapEvents.CONTEXTMENU,this._onRightMouseDown,this),this._map.removeLayer(this._mouseMarker),document.removeEventListener(i.JSMapEvents.TOUCHSTART,o.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),this._map.removeLayer(this._firstPointNode),this._map.removeLayer(this._lastPointNode),delete this._lastPointNode,delete this._firstPointNode,delete this._shape)),this._isDrawing=!1},finishDrawing:function(){this._shape&&(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_onRightMouseDown:function(){this.finishDrawing()},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),n=this._map.layerPointToLatLng(e);this._mouseMarker.setLatLng(n),this._isDrawing&&this._drawShape(n)},_onMouseDown:function(t){if(this._isDrawing=!0,!this._startLatLng){var e=this._map.mouseEventToLayerPoint(t.originalEvent),n=this._map.layerPointToLatLng(e);this._startLatLng=n,this._mouseMarker.setLatLng(n)}}})},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII="},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSDrawPolyline=void 0;var r,i=n(105),o=n(30),a=n(31),s=n(20),u=(r=s)&&r.__esModule?r:{default:r};var c=window.L,l=e.JSDrawPolyline=i.JSDrawFeature.extend({statics:{TYPE:"polyline"},Poly:c.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new c.DivIcon({iconSize:new c.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new c.DivIcon({iconSize:new c.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#F00",weight:2,opacity:.5,fill:!1,clickable:!0},markerOptions:{radius:1,color:"#0FF"}},initialize:function(t,e){c.Browser.touch&&(this.options.icon=this.options.touchIcon),e&&e.drawError&&(e.drawError=c.Util.extend({},this.options.drawError,e.drawError)),this.type=l.TYPE,i.JSDrawFeature.prototype.initialize.call(this,t,e)},addHooks:function(){i.JSDrawFeature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new c.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new c.Polyline([],this.options.shapeOptions),this._mouseMarker||(this._mouseMarker=c.marker(this._map.getCenter(),{icon:c.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on(o.JSMapEvents.MOUSEMOVE,this._onMouseMove,this).on(o.JSMapEvents.CLICK,this._onMouseDown,this).on(o.JSMapEvents.CONTEXTMENU,this.completeShape,this).addTo(this._map),this._map.on(o.JSMapEvents.CONTEXTMENU,this.completeShape,this).on(o.JSMapEvents.MOUSEMOVE,this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){i.JSDrawFeature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off(o.JSMapEvents.MOUSEMOVE,this._onMouseMove,this).off(o.JSMapEvents.CLICK,this._onMouseDown,this).off(o.JSMapEvents.CONTEXTMENU,this.completeShape,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off(o.JSMapEvents.CONTEXTMENU,this.completeShape,this).off(o.JSMapEvents.MOUSEMOVE,this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,n=e.getLatLngs(),r=n.splice(-1,1)[0];this._poly.setLatLngs(n),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(r,!1)}},addVertex:function(t){this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),this._vertexChanged(t,!0)},completeShape:function(t){this._onMouseDown(t),this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},finishDrawing:function(){this._shapeIsValid()&&this._fireCreatedEvent(),this.disable()},_shapeIsValid:function(){var t=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs();return t.length>2||2==t.length&&!t[0].equals(t[1])},_onZoomEnd:function(){null!==this._markers&&this._updateGuide()},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),n=this._map.layerPointToLatLng(e);this._currentLatLng=n,this._updateGuide(e),this._mouseMarker.setLatLng(n),c.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(){this._map.fire(a.JSDrawEvent.DRAWVERTEX,{layers:this._markerGroup}),this._clearGuides()},_onMouseDown:function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,n=e.clientX,r=e.clientY;this._touchHandled=!0,this._startPoint.call(this,n,r),this._endPoint.call(this,n,r,t),this._touchHandled=null}this._clickHandled=null},_startPoint:function(t,e){this._mouseDownOrigin=c.point(t,e)},_onMouseUp:function(t){var e=t.originalEvent,n=e.clientX,r=e.clientY;this._endPoint.call(this,n,r,t),this._clickHandled=null},_endPoint:function(t,e,n){this._mouseDownOrigin&&(this.addVertex(n.latlng),this._enableNewMarkers()),this._mouseDownOrigin=null},_createMarker:function(t){var e=new c.CircleMarker(t,this.options.markerOptions);return this._markerGroup.addLayer(e),e},_updateGuide:function(t){var e=this._markers?this._markers.length:0;e>0&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},_drawGuide:function(t,e){var n=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),r=this.options.guidelineDistance,i=this.options.maxGuideLineLength,o=n>i?n-i:r,a=void 0,s=void 0,u=void 0;for(this._guidesContainer||(this._guidesContainer=c.DomUtil.create("div","jsmap2d-draw-guides",this._overlayPane));o1?new u.default(t):null}})},function(t,e,n){t.exports=n(205)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(206),n(207),n(208),n(209);var r=M(n(210)),i=M(n(7)),o=n(4),a=M(n(459)),s=M(n(460)),u=M(n(51)),c=M(n(65)),l=M(n(64)),h=M(n(98)),f=M(n(99)),p=M(n(100)),d=M(n(463)),g=M(n(67)),y=M(n(5)),v=M(n(20)),m=M(n(18)),_=M(n(32)),b=M(n(38)),w=M(n(196)),E=M(n(469)),x=M(n(470)),O=M(n(68));function M(t){return t&&t.__esModule?t:{default:t}}var S={JSMap:i.default,JSZoomControl:a.default,JSFloorControl:s.default,JSBaseLayerControl:w.default,JSIconTextMarker:p.default,JSImageMarker:u.default,JSDomMarker:f.default,JSPointMarker:h.default,JSLineMarker:c.default,JSPolygonMarker:l.default,JSCircleMarker:g.default,JSRectangleMarker:O.default,JSDrawTool:d.default,JSEditTool:x.default,JSImageryProviderType:o.JSImageryProviderType,JSControlPosition:o.JSControlPosition,JSMarkerType:o.JSMarkerType,JSIconTextType:o.JSIconTextType,JSDrawMode:o.JSDrawMode,JSLineType:o.JSLineType,JSPoint:y.default,JSLine:v.default,JSPolygon:m.default,JSCircle:_.default,JSRectangle:b.default,JSMapCoordTool:E.default};window.jsmaplight=S,window.L=r.default,e.default=S},function(t,e){},function(t,e){},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(55);var o,a,s,u,c=Object.prototype.hasOwnProperty,l=Object.getOwnPropertyNames?Object.getOwnPropertyNames:function(t){var e=[];for(var n in t)c.call(t,n)&&e.push(n);return e},h=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertySymbols,p=Object.propertyIsEnumerable;if(Object.getPrototypeOf||(Object.getPrototypeOf="object"===r("".__proto__)?function(t){return t.__proto__}:function(t){return t.constructor.prototype}),!Object.keys){var d=!p.call({toString:null},"toString"),g=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];Object.keys=function(t){if(!(0,i.isObject)(t)&&!(0,i.isFunction)(t))throw new TypeError("Cannot convert undefined or null to object");var e=l(t);return d&&e.push.apply(e,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e1?e-1:0),r=1;r1?e-1:0),r=1;r2?n-2:0),i=2;i=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=R(t);var e=this.min,n=this.max,r=t.min,i=t.max,o=i.x>=e.x&&r.x<=n.x,a=i.y>=e.y&&r.y<=n.y;return o&&a},overlaps:function(t){t=R(t);var e=this.min,n=this.max,r=t.min,i=t.max,o=i.x>e.x&&r.xe.y&&r.y=r.lat&&n.lat<=i.lat&&e.lng>=r.lng&&n.lng<=i.lng},intersects:function(t){t=F(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),i=t.getNorthEast(),o=i.lat>=e.lat&&r.lat<=n.lat,a=i.lng>=e.lng&&r.lng<=n.lng;return o&&a},overlaps:function(t){t=F(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),i=t.getNorthEast(),o=i.lat>e.lat&&r.late.lng&&r.lng';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function At(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var Nt={ie:tt,ielt9:et,edge:nt,webkit:rt,android:it,android23:ot,androidStock:st,opera:ut,chrome:ct,gecko:lt,safari:ht,phantom:ft,opera12:pt,win:dt,ie3d:gt,webkit3d:yt,gecko3d:vt,any3d:mt,mobile:_t,mobileWebkit:bt,mobileWebkit3d:wt,msPointer:Et,pointer:xt,touch:Ot,mobileOpera:Mt,mobileGecko:St,retina:Pt,passiveEvents:Ct,canvas:Tt,svg:It,vml:Lt},kt=Et?"MSPointerDown":"pointerdown",jt=Et?"MSPointerMove":"pointermove",Rt=Et?"MSPointerUp":"pointerup",Dt=Et?"MSPointerCancel":"pointercancel",Ft={},zt=!1;function Bt(t,e,n,r){function o(t){Vt(t,s)}var a,s,u,c,l,h,f,p;function d(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Vt(t,c)}return"touchstart"===e?(l=t,h=n,f=r,p=i(function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&De(t),Vt(t,h)}),l["_leaflet_touchstart"+f]=p,l.addEventListener(kt,p,!1),zt||(document.addEventListener(kt,qt,!0),document.addEventListener(jt,Gt,!0),document.addEventListener(Rt,Ut,!0),document.addEventListener(Dt,Ut,!0),zt=!0)):"touchmove"===e?(c=n,(u=t)["_leaflet_touchmove"+r]=d,u.addEventListener(jt,d,!1)):"touchend"===e&&(s=n,(a=t)["_leaflet_touchend"+r]=o,a.addEventListener(Rt,o,!1),a.addEventListener(Dt,o,!1)),this}function qt(t){Ft[t.pointerId]=t}function Gt(t){Ft[t.pointerId]&&(Ft[t.pointerId]=t)}function Ut(t){delete Ft[t.pointerId]}function Vt(t,e){for(var n in t.touches=[],Ft)t.touches.push(Ft[n]);t.changedTouches=[t],e(t)}var Jt,Ht,Yt,Xt,Zt,Wt,Kt=Et?"MSPointerDown":xt?"pointerdown":"touchstart",Qt=Et?"MSPointerUp":xt?"pointerup":"touchend",$t="_leaflet_",te=ye(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ee=ye(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ne="webkitTransition"===ee||"OTransition"===ee?ee+"End":"transitionend";function re(t){return"string"==typeof t?document.getElementById(t):t}function ie(t,e){var n,r=t.style[e]||t.currentStyle&&t.currentStyle[e];return r&&"auto"!==r||!document.defaultView||(r=(n=document.defaultView.getComputedStyle(t,null))?n[e]:null),"auto"===r?null:r}function oe(t,e,n){var r=document.createElement(t);return r.className=e||"",n&&n.appendChild(r),r}function ae(t){var e=t.parentNode;e&&e.removeChild(t)}function se(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ue(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ce(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function le(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=de(t);return 0this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),r=this._limitCenter(n,this._zoom,F(t));return n.equals(r)||this.panTo(r,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n,r,i=k((e=e||{}).paddingTopLeft||e.padding||[0,0]),o=k(e.paddingBottomRight||e.padding||[0,0]),a=this.getCenter(),s=this.project(a),u=this.project(t),c=this.getPixelBounds(),l=c.getSize().divideBy(2),h=R([c.min.add(i),c.max.subtract(o)]);return h.contains(u)||(this._enforcingBounds=!0,n=s.subtract(u),r=k(u.x+n.x,u.y+n.y),(u.xh.max.x)&&(r.x=s.x-n.x,0h.max.y)&&(r.y=s.y-n.y,0=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,r=[],i="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,s=!1;o;){if((n=this._targets[a(o)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(i&&!Je(o,t))break;if(r.push(n),i)break}if(o===this._container)break;o=o.parentNode}return r.length||s||i||!Je(o,t)||(r=[this]),r},_handleDOMEvent:function(t){var e;this._loaded&&!Ve(t)&&("mousedown"!==(e=t.type)&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Ee(t.target||t.srcElement),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,r){var i;if("click"===t.type&&((i=e({},t)).type="preclick",this._fireDOMEvent(i,i.type,r)),!t._stopped&&(r=(r||[]).concat(this._findEventTargets(t,n))).length){var o=r[0];"contextmenu"===n&&o.listens(n,!0)&&De(t);var a,s={originalEvent:t};"keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(a=o.getLatLng&&(!o._radius||o._radius<=10),s.containerPoint=a?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=a?o.getLatLng():this.layerPointToLatLng(s.layerPoint));for(var u=0;uthis.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(e),i=this._getCenterOffset(t)._divideBy(1-1/r);return!(!0!==n.animate&&!this.getSize().contains(i)||(M(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,n,r){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,he(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:r}),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&fe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),M(function(){this._moveEnd(!0)},this))}});function Ze(t){return new We(t)}var We=C.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),r=t._controlCorners[n];return he(e,"leaflet-control"),-1!==n.indexOf("bottom")?r.insertBefore(e,r.firstChild):r.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(ae(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",r=document.createElement("div");return r.innerHTML=n,r.firstChild},_addItem:function(t){var e,n=document.createElement("label"),r=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=r):e=this._createRadioElement("leaflet-base-layers_"+a(this),r),this._layerControlInputs.push(e),e.layerId=a(t.layer),Pe(e,"click",this._onInputClick,this);var i=document.createElement("span");i.innerHTML=" "+t.name;var o=document.createElement("div");return n.appendChild(o),o.appendChild(e),o.appendChild(i),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,r=[],i=[];this._handlingClick=!0;for(var o=n.length-1;0<=o;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.checked?r.push(e):t.checked||i.push(e);for(o=0;oe.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Qe=We.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=oe("div",e+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,r,i){var o=oe("a",n,r);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),Re(o),Pe(o,"click",Fe),Pe(o,"click",i,this),Pe(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";fe(this._zoomInButton,e),fe(this._zoomOutButton,e),!this._disabled&&t._zoom!==t.getMinZoom()||he(this._zoomOutButton,e),!this._disabled&&t._zoom!==t.getMaxZoom()||he(this._zoomInButton,e)}});Xe.mergeOptions({zoomControl:!0}),Xe.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Qe,this.addControl(this.zoomControl))});var $e=We.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=oe("div",e),r=this.options;return this._addScales(r,e+"-line",n),t.on(r.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=oe("div",e,n)),t.imperial&&(this._iScale=oe("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,r,i=3.2808399*t;5280Leaflet'},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=oe("div","leaflet-control-attribution"),Re(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});Xe.mergeOptions({attributionControl:!0}),Xe.addInitHook(function(){this.options.attributionControl&&(new tn).addTo(this)}),We.Layers=Ke,We.Zoom=Qe,We.Scale=$e,We.Attribution=tn,Ze.layers=function(t,e,n){return new Ke(t,e,n)},Ze.zoom=function(t){return new Qe(t)},Ze.scale=function(t){return new $e(t)},Ze.attribution=function(t){return new tn(t)};var en=C.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});en.addTo=function(t,e){return t.addHandler(e,this),this};var nn,rn={Events:T},on=Ot?"touchstart mousedown":"mousedown",an={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},sn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},un=I.extend({options:{clickTolerance:3},initialize:function(t,e,n,r){p(this,r),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Pe(this._dragStartTarget,on,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(un._dragging===this&&this.finishDrag(),Te(this._dragStartTarget,on,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,n;!t._simulated&&this._enabled&&(this._moved=!1,le(this._element,"leaflet-zoom-anim")||un._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((un._dragging=this)._preventOutline&&Ee(this._element),be(),Yt(),this._moving||(this.fire("down"),e=t.touches?t.touches[0]:t,n=Oe(this._element),this._startPoint=new A(e.clientX,e.clientY),this._parentScale=Me(n),Pe(document,sn[t.type],this._onMove,this),Pe(document,an[t.type],this._onUp,this))))},_onMove:function(t){var e,n;!t._simulated&&this._enabled&&(t.touches&&1e&&(n.push(t[r]),i=r);return ie.max.x&&(n|=2),t.ye.max.y&&(n|=8),n}function dn(t,e,n,r){var i,o=e.x,a=e.y,s=n.x-o,u=n.y-a,c=s*s+u*u;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x&&(c=!c);return c||Dn.prototype._containsPoint.call(this,t,!0)}}),zn=Tn.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,r,i=v(t)?t:t.features;if(i){for(e=0,n=i.length;ec.x&&(l=o.x+r-c.x+u.x),o.x-l-s.x<0&&(l=o.x-s.x),o.y+n+u.y>c.y&&(h=o.y+n-c.y+u.y),o.y-h-s.y<0&&(h=o.y-s.y),(l||h)&&t.fire("autopanstart").panBy([l,h]))},_onCloseButtonClick:function(t){this._close(),Fe(t)},_getAnchor:function(){return k(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Xe.mergeOptions({closePopupOnClick:!0}),Xe.include({openPopup:function(t,e,n){return t instanceof er||(t=new er(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Pn.include({bindPopup:function(t,e){return t instanceof er?(p(t,e),(this._popup=t)._source=this):(this._popup&&!e||(this._popup=new er(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Fe(t),e instanceof kn?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var nr=tr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){tr.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){tr.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=tr.prototype.getEvents.call(this);return Ot&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=oe("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n=this._map,r=this._container,i=n.latLngToContainerPoint(n.getCenter()),o=n.layerPointToContainerPoint(t),a=this.options.direction,s=r.offsetWidth,u=r.offsetHeight,c=k(this.options.offset),l=this._getAnchor(),h="top"===a?(e=s/2,u):"bottom"===a?(e=s/2,0):(e="center"===a?s/2:"right"===a?0:"left"===a?s:o.xthis.options.maxZoom||rthis.options.maxZoom||void 0!==this.options.minZoom&&in.max.x)||!e.wrapLat&&(t.yn.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(t);return F(this.options.bounds).overlaps(r)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),r=t.scaleBy(n),i=r.add(n);return[e.unproject(r,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new D(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new A(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ae(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){he(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=c,t.onmousemove=c,et&&this.options.opacity<1&&ge(t,this.options.opacity),it&&!ot&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),r=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),i(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(i(this._tileReady,this,t,null,o)),me(o,n),this._tiles[r]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var r=this._tileCoordsToKey(t);(n=this._tiles[r])&&(n.loaded=+new Date,this._map._fadeAnimated?(ge(n.el,0),S(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(he(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new A(this._wrapX?u(t.x,this._wrapX):t.x,this._wrapY?u(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new j(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),or=ir.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Pt&&0')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),fr={_initContainer:function(){this._container=oe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ur.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=hr("shape");he(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=hr("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ae(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,r=t.options,i=t._container;i.stroked=!!r.stroke,i.filled=!!r.fill,r.stroke?(e=e||(t._stroke=hr("stroke")),i.appendChild(e),e.weight=r.weight+"px",e.color=r.color,e.opacity=r.opacity,r.dashArray?e.dashStyle=v(r.dashArray)?r.dashArray.join(" "):r.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=r.lineCap.replace("butt","flat"),e.joinstyle=r.lineJoin):e&&(i.removeChild(e),t._stroke=null),r.fill?(n=n||(t._fill=hr("fill")),i.appendChild(n),n.color=r.fillColor||r.color,n.opacity=r.fillOpacity):n&&(i.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),r=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+r+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ue(t._container)},_bringToBack:function(t){ce(t._container)}},pr=Lt?hr:K,dr=ur.extend({getEvents:function(){var t=ur.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=pr("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=pr("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ae(this._container),Te(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){var t,e,n;this._map._animatingZoom&&this._bounds||(ur.prototype._update.call(this),e=(t=this._bounds).getSize(),n=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),me(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=pr("path");t.options.className&&he(e,t.options.className),t.options.interactive&&he(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ae(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Q(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),r="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",i=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+r+2*n+",0 "+r+2*-n+",0 ";this._setPath(t,i)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ue(t._path)},_bringToBack:function(t){ce(t._path)}});function gr(t){return It||Lt?new dr(t):null}Lt&&dr.include(fr),Xe.include({getRenderer:function(t){var e=(e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&lr(t)||gr(t)}});var yr=Fn.extend({initialize:function(t,e){Fn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=F(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});dr.create=pr,dr.pointsToPath=Q,zn.geometryToLayer=Bn,zn.coordsToLatLng=Gn,zn.coordsToLatLngs=Un,zn.latLngToCoords=Vn,zn.latLngsToCoords=Jn,zn.getFeature=Hn,zn.asFeature=Yn,Xe.mergeOptions({boxZoom:!0});var vr=en.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Pe(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Te(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ae(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Yt(),be(),this._startPoint=this._map.mouseEventToContainerPoint(t),Pe(document,{contextmenu:Fe,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=oe("div","leaflet-zoom-box",this._container),he(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new j(this._point,this._startPoint),n=e.getSize();me(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ae(this._box),fe(this._container,"leaflet-crosshair")),Xt(),we(),Te(document,{contextmenu:Fe,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){var e;1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0),e=new D(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})))},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Xe.addInitHook("addHandler","boxZoom",vr),Xe.mergeOptions({doubleClickZoom:!0});var mr=en.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),r=e.options.zoomDelta,i=t.originalEvent.shiftKey?n-r:n+r;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}});Xe.addInitHook("addHandler","doubleClickZoom",mr),Xe.mergeOptions({dragging:!0,inertia:!ot,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var _r=en.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new un(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),he(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){fe(this._map._container,"leaflet-grab"),fe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=F(this._map.options.maxBounds),this._offsetLimit=R(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,n;this._map.options.inertia&&(e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(n),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,i=(r-e+n)%t+e-n,o=(r+e+n)%t-e-n,a=Math.abs(i+n)e.getMaxZoom()&&11&&void 0!==arguments[1]?arguments[1]:0;r._map.focusFloorId=t.floorId;var o=10;e&&(0,b.isNumber)(e.range)&&(o=e.range);var a=n.x,s=n.y;r._map._map.fitBounds(O.latLng(s,a).toBounds(o),{zoom:{animate:i>0},pan:{animate:i>0,duration:i/1e3,easeLinearity:1}})};o(t._position,50),t.positionChangeCallback=o,r._lastTrackMarker=t}else console.error("The type of marker is not been supported!")}},{key:"cancelTrack",value:function(){this._lastTrackMarker&&(this._lastTrackMarker.positionChangeCallback=null,this._lastTrackMarker=null)}},{key:"changeFloor",value:function(t){this._layerGroups.forEach(function(e,n){e.forEach(function(e){e.show(n==t)})})}},{key:"_getLayerTypeByMarkerType",value:function(t){var e=void 0;switch(t){case i.JSMarkerType.ICON_TEXT_MARKER:e=i.JSLayerType.ICON_TEXT_MARKER_LAYER;break;case i.JSMarkerType.POINT_MARKER:e=i.JSLayerType.POINT_MARKER_LAYER;break;case i.JSMarkerType.LINE_MARKER:e=i.JSLayerType.LINE_MARKER_LAYER;break;case i.JSMarkerType.POLYGON_MARKER:e=i.JSLayerType.POLYGON_MARKER_LAYER;break;case i.JSMarkerType.IMAGE_MARKER:e=i.JSLayerType.IMAGE_MARKER_LAYER;break;case i.JSMarkerType.DOM_MARKER:e=i.JSLayerType.DOM_MARKER_LAYER;break;case i.JSMarkerType.CIRCLE_MARKER:e=i.JSLayerType.CIRCLE_MARKER_LAYER}return e}},{key:"_getLayerTypeByMarker",value:function(t){var e=void 0;return t instanceof v.default?e=i.JSLayerType.ICON_TEXT_MARKER_LAYER:t instanceof a.default?e=i.JSLayerType.IMAGE_MARKER_LAYER:t instanceof l.default?e=i.JSLayerType.LINE_MARKER_LAYER:t instanceof h.default?e=i.JSLayerType.POLYGON_MARKER_LAYER:t instanceof p.default?e=i.JSLayerType.POINT_MARKER_LAYER:t instanceof d.default?e=i.JSLayerType.DOM_MARKER_LAYER:t instanceof m.default?e=i.JSLayerType.CIRCLE_MARKER_LAYER:t instanceof w.default&&(e=i.JSLayerType.RECTANGLE_MARKER_LAYER),e}},{key:"getOrCreateLayer",value:function(t,e){var n=this._layerGroups.get(Number(t));if(n){if(n.has(e))return n.get(e);var r=this._map._map,o=void 0,a=this._map.focusFloorId==t;switch(e){case i.JSLayerType.ICON_TEXT_MARKER_LAYER:o=new y.default(a,r.createPane("iconTextLayer_"+t));break;case i.JSLayerType.IMAGE_MARKER_LAYER:o=new s.default(a,r.createPane("imageLayer_"+t));break;case i.JSLayerType.POLYGON_MARKER_LAYER:o=new u.default(a,r.createPane("polygonLayer_"+t));break;case i.JSLayerType.LINE_MARKER_LAYER:o=new c.default(a,r.createPane("lineLayer_"+t));break;case i.JSLayerType.POINT_MARKER_LAYER:o=new f.default(a,r.createPane("pointLayer_"+t));break;case i.JSLayerType.DOM_MARKER_LAYER:o=new g.default(a,r.createPane("domLayer_"+t));break;case i.JSLayerType.CIRCLE_MARKER_LAYER:o=new _.default(a,r.createPane("circlesLayer_"+t));break;case i.JSLayerType.RECTANGLE_MARKER_LAYER:o=new E.default(a,r.createPane("rectangleMarker_"+t))}return n.set(e,o),o.addToMap(this._map),o}}},{key:"initLayerGroups",value:function(){var t=this._map,e=this;e._layerGroups.set(0,new Map),t._floorLayerSet&&t._floorLayerSet.forEach(function(t,n){var r=o.default.getFloorIdByFloorNo(n);e._layerGroups.set(r,new Map)})}},{key:"destroy",value:function(){this._map=void 0}}]),t}();e.default=M},function(t,e,n){"use strict";var r=n(10),i=n(1),o=n(2),a=n(0),s=n(71),u=n.n(s),c={successCallback:null,verbose:!1},l={};function h(t,e,n){n=n||{};for(var r=Object.keys(c),i=0;i=e?8:0,s|=c>=e?4:0,s|=l>=e?2:0;var p,d,g,y,v=!1;if(5===(s|=h>=e?1:0)||10===s){var m=(u+c+l+h)/4;5===s&&m=0&&v>=0&&v=0;c--)if(Math.abs(u[c][0][0]-o)<=1e-7&&Math.abs(u[c][0][1]-a)<=1e-7){for(var l=r.path.length-2;l>=0;--l)u[c].unshift(r.path[l]);i=!0;break}i||(u[h++]=r.path)}var f})}),u);return"function"==typeof l.successCallback&&l.successCallback(y),y}function f(t,e,n){return(t-e)/(n-e)}function p(t){return 0===t.cval||15===t.cval}function d(t){p(t)||5===t.cval||10===t.cval||(t.cval=15)}function g(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 y(t,e){if(e=e||{},!Object(a.isObject)(e))throw new Error("options is invalid");var n=e.zProperty||"elevation",r=e.flip,s=e.flags;Object(o.collectionOf)(t,"Point","input must contain Points");for(var u=function(t,e){var n={};return Object(i.featureEach)(t,function(t){var e=Object(o.getCoords)(t)[1];n[e]||(n[e]=[]),n[e].push(t)}),Object.keys(n).map(function(t){return n[t].sort(function(t,e){return Object(o.getCoords)(t)[0]-Object(o.getCoords)(e)[0]})}).sort(function(t,n){return e?Object(o.getCoords)(t[0])[1]-Object(o.getCoords)(n[0])[1]:Object(o.getCoords)(n[0])[1]-Object(o.getCoords)(t[0])[1]})}(t,r),c=[],l=0;lr[0]&&(r=s),s[1]i[1]&&(i=s)}var u=[e,n,r,i],c=u.slice();for(a=0;a=2&&p(e[e.length-2],e[e.length-1],t[n])<=0;)e.pop();e.push(t[n])}for(var r=[],i=t.length-1;i>=0;i--){for(;r.length>=2&&p(r[r.length-2],r[r.length-1],t[i])<=0;)r.pop();r.push(t[i])}return r.pop(),e.pop(),e.concat(r)}(c)}(t),a=new r(16);a.toBBox=function(t){return{minX:t[0],minY:t[1],maxX:t[0],maxY:t[1]}},a.compareMinX=function(t,e){return t[0]-e[0]},a.compareMinY=function(t,e){return t[1]-e[1]},a.load(t);for(var s,c=[],l=0;la||u.push({node:d,dist:g})}for(;u.length&&!u.peek().node.children;){var y=u.pop(),m=y.node,_=v(m,e,n),b=v(m,r,o);if(y.dist<_&&y.dist=e.minX&&t[0]<=e.maxX&&t[1]>=e.minY&&t[1]<=e.maxY}function f(t,e,n){for(var r,i,o,a,s=Math.min(t[0],e[0]),u=Math.min(t[1],e[1]),c=Math.max(t[0],e[0]),l=Math.max(t[1],e[1]),h=n.search({minX:s,minY:u,maxX:c,maxY:l}),f=0;f0!=p(r,i,a)>0&&p(o,a,r)>0!=p(o,a,i)>0)return!1;return!0}function p(t,e,n){return a(t[0],t[1],e[0],e[1],n[0],n[1])}function d(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,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 y(t,e){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function v(t,e,n){var r=e[0],i=e[1],o=n[0]-r,a=n[1]-i;if(0!==o||0!==a){var s=((t[0]-r)*o+(t[1]-i)*a)/(o*o+a*a);s>1?(r=n[0],i=n[1]):s>0&&(r+=o*s,i+=a*s)}return(o=t[0]-r)*o+(a=t[1]-i)*a}function m(t,e,n,r,i,o,a,s){var u,c,l,h,f=n-t,p=r-e,d=a-i,g=s-o,y=t-i,v=e-o,m=f*f+p*p,_=f*d+p*g,b=d*d+g*g,w=f*y+p*v,E=d*y+g*v,x=m*b-_*_,O=x,M=x;0===x?(c=0,O=1,h=E,M=b):(h=m*E-_*w,(c=_*E-b*w)<0?(c=0,h=E,M=b):c>O&&(c=O,h=E+_,M=b)),h<0?(h=0,-w<0?c=0:-w>m?c=O:(c=-w,O=m)):h>M&&(h=M,-w+_<0?c=0:-w+_>m?c=O:(c=-w+_,O=m)),u=0===c?0:c/O;var S=(1-(l=0===h?0:h/M))*i+l*a-((1-u)*t+u*n),P=(1-l)*o+l*s-((1-u)*e+u*r);return S*S+P*P}function _(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}i.default&&(i=i.default),t.exports=s,t.exports.default=s},function(t,e,n){"use strict";function r(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function i(t,e){return te?1:0}e.a=function(t,e,n,o,a){!function t(e,n,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=n-i+1,c=Math.log(s),l=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*l*(s-l)/s)*(u-s/2<0?-1:1),f=Math.max(i,Math.floor(n-u*l/s+h)),p=Math.min(o,Math.floor(n+(s-u)*l/s+h));t(e,n,f,p,a)}var d=e[n],g=i,y=o;for(r(e,i,n),a(e[o],d)>0&&r(e,i,o);g0;)y--}0===a(e[i],d)?r(e,i,y):r(e,++y,o),y<=n&&(i=y+1),n<=y&&(o=y-1)}}(t,e,n||0,o||t.length-1,a||i)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=class{constructor(t=[],e=function(t,e){return te?1:0}){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}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,r=e[t];for(;t>0;){const i=t-1>>1,o=e[i];if(n(r,o)>=0)break;e[t]=o,t=i}e[t]=r}_down(t){const{data:e,compare:n}=this,r=this.length>>1,i=e[t];for(;t=0)break;e[t]=o,t=r}e[t]=i}}},function(t,e,n){var r=n(217),i=n(218);t.exports=function(t,e,n,o){return e.length>0&&Array.isArray(e[0])?i(t,e,n,o):r(t,e,n,o)},t.exports.nested=i,t.exports.flat=r},function(t,e){t.exports=function(t,e,n,r){var i=t[0],o=t[1],a=!1;void 0===n&&(n=0),void 0===r&&(r=e.length);for(var s=(r-n)/2,u=0,c=s-1;uo!=p>o&&i<(f-l)*(o-h)/(p-h)+l&&(a=!a)}return a}},function(t,e){t.exports=function(t,e,n,r){var i=t[0],o=t[1],a=!1;void 0===n&&(n=0),void 0===r&&(r=e.length);for(var s=r-n,u=0,c=s-1;uo!=p>o&&i<(f-l)*(o-h)/(p-h)+l&&(a=!a)}return a}},function(t,e,n){(function(t){"use strict";const e=134217729;function n(t,e,n,r,i){let o,a,s,u,c=e[0],l=r[0],h=0,f=0;l>c==l>-c?(o=c,c=e[++h]):(o=l,l=r[++f]);let p=0;if(hc==l>-c?(s=o-((a=c+o)-c),c=e[++h]):(s=o-((a=l+o)-l),l=r[++f]),o=a,0!==s&&(i[p++]=s);hc==l>-c?(s=o-((a=o+c)-(u=a-o))+(c-u),c=e[++h]):(s=o-((a=o+l)-(u=a-o))+(l-u),l=r[++f]),o=a,0!==s&&(i[p++]=s);for(;h0!=d>0)return g;const y=Math.abs(p+d);return Math.abs(g)>=3.3306690738754716e-16*y?g:-function(t,r,c,l,h,f,p){let d,g,y,v,m,_,b,w,E,x,O,M,S,P,C,T,I,L;const A=t-h,N=c-h,k=r-f,j=l-f;m=(C=(w=A-(b=(_=e*A)-(_-A)))*(x=j-(E=(_=e*j)-(_-j)))-((P=A*j)-b*E-w*E-b*x))-(O=C-(I=(w=k-(b=(_=e*k)-(_-k)))*(x=N-(E=(_=e*N)-(_-N)))-((T=k*N)-b*E-w*E-b*x))),i[0]=C-(O+m)+(m-I),m=(S=P-((M=P+O)-(m=M-P))+(O-m))-(O=S-T),i[1]=S-(O+m)+(m-T),m=(L=M+O)-M,i[2]=M-(L-m)+(O-m),i[3]=L;let R=function(t,e){let n=e[0];for(let t=1;t<4;t++)n+=e[t];return n}(0,i),D=2.2204460492503146e-16*p;if(R>=D||-R>=D)return R;if(d=t-(A+(m=t-A))+(m-h),y=c-(N+(m=c-N))+(m-h),g=r-(k+(m=r-k))+(m-f),v=l-(j+(m=l-j))+(m-f),0===d&&0===g&&0===y&&0===v)return R;if(D=1.1093356479670487e-31*p+3.3306690738754706e-16*Math.abs(R),(R+=A*v+j*d-(k*y+N*g))>=D||-R>=D)return R;m=(C=(w=d-(b=(_=e*d)-(_-d)))*(x=j-(E=(_=e*j)-(_-j)))-((P=d*j)-b*E-w*E-b*x))-(O=C-(I=(w=g-(b=(_=e*g)-(_-g)))*(x=N-(E=(_=e*N)-(_-N)))-((T=g*N)-b*E-w*E-b*x))),u[0]=C-(O+m)+(m-I),m=(S=P-((M=P+O)-(m=M-P))+(O-m))-(O=S-T),u[1]=S-(O+m)+(m-T),m=(L=M+O)-M,u[2]=M-(L-m)+(O-m),u[3]=L;const F=n(4,i,4,u,o);m=(C=(w=A-(b=(_=e*A)-(_-A)))*(x=v-(E=(_=e*v)-(_-v)))-((P=A*v)-b*E-w*E-b*x))-(O=C-(I=(w=k-(b=(_=e*k)-(_-k)))*(x=y-(E=(_=e*y)-(_-y)))-((T=k*y)-b*E-w*E-b*x))),u[0]=C-(O+m)+(m-I),m=(S=P-((M=P+O)-(m=M-P))+(O-m))-(O=S-T),u[1]=S-(O+m)+(m-T),m=(L=M+O)-M,u[2]=M-(L-m)+(O-m),u[3]=L;const z=n(F,o,4,u,a);m=(C=(w=d-(b=(_=e*d)-(_-d)))*(x=v-(E=(_=e*v)-(_-v)))-((P=d*v)-b*E-w*E-b*x))-(O=C-(I=(w=g-(b=(_=e*g)-(_-g)))*(x=y-(E=(_=e*y)-(_-y)))-((T=g*y)-b*E-w*E-b*x))),u[0]=C-(O+m)+(m-I),m=(S=P-((M=P+O)-(m=M-P))+(O-m))-(O=S-T),u[1]=S-(O+m)+(m-T),m=(L=M+O)-M,u[2]=M-(L-m)+(O-m),u[3]=L;const B=n(z,a,4,u,s);return s[B-1]}(t,r,c,l,h,f,y)},t.orient2dfast=function(t,e,n,r,i,o){return(e-o)*(n-i)-(t-i)*(r-o)},Object.defineProperty(t,"__esModule",{value:!0})})(e)},function(t,e,n){"use strict";var r=n(8),i=n(0),o=n(1),a=n(110),s=n(221);e.a=function(t,e){void 0===e&&(e={});var n=e.maxEdge||1/0,u=function(t){var e=[],n={};return Object(o.featureEach)(t,function(t){if(t.geometry){var r=t.geometry.coordinates.join("-");Object.prototype.hasOwnProperty.call(n,r)||(e.push(t),n[r]=!0)}}),Object(i.featureCollection)(e)}(t),c=Object(a.a)(u);if(c.features=c.features.filter(function(t){var i=t.geometry.coordinates[0][0],o=t.geometry.coordinates[0][1],a=t.geometry.coordinates[0][2],s=Object(r.a)(i,o,e),u=Object(r.a)(o,a,e),c=Object(r.a)(i,a,e);return s<=n&&u<=n&&c<=n}),c.features.length<1)return null;var l=Object(s.a)(c);return 1===l.coordinates.length&&(l.coordinates=l.coordinates[0],l.type="Polygon"),Object(i.feature)(l)}},function(t,e,n){"use strict";var r=n(9),i=n(0),o=n(2),a=n(1),s=n(222),u=n(223);e.a=function(t,e){if(void 0===e&&(e={}),e=e||{},!Object(i.isObject)(e))throw new Error("options is invalid");var n=e.mutate;if("FeatureCollection"!==Object(o.getType)(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=Object(r.a)(t));var c=function(t){var e={};Object(a.flattenEach)(t,function(t){e[t.geometry.type]=!0});var n=Object.keys(e);return 1===n.length?n[0]:null}(t);if(!c)throw new Error("geojson must be homogenous");var l=t;switch(c){case"LineString":return Object(s.a)(l,e);case"Polygon":return Object(u.a)(l,e);default:throw new Error(c+" is not supported")}}},function(t,e,n){"use strict";var r=n(9),i=n(0),o=n(2),a=n(1);function s(t){return t[0].toString()+","+t[1].toString()}e.a=function(t,e){if(void 0===e&&(e={}),e=e||{},!Object(i.isObject)(e))throw new Error("options is invalid");var n=e.mutate;if("FeatureCollection"!==Object(o.getType)(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=Object(r.a)(t));var u=[],c=Object(a.lineReduce)(t,function(t,e){var n=function(t,e){var n,r=t.geometry.coordinates,o=e.geometry.coordinates,a=s(r[0]),u=s(r[r.length-1]),c=s(o[0]),l=s(o[o.length-1]);if(a===l)n=o.concat(r.slice(1));else if(c===u)n=r.concat(o.slice(1));else if(a===c)n=r.slice(1).reverse().concat(o);else{if(u!==l)return null;n=r.concat(o.reverse().slice(1))}return Object(i.lineString)(n)}(t,e);return n||(u.push(t),e)});return c&&u.push(c),u.length?1===u.length?u[0]:Object(i.multiLineString)(u.map(function(t){return t.coordinates})):null}},function(t,e,n){"use strict";e.a=function(t,e){void 0===e&&(e={});if("FeatureCollection"!==Object(o.getType)(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=Object(r.a)(t));var n=[];Object(a.flattenEach)(t,function(t){n.push(t.geometry)});var c=Object(u.a)({geoms:Object(i.geometryCollection)(n).geometry});return Object(s.a)(c,c.objects.geoms.geometries)};var r=n(9),i=n(0),o=n(2),a=n(1),s=n(224),u=n(231)},function(t,e,n){"use strict";n(111),n(73),n(226);var r=n(227);n.d(e,"a",function(){return r.a});n(228),n(230),n(72),n(114)},function(t,e,n){"use strict";e.a=function(t,e){for(var n,r=t.length,i=r-e;i<--r;)n=t[i],t[i++]=t[r],t[r]=n}},function(t,e,n){"use strict";n(73),n(113)},function(t,e,n){"use strict";var r=n(73),i=n(113);e.a=function(t){return Object(r.a)(t,function(t,e){var n={},o=[],a=[];function s(t){t.forEach(function(e){e.forEach(function(e){(n[e=e<0?~e:e]||(n[e]=[])).push(t)})}),o.push(t)}function u(e){return function(t){for(var e,n=-1,r=t.length,i=t[r-1],o=0;++n1)for(var a,s,c=1,l=u(o[0]);cl&&(s=o[0],o[0]=o[c],o[c]=s,l=a);return o}).filter(function(t){return t.length>0})}}.apply(this,arguments))}},function(t,e,n){"use strict";n(229)},function(t,e,n){"use strict";e.a=function(t,e){for(var n=0,r=t.length;n>>1;t[i]0&&n&&Object(h.a)(t,n,e),g=Object(o.a)(Object(i.a)(Object(s.a)(t))),y=g.coordinates,v=Object(c.a)(1.4*g.arcs.length,f,p);function m(t){t&&l.a.call(_,t.type)&&_[t.type](t)}t=g.objects,g.bbox=n,g.arcs=g.arcs.map(function(t,e){return v.set(t,e),y.slice(t[0],t[1]+1)}),delete g.coordinates,y=null;var _={GeometryCollection:function(t){t.geometries.forEach(m)},LineString:function(t){t.arcs=b(t.arcs)},MultiLineString:function(t){t.arcs=t.arcs.map(b)},Polygon:function(t){t.arcs=t.arcs.map(b)},MultiPolygon:function(t){t.arcs=t.arcs.map(w)}};function b(t){var e=[];do{var n=v.get(t);e.push(t[0]i&&(i=r),ao&&(o=a)}function c(t){t.forEach(u)}function l(t){t.forEach(c)}for(var h in t)a(t[h]);return i>=e&&o>=n?[e,n,i,o]:void 0}},function(t,e,n){"use strict";var r=n(235);function i(t,e,n,r){o(t,e,n),o(t,e,e+r),o(t,e+r,n)}function o(t,e,n){for(var r,i=e+(n---e>>1);e=0){var o=g[n];i===e&&o===r||i===r&&o===e||(++v,y[n]=1)}else d[n]=e,g[n]=r}}function M(t){return Object(a.a)(c[t])}function S(t,e){return Object(o.a)(c[t],c[e])}p=d=g=null;var P,C=Object(r.a)(1.4*v,a.a,o.a);for(e=0,n=c.length;e=t)throw new Error("full hashset");u=o[s=s+1&a]}return o[s]=r,!0},has:function(r){for(var s=e(r)&a,u=o[s],c=0;u!=i;){if(n(u,r))return!0;if(++c>=t)break;u=o[s=s+1&a]}return!1},values:function(){for(var t=[],e=0,n=o.length;ee?1:0}return function(n,r,i,o,a){!function e(n,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=r-i+1,c=Math.log(s),l=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*l*(s-l)/s)*(u-s/2<0?-1:1),f=Math.max(i,Math.floor(r-u*l/s+h)),p=Math.min(o,Math.floor(r+(s-u)*l/s+h));e(n,r,f,p,a)}var d=n[r],g=i,y=o;for(t(n,i,r),a(n[o],d)>0&&t(n,i,o);g0;)y--}0===a(n[i],d)?t(n,i,y):t(n,++y,o),y<=r&&(i=y+1),r<=y&&(o=y-1)}}(n,r,i||0,o||n.length-1,a||e)}},t.exports=r()},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(9);e.a=function(t,e){if(e=e||{},!Object(i.isObject)(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=Object(o.a)(t)),Object(r.coordEach)(t,function(t){var e=t[0],n=t[1];t[0]=n,t[1]=e}),t}},function(t,e,n){"use strict";var r=n(41),i=n(9),o=n(1),a=n(0);function s(t,e,n){var r=e.x,i=e.y,o=n.x-r,a=n.y-i;if(0!==o||0!==a){var s=((t.x-r)*o+(t.y-i)*a)/(o*o+a*a);s>1?(r=n.x,i=n.y):s>0&&(r+=o*s,i+=a*s)}return(o=t.x-r)*o+(a=t.y-i)*a}function u(t,e){var n=t.length-1,r=[t[0]];return function t(e,n,r,i,o){for(var a,u=i,c=n+1;cu&&(a=c,u=l)}u>i&&(a-n>1&&t(e,n,a,i,o),o.push(e[a]),r-a>1&&t(e,a,r,i,o))}(t,0,n,e,r),r.push(t[n]),r}function c(t,e,n){if(t.length<=2)return t;var r=void 0!==e?e*e:1;return t=u(t=n?t:function(t,e){for(var n,r,i,o,a,s=t[0],u=[s],c=1,l=t.length;ce&&(u.push(n),s=n);return s!==n&&u.push(n),u}(t,r),r)}function l(t,e,n){return c(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 h(t,e,n){return t.map(function(t){var r=t.map(function(t){return{x:t[0],y:t[1]}});if(r.length<4)throw new Error("invalid polygon");for(var i=c(r,e,n).map(function(t){return[t.x,t.y]});!f(i);)i=c(r,e-=.01*e,n).map(function(t){return[t.x,t.y]});return i[i.length-1][0]===i[0][0]&&i[i.length-1][1]===i[0][1]||i.push(i[0]),i})}function f(t){return!(t.length<3)&&!(3===t.length&&t[2][0]===t[0][0]&&t[2][1]===t[0][1])}e.a=function(t,e){if(e=e||{},!Object(a.isObject)(e))throw new Error("options is invalid");var n=void 0!==e.tolerance?e.tolerance:1,s=e.highQuality||!1,u=e.mutate||!1;if(!t)throw new Error("geojson is required");if(n&&n<0)throw new Error("invalid tolerance");return!0!==u&&(t=Object(i.a)(t)),Object(o.geomEach)(t,function(t){!function(t,e,n){var i=t.type;if("Point"===i||"MultiPoint"===i)return t;Object(r.a)(t,!0);var o=t.coordinates;switch(i){case"LineString":t.coordinates=l(o,e,n);break;case"MultiLineString":t.coordinates=o.map(function(t){return l(t,e,n)});break;case"Polygon":t.coordinates=h(o,e,n);break;case"MultiPolygon":t.coordinates=o.map(function(t){return h(t,e,n)})}}(t,n,s)}),t}},function(t,e,n){"use strict";var r=n(0),i=n(2),o=n(247);e.a=function(t,e){void 0===e&&(e={});for(var n=e.resolution||1e4,a=e.sharpness||.85,s=[],u=Object(i.getGeom)(t).coordinates.map(function(t){return{x:t[0],y:t[1]}}),c=new o.a({duration:n,points:u,sharpness:a}),l=function(t){var e=c.pos(t);Math.floor(t/100)%2==0&&s.push([e.x,e.y])},h=0;ht&&(e.push(r),n=i)}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 r=Math.floor((this.points.length-1)*n);return function(t,e,n,r,i){var o=function(t){var e=t*t;return[e*t,3*e*(1-t),3*t*(1-t)*(1-t),(1-t)*(1-t)*(1-t)]}(t);return{x:i.x*o[0]+r.x*o[1]+n.x*o[2]+e.x*o[3],y:i.y*o[0]+r.y*o[1]+n.y*o[2]+e.y*o[3],z:i.z*o[0]+r.z*o[1]+n.z*o[2]+e.z*o[3]}}((this.length-1)*n-r,this.points[r],this.controls[r][1],this.controls[r+1][0],this.points[r+1])},t}();e.a=r},function(t,e,n){"use strict";var r=n(11),i=n(9),o=n(1);e.a=function(t,e,n,a){return t=Object(i.a)(t),e=Object(i.a)(e),Object(o.featureEach)(t,function(t){t.properties||(t.properties={}),Object(o.featureEach)(e,function(e){void 0===t.properties[a]&&Object(r.a)(t,e)&&(t.properties[a]=e.properties[n])})}),t}},function(t,e,n){"use strict";var r=n(0);e.a=function(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");return Object(r.featureCollection)(function(t,e){for(var n,r,i=t.slice(0),o=t.length,a=o-e;o-- >a;)r=Math.floor((o+1)*Math.random()),n=i[r],i[r]=i[o],i[o]=n;return i.slice(a)}(t.features,e))}},function(t,e,n){"use strict";var r=n(34),i=n(27),o=n(8);e.a=function(t,e){var n=Object(o.a)(t,e),a=Object(r.a)(t,e);return Object(i.a)(t,n/2,a)}},function(t,e,n){"use strict";var r=n(107),i=n(28),o=n(0),a=n(2),s=n(1);e.a=function t(e,n){switch(void 0===n&&(n={}),Object(a.getType)(e)){case"Point":return Object(o.point)(Object(a.getCoord)(e),n.properties);case"Polygon":var u=[];Object(s.coordEach)(e,function(t){u.push(t)});var c,l,h,f,p,d,g,y,v=Object(i.a)(e,{properties:n.properties}),m=v.geometry.coordinates,_=0,b=0,w=0,E=u.map(function(t){return[t[0]-m[0],t[1]-m[1]]});for(c=0;c0&&(r+=t[i-1].length,n.holes.push(r))}return n}(t),n=i()(e.vertices,e.holes,2),r=[],a=[];n.forEach(function(t,r){var i=n[r];a.push([e.vertices[2*i],e.vertices[2*i+1]])});for(var s=0;s80*n){r=u=t[0],s=c=t[1];for(var b=n;bu&&(u=l),p>c&&(c=p);d=0!==(d=Math.max(u-r,c-s))?1/d:0}return a(m,_,n,r,s,d),_}function i(t,e,n,r,i){var o,a;if(i===C(t,e,n,r)>0)for(o=e;o=e;o-=r)a=M(o,t[o],t[o+1],a);return a&&_(a,a.next)&&(S(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!_(r,r.next)&&0!==m(r.prev,r,r.next))r=r.next;else{if(S(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function a(t,e,n,r,i,h,f){if(t){!f&&h&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=d(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,u,c=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1)}(i)}(t,r,i,h);for(var p,g,y=t;t.prev!==t.next;)if(p=t.prev,g=t.next,h?u(t,r,i,h):s(t))e.push(p.i/n),e.push(t.i/n),e.push(g.i/n),S(t),t=g.next,y=g.next;else if((t=g)===y){f?1===f?a(t=c(o(t),e,n),e,n,r,i,h,2):2===f&&l(t,e,n,r,i,h):a(o(t),e,n,r,i,h,1);break}}}function s(t){var e=t.prev,n=t,r=t.next;if(m(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(y(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&m(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(t,e,n,r){var i=t.prev,o=t,a=t.next;if(m(i,o,a)>=0)return!1;for(var s=i.xo.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=d(s,u,e,n,r),f=d(c,l,e,n,r),p=t.prevZ,g=t.nextZ;p&&p.z>=h&&g&&g.z<=f;){if(p!==t.prev&&p!==t.next&&y(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,g!==t.prev&&g!==t.next&&y(i.x,i.y,o.x,o.y,a.x,a.y,g.x,g.y)&&m(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&y(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;g&&g.z<=f;){if(g!==t.prev&&g!==t.next&&y(i.x,i.y,o.x,o.y,a.x,a.y,g.x,g.y)&&m(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function c(t,e,n){var r=t;do{var i=r.prev,a=r.next.next;!_(i,a)&&b(i,r,r.next,a)&&x(i,a)&&x(a,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(a.i/n),S(r),S(r.next),r=t=a),r=r.next}while(r!==t);return o(r)}function l(t,e,n,r,i,s){var u=t;do{for(var c=u.next.next;c!==u.prev;){if(u.i!==c.i&&v(u,c)){var l=O(u,c);return u=o(u,u.next),l=o(l,l.next),a(u,e,n,r,i,s),void a(l,e,n,r,i,s)}c=c.next}u=u.next}while(u!==t)}function h(t,e){return t.x-e.x}function f(t,e){var n=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x=r.x&&r.x>=l&&i!==r.x&&y(on.x||r.x===n.x&&p(n,r)))&&(n=r,f=u)),r=r.next}while(r!==c);return n}(t,e);if(!n)return e;var r=O(n,t),i=o(n,n.next);return o(r,r.next),e===n?i:e}function p(t,e){return m(t.prev,t,e.prev)<0&&m(e.next,t,t.next)<0}function d(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function g(t){var e=t,n=t;do{(e.x=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(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}(t,e)&&(x(t,e)&&x(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(m(t.prev,t,e.prev)||m(t,e.prev,e))||_(t,e)&&m(t.prev,t,t.next)>0&&m(e.prev,e,e.next)>0)}function m(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function _(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,n,r){var i=E(m(t,e,n)),o=E(m(t,e,r)),a=E(m(n,r,t)),s=E(m(n,r,e));return i!==o&&a!==s||(!(0!==i||!w(t,n,e))||(!(0!==o||!w(t,r,e))||(!(0!==a||!w(n,t,r))||!(0!==s||!w(n,e,r)))))}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 x(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function O(t,e){var n=new P(t.i,t.x,t.y),r=new P(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function M(t,e,n,r){var i=new P(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function S(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 P(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,n,r){for(var i=0,o=e,a=n-r;o0&&(r+=t[i-1].length,n.holes.push(r))}return n}},function(t,e,n){"use strict";var r=n(2),i=n(1),o=n(120),a=n(71),s=n.n(a);e.a=function(t,e,n){void 0===n&&(n={});var a=n.units,u=n.properties||{},c=function(t){var e=[];switch(t.geometry?t.geometry.type:t.type){case"GeometryCollection":return Object(i.geomEach)(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")}}(t);if(!c.features.length)throw new Error("points must contain features");if(!e)throw new Error("line is required");if("LineString"!==Object(r.getType)(e))throw new Error("line must be a LineString");var l=1/0,h=null;return Object(i.featureEach)(c,function(t){var n=Object(o.a)(t,e,{units:a});n=0&&c<=1&&(f.onLine1=!0),l>=0&&l<=1&&(f.onLine2=!0),!(!f.onLine1||!f.onLine2)&&[f.x,f.y])}},function(t,e,n){"use strict";var r=n(58),i=n(57),o=n(77),a=n(11),s=n(0);function u(t,e,n,r,i,o){return Math.sqrt((i-n)*(i-n)+(o-r)*(o-r))===Math.sqrt((t-n)*(t-n)+(e-r)*(e-r))+Math.sqrt((i-t)*(i-t)+(o-e)*(o-e))}e.a=function(t){for(var e=function(t){return"FeatureCollection"!==t.type?"Feature"!==t.type?Object(s.featureCollection)([Object(s.feature)(t)]):Object(s.featureCollection)([t]):t}(t),n=Object(i.a)(e),c=!1,l=0;!c&&l=c&&l===u.length-1);l++){if(c>=e){var h=e-c;if(h){var f=Object(r.a)(u[l],u[l-1])-180,p=Object(i.a)(u[l],h,f,n);return p}return Object(a.point)(u[l])}c+=Object(o.a)(u[l],u[l+1],n)}return Object(a.point)(u[u.length-1])};var r=n(34),i=n(27),o=n(8),a=n(0),s=n(2)},function(t,e,n){"use strict";var r=n(2),i=n(0),o=n(59);e.a=function(t,e,n){var a=Object(r.getCoords)(n);if("LineString"!==Object(r.getType)(n))throw new Error("line must be a LineString");for(var s,u=Object(o.a)(n,t),c=Object(o.a)(n,e),l=[(s=u.properties.index<=c.properties.index?[u,c]:[c,u])[0].geometry.coordinates],h=s[0].properties.index+1;h=1||u<=0||c>=1||c<=0))){var y=g,v=!o[y];v&&(o[y]=!0),e?i.push(e(g,t,n,h,f,u,a,s,p,d,c,v)):i.push(g)}}function v(t,e){var n,i,o,a,s=r[t][e],u=r[t][e+1];return s[0]E[e.isect].coord?-1:1});for(_=[];L.length>0;){var R=L.pop(),D=R.isect,F=R.parent,z=R.winding,B=_.length,q=[E[D].coord],G=D;if(E[D].ringAndEdge1Walkable)var U=E[D].ringAndEdge1,V=E[D].nxtIsectAlongRingAndEdge1;else U=E[D].ringAndEdge2,V=E[D].nxtIsectAlongRingAndEdge2;for(;!y(E[D].coord,E[V].coord);){q.push(E[V].coord);var J=void 0;for(r=0;r1)for(e=0;e=0==e}function g(t){for(var e=0,n=0;nd&&(v>f&&yf&&vl&&(l=m)}var _=[];if(c&&l0&&Math.abs(E-n[w-1][0])>d){var x=parseFloat(n[w-1][0]),O=parseFloat(n[w-1][1]),M=parseFloat(n[w][0]),S=parseFloat(n[w][1]);if(x>-180&&x-180&&n[w-1][0]f&&x<180&&-180===M&&w+1f&&n[w-1][0]<180){b.push([180,n[w][1]]),w++,b.push([n[w][0],n[w][1]]);continue}if(xf){var P=x;x=M,M=P;var C=O;O=S,S=C}if(x>f&&M=180&&xf?180:-180,I]),(b=[]).push([n[w-1][0]>f?-180:180,I]),_.push(b)}else b=[],_.push(b);b.push([E,n[w][1]])}else b.push([n[w][0],n[w][1]])}}else{var L=[];_.push(L);for(var A=0;A1&&n.push(Object(p.lineString)(g)),Object(p.featureCollection)(n)}function y(t,e){if(!e.features.length)throw new Error("lines must contain features");if(1===e.features.length)return e.features[0];var n,r=1/0;return Object(f.featureEach)(e,function(e){var i=Object(l.a)(e,t).properties.dist;if?(h.unshift(t),f=e):h.push(t)}else h.push(t);var i,s,c,l,p}),Object(o.polygon)(h,e);default:throw new Error("geometry type "+l+" is not supported")}}function u(t){var e=t[0],n=e[0],r=e[1],i=t[t.length-1],o=i[0],a=i[1];return n===o&&r===a||t.push(e),t}e.a=function(t,e){var n,r,u;void 0===e&&(e={});var c=e.properties,l=null===(n=e.autoComplete)||void 0===n||n,h=null===(r=e.orderCoords)||void 0===r||r;switch(null!==(u=e.mutate)&&void 0!==u&&u||(t=Object(a.a)(t)),t.type){case"FeatureCollection":var f=[];return t.features.forEach(function(t){f.push(Object(i.getCoords)(s(t,{},l,h)))}),Object(o.multiPolygon)(f,c);default:return s(t,c,l,h)}}},function(t,e,n){"use strict";e.a=function(t,e){var n=Object(i.getGeom)(t),s=n.type,u="Feature"===t.type?t.properties:{},c=n.coordinates;switch(s){case"LineString":case"MultiLineString":var l=[];return"LineString"===s&&(c=[c]),c.forEach(function(t){Object(o.a)(t,e,l)}),1===l.length?Object(r.lineString)(l[0],u):Object(r.multiLineString)(l,u);case"Polygon":return Object(r.polygon)(a(c,e),u);case"MultiPolygon":return Object(r.multiPolygon)(c.map(function(t){return a(t,e)}),u);default:throw new Error("geometry "+s+" not supported")}};var r=n(0),i=n(2),o=n(267);function a(t,e){for(var n=[],r=0,i=t;r0&&(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}},function(t,e,n){"use strict";function r(t,e,n,r){return 8&n?[t[0]+(e[0]-t[0])*(r[3]-t[1])/(e[1]-t[1]),r[3]]:4&n?[t[0]+(e[0]-t[0])*(r[1]-t[1])/(e[1]-t[1]),r[1]]:2&n?[r[2],t[1]+(e[1]-t[1])*(r[2]-t[0])/(e[0]-t[0])]:1&n?[r[0],t[1]+(e[1]-t[1])*(r[0]-t[0])/(e[0]-t[0])]:null}function i(t,e){var n=0;return t[0]e[2]&&(n|=2),t[1]e[3]&&(n|=8),n}e.a=function(t,e,n){var o,a,s,u,c,l=t.length,h=i(t[0],e),f=[];n||(n=[]);for(o=1;o0&&!i.call(t,0))for(var g=0;g0)for(var y=0;y=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,t.exports=s?o:a},function(t,e,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(132);t.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},function(t,e,n){"use strict";var r=Array.prototype.slice,i=Object.prototype.toString;t.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==i.call(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n,o=r.call(arguments,1),a=Math.max(0,e.length-o.length),s=[],u=0;u0?l(e,s,i)<0||(i=s):n>0&&r<=0&&(c(e,s,o)||(o=s)),n=r}return[i,o]}function c(t,e,n){return l(t,e,n)>0}function l(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(n[0]-t[0])*(e[1]-t[1])}e.a=function(t,e){var n,c,h,f=Object(r.getCoords)(t),p=Object(r.getCoords)(e),d=Object(o.default)(e),g=0,y=null;switch(f[0]>d[0]&&f[0]d[1]&&f[1] is required");if("boolean"!=typeof n)throw new Error(" must be a boolean");if("boolean"!=typeof i)throw new Error(" must be a boolean");!1===i&&(t=Object(r.a)(t));var a=[];switch(t.type){case"GeometryCollection":return Object(o.geomEach)(t,function(t){u(t,n)}),t;case"FeatureCollection":return Object(o.featureEach)(t,function(t){Object(o.featureEach)(u(t,n),function(t){a.push(t)})}),Object(s.featureCollection)(a)}return u(t,n)}},function(t,e,n){"use strict";var r=n(10),i=n(79),o=n(11),a=n(58),s=n(2),u=n(0),c=n(71),l=n.n(c),h=n(1);function f(t,e){if(e=e||{},!Object(u.isObject)(e))throw new Error("options is invalid");var n=e.zProperty||"elevation",r=e.flip,i=e.flags;Object(s.collectionOf)(t,"Point","input must contain Points");for(var o=function(t,e){var n={};return Object(h.featureEach)(t,function(t){var e=Object(s.getCoords)(t)[1];n[e]||(n[e]=[]),n[e].push(t)}),Object.keys(n).map(function(t){return n[t].sort(function(t,e){return Object(s.getCoords)(t)[0]-Object(s.getCoords)(e)[0]})}).sort(function(t,n){return e?Object(s.getCoords)(t[0])[1]-Object(s.getCoords)(n[0])[1]:Object(s.getCoords)(n[0])[1]-Object(s.getCoords)(t[0])[1]})}(t,r),a=[],c=0;ca?128:64,c|=ha?32:16,c|=fa?8:4;var d=+(c|=pa?2:1),g=0;if(17===c||18===c||33===c||34===c||38===c||68===c||72===c||98===c||102===c||132===c||136===c||137===c||152===c||153===c){var y=(l+h+f+p)/4;g=y>a?2:y0?(c=156,g=4):c=152:33===c?g>0?(c=139,g=4):c=137:72===c?g>0?(c=99,g=4):c=98:132===c&&(g>0?(c=39,g=4):c=38)}if(0!=c&&170!=c){var v,m,_,b,w,E,x,O;v=m=_=b=w=E=x=O=.5;var M=[];1===c?(_=1-st(e,f,p),O=1-st(e,l,p),M.push(et[c])):169===c?(_=st(a,p,f),O=st(a,p,l),M.push(et[c])):4===c?(E=1-st(e,h,f),b=st(e,p,f),M.push($[c])):166===c?(E=st(a,f,h),b=1-st(a,f,p),M.push($[c])):16===c?(w=st(e,f,h),m=st(e,l,h),M.push(Q[c])):154===c?(w=1-st(a,h,f),m=1-st(a,h,l),M.push(Q[c])):64===c?(x=st(e,p,l),v=1-st(e,h,l),M.push(rt[c])):106===c?(x=1-st(a,l,p),v=st(a,l,h),M.push(rt[c])):168===c?(b=st(a,p,f),_=st(e,p,f),O=st(e,p,l),x=st(a,p,l),M.push(tt[c]),M.push(et[c])):2===c?(b=1-st(e,f,p),_=1-st(a,f,p),O=1-st(a,l,p),x=1-st(e,l,p),M.push(tt[c]),M.push(et[c])):162===c?(w=st(a,f,h),E=st(e,f,h),b=1-st(e,f,p),_=1-st(a,f,p),M.push(tt[c]),M.push(et[c])):8===c?(w=1-st(e,h,f),E=1-st(a,h,f),b=st(a,p,f),_=st(e,p,f),M.push(Q[c]),M.push($[c])):138===c?(w=1-st(e,h,f),E=1-st(a,h,f),v=1-st(a,h,l),m=1-st(e,h,l),M.push(Q[c]),M.push($[c])):32===c?(w=st(a,f,h),E=st(e,f,h),v=st(e,l,h),m=st(a,l,h),M.push(Q[c]),M.push($[c])):42===c?(O=1-st(a,l,p),x=1-st(e,l,p),v=st(e,l,h),m=st(a,l,h),M.push(nt[c]),M.push(rt[c])):128===c&&(O=st(e,p,l),x=st(a,p,l),v=1-st(a,h,l),m=1-st(e,h,l),M.push(nt[c]),M.push(rt[c])),5===c?(E=1-st(e,h,f),O=1-st(e,l,p),M.push($[c])):165===c?(E=st(a,f,h),O=st(a,p,l),M.push($[c])):20===c?(b=st(e,p,f),m=st(e,l,h),M.push(tt[c])):150===c?(b=1-st(a,f,p),m=1-st(a,h,l),M.push(tt[c])):80===c?(w=st(e,f,h),x=st(e,p,l),M.push(Q[c])):90===c?(w=1-st(a,h,f),x=1-st(a,l,p),M.push(Q[c])):65===c?(_=1-st(e,f,p),v=1-st(e,h,l),M.push(et[c])):105===c?(_=st(a,p,f),v=st(a,l,h),M.push(et[c])):160===c?(w=st(a,f,h),E=st(e,f,h),O=st(e,p,l),x=st(a,p,l),M.push(Q[c]),M.push($[c])):10===c?(w=1-st(e,h,f),E=1-st(a,h,f),O=1-st(a,l,p),x=1-st(e,l,p),M.push(Q[c]),M.push($[c])):130===c?(b=1-st(e,f,p),_=1-st(a,f,p),v=1-st(a,h,l),m=1-st(e,h,l),M.push(tt[c]),M.push(et[c])):40===c?(b=st(a,p,f),_=st(e,p,f),v=st(e,l,h),m=st(a,l,h),M.push(tt[c]),M.push(et[c])):101===c?(E=st(a,f,h),v=st(a,l,h),M.push($[c])):69===c?(E=1-st(e,h,f),v=1-st(e,h,l),M.push($[c])):149===c?(O=st(a,p,l),m=1-st(a,h,l),M.push(nt[c])):21===c?(O=1-st(e,l,p),m=st(e,l,h),M.push(nt[c])):86===c?(b=1-st(a,f,p),x=1-st(a,l,p),M.push(tt[c])):84===c?(b=st(e,p,f),x=st(e,p,l),M.push(tt[c])):89===c?(w=1-st(a,h,f),_=st(a,p,f),M.push(et[c])):81===c?(w=st(e,f,h),_=1-st(e,f,p),M.push(et[c])):96===c?(w=st(a,f,h),E=st(e,f,h),x=st(e,p,l),v=st(a,l,h),M.push(Q[c]),M.push($[c])):74===c?(w=1-st(e,h,f),E=1-st(a,h,f),x=1-st(a,l,p),v=1-st(e,h,l),M.push(Q[c]),M.push($[c])):24===c?(w=1-st(a,h,f),b=st(a,p,f),_=st(e,p,f),m=st(e,l,h),M.push(Q[c]),M.push(et[c])):146===c?(w=st(e,f,h),b=1-st(e,f,p),_=1-st(a,f,p),m=1-st(a,h,l),M.push(Q[c]),M.push(et[c])):6===c?(E=1-st(e,h,f),b=1-st(a,f,p),O=1-st(a,l,p),x=1-st(e,l,p),M.push($[c]),M.push(tt[c])):164===c?(E=st(a,f,h),b=st(e,p,f),O=st(e,p,l),x=st(a,p,l),M.push($[c]),M.push(tt[c])):129===c?(_=1-st(e,f,p),O=st(a,p,l),v=1-st(a,h,l),m=1-st(e,h,l),M.push(et[c]),M.push(nt[c])):41===c?(_=st(a,p,f),O=1-st(e,l,p),v=st(e,l,h),m=st(a,l,h),M.push(et[c]),M.push(nt[c])):66===c?(b=1-st(e,f,p),_=1-st(a,f,p),x=1-st(a,l,p),v=1-st(e,h,l),M.push(tt[c]),M.push(et[c])):104===c?(b=st(a,p,f),_=st(e,p,f),x=st(e,p,l),v=st(a,l,h),M.push(et[c]),M.push(it[c])):144===c?(w=st(e,f,h),O=st(e,p,l),x=st(a,p,l),m=1-st(a,h,l),M.push(Q[c]),M.push(rt[c])):26===c?(w=1-st(a,h,f),O=1-st(a,l,p),x=1-st(e,l,p),m=st(e,l,h),M.push(Q[c]),M.push(rt[c])):36===c?(E=st(a,f,h),b=st(e,p,f),v=st(e,l,h),m=st(a,l,h),M.push($[c]),M.push(tt[c])):134===c?(E=1-st(e,h,f),b=1-st(a,f,p),v=1-st(a,h,l),m=1-st(e,h,l),M.push($[c]),M.push(tt[c])):9===c?(w=1-st(e,h,f),E=1-st(a,h,f),_=st(a,p,f),O=1-st(e,l,p),M.push(Q[c]),M.push($[c])):161===c?(w=st(a,f,h),E=st(e,f,h),_=1-st(e,f,p),O=st(a,p,l),M.push(Q[c]),M.push($[c])):37===c?(E=st(a,f,h),O=1-st(e,l,p),v=st(e,l,h),m=st(a,l,h),M.push($[c]),M.push(nt[c])):133===c?(E=1-st(e,h,f),O=st(a,p,l),v=1-st(a,h,l),m=1-st(e,h,l),M.push($[c]),M.push(nt[c])):148===c?(b=st(e,p,f),O=st(e,p,l),x=st(a,p,l),m=1-st(a,h,l),M.push(tt[c]),M.push(rt[c])):22===c?(b=1-st(a,f,p),O=1-st(a,l,p),x=1-st(e,l,p),m=st(e,l,h),M.push(tt[c]),M.push(rt[c])):82===c?(w=st(e,f,h),b=1-st(e,f,p),_=1-st(a,f,p),x=1-st(a,l,p),M.push(Q[c]),M.push(et[c])):88===c?(w=1-st(a,h,f),b=st(a,p,f),_=st(e,p,f),x=st(e,p,l),M.push(Q[c]),M.push(et[c])):73===c?(w=1-st(e,h,f),E=1-st(a,h,f),_=st(a,p,f),v=1-st(e,h,l),M.push(Q[c]),M.push($[c])):97===c?(w=st(a,f,h),E=st(e,f,h),_=1-st(e,f,p),v=st(a,l,h),M.push(Q[c]),M.push($[c])):145===c?(w=st(e,f,h),_=1-st(e,f,p),O=st(a,p,l),m=1-st(a,h,l),M.push(Q[c]),M.push(nt[c])):25===c?(w=1-st(a,h,f),_=st(a,p,f),O=1-st(e,l,p),m=st(e,l,h),M.push(Q[c]),M.push(nt[c])):70===c?(E=1-st(e,h,f),b=1-st(a,f,p),x=1-st(a,l,p),v=1-st(e,h,l),M.push($[c]),M.push(tt[c])):100===c?(E=st(a,f,h),b=st(e,p,f),x=st(e,p,l),v=st(a,l,h),M.push($[c]),M.push(tt[c])):34===c?(0===g?(w=1-st(e,h,f),E=1-st(a,h,f),b=st(a,p,f),_=st(e,p,f),O=st(e,p,l),x=st(a,p,l),v=1-st(a,h,l),m=1-st(e,h,l)):(w=st(a,f,h),E=st(e,f,h),b=1-st(e,f,p),_=1-st(a,f,p),O=1-st(a,l,p),x=1-st(e,l,p),v=st(e,l,h),m=st(a,l,h)),M.push(Q[c]),M.push($[c]),M.push(nt[c]),M.push(rt[c])):35===c?(4===g?(w=1-st(e,h,f),E=1-st(a,h,f),b=st(a,p,f),_=st(e,p,f),O=st(e,p,l),x=st(a,p,l),v=1-st(a,h,l),m=1-st(e,h,l)):(w=st(a,f,h),E=st(e,f,h),b=1-st(e,f,p),_=1-st(a,f,p),O=1-st(a,l,p),x=1-st(e,l,p),v=st(e,l,h),m=st(a,l,h)),M.push(Q[c]),M.push($[c]),M.push(et[c]),M.push(rt[c])):136===c?(0===g?(w=st(a,f,h),E=st(e,f,h),b=1-st(e,f,p),_=1-st(a,f,p),O=1-st(a,l,p),x=1-st(e,l,p),v=st(e,l,h),m=st(a,l,h)):(w=1-st(e,h,f),E=1-st(a,h,f),b=st(a,p,f),_=st(e,p,f),O=st(e,p,l),x=st(a,p,l),v=1-st(a,h,l),m=1-st(e,h,l)),M.push(Q[c]),M.push($[c]),M.push(nt[c]),M.push(rt[c])):153===c?(0===g?(w=st(e,f,h),_=1-st(e,f,p),O=1-st(e,l,p),m=st(e,l,h)):(w=1-st(a,h,f),_=st(a,p,f),O=st(a,p,l),m=1-st(a,h,l)),M.push(Q[c]),M.push(et[c])):102===c?(0===g?(E=1-st(e,h,f),b=st(e,p,f),x=st(e,p,l),v=1-st(e,h,l)):(E=st(a,f,h),b=1-st(a,f,p),x=1-st(a,l,p),v=st(a,l,h)),M.push($[c]),M.push(rt[c])):155===c?(4===g?(w=st(e,f,h),_=1-st(e,f,p),O=1-st(e,l,p),m=st(e,l,h)):(w=1-st(a,h,f),_=st(a,p,f),O=st(a,p,l),m=1-st(a,h,l)),M.push(Q[c]),M.push(nt[c])):103===c?(4===g?(E=1-st(e,h,f),b=st(e,p,f),x=st(e,p,l),v=1-st(e,h,l)):(E=st(a,f,h),b=1-st(a,f,p),x=1-st(a,l,p),v=st(a,l,h)),M.push($[c]),M.push(tt[c])):152===c?(0===g?(w=st(e,f,h),b=1-st(e,f,p),_=1-st(a,f,p),O=1-st(a,l,p),x=1-st(e,l,p),m=st(e,l,h)):(w=1-st(a,h,f),b=st(a,p,f),_=st(e,p,f),O=st(e,p,l),x=st(a,p,l),m=1-st(a,h,l)),M.push(Q[c]),M.push(tt[c]),M.push(et[c])):156===c?(4===g?(w=st(e,f,h),b=1-st(e,f,p),_=1-st(a,f,p),O=1-st(a,l,p),x=1-st(e,l,p),m=st(e,l,h)):(w=1-st(a,h,f),b=st(a,p,f),_=st(e,p,f),O=st(e,p,l),x=st(a,p,l),m=1-st(a,h,l)),M.push(Q[c]),M.push(et[c]),M.push(rt[c])):137===c?(0===g?(w=st(a,f,h),E=st(e,f,h),_=1-st(e,f,p),O=1-st(e,l,p),v=st(e,l,h),m=st(a,l,h)):(w=1-st(e,h,f),E=1-st(a,h,f),_=st(a,p,f),O=st(a,p,l),v=1-st(a,h,l),m=1-st(e,h,l)),M.push(Q[c]),M.push($[c]),M.push(et[c])):139===c?(4===g?(w=st(a,f,h),E=st(e,f,h),_=1-st(e,f,p),O=1-st(e,l,p),v=st(e,l,h),m=st(a,l,h)):(w=1-st(e,h,f),E=1-st(a,h,f),_=st(a,p,f),O=st(a,p,l),v=1-st(a,h,l),m=1-st(e,h,l)),M.push(Q[c]),M.push($[c]),M.push(nt[c])):98===c?(0===g?(w=1-st(e,h,f),E=1-st(a,h,f),b=st(a,p,f),_=st(e,p,f),x=st(e,p,l),v=1-st(e,h,l)):(w=st(a,f,h),E=st(e,f,h),b=1-st(e,f,p),_=1-st(a,f,p),x=1-st(a,l,p),v=st(a,l,h)),M.push(Q[c]),M.push($[c]),M.push(rt[c])):99===c?(4===g?(w=1-st(e,h,f),E=1-st(a,h,f),b=st(a,p,f),_=st(e,p,f),x=st(e,p,l),v=1-st(e,h,l)):(w=st(a,f,h),E=st(e,f,h),b=1-st(e,f,p),_=1-st(a,f,p),x=1-st(a,l,p),v=st(a,l,h)),M.push(Q[c]),M.push($[c]),M.push(et[c])):38===c?(0===g?(E=1-st(e,h,f),b=st(e,p,f),O=st(e,p,l),x=st(a,p,l),v=1-st(a,h,l),m=1-st(e,h,l)):(E=st(a,f,h),b=1-st(a,f,p),O=1-st(a,l,p),x=1-st(e,l,p),v=st(e,l,h),m=st(a,l,h)),M.push($[c]),M.push(nt[c]),M.push(rt[c])):39===c?(4===g?(E=1-st(e,h,f),b=st(e,p,f),O=st(e,p,l),x=st(a,p,l),v=1-st(a,h,l),m=1-st(e,h,l)):(E=st(a,f,h),b=1-st(a,f,p),O=1-st(a,l,p),x=1-st(e,l,p),v=st(e,l,h),m=st(a,l,h)),M.push($[c]),M.push(tt[c]),M.push(rt[c])):85===c&&(w=1,E=0,b=1,_=0,O=0,x=1,v=0,m=1),(v<0||v>1||m<0||m>1||w<0||w>1||b<0||b>1||O<0||O>1||x<0||x>1)&&console.log("MarchingSquaresJS-isoBands: "+c+" "+d+" "+l+","+h+","+f+","+p+" "+g+" "+v+" "+m+" "+w+" "+E+" "+b+" "+_+" "+O+" "+x),o.cells[s][u]={cval:c,cval_real:d,flipped:g,topleft:v,topright:m,righttop:w,rightbottom:E,bottomright:b,bottomleft:_,leftbottom:O,lefttop:x,edges:M}}}}}return o}(t,e,n);return d.polygons?(d.verbose&&console.log("MarchingSquaresJS-isoBands: returning single polygons for each grid cell"),u=function(t){var e=[],n=0;return t.cells.forEach(function(t,r){t.forEach(function(t,i){if(void 0!==t){var o=at[t.cval](t);"object"==typeof o&&ut(o)?"object"==typeof o[0]&&ut(o[0])?"object"==typeof o[0][0]&&ut(o[0][0])?o.forEach(function(t){t.forEach(function(t){t[0]+=i,t[1]+=r}),e[n++]=t}):(o.forEach(function(t){t[0]+=i,t[1]+=r}),e[n++]=o):console.log("MarchingSquaresJS-isoBands: bandcell polygon with malformed coordinates"):console.log("MarchingSquaresJS-isoBands: bandcell polygon with null coordinates")}})}),e}(c)):(d.verbose&&console.log("MarchingSquaresJS-isoBands: returning polygon paths for entire data grid"),u=function(t){for(var e=[],n=t.rows,r=t.cols,i=[],o=0;o0){var s=t.cells[o][a],u=lt(s),c=null,l=a,h=o;null!==u&&i.push([u.p[0]+l,u.p[1]+h]);do{if(null===(c=ht(t.cells[h][l],u.x,u.y,u.o)))break;if(i.push([c.p[0]+l,c.p[1]+h]),l+=c.x,h+=c.y,u=c,h<0||h>=n||l<0||l>=r||void 0===t.cells[h][l]){l-=c.x,h-=c.y;var f=ct(t,l,h,c.x,c.y,c.o);if(null===f)break;f.path.forEach(function(t){i.push(t)}),l=f.i,h=f.j,u=f}}while(void 0!==t.cells[h][l]&&t.cells[h][l].edges.length>0);e.push(i),i=[],t.cells[o][a].edges.length>0&&a--}return e}(c)),"function"==typeof d.successCallback&&d.successCallback(u),u}var y=64,v=16,m=4,_=1,b=[],w=[],E=[],x=[],O=[],M=[],S=[],P=[],C=[],T=[],I=[],L=[],A=[],N=[],k=[],j=[],R=[],D=[],F=[],z=[],B=[],q=[],G=[],U=[];S[85]=T[85]=-1,P[85]=I[85]=0,C[85]=L[85]=1,F[85]=q[85]=1,z[85]=G[85]=0,B[85]=U[85]=1,b[85]=x[85]=0,w[85]=O[85]=-1,E[85]=k[85]=0,j[85]=A[85]=0,R[85]=N[85]=1,M[85]=D[85]=1,q[1]=q[169]=0,G[1]=G[169]=-1,U[1]=U[169]=0,A[1]=A[169]=-1,N[1]=N[169]=0,k[1]=k[169]=0,T[4]=T[166]=0,I[4]=I[166]=-1,L[4]=L[166]=1,j[4]=j[166]=1,R[4]=R[166]=0,D[4]=D[166]=0,S[16]=S[154]=0,P[16]=P[154]=1,C[16]=C[154]=1,x[16]=x[154]=1,O[16]=O[154]=0,M[16]=M[154]=1,F[64]=F[106]=0,z[64]=z[106]=1,B[64]=B[106]=0,b[64]=b[106]=-1,w[64]=w[106]=0,E[64]=E[106]=1,F[2]=F[168]=0,z[2]=z[168]=-1,B[2]=B[168]=1,q[2]=q[168]=0,G[2]=G[168]=-1,U[2]=U[168]=0,A[2]=A[168]=-1,N[2]=N[168]=0,k[2]=k[168]=0,j[2]=j[168]=-1,R[2]=R[168]=0,D[2]=D[168]=1,S[8]=S[162]=0,P[8]=P[162]=-1,C[8]=C[162]=0,T[8]=T[162]=0,I[8]=I[162]=-1,L[8]=L[162]=1,A[8]=A[162]=1,N[8]=N[162]=0,k[8]=k[162]=1,j[8]=j[162]=1,R[8]=R[162]=0,D[8]=D[162]=0,S[32]=S[138]=0,P[32]=P[138]=1,C[32]=C[138]=1,T[32]=T[138]=0,I[32]=I[138]=1,L[32]=L[138]=0,b[32]=b[138]=1,w[32]=w[138]=0,E[32]=E[138]=0,x[32]=x[138]=1,O[32]=O[138]=0,M[32]=M[138]=1,q[128]=q[42]=0,G[128]=G[42]=1,U[128]=U[42]=1,F[128]=F[42]=0,z[128]=z[42]=1,B[128]=B[42]=0,b[128]=b[42]=-1,w[128]=w[42]=0,E[128]=E[42]=1,x[128]=x[42]=-1,O[128]=O[42]=0,M[128]=M[42]=0,T[5]=T[165]=-1,I[5]=I[165]=0,L[5]=L[165]=0,q[5]=q[165]=1,G[5]=G[165]=0,U[5]=U[165]=0,j[20]=j[150]=0,R[20]=R[150]=1,D[20]=D[150]=1,x[20]=x[150]=0,O[20]=O[150]=-1,M[20]=M[150]=1,S[80]=S[90]=-1,P[80]=P[90]=0,C[80]=C[90]=1,F[80]=F[90]=1,z[80]=z[90]=0,B[80]=B[90]=1,A[65]=A[105]=0,N[65]=N[105]=1,k[65]=k[105]=0,b[65]=b[105]=0,w[65]=w[105]=-1,E[65]=E[105]=0,S[160]=S[10]=-1,P[160]=P[10]=0,C[160]=C[10]=1,T[160]=T[10]=-1,I[160]=I[10]=0,L[160]=L[10]=0,q[160]=q[10]=1,G[160]=G[10]=0,U[160]=U[10]=0,F[160]=F[10]=1,z[160]=z[10]=0,B[160]=B[10]=1,j[130]=j[40]=0,R[130]=R[40]=1,D[130]=D[40]=1,A[130]=A[40]=0,N[130]=N[40]=1,k[130]=k[40]=0,b[130]=b[40]=0,w[130]=w[40]=-1,E[130]=E[40]=0,x[130]=x[40]=0,O[130]=O[40]=-1,M[130]=M[40]=1,T[37]=T[133]=0,I[37]=I[133]=1,L[37]=L[133]=1,q[37]=q[133]=0,G[37]=G[133]=1,U[37]=U[133]=0,b[37]=b[133]=-1,w[37]=w[133]=0,E[37]=E[133]=0,x[37]=x[133]=1,O[37]=O[133]=0,M[37]=M[133]=0,j[148]=j[22]=-1,R[148]=R[22]=0,D[148]=D[22]=0,q[148]=q[22]=0,G[148]=G[22]=-1,U[148]=U[22]=1,F[148]=F[22]=0,z[148]=z[22]=1,B[148]=B[22]=1,x[148]=x[22]=-1,O[148]=O[22]=0,M[148]=M[22]=1,S[82]=S[88]=0,P[82]=P[88]=-1,C[82]=C[88]=1,j[82]=j[88]=1,R[82]=R[88]=0,D[82]=D[88]=1,A[82]=A[88]=-1,N[82]=N[88]=0,k[82]=k[88]=1,F[82]=F[88]=0,z[82]=z[88]=-1,B[82]=B[88]=0,S[73]=S[97]=0,P[73]=P[97]=1,C[73]=C[97]=0,T[73]=T[97]=0,I[73]=I[97]=-1,L[73]=L[97]=0,A[73]=A[97]=1,N[73]=N[97]=0,k[73]=k[97]=0,b[73]=b[97]=1,w[73]=w[97]=0,E[73]=E[97]=1,S[145]=S[25]=0,P[145]=P[25]=-1,C[145]=C[25]=0,A[145]=A[25]=1,N[145]=N[25]=0,k[145]=k[25]=1,q[145]=q[25]=0,G[145]=G[25]=1,U[145]=U[25]=1,x[145]=x[25]=-1,O[145]=O[25]=0,M[145]=M[25]=0,T[70]=T[100]=0,I[70]=I[100]=1,L[70]=L[100]=0,j[70]=j[100]=-1,R[70]=R[100]=0,D[70]=D[100]=1,F[70]=F[100]=0,z[70]=z[100]=-1,B[70]=B[100]=1,b[70]=b[100]=1,w[70]=w[100]=0,E[70]=E[100]=0,T[101]=T[69]=0,I[101]=I[69]=1,L[101]=L[69]=0,b[101]=b[69]=1,w[101]=w[69]=0,E[101]=E[69]=0,q[149]=q[21]=0,G[149]=G[21]=1,U[149]=U[21]=1,x[149]=x[21]=-1,O[149]=O[21]=0,M[149]=M[21]=0,j[86]=j[84]=-1,R[86]=R[84]=0,D[86]=D[84]=1,F[86]=F[84]=0,z[86]=z[84]=-1,B[86]=B[84]=1,S[89]=S[81]=0,P[89]=P[81]=-1,C[89]=C[81]=0,A[89]=A[81]=1,N[89]=N[81]=0,k[89]=k[81]=1,S[96]=S[74]=0,P[96]=P[74]=1,C[96]=C[74]=0,T[96]=T[74]=-1,I[96]=I[74]=0,L[96]=L[74]=1,F[96]=F[74]=1,z[96]=z[74]=0,B[96]=B[74]=0,b[96]=b[74]=1,w[96]=w[74]=0,E[96]=E[74]=1,S[24]=S[146]=0,P[24]=P[146]=-1,C[24]=C[146]=1,j[24]=j[146]=1,R[24]=R[146]=0,D[24]=D[146]=1,A[24]=A[146]=0,N[24]=N[146]=1,k[24]=k[146]=1,x[24]=x[146]=0,O[24]=O[146]=-1,M[24]=M[146]=0,T[6]=T[164]=-1,I[6]=I[164]=0,L[6]=L[164]=1,j[6]=j[164]=-1,R[6]=R[164]=0,D[6]=D[164]=0,q[6]=q[164]=0,G[6]=G[164]=-1,U[6]=U[164]=1,F[6]=F[164]=1,z[6]=z[164]=0,B[6]=B[164]=0,A[129]=A[41]=0,N[129]=N[41]=1,k[129]=k[41]=1,q[129]=q[41]=0,G[129]=G[41]=1,U[129]=U[41]=0,b[129]=b[41]=-1,w[129]=w[41]=0,E[129]=E[41]=0,x[129]=x[41]=0,O[129]=O[41]=-1,M[129]=M[41]=0,j[66]=j[104]=0,R[66]=R[104]=1,D[66]=D[104]=0,A[66]=A[104]=-1,N[66]=N[104]=0,k[66]=k[104]=1,F[66]=F[104]=0,z[66]=z[104]=-1,B[66]=B[104]=0,b[66]=b[104]=0,w[66]=w[104]=-1,E[66]=E[104]=1,S[144]=S[26]=-1,P[144]=P[26]=0,C[144]=C[26]=0,q[144]=q[26]=1,G[144]=G[26]=0,U[144]=U[26]=1,F[144]=F[26]=0,z[144]=z[26]=1,B[144]=B[26]=1,x[144]=x[26]=-1,O[144]=O[26]=0,M[144]=M[26]=1,T[36]=T[134]=0,I[36]=I[134]=1,L[36]=L[134]=1,j[36]=j[134]=0,R[36]=R[134]=1,D[36]=D[134]=0,b[36]=b[134]=0,w[36]=w[134]=-1,E[36]=E[134]=1,x[36]=x[134]=1,O[36]=O[134]=0,M[36]=M[134]=0,S[9]=S[161]=-1,P[9]=P[161]=0,C[9]=C[161]=0,T[9]=T[161]=0,I[9]=I[161]=-1,L[9]=L[161]=0,A[9]=A[161]=1,N[9]=N[161]=0,k[9]=k[161]=0,q[9]=q[161]=1,G[9]=G[161]=0,U[9]=U[161]=1,S[136]=0,P[136]=1,C[136]=1,T[136]=0,I[136]=1,L[136]=0,j[136]=-1,R[136]=0,D[136]=1,A[136]=-1,N[136]=0,k[136]=0,q[136]=0,G[136]=-1,U[136]=0,F[136]=0,z[136]=-1,B[136]=1,b[136]=1,w[136]=0,E[136]=0,x[136]=1,O[136]=0,M[136]=1,S[34]=0,P[34]=-1,C[34]=0,T[34]=0,I[34]=-1,L[34]=1,j[34]=1,R[34]=0,D[34]=0,A[34]=1,N[34]=0,k[34]=1,q[34]=0,G[34]=1,U[34]=1,F[34]=0,z[34]=1,B[34]=0,b[34]=-1,w[34]=0,E[34]=1,x[34]=-1,O[34]=0,M[34]=0,S[35]=0,P[35]=1,C[35]=1,T[35]=0,I[35]=-1,L[35]=1,j[35]=1,R[35]=0,D[35]=0,A[35]=-1,N[35]=0,k[35]=0,q[35]=0,G[35]=-1,U[35]=0,F[35]=0,z[35]=1,B[35]=0,b[35]=-1,w[35]=0,E[35]=1,x[35]=1,O[35]=0,M[35]=1,S[153]=0,P[153]=1,C[153]=1,A[153]=-1,N[153]=0,k[153]=0,q[153]=0,G[153]=-1,U[153]=0,x[153]=1,O[153]=0,M[153]=1,T[102]=0,I[102]=-1,L[102]=1,j[102]=1,R[102]=0,D[102]=0,F[102]=0,z[102]=1,B[102]=0,b[102]=-1,w[102]=0,E[102]=1,S[155]=0,P[155]=-1,C[155]=0,A[155]=1,N[155]=0,k[155]=1,q[155]=0,G[155]=1,U[155]=1,x[155]=-1,O[155]=0,M[155]=0,T[103]=0,I[103]=1,L[103]=0,j[103]=-1,R[103]=0,D[103]=1,F[103]=0,z[103]=-1,B[103]=1,b[103]=1,w[103]=0,E[103]=0,S[152]=0,P[152]=1,C[152]=1,j[152]=-1,R[152]=0,D[152]=1,A[152]=-1,N[152]=0,k[152]=0,q[152]=0,G[152]=-1,U[152]=0,F[152]=0,z[152]=-1,B[152]=1,x[152]=1,O[152]=0,M[152]=1,S[156]=0,P[156]=-1,C[156]=1,j[156]=1,R[156]=0,D[156]=1,A[156]=-1,N[156]=0,k[156]=0,q[156]=0,G[156]=-1,U[156]=0,F[156]=0,z[156]=1,B[156]=1,x[156]=-1,O[156]=0,M[156]=1,S[137]=0,P[137]=1,C[137]=1,T[137]=0,I[137]=1,L[137]=0,A[137]=-1,N[137]=0,k[137]=0,q[137]=0,G[137]=-1,U[137]=0,b[137]=1,w[137]=0,E[137]=0,x[137]=1,O[137]=0,M[137]=1,S[139]=0,P[139]=1,C[139]=1,T[139]=0,I[139]=-1,L[139]=0,A[139]=1,N[139]=0,k[139]=0,q[139]=0,G[139]=1,U[139]=0,b[139]=-1,w[139]=0,E[139]=0,x[139]=1,O[139]=0,M[139]=1,S[98]=0,P[98]=-1,C[98]=0,T[98]=0,I[98]=-1,L[98]=1,j[98]=1,R[98]=0,D[98]=0,A[98]=1,N[98]=0,k[98]=1,F[98]=0,z[98]=1,B[98]=0,b[98]=-1,w[98]=0,E[98]=1,S[99]=0,P[99]=1,C[99]=0,T[99]=0,I[99]=-1,L[99]=1,j[99]=1,R[99]=0,D[99]=0,A[99]=-1,N[99]=0,k[99]=1,F[99]=0,z[99]=-1,B[99]=0,b[99]=1,w[99]=0,E[99]=1,T[38]=0,I[38]=-1,L[38]=1,j[38]=1,R[38]=0,D[38]=0,q[38]=0,G[38]=1,U[38]=1,F[38]=0,z[38]=1,B[38]=0,b[38]=-1,w[38]=0,E[38]=1,x[38]=-1,O[38]=0,M[38]=0,T[39]=0,I[39]=1,L[39]=1,j[39]=-1,R[39]=0,D[39]=0,q[39]=0,G[39]=-1,U[39]=1,F[39]=0,z[39]=1,B[39]=0,b[39]=-1,w[39]=0,E[39]=1,x[39]=1,O[39]=0,M[39]=0;var V=function(t){return[[t.bottomleft,0],[0,0],[0,t.leftbottom]]},J=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0]]},H=function(t){return[[t.topright,1],[1,1],[1,t.righttop]]},Y=function(t){return[[0,t.lefttop],[0,1],[t.topleft,1]]},X=function(t){return[[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop]]},Z=function(t){return[[t.bottomright,0],[t.bottomleft,0],[1,t.righttop],[1,t.rightbottom]]},W=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.topleft,1],[t.topright,1]]},K=function(t){return[[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]},Q=[],$=[],tt=[],et=[],nt=[],rt=[],it=[],ot=[];et[1]=nt[1]=18,et[169]=nt[169]=18,tt[4]=$[4]=12,tt[166]=$[166]=12,Q[16]=ot[16]=4,Q[154]=ot[154]=4,rt[64]=it[64]=22,rt[106]=it[106]=22,tt[2]=rt[2]=17,et[2]=nt[2]=18,tt[168]=rt[168]=17,et[168]=nt[168]=18,Q[8]=et[8]=9,$[8]=tt[8]=12,Q[162]=et[162]=9,$[162]=tt[162]=12,Q[32]=ot[32]=4,$[32]=it[32]=1,Q[138]=ot[138]=4,$[138]=it[138]=1,nt[128]=ot[128]=21,rt[128]=it[128]=22,nt[42]=ot[42]=21,rt[42]=it[42]=22,$[5]=nt[5]=14,$[165]=nt[165]=14,tt[20]=ot[20]=6,tt[150]=ot[150]=6,Q[80]=rt[80]=11,Q[90]=rt[90]=11,et[65]=it[65]=3,et[105]=it[105]=3,Q[160]=rt[160]=11,$[160]=nt[160]=14,Q[10]=rt[10]=11,$[10]=nt[10]=14,tt[130]=ot[130]=6,et[130]=it[130]=3,tt[40]=ot[40]=6,et[40]=it[40]=3,$[101]=it[101]=1,$[69]=it[69]=1,nt[149]=ot[149]=21,nt[21]=ot[21]=21,tt[86]=rt[86]=17,tt[84]=rt[84]=17,Q[89]=et[89]=9,Q[81]=et[81]=9,Q[96]=it[96]=0,$[96]=rt[96]=15,Q[74]=it[74]=0,$[74]=rt[74]=15,Q[24]=tt[24]=8,et[24]=ot[24]=7,Q[146]=tt[146]=8,et[146]=ot[146]=7,$[6]=rt[6]=15,tt[6]=nt[6]=16,$[164]=rt[164]=15,tt[164]=nt[164]=16,et[129]=ot[129]=7,nt[129]=it[129]=20,et[41]=ot[41]=7,nt[41]=it[41]=20,tt[66]=it[66]=2,et[66]=rt[66]=19,tt[104]=it[104]=2,et[104]=rt[104]=19,Q[144]=nt[144]=10,rt[144]=ot[144]=23,Q[26]=nt[26]=10,rt[26]=ot[26]=23,$[36]=ot[36]=5,tt[36]=it[36]=2,$[134]=ot[134]=5,tt[134]=it[134]=2,Q[9]=nt[9]=10,$[9]=et[9]=13,Q[161]=nt[161]=10,$[161]=et[161]=13,$[37]=ot[37]=5,nt[37]=it[37]=20,$[133]=ot[133]=5,nt[133]=it[133]=20,tt[148]=nt[148]=16,rt[148]=ot[148]=23,tt[22]=nt[22]=16,rt[22]=ot[22]=23,Q[82]=tt[82]=8,et[82]=rt[82]=19,Q[88]=tt[88]=8,et[88]=rt[88]=19,Q[73]=it[73]=0,$[73]=et[73]=13,Q[97]=it[97]=0,$[97]=et[97]=13,Q[145]=et[145]=9,nt[145]=ot[145]=21,Q[25]=et[25]=9,nt[25]=ot[25]=21,$[70]=it[70]=1,tt[70]=rt[70]=17,$[100]=it[100]=1,tt[100]=rt[100]=17,Q[34]=et[34]=9,$[34]=tt[34]=12,nt[34]=ot[34]=21,rt[34]=it[34]=22,Q[136]=ot[136]=4,$[136]=it[136]=1,tt[136]=rt[136]=17,et[136]=nt[136]=18,Q[35]=ot[35]=4,$[35]=tt[35]=12,et[35]=nt[35]=18,rt[35]=it[35]=22,Q[153]=ot[153]=4,et[153]=nt[153]=18,$[102]=tt[102]=12,rt[102]=it[102]=22,Q[155]=et[155]=9,nt[155]=ot[155]=23,$[103]=it[103]=1,tt[103]=rt[103]=17,Q[152]=ot[152]=4,tt[152]=rt[152]=17,et[152]=nt[152]=18,Q[156]=tt[156]=8,et[156]=nt[156]=18,rt[156]=ot[156]=23,Q[137]=ot[137]=4,$[137]=it[137]=1,et[137]=nt[137]=18,Q[139]=ot[139]=4,$[139]=et[139]=13,nt[139]=it[139]=20,Q[98]=et[98]=9,$[98]=tt[98]=12,rt[98]=it[98]=22,Q[99]=it[99]=0,$[99]=tt[99]=12,et[99]=rt[99]=19,$[38]=tt[38]=12,nt[38]=ot[38]=21,rt[38]=it[38]=22,$[39]=ot[39]=5,tt[39]=nt[39]=16,rt[39]=it[39]=22;var at=[];function st(t,e,n){return(t-e)/(n-e)}function ut(t){return t.constructor.toString().indexOf("Array")>-1}function ct(t,e,n,r,i,o){for(var a=t.cells[n][e],s=a.cval_real,u=e+r,c=n+i,l=[],h=!1;!h;){if(void 0===t.cells[c]||void 0===t.cells[c][u])if(c-=i,u-=r,s=(a=t.cells[c][u]).cval_real,-1===i)if(0===o)if(s&_)l.push([u,c]),r=-1,i=0,o=0;else{if(!(s&m)){l.push([u+a.bottomright,c]),r=0,i=1,o=1,h=!0;break}l.push([u+1,c]),r=1,i=0,o=0}else{if(!(s&_)){if(s&m){l.push([u+a.bottomright,c]),r=0,i=1,o=1,h=!0;break}l.push([u+a.bottomleft,c]),r=0,i=1,o=0,h=!0;break}l.push([u,c]),r=-1,i=0,o=0}else if(1===i)if(0===o){if(!(s&v)){if(s&y){l.push([u+a.topleft,c+1]),r=0,i=-1,o=0,h=!0;break}l.push([u+a.topright,c+1]),r=0,i=-1,o=1,h=!0;break}l.push([u+1,c+1]),r=1,i=0,o=1}else l.push([u+1,c+1]),r=1,i=0,o=1;else if(-1===r)if(0===o){if(!(s&y)){if(s&_){l.push([u,c+a.leftbottom]),r=1,i=0,o=0,h=!0;break}l.push([u,c+a.lefttop]),r=1,i=0,o=1,h=!0;break}l.push([u,c+1]),r=0,i=1,o=0}else{if(!(s&y)){console.log("MarchingSquaresJS-isoBands: wtf");break}l.push([u,c+1]),r=0,i=1,o=0}else{if(1!==r){console.log("MarchingSquaresJS-isoBands: we came from nowhere!");break}if(0===o){if(!(s&m)){l.push([u+1,c+a.rightbottom]),r=-1,i=0,o=0,h=!0;break}l.push([u+1,c]),r=0,i=-1,o=1}else{if(!(s&m)){if(s&v){l.push([u+1,c+a.righttop]),r=-1,i=0,o=1;break}l.push([u+1,c+a.rightbottom]),r=-1,i=0,o=0,h=!0;break}l.push([u+1,c]),r=0,i=-1,o=1}}else if(s=(a=t.cells[c][u]).cval_real,-1===r)if(0===o)if(void 0!==t.cells[c-1]&&void 0!==t.cells[c-1][u])r=0,i=-1,o=1;else{if(!(s&_)){l.push([u+a.bottomright,c]),r=0,i=1,o=1,h=!0;break}l.push([u,c])}else{if(!(s&y)){console.log("MarchingSquaresJS-isoBands: found entry from top at "+u+","+c);break}console.log("MarchingSquaresJS-isoBands: proceeding in x-direction!")}else if(1===r){if(0===o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==t.cells[c+1]&&void 0!==t.cells[c+1][u])r=0,i=1,o=0;else{if(!(s&v)){l.push([u+a.topleft,c+1]),r=0,i=-1,o=0,h=!0;break}l.push([u+1,c+1]),r=1,i=0,o=1}}else if(-1===i){if(1!==o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==t.cells[c][u+1])r=1,i=0,o=1;else{if(!(s&m)){l.push([u+1,c+a.righttop]),r=-1,i=0,o=1,h=!0;break}l.push([u+1,c]),r=0,i=-1,o=1}}else{if(1!==i){console.log("MarchingSquaresJS-isoBands: where did we came from???");break}if(0!==o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==t.cells[c][u-1])r=-1,i=0,o=0;else{if(!(s&y)){l.push([u,c+a.leftbottom]),r=1,i=0,o=0,h=!0;break}l.push([u,c+1]),r=0,i=1,o=0}}if(c+=i,(u+=r)===e&&c===n)break}return{path:l,i:u,j:c,x:r,y:i,o:o}}function lt(t){if(t.edges.length>0){var e=t.edges[t.edges.length-1],n=t.cval_real;switch(e){case 0:return n&v?{p:[1,t.righttop],x:-1,y:0,o:1}:{p:[t.topleft,1],x:0,y:-1,o:0};case 1:return n&m?{p:[t.topleft,1],x:0,y:-1,o:0}:{p:[1,t.rightbottom],x:-1,y:0,o:0};case 2:return n&m?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[t.topleft,1],x:0,y:-1,o:0};case 3:return n&_?{p:[t.topleft,1],x:0,y:-1,o:0}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 4:return n&v?{p:[1,t.righttop],x:-1,y:0,o:1}:{p:[t.topright,1],x:0,y:-1,o:1};case 5:return n&m?{p:[t.topright,1],x:0,y:-1,o:1}:{p:[1,t.rightbottom],x:-1,y:0,o:0};case 6:return n&m?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[t.topright,1],x:0,y:-1,o:1};case 7:return n&_?{p:[t.topright,1],x:0,y:-1,o:1}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 8:return n&m?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[1,t.righttop],x:-1,y:0,o:1};case 9:return n&_?{p:[1,t.righttop],x:-1,y:0,o:1}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 10:return n&_?{p:[0,t.leftbottom],x:1,y:0,o:0}:{p:[1,t.righttop],x:-1,y:0,o:1};case 11:return n&y?{p:[1,t.righttop],x:-1,y:0,o:1}:{p:[0,t.lefttop],x:1,y:0,o:1};case 12:return n&m?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[1,t.rightbottom],x:-1,y:0,o:0};case 13:return n&_?{p:[1,t.rightbottom],x:-1,y:0,o:0}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 14:return n&_?{p:[0,t.leftbottom],x:1,y:0,o:0}:{p:[1,t.rightbottom],x:-1,y:0,o:0};case 15:return n&y?{p:[1,t.rightbottom],x:-1,y:0,o:0}:{p:[0,t.lefttop],x:1,y:0,o:1};case 16:return n&m?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[0,t.leftbottom],x:1,y:0,o:0};case 17:return n&y?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[0,t.lefttop],x:1,y:0,o:1};case 18:return n&_?{p:[0,t.leftbottom],x:1,y:0,o:0}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 19:return n&y?{p:[t.bottomleft,0],x:0,y:1,o:0}:{p:[0,t.lefttop],x:1,y:0,o:1};case 20:return n&y?{p:[t.topleft,1],x:0,y:-1,o:0}:{p:[0,t.leftbottom],x:1,y:0,o:0};case 21:return n&v?{p:[0,t.leftbottom],x:1,y:0,o:0}:{p:[t.topright,1],x:0,y:-1,o:1};case 22:return n&y?{p:[t.topleft,1],x:0,y:-1,o:0}:{p:[0,t.lefttop],x:1,y:0,o:1};case 23:return n&v?{p:[0,t.lefttop],x:1,y:0,o:1}:{p:[t.topright,1],x:0,y:-1,o:1};default:console.log("MarchingSquaresJS-isoBands: edge index out of range!"),console.log(t)}}return null}function ht(t,e,n,r){var i,o,a,s,u,c=t.cval;switch(e){case-1:switch(r){case 0:i=$[c],a=T[c],s=I[c],u=L[c];break;default:i=Q[c],a=S[c],s=P[c],u=C[c]}break;case 1:switch(r){case 0:i=nt[c],a=q[c],s=G[c],u=U[c];break;default:i=rt[c],a=F[c],s=z[c],u=B[c]}break;default:switch(n){case-1:switch(r){case 0:i=it[c],a=b[c],s=w[c],u=E[c];break;default:i=ot[c],a=x[c],s=O[c],u=M[c]}break;case 1:switch(r){case 0:i=et[c],a=A[c],s=N[c],u=k[c];break;default:i=tt[c],a=j[c],s=R[c],u=D[c]}}}if(o=t.edges.indexOf(i),void 0===t.edges[o])return null;switch(function(t,e){delete t.edges[e];for(var n=e+1;n0){var i=r[e-1],o=u(n,i);!1!==o&&(i[1]=o,n[0]=o),c.push(i[0]),e===s.length-2&&(c.push(n[0]),c.push(n[1]))}2===s.length&&(c.push(n[0]),c.push(n[1]))}var l,h,f,p,d,g,y,v}),Object(o.lineString)(c,t.properties)}e.a=function(t,e,n){if(n=n||{},!Object(o.isObject)(n))throw new Error("options is invalid");var a=n.units;if(!t)throw new Error("geojson is required");if(void 0===e||null===e||isNaN(e))throw new Error("distance is required");var s=Object(i.getType)(t),u=t.properties;switch(s){case"LineString":return c(t,e,a);case"MultiLineString":var l=[];return Object(r.flattenEach)(t,function(t){l.push(c(t,e,a).geometry.coordinates)}),Object(o.multiLineString)(l,u);default:throw new Error("geometry "+s+" is not supported")}}},function(t,e,n){"use strict";e.a=function(t){var e=i.a.fromGeoJson(t);e.deleteDangles(),e.deleteCutEdges();var n=[],a=[];return e.getEdgeRings().filter(function(t){return t.isValid()}).forEach(function(t){t.isHole()?n.push(t):a.push(t)}),n.forEach(function(t){o.a.findEdgeRingContaining(t,a)&&a.push(t)}),Object(r.featureCollection)(a.map(function(t){return t.toPolygon()}))};var r=n(0),i=n(286),o=n(142)},function(t,e,n){"use strict";var r=n(287),i=n(288),o=n(142),a=n(1),s=n(2);var u=function(){function t(){this.edges=[],this.nodes={}}return t.fromGeoJson=function(e){!function(t){if(!t)throw new Error("No geojson passed");if("FeatureCollection"!==t.type&&"GeometryCollection"!==t.type&&"MultiLineString"!==t.type&&"LineString"!==t.type&&"Feature"!==t.type)throw new Error("Invalid input type '"+t.type+"'. Geojson must be FeatureCollection, GeometryCollection, LineString, MultiLineString or Feature")}(e);var n=new t;return Object(a.flattenEach)(e,function(t){Object(s.featureOf)(t,"LineString","Graph::fromGeoJson"),Object(a.coordReduce)(t,function(t,e){if(t){var r=n.getNode(t),i=n.getNode(e);n.addEdge(r,i)}return e})}),n},t.prototype.getNode=function(t){var e=r.a.buildId(t),n=this.nodes[e];return n||(n=this.nodes[e]=new r.a(t)),n},t.prototype.addEdge=function(t,e){var n=new i.a(t,e),r=n.getSymetric();this.edges.push(n),this.edges.push(r)},t.prototype.deleteDangles=function(){var t=this;Object.keys(this.nodes).map(function(e){return t.nodes[e]}).forEach(function(e){return t._removeIfDangle(e)})},t.prototype._removeIfDangle=function(t){var e=this;if(t.innerEdges.length<=1){var n=t.getOuterEdges().map(function(t){return t.to});this.removeNode(t),n.forEach(function(t){return e._removeIfDangle(t)})}},t.prototype.deleteCutEdges=function(){var t=this;this._computeNextCWEdges(),this._findLabeledEdgeRings(),this.edges.forEach(function(e){e.label===e.symetric.label&&(t.removeEdge(e.symetric),t.removeEdge(e))})},t.prototype._computeNextCWEdges=function(t){var e=this;void 0===t?Object.keys(this.nodes).forEach(function(t){return e._computeNextCWEdges(e.nodes[t])}):t.getOuterEdges().forEach(function(e,n){t.getOuterEdge((0===n?t.getOuterEdges().length:n)-1).symetric.next=e})},t.prototype._computeNextCCWEdges=function(t,e){for(var n,r,i=t.getOuterEdges(),o=i.length-1;o>=0;--o){var a=i[o],s=a.symetric,u=void 0,c=void 0;a.label===e&&(u=a),s.label===e&&(c=s),u&&c&&(c&&(r=c),u&&(r&&(r.next=u,r=void 0),n||(n=u)))}r&&(r.next=n)},t.prototype._findLabeledEdgeRings=function(){var t=[],e=0;return this.edges.forEach(function(n){if(!(n.label>=0)){t.push(n);var r=n;do{r.label=e,r=r.next}while(!n.isEqual(r));e++}}),t},t.prototype.getEdgeRings=function(){var t=this;this._computeNextCWEdges(),this.edges.forEach(function(t){t.label=void 0}),this._findLabeledEdgeRings().forEach(function(e){t._findIntersectionNodes(e).forEach(function(n){t._computeNextCCWEdges(n,e.label)})});var e=[];return this.edges.forEach(function(n){n.ring||e.push(t._findEdgeRing(n))}),e},t.prototype._findIntersectionNodes=function(t){var e=[],n=t,r=function(){var r=0;n.from.getOuterEdges().forEach(function(e){e.label===t.label&&++r}),r>1&&e.push(n.from),n=n.next};do{r()}while(!t.isEqual(n));return e},t.prototype._findEdgeRing=function(t){var e=t,n=new o.a;do{n.push(e),e.ring=n,e=e.next}while(!t.isEqual(e));return n},t.prototype.removeNode=function(t){var e=this;t.getOuterEdges().forEach(function(t){return e.removeEdge(t)}),t.innerEdges.forEach(function(t){return e.removeEdge(t)}),delete this.nodes[t.id]},t.prototype.removeEdge=function(t){this.edges=this.edges.filter(function(e){return!e.isEqual(t)}),t.deleteEdge()},t}();e.a=u},function(t,e,n){"use strict";var r=n(84),i=function(){function t(e){this.id=t.buildId(e),this.coordinates=e,this.innerEdges=[],this.outerEdges=[],this.outerEdgesSorted=!1}return t.buildId=function(t){return t.join(",")},t.prototype.removeInnerEdge=function(t){this.innerEdges=this.innerEdges.filter(function(e){return e.from.id!==t.from.id})},t.prototype.removeOuterEdge=function(t){this.outerEdges=this.outerEdges.filter(function(e){return e.to.id!==t.to.id})},t.prototype.addOuterEdge=function(t){this.outerEdges.push(t),this.outerEdgesSorted=!1},t.prototype.sortOuterEdges=function(){var t=this;this.outerEdgesSorted||(this.outerEdges.sort(function(e,n){var i=e.to,o=n.to;if(i.coordinates[0]-t.coordinates[0]>=0&&o.coordinates[0]-t.coordinates[0]<0)return 1;if(i.coordinates[0]-t.coordinates[0]<0&&o.coordinates[0]-t.coordinates[0]>=0)return-1;if(i.coordinates[0]-t.coordinates[0]==0&&o.coordinates[0]-t.coordinates[0]==0)return i.coordinates[1]-t.coordinates[1]>=0||o.coordinates[1]-t.coordinates[1]>=0?i.coordinates[1]-o.coordinates[1]:o.coordinates[1]-i.coordinates[1];var a=Object(r.d)(t.coordinates,i.coordinates,o.coordinates);return a<0?1:a>0?-1:Math.pow(i.coordinates[0]-t.coordinates[0],2)+Math.pow(i.coordinates[1]-t.coordinates[1],2)-(Math.pow(o.coordinates[0]-t.coordinates[0],2)+Math.pow(o.coordinates[1]-t.coordinates[1],2))}),this.outerEdgesSorted=!0)},t.prototype.getOuterEdges=function(){return this.sortOuterEdges(),this.outerEdges},t.prototype.getOuterEdge=function(t){return this.sortOuterEdges(),this.outerEdges[t]},t.prototype.addInnerEdge=function(t){this.innerEdges.push(t)},t}();e.a=i},function(t,e,n){"use strict";var r=n(0),i=n(84),o=function(){function t(t,e){this.from=t,this.to=e,this.next=void 0,this.label=void 0,this.symetric=void 0,this.ring=void 0,this.from.addOuterEdge(this),this.to.addInnerEdge(this)}return t.prototype.getSymetric=function(){return this.symetric||(this.symetric=new t(this.to,this.from),this.symetric.symetric=this),this.symetric},t.prototype.deleteEdge=function(){this.from.removeOuterEdge(this),this.to.removeInnerEdge(this)},t.prototype.isEqual=function(t){return this.from.id===t.from.id&&this.to.id===t.to.id},t.prototype.toString=function(){return"Edge { "+this.from.id+" -> "+this.to.id+" }"},t.prototype.toLineString=function(){return Object(r.lineString)([this.from.coordinates,this.to.coordinates])},t.prototype.compareTo=function(t){return Object(i.d)(t.from.coordinates,t.to.coordinates,this.to.coordinates)},t}();e.a=o},function(t,e,n){"use strict";e.a=function(t,e){var n=Object(a.getGeom)(t),c=Object(a.getGeom)(e),l=n.type,h=c.type,f=n.coordinates,p=c.coordinates;switch(l){case"Point":switch(h){case"Point":return u(f,p);default:throw new Error("feature2 "+h+" geometry not supported")}case"MultiPoint":switch(h){case"Point":return function(t,e){var n,r=!1;for(n=0;ne[0])&&(!(t[2]e[1])&&!(t[3]0}function l(t,e){for(var n=!1,r=!1,i=t.coordinates.length,a=0;a=Math.abs(s)?a>0?t[0]<=n[0]&&n[0]<=e[0]:e[0]<=n[0]&&n[0]<=t[0]:s>0?t[1]<=n[1]&&n[1]<=e[1]:e[1]<=n[1]&&n[1]<=t[1]:Math.abs(a)>=Math.abs(s)?a>0?t[0]0?t[1]0)for(var n=0;n0};var r=n(1),i=n(2),o=n(128),a=n(35),s=n(144),u=n.n(s)},function(t,e,n){"use strict";var r=n(144),i=n.n(r),o=n(41),a=n(2);e.a=function(t,e){return Object(a.getGeom)(t).type===Object(a.getGeom)(e).type&&new i.a({precision:6}).compare(Object(o.a)(t),Object(o.a)(e))}},function(t,e,n){"use strict";var r=n(9),i=n(8),o=n(1),a=n(0),s=n(294),u=n.n(s);e.a=function(t,e,n){void 0===n&&(n={}),!0!==n.mutate&&(t=Object(r.a)(t)),n.minPoints=n.minPoints||3;var s=new u.a.DBSCAN,c=-1;return s.run(Object(o.coordAll)(t),Object(a.convertLength)(e,n.units),n.minPoints,i.a).forEach(function(e){c++,e.forEach(function(e){var n=t.features[e];n.properties||(n.properties={}),n.properties.cluster=c,n.properties.dbscan="core"})}),s.noise.forEach(function(e){var n=t.features[e];n.properties||(n.properties={}),n.properties.cluster?n.properties.dbscan="edge":n.properties.dbscan="noise"}),t}},function(t,e,n){void 0!==t&&t.exports&&(t.exports={DBSCAN:n(295),KMEANS:n(296),OPTICS:n(297),PriorityQueue:n(146)})},function(t,e){function n(t,e,n,r){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,r)}n.prototype.run=function(t,e,n,r){this._init(t,e,n,r);for(var i=0;i=this.minPts&&(e=this._mergeArrays(e,i))}1!==this._assigned[r]&&this._addToCluster(r,t)}},n.prototype._addToCluster=function(t,e){this.clusters[e].push(t),this._assigned[t]=1},n.prototype._regionQuery=function(t){for(var e=[],n=0;n0){for(u=0;u=0);return t},n.prototype.assign=function(){for(var t,e=!1,n=this.dataset.length,r=0;r=this.minPts)return n}},i.prototype._regionQuery=function(t,e){e=e||this.epsilon;for(var n=[],r=0,i=this.dataset.length;rn&&(e.numberOfClusters=n),!0!==e.mutate&&(t=Object(r.a)(t));var o=Object(i.coordAll)(t),s=o.slice(0,e.numberOfClusters),u=a()(o,e.numberOfClusters,s),c={};return u.centroids.forEach(function(t,e){c[e]=t}),Object(i.featureEach)(t,function(t,e){var n=u.idxs[e];t.properties.cluster=n,t.properties.centroid=c[n]}),t}},function(t,e,n){"use strict";var r=n(147),i=n(300),o=r.eudist,a=(r.mandist,r.dist,i.kmrand),s=i.kmpp,u=1e4;function c(t,e,n){n=n||[];for(var r=0;r0,m=[];if(n)i="kmrand"==n?a(t,e):"kmpp"==n?s(t,e):n;else for(var _={};i.length0;r.length0;){var s=t[Math.floor(Math.random()*o)],u=a?s.join("_"):""+s;n[u]||(n[u]=!0,r.push(s))}if(r.length0,u=t[Math.floor(Math.random()*a)];s&&u.join("_");for(r.push(u);r.length0;){var u=a.pop();if(u===n)return h(u);u.closed=!0;for(var c=t.neighbors(u),l=0,p=c.length;l0&&(this.content[0]=e,this.bubbleUp(0)),t},remove:function(t){var e=this.content.indexOf(t),n=this.content.pop();e!==this.content.length-1&&(this.content[e]=n,this.scoreFunction(n)0;){var n=(t+1>>1)-1,r=this.content[n];if(!(this.scoreFunction(e)=w;){for(var D=[],F=[],z=b+C,B=0;z<=E;){var q=Object(l.point)([z,j]),G=y(q,d);D.push(G?0:1),F.push(z+"|"+j);var U=Object(o.a)(q,t);!G&&Us.f)d=d.L;else{if(!((u=l-f(d,p))>s.f)){r>-s.f?(e=d.P,n=d):u>-s.f?(e=d,n=d.N):e=n=d;break}if(!d.R){e=d;break}d=d.R}Object(i.c)(t);var g=c(t);if(s.a.insert(e,g),!e&&!n)return;if(e===n)return Object(o.b)(e),n=c(e.site),s.a.insert(g,n),g.edge=n.edge=Object(a.c)(e.site,g.site),Object(o.a)(e),void Object(o.a)(n);if(!n)return void(g.edge=Object(a.c)(e.site,g.site));Object(o.b)(e),Object(o.b)(n);var y=e.site,v=y[0],m=y[1],_=t[0]-v,b=t[1]-m,w=n.site,E=w[0]-v,x=w[1]-m,O=2*(_*x-b*E),M=_*_+b*b,S=E*E+x*x,P=[(x*M-b*S)/O+v,(_*S-E*M)/O+m];Object(a.d)(n.edge,y,w,P),g.edge=Object(a.c)(y,t,null,P),n.edge=Object(a.c)(t,w,null,P),Object(o.a)(e),Object(o.a)(n)};var r=n(85),i=n(148),o=n(149),a=n(86),s=n(46),u=[];function c(t){var e=u.pop()||new function(){Object(r.a)(this),this.edge=this.site=this.circle=null};return e.site=t,e}function l(t){Object(o.b)(t),s.a.remove(t),u.push(t),Object(r.a)(t)}function h(t,e){var n=t.site,r=n[0],i=n[1],o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var s=(n=a.site)[0],u=n[1],c=u-e;if(!c)return s;var l=s-r,h=1/o-1/c,f=l/c;return h?(-f+Math.sqrt(f*f-2*h*(l*l/(-2*c)-u+c/2+i-o/2)))/h+r:(r+s)/2}function f(t,e){var n=t.N;if(n)return h(n,e);var r=t.site;return r[1]===e?r[0]:1/0}},function(t,e,n){"use strict";var r=n(87),i=n(8),o=n(28),a=n(0),s=n(1);e.a=function(t,e){if(void 0===e&&(e={}),e=e||{},!Object(a.isObject)(e))throw new Error("options is invalid");var n=e.counter||10;if(!Object(a.isNumber)(n))throw new Error("counter must be a number");var u=e.weight,c=Object(r.a)(t,{weight:e.weight}),l=Object(a.featureCollection)([]);Object(s.featureEach)(t,function(t){var e;l.features.push(Object(o.a)(t,{properties:{weight:null===(e=t.properties)||void 0===e?void 0:e[u]}}))});var h={tolerance:e.tolerance,medianCandidates:[]};return function t(e,n,r,o,u){var c=o.tolerance||.001,l=0,h=0,f=0,p=0;if(Object(s.featureEach)(r,function(t){var n,r=null===(n=t.properties)||void 0===n?void 0:n.weight,o=void 0===r||null===r?1:r;if(o=Number(o),!Object(a.isNumber)(o))throw new Error("weight value must be a number");if(o>0){p+=1;var s=o*Object(i.a)(t,e);0===s&&(s=1);var u=o/s;l+=t.geometry.coordinates[0]*u,h+=t.geometry.coordinates[1]*u,f+=u}}),p<1)throw new Error("no features to measure");var d=l/f,g=h/f;return 1===p||0===u||Math.abs(d-n[0])n&&(n=u,i=o,e.push([]));var c=o-i,l=t.coordinates[u][c+1],h=r[0],f=r[1],p=l[0],d=l[1];e[u].push([.75*h+.25*p,.75*f+.25*d]),e[u].push([.25*h+.75*p,.25*f+.75*d])},!0),e.forEach(function(t){t.push(t[0])})}function a(t,e){var n=0,i=0,o=0;Object(r.coordEach)(t,function(r,a,s,u,c){u>o&&(o=u,i=a,e.push([[]])),c>n&&(n=c,i=a,e[u].push([]));var l=a-i,h=t.coordinates[u][c][l+1],f=r[0],p=r[1],d=h[0],g=h[1];e[u][c].push([.75*f+.25*d,.75*p+.25*g]),e[u][c].push([.25*f+.75*d,.25*p+.75*g])},!0),e.forEach(function(t){t.forEach(function(t){t.push(t[0])})})}e.a=function(t,e){var n=[],s=e.iterations||1;if(!t)throw new Error("inputPolys is required");return Object(r.geomEach)(t,function(t,e,r){var u,c,l;switch(t.type){case"Polygon":u=[[]];for(var h=0;h0&&(c=Object(i.polygon)(u).geometry),o(c,l),u=l.slice(0);n.push(Object(i.polygon)(u,r));break;case"MultiPolygon":u=[[[]]];for(var f=0;f0&&(c=Object(i.multiPolygon)(u).geometry),a(c,l),u=l.slice(0);n.push(Object(i.multiPolygon)(u,r));break;default:throw new Error("geometry is invalid, must be Polygon or MultiPolygon")}}),Object(i.featureCollection)(n)}},function(t,e,n){"use strict";var r=n(151),i=n(1);function o(t){for(var e=0,n=0,r=t;n1)for(var n=1;ne?1:t0))break;if(null===e.right)break;if(n(t,e.right.key)>0){u=e.right;if(e.right=u.left,u.left=e,null===(e=u).right)break}o.right=e,o=e,e=e.right}}return o.right=e.left,a.left=e.right,e.left=i.right,e.right=i.left,e}function a(t,e,n,i){var a=new r(t,e);if(null===n)return a.left=a.right=null,a;var s=i(t,(n=o(t,n,i)).key);return s<0?(a.left=n.left,a.right=n,n.left=null):s>=0&&(a.right=n.right,a.left=n,n.right=null),a}function s(t,e,n){var r=null,i=null;if(e){var a=n((e=o(t,e,n)).key,t);0===a?(r=e.left,i=e.right):a<0?(i=e.right,e.right=null,r=e):(r=e.left,e.left=null,i=e)}return{left:r,right:i}}var u=function(){function t(t){void 0===t&&(t=i),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,e){return this._size++,this._root=a(t,e,this._root,this._comparator)},t.prototype.add=function(t,e){var n=new r(t,e);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var i=this._comparator,a=o(t,this._root,i),s=i(t,a.key);return 0===s?this._root=a:(s<0?(n.left=a.left,n.right=a,a.left=null):s>0&&(n.right=a.right,n.left=a,a.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 r;return null===e?null:0===n(t,(e=o(t,e,n)).key)?(null===e.left?r=e.right:(r=o(t,e.left,n)).right=e.right,this._size--,r):e},t.prototype.pop=function(){var t=this._root;if(t){for(;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){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return e;e=r<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){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return!0;e=r<0?e.left:e.right}return!1},t.prototype.forEach=function(t,e){for(var n=this._root,r=[],i=!1;!i;)null!==n?(r.push(n),n=n.left):0!==r.length?(n=r.pop(),t.call(e,n),n=n.right):i=!0;return this},t.prototype.range=function(t,e,n,r){for(var i=[],o=this._comparator,a=this._root;0!==i.length||a;)if(a)i.push(a),a=a.left;else{if(o((a=i.pop()).key,e)>0)break;if(o(a.key,t)>=0&&n.call(r,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)for(;t.left;)t=t.left;return t},t.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},t.prototype.at=function(t){for(var e=this._root,n=!1,r=0,i=[];!n;)if(e)i.push(e),e=e.left;else if(i.length>0){if(e=i.pop(),r===t)return e;r++,e=e.right}else n=!0;return null},t.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<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){for(n=t.left;n.right;)n=n.right;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<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 function(t){var e=t,n=[],i=!1,o=new r(null,null),a=o;for(;!i;)e?(n.push(e),e=e.left):n.length>0?e=(e=a=a.next=n.pop()).right:i=!0;return a.next=null,o.next}(this._root)},t.prototype.load=function(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=!1);var i=t.length,o=this._comparator;if(n&&function t(e,n,r,i,o){if(r>=i)return;var a=e[r+i>>1];var s=r-1;var u=i+1;for(;;){do{s++}while(o(e[s],a)<0);do{u--}while(o(e[u],a)>0);if(s>=u)break;var c=e[s];e[s]=e[u],e[u]=c,c=n[s],n[s]=n[u],n[u]=c}t(e,n,r,u,o);t(e,n,u+1,i,o)}(t,e,0,i-1,o),null===this._root)this._root=function t(e,n,i,o){var a=o-i;if(a>0){var s=i+Math.floor(a/2),u=e[s],c=n[s],l=new r(u,c);return l.left=t(e,n,i,s),l.right=t(e,n,s+1,o),l}return null}(t,e,0,i),this._size=i;else{var a=function(t,e,n){var i=new r(null,null),o=i,a=t,s=e;for(;null!==a&&null!==s;)n(a.key,s.key)<0?(o.next=a,a=a.next):(o.next=s,s=s.next),o=o.next;null!==a?o.next=a:null!==s&&(o.next=s);return i.next}(this.toList(),function(t,e){for(var n=new r(null,null),i=n,o=0;o0){var o=n+Math.floor(i/2),a=t(e,n,o),s=e.head;return s.left=a,e.head=e.head.next,s.right=t(e,o+1,r),s}return null}({head:a},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 function t(e,n,r,i,o){if(e){i(n+(r?"└── ":"├── ")+o(e)+"\n");var a=n+(r?" ":"│ ");e.left&&t(e.left,a,!1,i,o),e.right&&t(e.right,a,!0,i,o)}}(this._root,"",!0,function(t){return e.push(t)},t),e.join("")},t.prototype.update=function(t,e,n){var r=this._comparator,i=s(t,this._root,r),u=i.left,c=i.right;r(t,e)<0?c=a(e,n,c,r):u=a(e,n,u,r),this._root=function(t,e,n){return null===e?t:null===t?e:((e=o(t.key,e,n)).left=t,e)}(u,c,r)},t.prototype.split=function(t){return s(t,this._root,this._comparator)},t}();e.a=u},function(t,e,n){"use strict";var r=n(57),i=n(318),o=n(1),a=n(319),s=n(0);function u(t,e,n,c){var l=t.properties||{},h="Feature"===t.type?t.geometry:t;if("GeometryCollection"===h.type){var f=[];return Object(o.geomEach)(t,function(t){var r=u(t,e,n,c);r&&f.push(r)}),Object(s.featureCollection)(f)}var p=function(t){var e=Object(r.a)(t).geometry.coordinates,n=[-e[0],-e[1]];return Object(a.a)().rotate(n).scale(s.earthRadius)}(h),d={type:h.type,coordinates:function t(e,n){if("object"!=typeof e[0])return n(e);return e.map(function(e){return t(e,n)})}(h.coordinates,p)},g=(new i.b).read(d),y=Object(s.radiansToLength)(Object(s.lengthToRadians)(e,n),"meters"),v=i.a.bufferOp(g,y,c);if(!function t(e){if(Array.isArray(e[0]))return t(e[0]);return isNaN(e[0])}((v=(new i.c).write(v)).coordinates)){var m={type:v.type,coordinates:function t(e,n){if("object"!=typeof e[0])return n.invert(e);return e.map(function(e){return t(e,n)})}(v.coordinates,p)};return Object(s.feature)(m,l)}}e.a=function(t,e,n){var r=(n=n||{}).units||"kilometers",i=n.steps||8;if(!t)throw new Error("geojson is required");if("object"!=typeof n)throw new Error("options must be an object");if("number"!=typeof i)throw new Error("steps must be an number");if(void 0===e)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var a=[];switch(t.type){case"GeometryCollection":return Object(o.geomEach)(t,function(t){var n=u(t,e,r,i);n&&a.push(n)}),Object(s.featureCollection)(a);case"FeatureCollection":return Object(o.featureEach)(t,function(t){var n=u(t,e,r,i);n&&Object(o.featureEach)(n,function(t){t&&a.push(t)})}),Object(s.featureCollection)(a)}return u(t,e,r,i)}},function(t,e,n){"use strict";n.d(e,"b",function(){return xe}),n.d(e,"c",function(){return Oe}),n.d(e,"a",function(){return vr}),"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,r=1 in arguments&&parseInt(Number(arguments[1]),10)||0;r=r<0?Math.max(n+r,0):Math.min(r,n);var i=2 in arguments&&void 0!==arguments[2]?parseInt(Number(arguments[2]),10)||0:n;for(i=i<0?Math.max(n+arguments[2],0):Math.min(i,n);re.x?1:this.ye.y?1:0},h.prototype.clone=function(){},h.prototype.copy=function(){return new h(this)},h.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},h.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+n*n+r*r)},h.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},h.prototype.hashCode=function(){var t=17;return t=37*(t=37*t+h.hashCode(this.x))+h.hashCode(this.y)},h.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},h.prototype.interfaces_=function(){return[s,u,l]},h.prototype.getClass=function(){return h},h.hashCode=function(){if(1===arguments.length){var t=arguments[0],e=o.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},f.DimensionalComparator.get=function(){return p},f.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},f.NULL_ORDINATE.get=function(){return o.NaN},f.X.get=function(){return 0},f.Y.get=function(){return 1},f.Z.get=function(){return 2},Object.defineProperties(h,f);var p=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 i("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};p.prototype.compare=function(t,e){var n=t,r=e,i=p.compare(n.x,r.x);if(0!==i)return i;var o=p.compare(n.y,r.y);return 0!==o?o:this._dimensionsToTest<=2?0:p.compare(n.z,r.z)},p.prototype.interfaces_=function(){return[c]},p.prototype.getClass=function(){return p},p.compare=function(t,e){return te?1:o.isNaN(t)?o.isNaN(e)?0:-1:o.isNaN(e)?1:0};var d=function(){};d.prototype.create=function(){},d.prototype.interfaces_=function(){return[]},d.prototype.getClass=function(){return d};var g=function(){},y={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};g.prototype.interfaces_=function(){return[]},g.prototype.getClass=function(){return g},g.toLocationSymbol=function(t){switch(t){case g.EXTERIOR:return"e";case g.BOUNDARY:return"b";case g.INTERIOR:return"i";case g.NONE:return"-"}throw new i("Unknown location value: "+t)},y.INTERIOR.get=function(){return 0},y.BOUNDARY.get=function(){return 1},y.EXTERIOR.get=function(){return 2},y.NONE.get=function(){return-1},Object.defineProperties(g,y);var v=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},m=function(){},_={LOG_10:{configurable:!0}};m.prototype.interfaces_=function(){return[]},m.prototype.getClass=function(){return m},m.log10=function(t){var e=Math.log(t);return o.isInfinite(e)?e:o.isNaN(e)?e:e/m.LOG_10},m.min=function(t,e,n,r){var i=t;return en?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1],o=arguments[2];return ro?o:r}},m.wrap=function(t,e){return t<0?e- -t%e:t%e},m.max=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=t;return e>r&&(r=e),n>r&&(r=n),r}if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3],u=i;return o>u&&(u=o),a>u&&(u=a),s>u&&(u=s),u}},m.average=function(t,e){return(t+e)/2},_.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(m,_);var b=function(t){this.str=t};b.prototype.append=function(t){this.str+=t},b.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},b.prototype.toString=function(t){return this.str};var w=function(t){this.value=t};w.prototype.intValue=function(){return this.value},w.prototype.compareTo=function(t){return this.valuet?1:0},w.isNaN=function(t){return Number.isNaN(t)};var E=function(){};E.isWhitespace=function(t){return t<=32&&t>=0||127===t},E.toUpperCase=function(t){return t.toUpperCase()};var x=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 r=arguments[0];t.call(this,t.parse(r))}}else if(2===arguments.length){var i=arguments[0],o=arguments[1];this.init(i,o)}},O={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}};x.prototype.le=function(t){return(this._hi9?(l=!0,h="9"):h="0"+c,a.append(h),n=n.subtract(x.valueOf(c)).multiply(x.TEN),l&&n.selfAdd(x.TEN);var f=!0,p=x.magnitude(n._hi);if(p<0&&Math.abs(p)>=s-u&&(f=!1),!f)break}return e[0]=r,a.toString()},x.prototype.sqr=function(){return this.multiply(this)},x.prototype.doubleValue=function(){return this._hi+this._lo},x.prototype.subtract=function(){if(arguments[0]instanceof x){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},x.prototype.equals=function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},x.prototype.isZero=function(){return 0===this._hi&&0===this._lo},x.prototype.selfSubtract=function(){if(arguments[0]instanceof x){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)}},x.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},x.prototype.min=function(t){return this.le(t)?this:t},x.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof x){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,r,i,o,a=arguments[0],s=arguments[1],u=null,c=null,l=null,h=null;return i=this._hi/a,h=(u=(l=x.SPLIT*i)-(u=l-i))*(c=(h=x.SPLIT*a)-(c=h-a))-(o=i*a)+u*(r=a-c)+(n=i-u)*c+n*r,h=i+(l=(this._hi-o-h+this._lo-i*s)/a),this._hi=h,this._lo=i-h+l,this}},x.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},x.prototype.divide=function(){if(arguments[0]instanceof x){var t,e,n,r,i=arguments[0],a=null,s=null,u=null,c=null;return n=this._hi/i._hi,a=(u=x.SPLIT*n)-n,c=x.SPLIT*i._hi,t=n-(a=u-a),s=c-i._hi,r=n*i._hi,c=a*(s=c-s)-r+a*(e=i._hi-s)+t*s+t*e,u=(this._hi-r-c+this._lo-n*i._lo)/i._hi,new x(c=n+u,n-c+u)}if("number"==typeof arguments[0]){var l=arguments[0];return o.isNaN(l)?x.createNaN():x.copy(this).selfDivide(l,0)}},x.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},x.prototype.pow=function(t){if(0===t)return x.valueOf(1);var e=new x(this),n=x.valueOf(1),r=Math.abs(t);if(r>1)for(;r>0;)r%2==1&&n.selfMultiply(e),(r/=2)>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},x.prototype.ceil=function(){if(this.isNaN())return x.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new x(t,e)},x.prototype.compareTo=function(t){var e=t;return this._hie._hi?1:this._loe._lo?1:0},x.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},x.prototype.setValue=function(){if(arguments[0]instanceof x){var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},x.prototype.max=function(t){return this.ge(t)?this:t},x.prototype.sqrt=function(){if(this.isZero())return x.valueOf(0);if(this.isNegative())return x.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=x.valueOf(e),r=this.subtract(n.sqr())._hi*(.5*t);return n.add(r)},x.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof x){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e,n,r,i,o,a=arguments[0],s=null;return s=(r=this._hi+a)-(i=r-this._hi),n=(o=(s=a-i+(this._hi-s))+this._lo)+(r-(e=r+o)),this._hi=e+n,this._lo=n+(e-this._hi),this}}else if(2===arguments.length){var u,c,l,h,f=arguments[0],p=arguments[1],d=null,g=null,y=null;l=this._hi+f,c=this._lo+p,g=l-(y=l-this._hi),d=c-(h=c-this._lo),g=f-y+(this._hi-g),d=p-h+(this._lo-d);var v=(u=l+(y=g+c))+(y=d+(y+(l-u))),m=y+(u-v);return this._hi=v,this._lo=m,this}},x.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof x){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,r,i=arguments[0],o=arguments[1],a=null,s=null,u=null,c=null;a=(u=x.SPLIT*this._hi)-this._hi,c=x.SPLIT*i,a=u-a,n=this._hi-a,s=c-i;var l=(u=this._hi*i)+(c=a*(s=c-s)-u+a*(r=i-s)+n*s+n*r+(this._hi*o+this._lo*i)),h=c+(a=u-l);return this._hi=l,this._lo=h,this}},x.prototype.selfSqr=function(){return this.selfMultiply(this)},x.prototype.floor=function(){if(this.isNaN())return x.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new x(t,e)},x.prototype.negate=function(){return this.isNaN()?this:new x(-this._hi,-this._lo)},x.prototype.clone=function(){},x.prototype.multiply=function(){if(arguments[0]instanceof x){var t=arguments[0];return t.isNaN()?x.createNaN():x.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return o.isNaN(e)?x.createNaN():x.copy(this).selfMultiply(e,0)}},x.prototype.isNaN=function(){return o.isNaN(this._hi)},x.prototype.intValue=function(){return Math.trunc(this._hi)},x.prototype.toString=function(){var t=x.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},x.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),r=e[0]+1,i=n;if("."===n.charAt(0))i="0"+n;else if(r<0)i="0."+x.stringOfChar("0",-r)+n;else if(-1===n.indexOf(".")){var o=r-n.length;i=n+x.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+i:i},x.prototype.reciprocal=function(){var t,e,n,r,i=null,o=null,a=null,s=null;n=1/this._hi,i=(a=x.SPLIT*n)-n,s=x.SPLIT*this._hi,t=n-(i=a-i),o=s-this._hi;var u=n+(a=(1-(r=n*this._hi)-(s=i*(o=s-o)-r+i*(e=this._hi-o)+t*o+t*e)-n*this._lo)/this._hi);return new x(u,n-u+a)},x.prototype.toSciNotation=function(){if(this.isZero())return x.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),r=x.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===n.charAt(0))throw new Error("Found leading zero: "+n);var i="";n.length>1&&(i=n.substring(1));var o=n.charAt(0)+"."+i;return this.isNegative()?"-"+o+r:o+r},x.prototype.abs=function(){return this.isNaN()?x.NaN:this.isNegative()?this.negate():new x(this)},x.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},x.prototype.lt=function(t){return(this._hit._hi||this._hi===t._hi)&&this._lo>t._lo},x.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},x.prototype.trunc=function(){return this.isNaN()?x.NaN:this.isPositive()?this.floor():this.ceil()},x.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},x.prototype.interfaces_=function(){return[l,s,u]},x.prototype.getClass=function(){return x},x.sqr=function(t){return x.valueOf(t).selfMultiply(t)},x.valueOf=function(){if("string"==typeof arguments[0]){var t=arguments[0];return x.parse(t)}if("number"==typeof arguments[0]){var e=arguments[0];return new x(e)}},x.sqrt=function(t){return x.valueOf(t).sqrt()},x.parse=function(t){for(var e=0,n=t.length;E.isWhitespace(t.charAt(e));)e++;var r=!1;if(e=n);){var c=t.charAt(e);if(e++,E.isDigit(c)){var l=c-"0";o.selfMultiply(x.TEN),o.selfAdd(l),a++}else{if("."!==c){if("e"===c||"E"===c){var h=t.substring(e);try{u=w.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)}s=a}}var f=o,p=a-s-u;if(0===p)f=o;else if(p>0){var d=x.TEN.pow(p);f=o.divide(d)}else if(p<0){var g=x.TEN.pow(-p);f=o.multiply(g)}return r?f.negate():f},x.createNaN=function(){return new x(o.NaN,o.NaN)},x.copy=function(t){return new x(t)},x.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(n));return 10*Math.pow(10,r)<=e&&(r+=1),r},x.stringOfChar=function(t,e){for(var n=new b,r=0;r0){if(o<=0)return M.signum(a);r=i+o}else{if(!(i<0))return M.signum(a);if(o>=0)return M.signum(a);r=-i-o}var s=M.DP_SAFE_EPSILON*r;return a>=s||-a>=s?M.signum(a):2},M.signum=function(t){return t>0?1:t<0?-1:0},S.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(M,S);var P=function(){},C={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};C.X.get=function(){return 0},C.Y.get=function(){return 1},C.Z.get=function(){return 2},C.M.get=function(){return 3},P.prototype.setOrdinate=function(t,e,n){},P.prototype.size=function(){},P.prototype.getOrdinate=function(t,e){},P.prototype.getCoordinate=function(){},P.prototype.getCoordinateCopy=function(t){},P.prototype.getDimension=function(){},P.prototype.getX=function(t){},P.prototype.clone=function(){},P.prototype.expandEnvelope=function(t){},P.prototype.copy=function(){},P.prototype.getY=function(t){},P.prototype.toCoordinateArray=function(){},P.prototype.interfaces_=function(){return[u]},P.prototype.getClass=function(){return P},Object.defineProperties(P,C);var T=function(){},I=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}(T),L=function(){};L.arraycopy=function(t,e,n,r,i){for(var o=0,a=e;at._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,r=this._maxx=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&(n>=this._minx&&n<=this._maxx&&r>=this._miny&&r<=this._maxy)}},N.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof N){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxxthis._maxy||t._maxythis._maxx||nthis._maxy||rthis._maxx&&(this._maxx=e._maxx),e._minythis._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=r,this._maxy=r):(nthis._maxx&&(this._maxx=n),rthis._maxy&&(this._maxy=r))}},N.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return te._minx?1:this._minye._miny?1:this._maxxe._maxx?1:this._maxye._maxy?1:0},N.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},N.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},N.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},N.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},N.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},N.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()}},N.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof N){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof h){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.covers(n,r)}},N.prototype.centre=function(){return this.isNull()?null:new h((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},N.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof h){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof N){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],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];it._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxyt._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)},N.prototype.hashCode=function(){var t=17;return t=37*(t=37*(t=37*(t=37*t+h.hashCode(this._minx))+h.hashCode(this._maxx))+h.hashCode(this._miny))+h.hashCode(this._maxy)},N.prototype.interfaces_=function(){return[s,l]},N.prototype.getClass=function(){return N},N.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.xe.x?t.x:e.x)&&n.y>=(t.ye.y?t.y:e.y)}if(4===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3],s=Math.min(o.x,a.x),u=Math.max(o.x,a.x),c=Math.min(r.x,i.x),l=Math.max(r.x,i.x);return!(c>u)&&(!(lu)&&!(lthis.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},U.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},U.prototype.setPrecisionModel=function(t){this._precisionModel=t},U.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;ei?r:i;else{var a=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);0!==(o=r>i?a:s)||t.equals(e)||(o=Math.max(a,s))}return G.isTrue(!(0===o&&!t.equals(e)),"Bad distance calculation"),o},U.nonRobustComputeEdgeDistance=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,o=Math.sqrt(r*r+i*i);return G.isTrue(!(0===o&&!t.equals(e)),"Invalid distance calculation"),o},V.DONT_INTERSECT.get=function(){return 0},V.DO_INTERSECT.get=function(){return 1},V.COLLINEAR.get=function(){return 2},V.NO_INTERSECTION.get=function(){return 0},V.POINT_INTERSECTION.get=function(){return 1},V.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(U,V);var J=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 N(this._inputLines[0][0],this._inputLines[0][1]),n=new N(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],r=arguments[2];if(this._isProper=!1,N.intersects(n,r,e)&&0===X.orientationIndex(n,r,e)&&0===X.orientationIndex(r,n,e))return this._isProper=!0,(e.equals(n)||e.equals(r))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION},e.prototype.normalizeToMinimum=function(t,e,n,r,i){i.x=this.smallestInAbsValue(t.x,e.x,n.x,r.x),i.y=this.smallestInAbsValue(t.y,e.y,n.y,r.y),t.x-=i.x,t.y-=i.y,e.x-=i.x,e.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y},e.prototype.safeHCoordinateIntersection=function(t,n,r,i){var o=null;try{o=A.intersection(t,n,r,i)}catch(a){if(!(a instanceof I))throw a;o=e.nearestEndpoint(t,n,r,i)}return o},e.prototype.intersection=function(t,n,r,i){var o=this.intersectionWithNormalization(t,n,r,i);return this.isInSegmentEnvelopes(o)||(o=new h(e.nearestEndpoint(t,n,r,i))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},e.prototype.smallestInAbsValue=function(t,e,n,r){var i=t,o=Math.abs(i);return Math.abs(e)1e-4&&L.out.println("Distance = "+i.distance(o))},e.prototype.intersectionWithNormalization=function(t,e,n,r){var i=new h(t),o=new h(e),a=new h(n),s=new h(r),u=new h;this.normalizeToEnvCentre(i,o,a,s,u);var c=this.safeHCoordinateIntersection(i,o,a,s);return c.x+=u.x,c.y+=u.y,c},e.prototype.computeCollinearIntersection=function(e,n,r,i){var o=N.intersects(e,n,r),a=N.intersects(e,n,i),s=N.intersects(r,i,e),u=N.intersects(r,i,n);return o&&a?(this._intPt[0]=r,this._intPt[1]=i,t.COLLINEAR_INTERSECTION):s&&u?(this._intPt[0]=e,this._intPt[1]=n,t.COLLINEAR_INTERSECTION):o&&s?(this._intPt[0]=r,this._intPt[1]=e,!r.equals(e)||a||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&u?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||a||s?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):a&&s?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||o||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):a&&u?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||o||s?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(t,e,n,r,i){var o=t.xe.x?t.x:e.x,u=t.y>e.y?t.y:e.y,c=n.xr.x?n.x:r.x,f=n.y>r.y?n.y:r.y,p=((o>c?o:c)+(sl?a:l)+(u0&&a>0||o<0&&a<0)return t.NO_INTERSECTION;var s=X.orientationIndex(r,i,e),u=X.orientationIndex(r,i,n);return s>0&&u>0||s<0&&u<0?t.NO_INTERSECTION:0===o&&0===a&&0===s&&0===u?this.computeCollinearIntersection(e,n,r,i):(0===o||0===a||0===s||0===u?(this._isProper=!1,e.equals2D(r)||e.equals2D(i)?this._intPt[0]=e:n.equals2D(r)||n.equals2D(i)?this._intPt[0]=n:0===o?this._intPt[0]=new h(r):0===a?this._intPt[0]=new h(i):0===s?this._intPt[0]=new h(e):0===u&&(this._intPt[0]=new h(n))):(this._isProper=!0,this._intPt[0]=this.intersection(e,n,r,i)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(t,e,n,r){var i=t,o=X.distancePointLine(t,n,r),a=X.distancePointLine(e,n,r);return a0?n>0?-i:i:n>0?i:-i;if(0===e||0===n)return r>0?t>0?i:-i:t>0?-i:i;if(e>0?r>0?e<=r||(i=-i,o=t,t=n,n=o,o=e,e=r,r=o):e<=-r?(i=-i,n=-n,r=-r):(o=t,t=-n,n=o,o=e,e=-r,r=o):r>0?-e<=r?(i=-i,t=-t,e=-e):(o=-t,t=n,n=o,o=-e,e=r,r=o):e>=r?(t=-t,e=-e,n=-n,r=-r):(i=-i,o=-t,t=-n,n=o,o=-e,e=-r,r=o),t>0){if(!(n>0))return i;if(!(t<=n))return i}else{if(n>0)return-i;if(!(t>=n))return-i;i=-i,t=-t,n=-n}for(;;){if(n-=(a=Math.floor(n/t))*t,(r-=a*e)<0)return-i;if(r>e)return i;if(t>n+n){if(er+r)return-i;n=t-n,r=e-r,i=-i}if(0===r)return 0===n?0:-i;if(0===n)return i;if(t-=(a=Math.floor(t/n))*n,(e-=a*r)<0)return i;if(e>r)return-i;if(n>t+t){if(re+e)return i;t=n-t,e=r-e,i=-i}if(0===e)return 0===t?0:i;if(0===t)return-i}};var Y=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};Y.prototype.countSegment=function(t,e){if(t.xr&&(n=e.x,r=t.x),this._p.x>=n&&this._p.x<=r&&(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 i=t.x-this._p.x,o=t.y-this._p.y,a=e.x-this._p.x,s=e.y-this._p.y,u=H.signOfDet2x2(i,o,a,s);if(0===u)return this._isPointOnSegment=!0,null;s0&&this._crossingCount++}},Y.prototype.isPointInPolygon=function(){return this.getLocation()!==g.EXTERIOR},Y.prototype.getLocation=function(){return this._isPointOnSegment?g.BOUNDARY:this._crossingCount%2==1?g.INTERIOR:g.EXTERIOR},Y.prototype.isOnSegment=function(){return this._isPointOnSegment},Y.prototype.interfaces_=function(){return[]},Y.prototype.getClass=function(){return Y},Y.locatePointInRing=function(){if(arguments[0]instanceof h&&v(arguments[1],P)){for(var t=arguments[0],e=arguments[1],n=new Y(t),r=new h,i=new h,o=1;o1||s<0||s>1)&&(i=!0)}}else i=!0;return i?m.min(X.distancePointLine(t,n,r),X.distancePointLine(e,n,r),X.distancePointLine(n,t,e),X.distancePointLine(r,t,e)):0},X.isPointInRing=function(t,e){return X.locatePointInRing(t,e)!==g.EXTERIOR},X.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,r=new h;t.getCoordinate(0,r);for(var i=r.x,o=r.y,a=1;an.y&&(n=a,r=o)}var s=r;do{(s-=1)<0&&(s=e)}while(t[s].equals2D(n)&&s!==r);var u=r;do{u=(u+1)%e}while(t[u].equals2D(n)&&u!==r);var c=t[s],l=t[u];if(c.equals2D(n)||l.equals2D(n)||c.equals2D(l))return!1;var h=X.computeOrientation(c,n,l),f=!1;return f=0===h?c.x>l.x:h>0,f},X.locatePointInRing=function(t,e){return Y.locatePointInRing(t,e)},X.distancePointLinePerpendicular=function(t,e,n){var r=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),i=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/r;return Math.abs(i)*Math.sqrt(r)},X.computeOrientation=function(t,e,n){return X.orientationIndex(t,e,n)},X.distancePointLine=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new i("Line array must contain at least one vertex");for(var n=t.distance(e[0]),r=0;r=1)return a.distance(u);var h=((s.y-a.y)*(u.x-s.x)-(s.x-a.x)*(u.y-s.y))/c;return Math.abs(h)*Math.sqrt(c)}},X.isOnLine=function(t,e){for(var n=new J,r=1;r0},it.prototype.interfaces_=function(){return[et]},it.prototype.getClass=function(){return it};var ot=function(){};ot.prototype.isInBoundary=function(t){return t>1},ot.prototype.interfaces_=function(){return[et]},ot.prototype.getClass=function(){return ot};var at=function(){};at.prototype.isInBoundary=function(t){return 1===t},at.prototype.interfaces_=function(){return[et]},at.prototype.getClass=function(){return at};var st=function(){};function ut(t){this.message=t||""}st.prototype.add=function(){},st.prototype.addAll=function(){},st.prototype.isEmpty=function(){},st.prototype.iterator=function(){},st.prototype.size=function(){},st.prototype.toArray=function(){},st.prototype.remove=function(){},ut.prototype=new Error,ut.prototype.name="IndexOutOfBoundsException";var ct=function(){};ct.prototype.hasNext=function(){},ct.prototype.next=function(){},ct.prototype.remove=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.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(st);function ht(t){this.message=t||""}ht.prototype=new Error,ht.prototype.name="NoSuchElementException";var ft=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof st&&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,st]},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 pt(this)},e.prototype.get=function(t){if(t<0||t>=this.size())throw new ut;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=1)if(this.get(this.size()-1).equals2D(i))return null;t.prototype.add.call(this,i)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var o=arguments[0],a=arguments[1];return this.add(o,a),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var s=arguments[0],u=arguments[1];if(arguments[2])for(var c=0;c=0;l--)this.add(s[l],u);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof h){var f=arguments[0],p=arguments[1];if(!arguments[2]){var d=this.size();if(d>0){if(f>0)if(this.get(f-1).equals2D(p))return null;if(fm&&(_=-1);for(var b=v;b!==m;b+=_)this.add(g[b],y);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new h(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(ft),gt=function(){},yt={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};yt.ForwardComparator.get=function(){return vt},yt.BidirectionalComparator.get=function(){return mt},yt.coordArrayType.get=function(){return new Array(0).fill(null)},gt.prototype.interfaces_=function(){return[]},gt.prototype.getClass=function(){return gt},gt.isRing=function(t){return!(t.length<4)&&!!t[0].equals2D(t[t.length-1])},gt.ptNotInList=function(t,e){for(var n=0;n=t?e:[]},gt.indexOf=function(t,e){for(var n=0;n0)&&(e=t[n]);return e},gt.extract=function(t,e,n){e=m.clamp(e,0,t.length);var r=(n=m.clamp(n,-1,t.length))-e+1;n<0&&(r=0),e>=t.length&&(r=0),nr.length)return 1;if(0===n.length)return 0;var i=gt.compare(n,r);return gt.isEqualReversed(n,r)?0:i},mt.prototype.OLDcompare=function(t,e){var n=t,r=e;if(n.lengthr.length)return 1;if(0===n.length)return 0;for(var i=gt.increasingDirection(n),o=gt.increasingDirection(r),a=i>0?0:n.length-1,s=o>0?0:n.length-1,u=0;u0))return e.value;e=e.right}}return null},Lt.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:Mt,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,r,i=this.root_;do{if(n=i,(r=t.compareTo(i.key))<0)i=i.left;else{if(!(r>0)){var o=i.value;return i.value=e,o}i=i.right}}while(null!==i);var a={key:t,left:null,right:null,value:e,parent:n,color:Mt,getValue:function(){return this.value},getKey:function(){return this.key}};return r<0?n.left=a:n.right=a,this.fixAfterInsertion(a),this.size_++,null},Lt.prototype.fixAfterInsertion=function(t){for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(Pt(t)===Tt(Pt(Pt(t)))){var e=It(Pt(Pt(t)));1===St(e)?(Ct(Pt(t),Mt),Ct(e,Mt),Ct(Pt(Pt(t)),1),t=Pt(Pt(t))):(t===It(Pt(t))&&(t=Pt(t),this.rotateLeft(t)),Ct(Pt(t),Mt),Ct(Pt(Pt(t)),1),this.rotateRight(Pt(Pt(t))))}else{var n=Tt(Pt(Pt(t)));1===St(n)?(Ct(Pt(t),Mt),Ct(n,Mt),Ct(Pt(Pt(t)),1),t=Pt(Pt(t))):(t===Tt(Pt(t))&&(t=Pt(t),this.rotateRight(t)),Ct(Pt(t),Mt),Ct(Pt(Pt(t)),1),this.rotateLeft(Pt(Pt(t))))}this.root_.color=Mt},Lt.prototype.values=function(){var t=new ft,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=Lt.successor(e));)t.add(e.value);return t},Lt.prototype.entrySet=function(){var t=new xt,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=Lt.successor(e));)t.add(e);return t},Lt.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}},Lt.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}},Lt.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},Lt.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,r=t;null!==n&&r===n.right;)r=n,n=n.parent;return n},Lt.prototype.size=function(){return this.size_};var At=function(){};function Nt(){}function kt(){this.array_=[],arguments[0]instanceof st&&this.addAll(arguments[0])}At.prototype.interfaces_=function(){return[]},At.prototype.getClass=function(){return At},Nt.prototype=new Et,kt.prototype=new Nt,kt.prototype.contains=function(t){for(var e=0,n=this.array_.length;e=0;){var a=i.substring(0,o);r.add(a),o=(i=i.substring(o+n)).indexOf(e)}i.length>0&&r.add(i);for(var s=new Array(r.size()).fill(null),u=0;u0)for(var o=i;o0&&r.append(" ");for(var o=0;o0&&r.append(","),r.append(Ht.toString(t.getOrdinate(i,o)))}return r.append(")"),r.toString()}},Xt.ensureValidRing=function(t,e){var n=e.size();return 0===n?e:n<=3?Xt.createClosedRing(t,e,4):e.getOrdinate(0,P.X)===e.getOrdinate(n-1,P.X)&&e.getOrdinate(0,P.Y)===e.getOrdinate(n-1,P.Y)?e:Xt.createClosedRing(t,e,n+1)},Xt.createClosedRing=function(t,e,n){var r=t.create(n,e.getDimension()),i=e.size();Xt.copy(e,0,r,0,i);for(var o=i;o0&&Xt.reverse(this._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Dt.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 X.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= 2)");this._points=t},e.prototype.isCoordinate=function(t){for(var e=0;e=1&&this.getCoordinateSequence().size()= 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}(Zt),ne=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return K.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;n0?e.createPoint(n[0]):e.createPoint():t},ae.prototype.interfaces_=function(){return[re.GeometryEditorOperation]},ae.prototype.getClass=function(){return ae};var se=function(){};se.prototype.edit=function(t,e){return t instanceof ee?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Zt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Kt?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},se.prototype.interfaces_=function(){return[re.GeometryEditorOperation]},se.prototype.getClass=function(){return se};var ue=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;e0){var t=new b(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var e=1;e3&&(r=3),r<2?new ue(n):new ue(n,r)}},le.prototype.interfaces_=function(){return[d,l]},le.prototype.getClass=function(){return le},le.instance=function(){return le.instanceObject},he.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},he.instanceObject.get=function(){return new le},Object.defineProperties(le,he);var fe=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 ft,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 xt;return this.map_.entries().forEach(function(e){return t.add(e)}),t},e.prototype.size=function(){return this.map_.size()},e}(_t),pe=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 ge){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 r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}},de={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};pe.prototype.equals=function(t){if(!(t instanceof pe))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},pe.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),r=e.getMaximumSignificantDigits();return new w(n).compareTo(new w(r))},pe.prototype.getScale=function(){return this._scale},pe.prototype.isFloating=function(){return this._modelType===pe.FLOATING||this._modelType===pe.FLOATING_SINGLE},pe.prototype.getType=function(){return this._modelType},pe.prototype.toString=function(){var t="UNKNOWN";return this._modelType===pe.FLOATING?t="Floating":this._modelType===pe.FLOATING_SINGLE?t="Floating-Single":this._modelType===pe.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},pe.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var t=arguments[0];return o.isNaN(t)?t:this._modelType===pe.FLOATING_SINGLE?t:this._modelType===pe.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof h){var e=arguments[0];if(this._modelType===pe.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}},pe.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===pe.FLOATING?t=16:this._modelType===pe.FLOATING_SINGLE?t=6:this._modelType===pe.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},pe.prototype.setScale=function(t){this._scale=Math.abs(t)},pe.prototype.interfaces_=function(){return[l,s]},pe.prototype.getClass=function(){return pe},pe.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},de.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},de.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(pe,de);var ge=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},ye={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};ge.prototype.readResolve=function(){return ge.nameToTypeMap.get(this._name)},ge.prototype.toString=function(){return this._name},ge.prototype.interfaces_=function(){return[l]},ge.prototype.getClass=function(){return ge},ye.serialVersionUID.get=function(){return-552860263173159e4},ye.nameToTypeMap.get=function(){return new fe},Object.defineProperties(ge,ye),pe.Type=ge,pe.FIXED=new ge("FIXED"),pe.FLOATING=new ge("FLOATING"),pe.FLOATING_SINGLE=new ge("FLOATING SINGLE");var ve=function t(){this._precisionModel=new pe,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?v(arguments[0],d)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof pe&&(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]))},me={serialVersionUID:{configurable:!0}};ve.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new h(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new h(t.getMinX(),t.getMinY()),new h(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new h(t.getMinX(),t.getMinY()),new h(t.getMinX(),t.getMaxY()),new h(t.getMaxX(),t.getMaxY()),new h(t.getMaxX(),t.getMinY()),new h(t.getMinX(),t.getMinY())]),null)},ve.prototype.createLineString=function(t){return t?t instanceof Array?new Zt(this.getCoordinateSequenceFactory().create(t),this):v(t,P)?new Zt(t,this):void 0:new Zt(this.getCoordinateSequenceFactory().create([]),this)},ve.prototype.createMultiLineString=function(){if(0===arguments.length)return new Gt(null,this);if(1===arguments.length){var t=arguments[0];return new Gt(t,this)}},ve.prototype.buildGeometry=function(t){for(var e=null,n=!1,r=!1,i=t.iterator();i.hasNext();){var o=i.next(),a=o.getClass();null===e&&(e=a),a!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(r=!0)}if(null===e)return this.createGeometryCollection();if(n||r)return this.createGeometryCollection(ve.toGeometryArray(t));var s=t.iterator().next();if(t.size()>1){if(s instanceof $t)return this.createMultiPolygon(ve.toPolygonArray(t));if(s instanceof Zt)return this.createMultiLineString(ve.toLineStringArray(t));if(s instanceof Kt)return this.createMultiPoint(ve.toPointArray(t));G.shouldNeverReachHere("Unhandled class: "+s.getClass().getName())}return s},ve.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)},ve.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof h){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(v(arguments[0],P)){var e=arguments[0];return new Kt(e,this)}}},ve.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},ve.prototype.createPolygon=function(){if(0===arguments.length)return new $t(null,null,this);if(1===arguments.length){if(v(arguments[0],P)){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 r=arguments[0],i=arguments[1];return new $t(r,i,this)}},ve.prototype.getSRID=function(){return this._SRID},ve.prototype.createGeometryCollection=function(){if(0===arguments.length)return new qt(null,this);if(1===arguments.length){var t=arguments[0];return new qt(t,this)}},ve.prototype.createGeometry=function(t){return new re(this).edit(t,{edit:function(){if(2===arguments.length){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})},ve.prototype.getPrecisionModel=function(){return this._precisionModel},ve.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(v(arguments[0],P)){var e=arguments[0];return new ee(e,this)}}},ve.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)}},ve.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(v(arguments[0],P)){var n=arguments[0];if(null===n)return this.createMultiPoint(new Array(0).fill(null));for(var r=new Array(n.size()).fill(null),i=0;i=this.size())throw new Error;return this.array_[t]},Ce.prototype.push=function(t){return this.array_.push(t),t},Ce.prototype.pop=function(t){if(0===this.array_.length)throw new Pe;return this.array_.pop()},Ce.prototype.peek=function(){if(0===this.array_.length)throw new Pe;return this.array_[this.array_.length-1]},Ce.prototype.empty=function(){return 0===this.array_.length},Ce.prototype.isEmpty=function(){return this.empty()},Ce.prototype.search=function(t){return this.array_.indexOf(t)},Ce.prototype.size=function(){return this.array_.length},Ce.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e0&&this._minIndexthis._minCoord.y&&n.y>this._minCoord.y&&r===X.CLOCKWISE&&(i=!0),i&&(this._minIndex=this._minIndex-1)},Te.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 r=Me.LEFT;return n[e].ythis._minCoord.x)&&(this._minDe=t,this._minIndex=n,this._minCoord=e[n])},Te.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)},Te.prototype.findEdge=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}G.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)===Me.LEFT&&(this._orientedDe=this._minDe.getSym())},Te.prototype.interfaces_=function(){return[]},Te.prototype.getClass=function(){return Te};var Ie=function(t){function e(n,r){t.call(this,e.msgWithCoord(n,r)),this.pt=r?new h(r):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}(B),Le=function(){this.array_=[]};Le.prototype.addLast=function(t){this.array_.push(t)},Le.prototype.removeFirst=function(){return this.array_.shift()},Le.prototype.isEmpty=function(){return 0===this.array_.length};var Ae=function(){this._finder=null,this._dirEdgeList=new ft,this._nodes=new ft,this._rightMostCoord=null,this._env=null,this._finder=new Te};Ae.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){t.next().setVisited(!1)}},Ae.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Ae.prototype.computeNodeDepth=function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var r=n.next();if(r.isVisited()||r.getSym().isVisited()){e=r;break}}if(null===e)throw new Ie("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var i=t.getEdges().iterator();i.hasNext();){var o=i.next();o.setVisited(!0),this.copySymDepths(o)}},Ae.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(Me.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Ae.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Ae.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(Me.RIGHT)>=1&&e.getDepth(Me.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Ae.prototype.computeDepths=function(t){var e=new xt,n=new Le,r=t.getNode();for(n.addLast(r),e.add(r),t.setVisited(!0);!n.isEmpty();){var i=n.removeFirst();e.add(i),this.computeNodeDepth(i);for(var o=i.getEdges().iterator();o.hasNext();){var a=o.next().getSym();if(!a.isVisited()){var s=a.getNode();e.contains(s)||(n.addLast(s),e.add(s))}}}},Ae.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.xe._rightMostCoord.x?1:0},Ae.prototype.getEnvelope=function(){if(null===this._env){for(var t=new N,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),r=0;rthis.location.length){var e=new Array(3).fill(null);e[Me.ON]=this.location[Me.ON],e[Me.LEFT]=g.NONE,e[Me.RIGHT]=g.NONE,this.location=e}for(var n=0;n1&&t.append(g.toLocationSymbol(this.location[Me.LEFT])),t.append(g.toLocationSymbol(this.location[Me.ON])),this.location.length>1&&t.append(g.toLocationSymbol(this.location[Me.RIGHT])),t.toString()},Ne.prototype.setLocations=function(t,e,n){this.location[Me.ON]=t,this.location[Me.LEFT]=e,this.location[Me.RIGHT]=n},Ne.prototype.get=function(t){return t1},Ne.prototype.isAnyNull=function(){for(var t=0;tthis._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},je.prototype.addPoints=function(t,e,n){var r=t.getCoordinates();if(e){var i=1;n&&(i=0);for(var o=i;o=0;s--)this._pts.add(r[s])}},je.prototype.isHole=function(){return this._isHole},je.prototype.setInResult=function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)},je.prototype.containsPoint=function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!X.isPointInRing(t,e.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();){if(n.next().containsPoint(t))return!1}return!0},je.prototype.addHole=function(t){this._holes.add(t)},je.prototype.isShell=function(){return null===this._shell},je.prototype.getLabel=function(){return this._label},je.prototype.getEdges=function(){return this._edges},je.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},je.prototype.getShell=function(){return this._shell},je.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],r=e.getLocation(n,Me.RIGHT);if(r===g.NONE)return null;if(this._label.getLocation(n)===g.NONE)return this._label.setLocation(n,r),null}},je.prototype.setShell=function(t){this._shell=t,null!==t&&t.addHole(this)},je.prototype.toPolygon=function(t){for(var e=new Array(this._holes.size()).fill(null),n=0;n=2,"found partial label"),this.computeIM(t)},Fe.prototype.isInResult=function(){return this._isInResult},Fe.prototype.isVisited=function(){return this._isVisited},Fe.prototype.interfaces_=function(){return[]},Fe.prototype.getClass=function(){return Fe};var ze=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 ke(0,g.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=g.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var r=t.getLocation(e);n!==g.BOUNDARY&&(n=r)}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 ke(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 ke)for(var n=arguments[0],r=0;r<2;r++){var i=this.computeMergedLocation(n,r);this._label.getLocation(r)===g.NONE&&this._label.setLocation(r,i)}},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=g.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case g.BOUNDARY:n=g.INTERIOR;break;case g.INTERIOR:default:n=g.BOUNDARY}this._label.setLocation(t,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Fe),Be=function(){this.nodeMap=new Lt,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Be.prototype.find=function(t){return this.nodeMap.get(t)},Be.prototype.addNode=function(){if(arguments[0]instanceof h){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 ze){var n=arguments[0],r=this.nodeMap.get(n.getCoordinate());return null===r?(this.nodeMap.put(n.getCoordinate(),n),n):(r.mergeLabel(n),r)}},Be.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){e.next().print(t)}},Be.prototype.iterator=function(){return this.nodeMap.values().iterator()},Be.prototype.values=function(){return this.nodeMap.values()},Be.prototype.getBoundaryNodes=function(t){for(var e=new ft,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(t)===g.BOUNDARY&&e.add(r)}return e},Be.prototype.add=function(t){var e=t.getCoordinate();this.addNode(e).add(t)},Be.prototype.interfaces_=function(){return[]},Be.prototype.getClass=function(){return Be};var qe=function(){},Ge={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe},qe.isNorthern=function(t){return t===qe.NE||t===qe.NW},qe.isOpposite=function(t,e){return t!==e&&2===(t-e+4)%4},qe.commonHalfPlane=function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var n=te?t:e)?3:n},qe.isInHalfPlane=function(t,e){return e===qe.SE?t===qe.SE||t===qe.SW:t===e||t===e+1},qe.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 i("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?qe.NE:qe.SE:e>=0?qe.NW:qe.SW}if(arguments[0]instanceof h&&arguments[1]instanceof h){var n=arguments[0],r=arguments[1];if(r.x===n.x&&r.y===n.y)throw new i("Cannot compute the quadrant for two identical points "+n);return r.x>=n.x?r.y>=n.y?qe.NE:qe.SE:r.y>=n.y?qe.NW:qe.SW}},Ge.NE.get=function(){return 0},Ge.NW.get=function(){return 1},Ge.SW.get=function(){return 2},Ge.SE.get=function(){return 3},Object.defineProperties(qe,Ge);var Ue=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],r=arguments[2];this._edge=e,this.init(n,r),this._label=null}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];this._edge=i,this.init(o,a),this._label=s}};Ue.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant2){o.linkDirectedEdgesForMinimalEdgeRings();var a=o.buildMinimalRings(),s=this.findShell(a);null!==s?(this.placePolygonHoles(s,a),e.add(s)):n.addAll(a)}else r.add(o)}return r},Ye.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){if(e.next().containsPoint(t))return!0}return!1},Ye.prototype.buildMaximalEdgeRings=function(t){for(var e=new ft,n=t.iterator();n.hasNext();){var r=n.next();if(r.isInResult()&&r.getLabel().isArea()&&null===r.getEdgeRing()){var i=new De(r,this._geometryFactory);e.add(i),i.setInResult()}}return e},Ye.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(t)}},Ye.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},Ye.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),r=n.getEnvelopeInternal(),i=n.getCoordinateN(0),o=null,a=null,s=e.iterator();s.hasNext();){var u=s.next(),c=u.getLinearRing(),l=c.getEnvelopeInternal();null!==o&&(a=o.getLinearRing().getEnvelopeInternal());var h=!1;l.contains(r)&&X.isPointInRing(i,c.getCoordinates())&&(h=!0),h&&(null===o||a.contains(l))&&(o=u)}return o},Ye.prototype.findShell=function(t){for(var e=0,n=null,r=t.iterator();r.hasNext();){var i=r.next();i.isHole()||(n=i,e++)}return G.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},Ye.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];He.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(e),i=new ft,o=this.buildMinimalEdgeRings(r,this._shellList,i);this.sortShellsAndHoles(o,this._shellList,i),this.placeFreeHoles(this._shellList,i)}},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye};var Xe=function(){};Xe.prototype.getBounds=function(){},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe};var Ze=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};Ze.prototype.getItem=function(){return this._item},Ze.prototype.getBounds=function(){return this._bounds},Ze.prototype.interfaces_=function(){return[Xe,l]},Ze.prototype.getClass=function(){return Ze};var We=function(){this._size=null,this._items=null,this._size=0,this._items=new ft,this._items.add(null)};We.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},We.prototype.size=function(){return this._size},We.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)},We.prototype.clear=function(){this._size=0,this._items.clear()},We.prototype.isEmpty=function(){return 0===this._size},We.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)},We.prototype.interfaces_=function(){return[]},We.prototype.getClass=function(){return We};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 $e=function(){if(this._childBoundables=new ft,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}},tn={serialVersionUID:{configurable:!0}};$e.prototype.getLevel=function(){return this._level},$e.prototype.size=function(){return this._childBoundables.size()},$e.prototype.getChildBoundables=function(){return this._childBoundables},$e.prototype.addChildBoundable=function(t){G.isTrue(null===this._bounds),this._childBoundables.add(t)},$e.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},$e.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},$e.prototype.interfaces_=function(){return[Xe,l]},$e.prototype.getClass=function(){return $e},tn.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties($e,tn);var en=function(){};en.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}},en.min=function(t){return en.sort(t),t.get(0)},en.sort=function(t,e){var n=t.toArray();e?Rt.sort(n,e):Rt.sort(n);for(var r=t.iterator(),i=0,o=n.length;inn.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(r)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new i("neither boundable is composite")},nn.prototype.isLeaves=function(){return!(nn.isComposite(this._boundable1)||nn.isComposite(this._boundable2))},nn.prototype.compareTo=function(t){var e=t;return this._distancee._distance?1:0},nn.prototype.expand=function(t,e,n,r){for(var i=t.getChildBoundables().iterator();i.hasNext();){var o=i.next(),a=new nn(o,e,this._itemDistance);a.getDistance()1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},on={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};rn.prototype.getNodeCapacity=function(){return this._nodeCapacity},rn.prototype.lastNode=function(t){return t.get(t.size()-1)},rn.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 $e?t+=this.size(n):n instanceof Ze&&(t+=1)}return t}},rn.prototype.removeItem=function(t,e){for(var n=null,r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof Ze&&i.getItem()===e&&(n=i)}return null!==n&&(t.getChildBoundables().remove(n),!0)},rn.prototype.itemsTree=function(){if(0===arguments.length){this.build();var t=this.itemsTree(this._root);return null===t?new ft:t}if(1===arguments.length){for(var e=arguments[0],n=new ft,r=e.getChildBoundables().iterator();r.hasNext();){var i=r.next();if(i instanceof $e){var o=this.itemsTree(i);null!==o&&n.add(o)}else i instanceof Ze?n.add(i.getItem()):G.shouldNeverReachHere()}return n.size()<=0?null:n}},rn.prototype.insert=function(t,e){G.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new Ze(t,e))},rn.prototype.boundablesAtLevel=function(){if(1===arguments.length){var t=arguments[0],e=new ft;return this.boundablesAtLevel(t,this._root,e),e}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];if(G.isTrue(n>-2),r.getLevel()===n)return i.add(r),null;for(var o=r.getChildBoundables().iterator();o.hasNext();){var a=o.next();a instanceof $e?this.boundablesAtLevel(n,a,i):(G.isTrue(a instanceof Ze),-1===n&&i.add(a))}return null}},rn.prototype.query=function(){if(1===arguments.length){var t=arguments[0];this.build();var e=new ft;return this.isEmpty()?e:(this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,e),e)}if(2===arguments.length){var n=arguments[0],r=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.query(n,this._root,r)}else if(3===arguments.length)if(v(arguments[2],Ke)&&arguments[0]instanceof Object&&arguments[1]instanceof $e)for(var i=arguments[0],o=arguments[1],a=arguments[2],s=o.getChildBoundables(),u=0;ut&&(t=r)}}return t+1}},rn.prototype.createParentBoundables=function(t,e){G.isTrue(!t.isEmpty());var n=new ft;n.add(this.createNode(e));var r=new ft(t);en.sort(r,this.getComparator());for(var i=r.iterator();i.hasNext();){var o=i.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(e)),this.lastNode(n).addChildBoundable(o)}return n},rn.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},rn.prototype.interfaces_=function(){return[l]},rn.prototype.getClass=function(){return rn},rn.compareDoubles=function(t,e){return t>e?1:t0);for(var n=new ft,r=0;r0;){var f=h.poll(),p=f.getDistance();if(p>=c)break;f.isLeaves()?(c=p,l=f):f.expandToQueue(h,c)}return[l.getBoundable(0).getItem(),l.getBoundable(1).getItem()]}}else if(3===arguments.length){var d=arguments[0],g=arguments[1],y=arguments[2],m=new Ze(d,g),_=new nn(this.getRoot(),m,y);return this.nearestNeighbour(_)[0]}},e.prototype.interfaces_=function(){return[Qe,l]},e.prototype.getClass=function(){return e},e.centreX=function(t){return e.avg(t.getMinX(),t.getMaxX())},e.avg=function(t,e){return(t+e)/2},e.centreY=function(t){return e.avg(t.getMinY(),t.getMaxY())},n.STRtreeNode.get=function(){return cn},n.serialVersionUID.get=function(){return 0x39920f7d5f261e0},n.xComparator.get=function(){return{interfaces_:function(){return[c]},compare:function(n,r){return t.compareDoubles(e.centreX(n.getBounds()),e.centreX(r.getBounds()))}}},n.yComparator.get=function(){return{interfaces_:function(){return[c]},compare:function(n,r){return t.compareDoubles(e.centreY(n.getBounds()),e.centreY(r.getBounds()))}}},n.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},n.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(e,n),e}(rn),cn=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 N(n.getBounds()):t.expandToInclude(n.getBounds())}return t},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}($e),ln=function(){};ln.prototype.interfaces_=function(){return[]},ln.prototype.getClass=function(){return ln},ln.relativeSign=function(t,e){return te?1:0},ln.compare=function(t,e,n){if(e.equals2D(n))return 0;var r=ln.relativeSign(e.x,n.x),i=ln.relativeSign(e.y,n.y);switch(t){case 0:return ln.compareValue(r,i);case 1:return ln.compareValue(i,r);case 2:return ln.compareValue(i,-r);case 3:return ln.compareValue(-r,i);case 4:return ln.compareValue(-r,-i);case 5:return ln.compareValue(-i,-r);case 6:return ln.compareValue(-i,r);case 7:return ln.compareValue(r,-i)}return G.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 hn=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],r=arguments[3];this._segString=t,this.coord=new h(e),this.segmentIndex=n,this._segmentOctant=r,this._isInterior=!e.equals2D(t.getCoordinate(n))};hn.prototype.getCoordinate=function(){return this.coord},hn.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},hn.prototype.compareTo=function(t){var e=t;return this.segmentIndexe.segmentIndex?1:this.coord.equals2D(e.coord)?0:ln.compare(this._segmentOctant,this.coord,e.coord)},hn.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},hn.prototype.isInterior=function(){return this._isInterior},hn.prototype.interfaces_=function(){return[s]},hn.prototype.getClass=function(){return hn};var fn=function(){this._nodeMap=new Lt,this._edge=null;var t=arguments[0];this._edge=t};fn.prototype.getSplitCoordinates=function(){var t=new dt;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next();this.addEdgeCoordinates(n,r,t),n=r}return t.toCoordinateArray()},fn.prototype.addCollapsedNodes=function(){var t=new ft;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)}},fn.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){e.next().print(t)}},fn.prototype.findCollapsesFromExistingVertices=function(t){for(var e=0;e=0?e>=0?n>=r?0:1:n>=r?7:6:e>=0?n>=r?3:2:n>=r?4:5}if(arguments[0]instanceof h&&arguments[1]instanceof h){var o=arguments[0],a=arguments[1],s=a.x-o.x,u=a.y-o.y;if(0===s&&0===u)throw new i("Cannot compute the octant for two identical points "+o);return pn.octant(s,u)}};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 gn=function(){};gn.prototype.addIntersection=function(t,e){},gn.prototype.interfaces_=function(){return[dn]},gn.prototype.getClass=function(){return gn};var yn=function(){this._nodeList=new fn(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};yn.prototype.getCoordinates=function(){return this._pts},yn.prototype.size=function(){return this._pts.length},yn.prototype.getCoordinate=function(t){return this._pts[t]},yn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},yn.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},yn.prototype.setData=function(t){this._data=t},yn.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:pn.octant(t,e)},yn.prototype.getData=function(){return this._data},yn.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],r=arguments[1],i=arguments[3],o=new h(n.getIntersection(i));this.addIntersection(o,r)}},yn.prototype.toString=function(){return z.toLineString(new ue(this._pts))},yn.prototype.getNodeList=function(){return this._nodeList},yn.prototype.addIntersectionNode=function(t,e){var n=e,r=n+1;if(r=0&&n>=0?Math.max(e,n):e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof h){var r=arguments[0];return X.orientationIndex(this.p0,this.p1,r)}},vn.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},vn.prototype.isVertical=function(){return this.p0.x===this.p1.x},vn.prototype.equals=function(t){if(!(t instanceof vn))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},vn.prototype.intersection=function(t){var e=new J;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},vn.prototype.project=function(){if(arguments[0]instanceof h){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new h(t);var e=this.projectionFactor(t),n=new h;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 vn){var r=arguments[0],i=this.projectionFactor(r.p0),o=this.projectionFactor(r.p1);if(i>=1&&o>=1)return null;if(i<=0&&o<=0)return null;var a=this.project(r.p0);i<0&&(a=this.p0),i>1&&(a=this.p1);var s=this.project(r.p1);return o<0&&(s=this.p0),o>1&&(s=this.p1),new vn(a,s)}},vn.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},vn.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},vn.prototype.getCoordinate=function(t){return 0===t?this.p0:this.p1},vn.prototype.distancePerpendicular=function(t){return X.distancePointLinePerpendicular(t,this.p0,this.p1)},vn.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},vn.prototype.midPoint=function(){return vn.midPoint(this.p0,this.p1)},vn.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,r=e*e+n*n;return r<=0?o.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/r},vn.prototype.closestPoints=function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),r=o.MAX_VALUE,i=null,a=this.closestPoint(t.p0);r=a.distance(t.p0),n[0]=a,n[1]=t.p0;var s=this.closestPoint(t.p1);(i=s.distance(t.p1))0&&e<1?this.project(t):this.p0.distance(t)1||o.isNaN(e))&&(e=1),e},vn.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},vn.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},vn.prototype.distance=function(){if(arguments[0]instanceof vn){var t=arguments[0];return X.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof h){var e=arguments[0];return X.distancePointLine(e,this.p0,this.p1)}},vn.prototype.pointAlong=function(t){var e=new h;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},vn.prototype.hashCode=function(){var t=o.doubleToLongBits(this.p0.x);t^=31*o.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=o.doubleToLongBits(this.p1.x);return n^=31*o.doubleToLongBits(this.p1.y),e^(Math.trunc(n)^Math.trunc(n>>32))},vn.prototype.interfaces_=function(){return[s,l]},vn.prototype.getClass=function(){return vn},vn.midPoint=function(t,e){return new h((t.x+e.x)/2,(t.y+e.y)/2)},mn.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(vn,mn);var _n=function(){this.tempEnv1=new N,this.tempEnv2=new N,this._overlapSeg1=new vn,this._overlapSeg2=new vn};_n.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(r,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},_n.prototype.interfaces_=function(){return[]},_n.prototype.getClass=function(){return _n};var bn=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],r=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=r};bn.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},bn.prototype.computeSelect=function(t,e,n,r){var i=this._pts[e],o=this._pts[n];if(r.tempEnv1.init(i,o),n-e==1)return r.select(this,e),null;if(!t.intersects(r.tempEnv1))return null;var a=Math.trunc((e+n)/2);e=t.length-1)return t.length-1;for(var r=qe.quadrant(t[n],t[n+1]),i=e+1;in.getId()&&(n.computeOverlaps(i,t),this._nOverlaps++),this._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return Mn},Object.defineProperties(e,n),e}(xn),Mn=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],r=arguments[2],i=arguments[3],o=e.getContext(),a=r.getContext();this._si.processIntersections(o,n,a,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(_n),Sn=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],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(o),this.setJoinStyle(a),this.setMitreLimit(s)}},Pn={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}};Sn.prototype.getEndCapStyle=function(){return this._endCapStyle},Sn.prototype.isSingleSided=function(){return this._isSingleSided},Sn.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=Sn.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Sn.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==Sn.JOIN_ROUND&&(this._quadrantSegments=Sn.DEFAULT_QUADRANT_SEGMENTS)},Sn.prototype.getJoinStyle=function(){return this._joinStyle},Sn.prototype.setJoinStyle=function(t){this._joinStyle=t},Sn.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},Sn.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Sn.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Sn.prototype.setEndCapStyle=function(t){this._endCapStyle=t},Sn.prototype.getMitreLimit=function(){return this._mitreLimit},Sn.prototype.setMitreLimit=function(t){this._mitreLimit=t},Sn.prototype.setSingleSided=function(t){this._isSingleSided=t},Sn.prototype.interfaces_=function(){return[]},Sn.prototype.getClass=function(){return Sn},Sn.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Pn.CAP_ROUND.get=function(){return 1},Pn.CAP_FLAT.get=function(){return 2},Pn.CAP_SQUARE.get=function(){return 3},Pn.JOIN_ROUND.get=function(){return 1},Pn.JOIN_MITRE.get=function(){return 2},Pn.JOIN_BEVEL.get=function(){return 3},Pn.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Pn.DEFAULT_MITRE_LIMIT.get=function(){return 5},Pn.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(Sn,Pn);var Cn=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=X.COUNTERCLOCKWISE,this._inputLine=t||null},Tn={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Cn.prototype.isDeletable=function(t,e,n,r){var i=this._inputLine[t],o=this._inputLine[e],a=this._inputLine[n];return!!this.isConcave(i,o,a)&&(!!this.isShallow(i,o,a,r)&&this.isShallowSampled(i,o,t,n,r))},Cn.prototype.deleteShallowConcavities=function(){for(var t=1,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e),r=!1;n=0;r--)this.addPt(t[r])},In.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)Math.PI;)t-=An.PI_TIMES_2;for(;t<=-Math.PI;)t+=An.PI_TIMES_2;return t},An.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],r=n.x-e.x,i=n.y-e.y;return Math.atan2(i,r)}},An.isAcute=function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)>0},An.isObtuse=function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)<0},An.interiorAngle=function(t,e,n){var r=An.angle(e,t),i=An.angle(e,n);return Math.abs(i-r)},An.normalizePositive=function(t){if(t<0){for(;t<0;)t+=An.PI_TIMES_2;t>=An.PI_TIMES_2&&(t=0)}else{for(;t>=An.PI_TIMES_2;)t-=An.PI_TIMES_2;t<0&&(t=0)}return t},An.angleBetween=function(t,e,n){var r=An.angle(e,t),i=An.angle(e,n);return An.diff(r,i)},An.diff=function(t,e){var n=null;return(n=tMath.PI&&(n=2*Math.PI-n),n},An.toRadians=function(t){return t*Math.PI/180},An.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?An.COUNTERCLOCKWISE:n<0?An.CLOCKWISE:An.NONE},An.angleBetweenOriented=function(t,e,n){var r=An.angle(e,t),i=An.angle(e,n)-r;return i<=-Math.PI?i+An.PI_TIMES_2:i>Math.PI?i-An.PI_TIMES_2:i},Nn.PI_TIMES_2.get=function(){return 2*Math.PI},Nn.PI_OVER_2.get=function(){return Math.PI/2},Nn.PI_OVER_4.get=function(){return Math.PI/4},Nn.COUNTERCLOCKWISE.get=function(){return X.COUNTERCLOCKWISE},Nn.CLOCKWISE.get=function(){return X.CLOCKWISE},Nn.NONE.get=function(){return X.COLLINEAR},Object.defineProperties(An,Nn);var kn=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 vn,this._seg1=new vn,this._offset0=new vn,this._offset1=new vn,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new J,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===Sn.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},jn={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}};kn.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=X.computeOrientation(this._s0,this._s1,this._s2),r=n===X.CLOCKWISE&&this._side===Me.LEFT||n===X.COUNTERCLOCKWISE&&this._side===Me.RIGHT;0===n?this.addCollinear(e):r?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},kn.prototype.addLineEndCap=function(t,e){var n=new vn(t,e),r=new vn;this.computeOffsetSegment(n,Me.LEFT,this._distance,r);var i=new vn;this.computeOffsetSegment(n,Me.RIGHT,this._distance,i);var o=e.x-t.x,a=e.y-t.y,s=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case Sn.CAP_ROUND:this._segList.addPt(r.p1),this.addFilletArc(e,s+Math.PI/2,s-Math.PI/2,X.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case Sn.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(i.p1);break;case Sn.CAP_SQUARE:var u=new h;u.x=Math.abs(this._distance)*Math.cos(s),u.y=Math.abs(this._distance)*Math.sin(s);var c=new h(r.p1.x+u.x,r.p1.y+u.y),l=new h(i.p1.x+u.x,i.p1.y+u.y);this._segList.addPt(c),this._segList.addPt(l)}},kn.prototype.getCoordinates=function(){return this._segList.getCoordinates()},kn.prototype.addMitreJoin=function(t,e,n,r){var i=!0,o=null;try{o=A.intersection(e.p0,e.p1,n.p0,n.p1),(r<=0?1:o.distance(t)/Math.abs(r))>this._bufParams.getMitreLimit()&&(i=!1)}catch(t){if(!(t instanceof I))throw t;o=new h(0,0),i=!1}i?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,r,this._bufParams.getMitreLimit())},kn.prototype.addFilletCorner=function(t,e,n,r,i){var o=e.x-t.x,a=e.y-t.y,s=Math.atan2(a,o),u=n.x-t.x,c=n.y-t.y,l=Math.atan2(c,u);r===X.CLOCKWISE?s<=l&&(s+=2*Math.PI):s>=l&&(s-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,s,l,r,i),this._segList.addPt(n)},kn.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)0){var n=new h((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 r=new h((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(r)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},kn.prototype.createCircle=function(t){var e=new h(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},kn.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},kn.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new In,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*kn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},kn.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===Sn.JOIN_BEVEL||this._bufParams.getJoinStyle()===Sn.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,X.CLOCKWISE,this._distance))},kn.prototype.closeRing=function(){this._segList.closeRing()},kn.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},kn.prototype.interfaces_=function(){return[]},kn.prototype.getClass=function(){return kn},jn.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},jn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},jn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},jn.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(kn,jn);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,r=Math.abs(e),i=this.getSegGen(r);t.length<=1?this.computePointCurve(t[0],i):this.computeOffsetCurve(t,n,i);var o=i.getCoordinates();return n&>.reverse(o),o},Rn.prototype.computeSingleSidedBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var i=Cn.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Me.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(i[a],!0)}else{n.addSegments(t,!1);var s=Cn.simplify(t,r),u=s.length-1;n.initSideSegments(s[0],s[1],Me.LEFT),n.addFirstSegment();for(var c=2;c<=u;c++)n.addNextSegment(s[c],!0)}n.addLastSegment(),n.closeRing()},Rn.prototype.computeRingBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);e===Me.RIGHT&&(r=-r);var i=Cn.simplify(t,r),o=i.length-1;n.initSideSegments(i[o-1],i[0],e);for(var a=1;a<=o;a++){var s=1!==a;n.addNextSegment(i[a],s)}n.closeRing()},Rn.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),r=Cn.simplify(t,n),i=r.length-1;e.initSideSegments(r[0],r[1],Me.LEFT);for(var o=2;o<=i;o++)e.addNextSegment(r[o],!0);e.addLastSegment(),e.addLineEndCap(r[i-1],r[i]);var a=Cn.simplify(t,-n),s=a.length-1;e.initSideSegments(a[s],a[s-1],Me.LEFT);for(var u=s-2;u>=0;u--)e.addNextSegment(a[u],!0);e.addLastSegment(),e.addLineEndCap(a[1],a[0]),e.closeRing()},Rn.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case Sn.CAP_ROUND:e.createCircle(t);break;case Sn.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),r=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],r);else if(this._bufParams.isSingleSided()){var i=e<0;this.computeSingleSidedBufferCurve(t,i,r)}else this.computeLineBufferCurve(t,r);return r.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 r=this.getSegGen(n);return this.computeRingBufferCurve(t,e,r),r.getCoordinates()},Rn.prototype.computeOffsetCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){var i=Cn.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Me.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(i[a],!0)}else{var s=Cn.simplify(t,r),u=s.length-1;n.initSideSegments(s[0],s[1],Me.LEFT),n.addFirstSegment();for(var c=2;c<=u;c++)n.addNextSegment(s[c],!0)}n.addLastSegment()},Rn.prototype.getSegGen=function(t){return new kn(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;ni.getMaxY()||this.findStabbedSegments(t,r.getDirectedEdges(),e)}return e}if(3===arguments.length)if(v(arguments[2],lt)&&arguments[0]instanceof h&&arguments[1]instanceof Ve)for(var o=arguments[0],a=arguments[1],s=arguments[2],u=a.getEdge().getCoordinates(),c=0;cthis._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)this._seg.p1.y||X.computeOrientation(this._seg.p0,this._seg.p1,o)===X.RIGHT)){var l=a.getDepth(Me.LEFT);this._seg.p0.equals(u[c])||(l=a.getDepth(Me.RIGHT));var f=new zn(this._seg,l);s.add(f)}}else if(v(arguments[2],lt)&&arguments[0]instanceof h&&v(arguments[1],lt))for(var p=arguments[0],d=arguments[1],g=arguments[2],y=d.iterator();y.hasNext();){var m=y.next();m.isForward()&&this.findStabbedSegments(p,m,g)}},Dn.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:en.min(e)._leftDepth},Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn},Fn.DepthSegment.get=function(){return zn},Object.defineProperties(Dn,Fn);var zn=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new vn(t),this._leftDepth=e};zn.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?n:0!==(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},zn.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},zn.prototype.toString=function(){return this._upwardSeg.toString()},zn.prototype.interfaces_=function(){return[s]},zn.prototype.getClass=function(){return zn};var Bn=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};Bn.prototype.area=function(){return Bn.area(this.p0,this.p1,this.p2)},Bn.prototype.signedArea=function(){return Bn.signedArea(this.p0,this.p1,this.p2)},Bn.prototype.interpolateZ=function(t){if(null===t)throw new i("Supplied point is null.");return Bn.interpolateZ(t,this.p0,this.p1,this.p2)},Bn.prototype.longestSideLength=function(){return Bn.longestSideLength(this.p0,this.p1,this.p2)},Bn.prototype.isAcute=function(){return Bn.isAcute(this.p0,this.p1,this.p2)},Bn.prototype.circumcentre=function(){return Bn.circumcentre(this.p0,this.p1,this.p2)},Bn.prototype.area3D=function(){return Bn.area3D(this.p0,this.p1,this.p2)},Bn.prototype.centroid=function(){return Bn.centroid(this.p0,this.p1,this.p2)},Bn.prototype.inCentre=function(){return Bn.inCentre(this.p0,this.p1,this.p2)},Bn.prototype.interfaces_=function(){return[]},Bn.prototype.getClass=function(){return Bn},Bn.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)},Bn.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},Bn.det=function(t,e,n,r){return t*r-e*n},Bn.interpolateZ=function(t,e,n,r){var i=e.x,o=e.y,a=n.x-i,s=r.x-i,u=n.y-o,c=r.y-o,l=a*c-s*u,h=t.x-i,f=t.y-o,p=(c*h-s*f)/l,d=(-u*h+a*f)/l;return e.z+p*(n.z-e.z)+d*(r.z-e.z)},Bn.longestSideLength=function(t,e,n){var r=t.distance(e),i=e.distance(n),o=n.distance(t),a=r;return i>a&&(a=i),o>a&&(a=o),a},Bn.isAcute=function(t,e,n){return!!An.isAcute(t,e,n)&&(!!An.isAcute(e,n,t)&&!!An.isAcute(n,t,e))},Bn.circumcentre=function(t,e,n){var r=n.x,i=n.y,o=t.x-r,a=t.y-i,s=e.x-r,u=e.y-i,c=2*Bn.det(o,a,s,u),l=Bn.det(a,o*o+a*a,u,s*s+u*u),f=Bn.det(o,o*o+a*a,s,s*s+u*u);return new h(r-l/c,i+f/c)},Bn.perpendicularBisector=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=new A(t.x+n/2,t.y+r/2,1),o=new A(t.x-r+n/2,t.y+n+r/2,1);return new A(i,o)},Bn.angleBisector=function(t,e,n){var r=e.distance(t),i=r/(r+e.distance(n)),o=n.x-t.x,a=n.y-t.y;return new h(t.x+i*o,t.y+i*a)},Bn.area3D=function(t,e,n){var r=e.x-t.x,i=e.y-t.y,o=e.z-t.z,a=n.x-t.x,s=n.y-t.y,u=n.z-t.z,c=i*u-o*s,l=o*a-r*u,h=r*s-i*a,f=c*c+l*l+h*h,p=Math.sqrt(f)/2;return p},Bn.centroid=function(t,e,n){var r=(t.x+e.x+n.x)/3,i=(t.y+e.y+n.y)/3;return new h(r,i)},Bn.inCentre=function(t,e,n){var r=e.distance(n),i=t.distance(n),o=t.distance(e),a=r+i+o,s=(r*t.x+i*e.x+o*n.x)/a,u=(r*t.y+i*e.y+o*n.y)/a;return new h(s,u)};var qn=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new ft;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};qn.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,g.EXTERIOR,g.INTERIOR)},qn.prototype.addPolygon=function(t){var e=this._distance,n=Me.LEFT;this._distance<0&&(e=-this._distance,n=Me.RIGHT);var r=t.getExteriorRing(),i=gt.removeRepeatedPoints(r.getCoordinates());if(this._distance<0&&this.isErodedCompletely(r,this._distance))return null;if(this._distance<=0&&i.length<3)return null;this.addPolygonRing(i,e,n,g.EXTERIOR,g.INTERIOR);for(var o=0;o0&&this.isErodedCompletely(a,-this._distance)||this.addPolygonRing(s,e,Me.opposite(n),g.INTERIOR,g.EXTERIOR)}},qn.prototype.isTriangleErodedCompletely=function(t,e){var n=new Bn(t[0],t[1],t[2]),r=n.inCentre();return X.distancePointLine(r,n.p0,n.p1)=ee.MINIMUM_VALID_SIZE&&X.isCCW(t)&&(o=i,a=r,n=Me.opposite(n));var s=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(s,o,a)},qn.prototype.add=function(t){if(t.isEmpty())return null;t instanceof $t?this.addPolygon(t):t instanceof Zt?this.addLineString(t):t instanceof Kt?this.addPoint(t):t instanceof te?this.addCollection(t):t instanceof Gt?this.addCollection(t):t instanceof ne?this.addCollection(t):t instanceof qt&&this.addCollection(t)},qn.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 r=t.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return e<0&&2*Math.abs(e)>i},qn.prototype.addCollection=function(t){for(var e=0;e=this._max)throw new ht;var t=this._parent.getGeometryN(this._index++);return t instanceof qt?(this._subcollectionIterator=new Un(t),this._subcollectionIterator.next()):t},Un.prototype.remove=function(){throw new Error(this.getClass().getName())},Un.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)},Un.prototype.interfaces_=function(){return[ct]},Un.prototype.getClass=function(){return Un},Un.isAtomic=function(t){return!(t instanceof qt)};var Vn=function(){this._geom=null;var t=arguments[0];this._geom=t};Vn.prototype.locate=function(t){return Vn.locate(t,this._geom)},Vn.prototype.interfaces_=function(){return[Gn]},Vn.prototype.getClass=function(){return Vn},Vn.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&X.isPointInRing(t,e.getCoordinates())},Vn.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!Vn.isPointInRing(t,n))return!1;for(var r=0;r=0;n--){var r=this._edgeList.get(n),i=r.getSym();null===e&&(e=i),null!==t&&i.setNext(t),t=r}e.setNext(t)},e.prototype.computeDepths=function(){if(1===arguments.length){var t=arguments[0],e=this.findIndex(t),n=t.getDepth(Me.LEFT),r=t.getDepth(Me.RIGHT),i=this.computeDepths(e+1,this._edgeList.size(),n);if(this.computeDepths(0,e,i)!==r)throw new Ie("depth mismatch at "+t.getCoordinate())}else if(3===arguments.length){for(var o=arguments[0],a=arguments[1],s=arguments[2],u=o;u=0;i--){var o=this._resultAreaEdgeList.get(i),a=o.getSym();switch(null===e&&o.getEdgeRing()===t&&(e=o),r){case this._SCANNING_FOR_INCOMING:if(a.getEdgeRing()!==t)continue;n=a,r=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(o.getEdgeRing()!==t)continue;n.setNextMin(o),r=this._SCANNING_FOR_INCOMING}}r===this._LINKING_TO_OUTGOING&&(G.isTrue(null!==e,"found null for first outgoing dirEdge"),G.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],r=0,i=this.iterator();i.hasNext();){i.next().getEdgeRing()===n&&r++}return r}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var t=g.NONE,e=this.iterator();e.hasNext();){var n=e.next(),r=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=g.INTERIOR;break}if(r.isInResult()){t=g.EXTERIOR;break}}}if(t===g.NONE)return null;for(var i=t,o=this.iterator();o.hasNext();){var a=o.next(),s=a.getSym();a.isLineEdge()?a.getEdge().setCovered(i===g.INTERIOR):(a.isInResult()&&(i=g.EXTERIOR),s.isInResult()&&(i=g.INTERIOR))}},e.prototype.computeLabelling=function(e){t.prototype.computeLabelling.call(this,e),this._label=new ke(g.NONE);for(var n=this.iterator();n.hasNext();)for(var r=n.next().getEdge().getLabel(),i=0;i<2;i++){var o=r.getLocation(i);o!==g.INTERIOR&&o!==g.BOUNDARY||this._label.setLocation(i,g.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Jn),Yn=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 ze(t,new Hn)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Je),Xn=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};Xn.prototype.compareTo=function(t){var e=t;return Xn.compareOriented(this._pts,this._orientation,e._pts,e._orientation)},Xn.prototype.interfaces_=function(){return[s]},Xn.prototype.getClass=function(){return Xn},Xn.orientation=function(t){return 1===gt.increasingDirection(t)},Xn.compareOriented=function(t,e,n,r){for(var i=e?1:-1,o=r?1:-1,a=e?t.length:-1,s=r?n.length:-1,u=e?0:t.length-1,c=r?0:n.length-1;;){var l=t[u].compareTo(n[c]);if(0!==l)return l;var h=(u+=i)===a,f=(c+=o)===s;if(h&&!f)return-1;if(!h&&f)return 1;if(h&&f)return 0}};var Zn=function(){this._edges=new ft,this._ocaMap=new Lt};Zn.prototype.print=function(t){t.print("MULTILINESTRING ( ");for(var e=0;e0&&t.print(","),t.print("(");for(var r=n.getCoordinates(),i=0;i0&&t.print(","),t.print(r[i].x+" "+r[i].y);t.println(")")}t.print(") ")},Zn.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},Zn.prototype.findEdgeIndex=function(t){for(var e=0;e0||!e.coord.equals2D(r);i||n--;var o=new Array(n).fill(null),a=0;o[a++]=new h(t.coord);for(var s=t.segmentIndex+1;s<=e.segmentIndex;s++)o[a++]=this.edge.pts[s];return i&&(o[a]=e.coord),new ir(o,new ke(this.edge._label))},$n.prototype.add=function(t,e,n){var r=new Qn(t,e,n),i=this._nodeMap.get(r);return null!==i?i:(this._nodeMap.put(r,r),r)},$n.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){if(e.next().coord.equals(t))return!0}return!1},$n.prototype.interfaces_=function(){return[]},$n.prototype.getClass=function(){return $n};var tr=function(){};tr.prototype.getChainStartIndices=function(t){var e=0,n=new ft;n.add(new w(e));do{var r=this.findChainEnd(t,e);n.add(new w(r)),e=r}while(en?e:n},er.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return ee&&(r=1),this._depth[t][n]=r}}},nr.prototype.getDelta=function(t){return this._depth[t][Me.RIGHT]-this._depth[t][Me.LEFT]},nr.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?g.EXTERIOR:g.INTERIOR},nr.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},nr.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 r=t.getLocation(e,n);r!==g.EXTERIOR&&r!==g.INTERIOR||(this.isNull(e,n)?this._depth[e][n]=nr.depthAtLocation(r):this._depth[e][n]+=nr.depthAtLocation(r))}else if(3===arguments.length){var i=arguments[0],o=arguments[1];arguments[2]===g.INTERIOR&&this._depth[i][o]++}},nr.prototype.interfaces_=function(){return[]},nr.prototype.getClass=function(){return nr},nr.depthAtLocation=function(t){return t===g.EXTERIOR?0:t===g.INTERIOR?1:nr.NULL_VALUE},rr.NULL_VALUE.get=function(){return-1},Object.defineProperties(nr,rr);var ir=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new $n(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new nr,this._depthDelta=0,1===arguments.length){var n=arguments[0];e.call(this,n,null)}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}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,ke.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 r=!0,i=!0,o=this.pts.length,a=0;a0?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;e0&&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 er(this)),this._mce},e.prototype.getEnvelope=function(){if(null===this._env){this._env=new N;for(var t=0;t0&&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;er||this._maxyo;if(a)return!1;var s=this.intersectsToleranceSquare(t,e);return G.isTrue(!(a&&s),"Found bad envelope test"),s},cr.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 h(this._maxx,this._maxy),this._corner[1]=new h(this._minx,this._maxy),this._corner[2]=new h(this._minx,this._miny),this._corner[3]=new h(this._maxx,this._miny)},cr.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))},cr.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},cr.prototype.getCoordinate=function(){return this._originalPt},cr.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},cr.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var t=cr.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new N(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},cr.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())))},cr.prototype.intersectsToleranceSquare=function(t,e){var n=!1,r=!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()&&(r=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.isProper()||(!(!n||!r)||(!!t.equals(this._pt)||!!e.equals(this._pt))))))},cr.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),r=t.getCoordinate(e+1);return!!this.intersects(n,r)&&(t.addIntersection(this.getCoordinate(),e),!0)},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},lr.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(cr,lr);var hr=function(){this.tempEnv1=new N,this.selectedSegment=new vn};hr.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)}},hr.prototype.interfaces_=function(){return[]},hr.prototype.getClass=function(){return hr};var fr=function(){this._index=null;var t=arguments[0];this._index=t},pr={HotPixelSnapAction:{configurable:!0}};fr.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],r=arguments[2],i=e.getSafeEnvelope(),o=new dr(e,n,r);return this._index.query(i,{interfaces_:function(){return[Ke]},visitItem:function(t){t.select(i,o)}}),o.isNodeAdded()}},fr.prototype.interfaces_=function(){return[]},fr.prototype.getClass=function(){return fr},pr.HotPixelSnapAction.get=function(){return dr},Object.defineProperties(fr,pr);var dr=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],r=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=r}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],r=e.getContext();if(null!==this._parentEdge&&r===this._parentEdge&&n===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(r,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hr),gr=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new ft};gr.prototype.processIntersections=function(t,e,n,r){if(t===n&&e===r)return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];if(this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var u=0;u=0;t--){try{this.bufferReducedPrecision(t)}catch(t){if(!(t instanceof Ie))throw t;this._saveException=t}if(null!==this._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var e=arguments[0],n=vr.precisionScaleFactor(this._argGeom,this._distance,e),r=new pe(n);this.bufferFixedPrecision(r)}},vr.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===pe.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},vr.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},vr.prototype.bufferOriginalPrecision=function(){try{var t=new or(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof B))throw t;this._saveException=t}},vr.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},vr.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},vr.prototype.interfaces_=function(){return[]},vr.prototype.getClass=function(){return vr},vr.bufferOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new vr(t).getResultGeometry(e)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof K&&"number"==typeof arguments[1]){var n=arguments[0],r=arguments[1],i=arguments[2],o=new vr(n);return o.setQuadrantSegments(i),o.getResultGeometry(r)}if(arguments[2]instanceof Sn&&arguments[0]instanceof K&&"number"==typeof arguments[1]){var a=arguments[0],s=arguments[1],u=arguments[2];return new vr(a,u).getResultGeometry(s)}}else if(4===arguments.length){var c=arguments[0],l=arguments[1],h=arguments[2],f=arguments[3],p=new vr(c);return p.setQuadrantSegments(h),p.setEndCapStyle(f),p.getResultGeometry(l)}},vr.precisionScaleFactor=function(t,e,n){var r=t.getEnvelopeInternal(),i=m.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY()))+2*(e>0?e:0),o=n-Math.trunc(Math.log(i)/Math.log(10)+1);return Math.pow(10,o)},mr.CAP_ROUND.get=function(){return Sn.CAP_ROUND},mr.CAP_BUTT.get=function(){return Sn.CAP_FLAT},mr.CAP_FLAT.get=function(){return Sn.CAP_FLAT},mr.CAP_SQUARE.get=function(){return Sn.CAP_SQUARE},mr.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(vr,mr);var _r=function(){this._pt=[new h,new h],this._distance=o.NaN,this._isNull=!0};_r.prototype.getCoordinates=function(){return this._pt},_r.prototype.getCoordinate=function(t){return this._pt[t]},_r.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 r=e.distance(n);rthis._distance&&this.initialize(e,n,r)}},_r.prototype.interfaces_=function(){return[]},_r.prototype.getClass=function(){return _r};var br=function(){};br.prototype.interfaces_=function(){return[]},br.prototype.getClass=function(){return br},br.computeDistance=function(){if(arguments[2]instanceof _r&&arguments[0]instanceof Zt&&arguments[1]instanceof h)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=t.getCoordinates(),i=new vn,o=0;o0||this._isIn?g.INTERIOR:g.EXTERIOR)},Pr.prototype.interfaces_=function(){return[]},Pr.prototype.getClass=function(){return Pr};var Cr=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 r=arguments[0],i=arguments[1],o=arguments[2];this._component=r,this._segIndex=i,this._pt=o}},Tr={INSIDE_AREA:{configurable:!0}};Cr.prototype.isInsideArea=function(){return this._segIndex===Cr.INSIDE_AREA},Cr.prototype.getCoordinate=function(){return this._pt},Cr.prototype.getGeometryComponent=function(){return this._component},Cr.prototype.getSegmentIndex=function(){return this._segIndex},Cr.prototype.interfaces_=function(){return[]},Cr.prototype.getClass=function(){return Cr},Tr.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Cr,Tr);var Ir=function(t){this._pts=t||null};Ir.prototype.filter=function(t){t instanceof Kt&&this._pts.add(t)},Ir.prototype.interfaces_=function(){return[zt]},Ir.prototype.getClass=function(){return Ir},Ir.getPoints=function(){if(1===arguments.length){var t=arguments[0];return t instanceof Kt?en.singletonList(t):Ir.getPoints(t,new ft)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Kt?n.add(e):e instanceof qt&&e.apply(new Ir(n)),n}};var Lr=function(){this._locations=null;var t=arguments[0];this._locations=t};Lr.prototype.filter=function(t){(t instanceof Kt||t instanceof Zt||t instanceof $t)&&this._locations.add(new Cr(t,0,t.getCoordinate()))},Lr.prototype.interfaces_=function(){return[zt]},Lr.prototype.getClass=function(){return Lr},Lr.getLocations=function(t){var e=new ft;return t.apply(new Lr(e)),e};var Ar=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Pr,this._minDistanceLocation=null,this._minDistance=o.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],r=arguments[1],i=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=r,this._terminateDistance=i}};Ar.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],r=1-e,i=Mr.getPolygons(this._geom[e]);if(i.size()>0){var o=Lr.getLocations(this._geom[r]);if(this.computeContainmentDistance(o,i,n),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[r]=n[0],this._minDistanceLocation[e]=n[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&v(arguments[0],lt)&&v(arguments[1],lt)){for(var a=arguments[0],s=arguments[1],u=arguments[2],c=0;cthis._minDistance)return null;for(var r=t.getCoordinates(),i=e.getCoordinate(),o=0;othis._minDistance)return null;for(var h=u.getCoordinates(),f=c.getCoordinates(),p=0;pthis._distance&&this.initialize(e,n,r)}},Nr.prototype.interfaces_=function(){return[]},Nr.prototype.getClass=function(){return Nr};var kr=function(){};kr.prototype.interfaces_=function(){return[]},kr.prototype.getClass=function(){return kr},kr.computeDistance=function(){if(arguments[2]instanceof Nr&&arguments[0]instanceof Zt&&arguments[1]instanceof h)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=new vn,i=t.getCoordinates(),o=0;o1||t<=0)throw new i("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},jr.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},jr.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},jr.prototype.computeOrientedDistance=function(t,e,n){var r=new Dr(e);if(t.apply(r),n.setMaximum(r.getMaxPointDistance()),this._densifyFrac>0){var i=new Fr(e,this._densifyFrac);t.apply(i),n.setMaximum(i.getMaxPointDistance())}},jr.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},jr.prototype.interfaces_=function(){return[]},jr.prototype.getClass=function(){return jr},jr.distance=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new jr(t,e).distance()}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=new jr(n,r);return o.setDensifyFraction(i),o.distance()}},Rr.MaxPointDistanceFilter.get=function(){return Dr},Rr.MaxDensifiedByFractionDistanceFilter.get=function(){return Fr},Object.defineProperties(jr,Rr);var Dr=function(){this._maxPtDist=new Nr,this._minPtDist=new Nr,this._euclideanDist=new kr,this._geom=null;var t=arguments[0];this._geom=t};Dr.prototype.filter=function(t){this._minPtDist.initialize(),kr.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Dr.prototype.getMaxPointDistance=function(){return this._maxPtDist},Dr.prototype.interfaces_=function(){return[tt]},Dr.prototype.getClass=function(){return Dr};var Fr=function(){this._maxPtDist=new Nr,this._minPtDist=new Nr,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};Fr.prototype.filter=function(t,e){if(0===e)return null;for(var n=t.getCoordinate(e-1),r=t.getCoordinate(e),i=(r.x-n.x)/this._numSubSegs,o=(r.y-n.y)/this._numSubSegs,a=0;an){this._isValid=!1;var i=r.getCoordinates();this._errorLocation=i[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+z.toLineString(i[0],i[1])+")"}},zr.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=zr.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(),zr.VERBOSE&&L.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},zr.prototype.checkNegativeValid=function(){if(!(this._input instanceof $t||this._input instanceof ne||this._input instanceof qt))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)},zr.prototype.getErrorIndicator=function(){return this._errorIndicator},zr.prototype.checkMinimumDistance=function(t,e,n){var r=new Ar(t,e,n);if(this._minDistanceFound=r.distance(),this._minDistanceFound0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t=2?null:this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},qr.prototype.report=function(t){if(!qr.VERBOSE)return null;L.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},qr.prototype.getErrorMessage=function(){return this._errorMsg},qr.prototype.interfaces_=function(){return[]},qr.prototype.getClass=function(){return qr},qr.isValidMsg=function(t,e,n){var r=new qr(t,e,n);return r.isValid()?null:r.getErrorMessage()},qr.isValid=function(t,e,n){return!!new qr(t,e,n).isValid()},Gr.VERBOSE.get=function(){return!1},Gr.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(qr,Gr);var Ur=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Ur.prototype.getCoordinates=function(){return this._pts},Ur.prototype.size=function(){return this._pts.length},Ur.prototype.getCoordinate=function(t){return this._pts[t]},Ur.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Ur.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:pn.octant(this.getCoordinate(t),this.getCoordinate(t+1))},Ur.prototype.setData=function(t){this._data=t},Ur.prototype.getData=function(){return this._data},Ur.prototype.toString=function(){return z.toLineString(new ue(this._pts))},Ur.prototype.interfaces_=function(){return[dn]},Ur.prototype.getClass=function(){return Ur};var Vr=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new ft,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};Vr.prototype.getInteriorIntersection=function(){return this._interiorIntersection},Vr.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},Vr.prototype.getIntersectionSegments=function(){return this._intSegments},Vr.prototype.count=function(){return this._intersectionCount},Vr.prototype.getIntersections=function(){return this._intersections},Vr.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Vr.prototype.setKeepIntersections=function(t){this._keepIntersections=t},Vr.prototype.processIntersections=function(t,e,n,r){if(!this._findAllIntersections&&this.hasIntersection())return null;if(t===n&&e===r)return null;if(this._isCheckEndSegmentsOnly&&!(this.isEndSegment(t,e)||this.isEndSegment(n,r)))return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=i,this._intSegments[1]=o,this._intSegments[2]=a,this._intSegments[3]=s,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},Vr.prototype.isEndSegment=function(t,e){return 0===e||e>=t.size()-2},Vr.prototype.hasIntersection=function(){return null!==this._interiorIntersection},Vr.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},Vr.prototype.interfaces_=function(){return[Wn]},Vr.prototype.getClass=function(){return Vr},Vr.createAllIntersectionsFinder=function(t){var e=new Vr(t);return e.setFindAllIntersections(!0),e},Vr.createAnyIntersectionFinder=function(t){return new Vr(t)},Vr.createIntersectionCounter=function(t){var e=new Vr(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Jr=function(){this._li=new J,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Jr.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},Jr.prototype.getIntersections=function(){return this._segInt.getIntersections()},Jr.prototype.isValid=function(){return this.execute(),this._isValid},Jr.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Jr.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Vr(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new On;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Jr.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Ie(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Jr.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+z.toLineString(t[0],t[1])+" and "+z.toLineString(t[2],t[3])},Jr.prototype.interfaces_=function(){return[]},Jr.prototype.getClass=function(){return Jr},Jr.computeIntersections=function(t){var e=new Jr(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Hr=function t(){this._nv=null;var e=arguments[0];this._nv=new Jr(t.toSegmentStrings(e))};Hr.prototype.checkValid=function(){this._nv.checkValid()},Hr.prototype.interfaces_=function(){return[]},Hr.prototype.getClass=function(){return Hr},Hr.toSegmentStrings=function(t){for(var e=new ft,n=t.iterator();n.hasNext();){var r=n.next();e.add(new Ur(r.getCoordinates(),r))}return e},Hr.checkValid=function(t){new Hr(t).checkValid()};var Yr=function(t){this._mapOp=t};Yr.prototype.map=function(t){for(var e=new ft,n=0;n0&&r<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},Wr.prototype.interfaces_=function(){return[]},Wr.prototype.getClass=function(){return Wr};var Kr=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new vn,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Zt&&"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 r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=t.isClosed(r),this._snapTolerance=i}};Kr.prototype.snapVertices=function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),r=0;r=0&&t.add(o+1,new h(i),!1)}},Kr.prototype.findSegmentIndexToSnap=function(t,e){for(var n=o.MAX_VALUE,r=-1,i=0;ie&&(e=r)}return e}if(2===arguments.length){var i=arguments[0],o=arguments[1];return Math.min(Qr.computeOverlaySnapTolerance(i),Qr.computeOverlaySnapTolerance(o))}},Qr.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*Qr.SNAP_PRECISION_FACTOR},Qr.snapToSelf=function(t,e,n){return new Qr(t).snapToSelf(e,n)},$r.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Qr,$r);var ti=function(t){function e(e,n,r){t.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=void 0!==r&&r}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 Kr(t,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(e)},e.prototype.transformCoordinates=function(t,e){var n=t.toCoordinateArray(),r=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Wr),ei=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};ei.prototype.getCommon=function(){return o.longBitsToDouble(this._commonBits)},ei.prototype.add=function(t){var e=o.doubleToLongBits(t);return this._isFirst?(this._commonBits=e,this._commonSignExp=ei.signExpBits(this._commonBits),this._isFirst=!1,null):ei.signExpBits(e)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=ei.numCommonMostSigMantissaBits(this._commonBits,e),void(this._commonBits=ei.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},ei.prototype.toString=function(){if(1===arguments.length){var t=arguments[0],e=o.longBitsToDouble(t),n="0000000000000000000000000000000000000000000000000000000000000000"+o.toBinaryString(t),r=n.substring(n.length-64);return r.substring(0,1)+" "+r.substring(1,12)+"(exp) "+r.substring(12)+" [ "+e+" ]"}},ei.prototype.interfaces_=function(){return[]},ei.prototype.getClass=function(){return ei},ei.getBit=function(t,e){return 0!=(t&1<>52},ei.zeroLowerBits=function(t,e){return t&~((1<=0;r--){if(ei.getBit(t,r)!==ei.getBit(e,r))return n;n++}return 52};var ni=function(){this._commonCoord=null,this._ccFilter=new ii},ri={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};ni.prototype.addCommonBits=function(t){var e=new oi(this._commonCoord);t.apply(e),t.geometryChanged()},ni.prototype.removeCommonBits=function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new h(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new oi(e);return t.apply(n),t.geometryChanged(),t},ni.prototype.getCommonCoordinate=function(){return this._commonCoord},ni.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},ni.prototype.interfaces_=function(){return[]},ni.prototype.getClass=function(){return ni},ri.CommonCoordinateFilter.get=function(){return ii},ri.Translater.get=function(){return oi},Object.defineProperties(ni,ri);var ii=function(){this._commonBitsX=new ei,this._commonBitsY=new ei};ii.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},ii.prototype.getCommonCoordinate=function(){return new h(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},ii.prototype.interfaces_=function(){return[tt]},ii.prototype.getClass=function(){return ii};var oi=function(){this.trans=null;var t=arguments[0];this.trans=t};oi.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,r=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,r)},oi.prototype.isDone=function(){return!1},oi.prototype.isGeometryChanged=function(){return!0},oi.prototype.interfaces_=function(){return[Bt]},oi.prototype.getClass=function(){return oi};var ai=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()};ai.prototype.selfSnap=function(t){return new Qr(t).snapTo(t,this._snapTolerance)},ai.prototype.removeCommonBits=function(t){this._cbr=new ni,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},ai.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},ai.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=Ci.overlayOp(e[0],e[1],t);return this.prepareResult(n)},ai.prototype.checkValid=function(t){t.isValid()||L.out.println("Snapped geometry is invalid")},ai.prototype.computeSnapTolerance=function(){this._snapTolerance=Qr.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},ai.prototype.snap=function(t){var e=this.removeCommonBits(t);return Qr.snap(e[0],e[1],this._snapTolerance)},ai.prototype.interfaces_=function(){return[]},ai.prototype.getClass=function(){return ai},ai.overlayOp=function(t,e,n){return new ai(t,e).getResultGeometry(n)},ai.union=function(t,e){return ai.overlayOp(t,e,Ci.UNION)},ai.intersection=function(t,e){return ai.overlayOp(t,e,Ci.INTERSECTION)},ai.symDifference=function(t,e){return ai.overlayOp(t,e,Ci.SYMDIFFERENCE)},ai.difference=function(t,e){return ai.overlayOp(t,e,Ci.DIFFERENCE)};var si=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};si.prototype.getResultGeometry=function(t){var e=null,n=!1,r=null;try{e=Ci.overlayOp(this._geom[0],this._geom[1],t);n=!0}catch(t){if(!(t instanceof B))throw t;r=t}if(!n)try{e=ai.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof B?r:t}return e},si.prototype.interfaces_=function(){return[]},si.prototype.getClass=function(){return si},si.overlayOp=function(t,e,n){return new si(t,e).getResultGeometry(n)},si.union=function(t,e){return si.overlayOp(t,e,Ci.UNION)},si.intersection=function(t,e){return si.overlayOp(t,e,Ci.INTERSECTION)},si.symDifference=function(t,e){return si.overlayOp(t,e,Ci.SYMDIFFERENCE)},si.difference=function(t,e){return si.overlayOp(t,e,Ci.DIFFERENCE)};var ui=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};ui.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},ui.prototype.interfaces_=function(){return[]},ui.prototype.getClass=function(){return ui};var ci=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 r=arguments[0],i=arguments[1],o=arguments[2];this._eventType=t.INSERT,this._label=r,this._xValue=i,this._obj=o}},li={INSERT:{configurable:!0},DELETE:{configurable:!0}};ci.prototype.isDelete=function(){return this._eventType===ci.DELETE},ci.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},ci.prototype.getObject=function(){return this._obj},ci.prototype.compareTo=function(t){var e=t;return this._xValuee._xValue?1:this._eventTypee._eventType?1:0},ci.prototype.getInsertEvent=function(){return this._insertEvent},ci.prototype.isInsert=function(){return this._eventType===ci.INSERT},ci.prototype.isSameLabel=function(t){return null!==this._label&&this._label===t._label},ci.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},ci.prototype.interfaces_=function(){return[s]},ci.prototype.getClass=function(){return ci},li.INSERT.get=function(){return 1},li.DELETE.get=function(){return 2},Object.defineProperties(ci,li);var hi=function(){};hi.prototype.interfaces_=function(){return[]},hi.prototype.getClass=function(){return hi};var fi=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};fi.prototype.isTrivialIntersection=function(t,e,n,r){if(t===n&&1===this._li.getIntersectionNum()){if(fi.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.getNumPoints()-1;if(0===e&&r===i||0===r&&e===i)return!0}}return!1},fi.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},fi.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},fi.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},fi.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next().getCoordinate();if(t.isIntersection(r))return!0}return!1},fi.prototype.hasProperIntersection=function(){return this._hasProper},fi.prototype.hasIntersection=function(){return this._hasIntersection},fi.prototype.isDone=function(){return this._isDone},fi.prototype.isBoundaryPoint=function(t,e){return null!==e&&(!!this.isBoundaryPointInternal(t,e[0])||!!this.isBoundaryPointInternal(t,e[1]))},fi.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},fi.prototype.addIntersections=function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,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))))},fi.prototype.interfaces_=function(){return[]},fi.prototype.getClass=function(){return fi},fi.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var pi=function(t){function e(){t.call(this),this.events=new ft,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){en.sort(this.events);for(var t=0;te||this._maxo?1:0},yi.prototype.interfaces_=function(){return[c]},yi.prototype.getClass=function(){return yi};var vi=function(t){function e(){t.call(this),this._item=null;var e=arguments[0],n=arguments[1],r=arguments[2];this._min=e,this._max=n,this._item=r}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}(di),mi=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}(di),_i=function(){this._leaves=new ft,this._root=null,this._level=0};_i.prototype.buildTree=function(){en.sort(this._leaves,new di.NodeComparator);for(var t=this._leaves,e=null,n=new ft;;){if(this.buildLevel(t,n),1===n.size())return n.get(0);e=t,t=n,n=e}},_i.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 vi(t,e,n))},_i.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},_i.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},_i.prototype.printNode=function(t){L.out.println(z.toLineString(new h(t._min,this._level),new h(t._max,this._level)))},_i.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},_i.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n=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,r=t.iterator();r.hasNext();){var i=r.next();e[n++]=i.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===g.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 r=gt.removeRepeatedPoints(t.getCoordinates());if(r.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=r[0],null;var i=e,o=n;X.isCCW(r)&&(i=n,o=e);var a=new ir(r,new ke(this._argIndex,g.BOUNDARY,i,o));this._lineEdgeMap.put(t,a),this.insertEdge(a),this.insertPoint(this._argIndex,r[0],g.BOUNDARY)},e.prototype.insertPoint=function(t,e,n){var r=this._nodes.addNode(e),i=r.getLabel();null===i?r._label=new ke(t,n):i.setLocation(t,n)},e.prototype.createEdgeSetIntersector=function(){return new pi},e.prototype.addSelfIntersectionNodes=function(t){for(var e=this._edges.iterator();e.hasNext();)for(var n=e.next(),r=n.getLabel().getLocation(t),i=n.eiList.iterator();i.hasNext();){var o=i.next();this.addSelfIntersectionNode(t,o.coord,r)}},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 Zt)this.addLineString(e);else if(e instanceof Kt)this.addPoint(e);else if(e instanceof te)this.addCollection(e);else if(e instanceof Gt)this.addCollection(e);else if(e instanceof ne)this.addCollection(e);else{if(!(e instanceof qt))throw new Error(e.getClass().getName());this.addCollection(e)}},e.prototype.addCollection=function(t){for(var e=0;e50?(null===this._areaPtLocator&&(this._areaPtLocator=new wi(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)?g.BOUNDARY:g.INTERIOR},e}(He),Si=function(){if(this._li=new J,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 Mi(0,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],r=et.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 Mi(0,e,r),this._arg[1]=new Mi(1,n,r)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];i.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(i.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Mi(0,i,a),this._arg[1]=new Mi(1,o,a)}};Si.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Si.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Si.prototype.interfaces_=function(){return[]},Si.prototype.getClass=function(){return Si};var Pi=function(){};Pi.prototype.interfaces_=function(){return[]},Pi.prototype.getClass=function(){return Pi},Pi.map=function(){if(arguments[0]instanceof K&&v(arguments[1],Pi.MapOp)){for(var t=arguments[0],e=arguments[1],n=new ft,r=0;r=t.size()?null:t.get(e)},ji.union=function(t){return new ji(t).union()},Ri.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(ji,Ri);var Di=function(){};Di.prototype.interfaces_=function(){return[]},Di.prototype.getClass=function(){return Di},Di.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Ci.createEmptyResult(Ci.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),si.overlayOp(t,e,Ci.UNION)}},function(t,e,n){"use strict";n(155),n(320),n(321),n(156),n(88),n(340),n(174),n(341),n(342),n(175),n(343),n(177),n(353),n(354);var r=n(355);n.d(e,"a",function(){return r.a});n(356),n(92),n(357),n(179),n(358),n(359),n(17),n(95),n(360),n(361),n(362),n(363),n(62),n(29),n(63)},function(t,e,n){"use strict";var r=n(36);n(155),n(48),n(3),n(29),Object(r.a)()},function(t,e,n){"use strict";var r,i,o,a,s,u,c,l,h,f=n(3),p=n(24),d=(n(29),{sphere:p.a,point:g,lineStart:v,lineEnd:b,polygonStart:function(){d.lineStart=w,d.lineEnd=E},polygonEnd:function(){d.lineStart=v,d.lineEnd=b}});function g(t,e){t*=f.r,e*=f.r;var n=Object(f.g)(e);y(n*Object(f.g)(t),n*Object(f.t)(t),Object(f.t)(e))}function y(t,e,n){i+=(t-i)/++r,o+=(e-o)/r,a+=(n-a)/r}function v(){d.point=m}function m(t,e){t*=f.r,e*=f.r;var n=Object(f.g)(e);c=n*Object(f.g)(t),l=n*Object(f.t)(t),h=Object(f.t)(e),d.point=_,y(c,l,h)}function _(t,e){t*=f.r,e*=f.r;var n=Object(f.g)(e),r=n*Object(f.g)(t),i=n*Object(f.t)(t),o=Object(f.t)(e),a=Object(f.e)(Object(f.u)((a=l*o-h*i)*a+(a=h*r-c*o)*a+(a=c*i-l*r)*a),c*r+l*i+h*o);a,a*(c+(c=r)),a*(l+(l=i)),a*(h+(h=o)),y(c,l,h)}function b(){d.point=g}function w(){d.point=x}function E(){O(s,u),d.point=g}function x(t,e){s=t,u=e,t*=f.r,e*=f.r,d.point=O;var n=Object(f.g)(e);c=n*Object(f.g)(t),l=n*Object(f.t)(t),h=Object(f.t)(e),y(c,l,h)}function O(t,e){t*=f.r,e*=f.r;var n=Object(f.g)(e),r=n*Object(f.g)(t),i=n*Object(f.t)(t),o=Object(f.t)(e),a=l*o-h*i,s=h*r-c*o,u=c*i-l*r,p=Object(f.u)(a*a+s*s+u*u),d=Object(f.c)(p),g=p&&-d/p;g*a,g*s,g*u,d,d*(c+(c=r)),d*(l+(l=i)),d*(h+(h=o)),y(c,l,h)}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";e.a=function(t,e,n,r,i,o){var a,s=t[0],u=t[1],c=0,l=1,h=e[0]-s,f=e[1]-u;if(a=n-s,h||!(a>0)){if(a/=h,h<0){if(a0){if(a>l)return;a>c&&(c=a)}if(a=i-s,h||!(a<0)){if(a/=h,h<0){if(a>l)return;a>c&&(c=a)}else if(h>0){if(a0)){if(a/=f,f<0){if(a0){if(a>l)return;a>c&&(c=a)}if(a=o-u,f||!(a<0)){if(a/=f,f<0){if(a>l)return;a>c&&(c=a)}else if(f>0){if(a0&&(t[0]=s+c*h,t[1]=u+c*f),l<1&&(e[0]=s+l*h,e[1]=u+l*f),!0}}}}}},function(t,e,n){"use strict";n(163)},function(t,e,n){"use strict"},function(t,e,n){"use strict";n(167),n(161),n(327),n(166),n(328),n(168),n(169),n(170)},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";e.a=function(t){return t}},function(t,e,n){"use strict";n(167),n(37),n(49),n(90)},function(t,e,n){"use strict";n(164)},function(t,e,n){"use strict"},function(t,e,n){"use strict";n(49)},function(t,e,n){"use strict";n(37),n(49),n(90)},function(t,e,n){"use strict";e.a=function(t){for(var e,n,r,i=t.length,o=-1,a=0;++o=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n}},function(t,e,n){"use strict"},function(t,e,n){"use strict";n(37)},function(t,e,n){"use strict"},function(t,e,n){"use strict"},function(t,e,n){"use strict";n(172)},function(t,e,n){"use strict";n(173),n(174),n(3)},function(t,e,n){"use strict";n(89),n(3)},function(t,e,n){"use strict";n(3)},function(t,e,n){"use strict";n(91),n(29),n(344),n(176),n(345),n(346),n(347),n(348)},function(t,e,n){"use strict";var r,i,o,a,s=n(36),u=n(3),c=n(24),l=Object(s.a)(),h=Object(s.a)(),f={point:c.a,lineStart:c.a,lineEnd:c.a,polygonStart:function(){f.lineStart=p,f.lineEnd=y},polygonEnd:function(){f.lineStart=f.lineEnd=f.point=c.a,l.add(Object(u.a)(h)),h.reset()},result:function(){var t=l/2;return l.reset(),t}};function p(){f.point=d}function d(t,e){f.point=g,r=o=t,i=a=e}function g(t,e){h.add(a*t-o*e),o=t,a=e}function y(){g(r,i)}e.a=f},function(t,e,n){"use strict";var r,i,o,a,s=n(3),u=0,c=0,l=0,h=0,f=0,p=0,d=0,g=0,y=0,v={point:m,lineStart:_,lineEnd:E,polygonStart:function(){v.lineStart=x,v.lineEnd=O},polygonEnd:function(){v.point=m,v.lineStart=_,v.lineEnd=E},result:function(){var t=y?[d/y,g/y]:p?[h/p,f/p]:l?[u/l,c/l]:[NaN,NaN];return u=c=l=h=f=p=d=g=y=0,t}};function m(t,e){u+=t,c+=e,++l}function _(){v.point=b}function b(t,e){v.point=w,m(o=t,a=e)}function w(t,e){var n=t-o,r=e-a,i=Object(s.u)(n*n+r*r);h+=i*(o+t)/2,f+=i*(a+e)/2,p+=i,m(o=t,a=e)}function E(){v.point=m}function x(){v.point=M}function O(){S(r,i)}function M(t,e){v.point=S,m(r=o=t,i=a=e)}function S(t,e){var n=t-o,r=e-a,i=Object(s.u)(n*n+r*r);h+=i*(o+t)/2,f+=i*(a+e)/2,p+=i,d+=(i=a*t-o*e)*(o+t),g+=i*(a+e),y+=3*i,m(o=t,a=e)}e.a=v},function(t,e,n){"use strict";e.a=o;var r=n(3),i=n(24);function o(t){this._context=t}o.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,r.w)}},result:i.a}},function(t,e,n){"use strict";var r,i,o,a,s,u=n(36),c=n(3),l=n(24),h=Object(u.a)(),f={point:l.a,lineStart:function(){f.point=p},lineEnd:function(){r&&d(i,o),f.point=l.a},polygonStart:function(){r=!0},polygonEnd:function(){r=null},result:function(){var t=+h;return h.reset(),t}};function p(t,e){f.point=d,i=a=t,o=s=e}function d(t,e){a-=t,s-=e,h.add(Object(c.u)(a*a+s*s)),a=t,s=e}e.a=f},function(t,e,n){"use strict";function r(){this._string=[]}function i(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}e.a=r,r.prototype={_radius:4.5,_circle:i(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=i(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}}},function(t,e,n){"use strict";var r=n(178),i=n(3);e.a=Object(r.a)(function(){return!0},function(t){var e,n=NaN,r=NaN,o=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,s){var u=a>0?i.o:-i.o,c=Object(i.a)(a-n);Object(i.a)(c-i.o)0?i.l:-i.l),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(a,r),e=0):o!==u&&c>=i.o&&(Object(i.a)(n-o)i.i?Object(i.d)((Object(i.t)(e)*(a=Object(i.g)(r))*Object(i.t)(n)-Object(i.t)(r)*(o=Object(i.g)(e))*Object(i.t)(t))/(o*a*s)):(e+r)/2}(n,r,a,s),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(u,r),e=0),t.point(n=a,r=s),o=u},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var o;if(null==t)o=n*i.l,r.point(-i.o,o),r.point(0,o),r.point(i.o,o),r.point(i.o,0),r.point(i.o,-o),r.point(0,-o),r.point(-i.o,-o),r.point(-i.o,0),r.point(-i.o,o);else if(Object(i.a)(t[0]-e[0])>i.i){var a=t[0]0,c=Object(o.a)(n)>o.i;function l(t,e){return Object(o.g)(t)*Object(o.g)(e)>n}function h(t,e,i){var a=Object(r.a)(t),s=Object(r.a)(e),u=[1,0,0],c=Object(r.c)(a,s),l=Object(r.d)(c,c),h=c[0],f=l-h*h;if(!f)return!i&&t;var p=n*l/f,d=-n*h/f,g=Object(r.c)(u,c),y=Object(r.f)(u,p),v=Object(r.f)(c,d);Object(r.b)(y,v);var m=g,_=Object(r.d)(y,m),b=Object(r.d)(m,m),w=_*_-b*(Object(r.d)(y,y)-1);if(!(w<0)){var E=Object(o.u)(w),x=Object(r.f)(m,(-_-E)/b);if(Object(r.b)(x,y),x=Object(r.g)(x),!i)return x;var O,M=t[0],S=e[0],P=t[1],C=e[1];S0^x[1]<(Object(o.a)(x[0]-M)o.o^(M<=x[0]&&x[0]<=S)){var A=Object(r.f)(m,(-_+E)/b);return Object(r.b)(A,y),[x,Object(r.g)(A)]}}}function f(e,n){var r=u?t:o.o-t,i=0;return e<-r?i|=1:e>r&&(i|=2),n<-r?i|=4:n>r&&(i|=8),i}return Object(s.a)(l,function(t){var e,n,r,i,s;return{lineStart:function(){i=r=!1,s=1},point:function(p,d){var g,y=[p,d],v=l(p,d),m=u?v?0:f(p,d):v?f(p+(p<0?o.o:-o.o),d):0;if(!e&&(i=r=v)&&t.lineStart(),v!==r&&(!(g=h(e,y))||Object(a.a)(e,g)||Object(a.a)(y,g))&&(y[0]+=o.i,y[1]+=o.i,v=l(y[0],y[1])),v!==r)s=0,v?(t.lineStart(),g=h(y,e),t.point(g[0],g[1])):(g=h(e,y),t.point(g[0],g[1]),t.lineEnd()),e=g;else if(c&&e&&u^v){var _;m&n||!(_=h(y,e,!0))||(s=0,u?(t.lineStart(),t.point(_[0][0],_[0][1]),t.point(_[1][0],_[1][1]),t.lineEnd()):(t.point(_[1][0],_[1][1]),t.lineEnd(),t.lineStart(),t.point(_[0][0],_[0][1])))}!v||e&&Object(a.a)(e,y)||t.point(y[0],y[1]),e=y,r=v,n=m},lineEnd:function(){r&&t.lineEnd(),e=null},clean:function(){return s|(i&&r)<<1}}},function(n,r,o,a){Object(i.a)(a,t,e,o,n,r)},u?[0,-t]:[-o.o,t-o.o])}},function(t,e,n){"use strict";var r=n(48),i=n(3),o=n(63),a=16,s=Object(i.g)(30*i.r);e.a=function(t,e){return+e?function(t,e){function n(r,o,a,u,c,l,h,f,p,d,g,y,v,m){var _=h-r,b=f-o,w=_*_+b*b;if(w>4*e&&v--){var E=u+d,x=c+g,O=l+y,M=Object(i.u)(E*E+x*x+O*O),S=Object(i.c)(O/=M),P=Object(i.a)(Object(i.a)(O)-1)e||Object(i.a)((_*L+b*A)/w-.5)>.3||u*d+c*g+l*yr.i&&--o>0);return[t/(.8707+(a=i*i)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),i]}},function(t,e,n){"use strict";var r=n(3),i=n(50);n(17);function o(t,e){return[Object(r.g)(e)*Object(r.t)(t),Object(r.t)(e)]}o.invert=Object(i.a)(r.c)},function(t,e,n){"use strict";var r=n(3),i=n(50);n(17);function o(t,e){var n=Object(r.g)(e),i=1+Object(r.g)(t)*n;return[n*Object(r.t)(t)/i,Object(r.t)(e)/i]}o.invert=Object(i.a)(function(t){return 2*Object(r.d)(t)})},function(t,e,n){"use strict";var r=n(3);n(95);function i(t,e){return[Object(r.n)(Object(r.v)((r.l+e)/2)),-t]}i.invert=function(t,e){return[-e,2*Object(r.d)(Object(r.k)(t))-r.l]}},function(t,e,n){"use strict";var r=n(47),i=n(2),o=n(0);e.a=function(t,e,n){void 0===n&&(n={});var a=Object(i.getGeom)(t),s=Object(i.getGeom)(e),u=r.a.union(a.coordinates,s.coordinates);return 0===u.length?null:1===u.length?Object(o.polygon)(u[0],n.properties):Object(o.multiPolygon)(u,n.properties)}},function(t,e,n){"use strict";var r=n(0),i=n(2),o=n(1),a=n(126),s=n(47);e.a=function(t,e){if(e=e||{},!Object(r.isObject)(e))throw new Error("options is invalid");var n=e.propertyName;Object(i.collectionOf)(t,"Polygon","dissolve");var u=[];if(!e.propertyName)return Object(a.a)(Object(r.multiPolygon)(s.a.union.apply(null,t.features.map(function(t){return t.geometry.coordinates}))));var c={};Object(o.featureEach)(t,function(t){Object.prototype.hasOwnProperty.call(c,t.properties[n])||(c[t.properties[n]]=[]),c[t.properties[n]].push(t)});for(var l=Object.keys(c),h=0;h-1}function c(t,e){return t.apply(null,e)}var l={arr:function(t){return Array.isArray(t)},obj:function(t){return u(Object.prototype.toString.call(t),"Object")},pth:function(t){return l.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},inp:function(t){return t instanceof HTMLInputElement},dom:function(t){return t.nodeType||l.svg(t)},str:function(t){return"string"==typeof t},fnc:function(t){return"function"==typeof t},und:function(t){return void 0===t},nil:function(t){return l.und(t)||null===t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return l.hex(t)||l.rgb(t)||l.hsl(t)},key:function(t){return!r.hasOwnProperty(t)&&!i.hasOwnProperty(t)&&"targets"!==t&&"keyframes"!==t}};function h(t){var e=/\(([^)]+)\)/.exec(t);return e?e[1].split(",").map(function(t){return parseFloat(t)}):[]}function f(t,e){var n=h(t),r=s(l.und(n[0])?1:n[0],.1,100),i=s(l.und(n[1])?100:n[1],.1,100),o=s(l.und(n[2])?10:n[2],.1,100),u=s(l.und(n[3])?0:n[3],.1,100),c=Math.sqrt(i/r),f=o/(2*Math.sqrt(i*r)),p=f<1?c*Math.sqrt(1-f*f):0,d=1,g=f<1?(f*c-u)/p:-u+c;function y(t){var n=e?e*t/1e3:t;return n=f<1?Math.exp(-n*f*c)*(d*Math.cos(p*n)+g*Math.sin(p*n)):(d+g*n)*Math.exp(-n*c),0===t||1===t?t:1-n}return e?y:function(){var e=a.springs[t];if(e)return e;for(var n=0,r=0;;)if(1===y(n+=1/6)){if(++r>=16)break}else r=0;var i=n*(1/6)*1e3;return a.springs[t]=i,i}}function p(t){return void 0===t&&(t=10),function(e){return Math.ceil(s(e,1e-6,1)*t)*(1/t)}}var d,g,y=function(){var t=11,e=1/(t-1);function n(t,e){return 1-3*e+3*t}function r(t,e){return 3*e-6*t}function i(t){return 3*t}function o(t,e,o){return((n(e,o)*t+r(e,o))*t+i(e))*t}function a(t,e,o){return 3*n(e,o)*t*t+2*r(e,o)*t+i(e)}return function(n,r,i,s){if(0<=n&&n<=1&&0<=i&&i<=1){var u=new Float32Array(t);if(n!==r||i!==s)for(var c=0;c=.001?function(t,e,n,r){for(var i=0;i<4;++i){var s=a(e,n,r);if(0===s)return e;e-=(o(e,n,r)-t)/s}return e}(r,h,n,i):0===f?h:function(t,e,n,r,i){var a,s,u=0;do{(a=o(s=e+(n-e)/2,r,i)-t)>0?n=s:e=s}while(Math.abs(a)>1e-7&&++u<10);return s}(r,s,s+e,n,i)}}}(),v=(d={linear:function(){return function(t){return t}}},g={Sine:function(){return function(t){return 1-Math.cos(t*Math.PI/2)}},Circ:function(){return function(t){return 1-Math.sqrt(1-t*t)}},Back:function(){return function(t){return t*t*(3*t-2)}},Bounce:function(){return function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}},Elastic:function(t,e){void 0===t&&(t=1),void 0===e&&(e=.5);var n=s(t,1,10),r=s(e,.1,2);return function(t){return 0===t||1===t?t:-n*Math.pow(2,10*(t-1))*Math.sin((t-1-r/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/r)}}},["Quad","Cubic","Quart","Quint","Expo"].forEach(function(t,e){g[t]=function(){return function(t){return Math.pow(t,e+2)}}}),Object.keys(g).forEach(function(t){var e=g[t];d["easeIn"+t]=e,d["easeOut"+t]=function(t,n){return function(r){return 1-e(t,n)(1-r)}},d["easeInOut"+t]=function(t,n){return function(r){return r<.5?e(t,n)(2*r)/2:1-e(t,n)(-2*r+2)/2}},d["easeOutIn"+t]=function(t,n){return function(r){return r<.5?(1-e(t,n)(1-2*r))/2:(e(t,n)(2*r-1)+1)/2}}}),d);function m(t,e){if(l.fnc(t))return t;var n=t.split("(")[0],r=v[n],i=h(t);switch(n){case"spring":return f(t,e);case"cubicBezier":return c(y,i);case"steps":return c(p,i);default:return c(r,i)}}function _(t){try{return document.querySelectorAll(t)}catch(t){return}}function b(t,e){for(var n=t.length,r=arguments.length>=2?arguments[1]:void 0,i=[],o=0;o1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(0==a)e=n=r=s;else{var l=s<.5?s*(1+a):s+a-s*a,h=2*s-l;e=c(h,l,o+1/3),n=c(h,l,o),r=c(h,l,o-1/3)}return"rgba("+255*e+","+255*n+","+255*r+","+u+")"}(t):void 0;var e,n}function C(t){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t);if(e)return e[1]}function T(t,e){return l.fnc(t)?t(e.target,e.id,e.total):t}function I(t,e){return t.getAttribute(e)}function L(t,e,n){if(x([n,"deg","rad","turn"],C(e)))return e;var r=a.CSS[e+n];if(!l.und(r))return r;var i=document.createElement(t.tagName),o=t.parentNode&&t.parentNode!==document?t.parentNode:document.body;o.appendChild(i),i.style.position="absolute",i.style.width=100+n;var s=100/i.offsetWidth;o.removeChild(i);var u=s*parseFloat(e);return a.CSS[e+n]=u,u}function A(t,e,n){if(e in t.style){var r=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=t.style[e]||getComputedStyle(t).getPropertyValue(r)||"0";return n?L(t,i,n):i}}function N(t,e){return l.dom(t)&&!l.inp(t)&&(!l.nil(I(t,e))||l.svg(t)&&t[e])?"attribute":l.dom(t)&&x(o,e)?"transform":l.dom(t)&&"transform"!==e&&A(t,e)?"css":null!=t[e]?"object":void 0}function k(t){if(l.dom(t)){for(var e,n=t.style.transform||"",r=/(\w+)\(([^)]*)\)/g,i=new Map;e=r.exec(n);)i.set(e[1],e[2]);return i}}function j(t,e,n,r){var i=u(e,"scale")?1:0+function(t){return u(t,"translate")||"perspective"===t?"px":u(t,"rotate")||u(t,"skew")?"deg":void 0}(e),o=k(t).get(e)||i;return n&&(n.transforms.list.set(e,o),n.transforms.last=e),r?L(t,o,r):o}function R(t,e,n,r){switch(N(t,e)){case"transform":return j(t,e,r,n);case"css":return A(t,e,n);case"attribute":return I(t,e);default:return t[e]||0}}function D(t,e){var n=/^(\*=|\+=|-=)/.exec(t);if(!n)return t;var r=C(t)||0,i=parseFloat(e),o=parseFloat(t.replace(n[0],""));switch(n[0][0]){case"+":return i+o+r;case"-":return i-o+r;case"*":return i*o+r}}function F(t,e){if(l.col(t))return P(t);if(/\s/g.test(t))return t;var n=C(t),r=n?t.substr(0,t.length-n.length):t;return e?r+e:r}function z(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function B(t){for(var e,n=t.points,r=0,i=0;i0&&(r+=z(e,o)),e=o}return r}function q(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return function(t){return 2*Math.PI*I(t,"r")}(t);case"rect":return function(t){return 2*I(t,"width")+2*I(t,"height")}(t);case"line":return function(t){return z({x:I(t,"x1"),y:I(t,"y1")},{x:I(t,"x2"),y:I(t,"y2")})}(t);case"polyline":return B(t);case"polygon":return function(t){var e=t.points;return B(t)+z(e.getItem(e.numberOfItems-1),e.getItem(0))}(t)}}function G(t,e){var n=e||{},r=n.el||function(t){for(var e=t.parentNode;l.svg(e)&&l.svg(e.parentNode);)e=e.parentNode;return e}(t),i=r.getBoundingClientRect(),o=I(r,"viewBox"),a=i.width,s=i.height,u=n.viewBox||(o?o.split(" "):[0,0,a,s]);return{el:r,viewBox:u,x:u[0]/1,y:u[1]/1,w:a,h:s,vW:u[2],vH:u[3]}}function U(t,e,n){function r(n){void 0===n&&(n=0);var r=e+n>=1?e+n:0;return t.el.getPointAtLength(r)}var i=G(t.el,t.svg),o=r(),a=r(-1),s=r(1),u=n?1:i.w/i.vW,c=n?1:i.h/i.vH;switch(t.property){case"x":return(o.x-i.x)*u;case"y":return(o.y-i.y)*c;case"angle":return 180*Math.atan2(s.y-a.y,s.x-a.x)/Math.PI}}function V(t,e){var n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,r=F(l.pth(t)?t.totalLength:t,e)+"";return{original:r,numbers:r.match(n)?r.match(n).map(Number):[0],strings:l.str(t)||e?r.split(n):[]}}function J(t){return b(t?w(l.arr(t)?t.map(E):E(t)):[],function(t,e,n){return n.indexOf(t)===e})}function H(t){var e=J(t);return e.map(function(t,n){return{target:t,id:n,total:e.length,transforms:{list:k(t)}}})}function Y(t,e){var n=O(e);if(/^spring/.test(n.easing)&&(n.duration=f(n.easing)),l.arr(t)){var r=t.length;2===r&&!l.obj(t[0])?t={value:t}:l.fnc(e.duration)||(n.duration=e.duration/r)}var i=l.arr(t)?t:[t];return i.map(function(t,n){var r=l.obj(t)&&!l.pth(t)?t:{value:t};return l.und(r.delay)&&(r.delay=n?0:e.delay),l.und(r.endDelay)&&(r.endDelay=n===i.length-1?e.endDelay:0),r}).map(function(t){return S(t,n)})}function X(t,e){var n=[],r=e.keyframes;for(var i in r&&(e=S(function(t){for(var e=b(w(t.map(function(t){return Object.keys(t)})),function(t){return l.key(t)}).reduce(function(t,e){return t.indexOf(e)<0&&t.push(e),t},[]),n={},r=function(r){var i=e[r];n[i]=t.map(function(t){var e={};for(var n in t)l.key(n)?n==i&&(e.value=t[n]):e[n]=t[n];return e})},i=0;i0?requestAnimationFrame(e):void 0}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",function(){it.suspendWhenDocumentHidden&&(rt()?t=cancelAnimationFrame(t):(et.forEach(function(t){return t._onDocumentVisibility()}),nt()))}),function(){t||rt()&&it.suspendWhenDocumentHidden||!(et.length>0)||(t=requestAnimationFrame(e))}}();function rt(){return!!document&&document.hidden}function it(t){void 0===t&&(t={});var e,n=0,o=0,a=0,u=0,c=null;function l(t){var e=window.Promise&&new Promise(function(t){return c=t});return t.finished=e,e}var h=function(t){var e=M(r,t),n=M(i,t),o=X(n,t),a=H(t.targets),s=Q(a,o),u=$(s,n),c=tt;return tt++,S(e,{id:c,children:[],animatables:a,animations:s,duration:u.duration,delay:u.delay,endDelay:u.endDelay})}(t);l(h);function f(){var t=h.direction;"alternate"!==t&&(h.direction="normal"!==t?"normal":"reverse"),h.reversed=!h.reversed,e.forEach(function(t){return t.reversed=h.reversed})}function p(t){return h.reversed?h.duration-t:t}function d(){n=0,o=p(h.currentTime)*(1/it.speed)}function g(t,e){e&&e.seek(t-e.timelineOffset)}function y(t){for(var e=0,n=h.animations,r=n.length;e2||(_=Math.round(_*d)/d)),g.push(_)}var x=p.length;if(x){v=p[0];for(var O=0;O0&&(h.began=!0,v("begin")),!h.loopBegan&&h.currentTime>0&&(h.loopBegan=!0,v("loopBegin")),m<=i&&0!==h.currentTime&&y(0),(m>=d&&h.currentTime!==r||!r)&&y(r),m>i&&m=r&&(o=0,h.remaining&&!0!==h.remaining&&h.remaining--,h.remaining?(n=a,v("loopComplete"),h.loopBegan=!1,"alternate"===h.direction&&f()):(h.paused=!0,h.completed||(h.completed=!0,v("loopComplete"),v("complete"),!h.passThrough&&"Promise"in window&&(c(),l(h)))))}return h.reset=function(){var t=h.direction;h.passThrough=!1,h.currentTime=0,h.progress=0,h.paused=!0,h.began=!1,h.loopBegan=!1,h.changeBegan=!1,h.completed=!1,h.changeCompleted=!1,h.reversePlayback=!1,h.reversed="reverse"===t,h.remaining=h.loop,e=h.children;for(var n=u=e.length;n--;)h.children[n].reset();(h.reversed&&!0!==h.loop||"alternate"===t&&1===h.loop)&&h.remaining++,y(h.reversed?h.duration:0)},h._onDocumentVisibility=d,h.set=function(t,e){return K(t,e),h},h.tick=function(t){a=t,n||(n=a),m((a+(o-n))*it.speed)},h.seek=function(t){m(p(t))},h.pause=function(){h.paused=!0,d()},h.play=function(){h.paused&&(h.completed&&h.reset(),h.paused=!1,et.push(h),d(),nt())},h.reverse=function(){f(),h.completed=!h.reversed,d()},h.restart=function(){h.reset(),h.play()},h.remove=function(t){at(J(t),h)},h.reset(),h.autoplay&&h.play(),h}function ot(t,e){for(var n=e.length;n--;)x(t,e[n].animatable.target)&&e.splice(n,1)}function at(t,e){var n=e.animations,r=e.children;ot(t,n);for(var i=r.length;i--;){var o=r[i],a=o.animations;ot(t,a),a.length||o.children.length||r.splice(i,1)}n.length||r.length||e.pause()}it.version="3.2.1",it.speed=1,it.suspendWhenDocumentHidden=!0,it.running=et,it.remove=function(t){for(var e=J(t),n=et.length;n--;)at(e,et[n])},it.get=R,it.set=K,it.convertPx=L,it.path=function(t,e){var n=l.str(t)?_(t)[0]:t,r=e||100;return function(t){return{property:t,el:n,svg:G(n),totalLength:q(n)*(r/100)}}},it.setDashoffset=function(t){var e=q(t);return t.setAttribute("stroke-dasharray",e),e},it.stagger=function(t,e){void 0===e&&(e={});var n=e.direction||"normal",r=e.easing?m(e.easing):null,i=e.grid,o=e.axis,a=e.from||0,s="first"===a,u="center"===a,c="last"===a,h=l.arr(t),f=h?parseFloat(t[0]):parseFloat(t),p=h?parseFloat(t[1]):0,d=C(h?t[1]:t)||0,g=e.start||0+(h?f:0),y=[],v=0;return function(t,e,l){if(s&&(a=0),u&&(a=(l-1)/2),c&&(a=l-1),!y.length){for(var m=0;m-1&&et.splice(o,1);for(var u=0;u1&&void 0!==arguments[1]?arguments[1]:1e-6,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=t;(t instanceof i.default||t instanceof o.default)&&(a=t.points);var s=void 0!==e?e*e:1e-12;return a=n?a:this.simplifyRadialDistance(a,s),a=this.simplifyDouglasPeucker(a,s),r?this.smoothLine(a):a}},{key:"smoothLine",value:function(t){for(var e=[t[0]],n=1;ne&&(r.push(i),n=i);if(n!==i){var s=i,u=s.x,c=s.y,l=s.z;r.push({x:u,y:c,z:l||0})}return r}},{key:"getSquareDistance",value:function(t,e){var n=t.x-e.x,r=t.y-e.y,i=t.z-e.z;return n*n+r*r+i*i}},{key:"simplifyDouglasPeucker",value:function(t,e){var n=t.length,r=new("undefined"!=typeof Uint8Array?Uint8Array:Array)(n),i=0,o=n-1,a=[],s=[],u=void 0,c=void 0,l=void 0,h=void 0;for(r[i]=r[o]=1;o;){for(c=0,u=i+1;uc&&(h=u,c=l);c>e&&(r[h]=1,a.push(i,h,h,o)),o=a.pop(),i=a.pop()}for(u=0;u1?(r=n.x,i=n.y,o=n.z):c>0&&(r+=a*c,i+=s*c,o+=u*c)}return(a=t.x-r)*a+(s=t.y-i)*s+(u=t.z-o)*u}}]),t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n0){n=Math.sqrt(n);var r=e[0]/n,i=e[1]/n,o=e[2]/n,a=e[3]/n,s=e[4],u=e[5],c=e[6],l=e[7],h=r*s+i*u+o*c+a*l;t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=(s-r*h)/n,t[5]=(u-i*h)/n,t[6]=(c-o*h)/n,t[7]=(l-a*h)/n}return t},e.str=function(t){return"quat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]},e.equals=function(t,e){var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=e[0],f=e[1],p=e[2],d=e[3],g=e[4],y=e[5],v=e[6],m=e[7];return Math.abs(n-h)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(i-f)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(o-p)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-d)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(s-g)<=r.EPSILON*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(u-y)<=r.EPSILON*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-v)<=r.EPSILON*Math.max(1,Math.abs(c),Math.abs(v))&&Math.abs(l-m)<=r.EPSILON*Math.max(1,Math.abs(l),Math.abs(m))};var r=n(19),i=n(186),o=n(185);function a(t,e,n){var r=.5*n[0],i=.5*n[1],o=.5*n[2],a=e[0],s=e[1],u=e[2],c=e[3];return t[0]=a,t[1]=s,t[2]=u,t[3]=c,t[4]=r*c+i*u-o*s,t[5]=i*c+o*a-r*u,t[6]=o*c+r*s-i*a,t[7]=-r*a-i*s-o*u,t}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t}var u=i.copy;var c=i.copy;function l(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[4],u=n[5],c=n[6],l=n[7],h=e[4],f=e[5],p=e[6],d=e[7],g=n[0],y=n[1],v=n[2],m=n[3];return t[0]=r*m+a*g+i*v-o*y,t[1]=i*m+a*y+o*g-r*v,t[2]=o*m+a*v+r*y-i*g,t[3]=a*m-r*g-i*y-o*v,t[4]=r*l+a*s+i*c-o*u+h*m+d*g+f*v-p*y,t[5]=i*l+a*u+o*s-r*c+f*m+d*y+p*g-h*v,t[6]=o*l+a*c+r*u-i*s+p*m+d*v+h*y-f*g,t[7]=a*l-r*s-i*u-o*c+d*m-h*g-f*y-p*v,t}var h=l;var f=i.dot;var p=i.length,d=p,g=i.squaredLength,y=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=i,e.clone=function(t){var e=new r.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},e.fromValues=function(t,e){var n=new r.ARRAY_TYPE(2);return n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.set=function(t,e,n){return t[0]=e,t[1]=n,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},e.subtract=o,e.multiply=a,e.divide=s,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},e.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t},e.distance=u,e.squaredDistance=c,e.length=l,e.squaredLength=h,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},e.normalize=function(t,e){var n=e[0],r=e[1],i=n*n+r*r;i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i);return t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},e.lerp=function(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t},e.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},e.transformMat2d=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},e.transformMat3=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t},e.rotate=function(t,e,n,r){var i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),s=Math.cos(r);return t[0]=i*s-o*a+n[0],t[1]=i*a+o*s+n[1],t},e.angle=function(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=n*n+r*r;a>0&&(a=1/Math.sqrt(a));var s=i*i+o*o;s>0&&(s=1/Math.sqrt(s));var u=(n*i+r*o)*a*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],i=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-a)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(a))},n.d(e,"len",function(){return p}),n.d(e,"sub",function(){return d}),n.d(e,"mul",function(){return g}),n.d(e,"div",function(){return y}),n.d(e,"dist",function(){return v}),n.d(e,"sqrDist",function(){return m}),n.d(e,"sqrLen",function(){return _}),n.d(e,"forEach",function(){return b});var r=n(19);function i(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=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 a(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function s(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function u(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function c(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function l(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function h(t){var e=t[0],n=t[1];return e*e+n*n}var f,p=l,d=o,g=a,y=s,v=u,m=c,_=h,b=(f=i(),function(t,e,n,r,i,o){var a=void 0,s=void 0;for(e||(e=2),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,a=n;a1?n-1:0),i=1;i1&&void 0!==arguments[1])||arguments[1],n=u.marker([t.position.y,t.position.x],{icon:u.icon({iconUrl:t.image,iconSize:[t.width,t.height],iconAnchor:a.default.getImageMarkerOffsetAnchor(t)}),pane:this._pane});return n.addTo(this._layer),e?t.callback(n):(t._node=n,t._nodeId=n._leaflet_id),n.parent=this,n.parentMarker=t,n.nodeType=o.JSNodeType.IMAGE_MARKER,t._updateIcon=function(t){t._node.setIcon(u.icon({iconUrl:t.image,iconSize:[t.width,t.height],iconAnchor:a.default.getImageMarkerOffsetAnchor(t)}))},t._show||n.setOpacity(0),t}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n":r=t>n;break;case">=":r=t>=n;break;case"<":r=t1&&void 0!==arguments[1])||arguments[1],n=a.default.getLineOrPolygonLatlngs(t._position,!1).latlngs,r=l.polygon(n,{stroke:!0,color:t._strokeColor,opacity:s.default.getAlphafromCssString(t._strokeColor),weight:2,fillColor:t._color,fillOpacity:s.default.getAlphafromCssString(t._color),renderer:this._renderer,bubblingMouseEvents:!1});return r.addTo(this._layer),e?t.callback(r):(t._node=r,t._nodeId=r._leaflet_id),r.parent=this,r.parentMarker=t,r.nodeType=o.JSNodeType.POLYGON_MARKER,t._position instanceof Array&&(t._position=new u.default(t._position)),t._show||r.setStyle({opacity:0,fillOpacity:0}),t}}]),e}();e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1])||arguments[1];return!!t&&(e&&t.clearAnimators(),this._layer.removeLayer(t._node),t._node._symbol&&this._layer.removeLayer(t._node._symbol),e&&(t._removeCallback&&t._removeCallback(),t.destroy()),!0)}},{key:"_getDashSymbol",value:function(t,e,n,r){return new c.PolylineDecorator(t,{patterns:[{offset:0,repeat:5*e,symbol:new l.DashSymbol({pixelSize:2*e,pathOptions:{stroke:!0,weight:e,color:n,opacity:r,renderer:this._renderer}})},{offset:2*e+2,repeat:5*e,symbol:new l.DashSymbol({pixelSize:0,pathOptions:{stroke:!0,weight:e/2,color:n,opacity:r,renderer:this._renderer}})}],bubblingMouseEvents:!1})}},{key:"_getArrowSymbol",value:function(t,e,n){return new c.PolylineDecorator(t,{patterns:[{repeat:5*e,offset:e,symbol:new l.ArrowSymbol({pixelSize:e/2,headAngle:75,polygon:!1,pathOptions:{stroke:!0,weight:e>4?2:1,color:"#FFFFFF",opacity:n,renderer:this._renderer}})}],bubblingMouseEvents:!1})}},{key:"_getFillSymbol",value:function(t,e,n,r,i){return f.polyline(t,{stroke:!0,color:n,opacity:r,weight:e,smoothFactor:i?1:0,renderer:this._renderer,bubblingMouseEvents:!1})}},{key:"addMarker",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=a.default.getLineOrPolygonLatlngs(t.position,t._smooth),i=r.latlngs,c=r.points;t._position=new u.default(c);var l=t._show?s.default.getAlphafromCssString(t._color):0,h=void 0;if(t._lineType==o.JSLineType.DASH)h=this._getDashSymbol(i,t._width,t._color,l).addTo(this._layer);else if((h=this._getFillSymbol(i,t._width,t._color,l,t._smooth)).addTo(this._layer),t._lineType==o.JSLineType.ARROW){var f=this._getArrowSymbol(i,t._width,l).addTo(this._layer);f.parent=this,f.parentMarker=t,f.nodeType=o.JSNodeType.LINE_MARKER,h._symbol=f,this._registerNodeClickEvent(f)}return n?t.callback(h):(t._node=h,t._nodeId=h._leaflet_id),h.parent=this,h.parentMarker=t,h.nodeType=o.JSNodeType.LINE_MARKER,t._position instanceof Array&&(t._position=new u.default(t._position)),t._updateLineType=function(t,n){var r=t._show?s.default.getAlphafromCssString(t._color):0,i=a.default.getLineOrPolygonLatlngs(t.position,t._smooth).latlngs,u=t.getProperties(),c=t._width,l=t._lineType,h=void 0;if(l==o.JSLineType.FILL)n==o.JSLineType.ARROW?(h=e._getArrowSymbol(i,c,r).addTo(e._layer),t._node._symbol=h):(e._offNodeClickEvent(t._node),e._layer.removeLayer(t._node),h=e._getDashSymbol(i,c,t._color,r).addTo(e._layer),t._node=h,e._registerNodeClickEvent(h)),h.parent=e,h.parentMarker=t,h.nodeType=o.JSNodeType.LINE_MARKER,h.properties=u;else if(l==o.JSLineType.ARROW)e._layer.removeLayer(t._node._symbol),e._offNodeClickEvent(t._node._symbol),t._node._symbol=void 0,e._offNodeClickEvent(t._node),e._layer.removeLayer(t._node),h=n==o.JSLineType.DASH?e._getDashSymbol(i,c,t._color,r).addTo(e._layer):e._getFillSymbol(i,c,t._color,r,t._smooth).addTo(e._layer),e._registerNodeClickEvent(h),t._node=h,t._nodeId=h._leaflet_id,h.parent=e,h.parentMarker=t,h.nodeType=o.JSNodeType.LINE_MARKER,h.properties=u;else if(e._offNodeClickEvent(t._node),e._layer.removeLayer(t._node),h=e._getFillSymbol(i,c,t._color,r).addTo(e._layer),e._registerNodeClickEvent(h),t._node=h,t._nodeId=h._leaflet_id,h.parent=e,h.parentMarker=t,h.nodeType=o.JSNodeType.LINE_MARKER,h.properties=u,n==o.JSLineType.ARROW){var f=e._getArrowSymbol(i,c,r).addTo(e._layer);e._registerNodeClickEvent(f),t._node._symbol=f,f.parent=e,f.parentMarker=t,f.nodeType=o.JSNodeType.LINE_MARKER,f.properties=u}},t}}]),e}();e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PolylineDecorator=void 0;var r=n(384);n(97);var i=n(97),o=window.L,a=function(t){return Array.isArray(t)&&((e=t[0])instanceof o.LatLng||Array.isArray(e)&&2===e.length&&"number"==typeof e[0]);var e};e.PolylineDecorator=o.FeatureGroup.extend({options:{patterns:[]},initialize:function(t,e){o.FeatureGroup.prototype.initialize.call(this,e),o.Util.setOptions(this,e),this._map=null,this._paths=this._initPaths(t),this._bounds=this._initBounds(),this._patterns=this._initPatterns(this.options.patterns)},setWidthAndColor:function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this.options.patterns[0].symbol.options.pathOptions.renderer,a=void 0;a=r?[{repeat:5*t,offset:t,symbol:new i.ArrowSymbol({pixelSize:t/2,headAngle:75,polygon:!1,pathOptions:{stroke:!0,weight:t>4?2:1,color:"#FFFFFF",opacity:n,renderer:o}})}]:[{offset:0,repeat:5*t,symbol:new i.DashSymbol({pixelSize:2*t,pathOptions:{stroke:!0,weight:t,color:e,opacity:n,renderer:o}})},{offset:2*t+2,repeat:5*t,symbol:new i.DashSymbol({pixelSize:0,pathOptions:{stroke:!0,weight:t/2,color:e,opacity:n,renderer:o}})}],this.setPatterns(a)},_initPaths:function(t,e){var n=this;return a(t)?[e?t.concat([t[0]]):t]:t instanceof o.Polyline?this._initPaths(t.getLatLngs(),t instanceof o.Polygon):Array.isArray(t)?t.reduce(function(t,r){return t.concat(n._initPaths(r,e))},[]):[]},_initPatterns:function(t){return t.map(this._parsePatternDef)},setPatterns:function(t){this.options.patterns=t,this._patterns=this._initPatterns(this.options.patterns),this.redraw()},setPaths:function(t){this._paths=this._initPaths(t),this._bounds=this._initBounds(),this.redraw()},_parsePatternDef:function(t,e){return{symbolFactory:t.symbol,offset:(0,r.parseRelativeOrAbsoluteValue)(t.offset),endOffset:(0,r.parseRelativeOrAbsoluteValue)(t.endOffset),repeat:(0,r.parseRelativeOrAbsoluteValue)(t.repeat)}},setLatLngs:function(t){this.setPaths(t)},onAdd:function(t){this._map=t,this._draw(),this._map.on("moveend",this.redraw,this)},onRemove:function(t){this._map.off("moveend",this.redraw,this),this._map=null,o.FeatureGroup.prototype.onRemove.call(this,t)},_initBounds:function(){var t=this._paths.reduce(function(t,e){return t.concat(e)},[]);return o.latLngBounds(t)},getBounds:function(){return this._bounds},_buildSymbols:function(t,e,n){var r=this;return n.map(function(i,o){return e.buildSymbol(i,t,r._map,o,n.length)})},_getDirectionPoints:function(t,e){var n=this;if(t.length<2)return[];var i=t.map(function(t){return n._map.project(t)});return(0,r.projectPatternOnPointPath)(i,e).map(function(t){return{latLng:n._map.unproject(o.point(t.pt)),heading:t.heading}})},redraw:function(){this._map&&(this.clearLayers(),this._draw())},_getPatternLayers:function(t){var e=this._map.getBounds().pad(.1),n=this;return n._paths.map(function(r){var i=n._getDirectionPoints(r,t).filter(function(t){return e.contains(t.latLng)});return o.featureGroup(n._buildSymbols(r,t.symbolFactory,i))})},_draw:function(){var t=this;t._patterns.map(function(e){return t._getPatternLayers(e)}).forEach(function(e){t.addLayer(o.featureGroup(e))})}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){return(180*Math.atan2(e.y-t.y,e.x-t.x)/Math.PI+90+360)%360},i=function(t,e){var n=t.value;return t.isInPixels?n/e:n};var o=function(t,e){return t.x===e.x&&t.y===e.y};function a(t){return t.reduce(function(t,e,n,i){if(n>0&&!o(e,i[n-1])){var a=i[n-1],s=t.length>0?t[t.length-1].distB:0,u=(c=a,h=(l=e).x-c.x,f=l.y-c.y,Math.sqrt(h*h+f*f));t.push({a:a,b:e,distA:s,distB:s+u,heading:r(a,e)})}var c,l,h,f;return t},[])}e.projectPatternOnPointPath=function(t,e){var n=a(t),r=n.length;if(0===r)return[];var o=n[r-1].distB,s=i(e.offset,o),u=i(e.endOffset,o),c=o*i(e.repeat,o),l=u>0?o*u:0,h=[],f=s>0?o*s:0;do{h.push(f),f+=c}while(c>0&&fd.distB&&p0}},e.computeSegmentHeading=r,e.asRatioToPathLength=i},function(t,e){var n,r,i;n=L.Marker.prototype._initIcon,r=L.Marker.prototype._setPos,i="msTransform"===L.DomUtil.TRANSFORM,L.Marker.addInitHook(function(){var t=this.options.icon&&this.options.icon.options&&this.options.icon.options.iconAnchor;t&&(t=t[0]+"px "+t[1]+"px"),this.options.rotationOrigin=this.options.rotationOrigin||t||"center bottom",this.options.rotationAngle=this.options.rotationAngle||0,this.on("drag",function(t){t.target._applyRotation()})}),L.Marker.include({_initIcon:function(){n.call(this)},_setPos:function(t){r.call(this,t),this._applyRotation()},_applyRotation:function(){this.options.rotationAngle&&(this._icon.style[L.DomUtil.TRANSFORM+"Origin"]=this.options.rotationOrigin,i?this._icon.style[L.DomUtil.TRANSFORM]="rotate("+this.options.rotationAngle+"deg)":this._icon.style[L.DomUtil.TRANSFORM]+=" rotateZ("+this.options.rotationAngle+"deg)")},setRotationAngle:function(t){return this.options.rotationAngle=t,this.update(),this},setRotationOrigin:function(t){return this.options.rotationOrigin=t,this.update(),this}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],n=u.circleMarker([t._position.y,t._position.x],{radius:t._size/2,color:t._outlineColor,opacity:a.default.getAlphafromCssString(t._outlineColor),weight:t._outlineWidth,fillColor:t._color,fillOpacity:a.default.getAlphafromCssString(t._color),renderer:this._renderer,bubblingMouseEvents:!1});return n.addTo(this._layer),e?t.callback(n):(t._node=n,t._nodeId=n._leaflet_id),n.parent=this,n.parentMarker=t,n.nodeType=o.JSNodeType.POINT_MARKER,t._show||n.setStyle({opacity:0,fillOpacity:0}),t}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],n=u.marker([t.position.y,t.position.x],{icon:u.divIcon({html:t._content,iconAnchor:this._getMarkerAnchor(t),iconSize:[0,0]}),pane:this._pane});n.addTo(this._layer),a.removeClass(n._icon,"leaflet-div-icon"),e?t.callback(n):(t._node=n,t._nodeId=n.id),n.parent=this,n.parentMarker=t,n.nodeType=o.JSNodeType.DOM_MARKER,t._show||n.setOpacity(0);var r=this;return t._updateIcon=function(t){t._node.setIcon(u.divIcon({html:t._content,iconAnchor:r._getMarkerAnchor(t),iconSize:[0,0]})),a.removeClass(t._node._icon,"leaflet-div-icon")},t}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.svgCreate=function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)},e.pointsToPath=function(t,e){var n,i,o,a,s,u,c="";for(n=0,o=t.length;n1)return;var e=Date.now(),n=e-(s||e);u=t.touches?t.touches[0]:t,c=n>0&&n<=l,s=e}function f(t){if(c&&!u.cancelBubble){if(r.pointer){if("mouse"===t.pointerType)return;var n,i,o={};for(i in u)n=u[i],o[i]=n&&n.bind?n.bind(u):n;u=o}u.type="dblclick",u.button=0,e(u),s=null}}return t[a+i+n]=h,t[a+o+n]=f,t[a+"dblclick"+n]=e,t.addEventListener(i,h,!!r.passiveEvents&&{passive:!1}),t.addEventListener(o,f,!!r.passiveEvents&&{passive:!1}),t.addEventListener("dblclick",e,!1),this},e.removeDoubleTapListener=function(t,e){var n=t[a+i+e],s=t[a+o+e],u=t[a+"dblclick"+e];return t.removeEventListener(i,n,!!r.passiveEvents&&{passive:!1}),t.removeEventListener(o,s,!!r.passiveEvents&&{passive:!1}),t.removeEventListener("dblclick",u,!1),this};var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(53));var i=r.msPointer?"MSPointerDown":r.pointer?"pointerdown":"touchstart",o=r.msPointer?"MSPointerUp":r.pointer?"pointerup":"touchend",a="_leaflet_"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&(r.background=i,r.borderWidth=t._backgroundStrokeWidth+"px",r.borderColor=t._backgroundStrokeColor,r.borderRadius=t._backgroundRadius+"px",r.borderStyle="solid");var u=t._fontStrokeWidth+"px "+t._fontStrokeColor;r["-webkit-text-stroke"]=u,r["-moz-text-stroke"]=u,r["-o-text-stroke"]=u;var c=this._getClientRect(n),l=c.height,h=c.width;r.height=1.1*l+"px",r.width=1.2*h+"px",r.lineHeight=1.1*l+"px";var f=document.createElement("img");f.src=t._image;var p=f.style;switch(p.height=t._imageHeight+"px",p.width=t._imageWidth+"px",t._iconTextType){case o.JSIconTextType.LEFTTEXT_RIGHTICON:e.appendChild(n),e.appendChild(f),a.addClass(e,"jsmap2d-icontext-left-right");break;case o.JSIconTextType.LEFTICON_RIGHTTEXT:e.appendChild(f),e.appendChild(n),a.addClass(e,"jsmap2d-icontext-left-right");break;case o.JSIconTextType.TOPICON_BOTTOMTEXT:e.appendChild(f),e.appendChild(n),a.addClass(e,"jsmap2d-icontext-top-bottom");break;case o.JSIconTextType.TOPTEXT_BOTTOMICON:e.appendChild(n),e.appendChild(f),a.addClass(e,"jsmap2d-icontext-top-bottom")}return{html:e,iconAnchor:this._getMarkerAnchor(e,t._offset)}}},{key:"_getMarkerAnchor",value:function(t,e){var n=this._getClientRect(t),r=n.height,i=n.width,a=void 0,s=void 0;switch(e){case o.JSControlPosition.RIGHT_TOP:a=0,s=i;break;case o.JSControlPosition.RIGHT_CENTER:a=r/2,s=i;break;case o.JSControlPosition.RIGHT_BOTTOM:a=r,s=i;break;case o.JSControlPosition.LEFT_TOP:a=0,s=0;break;case o.JSControlPosition.LEFT_CENTER:a=r/2,s=0;break;case o.JSControlPosition.LEFT_BOTTOM:a=r,s=0;break;case o.JSControlPosition.CENTER_TOP:a=0,s=i/2;break;case o.JSControlPosition.CENTER:a=r/2,s=i/2;break;case o.JSControlPosition.CENTER_BOTTOM:a=r,s=i/2}return[s,a]}},{key:"addMarker",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this._getMarkerIcon(t),r=n.html,i=n.iconAnchor,s=c.marker([t.position.y,t.position.x],{icon:c.divIcon({html:r,iconSize:[0,0],iconAnchor:i}),pane:this._pane});s.addTo(this._layer),a.removeClass(s._icon,"leaflet-div-icon"),e?t.callback(s):(t._node=s,t._nodeId=s._leaflet_id),s.parent=this,s.parentMarker=t,s.nodeType=o.JSNodeType.ICON_TEXT_MARKER;var u=this;return t._updateIcon=function(t){var e=u._getMarkerIcon(t),n=e.html,r=e.iconAnchor;t._node.setIcon(c.divIcon({html:n,iconSize:[0,0],iconAnchor:r})),a.removeClass(t._node._icon,"leaflet-div-icon")},t._show||s.setOpacity(0),t}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],n=a.default.getAlphafromCssString(t._color),r=u.circle([t._position.y,t._position.x],{stroke:!0,radius:t._radius,color:t._color,opacity:n+.2,weight:2,fillColor:t._color,fillOpacity:n,renderer:this._renderer,bubblingMouseEvents:!1});return r.addTo(this._layer),e?t.callback(r):(t._node=r,t._nodeId=r._leaflet_id),r.parent=this,r.parentMarker=t,r.nodeType=o.JSNodeType.CIRCLE_MARKER,t._show||r.setStyle({opacity:0,fillOpacity:0}),t}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],n=t._position,r=n.west,i=n.east,s=n.north,c=n.south,l=u.rectangle([[c,r],[s,i]],{stroke:!0,color:t._strokeColor,opacity:a.default.getAlphafromCssString(t._strokeColor),weight:2,fillColor:t._color,fillOpacity:a.default.getAlphafromCssString(t._color),renderer:this._renderer,bubblingMouseEvents:!1});return l.addTo(this._layer),e?t.callback(l):(t._node=l,t._nodeId=l._leaflet_id),l.parent=this,l.parentMarker=t,l.nodeType=o.JSNodeType.RECTANGLE_MARKER,t._show||l.setStyle({opacity:0,fillOpacity:0}),t}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=P(n(395)),i=P(n(191)),o=P(n(396)),a=P(n(39)),s=P(n(397)),u=P(n(398)),c=P(n(13)),l=P(n(6)),h=P(n(16)),f=P(n(399)),p=P(n(400)),d=P(n(401)),g=P(n(192)),y=P(n(402)),v=P(n(193)),m=P(n(403)),_=P(n(404)),b=P(n(405)),w=P(n(406)),E=P(n(408)),x=P(n(410)),O=P(n(101)),M=P(n(412)),S=P(n(413));function P(t){return t&&t.__esModule?t:{default:t}}var C,T=function(){try{var t=new XMLHttpRequest;return t.open("GET","#",!0),t.responseType="blob","blob"===t.responseType}catch(t){return!1}}();function I(t,e,n,r){var i,o=t.query;if(!(0,l.default)(o)||0===o.length)return{};if(-1===o.indexOf("=")){var a={};a[o]=void 0,i=a}else i=(0,b.default)(o);e._queryParameters=n?N(i,e._queryParameters,r):i,t.query=void 0}function L(t,e){return(0,l.default)(t)?(0,l.default)(t.clone)?t.clone():(0,s.default)(t):e}function A(t){if(t.state===O.default.ISSUED||t.state===O.default.ACTIVE)throw new M.default("The Resource is already being fetched.");t.state=O.default.UNISSUED,t.deferred=void 0}function N(t,e,n){if(!n)return(0,u.default)(t,e);var r=(0,s.default)(t,!0);for(var i in e)if(e.hasOwnProperty(i)){var o=r[i],a=e[i];(0,l.default)(o)?(Array.isArray(o)||(o=r[i]=[o]),r[i]=o.concat(a)):r[i]=Array.isArray(a)?a.slice():a}return r}function k(t){"string"==typeof(t=(0,c.default)(t,c.default.EMPTY_OBJECT))&&(t={url:t}),a.default.typeOf.string("options.url",t.url),this._url=void 0,this._templateValues=L(t.templateValues,{}),this._queryParameters=L(t.queryParameters,{}),this.headers=L(t.headers,{}),this.request=(0,c.default)(t.request,new w.default),this.proxy=t.proxy,this.retryCallback=t.retryCallback,this.retryAttempts=(0,c.default)(t.retryAttempts,0),this._retryCount=0;var e=new r.default(t.url);I(e,this,!0,!0),e.fragment=void 0,this._url=e.toString()}function j(t){var e=t.resource,n=t.flipY,r=t.preferImageBitmap,o=e.request;o.url=e.url,o.requestFunction=function(){var t=!1;e.isDataUri||e.isBlobUri||(t=e.isCrossOriginUrl);var a=i.default.defer();return k._Implementations.createImage(o,t,a,n,r),a.promise};var a=x.default.request(o);if((0,l.default)(a))return a.otherwise(function(t){return o.state!==O.default.FAILED?i.default.reject(t):e.retryOnError(t).then(function(a){return a?(o.state=O.default.UNISSUED,o.deferred=void 0,j({resource:e,flipY:n,preferImageBitmap:r})):i.default.reject(t)})})}k.createIfNeeded=function(t){return t instanceof k?t.getDerivedResource({request:t.request}):"string"!=typeof t?t:new k({url:t})},k.supportsImageBitmapOptions=function(){if((0,l.default)(C))return C;if("function"!=typeof createImageBitmap)return C=i.default.resolve(!1);return C=k.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP4////fwAJ+wP9CNHoHgAAAABJRU5ErkJggg=="}).then(function(t){return createImageBitmap(t,{imageOrientation:"flipY",premultiplyAlpha:"none"})}).then(function(){return!0}).otherwise(function(){return!1})},Object.defineProperties(k,{isBlobSupported:{get:function(){return T}}}),Object.defineProperties(k.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(t){var e=new r.default(t);I(e,this,!1),e.fragment=void 0,this._url=e.toString()}},extension:{get:function(){return(0,d.default)(this._url)}},isDataUri:{get:function(){return(0,v.default)(this._url)}},isBlobUri:{get:function(){return(0,g.default)(this._url)}},isCrossOriginUrl:{get:function(){return(0,y.default)(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}}}),k.prototype.toString=function(){return this.getUrlComponent(!0,!0)},k.prototype.getUrlComponent=function(t,e){if(this.isDataUri)return this._url;var n=new r.default(this._url);t&&function(t,e){var n=e._queryParameters,r=Object.keys(n);1!==r.length||(0,l.default)(n[r[0]])?t.query=(0,_.default)(n):t.query=r[0]}(n,this);var i=n.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),o=this._templateValues;return i=i.replace(/{(.*?)}/g,function(t,e){var n=o[e];return(0,l.default)(n)?encodeURIComponent(n):t}),e&&(0,l.default)(this.proxy)&&(i=this.proxy.getURL(i)),i},k.prototype.setQueryParameters=function(t,e){this._queryParameters=e?N(this._queryParameters,t,!1):N(t,this._queryParameters,!1)},k.prototype.appendQueryParameters=function(t){this._queryParameters=N(t,this._queryParameters,!0)},k.prototype.setTemplateValues=function(t,e){this._templateValues=e?(0,u.default)(this._templateValues,t):(0,u.default)(t,this._templateValues)},k.prototype.getDerivedResource=function(t){var e=this.clone();if(e._retryCount=0,(0,l.default)(t.url)){var n=new r.default(t.url);I(n,e,!0,(0,c.default)(t.preserveQueryParameters,!1)),n.fragment=void 0,e._url=n.resolve(new r.default((0,f.default)(this._url))).toString()}return(0,l.default)(t.queryParameters)&&(e._queryParameters=(0,u.default)(t.queryParameters,e._queryParameters)),(0,l.default)(t.templateValues)&&(e._templateValues=(0,u.default)(t.templateValues,e.templateValues)),(0,l.default)(t.headers)&&(e.headers=(0,u.default)(t.headers,e.headers)),(0,l.default)(t.proxy)&&(e.proxy=t.proxy),(0,l.default)(t.request)&&(e.request=t.request),(0,l.default)(t.retryCallback)&&(e.retryCallback=t.retryCallback),(0,l.default)(t.retryAttempts)&&(e.retryAttempts=t.retryAttempts),e},k.prototype.retryOnError=function(t){var e=this.retryCallback;if("function"!=typeof e||this._retryCount>=this.retryAttempts)return(0,i.default)(!1);var n=this;return(0,i.default)(e(this,t)).then(function(t){return++n._retryCount,t})},k.prototype.clone=function(t){return(0,l.default)(t)||(t=new k({url:this._url})),t._url=this._url,t._queryParameters=(0,s.default)(this._queryParameters),t._templateValues=(0,s.default)(this._templateValues),t.headers=(0,s.default)(this.headers),t.proxy=this.proxy,t.retryCallback=this.retryCallback,t.retryAttempts=this.retryAttempts,t._retryCount=0,t.request=this.request.clone(),t},k.prototype.getBaseUri=function(t){return(0,p.default)(this.getUrlComponent(t),t)},k.prototype.appendForwardSlash=function(){this._url=(0,o.default)(this._url)},k.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},k.fetchArrayBuffer=function(t){return new k(t).fetchArrayBuffer()},k.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},k.fetchBlob=function(t){return new k(t).fetchBlob()},k.prototype.fetchImage=function(t){t=(0,c.default)(t,c.default.EMPTY_OBJECT);var e=(0,c.default)(t.preferImageBitmap,!1),n=(0,c.default)(t.preferBlob,!1),r=(0,c.default)(t.flipY,!1);if(A(this.request),!T||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return j({resource:this,flipY:r,preferImageBitmap:e});var o,a,s,u=this.fetchBlob();return(0,l.default)(u)?k.supportsImageBitmapOptions().then(function(t){return o=t&&e,u}).then(function(t){if((0,l.default)(t)){if(s=t,o)return k.createImageBitmapFromBlob(t,{flipY:r,premultiplyAlpha:!1});var e=window.URL.createObjectURL(t);return j({resource:a=new k({url:e}),flipY:r,preferImageBitmap:!1})}}).then(function(t){if((0,l.default)(t))return t.blob=s,o?t:(window.URL.revokeObjectURL(a.url),t)}).otherwise(function(t){return(0,l.default)(a)&&window.URL.revokeObjectURL(a.url),t.blob=s,i.default.reject(t)}):void 0},k.fetchImage=function(t){return new k(t).fetchImage({flipY:t.flipY,preferBlob:t.preferBlob,preferImageBitmap:t.preferImageBitmap})},k.prototype.fetchText=function(){return this.fetch({responseType:"text"})},k.fetchText=function(t){return new k(t).fetchText()},k.prototype.fetchJson=function(){var t=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if((0,l.default)(t))return t.then(function(t){if((0,l.default)(t))return JSON.parse(t)})},k.fetchJson=function(t){return new k(t).fetchJson()},k.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},k.fetchXML=function(t){return new k(t).fetchXML()},k.prototype.fetchJsonp=function(t){var e;t=(0,c.default)(t,"callback"),A(this.request);do{e="loadJsonp"+Math.random().toString().substring(2,8)}while((0,l.default)(window[e]));return function t(e,n,r){var o={};o[n]=r;e.setQueryParameters(o);var a=e.request;a.url=e.url;a.requestFunction=function(){var t=i.default.defer();return window[r]=function(e){t.resolve(e);try{delete window[r]}catch(t){window[r]=void 0}},k._Implementations.loadAndExecuteScript(e.url,r,t),t.promise};var s=x.default.request(a);if(!(0,l.default)(s))return;return s.otherwise(function(o){return a.state!==O.default.FAILED?i.default.reject(o):e.retryOnError(o).then(function(s){return s?(a.state=O.default.UNISSUED,a.deferred=void 0,t(e,n,r)):i.default.reject(o)})})}(this,t,e)},k.fetchJsonp=function(t){return new k(t).fetchJsonp(t.callbackParameterName)},k.prototype._makeRequest=function(t){var e=this;A(e.request);var n=e.request;n.url=e.url,n.requestFunction=function(){var r=t.responseType,o=(0,u.default)(t.headers,e.headers),a=t.overrideMimeType,s=t.method,c=t.data,h=i.default.defer(),f=k._Implementations.loadWithXhr(e.url,r,s,c,o,h,a);return(0,l.default)(f)&&(0,l.default)(f.abort)&&(n.cancelFunction=function(){f.abort()}),h.promise};var r=x.default.request(n);if((0,l.default)(r))return r.then(function(t){return n.cancelFunction=void 0,t}).otherwise(function(r){return n.cancelFunction=void 0,n.state!==O.default.FAILED?i.default.reject(r):e.retryOnError(r).then(function(o){return o?(n.state=O.default.UNISSUED,n.deferred=void 0,e.fetch(t)):i.default.reject(r)})})};var R=/^data:(.*?)(;base64)?,(.*)$/;function D(t,e){var n=decodeURIComponent(e);return t?atob(n):n}function F(t,e){for(var n=D(t,e),r=new ArrayBuffer(n.length),i=new Uint8Array(r),o=0;o=300)||d&&0===f.status){var t=f.response,n=f.responseType;if("HEAD"===r||"OPTIONS"===r){var i={};return f.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(function(t){var e=t.split(": "),n=e.shift();i[n]=e.join(": ")}),void a.resolve(i)}if(204===f.status)a.resolve();else if(!(0,l.default)(t)||(0,l.default)(e)&&n!==e)if("json"===e&&"string"==typeof t)try{a.resolve(JSON.parse(t))}catch(t){a.reject(t)}else(""===n||"document"===n)&&(0,l.default)(f.responseXML)&&f.responseXML.hasChildNodes()?a.resolve(f.responseXML):""!==n&&"text"!==n||!(0,l.default)(f.responseText)?a.reject(new M.default("Invalid XMLHttpRequest response type.")):a.resolve(f.responseText);else a.resolve(t)}else a.reject(new E.default(f.status,f.response,f.getAllResponseHeaders()))},f.onerror=function(){a.reject(new E.default)},f.send(i),f}!function(t,e,r,i,o,a,s){var u=n(414).parse(t),c=(u.protocol,n(103)),l=n(103),h={protocol:u.protocol,hostname:u.hostname,port:u.port,path:u.path,query:u.query,method:r,headers:o};c.request(h).on("response",function(t){if(t.statusCode<200||t.statusCode>=300)a.reject(new E.default(t.statusCode,t,t.headers));else{var n=[];t.on("data",function(t){n.push(t)}),t.on("end",function(){var r=Buffer.concat(n);"gzip"===t.headers["content-encoding"]?l.gunzip(r,function(t,n){t?a.reject(new M.default("Error decompressing response.")):a.resolve(z(n,e))}):a.resolve(z(r,e))})}}).on("error",function(){a.reject(new E.default)}).end()}(t,e,r,0,o,a)}else a.resolve(function(t,e){e=(0,c.default)(e,"");var n=t[1],r=!!t[2],i=t[3];switch(e){case"":case"text":return D(r,i);case"arraybuffer":return F(r,i);case"blob":var o=F(r,i);return new Blob([o],{type:n});case"document":return(new DOMParser).parseFromString(D(r,i),n);case"json":return JSON.parse(D(r,i));default:throw new h.default("Unhandled responseType: "+e)}}(u,e))},k._Implementations.loadAndExecuteScript=function(t,e,n){return(0,m.default)(t,e).otherwise(n.reject)},k._DefaultImplementations={},k._DefaultImplementations.createImage=k._Implementations.createImage,k._DefaultImplementations.loadWithXhr=k._Implementations.loadWithXhr,k._DefaultImplementations.loadAndExecuteScript=k._Implementations.loadAndExecuteScript,k.DEFAULT=Object.freeze(new k({url:"undefined"==typeof document?"":document.location.href.split("?")[0]})),e.default=k},function(t,e,n){"use strict";function r(t){if(t instanceof r)this.scheme=t.scheme,this.authority=t.authority,this.path=t.path,this.query=t.query,this.fragment=t.fragment;else if(t){var e=i.exec(t);this.scheme=e[1],this.authority=e[2],this.path=e[3],this.query=e[4],this.fragment=e[5]}}Object.defineProperty(e,"__esModule",{value:!0}),r.prototype.scheme=null,r.prototype.authority=null,r.prototype.path="",r.prototype.query=null,r.prototype.fragment=null;var i=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$");r.prototype.getScheme=function(){return this.scheme},r.prototype.getAuthority=function(){return this.authority},r.prototype.getPath=function(){return this.path},r.prototype.getQuery=function(){return this.query},r.prototype.getFragment=function(){return this.fragment},r.prototype.isAbsolute=function(){return!!this.scheme&&!this.fragment},r.prototype.isSameDocumentAs=function(t){return t.scheme==this.scheme&&t.authority==this.authority&&t.path==this.path&&t.query==this.query},r.prototype.equals=function(t){return this.isSameDocumentAs(t)&&t.fragment==this.fragment},r.prototype.normalize=function(){this.removeDotSegments(),this.scheme&&(this.scheme=this.scheme.toLowerCase()),this.authority&&(this.authority=this.authority.replace(s,c).replace(o,u)),this.path&&(this.path=this.path.replace(o,u)),this.query&&(this.query=this.query.replace(o,u)),this.fragment&&(this.fragment=this.fragment.replace(o,u))};var o=/%[0-9a-z]{2}/gi,a=/[a-zA-Z0-9\-\._~]/,s=/(.*@)?([^@:]*)(:.*)?/;function u(t){var e=unescape(t);return a.test(e)?e:t.toUpperCase()}function c(t,e,n,r){return(e||"")+n.toLowerCase()+(r||"")}r.prototype.resolve=function(t){var e=new r;return this.scheme?(e.scheme=this.scheme,e.authority=this.authority,e.path=this.path,e.query=this.query):(e.scheme=t.scheme,this.authority?(e.authority=this.authority,e.path=this.path,e.query=this.query):(e.authority=t.authority,""==this.path?(e.path=t.path,e.query=this.query||t.query):("/"==this.path.charAt(0)?(e.path=this.path,e.removeDotSegments()):(t.authority&&""==t.path?e.path="/"+this.path:e.path=t.path.substring(0,t.path.lastIndexOf("/")+1)+this.path,e.removeDotSegments()),e.query=this.query))),e.fragment=this.fragment,e},r.prototype.removeDotSegments=function(){var t,e=this.path.split("/"),n=[],r=""==e[0];r&&e.shift();for(""==e[0]&&e.shift();e.length;)".."==(t=e.shift())?n.pop():"."!=t&&n.push(t);"."!=t&&".."!=t||n.push(""),r&&n.unshift(""),this.path=n.join("/")},r.prototype.toString=function(){var t="";return this.scheme&&(t+=this.scheme+":"),this.authority&&(t+="//"+this.authority),t+=this.path,this.query&&(t+="?"+this.query),this.fragment&&(t+="#"+this.fragment),t},e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return 0!==t.length&&"/"===t[t.length-1]||(t+="/"),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=n(13),a=(r=o)&&r.__esModule?r:{default:r};e.default=function t(e,n){if(null===e||"object"!==(void 0===e?"undefined":i(e)))return e;n=(0,a.default)(n,!1);var r=new e.constructor;for(var o in e)if(e.hasOwnProperty(o)){var s=e[o];n&&(s=t(s,n)),r[o]=s}return r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=a(n(13)),o=a(n(6));function a(t){return t&&t.__esModule?t:{default:t}}e.default=function t(e,n,a){a=(0,i.default)(a,!1);var s,u,c,l={},h=(0,o.default)(e),f=(0,o.default)(n);if(h)for(s in e)e.hasOwnProperty(s)&&(u=e[s],f&&a&&"object"===(void 0===u?"undefined":r(u))&&n.hasOwnProperty(s)&&"object"===(void 0===(c=n[s])?"undefined":r(c))?l[s]=t(u,c,a):l[s]=u);if(f)for(s in n)n.hasOwnProperty(s)&&!l.hasOwnProperty(s)&&(c=n[s],l[s]=c);return l}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(n(54)),i=s(n(13)),o=s(n(6)),a=s(n(16));function s(t){return t&&t.__esModule?t:{default:t}}function u(t,e){var n;return"undefined"!=typeof document&&(n=document),u._implementation(t,e,n)}u._implementation=function(t,e,n){if(!(0,o.default)(t))throw new a.default("relative uri is required.");if(!(0,o.default)(e)){if(void 0===n)return t;e=(0,i.default)(n.baseURI,n.location.href)}var s=new r.default(e);return new r.default(t).resolve(s).toString()},e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(54)),i=a(n(6)),o=a(n(16));function a(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){if(!(0,i.default)(t))throw new o.default("uri is required.");var n="",a=t.lastIndexOf("/");return-1!==a&&(n=t.substring(0,a+1)),e?(t=new r.default(t),(0,i.default)(t.query)&&(n+="?"+t.query),(0,i.default)(t.fragment)&&(n+="#"+t.fragment),n):n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(54)),i=a(n(6)),o=a(n(16));function a(t){return t&&t.__esModule?t:{default:t}}e.default=function(t){if(!(0,i.default)(t))throw new o.default("uri is required.");var e=new r.default(t);e.normalize();var n=e.path,a=n.lastIndexOf("/");return-1!==a&&(n=n.substr(a+1)),n=-1===(a=n.lastIndexOf("."))?"":n.substr(a+1)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i,o=n(6),a=(r=o)&&r.__esModule?r:{default:r};e.default=function(t){(0,a.default)(i)||(i=document.createElement("a")),i.href=window.location.href;var e=i.host,n=i.protocol;return i.href=t,i.href=i.href,n!==i.protocol||e!==i.host}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(194),o=(r=i)&&r.__esModule?r:{default:r};e.default=function(t){var e=o.default.defer(),n=document.createElement("script");n.async=!0,n.src=t;var r=document.getElementsByTagName("head")[0];return n.onload=function(){n.onload=void 0,r.removeChild(n),e.resolve()},n.onerror=function(t){e.reject(t)},r.appendChild(n),e.promise}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(n(6)),i=o(n(16));function o(t){return t&&t.__esModule?t:{default:t}}e.default=function(t){if(!(0,r.default)(t))throw new i.default("obj is required.");var e="";for(var n in t)if(t.hasOwnProperty(n)){var o=t[n],a=encodeURIComponent(n)+"=";if(Array.isArray(o))for(var s=0,u=o.length;s0){var a=i.substring(0,o),s=i.substring(o+2);e[a]=s}}return e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=p(n(54)),i=p(n(194)),o=p(n(39)),a=p(n(13)),s=p(n(6)),u=p(n(195)),c=p(n(411)),l=p(n(192)),h=p(n(193)),f=p(n(101));function p(t){return t&&t.__esModule?t:{default:t}}var d={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},g=20,y=new c.default({comparator:function(t,e){return t.priority-e.priority}});y.maximumLength=g,y.reserve(g);var v=[],m={},_="undefined"!=typeof document?new r.default(document.location.href):new r.default,b=new u.default;function w(){}function E(t){(0,s.default)(t.priorityFunction)&&(t.priority=t.priorityFunction())}function x(t){var e=(0,a.default)(w.requestsByServer[t],w.maximumRequestsPerServer);return m[t]t;){S(y.pop())}g=t,y.maximumLength=t,y.reserve(t)}}}),w.update=function(){var t,e,n=0,r=v.length;for(t=0;t0&&(v[t-n]=e):++n;v.length-=n;var i=y.internalArray,o=y.length;for(t=0;t0;)(e=y.pop()).cancelled?S(e):!e.throttleByServer||x(e.serverKey)?(M(e),++s):S(e);!function(){if(!w.debugShowStatistics)return;0===d.numberOfActiveRequests&&d.lastNumberOfActiveRequests>0&&(d.numberOfAttemptedRequests>0&&(console.log("Number of attempted requests: "+d.numberOfAttemptedRequests),d.numberOfAttemptedRequests=0),d.numberOfCancelledRequests>0&&(console.log("Number of cancelled requests: "+d.numberOfCancelledRequests),d.numberOfCancelledRequests=0),d.numberOfCancelledActiveRequests>0&&(console.log("Number of cancelled active requests: "+d.numberOfCancelledActiveRequests),d.numberOfCancelledActiveRequests=0),d.numberOfFailedRequests>0&&(console.log("Number of failed requests: "+d.numberOfFailedRequests),d.numberOfFailedRequests=0));d.lastNumberOfActiveRequests=d.numberOfActiveRequests}()},w.getServerKey=function(t){o.default.typeOf.string("url",t);var e=new r.default(t).resolve(_);e.normalize();var n=e.authority;/:/.test(n)||(n=n+":"+("https"===e.scheme?"443":"80"));var i=m[n];return(0,s.default)(i)||(m[n]=0),n},w.request=function(t){if(o.default.typeOf.object("request",t),o.default.typeOf.string("request.url",t.url),o.default.typeOf.func("request.requestFunction",t.requestFunction),(0,h.default)(t.url)||(0,l.default)(t.url))return b.raiseEvent(),t.state=f.default.RECEIVED,t.requestFunction();if(++d.numberOfAttemptedRequests,(0,s.default)(t.serverKey)||(t.serverKey=w.getServerKey(t.url)),!w.throttleRequests||!t.throttleByServer||x(t.serverKey)){if(!w.throttleRequests||!t.throttle)return M(t);if(!(v.length>=w.maximumRequests)){E(t);var e=y.insert(t);if((0,s.default)(e)){if(e===t)return;S(e)}return O(t)}}},w.clearForSpecs=function(){for(;y.length>0;){S(y.pop())}for(var t=v.length,e=0;e=0;--e)this.heapify(e)},s.prototype.insert=function(t){r.default.defined("element",t);var e,n=this._array,i=this._comparator,a=this._maximumLength,s=this._length++;for(sa&&(e=n[a],this._length=a),e},s.prototype.pop=function(t){if(t=(0,i.default)(t,0),0!==this._length){r.default.typeOf.number.lessThan("index",t,this._length);var e=this._array,n=e[t];return u(e,t,--this._length),this.heapify(t),e[this._length]=void 0,n}},e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(6),o=(r=i)&&r.__esModule?r:{default:r};function a(t){var e;this.name="RuntimeError",this.message=t;try{throw new Error}catch(t){e=t.stack}this.stack=e}(0,o.default)(Object.create)&&(a.prototype=Object.create(Error.prototype),a.prototype.constructor=a),a.prototype.toString=function(){var t=this.name+": "+this.message;return(0,o.default)(this.stack)&&(t+="\n"+this.stack.toString()),t},e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(54)),i=a(n(6)),o=a(n(16));function a(t){return t&&t.__esModule?t:{default:t}}var s={},u={};s.add=function(t,e){if(!(0,i.default)(t))throw new o.default("host is required.");if(!(0,i.default)(e)||e<=0)throw new o.default("port is required to be greater than 0.");var n=t.toLowerCase()+":"+e;(0,i.default)(u[n])||(u[n]=!0)},s.remove=function(t,e){if(!(0,i.default)(t))throw new o.default("host is required.");if(!(0,i.default)(e)||e<=0)throw new o.default("port is required to be greater than 0.");var n=t.toLowerCase()+":"+e;(0,i.default)(u[n])&&delete u[n]},s.contains=function(t){if(!(0,i.default)(t))throw new o.default("url is required.");var e=function(t){var e=new r.default(t);e.normalize();var n=e.getAuthority();if((0,i.default)(n)){if(-1!==n.indexOf("@")&&(n=n.split("@")[1]),-1===n.indexOf(":")){var o=e.getScheme();if((0,i.default)(o)||(o=(o=window.location.protocol).substring(0,o.length-1)),"http"===o)n+=":80";else{if("https"!==o)return;n+=":443"}}return n}}(t);return!(!(0,i.default)(e)||!(0,i.default)(u[e]))},s.clear=function(){u={}},e.default=s},function(t,e,n){"use strict";var r=n(415),i=n(417);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=_,e.resolve=function(t,e){return _(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?_(t,!1,!0).resolveObject(e):e},e.format=function(t){i.isString(t)&&(t=_(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),h=["%","/","?",";","#"].concat(l),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=n(418);function _(t,e,n){if(t&&i.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}o.prototype.parse=function(t,e,n){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o127?N+="x":N+=A[k];if(!N.match(p)){var R=I.slice(0,P),D=I.slice(P+1),F=A.match(d);F&&(R.push(F[1]),D.unshift(F[2])),D.length&&(_="/"+D.join(".")+_),this.hostname=R.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=r.toASCII(this.hostname));var z=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+z,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!g[E])for(P=0,L=l.length;P0)&&n.host.split("@"))&&(n.auth=T.shift(),n.host=n.hostname=T.shift());return n.search=t.search,n.query=t.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var M=x.slice(-1)[0],S=(n.host||t.host||x.length>1)&&("."===M||".."===M)||""===M,P=0,C=x.length;C>=0;C--)"."===(M=x[C])?x.splice(C,1):".."===M?(x.splice(C,1),P++):P&&(x.splice(C,1),P--);if(!w&&!E)for(;P--;P)x.unshift("..");!w||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),S&&"/"!==x.join("/").substr(-1)&&x.push("");var T,I=""===x[0]||x[0]&&"/"===x[0].charAt(0);O&&(n.hostname=n.host=I?"":x.length?x.shift():"",(T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=T.shift(),n.host=n.hostname=T.shift()));return(w=w||n.host&&x.length)&&!I&&x.unshift(""),x.length?n.pathname=x.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){(function(t,r){var i;!function(o){"object"==typeof e&&e&&e.nodeType,"object"==typeof t&&t&&t.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,u=2147483647,c=36,l=1,h=26,f=38,p=700,d=72,g=128,y="-",v=/^xn--/,m=/[^\x20-\x7E]/,_=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=c-l,E=Math.floor,x=String.fromCharCode;function O(t){throw new RangeError(b[t])}function M(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function S(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+M((t=t.replace(_,".")).split("."),e).join(".")}function P(t){for(var e,n,r=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=x((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=x(t)}).join("")}function T(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function I(t,e,n){var r=0;for(t=n?E(t/p):t>>1,t+=E(t/e);t>w*h>>1;r+=c)t=E(t/w);return E(r+(w+1)*t/(t+f))}function L(t){var e,n,r,i,o,a,s,f,p,v,m,_=[],b=t.length,w=0,x=g,M=d;for((n=t.lastIndexOf(y))<0&&(n=0),r=0;r=128&&O("not-basic"),_.push(t.charCodeAt(r));for(i=n>0?n+1:0;i=b&&O("invalid-input"),((f=(m=t.charCodeAt(i++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:c)>=c||f>E((u-w)/a))&&O("overflow"),w+=f*a,!(f<(p=s<=M?l:s>=M+h?h:s-M));s+=c)a>E(u/(v=c-p))&&O("overflow"),a*=v;M=I(w-o,e=_.length+1,0==o),E(w/e)>u-x&&O("overflow"),x+=E(w/e),w%=e,_.splice(w++,0,x)}return C(_)}function A(t){var e,n,r,i,o,a,s,f,p,v,m,_,b,w,M,S=[];for(_=(t=P(t)).length,e=g,n=0,o=d,a=0;a<_;++a)(m=t[a])<128&&S.push(x(m));for(r=i=S.length,i&&S.push(y);r<_;){for(s=u,a=0;a<_;++a)(m=t[a])>=e&&mE((u-n)/(b=r+1))&&O("overflow"),n+=(s-e)*b,e=s,a=0;a<_;++a)if((m=t[a])u&&O("overflow"),m==e){for(f=n,p=c;!(f<(v=p<=o?l:p>=o+h?h:p-o));p+=c)M=f-v,w=c-v,S.push(x(T(v+M%w,0))),f=E(M/w);S.push(x(T(f,0))),o=I(n,b,r==i),n=0,++r}++n,++e}return S.join("")}s={version:"1.4.1",ucs2:{decode:P,encode:C},decode:L,encode:A,toASCII:function(t){return S(t,function(t){return m.test(t)?"xn--"+A(t):t})},toUnicode:function(t){return S(t,function(t){return v.test(t)?L(t.slice(4).toLowerCase()):t})}},void 0===(i=function(){return s}.call(e,n,e,t))||(t.exports=i)}()}).call(e,n(416)(t),n(102))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,n){"use strict";e.decode=e.parse=n(419),e.encode=e.stringify=n(420)},function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,o){e=e||"&",n=n||"=";var a={};if("string"!=typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var l=0;l=0?(h=g.substr(0,y),f=g.substr(y+1)):(h=g,f=""),p=decodeURIComponent(h),d=decodeURIComponent(f),r(a,p)?i(a[p])?a[p].push(d):a[p]=[a[p],d]:a[p]=d}return a};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,s){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?o(a(t),function(a){var s=encodeURIComponent(r(a))+n;return i(t[a])?o(t[a],function(t){return s+encodeURIComponent(r(t))}).join(e):s+encodeURIComponent(r(t[a]))}).join(e):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r1?e-1:0),r=1;r0)r.forEach(function(t){t.addTo(i._map._map),t.bringToBack()});else for(var o=r.length-1;o>=0;o--)r[o].addTo(i._map._map)}}}},{key:"destroy",value:function(){this._map=void 0,this._callback=void 0,this._currentImageryProvider=void 0,this._tdt_image=void 0,this._tdt_vector=void 0,this._tdt_terrain=void 0,this._gd_image=void 0,this._gd_vector=void 0,this._osm_vector=void 0,this._arcgis_image=void 0,this._geoq_vector=void 0,this._geoq_vector_gray=void 0,this._geoq_vector_warm=void 0,this._geoq_vector_pincine=void 0,this._mapBox_image=void 0,this._mapBox_vector=void 0,this._imageryProviderViewModels=void 0,this._baseLayerControl&&this._baseLayerControl.destroy(),this._baseLayerControl=void 0}},{key:"tdt_image",get:function(){if(!this._tdt_image){var t=this._fetchTokenOfTDT(),e=["0","1","2","3","4","5","6","7"];this._tdt_image=[w.tileLayer("https://t{s}.tianditu.gov.cn/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk="+t,{subdomains:e,maxZoom:24,maxNativeZoom:18,key:t}),w.tileLayer("https://t{s}.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk="+t,{subdomains:e,maxZoom:24,maxNativeZoom:18,key:t})]}return this._tdt_image}},{key:"tdt_vector",get:function(){if(!this._tdt_vector){var t=this._fetchTokenOfTDT(),e=["0","1","2","3","4","5","6","7"];this._tdt_vector=[new w.tileLayer("https://t{s}.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk="+t,{subdomains:e,maxZoom:24,maxNativeZoom:18,key:t}),w.tileLayer("https://t{s}.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk="+t,{subdomains:e,maxZoom:24,maxNativeZoom:18,key:t})]}return this._tdt_vector}},{key:"tdt_terrain",get:function(){if(!this._tdt_terrain){var t=this._fetchTokenOfTDT(),e=["0","1","2","3","4","5","6","7"];this._tdt_terrain=[w.tileLayer("https://t{s}.tianditu.gov.cn/DataServer?T=cta_w&x={x}&y={y}&l={z}&tk="+t,{subdomains:e,maxZoom:24,maxNativeZoom:14,key:t}),w.tileLayer("https://t{s}.tianditu.gov.cn/DataServer?T=ter_w&x={x}&y={y}&l={z}&tk="+t,{subdomains:e,maxZoom:24,maxNativeZoom:14,key:t})]}return this._tdt_terrain}},{key:"gd_image",get:function(){if(!this._gd_image){var t=["1","2","3","4"];this._gd_image=[new _.default("https://webst0{s}.is.autonavi.com/appmaptile?style=8&x={x}&y={y}&z={z}",{maxNativeZoom:18,maxZoom:24,subdomains:t}),new _.default("https://webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",{maxNativeZoom:18,maxZoom:24,subdomains:t})]}return this._gd_image}},{key:"gd_vector",get:function(){return this._gd_vector||(this._gd_vector=[new _.default("https://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=7&x={x}&y={y}&z={z}",{maxNativeZoom:18,maxZoom:24,subdomains:["1","2","3","4"]})]),this._gd_vector}},{key:"osm_vector",get:function(){return this._osm_vector||(this._osm_vector=[w.tileLayer("https://{s}.tile.osm.org/{z}/{x}/{y}.png",{subdomains:["a","b","c"],maxNativeZoom:19,maxZoom:24})]),this._osm_vector}},{key:"arcgis_image",get:function(){var t=["server","services"];return this._arcgis_image||(this._arcgis_image=[w.tileLayer("https://{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer/tile/{z}/{y}/{x}",{maxNativeZoom:19,maxZoom:24,subdomains:t}),w.tileLayer("https://{s}.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",{maxNativeZoom:19,maxZoom:24,subdomains:t})]),this._arcgis_image}},{key:"geoq_vector",get:function(){return this._geoq_vector||(this._geoq_vector=[new _.default("https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer/tile/{z}/{y}/{x}",{maxNativeZoom:17,maxZoom:24})]),this._geoq_vector}},{key:"geoq_vector_gray",get:function(){return this._geoq_vector_gray||(this._geoq_vector_gray=[new _.default("https://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetGray/MapServer/tile/{z}/{y}/{x}",{maxNativeZoom:16,maxZoom:24})]),this._geoq_vector_gray}},{key:"geoq_vector_warm",get:function(){return this._geoq_vector_warm||(this._geoq_vector_warm=[new _.default("https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetWarm/MapServer/tile/{z}/{y}/{x}",{maxNativeZoom:16,maxZoom:24})]),this._geoq_vector_warm}},{key:"geoq_vector_pincine",get:function(){return this._geoq_vector_pincine||(this._geoq_vector_pincine=[new _.default("https://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}",{maxNativeZoom:16,maxZoom:24})]),this._geoq_vector_pincine}},{key:"mapBox_image",get:function(){return this._mapBox_image||(this._mapBox_image=[w.tileLayer("https://c.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token="+E,{id:"mapbox.satellite",maxNativeZoom:20,maxZoom:24})]),this._mapBox_image}},{key:"mapBox_vector",get:function(){return this._mapBox_vector||(this._mapBox_vector=[w.tileLayer("https://api.mapbox.com/styles/v1/mapbox/{id}/tiles/512/{z}/{x}/{y}?access_token="+E,{id:"streets-v8",maxNativeZoom:20,maxZoom:24})]),this._mapBox_vector}}]),t}();e.default=x},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;nw.a.A(e,t)&&e.push(t)}),e},Mb:function(t,e,n){var r=[];if(t)for(var i=0,o=t.length;ir?n&&t.push(e):n||t.splice(r,1)},Ba:f,extend:u,setPrototypeOf:c,Ab:f?c:u,P:s,Ga:function(t,e,n){if(!t)return t;var r,i={};for(r in t)h.call(t,r)&&(i[r]=e.call(n,t[r],r,t));return i},Tb:function(t){for(;t.firstChild;)w.removeNode(t.firstChild)},Yb:function(t){for(var e=((t=w.a.la(t))[0]&&t[0].ownerDocument||n).createElement("div"),r=0,i=t.length;rm?t.setAttribute("selected",e):t.selected=e},Db:function(e){return null===e||e===t?"":e.trim?e.trim():e.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(t,e){return t=t||"",!(e.length>t.length)&&t.substring(0,e.length)===e},vd:function(t,e){if(t===e)return!0;if(11===t.nodeType)return!1;if(e.contains)return e.contains(1!==t.nodeType?t.parentNode:t);if(e.compareDocumentPosition)return 16==(16&e.compareDocumentPosition(t));for(;t&&t!=e;)t=t.parentNode;return!!t},Sb:function(t){return w.a.vd(t,t.ownerDocument.documentElement)},kd:function(t){return!!w.a.Lb(t,w.a.Sb)},R:function(t){return t&&t.tagName&&t.tagName.toLowerCase()},Ac:function(t){return w.onError?function(){try{return t.apply(this,arguments)}catch(t){throw w.onError&&w.onError(t),t}}:t},setTimeout:function(t){function e(e,n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t,e){return setTimeout(w.a.Ac(t),e)}),Gc:function(t){setTimeout(function(){throw w.onError&&w.onError(t),t},0)},B:function(t,e,n){var r=w.a.Ac(n);if(n=v[e],w.options.useOnlyNativeEvents||n||!o)if(n||"function"!=typeof t.addEventListener){if(void 0===t.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");var i=function(e){r.call(t,e)},a="on"+e;t.attachEvent(a,i),w.a.K.za(t,function(){t.detachEvent(a,i)})}else t.addEventListener(e,r,!1);else y||(y="function"==typeof o(t).on?"on":"bind"),o(t)[y](e,r)},Fb:function(t,r){if(!t||!t.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var i;if(i=!("input"!==w.a.R(t)||!t.type||"click"!=r.toLowerCase()||"checkbox"!=(i=t.type)&&"radio"!=i),w.options.useOnlyNativeEvents||!o||i)if("function"==typeof n.createEvent){if("function"!=typeof t.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");(i=n.createEvent(g[r]||"HTMLEvents")).initEvent(r,!0,!0,e,0,0,0,0,0,!1,!1,!1,!1,0,t),t.dispatchEvent(i)}else if(i&&t.click)t.click();else{if(void 0===t.fireEvent)throw Error("Browser doesn't support triggering events");t.fireEvent("on"+r)}else o(t).trigger(r)},f:function(t){return w.O(t)?t():t},bc:function(t){return w.O(t)?t.v():t},Eb:function(t,e,n){var i;e&&("object"===r(t.classList)?(i=t.classList[n?"add":"remove"],w.a.D(e.match(_),function(e){i.call(t.classList,e)})):"string"==typeof t.className.baseVal?l(t.className,"baseVal",e,n):l(t,"className",e,n))},Bb:function(e,n){var r=w.a.f(n);null!==r&&r!==t||(r="");var i=w.h.firstChild(e);!i||3!=i.nodeType||w.h.nextSibling(i)?w.h.va(e,[e.ownerDocument.createTextNode(r)]):i.data=r,w.a.Ad(e)},Yc:function(t,e){if(t.name=e,7>=m)try{var r=t.name.replace(/[&<>'"]/g,function(t){return"&#"+t.charCodeAt(0)+";"});t.mergeAttributes(n.createElement(""),!1)}catch(t){}},Ad:function(t){9<=m&&(t=1==t.nodeType?t:t.parentNode).style&&(t.style.zoom=t.style.zoom)},wd:function(t){if(m){var e=t.style.width;t.style.width=0,t.style.width=e}},Pd:function(t,e){t=w.a.f(t),e=w.a.f(e);for(var n=[],r=t;r<=e;r++)n.push(r);return n},la:function(t){for(var e=[],n=0,r=t.length;n",""],tbody:y,tfoot:y,tr:[2,"","
"],td:v=[3,"","
"],th:v,option:m=[1,""],optgroup:m},b=8>=w.a.W,w.a.ua=function(t,r){var i;if(o){if(o.parseHTML)i=o.parseHTML(t,r)||[];else if((i=o.clean([t],r))&&i[0]){for(var a=i[0];a.parentNode&&11!==a.parentNode.nodeType;)a=a.parentNode;a.parentNode&&a.parentNode.removeChild(a)}}else{(i=r)||(i=n),a=i.parentWindow||i.defaultView||e;var s,u=w.a.Db(t).toLowerCase(),c=i.createElement("div");for(s=(u=u.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&_[u[1]]||g,u=s[0],s="ignored
"+s[1]+t+s[2]+"
","function"==typeof a.innerShiv?c.appendChild(a.innerShiv(s)):(b&&i.body.appendChild(c),c.innerHTML=s,b&&c.parentNode.removeChild(c));u--;)c=c.lastChild;i=w.a.la(c.lastChild.childNodes)}return i},w.a.Md=function(t,e){var n=w.a.ua(t,e);return n.length&&n[0].parentElement||w.a.Yb(n)},w.a.fc=function(e,n){if(w.a.Tb(e),null!==(n=w.a.f(n))&&n!==t)if("string"!=typeof n&&(n=n.toString()),o)o(e).html(n);else for(var r=w.a.ua(n,e.ownerDocument),i=0;ie){if(5e3<=++n){s=o,w.a.Gc(Error("'Too much recursion' after processing "+n+" task groups."));break}e=o}try{t()}catch(t){w.a.Gc(t)}}}function r(){t(),s=o=i.length=0}var i=[],o=0,a=1,s=0;return{scheduler:e.MutationObserver?function(t){var e=n.createElement("div");return new MutationObserver(t).observe(e,{attributes:!0}),function(){e.classList.toggle("foo")}}(r):n&&"onreadystatechange"in n.createElement("script")?function(t){var e=n.createElement("script");e.onreadystatechange=function(){e.onreadystatechange=null,n.documentElement.removeChild(e),e=null,t()},n.documentElement.appendChild(e)}:function(t){setTimeout(t,0)},zb:function(t){return o||w.na.scheduler(r),i[o++]=t,a++},cancel:function(t){(t-=a-o)>=s&&tn[0]?o+n[0]:n[0]),o),o=1===a?o:Math.min(e+(n[1]||0),o),a=e+a-2,s=Math.max(o,a);for(var h=[],f=[],p=2;ee;e++)t=t();return t})},w.toJSON=function(t,e,n){return t=w.ad(t),w.a.hc(t,e,n)},n.prototype={constructor:n,save:function(t,e){var n=w.a.A(this.keys,t);0<=n?this.values[n]=e:(this.keys.push(t),this.values.push(e))},get:function(e){return 0<=(e=w.a.A(this.keys,e))?this.values[e]:t}}}(),w.b("toJS",w.ad),w.b("toJSON",w.toJSON),w.Wd=function(t,e,n){function r(e){var r=w.xb(t,n).extend({ma:"always"}),i=r.subscribe(function(t){t&&(i.s(),e(t))});return r.notifySubscribers(r.v()),i}return"function"!=typeof Promise||e?r(e.bind(n)):new Promise(r)},w.b("when",w.Wd),w.w={M:function(e){switch(w.a.R(e)){case"option":return!0===e.__ko__hasDomDataOptionValue__?w.a.g.get(e,w.c.options.$b):7>=w.a.W?e.getAttributeNode("value")&&e.getAttributeNode("value").specified?e.value:e.text:e.value;case"select":return 0<=e.selectedIndex?w.w.M(e.options[e.selectedIndex]):t;default:return e.value}},cb:function(e,n,r){switch(w.a.R(e)){case"option":"string"==typeof n?(w.a.g.set(e,w.c.options.$b,t),"__ko__hasDomDataOptionValue__"in e&&delete e.__ko__hasDomDataOptionValue__,e.value=n):(w.a.g.set(e,w.c.options.$b,n),e.__ko__hasDomDataOptionValue__=!0,e.value="number"==typeof n?n:"");break;case"select":""!==n&&null!==n||(n=t);for(var i,o=-1,a=0,s=e.options.length;a=u){n.push(e&&s.length?{key:e,value:s.join("")}:{unknown:e||s.join("")}),e=u=0,s=[];continue}}else if(58===h){if(!u&&!e&&1===s.length){e=s.pop();continue}}else{if(47===h&&1arguments.length){if(!(r=n.body))throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!r||1!==r.nodeType&&8!==r.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");p(g(t,i),r)},w.Dc=function(e){return!e||1!==e.nodeType&&8!==e.nodeType?t:w.Td(e)},w.Ec=function(e){return(e=w.Dc(e))?e.$data:t},w.b("bindingHandlers",w.c),w.b("bindingEvent",w.i),w.b("bindingEvent.subscribe",w.i.subscribe),w.b("bindingEvent.startPossiblyAsyncContentBinding",w.i.Cb),w.b("applyBindings",w.vc),w.b("applyBindingsToDescendants",w.Oa),w.b("applyBindingAccessorsToNode",w.ib),w.b("applyBindingsToNode",w.ld),w.b("contextFor",w.Dc),w.b("dataFor",w.Ec)}(),function(t){function e(e,r){var a,s=Object.prototype.hasOwnProperty.call(i,e)?i[e]:t;s?s.subscribe(r):((s=i[e]=new w.T).subscribe(r),n(e,function(t,n){var r=!(!n||!n.synchronous);o[e]={definition:t,Gd:r},delete i[e],a||r?s.notifySubscribers(t):w.na.zb(function(){s.notifySubscribers(t)})}),a=!0)}function n(t,e){r("getConfig",[t],function(n){n?r("loadComponent",[t,n],function(t){e(t,n)}):e(null,null)})}function r(e,n,i,o){o||(o=w.j.loaders.slice(0));var a=o.shift();if(a){var s=a[e];if(s){var u=!1;if(s.apply(a,n.concat(function(t){u?i(null):null!==t?i(t):r(e,n,i,o)}))!==t&&(u=!0,!a.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else r(e,n,i,o)}else i(null)}var i={},o={};w.j={get:function(n,r){var i=Object.prototype.hasOwnProperty.call(o,n)?o[n]:t;i?i.Gd?w.u.G(function(){r(i.definition)}):w.na.zb(function(){r(i.definition)}):e(n,r)},Bc:function(t){delete o[t]},oc:r},w.j.loaders=[],w.b("components",w.j),w.b("components.get",w.j.get),w.b("components.clearCachedDefinition",w.j.Bc)}(),function(){function t(t,e,n,r){function i(){0==--s&&r(o)}var o={},s=2,u=n.template;n=n.viewModel,u?a(e,u,function(e){w.j.oc("loadTemplate",[t,e],function(t){o.template=t,i()})}):i(),n?a(e,n,function(e){w.j.oc("loadViewModel",[t,e],function(t){o[l]=t,i()})}):i()}function i(t){switch(w.a.R(t)){case"script":return w.a.ua(t.text);case"textarea":return w.a.ua(t.value);case"template":if(o(t.content))return w.a.Ca(t.content.childNodes)}return w.a.Ca(t.childNodes)}function o(t){return e.DocumentFragment?t instanceof DocumentFragment:t&&11===t.nodeType}function a(t,n,i){"string"==typeof n.require?u||e.require?(u||e.require)([n.require],function(t){t&&"object"===(void 0===t?"undefined":r(t))&&t.Xd&&t.default&&(t=t.default),i(t)}):t("Uses require, but no AMD loader is present"):i(n)}function s(t){return function(e){throw Error("Component '"+t+"': "+e)}}var c={};w.j.register=function(t,e){if(!e)throw Error("Invalid configuration for "+t);if(w.j.tb(t))throw Error("Component "+t+" is already registered");c[t]=e},w.j.tb=function(t){return Object.prototype.hasOwnProperty.call(c,t)},w.j.unregister=function(t){delete c[t],w.j.Bc(t)},w.j.Fc={getConfig:function(t,e){e(w.j.tb(t)?c[t]:null)},loadComponent:function(e,n,r){var i=s(e);a(i,n,function(n){t(e,i,n,r)})},loadTemplate:function(t,r,a){if(t=s(t),"string"==typeof r)a(w.a.ua(r));else if(r instanceof Array)a(r);else if(o(r))a(w.a.la(r.childNodes));else if(r.element)if(r=r.element,e.HTMLElement?r instanceof HTMLElement:r&&r.tagName&&1===r.nodeType)a(i(r));else if("string"==typeof r){var u=n.getElementById(r);u?a(i(u)):t("Cannot find element with ID "+r)}else t("Unknown element type: "+r);else t("Unknown template value: "+r)},loadViewModel:function(t,e,n){!function t(e,n,r){if("function"==typeof n)r(function(t){return new n(t)});else if("function"==typeof n[l])r(n[l]);else if("instance"in n){var i=n.instance;r(function(){return i})}else"viewModel"in n?t(e,n.viewModel,r):e("Unknown viewModel value: "+n)}(s(t),e,n)}};var l="createViewModel";w.b("components.register",w.j.register),w.b("components.isRegistered",w.j.tb),w.b("components.unregister",w.j.unregister),w.b("components.defaultLoader",w.j.Fc),w.j.loaders.push(w.j.Fc),w.j.dd=c}(),function(){function t(t,n){if(r=t.getAttribute("params")){var r=e.parseBindingsString(r,n,t,{valueAccessors:!0,bindingParams:!0}),i=(r=w.a.Ga(r,function(e){return w.o(e,null,{l:t})}),w.a.Ga(r,function(e){var n=e.v();return e.ja()?w.o({read:function(){return w.a.f(e())},write:w.Za(n)&&function(t){e()(t)},l:t}):n}));return Object.prototype.hasOwnProperty.call(i,"$raw")||(i.$raw=r),i}return{$raw:{}}}w.j.getComponentNameForNode=function(t){var e=w.a.R(t);if(w.j.tb(e)&&(-1!=e.indexOf("-")||"[object HTMLUnknownElement]"==""+t||8>=w.a.W&&t.tagName===e))return e},w.j.tc=function(e,n,r,i){if(1===n.nodeType){var o=w.j.getComponentNameForNode(n);if(o){if((e=e||{}).component)throw Error('Cannot use the "component" binding on a custom element matching a component');var a={name:o,params:t(n,r)};e.component=i?function(){return a}:a}}return e};var e=new w.ga;9>w.a.W&&(w.j.register=function(t){return function(e){return t.apply(this,arguments)}}(w.j.register),n.createDocumentFragment=function(t){return function(){var e,n=t(),r=w.j.dd;for(e in r);return n}}(n.createDocumentFragment))}(),function(){var t=0;w.c.component={init:function(e,n,r,i,o){function a(){var t=s&&s.dispose;"function"==typeof t&&t.call(s),c&&c.s(),u=s=c=null}var s,u,c,l=w.a.la(w.h.childNodes(e));return w.h.Ea(e),w.a.K.za(e,a),w.o(function(){var r,i,h=w.a.f(n());if("string"==typeof h?r=h:(r=w.a.f(h.name),i=w.a.f(h.params)),!r)throw Error("No component name specified");var f=w.i.Cb(e,o),p=u=++t;w.j.get(r,function(t){if(u===p){if(a(),!t)throw Error("Unknown component '"+r+"'");!function(t,e,n){if(!(e=e.template))throw Error("Component '"+t+"' has no template");t=w.a.Ca(e),w.h.va(n,t)}(r,t,e);var n=function(t,e,n){var r=t.createViewModel;return r?r.call(t,e,n):e}(t,i,{element:e,templateNodes:l});t=f.createChildContext(n,{extend:function(t){t.$component=n,t.$componentTemplateNodes=l}}),n&&n.koDescendantsComplete&&(c=w.i.subscribe(e,w.i.pa,n.koDescendantsComplete,n)),s=n,w.Oa(t,e)}})},null,{l:e}),{controlsDescendantBindings:!0}}},w.h.ea.component=!0}();var A={class:"className",for:"htmlFor"};w.c.attr={update:function(e,n){var r=w.a.f(n())||{};w.a.P(r,function(n,r){r=w.a.f(r);var i=n.indexOf(":"),o=(i="lookupNamespaceURI"in e&&0=w.a.W&&n in A?(n=A[n],o?e.removeAttribute(n):e[n]=r):o||(i?e.setAttributeNS(i,n,r):e.setAttribute(n,r)),"name"===n&&w.a.Yc(e,o?"":r)})}},w.c.checked={after:["value","attr"],init:function(e,n,r){function i(){var i=e.checked,u=o();if(!w.S.Ya()&&(i||!s&&!w.S.qa())){var h=w.u.G(n);if(c){var p=l?h.v():h,d=f;f=u,d!==u?i&&(w.a.Na(p,u,!0),w.a.Na(p,d,!1)):w.a.Na(p,u,i),l&&w.Za(h)&&h(p)}else a&&(u===t?u=i:i||(u=t)),w.m.eb(h,r,"checked",u,!0)}}var o=w.xb(function(){return r.has("checkedValue")?w.a.f(r.get("checkedValue")):h?r.has("value")?w.a.f(r.get("value")):e.value:void 0}),a="checkbox"==e.type,s="radio"==e.type;if(a||s){var u=n(),c=a&&w.a.f(u)instanceof Array,l=!(c&&u.push&&u.splice),h=s||c,f=c?o():t;s&&!e.name&&w.c.uniqueName.init(e,function(){return!0}),w.o(i,null,{l:e}),w.a.B(e,"click",i),w.o(function(){var r=w.a.f(n()),i=o();c?(e.checked=0<=w.a.A(r,i),f=i):e.checked=a&&i===t?!!r:o()===r},null,{l:e}),u=t}}},w.m.wa.checked=!0,w.c.checkedValue={update:function(t,e){t.value=w.a.f(e())}},w.c.class={update:function(t,e){var n=w.a.Db(w.a.f(e()));w.a.Eb(t,t.__ko__cssValue,!1),t.__ko__cssValue=n,w.a.Eb(t,n,!0)}},w.c.css={update:function(t,e){var n=w.a.f(e());null!==n&&"object"==(void 0===n?"undefined":r(n))?w.a.P(n,function(e,n){n=w.a.f(n),w.a.Eb(t,e,n)}):w.c.class.update(t,e)}},w.c.enable={update:function(t,e){var n=w.a.f(e());n&&t.disabled?t.removeAttribute("disabled"):n||t.disabled||(t.disabled=!0)}},w.c.disable={update:function(t,e){w.c.enable.update(t,function(){return!w.a.f(e())})}},w.c.event={init:function(t,e,n,r,i){var o=e()||{};w.a.P(o,function(o){"string"==typeof o&&w.a.B(t,o,function(t){var a,s=e()[o];if(s){try{var u=w.a.la(arguments);r=i.$data,u.unshift(r),a=s.apply(r,u)}finally{!0!==a&&(t.preventDefault?t.preventDefault():t.returnValue=!1)}!1===n.get(o+"Bubble")&&(t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation())}})})}},w.c.foreach={Rc:function(t){return function(){var e=t(),n=w.a.bc(e);return n&&"number"!=typeof n.length?(w.a.f(e),{foreach:n.data,as:n.as,noChildContext:n.noChildContext,includeDestroyed:n.includeDestroyed,afterAdd:n.afterAdd,beforeRemove:n.beforeRemove,afterRender:n.afterRender,beforeMove:n.beforeMove,afterMove:n.afterMove,templateEngine:w.ba.Ma}):{foreach:e,templateEngine:w.ba.Ma}}},init:function(t,e){return w.c.template.init(t,w.c.foreach.Rc(e))},update:function(t,e,n,r,i){return w.c.template.update(t,w.c.foreach.Rc(e),n,r,i)}},w.m.Ra.foreach=!1,w.h.ea.foreach=!0,w.c.hasfocus={init:function(t,e,n){function r(r){t.__ko_hasfocusUpdating=!0;var i=t.ownerDocument;if("activeElement"in i){var o;try{o=i.activeElement}catch(t){o=i.body}r=o===t}i=e(),w.m.eb(i,n,"hasfocus",r,!0),t.__ko_hasfocusLastValue=r,t.__ko_hasfocusUpdating=!1}var i=r.bind(null,!0),o=r.bind(null,!1);w.a.B(t,"focus",i),w.a.B(t,"focusin",i),w.a.B(t,"blur",o),w.a.B(t,"focusout",o),t.__ko_hasfocusLastValue=!1},update:function(t,e){var n=!!w.a.f(e());t.__ko_hasfocusUpdating||t.__ko_hasfocusLastValue===n||(n?t.focus():t.blur(),!n&&t.__ko_hasfocusLastValue&&t.ownerDocument.body.focus(),w.u.G(w.a.Fb,null,[t,n?"focusin":"focusout"]))}},w.m.wa.hasfocus=!0,w.c.hasFocus=w.c.hasfocus,w.m.wa.hasFocus="hasfocus",w.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(t,e){w.a.fc(t,e())}},function(){function t(t,e,n){w.c[t]={init:function(t,r,i,o,a){var s,u,c,l,h,f={};if(e){o=i.get("as");var p=i.get("noChildContext");f={as:o,noChildContext:p,exportDependencies:h=!(o&&p)}}return l=(c="render"==i.get("completeOn"))||i.has(w.i.pa),w.o(function(){var i,o=w.a.f(r()),p=!n!=!o,d=!u;(h||p!==s)&&(l&&(a=w.i.Cb(t,a)),p&&(e&&!h||(f.dataDependency=w.S.o()),i=e?a.createChildContext("function"==typeof o?o:r,f):w.S.qa()?a.extend(null,f):a),d&&w.S.qa()&&(u=w.a.Ca(w.h.childNodes(t),!0)),p?(d||w.h.va(t,w.a.Ca(u)),w.Oa(i,t)):(w.h.Ea(t),c||w.i.ma(t,w.i.H)),s=p)},null,{l:t}),{controlsDescendantBindings:!0}}},w.m.Ra[t]=!1,w.h.ea[t]=!0}t("if"),t("ifnot",!1,!0),t("with",!0)}(),w.c.let={init:function(t,e,n,r,i){return e=i.extend(e),w.Oa(e,t),{controlsDescendantBindings:!0}}},w.h.ea.let=!0;var N={};w.c.options={init:function(t){if("select"!==w.a.R(t))throw Error("options binding applies only to SELECT elements");for(;0o)var c=w.a.g.Z(),l=w.a.g.Z(),h=function(t){var e=this.activeElement;(e=e&&w.a.g.get(e,l))&&e(t)},f=function(t,e){var n=t.ownerDocument;w.a.g.get(n,c)||(w.a.g.set(n,c,!0),w.a.B(n,"selectionchange",h)),w.a.g.set(t,l,e)};w.c.textInput={init:function(e,s,u){function c(t,n){w.a.B(e,t,n)}function l(){p||(d=e.value,p=w.a.setTimeout(h,4))}function h(){clearTimeout(p),d=p=t;var n=e.value;g!==n&&(g=n,w.m.eb(s(),u,"textInput",n))}var p,d,g=e.value,y=9==w.a.W?l:h,v=!1;o&&c("keypress",h),11>o&&c("propertychange",function(t){v||"value"!==t.propertyName||y(t)}),8==o&&(c("keyup",h),c("keydown",h)),f&&(f(e,y),c("dragend",l)),(!o||9<=o)&&c("input",y),5>r&&"textarea"===w.a.R(e)?(c("keydown",l),c("paste",l),c("cut",l)):11>n?c("keydown",l):4>i?(c("DOMAutoComplete",h),c("dragdrop",h),c("drop",h)):a&&"number"===e.type&&c("keydown",l),c("change",h),c("blur",h),w.o(function n(){var r=w.a.f(s());null!==r&&r!==t||(r=""),d!==t&&r===d?w.a.setTimeout(n,4):e.value!==r&&(v=!0,e.value=r,v=!1,g=e.value)},null,{l:e})}},w.m.wa.textInput=!0,w.c.textinput={preprocess:function(t,e,n){n("textInput",t)}}}(),w.c.uniqueName={init:function(t,e){if(e()){var n="ko_unique_"+ ++w.c.uniqueName.rd;w.a.Yc(t,n)}}},w.c.uniqueName.rd=0,w.c.using={init:function(t,e,n,r,i){var o;return n.has("as")&&(o={as:n.get("as"),noChildContext:n.get("noChildContext")}),e=i.createChildContext(e,o),w.Oa(e,t),{controlsDescendantBindings:!0}}},w.h.ea.using=!0,w.c.value={init:function(e,n,r){var i=w.a.R(e),o="input"==i;if(!o||"checkbox"!=e.type&&"radio"!=e.type){var a=[],s=r.get("valueUpdate"),u=!1,c=null;s&&(a="string"==typeof s?[s]:w.a.wc(s),w.a.Pa(a,"change"));var l,h,f=function(){c=null,u=!1;var t=n(),i=w.w.M(e);w.m.eb(t,r,"value",i)};!w.a.W||!o||"text"!=e.type||"off"==e.autocomplete||e.form&&"off"==e.form.autocomplete||-1!=w.a.A(a,"propertychange")||(w.a.B(e,"propertychange",function(){u=!0}),w.a.B(e,"focus",function(){u=!1}),w.a.B(e,"blur",function(){u&&f()})),w.a.D(a,function(t){var n=f;w.a.Ud(t,"after")&&(n=function(){c=w.w.M(e),w.a.setTimeout(f,0)},t=t.substring(5)),w.a.B(e,t,n)}),l=o&&"file"==e.type?function(){var r=w.a.f(n());null===r||r===t||""===r?e.value="":w.u.G(f)}:function(){var o=w.a.f(n()),a=w.w.M(e);null!==c&&o===c?w.a.setTimeout(l,0):o===a&&a!==t||("select"===i?(a=r.get("valueAllowUnset"),w.w.cb(e,o,a),a||o===w.w.M(e)||w.u.G(f)):w.w.cb(e,o))},"select"===i?w.i.subscribe(e,w.i.H,function(){h?r.get("valueAllowUnset")?l():f():(w.a.B(e,"change",f),h=w.o(l,null,{l:e}))},null,{notifyImmediately:!0}):(w.a.B(e,"change",f),w.o(l,null,{l:e}))}else w.ib(e,{checkedValue:n})},update:function(){}},w.m.wa.value=!0,w.c.visible={update:function(t,e){var n=w.a.f(e()),r="none"!=t.style.display;n&&!r?t.style.display="":!n&&r&&(t.style.display="none")}},w.c.hidden={update:function(t,e){w.c.visible.update(t,function(){return!w.a.f(e())})}},function(t){w.c[t]={init:function(e,n,r,i,o){return w.c.event.init.call(this,e,function(){var e={};return e[t]=n(),e},r,i,o)}}}("click"),w.ca=function(){},w.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},w.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},w.ca.prototype.makeTemplateSource=function(t,e){if("string"==typeof t){var r=(e=e||n).getElementById(t);if(!r)throw Error("Cannot find template with ID "+t);return new w.C.F(r)}if(1==t.nodeType||8==t.nodeType)return new w.C.ia(t);throw Error("Unknown template type: "+t)},w.ca.prototype.renderTemplate=function(t,e,n,r){return t=this.makeTemplateSource(t,r),this.renderTemplateSource(t,e,n,r)},w.ca.prototype.isTemplateRewritten=function(t,e){return!1===this.allowTemplateRewriting||this.makeTemplateSource(t,e).data("isRewritten")},w.ca.prototype.rewriteTemplate=function(t,e,n){e=e((t=this.makeTemplateSource(t,n)).text()),t.text(e),t.data("isRewritten",!0)},w.b("templateEngine",w.ca),w.kc=function(){function t(t,e,n,r){t=w.m.ac(t);for(var i=w.m.Ra,o=0;o]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,n=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(t,e,n){e.isTemplateRewritten(t,n)||e.rewriteTemplate(t,function(t){return w.kc.Ld(t,e)},n)},Ld:function(r,i){return r.replace(e,function(e,n,r,o,a){return t(a,n,r,i)}).replace(n,function(e,n){return t(n,"\x3c!-- ko --\x3e","#comment",i)})},md:function(t,e){return w.aa.Xb(function(n,r){var i=n.nextSibling;i&&i.nodeName.toLowerCase()===e&&w.ib(i,t,r)})}}}(),w.b("__tr_ambtns",w.kc.md),function(){w.C={},w.C.F=function(t){if(this.F=t){var e=w.a.R(t);this.ab="script"===e?1:"textarea"===e?2:"template"==e&&t.content&&11===t.content.nodeType?3:4}},w.C.F.prototype.text=function(){var t=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.F[t];var e=arguments[0];"innerHTML"===t?w.a.fc(this.F,e):this.F[t]=e};var e=w.a.g.Z()+"_";w.C.F.prototype.data=function(t){if(1===arguments.length)return w.a.g.get(this.F,e+t);w.a.g.set(this.F,e+t,arguments[1])};var n=w.a.g.Z();w.C.F.prototype.nodes=function(){var e=this.F;if(0==arguments.length){var r=w.a.g.get(e,n)||{},i=r.lb||(3===this.ab?e.content:4===this.ab?e:t);if(!i||r.jd){var o=this.text();o&&o!==r.bb&&(i=w.a.Md(o,e.ownerDocument),w.a.g.set(e,n,{lb:i,bb:o,jd:!0}))}return i}r=arguments[0],this.ab!==t&&this.text(""),w.a.g.set(e,n,{lb:r})},w.C.ia=function(t){this.F=t},w.C.ia.prototype=new w.C.F,w.C.ia.prototype.constructor=w.C.ia,w.C.ia.prototype.text=function(){if(0==arguments.length){var e=w.a.g.get(this.F,n)||{};return e.bb===t&&e.lb&&(e.bb=e.lb.innerHTML),e.bb}w.a.g.set(this.F,n,{bb:arguments[0]})},w.b("templateSources",w.C),w.b("templateSources.domElement",w.C.F),w.b("templateSources.anonymousTemplate",w.C.ia)}(),function(){function e(t,e,n){var r;for(e=w.h.nextSibling(e);t&&(r=t)!==e;)n(r,t=w.h.nextSibling(r))}function n(t,n){if(t.length){var r=t[0],i=t[t.length-1],o=r.parentNode,a=w.ga.instance,s=a.preprocessNode;if(s){if(e(r,i,function(t,e){var n=t.previousSibling,o=s.call(a,t);o&&(t===r&&(r=o[0]||e),t===i&&(i=o[o.length-1]||n))}),t.length=0,!r)return;r===i?t.push(r):(t.push(r,i),w.a.Ua(t,o))}e(r,i,function(t){1!==t.nodeType&&8!==t.nodeType||w.vc(n,t)}),e(r,i,function(t){1!==t.nodeType&&8!==t.nodeType||w.aa.cd(t,[n])}),w.a.Ua(t,o)}}function r(t){return t.nodeType?t:0w.a.W||!t.nodes?null:t.nodes())?w.a.la(e.cloneNode(!0).childNodes):(t=t.text(),w.a.ua(t,r))},w.ba.Ma=new w.ba,w.gc(w.ba.Ma),w.b("nativeTemplateEngine",w.ba),function(){w.$a=function(){var t=this.Hd=function(){if(!o||!o.tmpl)return 0;try{if(0<=o.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(t){}return 1}();this.renderTemplateSource=function(e,r,i,a){if(a=a||n,i=i||{},2>t)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var s=e.data("precompiled");return s||(s=e.text()||"",s=o.template(null,"{{ko_with $item.koBindingContext}}"+s+"{{/ko_with}}"),e.data("precompiled",s)),e=[r.$data],r=o.extend({koBindingContext:r},i.templateOptions),(r=o.tmpl(s,e,r)).appendTo(a.createElement("div")),o.fragments={},r},this.createJavaScriptEvaluatorBlock=function(t){return"{{ko_code ((function() { return "+t+" })()) }}"},this.addTemplate=function(t,e){n.write("