@mapgis/webclient-mapboxgl-plugin 10.3.4 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -124
- package/dist/es5/webclient-common.min.js +90 -0
- package/dist/es5/webclient-mapboxgl-plugin.min.js +1 -0
- package/dist/webclient-mapboxgl-plugin-es6.min.js +1 -0
- package/documention/EchartsLayer.html +379 -0
- package/documention/MapViewMapboxgl.html +3587 -0
- package/documention/Popup.html +1523 -0
- package/documention/Screenshot.html +1089 -0
- package/documention/SketchEditorMapboxgl.html +3383 -0
- package/documention/document_ArcGISVectorTileLayerView.js.html +265 -0
- package/documention/document_EchartsLayerView.js.html +246 -0
- package/documention/document_GraphicsLayerView.js.html +314 -0
- package/documention/document_IGSFeatureLayerView.js.html +218 -0
- package/documention/document_IGSMapImageLayerView.js.html +240 -0
- package/documention/document_IGSTileLayerView.js.html +236 -0
- package/documention/document_IGSVectorTileLayerView.js.html +264 -0
- package/documention/document_MapVLayerView.js.html +247 -0
- package/documention/document_WMSLayerView.js.html +240 -0
- package/documention/document_WMTSLayerView.js.html +234 -0
- package/documention/document_WebTileLayerView.js.html +240 -0
- package/documention/document_support_FeatureRenderView.js.html +682 -0
- package/documention/document_support_MapboxglGraphicsLayer.js.html +1184 -0
- package/documention/document_support_SourceMetaData.js.html +223 -0
- package/documention/document_support_Utils.js.html +624 -0
- package/documention/document_support_mapbox_mapboxCustomUtil.js.html +322 -0
- package/documention/global.html +252 -0
- package/documention/index.html +251 -0
- package/documention/module-%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%8F%AF%E8%A7%86%E5%8C%96.MapvLayer.html +445 -0
- package/documention/scripts/app.min.js +1 -0
- package/documention/scripts/linenumber.js +26 -0
- package/documention/scripts/search.js +45 -0
- package/documention/scripts/sideBar.js +11 -0
- package/documention/sketchEditor_SketchEditorMapboxgl.js.html +875 -0
- package/documention/styles/anchor.png +0 -0
- package/documention/styles/app.min.css +1 -0
- package/documention/styles/c.png +0 -0
- package/documention/styles/iframe.css +29 -0
- package/documention/styles/m.png +0 -0
- package/documention/styles/prettify-jsdoc.css +111 -0
- package/documention/styles/prettify-tomorrow.css +132 -0
- package/documention/styles/reset.css +44 -0
- package/documention/styles/up-arrow.png +0 -0
- package/documention/tutorial-1./345/277/253/351/200/237/345/205/245/351/227/250.html +165 -0
- package/documention/util_ConvertRendererToStyleLayerUtil.js.html +844 -0
- package/documention/util_MapboxglFeatureRender.js.html +225 -0
- package/documention/util_MapboxglPlugin.js.html +284 -0
- package/documention/view_MapViewMapboxgl.js.html +1882 -0
- package/documention/view_utils_ArcGISVectorTileLayerUtil.js.html +382 -0
- package/documention/view_utils_EchartsLayerUtil.js.html +194 -0
- package/documention/view_utils_IGSMapImageUtil.js.html +373 -0
- package/documention/view_utils_IGSTileLayerUtil.js.html +285 -0
- package/documention/view_utils_IGSVectorTileLayerUtil.js.html +379 -0
- package/documention/view_utils_MapVLayerUtil.js.html +197 -0
- package/documention/view_utils_Popup.js.html +525 -0
- package/documention/view_utils_Screenshot.js.html +320 -0
- package/documention/view_utils_WMSLayerUtil.js.html +337 -0
- package/documention/view_utils_WMTSLayerUtil.js.html +331 -0
- package/documention/view_utils_WebTileLayerUtil.js.html +284 -0
- package/documention/view_utils_echarts_EchartsLayerPlugin.js.html +419 -0
- package/documention/view_utils_mapV_MapVLayerPlugin.js.html +527 -0
- package/documention/view_utils_mapV_MapvBaseLayer.js.html +477 -0
- package/documention/view_utils_support_rasterLayerUtil.js.html +244 -0
- package/documention/view_utils_support_vectorLayerUtil.js.html +503 -0
- package/package.json +20 -20
- package/core/Base.js +0 -15
- package/core/index.js +0 -5
- package/index.js +0 -6
- package/overlay/D3Layer.js +0 -108
- package/overlay/EchartsLayer.js +0 -242
- package/overlay/ElsCubeLayer.js +0 -125
- package/overlay/MapvLayer.js +0 -296
- package/overlay/StreamLayer.js +0 -83
- package/overlay/TimeSpaceCubeLayer.js +0 -135
- package/overlay/dthree/mapbox-d3.css +0 -9
- package/overlay/echarts/MapCoordSys.js +0 -105
- package/overlay/echarts/MapModel.js +0 -0
- package/overlay/echarts/MapView.js +0 -0
- package/overlay/echarts/index.js +0 -4
- package/overlay/index.js +0 -31
- package/overlay/mapv/MapvBaseLayer.js +0 -299
- package/overlay/mapv/index.js +0 -5
- package/overlay/stream/GeojsonStreamLayer.js +0 -135
- package/overlay/stream/MapvStreamLayer.js +0 -79
- package/overlay/stream/index.js +0 -3
- package/overlay/stream/popup.css +0 -31
- package/service/index.js +0 -1
- package/service/socket/ISocketService.js +0 -121
- package/service/socket/SocketEvent.js +0 -50
- package/service/socket/SocketService.js +0 -90
- package/util/Evented.js +0 -295
- package/util/Util.js +0 -348
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=57)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allSettled=t.inOrderPromise=t.debouncePromise=t.throttle=t.convertImageSourceToBase64=t.isWMSReverse=t.getProjectionSrs=t.inputCss=t.getBaseUrl=t.toJSON=t.VideoPixelCoordTransforms=t.GDALComposeGeoTransforms=t.GDALGCPsToGeoTransform=t.GDALInvGeoTransform=t.GDALApplyGeoTransform=t.getVideoType=t.isObject=t.notNULL=t.cloneObject=t.returnPoint=t.formatPoints=t.newGuid=t.extendDeep=t.isBoolean=t.deepClone=t.isString=t.Log=t.getOutStatisticsParameter=t.getGeometryParameter=t.isNull=t.createGeometry=t.normalize=t.defined=t.defaultValue=t.getGUID=t.bind=t.getParameterString=t.urlAppend=t.transformResult=t.isInTheSameDomain=t.isNumber=t.isArray=t.extend=void 0;var n=r(10),i=r(282),o=r(283),a=r(45),s=r(119),u=c(r(284)),l=c(r(37));function c(e){return e&&e.__esModule?e:{default:e}}t.extend=n.extend,t.isArray=n.isArray,t.isNumber=n.isNumber,t.isInTheSameDomain=n.isInTheSameDomain,t.transformResult=n.transformResult,t.urlAppend=n.urlAppend,t.getParameterString=n.getParameterString,t.bind=n.bind,t.getGUID=n.getGUID,t.defaultValue=n.defaultValue,t.defined=n.defined,t.normalize=i.normalize,t.createGeometry=o.createGeometry,t.isNull=n.isNull,t.getGeometryParameter=n.getGeometryParameter,t.getOutStatisticsParameter=n.getOutStatisticsParameter,t.Log=l.default,t.isString=n.isString,t.deepClone=n.deepClone,t.isBoolean=n.isBoolean,t.extendDeep=n.extendDeep,t.newGuid=n.newGuid,t.formatPoints=n.formatPoints,t.returnPoint=n.returnPoint,t.cloneObject=n.cloneObject,t.notNULL=n.notNULL,t.isObject=n.isObject,t.getVideoType=n.getVideoType,t.GDALApplyGeoTransform=s.GDALApplyGeoTransform,t.GDALInvGeoTransform=s.GDALInvGeoTransform,t.GDALGCPsToGeoTransform=s.GDALGCPsToGeoTransform,t.GDALComposeGeoTransforms=s.GDALComposeGeoTransforms,t.VideoPixelCoordTransforms=u.default,t.toJSON=n.toJSON,t.getBaseUrl=n.getBaseUrl,t.inputCss=n.inputCss,t.getProjectionSrs=n.getProjectionSrs,t.isWMSReverse=n.isWMSReverse,t.convertImageSourceToBase64=n.convertImageSourceToBase64,t.throttle=n.throttle,t.debouncePromise=a.debouncePromise,t.inOrderPromise=a.inOrderPromise,t.allSettled=a.allSettled},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpatialRelation=t.SceneSubLayerType=t.AreaUnits=t.LinearUnits=t.LineMarkerStyle=t.LineMarkerPlacement=t.LineJoinType=t.LineCapType=t.Symbol3DLayerType=t.WMTSCorporation=t.FeatureRender=t.RadiusUnit=t.EPSG=t.Font=t.UrlServerType=t.Projection=t.ShadowMode=t.SceneMode=t.ElevationInfo=t.VideoRegistrationParam=t.VideoMetaData=t.WMTSStyle=t.TileMatrixSet=t.SketchEditorToolEventType=t.SketchEditorState=t.SketchEditorEventType=t.SketchEditMode=t.SketchDataType=t.VideoSourceType=t.ViewEventType=t.ProjectInfoBySrsID=t.ProjectInfo=t.getFeaturesFromFeatureSet=t.FeatureSet=t.Feature=t.OutStatistic=t.ErrorEvent=t.LayerEvent=t.Color=t.Event=t.Evented=t.CollectionFlattener=t.Collection=t.Zondy=void 0;var n=w(r(2)),i=r(24),o=w(r(46)),a=w(r(83)),s=w(r(291)),u=w(r(19)),l=w(r(84)),c=w(r(85)),f=w(r(292)),h=w(r(293)),p=w(r(294)),d=r(3),y=w(r(120)),g=w(r(295)),v=w(r(296)),m=w(r(47)),_=w(r(332)),b=w(r(134)),S=r(86),x=w(r(88));function w(e){return e&&e.__esModule?e:{default:e}}t.Zondy=n.default,t.Collection=a.default,t.CollectionFlattener=s.default,t.Evented=o.default,t.Event=i.Event,t.Color=u.default,t.LayerEvent=i.LayerEvent,t.ErrorEvent=i.ErrorEvent,t.OutStatistic=f.default,t.Feature=S.Feature,t.FeatureSet=S.FeatureSet,t.getFeaturesFromFeatureSet=S.getFeaturesFromFeatureSet,t.ProjectInfo=h.default,t.ProjectInfoBySrsID=p.default,t.ViewEventType=d.ViewEventType,t.VideoSourceType=d.VideoSourceType,t.SketchDataType=d.SketchDataType,t.SketchEditMode=d.SketchEditMode,t.SketchEditorEventType=d.SketchEditorEventType,t.SketchEditorState=d.SketchEditorState,t.SketchEditorToolEventType=d.SketchEditorToolEventType,t.TileMatrixSet=y.default,t.WMTSStyle=g.default,t.VideoMetaData=_.default,t.VideoRegistrationParam=b.default,t.ElevationInfo=v.default,t.SceneMode=d.SceneMode,t.ShadowMode=d.ShadowMode,t.Projection=m.default,t.UrlServerType=d.UrlServerType,t.Font=l.default,t.EPSG=c.default,t.RadiusUnit=d.RadiusUnit,t.FeatureRender=x.default,t.WMTSCorporation=d.WMTSCorporation,t.Symbol3DLayerType=d.Symbol3DLayerType,t.LineCapType=d.LineCapType,t.LineJoinType=d.LineJoinType,t.LineMarkerPlacement=d.LineMarkerPlacement,t.LineMarkerStyle=d.LineMarkerStyle,t.LinearUnits=d.LinearUnits,t.AreaUnits=d.AreaUnits,t.SceneSubLayerType=d.SceneSubLayerType,t.SpatialRelation=d.SpatialRelation},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),window.Zondy=window.Zondy||{};var n=window.Zondy;n.Service=n.Service||{},n.Geometry=n.Geometry||{},n.Layer=n.Layer||{},n.ThemeLayer=n.ThemeLayer||{},n.Enum=n.Enum||{},n.Symbol=n.Symbol||{},n.Widget=n.Widget||{},n.Renderer=n.Renderer||{},n.Renderer.VisualVariable=n.Renderer.VisualVariable||{},n.Tool=n.Tool||{},n.Object=n.Object||{},n.Utils=n.Utils||{},n.Object.Theme=n.Object.Theme||{},n.LogType=n.LogType||"warningAndError",n.Version="17.0.0",t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TileSliceType=t.ColorNameToHexMap=t.SceneSubLayerType=t.AreaUnits=t.LinearUnits=t.MaterialType=t.WaveStrength=t.WaterbodySize=t.PatternStyle=t.ProfileType=t.AnchorType=t.LinePatternStyle=t.LineMarkerStyle=t.LineMarkerPlacement=t.LineJoinType=t.LineCapType=t.Symbol3DLayerType=t.WMTSCorporation=t.RadiusUnit=t.PictureFormat=t.UrlServerType=t.ShadowMode=t.SceneMode=t.VerticalAlignment=t.HorizontalAlignment=t.ElevationMode=t.IGSSymbolType=t.SymbolType=t.IGSRendererType=t.SketchEditorToolEventType=t.SketchEditorState=t.SketchEditorEventType=t.SketchEditMode=t.SketchDataType=t.VideoSourceType=t.VectorTileGeometryType=t.RendererType=t.AngleUnit=t.LengthUnit=t.ViewEventType=t.LoadStatus=t.LogType=t.IGSGeometryType=t.TokenAttachType=t.LayerType=t.GeometryType=t.SpatialRelation=t.StatisticType=t.MapEventType=t.LayerEventType=t.FetchMethod=t.ReturnFormat=void 0;var n=te(r(241)),i=te(r(242)),o=te(r(243)),a=te(r(244)),s=te(r(245)),u=te(r(246)),l=te(r(66)),c=te(r(247)),f=te(r(248)),h=te(r(249)),p=te(r(250)),d=te(r(251)),y=te(r(252)),g=te(r(253)),v=te(r(254)),m=te(r(255)),_=te(r(256)),b=te(r(114)),S=te(r(257)),x=te(r(258)),w=te(r(259)),O=te(r(260)),P=te(r(261)),E=te(r(262)),k=te(r(78)),T=te(r(263)),M=te(r(264)),I=te(r(79)),L=te(r(80)),C=te(r(265)),N=te(r(266)),R=te(r(267)),j=te(r(268)),G=te(r(269)),V=te(r(270)),A=te(r(271)),D=te(r(81)),F=te(r(82)),B=te(r(272)),q=te(r(273)),J=te(r(274)),U=te(r(275)),z=te(r(276)),W=te(r(115)),H=te(r(116)),X=te(r(117)),Z=te(r(277)),Y=te(r(278)),K=te(r(279)),Q=te(r(280)),$=te(r(118)),ee=te(r(281));function te(e){return e&&e.__esModule?e:{default:e}}t.ReturnFormat=n.default,t.FetchMethod=i.default,t.LayerEventType=o.default,t.MapEventType=a.default,t.StatisticType=s.default,t.SpatialRelation=u.default,t.GeometryType=l.default,t.LayerType=c.default,t.TokenAttachType=f.default,t.IGSGeometryType=h.default,t.LogType=p.default,t.LoadStatus=d.default,t.ViewEventType=y.default,t.LengthUnit=g.default,t.AngleUnit=v.default,t.RendererType=m.default,t.VectorTileGeometryType=_.default,t.VideoSourceType=b.default,t.SketchDataType=S.default,t.SketchEditMode=x.default,t.SketchEditorEventType=w.default,t.SketchEditorState=O.default,t.SketchEditorToolEventType=P.default,t.IGSRendererType=E.default,t.SymbolType=k.default,t.IGSSymbolType=T.default,t.ElevationMode=M.default,t.HorizontalAlignment=I.default,t.VerticalAlignment=L.default,t.SceneMode=C.default,t.ShadowMode=N.default,t.UrlServerType=R.default,t.PictureFormat=j.default,t.RadiusUnit=G.default,t.WMTSCorporation=V.default,t.Symbol3DLayerType=A.default,t.LineCapType=D.default,t.LineJoinType=F.default,t.LineMarkerPlacement=B.default,t.LineMarkerStyle=q.default,t.LinePatternStyle=J.default,t.AnchorType=U.default,t.ProfileType=z.default,t.PatternStyle=W.default,t.WaterbodySize=H.default,t.WaveStrength=X.default,t.MaterialType=Z.default,t.LinearUnits=Y.default,t.AreaUnits=K.default,t.SceneSubLayerType=Q.default,t.ColorNameToHexMap=$.default,t.TileSliceType=ee.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editGeometryByArc3=t.editFeatureByArc3=t.GeometryEngine=t.createGeometry=t.SpatialReference=t.MultiLineString=t.MultiPolygon=t.Circle=t.MultiPoint=t.Point=t.LineString=t.Polygon=t.Extent=t.Geometry=void 0;var n=y(r(13)),i=y(r(33)),o=y(r(49)),a=y(r(129)),s=y(r(20)),u=y(r(131)),l=y(r(132)),c=y(r(130)),f=y(r(133)),h=y(r(32)),p=r(26),d=y(r(38));function y(e){return e&&e.__esModule?e:{default:e}}t.Geometry=n.default,t.Extent=i.default,t.Polygon=o.default,t.LineString=a.default,t.Point=s.default,t.MultiPoint=u.default,t.Circle=l.default,t.MultiPolygon=c.default,t.MultiLineString=f.default,t.SpatialReference=h.default,t.createGeometry=p.createGeometry,t.GeometryEngine=d.default,t.editFeatureByArc3=p.editFeatureByArc3,t.editGeometryByArc3=p.editGeometryByArc3},function(e,t,r){"use strict";r.r(t),r.d(t,"PJD_3PARAM",function(){return n}),r.d(t,"PJD_7PARAM",function(){return i}),r.d(t,"PJD_GRIDSHIFT",function(){return o}),r.d(t,"PJD_WGS84",function(){return a}),r.d(t,"PJD_NODATUM",function(){return s}),r.d(t,"SRS_WGS84_SEMIMAJOR",function(){return u}),r.d(t,"SRS_WGS84_SEMIMINOR",function(){return l}),r.d(t,"SRS_WGS84_ESQUARED",function(){return c}),r.d(t,"SEC_TO_RAD",function(){return f}),r.d(t,"HALF_PI",function(){return h}),r.d(t,"SIXTH",function(){return p}),r.d(t,"RA4",function(){return d}),r.d(t,"RA6",function(){return y}),r.d(t,"EPSLN",function(){return g}),r.d(t,"D2R",function(){return v}),r.d(t,"R2D",function(){return m}),r.d(t,"FORTPI",function(){return _}),r.d(t,"TWO_PI",function(){return b}),r.d(t,"SPI",function(){return S});var n=1,i=2,o=3,a=4,s=5,u=6378137,l=6356752.314,c=.0066943799901413165,f=484813681109536e-20,h=Math.PI/2,p=.16666666666666666,d=.04722222222222222,y=.022156084656084655,g=1e-10,v=.017453292519943295,m=57.29577951308232,_=Math.PI/4,b=2*Math.PI,S=3.14159265359},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(0),a=r(3),s=f(r(89)),u=f(r(90)),l=f(r(135)),c=r(50);function f(e){return e&&e.__esModule?e:{default:e}}var h=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.url=(0,o.defaultValue)(t.url,"");var r=(0,c.formatBaseUrl)(this.url);this._url=r.baseUrl,this._paramString=r.paramString?r.paramString+"&":"",this.enableGlobeFetch=(0,o.defaultValue)(t.enableGlobeFetch,!0),this.clientId=(0,o.defaultValue)(t.clientId,(0,o.getGUID)()),this._requestInterceptor=(0,o.defaultValue)(t.requestInterceptor,new s.default),this._responseInterceptor=(0,o.defaultValue)(t.responseInterceptor,new u.default),this._requestTimeout=(0,o.defaultValue)(t.requestTimeout,45e3),this._headers=(0,o.defaultValue)(t.headers,void 0),this._tokenKey=(0,o.defaultValue)(t.tokenKey,"token"),this._tokenValue=(0,o.defaultValue)(t.tokenValue,void 0),this._tokenAttachType=(0,o.defaultValue)(t.tokenAttachType,a.TokenAttachType.url),this._fetchService=void 0,this.enableGlobeFetch?this._globeOptions={requestInterceptor:this._requestInterceptor,responseInterceptor:this._responseInterceptor,requestTimeout:this._requestTimeout,headers:this._headers,tokenKey:this._tokenKey,tokenValue:this._tokenValue,tokenAttachType:this._tokenAttachType,fetchService:this._fetchService}:this._privateOptions={requestInterceptor:this._requestInterceptor,responseInterceptor:this._responseInterceptor,requestTimeout:this._requestTimeout,headers:this._headers,tokenKey:this._tokenKey,tokenValue:this._tokenValue,tokenAttachType:this._tokenAttachType,fetchService:this._fetchService},this._initFetch()}return n(e,[{key:"queryServerInfo",value:function(e){var t=this;return this._querySimpleInfo(e,function(e){return e.indexOf("/igs/rest/mrcs/docs/")>-1?e.replace("mrcs/docs","mrms/info")+"?f=json":e.indexOf("/igs/rest/mrms/docs/")>-1?e.replace("docs","info")+"?f=json":e.indexOf("/igs/rest/mrms/tile/")>-1?e.replace("tile","info")+"?f=json":e.indexOf("/igs/rest/g3d/")>-1?e+"/GetDocInfo":e+"?f=json"+t._paramString})}},{key:"_initFetch",value:function(){return this.enableGlobeFetch&&!i.Zondy.Service._fetchService?this._globeOptions?i.Zondy.Service._fetchService=new l.default("",this._globeOptions):i.Zondy.Service._fetchService=new l.default("",{}):this.enableGlobeFetch||this._fetchService||(this._privateOptions?this._fetchService=new l.default("",this._privateOptions):this._fetchService=new l.default("",{})),this.enableGlobeFetch?i.Zondy.Service._fetchService:this._fetchService}},{key:"_getFetch",value:function(){var e=this.enableGlobeFetch?i.Zondy.Service._fetchService:this._fetchService;return e||(e=this._initFetch()),e}},{key:"_getRequest",value:function(e,t){o.Log.info("请求链接:",e),o.Log.info("请求参数:",t);var r=(0,o.defaultValue)(t.success,void 0),n=(0,o.defaultValue)(t.failure,void 0);return this._getFetch().request({url:e,extendOptions:t,method:"GET",success:function(e){e&&r&&r(e)},failure:function(e){n&&n(e)}})}},{key:"_postRequest",value:function(e,t){return this._sendBodyRequest("POST",e,t)}},{key:"_deleteRequest",value:function(e,t){return this._sendBodyRequest("DELETE",e,t)}},{key:"_putRequest",value:function(e,t){return this._sendBodyRequest("PUT",e,t)}},{key:"_patchRequest",value:function(e,t){return this._sendBodyRequest("PATCH",e,t)}},{key:"_sendBodyRequest",value:function(e,t,r){var n=(0,o.defaultValue)(r.success,void 0),i=(0,o.defaultValue)(r.failure,void 0),s=(0,o.defaultValue)(r.data,{}),u=(0,o.defaultValue)(r.headers,void 0),l=(0,o.defaultValue)(r.responseType,void 0),c=(0,o.defaultValue)(r.tokenAttachType,a.TokenAttachType.url);return this._getFetch().request({url:t,method:e,data:s,headers:u,responseType:l,tokenAttachType:c,success:function(e){e&&n&&n(e)},failure:function(e){i&&i(e)}})}},{key:"_setFetchValue",value:function(e,t){this.enableGlobeFetch&&i.Zondy.Service._fetchService?i.Zondy.Service._fetchService[e]=t:this.enableGlobeFetch||(i.Zondy.Service._fetchService[e]=t)}},{key:"_checkAndRequest",value:function(e,t,r){if(r=(0,o.defaultValue)(r,{}),!e.isChecked)return this.requestInterceptor&&this.requestInterceptor.failure&&this.requestInterceptor.failure instanceof Function&&this.requestInterceptor.failure({succeed:!1,msg:e.errorMessage,errorType:e.errorType,data:void 0}),r.failure&&r.failure instanceof Function&&r.failure({succeed:!1,msg:e.errorMessage,errorType:e.errorType,data:void 0}),Promise.reject({succeed:!1,msg:e.errorMessage,data:void 0,errorType:e.errorType});switch((0,o.defaultValue)(r.method,a.FetchMethod.get)){case a.FetchMethod.get:return this._getRequest(t+e.queryString,r);case a.FetchMethod.post:var n=(0,o.deepClone)(r);return n.data=e.queryString,this._postRequest(t,n);case a.FetchMethod.delete:var i=(0,o.deepClone)(r);return i.data=e.queryString,this._deleteRequest(t,i);case a.FetchMethod.put:var s=(0,o.deepClone)(r);return s.data=e.queryString,this._putRequest(t,s);default:return this._getRequest(t+e.queryString,r)}}},{key:"_checkPathParameters",value:function(e,t){t=(0,o.defaultValue)(t,{layerId:{type:"String"}});var r=(0,c.checkPathParameters)(t,e);return r.isChecked?{succeed:!0}:(this.requestInterceptor&&this.requestInterceptor.failure&&this.requestInterceptor.failure instanceof Function&&this.requestInterceptor.failure({succeed:!1,msg:r.errorMessage,errorType:r.errorType,data:void 0}),{succeed:!1,msg:r.errorMessage,errorType:r.errorType})}},{key:"_querySimpleInfo",value:function(e,t){if(e=(0,o.defaultValue)(e,{}),t&&t instanceof Function){var r=t(this._url)+this._paramString;return e.method=a.FetchMethod.get,o.Log.info("发起请求,基地址为:",r),this._checkAndRequest({isChecked:!0,errorMessage:"",errorType:"",queryString:""},r,e)}return!1}},{key:"_queryInfoByLayerId",value:function(e,t){e=(0,o.defaultValue)(e,{});var r=this._checkPathParameters(e);if(!r.succeed)return e.failure&&e.failure instanceof Function&&e.failure({succeed:!1,msg:r.msg,data:void 0}),Promise.reject({succeed:!1,msg:r.msg,data:void 0});if(t&&t instanceof Function){var n=t(this._url,e);return e.method=a.FetchMethod.get,o.Log.info("发起请求,基地址为:",n),this._checkAndRequest({isChecked:!0,errorMessage:"",errorType:"",queryString:""},n,e)}}},{key:"_queryByParameters",value:function(e,t,r,n){e=(0,o.defaultValue)(e,{});var i=this._checkPathParameters(e,t);if(!i.succeed)return e.failure&&e.failure instanceof Function&&e.failure({succeed:!1,msg:i.msg,data:void 0,errorType:i.errorType}),Promise.reject({succeed:!1,msg:i.msg,data:void 0,errorType:i.errorType});if(n&&n instanceof Function){var a=n(this._url,e);return o.Log.info("发起请求,基地址为:",a),this._checkAndRequest((0,c.checkParam)(e,r),a,e)}}}]),e}();Object.defineProperties(h.prototype,{requestInterceptor:{configurable:!1,get:function(){return this._requestInterceptor},set:function(e){this._setFetchValue("requestInterceptor",e),this._requestInterceptor=e}},responseInterceptor:{configurable:!1,get:function(){return this._responseInterceptor},set:function(e){this._setFetchValue("responseInterceptor",e),this._responseInterceptor=e}},requestTimeout:{configurable:!1,get:function(){return this._requestTimeout},set:function(e){this._setFetchValue("requestTimeout",e),this._requestTimeout=e}},headers:{configurable:!1,get:function(){return this._headers},set:function(e){this._setFetchValue("headers",e),this._headers=e}},tokenKey:{configurable:!1,get:function(){return this._tokenKey},set:function(e){this._setFetchValue("tokenKey",e),this._tokenKey=e}},tokenValue:{configurable:!1,get:function(){return this._tokenValue},set:function(e){this._setFetchValue("tokenValue",e),this._tokenValue=e}},tokenAttachType:{configurable:!1,get:function(){return this._tokenAttachType},set:function(e){this._setFetchValue("tokenAttachType",e),this._tokenAttachType=e}}}),i.Zondy.Service.BaseServer=h,t.default=h},function(e,t,r){"use strict";r.r(t);var n=r(5),i=r(42);t.default=function(e){return Math.abs(e)<=n.SPI?e:e-Object(i.default)(e)*n.TWO_PI}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TileLayer=t.SubLayer=t.SceneLayer=t.MapImageLayer=t.FeatureLayer=t.VectorTileSubLayer=t.VectorTileLayer=t.Layer=void 0;var n=f(r(28)),i=f(r(398)),o=f(r(160)),a=f(r(401)),s=f(r(419)),u=f(r(420)),l=f(r(52)),c=f(r(421));function f(e){return e&&e.__esModule?e:{default:e}}t.Layer=n.default,t.VectorTileLayer=i.default,t.VectorTileSubLayer=o.default,t.FeatureLayer=a.default,t.MapImageLayer=s.default,t.SceneLayer=u.default,t.SubLayer=l.default,t.TileLayer=c.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(0),a=r(1),s=r(50),u=r(157);var l=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{}}},{key:"_getWorkflowParameters",value:function(e){var t=this,r={};return Object.keys(e).forEach(function(e){try{var n=t[e];if(void 0===n)return void o.Log.error("传入参数错误!");n&&n.clone?r[e]=n.clone():r[e]=n}catch(e){o.Log.error(e)}}),r}},{key:"_processParams",value:function(e,t){var r={};return Object.keys(t).forEach(function(n){try{var i=e[n],a=n;if(t[n]&&t[n].process){var s=t[n];i="function"==typeof s.process?s.process(i):s.process}t[n]&&t[n].alias&&(a=t[n].alias),r[a]=i}catch(e){o.Log.error(e)}}),r}},{key:"_queryByParameters",value:function(e,t,r,n){e=(0,o.defaultValue)(e,{});var i=this._checkPathParameters(e,t);if(!i.succeed)return e.failure&&e.failure instanceof Function&&e.failure({succeed:!1,msg:i.msg,data:void 0,errorType:i.errorType}),Promise.reject({succeed:!1,msg:i.msg,data:void 0,errorType:i.errorType});if(n&&n instanceof Function){var a=n(this.url,e),u=(0,s.checkParam)(e,r),l=this._processParams(e,r);return u&&(u.queryString="¶meters="+JSON.stringify(l)),o.Log.info("发起请求,基地址为:",a),this._checkAndRequest(u,a,e)}}},{key:"execute",value:function(e){var t=e||{},r=this._getCheckQueryOpts(),n=this._getWorkflowParameters(r);return this._queryByParameters(Object.assign(n,t),{},r,function(e){return e+"/execute?f=json"})}},{key:"submit",value:function(e){var t=e||{},r=this._getCheckQueryOpts(),n=this._getWorkflowParameters(r);return this._queryByParameters(Object.assign(n,t),{},r,function(e){return e+"/submit?f=json"})}},{key:"queryTaskStatus",value:function(e){return this._queryByParameters(e,{taskId:{type:"String"}},{},function(e,t){return e+"/"+t.taskId+"?f=json"})}},{key:"queryTaskResult",value:function(e){return this._queryByParameters(e,{taskId:{type:"String"}},{},function(e,t){return e+"/"+t.taskId+"/results?f=json"})}}],[{key:"createWorkFlow",value:function(e){return(0,u.createWorkflow)(e)}}]),t}();a.Zondy.Service.WorkFlowServer=l,t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=t.convertImageSourceToBase64=t.isWMSReverse=t.getProjectionSrs=t.jsonClone=t.toJSON=t.inputCss=t.getBaseUrl=t.isFunction=t.getVideoType=t.isObject=t.notNULL=t.cloneObject=t.returnPoint=t.formatPoints=t.newGuid=t.extendDeep=t.isBoolean=t.deepClone=t.isString=t.getOutStatisticsParameter=t.getGeometryParameter=t.isNull=t.isNumber=t.defined=t.defaultValue=t.getGUID=t.bind=t.getParameterString=t.urlAppend=t.transformResult=t.isInTheSameDomain=t.isArray=t.extend=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(1),o=r(3);function a(e,t){return void 0!==e&&null!==e?e:t}function s(e){if(null===e||"object"!==(void 0===e?"undefined":n(e)))return e;if(e instanceof Date){var t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array)return e.slice(0);if(e instanceof Object){var r={};for(var i in e)e.hasOwnProperty(i)&&"layer"!==i&&(e[i]instanceof Array?r[i]=JSON.parse(JSON.stringify(e[i])):r[i]=s(e[i]));return r}throw new Error("Unable to copy obj! Its type isn't supported.")}function u(e){var t=(new TextEncoder).encode(e);return"data:image/svg+xml;base64,"+btoa(String.fromCharCode.apply(null,t))}t.extend=function(e,t){if(e=e||{},t)for(var r in t){var n=t[r];void 0!==n&&(e[r]=n)}return e},t.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},t.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),r=document.location.toString(),n=r.indexOf("//");if(-1===t)return!0;var i=e.substring(0,t),o=i,a=r.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),u=a.substring(0,n),l=document.location.protocol;if(-1!==s||(u+=":"+("http:"===l.toLowerCase()?80:443)),l.toLowerCase()!==o.toLowerCase())return!1;var c=(o=e.substring(t+2)).indexOf(":");t=o.indexOf("/");var f=o.substring(0,t),h=void 0;return-1!==c?h=o.substring(0,c):(h=o.substring(0,t),f+=":"+("http:"===i.toLowerCase()?80:443)),h===document.domain&&f===u},t.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},t.urlAppend=function(e,t){var r=e;if(t){var n=(e+" ").split(/[?&]/);r+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return r},t.getParameterString=function(e){var t=[];for(var r in e){var i=e[r];if(null!==i&&"function"!=typeof i){var o=void 0;if("object"===(void 0===i?"undefined":n(i))&&i.constructor===Array){for(var a=[],s=void 0,u=0,l=i.length;u<l;u++)s=i[u],a.push(encodeURIComponent(null===s||void 0===s?"":s));o=a.join(",")}else o=encodeURIComponent(i);t.push(encodeURIComponent(r)+"="+o)}}return t.join("&")},t.bind=function(e,t){var r=Array.prototype.slice.apply(arguments,[2]);return function(){var n=r.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,n)}},t.getGUID=function(){for(var e="",t=1;t<=32;t++)e+=Math.floor(16*Math.random()).toString(16),8!==t&&12!==t&&16!==t&&20!==t||(e+="-");return e},t.defaultValue=a,t.defined=function(e){return void 0!==e&&null!==e},t.isNumber=function(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)&&"object"!==(void 0===e?"undefined":n(e))&&"string"!=typeof e},t.isNull=function(e){return void 0===e||null===e||""===e||"{}"===JSON.stringify(e)&&0===Object.keys(e).length},t.getGeometryParameter=function(e){var t="";return e&&(t+="&geometry="+e.toString()+"&geometryType="+e.getIGSType()),t},t.getOutStatisticsParameter=function(e){var t="";if(e instanceof Array&&e.length>0){t+="&outStatistics=[";for(var r=0;r<e.length;r++){var n=void 0;if(!(e[r]instanceof i.OutStatistic)){var o=a(e[r],{});n=new i.OutStatistic({statisticType:o.statisticType,onStatisticField:o.onStatisticField,outStatisticFieldName:o.outStatisticFieldName})}n&&(t+=n.toString())}t+="]"}return t},t.isString=function(e){return"string"==typeof e},t.deepClone=function(e){var t=e.success,r=e.failure,n=JSON.parse(JSON.stringify(e));return n.success=t,n.failure=r,n},t.isBoolean=function(e){return"boolean"==typeof e},t.extendDeep=function e(t,r){var i=void 0,o=Object.prototype.toString;for(i in t=t||{},r)r.hasOwnProperty(i)&&("object"===n(r[i])?("[object Null]"!==o.call(t[i])&&"[object Undefined]"!==o.call(t[i])||(t[i]="[object Array]"===o.call(r[i])?[]:{}),e(t[i],r[i])):t[i]=r[i],""!==r[i]&&null!==r[i]||(t[i]=r[i]));return t},t.newGuid=function(){for(var e="",t=1;t<=32;t++)e+=Math.floor(16*Math.random()).toString(16),8!==t&&12!==t&&16!==t&&20!==t||(e+="-");return e},t.formatPoints=function e(t){for(var r=0;r<t.length;r++)t[r]instanceof Array?e(t[r]):t[r]instanceof Object&&(t[r]=t[r].toArray());return t},t.returnPoint=function(e,t,r){return new e({longitude:r[0],latitude:r[1],z:r[2],spatialReference:s(t.spatialReference)})},t.cloneObject=s,t.notNULL=function(e){return""!==e&&null!==e&&void 0!==e},t.isObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)},t.getVideoType=function(e){if(e instanceof HTMLVideoElement)return o.VideoSourceType.videoHTML;if("object"===(void 0===e?"undefined":n(e)))return o.VideoSourceType.videoPlayer;if("string"!=typeof e)return null;var t=e.split(":");if("http"===t[0]||"https"===t[0]){var r=e.split(".").pop();if(r===o.VideoSourceType.hls)return o.VideoSourceType.hls;if(r===o.VideoSourceType.mp4)return o.VideoSourceType.mp4}else if(t[0]===o.VideoSourceType.rtmp)return o.VideoSourceType.rtmp;return null},t.isFunction=function(e){return"function"==typeof e},t.getBaseUrl=function(e){var t=document.createElement("a");t.setAttribute("href",e);var r=t.hostname,n=t.port;return t.protocol+"//"+r+(n.length?":"+n:"")},t.inputCss=function(e){if(window.document){var t=window.document.createElement("style");t.type="text/css",t.innerHTML=e,window.document.body.appendChild(t)}},t.toJSON=function(e,t){return e instanceof t?e.toJSON():e},t.jsonClone=function(e){return e=a(e,{}),JSON.parse(JSON.stringify(e))},t.getProjectionSrs=function(e){var t=void 0;return e.wkid?t="EPSG:"+e.wkid:e.wkt&&(t={wkt:e.wkt,v:""},t=JSON.stringify(t)),t},t.isWMSReverse=function(e,t){var r=t.wkid,n=!1;return"1.3.0"===e&&(t.isGeographic||r>=2327&&r<=2442||r>=4491&&r<=4554||r>=21413&&r<=21423||r>=21473&&r<=21483)&&(n=!0),n},t.convertImageSourceToBase64=function(e){var t="";"string"==typeof e?t=/<svg\s|<svg>/i.test(e)?u(e):e:e instanceof SVGElement?t=u((new XMLSerializer).serializeToString(e)):e instanceof Image?t=e.src:e instanceof HTMLCanvasElement&&(t=e.toDataURL("image/png"));return t},t.throttle=function(e,t,r){var n=void 0,i=void 0;function o(){n=!1,i&&(a.apply(r,i),i=!1)}function a(){n?i=arguments:(n=!0,e.apply(r,arguments),setTimeout(o,t))}return a}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorMaterial=t.WaterSymbol3DLayer=t.TextHalo=t.TextSymbol3DLayer=t.Edges3D=t.ExtrudeSymbol3DLayer=t.ObjectSymbol3DLayer=t.IconResource=t.PointSymbol3DOutline=t.IconSymbol3DLayer=t.FillSymbol3DOutline=t.FillSymbol3DLayer=t.PathSymbol3DLayer=t.LineSymbol3DLayer=t.LineStylePattern3D=t.LineStyleMarker3D=t.Symbol3DLayer=t.Symbol3DVerticalOffset=t.Callout3D=t.LineCallout3D=t.PolygonSymbol3D=t.PointSymbol3D=t.LineSymbol3D=t.LabelSymbol3D=t.Symbol3D=t.Symbol=t.createSymbol=t.MapGISTextSymbol=t.PictureFillSymbol=t.PictureMarkerSymbol=t.TextSymbol=t.SimpleMarkerSymbol=t.SimpleLineSymbol=t.SimpleFillSymbol=void 0;var n=_(r(31)),i=_(r(48)),o=_(r(125)),a=_(r(317)),s=_(r(320)),u=_(r(87)),l=_(r(321)),c=_(r(322)),f=_(r(323)),h=_(r(324)),p=_(r(325)),d=_(r(326)),y=_(r(327)),g=r(122),v=r(3),m=r(14);function _(e){return e&&e.__esModule?e:{default:e}}t.SimpleFillSymbol=s.default,t.SimpleLineSymbol=u.default,t.SimpleMarkerSymbol=a.default,t.TextSymbol=o.default,t.PictureMarkerSymbol=l.default,t.PictureFillSymbol=c.default,t.MapGISTextSymbol=f.default,t.createSymbol=function(e){var t=null;switch((e||{}).type){case v.SymbolType.simpleMarker:t=new a.default(e);break;case v.SymbolType.simpleLine:t=new u.default(e);break;case v.SymbolType.simpleFill:t=new s.default(e);break;case v.SymbolType.pictureMarker:t=new l.default(e);break;case v.SymbolType.pictureFill:t=new c.default(e);break;case v.SymbolType.text:t=new o.default(e);break;case v.SymbolType.mapgisText:t=new f.default(e);break;case v.SymbolType.label3D:t=new h.default(e);break;case v.SymbolType.point3D:t=new d.default(e);break;case v.SymbolType.line3D:t=new p.default(e);break;case v.SymbolType.polygon3D:t=new y.default(e);break;default:t=new a.default(e)}return t},t.Symbol=n.default,t.Symbol3D=i.default,t.LabelSymbol3D=h.default,t.LineSymbol3D=p.default,t.PointSymbol3D=d.default,t.PolygonSymbol3D=y.default,t.LineCallout3D=m.LineCallout3D,t.Callout3D=m.Callout3D,t.Symbol3DVerticalOffset=m.Symbol3DVerticalOffset,t.Symbol3DLayer=g.Symbol3DLayer,t.LineStyleMarker3D=m.LineStyleMarker3D,t.LineStylePattern3D=m.LineStylePattern3D,t.LineSymbol3DLayer=g.LineSymbol3DLayer,t.PathSymbol3DLayer=g.PathSymbol3DLayer,t.FillSymbol3DLayer=g.FillSymbol3DLayer,t.FillSymbol3DOutline=m.FillSymbol3DOutline,t.IconSymbol3DLayer=g.IconSymbol3DLayer,t.PointSymbol3DOutline=m.PointSymbol3DOutline,t.IconResource=m.IconResource,t.ObjectSymbol3DLayer=g.ObjectSymbol3DLayer,t.ExtrudeSymbol3DLayer=g.ExtrudeSymbol3DLayer,t.Edges3D=m.Edges3D,t.TextSymbol3DLayer=g.TextSymbol3DLayer,t.TextHalo=m.TextHalo,t.WaterSymbol3DLayer=g.WaterSymbol3DLayer,t.ColorMaterial=m.ColorMaterial},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeometryFilter=t.convertIGSClippingString=t.FetchRequest=t.ServiceConfigRequestInterceptors=t.ServiceConfigToken=t.Config=t.formatBaseUrl=t.ArcGISVectorTileServer=t.ArcGISFeatureServer=t.ArcGISGeometryServer=t.ThemesInfo=t.ThemeServer=t.ItemValue=t.FolderInfoAttribute=t.FolderInfo=t.ExpInfo=t.CUniqueThemeInfo=t.CUniqueTheme=t.CThemeInfo=t.CTheme=t.CSimpleTheme=t.CRegInfo=t.CRangeThemeInfo=t.CRangeTheme=t.CRandomTheme=t.CPntInfo=t.CMultiClassTheme=t.CLinInfo=t.CGraduatedSymbolTheme=t.CFourColorTheme=t.CDotDensityTheme=t.CChartType=t.CChartThemeRepresentInfo=t.CChartThemeInfo=t.CChartTheme=t.CChartLabelFormat=t.CAnnInfo=t.CAllOtherDataItemInfoSource=t.ArcGISMapServer=t.WFSServer=t.WMTSServer=t.WMSServer=t.SceneServer=t.ResourceServer=t.PlotServer=t.VectorTileServer=t.TileServer=t.RootServer=t.SecurityServer=t.TerrainServer=t.PoiServer=t.Cesium3DTilesServer=t.AddressServer=t.GeometryServer=t.ImageServer=t.M3DServer=t.FeatureServer=t.MapServer=t.ResponseInterceptor=t.RequestInterceptor=t.BaseServer=t.FetchServer=void 0;var n=h(r(6)),i=h(r(89)),o=h(r(90)),a=h(r(135)),s=h(r(67)),u=r(50),l=h(r(136)),c=r(333),f=r(137);function h(e){return e&&e.__esModule?e:{default:e}}t.FetchServer=a.default,t.BaseServer=n.default,t.RequestInterceptor=i.default,t.ResponseInterceptor=o.default,t.MapServer=f.MapServer,t.FeatureServer=f.FeatureServer,t.M3DServer=f.M3DServer,t.ImageServer=f.ImageServer,t.GeometryServer=f.GeometryServer,t.AddressServer=f.AddressServer,t.Cesium3DTilesServer=f.Cesium3DTilesServer,t.PoiServer=f.PoiServer,t.TerrainServer=f.TerrainServer,t.SecurityServer=f.SecurityServer,t.RootServer=f.RootServer,t.TileServer=f.TileServer,t.VectorTileServer=f.VectorTileServer,t.PlotServer=f.PlotServer,t.ResourceServer=f.ResourceServer,t.SceneServer=f.SceneServer,t.WMSServer=f.WMSServer,t.WMTSServer=f.WMTSServer,t.WFSServer=f.WFSServer,t.ArcGISMapServer=f.ArcGISMapServer,t.CAllOtherDataItemInfoSource=f.CAllOtherDataItemInfoSource,t.CAnnInfo=f.CAnnInfo,t.CChartLabelFormat=f.CChartLabelFormat,t.CChartTheme=f.CChartTheme,t.CChartThemeInfo=f.CChartThemeInfo,t.CChartThemeRepresentInfo=f.CChartThemeRepresentInfo,t.CChartType=f.CChartType,t.CDotDensityTheme=f.CDotDensityTheme,t.CFourColorTheme=f.CFourColorTheme,t.CGraduatedSymbolTheme=f.CGraduatedSymbolTheme,t.CLinInfo=f.CLinInfo,t.CMultiClassTheme=f.CMultiClassTheme,t.CPntInfo=f.CPntInfo,t.CRandomTheme=f.CRandomTheme,t.CRangeTheme=f.CRangeTheme,t.CRangeThemeInfo=f.CRangeThemeInfo,t.CRegInfo=f.CRegInfo,t.CSimpleTheme=f.CSimpleTheme,t.CTheme=f.CTheme,t.CThemeInfo=f.CThemeInfo,t.CUniqueTheme=f.CUniqueTheme,t.CUniqueThemeInfo=f.CUniqueThemeInfo,t.ExpInfo=f.ExpInfo,t.FolderInfo=f.FolderInfo,t.FolderInfoAttribute=f.FolderInfoAttribute,t.ItemValue=f.ItemValue,t.ThemeServer=f.ThemeServer,t.ThemesInfo=f.ThemesInfo,t.ArcGISGeometryServer=f.ArcGISGeometryServer,t.ArcGISFeatureServer=f.ArcGISFeatureServer,t.ArcGISVectorTileServer=f.ArcGISVectorTileServer,t.formatBaseUrl=u.formatBaseUrl,t.Config=l.default,t.ServiceConfigToken=u.ServiceConfigToken,t.ServiceConfigRequestInterceptors=u.ServiceConfigRequestInterceptors,t.FetchRequest=s.default,t.convertIGSClippingString=u.convertIGSClippingString,t.GeometryFilter=c.GeometryFilter},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(18)),o=h(r(46)),a=r(0),s=h(r(2)),u=r(3),l=r(26),c=h(r(32)),f=r(4);function h(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r.spatialReference=(0,a.defaultValue)(c.default.fromJSON(e.spatialReference),new c.default("EPSG:4326")),r.hasZ=!1,r.type=u.GeometryType.geometry,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"clone",value:function(){return new t(this.toJSON())}},{key:"toJSON",value:function(){return{spatialReference:this.spatialReference instanceof c.default?this.spatialReference.toJSON():this.spatialReference,hasZ:this.hasZ,type:this.type}}},{key:"toGeoJSON",value:function(){return{type:this.type,coordinates:this.coordinates}}},{key:"fromGeoJSON",value:function(e){(e||e.type!==this.type)&&new Error("GeoJSON类型和几何类型不一致"),(0,a.defined)(this.coordinates)&&(this.coordinates=e.coordinates)}},{key:"toXML",value:function(){return""}},{key:"getType",value:function(){return this.type}},{key:"getIGSType",value:function(){return u.IGSGeometryType.geometry}},{key:"getGeometryType",value:function(){return this.type}},{key:"toString",value:function(){return""}}],[{key:"fromGeoJSON",value:function(e){return(0,l.createGeometryByGeoJSON)(e)}},{key:"fromJSON",value:function(e){return e=(0,a.defaultValue)(e,{}),(0,l.createGeometry)(e)}},{key:"isClockwise",value:function(e){e=(0,a.defaultValue)(e,void 0),(0,a.isNull)(e)&&a.Log.error("geometry1不能为空!"),e instanceof Array||a.Log.error("输入参数类型错误,需要输入点数组!");for(var t=0;t<e.length;t++)if(e[t]instanceof Array)for(var r=0;r<e[t].length;r++)e[t][r]instanceof Array&&a.Log.error("输入参数类型错误,需要输入二维数组!");else a.Log.error("输入参数类型错误,需要输入二维数组!");if(e[0].length===e[e.length-1].length&&JSON.stringify(e[0])===JSON.stringify(e[e.length-1])||a.Log.error("输入的点数组必须首尾闭合!"),!(0,a.isNull)(e)){var n=i.lineString(e);return i.booleanClockwise(n)}}},{key:"fromRings",value:function(e,t){e=(0,a.defaultValue)(e,void 0);var r=(0,a.defaultValue)(c.default.fromJSON(t),new c.default("EPSG:4326"));(0,a.isNull)(e)&&a.Log.error("geometry1不能为空!"),e instanceof Array||a.Log.error("输入参数类型错误,需要输入点数组!"),3!==this._multiarr(e)&&a.Log.error("输入参数错误,需要输入三维数组!");var n=void 0;if(1===e.length){var i=e[0];return i[0].length===i[i.length-1].length&&JSON.stringify(i[0])===JSON.stringify(i[i.length-1])||i.push(i[0]),n=new f.Polygon({coordinates:[i],spatialReference:r})}for(var o=[],s=0;s<e.length;s++){var u={geometry:void 0,area:null,inner:[]};JSON.stringify(e[s][0])!==JSON.stringify(e[s][e[s].length-1])&&e[s].push(e[s][0]);var l=new f.Polygon({coordinates:[e[s]],spatialReference:r});u.geometry=l,u.area=f.GeometryEngine.planarArea(l),o.push(u)}for(var h=this._processArr([],o),p=[],d=function(e){var t=[h[e].geometry.coordinates[0]];h[e].inner.length>=1&&h[e].inner.forEach(function(e){t.push(e.geometry.coordinates[0])}),p.push(t)},y=0;y<h.length;y++)d(y);for(var g=[],v=0;v<h.length;v++)n=new f.Polygon({coordinates:p[v],spatialReference:r}),g.push(n);return g}},{key:"_processArr",value:function(e,t){t.sort(function(e,t){return t.area-e.area});for(var r=t[0],n=[],i=1;i<t.length;i++)f.GeometryEngine.disjoint(r.geometry,t[i].geometry)?n.push(t[i]):f.GeometryEngine.contains(r.geometry,t[i].geometry)?r.inner.push(t[i]):n.push(t[i]);if(r.inner.length>1)for(var o=0;o<r.inner.length;o++)for(var s=r.inner[o],u=o+1;u<r.inner.length;u++)f.GeometryEngine.intersects(s.geometry,r.inner[u].geometry)&&(f.GeometryEngine.contains(s.geometry,r.inner[u].geometry)?(n.push(r.inner[u]),r.inner.splice(u,1),u--):a.Log.error("输入的几何存在拓扑错误,请检查"));return e.push(r),n.length>1?this._processArr(e,n):1===n.length&&e.push(n[0]),e}},{key:"_multiarr",value:function(e){for(var t=[],r=1,n=0;n<e.length;n++)if(e[n]instanceof Array)for(var i=0;i<e[n].length;i++)t.push(e[n][i]);return t.length&&(r=1,r+=this._multiarr(t)),r}},{key:"_parseString",value:function(e){for(var t=[],r=e.split("*"),n=0;n<r.length;n++){for(var i=r[n].split(" "),o=[],a=0;a<i.length;a++)if(o.push(i[a].split(",")),i[a].indexOf("#")>-1){i[a]=i[a].replace("#",""),o.splice(a-1,2);var s=[i[a-1].split(","),i[a].split(","),i[a+1].split(",")];o.push(s),a++}for(var u=[],l=0;l<o.length;l++){var c=void 0;if(o[l][0]instanceof Array){for(var f=[],h=0;h<o[l].length;h++)c=o[l][h].map(function(e){return Number(e)}),f.push(c);u.push(f)}else c=o[l].map(function(e){return Number(e)}),u.push(c)}t.push(u)}return t}}]),t}();Object.defineProperties(p.prototype,{extent:{configurable:!1,get:function(){}}}),t.default=p,s.default.Geometry.Geometry=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorMaterial=t.TextHalo=t.Edges3D=t.IconResource=t.PointSymbol3DOutline=t.FillSymbol3DOutline=t.LineStylePattern3D=t.LineStyleMarker3D=t.Symbol3DVerticalOffset=t.Callout3D=t.LineCallout3D=void 0;var n=d(r(299)),i=d(r(123)),o=d(r(300)),a=d(r(301)),s=d(r(302)),u=d(r(303)),l=d(r(304)),c=d(r(305)),f=d(r(306)),h=d(r(124)),p=r(307);function d(e){return e&&e.__esModule?e:{default:e}}t.LineCallout3D=n.default,t.Callout3D=i.default,t.Symbol3DVerticalOffset=o.default,t.LineStyleMarker3D=a.default,t.LineStylePattern3D=s.default,t.FillSymbol3DOutline=u.default,t.PointSymbol3DOutline=l.default,t.IconResource=c.default,t.Edges3D=f.default,t.TextHalo=h.default,t.ColorMaterial=p.ColorMaterial},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(0);var o=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,i.defaultValue)(t,{}),(0,i.extend)(this,t),this.Name=t&&t.Name?t.Name:null,this.IsBaseTheme=!t||!t.IsBaseTheme||t.IsBaseTheme,this.Visible=!t||!t.Visible||t.Visible};t.default=o,n.Zondy.Object.Theme.CTheme=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VectorTileLayer=t.LOD=t.getFullBaseUrl=t.appendUrlParams=t.TileInfo=t.FeatureCollection=t.getZoomOffset=t.WebTileLayer=t.ArcGISVectorTileLayer=t.setElevationInfo=t.TileInfoUtil=t.getLayerViewScaleVisible=t.showLayerByScale=t.isCustomSP=t.is4326=t.getUrlType=t.ArcGISTileLayer=t.ArcGISMapImageSubLayer=t.ArcGISMapImageLayer=t.Projection=t.M3DModelCacheLayer=t.IGSFeatureLayer=t.Scene=t.IGSTileLayer=t.IGSSceneSubLayer=t.IGSSceneLayer=t.IGSMapImageSubLayer=t.IGSMapImageLayer=t.IGSImageLayer=t.IGSVectorTileSubLayer=t.IGSVectorTileLayer=t.VideoLayer=t.VideoMapLayer=t.UnknownLayer=t.GeoJSONLayer=t.GraphicsLayer=t.GroupLayer=t.MapVLayer=t.EchartsLayer=t.TerrainCacheLayer=t.Cesium3DTilesCacheLayer=t.FeatureLayer=t.WMTSSubLayer=t.WFSLayer=t.WMSSubLayer=t.WMSLayer=t.WMTSLayer=t.OGCLayer=t.Layer=void 0;var n=r(159),i=r(8),o=r(427),a=r(29),s=r(432),u=P(r(436)),l=P(r(437)),c=r(438),f=P(r(441)),h=P(r(442)),p=P(r(443)),d=P(r(444)),y=P(r(445)),g=P(r(446)),v=P(r(47)),m=r(21),_=P(r(41)),b=P(r(54)),S=P(r(70)),x=P(r(94)),w=P(r(165)),O=P(r(447));function P(e){return e&&e.__esModule?e:{default:e}}t.Layer=i.Layer,t.OGCLayer=s.OGCLayer,t.WMTSLayer=s.WMTSLayer,t.WMSLayer=s.WMSLayer,t.WMSSubLayer=s.WMSSubLayer,t.WFSLayer=s.WFSLayer,t.WMTSSubLayer=s.WMTSSubLayer,t.FeatureLayer=i.FeatureLayer,t.Cesium3DTilesCacheLayer=u.default,t.TerrainCacheLayer=l.default,t.EchartsLayer=c.EchartsLayer,t.MapVLayer=c.MapVLayer,t.GroupLayer=f.default,t.GraphicsLayer=h.default,t.GeoJSONLayer=p.default,t.UnknownLayer=O.default,t.VideoMapLayer=y.default,t.VideoLayer=g.default,t.IGSVectorTileLayer=n.IGSVectorTileLayer,t.IGSVectorTileSubLayer=n.IGSVectorTileSubLayer,t.IGSImageLayer=n.IGSImageLayer,t.IGSMapImageLayer=n.IGSMapImageLayer,t.IGSMapImageSubLayer=n.IGSMapImageSubLayer,t.IGSSceneLayer=n.IGSSceneLayer,t.IGSSceneSubLayer=n.IGSSceneSubLayer,t.IGSTileLayer=n.IGSTileLayer,t.Scene=n.Scene,t.IGSFeatureLayer=n.IGSFeatureLayer,t.M3DModelCacheLayer=d.default,t.Projection=v.default,t.ArcGISMapImageLayer=o.ArcGISMapImageLayer,t.ArcGISMapImageSubLayer=o.ArcGISMapImageSubLayer,t.ArcGISTileLayer=o.ArcGISTileLayer,t.getUrlType=m.getUrlType,t.is4326=m.is4326,t.isCustomSP=m.isCustomSP,t.showLayerByScale=m.showLayerByScale,t.getLayerViewScaleVisible=m.getLayerViewScaleVisible,t.TileInfoUtil=b.default,t.setElevationInfo=a.setElevationInfo,t.ArcGISVectorTileLayer=o.ArcGISVectorTileLayer,t.WebTileLayer=w.default,t.getZoomOffset=m.getZoomOffset,t.FeatureCollection=x.default,t.TileInfo=_.default,t.appendUrlParams=m.appendUrlParams,t.getFullBaseUrl=m.getFullBaseUrl,t.LOD=S.default,t.VectorTileLayer=i.VectorTileLayer},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(11),a=r(0);var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,a.defaultValue)(t,{}),this._vertexStyle=(0,a.defaultValue)(t.vertexStyle,new o.SimpleMarkerSymbol({color:new i.Color(24,144,255,1),size:10,outline:new o.SimpleLineSymbol({color:new i.Color(255,255,255,1),width:1})})),this._lineStyle=(0,a.defaultValue)(t.lineStyle,new o.SimpleLineSymbol({color:new i.Color(24,144,255,1),width:3})),this._fillStyle=(0,a.defaultValue)(t.fillStyle,new o.SimpleFillSymbol({color:new i.Color(24,144,255,.3),outline:new o.SimpleLineSymbol({color:new i.Color(24,144,255,1),width:2})})),this._textStyle=(0,a.defaultValue)(t.textStyle,new o.TextSymbol({color:new i.Color(24,144,255,1),text:"默认文字",font:{family:"微软雅黑",size:20,style:"normal",weight:"normal"}})),this._movingLineStyle=(0,a.defaultValue)(t.lineStyle,new o.SimpleLineSymbol({color:new i.Color(255,255,0,1),width:2})),this._selectBoxStyle=(0,a.defaultValue)(t.selectBoxStyle,new o.SimpleFillSymbol({color:new i.Color(241,188,0,.1),outline:new o.SimpleLineSymbol({color:new i.Color(241,188,0,.8),width:2})})),this._selectBoxVertexStyle=(0,a.defaultValue)(t.selectBoxVertexStyle,new o.SimpleMarkerSymbol({color:new i.Color(255,255,255,1),size:10,outline:new o.SimpleLineSymbol({color:new i.Color(241,188,0,1),width:3})})),this._selectVertexStyle=(0,a.defaultValue)(t.selectVertexStyle,new o.SimpleMarkerSymbol({color:new i.Color(241,188,0,1),size:11,outline:new o.SimpleLineSymbol({color:new i.Color(255,255,255,1),width:1})})),this._selectTextStyle=(0,a.defaultValue)(t.selectTextStyle,new o.TextSymbol({color:new i.Color(241,188,0,1),text:"默认文字",font:{family:"微软雅黑",size:20,style:"normal",weight:"normal"}})),this._selectMidVertexStyle=(0,a.defaultValue)(t.selectMidVertexStyle,new o.SimpleMarkerSymbol({color:new i.Color(255,255,255,1),size:8,outline:new o.SimpleLineSymbol({color:new i.Color(241,188,0,1),width:1})})),this._coincidentPointStyle=(0,a.defaultValue)(t.coincidentPointStyle,new o.SimpleMarkerSymbol({color:new i.Color(255,255,0,1),size:10,outline:new o.SimpleLineSymbol({color:new i.Color(255,255,255,1),width:1})})),this._highlightPointStyle=(0,a.defaultValue)(t.highlightPointStyle,new o.SimpleMarkerSymbol({color:new i.Color(255,255,0,1),size:10,outline:new o.SimpleLineSymbol({color:new i.Color(255,255,255,1),width:1})})),this._highlightLineStyle=(0,a.defaultValue)(t.highlightLineStyle,new o.SimpleLineSymbol({color:new i.Color(255,255,0,1),width:3})),this._parallelLineStyle=(0,a.defaultValue)(t.parallelLineStyle,this._highlightLineStyle),this._perpendicularLineStyle=(0,a.defaultValue)(t.perpendicularLineStyle,this._highlightLineStyle)}return n(e,[{key:"clone",value:function(){return new e(this.toJSON())}},{key:"toJSON",value:function(){var e={};return e.vertexStyle=this._vertexStyle.clone(),e.lineStyle=this._lineStyle.clone(),e.fillStyle=this._fillStyle.clone(),e.movingLineStyle=this._movingLineStyle.clone(),e.selectBoxStyle=this._selectBoxStyle.clone(),e.selectBoxVertexStyle=this._selectBoxVertexStyle.clone(),e.selectVertexStyle=this._selectVertexStyle.clone(),e.selectMidVertexStyle=this._selectMidVertexStyle.clone(),e.coincidentPointStyle=this._coincidentPointStyle.clone(),e.highlightPointStyle=this._highlightPointStyle.clone(),e.highlightLineStyle=this._highlightLineStyle.clone(),e.parallelLineStyle=this._parallelLineStyle.clone(),e.perpendicularLineStyle=this._perpendicularLineStyle.clone(),e.textStyle=this._textStyle.clone(),e.selectTextStyle=this._selectTextStyle.clone(),e}},{key:"fromJSON",value:function(){}}]),e}();Object.defineProperties(s.prototype,{vertexStyle:{get:function(){return this._vertexStyle},set:function(e){this._vertexStyle=e}},lineStyle:{get:function(){return this._lineStyle},set:function(e){this._lineStyle=e}},fillStyle:{get:function(){return this._fillStyle},set:function(e){this._fillStyle=e}},textStyle:{get:function(){return this._textStyle},set:function(e){this._textStyle=e}},selectBoxStyle:{get:function(){return this._selectBoxStyle},set:function(e){this._selectBoxStyle=e}},selectBoxVertexStyle:{get:function(){return this._selectBoxVertexStyle},set:function(e){this._selectBoxVertexStyle=e}},selectVertexStyle:{get:function(){return this._selectVertexStyle},set:function(e){this._selectVertexStyle=e}},selectTextStyle:{get:function(){return this._selectTextStyle},set:function(e){this._selectTextStyle=e}},selectMidVertexStyle:{get:function(){return this._selectMidVertexStyle},set:function(e){this._selectMidVertexStyle=e}},coincidentPointStyle:{get:function(){return this._coincidentPointStyle},set:function(e){this._coincidentPointStyle=e}},highlightPointStyle:{get:function(){return this._highlightPointStyle},set:function(e){this._highlightPointStyle=e}},highlightLineStyle:{get:function(){return this._highlightLineStyle},set:function(e){this._highlightLineStyle=e}},parallelLineStyle:{get:function(){return this._parallelLineStyle},set:function(e){this._parallelLineStyle=e}},perpendicularLineStyle:{get:function(){return this._perpendicularLineStyle},set:function(e){this._perpendicularLineStyle=e}}}),t.default=s,i.Zondy.SketchStyle=s},function(e,t,r){(function(e){!function(t){"use strict";var r=6371008.8,n={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:39.37*r,kilometers:6371.0088,kilometres:6371.0088,meters:r,metres:r,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:r/1852,radians:1,yards:6967335.223679999},i={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},o={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 a(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function s(e,t,r){switch(e){case"Point":return u(t).geometry;case"LineString":return h(t).geometry;case"Polygon":return c(t).geometry;case"MultiPoint":return g(t).geometry;case"MultiLineString":return y(t).geometry;case"MultiPolygon":return v(t).geometry;default:throw new Error(e+" is invalid")}}function u(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!T(e[0])||!T(e[1]))throw new Error("coordinates must contain numbers");return a({type:"Point",coordinates:e},t,r)}function l(e,t,r){return void 0===r&&(r={}),d(e.map(function(e){return u(e,t)}),r)}function c(e,t,r){void 0===r&&(r={});for(var n=0,i=e;n<i.length;n++){var o=i[n];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return a({type:"Polygon",coordinates:e},t,r)}function f(e,t,r){return void 0===r&&(r={}),d(e.map(function(e){return c(e,t)}),r)}function h(e,t,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return a({type:"LineString",coordinates:e},t,r)}function p(e,t,r){return void 0===r&&(r={}),d(e.map(function(e){return h(e,t)}),r)}function d(e,t){void 0===t&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function y(e,t,r){return void 0===r&&(r={}),a({type:"MultiLineString",coordinates:e},t,r)}function g(e,t,r){return void 0===r&&(r={}),a({type:"MultiPoint",coordinates:e},t,r)}function v(e,t,r){return void 0===r&&(r={}),a({type:"MultiPolygon",coordinates:e},t,r)}function m(e,t,r){return void 0===r&&(r={}),a({type:"GeometryCollection",geometries:e},t,r)}function _(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r}function b(e,t){void 0===t&&(t="kilometers");var r=n[t];if(!r)throw new Error(t+" units is invalid");return e*r}function S(e,t){void 0===t&&(t="kilometers");var r=n[t];if(!r)throw new Error(t+" units is invalid");return e/r}function x(e,t){return O(S(e,t))}function w(e){var t=e%360;return t<0&&(t+=360),t}function O(e){return e%(2*Math.PI)*180/Math.PI}function P(e){return e%360*Math.PI/180}function E(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return b(S(e,t),r)}function k(e,t,r){if(void 0===t&&(t="meters"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("area must be a positive number");var n=o[t];if(!n)throw new Error("invalid original units");var i=o[r];if(!i)throw new Error("invalid final units");return e/n*i}function T(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function M(e){return!!e&&e.constructor===Object}function I(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(function(e){if(!T(e))throw new Error("bbox must only contain numbers")})}function L(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}var C=Object.freeze({__proto__:null,earthRadius:r,factors:n,unitsFactors:i,areaFactors:o,feature:a,geometry:s,point:u,points:l,polygon:c,polygons:f,lineString:h,lineStrings:p,featureCollection:d,multiLineString:y,multiPoint:g,multiPolygon:v,geometryCollection:m,round:_,radiansToLength:b,lengthToRadians:S,lengthToDegrees:x,bearingToAzimuth:w,radiansToDegrees:O,degreesToRadians:P,convertLength:E,convertArea:k,isNumber:T,isObject:M,validateBBox:I,validateId:L});function N(e,t,r){if(null!==e)for(var n,i,o,a,s,u,l,c,f=0,h=0,p=e.type,d="FeatureCollection"===p,y="Feature"===p,g=d?e.features.length:1,v=0;v<g;v++){s=(c=!!(l=d?e.features[v].geometry:y?e.geometry:e)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var m=0;m<s;m++){var _=0,b=0;if(null!==(a=c?l.geometries[m]:l)){u=a.coordinates;var S=a.type;switch(f=!r||"Polygon"!==S&&"MultiPolygon"!==S?0:1,S){case null:break;case"Point":if(!1===t(u,h,v,_,b))return!1;h++,_++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(!1===t(u[n],h,v,_,b))return!1;h++,"MultiPoint"===S&&_++}"LineString"===S&&_++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(i=0;i<u[n].length-f;i++){if(!1===t(u[n][i],h,v,_,b))return!1;h++}"MultiLineString"===S&&_++,"Polygon"===S&&b++}"Polygon"===S&&_++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(b=0,i=0;i<u[n].length;i++){for(o=0;o<u[n][i].length-f;o++){if(!1===t(u[n][i][o],h,v,_,b))return!1;h++}b++}_++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===N(a.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function R(e,t,r,n){var i=r;return N(e,function(e,n,o,a,s){i=0===n&&void 0===r?e:t(i,e,n,o,a,s)},n),i}function j(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&!1!==t(e.features[r].properties,r);r++);break;case"Feature":t(e.properties,0)}}function G(e,t,r){var n=r;return j(e,function(e,i){n=0===i&&void 0===r?e:t(n,e,i)}),n}function V(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var r=0;r<e.features.length&&!1!==t(e.features[r],r);r++);}function A(e,t,r){var n=r;return V(e,function(e,i){n=0===i&&void 0===r?e:t(n,e,i)}),n}function D(e){var t=[];return N(e,function(e){t.push(e)}),t}function F(e,t){var r,n,i,o,a,s,u,l,c,f,h=0,p="FeatureCollection"===e.type,d="Feature"===e.type,y=p?e.features.length:1;for(r=0;r<y;r++){for(s=p?e.features[r].geometry:d?e.geometry:e,l=p?e.features[r].properties:d?e.properties:{},c=p?e.features[r].bbox:d?e.bbox:void 0,f=p?e.features[r].id:d?e.id:void 0,a=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=u?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,h,l,c,f))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],h,l,c,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,h,l,c,f))return!1;h++}}function B(e,t,r){var n=r;return F(e,function(e,i,o,a,s){n=0===i&&void 0===r?e:t(n,e,i,o,a,s)}),n}function q(e,t){F(e,function(e,r,n,i,o){var s,u=null===e?null:e.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return!1!==t(a(e,n,{bbox:i,id:o}),r,0)&&void 0}switch(u){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<e.coordinates.length;l++){var c=e.coordinates[l];if(!1===t(a({type:s,coordinates:c},n),r,l))return!1}})}function J(e,t,r){var n=r;return q(e,function(e,i,o){n=0===i&&0===o&&void 0===r?e:t(n,e,i,o)}),n}function U(e,t){q(e,function(e,r,n){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var a,s=0,u=0,l=0;return!1!==N(e,function(o,c,f,p,d){if(void 0===a||r>s||p>u||d>l)return a=o,s=r,u=p,l=d,void(i=0);var y=h([a,o],e.properties);if(!1===t(y,r,n,d,i))return!1;i++,a=o})&&void 0}}})}function z(e,t,r){var n=r,i=!1;return U(e,function(e,o,a,s,u){n=!1===i&&void 0===r?e:t(n,e,o,a,s,u),i=!0}),n}function W(e,t){if(!e)throw new Error("geojson is required");q(e,function(e,r,n){if(null!==e.geometry){var i=e.geometry.type,o=e.geometry.coordinates;switch(i){case"LineString":if(!1===t(e,r,n,0,0))return!1;break;case"Polygon":for(var a=0;a<o.length;a++)if(!1===t(h(o[a],e.properties),r,n,a))return!1}}})}function H(e,t,r){var n=r;return W(e,function(e,i,o,a){n=0===i&&void 0===r?e:t(n,e,i,o,a)}),n}function X(e,t){if(!M(t=t||{}))throw new Error("options is invalid");var r,n=t.featureIndex||0,i=t.multiFeatureIndex||0,o=t.geometryIndex||0,a=t.segmentIndex||0,s=t.properties;switch(e.type){case"FeatureCollection":n<0&&(n=e.features.length+n),s=s||e.features[n].properties,r=e.features[n].geometry;break;case"Feature":s=s||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=u.length+a-1),h([u[a],u[a+1]],s,t);case"Polygon":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a-1),h([u[o][a],u[o][a+1]],s,t);case"MultiLineString":return i<0&&(i=u.length+i),a<0&&(a=u[i].length+a-1),h([u[i][a],u[i][a+1]],s,t);case"MultiPolygon":return i<0&&(i=u.length+i),o<0&&(o=u[i].length+o),a<0&&(a=u[i][o].length-a-1),h([u[i][o][a],u[i][o][a+1]],s,t)}throw new Error("geojson is invalid")}function Z(e,t){if(!M(t=t||{}))throw new Error("options is invalid");var r,n=t.featureIndex||0,i=t.multiFeatureIndex||0,o=t.geometryIndex||0,a=t.coordIndex||0,s=t.properties;switch(e.type){case"FeatureCollection":n<0&&(n=e.features.length+n),s=s||e.features[n].properties,r=e.features[n].geometry;break;case"Feature":s=s||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var l=r.coordinates;switch(r.type){case"Point":return u(l,s,t);case"MultiPoint":return i<0&&(i=l.length+i),u(l[i],s,t);case"LineString":return a<0&&(a=l.length+a),u(l[a],s,t);case"Polygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),u(l[o][a],s,t);case"MultiLineString":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a),u(l[i][a],s,t);case"MultiPolygon":return i<0&&(i=l.length+i),o<0&&(o=l[i].length+o),a<0&&(a=l[i][o].length-a),u(l[i][o][a],s,t)}throw new Error("geojson is invalid")}var Y=Object.freeze({__proto__:null,coordAll:D,coordEach:N,coordReduce:R,featureEach:V,featureReduce:A,findPoint:Z,findSegment:X,flattenEach:q,flattenReduce:J,geomEach:F,geomReduce:B,lineEach:W,lineReduce:H,propEach:j,propReduce:G,segmentEach:U,segmentReduce:z});function K(e){var t=[1/0,1/0,-1/0,-1/0];return N(e,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}function Q(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function $(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function ee(e){if(e.length>1&&T(e[0])&&T(e[1]))return!0;if(Array.isArray(e[0])&&e[0].length)return ee(e[0]);throw new Error("coordinates must only contain numbers")}function te(e,t,r){if(!t||!r)throw new Error("type and name required");if(!e||e.type!==t)throw new Error("Invalid input to "+r+": must be a "+t+", given "+e.type)}function re(e,t,r){if(!e)throw new Error("No feature passed");if(!r)throw new Error(".featureOf() requires a name");if(!e||"Feature"!==e.type||!e.geometry)throw new Error("Invalid input to "+r+", Feature with geometry required");if(!e.geometry||e.geometry.type!==t)throw new Error("Invalid input to "+r+": must be a "+t+", given "+e.geometry.type)}function ne(e,t,r){if(!e)throw new Error("No featureCollection passed");if(!r)throw new Error(".collectionOf() requires a name");if(!e||"FeatureCollection"!==e.type)throw new Error("Invalid input to "+r+", FeatureCollection required");for(var n=0,i=e.features;n<i.length;n++){var o=i[n];if(!o||"Feature"!==o.type||!o.geometry)throw new Error("Invalid input to "+r+", Feature with geometry required");if(!o.geometry||o.geometry.type!==t)throw new Error("Invalid input to "+r+": must be a "+t+", given "+o.geometry.type)}}function ie(e){return"Feature"===e.type?e.geometry:e}function oe(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}K.default=K;var ae=Object.freeze({__proto__:null,getCoord:Q,getCoords:$,containsNumber:ee,geojsonType:te,featureOf:re,collectionOf:ne,getGeom:ie,getType:oe}),se=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,ce=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,n,i=
|
|
2
|
+
/*
|
|
3
|
+
object-assign
|
|
4
|
+
(c) Sindre Sorhus
|
|
5
|
+
@license MIT
|
|
6
|
+
*/
|
|
7
|
+
function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var a in r=Object(arguments[o]))ue.call(r,a)&&(i[a]=r[a]);if(se){n=se(r);for(var s=0;s<n.length;s++)le.call(r,n[s])&&(i[n[s]]=r[n[s]])}}return i},fe={successCallback:null,verbose:!1},he={};
|
|
8
|
+
/**
|
|
9
|
+
* @license GNU Affero General Public License.
|
|
10
|
+
* Copyright (c) 2015, 2015 Ronny Lorenz <ronny@tbi.univie.ac.at>
|
|
11
|
+
* v. 1.2.0
|
|
12
|
+
* https://github.com/RaumZeit/MarchingSquares.js
|
|
13
|
+
*
|
|
14
|
+
* MarchingSquaresJS is free software: you can redistribute it and/or modify
|
|
15
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
16
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
17
|
+
* (at your option) any later version.
|
|
18
|
+
*
|
|
19
|
+
* MarchingSquaresJS is distributed in the hope that it will be useful,
|
|
20
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
21
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
22
|
+
* GNU Affero General Public License for more details.
|
|
23
|
+
*
|
|
24
|
+
* As additional permission under GNU Affero General Public License version 3
|
|
25
|
+
* section 7, third-party projects (personal or commercial) may distribute,
|
|
26
|
+
* include, or link against UNMODIFIED VERSIONS of MarchingSquaresJS without the
|
|
27
|
+
* requirement that said third-party project for that reason alone becomes
|
|
28
|
+
* subject to any requirement of the GNU Affero General Public License version 3.
|
|
29
|
+
* Any modifications to MarchingSquaresJS, however, must be shared with the public
|
|
30
|
+
* and made available.
|
|
31
|
+
*
|
|
32
|
+
* In summary this:
|
|
33
|
+
* - allows you to use MarchingSquaresJS at no cost
|
|
34
|
+
* - allows you to use MarchingSquaresJS for both personal and commercial purposes
|
|
35
|
+
* - allows you to distribute UNMODIFIED VERSIONS of MarchingSquaresJS under any
|
|
36
|
+
* license as long as this license notice is included
|
|
37
|
+
* - enables you to keep the source code of your program that uses MarchingSquaresJS
|
|
38
|
+
* undisclosed
|
|
39
|
+
* - forces you to share any modifications you have made to MarchingSquaresJS,
|
|
40
|
+
* e.g. bug-fixes
|
|
41
|
+
*
|
|
42
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
43
|
+
* along with MarchingSquaresJS. If not, see <http://www.gnu.org/licenses/>.
|
|
44
|
+
*/
|
|
45
|
+
function pe(e,t,r){r=r||{};for(var n=Object.keys(fe),i=0;i<n.length;i++){var o=n[i],a=r[o];a=null!=a?a:fe[o],he[o]=a}he.verbose&&console.log("MarchingSquaresJS-isoContours: computing isocontour for "+t);var s=function(e){var t=[],r=0;return e.cells.forEach(function(n,i){n.forEach(function(n,o){if(void 0!==n&&5!==(h=n).cval&&10!==h.cval&&!ye(n)){var a=function(e,t,r){var n,i,o=e.length,a=[],s=[0,0,1,1,0,0,0,0,-1,0,1,1,-1,0,-1,0],u=[0,-1,0,0,1,1,1,1,0,-1,0,0,0,-1,0,0],l=["none","bottom","right","right","top","top","top","top","left","bottom","right","right","left","bottom","left","none"],c=e[t][r],f=c.cval,h=["none","left","bottom","left","right","none","bottom","left","top","top","none","top","right","right","bottom","none"][f],p=ve(c,h);a.push([r+p[0],t+p[1]]),p=ve(c,h=l[f]),a.push([r+p[0],t+p[1]]),ge(c);for(var d=r+s[f],y=t+u[f],g=f;d>=0&&y>=0&&y<o&&(d!=r||y!=t)&&void 0!==(c=e[y][d]);){if(0===(f=c.cval)||15===f)return{path:a,info:"mergeable"};h=l[f],n=s[f],i=u[f],5!==f&&10!==f||(5===f?c.flipped?-1===u[g]?(h="left",n=-1,i=0):(h="right",n=1,i=0):-1===s[g]&&(h="bottom",n=0,i=-1):10===f&&(c.flipped?-1===s[g]?(h="top",n=0,i=1):(h="bottom",n=0,i=-1):1===u[g]&&(h="left",n=-1,i=0))),p=ve(c,h),a.push([d+p[0],y+p[1]]),ge(c),d+=n,y+=i,g=f}return{path:a,info:"closed"}}(e.cells,i,o),s=!1;if("mergeable"===a.info)for(var u=a.path[a.path.length-1][0],l=a.path[a.path.length-1][1],c=r-1;c>=0;c--)if(Math.abs(t[c][0][0]-u)<=1e-7&&Math.abs(t[c][0][1]-l)<=1e-7){for(var f=a.path.length-2;f>=0;--f)t[c].unshift(a.path[f]);s=!0;break}s||(t[r++]=a.path)}var h})}),t}(function(e,t){for(var r=e.length-1,n=e[0].length-1,i={rows:r,cols:n,cells:[]},o=0;o<r;++o){i.cells[o]=[];for(var a=0;a<n;++a){var s=0,u=e[o+1][a],l=e[o+1][a+1],c=e[o][a+1],f=e[o][a];if(!(isNaN(u)||isNaN(l)||isNaN(c)||isNaN(f))){s|=u>=t?8:0,s|=l>=t?4:0,s|=c>=t?2:0;var h,p,d,y,g=!1;if(5==(s|=f>=t?1:0)||10===s){var v=(u+l+c+f)/4;5===s&&v<t?(s=10,g=!0):10===s&&v<t&&(s=5,g=!0)}0!==s&&15!==s&&(h=p=d=y=.5,1===s?(d=1-de(t,u,f),p=1-de(t,c,f)):2===s?(p=de(t,f,c),y=1-de(t,l,c)):3===s?(d=1-de(t,u,f),y=1-de(t,l,c)):4===s?(h=de(t,u,l),y=de(t,c,l)):5===s?(h=de(t,u,l),y=de(t,c,l),p=1-de(t,c,f),d=1-de(t,u,f)):6===s?(p=de(t,f,c),h=de(t,u,l)):7===s?(d=1-de(t,u,f),h=de(t,u,l)):8===s?(d=de(t,f,u),h=1-de(t,l,u)):9===s?(p=1-de(t,c,f),h=1-de(t,l,u)):10===s?(h=1-de(t,l,u),y=1-de(t,l,c),p=de(t,f,c),d=de(t,f,u)):11===s?(h=1-de(t,l,u),y=1-de(t,l,c)):12===s?(d=de(t,f,u),y=de(t,c,l)):13===s?(p=1-de(t,c,f),y=de(t,c,l)):14===s?(d=de(t,f,u),p=de(t,f,c)):console.log("MarchingSquaresJS-isoContours: Illegal cval detected: "+s),i.cells[o][a]={cval:s,flipped:g,top:h,right:y,bottom:p,left:d})}}}return i}(e,t));return"function"==typeof he.successCallback&&he.successCallback(s),s}function de(e,t,r){return(e-t)/(r-t)}function ye(e){return 0===e.cval||15===e.cval}function ge(e){ye(e)||5===e.cval||10===e.cval||(e.cval=15)}function ve(e,t){return"top"===t?[e.top,1]:"bottom"===t?[e.bottom,0]:"right"===t?[1,e.right]:"left"===t?[0,e.left]:void 0}var me=be,_e=be;function be(e,t,r,n,i){!function e(t,r,n,i,o){for(;i>n;){if(i-n>600){var a=i-n+1,s=r-n+1,u=Math.log(a),l=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*l*(a-l)/a)*(s-a/2<0?-1:1);e(t,r,Math.max(n,Math.floor(r-s*l/a+c)),Math.min(i,Math.floor(r+(a-s)*l/a+c)),o)}var f=t[r],h=n,p=i;for(Se(t,n,r),o(t[i],f)>0&&Se(t,n,i);h<p;){for(Se(t,h,p),h++,p--;o(t[h],f)<0;)h++;for(;o(t[p],f)>0;)p--}0===o(t[n],f)?Se(t,n,p):Se(t,++p,i),p<=r&&(n=p+1),r<=p&&(i=p-1)}}(e,t,r||0,n||e.length-1,i||xe)}function Se(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function xe(e,t){return e<t?-1:e>t?1:0}me.default=_e;var we=Pe,Oe=Pe;function Pe(e,t){if(!(this instanceof Pe))return new Pe(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function Ee(e,t,r){if(!r)return t.indexOf(e);for(var n=0;n<t.length;n++)if(r(e,t[n]))return n;return-1}function ke(e,t){Te(e,0,e.children.length,t,e)}function Te(e,t,r,n,i){i||(i=Ge(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o,a=t;a<r;a++)o=e.children[a],Me(i,e.leaf?n(o):o);return i}function Me(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function Ie(e,t){return e.minX-t.minX}function Le(e,t){return e.minY-t.minY}function Ce(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function Ne(e){return e.maxX-e.minX+(e.maxY-e.minY)}function Re(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function je(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function Ge(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Ve(e,t,r,n,i){for(var o,a=[t,r];a.length;)(r=a.pop())-(t=a.pop())<=n||(o=t+Math.ceil((r-t)/n/2)*n,me(e,o,t,r,i),a.push(t,o,o,r))}function Ae(e){var t={exports:{}};return e(t,t.exports),t.exports}Pe.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,r=[],n=this.toBBox;if(!je(e,t))return r;for(var i,o,a,s,u=[];t;){for(i=0,o=t.children.length;i<o;i++)a=t.children[i],je(e,s=t.leaf?n(a):a)&&(t.leaf?r.push(a):Re(e,s)?this._all(a,r):u.push(a));t=u.pop()}return r},collides:function(e){var t=this.data,r=this.toBBox;if(!je(e,t))return!1;for(var n,i,o,a,s=[];t;){for(n=0,i=t.children.length;n<i;n++)if(o=t.children[n],je(e,a=t.leaf?r(o):o)){if(t.leaf||Re(e,a))return!0;s.push(o)}t=s.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var i=this.data;this.data=n,n=i}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=Ge([]),this},remove:function(e,t){if(!e)return this;for(var r,n,i,o,a=this.data,s=this.toBBox(e),u=[],l=[];a||u.length;){if(a||(a=u.pop(),n=u[u.length-1],r=l.pop(),o=!0),a.leaf&&-1!==(i=Ee(e,a.children,t)))return a.children.splice(i,1),u.push(a),this._condense(u),this;o||a.leaf||!Re(a,s)?n?(r++,a=n.children[r],o=!1):a=null:(u.push(a),l.push(r),r=0,n=a,a=a.children[0])}return this},toBBox:function(e){return e},compareMinX:Ie,compareMinY:Le,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var r=[];e;)e.leaf?t.push.apply(t,e.children):r.push.apply(r,e.children),e=r.pop();return t},_build:function(e,t,r,n){var i,o=r-t+1,a=this._maxEntries;if(o<=a)return ke(i=Ge(e.slice(t,r+1)),this.toBBox),i;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(i=Ge([])).leaf=!1,i.height=n;var s,u,l,c,f=Math.ceil(o/a),h=f*Math.ceil(Math.sqrt(a));for(Ve(e,t,r,h,this.compareMinX),s=t;s<=r;s+=h)for(Ve(e,s,l=Math.min(s+h-1,r),f,this.compareMinY),u=s;u<=l;u+=f)c=Math.min(u+f-1,l),i.children.push(this._build(e,u,c,n-1));return ke(i,this.toBBox),i},_chooseSubtree:function(e,t,r,n){for(var i,o,a,s,u,l,c,f,h,p;n.push(t),!t.leaf&&n.length-1!==r;){for(c=f=1/0,i=0,o=t.children.length;i<o;i++)u=Ce(a=t.children[i]),h=e,p=a,(l=(Math.max(p.maxX,h.maxX)-Math.min(p.minX,h.minX))*(Math.max(p.maxY,h.maxY)-Math.min(p.minY,h.minY))-u)<f?(f=l,c=u<c?u:c,s=a):l===f&&u<c&&(c=u,s=a);t=s||t.children[0]}return t},_insert:function(e,t,r){var n=this.toBBox,i=r?e:n(e),o=[],a=this._chooseSubtree(i,this.data,t,o);for(a.children.push(e),Me(a,i);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(i,o,t)},_split:function(e,t){var r=e[t],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);var o=this._chooseSplitIndex(r,i,n),a=Ge(r.children.splice(o,r.children.length-o));a.height=r.height,a.leaf=r.leaf,ke(r,this.toBBox),ke(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(r,a)},_splitRoot:function(e,t){this.data=Ge([e,t]),this.data.height=e.height+1,this.data.leaf=!1,ke(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,r){var n,i,o,a,s,u,l,c,f,h,p,d,y,g;for(u=l=1/0,n=t;n<=r-t;n++)i=Te(e,0,n,this.toBBox),o=Te(e,n,r,this.toBBox),f=i,h=o,p=void 0,d=void 0,y=void 0,g=void 0,p=Math.max(f.minX,h.minX),d=Math.max(f.minY,h.minY),y=Math.min(f.maxX,h.maxX),g=Math.min(f.maxY,h.maxY),a=Math.max(0,y-p)*Math.max(0,g-d),s=Ce(i)+Ce(o),a<u?(u=a,c=n,l=s<l?s:l):a===u&&s<l&&(l=s,c=n);return c},_chooseSplitAxis:function(e,t,r){var n=e.leaf?this.compareMinX:Ie,i=e.leaf?this.compareMinY:Le;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,i)&&e.children.sort(n)},_allDistMargin:function(e,t,r,n){e.children.sort(n);var i,o,a=this.toBBox,s=Te(e,0,t,a),u=Te(e,r-t,r,a),l=Ne(s)+Ne(u);for(i=t;i<r-t;i++)o=e.children[i],Me(s,e.leaf?a(o):o),l+=Ne(s);for(i=r-t-1;i>=t;i--)o=e.children[i],Me(u,e.leaf?a(o):o),l+=Ne(u);return l},_adjustParentBBoxes:function(e,t,r){for(var n=r;n>=0;n--)Me(t[n],e)},_condense:function(e){for(var t,r=e.length-1;r>=0;r--)0===e[r].children.length?r>0?(t=e[r-1].children).splice(t.indexOf(e[r]),1):this.clear():ke(e[r],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}},we.default=Oe;var De=function(e,t,r){var n=e*t,i=Fe*e,o=i-(i-e),a=e-o,s=Fe*t,u=s-(s-t),l=t-u,c=a*l-(n-o*u-a*u-o*l);return r?(r[0]=c,r[1]=n,r):[c,n]},Fe=+(Math.pow(2,27)+1),Be=function(e,t){var r=0|e.length,n=0|t.length;if(1===r&&1===n)return function(e,t){var r=e+t,n=r-e,i=e-(r-n)+(t-n);return i?[i,r]:[r]}(e[0],t[0]);var i,o,a=new Array(r+n),s=0,u=0,l=0,c=Math.abs,f=e[u],h=c(f),p=t[l],d=c(p);h<d?(o=f,(u+=1)<r&&(f=e[u],h=c(f))):(o=p,(l+=1)<n&&(p=t[l],d=c(p))),u<r&&h<d||l>=n?(i=f,(u+=1)<r&&(f=e[u],h=c(f))):(i=p,(l+=1)<n&&(p=t[l],d=c(p)));for(var y,g,v=i+o,m=v-i,_=o-m,b=_,S=v;u<r&&l<n;)h<d?(i=f,(u+=1)<r&&(f=e[u],h=c(f))):(i=p,(l+=1)<n&&(p=t[l],d=c(p))),(_=(o=b)-(m=(v=i+o)-i))&&(a[s++]=_),b=S-((y=S+v)-(g=y-S))+(v-g),S=y;for(;u<r;)(_=(o=b)-(m=(v=(i=f)+o)-i))&&(a[s++]=_),b=S-((y=S+v)-(g=y-S))+(v-g),S=y,(u+=1)<r&&(f=e[u]);for(;l<n;)(_=(o=b)-(m=(v=(i=p)+o)-i))&&(a[s++]=_),b=S-((y=S+v)-(g=y-S))+(v-g),S=y,(l+=1)<n&&(p=t[l]);return b&&(a[s++]=b),S&&(a[s++]=S),s||(a[s++]=0),a.length=s,a},qe=function(e,t,r){var n=e+t,i=n-e,o=t-i,a=e-(n-i);return r?(r[0]=a+o,r[1]=n,r):[a+o,n]},Je=function(e,t){var r=e.length;if(1===r){var n=De(e[0],t);return n[0]?n:[n[1]]}var i=new Array(2*r),o=[.1,.1],a=[.1,.1],s=0;De(e[0],t,o),o[0]&&(i[s++]=o[0]);for(var u=1;u<r;++u){De(e[u],t,a);var l=o[1];qe(l,a[0],o),o[0]&&(i[s++]=o[0]);var c=a[1],f=o[1],h=c+f,p=f-(h-c);o[1]=h,p&&(i[s++]=p)}return o[1]&&(i[s++]=o[1]),0===s&&(i[s++]=0),i.length=s,i},Ue=function(e,t){var r=0|e.length,n=0|t.length;if(1===r&&1===n)return function(e,t){var r=e+t,n=r-e,i=e-(r-n)+(t-n);return i?[i,r]:[r]}(e[0],-t[0]);var i,o,a=new Array(r+n),s=0,u=0,l=0,c=Math.abs,f=e[u],h=c(f),p=-t[l],d=c(p);h<d?(o=f,(u+=1)<r&&(f=e[u],h=c(f))):(o=p,(l+=1)<n&&(p=-t[l],d=c(p))),u<r&&h<d||l>=n?(i=f,(u+=1)<r&&(f=e[u],h=c(f))):(i=p,(l+=1)<n&&(p=-t[l],d=c(p)));for(var y,g,v=i+o,m=v-i,_=o-m,b=_,S=v;u<r&&l<n;)h<d?(i=f,(u+=1)<r&&(f=e[u],h=c(f))):(i=p,(l+=1)<n&&(p=-t[l],d=c(p))),(_=(o=b)-(m=(v=i+o)-i))&&(a[s++]=_),b=S-((y=S+v)-(g=y-S))+(v-g),S=y;for(;u<r;)(_=(o=b)-(m=(v=(i=f)+o)-i))&&(a[s++]=_),b=S-((y=S+v)-(g=y-S))+(v-g),S=y,(u+=1)<r&&(f=e[u]);for(;l<n;)(_=(o=b)-(m=(v=(i=p)+o)-i))&&(a[s++]=_),b=S-((y=S+v)-(g=y-S))+(v-g),S=y,(l+=1)<n&&(p=-t[l]);return b&&(a[s++]=b),S&&(a[s++]=S),s||(a[s++]=0),a.length=s,a},ze=Ae(function(e){function t(e,t){for(var r=new Array(e.length-1),n=1;n<e.length;++n)for(var i=r[n-1]=new Array(e.length-1),o=0,a=0;o<e.length;++o)o!==t&&(i[a++]=e[n][o]);return r}function r(e){if(1===e.length)return e[0];if(2===e.length)return["sum(",e[0],",",e[1],")"].join("");var t=e.length>>1;return["sum(",r(e.slice(0,t)),",",r(e.slice(t)),")"].join("")}function n(e){if(2===e.length)return[["sum(prod(",e[0][0],",",e[1][1],"),prod(-",e[0][1],",",e[1][0],"))"].join("")];for(var i=[],o=0;o<e.length;++o)i.push(["scale(",r(n(t(e,o))),",",(a=o,1&a?"-":""),e[0][o],")"].join(""));return i;var a}function i(e){for(var i=[],o=[],a=function(e){for(var t=new Array(e),r=0;r<e;++r){t[r]=new Array(e);for(var n=0;n<e;++n)t[r][n]=["m",n,"[",e-r-1,"]"].join("")}return t}(e),s=[],u=0;u<e;++u)0==(1&u)?i.push.apply(i,n(t(a,u))):o.push.apply(o,n(t(a,u))),s.push("m"+u);var l=r(i),c=r(o),f="orientation"+e+"Exact",h=["function ",f,"(",s.join(),"){var p=",l,",n=",c,",d=sub(p,n);return d[d.length-1];};return ",f].join("");return new Function("sum","prod","scale","sub",h)(Be,De,Je,Ue)}var o=i(3),a=i(4),s=[function(){return 0},function(){return 0},function(e,t){return t[0]-e[0]},function(e,t,r){var n,i=(e[1]-r[1])*(t[0]-r[0]),a=(e[0]-r[0])*(t[1]-r[1]),s=i-a;if(i>0){if(a<=0)return s;n=i+a}else{if(!(i<0))return s;if(a>=0)return s;n=-(i+a)}var u=3.3306690738754716e-16*n;return s>=u||s<=-u?s:o(e,t,r)},function(e,t,r,n){var i=e[0]-n[0],o=t[0]-n[0],s=r[0]-n[0],u=e[1]-n[1],l=t[1]-n[1],c=r[1]-n[1],f=e[2]-n[2],h=t[2]-n[2],p=r[2]-n[2],d=o*c,y=s*l,g=s*u,v=i*c,m=i*l,_=o*u,b=f*(d-y)+h*(g-v)+p*(m-_),S=7.771561172376103e-16*((Math.abs(d)+Math.abs(y))*Math.abs(f)+(Math.abs(g)+Math.abs(v))*Math.abs(h)+(Math.abs(m)+Math.abs(_))*Math.abs(p));return b>S||-b>S?b:a(e,t,r,n)}];!function(){for(;s.length<=5;)s.push(i(s.length));for(var t=[],r=["slow"],n=0;n<=5;++n)t.push("a"+n),r.push("o"+n);var o=["function getOrientation(",t.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(n=2;n<=5;++n)o.push("case ",n,":return o",n,"(",t.slice(0,n).join(),");");o.push("}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return getOrientation"),r.push(o.join(""));var a=Function.apply(void 0,r);for(e.exports=a.apply(void 0,[function(e){var t=s[e.length];return t||(t=s[e.length]=i(e.length)),t.apply(void 0,e)}].concat(s)),n=0;n<=5;++n)e.exports[n]=s[n]}()}),We=function(e){var t=e.length;if(t<3){for(var r=new Array(t),n=0;n<t;++n)r[n]=n;return 2===t&&e[0][0]===e[1][0]&&e[0][1]===e[1][1]?[0]:r}var i=new Array(t);for(n=0;n<t;++n)i[n]=n;i.sort(function(t,r){var n=e[t][0]-e[r][0];return n||e[t][1]-e[r][1]});var o=[i[0],i[1]],a=[i[0],i[1]];for(n=2;n<t;++n){for(var s=i[n],u=e[s],l=o.length;l>1&&He(e[o[l-2]],e[o[l-1]],u)<=0;)l-=1,o.pop();for(o.push(s),l=a.length;l>1&&He(e[a[l-2]],e[a[l-1]],u)>=0;)l-=1,a.pop();a.push(s)}r=new Array(a.length+o.length-2);for(var c=0,f=(n=0,o.length);n<f;++n)r[c++]=o[n];for(var h=a.length-2;h>0;--h)r[c++]=a[h];return r},He=ze[3],Xe=Ye,Ze=Ye;function Ye(e,t){if(!(this instanceof Ye))return new Ye(e,t);if(this.data=e||[],this.length=this.data.length,this.compare=t||Ke,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)}function Ke(e,t){return e<t?-1:e>t?1:0}Ye.prototype={push:function(e){this.data.push(e),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var e=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),e}},peek:function(){return this.data[0]},_up:function(e){for(var t=this.data,r=this.compare,n=t[e];e>0;){var i=e-1>>1,o=t[i];if(r(n,o)>=0)break;t[e]=o,e=i}t[e]=n},_down:function(e){for(var t=this.data,r=this.compare,n=this.length>>1,i=t[e];e<n;){var o=1+(e<<1),a=o+1,s=t[o];if(a<this.length&&r(t[a],s)<0&&(o=a,s=t[a]),r(s,i)>=0)break;t[e]=s,e=o}t[e]=i}},Xe.default=Ze;var Qe=function(e,t){for(var r=e[0],n=e[1],i=!1,o=0,a=t.length-1;o<t.length;a=o++){var s=t[o][0],u=t[o][1],l=t[a][0],c=t[a][1];u>n!=c>n&&r<(l-s)*(n-u)/(c-u)+s&&(i=!i)}return i},$e=ze[3],et=rt,tt=rt;function rt(e,t,r){t=Math.max(0,void 0===t?2:t),r=r||0;for(var n,i=function(e){for(var t=e[0],r=e[0],n=e[0],i=e[0],o=0;o<e.length;o++){var a=e[o];a[0]<t[0]&&(t=a),a[0]>n[0]&&(n=a),a[1]<r[1]&&(r=a),a[1]>i[1]&&(i=a)}var s=[t,r,n,i],u=s.slice();for(o=0;o<e.length;o++)Qe(e[o],s)||u.push(e[o]);var l=We(u),c=[];for(o=0;o<l.length;o++)c.push(u[l[o]]);return c}(e),o=we(16,["[0]","[1]","[0]","[1]"]).load(e),a=[],s=0;s<i.length;s++){var u=i[s];o.remove(u),n=lt(u,n),a.push(n)}var l=we(16);for(s=0;s<a.length;s++)l.insert(ut(a[s]));for(var c=t*t,f=r*r;a.length;){var h=a.shift(),p=h.p,d=h.next.p,y=ct(p,d);if(!(y<f)){var g=y/c;(u=nt(o,h.prev.p,p,d,h.next.next.p,g,l))&&Math.min(ct(u,p),ct(u,d))<=g&&(a.push(h),a.push(lt(u,h)),o.remove(u),l.remove(h),l.insert(ut(h)),l.insert(ut(h.next)))}}h=n;var v=[];do{v.push(h.p),h=h.next}while(h!==n);return v.push(h.p),v}function nt(e,t,r,n,i,o,a){for(var s=new Xe(null,it),u=e.data;u;){for(var l=0;l<u.children.length;l++){var c=u.children[l],f=u.leaf?ft(c,r,n):ot(r,n,c);f>o||s.push({node:c,dist:f})}for(;s.length&&!s.peek().node.children;){var h=s.pop(),p=h.node,d=ft(p,t,r),y=ft(p,n,i);if(h.dist<d&&h.dist<y&&st(r,p,a)&&st(n,p,a))return p}(u=s.pop())&&(u=u.node)}return null}function it(e,t){return e.dist-t.dist}function ot(e,t,r){if(at(e,r)||at(t,r))return 0;var n=ht(e[0],e[1],t[0],t[1],r.minX,r.minY,r.maxX,r.minY);if(0===n)return 0;var i=ht(e[0],e[1],t[0],t[1],r.minX,r.minY,r.minX,r.maxY);if(0===i)return 0;var o=ht(e[0],e[1],t[0],t[1],r.maxX,r.minY,r.maxX,r.maxY);if(0===o)return 0;var a=ht(e[0],e[1],t[0],t[1],r.minX,r.maxY,r.maxX,r.maxY);return 0===a?0:Math.min(n,i,o,a)}function at(e,t){return e[0]>=t.minX&&e[0]<=t.maxX&&e[1]>=t.minY&&e[1]<=t.maxY}function st(e,t,r){for(var n,i,o,a,s=Math.min(e[0],t[0]),u=Math.min(e[1],t[1]),l=Math.max(e[0],t[0]),c=Math.max(e[1],t[1]),f=r.search({minX:s,minY:u,maxX:l,maxY:c}),h=0;h<f.length;h++)if(n=f[h].p,i=f[h].next.p,o=e,n!==(a=t)&&i!==o&&$e(n,i,o)>0!=$e(n,i,a)>0&&$e(o,a,n)>0!=$e(o,a,i)>0)return!1;return!0}function ut(e){var t=e.p,r=e.next.p;return e.minX=Math.min(t[0],r[0]),e.minY=Math.min(t[1],r[1]),e.maxX=Math.max(t[0],r[0]),e.maxY=Math.max(t[1],r[1]),e}function lt(e,t){var r={p:e,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return t?(r.next=t.next,r.prev=t,t.next.prev=r,t.next=r):(r.prev=r,r.next=r),r}function ct(e,t){var r=e[0]-t[0],n=e[1]-t[1];return r*r+n*n}function ft(e,t,r){var n=t[0],i=t[1],o=r[0]-n,a=r[1]-i;if(0!==o||0!==a){var s=((e[0]-n)*o+(e[1]-i)*a)/(o*o+a*a);s>1?(n=r[0],i=r[1]):s>0&&(n+=o*s,i+=a*s)}return(o=e[0]-n)*o+(a=e[1]-i)*a}function ht(e,t,r,n,i,o,a,s){var u,l,c,f,h=r-e,p=n-t,d=a-i,y=s-o,g=e-i,v=t-o,m=h*h+p*p,_=h*d+p*y,b=d*d+y*y,S=h*g+p*v,x=d*g+y*v,w=m*b-_*_,O=w,P=w;0===w?(l=0,O=1,f=x,P=b):(f=m*x-_*S,(l=_*x-b*S)<0?(l=0,f=x,P=b):l>O&&(l=O,f=x+_,P=b)),f<0?(f=0,-S<0?l=0:-S>m?l=O:(l=-S,O=m)):f>P&&(f=P,-S+_<0?l=0:-S+_>m?l=O:(l=-S+_,O=m));var E=(1-(c=0===f?0:f/P))*i+c*a-((1-(u=0===l?0:l/O))*e+u*r),k=(1-c)*o+c*s-((1-u)*t+u*n);return E*E+k*k}function pt(e,t){void 0===t&&(t={}),t.concavity=t.concavity||1/0;var r=[];if(N(e,function(e){r.push([e[0],e[1]])}),!r.length)return null;var n=et(r,t.concavity);return n.length>3?c([n]):null}function dt(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var n=Q(e),i=ie(t),o=i.type,a=t.bbox,s=i.coordinates;if(a&&!1===function(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}(n,a))return!1;"Polygon"===o&&(s=[s]);for(var u=!1,l=0;l<s.length&&!u;l++)if(yt(n,s[l][0],r.ignoreBoundary)){for(var c=!1,f=1;f<s[l].length&&!c;)yt(n,s[l][f],!r.ignoreBoundary)&&(c=!0),f++;c||(u=!0)}return u}function yt(e,t,r){var n=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,o=t.length-1;i<t.length;o=i++){var a=t[i][0],s=t[i][1],u=t[o][0],l=t[o][1];if(e[1]*(a-u)+s*(u-e[0])+l*(e[0]-a)==0&&(a-e[0])*(u-e[0])<=0&&(s-e[1])*(l-e[1])<=0)return!r;s>e[1]!=l>e[1]&&e[0]<(u-a)*(e[1]-s)/(l-s)+a&&(n=!n)}return n}function gt(e,t){var r=[];return V(e,function(e){var n=!1;if("Point"===e.geometry.type)F(t,function(t){dt(e,t)&&(n=!0)}),n&&r.push(e);else{if("MultiPoint"!==e.geometry.type)throw new Error("Input geometry must be a Point or MultiPoint");var i=[];F(t,function(t){N(e,function(e){dt(e,t)&&(n=!0,i.push(e))})}),n&&r.push(g(i))}}),d(r)}function vt(e,t,r){void 0===r&&(r={});var n=Q(e),i=Q(t),o=P(i[1]-n[1]),a=P(i[0]-n[0]),s=P(n[1]),u=P(i[1]),l=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(u);return b(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),r.units)}function mt(e,t){var r=!1;return d(function(e){if(e.length<3)return[];e.sort(bt);for(var t,r,n,i,o,a,s=e.length-1,u=e[s].x,l=e[0].x,c=e[s].y,f=c;s--;)e[s].y<c&&(c=e[s].y),e[s].y>f&&(f=e[s].y);var h,p=l-u,d=f-c,y=p>d?p:d,g=.5*(l+u),v=.5*(f+c),m=[new _t({__sentinel:!0,x:g-20*y,y:v-y},{__sentinel:!0,x:g,y:v+20*y},{__sentinel:!0,x:g+20*y,y:v-y})],_=[],b=[];for(s=e.length;s--;){for(b.length=0,h=m.length;h--;)(p=e[s].x-m[h].x)>0&&p*p>m[h].r?(_.push(m[h]),m.splice(h,1)):p*p+(d=e[s].y-m[h].y)*d>m[h].r||(b.push(m[h].a,m[h].b,m[h].b,m[h].c,m[h].c,m[h].a),m.splice(h,1));for(St(b),h=b.length;h;)r=b[--h],t=b[--h],n=e[s],i=r.x-t.x,o=r.y-t.y,a=2*(i*(n.y-r.y)-o*(n.x-r.x)),Math.abs(a)>1e-12&&m.push(new _t(t,r,n))}for(Array.prototype.push.apply(_,m),s=_.length;s--;)(_[s].a.__sentinel||_[s].b.__sentinel||_[s].c.__sentinel)&&_.splice(s,1);return _}(e.features.map(function(e){var n={x:e.geometry.coordinates[0],y:e.geometry.coordinates[1]};return t?n.z=e.properties[t]:3===e.geometry.coordinates.length&&(r=!0,n.z=e.geometry.coordinates[2]),n})).map(function(e){var t=[e.a.x,e.a.y],n=[e.b.x,e.b.y],i=[e.c.x,e.c.y],o={};return r?(t.push(e.a.z),n.push(e.b.z),i.push(e.c.z)):o={a:e.a.z,b:e.b.z,c:e.c.z},c([[t,n,i,t]],o)}))}et.default=tt;var _t=function(e,t,r){this.a=e,this.b=t,this.c=r;var n,i,o=t.x-e.x,a=t.y-e.y,s=r.x-e.x,u=r.y-e.y,l=o*(e.x+t.x)+a*(e.y+t.y),c=s*(e.x+r.x)+u*(e.y+r.y),f=2*(o*(r.y-t.y)-a*(r.x-t.x));this.x=(u*l-a*c)/f,this.y=(o*c-s*l)/f,n=this.x-e.x,i=this.y-e.y,this.r=n*n+i*i};function bt(e,t){return t.x-e.x}function St(e){var t,r,n,i,o,a=e.length;e:for(;a;)for(r=e[--a],t=e[--a],n=a;n;)if(o=e[--n],t===(i=e[--n])&&r===o||t===o&&r===i){e.splice(a,2),e.splice(n,2),a-=2;continue e}}function xt(e){if(!e)throw new Error("geojson is required");switch(e.type){case"Feature":return wt(e);case"FeatureCollection":return function(e){var t={type:"FeatureCollection"};return Object.keys(e).forEach(function(r){switch(r){case"type":case"features":return;default:t[r]=e[r]}}),t.features=e.features.map(function(e){return wt(e)}),t}(e);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return Ot(e);default:throw new Error("unknown GeoJSON type")}}function wt(e){var t={type:"Feature"};return Object.keys(e).forEach(function(r){switch(r){case"type":case"properties":case"geometry":return;default:t[r]=e[r]}}),t.properties=function e(t){var r={};return t?(Object.keys(t).forEach(function(n){var i=t[n];"object"==typeof i?null===i?r[n]=null:Array.isArray(i)?r[n]=i.map(function(e){return e}):r[n]=e(i):r[n]=i}),r):r}(e.properties),t.geometry=Ot(e.geometry),t}function Ot(e){var t={type:e.type};return e.bbox&&(t.bbox=e.bbox),"GeometryCollection"===e.type?(t.geometries=e.geometries.map(function(e){return Ot(e)}),t):(t.coordinates=function e(t){var r=t;return"object"!=typeof r[0]?r.slice():r.map(function(t){return e(t)})}(e.coordinates),t)}function Pt(e){return e[0].toString()+","+e[1].toString()}function Et(e){return e}function kt(e,t){var r=function(e){if(null==e)return Et;var t,r,n=e.scale[0],i=e.scale[1],o=e.translate[0],a=e.translate[1];return function(e,s){s||(t=r=0);var u=2,l=e.length,c=new Array(l);for(c[0]=(t+=e[0])*n+o,c[1]=(r+=e[1])*i+a;u<l;)c[u]=e[u],++u;return c}}(e.transform),n=e.arcs;function i(e,t){t.length&&t.pop();for(var i=n[e<0?~e:e],o=0,a=i.length;o<a;++o)t.push(r(i[o],o));e<0&&function(e,t){for(var r,n=e.length,i=n-t;i<--n;)r=e[i],e[i++]=e[n],e[n]=r}(t,a)}function o(e){return r(e)}function a(e){for(var t=[],r=0,n=e.length;r<n;++r)i(e[r],t);return t.length<2&&t.push(t[0]),t}function s(e){for(var t=a(e);t.length<4;)t.push(t[0]);return t}function u(e){return e.map(s)}return function e(t){var r,n=t.type;switch(n){case"GeometryCollection":return{type:n,geometries:t.geometries.map(e)};case"Point":r=o(t.coordinates);break;case"MultiPoint":r=t.coordinates.map(o);break;case"LineString":r=a(t.arcs);break;case"MultiLineString":r=t.arcs.map(a);break;case"Polygon":r=u(t.arcs);break;case"MultiPolygon":r=t.arcs.map(u);break;default:return null}return{type:n,coordinates:r}}(t)}var Tt=Object.prototype.hasOwnProperty;function Mt(e,t,r,n,i,o){3===arguments.length&&(n=o=Array,i=null);for(var a=new n(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),s=new o(e),u=e-1,l=0;l<e;++l)a[l]=i;return{set:function(n,o){for(var l=t(n)&u,c=a[l],f=0;c!=i;){if(r(c,n))return s[l]=o;if(++f>=e)throw new Error("full hashmap");c=a[l=l+1&u]}return a[l]=n,s[l]=o,o},maybeSet:function(n,o){for(var l=t(n)&u,c=a[l],f=0;c!=i;){if(r(c,n))return s[l];if(++f>=e)throw new Error("full hashmap");c=a[l=l+1&u]}return a[l]=n,s[l]=o,o},get:function(n,o){for(var l=t(n)&u,c=a[l],f=0;c!=i;){if(r(c,n))return s[l];if(++f>=e)break;c=a[l=l+1&u]}return o},keys:function(){for(var e=[],t=0,r=a.length;t<r;++t){var n=a[t];n!=i&&e.push(n)}return e}}}function It(e,t){return e[0]===t[0]&&e[1]===t[1]}var Lt=new ArrayBuffer(16),Ct=new Float64Array(Lt),Nt=new Uint32Array(Lt);function Rt(e){Ct[0]=e[0],Ct[1]=e[1];var t=Nt[0]^Nt[1];return 2147483647&(t=t<<5^t>>7^Nt[2]^Nt[3])}function jt(e,t,r,n){Gt(e,t,r),Gt(e,t,t+n),Gt(e,t+n,r)}function Gt(e,t,r){for(var n,i=t+(r---t>>1);t<i;++t,--r)n=e[t],e[t]=e[r],e[r]=n}function Vt(e){var t={type:"GeometryCollection",geometries:e.features.map(At)};return null!=e.bbox&&(t.bbox=e.bbox),t}function At(e){var t,r=Dt(e.geometry);for(t in null!=e.id&&(r.id=e.id),null!=e.bbox&&(r.bbox=e.bbox),e.properties){r.properties=e.properties;break}return r}function Dt(e){if(null==e)return{type:null};var t="GeometryCollection"===e.type?{type:"GeometryCollection",geometries:e.geometries.map(Dt)}:"Point"===e.type||"MultiPoint"===e.type?{type:e.type,coordinates:e.coordinates}:{type:e.type,arcs:e.coordinates};return null!=e.bbox&&(t.bbox=e.bbox),t}function Ft(e,t){var r=function(e){var t=1/0,r=1/0,n=-1/0,i=-1/0;function o(e){null!=e&&Tt.call(a,e.type)&&a[e.type](e)}var a={GeometryCollection:function(e){e.geometries.forEach(o)},Point:function(e){s(e.coordinates)},MultiPoint:function(e){e.coordinates.forEach(s)},LineString:function(e){u(e.arcs)},MultiLineString:function(e){e.arcs.forEach(u)},Polygon:function(e){e.arcs.forEach(u)},MultiPolygon:function(e){e.arcs.forEach(l)}};function s(e){var o=e[0],a=e[1];o<t&&(t=o),o>n&&(n=o),a<r&&(r=a),a>i&&(i=a)}function u(e){e.forEach(s)}function l(e){e.forEach(u)}for(var c in e)o(e[c]);return n>=t&&i>=r?[t,r,n,i]:void 0}(e=function(e){var t,r,n={};for(t in e)n[t]=null==(r=e[t])?{type:null}:("FeatureCollection"===r.type?Vt:"Feature"===r.type?At:Dt)(r);return n}(e)),n=t>0&&r&&function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=o-n?(r-1)/(o-n):1,u=a-i?(r-1)/(a-i):1;function l(e){return[Math.round((e[0]-n)*s),Math.round((e[1]-i)*u)]}function c(e,t){for(var r,o,a,l,c,f=-1,h=0,p=e.length,d=new Array(p);++f<p;)r=e[f],l=Math.round((r[0]-n)*s),c=Math.round((r[1]-i)*u),l===o&&c===a||(d[h++]=[o=l,a=c]);for(d.length=h;h<t;)h=d.push([d[0][0],d[0][1]]);return d}function f(e){return c(e,2)}function h(e){return c(e,4)}function p(e){return e.map(h)}function d(e){null!=e&&Tt.call(y,e.type)&&y[e.type](e)}var y={GeometryCollection:function(e){e.geometries.forEach(d)},Point:function(e){e.coordinates=l(e.coordinates)},MultiPoint:function(e){e.coordinates=e.coordinates.map(l)},LineString:function(e){e.arcs=f(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(f)},Polygon:function(e){e.arcs=p(e.arcs)},MultiPolygon:function(e){e.arcs=e.arcs.map(p)}};for(var g in e)d(e[g]);return{scale:[1/s,1/u],translate:[n,i]}}(e,r,t),i=function(e){var t,r,n,i,o=e.coordinates,a=e.lines,s=e.rings,u=a.length+s.length;for(delete e.lines,delete e.rings,n=0,i=a.length;n<i;++n)for(t=a[n];t=t.next;)++u;for(n=0,i=s.length;n<i;++n)for(r=s[n];r=r.next;)++u;var l=Mt(2*u*1.4,Rt,It),c=e.arcs=[];for(n=0,i=a.length;n<i;++n){t=a[n];do{f(t)}while(t=t.next)}for(n=0,i=s.length;n<i;++n)if((r=s[n]).next)do{f(r)}while(r=r.next);else h(r);function f(e){var t,r,n,i,a,s,u,f;if(n=l.get(t=o[e[0]]))for(u=0,f=n.length;u<f;++u)if(p(i=n[u],e))return e[0]=i[0],void(e[1]=i[1]);if(a=l.get(r=o[e[1]]))for(u=0,f=a.length;u<f;++u)if(d(s=a[u],e))return e[1]=s[0],void(e[0]=s[1]);n?n.push(e):l.set(t,[e]),a?a.push(e):l.set(r,[e]),c.push(e)}function h(e){var t,r,n,i,a;if(r=l.get(o[e[0]]))for(i=0,a=r.length;i<a;++i){if(y(n=r[i],e))return e[0]=n[0],void(e[1]=n[1]);if(g(n,e))return e[0]=n[1],void(e[1]=n[0])}if(r=l.get(t=o[e[0]+v(e)]))for(i=0,a=r.length;i<a;++i){if(y(n=r[i],e))return e[0]=n[0],void(e[1]=n[1]);if(g(n,e))return e[0]=n[1],void(e[1]=n[0])}r?r.push(e):l.set(t,[e]),c.push(e)}function p(e,t){var r=e[0],n=t[0],i=e[1];if(r-i!=n-t[1])return!1;for(;r<=i;++r,++n)if(!It(o[r],o[n]))return!1;return!0}function d(e,t){var r=e[0],n=t[0],i=e[1],a=t[1];if(r-i!=n-a)return!1;for(;r<=i;++r,--a)if(!It(o[r],o[a]))return!1;return!0}function y(e,t){var r=e[0],n=t[0],i=e[1]-r;if(i!==t[1]-n)return!1;for(var a=v(e),s=v(t),u=0;u<i;++u)if(!It(o[r+(u+a)%i],o[n+(u+s)%i]))return!1;return!0}function g(e,t){var r=e[0],n=t[0],i=e[1],a=t[1],s=i-r;if(s!==a-n)return!1;for(var u=v(e),l=s-v(t),c=0;c<s;++c)if(!It(o[r+(c+u)%s],o[a-(c+l)%s]))return!1;return!0}function v(e){for(var t=e[0],r=e[1],n=t,i=n,a=o[n];++n<r;){var s=o[n];(s[0]<a[0]||s[0]===a[0]&&s[1]<a[1])&&(i=n,a=s)}return i-t}return e}(function(e){var t,r,n,i=function(e){var t,r,n,i,o=e.coordinates,a=e.lines,s=e.rings,u=function(){for(var e=Mt(1.4*o.length,S,x,Int32Array,-1,Int32Array),t=new Int32Array(o.length),r=0,n=o.length;r<n;++r)t[r]=e.maybeSet(r,r);return t}(),l=new Int32Array(o.length),c=new Int32Array(o.length),f=new Int32Array(o.length),h=new Int8Array(o.length),p=0;for(t=0,r=o.length;t<r;++t)l[t]=c[t]=f[t]=-1;for(t=0,r=a.length;t<r;++t){var d=a[t],y=d[0],g=d[1];for(n=u[y],i=u[++y],++p,h[n]=1;++y<=g;)b(t,n,n=i,i=u[y]);++p,h[i]=1}for(t=0,r=o.length;t<r;++t)l[t]=-1;for(t=0,r=s.length;t<r;++t){var v=s[t],m=v[0]+1,_=v[1];for(b(t,u[_-1],n=u[m-1],i=u[m]);++m<=_;)b(t,n,n=i,i=u[m])}function b(e,t,r,n){if(l[r]!==e){l[r]=e;var i=c[r];if(i>=0){var o=f[r];i===t&&o===n||i===n&&o===t||(++p,h[r]=1)}else c[r]=t,f[r]=n}}function S(e){return Rt(o[e])}function x(e,t){return It(o[e],o[t])}l=c=f=null;var w,O=function(e,t,r,n,i){3===arguments.length&&(n=Array,i=null);for(var o=new n(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),a=e-1,s=0;s<e;++s)o[s]=i;return{add:function(n){for(var s=t(n)&a,u=o[s],l=0;u!=i;){if(r(u,n))return!0;if(++l>=e)throw new Error("full hashset");u=o[s=s+1&a]}return o[s]=n,!0},has:function(n){for(var s=t(n)&a,u=o[s],l=0;u!=i;){if(r(u,n))return!0;if(++l>=e)break;u=o[s=s+1&a]}return!1},values:function(){for(var e=[],t=0,r=o.length;t<r;++t){var n=o[t];n!=i&&e.push(n)}return e}}}(1.4*p,Rt,It);for(t=0,r=o.length;t<r;++t)h[w=u[t]]&&O.add(o[w]);return O}(e),o=e.coordinates,a=e.lines,s=e.rings;for(r=0,n=a.length;r<n;++r)for(var u=a[r],l=u[0],c=u[1];++l<c;)i.has(o[l])&&(t={0:l,1:u[1]},u[1]=l,u=u.next=t);for(r=0,n=s.length;r<n;++r)for(var f=s[r],h=f[0],p=h,d=f[1],y=i.has(o[h]);++p<d;)i.has(o[p])&&(y?(t={0:p,1:f[1]},f[1]=p,f=f.next=t):(jt(o,h,d,d-p),o[d]=o[h],y=!0,p=h));return e}(function(e){var t=-1,r=[],n=[],i=[];function o(e){e&&Tt.call(a,e.type)&&a[e.type](e)}var a={GeometryCollection:function(e){e.geometries.forEach(o)},LineString:function(e){e.arcs=s(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(s)},Polygon:function(e){e.arcs=e.arcs.map(u)},MultiPolygon:function(e){e.arcs=e.arcs.map(l)}};function s(e){for(var n=0,o=e.length;n<o;++n)i[++t]=e[n];var a={0:t-o+1,1:t};return r.push(a),a}function u(e){for(var r=0,o=e.length;r<o;++r)i[++t]=e[r];var a={0:t-o+1,1:t};return n.push(a),a}function l(e){return e.map(u)}for(var c in e)o(e[c]);return{type:"Topology",coordinates:i,lines:r,rings:n,objects:e}}(e))),o=i.coordinates,a=Mt(1.4*i.arcs.length,Bt,qt);function s(e){e&&Tt.call(u,e.type)&&u[e.type](e)}e=i.objects,i.bbox=r,i.arcs=i.arcs.map(function(e,t){return a.set(e,t),o.slice(e[0],e[1]+1)}),delete i.coordinates,o=null;var u={GeometryCollection:function(e){e.geometries.forEach(s)},LineString:function(e){e.arcs=l(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(l)},Polygon:function(e){e.arcs=e.arcs.map(l)},MultiPolygon:function(e){e.arcs=e.arcs.map(c)}};function l(e){var t=[];do{var r=a.get(e);t.push(e[0]<e[1]?r:~r)}while(e=e.next);return t}function c(e){return e.map(l)}for(var f in e)s(e[f]);return n&&(i.transform=n,i.arcs=function(e){for(var t=-1,r=e.length;++t<r;){for(var n,i,o=e[t],a=0,s=1,u=o.length,l=o[0],c=l[0],f=l[1];++a<u;)n=(l=o[a])[0],i=l[1],n===c&&i===f||(o[s++]=[n-c,i-f],c=n,f=i);1===s&&(o[s++]=[0,0]),o.length=s}return e}(i.arcs)),i}function Bt(e){var t,r=e[0],n=e[1];return n<r&&(t=r,r=n,n=t),r+31*n}function qt(e,t){var r,n=e[0],i=e[1],o=t[0],a=t[1];return i<n&&(r=n,n=i,i=r),a<o&&(r=o,o=a,a=r),n===o&&i===a}function Jt(e,t){if(void 0===t&&(t={}),"FeatureCollection"!==oe(e))throw new Error("geojson must be a FeatureCollection");if(!e.features.length)throw new Error("geojson is empty");!1!==t.mutate&&void 0!==t.mutate||(e=xt(e));var r=[];q(e,function(e){r.push(e.geometry)});var n=Ft({geoms:m(r).geometry});return function(e){return kt(e,function(e,t){var r={},n=[],i=[];function o(e){e.forEach(function(t){t.forEach(function(t){(r[t=t<0?~t:t]||(r[t]=[])).push(e)})}),n.push(e)}function a(t){return function(e){for(var t,r=-1,n=e.length,i=e[n-1],o=0;++r<n;)t=i,i=e[r],o+=t[0]*i[1]-t[1]*i[0];return Math.abs(o)}(kt(e,{type:"Polygon",arcs:[t]}).coordinates[0])}return t.forEach(function e(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"Polygon":o(t.arcs);break;case"MultiPolygon":t.arcs.forEach(o)}}),n.forEach(function(e){if(!e._){var t=[],n=[e];for(e._=1,i.push(t);e=n.pop();)t.push(e),e.forEach(function(e){e.forEach(function(e){r[e<0?~e:e].forEach(function(e){e._||(e._=1,n.push(e))})})})}}),n.forEach(function(e){delete e._}),{type:"MultiPolygon",arcs:i.map(function(t){var n,i=[];if(t.forEach(function(e){e.forEach(function(e){e.forEach(function(e){r[e<0?~e:e].length<2&&i.push(e)})})}),(n=(i=function(e,t){var r={},n={},i={},o=[],a=-1;function s(e,t){for(var n in e){var i=e[n];delete t[i.start],delete i.start,delete i.end,i.forEach(function(e){r[e<0?~e:e]=1}),o.push(i)}}return t.forEach(function(r,n){var i,o=e.arcs[r<0?~r:r];o.length<3&&!o[1][0]&&!o[1][1]&&(i=t[++a],t[a]=r,t[n]=i)}),t.forEach(function(t){var r,o,a=function(t){var r,n=e.arcs[t<0?~t:t],i=n[0];return e.transform?(r=[0,0],n.forEach(function(e){r[0]+=e[0],r[1]+=e[1]})):r=n[n.length-1],t<0?[r,i]:[i,r]}(t),s=a[0],u=a[1];if(r=i[s])if(delete i[r.end],r.push(t),r.end=u,o=n[u]){delete n[o.start];var l=o===r?r:r.concat(o);n[l.start=r.start]=i[l.end=o.end]=l}else n[r.start]=i[r.end]=r;else if(r=n[u])if(delete n[r.start],r.unshift(t),r.start=s,o=i[s]){delete i[o.end];var c=o===r?r:o.concat(r);n[c.start=o.start]=i[c.end=r.end]=c}else n[r.start]=i[r.end]=r;else n[(r=[t]).start=s]=i[r.end=u]=r}),s(i,n),s(n,i),t.forEach(function(e){r[e<0?~e:e]||o.push([e])}),o}(e,i)).length)>1)for(var o,s,u=1,l=a(i[0]);u<n;++u)(o=a(i[u]))>l&&(s=i[0],i[0]=i[u],i[u]=s,l=o);return i}).filter(function(e){return e.length>0})}}.apply(this,arguments))}(n,n.objects.geoms.geometries)}function Ut(e,t){if(void 0===t&&(t={}),!M(t=t||{}))throw new Error("options is invalid");var r=t.mutate;if("FeatureCollection"!==oe(e))throw new Error("geojson must be a FeatureCollection");if(!e.features.length)throw new Error("geojson is empty");!1!==r&&void 0!==r||(e=xt(e));var n=function(e){var t={};q(e,function(e){t[e.geometry.type]=!0});var r=Object.keys(t);return 1===r.length?r[0]:null}(e);if(!n)throw new Error("geojson must be homogenous");var i=e;switch(n){case"LineString":return function(e,t){if(void 0===t&&(t={}),!M(t=t||{}))throw new Error("options is invalid");var r=t.mutate;if("FeatureCollection"!==oe(e))throw new Error("geojson must be a FeatureCollection");if(!e.features.length)throw new Error("geojson is empty");!1!==r&&void 0!==r||(e=xt(e));var n=[],i=H(e,function(e,t){var r=function(e,t){var r,n=e.geometry.coordinates,i=t.geometry.coordinates,o=Pt(n[0]),a=Pt(n[n.length-1]),s=Pt(i[0]),u=Pt(i[i.length-1]);if(o===u)r=i.concat(n.slice(1));else if(s===a)r=n.concat(i.slice(1));else if(o===s)r=n.slice(1).reverse().concat(i);else{if(a!==u)return null;r=n.concat(i.reverse().slice(1))}return h(r)}(e,t);return r||(n.push(e),t)});return i&&n.push(i),n.length?1===n.length?n[0]:y(n.map(function(e){return e.coordinates})):null}(i,t);case"Polygon":return Jt(i,t);default:throw new Error(n+" is not supported")}}function zt(e,t){void 0===t&&(t={});var r="object"==typeof t?t.mutate:t;if(!e)throw new Error("geojson is required");var n=oe(e),i=[];switch(n){case"LineString":i=Wt(e);break;case"MultiLineString":case"Polygon":$(e).forEach(function(e){i.push(Wt(e))});break;case"MultiPolygon":$(e).forEach(function(e){var t=[];e.forEach(function(e){t.push(Wt(e))}),i.push(t)});break;case"Point":return e;case"MultiPoint":var o={};$(e).forEach(function(e){var t=e.join("-");Object.prototype.hasOwnProperty.call(o,t)||(i.push(e),o[t]=!0)});break;default:throw new Error(n+" geometry not supported")}return e.coordinates?!0===r?(e.coordinates=i,e):{type:n,coordinates:i}:!0===r?(e.geometry.coordinates=i,e):a({type:n,coordinates:i},e.properties,{bbox:e.bbox,id:e.id})}function Wt(e){var t=$(e);if(2===t.length&&!Ht(t[0],t[1]))return t;var r=[],n=t.length-1,i=r.length;r.push(t[0]);for(var o=1;o<n;o++){var a=r[r.length-1];t[o][0]===a[0]&&t[o][1]===a[1]||(r.push(t[o]),(i=r.length)>2&&Xt(r[i-3],r[i-1],r[i-2])&&r.splice(r.length-2,1))}if(r.push(t[t.length-1]),i=r.length,Ht(t[0],t[t.length-1])&&i<4)throw new Error("invalid polygon");return Xt(r[i-3],r[i-1],r[i-2])&&r.splice(r.length-2,1),r}function Ht(e,t){return e[0]===t[0]&&e[1]===t[1]}function Xt(e,t,r){var n=r[0],i=r[1],o=e[0],a=e[1],s=t[0],u=t[1],l=s-o,c=u-a;return 0==(n-o)*c-(i-a)*l&&(Math.abs(l)>=Math.abs(c)?l>0?o<=n&&n<=s:s<=n&&n<=o:c>0?a<=i&&i<=u:u<=i&&i<=a)}function Zt(e,t,r){var n=t.x,i=t.y,o=r.x-n,a=r.y-i;if(0!==o||0!==a){var s=((e.x-n)*o+(e.y-i)*a)/(o*o+a*a);s>1?(n=r.x,i=r.y):s>0&&(n+=o*s,i+=a*s)}return(o=e.x-n)*o+(a=e.y-i)*a}function Yt(e,t){var r=e.length-1,n=[e[0]];return function e(t,r,n,i,o){for(var a,s=i,u=r+1;u<n;u++){var l=Zt(t[u],t[r],t[n]);l>s&&(a=u,s=l)}s>i&&(a-r>1&&e(t,r,a,i,o),o.push(t[a]),n-a>1&&e(t,a,n,i,o))}(e,0,r,t,n),n.push(e[r]),n}function Kt(e,t,r){if(e.length<=2)return e;var n=void 0!==t?t*t:1;return e=Yt(e=r?e:function(e,t){for(var r,n,i,o,a,s=e[0],u=[s],l=1,c=e.length;l<c;l++)r=e[l],i=s,o=void 0,a=void 0,o=(n=r).x-i.x,a=n.y-i.y,o*o+a*a>t&&(u.push(r),s=r);return s!==r&&u.push(r),u}(e,n),n)}function Qt(e,t,r){return Kt(e.map(function(e){return{x:e[0],y:e[1],z:e[2]}}),t,r).map(function(e){return e.z?[e.x,e.y,e.z]:[e.x,e.y]})}function $t(e,t,r){return e.map(function(e){var n=e.map(function(e){return{x:e[0],y:e[1]}});if(n.length<4)throw new Error("invalid polygon");for(var i=Kt(n,t,r).map(function(e){return[e.x,e.y]});!er(i);)i=Kt(n,t-=.01*t,r).map(function(e){return[e.x,e.y]});return i[i.length-1][0]===i[0][0]&&i[i.length-1][1]===i[0][1]||i.push(i[0]),i})}function er(e){return!(e.length<3||3===e.length&&e[2][0]===e[0][0]&&e[2][1]===e[0][1])}var tr=function(){function e(e){this.points=e.points||[],this.duration=e.duration||1e4,this.sharpness=e.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=e.stepLength||60,this.length=this.points.length,this.delay=0;for(var t=0;t<this.length;t++)this.points[t].z=this.points[t].z||0;for(t=0;t<this.length-1;t++){var r=this.points[t],n=this.points[t+1];this.centers.push({x:(r.x+n.x)/2,y:(r.y+n.y)/2,z:(r.z+n.z)/2})}for(this.controls.push([this.points[0],this.points[0]]),t=0;t<this.centers.length-1;t++){var i=this.points[t+1].x-(this.centers[t].x+this.centers[t+1].x)/2,o=this.points[t+1].y-(this.centers[t].y+this.centers[t+1].y)/2,a=this.points[t+1].z-(this.centers[t].y+this.centers[t+1].z)/2;this.controls.push([{x:(1-this.sharpness)*this.points[t+1].x+this.sharpness*(this.centers[t].x+i),y:(1-this.sharpness)*this.points[t+1].y+this.sharpness*(this.centers[t].y+o),z:(1-this.sharpness)*this.points[t+1].z+this.sharpness*(this.centers[t].z+a)},{x:(1-this.sharpness)*this.points[t+1].x+this.sharpness*(this.centers[t+1].x+i),y:(1-this.sharpness)*this.points[t+1].y+this.sharpness*(this.centers[t+1].y+o),z:(1-this.sharpness)*this.points[t+1].z+this.sharpness*(this.centers[t+1].z+a)}])}return this.controls.push([this.points[this.length-1],this.points[this.length-1]]),this.steps=this.cacheSteps(this.stepLength),this}return e.prototype.cacheSteps=function(e){var t=[],r=this.pos(0);t.push(0);for(var n=0;n<this.duration;n+=10){var i=this.pos(n);Math.sqrt((i.x-r.x)*(i.x-r.x)+(i.y-r.y)*(i.y-r.y)+(i.z-r.z)*(i.z-r.z))>e&&(t.push(n),r=i)}return t},e.prototype.vector=function(e){var t=this.pos(e+10),r=this.pos(e-10);return{angle:180*Math.atan2(t.y-r.y,t.x-r.x)/3.14,speed:Math.sqrt((r.x-t.x)*(r.x-t.x)+(r.y-t.y)*(r.y-t.y)+(r.z-t.z)*(r.z-t.z))}},e.prototype.pos=function(e){var t=e-this.delay;t<0&&(t=0),t>this.duration&&(t=this.duration-1);var r=t/this.duration;if(r>=1)return this.points[this.length-1];var n=Math.floor((this.points.length-1)*r);return function(e,t,r,n,i){var o=function(e){var t=e*e;return[t*e,3*t*(1-e),3*e*(1-e)*(1-e),(1-e)*(1-e)*(1-e)]}(e);return{x:i.x*o[0]+n.x*o[1]+r.x*o[2]+t.x*o[3],y:i.y*o[0]+n.y*o[1]+r.y*o[2]+t.y*o[3],z:i.z*o[0]+n.z*o[1]+r.z*o[2]+t.z*o[3]}}((this.length-1)*r-n,this.points[n],this.controls[n][1],this.controls[n+1][0],this.points[n+1])},e}();function rr(e,t){void 0===t&&(t={});for(var r=t.resolution||1e4,n=t.sharpness||.85,i=[],o=ie(e).coordinates.map(function(e){return{x:e[0],y:e[1]}}),a=new tr({duration:r,points:o,sharpness:n}),s=function(e){var t=a.pos(e);Math.floor(e/100)%2==0&&i.push([t.x,t.y])},u=0;u<a.duration;u+=10)s(u);return s(a.duration),h(i,t.properties)}function nr(e,t){void 0===t&&(t={});var r=Number(e[0]),n=Number(e[1]),i=Number(e[2]),o=Number(e[3]);if(6===e.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[r,n];return c([[a,[i,n],[i,o],[r,o],a]],t.properties,{bbox:e,id:t.id})}function ir(e){return nr(K(e))}function or(e){var t=e[0],r=e[1],n=e[2],i=e[3];if(vt(e.slice(0,2),[n,r])>=vt(e.slice(0,2),[t,i])){var o=(r+i)/2;return[t,o-(n-t)/2,n,o+(n-t)/2]}var a=(t+n)/2;return[a-(i-r)/2,r,a+(i-r)/2,i]}function ar(e,t,r,n){void 0===n&&(n={});var i=Q(e),o=P(i[0]),a=P(i[1]),s=P(r),l=S(t,n.units),c=Math.asin(Math.sin(a)*Math.cos(l)+Math.cos(a)*Math.sin(l)*Math.cos(s));return u([O(o+Math.atan2(Math.sin(s)*Math.sin(l)*Math.cos(a),Math.cos(l)-Math.sin(a)*Math.sin(c))),O(c)],n.properties)}function sr(e,t,r){void 0===r&&(r={});for(var n=r.steps||64,i=r.properties?r.properties:!Array.isArray(e)&&"Feature"===e.type&&e.properties?e.properties:{},o=[],a=0;a<n;a++)o.push(ar(e,t,-360*a/n,r).geometry.coordinates);return o.push(o[0]),c([o],i)}function ur(e,t,r){if(void 0===r&&(r={}),!0===r.final)return function(e,t){var r=ur(t,e);return r=(r+180)%360}(e,t);var n=Q(e),i=Q(t),o=P(n[0]),a=P(i[0]),s=P(n[1]),u=P(i[1]),l=Math.sin(a-o)*Math.cos(u),c=Math.cos(s)*Math.sin(u)-Math.sin(s)*Math.cos(u)*Math.cos(a-o);return O(Math.atan2(l,c))}function lr(e,t){void 0===t&&(t={});var r=K(e);return u([(r[0]+r[2])/2,(r[1]+r[3])/2],t.properties,t)}function cr(e,t){void 0===t&&(t={});var r=0,n=0,i=0;return N(e,function(e){r+=e[0],n+=e[1],i++},!0),u([r/i,n/i],t.properties)}function fr(e){var t=[];return"FeatureCollection"===e.type?V(e,function(e){N(e,function(r){t.push(u(r,e.properties))})}):N(e,function(r){t.push(u(r,e.properties))}),d(t)}var hr=dr,pr=dr;function dr(e,t,r){r=r||2;var n,i,o,a,s,u,l,c=t&&t.length,f=c?t[0]*r:e.length,h=yr(e,0,f,r,!0),p=[];if(!h)return p;if(c&&(h=function(e,t,r,n){var i,o,a,s=[];for(i=0,o=t.length;i<o;i++)(a=yr(e,t[i]*n,i<o-1?t[i+1]*n:e.length,n,!1))===a.next&&(a.steiner=!0),s.push(Pr(a));for(s.sort(xr),i=0;i<s.length;i++)wr(s[i],r),r=gr(r,r.next);return r}(e,t,h,r)),e.length>80*r){n=o=e[0],i=a=e[1];for(var d=r;d<f;d+=r)(s=e[d])<n&&(n=s),(u=e[d+1])<i&&(i=u),s>o&&(o=s),u>a&&(a=u);l=0!==(l=Math.max(o-n,a-i))?1/l:0}return vr(h,p,r,n,i,l),p}function yr(e,t,r,n,i){var o,a;if(i===Gr(e,t,r,n)>0)for(o=t;o<r;o+=n)a=Nr(o,e[o],e[o+1],a);else for(o=r-n;o>=t;o-=n)a=Nr(o,e[o],e[o+1],a);return a&&Mr(a,a.next)&&(Rr(a),a=a.next),a}function gr(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!Mr(n,n.next)&&0!==Tr(n.prev,n,n.next))n=n.next;else{if(Rr(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function vr(e,t,r,n,i,o,a){if(e){!a&&o&&function(e,t,r,n){var i=e;do{null===i.z&&(i.z=Or(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,r,n,i,o,a,s,u,l=1;do{for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,s=0,t=0;t<l&&(s++,n=n.nextZ);t++);for(u=l;s>0||u>0&&n;)0!==s&&(0===u||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,u--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}o.nextZ=null,l*=2}while(a>1)}(i)}(e,n,i,o);for(var s,u,l=e;e.prev!==e.next;)if(s=e.prev,u=e.next,o?_r(e,n,i,o):mr(e))t.push(s.i/r),t.push(e.i/r),t.push(u.i/r),Rr(e),e=u.next,l=u.next;else if((e=u)===l){a?1===a?vr(e=br(e,t,r),t,r,n,i,o,2):2===a&&Sr(e,t,r,n,i,o):vr(gr(e),t,r,n,i,o,1);break}}}function mr(e){var t=e.prev,r=e,n=e.next;if(Tr(t,r,n)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(Er(t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Tr(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function _r(e,t,r,n){var i=e.prev,o=e,a=e.next;if(Tr(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,u=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,l=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,f=Or(s,u,t,r,n),h=Or(l,c,t,r,n),p=e.prevZ,d=e.nextZ;p&&p.z>=f&&d&&d.z<=h;){if(p!==e.prev&&p!==e.next&&Er(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Tr(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==e.prev&&d!==e.next&&Er(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Tr(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=f;){if(p!==e.prev&&p!==e.next&&Er(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Tr(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=h;){if(d!==e.prev&&d!==e.next&&Er(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Tr(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function br(e,t,r){var n=e;do{var i=n.prev,o=n.next.next;!Mr(i,o)&&Ir(i,n,n.next,o)&&Lr(i,o)&&Lr(o,i)&&(t.push(i.i/r),t.push(n.i/r),t.push(o.i/r),Rr(n),Rr(n.next),n=e=o),n=n.next}while(n!==e);return n}function Sr(e,t,r,n,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&kr(a,s)){var u=Cr(a,s);return a=gr(a,a.next),u=gr(u,u.next),vr(a,t,r,n,i,o),void vr(u,t,r,n,i,o)}s=s.next}a=a.next}while(a!==e)}function xr(e,t){return e.x-t.x}function wr(e,t){if(t=function(e,t){var r,n=t,i=e.x,o=e.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>a){if(a=s,s===i){if(o===n.y)return n;if(o===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!r)return null;if(i===a)return r.prev;var u,l=r,c=r.x,f=r.y,h=1/0;for(n=r.next;n!==l;)i>=n.x&&n.x>=c&&i!==n.x&&Er(o<f?i:a,o,c,f,o<f?a:i,o,n.x,n.y)&&((u=Math.abs(o-n.y)/(i-n.x))<h||u===h&&n.x>r.x)&&Lr(n,e)&&(r=n,h=u),n=n.next;return r}(e,t)){var r=Cr(t,e);gr(r,r.next)}}function Or(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Pr(e){var t=e,r=e;do{t.x<r.x&&(r=t),t=t.next}while(t!==e);return r}function Er(e,t,r,n,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(n-s)-(r-a)*(t-s)>=0&&(r-a)*(o-s)-(i-a)*(n-s)>=0}function kr(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&Ir(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&Lr(e,t)&&Lr(t,e)&&function(e,t){var r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)}function Tr(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Mr(e,t){return e.x===t.x&&e.y===t.y}function Ir(e,t,r,n){return!!(Mr(e,t)&&Mr(r,n)||Mr(e,n)&&Mr(r,t))||Tr(e,t,r)>0!=Tr(e,t,n)>0&&Tr(r,n,e)>0!=Tr(r,n,t)>0}function Lr(e,t){return Tr(e.prev,e,e.next)<0?Tr(e,t,e.next)>=0&&Tr(e,e.prev,t)>=0:Tr(e,t,e.prev)<0||Tr(e,e.next,t)<0}function Cr(e,t){var r=new jr(e.i,e.x,e.y),n=new jr(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function Nr(e,t,r,n){var i=new jr(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Rr(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function jr(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Gr(e,t,r,n){for(var i=0,o=t,a=r-n;o<r;o+=n)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}function Vr(e){var t=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)r.vertices.push(e[i][o][a]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r}(e),r=hr(t.vertices,t.holes,2),n=[],i=[];r.forEach(function(e,n){var o=r[n];i.push([t.vertices[2*o],t.vertices[2*o+1]])});for(var o=0;o<i.length;o+=3){var a=i.slice(o,o+3);a.push(i[o]),n.push(c([a]))}return n}function Ar(e,t){if(!e)throw new Error("targetPoint is required");if(!t)throw new Error("points is required");var r,n=1/0,i=0;return V(t,function(t,r){var o=vt(e,t);o<n&&(i=r,n=o)}),(r=xt(t.features[i])).properties.featureIndex=i,r.properties.distanceToPoint=n,r}function Dr(e){if(!e)throw new Error("geojson is required");var t=[];return q(e,function(e){!function(e,t){var r=[],n=e.geometry;if(null!==n){switch(n.type){case"Polygon":r=$(n);break;case"LineString":r=[$(n)]}r.forEach(function(r){(function(e,t){var r=[];return e.reduce(function(e,n){var i=h([e,n],t);return i.bbox=function(e,t){var r=e[0],n=e[1],i=t[0],o=t[1];return[r<i?r:i,n<o?n:o,r>i?r:i,n>o?n:o]}(e,n),r.push(i),n}),r})(r,e.properties).forEach(function(e){e.id=t.length,t.push(e)})})}}(e,t)}),d(t)}dr.deviation=function(e,t,r,n){var i=t&&t.length,o=i?t[0]*r:e.length,a=Math.abs(Gr(e,0,o,r));if(i)for(var s=0,u=t.length;s<u;s++){var l=t[s]*r,c=s<u-1?t[s+1]*r:e.length;a-=Math.abs(Gr(e,l,c,r))}var f=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,p=n[s+1]*r,d=n[s+2]*r;f+=Math.abs((e[h]-e[d])*(e[p+1]-e[h+1])-(e[h]-e[p])*(e[d+1]-e[h+1]))}return 0===a&&0===f?0:Math.abs((f-a)/a)},dr.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)r.vertices.push(e[i][o][a]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r},hr.default=pr;var Fr=Ae(function(e,t){function r(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function n(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(e[0])||!p(e[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:e},t,n)}function i(e,t,n){void 0===n&&(n={});for(var i=0,o=e;i<o.length;i++){var a=o[i];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return r({type:"Polygon",coordinates:e},t,n)}function o(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return r({type:"LineString",coordinates:e},t,n)}function a(e,t){void 0===t&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function s(e,t,n){return void 0===n&&(n={}),r({type:"MultiLineString",coordinates:e},t,n)}function u(e,t,n){return void 0===n&&(n={}),r({type:"MultiPoint",coordinates:e},t,n)}function l(e,t,n){return void 0===n&&(n={}),r({type:"MultiPolygon",coordinates:e},t,n)}function c(e,r){void 0===r&&(r="kilometers");var n=t.factors[r];if(!n)throw new Error(r+" units is invalid");return e*n}function f(e,r){void 0===r&&(r="kilometers");var n=t.factors[r];if(!n)throw new Error(r+" units is invalid");return e/n}function h(e){return e%(2*Math.PI)*180/Math.PI}function p(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.earthRadius=6371008.8,t.factors={centimeters:100*t.earthRadius,centimetres:100*t.earthRadius,degrees:t.earthRadius/111325,feet:3.28084*t.earthRadius,inches:39.37*t.earthRadius,kilometers:t.earthRadius/1e3,kilometres:t.earthRadius/1e3,meters:t.earthRadius,metres:t.earthRadius,miles:t.earthRadius/1609.344,millimeters:1e3*t.earthRadius,millimetres:1e3*t.earthRadius,nauticalmiles:t.earthRadius/1852,radians:1,yards:1.0936*t.earthRadius},t.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/t.earthRadius,yards:1.0936133},t.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:3.86e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046},t.feature=r,t.geometry=function(e,t,r){switch(e){case"Point":return n(t).geometry;case"LineString":return o(t).geometry;case"Polygon":return i(t).geometry;case"MultiPoint":return u(t).geometry;case"MultiLineString":return s(t).geometry;case"MultiPolygon":return l(t).geometry;default:throw new Error(e+" is invalid")}},t.point=n,t.points=function(e,t,r){return void 0===r&&(r={}),a(e.map(function(e){return n(e,t)}),r)},t.polygon=i,t.polygons=function(e,t,r){return void 0===r&&(r={}),a(e.map(function(e){return i(e,t)}),r)},t.lineString=o,t.lineStrings=function(e,t,r){return void 0===r&&(r={}),a(e.map(function(e){return o(e,t)}),r)},t.featureCollection=a,t.multiLineString=s,t.multiPoint=u,t.multiPolygon=l,t.geometryCollection=function(e,t,n){return void 0===n&&(n={}),r({type:"GeometryCollection",geometries:e},t,n)},t.round=function(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r},t.radiansToLength=c,t.lengthToRadians=f,t.lengthToDegrees=function(e,t){return h(f(e,t))},t.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},t.radiansToDegrees=h,t.degreesToRadians=function(e){return e%360*Math.PI/180},t.convertLength=function(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return c(f(e,t),r)},t.convertArea=function(e,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("area must be a positive number");var i=t.areaFactors[r];if(!i)throw new Error("invalid original units");var o=t.areaFactors[n];if(!o)throw new Error("invalid final units");return e/i*o},t.isNumber=p,t.isObject=function(e){return!!e&&e.constructor===Object},t.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(function(e){if(!p(e))throw new Error("bbox must only contain numbers")})},t.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}});function Br(e,t,r){if(null!==e)for(var n,i,o,a,s,u,l,c,f=0,h=0,p=e.type,d="FeatureCollection"===p,y="Feature"===p,g=d?e.features.length:1,v=0;v<g;v++){s=(c=!!(l=d?e.features[v].geometry:y?e.geometry:e)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var m=0;m<s;m++){var _=0,b=0;if(null!==(a=c?l.geometries[m]:l)){u=a.coordinates;var S=a.type;switch(f=!r||"Polygon"!==S&&"MultiPolygon"!==S?0:1,S){case null:break;case"Point":if(!1===t(u,h,v,_,b))return!1;h++,_++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(!1===t(u[n],h,v,_,b))return!1;h++,"MultiPoint"===S&&_++}"LineString"===S&&_++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(i=0;i<u[n].length-f;i++){if(!1===t(u[n][i],h,v,_,b))return!1;h++}"MultiLineString"===S&&_++,"Polygon"===S&&b++}"Polygon"===S&&_++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(b=0,i=0;i<u[n].length;i++){for(o=0;o<u[n][i].length-f;o++){if(!1===t(u[n][i][o],h,v,_,b))return!1;h++}b++}_++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===Br(a.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function qr(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&!1!==t(e.features[r].properties,r);r++);break;case"Feature":t(e.properties,0)}}function Jr(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var r=0;r<e.features.length&&!1!==t(e.features[r],r);r++);}function Ur(e,t){var r,n,i,o,a,s,u,l,c,f,h=0,p="FeatureCollection"===e.type,d="Feature"===e.type,y=p?e.features.length:1;for(r=0;r<y;r++){for(s=p?e.features[r].geometry:d?e.geometry:e,l=p?e.features[r].properties:d?e.properties:{},c=p?e.features[r].bbox:d?e.bbox:void 0,f=p?e.features[r].id:d?e.id:void 0,a=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=u?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,h,l,c,f))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],h,l,c,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,h,l,c,f))return!1;h++}}function zr(e,t){Ur(e,function(e,r,n,i,o){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Fr.feature(e,n,{bbox:i,id:o}),r,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var u=0;u<e.coordinates.length;u++){var l={type:a,coordinates:e.coordinates[u]};if(!1===t(Fr.feature(l,n),r,u))return!1}})}function Wr(e,t){zr(e,function(e,r,n){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var a,s=0,u=0,l=0;return!1!==Br(e,function(o,c,f,h,p){if(void 0===a||r>s||h>u||p>l)return a=o,s=r,u=h,l=p,void(i=0);var d=Fr.lineString([a,o],e.properties);if(!1===t(d,r,n,p,i))return!1;i++,a=o})&&void 0}}})}function Hr(e,t){if(!e)throw new Error("geojson is required");zr(e,function(e,r,n){if(null!==e.geometry){var i=e.geometry.type,o=e.geometry.coordinates;switch(i){case"LineString":if(!1===t(e,r,n,0,0))return!1;break;case"Polygon":for(var a=0;a<o.length;a++)if(!1===t(Fr.lineString(o[a],e.properties),r,n,a))return!1}}})}var Xr=Br,Zr=Jr,Yr=zr,Kr=Ur,Qr=Hr,$r=qr,en=Wr,tn=Object.defineProperty({coordAll:function(e){var t=[];return Br(e,function(e){t.push(e)}),t},coordEach:Xr,coordReduce:function(e,t,r,n){var i=r;return Br(e,function(e,n,o,a,s){i=0===n&&void 0===r?e:t(i,e,n,o,a,s)},n),i},featureEach:Zr,featureReduce:function(e,t,r){var n=r;return Jr(e,function(e,i){n=0===i&&void 0===r?e:t(n,e,i)}),n},findPoint:function(e,t){if(t=t||{},!Fr.isObject(t))throw new Error("options is invalid");var r,n=t.featureIndex||0,i=t.multiFeatureIndex||0,o=t.geometryIndex||0,a=t.coordIndex||0,s=t.properties;switch(e.type){case"FeatureCollection":n<0&&(n=e.features.length+n),s=s||e.features[n].properties,r=e.features[n].geometry;break;case"Feature":s=s||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":return Fr.point(u,s,t);case"MultiPoint":return i<0&&(i=u.length+i),Fr.point(u[i],s,t);case"LineString":return a<0&&(a=u.length+a),Fr.point(u[a],s,t);case"Polygon":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a),Fr.point(u[o][a],s,t);case"MultiLineString":return i<0&&(i=u.length+i),a<0&&(a=u[i].length+a),Fr.point(u[i][a],s,t);case"MultiPolygon":return i<0&&(i=u.length+i),o<0&&(o=u[i].length+o),a<0&&(a=u[i][o].length-a),Fr.point(u[i][o][a],s,t)}throw new Error("geojson is invalid")},findSegment:function(e,t){if(t=t||{},!Fr.isObject(t))throw new Error("options is invalid");var r,n=t.featureIndex||0,i=t.multiFeatureIndex||0,o=t.geometryIndex||0,a=t.segmentIndex||0,s=t.properties;switch(e.type){case"FeatureCollection":n<0&&(n=e.features.length+n),s=s||e.features[n].properties,r=e.features[n].geometry;break;case"Feature":s=s||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=u.length+a-1),Fr.lineString([u[a],u[a+1]],s,t);case"Polygon":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a-1),Fr.lineString([u[o][a],u[o][a+1]],s,t);case"MultiLineString":return i<0&&(i=u.length+i),a<0&&(a=u[i].length+a-1),Fr.lineString([u[i][a],u[i][a+1]],s,t);case"MultiPolygon":return i<0&&(i=u.length+i),o<0&&(o=u[i].length+o),a<0&&(a=u[i][o].length-a-1),Fr.lineString([u[i][o][a],u[i][o][a+1]],s,t)}throw new Error("geojson is invalid")},flattenEach:Yr,flattenReduce:function(e,t,r){var n=r;return zr(e,function(e,i,o){n=0===i&&0===o&&void 0===r?e:t(n,e,i,o)}),n},geomEach:Kr,geomReduce:function(e,t,r){var n=r;return Ur(e,function(e,i,o,a,s){n=0===i&&void 0===r?e:t(n,e,i,o,a,s)}),n},lineEach:Qr,lineReduce:function(e,t,r){var n=r;return Hr(e,function(e,i,o,a){n=0===i&&void 0===r?e:t(n,e,i,o,a)}),n},propEach:$r,propReduce:function(e,t,r){var n=r;return qr(e,function(e,i){n=0===i&&void 0===r?e:t(n,e,i)}),n},segmentEach:en,segmentReduce:function(e,t,r){var n=r,i=!1;return Wr(e,function(e,o,a,s,u){n=!1===i&&void 0===r?e:t(n,e,o,a,s,u),i=!0}),n}},"__esModule",{value:!0});function rn(e){var t=[1/0,1/0,-1/0,-1/0];return tn.coordEach(e,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}rn.default=rn;var nn=rn,on=Object.defineProperty({default:nn},"__esModule",{value:!0}).default,an=tn.featureEach,sn=(tn.coordEach,Fr.polygon,Fr.featureCollection);function un(e){var t=we(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:on(e),we.prototype.insert.call(this,e)},t.load=function(e){var t=[];return Array.isArray(e)?e.forEach(function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:on(e),t.push(e)}):an(e,function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:on(e),t.push(e)}),we.prototype.load.call(this,t)},t.remove=function(e,t){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:on(e),we.prototype.remove.call(this,e,t)},t.clear=function(){return we.prototype.clear.call(this)},t.search=function(e){var t=we.prototype.search.call(this,this.toBBox(e));return sn(t)},t.collides=function(e){return we.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=we.prototype.all.call(this);return sn(e)},t.toJSON=function(){return we.prototype.toJSON.call(this)},t.fromJSON=function(e){return we.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var t;if(e.bbox)t=e.bbox;else if(Array.isArray(e)&&4===e.length)t=e;else if(Array.isArray(e)&&6===e.length)t=[e[0],e[1],e[3],e[4]];else if("Feature"===e.type)t=on(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=on(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}var ln=un,cn=un;function fn(e,t){var r={},n=[];if("LineString"===e.type&&(e=a(e)),"LineString"===t.type&&(t=a(t)),"Feature"===e.type&&"Feature"===t.type&&null!==e.geometry&&null!==t.geometry&&"LineString"===e.geometry.type&&"LineString"===t.geometry.type&&2===e.geometry.coordinates.length&&2===t.geometry.coordinates.length){var i=hn(e,t);return i&&n.push(i),d(n)}var o=ln();return o.load(Dr(t)),V(Dr(e),function(e){V(o.search(e),function(t){var i=hn(e,t);if(i){var o=$(i).join(",");r[o]||(r[o]=!0,n.push(i))}})}),d(n)}function hn(e,t){var r=$(e),n=$(t);if(2!==r.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==n.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=r[0][0],o=r[0][1],a=r[1][0],s=r[1][1],l=n[0][0],c=n[0][1],f=n[1][0],h=n[1][1],p=(h-c)*(a-i)-(f-l)*(s-o),d=(f-l)*(o-c)-(h-c)*(i-l),y=(a-i)*(o-c)-(s-o)*(i-l);if(0===p)return null;var g=d/p,v=y/p;return g>=0&&g<=1&&v>=0&&v<=1?u([i+g*(a-i),o+g*(s-o)]):null}function pn(e,t,r){void 0===r&&(r={});var n=u([1/0,1/0],{dist:1/0}),i=0;return q(e,function(e){for(var o=$(e),a=0;a<o.length-1;a++){var s=u(o[a]);s.properties.dist=vt(t,s,r);var l=u(o[a+1]);l.properties.dist=vt(t,l,r);var c=vt(s,l,r),f=Math.max(s.properties.dist,l.properties.dist),p=ur(s,l),d=ar(t,f,p+90,r),y=ar(t,f,p-90,r),g=fn(h([d.geometry.coordinates,y.geometry.coordinates]),h([s.geometry.coordinates,l.geometry.coordinates])),v=null;g.features.length>0&&((v=g.features[0]).properties.dist=vt(t,v,r),v.properties.location=i+vt(s,v,r)),s.properties.dist<n.properties.dist&&((n=s).properties.index=a,n.properties.location=i),l.properties.dist<n.properties.dist&&((n=l).properties.index=a+1,n.properties.location=i+c),v&&v.properties.dist<n.properties.dist&&((n=v).properties.index=a),i+=c}}),n}function dn(e,t,n){void 0===n&&(n={});var i=Q(e),o=Q(t);return o[0]+=o[0]-i[0]>180?-360:i[0]-o[0]>180?360:0,E(function(e,t,n){var i=n=void 0===n?r:Number(n),o=e[1]*Math.PI/180,a=t[1]*Math.PI/180,s=a-o,u=Math.abs(t[0]-e[0])*Math.PI/180;u>Math.PI&&(u-=2*Math.PI);var l=Math.log(Math.tan(a/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),c=Math.abs(l)>1e-11?s/l:Math.cos(o);return Math.sqrt(s*s+c*c*u*u)*i}(i,o),"meters",n.units)}function yn(e,t,r){if(void 0===r&&(r={}),r.method||(r.method="geodesic"),r.units||(r.units="kilometers"),!e)throw new Error("pt is required");if(Array.isArray(e)?e=u(e):"Point"===e.type?e=a(e):re(e,"Point","point"),!t)throw new Error("line is required");Array.isArray(t)?t=h(t):"LineString"===t.type?t=a(t):re(t,"LineString","line");var n=1/0,i=e.geometry.coordinates;return U(t,function(e){var t=e.geometry.coordinates[0],o=e.geometry.coordinates[1],a=function(e,t,r,n){var i=[r[0]-t[0],r[1]-t[1]],o=gn([e[0]-t[0],e[1]-t[1]],i);if(o<=0)return vn(e,t,{method:n.method,units:"degrees"});var a=gn(i,i);if(a<=o)return vn(e,r,{method:n.method,units:"degrees"});var s=o/a,u=[t[0]+s*i[0],t[1]+s*i[1]];return vn(e,u,{method:n.method,units:"degrees"})}(i,t,o,r);a<n&&(n=a)}),E(n,"degrees",r.units)}function gn(e,t){return e[0]*t[0]+e[1]*t[1]}function vn(e,t,r){return"planar"===r.method?dn(e,t,r):vt(e,t,r)}function mn(e,t,r,n,i,o,a,s){var u,l,c,f,h={x:null,y:null,onLine1:!1,onLine2:!1};return 0==(u=(s-o)*(r-e)-(a-i)*(n-t))?null!==h.x&&null!==h.y&&h:(f=(r-e)*(l=t-o)-(n-t)*(c=e-i),l=((a-i)*l-(s-o)*c)/u,c=f/u,h.x=e+l*(r-e),h.y=t+l*(n-t),l>=0&&l<=1&&(h.onLine1=!0),c>=0&&c<=1&&(h.onLine2=!0),!(!h.onLine1||!h.onLine2)&&[h.x,h.y])}function _n(e){for(var t=function(e){return"FeatureCollection"!==e.type?"Feature"!==e.type?d([a(e)]):d([e]):e}(e),r=lr(t),n=!1,i=0;!n&&i<t.features.length;){var o,s=t.features[i].geometry,l=!1;if("Point"===s.type)r.geometry.coordinates[0]===s.coordinates[0]&&r.geometry.coordinates[1]===s.coordinates[1]&&(n=!0);else if("MultiPoint"===s.type){var c=!1;for(o=0;!c&&o<s.coordinates.length;)r.geometry.coordinates[0]===s.coordinates[o][0]&&r.geometry.coordinates[1]===s.coordinates[o][1]&&(n=!0,c=!0),o++}else if("LineString"===s.type)for(o=0;!l&&o<s.coordinates.length-1;)bn(r.geometry.coordinates[0],r.geometry.coordinates[1],s.coordinates[o][0],s.coordinates[o][1],s.coordinates[o+1][0],s.coordinates[o+1][1])&&(l=!0,n=!0),o++;else if("MultiLineString"===s.type)for(var f=0;f<s.coordinates.length;){l=!1,o=0;for(var h=s.coordinates[f];!l&&o<h.length-1;)bn(r.geometry.coordinates[0],r.geometry.coordinates[1],h[o][0],h[o][1],h[o+1][0],h[o+1][1])&&(l=!0,n=!0),o++;f++}else"Polygon"!==s.type&&"MultiPolygon"!==s.type||dt(r,s)&&(n=!0);i++}if(n)return r;var p=d([]);for(i=0;i<t.features.length;i++)p.features=p.features.concat(fr(t.features[i]).features);return u(Ar(r,p).geometry.coordinates)}function bn(e,t,r,n,i,o){return Math.sqrt((i-r)*(i-r)+(o-n)*(o-n))===Math.sqrt((e-r)*(e-r)+(t-n)*(t-n))+Math.sqrt((i-e)*(i-e)+(o-t)*(o-t))}ln.default=cn;var Sn=6378137;function xn(e){return B(e,function(e,t){return e+function(e){var t,r=0;switch(e.type){case"Polygon":return wn(e.coordinates);case"MultiPolygon":for(t=0;t<e.coordinates.length;t++)r+=wn(e.coordinates[t]);return r;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(t)},0)}function wn(e){var t=0;if(e&&e.length>0){t+=Math.abs(On(e[0]));for(var r=1;r<e.length;r++)t-=Math.abs(On(e[r]))}return t}function On(e){var t,r,n,i,o,a,s=0,u=e.length;if(u>2){for(a=0;a<u;a++)a===u-2?(n=u-2,i=u-1,o=0):a===u-1?(n=u-1,i=0,o=1):(n=a,i=a+1,o=a+2),t=e[n],r=e[i],s+=(Pn(e[o][0])-Pn(t[0]))*Math.sin(Pn(r[1]));s=s*Sn*Sn/2}return s}function Pn(e){return e*Math.PI/180}function En(e,t){return void 0===t&&(t={}),z(e,function(e,r){var n=r.geometry.coordinates;return e+vt(n[0],n[1],t)},0)}function kn(e,t,r,n){if(!M(n=n||{}))throw new Error("options is invalid");var i,o=[];if("Feature"===e.type)i=e.geometry.coordinates;else{if("LineString"!==e.type)throw new Error("input must be a LineString Feature or Geometry");i=e.coordinates}for(var a,s,u,l=i.length,c=0,f=0;f<i.length&&!(t>=c&&f===i.length-1);f++){if(c>t&&0===o.length){if(!(a=t-c))return o.push(i[f]),h(o);s=ur(i[f],i[f-1])-180,u=ar(i[f],a,s,n),o.push(u.geometry.coordinates)}if(c>=r)return(a=r-c)?(s=ur(i[f],i[f-1])-180,u=ar(i[f],a,s,n),o.push(u.geometry.coordinates),h(o)):(o.push(i[f]),h(o));if(c>=t&&o.push(i[f]),f===i.length-1)return h(o);c+=vt(i[f],i[f+1],n)}if(c<t&&i.length===l)throw new Error("Start position is beyond line");var p=i[i.length-1];return h([p,p])}function Tn(e,t,r){void 0===r&&(r={});for(var n=Q(e),i=$(t),o=0;o<i.length-1;o++){var a=!1;if(r.ignoreEndVertices&&(0===o&&(a="start"),o===i.length-2&&(a="end"),0===o&&o+1===i.length-1&&(a="both")),Mn(i[o],i[o+1],n,a,void 0===r.epsilon?null:r.epsilon))return!0}return!1}function Mn(e,t,r,n,i){var o=r[0],a=r[1],s=e[0],u=e[1],l=t[0],c=t[1],f=l-s,h=c-u,p=(r[0]-s)*h-(r[1]-u)*f;if(null!==i){if(Math.abs(p)>i)return!1}else if(0!==p)return!1;return n?"start"===n?Math.abs(f)>=Math.abs(h)?f>0?s<o&&o<=l:l<=o&&o<s:h>0?u<a&&a<=c:c<=a&&a<u:"end"===n?Math.abs(f)>=Math.abs(h)?f>0?s<=o&&o<l:l<o&&o<=s:h>0?u<=a&&a<c:c<a&&a<=u:"both"===n&&(Math.abs(f)>=Math.abs(h)?f>0?s<o&&o<l:l<o&&o<s:h>0?u<a&&a<c:c<a&&a<u):Math.abs(f)>=Math.abs(h)?f>0?s<=o&&o<=l:l<=o&&o<=s:h>0?u<=a&&a<=c:c<=a&&a<=u}function In(e,t){var r=ie(e),n=ie(t),i=r.type,o=n.type;switch(i){case"Point":switch(o){case"MultiPoint":return function(e,t){var r,n=!1;for(r=0;r<t.coordinates.length;r++)if(Cn(t.coordinates[r],e.coordinates)){n=!0;break}return n}(r,n);case"LineString":return Tn(r,n,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return dt(r,n,{ignoreBoundary:!0});default:throw new Error("feature2 "+o+" geometry not supported")}case"MultiPoint":switch(o){case"MultiPoint":return function(e,t){for(var r=0;r<e.coordinates.length;r++){for(var n=!1,i=0;i<t.coordinates.length;i++)Cn(e.coordinates[r],t.coordinates[i])&&(n=!0);if(!n)return!1}return!0}(r,n);case"LineString":return function(e,t){for(var r=!1,n=0;n<e.coordinates.length;n++){if(!Tn(e.coordinates[n],t))return!1;r||(r=Tn(e.coordinates[n],t,{ignoreEndVertices:!0}))}return r}(r,n);case"Polygon":case"MultiPolygon":return function(e,t){for(var r=!0,n=!1,i=0;i<e.coordinates.length;i++){if(!(n=dt(e.coordinates[1],t))){r=!1;break}n=dt(e.coordinates[1],t,{ignoreBoundary:!0})}return r&&n}(r,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"LineString":return function(e,t){for(var r=0;r<e.coordinates.length;r++)if(!Tn(e.coordinates[r],t))return!1;return!0}(r,n);case"Polygon":case"MultiPolygon":return function(e,t){var r=K(t),n=K(e);if(!Ln(r,n))return!1;for(var i=!1,o=0;o<e.coordinates.length-1;o++){if(!dt(e.coordinates[o],t))return!1;i||(i=dt(e.coordinates[o],t,{ignoreBoundary:!0})),i||(i=dt(Nn(e.coordinates[o],e.coordinates[o+1]),t,{ignoreBoundary:!0}))}return i}(r,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"Polygon":case"MultiPolygon":return function(e,t){var r=K(e);if(!Ln(K(t),r))return!1;for(var n=0;n<e.coordinates[0].length;n++)if(!dt(e.coordinates[0][n],t))return!1;return!0}(r,n);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function Ln(e,t){return!(e[0]>t[0]||e[2]<t[2]||e[1]>t[1]||e[3]<t[3])}function Cn(e,t){return e[0]===t[0]&&e[1]===t[1]}function Nn(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}function Rn(e,t,r){void 0===r&&(r={}),r.mask&&!r.units&&(r.units="kilometers");for(var n=[],i=e[0],o=e[1],a=e[2],s=e[3],l=t/vt([i,o],[a,o],r)*(a-i),c=t/vt([i,o],[i,s],r)*(s-o),f=a-i,h=s-o,p=Math.floor(f/l),y=(h-Math.floor(h/c)*c)/2,g=i+(f-p*l)/2;g<=a;){for(var v=o+y;v<=s;){var m=u([g,v],r.properties);r.mask?In(m,r.mask)&&n.push(m):n.push(m),v+=c}g+=l}return d(n)}function jn(e,t){void 0===t&&(t={});var r=t.precision,n=t.coordinates,i=t.mutate;if(r=null==r||isNaN(r)?6:r,n=null==n||isNaN(n)?3:n,!e)throw new Error("<geojson> is required");if("number"!=typeof r)throw new Error("<precision> must be a number");if("number"!=typeof n)throw new Error("<coordinates> must be a number");!1!==i&&void 0!==i||(e=JSON.parse(JSON.stringify(e)));var o=Math.pow(10,r);return N(e,function(e){!function(e,t,r){e.length>r&&e.splice(r,e.length);for(var n=0;n<e.length;n++)e[n]=Math.round(e[n]*t)/t}(e,o,n)}),e}function Gn(e){if(!e)throw new Error("geojson is required");var t=[];return q(e,function(e){t.push(e)}),d(t)}function Vn(e,t){if(!e||!t)return!1;if(e.length!==t.length)return!1;for(var r=0,n=e.length;r<n;r++)if(e[r]instanceof Array&&t[r]instanceof Array){if(!Vn(e[r],t[r]))return!1}else if(e[r]!==t[r])return!1;return!0}function An(e){if("Feature"!=e.type)throw new Error("The input must a geojson object of type Feature");if(void 0===e.geometry||null==e.geometry)throw new Error("The input must a geojson object with a non-empty geometry");if("Polygon"!=e.geometry.type)throw new Error("The input must be a geojson Polygon");for(var t=e.geometry.coordinates.length,r=[],n=0;n<t;n++){var i=e.geometry.coordinates[n];Jn(i[0],i[i.length-1])||i.push(i[0]),r.push.apply(r,i.slice(0,i.length-1))}if(!function(e){for(var t={},r=1,n=0,i=e.length;n<i;++n){if(Object.prototype.hasOwnProperty.call(t,e[n])){r=0;break}t[e[n]]=1}return r}(r))throw new Error("The input polygon may not have duplicate vertices (except for the first and last vertex of each ring)");var o=r.length,a=function(e,t,r){if("Polygon"!==e.geometry.type)throw new Error("The input feature must be a Polygon");void 0===r&&(r=1);var n=e.geometry.coordinates,i=[],o={};if(r){for(var a=[],s=0;s<n.length;s++)for(var u=0;u<n[s].length-1;u++)a.push(y(s,u));var l=we();l.load(a)}for(var c=0;c<n.length;c++)for(var f=0;f<n[c].length-1;f++)if(r)l.search(y(c,f)).forEach(function(e){var t=e.ring,r=e.edge;d(c,f,t,r)});else for(var h=0;h<n.length;h++)for(var p=0;p<n[h].length-1;p++)d(c,f,h,p);return t||(i={type:"Feature",geometry:{type:"MultiPoint",coordinates:i}}),i;function d(e,r,a,s){var u,l,c=n[e][r],f=n[e][r+1],h=n[a][s],p=n[a][s+1],d=function(e,t,r,n){if(Vn(e,r)||Vn(e,n)||Vn(t,r)||Vn(n,r))return null;var i=e[0],o=e[1],a=t[0],s=t[1],u=r[0],l=r[1],c=n[0],f=n[1],h=(i-a)*(l-f)-(o-s)*(u-c);return 0===h?null:[((i*s-o*a)*(u-c)-(i-a)*(u*f-l*c))/h,((i*s-o*a)*(l-f)-(o-s)*(u*f-l*c))/h]}(c,f,h,p);if(null!==d&&(u=f[0]!==c[0]?(d[0]-c[0])/(f[0]-c[0]):(d[1]-c[1])/(f[1]-c[1]),l=p[0]!==h[0]?(d[0]-h[0])/(p[0]-h[0]):(d[1]-h[1])/(p[1]-h[1]),!(u>=1||u<=0||l>=1||l<=0))){var y=d,g=!o[y];g&&(o[y]=!0),t?i.push(t(d,e,r,c,f,u,a,s,h,p,l,g)):i.push(d)}}function y(e,t){var r,i,o,a,s=n[e][t],u=n[e][t+1];return s[0]<u[0]?(r=s[0],i=u[0]):(r=u[0],i=s[0]),s[1]<u[1]?(o=s[1],a=u[1]):(o=u[1],a=s[1]),{minX:r,minY:o,maxX:i,maxY:a,ring:e,edge:t}}}(e,function(e,t,r,n,i,o,a,s,u,l,c,f){return[e,t,r,n,i,o,a,s,u,l,c,f]}),s=a.length;if(0==s){var u=[];for(n=0;n<t;n++)u.push(c([e.geometry.coordinates[n]],{parent:-1,winding:qn(e.geometry.coordinates[n])}));var l=d(u);return A(),D(),l}var f=[],h=[];for(n=0;n<t;n++){f.push([]);for(var p=0;p<e.geometry.coordinates[n].length-1;p++)f[n].push([new Dn(e.geometry.coordinates[n][Un(p+1,e.geometry.coordinates[n].length-1)],1,[n,p],[n,Un(p+1,e.geometry.coordinates[n].length-1)],void 0)]),h.push(new Fn(e.geometry.coordinates[n][p],[n,Un(p-1,e.geometry.coordinates[n].length-1)],[n,p],void 0,void 0,!1,!0))}for(n=0;n<s;n++)f[a[n][1]][a[n][2]].push(new Dn(a[n][0],a[n][5],[a[n][1],a[n][2]],[a[n][6],a[n][7]],void 0)),a[n][11]&&h.push(new Fn(a[n][0],[a[n][1],a[n][2]],[a[n][6],a[n][7]],void 0,void 0,!0,!0));var y=h.length;for(n=0;n<f.length;n++)for(p=0;p<f[n].length;p++)f[n][p].sort(function(e,t){return e.param<t.param?-1:1});var g=[];for(n=0;n<y;n++)g.push({minX:h[n].coord[0],minY:h[n].coord[1],maxX:h[n].coord[0],maxY:h[n].coord[1],index:n});var v=we();for(v.load(g),n=0;n<f.length;n++)for(p=0;p<f[n].length;p++)for(var m=0;m<f[n][p].length;m++){b=m==f[n][p].length-1?f[n][Un(p+1,e.geometry.coordinates[n].length-1)][0].coord:f[n][p][m+1].coord;var _=v.search({minX:b[0],minY:b[1],maxX:b[0],maxY:b[1]})[0];f[n][p][m].nxtIsectAlongEdgeIn=_.index}for(n=0;n<f.length;n++)for(p=0;p<f[n].length;p++)for(m=0;m<f[n][p].length;m++){var b=f[n][p][m].coord,S=(_=v.search({minX:b[0],minY:b[1],maxX:b[0],maxY:b[1]})[0]).index;S<o?h[S].nxtIsectAlongRingAndEdge2=f[n][p][m].nxtIsectAlongEdgeIn:Jn(h[S].ringAndEdge1,f[n][p][m].ringAndEdgeIn)?h[S].nxtIsectAlongRingAndEdge1=f[n][p][m].nxtIsectAlongEdgeIn:h[S].nxtIsectAlongRingAndEdge2=f[n][p][m].nxtIsectAlongEdgeIn}var x=[];for(n=0,p=0;p<t;p++){var w=n;for(m=0;m<e.geometry.coordinates[p].length-1;m++)h[n].coord[0]<h[w].coord[0]&&(w=n),n++;var O=h[w].nxtIsectAlongRingAndEdge2;for(m=0;m<h.length;m++)if(h[m].nxtIsectAlongRingAndEdge1==w||h[m].nxtIsectAlongRingAndEdge2==w){var P=m;break}var E=Bn([h[P].coord,h[w].coord,h[O].coord],!0)?1:-1;x.push({isect:w,parent:-1,winding:E})}for(x.sort(function(e,t){return h[e.isect].coord>h[t.isect].coord?-1:1}),u=[];x.length>0;){var k=x.pop(),T=k.isect,M=k.parent,I=k.winding,L=u.length,C=[h[T].coord],N=T;if(h[T].ringAndEdge1Walkable)var R=h[T].ringAndEdge1,j=h[T].nxtIsectAlongRingAndEdge1;else R=h[T].ringAndEdge2,j=h[T].nxtIsectAlongRingAndEdge2;for(;!Jn(h[T].coord,h[j].coord);){C.push(h[j].coord);var G=void 0;for(n=0;n<x.length;n++)if(x[n].isect==j){G=n;break}if(null!=G&&x.splice(G,1),Jn(R,h[j].ringAndEdge1)){if(R=h[j].ringAndEdge2,h[j].ringAndEdge2Walkable=!1,h[j].ringAndEdge1Walkable){var V={isect:j};Bn([h[N].coord,h[j].coord,h[h[j].nxtIsectAlongRingAndEdge2].coord],1==I)?(V.parent=M,V.winding=-I):(V.parent=L,V.winding=I),x.push(V)}N=j,j=h[j].nxtIsectAlongRingAndEdge2}else R=h[j].ringAndEdge1,h[j].ringAndEdge1Walkable=!1,h[j].ringAndEdge2Walkable&&(V={isect:j},Bn([h[N].coord,h[j].coord,h[h[j].nxtIsectAlongRingAndEdge1].coord],1==I)?(V.parent=M,V.winding=-I):(V.parent=L,V.winding=I),x.push(V)),N=j,j=h[j].nxtIsectAlongRingAndEdge1}C.push(h[j].coord),u.push(c([C],{index:L,parent:M,winding:I,netWinding:void 0}))}function A(){for(var e=[],t=0;t<l.features.length;t++)-1==l.features[t].properties.parent&&e.push(t);if(e.length>1)for(t=0;t<e.length;t++){for(var r=-1,n=0;n<l.features.length;n++)e[t]!=n&&dt(l.features[e[t]].geometry.coordinates[0][0],l.features[n],{ignoreBoundary:!0})&&xn(l.features[n])<1/0&&(r=n);l.features[e[t]].properties.parent=r}}function D(){for(var e=0;e<l.features.length;e++)if(-1==l.features[e].properties.parent){var t=l.features[e].properties.winding;l.features[e].properties.netWinding=t,F(e,t)}}function F(e,t){for(var r=0;r<l.features.length;r++)if(l.features[r].properties.parent==e){var n=t+l.features[r].properties.winding;l.features[r].properties.netWinding=n,F(r,n)}}return l=d(u),A(),D(),l}var Dn=function(e,t,r,n,i){this.coord=e,this.param=t,this.ringAndEdgeIn=r,this.ringAndEdgeOut=n,this.nxtIsectAlongEdgeIn=i},Fn=function(e,t,r,n,i,o,a){this.coord=e,this.ringAndEdge1=t,this.ringAndEdge2=r,this.nxtIsectAlongRingAndEdge1=n,this.nxtIsectAlongRingAndEdge2=i,this.ringAndEdge1Walkable=o,this.ringAndEdge2Walkable=a};function Bn(e,t){if(void 0===t&&(t=!0),3!=e.length)throw new Error("This function requires an array of three points [x,y]");return(e[1][0]-e[0][0])*(e[2][1]-e[0][1])-(e[1][1]-e[0][1])*(e[2][0]-e[0][0])>=0==t}function qn(e){for(var t=0,r=0;r<e.length-1;r++)e[r][0]<e[t][0]&&(t=r);if(Bn([e[Un(t-1,e.length-1)],e[t],e[Un(t+1,e.length-1)]],!0))var n=1;else n=-1;return n}function Jn(e,t){if(!e||!t)return!1;if(e.length!=t.length)return!1;for(var r=0,n=e.length;r<n;r++)if(e[r]instanceof Array&&t[r]instanceof Array){if(!Jn(e[r],t[r]))return!1}else if(e[r]!=t[r])return!1;return!0}function Un(e,t){return(e%t+t)%t}var zn=Math.PI/180,Wn=180/Math.PI,Hn=function(e,t){this.lon=e,this.lat=t,this.x=zn*e,this.y=zn*t};Hn.prototype.view=function(){return String(this.lon).slice(0,4)+","+String(this.lat).slice(0,4)},Hn.prototype.antipode=function(){var e=-1*this.lat,t=this.lon<0?180+this.lon:-1*(180-this.lon);return new Hn(t,e)};var Xn=function(){this.coords=[],this.length=0};Xn.prototype.move_to=function(e){this.length++,this.coords.push(e)};var Zn=function(e){this.properties=e||{},this.geometries=[]};Zn.prototype.json=function(){if(this.geometries.length<=0)return{geometry:{type:"LineString",coordinates:null},type:"Feature",properties:this.properties};if(1===this.geometries.length)return{geometry:{type:"LineString",coordinates:this.geometries[0].coords},type:"Feature",properties:this.properties};for(var e=[],t=0;t<this.geometries.length;t++)e.push(this.geometries[t].coords);return{geometry:{type:"MultiLineString",coordinates:e},type:"Feature",properties:this.properties}},Zn.prototype.wkt=function(){for(var e="",t="LINESTRING(",r=function(e){t+=e[0]+" "+e[1]+","},n=0;n<this.geometries.length;n++){if(0===this.geometries[n].coords.length)return"LINESTRING(empty)";this.geometries[n].coords.forEach(r),e+=t.substring(0,t.length-1)+")"}return e};var Yn=function(e,t,r){if(!e||void 0===e.x||void 0===e.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");if(!t||void 0===t.x||void 0===t.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");this.start=new Hn(e.x,e.y),this.end=new Hn(t.x,t.y),this.properties=r||{};var n=this.start.x-this.end.x,i=this.start.y-this.end.y,o=Math.pow(Math.sin(i/2),2)+Math.cos(this.start.y)*Math.cos(this.end.y)*Math.pow(Math.sin(n/2),2);if(this.g=2*Math.asin(Math.sqrt(o)),this.g===Math.PI)throw new Error("it appears "+e.view()+" and "+t.view()+" are 'antipodal', e.g diametrically opposite, thus there is no single route but rather infinite");if(isNaN(this.g))throw new Error("could not calculate great circle between "+e+" and "+t)};function Kn(e,t){var r=[],n=ln();return q(t,function(t){if(r.forEach(function(e,t){e.id=t}),r.length){var i=n.search(t);if(i.features.length){var o=$n(t,i);r=r.filter(function(e){return e.id!==o.id}),n.remove(o),V(Qn(o,t),function(e){r.push(e),n.insert(e)})}}else(r=Qn(e,t).features).forEach(function(e){e.bbox||(e.bbox=or(K(e)))}),n.load(d(r))}),d(r)}function Qn(e,t){var r=[],n=$(e)[0],i=$(e)[e.geometry.coordinates.length-1];if(ei(n,Q(t))||ei(i,Q(t)))return d([e]);var o=ln(),a=Dr(e);o.load(a);var s=o.search(t);if(!s.features.length)return d([e]);var u=$n(t,s),l=A(a,function(e,n,i){var o=$(n)[1],a=Q(t);return i===u.id?(e.push(a),r.push(h(e)),ei(a,o)?[a]:[a,o]):(e.push(o),e)},[n]);return l.length>1&&r.push(h(l)),d(r)}function $n(e,t){if(!t.features.length)throw new Error("lines must contain features");if(1===t.features.length)return t.features[0];var r,n=1/0;return V(t,function(t){var i=pn(t,e).properties.dist;i<n&&(r=t,n=i)}),r}function ei(e,t){return e[0]===t[0]&&e[1]===t[1]}function ti(e,t,r,n,i){void 0===i&&(i={});var o=i.steps||64,a=ri(r),s=ri(n),u=Array.isArray(e)||"Feature"!==e.type?{}:e.properties;if(a===s)return h(sr(e,t,i).geometry.coordinates[0],u);for(var l=a,c=a<s?s:s+360,f=l,p=[],d=0;f<c;)p.push(ar(e,t,f,i).geometry.coordinates),f=l+360*++d/o;return f>c&&p.push(ar(e,t,c,i).geometry.coordinates),h(p,u)}function ri(e){var t=e%360;return t<0&&(t+=360),t}function ni(e,t){void 0===t&&(t={});var r=ie(e);switch(t.properties||"Feature"!==e.type||(t.properties=e.properties),r.type){case"Polygon":return ii(r,t);case"MultiPolygon":return function(e,t){void 0===t&&(t={});var r=ie(e).coordinates,n=t.properties?t.properties:"Feature"===e.type?e.properties:{},i=[];return r.forEach(function(e){i.push(oi(e,n))}),d(i)}(r,t);default:throw new Error("invalid poly")}}function ii(e,t){return void 0===t&&(t={}),oi(ie(e).coordinates,t.properties?t.properties:"Feature"===e.type?e.properties:{})}function oi(e,t){return e.length>1?y(e,t):h(e[0],t)}function ai(e,t){var r,n,i;void 0===t&&(t={});var o=t.properties,a=null===(r=t.autoComplete)||void 0===r||r,s=null===(n=t.orderCoords)||void 0===n||n;switch(null!==(i=t.mutate)&&void 0!==i&&i||(e=xt(e)),e.type){case"FeatureCollection":var u=[];return e.features.forEach(function(e){u.push($(si(e,{},a,s)))}),v(u,o);default:return si(e,o,a,s)}}function si(e,t,r,n){t=t||("Feature"===e.type?e.properties:{});var i=ie(e),o=i.coordinates,a=i.type;if(!o.length)throw new Error("line must contain coordinates");switch(a){case"LineString":return r&&(o=ui(o)),c([o],t);case"MultiLineString":var s=[],u=0;return o.forEach(function(e){if(r&&(e=ui(e)),n){var t=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return Math.abs(t-n)*Math.abs(r-i)}(K(h(e)));t>u?(s.unshift(e),u=t):s.push(e)}else s.push(e)}),c(s,t);default:throw new Error("geometry type "+a+" is not supported")}}function ui(e){var t=e[0],r=t[0],n=t[1],i=e[e.length-1],o=i[0],a=i[1];return r===o&&n===a||e.push(t),e}function li(e,t){var r,n,i,o,a,s,u;for(n=1;n<=8;n*=2){for(r=[],o=!(fi(i=e[e.length-1],t)&n),a=0;a<e.length;a++)(u=!(fi(s=e[a],t)&n))!==o&&r.push(ci(i,s,n,t)),u&&r.push(s),i=s,o=u;if(!(e=r).length)break}return r}function ci(e,t,r,n){return 8&r?[e[0]+(t[0]-e[0])*(n[3]-e[1])/(t[1]-e[1]),n[3]]:4&r?[e[0]+(t[0]-e[0])*(n[1]-e[1])/(t[1]-e[1]),n[1]]:2&r?[n[2],e[1]+(t[1]-e[1])*(n[2]-e[0])/(t[0]-e[0])]:1&r?[n[0],e[1]+(t[1]-e[1])*(n[0]-e[0])/(t[0]-e[0])]:null}function fi(e,t){var r=0;return e[0]<t[0]?r|=1:e[0]>t[2]&&(r|=2),e[1]<t[1]?r|=4:e[1]>t[3]&&(r|=8),r}function hi(e,t){for(var r=[],n=0,i=e;n<i.length;n++){var o=li(i[n],t);o.length>0&&(o[0][0]===o[o.length-1][0]&&o[0][1]===o[o.length-1][1]||o.push(o[0]),o.length>=4&&r.push(o))}return r}Yn.prototype.interpolate=function(e){var t=Math.sin((1-e)*this.g)/Math.sin(this.g),r=Math.sin(e*this.g)/Math.sin(this.g),n=t*Math.cos(this.start.y)*Math.cos(this.start.x)+r*Math.cos(this.end.y)*Math.cos(this.end.x),i=t*Math.cos(this.start.y)*Math.sin(this.start.x)+r*Math.cos(this.end.y)*Math.sin(this.end.x),o=t*Math.sin(this.start.y)+r*Math.sin(this.end.y),a=Wn*Math.atan2(o,Math.sqrt(Math.pow(n,2)+Math.pow(i,2)));return[Wn*Math.atan2(i,n),a]},Yn.prototype.Arc=function(e,t){var r=[];if(!e||e<=2)r.push([this.start.lon,this.start.lat]),r.push([this.end.lon,this.end.lat]);else for(var n=1/(e-1),i=0;i<e;++i){var o=n*i,a=this.interpolate(o);r.push(a)}for(var s=!1,u=0,l=t&&t.offset?t.offset:10,c=180-l,f=-180+l,h=360-l,p=1;p<r.length;++p){var d=r[p-1][0],y=r[p][0],g=Math.abs(y-d);g>h&&(y>c&&d<f||d>c&&y<f)?s=!0:g>u&&(u=g)}var v=[];if(s&&u<l){var m=[];v.push(m);for(var _=0;_<r.length;++_){var b=parseFloat(r[_][0]);if(_>0&&Math.abs(b-r[_-1][0])>h){var S=parseFloat(r[_-1][0]),x=parseFloat(r[_-1][1]),w=parseFloat(r[_][0]),O=parseFloat(r[_][1]);if(S>-180&&S<f&&180===w&&_+1<r.length&&r[_-1][0]>-180&&r[_-1][0]<f){m.push([-180,r[_][1]]),_++,m.push([r[_][0],r[_][1]]);continue}if(S>c&&S<180&&-180===w&&_+1<r.length&&r[_-1][0]>c&&r[_-1][0]<180){m.push([180,r[_][1]]),_++,m.push([r[_][0],r[_][1]]);continue}if(S<f&&w>c){var P=S;S=w,w=P;var E=x;x=O,O=E}if(S>c&&w<f&&(w+=360),S<=180&&w>=180&&S<w){var k=(180-S)/(w-S),T=k*O+(1-k)*x;m.push([r[_-1][0]>c?180:-180,T]),(m=[]).push([r[_-1][0]>c?-180:180,T]),v.push(m)}else m=[],v.push(m);m.push([b,r[_][1]])}else m.push([r[_][0],r[_][1]])}}else{var M=[];v.push(M);for(var I=0;I<r.length;++I)M.push([r[I][0],r[I][1]])}for(var L=new Zn(this.properties),C=0;C<v.length;++C){var N=new Xn;L.geometries.push(N);for(var R=v[C],j=0;j<R.length;++j)N.move_to(R[j])}return L};var pi=Ae(function(e,t){function r(e){var t=[];for(var r in e)t.push(r);return t}(e.exports="function"==typeof Object.keys?Object.keys:r).shim=r}),di=Ae(function(e,t){var r="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function n(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function i(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}(t=e.exports=r?n:i).supported=n,t.unsupported=i}),yi=Ae(function(e){var t=Array.prototype.slice,r=e.exports=function(e,o,a){return a||(a={}),e===o||(e instanceof Date&&o instanceof Date?e.getTime()===o.getTime():!e||!o||"object"!=typeof e&&"object"!=typeof o?a.strict?e===o:e==o:function(e,o,a){var s,u;if(n(e)||n(o))return!1;if(e.prototype!==o.prototype)return!1;if(di(e))return!!di(o)&&(e=t.call(e),o=t.call(o),r(e,o,a));if(i(e)){if(!i(o))return!1;if(e.length!==o.length)return!1;for(s=0;s<e.length;s++)if(e[s]!==o[s])return!1;return!0}try{var l=pi(e),c=pi(o)}catch(e){return!1}if(l.length!=c.length)return!1;for(l.sort(),c.sort(),s=l.length-1;s>=0;s--)if(l[s]!=c[s])return!1;for(s=l.length-1;s>=0;s--)if(u=l[s],!r(e[u],o[u],a))return!1;return typeof e==typeof o}(e,o,a))};function n(e){return null==e}function i(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||e.length>0&&"number"!=typeof e[0])}});function gi(e,t,r){if(void 0===r&&(r={}),!M(r=r||{}))throw new Error("options is invalid");var n,i=r.tolerance||0,o=[],a=ln(),s=Dr(e);return a.load(s),U(t,function(e){var t=!1;e&&(V(a.search(e),function(r){if(!1===t){var o=$(e).sort(),a=$(r).sort();yi(o,a)||(0===i?Tn(o[0],r)&&Tn(o[1],r):pn(r,o[0]).properties.dist<=i&&pn(r,o[1]).properties.dist<=i)?(t=!0,n=n?vi(n,e):e):(0===i?Tn(a[0],e)&&Tn(a[1],e):pn(e,a[0]).properties.dist<=i&&pn(e,a[1]).properties.dist<=i)&&(n=n?vi(n,r):r)}}),!1===t&&n&&(o.push(n),n=void 0))}),n&&o.push(n),d(o)}function vi(e,t){var r=$(t),n=$(e),i=n[0],o=n[n.length-1],a=e.geometry.coordinates;return yi(r[0],i)?a.unshift(r[1]):yi(r[0],o)?a.push(r[1]):yi(r[1],i)?a.unshift(r[0]):yi(r[1],o)&&a.push(r[0]),e}function mi(e){var t=e%360;return t<0&&(t+=360),t}function _i(e,t,r){var n;return void 0===r&&(r={}),(n=r.final?bi(Q(t),Q(e)):bi(Q(e),Q(t)))>180?-(360-n):n}function bi(e,t){var r=P(e[1]),n=P(t[1]),i=P(t[0]-e[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var o=Math.log(Math.tan(n/2+Math.PI/4)/Math.tan(r/2+Math.PI/4));return(O(Math.atan2(i,o))+360)%360}function Si(e,t,n,i){void 0===i&&(i={});var o=t<0,a=E(Math.abs(t),i.units,"meters");o&&(a=-Math.abs(a));var s=Q(e),l=function(e,t,n,i){i=void 0===i?r:Number(i);var o=t/i,a=e[0]*Math.PI/180,s=P(e[1]),u=P(n),l=o*Math.cos(u),c=s+l;Math.abs(c)>Math.PI/2&&(c=c>0?Math.PI-c:-Math.PI-c);var f=Math.log(Math.tan(c/2+Math.PI/4)/Math.tan(s/2+Math.PI/4)),h=Math.abs(f)>1e-11?l/f:Math.cos(s),p=o*Math.sin(u)/h;return[(180*(a+p)/Math.PI+540)%360-180,180*c/Math.PI]}(s,a,n);return l[0]+=l[0]-s[0]>180?-360:s[0]-l[0]>180?360:0,u(l,i.properties)}function xi(e,t,r,n,i,o){for(var a=0;a<e.length;a++){var s=e[a],u=e[a+1];a===e.length-1&&(u=e[0]),n=Oi(s,u,t),r<=0&&n>0?Oi(t,s,i)<0||(i=s):r>0&&n<=0&&(wi(t,s,o)||(o=s)),r=n}return[i,o]}function wi(e,t,r){return Oi(e,t,r)>0}function Oi(e,t,r){return(t[0]-e[0])*(r[1]-e[1])-(r[0]-e[0])*(t[1]-e[1])}function Pi(e){for(var t,r,n=$(e),i=0,o=1;o<n.length;)t=r||n[0],i+=((r=n[o])[0]-t[0])*(r[1]+t[1]),o++;return i>0}function Ei(e,t){switch("Feature"===e.type?e.geometry.type:e.type){case"GeometryCollection":return F(e,function(e){Ei(e,t)}),e;case"LineString":return ki($(e),t),e;case"Polygon":return Ti($(e),t),e;case"MultiLineString":return $(e).forEach(function(e){ki(e,t)}),e;case"MultiPolygon":return $(e).forEach(function(e){Ti(e,t)}),e;case"Point":case"MultiPoint":return e}}function ki(e,t){Pi(e)===t&&e.reverse()}function Ti(e,t){Pi(e[0])!==t&&e[0].reverse();for(var r=1;r<e.length;r++)Pi(e[r])===t&&e[r].reverse()}var Mi={successCallback:null,verbose:!1,polygons:!1},Ii={};function Li(e,t,r,n){n=n||{};for(var i=Object.keys(Mi),o=0;o<i.length;o++){var a=i[o],s=n[a];s=null!=s?s:Mi[a],Ii[a]=s}Ii.verbose&&console.log("MarchingSquaresJS-isoBands: computing isobands for ["+t+":"+(t+r)+"]");var u,l=function(e,t,r){for(var n=e.length-1,i=e[0].length-1,o={rows:n,cols:i,cells:[]},a=t+Math.abs(r),s=0;s<n;++s){o.cells[s]=[];for(var u=0;u<i;++u){var l=0,c=e[s+1][u],f=e[s+1][u+1],h=e[s][u+1],p=e[s][u];if(!(isNaN(c)||isNaN(f)||isNaN(h)||isNaN(p))){l|=c<t?0:c>a?128:64,l|=f<t?0:f>a?32:16,l|=h<t?0:h>a?8:4;var d=+(l|=p<t?0:p>a?2:1),y=0;if(17===l||18===l||33===l||34===l||38===l||68===l||72===l||98===l||102===l||132===l||136===l||137===l||152===l||153===l){var g=(c+f+h+p)/4;y=g>a?2:g<t?0:1,34===l?1===y?l=35:0===y&&(l=136):136===l?1===y?(l=35,y=4):0===y&&(l=34):17===l?1===y?(l=155,y=4):0===y&&(l=153):68===l?1===y?(l=103,y=4):0===y&&(l=102):153===l?1===y&&(l=155):102===l?1===y&&(l=103):152===l?y<2&&(l=156,y=1):137===l?y<2&&(l=139,y=1):98===l?y<2&&(l=99,y=1):38===l?y<2&&(l=39,y=1):18===l?y>0?(l=156,y=4):l=152:33===l?y>0?(l=139,y=4):l=137:72===l?y>0?(l=99,y=4):l=98:132===l&&(y>0?(l=39,y=4):l=38)}if(0!=l&&170!=l){var v,m,_,b,S,x,w,O;v=m=_=b=S=x=w=O=.5;var P=[];1===l?(_=1-xo(t,h,p),O=1-xo(t,c,p),P.push(go[l])):169===l?(_=xo(a,p,h),O=xo(a,p,c),P.push(go[l])):4===l?(x=1-xo(t,f,h),b=xo(t,p,h),P.push(po[l])):166===l?(x=xo(a,h,f),b=1-xo(a,h,p),P.push(po[l])):16===l?(S=xo(t,h,f),m=xo(t,c,f),P.push(ho[l])):154===l?(S=1-xo(a,f,h),m=1-xo(a,f,c),P.push(ho[l])):64===l?(w=xo(t,p,c),v=1-xo(t,f,c),P.push(mo[l])):106===l?(w=1-xo(a,c,p),v=xo(a,c,f),P.push(mo[l])):168===l?(b=xo(a,p,h),_=xo(t,p,h),O=xo(t,p,c),w=xo(a,p,c),P.push(yo[l]),P.push(go[l])):2===l?(b=1-xo(t,h,p),_=1-xo(a,h,p),O=1-xo(a,c,p),w=1-xo(t,c,p),P.push(yo[l]),P.push(go[l])):162===l?(S=xo(a,h,f),x=xo(t,h,f),b=1-xo(t,h,p),_=1-xo(a,h,p),P.push(yo[l]),P.push(go[l])):8===l?(S=1-xo(t,f,h),x=1-xo(a,f,h),b=xo(a,p,h),_=xo(t,p,h),P.push(ho[l]),P.push(po[l])):138===l?(S=1-xo(t,f,h),x=1-xo(a,f,h),v=1-xo(a,f,c),m=1-xo(t,f,c),P.push(ho[l]),P.push(po[l])):32===l?(S=xo(a,h,f),x=xo(t,h,f),v=xo(t,c,f),m=xo(a,c,f),P.push(ho[l]),P.push(po[l])):42===l?(O=1-xo(a,c,p),w=1-xo(t,c,p),v=xo(t,c,f),m=xo(a,c,f),P.push(vo[l]),P.push(mo[l])):128===l&&(O=xo(t,p,c),w=xo(a,p,c),v=1-xo(a,f,c),m=1-xo(t,f,c),P.push(vo[l]),P.push(mo[l])),5===l?(x=1-xo(t,f,h),O=1-xo(t,c,p),P.push(po[l])):165===l?(x=xo(a,h,f),O=xo(a,p,c),P.push(po[l])):20===l?(b=xo(t,p,h),m=xo(t,c,f),P.push(yo[l])):150===l?(b=1-xo(a,h,p),m=1-xo(a,f,c),P.push(yo[l])):80===l?(S=xo(t,h,f),w=xo(t,p,c),P.push(ho[l])):90===l?(S=1-xo(a,f,h),w=1-xo(a,c,p),P.push(ho[l])):65===l?(_=1-xo(t,h,p),v=1-xo(t,f,c),P.push(go[l])):105===l?(_=xo(a,p,h),v=xo(a,c,f),P.push(go[l])):160===l?(S=xo(a,h,f),x=xo(t,h,f),O=xo(t,p,c),w=xo(a,p,c),P.push(ho[l]),P.push(po[l])):10===l?(S=1-xo(t,f,h),x=1-xo(a,f,h),O=1-xo(a,c,p),w=1-xo(t,c,p),P.push(ho[l]),P.push(po[l])):130===l?(b=1-xo(t,h,p),_=1-xo(a,h,p),v=1-xo(a,f,c),m=1-xo(t,f,c),P.push(yo[l]),P.push(go[l])):40===l?(b=xo(a,p,h),_=xo(t,p,h),v=xo(t,c,f),m=xo(a,c,f),P.push(yo[l]),P.push(go[l])):101===l?(x=xo(a,h,f),v=xo(a,c,f),P.push(po[l])):69===l?(x=1-xo(t,f,h),v=1-xo(t,f,c),P.push(po[l])):149===l?(O=xo(a,p,c),m=1-xo(a,f,c),P.push(vo[l])):21===l?(O=1-xo(t,c,p),m=xo(t,c,f),P.push(vo[l])):86===l?(b=1-xo(a,h,p),w=1-xo(a,c,p),P.push(yo[l])):84===l?(b=xo(t,p,h),w=xo(t,p,c),P.push(yo[l])):89===l?(S=1-xo(a,f,h),_=xo(a,p,h),P.push(go[l])):81===l?(S=xo(t,h,f),_=1-xo(t,h,p),P.push(go[l])):96===l?(S=xo(a,h,f),x=xo(t,h,f),w=xo(t,p,c),v=xo(a,c,f),P.push(ho[l]),P.push(po[l])):74===l?(S=1-xo(t,f,h),x=1-xo(a,f,h),w=1-xo(a,c,p),v=1-xo(t,f,c),P.push(ho[l]),P.push(po[l])):24===l?(S=1-xo(a,f,h),b=xo(a,p,h),_=xo(t,p,h),m=xo(t,c,f),P.push(ho[l]),P.push(go[l])):146===l?(S=xo(t,h,f),b=1-xo(t,h,p),_=1-xo(a,h,p),m=1-xo(a,f,c),P.push(ho[l]),P.push(go[l])):6===l?(x=1-xo(t,f,h),b=1-xo(a,h,p),O=1-xo(a,c,p),w=1-xo(t,c,p),P.push(po[l]),P.push(yo[l])):164===l?(x=xo(a,h,f),b=xo(t,p,h),O=xo(t,p,c),w=xo(a,p,c),P.push(po[l]),P.push(yo[l])):129===l?(_=1-xo(t,h,p),O=xo(a,p,c),v=1-xo(a,f,c),m=1-xo(t,f,c),P.push(go[l]),P.push(vo[l])):41===l?(_=xo(a,p,h),O=1-xo(t,c,p),v=xo(t,c,f),m=xo(a,c,f),P.push(go[l]),P.push(vo[l])):66===l?(b=1-xo(t,h,p),_=1-xo(a,h,p),w=1-xo(a,c,p),v=1-xo(t,f,c),P.push(yo[l]),P.push(go[l])):104===l?(b=xo(a,p,h),_=xo(t,p,h),w=xo(t,p,c),v=xo(a,c,f),P.push(go[l]),P.push(_o[l])):144===l?(S=xo(t,h,f),O=xo(t,p,c),w=xo(a,p,c),m=1-xo(a,f,c),P.push(ho[l]),P.push(mo[l])):26===l?(S=1-xo(a,f,h),O=1-xo(a,c,p),w=1-xo(t,c,p),m=xo(t,c,f),P.push(ho[l]),P.push(mo[l])):36===l?(x=xo(a,h,f),b=xo(t,p,h),v=xo(t,c,f),m=xo(a,c,f),P.push(po[l]),P.push(yo[l])):134===l?(x=1-xo(t,f,h),b=1-xo(a,h,p),v=1-xo(a,f,c),m=1-xo(t,f,c),P.push(po[l]),P.push(yo[l])):9===l?(S=1-xo(t,f,h),x=1-xo(a,f,h),_=xo(a,p,h),O=1-xo(t,c,p),P.push(ho[l]),P.push(po[l])):161===l?(S=xo(a,h,f),x=xo(t,h,f),_=1-xo(t,h,p),O=xo(a,p,c),P.push(ho[l]),P.push(po[l])):37===l?(x=xo(a,h,f),O=1-xo(t,c,p),v=xo(t,c,f),m=xo(a,c,f),P.push(po[l]),P.push(vo[l])):133===l?(x=1-xo(t,f,h),O=xo(a,p,c),v=1-xo(a,f,c),m=1-xo(t,f,c),P.push(po[l]),P.push(vo[l])):148===l?(b=xo(t,p,h),O=xo(t,p,c),w=xo(a,p,c),m=1-xo(a,f,c),P.push(yo[l]),P.push(mo[l])):22===l?(b=1-xo(a,h,p),O=1-xo(a,c,p),w=1-xo(t,c,p),m=xo(t,c,f),P.push(yo[l]),P.push(mo[l])):82===l?(S=xo(t,h,f),b=1-xo(t,h,p),_=1-xo(a,h,p),w=1-xo(a,c,p),P.push(ho[l]),P.push(go[l])):88===l?(S=1-xo(a,f,h),b=xo(a,p,h),_=xo(t,p,h),w=xo(t,p,c),P.push(ho[l]),P.push(go[l])):73===l?(S=1-xo(t,f,h),x=1-xo(a,f,h),_=xo(a,p,h),v=1-xo(t,f,c),P.push(ho[l]),P.push(po[l])):97===l?(S=xo(a,h,f),x=xo(t,h,f),_=1-xo(t,h,p),v=xo(a,c,f),P.push(ho[l]),P.push(po[l])):145===l?(S=xo(t,h,f),_=1-xo(t,h,p),O=xo(a,p,c),m=1-xo(a,f,c),P.push(ho[l]),P.push(vo[l])):25===l?(S=1-xo(a,f,h),_=xo(a,p,h),O=1-xo(t,c,p),m=xo(t,c,f),P.push(ho[l]),P.push(vo[l])):70===l?(x=1-xo(t,f,h),b=1-xo(a,h,p),w=1-xo(a,c,p),v=1-xo(t,f,c),P.push(po[l]),P.push(yo[l])):100===l?(x=xo(a,h,f),b=xo(t,p,h),w=xo(t,p,c),v=xo(a,c,f),P.push(po[l]),P.push(yo[l])):34===l?(0===y?(S=1-xo(t,f,h),x=1-xo(a,f,h),b=xo(a,p,h),_=xo(t,p,h),O=xo(t,p,c),w=xo(a,p,c),v=1-xo(a,f,c),m=1-xo(t,f,c)):(S=xo(a,h,f),x=xo(t,h,f),b=1-xo(t,h,p),_=1-xo(a,h,p),O=1-xo(a,c,p),w=1-xo(t,c,p),v=xo(t,c,f),m=xo(a,c,f)),P.push(ho[l]),P.push(po[l]),P.push(vo[l]),P.push(mo[l])):35===l?(4===y?(S=1-xo(t,f,h),x=1-xo(a,f,h),b=xo(a,p,h),_=xo(t,p,h),O=xo(t,p,c),w=xo(a,p,c),v=1-xo(a,f,c),m=1-xo(t,f,c)):(S=xo(a,h,f),x=xo(t,h,f),b=1-xo(t,h,p),_=1-xo(a,h,p),O=1-xo(a,c,p),w=1-xo(t,c,p),v=xo(t,c,f),m=xo(a,c,f)),P.push(ho[l]),P.push(po[l]),P.push(go[l]),P.push(mo[l])):136===l?(0===y?(S=xo(a,h,f),x=xo(t,h,f),b=1-xo(t,h,p),_=1-xo(a,h,p),O=1-xo(a,c,p),w=1-xo(t,c,p),v=xo(t,c,f),m=xo(a,c,f)):(S=1-xo(t,f,h),x=1-xo(a,f,h),b=xo(a,p,h),_=xo(t,p,h),O=xo(t,p,c),w=xo(a,p,c),v=1-xo(a,f,c),m=1-xo(t,f,c)),P.push(ho[l]),P.push(po[l]),P.push(vo[l]),P.push(mo[l])):153===l?(0===y?(S=xo(t,h,f),_=1-xo(t,h,p),O=1-xo(t,c,p),m=xo(t,c,f)):(S=1-xo(a,f,h),_=xo(a,p,h),O=xo(a,p,c),m=1-xo(a,f,c)),P.push(ho[l]),P.push(go[l])):102===l?(0===y?(x=1-xo(t,f,h),b=xo(t,p,h),w=xo(t,p,c),v=1-xo(t,f,c)):(x=xo(a,h,f),b=1-xo(a,h,p),w=1-xo(a,c,p),v=xo(a,c,f)),P.push(po[l]),P.push(mo[l])):155===l?(4===y?(S=xo(t,h,f),_=1-xo(t,h,p),O=1-xo(t,c,p),m=xo(t,c,f)):(S=1-xo(a,f,h),_=xo(a,p,h),O=xo(a,p,c),m=1-xo(a,f,c)),P.push(ho[l]),P.push(vo[l])):103===l?(4===y?(x=1-xo(t,f,h),b=xo(t,p,h),w=xo(t,p,c),v=1-xo(t,f,c)):(x=xo(a,h,f),b=1-xo(a,h,p),w=1-xo(a,c,p),v=xo(a,c,f)),P.push(po[l]),P.push(yo[l])):152===l?(0===y?(S=xo(t,h,f),b=1-xo(t,h,p),_=1-xo(a,h,p),O=1-xo(a,c,p),w=1-xo(t,c,p),m=xo(t,c,f)):(S=1-xo(a,f,h),b=xo(a,p,h),_=xo(t,p,h),O=xo(t,p,c),w=xo(a,p,c),m=1-xo(a,f,c)),P.push(ho[l]),P.push(yo[l]),P.push(go[l])):156===l?(4===y?(S=xo(t,h,f),b=1-xo(t,h,p),_=1-xo(a,h,p),O=1-xo(a,c,p),w=1-xo(t,c,p),m=xo(t,c,f)):(S=1-xo(a,f,h),b=xo(a,p,h),_=xo(t,p,h),O=xo(t,p,c),w=xo(a,p,c),m=1-xo(a,f,c)),P.push(ho[l]),P.push(go[l]),P.push(mo[l])):137===l?(0===y?(S=xo(a,h,f),x=xo(t,h,f),_=1-xo(t,h,p),O=1-xo(t,c,p),v=xo(t,c,f),m=xo(a,c,f)):(S=1-xo(t,f,h),x=1-xo(a,f,h),_=xo(a,p,h),O=xo(a,p,c),v=1-xo(a,f,c),m=1-xo(t,f,c)),P.push(ho[l]),P.push(po[l]),P.push(go[l])):139===l?(4===y?(S=xo(a,h,f),x=xo(t,h,f),_=1-xo(t,h,p),O=1-xo(t,c,p),v=xo(t,c,f),m=xo(a,c,f)):(S=1-xo(t,f,h),x=1-xo(a,f,h),_=xo(a,p,h),O=xo(a,p,c),v=1-xo(a,f,c),m=1-xo(t,f,c)),P.push(ho[l]),P.push(po[l]),P.push(vo[l])):98===l?(0===y?(S=1-xo(t,f,h),x=1-xo(a,f,h),b=xo(a,p,h),_=xo(t,p,h),w=xo(t,p,c),v=1-xo(t,f,c)):(S=xo(a,h,f),x=xo(t,h,f),b=1-xo(t,h,p),_=1-xo(a,h,p),w=1-xo(a,c,p),v=xo(a,c,f)),P.push(ho[l]),P.push(po[l]),P.push(mo[l])):99===l?(4===y?(S=1-xo(t,f,h),x=1-xo(a,f,h),b=xo(a,p,h),_=xo(t,p,h),w=xo(t,p,c),v=1-xo(t,f,c)):(S=xo(a,h,f),x=xo(t,h,f),b=1-xo(t,h,p),_=1-xo(a,h,p),w=1-xo(a,c,p),v=xo(a,c,f)),P.push(ho[l]),P.push(po[l]),P.push(go[l])):38===l?(0===y?(x=1-xo(t,f,h),b=xo(t,p,h),O=xo(t,p,c),w=xo(a,p,c),v=1-xo(a,f,c),m=1-xo(t,f,c)):(x=xo(a,h,f),b=1-xo(a,h,p),O=1-xo(a,c,p),w=1-xo(t,c,p),v=xo(t,c,f),m=xo(a,c,f)),P.push(po[l]),P.push(vo[l]),P.push(mo[l])):39===l?(4===y?(x=1-xo(t,f,h),b=xo(t,p,h),O=xo(t,p,c),w=xo(a,p,c),v=1-xo(a,f,c),m=1-xo(t,f,c)):(x=xo(a,h,f),b=1-xo(a,h,p),O=1-xo(a,c,p),w=1-xo(t,c,p),v=xo(t,c,f),m=xo(a,c,f)),P.push(po[l]),P.push(yo[l]),P.push(mo[l])):85===l&&(S=1,x=0,b=1,_=0,O=0,w=1,v=0,m=1),(v<0||v>1||m<0||m>1||S<0||S>1||b<0||b>1||O<0||O>1||w<0||w>1)&&console.log("MarchingSquaresJS-isoBands: "+l+" "+d+" "+c+","+f+","+h+","+p+" "+y+" "+v+" "+m+" "+S+" "+x+" "+b+" "+_+" "+O+" "+w),o.cells[s][u]={cval:l,cval_real:d,flipped:y,topleft:v,topright:m,righttop:S,rightbottom:x,bottomright:b,bottomleft:_,leftbottom:O,lefttop:w,edges:P}}}}}return o}(e,t,r);return Ii.polygons?(Ii.verbose&&console.log("MarchingSquaresJS-isoBands: returning single polygons for each grid cell"),u=function(e){var t=[],r=0;return e.cells.forEach(function(e,n){e.forEach(function(e,i){if(void 0!==e){var o=So[e.cval](e);"object"==typeof o&&wo(o)?"object"==typeof o[0]&&wo(o[0])?"object"==typeof o[0][0]&&wo(o[0][0])?o.forEach(function(e){e.forEach(function(e){e[0]+=i,e[1]+=n}),t[r++]=e}):(o.forEach(function(e){e[0]+=i,e[1]+=n}),t[r++]=o):console.log("MarchingSquaresJS-isoBands: bandcell polygon with malformed coordinates"):console.log("MarchingSquaresJS-isoBands: bandcell polygon with null coordinates")}})}),t}(l)):(Ii.verbose&&console.log("MarchingSquaresJS-isoBands: returning polygon paths for entire data grid"),u=function(e){for(var t=[],r=e.rows,n=e.cols,i=[],o=0;o<r;o++)for(var a=0;a<n;a++)if(void 0!==e.cells[o][a]&&e.cells[o][a].edges.length>0){var s=Po(e.cells[o][a]),u=null,l=a,c=o;null!==s&&i.push([s.p[0]+l,s.p[1]+c]);do{if(null===(u=Eo(e.cells[c][l],s.x,s.y,s.o)))break;if(i.push([u.p[0]+l,u.p[1]+c]),l+=u.x,s=u,(c+=u.y)<0||c>=r||l<0||l>=n||void 0===e.cells[c][l]){var f=Oo(e,l-=u.x,c-=u.y,u.x,u.y,u.o);if(null===f)break;f.path.forEach(function(e){i.push(e)}),l=f.i,c=f.j,s=f}}while(void 0!==e.cells[c][l]&&e.cells[c][l].edges.length>0);t.push(i),i=[],e.cells[o][a].edges.length>0&&a--}return t}(l)),"function"==typeof Ii.successCallback&&Ii.successCallback(u),u}var Ci=64,Ni=16,Ri=[],ji=[],Gi=[],Vi=[],Ai=[],Di=[],Fi=[],Bi=[],qi=[],Ji=[],Ui=[],zi=[],Wi=[],Hi=[],Xi=[],Zi=[],Yi=[],Ki=[],Qi=[],$i=[],eo=[],to=[],ro=[],no=[];Fi[85]=Ji[85]=-1,Bi[85]=Ui[85]=0,qi[85]=zi[85]=1,Qi[85]=to[85]=1,$i[85]=ro[85]=0,eo[85]=no[85]=1,Ri[85]=Vi[85]=0,ji[85]=Ai[85]=-1,Gi[85]=Xi[85]=0,Zi[85]=Wi[85]=0,Yi[85]=Hi[85]=1,Di[85]=Ki[85]=1,to[1]=to[169]=0,ro[1]=ro[169]=-1,no[1]=no[169]=0,Wi[1]=Wi[169]=-1,Hi[1]=Hi[169]=0,Xi[1]=Xi[169]=0,Ji[4]=Ji[166]=0,Ui[4]=Ui[166]=-1,zi[4]=zi[166]=1,Zi[4]=Zi[166]=1,Yi[4]=Yi[166]=0,Ki[4]=Ki[166]=0,Fi[16]=Fi[154]=0,Bi[16]=Bi[154]=1,qi[16]=qi[154]=1,Vi[16]=Vi[154]=1,Ai[16]=Ai[154]=0,Di[16]=Di[154]=1,Qi[64]=Qi[106]=0,$i[64]=$i[106]=1,eo[64]=eo[106]=0,Ri[64]=Ri[106]=-1,ji[64]=ji[106]=0,Gi[64]=Gi[106]=1,Qi[2]=Qi[168]=0,$i[2]=$i[168]=-1,eo[2]=eo[168]=1,to[2]=to[168]=0,ro[2]=ro[168]=-1,no[2]=no[168]=0,Wi[2]=Wi[168]=-1,Hi[2]=Hi[168]=0,Xi[2]=Xi[168]=0,Zi[2]=Zi[168]=-1,Yi[2]=Yi[168]=0,Ki[2]=Ki[168]=1,Fi[8]=Fi[162]=0,Bi[8]=Bi[162]=-1,qi[8]=qi[162]=0,Ji[8]=Ji[162]=0,Ui[8]=Ui[162]=-1,zi[8]=zi[162]=1,Wi[8]=Wi[162]=1,Hi[8]=Hi[162]=0,Xi[8]=Xi[162]=1,Zi[8]=Zi[162]=1,Yi[8]=Yi[162]=0,Ki[8]=Ki[162]=0,Fi[32]=Fi[138]=0,Bi[32]=Bi[138]=1,qi[32]=qi[138]=1,Ji[32]=Ji[138]=0,Ui[32]=Ui[138]=1,zi[32]=zi[138]=0,Ri[32]=Ri[138]=1,ji[32]=ji[138]=0,Gi[32]=Gi[138]=0,Vi[32]=Vi[138]=1,Ai[32]=Ai[138]=0,Di[32]=Di[138]=1,to[128]=to[42]=0,ro[128]=ro[42]=1,no[128]=no[42]=1,Qi[128]=Qi[42]=0,$i[128]=$i[42]=1,eo[128]=eo[42]=0,Ri[128]=Ri[42]=-1,ji[128]=ji[42]=0,Gi[128]=Gi[42]=1,Vi[128]=Vi[42]=-1,Ai[128]=Ai[42]=0,Di[128]=Di[42]=0,Ji[5]=Ji[165]=-1,Ui[5]=Ui[165]=0,zi[5]=zi[165]=0,to[5]=to[165]=1,ro[5]=ro[165]=0,no[5]=no[165]=0,Zi[20]=Zi[150]=0,Yi[20]=Yi[150]=1,Ki[20]=Ki[150]=1,Vi[20]=Vi[150]=0,Ai[20]=Ai[150]=-1,Di[20]=Di[150]=1,Fi[80]=Fi[90]=-1,Bi[80]=Bi[90]=0,qi[80]=qi[90]=1,Qi[80]=Qi[90]=1,$i[80]=$i[90]=0,eo[80]=eo[90]=1,Wi[65]=Wi[105]=0,Hi[65]=Hi[105]=1,Xi[65]=Xi[105]=0,Ri[65]=Ri[105]=0,ji[65]=ji[105]=-1,Gi[65]=Gi[105]=0,Fi[160]=Fi[10]=-1,Bi[160]=Bi[10]=0,qi[160]=qi[10]=1,Ji[160]=Ji[10]=-1,Ui[160]=Ui[10]=0,zi[160]=zi[10]=0,to[160]=to[10]=1,ro[160]=ro[10]=0,no[160]=no[10]=0,Qi[160]=Qi[10]=1,$i[160]=$i[10]=0,eo[160]=eo[10]=1,Zi[130]=Zi[40]=0,Yi[130]=Yi[40]=1,Ki[130]=Ki[40]=1,Wi[130]=Wi[40]=0,Hi[130]=Hi[40]=1,Xi[130]=Xi[40]=0,Ri[130]=Ri[40]=0,ji[130]=ji[40]=-1,Gi[130]=Gi[40]=0,Vi[130]=Vi[40]=0,Ai[130]=Ai[40]=-1,Di[130]=Di[40]=1,Ji[37]=Ji[133]=0,Ui[37]=Ui[133]=1,zi[37]=zi[133]=1,to[37]=to[133]=0,ro[37]=ro[133]=1,no[37]=no[133]=0,Ri[37]=Ri[133]=-1,ji[37]=ji[133]=0,Gi[37]=Gi[133]=0,Vi[37]=Vi[133]=1,Ai[37]=Ai[133]=0,Di[37]=Di[133]=0,Zi[148]=Zi[22]=-1,Yi[148]=Yi[22]=0,Ki[148]=Ki[22]=0,to[148]=to[22]=0,ro[148]=ro[22]=-1,no[148]=no[22]=1,Qi[148]=Qi[22]=0,$i[148]=$i[22]=1,eo[148]=eo[22]=1,Vi[148]=Vi[22]=-1,Ai[148]=Ai[22]=0,Di[148]=Di[22]=1,Fi[82]=Fi[88]=0,Bi[82]=Bi[88]=-1,qi[82]=qi[88]=1,Zi[82]=Zi[88]=1,Yi[82]=Yi[88]=0,Ki[82]=Ki[88]=1,Wi[82]=Wi[88]=-1,Hi[82]=Hi[88]=0,Xi[82]=Xi[88]=1,Qi[82]=Qi[88]=0,$i[82]=$i[88]=-1,eo[82]=eo[88]=0,Fi[73]=Fi[97]=0,Bi[73]=Bi[97]=1,qi[73]=qi[97]=0,Ji[73]=Ji[97]=0,Ui[73]=Ui[97]=-1,zi[73]=zi[97]=0,Wi[73]=Wi[97]=1,Hi[73]=Hi[97]=0,Xi[73]=Xi[97]=0,Ri[73]=Ri[97]=1,ji[73]=ji[97]=0,Gi[73]=Gi[97]=1,Fi[145]=Fi[25]=0,Bi[145]=Bi[25]=-1,qi[145]=qi[25]=0,Wi[145]=Wi[25]=1,Hi[145]=Hi[25]=0,Xi[145]=Xi[25]=1,to[145]=to[25]=0,ro[145]=ro[25]=1,no[145]=no[25]=1,Vi[145]=Vi[25]=-1,Ai[145]=Ai[25]=0,Di[145]=Di[25]=0,Ji[70]=Ji[100]=0,Ui[70]=Ui[100]=1,zi[70]=zi[100]=0,Zi[70]=Zi[100]=-1,Yi[70]=Yi[100]=0,Ki[70]=Ki[100]=1,Qi[70]=Qi[100]=0,$i[70]=$i[100]=-1,eo[70]=eo[100]=1,Ri[70]=Ri[100]=1,ji[70]=ji[100]=0,Gi[70]=Gi[100]=0,Ji[101]=Ji[69]=0,Ui[101]=Ui[69]=1,zi[101]=zi[69]=0,Ri[101]=Ri[69]=1,ji[101]=ji[69]=0,Gi[101]=Gi[69]=0,to[149]=to[21]=0,ro[149]=ro[21]=1,no[149]=no[21]=1,Vi[149]=Vi[21]=-1,Ai[149]=Ai[21]=0,Di[149]=Di[21]=0,Zi[86]=Zi[84]=-1,Yi[86]=Yi[84]=0,Ki[86]=Ki[84]=1,Qi[86]=Qi[84]=0,$i[86]=$i[84]=-1,eo[86]=eo[84]=1,Fi[89]=Fi[81]=0,Bi[89]=Bi[81]=-1,qi[89]=qi[81]=0,Wi[89]=Wi[81]=1,Hi[89]=Hi[81]=0,Xi[89]=Xi[81]=1,Fi[96]=Fi[74]=0,Bi[96]=Bi[74]=1,qi[96]=qi[74]=0,Ji[96]=Ji[74]=-1,Ui[96]=Ui[74]=0,zi[96]=zi[74]=1,Qi[96]=Qi[74]=1,$i[96]=$i[74]=0,eo[96]=eo[74]=0,Ri[96]=Ri[74]=1,ji[96]=ji[74]=0,Gi[96]=Gi[74]=1,Fi[24]=Fi[146]=0,Bi[24]=Bi[146]=-1,qi[24]=qi[146]=1,Zi[24]=Zi[146]=1,Yi[24]=Yi[146]=0,Ki[24]=Ki[146]=1,Wi[24]=Wi[146]=0,Hi[24]=Hi[146]=1,Xi[24]=Xi[146]=1,Vi[24]=Vi[146]=0,Ai[24]=Ai[146]=-1,Di[24]=Di[146]=0,Ji[6]=Ji[164]=-1,Ui[6]=Ui[164]=0,zi[6]=zi[164]=1,Zi[6]=Zi[164]=-1,Yi[6]=Yi[164]=0,Ki[6]=Ki[164]=0,to[6]=to[164]=0,ro[6]=ro[164]=-1,no[6]=no[164]=1,Qi[6]=Qi[164]=1,$i[6]=$i[164]=0,eo[6]=eo[164]=0,Wi[129]=Wi[41]=0,Hi[129]=Hi[41]=1,Xi[129]=Xi[41]=1,to[129]=to[41]=0,ro[129]=ro[41]=1,no[129]=no[41]=0,Ri[129]=Ri[41]=-1,ji[129]=ji[41]=0,Gi[129]=Gi[41]=0,Vi[129]=Vi[41]=0,Ai[129]=Ai[41]=-1,Di[129]=Di[41]=0,Zi[66]=Zi[104]=0,Yi[66]=Yi[104]=1,Ki[66]=Ki[104]=0,Wi[66]=Wi[104]=-1,Hi[66]=Hi[104]=0,Xi[66]=Xi[104]=1,Qi[66]=Qi[104]=0,$i[66]=$i[104]=-1,eo[66]=eo[104]=0,Ri[66]=Ri[104]=0,ji[66]=ji[104]=-1,Gi[66]=Gi[104]=1,Fi[144]=Fi[26]=-1,Bi[144]=Bi[26]=0,qi[144]=qi[26]=0,to[144]=to[26]=1,ro[144]=ro[26]=0,no[144]=no[26]=1,Qi[144]=Qi[26]=0,$i[144]=$i[26]=1,eo[144]=eo[26]=1,Vi[144]=Vi[26]=-1,Ai[144]=Ai[26]=0,Di[144]=Di[26]=1,Ji[36]=Ji[134]=0,Ui[36]=Ui[134]=1,zi[36]=zi[134]=1,Zi[36]=Zi[134]=0,Yi[36]=Yi[134]=1,Ki[36]=Ki[134]=0,Ri[36]=Ri[134]=0,ji[36]=ji[134]=-1,Gi[36]=Gi[134]=1,Vi[36]=Vi[134]=1,Ai[36]=Ai[134]=0,Di[36]=Di[134]=0,Fi[9]=Fi[161]=-1,Bi[9]=Bi[161]=0,qi[9]=qi[161]=0,Ji[9]=Ji[161]=0,Ui[9]=Ui[161]=-1,zi[9]=zi[161]=0,Wi[9]=Wi[161]=1,Hi[9]=Hi[161]=0,Xi[9]=Xi[161]=0,to[9]=to[161]=1,ro[9]=ro[161]=0,no[9]=no[161]=1,Fi[136]=0,Bi[136]=1,qi[136]=1,Ji[136]=0,Ui[136]=1,zi[136]=0,Zi[136]=-1,Yi[136]=0,Ki[136]=1,Wi[136]=-1,Hi[136]=0,Xi[136]=0,to[136]=0,ro[136]=-1,no[136]=0,Qi[136]=0,$i[136]=-1,eo[136]=1,Ri[136]=1,ji[136]=0,Gi[136]=0,Vi[136]=1,Ai[136]=0,Di[136]=1,Fi[34]=0,Bi[34]=-1,qi[34]=0,Ji[34]=0,Ui[34]=-1,zi[34]=1,Zi[34]=1,Yi[34]=0,Ki[34]=0,Wi[34]=1,Hi[34]=0,Xi[34]=1,to[34]=0,ro[34]=1,no[34]=1,Qi[34]=0,$i[34]=1,eo[34]=0,Ri[34]=-1,ji[34]=0,Gi[34]=1,Vi[34]=-1,Ai[34]=0,Di[34]=0,Fi[35]=0,Bi[35]=1,qi[35]=1,Ji[35]=0,Ui[35]=-1,zi[35]=1,Zi[35]=1,Yi[35]=0,Ki[35]=0,Wi[35]=-1,Hi[35]=0,Xi[35]=0,to[35]=0,ro[35]=-1,no[35]=0,Qi[35]=0,$i[35]=1,eo[35]=0,Ri[35]=-1,ji[35]=0,Gi[35]=1,Vi[35]=1,Ai[35]=0,Di[35]=1,Fi[153]=0,Bi[153]=1,qi[153]=1,Wi[153]=-1,Hi[153]=0,Xi[153]=0,to[153]=0,ro[153]=-1,no[153]=0,Vi[153]=1,Ai[153]=0,Di[153]=1,Ji[102]=0,Ui[102]=-1,zi[102]=1,Zi[102]=1,Yi[102]=0,Ki[102]=0,Qi[102]=0,$i[102]=1,eo[102]=0,Ri[102]=-1,ji[102]=0,Gi[102]=1,Fi[155]=0,Bi[155]=-1,qi[155]=0,Wi[155]=1,Hi[155]=0,Xi[155]=1,to[155]=0,ro[155]=1,no[155]=1,Vi[155]=-1,Ai[155]=0,Di[155]=0,Ji[103]=0,Ui[103]=1,zi[103]=0,Zi[103]=-1,Yi[103]=0,Ki[103]=1,Qi[103]=0,$i[103]=-1,eo[103]=1,Ri[103]=1,ji[103]=0,Gi[103]=0,Fi[152]=0,Bi[152]=1,qi[152]=1,Zi[152]=-1,Yi[152]=0,Ki[152]=1,Wi[152]=-1,Hi[152]=0,Xi[152]=0,to[152]=0,ro[152]=-1,no[152]=0,Qi[152]=0,$i[152]=-1,eo[152]=1,Vi[152]=1,Ai[152]=0,Di[152]=1,Fi[156]=0,Bi[156]=-1,qi[156]=1,Zi[156]=1,Yi[156]=0,Ki[156]=1,Wi[156]=-1,Hi[156]=0,Xi[156]=0,to[156]=0,ro[156]=-1,no[156]=0,Qi[156]=0,$i[156]=1,eo[156]=1,Vi[156]=-1,Ai[156]=0,Di[156]=1,Fi[137]=0,Bi[137]=1,qi[137]=1,Ji[137]=0,Ui[137]=1,zi[137]=0,Wi[137]=-1,Hi[137]=0,Xi[137]=0,to[137]=0,ro[137]=-1,no[137]=0,Ri[137]=1,ji[137]=0,Gi[137]=0,Vi[137]=1,Ai[137]=0,Di[137]=1,Fi[139]=0,Bi[139]=1,qi[139]=1,Ji[139]=0,Ui[139]=-1,zi[139]=0,Wi[139]=1,Hi[139]=0,Xi[139]=0,to[139]=0,ro[139]=1,no[139]=0,Ri[139]=-1,ji[139]=0,Gi[139]=0,Vi[139]=1,Ai[139]=0,Di[139]=1,Fi[98]=0,Bi[98]=-1,qi[98]=0,Ji[98]=0,Ui[98]=-1,zi[98]=1,Zi[98]=1,Yi[98]=0,Ki[98]=0,Wi[98]=1,Hi[98]=0,Xi[98]=1,Qi[98]=0,$i[98]=1,eo[98]=0,Ri[98]=-1,ji[98]=0,Gi[98]=1,Fi[99]=0,Bi[99]=1,qi[99]=0,Ji[99]=0,Ui[99]=-1,zi[99]=1,Zi[99]=1,Yi[99]=0,Ki[99]=0,Wi[99]=-1,Hi[99]=0,Xi[99]=1,Qi[99]=0,$i[99]=-1,eo[99]=0,Ri[99]=1,ji[99]=0,Gi[99]=1,Ji[38]=0,Ui[38]=-1,zi[38]=1,Zi[38]=1,Yi[38]=0,Ki[38]=0,to[38]=0,ro[38]=1,no[38]=1,Qi[38]=0,$i[38]=1,eo[38]=0,Ri[38]=-1,ji[38]=0,Gi[38]=1,Vi[38]=-1,Ai[38]=0,Di[38]=0,Ji[39]=0,Ui[39]=1,zi[39]=1,Zi[39]=-1,Yi[39]=0,Ki[39]=0,to[39]=0,ro[39]=-1,no[39]=1,Qi[39]=0,$i[39]=1,eo[39]=0,Ri[39]=-1,ji[39]=0,Gi[39]=1,Vi[39]=1,Ai[39]=0,Di[39]=0;var io=function(e){return[[e.bottomleft,0],[0,0],[0,e.leftbottom]]},oo=function(e){return[[1,e.rightbottom],[1,0],[e.bottomright,0]]},ao=function(e){return[[e.topright,1],[1,1],[1,e.righttop]]},so=function(e){return[[0,e.lefttop],[0,1],[e.topleft,1]]},uo=function(e){return[[e.bottomright,0],[e.bottomleft,0],[0,e.leftbottom],[0,e.lefttop]]},lo=function(e){return[[e.bottomright,0],[e.bottomleft,0],[1,e.righttop],[1,e.rightbottom]]},co=function(e){return[[1,e.righttop],[1,e.rightbottom],[e.topleft,1],[e.topright,1]]},fo=function(e){return[[0,e.leftbottom],[0,e.lefttop],[e.topleft,1],[e.topright,1]]},ho=[],po=[],yo=[],go=[],vo=[],mo=[],_o=[],bo=[];go[1]=vo[1]=18,go[169]=vo[169]=18,yo[4]=po[4]=12,yo[166]=po[166]=12,ho[16]=bo[16]=4,ho[154]=bo[154]=4,mo[64]=_o[64]=22,mo[106]=_o[106]=22,yo[2]=mo[2]=17,go[2]=vo[2]=18,yo[168]=mo[168]=17,go[168]=vo[168]=18,ho[8]=go[8]=9,po[8]=yo[8]=12,ho[162]=go[162]=9,po[162]=yo[162]=12,ho[32]=bo[32]=4,po[32]=_o[32]=1,ho[138]=bo[138]=4,po[138]=_o[138]=1,vo[128]=bo[128]=21,mo[128]=_o[128]=22,vo[42]=bo[42]=21,mo[42]=_o[42]=22,po[5]=vo[5]=14,po[165]=vo[165]=14,yo[20]=bo[20]=6,yo[150]=bo[150]=6,ho[80]=mo[80]=11,ho[90]=mo[90]=11,go[65]=_o[65]=3,go[105]=_o[105]=3,ho[160]=mo[160]=11,po[160]=vo[160]=14,ho[10]=mo[10]=11,po[10]=vo[10]=14,yo[130]=bo[130]=6,go[130]=_o[130]=3,yo[40]=bo[40]=6,go[40]=_o[40]=3,po[101]=_o[101]=1,po[69]=_o[69]=1,vo[149]=bo[149]=21,vo[21]=bo[21]=21,yo[86]=mo[86]=17,yo[84]=mo[84]=17,ho[89]=go[89]=9,ho[81]=go[81]=9,ho[96]=_o[96]=0,po[96]=mo[96]=15,ho[74]=_o[74]=0,po[74]=mo[74]=15,ho[24]=yo[24]=8,go[24]=bo[24]=7,ho[146]=yo[146]=8,go[146]=bo[146]=7,po[6]=mo[6]=15,yo[6]=vo[6]=16,po[164]=mo[164]=15,yo[164]=vo[164]=16,go[129]=bo[129]=7,vo[129]=_o[129]=20,go[41]=bo[41]=7,vo[41]=_o[41]=20,yo[66]=_o[66]=2,go[66]=mo[66]=19,yo[104]=_o[104]=2,go[104]=mo[104]=19,ho[144]=vo[144]=10,mo[144]=bo[144]=23,ho[26]=vo[26]=10,mo[26]=bo[26]=23,po[36]=bo[36]=5,yo[36]=_o[36]=2,po[134]=bo[134]=5,yo[134]=_o[134]=2,ho[9]=vo[9]=10,po[9]=go[9]=13,ho[161]=vo[161]=10,po[161]=go[161]=13,po[37]=bo[37]=5,vo[37]=_o[37]=20,po[133]=bo[133]=5,vo[133]=_o[133]=20,yo[148]=vo[148]=16,mo[148]=bo[148]=23,yo[22]=vo[22]=16,mo[22]=bo[22]=23,ho[82]=yo[82]=8,go[82]=mo[82]=19,ho[88]=yo[88]=8,go[88]=mo[88]=19,ho[73]=_o[73]=0,po[73]=go[73]=13,ho[97]=_o[97]=0,po[97]=go[97]=13,ho[145]=go[145]=9,vo[145]=bo[145]=21,ho[25]=go[25]=9,vo[25]=bo[25]=21,po[70]=_o[70]=1,yo[70]=mo[70]=17,po[100]=_o[100]=1,yo[100]=mo[100]=17,ho[34]=go[34]=9,po[34]=yo[34]=12,vo[34]=bo[34]=21,mo[34]=_o[34]=22,ho[136]=bo[136]=4,po[136]=_o[136]=1,yo[136]=mo[136]=17,go[136]=vo[136]=18,ho[35]=bo[35]=4,po[35]=yo[35]=12,go[35]=vo[35]=18,mo[35]=_o[35]=22,ho[153]=bo[153]=4,go[153]=vo[153]=18,po[102]=yo[102]=12,mo[102]=_o[102]=22,ho[155]=go[155]=9,vo[155]=bo[155]=23,po[103]=_o[103]=1,yo[103]=mo[103]=17,ho[152]=bo[152]=4,yo[152]=mo[152]=17,go[152]=vo[152]=18,ho[156]=yo[156]=8,go[156]=vo[156]=18,mo[156]=bo[156]=23,ho[137]=bo[137]=4,po[137]=_o[137]=1,go[137]=vo[137]=18,ho[139]=bo[139]=4,po[139]=go[139]=13,vo[139]=_o[139]=20,ho[98]=go[98]=9,po[98]=yo[98]=12,mo[98]=_o[98]=22,ho[99]=_o[99]=0,po[99]=yo[99]=12,go[99]=mo[99]=19,po[38]=yo[38]=12,vo[38]=bo[38]=21,mo[38]=_o[38]=22,po[39]=bo[39]=5,yo[39]=vo[39]=16,mo[39]=_o[39]=22;var So=[];function xo(e,t,r){return(e-t)/(r-t)}function wo(e){return e.constructor.toString().indexOf("Array")>-1}function Oo(e,t,r,n,i,o){for(var a=e.cells[r][t],s=a.cval_real,u=t+n,l=r+i,c=[],f=!1;!f;){if(void 0===e.cells[l]||void 0===e.cells[l][u])if(l-=i,u-=n,s=(a=e.cells[l][u]).cval_real,-1===i)if(0===o)if(1&s)c.push([u,l]),n=-1,i=0,o=0;else{if(!(4&s)){c.push([u+a.bottomright,l]),n=0,i=1,o=1,f=!0;break}c.push([u+1,l]),n=1,i=0,o=0}else{if(!(1&s)){if(4&s){c.push([u+a.bottomright,l]),n=0,i=1,o=1,f=!0;break}c.push([u+a.bottomleft,l]),n=0,i=1,o=0,f=!0;break}c.push([u,l]),n=-1,i=0,o=0}else if(1===i)if(0===o){if(!(s&Ni)){if(s&Ci){c.push([u+a.topleft,l+1]),n=0,i=-1,o=0,f=!0;break}c.push([u+a.topright,l+1]),n=0,i=-1,o=1,f=!0;break}c.push([u+1,l+1]),n=1,i=0,o=1}else c.push([u+1,l+1]),n=1,i=0,o=1;else if(-1===n)if(0===o){if(!(s&Ci)){if(1&s){c.push([u,l+a.leftbottom]),n=1,i=0,o=0,f=!0;break}c.push([u,l+a.lefttop]),n=1,i=0,o=1,f=!0;break}c.push([u,l+1]),n=0,i=1,o=0}else{if(!(s&Ci)){console.log("MarchingSquaresJS-isoBands: wtf");break}c.push([u,l+1]),n=0,i=1,o=0}else{if(1!==n){console.log("MarchingSquaresJS-isoBands: we came from nowhere!");break}if(0===o){if(!(4&s)){c.push([u+1,l+a.rightbottom]),n=-1,i=0,o=0,f=!0;break}c.push([u+1,l]),n=0,i=-1,o=1}else{if(!(4&s)){if(s&Ni){c.push([u+1,l+a.righttop]),n=-1,i=0,o=1;break}c.push([u+1,l+a.rightbottom]),n=-1,i=0,o=0,f=!0;break}c.push([u+1,l]),n=0,i=-1,o=1}}else if(s=(a=e.cells[l][u]).cval_real,-1===n)if(0===o)if(void 0!==e.cells[l-1]&&void 0!==e.cells[l-1][u])n=0,i=-1,o=1;else{if(!(1&s)){c.push([u+a.bottomright,l]),n=0,i=1,o=1,f=!0;break}c.push([u,l])}else{if(!(s&Ci)){console.log("MarchingSquaresJS-isoBands: found entry from top at "+u+","+l);break}console.log("MarchingSquaresJS-isoBands: proceeding in x-direction!")}else if(1===n){if(0===o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==e.cells[l+1]&&void 0!==e.cells[l+1][u])n=0,i=1,o=0;else{if(!(s&Ni)){c.push([u+a.topleft,l+1]),n=0,i=-1,o=0,f=!0;break}c.push([u+1,l+1]),n=1,i=0,o=1}}else if(-1===i){if(1!==o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==e.cells[l][u+1])n=1,i=0,o=1;else{if(!(4&s)){c.push([u+1,l+a.righttop]),n=-1,i=0,o=1,f=!0;break}c.push([u+1,l]),n=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!==e.cells[l][u-1])n=-1,i=0,o=0;else{if(!(s&Ci)){c.push([u,l+a.leftbottom]),n=1,i=0,o=0,f=!0;break}c.push([u,l+1]),n=0,i=1,o=0}}if(l+=i,(u+=n)===t&&l===r)break}return{path:c,i:u,j:l,x:n,y:i,o:o}}function Po(e){if(e.edges.length>0){var t=e.edges[e.edges.length-1],r=e.cval_real;switch(t){case 0:return r&Ni?{p:[1,e.righttop],x:-1,y:0,o:1}:{p:[e.topleft,1],x:0,y:-1,o:0};case 1:return 4&r?{p:[e.topleft,1],x:0,y:-1,o:0}:{p:[1,e.rightbottom],x:-1,y:0,o:0};case 2:return 4&r?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[e.topleft,1],x:0,y:-1,o:0};case 3:return 1&r?{p:[e.topleft,1],x:0,y:-1,o:0}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 4:return r&Ni?{p:[1,e.righttop],x:-1,y:0,o:1}:{p:[e.topright,1],x:0,y:-1,o:1};case 5:return 4&r?{p:[e.topright,1],x:0,y:-1,o:1}:{p:[1,e.rightbottom],x:-1,y:0,o:0};case 6:return 4&r?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[e.topright,1],x:0,y:-1,o:1};case 7:return 1&r?{p:[e.topright,1],x:0,y:-1,o:1}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 8:return 4&r?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[1,e.righttop],x:-1,y:0,o:1};case 9:return 1&r?{p:[1,e.righttop],x:-1,y:0,o:1}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 10:return 1&r?{p:[0,e.leftbottom],x:1,y:0,o:0}:{p:[1,e.righttop],x:-1,y:0,o:1};case 11:return r&Ci?{p:[1,e.righttop],x:-1,y:0,o:1}:{p:[0,e.lefttop],x:1,y:0,o:1};case 12:return 4&r?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[1,e.rightbottom],x:-1,y:0,o:0};case 13:return 1&r?{p:[1,e.rightbottom],x:-1,y:0,o:0}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 14:return 1&r?{p:[0,e.leftbottom],x:1,y:0,o:0}:{p:[1,e.rightbottom],x:-1,y:0,o:0};case 15:return r&Ci?{p:[1,e.rightbottom],x:-1,y:0,o:0}:{p:[0,e.lefttop],x:1,y:0,o:1};case 16:return 4&r?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[0,e.leftbottom],x:1,y:0,o:0};case 17:return r&Ci?{p:[e.bottomright,0],x:0,y:1,o:1}:{p:[0,e.lefttop],x:1,y:0,o:1};case 18:return 1&r?{p:[0,e.leftbottom],x:1,y:0,o:0}:{p:[e.bottomleft,0],x:0,y:1,o:0};case 19:return r&Ci?{p:[e.bottomleft,0],x:0,y:1,o:0}:{p:[0,e.lefttop],x:1,y:0,o:1};case 20:return r&Ci?{p:[e.topleft,1],x:0,y:-1,o:0}:{p:[0,e.leftbottom],x:1,y:0,o:0};case 21:return r&Ni?{p:[0,e.leftbottom],x:1,y:0,o:0}:{p:[e.topright,1],x:0,y:-1,o:1};case 22:return r&Ci?{p:[e.topleft,1],x:0,y:-1,o:0}:{p:[0,e.lefttop],x:1,y:0,o:1};case 23:return r&Ni?{p:[0,e.lefttop],x:1,y:0,o:1}:{p:[e.topright,1],x:0,y:-1,o:1};default:console.log("MarchingSquaresJS-isoBands: edge index out of range!"),console.log(e)}}return null}function Eo(e,t,r,n){var i,o,a,s,u,l=e.cval;switch(t){case-1:switch(n){case 0:i=po[l],a=Ji[l],s=Ui[l],u=zi[l];break;default:i=ho[l],a=Fi[l],s=Bi[l],u=qi[l]}break;case 1:switch(n){case 0:i=vo[l],a=to[l],s=ro[l],u=no[l];break;default:i=mo[l],a=Qi[l],s=$i[l],u=eo[l]}break;default:switch(r){case-1:switch(n){case 0:i=_o[l],a=Ri[l],s=ji[l],u=Gi[l];break;default:i=bo[l],a=Vi[l],s=Ai[l],u=Di[l]}break;case 1:switch(n){case 0:i=go[l],a=Wi[l],s=Hi[l],u=Xi[l];break;default:i=yo[l],a=Zi[l],s=Yi[l],u=Ki[l]}}}if(o=e.edges.indexOf(i),void 0===e.edges[o])return null;switch(function(e,t){delete e.edges[t];for(var r=t+1;r<e.edges.length;r++)e.edges[r-1]=e.edges[r];e.edges.pop()}(e,o),l=e.cval_real,i){case 0:l&Ni?(t=e.topleft,r=1):(t=1,r=e.righttop);break;case 1:4&l?(t=1,r=e.rightbottom):(t=e.topleft,r=1);break;case 2:4&l?(t=e.topleft,r=1):(t=e.bottomright,r=0);break;case 3:1&l?(t=e.bottomleft,r=0):(t=e.topleft,r=1);break;case 4:l&Ni?(t=e.topright,r=1):(t=1,r=e.righttop);break;case 5:4&l?(t=1,r=e.rightbottom):(t=e.topright,r=1);break;case 6:4&l?(t=e.topright,r=1):(t=e.bottomright,r=0);break;case 7:1&l?(t=e.bottomleft,r=0):(t=e.topright,r=1);break;case 8:4&l?(t=1,r=e.righttop):(t=e.bottomright,r=0);break;case 9:1&l?(t=e.bottomleft,r=0):(t=1,r=e.righttop);break;case 10:1&l?(t=1,r=e.righttop):(t=0,r=e.leftbottom);break;case 11:l&Ci?(t=0,r=e.lefttop):(t=1,r=e.righttop);break;case 12:4&l?(t=1,r=e.rightbottom):(t=e.bottomright,r=0);break;case 13:1&l?(t=e.bottomleft,r=0):(t=1,r=e.rightbottom);break;case 14:1&l?(t=1,r=e.rightbottom):(t=0,r=e.leftbottom);break;case 15:l&Ci?(t=0,r=e.lefttop):(t=1,r=e.rightbottom);break;case 16:4&l?(t=0,r=e.leftbottom):(t=e.bottomright,r=0);break;case 17:l&Ci?(t=0,r=e.lefttop):(t=e.bottomright,r=0);break;case 18:1&l?(t=e.bottomleft,r=0):(t=0,r=e.leftbottom);break;case 19:l&Ci?(t=0,r=e.lefttop):(t=e.bottomleft,r=0);break;case 20:l&Ci?(t=0,r=e.leftbottom):(t=e.topleft,r=1);break;case 21:l&Ni?(t=e.topright,r=1):(t=0,r=e.leftbottom);break;case 22:l&Ci?(t=0,r=e.lefttop):(t=e.topleft,r=1);break;case 23:l&Ni?(t=e.topright,r=1):(t=0,r=e.lefttop);break;default:return console.log("MarchingSquaresJS-isoBands: edge index out of range!"),console.log(e),null}return void 0!==t&&void 0!==r&&void 0!==a&&void 0!==s&&void 0!==u||(console.log("MarchingSquaresJS-isoBands: undefined value!"),console.log(e),console.log(t+" "+r+" "+a+" "+s+" "+u)),{p:[t,r],x:a,y:s,o:u}}function ko(e){var t=[],r=[];e.forEach(function(e){var n=xn(c([e]));r.push(n),t.push({ring:e,area:n})}),r.sort(function(e,t){return t-e});var n=[];return r.forEach(function(e){for(var r=0;r<t.length;r++)if(t[r].area===e){n.push(t[r].ring),t.splice(r,1);break}}),n}function To(e){for(var t=e.map(function(e){return{lrCoordinates:e,grouped:!1}}),r=[];!Io(t);)for(var n=0;n<t.length;n++)if(!t[n].grouped){var i=[];i.push(t[n].lrCoordinates),t[n].grouped=!0;for(var o=c([t[n].lrCoordinates]),a=n+1;a<t.length;a++)t[a].grouped||Mo(c([t[a].lrCoordinates]),o)&&(i.push(t[a].lrCoordinates),t[a].grouped=!0);r.push(i)}return r}function Mo(e,t){for(var r=fr(e),n=0;n<r.features.length;n++)if(!dt(r.features[n],t))return!1;return!0}function Io(e){for(var t=0;t<e.length;t++)if(!1===e[t].grouped)return!1;return!0}function Lo(e,t,r){if(!M(r=r||{}))throw new Error("options is invalid");var n=r.pivot,i=r.mutate;if(!e)throw new Error("geojson is required");if(null==t||isNaN(t))throw new Error("angle is required");return 0===t||(n||(n=cr(e)),!1!==i&&void 0!==i||(e=xt(e)),N(e,function(e){var r=_i(n,e)+t,i=dn(n,e),o=$(Si(n,i,r));e[0]=o[0],e[1]=o[1]})),e}function Co(e,t,r){if(!M(r=r||{}))throw new Error("options is invalid");var n=r.origin,i=r.mutate;if(!e)throw new Error("geojson required");if("number"!=typeof t||0===t)throw new Error("invalid factor");var o=Array.isArray(n)||"object"==typeof n;return!0!==i&&(e=xt(e)),"FeatureCollection"!==e.type||o?No(e,t,n):(V(e,function(r,i){e.features[i]=No(r,t,n)}),e)}function No(e,t,r){var n="Point"===oe(e);return r=function(e,t){if(null==t&&(t="centroid"),Array.isArray(t)||"object"==typeof t)return Q(t);var r=e.bbox?e.bbox:K(e),n=r[0],i=r[1],o=r[2],a=r[3];switch(t){case"sw":case"southwest":case"westsouth":case"bottomleft":return u([n,i]);case"se":case"southeast":case"eastsouth":case"bottomright":return u([o,i]);case"nw":case"northwest":case"westnorth":case"topleft":return u([n,a]);case"ne":case"northeast":case"eastnorth":case"topright":return u([o,a]);case"center":return lr(e);case void 0:case null:case"centroid":return cr(e);default:throw new Error("invalid origin")}}(e,r),1===t||n||N(e,function(e){var n=dn(r,e),i=_i(r,e),o=$(Si(r,n*t,i));e[0]=o[0],e[1]=o[1],3===e.length&&(e[2]*=t)}),e}function Ro(e){var t=e[0],r=e[1];return[r[0]-t[0],r[1]-t[1]]}function jo(e,t){return e[0]*t[1]-t[0]*e[1]}function Go(e,t,r){var n=[],i=x(t,r),o=$(e),a=[];return o.forEach(function(e,t){if(t!==o.length-1){var r=(l=e,c=o[t+1],f=i,h=Math.sqrt((l[0]-c[0])*(l[0]-c[0])+(l[1]-c[1])*(l[1]-c[1])),p=l[0]+f*(c[1]-l[1])/h,d=c[0]+f*(c[1]-l[1])/h,y=l[1]+f*(l[0]-c[0])/h,g=c[1]+f*(l[0]-c[0])/h,[[p,y],[d,g]]);if(n.push(r),t>0){var s=n[t-1],u=function(e,t){return!function(e,t){return 0===jo(Ro(e),Ro(t))}(e,t)&&function(e,t){var r,n,i=e[0],o=Ro(e),a=t[0],s=Ro(t),u=jo(o,s);return function(e,t){return[e[0]+t[0],e[1]+t[1]]}(i,function(e,t){return[e*t[0],e*t[1]]}(jo((n=i,[(r=a)[0]-n[0],r[1]-n[1]]),s)/u,o))}(e,t)}(r,s);!1!==u&&(s[1]=u,r[0]=u),a.push(s[0]),t===o.length-2&&(a.push(r[0]),a.push(r[1]))}2===o.length&&(a.push(r[0]),a.push(r[1]))}var l,c,f,h,p,d,y,g}),h(a,e.properties)}function Vo(e,t,r){var n=t[0]-e[0],i=t[1]-e[1],o=r[0]-t[0];return function(e){return(e>0)-(e<0)||+e}(n*(r[1]-t[1])-o*i)}function Ao(e,t){return t.geometry.coordinates[0].every(function(t){return dt(u(t),e)})}So[1]=So[169]=io,So[4]=So[166]=oo,So[16]=So[154]=ao,So[64]=So[106]=so,So[168]=So[2]=uo,So[162]=So[8]=lo,So[138]=So[32]=co,So[42]=So[128]=fo,So[5]=So[165]=function(e){return[[0,0],[0,e.leftbottom],[1,e.rightbottom],[1,0]]},So[20]=So[150]=function(e){return[[1,0],[e.bottomright,0],[e.topright,1],[1,1]]},So[80]=So[90]=function(e){return[[1,1],[1,e.righttop],[0,e.lefttop],[0,1]]},So[65]=So[105]=function(e){return[[e.bottomleft,0],[0,0],[0,1],[e.topleft,1]]},So[160]=So[10]=function(e){return[[1,e.righttop],[1,e.rightbottom],[0,e.leftbottom],[0,e.lefttop]]},So[130]=So[40]=function(e){return[[e.topleft,1],[e.topright,1],[e.bottomright,0],[e.bottomleft,0]]},So[85]=function(){return[[0,0],[0,1],[1,1],[1,0]]},So[101]=So[69]=function(e){return[[1,e.rightbottom],[1,0],[0,0],[0,1],[e.topleft,1]]},So[149]=So[21]=function(e){return[[e.topright,1],[1,1],[1,0],[0,0],[0,e.leftbottom]]},So[86]=So[84]=function(e){return[[1,0],[e.bottomright,0],[0,e.lefttop],[0,1],[1,1]]},So[89]=So[81]=function(e){return[[1,1],[1,e.righttop],[e.bottomleft,0],[0,0],[0,1]]},So[96]=So[74]=function(e){return[[1,e.righttop],[1,e.rightbottom],[0,e.lefttop],[0,1],[e.topleft,1]]},So[24]=So[146]=function(e){return[[1,1],[1,e.righttop],[e.bottomright,0],[e.bottomleft,0],[e.topright,1]]},So[6]=So[164]=function(e){return[[1,e.rightbottom],[1,0],[e.bottomright,0],[0,e.leftbottom],[0,e.lefttop]]},So[129]=So[41]=function(e){return[[e.topright,1],[e.bottomleft,0],[0,0],[0,e.leftbottom],[e.topleft,1]]},So[66]=So[104]=function(e){return[[e.bottomright,0],[e.bottomleft,0],[0,e.lefttop],[0,1],[e.topleft,1]]},So[144]=So[26]=function(e){return[[1,1],[1,e.righttop],[0,e.leftbottom],[0,e.lefttop],[e.topright,1]]},So[36]=So[134]=function(e){return[[1,e.rightbottom],[1,0],[e.bottomright,0],[e.topleft,1],[e.topright,1]]},So[9]=So[161]=function(e){return[[1,e.righttop],[1,e.rightbottom],[e.bottomleft,0],[0,0],[0,e.leftbottom]]},So[37]=So[133]=function(e){return[[1,e.rightbottom],[1,0],[0,0],[0,e.leftbottom],[e.topleft,1],[e.topright,1]]},So[148]=So[22]=function(e){return[[1,1],[1,0],[e.bottomright,0],[0,e.leftbottom],[0,e.lefttop],[e.topright,1]]},So[82]=So[88]=function(e){return[[1,1],[1,e.righttop],[e.bottomright,0],[e.bottomleft,0],[0,e.lefttop],[0,1]]},So[73]=So[97]=function(e){return[[1,e.righttop],[1,e.rightbottom],[e.bottomleft,0],[0,0],[0,1],[e.topleft,1]]},So[145]=So[25]=function(e){return[[1,1],[1,e.righttop],[e.bottomleft,0],[0,0],[0,e.leftbottom],[e.topright,1]]},So[70]=So[100]=function(e){return[[1,e.rightbottom],[1,0],[e.bottomright,0],[0,e.lefttop],[0,1],[e.topleft,1]]},So[34]=function(e){return[fo(e),lo(e)]},So[35]=function(e){return[[1,e.righttop],[1,e.rightbottom],[e.bottomright,0],[e.bottomleft,0],[0,e.leftbottom],[0,e.lefttop],[e.topleft,1],[e.topright,1]]},So[136]=function(e){return[co(e),uo(e)]},So[153]=function(e){return[ao(e),io(e)]},So[102]=function(e){return[oo(e),so(e)]},So[155]=function(e){return[[1,1],[1,e.righttop],[e.bottomleft,0],[0,0],[0,e.leftbottom],[e.topright,1]]},So[103]=function(e){return[[1,e.rightbottom],[1,0],[e.bottomright,0],[0,e.lefttop],[0,1],[e.topleft,1]]},So[152]=function(e){return[ao(e),uo(e)]},So[156]=function(e){return[[1,1],[1,e.righttop],[e.bottomright,0],[e.bottomleft,0],[0,e.leftbottom],[0,e.lefttop],[e.topright,1]]},So[137]=function(e){return[co(e),io(e)]},So[139]=function(e){return[[1,e.righttop],[1,e.rightbottom],[e.bottomleft,0],[0,0],[0,e.leftbottom],[e.topleft,1],[e.topright,1]]},So[98]=function(e){return[lo(e),so(e)]},So[99]=function(e){return[[1,e.righttop],[1,e.rightbottom],[e.bottomright,0],[e.bottomleft,0],[0,e.lefttop],[0,1],[e.topleft,1]]},So[38]=function(e){return[oo(e),fo(e)]},So[39]=function(e){return[[1,e.rightbottom],[1,0],[e.bottomright,0],[0,e.leftbottom],[0,e.lefttop],[e.topleft,1],[e.topright,1]]};var Do=function(){function e(t){this.id=e.buildId(t),this.coordinates=t,this.innerEdges=[],this.outerEdges=[],this.outerEdgesSorted=!1}return e.buildId=function(e){return e.join(",")},e.prototype.removeInnerEdge=function(e){this.innerEdges=this.innerEdges.filter(function(t){return t.from.id!==e.from.id})},e.prototype.removeOuterEdge=function(e){this.outerEdges=this.outerEdges.filter(function(t){return t.to.id!==e.to.id})},e.prototype.addOuterEdge=function(e){this.outerEdges.push(e),this.outerEdgesSorted=!1},e.prototype.sortOuterEdges=function(){var e=this;this.outerEdgesSorted||(this.outerEdges.sort(function(t,r){var n=t.to,i=r.to;if(n.coordinates[0]-e.coordinates[0]>=0&&i.coordinates[0]-e.coordinates[0]<0)return 1;if(n.coordinates[0]-e.coordinates[0]<0&&i.coordinates[0]-e.coordinates[0]>=0)return-1;if(n.coordinates[0]-e.coordinates[0]==0&&i.coordinates[0]-e.coordinates[0]==0)return n.coordinates[1]-e.coordinates[1]>=0||i.coordinates[1]-e.coordinates[1]>=0?n.coordinates[1]-i.coordinates[1]:i.coordinates[1]-n.coordinates[1];var o=Vo(e.coordinates,n.coordinates,i.coordinates);return o<0?1:o>0?-1:Math.pow(n.coordinates[0]-e.coordinates[0],2)+Math.pow(n.coordinates[1]-e.coordinates[1],2)-(Math.pow(i.coordinates[0]-e.coordinates[0],2)+Math.pow(i.coordinates[1]-e.coordinates[1],2))}),this.outerEdgesSorted=!0)},e.prototype.getOuterEdges=function(){return this.sortOuterEdges(),this.outerEdges},e.prototype.getOuterEdge=function(e){return this.sortOuterEdges(),this.outerEdges[e]},e.prototype.addInnerEdge=function(e){this.innerEdges.push(e)},e}(),Fo=function(){function e(e,t){this.from=e,this.to=t,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 e.prototype.getSymetric=function(){return this.symetric||(this.symetric=new e(this.to,this.from),this.symetric.symetric=this),this.symetric},e.prototype.deleteEdge=function(){this.from.removeOuterEdge(this),this.to.removeInnerEdge(this)},e.prototype.isEqual=function(e){return this.from.id===e.from.id&&this.to.id===e.to.id},e.prototype.toString=function(){return"Edge { "+this.from.id+" -> "+this.to.id+" }"},e.prototype.toLineString=function(){return h([this.from.coordinates,this.to.coordinates])},e.prototype.compareTo=function(e){return Vo(e.from.coordinates,e.to.coordinates,this.to.coordinates)},e}(),Bo=function(){function e(){this.edges=[],this.polygon=void 0,this.envelope=void 0}return e.prototype.push=function(e){this.edges.push(e),this.polygon=this.envelope=void 0},e.prototype.get=function(e){return this.edges[e]},Object.defineProperty(e.prototype,"length",{get:function(){return this.edges.length},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e){this.edges.forEach(e)},e.prototype.map=function(e){return this.edges.map(e)},e.prototype.some=function(e){return this.edges.some(e)},e.prototype.isValid=function(){return!0},e.prototype.isHole=function(){var e=this,t=this.edges.reduce(function(t,r,n){return r.from.coordinates[1]>e.edges[t].from.coordinates[1]&&(t=n),t},0),r=(0===t?this.length:t)-1,n=(t+1)%this.length,i=Vo(this.edges[r].from.coordinates,this.edges[t].from.coordinates,this.edges[n].from.coordinates);return 0===i?this.edges[r].from.coordinates[0]>this.edges[n].from.coordinates[0]:i>0},e.prototype.toMultiPoint=function(){return g(this.edges.map(function(e){return e.from.coordinates}))},e.prototype.toPolygon=function(){if(this.polygon)return this.polygon;var e=this.edges.map(function(e){return e.from.coordinates});return e.push(this.edges[0].from.coordinates),this.polygon=c([e])},e.prototype.getEnvelope=function(){return this.envelope?this.envelope:this.envelope=ir(this.toPolygon())},e.findEdgeRingContaining=function(e,t){var r,n,i=e.getEnvelope();return t.forEach(function(t){var o,a,s,l,c,f,h=t.getEnvelope();if(n&&(r=n.getEnvelope()),a=i,s=(o=h).geometry.coordinates[0].map(function(e){return e[0]}),l=o.geometry.coordinates[0].map(function(e){return e[1]}),c=a.geometry.coordinates[0].map(function(e){return e[0]}),f=a.geometry.coordinates[0].map(function(e){return e[1]}),(Math.max.apply(null,s)!==Math.max.apply(null,c)||Math.max.apply(null,l)!==Math.max.apply(null,f)||Math.min.apply(null,s)!==Math.min.apply(null,c)||Math.min.apply(null,l)!==Math.min.apply(null,f))&&Ao(h,i)){for(var p=e.map(function(e){return e.from.coordinates}),d=void 0,y=function(e){t.some(function(t){return r=e,n=t.from.coordinates,r[0]===n[0]&&r[1]===n[1];var r,n})||(d=e)},g=0,v=p;g<v.length;g++)y(v[g]);d&&t.inside(u(d))&&(n&&!Ao(r,h)||(n=t))}}),n},e.prototype.inside=function(e){return dt(e,this.toPolygon())},e}(),qo=function(){function e(){this.edges=[],this.nodes={}}return e.fromGeoJson=function(t){!function(e){if(!e)throw new Error("No geojson passed");if("FeatureCollection"!==e.type&&"GeometryCollection"!==e.type&&"MultiLineString"!==e.type&&"LineString"!==e.type&&"Feature"!==e.type)throw new Error("Invalid input type '"+e.type+"'. Geojson must be FeatureCollection, GeometryCollection, LineString, MultiLineString or Feature")}(t);var r=new e;return q(t,function(e){re(e,"LineString","Graph::fromGeoJson"),R(e,function(e,t){if(e){var n=r.getNode(e),i=r.getNode(t);r.addEdge(n,i)}return t})}),r},e.prototype.getNode=function(e){var t=Do.buildId(e),r=this.nodes[t];return r||(r=this.nodes[t]=new Do(e)),r},e.prototype.addEdge=function(e,t){var r=new Fo(e,t),n=r.getSymetric();this.edges.push(r),this.edges.push(n)},e.prototype.deleteDangles=function(){var e=this;Object.keys(this.nodes).map(function(t){return e.nodes[t]}).forEach(function(t){return e._removeIfDangle(t)})},e.prototype._removeIfDangle=function(e){var t=this;if(e.innerEdges.length<=1){var r=e.getOuterEdges().map(function(e){return e.to});this.removeNode(e),r.forEach(function(e){return t._removeIfDangle(e)})}},e.prototype.deleteCutEdges=function(){var e=this;this._computeNextCWEdges(),this._findLabeledEdgeRings(),this.edges.forEach(function(t){t.label===t.symetric.label&&(e.removeEdge(t.symetric),e.removeEdge(t))})},e.prototype._computeNextCWEdges=function(e){var t=this;void 0===e?Object.keys(this.nodes).forEach(function(e){return t._computeNextCWEdges(t.nodes[e])}):e.getOuterEdges().forEach(function(t,r){e.getOuterEdge((0===r?e.getOuterEdges().length:r)-1).symetric.next=t})},e.prototype._computeNextCCWEdges=function(e,t){for(var r,n,i=e.getOuterEdges(),o=i.length-1;o>=0;--o){var a=i[o],s=a.symetric,u=void 0,l=void 0;a.label===t&&(u=a),s.label===t&&(l=s),u&&l&&(l&&(n=l),u&&(n&&(n.next=u,n=void 0),r||(r=u)))}n&&(n.next=r)},e.prototype._findLabeledEdgeRings=function(){var e=[],t=0;return this.edges.forEach(function(r){if(!(r.label>=0)){e.push(r);var n=r;do{n.label=t,n=n.next}while(!r.isEqual(n));t++}}),e},e.prototype.getEdgeRings=function(){var e=this;this._computeNextCWEdges(),this.edges.forEach(function(e){e.label=void 0}),this._findLabeledEdgeRings().forEach(function(t){e._findIntersectionNodes(t).forEach(function(r){e._computeNextCCWEdges(r,t.label)})});var t=[];return this.edges.forEach(function(r){r.ring||t.push(e._findEdgeRing(r))}),t},e.prototype._findIntersectionNodes=function(e){var t=[],r=e,n=function(){var n=0;r.from.getOuterEdges().forEach(function(t){t.label===e.label&&++n}),n>1&&t.push(r.from),r=r.next};do{n()}while(!e.isEqual(r));return t},e.prototype._findEdgeRing=function(e){var t=e,r=new Bo;do{r.push(t),t.ring=r,t=t.next}while(!e.isEqual(t));return r},e.prototype.removeNode=function(e){var t=this;e.getOuterEdges().forEach(function(e){return t.removeEdge(e)}),e.innerEdges.forEach(function(e){return t.removeEdge(e)}),delete this.nodes[e.id]},e.prototype.removeEdge=function(e){this.edges=this.edges.filter(function(t){return!t.isEqual(e)}),e.deleteEdge()},e}();function Jo(e,t){var r=!0;return q(e,function(e){q(t,function(t){if(!1===r)return!1;r=function(e,t){switch(e.type){case"Point":switch(t.type){case"Point":return r=e.coordinates,n=t.coordinates,!(r[0]===n[0]&&r[1]===n[1]);case"LineString":return!Uo(t,e);case"Polygon":return!dt(e,t)}break;case"LineString":switch(t.type){case"Point":return!Uo(e,t);case"LineString":return!function(e,t){return fn(e,t).features.length>0}(e,t);case"Polygon":return!zo(t,e)}break;case"Polygon":switch(t.type){case"Point":return!dt(t,e);case"LineString":return!zo(e,t);case"Polygon":return!function(e,t){for(var r=0,n=e.coordinates[0];r<n.length;r++)if(dt(n[r],t))return!0;for(var i=0,o=t.coordinates[0];i<o.length;i++)if(dt(o[i],e))return!0;return fn(ni(e),ni(t)).features.length>0}(t,e)}}var r,n;return!1}(e.geometry,t.geometry)})}),r}function Uo(e,t){for(var r=0;r<e.coordinates.length-1;r++)if(Wo(e.coordinates[r],e.coordinates[r+1],t.coordinates))return!0;return!1}function zo(e,t){for(var r=0,n=t.coordinates;r<n.length;r++)if(dt(n[r],e))return!0;return fn(t,ni(e)).features.length>0}function Wo(e,t,r){var n=r[0]-e[0],i=r[1]-e[1],o=t[0]-e[0],a=t[1]-e[1];return 0==n*a-i*o&&(Math.abs(o)>=Math.abs(a)?o>0?e[0]<=r[0]&&r[0]<=t[0]:t[0]<=r[0]&&r[0]<=e[0]:a>0?e[1]<=r[1]&&r[1]<=t[1]:t[1]<=r[1]&&r[1]<=e[1])}function Ho(e,t){return!(e[0]>t[0]||e[2]<t[2]||e[1]>t[1]||e[3]<t[3])}function Xo(e,t){return e[0]===t[0]&&e[1]===t[1]}function Zo(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}function Yo(e,t){for(var r=!1,n=!1,i=e.coordinates.length,o=0;o<i&&!r&&!n;){for(var a=0;a<t.coordinates.length-1;a++){var s=!0;0!==a&&a!==t.coordinates.length-2||(s=!1),$o(t.coordinates[a],t.coordinates[a+1],e.coordinates[o],s)?r=!0:n=!0}o++}return r&&n}function Ko(e,t){return fn(e,ii(t)).features.length>0}function Qo(e,t){for(var r=!1,n=!1,i=e.coordinates.length,o=0;o<i&&(!r||!n);o++)dt(u(e.coordinates[o]),t)?r=!0:n=!0;return n&&r}function $o(e,t,r,n){var i=r[0]-e[0],o=r[1]-e[1],a=t[0]-e[0],s=t[1]-e[1];return 0==i*s-o*a&&(n?Math.abs(a)>=Math.abs(s)?a>0?e[0]<=r[0]&&r[0]<=t[0]:t[0]<=r[0]&&r[0]<=e[0]:s>0?e[1]<=r[1]&&r[1]<=t[1]:t[1]<=r[1]&&r[1]<=e[1]:Math.abs(a)>=Math.abs(s)?a>0?e[0]<r[0]&&r[0]<t[0]:t[0]<r[0]&&r[0]<e[0]:s>0?e[1]<r[1]&&r[1]<t[1]:t[1]<r[1]&&r[1]<e[1])}var ea=function(e){this.precision=e&&e.precision?e.precision:17,this.direction=!(!e||!e.direction)&&e.direction,this.pseudoNode=!(!e||!e.pseudoNode)&&e.pseudoNode,this.objectComparator=e&&e.objectComparator?e.objectComparator:na};function ta(e){return e.coordinates.map(function(t){return{type:e.type.replace("Multi",""),coordinates:t}})}function ra(e,t){return e.hasOwnProperty("coordinates")?e.coordinates.length===t.coordinates.length:e.length===t.length}function na(e,t){return yi(e,t,{strict:!0})}ea.prototype.compare=function(e,t){if(e.type!==t.type||!ra(e,t))return!1;switch(e.type){case"Point":return this.compareCoord(e.coordinates,t.coordinates);case"LineString":return this.compareLine(e.coordinates,t.coordinates,0,!1);case"Polygon":return this.comparePolygon(e,t);case"Feature":return this.compareFeature(e,t);default:if(0===e.type.indexOf("Multi")){var r=this,n=ta(e),i=ta(t);return n.every(function(e){return this.some(function(t){return r.compare(e,t)})},i)}}return!1},ea.prototype.compareCoord=function(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r].toFixed(this.precision)!==t[r].toFixed(this.precision))return!1;return!0},ea.prototype.compareLine=function(e,t,r,n){if(!ra(e,t))return!1;var i=this.pseudoNode?e:this.removePseudo(e),o=this.pseudoNode?t:this.removePseudo(t);if(!n||this.compareCoord(i[0],o[0])||(o=this.fixStartIndex(o,i))){var a=this.compareCoord(i[r],o[r]);return this.direction||a?this.comparePath(i,o):!!this.compareCoord(i[r],o[o.length-(1+r)])&&this.comparePath(i.slice().reverse(),o)}},ea.prototype.fixStartIndex=function(e,t){for(var r,n=-1,i=0;i<e.length;i++)if(this.compareCoord(e[i],t[0])){n=i;break}return n>=0&&(r=[].concat(e.slice(n,e.length),e.slice(1,n+1))),r},ea.prototype.comparePath=function(e,t){var r=this;return e.every(function(e,t){return r.compareCoord(e,this[t])},t)},ea.prototype.comparePolygon=function(e,t){if(this.compareLine(e.coordinates[0],t.coordinates[0],1,!0)){var r=e.coordinates.slice(1,e.coordinates.length),n=t.coordinates.slice(1,t.coordinates.length),i=this;return r.every(function(e){return this.some(function(t){return i.compareLine(e,t,1,!0)})},n)}return!1},ea.prototype.compareFeature=function(e,t){return!(e.id!==t.id||!this.objectComparator(e.properties,t.properties)||!this.compareBBox(e,t))&&this.compare(e.geometry,t.geometry)},ea.prototype.compareBBox=function(e,t){return!!(!e.bbox&&!t.bbox||e.bbox&&t.bbox&&this.compareCoord(e.bbox,t.bbox))},ea.prototype.removePseudo=function(e){return e};var ia=ea;function oa(e,t){var r=!1;return q(e,function(e){q(t,function(t){if(!0===r)return!0;r=!Jo(e.geometry,t.geometry)})}),r}var aa=Ae(function(e){function t(e,t,r,n){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(e,t,r,n)}t.prototype.run=function(e,t,r,n){this._init(e,t,r,n);for(var i=0;i<this._datasetLength;i++)if(1!==this._visited[i]){this._visited[i]=1;var o=this._regionQuery(i);if(o.length<this.minPts)this.noise.push(i);else{var a=this.clusters.length;this.clusters.push([]),this._addToCluster(i,a),this._expandCluster(a,o)}}return this.clusters},t.prototype._init=function(e,t,r,n){if(e){if(!(e instanceof Array))throw Error("Dataset must be of type array, "+typeof e+" given");this.dataset=e,this.clusters=[],this.noise=[],this._datasetLength=e.length,this._visited=new Array(this._datasetLength),this._assigned=new Array(this._datasetLength)}t&&(this.epsilon=t),r&&(this.minPts=r),n&&(this.distance=n)},t.prototype._expandCluster=function(e,t){for(var r=0;r<t.length;r++){var n=t[r];if(1!==this._visited[n]){this._visited[n]=1;var i=this._regionQuery(n);i.length>=this.minPts&&(t=this._mergeArrays(t,i))}1!==this._assigned[n]&&this._addToCluster(n,e)}},t.prototype._addToCluster=function(e,t){this.clusters[t].push(e),this._assigned[e]=1},t.prototype._regionQuery=function(e){for(var t=[],r=0;r<this._datasetLength;r++)this.distance(this.dataset[e],this.dataset[r])<this.epsilon&&t.push(r);return t},t.prototype._mergeArrays=function(e,t){for(var r=t.length,n=0;n<r;n++){var i=t[n];e.indexOf(i)<0&&e.push(i)}return e},t.prototype._euclideanDistance=function(e,t){for(var r=0,n=Math.min(e.length,t.length);n--;)r+=(e[n]-t[n])*(e[n]-t[n]);return Math.sqrt(r)},e.exports&&(e.exports=t)}),sa=Ae(function(e){function t(e,t,r){this.k=3,this.dataset=[],this.assignments=[],this.centroids=[],this.init(e,t,r)}t.prototype.init=function(e,t,r){this.assignments=[],this.centroids=[],void 0!==e&&(this.dataset=e),void 0!==t&&(this.k=t),void 0!==r&&(this.distance=r)},t.prototype.run=function(e,t){this.init(e,t);for(var r=this.dataset.length,n=0;n<this.k;n++)this.centroids[n]=this.randomCentroid();for(var i=!0;i;){i=this.assign();for(var o=0;o<this.k;o++){for(var a=new Array(c),s=0,u=0;u<c;u++)a[u]=0;for(var l=0;l<r;l++){var c=this.dataset[l].length;if(o===this.assignments[l]){for(u=0;u<c;u++)a[u]+=this.dataset[l][u];s++}}if(s>0){for(u=0;u<c;u++)a[u]/=s;this.centroids[o]=a}else this.centroids[o]=this.randomCentroid(),i=!0}}return this.getClusters()},t.prototype.randomCentroid=function(){var e,t,r=this.dataset.length-1;do{t=Math.round(Math.random()*r),e=this.dataset[t]}while(this.centroids.indexOf(e)>=0);return e},t.prototype.assign=function(){for(var e,t=!1,r=this.dataset.length,n=0;n<r;n++)(e=this.argmin(this.dataset[n],this.centroids,this.distance))!=this.assignments[n]&&(this.assignments[n]=e,t=!0);return t},t.prototype.getClusters=function(){for(var e,t=new Array(this.k),r=0;r<this.assignments.length;r++)void 0===t[e=this.assignments[r]]&&(t[e]=[]),t[e].push(r);return t},t.prototype.argmin=function(e,t,r){for(var n,i=Number.MAX_VALUE,o=0,a=t.length,s=0;s<a;s++)(n=r(e,t[s]))<i&&(i=n,o=s);return o},t.prototype.distance=function(e,t){for(var r=0,n=Math.min(e.length,t.length);n--;){var i=e[n]-t[n];r+=i*i}return Math.sqrt(r)},e.exports&&(e.exports=t)}),ua=Ae(function(e){function t(e,t,r){this._queue=[],this._priorities=[],this._sorting="desc",this._init(e,t,r)}t.prototype.insert=function(e,t){for(var r=this._queue.length,n=r;n--;){var i=this._priorities[n];"desc"===this._sorting?t>i&&(r=n):t<i&&(r=n)}this._insertAt(e,t,r)},t.prototype.remove=function(e){for(var t=this._queue.length;t--;)if(e===this._queue[t]){this._queue.splice(t,1),this._priorities.splice(t,1);break}},t.prototype.forEach=function(e){this._queue.forEach(e)},t.prototype.getElements=function(){return this._queue},t.prototype.getElementPriority=function(e){return this._priorities[e]},t.prototype.getPriorities=function(){return this._priorities},t.prototype.getElementsWithPriorities=function(){for(var e=[],t=0,r=this._queue.length;t<r;t++)e.push([this._queue[t],this._priorities[t]]);return e},t.prototype._init=function(e,t,r){if(e&&t){if(this._queue=[],this._priorities=[],e.length!==t.length)throw new Error("Arrays must have the same length");for(var n=0;n<e.length;n++)this.insert(e[n],t[n])}r&&(this._sorting=r)},t.prototype._insertAt=function(e,t,r){this._queue.length===r?(this._queue.push(e),this._priorities.push(t)):(this._queue.splice(r,0,e),this._priorities.splice(r,0,t))},e.exports&&(e.exports=t)}),la=Ae(function(e){if(e.exports)var t=ua;function r(e,t,r,n){this.epsilon=1,this.minPts=1,this.distance=this._euclideanDistance,this._reachability=[],this._processed=[],this._coreDistance=0,this._orderedList=[],this._init(e,t,r,n)}r.prototype.run=function(e,r,n,i){this._init(e,r,n,i);for(var o=0,a=this.dataset.length;o<a;o++)if(1!==this._processed[o]){this._processed[o]=1,this.clusters.push([o]);var s=this.clusters.length-1;this._orderedList.push(o);var u=new t(null,null,"asc"),l=this._regionQuery(o);void 0!==this._distanceToCore(o)&&(this._updateQueue(o,l,u),this._expandCluster(s,u))}return this.clusters},r.prototype.getReachabilityPlot=function(){for(var e=[],t=0,r=this._orderedList.length;t<r;t++){var n=this._orderedList[t],i=this._reachability[n];e.push([n,i])}return e},r.prototype._init=function(e,t,r,n){if(e){if(!(e instanceof Array))throw Error("Dataset must be of type array, "+typeof e+" given");this.dataset=e,this.clusters=[],this._reachability=new Array(this.dataset.length),this._processed=new Array(this.dataset.length),this._coreDistance=0,this._orderedList=[]}t&&(this.epsilon=t),r&&(this.minPts=r),n&&(this.distance=n)},r.prototype._updateQueue=function(e,t,r){var n=this;this._coreDistance=this._distanceToCore(e),t.forEach(function(t){if(void 0===n._processed[t]){var i=n.distance(n.dataset[e],n.dataset[t]),o=Math.max(n._coreDistance,i);void 0===n._reachability[t]?(n._reachability[t]=o,r.insert(t,o)):o<n._reachability[t]&&(n._reachability[t]=o,r.remove(t),r.insert(t,o))}})},r.prototype._expandCluster=function(e,t){for(var r=t.getElements(),n=0,i=r.length;n<i;n++){var o=r[n];if(void 0===this._processed[o]){var a=this._regionQuery(o);this._processed[o]=1,this.clusters[e].push(o),this._orderedList.push(o),void 0!==this._distanceToCore(o)&&(this._updateQueue(o,a,t),this._expandCluster(e,t))}}},r.prototype._distanceToCore=function(e){for(var t=this.epsilon,r=0;r<t;r++)if(this._regionQuery(e,r).length>=this.minPts)return r},r.prototype._regionQuery=function(e,t){t=t||this.epsilon;for(var r=[],n=0,i=this.dataset.length;n<i;n++)this.distance(this.dataset[e],this.dataset[n])<t&&r.push(n);return r},r.prototype._euclideanDistance=function(e,t){for(var r=0,n=Math.min(e.length,t.length);n--;)r+=(e[n]-t[n])*(e[n]-t[n]);return Math.sqrt(r)},e.exports&&(e.exports=r)}),ca=Ae(function(e){e.exports&&(e.exports={DBSCAN:aa,KMEANS:sa,OPTICS:la,PriorityQueue:ua})}),fa=function(e,t,r){for(var n=e.length,i=0,o=0;o<n;o++){var a=(e[o]||0)-(t[o]||0);i+=a*a}return r?Math.sqrt(i):i},ha=fa,pa=function(e,t,r){var n=Math.abs(e-t);return r?n:n*n},da=fa;function ya(e,t,r){r=r||[];for(var n=0;n<e;n++)r[n]=t;return r}var ga=function(e,t,r,n){var i=[],o=[],a=[],s=[],u=!1,l=n||1e4,c=e.length,f=e[0].length,h=f>0,p=[];if(r)i="kmrand"==r?function(e,t){for(var r={},n=[],i=t<<2,o=e.length,a=e[0].length>0;n.length<t&&i-- >0;){var s=e[Math.floor(Math.random()*o)],u=a?s.join("_"):""+s;r[u]||(r[u]=!0,n.push(s))}if(n.length<t)throw new Error("Error initializating clusters");return n}(e,t):"kmpp"==r?function(e,t){var r=e[0].length?ha:pa,n=[],i=e.length,o=e[0].length>0,a=e[Math.floor(Math.random()*i)];for(o&&a.join("_"),n.push(a);n.length<t;){for(var s=[],u=n.length,l=0,c=[],f=0;f<i;f++){for(var h=1/0,p=0;p<u;p++){var d=r(e[f],n[p]);d<=h&&(h=d)}s[f]=h}for(var y=0;y<i;y++)l+=s[y];for(var g=0;g<i;g++)c[g]={i:g,v:e[g],pr:s[g]/l,cs:0};c.sort(function(e,t){return e.pr-t.pr}),c[0].cs=c[0].pr;for(var v=1;v<i;v++)c[v].cs=c[v-1].cs+c[v].pr;for(var m=Math.random(),_=0;_<i-1&&c[_++].cs<m;);n.push(c[_-1].v)}return n}(e,t):r;else for(var d={};i.length<t;){var y=Math.floor(Math.random()*c);d[y]||(d[y]=!0,i.push(e[y]))}do{ya(t,0,p);for(var g=0;g<c;g++){for(var v=1/0,m=0,_=0;_<t;_++)(s=h?da(e[g],i[_]):Math.abs(e[g]-i[_]))<=v&&(v=s,m=_);a[g]=m,p[m]++}for(var b=[],S=(o=[],0);S<t;S++)b[S]=h?ya(f,0,b[S]):0,o[S]=i[S];if(h){for(var x=0;x<t;x++)i[x]=[];for(var w=0;w<c;w++)for(var O=b[a[w]],P=e[w],E=0;E<f;E++)O[E]+=P[E];u=!0;for(var k=0;k<t;k++){for(var T=i[k],M=b[k],I=o[k],L=p[k],C=0;C<f;C++)T[C]=M[C]/L||0;if(u)for(var N=0;N<f;N++)if(I[N]!=T[N]){u=!1;break}}}else{for(var R=0;R<c;R++)b[a[R]]+=e[R];for(var j=0;j<t;j++)i[j]=b[j]/p[j]||0;u=!0;for(var G=0;G<t;G++)if(o[G]!=i[G]){u=!1;break}}u=u||--l<=0}while(!u);return{it:1e4-l,k:t,idxs:a,centroids:i}};function va(e,t){return w(_i(e[0],e[1]))===w(_i(t[0],t[1]))}function ma(e,t){if(e.geometry&&e.geometry.type)return e.geometry.type;if(e.type)return e.type;throw new Error("Invalid GeoJSON object for "+t)}function _a(e){for(var t=e,r=[];t.parent;)r.unshift(t),t=t.parent;return r}var ba={search:function(e,t,r,n){e.cleanDirty();var i=(n=n||{}).heuristic||ba.heuristics.manhattan,o=n.closest||!1,a=new wa(function(e){return e.f}),s=t;for(t.h=i(t,r),a.push(t);a.size()>0;){var u=a.pop();if(u===r)return _a(u);u.closed=!0;for(var l=e.neighbors(u),c=0,f=l.length;c<f;++c){var h=l[c];if(!h.closed&&!h.isWall()){var p=u.g+h.getCost(u),d=h.visited;(!d||p<h.g)&&(h.visited=!0,h.parent=u,h.h=h.h||i(h,r),h.g=p,h.f=h.g+h.h,e.markDirty(h),o&&(h.h<s.h||h.h===s.h&&h.g<s.g)&&(s=h),d?a.rescoreElement(h):a.push(h))}}}return o?_a(s):[]},heuristics:{manhattan:function(e,t){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},diagonal:function(e,t){var r=Math.sqrt(2),n=Math.abs(t.x-e.x),i=Math.abs(t.y-e.y);return 1*(n+i)+(r-2)*Math.min(n,i)}},cleanNode:function(e){e.f=0,e.g=0,e.h=0,e.visited=!1,e.closed=!1,e.parent=null}};function Sa(e,t){t=t||{},this.nodes=[],this.diagonal=!!t.diagonal,this.grid=[];for(var r=0;r<e.length;r++){this.grid[r]=[];for(var n=0,i=e[r];n<i.length;n++){var o=new xa(r,n,i[n]);this.grid[r][n]=o,this.nodes.push(o)}}this.init()}function xa(e,t,r){this.x=e,this.y=t,this.weight=r}function wa(e){this.content=[],this.scoreFunction=e}function Oa(e,t){for(var r=0;r<t.features.length;r++)if(dt(e,t.features[r]))return!0;return!1}function Pa(e){return function(){return e}}function Ea(e){return e[0]}function ka(e){return e[1]}function Ta(){this._=null}function Ma(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function Ia(e,t){var r=t,n=t.R,i=r.U;i?i.L===r?i.L=n:i.R=n:e._=n,n.U=i,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function La(e,t){var r=t,n=t.L,i=r.U;i?i.L===r?i.L=n:i.R=n:e._=n,n.U=i,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function Ca(e){for(;e.L;)e=e.L;return e}function Na(e,t,r,n){var i=[null,null],o=ts.push(i)-1;return i.left=e,i.right=t,r&&ja(i,e,t,r),n&&ja(i,t,e,n),$a[e.index].halfedges.push(o),$a[t.index].halfedges.push(o),i}function Ra(e,t,r){var n=[t,r];return n.left=e,n}function ja(e,t,r,n){e[0]||e[1]?e.left===r?e[1]=n:e[0]=n:(e[0]=n,e.left=t,e.right=r)}function Ga(e,t,r,n,i){var o,a=e[0],s=e[1],u=a[0],l=a[1],c=0,f=1,h=s[0]-u,p=s[1]-l;if(o=t-u,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<f&&(f=o)}else if(h>0){if(o>f)return;o>c&&(c=o)}if(o=n-u,h||!(o<0)){if(o/=h,h<0){if(o>f)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<f&&(f=o)}if(o=r-l,p||!(o>0)){if(o/=p,p<0){if(o<c)return;o<f&&(f=o)}else if(p>0){if(o>f)return;o>c&&(c=o)}if(o=i-l,p||!(o<0)){if(o/=p,p<0){if(o>f)return;o>c&&(c=o)}else if(p>0){if(o<c)return;o<f&&(f=o)}return!(c>0||f<1)||(c>0&&(e[0]=[u+c*h,l+c*p]),f<1&&(e[1]=[u+f*h,l+f*p]),!0)}}}}}function Va(e,t,r,n,i){var o=e[1];if(o)return!0;var a,s,u=e[0],l=e.left,c=e.right,f=l[0],h=l[1],p=c[0],d=c[1],y=(f+p)/2,g=(h+d)/2;if(d===h){if(y<t||y>=n)return;if(f>p){if(u){if(u[1]>=i)return}else u=[y,r];o=[y,i]}else{if(u){if(u[1]<r)return}else u=[y,i];o=[y,r]}}else if(s=g-(a=(f-p)/(d-h))*y,a<-1||a>1)if(f>p){if(u){if(u[1]>=i)return}else u=[(r-s)/a,r];o=[(i-s)/a,i]}else{if(u){if(u[1]<r)return}else u=[(i-s)/a,i];o=[(r-s)/a,r]}else if(h<d){if(u){if(u[0]>=n)return}else u=[t,a*t+s];o=[n,a*n+s]}else{if(u){if(u[0]<t)return}else u=[n,a*n+s];o=[t,a*t+s]}return e[0]=u,e[1]=o,!0}function Aa(e,t){var r=e.site,n=t.left,i=t.right;return r===i&&(i=n,n=r),i?Math.atan2(i[1]-n[1],i[0]-n[0]):(r===n?(n=t[1],i=t[0]):(n=t[0],i=t[1]),Math.atan2(n[0]-i[0],i[1]-n[1]))}function Da(e,t){return t[+(t.left!==e.site)]}function Fa(e,t){return t[+(t.left===e.site)]}Sa.prototype.init=function(){this.dirtyNodes=[];for(var e=0;e<this.nodes.length;e++)ba.cleanNode(this.nodes[e])},Sa.prototype.cleanDirty=function(){for(var e=0;e<this.dirtyNodes.length;e++)ba.cleanNode(this.dirtyNodes[e]);this.dirtyNodes=[]},Sa.prototype.markDirty=function(e){this.dirtyNodes.push(e)},Sa.prototype.neighbors=function(e){var t=[],r=e.x,n=e.y,i=this.grid;return i[r-1]&&i[r-1][n]&&t.push(i[r-1][n]),i[r+1]&&i[r+1][n]&&t.push(i[r+1][n]),i[r]&&i[r][n-1]&&t.push(i[r][n-1]),i[r]&&i[r][n+1]&&t.push(i[r][n+1]),this.diagonal&&(i[r-1]&&i[r-1][n-1]&&t.push(i[r-1][n-1]),i[r+1]&&i[r+1][n-1]&&t.push(i[r+1][n-1]),i[r-1]&&i[r-1][n+1]&&t.push(i[r-1][n+1]),i[r+1]&&i[r+1][n+1]&&t.push(i[r+1][n+1])),t},Sa.prototype.toString=function(){for(var e,t,r,n,i=[],o=this.grid,a=0,s=o.length;a<s;a++){for(e=[],r=0,n=(t=o[a]).length;r<n;r++)e.push(t[r].weight);i.push(e.join(" "))}return i.join("\n")},xa.prototype.toString=function(){return"["+this.x+" "+this.y+"]"},xa.prototype.getCost=function(e){return e&&e.x!==this.x&&e.y!==this.y?1.41421*this.weight:this.weight},xa.prototype.isWall=function(){return 0===this.weight},wa.prototype={push:function(e){this.content.push(e),this.sinkDown(this.content.length-1)},pop:function(){var e=this.content[0],t=this.content.pop();return this.content.length>0&&(this.content[0]=t,this.bubbleUp(0)),e},remove:function(e){var t=this.content.indexOf(e),r=this.content.pop();t!==this.content.length-1&&(this.content[t]=r,this.scoreFunction(r)<this.scoreFunction(e)?this.sinkDown(t):this.bubbleUp(t))},size:function(){return this.content.length},rescoreElement:function(e){this.sinkDown(this.content.indexOf(e))},sinkDown:function(e){for(var t=this.content[e];e>0;){var r=(e+1>>1)-1,n=this.content[r];if(!(this.scoreFunction(t)<this.scoreFunction(n)))break;this.content[r]=t,this.content[e]=n,e=r}},bubbleUp:function(e){for(var t=this.content.length,r=this.content[e],n=this.scoreFunction(r);;){var i,o=e+1<<1,a=o-1,s=null;if(a<t){var u=this.content[a];(i=this.scoreFunction(u))<n&&(s=a)}if(o<t){var l=this.content[o];this.scoreFunction(l)<(null===s?n:i)&&(s=o)}if(null===s)break;this.content[e]=this.content[s],this.content[s]=r,e=s}}},Ta.prototype={constructor:Ta,insert:function(e,t){var r,n,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;r=e}else this._?(e=Ca(this._),t.P=null,t.N=e,e.P=e.L=t,r=e):(t.P=t.N=null,this._=t,r=null);for(t.L=t.R=null,t.U=r,t.C=!0,e=t;r&&r.C;)r===(n=r.U).L?(i=n.R)&&i.C?(r.C=i.C=!1,n.C=!0,e=n):(e===r.R&&(Ia(this,r),r=(e=r).U),r.C=!1,n.C=!0,La(this,n)):(i=n.L)&&i.C?(r.C=i.C=!1,n.C=!0,e=n):(e===r.L&&(La(this,r),r=(e=r).U),r.C=!1,n.C=!0,Ia(this,n)),r=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,r,n,i=e.U,o=e.L,a=e.R;if(r=o?a?Ca(a):o:a,i?i.L===e?i.L=r:i.R=r:this._=r,o&&a?(n=r.C,r.C=e.C,r.L=o,o.U=r,r!==a?(i=r.U,r.U=e.U,e=r.R,i.L=e,r.R=a,a.U=r):(r.U=i,i=r,e=r.R)):(n=e.C,e=r),e&&(e.U=i),!n)if(e&&e.C)e.C=!1;else{do{if(e===this._)break;if(e===i.L){if((t=i.R).C&&(t.C=!1,i.C=!0,Ia(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,La(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,Ia(this,i),e=this._;break}}else if((t=i.L).C&&(t.C=!1,i.C=!0,La(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,Ia(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,La(this,i),e=this._;break}t.C=!0,e=i,i=i.U}while(!e.C);e&&(e.C=!1)}}};var Ba,qa=[];function Ja(e){var t=e.P,r=e.N;if(t&&r){var n=t.site,i=e.site,o=r.site;if(n!==o){var a=i[0],s=i[1],u=n[0]-a,l=n[1]-s,c=o[0]-a,f=o[1]-s,h=2*(u*f-l*c);if(!(h>=-ns)){var p=u*u+l*l,d=c*c+f*f,y=(f*p-l*d)/h,g=(u*d-c*p)/h,v=qa.pop()||new function(){Ma(this),this.x=this.y=this.arc=this.site=this.cy=null};v.arc=e,v.site=i,v.x=y+a,v.y=(v.cy=g+s)+Math.sqrt(y*y+g*g),e.circle=v;for(var m=null,_=es._;_;)if(v.y<_.y||v.y===_.y&&v.x<=_.x){if(!_.L){m=_.P;break}_=_.L}else{if(!_.R){m=_;break}_=_.R}es.insert(m,v),m||(Ba=v)}}}}function Ua(e){var t=e.circle;t&&(t.P||(Ba=t.N),es.remove(t),qa.push(t),Ma(t),e.circle=null)}var za=[];function Wa(e){var t=za.pop()||new function(){Ma(this),this.edge=this.site=this.circle=null};return t.site=e,t}function Ha(e){Ua(e),Qa.remove(e),za.push(e),Ma(e)}function Xa(e){var t=e.circle,r=t.x,n=t.cy,i=[r,n],o=e.P,a=e.N,s=[e];Ha(e);for(var u=o;u.circle&&Math.abs(r-u.circle.x)<rs&&Math.abs(n-u.circle.cy)<rs;)o=u.P,s.unshift(u),Ha(u),u=o;s.unshift(u),Ua(u);for(var l=a;l.circle&&Math.abs(r-l.circle.x)<rs&&Math.abs(n-l.circle.cy)<rs;)a=l.N,s.push(l),Ha(l),l=a;s.push(l),Ua(l);var c,f=s.length;for(c=1;c<f;++c)l=s[c],u=s[c-1],ja(l.edge,u.site,l.site,i);u=s[0],(l=s[f-1]).edge=Na(u.site,l.site,null,i),Ja(u),Ja(l)}function Za(e){for(var t,r,n,i,o=e[0],a=e[1],s=Qa._;s;)if((n=Ya(s,a)-o)>rs)s=s.L;else{if(!((i=o-Ka(s,a))>rs)){n>-rs?(t=s.P,r=s):i>-rs?(t=s,r=s.N):t=r=s;break}if(!s.R){t=s;break}s=s.R}!function(e){$a[e.index]={site:e,halfedges:[]}}(e);var u=Wa(e);if(Qa.insert(t,u),t||r){if(t===r)return Ua(t),r=Wa(t.site),Qa.insert(u,r),u.edge=r.edge=Na(t.site,u.site),Ja(t),void Ja(r);if(r){Ua(t),Ua(r);var l=t.site,c=l[0],f=l[1],h=e[0]-c,p=e[1]-f,d=r.site,y=d[0]-c,g=d[1]-f,v=2*(h*g-p*y),m=h*h+p*p,_=y*y+g*g,b=[(g*m-p*_)/v+c,(h*_-y*m)/v+f];ja(r.edge,l,d,b),u.edge=Na(l,e,null,b),r.edge=Na(e,d,null,b),Ja(t),Ja(r)}else u.edge=Na(t.site,u.site)}}function Ya(e,t){var r=e.site,n=r[0],i=r[1],o=i-t;if(!o)return n;var a=e.P;if(!a)return-1/0;var s=(r=a.site)[0],u=r[1],l=u-t;if(!l)return s;var c=s-n,f=1/o-1/l,h=c/l;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*l)-u+l/2+i-o/2)))/f+n:(n+s)/2}function Ka(e,t){var r=e.N;if(r)return Ya(r,t);var n=e.site;return n[1]===t?n[0]:1/0}var Qa,$a,es,ts,rs=1e-6,ns=1e-12;function is(e,t){return t[1]-e[1]||t[0]-e[0]}function os(e,t){var r,n,i,o=e.sort(is).pop();for(ts=[],$a=new Array(e.length),Qa=new Ta,es=new Ta;;)if(i=Ba,o&&(!i||o[1]<i.y||o[1]===i.y&&o[0]<i.x))o[0]===r&&o[1]===n||(Za(o),r=o[0],n=o[1]),o=e.pop();else{if(!i)break;Xa(i.arc)}if(function(){for(var e,t,r,n,i=0,o=$a.length;i<o;++i)if((e=$a[i])&&(n=(t=e.halfedges).length)){var a=new Array(n),s=new Array(n);for(r=0;r<n;++r)a[r]=r,s[r]=Aa(e,ts[t[r]]);for(a.sort(function(e,t){return s[t]-s[e]}),r=0;r<n;++r)s[r]=t[a[r]];for(r=0;r<n;++r)t[r]=s[r]}}(),t){var a=+t[0][0],s=+t[0][1],u=+t[1][0],l=+t[1][1];!function(e,t,r,n){for(var i,o=ts.length;o--;)Va(i=ts[o],e,t,r,n)&&Ga(i,e,t,r,n)&&(Math.abs(i[0][0]-i[1][0])>rs||Math.abs(i[0][1]-i[1][1])>rs)||delete ts[o]}(a,s,u,l),function(e,t,r,n){var i,o,a,s,u,l,c,f,h,p,d,y,g=$a.length,v=!0;for(i=0;i<g;++i)if(o=$a[i]){for(a=o.site,s=(u=o.halfedges).length;s--;)ts[u[s]]||u.splice(s,1);for(s=0,l=u.length;s<l;)d=(p=Fa(o,ts[u[s]]))[0],y=p[1],f=(c=Da(o,ts[u[++s%l]]))[0],h=c[1],(Math.abs(d-f)>rs||Math.abs(y-h)>rs)&&(u.splice(s,0,ts.push(Ra(a,p,Math.abs(d-e)<rs&&n-y>rs?[e,Math.abs(f-e)<rs?h:n]:Math.abs(y-n)<rs&&r-d>rs?[Math.abs(h-n)<rs?f:r,n]:Math.abs(d-r)<rs&&y-t>rs?[r,Math.abs(f-r)<rs?h:t]:Math.abs(y-t)<rs&&d-e>rs?[Math.abs(h-t)<rs?f:e,t]:null))-1),++l);l&&(v=!1)}if(v){var m,_,b,S=1/0;for(i=0,v=null;i<g;++i)(o=$a[i])&&(b=(m=(a=o.site)[0]-e)*m+(_=a[1]-t)*_)<S&&(S=b,v=o);if(v){var x=[e,t],w=[e,n],O=[r,n],P=[r,t];v.halfedges.push(ts.push(Ra(a=v.site,x,w))-1,ts.push(Ra(a,w,O))-1,ts.push(Ra(a,O,P))-1,ts.push(Ra(a,P,x))-1)}}for(i=0;i<g;++i)(o=$a[i])&&(o.halfedges.length||delete $a[i])}(a,s,u,l)}this.edges=ts,this.cells=$a,Qa=es=ts=$a=null}function as(e){return(e=e.slice()).push(e[0]),c([e])}function ss(e,t,r,n){var i=(n=n||{}).steps||64,o=n.units||"kilometers",a=n.angle||0,s=n.pivot||e,u=n.properties||e.properties||{};if(!e)throw new Error("center is required");if(!t)throw new Error("xSemiAxis is required");if(!r)throw new Error("ySemiAxis is required");if(!M(n))throw new Error("options must be an object");if(!T(i))throw new Error("steps must be a number");if(!T(a))throw new Error("angle must be a number");var l=Q(e);if("degrees"===o)var f=P(a);else t=Si(e,t,90,{units:o}),r=Si(e,r,0,{units:o}),t=Q(t)[0]-l[0],r=Q(r)[1]-l[1];for(var h=[],p=0;p<i;p+=1){var d=-360*p/i,y=t*r/Math.sqrt(Math.pow(r,2)+Math.pow(t,2)*Math.pow(us(d),2)),g=t*r/Math.sqrt(Math.pow(t,2)+Math.pow(r,2)/Math.pow(us(d),2));if(d<-90&&d>=-270&&(y=-y),d<-180&&d>=-360&&(g=-g),"degrees"===o){var v=y*Math.cos(f)+g*Math.sin(f),m=g*Math.cos(f)-y*Math.sin(f);y=v,g=m}h.push([y+l[0],g+l[1]])}return h.push(h[0]),"degrees"===o?c([h],u):Lo(c([h],u),a,{pivot:s})}function us(e){var t=e*Math.PI/180;return Math.tan(t)}function ls(e,t){void 0===t&&(t={});var r=0,n=0,i=0;return F(e,function(e,o,a){var s=t.weight?null==a?void 0:a[t.weight]:void 0;if(!T(s=null==s?1:s))throw new Error("weight value must be a number for feature index "+o);(s=Number(s))>0&&N(e,function(e){r+=e[0]*s,n+=e[1]*s,i+=s})}),u([r/i,n/i],t.properties,t)}function cs(e,t){return{x:e[0]-t[0],y:e[1]-t[1]}}function fs(e,t){var r=0,n=0;N(e,function(i,o,a,s,u){u>r&&(r=u,n=o,t.push([]));var l=o-n,c=e.coordinates[u][l+1],f=i[0],h=i[1],p=c[0],d=c[1];t[u].push([.75*f+.25*p,.75*h+.25*d]),t[u].push([.25*f+.75*p,.25*h+.75*d])},!0),t.forEach(function(e){e.push(e[0])})}function hs(e,t){var r=0,n=0,i=0;N(e,function(o,a,s,u,l){u>i&&(i=u,n=a,t.push([[]])),l>r&&(r=l,n=a,t[u].push([]));var c=a-n,f=e.coordinates[u][l][c+1],h=o[0],p=o[1],d=f[0],y=f[1];t[u][l].push([.75*h+.25*d,.75*p+.25*y]),t[u][l].push([.25*h+.75*d,.25*p+.75*y])},!0),t.forEach(function(e){e.forEach(function(e){e.push(e[0])})})}function ps(e,t,r){void 0===r&&(r=2);var n=Q(e),i=Q(t),o=n[0]-i[0],a=n[1]-i[1];return 1===r?Math.abs(o)+Math.abs(a):Math.pow(Math.pow(o,r)+Math.pow(a,r),1/r)}function ds(e,t){var r=(t=t||{}).threshold||1e4,n=t.p||2,i=t.binary||!1,o=t.alpha||-1,a=t.standardization||!1,s=[];V(e,function(e){s.push(cr(e))});for(var u=[],l=0;l<s.length;l++)u[l]=[];for(l=0;l<s.length;l++)for(var c=l;c<s.length;c++){l===c&&(u[l][c]=0);var f=ps(s[l],s[c],n);u[l][c]=f,u[c][l]=f}for(l=0;l<s.length;l++)for(c=0;c<s.length;c++)0!==(f=u[l][c])&&(u[l][c]=i?f<=r?1:0:f<=r?Math.pow(f,o):0);if(a)for(l=0;l<s.length;l++){var h=u[l].reduce(function(e,t){return e+t},0);for(c=0;c<s.length;c++)u[l][c]=u[l][c]/h}return u}function ys(e){for(var t=0,r=0,n=e;r<n.length;r++)t+=n[r];return t/e.length}function gs(e,t){return void 0===t&&(t={}),ms(e,"mercator",t)}function vs(e,t){return void 0===t&&(t={}),ms(e,"wgs84",t)}function ms(e,t,r){void 0===r&&(r={});var n=(r=r||{}).mutate;if(!e)throw new Error("geojson is required");return Array.isArray(e)&&T(e[0])?e="mercator"===t?_s(e):bs(e):(!0!==n&&(e=xt(e)),N(e,function(e){var r="mercator"===t?_s(e):bs(e);e[0]=r[0],e[1]=r[1]})),e}function _s(e){var t=Math.PI/180,r=6378137,n=20037508.342789244,i=[r*(Math.abs(e[0])<=180?e[0]:e[0]-360*function(e){return e<0?-1:e>0?1:0}(e[0]))*t,r*Math.log(Math.tan(.25*Math.PI+.5*e[1]*t))];return i[0]>n&&(i[0]=n),i[0]<-n&&(i[0]=-n),i[1]>n&&(i[1]=n),i[1]<-n&&(i[1]=-n),i}function bs(e){var t=180/Math.PI,r=6378137;return[e[0]*t/r,(.5*Math.PI-2*Math.atan(Math.exp(-e[1]/r)))*t]}os.prototype={constructor:os,polygons:function(){var e=this.edges;return this.cells.map(function(t){var r=t.halfedges.map(function(r){return Da(t,e[r])});return r.data=t.site.data,r})},triangles:function(){var e=[],t=this.edges;return this.cells.forEach(function(r,n){if(o=(i=r.halfedges).length)for(var i,o,a,s,u,l,c=r.site,f=-1,h=t[i[o-1]],p=h.left===c?h.right:h.left;++f<o;)a=p,p=(h=t[i[f]]).left===c?h.right:h.left,a&&p&&n<a.index&&n<p.index&&(u=a,l=p,((s=c)[0]-l[0])*(u[1]-s[1])-(s[0]-u[0])*(l[1]-s[1])<0)&&e.push([c.data,a.data,p.data])}),e},links:function(){return this.edges.filter(function(e){return e.right}).map(function(e){return{source:e.left.data,target:e.right.data}})},find:function(e,t,r){for(var n,i,o=this,a=o._found||0,s=o.cells.length;!(i=o.cells[a]);)if(++a>=s)return null;var u=e-i.site[0],l=t-i.site[1],c=u*u+l*l;do{i=o.cells[n=a],a=null,i.halfedges.forEach(function(r){var n=o.edges[r],s=n.left;if(s!==i.site&&s||(s=n.right)){var u=e-s[0],l=t-s[1],f=u*u+l*l;f<c&&(c=f,a=s.index)}})}while(null!==a);return o._found=n,null==r||c<=r*r?i.site:null}};var Ss=Object.freeze({__proto__:null,toMercator:gs,toWgs84:vs}),xs=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n};function ws(e){return Array.isArray(e)?Ts(e):e&&e.bbox?Ts(e.bbox):[360*ks(),180*ks()]}function Os(e,t){void 0===t&&(t={}),null==e&&(e=1);for(var r=[],n=0;n<e;n++)r.push(u(ws(t.bbox)));return d(r)}function Ps(e,t){void 0===t&&(t={}),null==e&&(e=1),T(t.num_vertices)&&void 0!==t.num_vertices||(t.num_vertices=10),T(t.max_radial_length)&&void 0!==t.max_radial_length||(t.max_radial_length=10);for(var r=[],n=function(e){var n,i=[],o=xs(Array(t.num_vertices+1)).map(Math.random);o.forEach(function(e,t,r){r[t]=t>0?e+r[t-1]:e}),o.forEach(function(e){e=2*e*Math.PI/o[o.length-1];var r=Math.random();i.push([r*(t.max_radial_length||10)*Math.sin(e),r*(t.max_radial_length||10)*Math.cos(e)])}),i[i.length-1]=i[0],i=i.map((n=ws(t.bbox),function(e){return[e[0]+n[0],e[1]+n[1]]})),r.push(c([i]))},i=0;i<e;i++)n();return d(r)}function Es(e,t){if(void 0===t&&(t={}),!M(t=t||{}))throw new Error("options is invalid");var r=t.bbox,n=t.num_vertices,i=t.max_length,o=t.max_rotation;null==e&&(e=1),(!T(n)||void 0===n||n<2)&&(n=10),T(i)&&void 0!==i||(i=1e-4),T(o)&&void 0!==o||(o=Math.PI/8);for(var a=[],s=0;s<e;s++){for(var u=[ws(r)],l=0;l<n-1;l++){var c=(0===l?2*Math.random()*Math.PI:Math.tan((u[l][1]-u[l-1][1])/(u[l][0]-u[l-1][0])))+(Math.random()-.5)*o*2,f=Math.random()*i;u.push([u[l][0]+f*Math.cos(c),u[l][1]+f*Math.sin(c)])}a.push(h(u))}return d(a)}function ks(){return Math.random()-.5}function Ts(e){return[Math.random()*(e[2]-e[0])+e[0],Math.random()*(e[3]-e[1])+e[1]]}var Ms=Object.freeze({__proto__:null,randomPosition:ws,randomPoint:Os,randomPolygon:Ps,randomLineString:Es});function Is(e,t){if(!e)throw new Error("geojson is required");if("FeatureCollection"!==e.type)throw new Error("geojson must be a FeatureCollection");if(null==t)throw new Error("filter is required");var r=[];return V(e,function(e){Rs(e.properties,t)&&r.push(e)}),d(r)}function Ls(e,t,r){if(!e)throw new Error("geojson is required");if("FeatureCollection"!==e.type)throw new Error("geojson must be a FeatureCollection");if(null==t)throw new Error("property is required");for(var n=Ns(e,t),i=Object.keys(n),o=0;o<i.length;o++){for(var a=i[o],s=n[a],u=[],l=0;l<s.length;l++)u.push(e.features[s[l]]);r(d(u),a,o)}}function Cs(e,t,r,n){var i=n;return Ls(e,t,function(e,t,o){i=0===o&&void 0===n?e:r(i,e,t,o)}),i}function Ns(e,t){var r={};return V(e,function(e,n){var i=e.properties||{};if(Object.prototype.hasOwnProperty.call(i,String(t))){var o=i[t];Object.prototype.hasOwnProperty.call(r,o)?r[o].push(n):r[o]=[n]}}),r}function Rs(e,t){if(void 0===e)return!1;var r=typeof t;if("number"===r||"string"===r)return Object.prototype.hasOwnProperty.call(e,t);if(Array.isArray(t)){for(var n=0;n<t.length;n++)if(!Rs(e,t[n]))return!1;return!0}return js(e,t)}function js(e,t){for(var r=Object.keys(t),n=0;n<r.length;n++){var i=r[n];if(e[i]!==t[i])return!1}return!0}function Gs(e,t){if(!t)return{};if(!t.length)return{};for(var r={},n=0;n<t.length;n++){var i=t[n];Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r}var Vs=Object.freeze({__proto__:null,getCluster:Is,clusterEach:Ls,clusterReduce:Cs,createBins:Ns,applyFilter:Rs,propertiesContainsFilter:js,filterProperties:Gs}),As=function(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null
|
|
46
|
+
/**
|
|
47
|
+
* splaytree v3.1.0
|
|
48
|
+
* Fast Splay tree for Node and browser
|
|
49
|
+
*
|
|
50
|
+
* @author Alexander Milevski <info@w8r.name>
|
|
51
|
+
* @license MIT
|
|
52
|
+
* @preserve
|
|
53
|
+
*/};function Ds(e,t){return e>t?1:e<t?-1:0}function Fs(e,t,r){for(var n=new As(null,null),i=n,o=n;;){var a=r(e,t.key);if(a<0){if(null===t.left)break;if(r(e,t.left.key)<0){var s=t.left;if(t.left=s.right,s.right=t,null===(t=s).left)break}o.left=t,o=t,t=t.left}else{if(!(a>0))break;if(null===t.right)break;if(r(e,t.right.key)>0&&(s=t.right,t.right=s.left,s.left=t,null===(t=s).right))break;i.right=t,i=t,t=t.right}}return i.right=t.left,o.left=t.right,t.left=n.right,t.right=n.left,t}function Bs(e,t,r,n){var i=new As(e,t);if(null===r)return i.left=i.right=null,i;var o=n(e,(r=Fs(e,r,n)).key);return o<0?(i.left=r.left,i.right=r,r.left=null):o>=0&&(i.right=r.right,i.left=r,r.right=null),i}function qs(e,t,r){var n=null,i=null;if(t){var o=r((t=Fs(e,t,r)).key,e);0===o?(n=t.left,i=t.right):o<0?(i=t.right,t.right=null,n=t):(n=t.left,t.left=null,i=t)}return{left:n,right:i}}var Js=function(){function e(e){void 0===e&&(e=Ds),this._root=null,this._size=0,this._comparator=e}return e.prototype.insert=function(e,t){return this._size++,this._root=Bs(e,t,this._root,this._comparator)},e.prototype.add=function(e,t){var r=new As(e,t);null===this._root&&(r.left=r.right=null,this._size++,this._root=r);var n=this._comparator,i=Fs(e,this._root,n),o=n(e,i.key);return 0===o?this._root=i:(o<0?(r.left=i.left,r.right=i,i.left=null):o>0&&(r.right=i.right,r.left=i,i.right=null),this._size++,this._root=r),this._root},e.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},e.prototype._remove=function(e,t,r){var n;return null===t?null:0===r(e,(t=Fs(e,t,r)).key)?(null===t.left?n=t.right:(n=Fs(e,t.left,r)).right=t.right,this._size--,n):t},e.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=Fs(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},e.prototype.findStatic=function(e){for(var t=this._root,r=this._comparator;t;){var n=r(e,t.key);if(0===n)return t;t=n<0?t.left:t.right}return null},e.prototype.find=function(e){return this._root&&(this._root=Fs(e,this._root,this._comparator),0!==this._comparator(e,this._root.key))?null:this._root},e.prototype.contains=function(e){for(var t=this._root,r=this._comparator;t;){var n=r(e,t.key);if(0===n)return!0;t=n<0?t.left:t.right}return!1},e.prototype.forEach=function(e,t){for(var r=this._root,n=[],i=!1;!i;)null!==r?(n.push(r),r=r.left):0!==n.length?(r=n.pop(),e.call(t,r),r=r.right):i=!0;return this},e.prototype.range=function(e,t,r,n){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,t)>0)break;if(o(a.key,e)>=0&&r.call(n,a))return this;a=a.right}return this},e.prototype.keys=function(){var e=[];return this.forEach(function(t){var r=t.key;return e.push(r)}),e},e.prototype.values=function(){var e=[];return this.forEach(function(t){var r=t.data;return e.push(r)}),e},e.prototype.min=function(){return this._root?this.minNode(this._root).key:null},e.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},e.prototype.minNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.left;)e=e.left;return e},e.prototype.maxNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.right;)e=e.right;return e},e.prototype.at=function(e){for(var t=this._root,r=!1,n=0,i=[];!r;)if(t)i.push(t),t=t.left;else if(i.length>0){if(t=i.pop(),n===e)return t;n++,t=t.right}else r=!0;return null},e.prototype.next=function(e){var t=this._root,r=null;if(e.right){for(r=e.right;r.left;)r=r.left;return r}for(var n=this._comparator;t;){var i=n(e.key,t.key);if(0===i)break;i<0?(r=t,t=t.left):t=t.right}return r},e.prototype.prev=function(e){var t=this._root,r=null;if(null!==e.left){for(r=e.left;r.right;)r=r.right;return r}for(var n=this._comparator;t;){var i=n(e.key,t.key);if(0===i)break;i<0?t=t.left:(r=t,t=t.right)}return r},e.prototype.clear=function(){return this._root=null,this._size=0,this},e.prototype.toList=function(){return function(e){for(var t=e,r=[],n=!1,i=new As(null,null),o=i;!n;)t?(r.push(t),t=t.left):r.length>0?t=(t=o=o.next=r.pop()).right:n=!0;return o.next=null,i.next}(this._root)},e.prototype.load=function(e,t,r){void 0===t&&(t=[]),void 0===r&&(r=!1);var n=e.length,i=this._comparator;if(r&&function e(t,r,n,i,o){if(!(n>=i)){for(var a=t[n+i>>1],s=n-1,u=i+1;;){do{s++}while(o(t[s],a)<0);do{u--}while(o(t[u],a)>0);if(s>=u)break;var l=t[s];t[s]=t[u],t[u]=l,l=r[s],r[s]=r[u],r[u]=l}e(t,r,n,u,o),e(t,r,u+1,i,o)}}(e,t,0,n-1,i),null===this._root)this._root=function e(t,r,n,i){var o=i-n;if(o>0){var a=n+Math.floor(o/2),s=t[a],u=r[a],l=new As(s,u);return l.left=e(t,r,n,a),l.right=e(t,r,a+1,i),l}return null}(e,t,0,n),this._size=n;else{var o=function(e,t,r){for(var n=new As(null,null),i=n,o=e,a=t;null!==o&&null!==a;)r(o.key,a.key)<0?(i.next=o,o=o.next):(i.next=a,a=a.next),i=i.next;return null!==o?i.next=o:null!==a&&(i.next=a),n.next}(this.toList(),function(e,t){for(var r=new As(null,null),n=r,i=0;i<e.length;i++)n=n.next=new As(e[i],t[i]);return n.next=null,r.next}(e,t),i);n=this._size+n,this._root=function e(t,r,n){var i=n-r;if(i>0){var o=r+Math.floor(i/2),a=e(t,r,o),s=t.head;return s.left=a,t.head=t.head.next,s.right=e(t,o+1,n),s}return null}({head:o},0,n)}return this},e.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),e.prototype.toString=function(e){void 0===e&&(e=function(e){return String(e.key)});var t=[];return function e(t,r,n,i,o){if(t){i(r+(n?"└── ":"├── ")+o(t)+"\n");var a=r+(n?" ":"│ ");t.left&&e(t.left,a,!1,i,o),t.right&&e(t.right,a,!0,i,o)}}(this._root,"",!0,function(e){return t.push(e)},e),t.join("")},e.prototype.update=function(e,t,r){var n=this._comparator,i=qs(e,this._root,n),o=i.left,a=i.right;n(e,t)<0?a=Bs(t,r,a,n):o=Bs(t,r,o,n),this._root=function(e,t,r){return null===t?e:(null===e||((t=Fs(e.key,t,r)).left=e),t)}(o,a,n)},e.prototype.split=function(e){return qs(e,this._root,this._comparator)},e}();function Us(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zs(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ws(e,t,r){return t&&zs(e.prototype,t),r&&zs(e,r),e}var Hs=function(e,t){return e.ll.x<=t.x&&t.x<=e.ur.x&&e.ll.y<=t.y&&t.y<=e.ur.y},Xs=function(e,t){if(t.ur.x<e.ll.x||e.ur.x<t.ll.x||t.ur.y<e.ll.y||e.ur.y<t.ll.y)return null;var r=e.ll.x<t.ll.x?t.ll.x:e.ll.x,n=e.ur.x<t.ur.x?e.ur.x:t.ur.x;return{ll:{x:r,y:e.ll.y<t.ll.y?t.ll.y:e.ll.y},ur:{x:n,y:e.ur.y<t.ur.y?e.ur.y:t.ur.y}}},Zs=Number.EPSILON;void 0===Zs&&(Zs=Math.pow(2,-52));var Ys=Zs*Zs,Ks=function(e,t){if(-Zs<e&&e<Zs&&-Zs<t&&t<Zs)return 0;var r=e-t;return r*r<Ys*e*t?0:e<t?-1:1},Qs=function(){function e(){Us(this,e),this.reset()}return Ws(e,[{key:"reset",value:function(){this.xRounder=new $s,this.yRounder=new $s}},{key:"round",value:function(e,t){return{x:this.xRounder.round(e),y:this.yRounder.round(t)}}}]),e}(),$s=function(){function e(){Us(this,e),this.tree=new Js,this.round(0)}return Ws(e,[{key:"round",value:function(e){var t=this.tree.add(e),r=this.tree.prev(t);if(null!==r&&0===Ks(t.key,r.key))return this.tree.remove(e),r.key;var n=this.tree.next(t);return null!==n&&0===Ks(t.key,n.key)?(this.tree.remove(e),n.key):e}}]),e}(),eu=new Qs,tu=function(e,t){return e.x*t.y-e.y*t.x},ru=function(e,t){return e.x*t.x+e.y*t.y},nu=function(e,t,r){var n={x:t.x-e.x,y:t.y-e.y},i={x:r.x-e.x,y:r.y-e.y},o=tu(n,i);return Ks(o,0)},iu=function(e){return Math.sqrt(ru(e,e))},ou=function(e,t,r){return 0===t.y?null:{x:e.x+t.x/t.y*(r-e.y),y:r}},au=function(e,t,r){return 0===t.x?null:{x:r,y:e.y+t.y/t.x*(r-e.x)}},su=function(){function e(t,r){Us(this,e),void 0===t.events?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=r}return Ws(e,null,[{key:"compare",value:function(t,r){var n=e.comparePoints(t.point,r.point);return 0!==n?n:(t.point!==r.point&&t.link(r),t.isLeft!==r.isLeft?t.isLeft?1:-1:lu.compare(t.segment,r.segment))}},{key:"comparePoints",value:function(e,t){return e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0}}]),Ws(e,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var t=e.point.events,r=0,n=t.length;r<n;r++){var i=t[r];this.point.events.push(i),i.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var e=this.point.events.length,t=0;t<e;t++){var r=this.point.events[t];if(void 0===r.segment.consumedBy)for(var n=t+1;n<e;n++){var i=this.point.events[n];void 0===i.consumedBy&&r.otherSE.point.events===i.otherSE.point.events&&r.segment.consume(i.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var e=[],t=0,r=this.point.events.length;t<r;t++){var n=this.point.events[t];n!==this&&!n.segment.ringOut&&n.segment.isInResult()&&e.push(n)}return e}},{key:"getLeftmostComparator",value:function(e){var t=this,r=new Map,n=function(n){var i,o,a,s,u,l=n.otherSE;r.set(n,{sine:(i=t.point,o=e.point,a=l.point,s={x:o.x-i.x,y:o.y-i.y},u={x:a.x-i.x,y:a.y-i.y},tu(u,s)/iu(u)/iu(s)),cosine:function(e,t,r){var n={x:t.x-e.x,y:t.y-e.y},i={x:r.x-e.x,y:r.y-e.y};return ru(i,n)/iu(i)/iu(n)}(t.point,e.point,l.point)})};return function(e,t){r.has(e)||n(e),r.has(t)||n(t);var i=r.get(e),o=i.sine,a=i.cosine,s=r.get(t),u=s.sine,l=s.cosine;return o>=0&&u>=0?a<l?1:a>l?-1:0:o<0&&u<0?a<l?-1:a>l?1:0:u<o?-1:u>o?1:0}}}]),e}(),uu=0,lu=function(){function e(t,r,n,i){Us(this,e),this.id=++uu,this.leftSE=t,t.segment=this,t.otherSE=r,this.rightSE=r,r.segment=this,r.otherSE=t,this.rings=n,this.windings=i}return Ws(e,null,[{key:"compare",value:function(e,t){var r=e.leftSE.point.x,n=t.leftSE.point.x,i=e.rightSE.point.x,o=t.rightSE.point.x;if(o<r)return 1;if(i<n)return-1;var a=e.leftSE.point.y,s=t.leftSE.point.y,u=e.rightSE.point.y,l=t.rightSE.point.y;if(r<n){if(s<a&&s<u)return 1;if(s>a&&s>u)return-1;var c=e.comparePoint(t.leftSE.point);if(c<0)return 1;if(c>0)return-1;var f=t.comparePoint(e.rightSE.point);return 0!==f?f:-1}if(r>n){if(a<s&&a<l)return-1;if(a>s&&a>l)return 1;var h=t.comparePoint(e.leftSE.point);if(0!==h)return h;var p=e.comparePoint(t.rightSE.point);return p<0?1:p>0?-1:1}if(a<s)return-1;if(a>s)return 1;if(i<o){var d=t.comparePoint(e.rightSE.point);if(0!==d)return d}if(i>o){var y=e.comparePoint(t.rightSE.point);if(y<0)return 1;if(y>0)return-1}if(i!==o){var g=u-a,v=i-r,m=l-s,_=o-n;if(g>v&&m<_)return 1;if(g<v&&m>_)return-1}return i>o?1:i<o||u<l?-1:u>l?1:e.id<t.id?-1:e.id>t.id?1:0}}]),Ws(e,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<t?e:t},ur:{x:this.rightSE.point.x,y:e>t?e:t}}}},{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(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var t=this.leftSE.point,r=this.rightSE.point,n=this.vector();if(t.x===r.x)return e.x===t.x?0:e.x<t.x?1:-1;var i=(e.y-t.y)/n.y,o=t.x+i*n.x;if(e.x===o)return 0;var a=(e.x-t.x)/n.x,s=t.y+a*n.y;return e.y===s?0:e.y<s?-1:1}},{key:"getIntersection",value:function(e){var t=this.bbox(),r=e.bbox(),n=Xs(t,r);if(null===n)return null;var i=this.leftSE.point,o=this.rightSE.point,a=e.leftSE.point,s=e.rightSE.point,u=Hs(t,a)&&0===this.comparePoint(a),l=Hs(r,i)&&0===e.comparePoint(i),c=Hs(t,s)&&0===this.comparePoint(s),f=Hs(r,o)&&0===e.comparePoint(o);if(l&&u)return f&&!c?o:!f&&c?s:null;if(l)return c&&i.x===s.x&&i.y===s.y?null:i;if(u)return f&&o.x===a.x&&o.y===a.y?null:a;if(f&&c)return null;if(f)return o;if(c)return s;var h=function(e,t,r,n){if(0===t.x)return au(r,n,e.x);if(0===n.x)return au(e,t,r.x);if(0===t.y)return ou(r,n,e.y);if(0===n.y)return ou(e,t,r.y);var i=tu(t,n);if(0==i)return null;var o={x:r.x-e.x,y:r.y-e.y},a=tu(o,t)/i,s=tu(o,n)/i;return{x:(e.x+s*t.x+(r.x+a*n.x))/2,y:(e.y+s*t.y+(r.y+a*n.y))/2}}(i,this.vector(),a,e.vector());return null===h?null:Hs(n,h)?eu.round(h.x,h.y):null}},{key:"split",value:function(t){var r=[],n=void 0!==t.events,i=new su(t,!0),o=new su(t,!1),a=this.rightSE;this.replaceRightSE(o),r.push(o),r.push(i);var s=new e(i,a,this.rings.slice(),this.windings.slice());return su.comparePoints(s.leftSE.point,s.rightSE.point)>0&&s.swapEvents(),su.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),o.checkForConsuming()),r}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var t=0,r=this.windings.length;t<r;t++)this.windings[t]*=-1}},{key:"consume",value:function(t){for(var r=this,n=t;r.consumedBy;)r=r.consumedBy;for(;n.consumedBy;)n=n.consumedBy;var i=e.compare(r,n);if(0!==i){if(i>0){var o=r;r=n,n=o}if(r.prev===n){var a=r;r=n,n=a}for(var s=0,u=n.rings.length;s<u;s++){var l=n.rings[s],c=n.windings[s],f=r.rings.indexOf(l);-1===f?(r.rings.push(l),r.windings.push(c)):r.windings[f]+=c}n.rings=null,n.windings=null,n.consumedBy=r,n.leftSE.consumedBy=r.leftSE,n.rightSE.consumedBy=r.rightSE}}},{key:"prevInResult",value:function(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}},{key:"beforeState",value:function(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){var e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}},{key:"afterState",value:function(){if(void 0!==this._afterState)return this._afterState;var e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};for(var t=this._afterState.rings,r=this._afterState.windings,n=this._afterState.multiPolys,i=0,o=this.rings.length;i<o;i++){var a=this.rings[i],s=this.windings[i],u=t.indexOf(a);-1===u?(t.push(a),r.push(s)):r[u]+=s}for(var l=[],c=[],f=0,h=t.length;f<h;f++)if(0!==r[f]){var p=t[f],d=p.poly;if(-1===c.indexOf(d))if(p.isExterior)l.push(d);else{-1===c.indexOf(d)&&c.push(d);var y=l.indexOf(p.poly);-1!==y&&l.splice(y,1)}}for(var g=0,v=l.length;g<v;g++){var m=l[g].multiPoly;-1===n.indexOf(m)&&n.push(m)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;var e=this.beforeState().multiPolys,t=this.afterState().multiPolys;switch(_u.type){case"union":var r=0===e.length,n=0===t.length;this._isInResult=r!==n;break;case"intersection":var i,o;e.length<t.length?(i=e.length,o=t.length):(i=t.length,o=e.length),this._isInResult=o===_u.numMultiPolys&&i<o;break;case"xor":var a=Math.abs(e.length-t.length);this._isInResult=a%2==1;break;case"difference":var s=function(e){return 1===e.length&&e[0].isSubject};this._isInResult=s(e)!==s(t);break;default:throw new Error("Unrecognized operation type found ".concat(_u.type))}return this._isInResult}}],[{key:"fromRing",value:function(t,r,n){var i,o,a,s=su.comparePoints(t,r);if(s<0)i=t,o=r,a=1;else{if(!(s>0))throw new Error("Tried to create degenerate segment at [".concat(t.x,", ").concat(t.y,"]"));i=r,o=t,a=-1}return new e(new su(i,!0),new su(o,!1),[n],[a])}}]),e}(),cu=function(){function e(t,r,n){if(Us(this,e),!Array.isArray(t)||0===t.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=r,this.isExterior=n,this.segments=[],"number"!=typeof t[0][0]||"number"!=typeof t[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var i=eu.round(t[0][0],t[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};for(var o=i,a=1,s=t.length;a<s;a++){if("number"!=typeof t[a][0]||"number"!=typeof t[a][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var u=eu.round(t[a][0],t[a][1]);u.x===o.x&&u.y===o.y||(this.segments.push(lu.fromRing(o,u,this)),u.x<this.bbox.ll.x&&(this.bbox.ll.x=u.x),u.y<this.bbox.ll.y&&(this.bbox.ll.y=u.y),u.x>this.bbox.ur.x&&(this.bbox.ur.x=u.x),u.y>this.bbox.ur.y&&(this.bbox.ur.y=u.y),o=u)}i.x===o.x&&i.y===o.y||this.segments.push(lu.fromRing(o,i,this))}return Ws(e,[{key:"getSweepEvents",value:function(){for(var e=[],t=0,r=this.segments.length;t<r;t++){var n=this.segments[t];e.push(n.leftSE),e.push(n.rightSE)}return e}}]),e}(),fu=function(){function e(t,r){if(Us(this,e),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new cu(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var n=1,i=t.length;n<i;n++){var o=new cu(t[n],this,!1);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=r}return Ws(e,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),t=0,r=this.interiorRings.length;t<r;t++)for(var n=this.interiorRings[t].getSweepEvents(),i=0,o=n.length;i<o;i++)e.push(n[i]);return e}}]),e}(),hu=function(){function e(t,r){if(Us(this,e),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof t[0][0][0]&&(t=[t])}catch(e){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var n=0,i=t.length;n<i;n++){var o=new fu(t[n],this);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=r}return Ws(e,[{key:"getSweepEvents",value:function(){for(var e=[],t=0,r=this.polys.length;t<r;t++)for(var n=this.polys[t].getSweepEvents(),i=0,o=n.length;i<o;i++)e.push(n[i]);return e}}]),e}(),pu=function(){function e(t){Us(this,e),this.events=t;for(var r=0,n=t.length;r<n;r++)t[r].segment.ringOut=this;this.poly=null}return Ws(e,null,[{key:"factory",value:function(t){for(var r=[],n=0,i=t.length;n<i;n++){var o=t[n];if(o.isInResult()&&!o.ringOut){for(var a=null,s=o.leftSE,u=o.rightSE,l=[s],c=s.point,f=[];a=s,s=u,l.push(s),s.point!==c;)for(;;){var h=s.getAvailableLinkedEvents();if(0===h.length){var p=l[0].point,d=l[l.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(p.x,",")+" ".concat(p.y,"]. Last matching segment found ends at")+" [".concat(d.x,", ").concat(d.y,"]."))}if(1===h.length){u=h[0].otherSE;break}for(var y=null,g=0,v=f.length;g<v;g++)if(f[g].point===s.point){y=g;break}if(null===y){f.push({index:l.length,point:s.point});var m=s.getLeftmostComparator(a);u=h.sort(m)[0].otherSE;break}var _=f.splice(y)[0],b=l.splice(_.index);b.unshift(b[0].otherSE),r.push(new e(b.reverse()))}r.push(new e(l))}}return r}}]),Ws(e,[{key:"getGeom",value:function(){for(var e=this.events[0].point,t=[e],r=1,n=this.events.length-1;r<n;r++){var i=this.events[r].point,o=this.events[r+1].point;0!==nu(i,e,o)&&(t.push(i),e=i)}if(1===t.length)return null;var a=t[0],s=t[1];0===nu(a,e,s)&&t.shift(),t.push(t[0]);for(var u=this.isExteriorRing()?1:-1,l=this.isExteriorRing()?0:t.length-1,c=this.isExteriorRing()?t.length:-1,f=[],h=l;h!=c;h+=u)f.push([t[h].x,t[h].y]);return f}},{key:"isExteriorRing",value:function(){if(void 0===this._isExteriorRing){var e=this.enclosingRing();this._isExteriorRing=!e||!e.isExteriorRing()}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var e=this.events[0],t=1,r=this.events.length;t<r;t++){var n=this.events[t];su.compare(e,n)>0&&(e=n)}for(var i=e.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();i=o.prevInResult(),o=i?i.prevInResult():null}}}]),e}(),du=function(){function e(t){Us(this,e),this.exteriorRing=t,t.poly=this,this.interiorRings=[]}return Ws(e,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(null===e[0])return null;for(var t=0,r=this.interiorRings.length;t<r;t++){var n=this.interiorRings[t].getGeom();null!==n&&e.push(n)}return e}}]),e}(),yu=function(){function e(t){Us(this,e),this.rings=t,this.polys=this._composePolys(t)}return Ws(e,[{key:"getGeom",value:function(){for(var e=[],t=0,r=this.polys.length;t<r;t++){var n=this.polys[t].getGeom();null!==n&&e.push(n)}return e}},{key:"_composePolys",value:function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r];if(!i.poly)if(i.isExteriorRing())t.push(new du(i));else{var o=i.enclosingRing();o.poly||t.push(new du(o)),o.poly.addInterior(i)}}return t}}]),e}(),gu=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:lu.compare;Us(this,e),this.queue=t,this.tree=new Js(r),this.segments=[]}return Ws(e,[{key:"process",value:function(e){var t=e.segment,r=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(t),r;var n=e.isLeft?this.tree.insert(t):this.tree.find(t);if(!n)throw new Error("Unable to find segment #".concat(t.id," ")+"[".concat(t.leftSE.point.x,", ").concat(t.leftSE.point.y,"] -> ")+"[".concat(t.rightSE.point.x,", ").concat(t.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var i=n,o=n,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(e.isLeft){var u=null;if(a){var l=a.getIntersection(t);if(null!==l&&(t.isAnEndpoint(l)||(u=l),!a.isAnEndpoint(l)))for(var c=this._splitSafely(a,l),f=0,h=c.length;f<h;f++)r.push(c[f])}var p=null;if(s){var d=s.getIntersection(t);if(null!==d&&(t.isAnEndpoint(d)||(p=d),!s.isAnEndpoint(d)))for(var y=this._splitSafely(s,d),g=0,v=y.length;g<v;g++)r.push(y[g])}if(null!==u||null!==p){var m=null;m=null===u?p:null===p?u:su.comparePoints(u,p)<=0?u:p,this.queue.remove(t.rightSE),r.push(t.rightSE);for(var _=t.split(m),b=0,S=_.length;b<S;b++)r.push(_[b])}r.length>0?(this.tree.remove(t),r.push(e)):(this.segments.push(t),t.prev=a)}else{if(a&&s){var x=a.getIntersection(s);if(null!==x){if(!a.isAnEndpoint(x))for(var w=this._splitSafely(a,x),O=0,P=w.length;O<P;O++)r.push(w[O]);if(!s.isAnEndpoint(x))for(var E=this._splitSafely(s,x),k=0,T=E.length;k<T;k++)r.push(E[k])}}this.tree.remove(t)}return r}},{key:"_splitSafely",value:function(e,t){this.tree.remove(e);var r=e.rightSE;this.queue.remove(r);var n=e.split(t);return n.push(r),void 0===e.consumedBy&&this.tree.insert(e),n}}]),e}(),vu=void 0!==e&&Object({NODE_ENV:void 0}).POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,mu=void 0!==e&&Object({NODE_ENV:void 0}).POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,_u=new(function(){function e(){Us(this,e)}return Ws(e,[{key:"run",value:function(e,t,r){_u.type=e,eu.reset();for(var n=[new hu(t,!0)],i=0,o=r.length;i<o;i++)n.push(new hu(r[i],!1));if(_u.numMultiPolys=n.length,"difference"===_u.type)for(var a=n[0],s=1;s<n.length;)null!==Xs(n[s].bbox,a.bbox)?s++:n.splice(s,1);if("intersection"===_u.type)for(var u=0,l=n.length;u<l;u++)for(var c=n[u],f=u+1,h=n.length;f<h;f++)if(null===Xs(c.bbox,n[f].bbox))return[];for(var p=new Js(su.compare),d=0,y=n.length;d<y;d++)for(var g=n[d].getSweepEvents(),v=0,m=g.length;v<m;v++)if(p.insert(g[v]),p.size>vu)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var _=new gu(p),b=p.size,S=p.pop();S;){var x=S.key;if(p.size===b){var w=x.segment;throw new Error("Unable to pop() ".concat(x.isLeft?"left":"right"," SweepEvent ")+"[".concat(x.point.x,", ").concat(x.point.y,"] from segment #").concat(w.id," ")+"[".concat(w.leftSE.point.x,", ").concat(w.leftSE.point.y,"] -> ")+"[".concat(w.rightSE.point.x,", ").concat(w.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(p.size>vu)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(_.segments.length>mu)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var O=_.process(x),P=0,E=O.length;P<E;P++){var k=O[P];void 0===k.consumedBy&&p.insert(k)}b=p.size,S=p.pop()}eu.reset();var T=pu.factory(_.segments);return new yu(T).getGeom()}}]),e}()),bu={union:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return _u.run("union",e,r)},intersection:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return _u.run("intersection",e,r)},xor:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return _u.run("xor",e,r)},difference:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return _u.run("difference",e,r)}};"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(e){if(null==this)throw new TypeError(this+" is not an object");var t=Object(this),r=Math.max(Math.min(t.length,9007199254740991),0)||0,n=1 in arguments&&parseInt(Number(arguments[1]),10)||0;n=n<0?Math.max(r+n,0):Math.min(n,r);var i=2 in arguments&&void 0!==arguments[2]?parseInt(Number(arguments[2]),10)||0:r;for(i=i<0?Math.max(r+arguments[2],0):Math.min(i,r);n<i;)t[n]=e,++n;return t},writable:!0}),Number.isFinite=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},Number.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(e){return e!=e},Math.trunc=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};var Su=function(){};Su.prototype.interfaces_=function(){return[]},Su.prototype.getClass=function(){return Su},Su.prototype.equalsWithTolerance=function(e,t,r){return Math.abs(e-t)<=r};var xu=function(e){function t(t){e.call(this,t),this.name="IllegalArgumentException",this.message=t,this.stack=(new e).stack}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Error),wu=function(){},Ou={MAX_VALUE:{configurable:!0}};wu.isNaN=function(e){return Number.isNaN(e)},wu.doubleToLongBits=function(e){return e},wu.longBitsToDouble=function(e){return e},wu.isInfinite=function(e){return!Number.isFinite(e)},Ou.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(wu,Ou);var Pu=function(){},Eu=function(){},ku=function(){};function Tu(){}var Mu=function e(){if(this.x=null,this.y=null,this.z=null,0===arguments.length)this.x=0,this.y=0,this.z=e.NULL_ORDINATE;else if(1===arguments.length){var t=arguments[0];this.x=t.x,this.y=t.y,this.z=t.z}else 2===arguments.length?(this.x=arguments[0],this.y=arguments[1],this.z=e.NULL_ORDINATE):3===arguments.length&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},Iu={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};Mu.prototype.setOrdinate=function(e,t){switch(e){case Mu.X:this.x=t;break;case Mu.Y:this.y=t;break;case Mu.Z:this.z=t;break;default:throw new xu("Invalid ordinate index: "+e)}},Mu.prototype.equals2D=function(){if(1===arguments.length){var e=arguments[0];return this.x===e.x&&this.y===e.y}if(2===arguments.length){var t=arguments[0],r=arguments[1];return!!Su.equalsWithTolerance(this.x,t.x,r)&&!!Su.equalsWithTolerance(this.y,t.y,r)}},Mu.prototype.getOrdinate=function(e){switch(e){case Mu.X:return this.x;case Mu.Y:return this.y;case Mu.Z:return this.z}throw new xu("Invalid ordinate index: "+e)},Mu.prototype.equals3D=function(e){return this.x===e.x&&this.y===e.y&&(this.z===e.z||wu.isNaN(this.z))&&wu.isNaN(e.z)},Mu.prototype.equals=function(e){return e instanceof Mu&&this.equals2D(e)},Mu.prototype.equalInZ=function(e,t){return Su.equalsWithTolerance(this.z,e.z,t)},Mu.prototype.compareTo=function(e){var t=e;return this.x<t.x?-1:this.x>t.x?1:this.y<t.y?-1:this.y>t.y?1:0},Mu.prototype.clone=function(){},Mu.prototype.copy=function(){return new Mu(this)},Mu.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},Mu.prototype.distance3D=function(e){var t=this.x-e.x,r=this.y-e.y,n=this.z-e.z;return Math.sqrt(t*t+r*r+n*n)},Mu.prototype.distance=function(e){var t=this.x-e.x,r=this.y-e.y;return Math.sqrt(t*t+r*r)},Mu.prototype.hashCode=function(){var e=17;return e=37*(e=37*e+Mu.hashCode(this.x))+Mu.hashCode(this.y)},Mu.prototype.setCoordinate=function(e){this.x=e.x,this.y=e.y,this.z=e.z},Mu.prototype.interfaces_=function(){return[Pu,Eu,Tu]},Mu.prototype.getClass=function(){return Mu},Mu.hashCode=function(){if(1===arguments.length){var e=arguments[0],t=wu.doubleToLongBits(e);return Math.trunc((t^t)>>>32)}},Iu.DimensionalComparator.get=function(){return Lu},Iu.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},Iu.NULL_ORDINATE.get=function(){return wu.NaN},Iu.X.get=function(){return 0},Iu.Y.get=function(){return 1},Iu.Z.get=function(){return 2},Object.defineProperties(Mu,Iu);var Lu=function(e){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var t=arguments[0];if(2!==t&&3!==t)throw new xu("only 2 or 3 dimensions may be specified");this._dimensionsToTest=t}};Lu.prototype.compare=function(e,t){var r=e,n=t,i=Lu.compare(r.x,n.x);if(0!==i)return i;var o=Lu.compare(r.y,n.y);return 0!==o?o:this._dimensionsToTest<=2?0:Lu.compare(r.z,n.z)},Lu.prototype.interfaces_=function(){return[ku]},Lu.prototype.getClass=function(){return Lu},Lu.compare=function(e,t){return e<t?-1:e>t?1:wu.isNaN(e)?wu.isNaN(t)?0:-1:wu.isNaN(t)?1:0};var Cu=function(){};Cu.prototype.create=function(){},Cu.prototype.interfaces_=function(){return[]},Cu.prototype.getClass=function(){return Cu};var Nu=function(){},Ru={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};Nu.prototype.interfaces_=function(){return[]},Nu.prototype.getClass=function(){return Nu},Nu.toLocationSymbol=function(e){switch(e){case Nu.EXTERIOR:return"e";case Nu.BOUNDARY:return"b";case Nu.INTERIOR:return"i";case Nu.NONE:return"-"}throw new xu("Unknown location value: "+e)},Ru.INTERIOR.get=function(){return 0},Ru.BOUNDARY.get=function(){return 1},Ru.EXTERIOR.get=function(){return 2},Ru.NONE.get=function(){return-1},Object.defineProperties(Nu,Ru);var ju=function(e,t){return e.interfaces_&&e.interfaces_().indexOf(t)>-1},Gu=function(){},Vu={LOG_10:{configurable:!0}};Gu.prototype.interfaces_=function(){return[]},Gu.prototype.getClass=function(){return Gu},Gu.log10=function(e){var t=Math.log(e);return wu.isInfinite(t)||wu.isNaN(t)?t:t/Gu.LOG_10},Gu.min=function(e,t,r,n){var i=e;return t<i&&(i=t),r<i&&(i=r),n<i&&(i=n),i},Gu.clamp=function(){if("number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){var e=arguments[0],t=arguments[1],r=arguments[2];return e<t?t:e>r?r:e}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var n=arguments[0],i=arguments[1],o=arguments[2];return n<i?i:n>o?o:n}},Gu.wrap=function(e,t){return e<0?t- -e%t:e%t},Gu.max=function(){if(3===arguments.length){var e=arguments[0],t=arguments[1],r=arguments[2],n=e;return t>n&&(n=t),r>n&&(n=r),n}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}},Gu.average=function(e,t){return(e+t)/2},Vu.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(Gu,Vu);var Au=function(e){this.str=e};Au.prototype.append=function(e){this.str+=e},Au.prototype.setCharAt=function(e,t){this.str=this.str.substr(0,e)+t+this.str.substr(e+1)},Au.prototype.toString=function(e){return this.str};var Du=function(e){this.value=e};Du.prototype.intValue=function(){return this.value},Du.prototype.compareTo=function(e){return this.value<e?-1:this.value>e?1:0},Du.isNaN=function(e){return Number.isNaN(e)};var Fu=function(){};Fu.isWhitespace=function(e){return e<=32&&e>=0||127===e},Fu.toUpperCase=function(e){return e.toUpperCase()};var Bu=function e(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof e){var r=arguments[0];this.init(r)}else if("string"==typeof arguments[0]){var n=arguments[0];e.call(this,e.parse(n))}}else if(2===arguments.length){var i=arguments[0],o=arguments[1];this.init(i,o)}},qu={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}};Bu.prototype.le=function(e){return(this._hi<e._hi||this._hi===e._hi)&&this._lo<=e._lo},Bu.prototype.extractSignificantDigits=function(e,t){var r=this.abs(),n=Bu.magnitude(r._hi),i=Bu.TEN.pow(n);(r=r.divide(i)).gt(Bu.TEN)?(r=r.divide(Bu.TEN),n+=1):r.lt(Bu.ONE)&&(r=r.multiply(Bu.TEN),n-=1);for(var o=n+1,a=new Au,s=Bu.MAX_PRINT_DIGITS-1,u=0;u<=s;u++){e&&u===o&&a.append(".");var l=Math.trunc(r._hi);if(l<0)break;var c=!1,f=0;l>9?(c=!0,f="9"):f="0"+l,a.append(f),r=r.subtract(Bu.valueOf(l)).multiply(Bu.TEN),c&&r.selfAdd(Bu.TEN);var h=!0,p=Bu.magnitude(r._hi);if(p<0&&Math.abs(p)>=s-u&&(h=!1),!h)break}return t[0]=n,a.toString()},Bu.prototype.sqr=function(){return this.multiply(this)},Bu.prototype.doubleValue=function(){return this._hi+this._lo},Bu.prototype.subtract=function(){if(arguments[0]instanceof Bu){var e=arguments[0];return this.add(e.negate())}if("number"==typeof arguments[0]){var t=arguments[0];return this.add(-t)}},Bu.prototype.equals=function(){if(1===arguments.length){var e=arguments[0];return this._hi===e._hi&&this._lo===e._lo}},Bu.prototype.isZero=function(){return 0===this._hi&&0===this._lo},Bu.prototype.selfSubtract=function(){if(arguments[0]instanceof Bu){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e._hi,-e._lo)}if("number"==typeof arguments[0]){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t,0)}},Bu.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},Bu.prototype.min=function(e){return this.le(e)?this:e},Bu.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof Bu){var e=arguments[0];return this.selfDivide(e._hi,e._lo)}if("number"==typeof arguments[0]){var t=arguments[0];return this.selfDivide(t,0)}}else if(2===arguments.length){var r=arguments[0],n=arguments[1],i=null,o=null,a=null,s=null,u=null,l=null,c=null,f=null;return u=this._hi/r,f=(i=(l=Bu.SPLIT*u)-(i=l-u))*(a=(f=Bu.SPLIT*r)-(a=f-r))-(c=u*r)+i*(s=r-a)+(o=u-i)*a+o*s,f=u+(l=(this._hi-c-f+this._lo-u*n)/r),this._hi=f,this._lo=u-f+l,this}},Bu.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},Bu.prototype.divide=function(){if(arguments[0]instanceof Bu){var e=arguments[0],t=null,r=null,n=null,i=null,o=null,a=null,s=null,u=null;r=(o=this._hi/e._hi)-(t=(a=Bu.SPLIT*o)-(t=a-o)),u=t*(n=(u=Bu.SPLIT*e._hi)-(n=u-e._hi))-(s=o*e._hi)+t*(i=e._hi-n)+r*n+r*i;var l=u=o+(a=(this._hi-s-u+this._lo-o*e._lo)/e._hi),c=o-u+a;return new Bu(l,c)}if("number"==typeof arguments[0]){var f=arguments[0];return wu.isNaN(f)?Bu.createNaN():Bu.copy(this).selfDivide(f,0)}},Bu.prototype.ge=function(e){return(this._hi>e._hi||this._hi===e._hi)&&this._lo>=e._lo},Bu.prototype.pow=function(e){if(0===e)return Bu.valueOf(1);var t=new Bu(this),r=Bu.valueOf(1),n=Math.abs(e);if(n>1)for(;n>0;)n%2==1&&r.selfMultiply(t),(n/=2)>0&&(t=t.sqr());else r=t;return e<0?r.reciprocal():r},Bu.prototype.ceil=function(){if(this.isNaN())return Bu.NaN;var e=Math.ceil(this._hi),t=0;return e===this._hi&&(t=Math.ceil(this._lo)),new Bu(e,t)},Bu.prototype.compareTo=function(e){var t=e;return this._hi<t._hi?-1:this._hi>t._hi?1:this._lo<t._lo?-1:this._lo>t._lo?1:0},Bu.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},Bu.prototype.setValue=function(){if(arguments[0]instanceof Bu){var e=arguments[0];return this.init(e),this}if("number"==typeof arguments[0]){var t=arguments[0];return this.init(t),this}},Bu.prototype.max=function(e){return this.ge(e)?this:e},Bu.prototype.sqrt=function(){if(this.isZero())return Bu.valueOf(0);if(this.isNegative())return Bu.NaN;var e=1/Math.sqrt(this._hi),t=this._hi*e,r=Bu.valueOf(t),n=this.subtract(r.sqr())._hi*(.5*e);return r.add(n)},Bu.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof Bu){var e=arguments[0];return this.selfAdd(e._hi,e._lo)}if("number"==typeof arguments[0]){var t=arguments[0],r=null,n=null,i=null,o=null,a=null,s=null;return o=(i=this._hi+t)-(a=i-this._hi),n=(s=(o=t-a+(this._hi-o))+this._lo)+(i-(r=i+s)),this._hi=r+n,this._lo=n+(r-this._hi),this}}else if(2===arguments.length){var u=arguments[0],l=arguments[1],c=null,f=null,h=null,p=null,d=null,y=null,g=null;p=this._hi+u,f=this._lo+l,d=p-(y=p-this._hi),h=f-(g=f-this._lo);var v=(c=p+(y=(d=u-y+(this._hi-d))+f))+(y=(h=l-g+(this._lo-h))+(y+(p-c))),m=y+(c-v);return this._hi=v,this._lo=m,this}},Bu.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof Bu){var e=arguments[0];return this.selfMultiply(e._hi,e._lo)}if("number"==typeof arguments[0]){var t=arguments[0];return this.selfMultiply(t,0)}}else if(2===arguments.length){var r=arguments[0],n=arguments[1],i=null,o=null,a=null,s=null,u=null,l=null;i=(u=Bu.SPLIT*this._hi)-this._hi,l=Bu.SPLIT*r,i=u-i,o=this._hi-i,a=l-r;var c=(u=this._hi*r)+(l=i*(a=l-a)-u+i*(s=r-a)+o*a+o*s+(this._hi*n+this._lo*r)),f=l+(i=u-c);return this._hi=c,this._lo=f,this}},Bu.prototype.selfSqr=function(){return this.selfMultiply(this)},Bu.prototype.floor=function(){if(this.isNaN())return Bu.NaN;var e=Math.floor(this._hi),t=0;return e===this._hi&&(t=Math.floor(this._lo)),new Bu(e,t)},Bu.prototype.negate=function(){return this.isNaN()?this:new Bu(-this._hi,-this._lo)},Bu.prototype.clone=function(){},Bu.prototype.multiply=function(){if(arguments[0]instanceof Bu){var e=arguments[0];return e.isNaN()?Bu.createNaN():Bu.copy(this).selfMultiply(e)}if("number"==typeof arguments[0]){var t=arguments[0];return wu.isNaN(t)?Bu.createNaN():Bu.copy(this).selfMultiply(t,0)}},Bu.prototype.isNaN=function(){return wu.isNaN(this._hi)},Bu.prototype.intValue=function(){return Math.trunc(this._hi)},Bu.prototype.toString=function(){var e=Bu.magnitude(this._hi);return e>=-3&&e<=20?this.toStandardNotation():this.toSciNotation()},Bu.prototype.toStandardNotation=function(){var e=this.getSpecialNumberString();if(null!==e)return e;var t=new Array(1).fill(null),r=this.extractSignificantDigits(!0,t),n=t[0]+1,i=r;if("."===r.charAt(0))i="0"+r;else if(n<0)i="0."+Bu.stringOfChar("0",-n)+r;else if(-1===r.indexOf(".")){var o=n-r.length;i=r+Bu.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+i:i},Bu.prototype.reciprocal=function(){var e,t,r,n,i=null,o=null,a=null,s=null;e=(r=1/this._hi)-(i=(a=Bu.SPLIT*r)-(i=a-r)),o=(s=Bu.SPLIT*this._hi)-this._hi;var u=r+(a=(1-(n=r*this._hi)-(s=i*(o=s-o)-n+i*(t=this._hi-o)+e*o+e*t)-r*this._lo)/this._hi);return new Bu(u,r-u+a)},Bu.prototype.toSciNotation=function(){if(this.isZero())return Bu.SCI_NOT_ZERO;var e=this.getSpecialNumberString();if(null!==e)return e;var t=new Array(1).fill(null),r=this.extractSignificantDigits(!1,t),n=Bu.SCI_NOT_EXPONENT_CHAR+t[0];if("0"===r.charAt(0))throw new Error("Found leading zero: "+r);var i="";r.length>1&&(i=r.substring(1));var o=r.charAt(0)+"."+i;return this.isNegative()?"-"+o+n:o+n},Bu.prototype.abs=function(){return this.isNaN()?Bu.NaN:this.isNegative()?this.negate():new Bu(this)},Bu.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},Bu.prototype.lt=function(e){return(this._hi<e._hi||this._hi===e._hi)&&this._lo<e._lo},Bu.prototype.add=function(){if(arguments[0]instanceof Bu){var e=arguments[0];return Bu.copy(this).selfAdd(e)}if("number"==typeof arguments[0]){var t=arguments[0];return Bu.copy(this).selfAdd(t)}},Bu.prototype.init=function(){if(1===arguments.length){if("number"==typeof arguments[0]){var e=arguments[0];this._hi=e,this._lo=0}else if(arguments[0]instanceof Bu){var t=arguments[0];this._hi=t._hi,this._lo=t._lo}}else if(2===arguments.length){var r=arguments[0],n=arguments[1];this._hi=r,this._lo=n}},Bu.prototype.gt=function(e){return(this._hi>e._hi||this._hi===e._hi)&&this._lo>e._lo},Bu.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},Bu.prototype.trunc=function(){return this.isNaN()?Bu.NaN:this.isPositive()?this.floor():this.ceil()},Bu.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},Bu.prototype.interfaces_=function(){return[Tu,Pu,Eu]},Bu.prototype.getClass=function(){return Bu},Bu.sqr=function(e){return Bu.valueOf(e).selfMultiply(e)},Bu.valueOf=function(){if("string"==typeof arguments[0]){var e=arguments[0];return Bu.parse(e)}if("number"==typeof arguments[0]){var t=arguments[0];return new Bu(t)}},Bu.sqrt=function(e){return Bu.valueOf(e).sqrt()},Bu.parse=function(e){for(var t=0,r=e.length;Fu.isWhitespace(e.charAt(t));)t++;var n=!1;if(t<r){var i=e.charAt(t);"-"!==i&&"+"!==i||(t++,"-"===i&&(n=!0))}for(var o=new Bu,a=0,s=0,u=0;!(t>=r);){var l=e.charAt(t);if(t++,Fu.isDigit(l)){var c=l-"0";o.selfMultiply(Bu.TEN),o.selfAdd(c),a++}else{if("."!==l){if("e"===l||"E"===l){var f=e.substring(t);try{u=Du.parseInt(f)}catch(t){throw t instanceof Error?new Error("Invalid exponent "+f+" in string "+e):t}break}throw new Error("Unexpected character '"+l+"' at position "+t+" in string "+e)}s=a}}var h=o,p=a-s-u;if(0===p)h=o;else if(p>0){var d=Bu.TEN.pow(p);h=o.divide(d)}else if(p<0){var y=Bu.TEN.pow(-p);h=o.multiply(y)}return n?h.negate():h},Bu.createNaN=function(){return new Bu(wu.NaN,wu.NaN)},Bu.copy=function(e){return new Bu(e)},Bu.magnitude=function(e){var t=Math.abs(e),r=Math.log(t)/Math.log(10),n=Math.trunc(Math.floor(r));return 10*Math.pow(10,n)<=t&&(n+=1),n},Bu.stringOfChar=function(e,t){for(var r=new Au,n=0;n<t;n++)r.append(e);return r.toString()},qu.PI.get=function(){return new Bu(3.141592653589793,1.2246467991473532e-16)},qu.TWO_PI.get=function(){return new Bu(6.283185307179586,2.4492935982947064e-16)},qu.PI_2.get=function(){return new Bu(1.5707963267948966,6.123233995736766e-17)},qu.E.get=function(){return new Bu(2.718281828459045,1.4456468917292502e-16)},qu.NaN.get=function(){return new Bu(wu.NaN,wu.NaN)},qu.EPS.get=function(){return 1.23259516440783e-32},qu.SPLIT.get=function(){return 134217729},qu.MAX_PRINT_DIGITS.get=function(){return 32},qu.TEN.get=function(){return Bu.valueOf(10)},qu.ONE.get=function(){return Bu.valueOf(1)},qu.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},qu.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(Bu,qu);var Ju=function(){},Uu={DP_SAFE_EPSILON:{configurable:!0}};Ju.prototype.interfaces_=function(){return[]},Ju.prototype.getClass=function(){return Ju},Ju.orientationIndex=function(e,t,r){var n=Ju.orientationIndexFilter(e,t,r);if(n<=1)return n;var i=Bu.valueOf(t.x).selfAdd(-e.x),o=Bu.valueOf(t.y).selfAdd(-e.y),a=Bu.valueOf(r.x).selfAdd(-t.x),s=Bu.valueOf(r.y).selfAdd(-t.y);return i.selfMultiply(s).selfSubtract(o.selfMultiply(a)).signum()},Ju.signOfDet2x2=function(e,t,r,n){return e.multiply(n).selfSubtract(t.multiply(r)).signum()},Ju.intersection=function(e,t,r,n){var i=Bu.valueOf(n.y).selfSubtract(r.y).selfMultiply(Bu.valueOf(t.x).selfSubtract(e.x)),o=Bu.valueOf(n.x).selfSubtract(r.x).selfMultiply(Bu.valueOf(t.y).selfSubtract(e.y)),a=i.subtract(o),s=Bu.valueOf(n.x).selfSubtract(r.x).selfMultiply(Bu.valueOf(e.y).selfSubtract(r.y)),u=Bu.valueOf(n.y).selfSubtract(r.y).selfMultiply(Bu.valueOf(e.x).selfSubtract(r.x)),l=s.subtract(u).selfDivide(a).doubleValue(),c=Bu.valueOf(e.x).selfAdd(Bu.valueOf(t.x).selfSubtract(e.x).selfMultiply(l)).doubleValue(),f=Bu.valueOf(t.x).selfSubtract(e.x).selfMultiply(Bu.valueOf(e.y).selfSubtract(r.y)),h=Bu.valueOf(t.y).selfSubtract(e.y).selfMultiply(Bu.valueOf(e.x).selfSubtract(r.x)),p=f.subtract(h).selfDivide(a).doubleValue(),d=Bu.valueOf(r.y).selfAdd(Bu.valueOf(n.y).selfSubtract(r.y).selfMultiply(p)).doubleValue();return new Mu(c,d)},Ju.orientationIndexFilter=function(e,t,r){var n=null,i=(e.x-r.x)*(t.y-r.y),o=(e.y-r.y)*(t.x-r.x),a=i-o;if(i>0){if(o<=0)return Ju.signum(a);n=i+o}else{if(!(i<0))return Ju.signum(a);if(o>=0)return Ju.signum(a);n=-i-o}var s=Ju.DP_SAFE_EPSILON*n;return a>=s||-a>=s?Ju.signum(a):2},Ju.signum=function(e){return e>0?1:e<0?-1:0},Uu.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(Ju,Uu);var zu=function(){},Wu={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Wu.X.get=function(){return 0},Wu.Y.get=function(){return 1},Wu.Z.get=function(){return 2},Wu.M.get=function(){return 3},zu.prototype.setOrdinate=function(e,t,r){},zu.prototype.size=function(){},zu.prototype.getOrdinate=function(e,t){},zu.prototype.getCoordinate=function(){},zu.prototype.getCoordinateCopy=function(e){},zu.prototype.getDimension=function(){},zu.prototype.getX=function(e){},zu.prototype.clone=function(){},zu.prototype.expandEnvelope=function(e){},zu.prototype.copy=function(){},zu.prototype.getY=function(e){},zu.prototype.toCoordinateArray=function(){},zu.prototype.interfaces_=function(){return[Eu]},zu.prototype.getClass=function(){return zu},Object.defineProperties(zu,Wu);var Hu=function(){},Xu=function(e){function t(){e.call(this,"Projective point not representable on the Cartesian plane.")}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Hu),Zu=function(){};Zu.arraycopy=function(e,t,r,n,i){for(var o=0,a=t;a<t+i;a++)r[n+o]=e[a],o++},Zu.getProperty=function(e){return{"line.separator":"\n"}[e]};var Yu=function e(){if(this.x=null,this.y=null,this.w=null,0===arguments.length)this.x=0,this.y=0,this.w=1;else if(1===arguments.length){var t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(2===arguments.length){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var r=arguments[0],n=arguments[1];this.x=r,this.y=n,this.w=1}else if(arguments[0]instanceof e&&arguments[1]instanceof e){var i=arguments[0],o=arguments[1];this.x=i.y*o.w-o.y*i.w,this.y=o.x*i.w-i.x*o.w,this.w=i.x*o.y-o.x*i.y}else if(arguments[0]instanceof Mu&&arguments[1]instanceof Mu){var a=arguments[0],s=arguments[1];this.x=a.y-s.y,this.y=s.x-a.x,this.w=a.x*s.y-s.x*a.y}}else if(3===arguments.length){var u=arguments[0],l=arguments[1],c=arguments[2];this.x=u,this.y=l,this.w=c}else if(4===arguments.length){var f=arguments[0],h=arguments[1],p=arguments[2],d=arguments[3],y=f.y-h.y,g=h.x-f.x,v=f.x*h.y-h.x*f.y,m=p.y-d.y,_=d.x-p.x,b=p.x*d.y-d.x*p.y;this.x=g*b-_*v,this.y=m*v-y*b,this.w=y*_-m*g}};Yu.prototype.getY=function(){var e=this.y/this.w;if(wu.isNaN(e)||wu.isInfinite(e))throw new Xu;return e},Yu.prototype.getX=function(){var e=this.x/this.w;if(wu.isNaN(e)||wu.isInfinite(e))throw new Xu;return e},Yu.prototype.getCoordinate=function(){var e=new Mu;return e.x=this.getX(),e.y=this.getY(),e},Yu.prototype.interfaces_=function(){return[]},Yu.prototype.getClass=function(){return Yu},Yu.intersection=function(e,t,r,n){var i=e.y-t.y,o=t.x-e.x,a=e.x*t.y-t.x*e.y,s=r.y-n.y,u=n.x-r.x,l=r.x*n.y-n.x*r.y,c=i*u-s*o,f=(o*l-u*a)/c,h=(s*a-i*l)/c;if(wu.isNaN(f)||wu.isInfinite(f)||wu.isNaN(h)||wu.isInfinite(h))throw new Xu;return new Mu(f,h)};var Ku=function e(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,0===arguments.length)this.init();else if(1===arguments.length){if(arguments[0]instanceof Mu){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof e){var r=arguments[0];this.init(r)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(4===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2],u=arguments[3];this.init(o,a,s,u)}},Qu={serialVersionUID:{configurable:!0}};Ku.prototype.getArea=function(){return this.getWidth()*this.getHeight()},Ku.prototype.equals=function(e){if(!(e instanceof Ku))return!1;var t=e;return this.isNull()?t.isNull():this._maxx===t.getMaxX()&&this._maxy===t.getMaxY()&&this._minx===t.getMinX()&&this._miny===t.getMinY()},Ku.prototype.intersection=function(e){if(this.isNull()||e.isNull()||!this.intersects(e))return new Ku;var t=this._minx>e._minx?this._minx:e._minx,r=this._miny>e._miny?this._miny:e._miny,n=this._maxx<e._maxx?this._maxx:e._maxx,i=this._maxy<e._maxy?this._maxy:e._maxy;return new Ku(t,n,r,i)},Ku.prototype.isNull=function(){return this._maxx<this._minx},Ku.prototype.getMaxX=function(){return this._maxx},Ku.prototype.covers=function(){if(1===arguments.length){if(arguments[0]instanceof Mu){var e=arguments[0];return this.covers(e.x,e.y)}if(arguments[0]instanceof Ku){var t=arguments[0];return!this.isNull()&&!t.isNull()&&t.getMinX()>=this._minx&&t.getMaxX()<=this._maxx&&t.getMinY()>=this._miny&&t.getMaxY()<=this._maxy}}else if(2===arguments.length){var r=arguments[0],n=arguments[1];return!this.isNull()&&r>=this._minx&&r<=this._maxx&&n>=this._miny&&n<=this._maxy}},Ku.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof Ku){var e=arguments[0];return!this.isNull()&&!e.isNull()&&!(e._minx>this._maxx||e._maxx<this._minx||e._miny>this._maxy||e._maxy<this._miny)}if(arguments[0]instanceof Mu){var t=arguments[0];return this.intersects(t.x,t.y)}}else if(2===arguments.length){var r=arguments[0],n=arguments[1];return!this.isNull()&&!(r>this._maxx||r<this._minx||n>this._maxy||n<this._miny)}},Ku.prototype.getMinY=function(){return this._miny},Ku.prototype.getMinX=function(){return this._minx},Ku.prototype.expandToInclude=function(){if(1===arguments.length){if(arguments[0]instanceof Mu){var e=arguments[0];this.expandToInclude(e.x,e.y)}else if(arguments[0]instanceof Ku){var t=arguments[0];if(t.isNull())return null;this.isNull()?(this._minx=t.getMinX(),this._maxx=t.getMaxX(),this._miny=t.getMinY(),this._maxy=t.getMaxY()):(t._minx<this._minx&&(this._minx=t._minx),t._maxx>this._maxx&&(this._maxx=t._maxx),t._miny<this._miny&&(this._miny=t._miny),t._maxy>this._maxy&&(this._maxy=t._maxy))}}else if(2===arguments.length){var r=arguments[0],n=arguments[1];this.isNull()?(this._minx=r,this._maxx=r,this._miny=n,this._maxy=n):(r<this._minx&&(this._minx=r),r>this._maxx&&(this._maxx=r),n<this._miny&&(this._miny=n),n>this._maxy&&(this._maxy=n))}},Ku.prototype.minExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),t=this.getHeight();return e<t?e:t},Ku.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},Ku.prototype.compareTo=function(e){var t=e;return this.isNull()?t.isNull()?0:-1:t.isNull()?1:this._minx<t._minx?-1:this._minx>t._minx?1:this._miny<t._miny?-1:this._miny>t._miny?1:this._maxx<t._maxx?-1:this._maxx>t._maxx?1:this._maxy<t._maxy?-1:this._maxy>t._maxy?1:0},Ku.prototype.translate=function(e,t){if(this.isNull())return null;this.init(this.getMinX()+e,this.getMaxX()+e,this.getMinY()+t,this.getMaxY()+t)},Ku.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},Ku.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},Ku.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},Ku.prototype.maxExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),t=this.getHeight();return e>t?e:t},Ku.prototype.expandBy=function(){if(1===arguments.length){var e=arguments[0];this.expandBy(e,e)}else if(2===arguments.length){var t=arguments[0],r=arguments[1];if(this.isNull())return null;this._minx-=t,this._maxx+=t,this._miny-=r,this._maxy+=r,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},Ku.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof Ku){var e=arguments[0];return this.covers(e)}if(arguments[0]instanceof Mu){var t=arguments[0];return this.covers(t)}}else if(2===arguments.length){var r=arguments[0],n=arguments[1];return this.covers(r,n)}},Ku.prototype.centre=function(){return this.isNull()?null:new Mu((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},Ku.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof Mu){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof Ku){var t=arguments[0];this._minx=t._minx,this._maxx=t._maxx,this._miny=t._miny,this._maxy=t._maxy}}else if(2===arguments.length){var r=arguments[0],n=arguments[1];this.init(r.x,n.x,r.y,n.y)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];i<o?(this._minx=i,this._maxx=o):(this._minx=o,this._maxx=i),a<s?(this._miny=a,this._maxy=s):(this._miny=s,this._maxy=a)}},Ku.prototype.getMaxY=function(){return this._maxy},Ku.prototype.distance=function(e){if(this.intersects(e))return 0;var t=0;this._maxx<e._minx?t=e._minx-this._maxx:this._minx>e._maxx&&(t=this._minx-e._maxx);var r=0;return this._maxy<e._miny?r=e._miny-this._maxy:this._miny>e._maxy&&(r=this._miny-e._maxy),0===t?r:0===r?t:Math.sqrt(t*t+r*r)},Ku.prototype.hashCode=function(){var e=17;return e=37*(e=37*(e=37*(e=37*e+Mu.hashCode(this._minx))+Mu.hashCode(this._maxx))+Mu.hashCode(this._miny))+Mu.hashCode(this._maxy)},Ku.prototype.interfaces_=function(){return[Pu,Tu]},Ku.prototype.getClass=function(){return Ku},Ku.intersects=function(){if(3===arguments.length){var e=arguments[0],t=arguments[1],r=arguments[2];return r.x>=(e.x<t.x?e.x:t.x)&&r.x<=(e.x>t.x?e.x:t.x)&&r.y>=(e.y<t.y?e.y:t.y)&&r.y<=(e.y>t.y?e.y:t.y)}if(4===arguments.length){var n=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),l=Math.min(n.x,i.x),c=Math.max(n.x,i.x);return!(l>u||c<s||(s=Math.min(o.y,a.y),u=Math.max(o.y,a.y),l=Math.min(n.y,i.y),c=Math.max(n.y,i.y),l>u||c<s))}},Qu.serialVersionUID.get=function(){return 0x51845cd552189800},Object.defineProperties(Ku,Qu);var $u={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},el=function(e){this.geometryFactory=e||new Rc};el.prototype.read=function(e){var t,r,n;e=e.replace(/[\n\r]/g," ");var i=$u.typeStr.exec(e);if(-1!==e.search("EMPTY")&&((i=$u.emptyTypeStr.exec(e))[2]=void 0),i&&(r=i[1].toLowerCase(),n=i[2],rl[r]&&(t=rl[r].apply(this,[n]))),void 0===t)throw new Error("Could not parse WKT "+e);return t},el.prototype.write=function(e){return this.extractGeometry(e)},el.prototype.extractGeometry=function(e){var t=e.getGeometryType().toLowerCase();if(!tl[t])return null;var r=t.toUpperCase();return e.isEmpty()?r+" EMPTY":r+"("+tl[t].apply(this,[e])+")"};var tl={coordinate:function(e){return e.x+" "+e.y},point:function(e){return tl.coordinate.call(this,e._coordinates._coordinates[0])},multipoint:function(e){for(var t=[],r=0,n=e._geometries.length;r<n;++r)t.push("("+tl.point.apply(this,[e._geometries[r]])+")");return t.join(",")},linestring:function(e){for(var t=[],r=0,n=e._points._coordinates.length;r<n;++r)t.push(tl.coordinate.apply(this,[e._points._coordinates[r]]));return t.join(",")},linearring:function(e){for(var t=[],r=0,n=e._points._coordinates.length;r<n;++r)t.push(tl.coordinate.apply(this,[e._points._coordinates[r]]));return t.join(",")},multilinestring:function(e){for(var t=[],r=0,n=e._geometries.length;r<n;++r)t.push("("+tl.linestring.apply(this,[e._geometries[r]])+")");return t.join(",")},polygon:function(e){var t=[];t.push("("+tl.linestring.apply(this,[e._shell])+")");for(var r=0,n=e._holes.length;r<n;++r)t.push("("+tl.linestring.apply(this,[e._holes[r]])+")");return t.join(",")},multipolygon:function(e){for(var t=[],r=0,n=e._geometries.length;r<n;++r)t.push("("+tl.polygon.apply(this,[e._geometries[r]])+")");return t.join(",")},geometrycollection:function(e){for(var t=[],r=0,n=e._geometries.length;r<n;++r)t.push(this.extractGeometry(e._geometries[r]));return t.join(",")}},rl={point:function(e){if(void 0===e)return this.geometryFactory.createPoint();var t=e.trim().split($u.spaces);return this.geometryFactory.createPoint(new Mu(Number.parseFloat(t[0]),Number.parseFloat(t[1])))},multipoint:function(e){var t;if(void 0===e)return this.geometryFactory.createMultiPoint();for(var r=e.trim().split(","),n=[],i=0,o=r.length;i<o;++i)t=r[i].replace($u.trimParens,"$1"),n.push(rl.point.apply(this,[t]));return this.geometryFactory.createMultiPoint(n)},linestring:function(e){if(void 0===e)return this.geometryFactory.createLineString();for(var t,r=e.trim().split(","),n=[],i=0,o=r.length;i<o;++i)t=r[i].trim().split($u.spaces),n.push(new Mu(Number.parseFloat(t[0]),Number.parseFloat(t[1])));return this.geometryFactory.createLineString(n)},linearring:function(e){if(void 0===e)return this.geometryFactory.createLinearRing();for(var t,r=e.trim().split(","),n=[],i=0,o=r.length;i<o;++i)t=r[i].trim().split($u.spaces),n.push(new Mu(Number.parseFloat(t[0]),Number.parseFloat(t[1])));return this.geometryFactory.createLinearRing(n)},multilinestring:function(e){var t;if(void 0===e)return this.geometryFactory.createMultiLineString();for(var r=e.trim().split($u.parenComma),n=[],i=0,o=r.length;i<o;++i)t=r[i].replace($u.trimParens,"$1"),n.push(rl.linestring.apply(this,[t]));return this.geometryFactory.createMultiLineString(n)},polygon:function(e){var t,r,n;if(void 0===e)return this.geometryFactory.createPolygon();for(var i,o=e.trim().split($u.parenComma),a=[],s=0,u=o.length;s<u;++s)t=o[s].replace($u.trimParens,"$1"),r=rl.linestring.apply(this,[t]),n=this.geometryFactory.createLinearRing(r._points),0===s?i=n:a.push(n);return this.geometryFactory.createPolygon(i,a)},multipolygon:function(e){var t;if(void 0===e)return this.geometryFactory.createMultiPolygon();for(var r=e.trim().split($u.doubleParenComma),n=[],i=0,o=r.length;i<o;++i)t=r[i].replace($u.trimParens,"$1"),n.push(rl.polygon.apply(this,[t]));return this.geometryFactory.createMultiPolygon(n)},geometrycollection:function(e){if(void 0===e)return this.geometryFactory.createGeometryCollection();for(var t=(e=e.replace(/,\s*([A-Za-z])/g,"|$1")).trim().split("|"),r=[],n=0,i=t.length;n<i;++n)r.push(this.read(t[n]));return this.geometryFactory.createGeometryCollection(r)}},nl=function(e){this.parser=new el(e)};nl.prototype.write=function(e){return this.parser.write(e)},nl.toLineString=function(e,t){if(2!==arguments.length)throw new Error("Not implemented");return"LINESTRING ( "+e.x+" "+e.y+", "+t.x+" "+t.y+" )"};var il=function(e){function t(t){e.call(this,t),this.name="RuntimeException",this.message=t,this.stack=(new e).stack}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Error),ol=function(e){function t(){if(e.call(this),0===arguments.length)e.call(this);else if(1===arguments.length){var t=arguments[0];e.call(this,t)}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(il),al=function(){};al.prototype.interfaces_=function(){return[]},al.prototype.getClass=function(){return al},al.shouldNeverReachHere=function(){if(0===arguments.length)al.shouldNeverReachHere(null);else if(1===arguments.length){var e=arguments[0];throw new ol("Should never reach here"+(null!==e?": "+e:""))}},al.isTrue=function(){var e;if(1===arguments.length)al.isTrue(arguments[0],null);else if(2===arguments.length&&(e=arguments[1],!arguments[0]))throw null===e?new ol:new ol(e)},al.equals=function(){var e,t,r;if(2===arguments.length)al.equals(e=arguments[0],t=arguments[1],null);else if(3===arguments.length&&(e=arguments[0],r=arguments[2],!(t=arguments[1]).equals(e)))throw new ol("Expected "+e+" but encountered "+t+(null!==r?": "+r:""))};var sl=function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new Mu,this._intPt[1]=new Mu,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},ul={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};sl.prototype.getIndexAlongSegment=function(e,t){return this.computeIntLineIndex(),this._intLineIndex[e][t]},sl.prototype.getTopologySummary=function(){var e=new Au;return this.isEndPoint()&&e.append(" endpoint"),this._isProper&&e.append(" proper"),this.isCollinear()&&e.append(" collinear"),e.toString()},sl.prototype.computeIntersection=function(e,t,r,n){this._inputLines[0][0]=e,this._inputLines[0][1]=t,this._inputLines[1][0]=r,this._inputLines[1][1]=n,this._result=this.computeIntersect(e,t,r,n)},sl.prototype.getIntersectionNum=function(){return this._result},sl.prototype.computeIntLineIndex=function(){if(0===arguments.length)null===this._intLineIndex&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(1===arguments.length){var e=arguments[0],t=this.getEdgeDistance(e,0),r=this.getEdgeDistance(e,1);t>r?(this._intLineIndex[e][0]=0,this._intLineIndex[e][1]=1):(this._intLineIndex[e][0]=1,this._intLineIndex[e][1]=0)}},sl.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},sl.prototype.setPrecisionModel=function(e){this._precisionModel=e},sl.prototype.isInteriorIntersection=function(){var e=this;if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var t=arguments[0],r=0;r<this._result;r++)if(!e._intPt[r].equals2D(e._inputLines[t][0])&&!e._intPt[r].equals2D(e._inputLines[t][1]))return!0;return!1}},sl.prototype.getIntersection=function(e){return this._intPt[e]},sl.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},sl.prototype.hasIntersection=function(){return this._result!==sl.NO_INTERSECTION},sl.prototype.getEdgeDistance=function(e,t){return sl.computeEdgeDistance(this._intPt[t],this._inputLines[e][0],this._inputLines[e][1])},sl.prototype.isCollinear=function(){return this._result===sl.COLLINEAR_INTERSECTION},sl.prototype.toString=function(){return nl.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+nl.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},sl.prototype.getEndpoint=function(e,t){return this._inputLines[e][t]},sl.prototype.isIntersection=function(e){for(var t=0;t<this._result;t++)if(this._intPt[t].equals2D(e))return!0;return!1},sl.prototype.getIntersectionAlongSegment=function(e,t){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[e][t]]},sl.prototype.interfaces_=function(){return[]},sl.prototype.getClass=function(){return sl},sl.computeEdgeDistance=function(e,t,r){var n=Math.abs(r.x-t.x),i=Math.abs(r.y-t.y),o=-1;if(e.equals(t))o=0;else if(e.equals(r))o=n>i?n:i;else{var a=Math.abs(e.x-t.x),s=Math.abs(e.y-t.y);0!==(o=n>i?a:s)||e.equals(t)||(o=Math.max(a,s))}return al.isTrue(!(0===o&&!e.equals(t)),"Bad distance calculation"),o},sl.nonRobustComputeEdgeDistance=function(e,t,r){var n=e.x-t.x,i=e.y-t.y,o=Math.sqrt(n*n+i*i);return al.isTrue(!(0===o&&!e.equals(t)),"Invalid distance calculation"),o},ul.DONT_INTERSECT.get=function(){return 0},ul.DO_INTERSECT.get=function(){return 1},ul.COLLINEAR.get=function(){return 2},ul.NO_INTERSECTION.get=function(){return 0},ul.POINT_INTERSECTION.get=function(){return 1},ul.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(sl,ul);var ll=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.isInSegmentEnvelopes=function(e){var t=new Ku(this._inputLines[0][0],this._inputLines[0][1]),r=new Ku(this._inputLines[1][0],this._inputLines[1][1]);return t.contains(e)&&r.contains(e)},t.prototype.computeIntersection=function(){if(3!==arguments.length)return e.prototype.computeIntersection.apply(this,arguments);var t=arguments[0],r=arguments[1],n=arguments[2];if(this._isProper=!1,Ku.intersects(r,n,t)&&0===hl.orientationIndex(r,n,t)&&0===hl.orientationIndex(n,r,t))return this._isProper=!0,(t.equals(r)||t.equals(n))&&(this._isProper=!1),this._result=e.POINT_INTERSECTION,null;this._result=e.NO_INTERSECTION},t.prototype.normalizeToMinimum=function(e,t,r,n,i){i.x=this.smallestInAbsValue(e.x,t.x,r.x,n.x),i.y=this.smallestInAbsValue(e.y,t.y,r.y,n.y),e.x-=i.x,e.y-=i.y,t.x-=i.x,t.y-=i.y,r.x-=i.x,r.y-=i.y,n.x-=i.x,n.y-=i.y},t.prototype.safeHCoordinateIntersection=function(e,r,n,i){var o=null;try{o=Yu.intersection(e,r,n,i)}catch(a){if(!(a instanceof Xu))throw a;o=t.nearestEndpoint(e,r,n,i)}return o},t.prototype.intersection=function(e,r,n,i){var o=this.intersectionWithNormalization(e,r,n,i);return this.isInSegmentEnvelopes(o)||(o=new Mu(t.nearestEndpoint(e,r,n,i))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},t.prototype.smallestInAbsValue=function(e,t,r,n){var i=e,o=Math.abs(i);return Math.abs(t)<o&&(i=t,o=Math.abs(t)),Math.abs(r)<o&&(i=r,o=Math.abs(r)),Math.abs(n)<o&&(i=n),i},t.prototype.checkDD=function(e,t,r,n,i){var o=Ju.intersection(e,t,r,n),a=this.isInSegmentEnvelopes(o);Zu.out.println("DD in env = "+a+" --------------------- "+o),i.distance(o)>1e-4&&Zu.out.println("Distance = "+i.distance(o))},t.prototype.intersectionWithNormalization=function(e,t,r,n){var i=new Mu(e),o=new Mu(t),a=new Mu(r),s=new Mu(n),u=new Mu;this.normalizeToEnvCentre(i,o,a,s,u);var l=this.safeHCoordinateIntersection(i,o,a,s);return l.x+=u.x,l.y+=u.y,l},t.prototype.computeCollinearIntersection=function(t,r,n,i){var o=Ku.intersects(t,r,n),a=Ku.intersects(t,r,i),s=Ku.intersects(n,i,t),u=Ku.intersects(n,i,r);return o&&a?(this._intPt[0]=n,this._intPt[1]=i,e.COLLINEAR_INTERSECTION):s&&u?(this._intPt[0]=t,this._intPt[1]=r,e.COLLINEAR_INTERSECTION):o&&s?(this._intPt[0]=n,this._intPt[1]=t,!n.equals(t)||a||u?e.COLLINEAR_INTERSECTION:e.POINT_INTERSECTION):o&&u?(this._intPt[0]=n,this._intPt[1]=r,!n.equals(r)||a||s?e.COLLINEAR_INTERSECTION:e.POINT_INTERSECTION):a&&s?(this._intPt[0]=i,this._intPt[1]=t,!i.equals(t)||o||u?e.COLLINEAR_INTERSECTION:e.POINT_INTERSECTION):a&&u?(this._intPt[0]=i,this._intPt[1]=r,!i.equals(r)||o||s?e.COLLINEAR_INTERSECTION:e.POINT_INTERSECTION):e.NO_INTERSECTION},t.prototype.normalizeToEnvCentre=function(e,t,r,n,i){var o=e.x<t.x?e.x:t.x,a=e.y<t.y?e.y:t.y,s=e.x>t.x?e.x:t.x,u=e.y>t.y?e.y:t.y,l=r.x<n.x?r.x:n.x,c=r.y<n.y?r.y:n.y,f=r.x>n.x?r.x:n.x,h=r.y>n.y?r.y:n.y,p=((o>l?o:l)+(s<f?s:f))/2,d=((a>c?a:c)+(u<h?u:h))/2;i.x=p,i.y=d,e.x-=i.x,e.y-=i.y,t.x-=i.x,t.y-=i.y,r.x-=i.x,r.y-=i.y,n.x-=i.x,n.y-=i.y},t.prototype.computeIntersect=function(t,r,n,i){if(this._isProper=!1,!Ku.intersects(t,r,n,i))return e.NO_INTERSECTION;var o=hl.orientationIndex(t,r,n),a=hl.orientationIndex(t,r,i);if(o>0&&a>0||o<0&&a<0)return e.NO_INTERSECTION;var s=hl.orientationIndex(n,i,t),u=hl.orientationIndex(n,i,r);return s>0&&u>0||s<0&&u<0?e.NO_INTERSECTION:0===o&&0===a&&0===s&&0===u?this.computeCollinearIntersection(t,r,n,i):(0===o||0===a||0===s||0===u?(this._isProper=!1,t.equals2D(n)||t.equals2D(i)?this._intPt[0]=t:r.equals2D(n)||r.equals2D(i)?this._intPt[0]=r:0===o?this._intPt[0]=new Mu(n):0===a?this._intPt[0]=new Mu(i):0===s?this._intPt[0]=new Mu(t):0===u&&(this._intPt[0]=new Mu(r))):(this._isProper=!0,this._intPt[0]=this.intersection(t,r,n,i)),e.POINT_INTERSECTION)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.nearestEndpoint=function(e,t,r,n){var i=e,o=hl.distancePointLine(e,r,n),a=hl.distancePointLine(t,r,n);return a<o&&(o=a,i=t),(a=hl.distancePointLine(r,e,t))<o&&(o=a,i=r),(a=hl.distancePointLine(n,e,t))<o&&(o=a,i=n),i},t}(sl),cl=function(){};cl.prototype.interfaces_=function(){return[]},cl.prototype.getClass=function(){return cl},cl.orientationIndex=function(e,t,r){var n=t.x-e.x,i=t.y-e.y,o=r.x-t.x,a=r.y-t.y;return cl.signOfDet2x2(n,i,o,a)},cl.signOfDet2x2=function(e,t,r,n){var i=null,o=null,a=null;if(i=1,0===e||0===n)return 0===t||0===r?0:t>0?r>0?-i:i:r>0?i:-i;if(0===t||0===r)return n>0?e>0?i:-i:e>0?-i:i;if(t>0?n>0?t<=n||(i=-i,o=e,e=r,r=o,o=t,t=n,n=o):t<=-n?(i=-i,r=-r,n=-n):(o=e,e=-r,r=o,o=t,t=-n,n=o):n>0?-t<=n?(i=-i,e=-e,t=-t):(o=-e,e=r,r=o,o=-t,t=n,n=o):t>=n?(e=-e,t=-t,r=-r,n=-n):(i=-i,o=-e,e=-r,r=o,o=-t,t=-n,n=o),e>0){if(!(r>0))return i;if(!(e<=r))return i}else{if(r>0)return-i;if(!(e>=r))return-i;i=-i,e=-e,r=-r}for(;;){if((n-=(a=Math.floor(r/e))*t)<0)return-i;if(n>t)return i;if(e>(r-=a*e)+r){if(t<n+n)return i}else{if(t>n+n)return-i;r=e-r,n=t-n,i=-i}if(0===n)return 0===r?0:-i;if(0===r)return i;if((t-=(a=Math.floor(e/r))*n)<0)return i;if(t>n)return-i;if(r>(e-=a*r)+e){if(n<t+t)return-i}else{if(n>t+t)return i;e=r-e,t=n-t,i=-i}if(0===t)return 0===e?0:i;if(0===e)return-i}};var fl=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var e=arguments[0];this._p=e};fl.prototype.countSegment=function(e,t){if(e.x<this._p.x&&t.x<this._p.x)return null;if(this._p.x===t.x&&this._p.y===t.y)return this._isPointOnSegment=!0,null;if(e.y===this._p.y&&t.y===this._p.y){var r=e.x,n=t.x;return r>n&&(r=t.x,n=e.x),this._p.x>=r&&this._p.x<=n&&(this._isPointOnSegment=!0),null}if(e.y>this._p.y&&t.y<=this._p.y||t.y>this._p.y&&e.y<=this._p.y){var i=e.x-this._p.x,o=e.y-this._p.y,a=t.x-this._p.x,s=t.y-this._p.y,u=cl.signOfDet2x2(i,o,a,s);if(0===u)return this._isPointOnSegment=!0,null;s<o&&(u=-u),u>0&&this._crossingCount++}},fl.prototype.isPointInPolygon=function(){return this.getLocation()!==Nu.EXTERIOR},fl.prototype.getLocation=function(){return this._isPointOnSegment?Nu.BOUNDARY:this._crossingCount%2==1?Nu.INTERIOR:Nu.EXTERIOR},fl.prototype.isOnSegment=function(){return this._isPointOnSegment},fl.prototype.interfaces_=function(){return[]},fl.prototype.getClass=function(){return fl},fl.locatePointInRing=function(){if(arguments[0]instanceof Mu&&ju(arguments[1],zu)){for(var e=arguments[0],t=arguments[1],r=new fl(e),n=new Mu,i=new Mu,o=1;o<t.size();o++)if(t.getCoordinate(o,n),t.getCoordinate(o-1,i),r.countSegment(n,i),r.isOnSegment())return r.getLocation();return r.getLocation()}if(arguments[0]instanceof Mu&&arguments[1]instanceof Array){for(var a=arguments[0],s=arguments[1],u=new fl(a),l=1;l<s.length;l++){var c=s[l],f=s[l-1];if(u.countSegment(c,f),u.isOnSegment())return u.getLocation()}return u.getLocation()}};var hl=function(){},pl={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};hl.prototype.interfaces_=function(){return[]},hl.prototype.getClass=function(){return hl},hl.orientationIndex=function(e,t,r){return Ju.orientationIndex(e,t,r)},hl.signedArea=function(){if(arguments[0]instanceof Array){var e=arguments[0];if(e.length<3)return 0;for(var t=0,r=e[0].x,n=1;n<e.length-1;n++){var i=e[n].x-r,o=e[n+1].y,a=e[n-1].y;t+=i*(a-o)}return t/2}if(ju(arguments[0],zu)){var s=arguments[0],u=s.size();if(u<3)return 0;var l=new Mu,c=new Mu,f=new Mu;s.getCoordinate(0,c),s.getCoordinate(1,f);var h=c.x;f.x-=h;for(var p=0,d=1;d<u-1;d++)l.y=c.y,c.x=f.x,c.y=f.y,s.getCoordinate(d+1,f),f.x-=h,p+=c.x*(l.y-f.y);return p/2}},hl.distanceLineLine=function(e,t,r,n){if(e.equals(t))return hl.distancePointLine(e,r,n);if(r.equals(n))return hl.distancePointLine(n,e,t);var i=!1;if(Ku.intersects(e,t,r,n)){var o=(t.x-e.x)*(n.y-r.y)-(t.y-e.y)*(n.x-r.x);if(0===o)i=!0;else{var a=(e.y-r.y)*(n.x-r.x)-(e.x-r.x)*(n.y-r.y),s=((e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y))/o,u=a/o;(u<0||u>1||s<0||s>1)&&(i=!0)}}else i=!0;return i?Gu.min(hl.distancePointLine(e,r,n),hl.distancePointLine(t,r,n),hl.distancePointLine(r,e,t),hl.distancePointLine(n,e,t)):0},hl.isPointInRing=function(e,t){return hl.locatePointInRing(e,t)!==Nu.EXTERIOR},hl.computeLength=function(e){var t=e.size();if(t<=1)return 0;var r=0,n=new Mu;e.getCoordinate(0,n);for(var i=n.x,o=n.y,a=1;a<t;a++){e.getCoordinate(a,n);var s=n.x,u=n.y,l=s-i,c=u-o;r+=Math.sqrt(l*l+c*c),i=s,o=u}return r},hl.isCCW=function(e){var t=e.length-1;if(t<3)throw new xu("Ring has fewer than 4 points, so orientation cannot be determined");for(var r=e[0],n=0,i=1;i<=t;i++){var o=e[i];o.y>r.y&&(r=o,n=i)}var a=n;do{(a-=1)<0&&(a=t)}while(e[a].equals2D(r)&&a!==n);var s=n;do{s=(s+1)%t}while(e[s].equals2D(r)&&s!==n);var u=e[a],l=e[s];if(u.equals2D(r)||l.equals2D(r)||u.equals2D(l))return!1;var c=hl.computeOrientation(u,r,l);return 0===c?u.x>l.x:c>0},hl.locatePointInRing=function(e,t){return fl.locatePointInRing(e,t)},hl.distancePointLinePerpendicular=function(e,t,r){var n=(r.x-t.x)*(r.x-t.x)+(r.y-t.y)*(r.y-t.y),i=((t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y))/n;return Math.abs(i)*Math.sqrt(n)},hl.computeOrientation=function(e,t,r){return hl.orientationIndex(e,t,r)},hl.distancePointLine=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];if(0===t.length)throw new xu("Line array must contain at least one vertex");for(var r=e.distance(t[0]),n=0;n<t.length-1;n++){var i=hl.distancePointLine(e,t[n],t[n+1]);i<r&&(r=i)}return r}if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2];if(a.x===s.x&&a.y===s.y)return o.distance(a);var u=(s.x-a.x)*(s.x-a.x)+(s.y-a.y)*(s.y-a.y),l=((o.x-a.x)*(s.x-a.x)+(o.y-a.y)*(s.y-a.y))/u;if(l<=0)return o.distance(a);if(l>=1)return o.distance(s);var c=((a.y-o.y)*(s.x-a.x)-(a.x-o.x)*(s.y-a.y))/u;return Math.abs(c)*Math.sqrt(u)}},hl.isOnLine=function(e,t){for(var r=new ll,n=1;n<t.length;n++){var i=t[n-1],o=t[n];if(r.computeIntersection(e,i,o),r.hasIntersection())return!0}return!1},pl.CLOCKWISE.get=function(){return-1},pl.RIGHT.get=function(){return hl.CLOCKWISE},pl.COUNTERCLOCKWISE.get=function(){return 1},pl.LEFT.get=function(){return hl.COUNTERCLOCKWISE},pl.COLLINEAR.get=function(){return 0},pl.STRAIGHT.get=function(){return hl.COLLINEAR},Object.defineProperties(hl,pl);var dl=function(){};dl.prototype.filter=function(e){},dl.prototype.interfaces_=function(){return[]},dl.prototype.getClass=function(){return dl};var yl=function(){var e=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=e,this._SRID=e.getSRID()},gl={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};yl.prototype.isGeometryCollection=function(){return this.getSortIndex()===yl.SORTINDEX_GEOMETRYCOLLECTION},yl.prototype.getFactory=function(){return this._factory},yl.prototype.getGeometryN=function(e){return this},yl.prototype.getArea=function(){return 0},yl.prototype.isRectangle=function(){return!1},yl.prototype.equals=function(){if(arguments[0]instanceof yl){var e=arguments[0];return null!==e&&this.equalsTopo(e)}if(arguments[0]instanceof Object){var t=arguments[0];if(!(t instanceof yl))return!1;var r=t;return this.equalsExact(r)}},yl.prototype.equalsExact=function(e){return this===e||this.equalsExact(e,0)},yl.prototype.geometryChanged=function(){this.apply(yl.geometryChangedFilter)},yl.prototype.geometryChangedAction=function(){this._envelope=null},yl.prototype.equalsNorm=function(e){return null!==e&&this.norm().equalsExact(e.norm())},yl.prototype.getLength=function(){return 0},yl.prototype.getNumGeometries=function(){return 1},yl.prototype.compareTo=function(){if(1===arguments.length){var e=arguments[0],t=e;return this.getSortIndex()!==t.getSortIndex()?this.getSortIndex()-t.getSortIndex():this.isEmpty()&&t.isEmpty()?0:this.isEmpty()?-1:t.isEmpty()?1:this.compareToSameClass(e)}if(2===arguments.length){var r=arguments[0],n=arguments[1];return this.getSortIndex()!==r.getSortIndex()?this.getSortIndex()-r.getSortIndex():this.isEmpty()&&r.isEmpty()?0:this.isEmpty()?-1:r.isEmpty()?1:this.compareToSameClass(r,n)}},yl.prototype.getUserData=function(){return this._userData},yl.prototype.getSRID=function(){return this._SRID},yl.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},yl.prototype.checkNotGeometryCollection=function(e){if(e.getSortIndex()===yl.SORTINDEX_GEOMETRYCOLLECTION)throw new xu("This method does not support GeometryCollection arguments")},yl.prototype.equal=function(e,t,r){return 0===r?e.equals(t):e.distance(t)<=r},yl.prototype.norm=function(){var e=this.copy();return e.normalize(),e},yl.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},yl.prototype.getEnvelopeInternal=function(){return null===this._envelope&&(this._envelope=this.computeEnvelopeInternal()),new Ku(this._envelope)},yl.prototype.setSRID=function(e){this._SRID=e},yl.prototype.setUserData=function(e){this._userData=e},yl.prototype.compare=function(e,t){for(var r=e.iterator(),n=t.iterator();r.hasNext()&&n.hasNext();){var i=r.next(),o=n.next(),a=i.compareTo(o);if(0!==a)return a}return r.hasNext()?1:n.hasNext()?-1:0},yl.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},yl.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===yl.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===yl.SORTINDEX_MULTIPOINT||this.getSortIndex()===yl.SORTINDEX_MULTILINESTRING||this.getSortIndex()===yl.SORTINDEX_MULTIPOLYGON},yl.prototype.interfaces_=function(){return[Eu,Pu,Tu]},yl.prototype.getClass=function(){return yl},yl.hasNonEmptyElements=function(e){for(var t=0;t<e.length;t++)if(!e[t].isEmpty())return!0;return!1},yl.hasNullElements=function(e){for(var t=0;t<e.length;t++)if(null===e[t])return!0;return!1},gl.serialVersionUID.get=function(){return 0x799ea46522854c00},gl.SORTINDEX_POINT.get=function(){return 0},gl.SORTINDEX_MULTIPOINT.get=function(){return 1},gl.SORTINDEX_LINESTRING.get=function(){return 2},gl.SORTINDEX_LINEARRING.get=function(){return 3},gl.SORTINDEX_MULTILINESTRING.get=function(){return 4},gl.SORTINDEX_POLYGON.get=function(){return 5},gl.SORTINDEX_MULTIPOLYGON.get=function(){return 6},gl.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},gl.geometryChangedFilter.get=function(){return vl},Object.defineProperties(yl,gl);var vl=function(){};vl.interfaces_=function(){return[dl]},vl.filter=function(e){e.geometryChangedAction()};var ml=function(){};ml.prototype.filter=function(e){},ml.prototype.interfaces_=function(){return[]},ml.prototype.getClass=function(){return ml};var _l=function(){},bl={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};_l.prototype.isInBoundary=function(e){},_l.prototype.interfaces_=function(){return[]},_l.prototype.getClass=function(){return _l},bl.Mod2BoundaryNodeRule.get=function(){return Sl},bl.EndPointBoundaryNodeRule.get=function(){return xl},bl.MultiValentEndPointBoundaryNodeRule.get=function(){return wl},bl.MonoValentEndPointBoundaryNodeRule.get=function(){return Ol},bl.MOD2_BOUNDARY_RULE.get=function(){return new Sl},bl.ENDPOINT_BOUNDARY_RULE.get=function(){return new xl},bl.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new wl},bl.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new Ol},bl.OGC_SFS_BOUNDARY_RULE.get=function(){return _l.MOD2_BOUNDARY_RULE},Object.defineProperties(_l,bl);var Sl=function(){};Sl.prototype.isInBoundary=function(e){return e%2==1},Sl.prototype.interfaces_=function(){return[_l]},Sl.prototype.getClass=function(){return Sl};var xl=function(){};xl.prototype.isInBoundary=function(e){return e>0},xl.prototype.interfaces_=function(){return[_l]},xl.prototype.getClass=function(){return xl};var wl=function(){};wl.prototype.isInBoundary=function(e){return e>1},wl.prototype.interfaces_=function(){return[_l]},wl.prototype.getClass=function(){return wl};var Ol=function(){};Ol.prototype.isInBoundary=function(e){return 1===e},Ol.prototype.interfaces_=function(){return[_l]},Ol.prototype.getClass=function(){return Ol};var Pl=function(){};function El(e){this.message=e||""}Pl.prototype.add=function(){},Pl.prototype.addAll=function(){},Pl.prototype.isEmpty=function(){},Pl.prototype.iterator=function(){},Pl.prototype.size=function(){},Pl.prototype.toArray=function(){},Pl.prototype.remove=function(){},El.prototype=new Error,El.prototype.name="IndexOutOfBoundsException";var kl=function(){};kl.prototype.hasNext=function(){},kl.prototype.next=function(){},kl.prototype.remove=function(){};var Tl=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(){},t.prototype.set=function(){},t.prototype.isEmpty=function(){},t}(Pl);function Ml(e){this.message=e||""}Ml.prototype=new Error,Ml.prototype.name="NoSuchElementException";var Il=function(e){function t(){e.call(this),this.array_=[],arguments[0]instanceof Pl&&this.addAll(arguments[0])}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.ensureCapacity=function(){},t.prototype.interfaces_=function(){return[e,Pl]},t.prototype.add=function(e){return 1===arguments.length?this.array_.push(e):this.array_.splice(arguments[0],arguments[1]),!0},t.prototype.clear=function(){this.array_=[]},t.prototype.addAll=function(e){for(var t=e.iterator();t.hasNext();)this.add(t.next());return!0},t.prototype.set=function(e,t){var r=this.array_[e];return this.array_[e]=t,r},t.prototype.iterator=function(){return new Ll(this)},t.prototype.get=function(e){if(e<0||e>=this.size())throw new El;return this.array_[e]},t.prototype.isEmpty=function(){return 0===this.array_.length},t.prototype.size=function(){return this.array_.length},t.prototype.toArray=function(){for(var e=[],t=0,r=this.array_.length;t<r;t++)e.push(this.array_[t]);return e},t.prototype.remove=function(e){for(var t=!1,r=0,n=this.array_.length;r<n;r++)if(this.array_[r]===e){this.array_.splice(r,1),t=!0;break}return t},t}(Tl),Ll=function(e){function t(t){e.call(this),this.arrayList_=t,this.position_=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new Ml;return this.arrayList_.get(this.position_++)},t.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},t.prototype.set=function(e){return this.arrayList_.set(this.position_-1,e)},t.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},t}(kl),Cl=function(e){function t(){if(e.call(this),0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.ensureCapacity(t.length),this.add(t,!0)}else if(2===arguments.length){var r=arguments[0],n=arguments[1];this.ensureCapacity(r.length),this.add(r,n)}}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={coordArrayType:{configurable:!0}};return r.coordArrayType.get=function(){return new Array(0).fill(null)},t.prototype.getCoordinate=function(e){return this.get(e)},t.prototype.addAll=function(){if(2===arguments.length){for(var t=arguments[0],r=arguments[1],n=!1,i=t.iterator();i.hasNext();)this.add(i.next(),r),n=!0;return n}return e.prototype.addAll.apply(this,arguments)},t.prototype.clone=function(){for(var t=e.prototype.clone.call(this),r=0;r<this.size();r++)t.add(r,this.get(r).copy());return t},t.prototype.toCoordinateArray=function(){return this.toArray(t.coordArrayType)},t.prototype.add=function(){var t=this;if(1===arguments.length){var r=arguments[0];e.prototype.add.call(this,r)}else if(2===arguments.length){if(arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var n=arguments[0],i=arguments[1];return this.add(n,i,!0),!0}if(arguments[0]instanceof Mu&&"boolean"==typeof arguments[1]){var o=arguments[0],a=arguments[1];if(!a&&this.size()>=1){var s=this.get(this.size()-1);if(s.equals2D(o))return null}e.prototype.add.call(this,o)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var u=arguments[0],l=arguments[1];return this.add(u,l),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var c=arguments[0],f=arguments[1],h=arguments[2];if(h)for(var p=0;p<c.length;p++)t.add(c[p],f);else for(var d=c.length-1;d>=0;d--)t.add(c[d],f);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof Mu){var y=arguments[0],g=arguments[1],v=arguments[2];if(!v){var m=this.size();if(m>0){if(y>0){var _=this.get(y-1);if(_.equals2D(g))return null}if(y<m){var b=this.get(y);if(b.equals2D(g))return null}}}e.prototype.add.call(this,y,g)}}else if(4===arguments.length){var S=arguments[0],x=arguments[1],w=arguments[2],O=arguments[3],P=1;w>O&&(P=-1);for(var E=w;E!==O;E+=P)t.add(S[E],x);return!0}},t.prototype.closeRing=function(){this.size()>0&&this.add(new Mu(this.get(0)),!1)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},Object.defineProperties(t,r),t}(Il),Nl=function(){},Rl={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};Rl.ForwardComparator.get=function(){return jl},Rl.BidirectionalComparator.get=function(){return Gl},Rl.coordArrayType.get=function(){return new Array(0).fill(null)},Nl.prototype.interfaces_=function(){return[]},Nl.prototype.getClass=function(){return Nl},Nl.isRing=function(e){return!(e.length<4||!e[0].equals2D(e[e.length-1]))},Nl.ptNotInList=function(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(Nl.indexOf(n,t)<0)return n}return null},Nl.scroll=function(e,t){var r=Nl.indexOf(t,e);if(r<0)return null;var n=new Array(e.length).fill(null);Zu.arraycopy(e,r,n,0,e.length-r),Zu.arraycopy(e,0,n,e.length-r,r),Zu.arraycopy(n,0,e,0,e.length)},Nl.equals=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];if(e===t)return!0;if(null===e||null===t)return!1;if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!e[r].equals(t[r]))return!1;return!0}if(3===arguments.length){var n=arguments[0],i=arguments[1],o=arguments[2];if(n===i)return!0;if(null===n||null===i)return!1;if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(0!==o.compare(n[a],i[a]))return!1;return!0}},Nl.intersection=function(e,t){for(var r=new Cl,n=0;n<e.length;n++)t.intersects(e[n])&&r.add(e[n],!0);return r.toCoordinateArray()},Nl.hasRepeatedPoints=function(e){for(var t=1;t<e.length;t++)if(e[t-1].equals(e[t]))return!0;return!1},Nl.removeRepeatedPoints=function(e){return Nl.hasRepeatedPoints(e)?new Cl(e,!1).toCoordinateArray():e},Nl.reverse=function(e){for(var t=e.length-1,r=Math.trunc(t/2),n=0;n<=r;n++){var i=e[n];e[n]=e[t-n],e[t-n]=i}},Nl.removeNull=function(e){for(var t=0,r=0;r<e.length;r++)null!==e[r]&&t++;var n=new Array(t).fill(null);if(0===t)return n;for(var i=0,o=0;o<e.length;o++)null!==e[o]&&(n[i++]=e[o]);return n},Nl.copyDeep=function(){if(1===arguments.length){for(var e=arguments[0],t=new Array(e.length).fill(null),r=0;r<e.length;r++)t[r]=new Mu(e[r]);return t}if(5===arguments.length)for(var n=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3],s=arguments[4],u=0;u<s;u++)o[a+u]=new Mu(n[i+u])},Nl.isEqualReversed=function(e,t){for(var r=0;r<e.length;r++){var n=e[r],i=t[e.length-r-1];if(0!==n.compareTo(i))return!1}return!0},Nl.envelope=function(e){for(var t=new Ku,r=0;r<e.length;r++)t.expandToInclude(e[r]);return t},Nl.toCoordinateArray=function(e){return e.toArray(Nl.coordArrayType)},Nl.atLeastNCoordinatesOrNothing=function(e,t){return t.length>=e?t:[]},Nl.indexOf=function(e,t){for(var r=0;r<t.length;r++)if(e.equals(t[r]))return r;return-1},Nl.increasingDirection=function(e){for(var t=0;t<Math.trunc(e.length/2);t++){var r=e.length-1-t,n=e[t].compareTo(e[r]);if(0!==n)return n}return 1},Nl.compare=function(e,t){for(var r=0;r<e.length&&r<t.length;){var n=e[r].compareTo(t[r]);if(0!==n)return n;r++}return r<t.length?-1:r<e.length?1:0},Nl.minCoordinate=function(e){for(var t=null,r=0;r<e.length;r++)(null===t||t.compareTo(e[r])>0)&&(t=e[r]);return t},Nl.extract=function(e,t,r){t=Gu.clamp(t,0,e.length);var n=(r=Gu.clamp(r,-1,e.length))-t+1;r<0&&(n=0),t>=e.length&&(n=0),r<t&&(n=0);var i=new Array(n).fill(null);if(0===n)return i;for(var o=0,a=t;a<=r;a++)i[o++]=e[a];return i},Object.defineProperties(Nl,Rl);var jl=function(){};jl.prototype.compare=function(e,t){return Nl.compare(e,t)},jl.prototype.interfaces_=function(){return[ku]},jl.prototype.getClass=function(){return jl};var Gl=function(){};Gl.prototype.compare=function(e,t){var r=e,n=t;if(r.length<n.length)return-1;if(r.length>n.length)return 1;if(0===r.length)return 0;var i=Nl.compare(r,n);return Nl.isEqualReversed(r,n)?0:i},Gl.prototype.OLDcompare=function(e,t){var r=e,n=t;if(r.length<n.length)return-1;if(r.length>n.length)return 1;if(0===r.length)return 0;for(var i=Nl.increasingDirection(r),o=Nl.increasingDirection(n),a=i>0?0:r.length-1,s=o>0?0:r.length-1,u=0;u<r.length;u++){var l=r[a].compareTo(n[s]);if(0!==l)return l;a+=i,s+=o}return 0},Gl.prototype.interfaces_=function(){return[ku]},Gl.prototype.getClass=function(){return Gl};var Vl=function(){};Vl.prototype.get=function(){},Vl.prototype.put=function(){},Vl.prototype.size=function(){},Vl.prototype.values=function(){},Vl.prototype.entrySet=function(){};var Al=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Vl);function Dl(e){this.message=e||""}function Fl(){}Dl.prototype=new Error,Dl.prototype.name="OperationNotSupported",Fl.prototype=new Pl,Fl.prototype.contains=function(){};var Bl=function(e){function t(){e.call(this),this.array_=[],arguments[0]instanceof Pl&&this.addAll(arguments[0])}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.contains=function(e){for(var t=0,r=this.array_.length;t<r;t++)if(this.array_[t]===e)return!0;return!1},t.prototype.add=function(e){return!this.contains(e)&&(this.array_.push(e),!0)},t.prototype.addAll=function(e){for(var t=e.iterator();t.hasNext();)this.add(t.next());return!0},t.prototype.remove=function(e){throw new Error},t.prototype.size=function(){return this.array_.length},t.prototype.isEmpty=function(){return 0===this.array_.length},t.prototype.toArray=function(){for(var e=[],t=0,r=this.array_.length;t<r;t++)e.push(this.array_[t]);return e},t.prototype.iterator=function(){return new ql(this)},t}(Fl),ql=function(e){function t(t){e.call(this),this.hashSet_=t,this.position_=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new Ml;return this.hashSet_.array_[this.position_++]},t.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},t.prototype.remove=function(){throw new Dl},t}(kl);function Jl(e){return null===e?0:e.color}function Ul(e){return null===e?null:e.parent}function zl(e,t){null!==e&&(e.color=t)}function Wl(e){return null===e?null:e.left}function Hl(e){return null===e?null:e.right}function Xl(){this.root_=null,this.size_=0}Xl.prototype=new Al,Xl.prototype.get=function(e){for(var t=this.root_;null!==t;){var r=e.compareTo(t.key);if(r<0)t=t.left;else{if(!(r>0))return t.value;t=t.right}}return null},Xl.prototype.put=function(e,t){if(null===this.root_)return this.root_={key:e,value:t,left:null,right:null,parent:null,color:0,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var r,n,i=this.root_;do{if(r=i,(n=e.compareTo(i.key))<0)i=i.left;else{if(!(n>0)){var o=i.value;return i.value=t,o}i=i.right}}while(null!==i);var a={key:e,left:null,right:null,value:t,parent:r,color:0,getValue:function(){return this.value},getKey:function(){return this.key}};return n<0?r.left=a:r.right=a,this.fixAfterInsertion(a),this.size_++,null},Xl.prototype.fixAfterInsertion=function(e){var t=this;for(e.color=1;null!=e&&e!==this.root_&&1===e.parent.color;)if(Ul(e)===Wl(Ul(Ul(e)))){var r=Hl(Ul(Ul(e)));1===Jl(r)?(zl(Ul(e),0),zl(r,0),zl(Ul(Ul(e)),1),e=Ul(Ul(e))):(e===Hl(Ul(e))&&(e=Ul(e),t.rotateLeft(e)),zl(Ul(e),0),zl(Ul(Ul(e)),1),t.rotateRight(Ul(Ul(e))))}else{var n=Wl(Ul(Ul(e)));1===Jl(n)?(zl(Ul(e),0),zl(n,0),zl(Ul(Ul(e)),1),e=Ul(Ul(e))):(e===Wl(Ul(e))&&(e=Ul(e),t.rotateRight(e)),zl(Ul(e),0),zl(Ul(Ul(e)),1),t.rotateLeft(Ul(Ul(e))))}this.root_.color=0},Xl.prototype.values=function(){var e=new Il,t=this.getFirstEntry();if(null!==t)for(e.add(t.value);null!==(t=Xl.successor(t));)e.add(t.value);return e},Xl.prototype.entrySet=function(){var e=new Bl,t=this.getFirstEntry();if(null!==t)for(e.add(t);null!==(t=Xl.successor(t));)e.add(t);return e},Xl.prototype.rotateLeft=function(e){if(null!=e){var t=e.right;e.right=t.left,null!=t.left&&(t.left.parent=e),t.parent=e.parent,null===e.parent?this.root_=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}},Xl.prototype.rotateRight=function(e){if(null!=e){var t=e.left;e.left=t.right,null!=t.right&&(t.right.parent=e),t.parent=e.parent,null===e.parent?this.root_=t:e.parent.right===e?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}},Xl.prototype.getFirstEntry=function(){var e=this.root_;if(null!=e)for(;null!=e.left;)e=e.left;return e},Xl.successor=function(e){if(null===e)return null;if(null!==e.right){for(var t=e.right;null!==t.left;)t=t.left;return t}for(var r=e.parent,n=e;null!==r&&n===r.right;)n=r,r=r.parent;return r},Xl.prototype.size=function(){return this.size_};var Zl=function(){};function Yl(){}function Kl(){this.array_=[],arguments[0]instanceof Pl&&this.addAll(arguments[0])}Zl.prototype.interfaces_=function(){return[]},Zl.prototype.getClass=function(){return Zl},Yl.prototype=new Fl,Kl.prototype=new Yl,Kl.prototype.contains=function(e){for(var t=0,r=this.array_.length;t<r;t++)if(0===this.array_[t].compareTo(e))return!0;return!1},Kl.prototype.add=function(e){if(this.contains(e))return!1;for(var t=0,r=this.array_.length;t<r;t++)if(1===this.array_[t].compareTo(e))return this.array_.splice(t,0,e),!0;return this.array_.push(e),!0},Kl.prototype.addAll=function(e){for(var t=e.iterator();t.hasNext();)this.add(t.next());return!0},Kl.prototype.remove=function(e){throw new Dl},Kl.prototype.size=function(){return this.array_.length},Kl.prototype.isEmpty=function(){return 0===this.array_.length},Kl.prototype.toArray=function(){for(var e=[],t=0,r=this.array_.length;t<r;t++)e.push(this.array_[t]);return e},Kl.prototype.iterator=function(){return new Ql(this)};var Ql=function(e){this.treeSet_=e,this.position_=0};Ql.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new Ml;return this.treeSet_.array_[this.position_++]},Ql.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},Ql.prototype.remove=function(){throw new Dl};var $l=function(){};$l.sort=function(){var e,t,r,n,i=arguments[0];if(1===arguments.length)n=function(e,t){return e.compareTo(t)},i.sort(n);else if(2===arguments.length)r=arguments[1],n=function(e,t){return r.compare(e,t)},i.sort(n);else if(3===arguments.length){(t=i.slice(arguments[1],arguments[2])).sort();var o=i.slice(0,arguments[1]).concat(t,i.slice(arguments[2],i.length));for(i.splice(0,i.length),e=0;e<o.length;e++)i.push(o[e])}else if(4===arguments.length)for(t=i.slice(arguments[1],arguments[2]),r=arguments[3],n=function(e,t){return r.compare(e,t)},t.sort(n),o=i.slice(0,arguments[1]).concat(t,i.slice(arguments[2],i.length)),i.splice(0,i.length),e=0;e<o.length;e++)i.push(o[e])},$l.asList=function(e){for(var t=new Il,r=0,n=e.length;r<n;r++)t.add(e[r]);return t};var ec=function(){},tc={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};tc.P.get=function(){return 0},tc.L.get=function(){return 1},tc.A.get=function(){return 2},tc.FALSE.get=function(){return-1},tc.TRUE.get=function(){return-2},tc.DONTCARE.get=function(){return-3},tc.SYM_FALSE.get=function(){return"F"},tc.SYM_TRUE.get=function(){return"T"},tc.SYM_DONTCARE.get=function(){return"*"},tc.SYM_P.get=function(){return"0"},tc.SYM_L.get=function(){return"1"},tc.SYM_A.get=function(){return"2"},ec.prototype.interfaces_=function(){return[]},ec.prototype.getClass=function(){return ec},ec.toDimensionSymbol=function(e){switch(e){case ec.FALSE:return ec.SYM_FALSE;case ec.TRUE:return ec.SYM_TRUE;case ec.DONTCARE:return ec.SYM_DONTCARE;case ec.P:return ec.SYM_P;case ec.L:return ec.SYM_L;case ec.A:return ec.SYM_A}throw new xu("Unknown dimension value: "+e)},ec.toDimensionValue=function(e){switch(Fu.toUpperCase(e)){case ec.SYM_FALSE:return ec.FALSE;case ec.SYM_TRUE:return ec.TRUE;case ec.SYM_DONTCARE:return ec.DONTCARE;case ec.SYM_P:return ec.P;case ec.SYM_L:return ec.L;case ec.SYM_A:return ec.A}throw new xu("Unknown dimension symbol: "+e)},Object.defineProperties(ec,tc);var rc=function(){};rc.prototype.filter=function(e){},rc.prototype.interfaces_=function(){return[]},rc.prototype.getClass=function(){return rc};var nc=function(){};nc.prototype.filter=function(e,t){},nc.prototype.isDone=function(){},nc.prototype.isGeometryChanged=function(){},nc.prototype.interfaces_=function(){return[]},nc.prototype.getClass=function(){return nc};var ic=function(e){function t(t,r){if(e.call(this,r),this._geometries=t||[],e.hasNullElements(this._geometries))throw new xu("geometries must not contain null elements")}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){for(var e=new Ku,t=0;t<this._geometries.length;t++)e.expandToInclude(this._geometries[t].getEnvelopeInternal());return e},t.prototype.getGeometryN=function(e){return this._geometries[e]},t.prototype.getSortIndex=function(){return e.SORTINDEX_GEOMETRYCOLLECTION},t.prototype.getCoordinates=function(){for(var e=new Array(this.getNumPoints()).fill(null),t=-1,r=0;r<this._geometries.length;r++)for(var n=this._geometries[r].getCoordinates(),i=0;i<n.length;i++)e[++t]=n[i];return e},t.prototype.getArea=function(){for(var e=0,t=0;t<this._geometries.length;t++)e+=this._geometries[t].getArea();return e},t.prototype.equalsExact=function(){if(2===arguments.length){var t=arguments[0],r=arguments[1];if(!this.isEquivalentClass(t))return!1;var n=t;if(this._geometries.length!==n._geometries.length)return!1;for(var i=0;i<this._geometries.length;i++)if(!this._geometries[i].equalsExact(n._geometries[i],r))return!1;return!0}return e.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var e=0;e<this._geometries.length;e++)this._geometries[e].normalize();$l.sort(this._geometries)},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},t.prototype.getBoundaryDimension=function(){for(var e=ec.FALSE,t=0;t<this._geometries.length;t++)e=Math.max(e,this._geometries[t].getBoundaryDimension());return e},t.prototype.getDimension=function(){for(var e=ec.FALSE,t=0;t<this._geometries.length;t++)e=Math.max(e,this._geometries[t].getDimension());return e},t.prototype.getLength=function(){for(var e=0,t=0;t<this._geometries.length;t++)e+=this._geometries[t].getLength();return e},t.prototype.getNumPoints=function(){for(var e=0,t=0;t<this._geometries.length;t++)e+=this._geometries[t].getNumPoints();return e},t.prototype.getNumGeometries=function(){return this._geometries.length},t.prototype.reverse=function(){for(var e=this._geometries.length,t=new Array(e).fill(null),r=0;r<this._geometries.length;r++)t[r]=this._geometries[r].reverse();return this.getFactory().createGeometryCollection(t)},t.prototype.compareToSameClass=function(){if(1===arguments.length){var e=arguments[0],t=new Kl($l.asList(this._geometries)),r=new Kl($l.asList(e._geometries));return this.compare(t,r)}if(2===arguments.length){for(var n=arguments[0],i=arguments[1],o=n,a=this.getNumGeometries(),s=o.getNumGeometries(),u=0;u<a&&u<s;){var l=this.getGeometryN(u),c=o.getGeometryN(u),f=l.compareToSameClass(c,i);if(0!==f)return f;u++}return u<a?1:u<s?-1:0}},t.prototype.apply=function(){var e=this;if(ju(arguments[0],ml))for(var t=arguments[0],r=0;r<this._geometries.length;r++)e._geometries[r].apply(t);else if(ju(arguments[0],nc)){var n=arguments[0];if(0===this._geometries.length)return null;for(var i=0;i<this._geometries.length&&(e._geometries[i].apply(n),!n.isDone());i++);n.isGeometryChanged()&&this.geometryChanged()}else if(ju(arguments[0],rc)){var o=arguments[0];o.filter(this);for(var a=0;a<this._geometries.length;a++)e._geometries[a].apply(o)}else if(ju(arguments[0],dl)){var s=arguments[0];s.filter(this);for(var u=0;u<this._geometries.length;u++)e._geometries[u].apply(s)}},t.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),al.shouldNeverReachHere(),null},t.prototype.clone=function(){var t=e.prototype.clone.call(this);t._geometries=new Array(this._geometries.length).fill(null);for(var r=0;r<this._geometries.length;r++)t._geometries[r]=this._geometries[r].clone();return t},t.prototype.getGeometryType=function(){return"GeometryCollection"},t.prototype.copy=function(){for(var e=new Array(this._geometries.length).fill(null),r=0;r<e.length;r++)e[r]=this._geometries[r].copy();return new t(e,this._factory)},t.prototype.isEmpty=function(){for(var e=0;e<this._geometries.length;e++)if(!this._geometries[e].isEmpty())return!1;return!0},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},r.serialVersionUID.get=function(){return-0x4f07bcb1f857d800},Object.defineProperties(t,r),t}(yl),oc=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return yl.SORTINDEX_MULTILINESTRING},t.prototype.equalsExact=function(){if(2===arguments.length){var t=arguments[0],r=arguments[1];return!!this.isEquivalentClass(t)&&e.prototype.equalsExact.call(this,t,r)}return e.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?ec.FALSE:0},t.prototype.isClosed=function(){if(this.isEmpty())return!1;for(var e=0;e<this._geometries.length;e++)if(!this._geometries[e].isClosed())return!1;return!0},t.prototype.getDimension=function(){return 1},t.prototype.reverse=function(){for(var e=this._geometries.length,t=new Array(e).fill(null),r=0;r<this._geometries.length;r++)t[e-1-r]=this._geometries[r].reverse();return this.getFactory().createMultiLineString(t)},t.prototype.getBoundary=function(){return new ac(this).getBoundary()},t.prototype.getGeometryType=function(){return"MultiLineString"},t.prototype.copy=function(){for(var e=new Array(this._geometries.length).fill(null),r=0;r<e.length;r++)e[r]=this._geometries[r].copy();return new t(e,this._factory)},t.prototype.interfaces_=function(){return[Zl]},t.prototype.getClass=function(){return t},r.serialVersionUID.get=function(){return 0x7155d2ab4afa8000},Object.defineProperties(t,r),t}(ic),ac=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,1===arguments.length){var e=arguments[0],t=_l.MOD2_BOUNDARY_RULE;this._geom=e,this._geomFact=e.getFactory(),this._bnRule=t}else if(2===arguments.length){var r=arguments[0],n=arguments[1];this._geom=r,this._geomFact=r.getFactory(),this._bnRule=n}};ac.prototype.boundaryMultiLineString=function(e){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var t=this.computeBoundaryCoordinates(e);return 1===t.length?this._geomFact.createPoint(t[0]):this._geomFact.createMultiPointFromCoords(t)},ac.prototype.getBoundary=function(){return this._geom instanceof hc?this.boundaryLineString(this._geom):this._geom instanceof oc?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},ac.prototype.boundaryLineString=function(e){return this._geom.isEmpty()?this.getEmptyMultiPoint():e.isClosed()?this._bnRule.isInBoundary(2)?e.getStartPoint():this._geomFact.createMultiPoint():this._geomFact.createMultiPoint([e.getStartPoint(),e.getEndPoint()])},ac.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},ac.prototype.computeBoundaryCoordinates=function(e){var t=this,r=new Il;this._endpointMap=new Xl;for(var n=0;n<e.getNumGeometries();n++){var i=e.getGeometryN(n);0!==i.getNumPoints()&&(t.addEndpoint(i.getCoordinateN(0)),t.addEndpoint(i.getCoordinateN(i.getNumPoints()-1)))}for(var o=this._endpointMap.entrySet().iterator();o.hasNext();){var a=o.next(),s=a.getValue().count;t._bnRule.isInBoundary(s)&&r.add(a.getKey())}return Nl.toCoordinateArray(r)},ac.prototype.addEndpoint=function(e){var t=this._endpointMap.get(e);null===t&&(t=new sc,this._endpointMap.put(e,t)),t.count++},ac.prototype.interfaces_=function(){return[]},ac.prototype.getClass=function(){return ac},ac.getBoundary=function(){if(1===arguments.length){var e=arguments[0],t=new ac(e);return t.getBoundary()}if(2===arguments.length){var r=arguments[0],n=arguments[1],i=new ac(r,n);return i.getBoundary()}};var sc=function(){this.count=null};function uc(){}sc.prototype.interfaces_=function(){return[]},sc.prototype.getClass=function(){return sc};var lc=function(){},cc={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};lc.prototype.interfaces_=function(){return[]},lc.prototype.getClass=function(){return lc},lc.chars=function(e,t){for(var r=new Array(t).fill(null),n=0;n<t;n++)r[n]=e;return String(r)},lc.getStackTrace=function(){if(1===arguments.length){var e=arguments[0],t=new function(){},r=new function(){}(t);return e.printStackTrace(r),t.toString()}if(2===arguments.length){for(var n=arguments[0],i=arguments[1],o="",a=new function(){}(lc.getStackTrace(n)),s=new function(){}(a),u=0;u<i;u++)try{o+=s.readLine()+lc.NEWLINE}catch(e){if(!(e instanceof uc))throw e;al.shouldNeverReachHere()}return o}},lc.split=function(e,t){for(var r=t.length,n=new Il,i=""+e,o=i.indexOf(t);o>=0;){var a=i.substring(0,o);n.add(a),o=(i=i.substring(o+r)).indexOf(t)}i.length>0&&n.add(i);for(var s=new Array(n.size()).fill(null),u=0;u<s.length;u++)s[u]=n.get(u);return s},lc.toString=function(){if(1===arguments.length){var e=arguments[0];return lc.SIMPLE_ORDINATE_FORMAT.format(e)}},lc.spaces=function(e){return lc.chars(" ",e)},cc.NEWLINE.get=function(){return Zu.getProperty("line.separator")},cc.SIMPLE_ORDINATE_FORMAT.get=function(){return new function(){}("0.#")},Object.defineProperties(lc,cc);var fc=function(){};fc.prototype.interfaces_=function(){return[]},fc.prototype.getClass=function(){return fc},fc.copyCoord=function(e,t,r,n){for(var i=Math.min(e.getDimension(),r.getDimension()),o=0;o<i;o++)r.setOrdinate(n,o,e.getOrdinate(t,o))},fc.isRing=function(e){var t=e.size();return 0===t||!(t<=3)&&e.getOrdinate(0,zu.X)===e.getOrdinate(t-1,zu.X)&&e.getOrdinate(0,zu.Y)===e.getOrdinate(t-1,zu.Y)},fc.isEqual=function(e,t){var r=e.size();if(r!==t.size())return!1;for(var n=Math.min(e.getDimension(),t.getDimension()),i=0;i<r;i++)for(var o=0;o<n;o++){var a=e.getOrdinate(i,o),s=t.getOrdinate(i,o);if(!(e.getOrdinate(i,o)===t.getOrdinate(i,o)||wu.isNaN(a)&&wu.isNaN(s)))return!1}return!0},fc.extend=function(e,t,r){var n=e.create(r,t.getDimension()),i=t.size();if(fc.copy(t,0,n,0,i),i>0)for(var o=i;o<r;o++)fc.copy(t,i-1,n,o,1);return n},fc.reverse=function(e){for(var t=e.size()-1,r=Math.trunc(t/2),n=0;n<=r;n++)fc.swap(e,n,t-n)},fc.swap=function(e,t,r){if(t===r)return null;for(var n=0;n<e.getDimension();n++){var i=e.getOrdinate(t,n);e.setOrdinate(t,n,e.getOrdinate(r,n)),e.setOrdinate(r,n,i)}},fc.copy=function(e,t,r,n,i){for(var o=0;o<i;o++)fc.copyCoord(e,t+o,r,n+o)},fc.toString=function(){if(1===arguments.length){var e=arguments[0],t=e.size();if(0===t)return"()";var r=e.getDimension(),n=new Au;n.append("(");for(var i=0;i<t;i++){i>0&&n.append(" ");for(var o=0;o<r;o++)o>0&&n.append(","),n.append(lc.toString(e.getOrdinate(i,o)))}return n.append(")"),n.toString()}},fc.ensureValidRing=function(e,t){var r=t.size();return 0===r?t:r<=3?fc.createClosedRing(e,t,4):t.getOrdinate(0,zu.X)===t.getOrdinate(r-1,zu.X)&&t.getOrdinate(0,zu.Y)===t.getOrdinate(r-1,zu.Y)?t:fc.createClosedRing(e,t,r+1)},fc.createClosedRing=function(e,t,r){var n=e.create(r,t.getDimension()),i=t.size();fc.copy(t,0,n,0,i);for(var o=i;o<r;o++)fc.copy(t,0,n,o,1);return n};var hc=function(e){function t(t,r){e.call(this,r),this._points=null,this.init(t)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new Ku:this._points.expandEnvelope(new Ku)},t.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},t.prototype.getSortIndex=function(){return e.SORTINDEX_LINESTRING},t.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},t.prototype.equalsExact=function(){if(2===arguments.length){var t=arguments[0],r=arguments[1];if(!this.isEquivalentClass(t))return!1;var n=t;if(this._points.size()!==n._points.size())return!1;for(var i=0;i<this._points.size();i++)if(!this.equal(this._points.getCoordinate(i),n._points.getCoordinate(i),r))return!1;return!0}return e.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var e=this,t=0;t<Math.trunc(this._points.size()/2);t++){var r=e._points.size()-1-t;if(!e._points.getCoordinate(t).equals(e._points.getCoordinate(r)))return e._points.getCoordinate(t).compareTo(e._points.getCoordinate(r))>0&&fc.reverse(e._points),null}},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?ec.FALSE:0},t.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},t.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},t.prototype.getDimension=function(){return 1},t.prototype.getLength=function(){return hl.computeLength(this._points)},t.prototype.getNumPoints=function(){return this._points.size()},t.prototype.reverse=function(){var e=this._points.copy();return fc.reverse(e),this.getFactory().createLineString(e)},t.prototype.compareToSameClass=function(){if(1===arguments.length){for(var e=arguments[0],t=e,r=0,n=0;r<this._points.size()&&n<t._points.size();){var i=this._points.getCoordinate(r).compareTo(t._points.getCoordinate(n));if(0!==i)return i;r++,n++}return r<this._points.size()?1:n<t._points.size()?-1:0}if(2===arguments.length){var o=arguments[0],a=arguments[1],s=o;return a.compare(this._points,s._points)}},t.prototype.apply=function(){if(ju(arguments[0],ml))for(var e=arguments[0],t=0;t<this._points.size();t++)e.filter(this._points.getCoordinate(t));else if(ju(arguments[0],nc)){var r=arguments[0];if(0===this._points.size())return null;for(var n=0;n<this._points.size()&&(r.filter(this._points,n),!r.isDone());n++);r.isGeometryChanged()&&this.geometryChanged()}else if(ju(arguments[0],rc)){var i=arguments[0];i.filter(this)}else if(ju(arguments[0],dl)){var o=arguments[0];o.filter(this)}},t.prototype.getBoundary=function(){return new ac(this).getBoundary()},t.prototype.isEquivalentClass=function(e){return e instanceof t},t.prototype.clone=function(){var t=e.prototype.clone.call(this);return t._points=this._points.clone(),t},t.prototype.getCoordinateN=function(e){return this._points.getCoordinate(e)},t.prototype.getGeometryType=function(){return"LineString"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._points},t.prototype.isEmpty=function(){return 0===this._points.size()},t.prototype.init=function(e){if(null===e&&(e=this.getFactory().getCoordinateSequenceFactory().create([])),1===e.size())throw new xu("Invalid number of points in LineString (found "+e.size()+" - must be 0 or >= 2)");this._points=e},t.prototype.isCoordinate=function(e){for(var t=0;t<this._points.size();t++)if(this._points.getCoordinate(t).equals(e))return!0;return!1},t.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},t.prototype.getPointN=function(e){return this.getFactory().createPoint(this._points.getCoordinate(e))},t.prototype.interfaces_=function(){return[Zl]},t.prototype.getClass=function(){return t},r.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(t,r),t}(yl),pc=function(){};pc.prototype.interfaces_=function(){return[]},pc.prototype.getClass=function(){return pc};var dc=function(e){function t(t,r){e.call(this,r),this._coordinates=t||null,this.init(this._coordinates)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new Ku;var e=new Ku;return e.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),e},t.prototype.getSortIndex=function(){return e.SORTINDEX_POINT},t.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},t.prototype.equalsExact=function(){if(2===arguments.length){var t=arguments[0],r=arguments[1];return!!this.isEquivalentClass(t)&&(!(!this.isEmpty()||!t.isEmpty())||this.isEmpty()===t.isEmpty()&&this.equal(t.getCoordinate(),this.getCoordinate(),r))}return e.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){},t.prototype.getCoordinate=function(){return 0!==this._coordinates.size()?this._coordinates.getCoordinate(0):null},t.prototype.getBoundaryDimension=function(){return ec.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getNumPoints=function(){return this.isEmpty()?0:1},t.prototype.reverse=function(){return this.copy()},t.prototype.getX=function(){if(null===this.getCoordinate())throw new Error("getX called on empty Point");return this.getCoordinate().x},t.prototype.compareToSameClass=function(){if(1===arguments.length){var e=arguments[0],t=e;return this.getCoordinate().compareTo(t.getCoordinate())}if(2===arguments.length){var r=arguments[0],n=arguments[1],i=r;return n.compare(this._coordinates,i._coordinates)}},t.prototype.apply=function(){if(ju(arguments[0],ml)){var e=arguments[0];if(this.isEmpty())return null;e.filter(this.getCoordinate())}else if(ju(arguments[0],nc)){var t=arguments[0];if(this.isEmpty())return null;t.filter(this._coordinates,0),t.isGeometryChanged()&&this.geometryChanged()}else if(ju(arguments[0],rc)){var r=arguments[0];r.filter(this)}else if(ju(arguments[0],dl)){var n=arguments[0];n.filter(this)}},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.clone=function(){var t=e.prototype.clone.call(this);return t._coordinates=this._coordinates.clone(),t},t.prototype.getGeometryType=function(){return"Point"},t.prototype.copy=function(){return new t(this._coordinates.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._coordinates},t.prototype.getY=function(){if(null===this.getCoordinate())throw new Error("getY called on empty Point");return this.getCoordinate().y},t.prototype.isEmpty=function(){return 0===this._coordinates.size()},t.prototype.init=function(e){null===e&&(e=this.getFactory().getCoordinateSequenceFactory().create([])),al.isTrue(e.size()<=1),this._coordinates=e},t.prototype.isSimple=function(){return!0},t.prototype.interfaces_=function(){return[pc]},t.prototype.getClass=function(){return t},r.serialVersionUID.get=function(){return 0x44077bad161cbc00},Object.defineProperties(t,r),t}(yl),yc=function(){};yc.prototype.interfaces_=function(){return[]},yc.prototype.getClass=function(){return yc};var gc=function(e){function t(t,r,n){if(e.call(this,n),this._shell=null,this._holes=null,null===t&&(t=this.getFactory().createLinearRing()),null===r&&(r=[]),e.hasNullElements(r))throw new xu("holes must not contain null elements");if(t.isEmpty()&&e.hasNonEmptyElements(r))throw new xu("shell is empty but holes are not");this._shell=t,this._holes=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},t.prototype.getSortIndex=function(){return e.SORTINDEX_POLYGON},t.prototype.getCoordinates=function(){if(this.isEmpty())return[];for(var e=new Array(this.getNumPoints()).fill(null),t=-1,r=this._shell.getCoordinates(),n=0;n<r.length;n++)e[++t]=r[n];for(var i=0;i<this._holes.length;i++)for(var o=this._holes[i].getCoordinates(),a=0;a<o.length;a++)e[++t]=o[a];return e},t.prototype.getArea=function(){var e=0;e+=Math.abs(hl.signedArea(this._shell.getCoordinateSequence()));for(var t=0;t<this._holes.length;t++)e-=Math.abs(hl.signedArea(this._holes[t].getCoordinateSequence()));return e},t.prototype.isRectangle=function(){if(0!==this.getNumInteriorRing())return!1;if(null===this._shell)return!1;if(5!==this._shell.getNumPoints())return!1;for(var e=this._shell.getCoordinateSequence(),t=this.getEnvelopeInternal(),r=0;r<5;r++){var n=e.getX(r);if(n!==t.getMinX()&&n!==t.getMaxX())return!1;var i=e.getY(r);if(i!==t.getMinY()&&i!==t.getMaxY())return!1}for(var o=e.getX(0),a=e.getY(0),s=1;s<=4;s++){var u=e.getX(s),l=e.getY(s);if(u!==o==(l!==a))return!1;o=u,a=l}return!0},t.prototype.equalsExact=function(){if(2===arguments.length){var t=arguments[0],r=arguments[1];if(!this.isEquivalentClass(t))return!1;var n=t,i=this._shell,o=n._shell;if(!i.equalsExact(o,r))return!1;if(this._holes.length!==n._holes.length)return!1;for(var a=0;a<this._holes.length;a++)if(!this._holes[a].equalsExact(n._holes[a],r))return!1;return!0}return e.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){if(0===arguments.length){this.normalize(this._shell,!0);for(var e=0;e<this._holes.length;e++)this.normalize(this._holes[e],!1);$l.sort(this._holes)}else if(2===arguments.length){var t=arguments[0],r=arguments[1];if(t.isEmpty())return null;var n=new Array(t.getCoordinates().length-1).fill(null);Zu.arraycopy(t.getCoordinates(),0,n,0,n.length);var i=Nl.minCoordinate(t.getCoordinates());Nl.scroll(n,i),Zu.arraycopy(n,0,t.getCoordinates(),0,n.length),t.getCoordinates()[n.length]=n[0],hl.isCCW(t.getCoordinates())===r&&Nl.reverse(t.getCoordinates())}},t.prototype.getCoordinate=function(){return this._shell.getCoordinate()},t.prototype.getNumInteriorRing=function(){return this._holes.length},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.getLength=function(){var e=0;e+=this._shell.getLength();for(var t=0;t<this._holes.length;t++)e+=this._holes[t].getLength();return e},t.prototype.getNumPoints=function(){for(var e=this._shell.getNumPoints(),t=0;t<this._holes.length;t++)e+=this._holes[t].getNumPoints();return e},t.prototype.reverse=function(){var e=this.copy();e._shell=this._shell.copy().reverse(),e._holes=new Array(this._holes.length).fill(null);for(var t=0;t<this._holes.length;t++)e._holes[t]=this._holes[t].copy().reverse();return e},t.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},t.prototype.compareToSameClass=function(){if(1===arguments.length){var e=arguments[0],t=this._shell,r=e._shell;return t.compareToSameClass(r)}if(2===arguments.length){var n=arguments[0],i=arguments[1],o=n,a=this._shell,s=o._shell,u=a.compareToSameClass(s,i);if(0!==u)return u;for(var l=this.getNumInteriorRing(),c=o.getNumInteriorRing(),f=0;f<l&&f<c;){var h=this.getInteriorRingN(f),p=o.getInteriorRingN(f),d=h.compareToSameClass(p,i);if(0!==d)return d;f++}return f<l?1:f<c?-1:0}},t.prototype.apply=function(e){var t=this;if(ju(e,ml)){this._shell.apply(e);for(var r=0;r<this._holes.length;r++)t._holes[r].apply(e)}else if(ju(e,nc)){if(this._shell.apply(e),!e.isDone())for(var n=0;n<this._holes.length&&(t._holes[n].apply(e),!e.isDone());n++);e.isGeometryChanged()&&this.geometryChanged()}else if(ju(e,rc))e.filter(this);else if(ju(e,dl)){e.filter(this),this._shell.apply(e);for(var i=0;i<this._holes.length;i++)t._holes[i].apply(e)}},t.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();var e=new Array(this._holes.length+1).fill(null);e[0]=this._shell;for(var t=0;t<this._holes.length;t++)e[t+1]=this._holes[t];return e.length<=1?this.getFactory().createLinearRing(e[0].getCoordinateSequence()):this.getFactory().createMultiLineString(e)},t.prototype.clone=function(){var t=e.prototype.clone.call(this);t._shell=this._shell.clone(),t._holes=new Array(this._holes.length).fill(null);for(var r=0;r<this._holes.length;r++)t._holes[r]=this._holes[r].clone();return t},t.prototype.getGeometryType=function(){return"Polygon"},t.prototype.copy=function(){for(var e=this._shell.copy(),r=new Array(this._holes.length).fill(null),n=0;n<r.length;n++)r[n]=this._holes[n].copy();return new t(e,r,this._factory)},t.prototype.getExteriorRing=function(){return this._shell},t.prototype.isEmpty=function(){return this._shell.isEmpty()},t.prototype.getInteriorRingN=function(e){return this._holes[e]},t.prototype.interfaces_=function(){return[yc]},t.prototype.getClass=function(){return t},r.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(t,r),t}(yl),vc=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return yl.SORTINDEX_MULTIPOINT},t.prototype.isValid=function(){return!0},t.prototype.equalsExact=function(){if(2===arguments.length){var t=arguments[0],r=arguments[1];return!!this.isEquivalentClass(t)&&e.prototype.equalsExact.call(this,t,r)}return e.prototype.equalsExact.apply(this,arguments)},t.prototype.getCoordinate=function(){if(1===arguments.length){var t=arguments[0];return this._geometries[t].getCoordinate()}return e.prototype.getCoordinate.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return ec.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.getGeometryType=function(){return"MultiPoint"},t.prototype.copy=function(){for(var e=new Array(this._geometries.length).fill(null),r=0;r<e.length;r++)e[r]=this._geometries[r].copy();return new t(e,this._factory)},t.prototype.interfaces_=function(){return[pc]},t.prototype.getClass=function(){return t},r.serialVersionUID.get=function(){return-0x6fb1ed4162e0fc00},Object.defineProperties(t,r),t}(ic),mc=function(e){function t(t,r){t instanceof Mu&&r instanceof Rc&&(t=r.getCoordinateSequenceFactory().create(t)),e.call(this,t,r),this.validateConstruction()}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return yl.SORTINDEX_LINEARRING},t.prototype.getBoundaryDimension=function(){return ec.FALSE},t.prototype.isClosed=function(){return!!this.isEmpty()||e.prototype.isClosed.call(this)},t.prototype.reverse=function(){var e=this._points.copy();return fc.reverse(e),this.getFactory().createLinearRing(e)},t.prototype.validateConstruction=function(){if(!this.isEmpty()&&!e.prototype.isClosed.call(this))throw new xu("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<t.MINIMUM_VALID_SIZE)throw new xu("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},t.prototype.getGeometryType=function(){return"LinearRing"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},r.MINIMUM_VALID_SIZE.get=function(){return 4},r.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(t,r),t}(hc),_c=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return yl.SORTINDEX_MULTIPOLYGON},t.prototype.equalsExact=function(){if(2===arguments.length){var t=arguments[0],r=arguments[1];return!!this.isEquivalentClass(t)&&e.prototype.equalsExact.call(this,t,r)}return e.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.reverse=function(){for(var e=this._geometries.length,t=new Array(e).fill(null),r=0;r<this._geometries.length;r++)t[r]=this._geometries[r].reverse();return this.getFactory().createMultiPolygon(t)},t.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var e=new Il,t=0;t<this._geometries.length;t++)for(var r=this._geometries[t].getBoundary(),n=0;n<r.getNumGeometries();n++)e.add(r.getGeometryN(n));var i=new Array(e.size()).fill(null);return this.getFactory().createMultiLineString(e.toArray(i))},t.prototype.getGeometryType=function(){return"MultiPolygon"},t.prototype.copy=function(){for(var e=new Array(this._geometries.length).fill(null),r=0;r<e.length;r++)e[r]=this._geometries[r].copy();return new t(e,this._factory)},t.prototype.interfaces_=function(){return[yc]},t.prototype.getClass=function(){return t},r.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(t,r),t}(ic),bc=function(e){this._factory=e||null,this._isUserDataCopied=!1},Sc={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};bc.prototype.setCopyUserData=function(e){this._isUserDataCopied=e},bc.prototype.edit=function(e,t){if(null===e)return null;var r=this.editInternal(e,t);return this._isUserDataCopied&&r.setUserData(e.getUserData()),r},bc.prototype.editInternal=function(e,t){return null===this._factory&&(this._factory=e.getFactory()),e instanceof ic?this.editGeometryCollection(e,t):e instanceof gc?this.editPolygon(e,t):e instanceof dc||e instanceof hc?t.edit(e,this._factory):(al.shouldNeverReachHere("Unsupported Geometry class: "+e.getClass().getName()),null)},bc.prototype.editGeometryCollection=function(e,t){for(var r=t.edit(e,this._factory),n=new Il,i=0;i<r.getNumGeometries();i++){var o=this.edit(r.getGeometryN(i),t);null===o||o.isEmpty()||n.add(o)}return r.getClass()===vc?this._factory.createMultiPoint(n.toArray([])):r.getClass()===oc?this._factory.createMultiLineString(n.toArray([])):r.getClass()===_c?this._factory.createMultiPolygon(n.toArray([])):this._factory.createGeometryCollection(n.toArray([]))},bc.prototype.editPolygon=function(e,t){var r=t.edit(e,this._factory);if(null===r&&(r=this._factory.createPolygon(null)),r.isEmpty())return r;var n=this.edit(r.getExteriorRing(),t);if(null===n||n.isEmpty())return this._factory.createPolygon();for(var i=new Il,o=0;o<r.getNumInteriorRing();o++){var a=this.edit(r.getInteriorRingN(o),t);null===a||a.isEmpty()||i.add(a)}return this._factory.createPolygon(n,i.toArray([]))},bc.prototype.interfaces_=function(){return[]},bc.prototype.getClass=function(){return bc},bc.GeometryEditorOperation=function(){},Sc.NoOpGeometryOperation.get=function(){return xc},Sc.CoordinateOperation.get=function(){return wc},Sc.CoordinateSequenceOperation.get=function(){return Oc},Object.defineProperties(bc,Sc);var xc=function(){};xc.prototype.edit=function(e,t){return e},xc.prototype.interfaces_=function(){return[bc.GeometryEditorOperation]},xc.prototype.getClass=function(){return xc};var wc=function(){};wc.prototype.edit=function(e,t){var r=this.editCoordinates(e.getCoordinates(),e);return null===r?e:e instanceof mc?t.createLinearRing(r):e instanceof hc?t.createLineString(r):e instanceof dc?r.length>0?t.createPoint(r[0]):t.createPoint():e},wc.prototype.interfaces_=function(){return[bc.GeometryEditorOperation]},wc.prototype.getClass=function(){return wc};var Oc=function(){};Oc.prototype.edit=function(e,t){return e instanceof mc?t.createLinearRing(this.edit(e.getCoordinateSequence(),e)):e instanceof hc?t.createLineString(this.edit(e.getCoordinateSequence(),e)):e instanceof dc?t.createPoint(this.edit(e.getCoordinateSequence(),e)):e},Oc.prototype.interfaces_=function(){return[bc.GeometryEditorOperation]},Oc.prototype.getClass=function(){return Oc};var Pc=function(){var e=this;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 r=0;r<t;r++)e._coordinates[r]=new Mu}else if(ju(arguments[0],zu)){var n=arguments[0];if(null===n)return this._coordinates=new Array(0).fill(null),null;this._dimension=n.getDimension(),this._coordinates=new Array(n.size()).fill(null);for(var i=0;i<this._coordinates.length;i++)e._coordinates[i]=n.getCoordinateCopy(i)}}else if(2===arguments.length)if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var o=arguments[0],a=arguments[1];this._coordinates=o,this._dimension=a,null===o&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var s=arguments[0],u=arguments[1];this._coordinates=new Array(s).fill(null),this._dimension=u;for(var l=0;l<s;l++)e._coordinates[l]=new Mu}},Ec={serialVersionUID:{configurable:!0}};Pc.prototype.setOrdinate=function(e,t,r){switch(t){case zu.X:this._coordinates[e].x=r;break;case zu.Y:this._coordinates[e].y=r;break;case zu.Z:this._coordinates[e].z=r;break;default:throw new xu("invalid ordinateIndex")}},Pc.prototype.size=function(){return this._coordinates.length},Pc.prototype.getOrdinate=function(e,t){switch(t){case zu.X:return this._coordinates[e].x;case zu.Y:return this._coordinates[e].y;case zu.Z:return this._coordinates[e].z}return wu.NaN},Pc.prototype.getCoordinate=function(){if(1===arguments.length){var e=arguments[0];return this._coordinates[e]}if(2===arguments.length){var t=arguments[0],r=arguments[1];r.x=this._coordinates[t].x,r.y=this._coordinates[t].y,r.z=this._coordinates[t].z}},Pc.prototype.getCoordinateCopy=function(e){return new Mu(this._coordinates[e])},Pc.prototype.getDimension=function(){return this._dimension},Pc.prototype.getX=function(e){return this._coordinates[e].x},Pc.prototype.clone=function(){for(var e=new Array(this.size()).fill(null),t=0;t<this._coordinates.length;t++)e[t]=this._coordinates[t].clone();return new Pc(e,this._dimension)},Pc.prototype.expandEnvelope=function(e){for(var t=0;t<this._coordinates.length;t++)e.expandToInclude(this._coordinates[t]);return e},Pc.prototype.copy=function(){for(var e=new Array(this.size()).fill(null),t=0;t<this._coordinates.length;t++)e[t]=this._coordinates[t].copy();return new Pc(e,this._dimension)},Pc.prototype.toString=function(){if(this._coordinates.length>0){var e=new Au(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var t=1;t<this._coordinates.length;t++)e.append(", "),e.append(this._coordinates[t]);return e.append(")"),e.toString()}return"()"},Pc.prototype.getY=function(e){return this._coordinates[e].y},Pc.prototype.toCoordinateArray=function(){return this._coordinates},Pc.prototype.interfaces_=function(){return[zu,Tu]},Pc.prototype.getClass=function(){return Pc},Ec.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(Pc,Ec);var kc=function(){},Tc={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};kc.prototype.readResolve=function(){return kc.instance()},kc.prototype.create=function(){if(1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];return new Pc(e)}if(ju(arguments[0],zu)){var t=arguments[0];return new Pc(t)}}else if(2===arguments.length){var r=arguments[0],n=arguments[1];return n>3&&(n=3),n<2?new Pc(r):new Pc(r,n)}},kc.prototype.interfaces_=function(){return[Cu,Tu]},kc.prototype.getClass=function(){return kc},kc.instance=function(){return kc.instanceObject},Tc.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},Tc.instanceObject.get=function(){return new kc},Object.defineProperties(kc,Tc);var Mc=function(e){function t(){e.call(this),this.map_=new Map}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return this.map_.get(e)||null},t.prototype.put=function(e,t){return this.map_.set(e,t),t},t.prototype.values=function(){for(var e=new Il,t=this.map_.values(),r=t.next();!r.done;)e.add(r.value),r=t.next();return e},t.prototype.entrySet=function(){var e=new Bl;return this.map_.entries().forEach(function(t){return e.add(t)}),e},t.prototype.size=function(){return this.map_.size()},t}(Vl),Ic=function e(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=e.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof Cc){var t=arguments[0];this._modelType=t,t===e.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var r=arguments[0];this._modelType=e.FIXED,this.setScale(r)}else if(arguments[0]instanceof e){var n=arguments[0];this._modelType=n._modelType,this._scale=n._scale}},Lc={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Ic.prototype.equals=function(e){if(!(e instanceof Ic))return!1;var t=e;return this._modelType===t._modelType&&this._scale===t._scale},Ic.prototype.compareTo=function(e){var t=e,r=this.getMaximumSignificantDigits(),n=t.getMaximumSignificantDigits();return new Du(r).compareTo(new Du(n))},Ic.prototype.getScale=function(){return this._scale},Ic.prototype.isFloating=function(){return this._modelType===Ic.FLOATING||this._modelType===Ic.FLOATING_SINGLE},Ic.prototype.getType=function(){return this._modelType},Ic.prototype.toString=function(){var e="UNKNOWN";return this._modelType===Ic.FLOATING?e="Floating":this._modelType===Ic.FLOATING_SINGLE?e="Floating-Single":this._modelType===Ic.FIXED&&(e="Fixed (Scale="+this.getScale()+")"),e},Ic.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var e=arguments[0];return wu.isNaN(e)?e:this._modelType===Ic.FLOATING_SINGLE?e:this._modelType===Ic.FIXED?Math.round(e*this._scale)/this._scale:e}if(arguments[0]instanceof Mu){var t=arguments[0];if(this._modelType===Ic.FLOATING)return null;t.x=this.makePrecise(t.x),t.y=this.makePrecise(t.y)}},Ic.prototype.getMaximumSignificantDigits=function(){var e=16;return this._modelType===Ic.FLOATING?e=16:this._modelType===Ic.FLOATING_SINGLE?e=6:this._modelType===Ic.FIXED&&(e=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),e},Ic.prototype.setScale=function(e){this._scale=Math.abs(e)},Ic.prototype.interfaces_=function(){return[Tu,Pu]},Ic.prototype.getClass=function(){return Ic},Ic.mostPrecise=function(e,t){return e.compareTo(t)>=0?e:t},Lc.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},Lc.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(Ic,Lc);var Cc=function e(t){this._name=t||null,e.nameToTypeMap.put(t,this)},Nc={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};Cc.prototype.readResolve=function(){return Cc.nameToTypeMap.get(this._name)},Cc.prototype.toString=function(){return this._name},Cc.prototype.interfaces_=function(){return[Tu]},Cc.prototype.getClass=function(){return Cc},Nc.serialVersionUID.get=function(){return-552860263173159e4},Nc.nameToTypeMap.get=function(){return new Mc},Object.defineProperties(Cc,Nc),Ic.Type=Cc,Ic.FIXED=new Cc("FIXED"),Ic.FLOATING=new Cc("FLOATING"),Ic.FLOATING_SINGLE=new Cc("FLOATING SINGLE");var Rc=function e(){this._precisionModel=new Ic,this._SRID=0,this._coordinateSequenceFactory=e.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?ju(arguments[0],Cu)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Ic&&(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]))},jc={serialVersionUID:{configurable:!0}};Rc.prototype.toGeometry=function(e){return e.isNull()?this.createPoint(null):e.getMinX()===e.getMaxX()&&e.getMinY()===e.getMaxY()?this.createPoint(new Mu(e.getMinX(),e.getMinY())):e.getMinX()===e.getMaxX()||e.getMinY()===e.getMaxY()?this.createLineString([new Mu(e.getMinX(),e.getMinY()),new Mu(e.getMaxX(),e.getMaxY())]):this.createPolygon(this.createLinearRing([new Mu(e.getMinX(),e.getMinY()),new Mu(e.getMinX(),e.getMaxY()),new Mu(e.getMaxX(),e.getMaxY()),new Mu(e.getMaxX(),e.getMinY()),new Mu(e.getMinX(),e.getMinY())]),null)},Rc.prototype.createLineString=function(e){return e?e instanceof Array?new hc(this.getCoordinateSequenceFactory().create(e),this):ju(e,zu)?new hc(e,this):void 0:new hc(this.getCoordinateSequenceFactory().create([]),this)},Rc.prototype.createMultiLineString=function(){if(0===arguments.length)return new oc(null,this);if(1===arguments.length){var e=arguments[0];return new oc(e,this)}},Rc.prototype.buildGeometry=function(e){for(var t=null,r=!1,n=!1,i=e.iterator();i.hasNext();){var o=i.next(),a=o.getClass();null===t&&(t=a),a!==t&&(r=!0),o.isGeometryCollectionOrDerived()&&(n=!0)}if(null===t)return this.createGeometryCollection();if(r||n)return this.createGeometryCollection(Rc.toGeometryArray(e));var s=e.iterator().next();if(e.size()>1){if(s instanceof gc)return this.createMultiPolygon(Rc.toPolygonArray(e));if(s instanceof hc)return this.createMultiLineString(Rc.toLineStringArray(e));if(s instanceof dc)return this.createMultiPoint(Rc.toPointArray(e));al.shouldNeverReachHere("Unhandled class: "+s.getClass().getName())}return s},Rc.prototype.createMultiPointFromCoords=function(e){return this.createMultiPoint(null!==e?this.getCoordinateSequenceFactory().create(e):null)},Rc.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Mu){var e=arguments[0];return this.createPoint(null!==e?this.getCoordinateSequenceFactory().create([e]):null)}if(ju(arguments[0],zu)){var t=arguments[0];return new dc(t,this)}}},Rc.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},Rc.prototype.createPolygon=function(){if(0===arguments.length)return new gc(null,null,this);if(1===arguments.length){if(ju(arguments[0],zu)){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof Array){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof mc){var r=arguments[0];return this.createPolygon(r,null)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return new gc(n,i,this)}},Rc.prototype.getSRID=function(){return this._SRID},Rc.prototype.createGeometryCollection=function(){if(0===arguments.length)return new ic(null,this);if(1===arguments.length){var e=arguments[0];return new ic(e,this)}},Rc.prototype.createGeometry=function(e){return new bc(this).edit(e,{edit:function(){if(2===arguments.length){var e=arguments[0];return this._coordinateSequenceFactory.create(e)}}})},Rc.prototype.getPrecisionModel=function(){return this._precisionModel},Rc.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];return this.createLinearRing(null!==e?this.getCoordinateSequenceFactory().create(e):null)}if(ju(arguments[0],zu)){var t=arguments[0];return new mc(t,this)}}},Rc.prototype.createMultiPolygon=function(){if(0===arguments.length)return new _c(null,this);if(1===arguments.length){var e=arguments[0];return new _c(e,this)}},Rc.prototype.createMultiPoint=function(){if(0===arguments.length)return new vc(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];return new vc(e,this)}if(arguments[0]instanceof Array){var t=arguments[0];return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(ju(arguments[0],zu)){var r=arguments[0];if(null===r)return this.createMultiPoint(new Array(0).fill(null));for(var n=new Array(r.size()).fill(null),i=0;i<r.size();i++){var o=this.getCoordinateSequenceFactory().create(1,r.getDimension());fc.copy(r,i,o,0,1),n[i]=this.createPoint(o)}return this.createMultiPoint(n)}}},Rc.prototype.interfaces_=function(){return[Tu]},Rc.prototype.getClass=function(){return Rc},Rc.toMultiPolygonArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},Rc.toGeometryArray=function(e){if(null===e)return null;var t=new Array(e.size()).fill(null);return e.toArray(t)},Rc.getDefaultCoordinateSequenceFactory=function(){return kc.instance()},Rc.toMultiLineStringArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},Rc.toLineStringArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},Rc.toMultiPointArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},Rc.toLinearRingArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},Rc.toPointArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},Rc.toPolygonArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},Rc.createPointFromInternalCoord=function(e,t){return t.getPrecisionModel().makePrecise(e),t.getFactory().createPoint(e)},jc.serialVersionUID.get=function(){return-0x5ea75f2051eeb400},Object.defineProperties(Rc,jc);var Gc=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],Vc=function(e){this.geometryFactory=e||new Rc};Vc.prototype.read=function(e){var t,r=(t="string"==typeof e?JSON.parse(e):e).type;if(!Ac[r])throw new Error("Unknown GeoJSON type: "+t.type);return-1!==Gc.indexOf(r)?Ac[r].apply(this,[t.coordinates]):"GeometryCollection"===r?Ac[r].apply(this,[t.geometries]):Ac[r].apply(this,[t])},Vc.prototype.write=function(e){var t=e.getGeometryType();if(!Dc[t])throw new Error("Geometry is not supported");return Dc[t].apply(this,[e])};var Ac={Feature:function(e){var t={};for(var r in e)t[r]=e[r];if(e.geometry){var n=e.geometry.type;if(!Ac[n])throw new Error("Unknown GeoJSON type: "+e.type);t.geometry=this.read(e.geometry)}return e.bbox&&(t.bbox=Ac.bbox.apply(this,[e.bbox])),t},FeatureCollection:function(e){var t={};if(e.features){t.features=[];for(var r=0;r<e.features.length;++r)t.features.push(this.read(e.features[r]))}return e.bbox&&(t.bbox=this.parse.bbox.apply(this,[e.bbox])),t},coordinates:function(e){for(var t=[],r=0;r<e.length;++r){var n=e[r];t.push(new Mu(n[0],n[1]))}return t},bbox:function(e){return this.geometryFactory.createLinearRing([new Mu(e[0],e[1]),new Mu(e[2],e[1]),new Mu(e[2],e[3]),new Mu(e[0],e[3]),new Mu(e[0],e[1])])},Point:function(e){var t=new Mu(e[0],e[1]);return this.geometryFactory.createPoint(t)},MultiPoint:function(e){for(var t=[],r=0;r<e.length;++r)t.push(Ac.Point.apply(this,[e[r]]));return this.geometryFactory.createMultiPoint(t)},LineString:function(e){var t=Ac.coordinates.apply(this,[e]);return this.geometryFactory.createLineString(t)},MultiLineString:function(e){for(var t=[],r=0;r<e.length;++r)t.push(Ac.LineString.apply(this,[e[r]]));return this.geometryFactory.createMultiLineString(t)},Polygon:function(e){for(var t=Ac.coordinates.apply(this,[e[0]]),r=this.geometryFactory.createLinearRing(t),n=[],i=1;i<e.length;++i){var o=e[i],a=Ac.coordinates.apply(this,[o]),s=this.geometryFactory.createLinearRing(a);n.push(s)}return this.geometryFactory.createPolygon(r,n)},MultiPolygon:function(e){for(var t=[],r=0;r<e.length;++r){var n=e[r];t.push(Ac.Polygon.apply(this,[n]))}return this.geometryFactory.createMultiPolygon(t)},GeometryCollection:function(e){for(var t=[],r=0;r<e.length;++r){var n=e[r];t.push(this.read(n))}return this.geometryFactory.createGeometryCollection(t)}},Dc={coordinate:function(e){return[e.x,e.y]},Point:function(e){return{type:"Point",coordinates:Dc.coordinate.apply(this,[e.getCoordinate()])}},MultiPoint:function(e){for(var t=[],r=0;r<e._geometries.length;++r){var n=e._geometries[r],i=Dc.Point.apply(this,[n]);t.push(i.coordinates)}return{type:"MultiPoint",coordinates:t}},LineString:function(e){for(var t=[],r=e.getCoordinates(),n=0;n<r.length;++n){var i=r[n];t.push(Dc.coordinate.apply(this,[i]))}return{type:"LineString",coordinates:t}},MultiLineString:function(e){for(var t=[],r=0;r<e._geometries.length;++r){var n=e._geometries[r],i=Dc.LineString.apply(this,[n]);t.push(i.coordinates)}return{type:"MultiLineString",coordinates:t}},Polygon:function(e){var t=[],r=Dc.LineString.apply(this,[e._shell]);t.push(r.coordinates);for(var n=0;n<e._holes.length;++n){var i=e._holes[n],o=Dc.LineString.apply(this,[i]);t.push(o.coordinates)}return{type:"Polygon",coordinates:t}},MultiPolygon:function(e){for(var t=[],r=0;r<e._geometries.length;++r){var n=e._geometries[r],i=Dc.Polygon.apply(this,[n]);t.push(i.coordinates)}return{type:"MultiPolygon",coordinates:t}},GeometryCollection:function(e){for(var t=[],r=0;r<e._geometries.length;++r){var n=e._geometries[r],i=n.getGeometryType();t.push(Dc[i].apply(this,[n]))}return{type:"GeometryCollection",geometries:t}}},Fc=function(e){this.geometryFactory=e||new Rc,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new Vc(this.geometryFactory)};Fc.prototype.read=function(e){var t=this.parser.read(e);return this.precisionModel.getType()===Ic.FIXED&&this.reducePrecision(t),t},Fc.prototype.reducePrecision=function(e){var t,r;if(e.coordinate)this.precisionModel.makePrecise(e.coordinate);else if(e.points)for(t=0,r=e.points.length;t<r;t++)this.precisionModel.makePrecise(e.points[t]);else if(e.geometries)for(t=0,r=e.geometries.length;t<r;t++)this.reducePrecision(e.geometries[t])};var Bc=function(){this.parser=new Vc(this.geometryFactory)};Bc.prototype.write=function(e){return this.parser.write(e)};var qc=function(){},Jc={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};function Uc(e){this.message=e||""}function zc(){this.array_=[]}qc.prototype.interfaces_=function(){return[]},qc.prototype.getClass=function(){return qc},qc.opposite=function(e){return e===qc.LEFT?qc.RIGHT:e===qc.RIGHT?qc.LEFT:e},Jc.ON.get=function(){return 0},Jc.LEFT.get=function(){return 1},Jc.RIGHT.get=function(){return 2},Object.defineProperties(qc,Jc),Uc.prototype=new Error,Uc.prototype.name="EmptyStackException",zc.prototype=new Tl,zc.prototype.add=function(e){return this.array_.push(e),!0},zc.prototype.get=function(e){if(e<0||e>=this.size())throw new Error;return this.array_[e]},zc.prototype.push=function(e){return this.array_.push(e),e},zc.prototype.pop=function(e){if(0===this.array_.length)throw new Uc;return this.array_.pop()},zc.prototype.peek=function(){if(0===this.array_.length)throw new Uc;return this.array_[this.array_.length-1]},zc.prototype.empty=function(){return 0===this.array_.length},zc.prototype.isEmpty=function(){return this.empty()},zc.prototype.search=function(e){return this.array_.indexOf(e)},zc.prototype.size=function(){return this.array_.length},zc.prototype.toArray=function(){for(var e=[],t=0,r=this.array_.length;t<r;t++)e.push(this.array_[t]);return e};var Wc=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};Wc.prototype.getCoordinate=function(){return this._minCoord},Wc.prototype.getRightmostSide=function(e,t){var r=this.getRightmostSideOfSegment(e,t);return r<0&&(r=this.getRightmostSideOfSegment(e,t-1)),r<0&&(this._minCoord=null,this.checkForRightmostCoordinate(e)),r},Wc.prototype.findRightmostEdgeAtVertex=function(){var e=this._minDe.getEdge().getCoordinates();al.isTrue(this._minIndex>0&&this._minIndex<e.length,"rightmost point expected to be interior vertex of edge");var t=e[this._minIndex-1],r=e[this._minIndex+1],n=hl.computeOrientation(this._minCoord,r,t),i=!1;(t.y<this._minCoord.y&&r.y<this._minCoord.y&&n===hl.COUNTERCLOCKWISE||t.y>this._minCoord.y&&r.y>this._minCoord.y&&n===hl.CLOCKWISE)&&(i=!0),i&&(this._minIndex=this._minIndex-1)},Wc.prototype.getRightmostSideOfSegment=function(e,t){var r=e.getEdge().getCoordinates();if(t<0||t+1>=r.length)return-1;if(r[t].y===r[t+1].y)return-1;var n=qc.LEFT;return r[t].y<r[t+1].y&&(n=qc.RIGHT),n},Wc.prototype.getEdge=function(){return this._orientedDe},Wc.prototype.checkForRightmostCoordinate=function(e){for(var t=this,r=e.getEdge().getCoordinates(),n=0;n<r.length-1;n++)(null===t._minCoord||r[n].x>t._minCoord.x)&&(t._minDe=e,t._minIndex=n,t._minCoord=r[n])},Wc.prototype.findRightmostEdgeAtNode=function(){var e=this._minDe.getNode().getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Wc.prototype.findEdge=function(e){for(var t=e.iterator();t.hasNext();){var r=t.next();r.isForward()&&this.checkForRightmostCoordinate(r)}al.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)===qc.LEFT&&(this._orientedDe=this._minDe.getSym())},Wc.prototype.interfaces_=function(){return[]},Wc.prototype.getClass=function(){return Wc};var Hc=function(e){function t(r,n){e.call(this,t.msgWithCoord(r,n)),this.pt=n?new Mu(n):null,this.name="TopologyException"}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getCoordinate=function(){return this.pt},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.msgWithCoord=function(e,t){return t?e:e+" [ "+t+" ]"},t}(il),Xc=function(){this.array_=[]};Xc.prototype.addLast=function(e){this.array_.push(e)},Xc.prototype.removeFirst=function(){return this.array_.shift()},Xc.prototype.isEmpty=function(){return 0===this.array_.length};var Zc=function(){this._finder=null,this._dirEdgeList=new Il,this._nodes=new Il,this._rightMostCoord=null,this._env=null,this._finder=new Wc};Zc.prototype.clearVisitedEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();)e.next().setVisited(!1)},Zc.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Zc.prototype.computeNodeDepth=function(e){for(var t=null,r=e.getEdges().iterator();r.hasNext();){var n=r.next();if(n.isVisited()||n.getSym().isVisited()){t=n;break}}if(null===t)throw new Hc("unable to find edge to compute depths at "+e.getCoordinate());e.getEdges().computeDepths(t);for(var i=e.getEdges().iterator();i.hasNext();){var o=i.next();o.setVisited(!0),this.copySymDepths(o)}},Zc.prototype.computeDepth=function(e){this.clearVisitedEdges();var t=this._finder.getEdge();t.setEdgeDepths(qc.RIGHT,e),this.copySymDepths(t),this.computeDepths(t)},Zc.prototype.create=function(e){this.addReachable(e),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Zc.prototype.findResultEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();){var t=e.next();t.getDepth(qc.RIGHT)>=1&&t.getDepth(qc.LEFT)<=0&&!t.isInteriorAreaEdge()&&t.setInResult(!0)}},Zc.prototype.computeDepths=function(e){var t=new Bl,r=new Xc,n=e.getNode();for(r.addLast(n),t.add(n),e.setVisited(!0);!r.isEmpty();){var i=r.removeFirst();t.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();t.contains(s)||(r.addLast(s),t.add(s))}}}},Zc.prototype.compareTo=function(e){var t=e;return this._rightMostCoord.x<t._rightMostCoord.x?-1:this._rightMostCoord.x>t._rightMostCoord.x?1:0},Zc.prototype.getEnvelope=function(){if(null===this._env){for(var e=new Ku,t=this._dirEdgeList.iterator();t.hasNext();)for(var r=t.next().getEdge().getCoordinates(),n=0;n<r.length-1;n++)e.expandToInclude(r[n]);this._env=e}return this._env},Zc.prototype.addReachable=function(e){var t=new zc;for(t.add(e);!t.empty();){var r=t.pop();this.add(r,t)}},Zc.prototype.copySymDepths=function(e){var t=e.getSym();t.setDepth(qc.LEFT,e.getDepth(qc.RIGHT)),t.setDepth(qc.RIGHT,e.getDepth(qc.LEFT))},Zc.prototype.add=function(e,t){e.setVisited(!0),this._nodes.add(e);for(var r=e.getEdges().iterator();r.hasNext();){var n=r.next();this._dirEdgeList.add(n);var i=n.getSym().getNode();i.isVisited()||t.push(i)}},Zc.prototype.getNodes=function(){return this._nodes},Zc.prototype.getDirectedEdges=function(){return this._dirEdgeList},Zc.prototype.interfaces_=function(){return[Pu]},Zc.prototype.getClass=function(){return Zc};var Yc=function e(){if(this.location=null,1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];this.init(t.length)}else if(Number.isInteger(arguments[0])){var r=arguments[0];this.init(1),this.location[qc.ON]=r}else if(arguments[0]instanceof e){var n=arguments[0];if(this.init(n.location.length),null!==n)for(var i=0;i<this.location.length;i++)this.location[i]=n.location[i]}}else if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2];this.init(3),this.location[qc.ON]=o,this.location[qc.LEFT]=a,this.location[qc.RIGHT]=s}};Yc.prototype.setAllLocations=function(e){for(var t=0;t<this.location.length;t++)this.location[t]=e},Yc.prototype.isNull=function(){for(var e=0;e<this.location.length;e++)if(this.location[e]!==Nu.NONE)return!1;return!0},Yc.prototype.setAllLocationsIfNull=function(e){for(var t=0;t<this.location.length;t++)this.location[t]===Nu.NONE&&(this.location[t]=e)},Yc.prototype.isLine=function(){return 1===this.location.length},Yc.prototype.merge=function(e){if(e.location.length>this.location.length){var t=new Array(3).fill(null);t[qc.ON]=this.location[qc.ON],t[qc.LEFT]=Nu.NONE,t[qc.RIGHT]=Nu.NONE,this.location=t}for(var r=0;r<this.location.length;r++)this.location[r]===Nu.NONE&&r<e.location.length&&(this.location[r]=e.location[r])},Yc.prototype.getLocations=function(){return this.location},Yc.prototype.flip=function(){if(this.location.length<=1)return null;var e=this.location[qc.LEFT];this.location[qc.LEFT]=this.location[qc.RIGHT],this.location[qc.RIGHT]=e},Yc.prototype.toString=function(){var e=new Au;return this.location.length>1&&e.append(Nu.toLocationSymbol(this.location[qc.LEFT])),e.append(Nu.toLocationSymbol(this.location[qc.ON])),this.location.length>1&&e.append(Nu.toLocationSymbol(this.location[qc.RIGHT])),e.toString()},Yc.prototype.setLocations=function(e,t,r){this.location[qc.ON]=e,this.location[qc.LEFT]=t,this.location[qc.RIGHT]=r},Yc.prototype.get=function(e){return e<this.location.length?this.location[e]:Nu.NONE},Yc.prototype.isArea=function(){return this.location.length>1},Yc.prototype.isAnyNull=function(){for(var e=0;e<this.location.length;e++)if(this.location[e]===Nu.NONE)return!0;return!1},Yc.prototype.setLocation=function(){if(1===arguments.length){var e=arguments[0];this.setLocation(qc.ON,e)}else if(2===arguments.length){var t=arguments[0],r=arguments[1];this.location[t]=r}},Yc.prototype.init=function(e){this.location=new Array(e).fill(null),this.setAllLocations(Nu.NONE)},Yc.prototype.isEqualOnSide=function(e,t){return this.location[t]===e.location[t]},Yc.prototype.allPositionsEqual=function(e){for(var t=0;t<this.location.length;t++)if(this.location[t]!==e)return!1;return!0},Yc.prototype.interfaces_=function(){return[]},Yc.prototype.getClass=function(){return Yc};var Kc=function e(){if(this.elt=new Array(2).fill(null),1===arguments.length){if(Number.isInteger(arguments[0])){var t=arguments[0];this.elt[0]=new Yc(t),this.elt[1]=new Yc(t)}else if(arguments[0]instanceof e){var r=arguments[0];this.elt[0]=new Yc(r.elt[0]),this.elt[1]=new Yc(r.elt[1])}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.elt[0]=new Yc(Nu.NONE),this.elt[1]=new Yc(Nu.NONE),this.elt[n].setLocation(i)}else if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2];this.elt[0]=new Yc(o,a,s),this.elt[1]=new Yc(o,a,s)}else if(4===arguments.length){var u=arguments[0],l=arguments[1],c=arguments[2],f=arguments[3];this.elt[0]=new Yc(Nu.NONE,Nu.NONE,Nu.NONE),this.elt[1]=new Yc(Nu.NONE,Nu.NONE,Nu.NONE),this.elt[u].setLocations(l,c,f)}};Kc.prototype.getGeometryCount=function(){var e=0;return this.elt[0].isNull()||e++,this.elt[1].isNull()||e++,e},Kc.prototype.setAllLocations=function(e,t){this.elt[e].setAllLocations(t)},Kc.prototype.isNull=function(e){return this.elt[e].isNull()},Kc.prototype.setAllLocationsIfNull=function(){if(1===arguments.length){var e=arguments[0];this.setAllLocationsIfNull(0,e),this.setAllLocationsIfNull(1,e)}else if(2===arguments.length){var t=arguments[0],r=arguments[1];this.elt[t].setAllLocationsIfNull(r)}},Kc.prototype.isLine=function(e){return this.elt[e].isLine()},Kc.prototype.merge=function(e){for(var t=this,r=0;r<2;r++)null===t.elt[r]&&null!==e.elt[r]?t.elt[r]=new Yc(e.elt[r]):t.elt[r].merge(e.elt[r])},Kc.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Kc.prototype.getLocation=function(){if(1===arguments.length){var e=arguments[0];return this.elt[e].get(qc.ON)}if(2===arguments.length){var t=arguments[0],r=arguments[1];return this.elt[t].get(r)}},Kc.prototype.toString=function(){var e=new Au;return null!==this.elt[0]&&(e.append("A:"),e.append(this.elt[0].toString())),null!==this.elt[1]&&(e.append(" B:"),e.append(this.elt[1].toString())),e.toString()},Kc.prototype.isArea=function(){if(0===arguments.length)return this.elt[0].isArea()||this.elt[1].isArea();if(1===arguments.length){var e=arguments[0];return this.elt[e].isArea()}},Kc.prototype.isAnyNull=function(e){return this.elt[e].isAnyNull()},Kc.prototype.setLocation=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];this.elt[e].setLocation(qc.ON,t)}else if(3===arguments.length){var r=arguments[0],n=arguments[1],i=arguments[2];this.elt[r].setLocation(n,i)}},Kc.prototype.isEqualOnSide=function(e,t){return this.elt[0].isEqualOnSide(e.elt[0],t)&&this.elt[1].isEqualOnSide(e.elt[1],t)},Kc.prototype.allPositionsEqual=function(e,t){return this.elt[e].allPositionsEqual(t)},Kc.prototype.toLine=function(e){this.elt[e].isArea()&&(this.elt[e]=new Yc(this.elt[e].location[0]))},Kc.prototype.interfaces_=function(){return[]},Kc.prototype.getClass=function(){return Kc},Kc.toLineLabel=function(e){for(var t=new Kc(Nu.NONE),r=0;r<2;r++)t.setLocation(r,e.getLocation(r));return t};var Qc=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new Il,this._pts=new Il,this._label=new Kc(Nu.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new Il,this._geometryFactory=null;var e=arguments[0],t=arguments[1];this._geometryFactory=t,this.computePoints(e),this.computeRing()};Qc.prototype.computeRing=function(){if(null!==this._ring)return null;for(var e=new Array(this._pts.size()).fill(null),t=0;t<this._pts.size();t++)e[t]=this._pts.get(t);this._ring=this._geometryFactory.createLinearRing(e),this._isHole=hl.isCCW(this._ring.getCoordinates())},Qc.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},Qc.prototype.computePoints=function(e){var t=this;this._startDe=e;var r=e,n=!0;do{if(null===r)throw new Hc("Found null DirectedEdge");if(r.getEdgeRing()===t)throw new Hc("Directed Edge visited twice during ring-building at "+r.getCoordinate());t._edges.add(r);var i=r.getLabel();al.isTrue(i.isArea()),t.mergeLabel(i),t.addPoints(r.getEdge(),r.isForward(),n),n=!1,t.setEdgeRing(r,t),r=t.getNext(r)}while(r!==this._startDe)},Qc.prototype.getLinearRing=function(){return this._ring},Qc.prototype.getCoordinate=function(e){return this._pts.get(e)},Qc.prototype.computeMaxNodeDegree=function(){var e=this;this._maxNodeDegree=0;var t=this._startDe;do{var r=t.getNode().getEdges().getOutgoingDegree(e);r>e._maxNodeDegree&&(e._maxNodeDegree=r),t=e.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},Qc.prototype.addPoints=function(e,t,r){var n=e.getCoordinates();if(t){var i=1;r&&(i=0);for(var o=i;o<n.length;o++)this._pts.add(n[o])}else{var a=n.length-2;r&&(a=n.length-1);for(var s=a;s>=0;s--)this._pts.add(n[s])}},Qc.prototype.isHole=function(){return this._isHole},Qc.prototype.setInResult=function(){var e=this._startDe;do{e.getEdge().setInResult(!0),e=e.getNext()}while(e!==this._startDe)},Qc.prototype.containsPoint=function(e){var t=this.getLinearRing();if(!t.getEnvelopeInternal().contains(e))return!1;if(!hl.isPointInRing(e,t.getCoordinates()))return!1;for(var r=this._holes.iterator();r.hasNext();)if(r.next().containsPoint(e))return!1;return!0},Qc.prototype.addHole=function(e){this._holes.add(e)},Qc.prototype.isShell=function(){return null===this._shell},Qc.prototype.getLabel=function(){return this._label},Qc.prototype.getEdges=function(){return this._edges},Qc.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Qc.prototype.getShell=function(){return this._shell},Qc.prototype.mergeLabel=function(){if(1===arguments.length){var e=arguments[0];this.mergeLabel(e,0),this.mergeLabel(e,1)}else if(2===arguments.length){var t=arguments[0],r=arguments[1],n=t.getLocation(r,qc.RIGHT);if(n===Nu.NONE)return null;if(this._label.getLocation(r)===Nu.NONE)return this._label.setLocation(r,n),null}},Qc.prototype.setShell=function(e){this._shell=e,null!==e&&e.addHole(this)},Qc.prototype.toPolygon=function(e){for(var t=new Array(this._holes.size()).fill(null),r=0;r<this._holes.size();r++)t[r]=this._holes.get(r).getLinearRing();return e.createPolygon(this.getLinearRing(),t)},Qc.prototype.interfaces_=function(){return[]},Qc.prototype.getClass=function(){return Qc};var $c=function(e){function t(){var t=arguments[0],r=arguments[1];e.call(this,t,r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setEdgeRing=function(e,t){e.setMinEdgeRing(t)},t.prototype.getNext=function(e){return e.getNextMin()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Qc),ef=function(e){function t(){var t=arguments[0],r=arguments[1];e.call(this,t,r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.buildMinimalRings=function(){var e=new Il,t=this._startDe;do{if(null===t.getMinEdgeRing()){var r=new $c(t,this._geometryFactory);e.add(r)}t=t.getNext()}while(t!==this._startDe);return e},t.prototype.setEdgeRing=function(e,t){e.setEdgeRing(t)},t.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var e=this._startDe;do{e.getNode().getEdges().linkMinimalDirectedEdges(this),e=e.getNext()}while(e!==this._startDe)},t.prototype.getNext=function(e){return e.getNext()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Qc),tf=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this._label=e}};tf.prototype.setVisited=function(e){this._isVisited=e},tf.prototype.setInResult=function(e){this._isInResult=e},tf.prototype.isCovered=function(){return this._isCovered},tf.prototype.isCoveredSet=function(){return this._isCoveredSet},tf.prototype.setLabel=function(e){this._label=e},tf.prototype.getLabel=function(){return this._label},tf.prototype.setCovered=function(e){this._isCovered=e,this._isCoveredSet=!0},tf.prototype.updateIM=function(e){al.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(e)},tf.prototype.isInResult=function(){return this._isInResult},tf.prototype.isVisited=function(){return this._isVisited},tf.prototype.interfaces_=function(){return[]},tf.prototype.getClass=function(){return tf};var rf=function(e){function t(){e.call(this),this._coord=null,this._edges=null;var t=arguments[0],r=arguments[1];this._coord=t,this._edges=r,this._label=new Kc(0,Nu.NONE)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.isIncidentEdgeInResult=function(){for(var e=this.getEdges().getEdges().iterator();e.hasNext();)if(e.next().getEdge().isInResult())return!0;return!1},t.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},t.prototype.getCoordinate=function(){return this._coord},t.prototype.print=function(e){e.println("node "+this._coord+" lbl: "+this._label)},t.prototype.computeIM=function(e){},t.prototype.computeMergedLocation=function(e,t){var r=Nu.NONE;if(r=this._label.getLocation(t),!e.isNull(t)){var n=e.getLocation(t);r!==Nu.BOUNDARY&&(r=n)}return r},t.prototype.setLabel=function(){if(2!==arguments.length)return e.prototype.setLabel.apply(this,arguments);var t=arguments[0],r=arguments[1];null===this._label?this._label=new Kc(t,r):this._label.setLocation(t,r)},t.prototype.getEdges=function(){return this._edges},t.prototype.mergeLabel=function(){var e=this;if(arguments[0]instanceof t){var r=arguments[0];this.mergeLabel(r._label)}else if(arguments[0]instanceof Kc)for(var n=arguments[0],i=0;i<2;i++){var o=e.computeMergedLocation(n,i),a=e._label.getLocation(i);a===Nu.NONE&&e._label.setLocation(i,o)}},t.prototype.add=function(e){this._edges.insert(e),e.setNode(this)},t.prototype.setLabelBoundary=function(e){if(null===this._label)return null;var t=Nu.NONE;null!==this._label&&(t=this._label.getLocation(e));var r=null;switch(t){case Nu.BOUNDARY:r=Nu.INTERIOR;break;case Nu.INTERIOR:default:r=Nu.BOUNDARY}this._label.setLocation(e,r)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(tf),nf=function(){this.nodeMap=new Xl,this.nodeFact=null;var e=arguments[0];this.nodeFact=e};nf.prototype.find=function(e){return this.nodeMap.get(e)},nf.prototype.addNode=function(){if(arguments[0]instanceof Mu){var e=arguments[0],t=this.nodeMap.get(e);return null===t&&(t=this.nodeFact.createNode(e),this.nodeMap.put(e,t)),t}if(arguments[0]instanceof rf){var r=arguments[0],n=this.nodeMap.get(r.getCoordinate());return null===n?(this.nodeMap.put(r.getCoordinate(),r),r):(n.mergeLabel(r),n)}},nf.prototype.print=function(e){for(var t=this.iterator();t.hasNext();)t.next().print(e)},nf.prototype.iterator=function(){return this.nodeMap.values().iterator()},nf.prototype.values=function(){return this.nodeMap.values()},nf.prototype.getBoundaryNodes=function(e){for(var t=new Il,r=this.iterator();r.hasNext();){var n=r.next();n.getLabel().getLocation(e)===Nu.BOUNDARY&&t.add(n)}return t},nf.prototype.add=function(e){var t=e.getCoordinate();this.addNode(t).add(e)},nf.prototype.interfaces_=function(){return[]},nf.prototype.getClass=function(){return nf};var of=function(){},af={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};of.prototype.interfaces_=function(){return[]},of.prototype.getClass=function(){return of},of.isNorthern=function(e){return e===of.NE||e===of.NW},of.isOpposite=function(e,t){return e!==t&&2==(e-t+4)%4},of.commonHalfPlane=function(e,t){if(e===t)return e;if(2==(e-t+4)%4)return-1;var r=e<t?e:t;return 0===r&&3===(e>t?e:t)?3:r},of.isInHalfPlane=function(e,t){return t===of.SE?e===of.SE||e===of.SW:e===t||e===t+1},of.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var e=arguments[0],t=arguments[1];if(0===e&&0===t)throw new xu("Cannot compute the quadrant for point ( "+e+", "+t+" )");return e>=0?t>=0?of.NE:of.SE:t>=0?of.NW:of.SW}if(arguments[0]instanceof Mu&&arguments[1]instanceof Mu){var r=arguments[0],n=arguments[1];if(n.x===r.x&&n.y===r.y)throw new xu("Cannot compute the quadrant for two identical points "+r);return n.x>=r.x?n.y>=r.y?of.NE:of.SE:n.y>=r.y?of.NW:of.SW}},af.NE.get=function(){return 0},af.NW.get=function(){return 1},af.SW.get=function(){return 2},af.SE.get=function(){return 3},Object.defineProperties(of,af);var sf=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 e=arguments[0];this._edge=e}else if(3===arguments.length){var t=arguments[0],r=arguments[1],n=arguments[2];this._edge=t,this.init(r,n),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}};sf.prototype.compareDirection=function(e){return this._dx===e._dx&&this._dy===e._dy?0:this._quadrant>e._quadrant?1:this._quadrant<e._quadrant?-1:hl.computeOrientation(e._p0,e._p1,this._p1)},sf.prototype.getDy=function(){return this._dy},sf.prototype.getCoordinate=function(){return this._p0},sf.prototype.setNode=function(e){this._node=e},sf.prototype.print=function(e){var t=Math.atan2(this._dy,this._dx),r=this.getClass().getName(),n=r.lastIndexOf("."),i=r.substring(n+1);e.print(" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label)},sf.prototype.compareTo=function(e){var t=e;return this.compareDirection(t)},sf.prototype.getDirectedCoordinate=function(){return this._p1},sf.prototype.getDx=function(){return this._dx},sf.prototype.getLabel=function(){return this._label},sf.prototype.getEdge=function(){return this._edge},sf.prototype.getQuadrant=function(){return this._quadrant},sf.prototype.getNode=function(){return this._node},sf.prototype.toString=function(){var e=Math.atan2(this._dy,this._dx),t=this.getClass().getName(),r=t.lastIndexOf(".");return" "+t.substring(r+1)+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label},sf.prototype.computeLabel=function(e){},sf.prototype.init=function(e,t){this._p0=e,this._p1=t,this._dx=t.x-e.x,this._dy=t.y-e.y,this._quadrant=of.quadrant(this._dx,this._dy),al.isTrue(!(0===this._dx&&0===this._dy),"EdgeEnd with identical endpoints found")},sf.prototype.interfaces_=function(){return[Pu]},sf.prototype.getClass=function(){return sf};var uf=function(e){function t(){var t=arguments[0],r=arguments[1];if(e.call(this,t),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=r,r)this.init(t.getCoordinate(0),t.getCoordinate(1));else{var n=t.getNumPoints()-1;this.init(t.getCoordinate(n),t.getCoordinate(n-1))}this.computeDirectedLabel()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getNextMin=function(){return this._nextMin},t.prototype.getDepth=function(e){return this._depth[e]},t.prototype.setVisited=function(e){this._isVisited=e},t.prototype.computeDirectedLabel=function(){this._label=new Kc(this._edge.getLabel()),this._isForward||this._label.flip()},t.prototype.getNext=function(){return this._next},t.prototype.setDepth=function(e,t){if(-999!==this._depth[e]&&this._depth[e]!==t)throw new Hc("assigned depths do not match",this.getCoordinate());this._depth[e]=t},t.prototype.isInteriorAreaEdge=function(){for(var e=this,t=!0,r=0;r<2;r++)e._label.isArea(r)&&e._label.getLocation(r,qc.LEFT)===Nu.INTERIOR&&e._label.getLocation(r,qc.RIGHT)===Nu.INTERIOR||(t=!1);return t},t.prototype.setNextMin=function(e){this._nextMin=e},t.prototype.print=function(t){e.prototype.print.call(this,t),t.print(" "+this._depth[qc.LEFT]+"/"+this._depth[qc.RIGHT]),t.print(" ("+this.getDepthDelta()+")"),this._isInResult&&t.print(" inResult")},t.prototype.setMinEdgeRing=function(e){this._minEdgeRing=e},t.prototype.isLineEdge=function(){var e=this._label.isLine(0)||this._label.isLine(1),t=!this._label.isArea(0)||this._label.allPositionsEqual(0,Nu.EXTERIOR),r=!this._label.isArea(1)||this._label.allPositionsEqual(1,Nu.EXTERIOR);return e&&t&&r},t.prototype.setEdgeRing=function(e){this._edgeRing=e},t.prototype.getMinEdgeRing=function(){return this._minEdgeRing},t.prototype.getDepthDelta=function(){var e=this._edge.getDepthDelta();return this._isForward||(e=-e),e},t.prototype.setInResult=function(e){this._isInResult=e},t.prototype.getSym=function(){return this._sym},t.prototype.isForward=function(){return this._isForward},t.prototype.getEdge=function(){return this._edge},t.prototype.printEdge=function(e){this.print(e),e.print(" "),this._isForward?this._edge.print(e):this._edge.printReverse(e)},t.prototype.setSym=function(e){this._sym=e},t.prototype.setVisitedEdge=function(e){this.setVisited(e),this._sym.setVisited(e)},t.prototype.setEdgeDepths=function(e,t){var r=this.getEdge().getDepthDelta();this._isForward||(r=-r);var n=1;e===qc.LEFT&&(n=-1);var i=qc.opposite(e),o=t+r*n;this.setDepth(e,t),this.setDepth(i,o)},t.prototype.getEdgeRing=function(){return this._edgeRing},t.prototype.isInResult=function(){return this._isInResult},t.prototype.setNext=function(e){this._next=e},t.prototype.isVisited=function(){return this._isVisited},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.depthFactor=function(e,t){return e===Nu.EXTERIOR&&t===Nu.INTERIOR?1:e===Nu.INTERIOR&&t===Nu.EXTERIOR?-1:0},t}(sf),lf=function(){};lf.prototype.createNode=function(e){return new rf(e,null)},lf.prototype.interfaces_=function(){return[]},lf.prototype.getClass=function(){return lf};var cf=function(){if(this._edges=new Il,this._nodes=null,this._edgeEndList=new Il,0===arguments.length)this._nodes=new nf(new lf);else if(1===arguments.length){var e=arguments[0];this._nodes=new nf(e)}};cf.prototype.printEdges=function(e){e.println("Edges:");for(var t=0;t<this._edges.size();t++){e.println("edge "+t+":");var r=this._edges.get(t);r.print(e),r.eiList.print(e)}},cf.prototype.find=function(e){return this._nodes.find(e)},cf.prototype.addNode=function(){if(arguments[0]instanceof rf){var e=arguments[0];return this._nodes.addNode(e)}if(arguments[0]instanceof Mu){var t=arguments[0];return this._nodes.addNode(t)}},cf.prototype.getNodeIterator=function(){return this._nodes.iterator()},cf.prototype.linkResultDirectedEdges=function(){for(var e=this._nodes.iterator();e.hasNext();)e.next().getEdges().linkResultDirectedEdges()},cf.prototype.debugPrintln=function(e){Zu.out.println(e)},cf.prototype.isBoundaryNode=function(e,t){var r=this._nodes.find(t);if(null===r)return!1;var n=r.getLabel();return null!==n&&n.getLocation(e)===Nu.BOUNDARY},cf.prototype.linkAllDirectedEdges=function(){for(var e=this._nodes.iterator();e.hasNext();)e.next().getEdges().linkAllDirectedEdges()},cf.prototype.matchInSameDirection=function(e,t,r,n){return!!e.equals(r)&&hl.computeOrientation(e,t,n)===hl.COLLINEAR&&of.quadrant(e,t)===of.quadrant(r,n)},cf.prototype.getEdgeEnds=function(){return this._edgeEndList},cf.prototype.debugPrint=function(e){Zu.out.print(e)},cf.prototype.getEdgeIterator=function(){return this._edges.iterator()},cf.prototype.findEdgeInSameDirection=function(e,t){for(var r=this,n=0;n<this._edges.size();n++){var i=r._edges.get(n),o=i.getCoordinates();if(r.matchInSameDirection(e,t,o[0],o[1]))return i;if(r.matchInSameDirection(e,t,o[o.length-1],o[o.length-2]))return i}return null},cf.prototype.insertEdge=function(e){this._edges.add(e)},cf.prototype.findEdgeEnd=function(e){for(var t=this.getEdgeEnds().iterator();t.hasNext();){var r=t.next();if(r.getEdge()===e)return r}return null},cf.prototype.addEdges=function(e){for(var t=this,r=e.iterator();r.hasNext();){var n=r.next();t._edges.add(n);var i=new uf(n,!0),o=new uf(n,!1);i.setSym(o),o.setSym(i),t.add(i),t.add(o)}},cf.prototype.add=function(e){this._nodes.add(e),this._edgeEndList.add(e)},cf.prototype.getNodes=function(){return this._nodes.values()},cf.prototype.findEdge=function(e,t){for(var r=0;r<this._edges.size();r++){var n=this._edges.get(r),i=n.getCoordinates();if(e.equals(i[0])&&t.equals(i[1]))return n}return null},cf.prototype.interfaces_=function(){return[]},cf.prototype.getClass=function(){return cf},cf.linkResultDirectedEdges=function(e){for(var t=e.iterator();t.hasNext();)t.next().getEdges().linkResultDirectedEdges()};var ff=function(){this._geometryFactory=null,this._shellList=new Il;var e=arguments[0];this._geometryFactory=e};ff.prototype.sortShellsAndHoles=function(e,t,r){for(var n=e.iterator();n.hasNext();){var i=n.next();i.isHole()?r.add(i):t.add(i)}},ff.prototype.computePolygons=function(e){for(var t=new Il,r=e.iterator();r.hasNext();){var n=r.next().toPolygon(this._geometryFactory);t.add(n)}return t},ff.prototype.placeFreeHoles=function(e,t){for(var r=t.iterator();r.hasNext();){var n=r.next();if(null===n.getShell()){var i=this.findEdgeRingContaining(n,e);if(null===i)throw new Hc("unable to assign hole to a shell",n.getCoordinate(0));n.setShell(i)}}},ff.prototype.buildMinimalEdgeRings=function(e,t,r){for(var n=new Il,i=e.iterator();i.hasNext();){var o=i.next();if(o.getMaxNodeDegree()>2){o.linkDirectedEdgesForMinimalEdgeRings();var a=o.buildMinimalRings(),s=this.findShell(a);null!==s?(this.placePolygonHoles(s,a),t.add(s)):r.addAll(a)}else n.add(o)}return n},ff.prototype.containsPoint=function(e){for(var t=this._shellList.iterator();t.hasNext();)if(t.next().containsPoint(e))return!0;return!1},ff.prototype.buildMaximalEdgeRings=function(e){for(var t=new Il,r=e.iterator();r.hasNext();){var n=r.next();if(n.isInResult()&&n.getLabel().isArea()&&null===n.getEdgeRing()){var i=new ef(n,this._geometryFactory);t.add(i),i.setInResult()}}return t},ff.prototype.placePolygonHoles=function(e,t){for(var r=t.iterator();r.hasNext();){var n=r.next();n.isHole()&&n.setShell(e)}},ff.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},ff.prototype.findEdgeRingContaining=function(e,t){for(var r=e.getLinearRing(),n=r.getEnvelopeInternal(),i=r.getCoordinateN(0),o=null,a=null,s=t.iterator();s.hasNext();){var u=s.next(),l=u.getLinearRing(),c=l.getEnvelopeInternal();null!==o&&(a=o.getLinearRing().getEnvelopeInternal());var f=!1;c.contains(n)&&hl.isPointInRing(i,l.getCoordinates())&&(f=!0),f&&(null===o||a.contains(c))&&(o=u)}return o},ff.prototype.findShell=function(e){for(var t=0,r=null,n=e.iterator();n.hasNext();){var i=n.next();i.isHole()||(r=i,t++)}return al.isTrue(t<=1,"found two shells in MinimalEdgeRing list"),r},ff.prototype.add=function(){if(1===arguments.length){var e=arguments[0];this.add(e.getEdgeEnds(),e.getNodes())}else if(2===arguments.length){var t=arguments[0],r=arguments[1];cf.linkResultDirectedEdges(r);var n=this.buildMaximalEdgeRings(t),i=new Il,o=this.buildMinimalEdgeRings(n,this._shellList,i);this.sortShellsAndHoles(o,this._shellList,i),this.placeFreeHoles(this._shellList,i)}},ff.prototype.interfaces_=function(){return[]},ff.prototype.getClass=function(){return ff};var hf=function(){};hf.prototype.getBounds=function(){},hf.prototype.interfaces_=function(){return[]},hf.prototype.getClass=function(){return hf};var pf=function(){this._bounds=null,this._item=null;var e=arguments[0],t=arguments[1];this._bounds=e,this._item=t};pf.prototype.getItem=function(){return this._item},pf.prototype.getBounds=function(){return this._bounds},pf.prototype.interfaces_=function(){return[hf,Tu]},pf.prototype.getClass=function(){return pf};var df=function(){this._size=null,this._items=null,this._size=0,this._items=new Il,this._items.add(null)};df.prototype.poll=function(){if(this.isEmpty())return null;var e=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),e},df.prototype.size=function(){return this._size},df.prototype.reorder=function(e){for(var t=this,r=null,n=this._items.get(e);2*e<=this._size&&((r=2*e)!==t._size&&t._items.get(r+1).compareTo(t._items.get(r))<0&&r++,t._items.get(r).compareTo(n)<0);e=r)t._items.set(e,t._items.get(r));this._items.set(e,n)},df.prototype.clear=function(){this._size=0,this._items.clear()},df.prototype.isEmpty=function(){return 0===this._size},df.prototype.add=function(e){this._items.add(null),this._size+=1;var t=this._size;for(this._items.set(0,e);e.compareTo(this._items.get(Math.trunc(t/2)))<0;t/=2)this._items.set(t,this._items.get(Math.trunc(t/2)));this._items.set(t,e)},df.prototype.interfaces_=function(){return[]},df.prototype.getClass=function(){return df};var yf=function(){};yf.prototype.visitItem=function(e){},yf.prototype.interfaces_=function(){return[]},yf.prototype.getClass=function(){return yf};var gf=function(){};gf.prototype.insert=function(e,t){},gf.prototype.remove=function(e,t){},gf.prototype.query=function(){},gf.prototype.interfaces_=function(){return[]},gf.prototype.getClass=function(){return gf};var vf=function(){if(this._childBoundables=new Il,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this._level=e}},mf={serialVersionUID:{configurable:!0}};vf.prototype.getLevel=function(){return this._level},vf.prototype.size=function(){return this._childBoundables.size()},vf.prototype.getChildBoundables=function(){return this._childBoundables},vf.prototype.addChildBoundable=function(e){al.isTrue(null===this._bounds),this._childBoundables.add(e)},vf.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},vf.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},vf.prototype.interfaces_=function(){return[hf,Tu]},vf.prototype.getClass=function(){return vf},mf.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(vf,mf);var _f=function(){};_f.reverseOrder=function(){return{compare:function(e,t){return t.compareTo(e)}}},_f.min=function(e){return _f.sort(e),e.get(0)},_f.sort=function(e,t){var r=e.toArray();t?$l.sort(r,t):$l.sort(r);for(var n=e.iterator(),i=0,o=r.length;i<o;i++)n.next(),n.set(r[i])},_f.singletonList=function(e){var t=new Il;return t.add(e),t};var bf=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var e=arguments[0],t=arguments[1],r=arguments[2];this._boundable1=e,this._boundable2=t,this._itemDistance=r,this._distance=this.distance()};bf.prototype.expandToQueue=function(e,t){var r=bf.isComposite(this._boundable1),n=bf.isComposite(this._boundable2);if(r&&n)return bf.area(this._boundable1)>bf.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,e,t),null):(this.expand(this._boundable2,this._boundable1,e,t),null);if(r)return this.expand(this._boundable1,this._boundable2,e,t),null;if(n)return this.expand(this._boundable2,this._boundable1,e,t),null;throw new xu("neither boundable is composite")},bf.prototype.isLeaves=function(){return!(bf.isComposite(this._boundable1)||bf.isComposite(this._boundable2))},bf.prototype.compareTo=function(e){var t=e;return this._distance<t._distance?-1:this._distance>t._distance?1:0},bf.prototype.expand=function(e,t,r,n){for(var i=e.getChildBoundables().iterator();i.hasNext();){var o=i.next(),a=new bf(o,t,this._itemDistance);a.getDistance()<n&&r.add(a)}},bf.prototype.getBoundable=function(e){return 0===e?this._boundable1:this._boundable2},bf.prototype.getDistance=function(){return this._distance},bf.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},bf.prototype.interfaces_=function(){return[Pu]},bf.prototype.getClass=function(){return bf},bf.area=function(e){return e.getBounds().getArea()},bf.isComposite=function(e){return e instanceof vf};var Sf=function e(){if(this._root=null,this._built=!1,this._itemBoundables=new Il,this._nodeCapacity=null,0===arguments.length){var t=e.DEFAULT_NODE_CAPACITY;this._nodeCapacity=t}else if(1===arguments.length){var r=arguments[0];al.isTrue(r>1,"Node capacity must be greater than 1"),this._nodeCapacity=r}},xf={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};Sf.prototype.getNodeCapacity=function(){return this._nodeCapacity},Sf.prototype.lastNode=function(e){return e.get(e.size()-1)},Sf.prototype.size=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var e=arguments[0],t=0,r=e.getChildBoundables().iterator();r.hasNext();){var n=r.next();n instanceof vf?t+=this.size(n):n instanceof pf&&(t+=1)}return t}},Sf.prototype.removeItem=function(e,t){for(var r=null,n=e.getChildBoundables().iterator();n.hasNext();){var i=n.next();i instanceof pf&&i.getItem()===t&&(r=i)}return null!==r&&(e.getChildBoundables().remove(r),!0)},Sf.prototype.itemsTree=function(){if(0===arguments.length){this.build();var e=this.itemsTree(this._root);return null===e?new Il:e}if(1===arguments.length){for(var t=arguments[0],r=new Il,n=t.getChildBoundables().iterator();n.hasNext();){var i=n.next();if(i instanceof vf){var o=this.itemsTree(i);null!==o&&r.add(o)}else i instanceof pf?r.add(i.getItem()):al.shouldNeverReachHere()}return r.size()<=0?null:r}},Sf.prototype.insert=function(e,t){al.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new pf(e,t))},Sf.prototype.boundablesAtLevel=function(){if(1===arguments.length){var e=arguments[0],t=new Il;return this.boundablesAtLevel(e,this._root,t),t}if(3===arguments.length){var r=arguments[0],n=arguments[1],i=arguments[2];if(al.isTrue(r>-2),n.getLevel()===r)return i.add(n),null;for(var o=n.getChildBoundables().iterator();o.hasNext();){var a=o.next();a instanceof vf?this.boundablesAtLevel(r,a,i):(al.isTrue(a instanceof pf),-1===r&&i.add(a))}return null}},Sf.prototype.query=function(){var e=this;if(1===arguments.length){var t=arguments[0];this.build();var r=new Il;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,r),r}if(2===arguments.length){var n=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.query(n,this._root,i)}else if(3===arguments.length)if(ju(arguments[2],yf)&&arguments[0]instanceof Object&&arguments[1]instanceof vf)for(var o=arguments[0],a=arguments[1],s=arguments[2],u=a.getChildBoundables(),l=0;l<u.size();l++){var c=u.get(l);e.getIntersectsOp().intersects(c.getBounds(),o)&&(c instanceof vf?e.query(o,c,s):c instanceof pf?s.visitItem(c.getItem()):al.shouldNeverReachHere())}else if(ju(arguments[2],Tl)&&arguments[0]instanceof Object&&arguments[1]instanceof vf)for(var f=arguments[0],h=arguments[1],p=arguments[2],d=h.getChildBoundables(),y=0;y<d.size();y++){var g=d.get(y);e.getIntersectsOp().intersects(g.getBounds(),f)&&(g instanceof vf?e.query(f,g,p):g instanceof pf?p.add(g.getItem()):al.shouldNeverReachHere())}},Sf.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},Sf.prototype.getRoot=function(){return this.build(),this._root},Sf.prototype.remove=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.remove(e,this._root,t)}if(3===arguments.length){var r=arguments[0],n=arguments[1],i=arguments[2],o=this.removeItem(n,i);if(o)return!0;for(var a=null,s=n.getChildBoundables().iterator();s.hasNext();){var u=s.next();if(this.getIntersectsOp().intersects(u.getBounds(),r)&&u instanceof vf&&(o=this.remove(r,u,i))){a=u;break}}return null!==a&&a.getChildBoundables().isEmpty()&&n.getChildBoundables().remove(a),o}},Sf.prototype.createHigherLevels=function(e,t){al.isTrue(!e.isEmpty());var r=this.createParentBoundables(e,t+1);return 1===r.size()?r.get(0):this.createHigherLevels(r,t+1)},Sf.prototype.depth=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(1===arguments.length){for(var e=arguments[0],t=0,r=e.getChildBoundables().iterator();r.hasNext();){var n=r.next();if(n instanceof vf){var i=this.depth(n);i>t&&(t=i)}}return t+1}},Sf.prototype.createParentBoundables=function(e,t){var r=this;al.isTrue(!e.isEmpty());var n=new Il;n.add(this.createNode(t));var i=new Il(e);_f.sort(i,this.getComparator());for(var o=i.iterator();o.hasNext();){var a=o.next();r.lastNode(n).getChildBoundables().size()===r.getNodeCapacity()&&n.add(r.createNode(t)),r.lastNode(n).addChildBoundable(a)}return n},Sf.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},Sf.prototype.interfaces_=function(){return[Tu]},Sf.prototype.getClass=function(){return Sf},Sf.compareDoubles=function(e,t){return e>t?1:e<t?-1:0},xf.IntersectsOp.get=function(){return wf},xf.serialVersionUID.get=function(){return-0x35ef64c82d4c5400},xf.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(Sf,xf);var wf=function(){},Of=function(){};Of.prototype.distance=function(e,t){},Of.prototype.interfaces_=function(){return[]},Of.prototype.getClass=function(){return Of};var Pf=function(e){function t(r){r=r||t.DEFAULT_NODE_CAPACITY,e.call(this,r)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return t.prototype.createParentBoundablesFromVerticalSlices=function(e,t){al.isTrue(e.length>0);for(var r=new Il,n=0;n<e.length;n++)r.addAll(this.createParentBoundablesFromVerticalSlice(e[n],t));return r},t.prototype.createNode=function(e){return new Ef(e)},t.prototype.size=function(){return 0===arguments.length?e.prototype.size.call(this):e.prototype.size.apply(this,arguments)},t.prototype.insert=function(){if(2!==arguments.length)return e.prototype.insert.apply(this,arguments);var t=arguments[0],r=arguments[1];if(t.isNull())return null;e.prototype.insert.call(this,t,r)},t.prototype.getIntersectsOp=function(){return t.intersectsOp},t.prototype.verticalSlices=function(e,t){for(var r=Math.trunc(Math.ceil(e.size()/t)),n=new Array(t).fill(null),i=e.iterator(),o=0;o<t;o++){n[o]=new Il;for(var a=0;i.hasNext()&&a<r;){var s=i.next();n[o].add(s),a++}}return n},t.prototype.query=function(){if(1===arguments.length){var t=arguments[0];return e.prototype.query.call(this,t)}if(2===arguments.length){var r=arguments[0],n=arguments[1];e.prototype.query.call(this,r,n)}else if(3===arguments.length)if(ju(arguments[2],yf)&&arguments[0]instanceof Object&&arguments[1]instanceof vf){var i=arguments[0],o=arguments[1],a=arguments[2];e.prototype.query.call(this,i,o,a)}else if(ju(arguments[2],Tl)&&arguments[0]instanceof Object&&arguments[1]instanceof vf){var s=arguments[0],u=arguments[1],l=arguments[2];e.prototype.query.call(this,s,u,l)}},t.prototype.getComparator=function(){return t.yComparator},t.prototype.createParentBoundablesFromVerticalSlice=function(t,r){return e.prototype.createParentBoundables.call(this,t,r)},t.prototype.remove=function(){if(2===arguments.length){var t=arguments[0],r=arguments[1];return e.prototype.remove.call(this,t,r)}return e.prototype.remove.apply(this,arguments)},t.prototype.depth=function(){return 0===arguments.length?e.prototype.depth.call(this):e.prototype.depth.apply(this,arguments)},t.prototype.createParentBoundables=function(e,r){al.isTrue(!e.isEmpty());var n=Math.trunc(Math.ceil(e.size()/this.getNodeCapacity())),i=new Il(e);_f.sort(i,t.xComparator);var o=this.verticalSlices(i,Math.trunc(Math.ceil(Math.sqrt(n))));return this.createParentBoundablesFromVerticalSlices(o,r)},t.prototype.nearestNeighbour=function(){if(1===arguments.length){if(ju(arguments[0],Of)){var e=arguments[0],r=new bf(this.getRoot(),this.getRoot(),e);return this.nearestNeighbour(r)}if(arguments[0]instanceof bf){var n=arguments[0];return this.nearestNeighbour(n,wu.POSITIVE_INFINITY)}}else if(2===arguments.length){if(arguments[0]instanceof t&&ju(arguments[1],Of)){var i=arguments[0],o=arguments[1],a=new bf(this.getRoot(),i.getRoot(),o);return this.nearestNeighbour(a)}if(arguments[0]instanceof bf&&"number"==typeof arguments[1]){var s=arguments[0],u=arguments[1],l=u,c=null,f=new df;for(f.add(s);!f.isEmpty()&&l>0;){var h=f.poll(),p=h.getDistance();if(p>=l)break;h.isLeaves()?(l=p,c=h):h.expandToQueue(f,l)}return[c.getBoundable(0).getItem(),c.getBoundable(1).getItem()]}}else if(3===arguments.length){var d=arguments[0],y=arguments[1],g=arguments[2],v=new pf(d,y),m=new bf(this.getRoot(),v,g);return this.nearestNeighbour(m)[0]}},t.prototype.interfaces_=function(){return[gf,Tu]},t.prototype.getClass=function(){return t},t.centreX=function(e){return t.avg(e.getMinX(),e.getMaxX())},t.avg=function(e,t){return(e+t)/2},t.centreY=function(e){return t.avg(e.getMinY(),e.getMaxY())},r.STRtreeNode.get=function(){return Ef},r.serialVersionUID.get=function(){return 0x39920f7d5f261e0},r.xComparator.get=function(){return{interfaces_:function(){return[ku]},compare:function(r,n){return e.compareDoubles(t.centreX(r.getBounds()),t.centreX(n.getBounds()))}}},r.yComparator.get=function(){return{interfaces_:function(){return[ku]},compare:function(r,n){return e.compareDoubles(t.centreY(r.getBounds()),t.centreY(n.getBounds()))}}},r.intersectsOp.get=function(){return{interfaces_:function(){return[e.IntersectsOp]},intersects:function(e,t){return e.intersects(t)}}},r.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(t,r),t}(Sf),Ef=function(e){function t(){var t=arguments[0];e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.computeBounds=function(){for(var e=null,t=this.getChildBoundables().iterator();t.hasNext();){var r=t.next();null===e?e=new Ku(r.getBounds()):e.expandToInclude(r.getBounds())}return e},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(vf),kf=function(){};kf.prototype.interfaces_=function(){return[]},kf.prototype.getClass=function(){return kf},kf.relativeSign=function(e,t){return e<t?-1:e>t?1:0},kf.compare=function(e,t,r){if(t.equals2D(r))return 0;var n=kf.relativeSign(t.x,r.x),i=kf.relativeSign(t.y,r.y);switch(e){case 0:return kf.compareValue(n,i);case 1:return kf.compareValue(i,n);case 2:return kf.compareValue(i,-n);case 3:return kf.compareValue(-n,i);case 4:return kf.compareValue(-n,-i);case 5:return kf.compareValue(-i,-n);case 6:return kf.compareValue(-i,n);case 7:return kf.compareValue(n,-i)}return al.shouldNeverReachHere("invalid octant value"),0},kf.compareValue=function(e,t){return e<0?-1:e>0?1:t<0?-1:t>0?1:0};var Tf=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var e=arguments[0],t=arguments[1],r=arguments[2],n=arguments[3];this._segString=e,this.coord=new Mu(t),this.segmentIndex=r,this._segmentOctant=n,this._isInterior=!t.equals2D(e.getCoordinate(r))};Tf.prototype.getCoordinate=function(){return this.coord},Tf.prototype.print=function(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex)},Tf.prototype.compareTo=function(e){var t=e;return this.segmentIndex<t.segmentIndex?-1:this.segmentIndex>t.segmentIndex?1:this.coord.equals2D(t.coord)?0:kf.compare(this._segmentOctant,this.coord,t.coord)},Tf.prototype.isEndPoint=function(e){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===e},Tf.prototype.isInterior=function(){return this._isInterior},Tf.prototype.interfaces_=function(){return[Pu]},Tf.prototype.getClass=function(){return Tf};var Mf=function(){this._nodeMap=new Xl,this._edge=null;var e=arguments[0];this._edge=e};Mf.prototype.getSplitCoordinates=function(){var e=new Cl;this.addEndpoints();for(var t=this.iterator(),r=t.next();t.hasNext();){var n=t.next();this.addEdgeCoordinates(r,n,e),r=n}return e.toCoordinateArray()},Mf.prototype.addCollapsedNodes=function(){var e=new Il;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var t=e.iterator();t.hasNext();){var r=t.next().intValue();this.add(this._edge.getCoordinate(r),r)}},Mf.prototype.print=function(e){e.println("Intersections:");for(var t=this.iterator();t.hasNext();)t.next().print(e)},Mf.prototype.findCollapsesFromExistingVertices=function(e){for(var t=0;t<this._edge.size()-2;t++){var r=this._edge.getCoordinate(t),n=this._edge.getCoordinate(t+2);r.equals2D(n)&&e.add(new Du(t+1))}},Mf.prototype.addEdgeCoordinates=function(e,t,r){var n=this._edge.getCoordinate(t.segmentIndex),i=t.isInterior()||!t.coord.equals2D(n);r.add(new Mu(e.coord),!1);for(var o=e.segmentIndex+1;o<=t.segmentIndex;o++)r.add(this._edge.getCoordinate(o));i&&r.add(new Mu(t.coord))},Mf.prototype.iterator=function(){return this._nodeMap.values().iterator()},Mf.prototype.addSplitEdges=function(e){this.addEndpoints(),this.addCollapsedNodes();for(var t=this.iterator(),r=t.next();t.hasNext();){var n=t.next(),i=this.createSplitEdge(r,n);e.add(i),r=n}},Mf.prototype.findCollapseIndex=function(e,t,r){if(!e.coord.equals2D(t.coord))return!1;var n=t.segmentIndex-e.segmentIndex;return t.isInterior()||n--,1===n&&(r[0]=e.segmentIndex+1,!0)},Mf.prototype.findCollapsesFromInsertedNodes=function(e){for(var t=new Array(1).fill(null),r=this.iterator(),n=r.next();r.hasNext();){var i=r.next();this.findCollapseIndex(n,i,t)&&e.add(new Du(t[0])),n=i}},Mf.prototype.getEdge=function(){return this._edge},Mf.prototype.addEndpoints=function(){var e=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(e),e)},Mf.prototype.createSplitEdge=function(e,t){var r=t.segmentIndex-e.segmentIndex+2,n=this._edge.getCoordinate(t.segmentIndex),i=t.isInterior()||!t.coord.equals2D(n);i||r--;var o=new Array(r).fill(null),a=0;o[a++]=new Mu(e.coord);for(var s=e.segmentIndex+1;s<=t.segmentIndex;s++)o[a++]=this._edge.getCoordinate(s);return i&&(o[a]=new Mu(t.coord)),new Nf(o,this._edge.getData())},Mf.prototype.add=function(e,t){var r=new Tf(this._edge,e,t,this._edge.getSegmentOctant(t)),n=this._nodeMap.get(r);return null!==n?(al.isTrue(n.coord.equals2D(e),"Found equal nodes with different coordinates"),n):(this._nodeMap.put(r,r),r)},Mf.prototype.checkSplitEdgesCorrectness=function(e){var t=this._edge.getCoordinates(),r=e.get(0).getCoordinate(0);if(!r.equals2D(t[0]))throw new il("bad split edge start point at "+r);var n=e.get(e.size()-1).getCoordinates(),i=n[n.length-1];if(!i.equals2D(t[t.length-1]))throw new il("bad split edge end point at "+i)},Mf.prototype.interfaces_=function(){return[]},Mf.prototype.getClass=function(){return Mf};var If=function(){};If.prototype.interfaces_=function(){return[]},If.prototype.getClass=function(){return If},If.octant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var e=arguments[0],t=arguments[1];if(0===e&&0===t)throw new xu("Cannot compute the octant for point ( "+e+", "+t+" )");var r=Math.abs(e),n=Math.abs(t);return e>=0?t>=0?r>=n?0:1:r>=n?7:6:t>=0?r>=n?3:2:r>=n?4:5}if(arguments[0]instanceof Mu&&arguments[1]instanceof Mu){var i=arguments[0],o=arguments[1],a=o.x-i.x,s=o.y-i.y;if(0===a&&0===s)throw new xu("Cannot compute the octant for two identical points "+i);return If.octant(a,s)}};var Lf=function(){};Lf.prototype.getCoordinates=function(){},Lf.prototype.size=function(){},Lf.prototype.getCoordinate=function(e){},Lf.prototype.isClosed=function(){},Lf.prototype.setData=function(e){},Lf.prototype.getData=function(){},Lf.prototype.interfaces_=function(){return[]},Lf.prototype.getClass=function(){return Lf};var Cf=function(){};Cf.prototype.addIntersection=function(e,t){},Cf.prototype.interfaces_=function(){return[Lf]},Cf.prototype.getClass=function(){return Cf};var Nf=function(){this._nodeList=new Mf(this),this._pts=null,this._data=null;var e=arguments[0],t=arguments[1];this._pts=e,this._data=t};Nf.prototype.getCoordinates=function(){return this._pts},Nf.prototype.size=function(){return this._pts.length},Nf.prototype.getCoordinate=function(e){return this._pts[e]},Nf.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Nf.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(e),this.getCoordinate(e+1))},Nf.prototype.setData=function(e){this._data=e},Nf.prototype.safeOctant=function(e,t){return e.equals2D(t)?0:If.octant(e,t)},Nf.prototype.getData=function(){return this._data},Nf.prototype.addIntersection=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];this.addIntersectionNode(e,t)}else if(4===arguments.length){var r=arguments[0],n=arguments[1],i=arguments[3],o=new Mu(r.getIntersection(i));this.addIntersection(o,n)}},Nf.prototype.toString=function(){return nl.toLineString(new Pc(this._pts))},Nf.prototype.getNodeList=function(){return this._nodeList},Nf.prototype.addIntersectionNode=function(e,t){var r=t,n=r+1;if(n<this._pts.length){var i=this._pts[n];e.equals2D(i)&&(r=n)}return this._nodeList.add(e,r)},Nf.prototype.addIntersections=function(e,t,r){for(var n=0;n<e.getIntersectionNum();n++)this.addIntersection(e,t,r,n)},Nf.prototype.interfaces_=function(){return[Cf]},Nf.prototype.getClass=function(){return Nf},Nf.getNodedSubstrings=function(){if(1===arguments.length){var e=arguments[0],t=new Il;return Nf.getNodedSubstrings(e,t),t}if(2===arguments.length)for(var r=arguments[0],n=arguments[1],i=r.iterator();i.hasNext();){var o=i.next();o.getNodeList().addSplitEdges(n)}};var Rf=function(){if(this.p0=null,this.p1=null,0===arguments.length)this.p0=new Mu,this.p1=new Mu;else if(1===arguments.length){var e=arguments[0];this.p0=new Mu(e.p0),this.p1=new Mu(e.p1)}else if(2===arguments.length)this.p0=arguments[0],this.p1=arguments[1];else if(4===arguments.length){var t=arguments[0],r=arguments[1],n=arguments[2],i=arguments[3];this.p0=new Mu(t,r),this.p1=new Mu(n,i)}},jf={serialVersionUID:{configurable:!0}};Rf.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},Rf.prototype.orientationIndex=function(){if(arguments[0]instanceof Rf){var e=arguments[0],t=hl.orientationIndex(this.p0,this.p1,e.p0),r=hl.orientationIndex(this.p0,this.p1,e.p1);return t>=0&&r>=0||t<=0&&r<=0?Math.max(t,r):0}if(arguments[0]instanceof Mu){var n=arguments[0];return hl.orientationIndex(this.p0,this.p1,n)}},Rf.prototype.toGeometry=function(e){return e.createLineString([this.p0,this.p1])},Rf.prototype.isVertical=function(){return this.p0.x===this.p1.x},Rf.prototype.equals=function(e){if(!(e instanceof Rf))return!1;var t=e;return this.p0.equals(t.p0)&&this.p1.equals(t.p1)},Rf.prototype.intersection=function(e){var t=new ll;return t.computeIntersection(this.p0,this.p1,e.p0,e.p1),t.hasIntersection()?t.getIntersection(0):null},Rf.prototype.project=function(){if(arguments[0]instanceof Mu){var e=arguments[0];if(e.equals(this.p0)||e.equals(this.p1))return new Mu(e);var t=this.projectionFactor(e),r=new Mu;return r.x=this.p0.x+t*(this.p1.x-this.p0.x),r.y=this.p0.y+t*(this.p1.y-this.p0.y),r}if(arguments[0]instanceof Rf){var n=arguments[0],i=this.projectionFactor(n.p0),o=this.projectionFactor(n.p1);if(i>=1&&o>=1)return null;if(i<=0&&o<=0)return null;var a=this.project(n.p0);i<0&&(a=this.p0),i>1&&(a=this.p1);var s=this.project(n.p1);return o<0&&(s=this.p0),o>1&&(s=this.p1),new Rf(a,s)}},Rf.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},Rf.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},Rf.prototype.getCoordinate=function(e){return 0===e?this.p0:this.p1},Rf.prototype.distancePerpendicular=function(e){return hl.distancePointLinePerpendicular(e,this.p0,this.p1)},Rf.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},Rf.prototype.midPoint=function(){return Rf.midPoint(this.p0,this.p1)},Rf.prototype.projectionFactor=function(e){if(e.equals(this.p0))return 0;if(e.equals(this.p1))return 1;var t=this.p1.x-this.p0.x,r=this.p1.y-this.p0.y,n=t*t+r*r;return n<=0?wu.NaN:((e.x-this.p0.x)*t+(e.y-this.p0.y)*r)/n},Rf.prototype.closestPoints=function(e){var t=this.intersection(e);if(null!==t)return[t,t];var r=new Array(2).fill(null),n=wu.MAX_VALUE,i=null,o=this.closestPoint(e.p0);n=o.distance(e.p0),r[0]=o,r[1]=e.p0;var a=this.closestPoint(e.p1);(i=a.distance(e.p1))<n&&(n=i,r[0]=a,r[1]=e.p1);var s=e.closestPoint(this.p0);(i=s.distance(this.p0))<n&&(n=i,r[0]=this.p0,r[1]=s);var u=e.closestPoint(this.p1);return(i=u.distance(this.p1))<n&&(n=i,r[0]=this.p1,r[1]=u),r},Rf.prototype.closestPoint=function(e){var t=this.projectionFactor(e);return t>0&&t<1?this.project(e):this.p0.distance(e)<this.p1.distance(e)?this.p0:this.p1},Rf.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},Rf.prototype.getLength=function(){return this.p0.distance(this.p1)},Rf.prototype.compareTo=function(e){var t=e,r=this.p0.compareTo(t.p0);return 0!==r?r:this.p1.compareTo(t.p1)},Rf.prototype.reverse=function(){var e=this.p0;this.p0=this.p1,this.p1=e},Rf.prototype.equalsTopo=function(e){return this.p0.equals(e.p0)&&(this.p1.equals(e.p1)||this.p0.equals(e.p1))&&this.p1.equals(e.p0)},Rf.prototype.lineIntersection=function(e){try{return Yu.intersection(this.p0,this.p1,e.p0,e.p1)}catch(e){if(!(e instanceof Xu))throw e}return null},Rf.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},Rf.prototype.pointAlongOffset=function(e,t){var r=this.p0.x+e*(this.p1.x-this.p0.x),n=this.p0.y+e*(this.p1.y-this.p0.y),i=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,a=Math.sqrt(i*i+o*o),s=0,u=0;if(0!==t){if(a<=0)throw new Error("Cannot compute offset from zero-length line segment");s=t*i/a,u=t*o/a}return new Mu(r-u,n+s)},Rf.prototype.setCoordinates=function(){if(1===arguments.length){var e=arguments[0];this.setCoordinates(e.p0,e.p1)}else if(2===arguments.length){var t=arguments[0],r=arguments[1];this.p0.x=t.x,this.p0.y=t.y,this.p1.x=r.x,this.p1.y=r.y}},Rf.prototype.segmentFraction=function(e){var t=this.projectionFactor(e);return t<0?t=0:(t>1||wu.isNaN(t))&&(t=1),t},Rf.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},Rf.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},Rf.prototype.distance=function(){if(arguments[0]instanceof Rf){var e=arguments[0];return hl.distanceLineLine(this.p0,this.p1,e.p0,e.p1)}if(arguments[0]instanceof Mu){var t=arguments[0];return hl.distancePointLine(t,this.p0,this.p1)}},Rf.prototype.pointAlong=function(e){var t=new Mu;return t.x=this.p0.x+e*(this.p1.x-this.p0.x),t.y=this.p0.y+e*(this.p1.y-this.p0.y),t},Rf.prototype.hashCode=function(){var e=wu.doubleToLongBits(this.p0.x);e^=31*wu.doubleToLongBits(this.p0.y);var t=Math.trunc(e)^Math.trunc(e>>32),r=wu.doubleToLongBits(this.p1.x);return r^=31*wu.doubleToLongBits(this.p1.y),t^Math.trunc(r)^Math.trunc(r>>32)},Rf.prototype.interfaces_=function(){return[Pu,Tu]},Rf.prototype.getClass=function(){return Rf},Rf.midPoint=function(e,t){return new Mu((e.x+t.x)/2,(e.y+t.y)/2)},jf.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(Rf,jf);var Gf=function(){this.tempEnv1=new Ku,this.tempEnv2=new Ku,this._overlapSeg1=new Rf,this._overlapSeg2=new Rf};Gf.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var e=arguments[0],t=arguments[1],r=arguments[2],n=arguments[3];e.getLineSegment(t,this._overlapSeg1),r.getLineSegment(n,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},Gf.prototype.interfaces_=function(){return[]},Gf.prototype.getClass=function(){return Gf};var Vf=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var e=arguments[0],t=arguments[1],r=arguments[2],n=arguments[3];this._pts=e,this._start=t,this._end=r,this._context=n};Vf.prototype.getLineSegment=function(e,t){t.p0=this._pts[e],t.p1=this._pts[e+1]},Vf.prototype.computeSelect=function(e,t,r,n){var i=this._pts[t],o=this._pts[r];if(n.tempEnv1.init(i,o),r-t==1)return n.select(this,t),null;if(!e.intersects(n.tempEnv1))return null;var a=Math.trunc((t+r)/2);t<a&&this.computeSelect(e,t,a,n),a<r&&this.computeSelect(e,a,r,n)},Vf.prototype.getCoordinates=function(){for(var e=new Array(this._end-this._start+1).fill(null),t=0,r=this._start;r<=this._end;r++)e[t++]=this._pts[r];return e},Vf.prototype.computeOverlaps=function(e,t){this.computeOverlapsInternal(this._start,this._end,e,e._start,e._end,t)},Vf.prototype.setId=function(e){this._id=e},Vf.prototype.select=function(e,t){this.computeSelect(e,this._start,this._end,t)},Vf.prototype.getEnvelope=function(){if(null===this._env){var e=this._pts[this._start],t=this._pts[this._end];this._env=new Ku(e,t)}return this._env},Vf.prototype.getEndIndex=function(){return this._end},Vf.prototype.getStartIndex=function(){return this._start},Vf.prototype.getContext=function(){return this._context},Vf.prototype.getId=function(){return this._id},Vf.prototype.computeOverlapsInternal=function(e,t,r,n,i,o){var a=this._pts[e],s=this._pts[t],u=r._pts[n],l=r._pts[i];if(t-e==1&&i-n==1)return o.overlap(this,e,r,n),null;if(o.tempEnv1.init(a,s),o.tempEnv2.init(u,l),!o.tempEnv1.intersects(o.tempEnv2))return null;var c=Math.trunc((e+t)/2),f=Math.trunc((n+i)/2);e<c&&(n<f&&this.computeOverlapsInternal(e,c,r,n,f,o),f<i&&this.computeOverlapsInternal(e,c,r,f,i,o)),c<t&&(n<f&&this.computeOverlapsInternal(c,t,r,n,f,o),f<i&&this.computeOverlapsInternal(c,t,r,f,i,o))},Vf.prototype.interfaces_=function(){return[]},Vf.prototype.getClass=function(){return Vf};var Af=function(){};Af.prototype.interfaces_=function(){return[]},Af.prototype.getClass=function(){return Af},Af.getChainStartIndices=function(e){var t=0,r=new Il;r.add(new Du(t));do{var n=Af.findChainEnd(e,t);r.add(new Du(n)),t=n}while(t<e.length-1);return Af.toIntArray(r)},Af.findChainEnd=function(e,t){for(var r=t;r<e.length-1&&e[r].equals2D(e[r+1]);)r++;if(r>=e.length-1)return e.length-1;for(var n=of.quadrant(e[r],e[r+1]),i=t+1;i<e.length&&(e[i-1].equals2D(e[i])||of.quadrant(e[i-1],e[i])===n);)i++;return i-1},Af.getChains=function(){if(1===arguments.length){var e=arguments[0];return Af.getChains(e,null)}if(2===arguments.length){for(var t=arguments[0],r=arguments[1],n=new Il,i=Af.getChainStartIndices(t),o=0;o<i.length-1;o++){var a=new Vf(t,i[o],i[o+1],r);n.add(a)}return n}},Af.toIntArray=function(e){for(var t=new Array(e.size()).fill(null),r=0;r<t.length;r++)t[r]=e.get(r).intValue();return t};var Df=function(){};Df.prototype.computeNodes=function(e){},Df.prototype.getNodedSubstrings=function(){},Df.prototype.interfaces_=function(){return[]},Df.prototype.getClass=function(){return Df};var Ff=function(){if(this._segInt=null,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setSegmentIntersector(e)}};Ff.prototype.setSegmentIntersector=function(e){this._segInt=e},Ff.prototype.interfaces_=function(){return[Df]},Ff.prototype.getClass=function(){return Ff};var Bf=function(e){function t(t){t?e.call(this,t):e.call(this),this._monoChains=new Il,this._index=new Pf,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={SegmentOverlapAction:{configurable:!0}};return t.prototype.getMonotoneChains=function(){return this._monoChains},t.prototype.getNodedSubstrings=function(){return Nf.getNodedSubstrings(this._nodedSegStrings)},t.prototype.getIndex=function(){return this._index},t.prototype.add=function(e){for(var t=this,r=Af.getChains(e.getCoordinates(),e).iterator();r.hasNext();){var n=r.next();n.setId(t._idCounter++),t._index.insert(n.getEnvelope(),n),t._monoChains.add(n)}},t.prototype.computeNodes=function(e){this._nodedSegStrings=e;for(var t=e.iterator();t.hasNext();)this.add(t.next());this.intersectChains()},t.prototype.intersectChains=function(){for(var e=this,t=new qf(this._segInt),r=this._monoChains.iterator();r.hasNext();)for(var n=r.next(),i=e._index.query(n.getEnvelope()).iterator();i.hasNext();){var o=i.next();if(o.getId()>n.getId()&&(n.computeOverlaps(o,t),e._nOverlaps++),e._segInt.isDone())return null}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},r.SegmentOverlapAction.get=function(){return qf},Object.defineProperties(t,r),t}(Ff),qf=function(e){function t(){e.call(this),this._si=null;var t=arguments[0];this._si=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.overlap=function(){if(4!==arguments.length)return e.prototype.overlap.apply(this,arguments);var t=arguments[0],r=arguments[1],n=arguments[2],i=arguments[3],o=t.getContext(),a=n.getContext();this._si.processIntersections(o,r,a,i)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Gf),Jf=function e(){if(this._quadrantSegments=e.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=e.CAP_ROUND,this._joinStyle=e.JOIN_ROUND,this._mitreLimit=e.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=e.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.setQuadrantSegments(t)}else if(2===arguments.length){var r=arguments[0],n=arguments[1];this.setQuadrantSegments(r),this.setEndCapStyle(n)}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)}},Uf={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}};Jf.prototype.getEndCapStyle=function(){return this._endCapStyle},Jf.prototype.isSingleSided=function(){return this._isSingleSided},Jf.prototype.setQuadrantSegments=function(e){this._quadrantSegments=e,0===this._quadrantSegments&&(this._joinStyle=Jf.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Jf.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),e<=0&&(this._quadrantSegments=1),this._joinStyle!==Jf.JOIN_ROUND&&(this._quadrantSegments=Jf.DEFAULT_QUADRANT_SEGMENTS)},Jf.prototype.getJoinStyle=function(){return this._joinStyle},Jf.prototype.setJoinStyle=function(e){this._joinStyle=e},Jf.prototype.setSimplifyFactor=function(e){this._simplifyFactor=e<0?0:e},Jf.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Jf.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Jf.prototype.setEndCapStyle=function(e){this._endCapStyle=e},Jf.prototype.getMitreLimit=function(){return this._mitreLimit},Jf.prototype.setMitreLimit=function(e){this._mitreLimit=e},Jf.prototype.setSingleSided=function(e){this._isSingleSided=e},Jf.prototype.interfaces_=function(){return[]},Jf.prototype.getClass=function(){return Jf},Jf.bufferDistanceError=function(e){var t=Math.PI/2/e;return 1-Math.cos(t/2)},Uf.CAP_ROUND.get=function(){return 1},Uf.CAP_FLAT.get=function(){return 2},Uf.CAP_SQUARE.get=function(){return 3},Uf.JOIN_ROUND.get=function(){return 1},Uf.JOIN_MITRE.get=function(){return 2},Uf.JOIN_BEVEL.get=function(){return 3},Uf.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Uf.DEFAULT_MITRE_LIMIT.get=function(){return 5},Uf.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(Jf,Uf);var zf=function(e){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=hl.COUNTERCLOCKWISE,this._inputLine=e||null},Wf={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};zf.prototype.isDeletable=function(e,t,r,n){var i=this._inputLine[e],o=this._inputLine[t],a=this._inputLine[r];return!!this.isConcave(i,o,a)&&!!this.isShallow(i,o,a,n)&&this.isShallowSampled(i,o,e,r,n)},zf.prototype.deleteShallowConcavities=function(){for(var e=this,t=1,r=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(r),i=!1;n<this._inputLine.length;){var o=!1;e.isDeletable(t,r,n,e._distanceTol)&&(e._isDeleted[r]=zf.DELETE,o=!0,i=!0),t=o?n:r,r=e.findNextNonDeletedIndex(t),n=e.findNextNonDeletedIndex(r)}return i},zf.prototype.isShallowConcavity=function(e,t,r,n){return hl.computeOrientation(e,t,r)===this._angleOrientation&&hl.distancePointLine(t,e,r)<n},zf.prototype.isShallowSampled=function(e,t,r,n,i){var o=Math.trunc((n-r)/zf.NUM_PTS_TO_CHECK);o<=0&&(o=1);for(var a=r;a<n;a+=o)if(!this.isShallow(e,t,this._inputLine[a],i))return!1;return!0},zf.prototype.isConcave=function(e,t,r){var n=hl.computeOrientation(e,t,r)===this._angleOrientation;return n},zf.prototype.simplify=function(e){this._distanceTol=Math.abs(e),e<0&&(this._angleOrientation=hl.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var t=!1;do{t=this.deleteShallowConcavities()}while(t);return this.collapseLine()},zf.prototype.findNextNonDeletedIndex=function(e){for(var t=e+1;t<this._inputLine.length&&this._isDeleted[t]===zf.DELETE;)t++;return t},zf.prototype.isShallow=function(e,t,r,n){return hl.distancePointLine(t,e,r)<n},zf.prototype.collapseLine=function(){for(var e=new Cl,t=0;t<this._inputLine.length;t++)this._isDeleted[t]!==zf.DELETE&&e.add(this._inputLine[t]);return e.toCoordinateArray()},zf.prototype.interfaces_=function(){return[]},zf.prototype.getClass=function(){return zf},zf.simplify=function(e,t){return new zf(e).simplify(t)},Wf.INIT.get=function(){return 0},Wf.DELETE.get=function(){return 1},Wf.KEEP.get=function(){return 1},Wf.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(zf,Wf);var Hf=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new Il},Xf={COORDINATE_ARRAY_TYPE:{configurable:!0}};Hf.prototype.getCoordinates=function(){return this._ptList.toArray(Hf.COORDINATE_ARRAY_TYPE)},Hf.prototype.setPrecisionModel=function(e){this._precisionModel=e},Hf.prototype.addPt=function(e){var t=new Mu(e);if(this._precisionModel.makePrecise(t),this.isRedundant(t))return null;this._ptList.add(t)},Hf.prototype.revere=function(){},Hf.prototype.addPts=function(e,t){if(t)for(var r=0;r<e.length;r++)this.addPt(e[r]);else for(var n=e.length-1;n>=0;n--)this.addPt(e[n])},Hf.prototype.isRedundant=function(e){if(this._ptList.size()<1)return!1;var t=this._ptList.get(this._ptList.size()-1);return e.distance(t)<this._minimimVertexDistance},Hf.prototype.toString=function(){return(new Rc).createLineString(this.getCoordinates()).toString()},Hf.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var e=new Mu(this._ptList.get(0)),t=this._ptList.get(this._ptList.size()-1);if(e.equals(t))return null;this._ptList.add(e)},Hf.prototype.setMinimumVertexDistance=function(e){this._minimimVertexDistance=e},Hf.prototype.interfaces_=function(){return[]},Hf.prototype.getClass=function(){return Hf},Xf.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(Hf,Xf);var Zf=function(){},Yf={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};Zf.prototype.interfaces_=function(){return[]},Zf.prototype.getClass=function(){return Zf},Zf.toDegrees=function(e){return 180*e/Math.PI},Zf.normalize=function(e){for(;e>Math.PI;)e-=Zf.PI_TIMES_2;for(;e<=-Math.PI;)e+=Zf.PI_TIMES_2;return e},Zf.angle=function(){if(1===arguments.length){var e=arguments[0];return Math.atan2(e.y,e.x)}if(2===arguments.length){var t=arguments[0],r=arguments[1],n=r.x-t.x,i=r.y-t.y;return Math.atan2(i,n)}},Zf.isAcute=function(e,t,r){var n=e.x-t.x,i=e.y-t.y;return n*(r.x-t.x)+i*(r.y-t.y)>0},Zf.isObtuse=function(e,t,r){var n=e.x-t.x,i=e.y-t.y;return n*(r.x-t.x)+i*(r.y-t.y)<0},Zf.interiorAngle=function(e,t,r){var n=Zf.angle(t,e),i=Zf.angle(t,r);return Math.abs(i-n)},Zf.normalizePositive=function(e){if(e<0){for(;e<0;)e+=Zf.PI_TIMES_2;e>=Zf.PI_TIMES_2&&(e=0)}else{for(;e>=Zf.PI_TIMES_2;)e-=Zf.PI_TIMES_2;e<0&&(e=0)}return e},Zf.angleBetween=function(e,t,r){var n=Zf.angle(t,e),i=Zf.angle(t,r);return Zf.diff(n,i)},Zf.diff=function(e,t){var r=null;return(r=e<t?t-e:e-t)>Math.PI&&(r=2*Math.PI-r),r},Zf.toRadians=function(e){return e*Math.PI/180},Zf.getTurn=function(e,t){var r=Math.sin(t-e);return r>0?Zf.COUNTERCLOCKWISE:r<0?Zf.CLOCKWISE:Zf.NONE},Zf.angleBetweenOriented=function(e,t,r){var n=Zf.angle(t,e),i=Zf.angle(t,r)-n;return i<=-Math.PI?i+Zf.PI_TIMES_2:i>Math.PI?i-Zf.PI_TIMES_2:i},Yf.PI_TIMES_2.get=function(){return 2*Math.PI},Yf.PI_OVER_2.get=function(){return Math.PI/2},Yf.PI_OVER_4.get=function(){return Math.PI/4},Yf.COUNTERCLOCKWISE.get=function(){return hl.COUNTERCLOCKWISE},Yf.CLOCKWISE.get=function(){return hl.CLOCKWISE},Yf.NONE.get=function(){return hl.COLLINEAR},Object.defineProperties(Zf,Yf);var Kf=function e(){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 Rf,this._seg1=new Rf,this._offset0=new Rf,this._offset1=new Rf,this._side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],r=arguments[1],n=arguments[2];this._precisionModel=t,this._bufParams=r,this._li=new ll,this._filletAngleQuantum=Math.PI/2/r.getQuadrantSegments(),r.getQuadrantSegments()>=8&&r.getJoinStyle()===Jf.JOIN_ROUND&&(this._closingSegLengthFactor=e.MAX_CLOSING_SEG_LEN_FACTOR),this.init(n)},Qf={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}};Kf.prototype.addNextSegment=function(e,t){if(this._s0=this._s1,this._s1=this._s2,this._s2=e,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 r=hl.computeOrientation(this._s0,this._s1,this._s2),n=r===hl.CLOCKWISE&&this._side===qc.LEFT||r===hl.COUNTERCLOCKWISE&&this._side===qc.RIGHT;0===r?this.addCollinear(t):n?this.addOutsideTurn(r,t):this.addInsideTurn(r,t)},Kf.prototype.addLineEndCap=function(e,t){var r=new Rf(e,t),n=new Rf;this.computeOffsetSegment(r,qc.LEFT,this._distance,n);var i=new Rf;this.computeOffsetSegment(r,qc.RIGHT,this._distance,i);var o=t.x-e.x,a=t.y-e.y,s=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case Jf.CAP_ROUND:this._segList.addPt(n.p1),this.addFilletArc(t,s+Math.PI/2,s-Math.PI/2,hl.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case Jf.CAP_FLAT:this._segList.addPt(n.p1),this._segList.addPt(i.p1);break;case Jf.CAP_SQUARE:var u=new Mu;u.x=Math.abs(this._distance)*Math.cos(s),u.y=Math.abs(this._distance)*Math.sin(s);var l=new Mu(n.p1.x+u.x,n.p1.y+u.y),c=new Mu(i.p1.x+u.x,i.p1.y+u.y);this._segList.addPt(l),this._segList.addPt(c)}},Kf.prototype.getCoordinates=function(){return this._segList.getCoordinates()},Kf.prototype.addMitreJoin=function(e,t,r,n){var i=!0,o=null;try{o=Yu.intersection(t.p0,t.p1,r.p0,r.p1),(n<=0?1:o.distance(e)/Math.abs(n))>this._bufParams.getMitreLimit()&&(i=!1)}catch(e){if(!(e instanceof Xu))throw e;o=new Mu(0,0),i=!1}i?this._segList.addPt(o):this.addLimitedMitreJoin(t,r,n,this._bufParams.getMitreLimit())},Kf.prototype.addFilletCorner=function(e,t,r,n,i){var o=t.x-e.x,a=t.y-e.y,s=Math.atan2(a,o),u=r.x-e.x,l=r.y-e.y,c=Math.atan2(l,u);n===hl.CLOCKWISE?s<=c&&(s+=2*Math.PI):s>=c&&(s-=2*Math.PI),this._segList.addPt(t),this.addFilletArc(e,s,c,n,i),this._segList.addPt(r)},Kf.prototype.addOutsideTurn=function(e,t){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*Kf.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===Jf.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===Jf.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(t&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,e,this._distance),this._segList.addPt(this._offset1.p0))},Kf.prototype.createSquare=function(e){this._segList.addPt(new Mu(e.x+this._distance,e.y+this._distance)),this._segList.addPt(new Mu(e.x+this._distance,e.y-this._distance)),this._segList.addPt(new Mu(e.x-this._distance,e.y-this._distance)),this._segList.addPt(new Mu(e.x-this._distance,e.y+this._distance)),this._segList.closeRing()},Kf.prototype.addSegments=function(e,t){this._segList.addPts(e,t)},Kf.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},Kf.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},Kf.prototype.initSideSegments=function(e,t,r){this._s1=e,this._s2=t,this._side=r,this._seg1.setCoordinates(e,t),this.computeOffsetSegment(this._seg1,r,this._distance,this._offset1)},Kf.prototype.addLimitedMitreJoin=function(e,t,r,n){var i=this._seg0.p1,o=Zf.angle(i,this._seg0.p0),a=Zf.angleBetweenOriented(this._seg0.p0,i,this._seg1.p1)/2,s=Zf.normalize(o+a),u=Zf.normalize(s+Math.PI),l=n*r,c=r-l*Math.abs(Math.sin(a)),f=i.x+l*Math.cos(u),h=i.y+l*Math.sin(u),p=new Mu(f,h),d=new Rf(i,p),y=d.pointAlongOffset(1,c),g=d.pointAlongOffset(1,-c);this._side===qc.LEFT?(this._segList.addPt(y),this._segList.addPt(g)):(this._segList.addPt(g),this._segList.addPt(y))},Kf.prototype.computeOffsetSegment=function(e,t,r,n){var i=t===qc.LEFT?1:-1,o=e.p1.x-e.p0.x,a=e.p1.y-e.p0.y,s=Math.sqrt(o*o+a*a),u=i*r*o/s,l=i*r*a/s;n.p0.x=e.p0.x-l,n.p0.y=e.p0.y+u,n.p1.x=e.p1.x-l,n.p1.y=e.p1.y+u},Kf.prototype.addFilletArc=function(e,t,r,n,i){var o=n===hl.CLOCKWISE?-1:1,a=Math.abs(t-r),s=Math.trunc(a/this._filletAngleQuantum+.5);if(s<1)return null;for(var u=a/s,l=0,c=new Mu;l<a;){var f=t+o*l;c.x=e.x+i*Math.cos(f),c.y=e.y+i*Math.sin(f),this._segList.addPt(c),l+=u}},Kf.prototype.addInsideTurn=function(e,t){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*Kf.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var r=new Mu((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(r);var n=new Mu((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(n)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},Kf.prototype.createCircle=function(e){var t=new Mu(e.x+this._distance,e.y);this._segList.addPt(t),this.addFilletArc(e,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Kf.prototype.addBevelJoin=function(e,t){this._segList.addPt(e.p1),this._segList.addPt(t.p0)},Kf.prototype.init=function(e){this._distance=e,this._maxCurveSegmentError=e*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Hf,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(e*Kf.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Kf.prototype.addCollinear=function(e){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===Jf.JOIN_BEVEL||this._bufParams.getJoinStyle()===Jf.JOIN_MITRE?(e&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,hl.CLOCKWISE,this._distance))},Kf.prototype.closeRing=function(){this._segList.closeRing()},Kf.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Kf.prototype.interfaces_=function(){return[]},Kf.prototype.getClass=function(){return Kf},Qf.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},Qf.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},Qf.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Qf.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Kf,Qf);var $f=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var e=arguments[0],t=arguments[1];this._precisionModel=e,this._bufParams=t};$f.prototype.getOffsetCurve=function(e,t){if(this._distance=t,0===t)return null;var r=t<0,n=Math.abs(t),i=this.getSegGen(n);e.length<=1?this.computePointCurve(e[0],i):this.computeOffsetCurve(e,r,i);var o=i.getCoordinates();return r&&Nl.reverse(o),o},$f.prototype.computeSingleSidedBufferCurve=function(e,t,r){var n=this.simplifyTolerance(this._distance);if(t){r.addSegments(e,!0);var i=zf.simplify(e,-n),o=i.length-1;r.initSideSegments(i[o],i[o-1],qc.LEFT),r.addFirstSegment();for(var a=o-2;a>=0;a--)r.addNextSegment(i[a],!0)}else{r.addSegments(e,!1);var s=zf.simplify(e,n),u=s.length-1;r.initSideSegments(s[0],s[1],qc.LEFT),r.addFirstSegment();for(var l=2;l<=u;l++)r.addNextSegment(s[l],!0)}r.addLastSegment(),r.closeRing()},$f.prototype.computeRingBufferCurve=function(e,t,r){var n=this.simplifyTolerance(this._distance);t===qc.RIGHT&&(n=-n);var i=zf.simplify(e,n),o=i.length-1;r.initSideSegments(i[o-1],i[0],t);for(var a=1;a<=o;a++){var s=1!==a;r.addNextSegment(i[a],s)}r.closeRing()},$f.prototype.computeLineBufferCurve=function(e,t){var r=this.simplifyTolerance(this._distance),n=zf.simplify(e,r),i=n.length-1;t.initSideSegments(n[0],n[1],qc.LEFT);for(var o=2;o<=i;o++)t.addNextSegment(n[o],!0);t.addLastSegment(),t.addLineEndCap(n[i-1],n[i]);var a=zf.simplify(e,-r),s=a.length-1;t.initSideSegments(a[s],a[s-1],qc.LEFT);for(var u=s-2;u>=0;u--)t.addNextSegment(a[u],!0);t.addLastSegment(),t.addLineEndCap(a[1],a[0]),t.closeRing()},$f.prototype.computePointCurve=function(e,t){switch(this._bufParams.getEndCapStyle()){case Jf.CAP_ROUND:t.createCircle(e);break;case Jf.CAP_SQUARE:t.createSquare(e)}},$f.prototype.getLineCurve=function(e,t){if(this._distance=t,t<0&&!this._bufParams.isSingleSided())return null;if(0===t)return null;var r=Math.abs(t),n=this.getSegGen(r);if(e.length<=1)this.computePointCurve(e[0],n);else if(this._bufParams.isSingleSided()){var i=t<0;this.computeSingleSidedBufferCurve(e,i,n)}else this.computeLineBufferCurve(e,n);return n.getCoordinates()},$f.prototype.getBufferParameters=function(){return this._bufParams},$f.prototype.simplifyTolerance=function(e){return e*this._bufParams.getSimplifyFactor()},$f.prototype.getRingCurve=function(e,t,r){if(this._distance=r,e.length<=2)return this.getLineCurve(e,r);if(0===r)return $f.copyCoordinates(e);var n=this.getSegGen(r);return this.computeRingBufferCurve(e,t,n),n.getCoordinates()},$f.prototype.computeOffsetCurve=function(e,t,r){var n=this.simplifyTolerance(this._distance);if(t){var i=zf.simplify(e,-n),o=i.length-1;r.initSideSegments(i[o],i[o-1],qc.LEFT),r.addFirstSegment();for(var a=o-2;a>=0;a--)r.addNextSegment(i[a],!0)}else{var s=zf.simplify(e,n),u=s.length-1;r.initSideSegments(s[0],s[1],qc.LEFT),r.addFirstSegment();for(var l=2;l<=u;l++)r.addNextSegment(s[l],!0)}r.addLastSegment()},$f.prototype.getSegGen=function(e){return new Kf(this._precisionModel,this._bufParams,e)},$f.prototype.interfaces_=function(){return[]},$f.prototype.getClass=function(){return $f},$f.copyCoordinates=function(e){for(var t=new Array(e.length).fill(null),r=0;r<t.length;r++)t[r]=new Mu(e[r]);return t};var eh=function(){this._subgraphs=null,this._seg=new Rf,this._cga=new hl;var e=arguments[0];this._subgraphs=e},th={DepthSegment:{configurable:!0}};eh.prototype.findStabbedSegments=function(){var e=this;if(1===arguments.length){for(var t=arguments[0],r=new Il,n=this._subgraphs.iterator();n.hasNext();){var i=n.next(),o=i.getEnvelope();t.y<o.getMinY()||t.y>o.getMaxY()||e.findStabbedSegments(t,i.getDirectedEdges(),r)}return r}if(3===arguments.length)if(ju(arguments[2],Tl)&&arguments[0]instanceof Mu&&arguments[1]instanceof uf)for(var a=arguments[0],s=arguments[1],u=arguments[2],l=s.getEdge().getCoordinates(),c=0;c<l.length-1;c++){e._seg.p0=l[c],e._seg.p1=l[c+1],e._seg.p0.y>e._seg.p1.y&&e._seg.reverse();var f=Math.max(e._seg.p0.x,e._seg.p1.x);if(!(f<a.x||e._seg.isHorizontal()||a.y<e._seg.p0.y||a.y>e._seg.p1.y||hl.computeOrientation(e._seg.p0,e._seg.p1,a)===hl.RIGHT)){var h=s.getDepth(qc.LEFT);e._seg.p0.equals(l[c])||(h=s.getDepth(qc.RIGHT));var p=new rh(e._seg,h);u.add(p)}}else if(ju(arguments[2],Tl)&&arguments[0]instanceof Mu&&ju(arguments[1],Tl))for(var d=arguments[0],y=arguments[1],g=arguments[2],v=y.iterator();v.hasNext();){var m=v.next();m.isForward()&&e.findStabbedSegments(d,m,g)}},eh.prototype.getDepth=function(e){var t=this.findStabbedSegments(e);return 0===t.size()?0:_f.min(t)._leftDepth},eh.prototype.interfaces_=function(){return[]},eh.prototype.getClass=function(){return eh},th.DepthSegment.get=function(){return rh},Object.defineProperties(eh,th);var rh=function(){this._upwardSeg=null,this._leftDepth=null;var e=arguments[0],t=arguments[1];this._upwardSeg=new Rf(e),this._leftDepth=t};rh.prototype.compareTo=function(e){var t=e;if(this._upwardSeg.minX()>=t._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=t._upwardSeg.minX())return-1;var r=this._upwardSeg.orientationIndex(t._upwardSeg);return 0!==r||0!=(r=-1*t._upwardSeg.orientationIndex(this._upwardSeg))?r:this._upwardSeg.compareTo(t._upwardSeg)},rh.prototype.compareX=function(e,t){var r=e.p0.compareTo(t.p0);return 0!==r?r:e.p1.compareTo(t.p1)},rh.prototype.toString=function(){return this._upwardSeg.toString()},rh.prototype.interfaces_=function(){return[Pu]},rh.prototype.getClass=function(){return rh};var nh=function(e,t,r){this.p0=e||null,this.p1=t||null,this.p2=r||null};nh.prototype.area=function(){return nh.area(this.p0,this.p1,this.p2)},nh.prototype.signedArea=function(){return nh.signedArea(this.p0,this.p1,this.p2)},nh.prototype.interpolateZ=function(e){if(null===e)throw new xu("Supplied point is null.");return nh.interpolateZ(e,this.p0,this.p1,this.p2)},nh.prototype.longestSideLength=function(){return nh.longestSideLength(this.p0,this.p1,this.p2)},nh.prototype.isAcute=function(){return nh.isAcute(this.p0,this.p1,this.p2)},nh.prototype.circumcentre=function(){return nh.circumcentre(this.p0,this.p1,this.p2)},nh.prototype.area3D=function(){return nh.area3D(this.p0,this.p1,this.p2)},nh.prototype.centroid=function(){return nh.centroid(this.p0,this.p1,this.p2)},nh.prototype.inCentre=function(){return nh.inCentre(this.p0,this.p1,this.p2)},nh.prototype.interfaces_=function(){return[]},nh.prototype.getClass=function(){return nh},nh.area=function(e,t,r){return Math.abs(((r.x-e.x)*(t.y-e.y)-(t.x-e.x)*(r.y-e.y))/2)},nh.signedArea=function(e,t,r){return((r.x-e.x)*(t.y-e.y)-(t.x-e.x)*(r.y-e.y))/2},nh.det=function(e,t,r,n){return e*n-t*r},nh.interpolateZ=function(e,t,r,n){var i=t.x,o=t.y,a=r.x-i,s=n.x-i,u=r.y-o,l=n.y-o,c=a*l-s*u,f=e.x-i,h=e.y-o,p=(l*f-s*h)/c,d=(-u*f+a*h)/c;return t.z+p*(r.z-t.z)+d*(n.z-t.z)},nh.longestSideLength=function(e,t,r){var n=e.distance(t),i=t.distance(r),o=r.distance(e),a=n;return i>a&&(a=i),o>a&&(a=o),a},nh.isAcute=function(e,t,r){return!!Zf.isAcute(e,t,r)&&!!Zf.isAcute(t,r,e)&&!!Zf.isAcute(r,e,t)},nh.circumcentre=function(e,t,r){var n=r.x,i=r.y,o=e.x-n,a=e.y-i,s=t.x-n,u=t.y-i,l=2*nh.det(o,a,s,u),c=nh.det(a,o*o+a*a,u,s*s+u*u),f=nh.det(o,o*o+a*a,s,s*s+u*u);return new Mu(n-c/l,i+f/l)},nh.perpendicularBisector=function(e,t){var r=t.x-e.x,n=t.y-e.y,i=new Yu(e.x+r/2,e.y+n/2,1),o=new Yu(e.x-n+r/2,e.y+r+n/2,1);return new Yu(i,o)},nh.angleBisector=function(e,t,r){var n=t.distance(e),i=n/(n+t.distance(r)),o=r.x-e.x,a=r.y-e.y;return new Mu(e.x+i*o,e.y+i*a)},nh.area3D=function(e,t,r){var n=t.x-e.x,i=t.y-e.y,o=t.z-e.z,a=r.x-e.x,s=r.y-e.y,u=r.z-e.z,l=i*u-o*s,c=o*a-n*u,f=n*s-i*a,h=l*l+c*c+f*f,p=Math.sqrt(h)/2;return p},nh.centroid=function(e,t,r){var n=(e.x+t.x+r.x)/3,i=(e.y+t.y+r.y)/3;return new Mu(n,i)},nh.inCentre=function(e,t,r){var n=t.distance(r),i=e.distance(r),o=e.distance(t),a=n+i+o,s=(n*e.x+i*t.x+o*r.x)/a,u=(n*e.y+i*t.y+o*r.y)/a;return new Mu(s,u)};var ih=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new Il;var e=arguments[0],t=arguments[1],r=arguments[2];this._inputGeom=e,this._distance=t,this._curveBuilder=r};ih.prototype.addPoint=function(e){if(this._distance<=0)return null;var t=e.getCoordinates(),r=this._curveBuilder.getLineCurve(t,this._distance);this.addCurve(r,Nu.EXTERIOR,Nu.INTERIOR)},ih.prototype.addPolygon=function(e){var t=this,r=this._distance,n=qc.LEFT;this._distance<0&&(r=-this._distance,n=qc.RIGHT);var i=e.getExteriorRing(),o=Nl.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance))return null;if(this._distance<=0&&o.length<3)return null;this.addPolygonRing(o,r,n,Nu.EXTERIOR,Nu.INTERIOR);for(var a=0;a<e.getNumInteriorRing();a++){var s=e.getInteriorRingN(a),u=Nl.removeRepeatedPoints(s.getCoordinates());t._distance>0&&t.isErodedCompletely(s,-t._distance)||t.addPolygonRing(u,r,qc.opposite(n),Nu.INTERIOR,Nu.EXTERIOR)}},ih.prototype.isTriangleErodedCompletely=function(e,t){var r=new nh(e[0],e[1],e[2]),n=r.inCentre();return hl.distancePointLine(n,r.p0,r.p1)<Math.abs(t)},ih.prototype.addLineString=function(e){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var t=Nl.removeRepeatedPoints(e.getCoordinates()),r=this._curveBuilder.getLineCurve(t,this._distance);this.addCurve(r,Nu.EXTERIOR,Nu.INTERIOR)},ih.prototype.addCurve=function(e,t,r){if(null===e||e.length<2)return null;var n=new Nf(e,new Kc(0,Nu.BOUNDARY,t,r));this._curveList.add(n)},ih.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},ih.prototype.addPolygonRing=function(e,t,r,n,i){if(0===t&&e.length<mc.MINIMUM_VALID_SIZE)return null;var o=n,a=i;e.length>=mc.MINIMUM_VALID_SIZE&&hl.isCCW(e)&&(o=i,a=n,r=qc.opposite(r));var s=this._curveBuilder.getRingCurve(e,r,t);this.addCurve(s,o,a)},ih.prototype.add=function(e){if(e.isEmpty())return null;e instanceof gc?this.addPolygon(e):e instanceof hc?this.addLineString(e):e instanceof dc?this.addPoint(e):(e instanceof vc||e instanceof oc||e instanceof _c||e instanceof ic)&&this.addCollection(e)},ih.prototype.isErodedCompletely=function(e,t){var r=e.getCoordinates();if(r.length<4)return t<0;if(4===r.length)return this.isTriangleErodedCompletely(r,t);var n=e.getEnvelopeInternal(),i=Math.min(n.getHeight(),n.getWidth());return t<0&&2*Math.abs(t)>i},ih.prototype.addCollection=function(e){for(var t=0;t<e.getNumGeometries();t++){var r=e.getGeometryN(t);this.add(r)}},ih.prototype.interfaces_=function(){return[]},ih.prototype.getClass=function(){return ih};var oh=function(){};oh.prototype.locate=function(e){},oh.prototype.interfaces_=function(){return[]},oh.prototype.getClass=function(){return oh};var ah=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var e=arguments[0];this._parent=e,this._atStart=!0,this._index=0,this._max=e.getNumGeometries()};ah.prototype.next=function(){if(this._atStart)return this._atStart=!1,ah.isAtomic(this._parent)&&this._index++,this._parent;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new Ml;var e=this._parent.getGeometryN(this._index++);return e instanceof ic?(this._subcollectionIterator=new ah(e),this._subcollectionIterator.next()):e},ah.prototype.remove=function(){throw new Error(this.getClass().getName())},ah.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)},ah.prototype.interfaces_=function(){return[kl]},ah.prototype.getClass=function(){return ah},ah.isAtomic=function(e){return!(e instanceof ic)};var sh=function(){this._geom=null;var e=arguments[0];this._geom=e};sh.prototype.locate=function(e){return sh.locate(e,this._geom)},sh.prototype.interfaces_=function(){return[oh]},sh.prototype.getClass=function(){return sh},sh.isPointInRing=function(e,t){return!!t.getEnvelopeInternal().intersects(e)&&hl.isPointInRing(e,t.getCoordinates())},sh.containsPointInPolygon=function(e,t){if(t.isEmpty())return!1;var r=t.getExteriorRing();if(!sh.isPointInRing(e,r))return!1;for(var n=0;n<t.getNumInteriorRing();n++){var i=t.getInteriorRingN(n);if(sh.isPointInRing(e,i))return!1}return!0},sh.containsPoint=function(e,t){if(t instanceof gc)return sh.containsPointInPolygon(e,t);if(t instanceof ic)for(var r=new ah(t);r.hasNext();){var n=r.next();if(n!==t&&sh.containsPoint(e,n))return!0}return!1},sh.locate=function(e,t){return t.isEmpty()?Nu.EXTERIOR:sh.containsPoint(e,t)?Nu.INTERIOR:Nu.EXTERIOR};var uh=function(){this._edgeMap=new Xl,this._edgeList=null,this._ptInAreaLocation=[Nu.NONE,Nu.NONE]};uh.prototype.getNextCW=function(e){this.getEdges();var t=this._edgeList.indexOf(e),r=t-1;return 0===t&&(r=this._edgeList.size()-1),this._edgeList.get(r)},uh.prototype.propagateSideLabels=function(e){for(var t=Nu.NONE,r=this.iterator();r.hasNext();){var n=r.next().getLabel();n.isArea(e)&&n.getLocation(e,qc.LEFT)!==Nu.NONE&&(t=n.getLocation(e,qc.LEFT))}if(t===Nu.NONE)return null;for(var i=t,o=this.iterator();o.hasNext();){var a=o.next(),s=a.getLabel();if(s.getLocation(e,qc.ON)===Nu.NONE&&s.setLocation(e,qc.ON,i),s.isArea(e)){var u=s.getLocation(e,qc.LEFT),l=s.getLocation(e,qc.RIGHT);if(l!==Nu.NONE){if(l!==i)throw new Hc("side location conflict",a.getCoordinate());u===Nu.NONE&&al.shouldNeverReachHere("found single null side (at "+a.getCoordinate()+")"),i=u}else al.isTrue(s.getLocation(e,qc.LEFT)===Nu.NONE,"found single null side"),s.setLocation(e,qc.RIGHT,i),s.setLocation(e,qc.LEFT,i)}}},uh.prototype.getCoordinate=function(){var e=this.iterator();return e.hasNext()?e.next().getCoordinate():null},uh.prototype.print=function(e){Zu.out.println("EdgeEndStar: "+this.getCoordinate());for(var t=this.iterator();t.hasNext();)t.next().print(e)},uh.prototype.isAreaLabelsConsistent=function(e){return this.computeEdgeEndLabels(e.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},uh.prototype.checkAreaLabelsConsistent=function(e){var t=this.getEdges();if(t.size()<=0)return!0;var r=t.size()-1,n=t.get(r).getLabel().getLocation(e,qc.LEFT);al.isTrue(n!==Nu.NONE,"Found unlabelled area edge");for(var i=n,o=this.iterator();o.hasNext();){var a=o.next().getLabel();al.isTrue(a.isArea(e),"Found non-area edge");var s=a.getLocation(e,qc.LEFT),u=a.getLocation(e,qc.RIGHT);if(s===u)return!1;if(u!==i)return!1;i=s}return!0},uh.prototype.findIndex=function(e){this.iterator();for(var t=0;t<this._edgeList.size();t++)if(this._edgeList.get(t)===e)return t;return-1},uh.prototype.iterator=function(){return this.getEdges().iterator()},uh.prototype.getEdges=function(){return null===this._edgeList&&(this._edgeList=new Il(this._edgeMap.values())),this._edgeList},uh.prototype.getLocation=function(e,t,r){return this._ptInAreaLocation[e]===Nu.NONE&&(this._ptInAreaLocation[e]=sh.locate(t,r[e].getGeometry())),this._ptInAreaLocation[e]},uh.prototype.toString=function(){var e=new Au;e.append("EdgeEndStar: "+this.getCoordinate()),e.append("\n");for(var t=this.iterator();t.hasNext();){var r=t.next();e.append(r),e.append("\n")}return e.toString()},uh.prototype.computeEdgeEndLabels=function(e){for(var t=this.iterator();t.hasNext();)t.next().computeLabel(e)},uh.prototype.computeLabelling=function(e){this.computeEdgeEndLabels(e[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var t=[!1,!1],r=this.iterator();r.hasNext();)for(var n=r.next().getLabel(),i=0;i<2;i++)n.isLine(i)&&n.getLocation(i)===Nu.BOUNDARY&&(t[i]=!0);for(var o=this.iterator();o.hasNext();)for(var a=o.next(),s=a.getLabel(),u=0;u<2;u++)if(s.isAnyNull(u)){var l=Nu.NONE;if(t[u])l=Nu.EXTERIOR;else{var c=a.getCoordinate();l=this.getLocation(u,c,e)}s.setAllLocationsIfNull(u,l)}},uh.prototype.getDegree=function(){return this._edgeMap.size()},uh.prototype.insertEdgeEnd=function(e,t){this._edgeMap.put(e,t),this._edgeList=null},uh.prototype.interfaces_=function(){return[]},uh.prototype.getClass=function(){return uh};var lh=function(e){function t(){e.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.linkResultDirectedEdges=function(){var e=this;this.getResultAreaEdges();for(var t=null,r=null,n=this._SCANNING_FOR_INCOMING,i=0;i<this._resultAreaEdgeList.size();i++){var o=e._resultAreaEdgeList.get(i),a=o.getSym();if(o.getLabel().isArea())switch(null===t&&o.isInResult()&&(t=o),n){case e._SCANNING_FOR_INCOMING:if(!a.isInResult())continue;r=a,n=e._LINKING_TO_OUTGOING;break;case e._LINKING_TO_OUTGOING:if(!o.isInResult())continue;r.setNext(o),n=e._SCANNING_FOR_INCOMING}}if(n===this._LINKING_TO_OUTGOING){if(null===t)throw new Hc("no outgoing dirEdge found",this.getCoordinate());al.isTrue(t.isInResult(),"unable to link last incoming dirEdge"),r.setNext(t)}},t.prototype.insert=function(e){var t=e;this.insertEdgeEnd(t,t)},t.prototype.getRightmostEdge=function(){var e=this.getEdges(),t=e.size();if(t<1)return null;var r=e.get(0);if(1===t)return r;var n=e.get(t-1),i=r.getQuadrant(),o=n.getQuadrant();return of.isNorthern(i)&&of.isNorthern(o)?r:of.isNorthern(i)||of.isNorthern(o)?0!==r.getDy()?r:0!==n.getDy()?n:(al.shouldNeverReachHere("found two horizontal edges incident on node"),null):n},t.prototype.print=function(e){Zu.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var t=this.iterator();t.hasNext();){var r=t.next();e.print("out "),r.print(e),e.println(),e.print("in "),r.getSym().print(e),e.println()}},t.prototype.getResultAreaEdges=function(){if(null!==this._resultAreaEdgeList)return this._resultAreaEdgeList;this._resultAreaEdgeList=new Il;for(var e=this.iterator();e.hasNext();){var t=e.next();(t.isInResult()||t.getSym().isInResult())&&this._resultAreaEdgeList.add(t)}return this._resultAreaEdgeList},t.prototype.updateLabelling=function(e){for(var t=this.iterator();t.hasNext();){var r=t.next().getLabel();r.setAllLocationsIfNull(0,e.getLocation(0)),r.setAllLocationsIfNull(1,e.getLocation(1))}},t.prototype.linkAllDirectedEdges=function(){this.getEdges();for(var e=null,t=null,r=this._edgeList.size()-1;r>=0;r--){var n=this._edgeList.get(r),i=n.getSym();null===t&&(t=i),null!==e&&i.setNext(e),e=n}t.setNext(e)},t.prototype.computeDepths=function(){if(1===arguments.length){var e=arguments[0],t=this.findIndex(e),r=e.getDepth(qc.LEFT),n=e.getDepth(qc.RIGHT),i=this.computeDepths(t+1,this._edgeList.size(),r),o=this.computeDepths(0,t,i);if(o!==n)throw new Hc("depth mismatch at "+e.getCoordinate())}else if(3===arguments.length){for(var a=arguments[0],s=arguments[1],u=arguments[2],l=u,c=a;c<s;c++){var f=this._edgeList.get(c);f.setEdgeDepths(qc.RIGHT,l),l=f.getDepth(qc.LEFT)}return l}},t.prototype.mergeSymLabels=function(){for(var e=this.iterator();e.hasNext();){var t=e.next();t.getLabel().merge(t.getSym().getLabel())}},t.prototype.linkMinimalDirectedEdges=function(e){for(var t=this,r=null,n=null,i=this._SCANNING_FOR_INCOMING,o=this._resultAreaEdgeList.size()-1;o>=0;o--){var a=t._resultAreaEdgeList.get(o),s=a.getSym();switch(null===r&&a.getEdgeRing()===e&&(r=a),i){case t._SCANNING_FOR_INCOMING:if(s.getEdgeRing()!==e)continue;n=s,i=t._LINKING_TO_OUTGOING;break;case t._LINKING_TO_OUTGOING:if(a.getEdgeRing()!==e)continue;n.setNextMin(a),i=t._SCANNING_FOR_INCOMING}}i===this._LINKING_TO_OUTGOING&&(al.isTrue(null!==r,"found null for first outgoing dirEdge"),al.isTrue(r.getEdgeRing()===e,"unable to link last incoming dirEdge"),n.setNextMin(r))},t.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var e=0,t=this.iterator();t.hasNext();){var r=t.next();r.isInResult()&&e++}return e}if(1===arguments.length){for(var n=arguments[0],i=0,o=this.iterator();o.hasNext();){var a=o.next();a.getEdgeRing()===n&&i++}return i}},t.prototype.getLabel=function(){return this._label},t.prototype.findCoveredLineEdges=function(){for(var e=Nu.NONE,t=this.iterator();t.hasNext();){var r=t.next(),n=r.getSym();if(!r.isLineEdge()){if(r.isInResult()){e=Nu.INTERIOR;break}if(n.isInResult()){e=Nu.EXTERIOR;break}}}if(e===Nu.NONE)return null;for(var i=e,o=this.iterator();o.hasNext();){var a=o.next(),s=a.getSym();a.isLineEdge()?a.getEdge().setCovered(i===Nu.INTERIOR):(a.isInResult()&&(i=Nu.EXTERIOR),s.isInResult()&&(i=Nu.INTERIOR))}},t.prototype.computeLabelling=function(t){e.prototype.computeLabelling.call(this,t),this._label=new Kc(Nu.NONE);for(var r=this.iterator();r.hasNext();)for(var n=r.next().getEdge().getLabel(),i=0;i<2;i++){var o=n.getLocation(i);o!==Nu.INTERIOR&&o!==Nu.BOUNDARY||this._label.setLocation(i,Nu.INTERIOR)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(uh),ch=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createNode=function(e){return new rf(e,new lh)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(lf),fh=function e(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=e.orientation(t)};fh.prototype.compareTo=function(e){var t=e;return fh.compareOriented(this._pts,this._orientation,t._pts,t._orientation)},fh.prototype.interfaces_=function(){return[Pu]},fh.prototype.getClass=function(){return fh},fh.orientation=function(e){return 1===Nl.increasingDirection(e)},fh.compareOriented=function(e,t,r,n){for(var i=t?1:-1,o=n?1:-1,a=t?e.length:-1,s=n?r.length:-1,u=t?0:e.length-1,l=n?0:r.length-1;;){var c=e[u].compareTo(r[l]);if(0!==c)return c;var f=(u+=i)===a,h=(l+=o)===s;if(f&&!h)return-1;if(!f&&h)return 1;if(f&&h)return 0}};var hh=function(){this._edges=new Il,this._ocaMap=new Xl};hh.prototype.print=function(e){e.print("MULTILINESTRING ( ");for(var t=0;t<this._edges.size();t++){var r=this._edges.get(t);t>0&&e.print(","),e.print("(");for(var n=r.getCoordinates(),i=0;i<n.length;i++)i>0&&e.print(","),e.print(n[i].x+" "+n[i].y);e.println(")")}e.print(") ")},hh.prototype.addAll=function(e){for(var t=e.iterator();t.hasNext();)this.add(t.next())},hh.prototype.findEdgeIndex=function(e){for(var t=0;t<this._edges.size();t++)if(this._edges.get(t).equals(e))return t;return-1},hh.prototype.iterator=function(){return this._edges.iterator()},hh.prototype.getEdges=function(){return this._edges},hh.prototype.get=function(e){return this._edges.get(e)},hh.prototype.findEqualEdge=function(e){var t=new fh(e.getCoordinates());return this._ocaMap.get(t)},hh.prototype.add=function(e){this._edges.add(e);var t=new fh(e.getCoordinates());this._ocaMap.put(t,e)},hh.prototype.interfaces_=function(){return[]},hh.prototype.getClass=function(){return hh};var ph=function(){};ph.prototype.processIntersections=function(e,t,r,n){},ph.prototype.isDone=function(){},ph.prototype.interfaces_=function(){return[]},ph.prototype.getClass=function(){return ph};var dh=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var e=arguments[0];this._li=e};dh.prototype.isTrivialIntersection=function(e,t,r,n){if(e===r&&1===this._li.getIntersectionNum()){if(dh.isAdjacentSegments(t,n))return!0;if(e.isClosed()){var i=e.size()-1;if(0===t&&n===i||0===n&&t===i)return!0}}return!1},dh.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},dh.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},dh.prototype.getLineIntersector=function(){return this._li},dh.prototype.hasProperIntersection=function(){return this._hasProper},dh.prototype.processIntersections=function(e,t,r,n){if(e===r&&t===n)return null;this.numTests++;var i=e.getCoordinates()[t],o=e.getCoordinates()[t+1],a=r.getCoordinates()[n],s=r.getCoordinates()[n+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(e,t,r,n)||(this._hasIntersection=!0,e.addIntersections(this._li,t,0),r.addIntersections(this._li,n,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},dh.prototype.hasIntersection=function(){return this._hasIntersection},dh.prototype.isDone=function(){return!1},dh.prototype.hasInteriorIntersection=function(){return this._hasInterior},dh.prototype.interfaces_=function(){return[ph]},dh.prototype.getClass=function(){return dh},dh.isAdjacentSegments=function(e,t){return 1===Math.abs(e-t)};var yh=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var e=arguments[0],t=arguments[1],r=arguments[2];this.coord=new Mu(e),this.segmentIndex=t,this.dist=r};yh.prototype.getSegmentIndex=function(){return this.segmentIndex},yh.prototype.getCoordinate=function(){return this.coord},yh.prototype.print=function(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex),e.println(" dist = "+this.dist)},yh.prototype.compareTo=function(e){var t=e;return this.compare(t.segmentIndex,t.dist)},yh.prototype.isEndPoint=function(e){return 0===this.segmentIndex&&0===this.dist||this.segmentIndex===e},yh.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},yh.prototype.getDistance=function(){return this.dist},yh.prototype.compare=function(e,t){return this.segmentIndex<e?-1:this.segmentIndex>e?1:this.dist<t?-1:this.dist>t?1:0},yh.prototype.interfaces_=function(){return[Pu]},yh.prototype.getClass=function(){return yh};var gh=function(){this._nodeMap=new Xl,this.edge=null;var e=arguments[0];this.edge=e};gh.prototype.print=function(e){e.println("Intersections:");for(var t=this.iterator();t.hasNext();)t.next().print(e)},gh.prototype.iterator=function(){return this._nodeMap.values().iterator()},gh.prototype.addSplitEdges=function(e){this.addEndpoints();for(var t=this.iterator(),r=t.next();t.hasNext();){var n=t.next(),i=this.createSplitEdge(r,n);e.add(i),r=n}},gh.prototype.addEndpoints=function(){var e=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[e],e,0)},gh.prototype.createSplitEdge=function(e,t){var r=t.segmentIndex-e.segmentIndex+2,n=this.edge.pts[t.segmentIndex],i=t.dist>0||!t.coord.equals2D(n);i||r--;var o=new Array(r).fill(null),a=0;o[a++]=new Mu(e.coord);for(var s=e.segmentIndex+1;s<=t.segmentIndex;s++)o[a++]=this.edge.pts[s];return i&&(o[a]=t.coord),new Sh(o,new Kc(this.edge._label))},gh.prototype.add=function(e,t,r){var n=new yh(e,t,r),i=this._nodeMap.get(n);return null!==i?i:(this._nodeMap.put(n,n),n)},gh.prototype.isIntersection=function(e){for(var t=this.iterator();t.hasNext();)if(t.next().coord.equals(e))return!0;return!1},gh.prototype.interfaces_=function(){return[]},gh.prototype.getClass=function(){return gh};var vh=function(){};vh.prototype.getChainStartIndices=function(e){var t=0,r=new Il;r.add(new Du(t));do{var n=this.findChainEnd(e,t);r.add(new Du(n)),t=n}while(t<e.length-1);return vh.toIntArray(r)},vh.prototype.findChainEnd=function(e,t){for(var r=of.quadrant(e[t],e[t+1]),n=t+1;n<e.length&&of.quadrant(e[n-1],e[n])===r;)n++;return n-1},vh.prototype.interfaces_=function(){return[]},vh.prototype.getClass=function(){return vh},vh.toIntArray=function(e){for(var t=new Array(e.size()).fill(null),r=0;r<t.length;r++)t[r]=e.get(r).intValue();return t};var mh=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new Ku,this.env2=new Ku;var e=arguments[0];this.e=e,this.pts=e.getCoordinates();var t=new vh;this.startIndex=t.getChainStartIndices(this.pts)};mh.prototype.getCoordinates=function(){return this.pts},mh.prototype.getMaxX=function(e){var t=this.pts[this.startIndex[e]].x,r=this.pts[this.startIndex[e+1]].x;return t>r?t:r},mh.prototype.getMinX=function(e){var t=this.pts[this.startIndex[e]].x,r=this.pts[this.startIndex[e+1]].x;return t<r?t:r},mh.prototype.computeIntersectsForChain=function(){if(4===arguments.length){var e=arguments[0],t=arguments[1],r=arguments[2],n=arguments[3];this.computeIntersectsForChain(this.startIndex[e],this.startIndex[e+1],t,t.startIndex[r],t.startIndex[r+1],n)}else if(6===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3],u=arguments[4],l=arguments[5],c=this.pts[i],f=this.pts[o],h=a.pts[s],p=a.pts[u];if(o-i==1&&u-s==1)return l.addIntersections(this.e,i,a.e,s),null;if(this.env1.init(c,f),this.env2.init(h,p),!this.env1.intersects(this.env2))return null;var d=Math.trunc((i+o)/2),y=Math.trunc((s+u)/2);i<d&&(s<y&&this.computeIntersectsForChain(i,d,a,s,y,l),y<u&&this.computeIntersectsForChain(i,d,a,y,u,l)),d<o&&(s<y&&this.computeIntersectsForChain(d,o,a,s,y,l),y<u&&this.computeIntersectsForChain(d,o,a,y,u,l))}},mh.prototype.getStartIndexes=function(){return this.startIndex},mh.prototype.computeIntersects=function(e,t){for(var r=0;r<this.startIndex.length-1;r++)for(var n=0;n<e.startIndex.length-1;n++)this.computeIntersectsForChain(r,e,n,t)},mh.prototype.interfaces_=function(){return[]},mh.prototype.getClass=function(){return mh};var _h=function e(){this._depth=Array(2).fill().map(function(){return Array(3)});for(var t=0;t<2;t++)for(var r=0;r<3;r++)this._depth[t][r]=e.NULL_VALUE},bh={NULL_VALUE:{configurable:!0}};_h.prototype.getDepth=function(e,t){return this._depth[e][t]},_h.prototype.setDepth=function(e,t,r){this._depth[e][t]=r},_h.prototype.isNull=function(){if(0===arguments.length){for(var e=0;e<2;e++)for(var t=0;t<3;t++)if(this._depth[e][t]!==_h.NULL_VALUE)return!1;return!0}if(1===arguments.length){var r=arguments[0];return this._depth[r][1]===_h.NULL_VALUE}if(2===arguments.length){var n=arguments[0],i=arguments[1];return this._depth[n][i]===_h.NULL_VALUE}},_h.prototype.normalize=function(){for(var e=this,t=0;t<2;t++)if(!e.isNull(t)){var r=e._depth[t][1];e._depth[t][2]<r&&(r=e._depth[t][2]),r<0&&(r=0);for(var n=1;n<3;n++){var i=0;e._depth[t][n]>r&&(i=1),e._depth[t][n]=i}}},_h.prototype.getDelta=function(e){return this._depth[e][qc.RIGHT]-this._depth[e][qc.LEFT]},_h.prototype.getLocation=function(e,t){return this._depth[e][t]<=0?Nu.EXTERIOR:Nu.INTERIOR},_h.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},_h.prototype.add=function(){var e=this;if(1===arguments.length)for(var t=arguments[0],r=0;r<2;r++)for(var n=1;n<3;n++){var i=t.getLocation(r,n);i!==Nu.EXTERIOR&&i!==Nu.INTERIOR||(e.isNull(r,n)?e._depth[r][n]=_h.depthAtLocation(i):e._depth[r][n]+=_h.depthAtLocation(i))}else if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2];s===Nu.INTERIOR&&this._depth[o][a]++}},_h.prototype.interfaces_=function(){return[]},_h.prototype.getClass=function(){return _h},_h.depthAtLocation=function(e){return e===Nu.EXTERIOR?0:e===Nu.INTERIOR?1:_h.NULL_VALUE},bh.NULL_VALUE.get=function(){return-1},Object.defineProperties(_h,bh);var Sh=function(e){function t(){if(e.call(this),this.pts=null,this._env=null,this.eiList=new gh(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new _h,this._depthDelta=0,1===arguments.length){var r=arguments[0];t.call(this,r,null)}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.pts=n,this._label=i}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDepth=function(){return this._depth},t.prototype.getCollapsedEdge=function(){var e=new Array(2).fill(null);return e[0]=this.pts[0],e[1]=this.pts[1],new t(e,Kc.toLineLabel(this._label))},t.prototype.isIsolated=function(){return this._isIsolated},t.prototype.getCoordinates=function(){return this.pts},t.prototype.setIsolated=function(e){this._isIsolated=e},t.prototype.setName=function(e){this._name=e},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;if(this.pts.length!==r.pts.length)return!1;for(var n=!0,i=!0,o=this.pts.length,a=0;a<this.pts.length;a++)if(this.pts[a].equals2D(r.pts[a])||(n=!1),this.pts[a].equals2D(r.pts[--o])||(i=!1),!n&&!i)return!1;return!0},t.prototype.getCoordinate=function(){if(0===arguments.length)return this.pts.length>0?this.pts[0]:null;if(1===arguments.length){var e=arguments[0];return this.pts[e]}},t.prototype.print=function(e){e.print("edge "+this._name+": "),e.print("LINESTRING (");for(var t=0;t<this.pts.length;t++)t>0&&e.print(","),e.print(this.pts[t].x+" "+this.pts[t].y);e.print(") "+this._label+" "+this._depthDelta)},t.prototype.computeIM=function(e){t.updateIM(this._label,e)},t.prototype.isCollapsed=function(){return!!this._label.isArea()&&3===this.pts.length&&!!this.pts[0].equals(this.pts[2])},t.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},t.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},t.prototype.getDepthDelta=function(){return this._depthDelta},t.prototype.getNumPoints=function(){return this.pts.length},t.prototype.printReverse=function(e){e.print("edge "+this._name+": ");for(var t=this.pts.length-1;t>=0;t--)e.print(this.pts[t]+" ");e.println("")},t.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new mh(this)),this._mce},t.prototype.getEnvelope=function(){if(null===this._env){this._env=new Ku;for(var e=0;e<this.pts.length;e++)this._env.expandToInclude(this.pts[e])}return this._env},t.prototype.addIntersection=function(e,t,r,n){var i=new Mu(e.getIntersection(n)),o=t,a=e.getEdgeDistance(r,n),s=o+1;if(s<this.pts.length){var u=this.pts[s];i.equals2D(u)&&(o=s,a=0)}this.eiList.add(i,o,a)},t.prototype.toString=function(){var e=new Au;e.append("edge "+this._name+": "),e.append("LINESTRING (");for(var t=0;t<this.pts.length;t++)t>0&&e.append(","),e.append(this.pts[t].x+" "+this.pts[t].y);return e.append(") "+this._label+" "+this._depthDelta),e.toString()},t.prototype.isPointwiseEqual=function(e){if(this.pts.length!==e.pts.length)return!1;for(var t=0;t<this.pts.length;t++)if(!this.pts[t].equals2D(e.pts[t]))return!1;return!0},t.prototype.setDepthDelta=function(e){this._depthDelta=e},t.prototype.getEdgeIntersectionList=function(){return this.eiList},t.prototype.addIntersections=function(e,t,r){for(var n=0;n<e.getIntersectionNum();n++)this.addIntersection(e,t,r,n)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.updateIM=function(){if(2!==arguments.length)return e.prototype.updateIM.apply(this,arguments);var t=arguments[0],r=arguments[1];r.setAtLeastIfValid(t.getLocation(0,qc.ON),t.getLocation(1,qc.ON),1),t.isArea()&&(r.setAtLeastIfValid(t.getLocation(0,qc.LEFT),t.getLocation(1,qc.LEFT),2),r.setAtLeastIfValid(t.getLocation(0,qc.RIGHT),t.getLocation(1,qc.RIGHT),2))},t}(tf),xh=function(e){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new hh,this._bufParams=e||null};xh.prototype.setWorkingPrecisionModel=function(e){this._workingPrecisionModel=e},xh.prototype.insertUniqueEdge=function(e){var t=this._edgeList.findEqualEdge(e);if(null!==t){var r=t.getLabel(),n=e.getLabel();t.isPointwiseEqual(e)||(n=new Kc(e.getLabel())).flip(),r.merge(n);var i=xh.depthDelta(n),o=t.getDepthDelta()+i;t.setDepthDelta(o)}else this._edgeList.add(e),e.setDepthDelta(xh.depthDelta(e.getLabel()))},xh.prototype.buildSubgraphs=function(e,t){for(var r=new Il,n=e.iterator();n.hasNext();){var i=n.next(),o=i.getRightmostCoordinate(),a=new eh(r).getDepth(o);i.computeDepth(a),i.findResultEdges(),r.add(i),t.add(i.getDirectedEdges(),i.getNodes())}},xh.prototype.createSubgraphs=function(e){for(var t=new Il,r=e.getNodes().iterator();r.hasNext();){var n=r.next();if(!n.isVisited()){var i=new Zc;i.create(n),t.add(i)}}return _f.sort(t,_f.reverseOrder()),t},xh.prototype.createEmptyResultGeometry=function(){return this._geomFact.createPolygon()},xh.prototype.getNoder=function(e){if(null!==this._workingNoder)return this._workingNoder;var t=new Bf,r=new ll;return r.setPrecisionModel(e),t.setSegmentIntersector(new dh(r)),t},xh.prototype.buffer=function(e,t){var r=this._workingPrecisionModel;null===r&&(r=e.getPrecisionModel()),this._geomFact=e.getFactory();var n=new $f(r,this._bufParams),i=new ih(e,t,n).getCurves();if(i.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(i,r),this._graph=new cf(new ch),this._graph.addEdges(this._edgeList.getEdges());var o=this.createSubgraphs(this._graph),a=new ff(this._geomFact);this.buildSubgraphs(o,a);var s=a.getPolygons();return s.size()<=0?this.createEmptyResultGeometry():this._geomFact.buildGeometry(s)},xh.prototype.computeNodedEdges=function(e,t){var r=this.getNoder(t);r.computeNodes(e);for(var n=r.getNodedSubstrings().iterator();n.hasNext();){var i=n.next(),o=i.getCoordinates();if(2!==o.length||!o[0].equals2D(o[1])){var a=i.getData(),s=new Sh(i.getCoordinates(),new Kc(a));this.insertUniqueEdge(s)}}},xh.prototype.setNoder=function(e){this._workingNoder=e},xh.prototype.interfaces_=function(){return[]},xh.prototype.getClass=function(){return xh},xh.depthDelta=function(e){var t=e.getLocation(0,qc.LEFT),r=e.getLocation(0,qc.RIGHT);return t===Nu.INTERIOR&&r===Nu.EXTERIOR?1:t===Nu.EXTERIOR&&r===Nu.INTERIOR?-1:0},xh.convertSegStrings=function(e){for(var t=new Rc,r=new Il;e.hasNext();){var n=e.next(),i=t.createLineString(n.getCoordinates());r.add(i)}return t.buildGeometry(r)};var wh=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,2===arguments.length){var e=arguments[0],t=arguments[1];this._noder=e,this._scaleFactor=t,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(4===arguments.length){var r=arguments[0],n=arguments[1],i=arguments[2],o=arguments[3];this._noder=r,this._scaleFactor=n,this._offsetX=i,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};wh.prototype.rescale=function(){var e=this;if(ju(arguments[0],Pl))for(var t=arguments[0],r=t.iterator();r.hasNext();){var n=r.next();e.rescale(n.getCoordinates())}else if(arguments[0]instanceof Array){for(var i=arguments[0],o=0;o<i.length;o++)i[o].x=i[o].x/e._scaleFactor+e._offsetX,i[o].y=i[o].y/e._scaleFactor+e._offsetY;2===i.length&&i[0].equals2D(i[1])&&Zu.out.println(i)}},wh.prototype.scale=function(){var e=this;if(ju(arguments[0],Pl)){for(var t=arguments[0],r=new Il,n=t.iterator();n.hasNext();){var i=n.next();r.add(new Nf(e.scale(i.getCoordinates()),i.getData()))}return r}if(arguments[0]instanceof Array){for(var o=arguments[0],a=new Array(o.length).fill(null),s=0;s<o.length;s++)a[s]=new Mu(Math.round((o[s].x-e._offsetX)*e._scaleFactor),Math.round((o[s].y-e._offsetY)*e._scaleFactor),o[s].z);var u=Nl.removeRepeatedPoints(a);return u}},wh.prototype.isIntegerPrecision=function(){return 1===this._scaleFactor},wh.prototype.getNodedSubstrings=function(){var e=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(e),e},wh.prototype.computeNodes=function(e){var t=e;this._isScaled&&(t=this.scale(e)),this._noder.computeNodes(t)},wh.prototype.interfaces_=function(){return[Df]},wh.prototype.getClass=function(){return wh};var Oh=function(){this._li=new ll,this._segStrings=null;var e=arguments[0];this._segStrings=e},Ph={fact:{configurable:!0}};Oh.prototype.checkEndPtVertexIntersections=function(){var e=this;if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var r=t.next(),n=r.getCoordinates();e.checkEndPtVertexIntersections(n[0],e._segStrings),e.checkEndPtVertexIntersections(n[n.length-1],e._segStrings)}else if(2===arguments.length)for(var i=arguments[0],o=arguments[1],a=o.iterator();a.hasNext();)for(var s=a.next(),u=s.getCoordinates(),l=1;l<u.length-1;l++)if(u[l].equals(i))throw new il("found endpt/interior pt intersection at index "+l+" :pt "+i)},Oh.prototype.checkInteriorIntersections=function(){if(0===arguments.length)for(var e=this._segStrings.iterator();e.hasNext();)for(var t=e.next(),r=this._segStrings.iterator();r.hasNext();){var n=r.next();this.checkInteriorIntersections(t,n)}else if(2===arguments.length)for(var i=arguments[0],o=arguments[1],a=i.getCoordinates(),s=o.getCoordinates(),u=0;u<a.length-1;u++)for(var l=0;l<s.length-1;l++)this.checkInteriorIntersections(i,u,o,l);else if(4===arguments.length){var c=arguments[0],f=arguments[1],h=arguments[2],p=arguments[3];if(c===h&&f===p)return null;var d=c.getCoordinates()[f],y=c.getCoordinates()[f+1],g=h.getCoordinates()[p],v=h.getCoordinates()[p+1];if(this._li.computeIntersection(d,y,g,v),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,d,y)||this.hasInteriorIntersection(this._li,g,v)))throw new il("found non-noded intersection at "+d+"-"+y+" and "+g+"-"+v)}},Oh.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},Oh.prototype.checkCollapses=function(){if(0===arguments.length)for(var e=this._segStrings.iterator();e.hasNext();){var t=e.next();this.checkCollapses(t)}else if(1===arguments.length)for(var r=arguments[0],n=r.getCoordinates(),i=0;i<n.length-2;i++)this.checkCollapse(n[i],n[i+1],n[i+2])},Oh.prototype.hasInteriorIntersection=function(e,t,r){for(var n=0;n<e.getIntersectionNum();n++){var i=e.getIntersection(n);if(!i.equals(t)&&!i.equals(r))return!0}return!1},Oh.prototype.checkCollapse=function(e,t,r){if(e.equals(r))throw new il("found non-noded collapse at "+Oh.fact.createLineString([e,t,r]))},Oh.prototype.interfaces_=function(){return[]},Oh.prototype.getClass=function(){return Oh},Ph.fact.get=function(){return new Rc},Object.defineProperties(Oh,Ph);var Eh=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var e=arguments[0],t=arguments[1],r=arguments[2];if(this._originalPt=e,this._pt=e,this._scaleFactor=t,this._li=r,t<=0)throw new xu("Scale factor must be non-zero");1!==t&&(this._pt=new Mu(this.scale(e.x),this.scale(e.y)),this._p0Scaled=new Mu,this._p1Scaled=new Mu),this.initCorners(this._pt)},kh={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};Eh.prototype.intersectsScaled=function(e,t){var r=Math.min(e.x,t.x),n=Math.max(e.x,t.x),i=Math.min(e.y,t.y),o=Math.max(e.y,t.y),a=this._maxx<r||this._minx>n||this._maxy<i||this._miny>o;if(a)return!1;var s=this.intersectsToleranceSquare(e,t);return al.isTrue(!(a&&s),"Found bad envelope test"),s},Eh.prototype.initCorners=function(e){this._minx=e.x-.5,this._maxx=e.x+.5,this._miny=e.y-.5,this._maxy=e.y+.5,this._corner[0]=new Mu(this._maxx,this._maxy),this._corner[1]=new Mu(this._minx,this._maxy),this._corner[2]=new Mu(this._minx,this._miny),this._corner[3]=new Mu(this._maxx,this._miny)},Eh.prototype.intersects=function(e,t){return 1===this._scaleFactor?this.intersectsScaled(e,t):(this.copyScaled(e,this._p0Scaled),this.copyScaled(t,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},Eh.prototype.scale=function(e){return Math.round(e*this._scaleFactor)},Eh.prototype.getCoordinate=function(){return this._originalPt},Eh.prototype.copyScaled=function(e,t){t.x=this.scale(e.x),t.y=this.scale(e.y)},Eh.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var e=Eh.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Ku(this._originalPt.x-e,this._originalPt.x+e,this._originalPt.y-e,this._originalPt.y+e)}return this._safeEnv},Eh.prototype.intersectsPixelClosure=function(e,t){return this._li.computeIntersection(e,t,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[1],this._corner[2]),this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[2],this._corner[3]),this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[3],this._corner[0]),this._li.hasIntersection()))))},Eh.prototype.intersectsToleranceSquare=function(e,t){var r=!1,n=!1;return this._li.computeIntersection(e,t,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(e,t,this._corner[1],this._corner[2]),this._li.isProper()||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(e,t,this._corner[2],this._corner[3]),this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(e,t,this._corner[3],this._corner[0]),this._li.isProper()||r&&n||e.equals(this._pt)||t.equals(this._pt)))))},Eh.prototype.addSnappedNode=function(e,t){var r=e.getCoordinate(t),n=e.getCoordinate(t+1);return!!this.intersects(r,n)&&(e.addIntersection(this.getCoordinate(),t),!0)},Eh.prototype.interfaces_=function(){return[]},Eh.prototype.getClass=function(){return Eh},kh.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(Eh,kh);var Th=function(){this.tempEnv1=new Ku,this.selectedSegment=new Rf};Th.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var e=arguments[0],t=arguments[1];e.getLineSegment(t,this.selectedSegment),this.select(this.selectedSegment)}},Th.prototype.interfaces_=function(){return[]},Th.prototype.getClass=function(){return Th};var Mh=function(){this._index=null;var e=arguments[0];this._index=e},Ih={HotPixelSnapAction:{configurable:!0}};Mh.prototype.snap=function(){if(1===arguments.length){var e=arguments[0];return this.snap(e,null,-1)}if(3===arguments.length){var t=arguments[0],r=arguments[1],n=arguments[2],i=t.getSafeEnvelope(),o=new Lh(t,r,n);return this._index.query(i,{interfaces_:function(){return[yf]},visitItem:function(e){e.select(i,o)}}),o.isNodeAdded()}},Mh.prototype.interfaces_=function(){return[]},Mh.prototype.getClass=function(){return Mh},Ih.HotPixelSnapAction.get=function(){return Lh},Object.defineProperties(Mh,Ih);var Lh=function(e){function t(){e.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var t=arguments[0],r=arguments[1],n=arguments[2];this._hotPixel=t,this._parentEdge=r,this._hotPixelVertexIndex=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.isNodeAdded=function(){return this._isNodeAdded},t.prototype.select=function(){if(2!==arguments.length)return e.prototype.select.apply(this,arguments);var t=arguments[0],r=arguments[1],n=t.getContext();if(null!==this._parentEdge&&n===this._parentEdge&&r===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(n,r)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Th),Ch=function(){this._li=null,this._interiorIntersections=null;var e=arguments[0];this._li=e,this._interiorIntersections=new Il};Ch.prototype.processIntersections=function(e,t,r,n){if(e===r&&t===n)return null;var i=e.getCoordinates()[t],o=e.getCoordinates()[t+1],a=r.getCoordinates()[n],s=r.getCoordinates()[n+1];if(this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var u=0;u<this._li.getIntersectionNum();u++)this._interiorIntersections.add(this._li.getIntersection(u));e.addIntersections(this._li,t,0),r.addIntersections(this._li,n,1)}},Ch.prototype.isDone=function(){return!1},Ch.prototype.getInteriorIntersections=function(){return this._interiorIntersections},Ch.prototype.interfaces_=function(){return[ph]},Ch.prototype.getClass=function(){return Ch};var Nh=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var e=arguments[0];this._pm=e,this._li=new ll,this._li.setPrecisionModel(e),this._scaleFactor=e.getScale()};Nh.prototype.checkCorrectness=function(e){var t=Nf.getNodedSubstrings(e),r=new Oh(t);try{r.checkValid()}catch(e){if(!(e instanceof Hu))throw e;e.printStackTrace()}},Nh.prototype.getNodedSubstrings=function(){return Nf.getNodedSubstrings(this._nodedSegStrings)},Nh.prototype.snapRound=function(e,t){var r=this.findInteriorIntersections(e,t);this.computeIntersectionSnaps(r),this.computeVertexSnaps(e)},Nh.prototype.findInteriorIntersections=function(e,t){var r=new Ch(t);return this._noder.setSegmentIntersector(r),this._noder.computeNodes(e),r.getInteriorIntersections()},Nh.prototype.computeVertexSnaps=function(){var e=this;if(ju(arguments[0],Pl))for(var t=arguments[0],r=t.iterator();r.hasNext();){var n=r.next();e.computeVertexSnaps(n)}else if(arguments[0]instanceof Nf)for(var i=arguments[0],o=i.getCoordinates(),a=0;a<o.length;a++){var s=new Eh(o[a],e._scaleFactor,e._li),u=e._pointSnapper.snap(s,i,a);u&&i.addIntersection(o[a],a)}},Nh.prototype.computeNodes=function(e){this._nodedSegStrings=e,this._noder=new Bf,this._pointSnapper=new Mh(this._noder.getIndex()),this.snapRound(e,this._li)},Nh.prototype.computeIntersectionSnaps=function(e){for(var t=this,r=e.iterator();r.hasNext();){var n=r.next(),i=new Eh(n,t._scaleFactor,t._li);t._pointSnapper.snap(i)}},Nh.prototype.interfaces_=function(){return[Df]},Nh.prototype.getClass=function(){return Nh};var Rh=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new Jf,this._resultGeometry=null,this._saveException=null,1===arguments.length){var e=arguments[0];this._argGeom=e}else if(2===arguments.length){var t=arguments[0],r=arguments[1];this._argGeom=t,this._bufParams=r}},jh={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};Rh.prototype.bufferFixedPrecision=function(e){var t=new wh(new Nh(new Ic(1)),e.getScale()),r=new xh(this._bufParams);r.setWorkingPrecisionModel(e),r.setNoder(t),this._resultGeometry=r.buffer(this._argGeom,this._distance)},Rh.prototype.bufferReducedPrecision=function(){var e=this;if(0===arguments.length){for(var t=Rh.MAX_PRECISION_DIGITS;t>=0;t--){try{e.bufferReducedPrecision(t)}catch(t){if(!(t instanceof Hc))throw t;e._saveException=t}if(null!==e._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var r=arguments[0],n=Rh.precisionScaleFactor(this._argGeom,this._distance,r),i=new Ic(n);this.bufferFixedPrecision(i)}},Rh.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var e=this._argGeom.getFactory().getPrecisionModel();e.getType()===Ic.FIXED?this.bufferFixedPrecision(e):this.bufferReducedPrecision()},Rh.prototype.setQuadrantSegments=function(e){this._bufParams.setQuadrantSegments(e)},Rh.prototype.bufferOriginalPrecision=function(){try{var e=new xh(this._bufParams);this._resultGeometry=e.buffer(this._argGeom,this._distance)}catch(e){if(!(e instanceof il))throw e;this._saveException=e}},Rh.prototype.getResultGeometry=function(e){return this._distance=e,this.computeGeometry(),this._resultGeometry},Rh.prototype.setEndCapStyle=function(e){this._bufParams.setEndCapStyle(e)},Rh.prototype.interfaces_=function(){return[]},Rh.prototype.getClass=function(){return Rh},Rh.bufferOp=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1],r=new Rh(e),n=r.getResultGeometry(t);return n}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof yl&&"number"==typeof arguments[1]){var i=arguments[0],o=arguments[1],a=arguments[2],s=new Rh(i);s.setQuadrantSegments(a);var u=s.getResultGeometry(o);return u}if(arguments[2]instanceof Jf&&arguments[0]instanceof yl&&"number"==typeof arguments[1]){var l=arguments[0],c=arguments[1],f=arguments[2],h=new Rh(l,f),p=h.getResultGeometry(c);return p}}else if(4===arguments.length){var d=arguments[0],y=arguments[1],g=arguments[2],v=arguments[3],m=new Rh(d);m.setQuadrantSegments(g),m.setEndCapStyle(v);var _=m.getResultGeometry(y);return _}},Rh.precisionScaleFactor=function(e,t,r){var n=e.getEnvelopeInternal(),i=Gu.max(Math.abs(n.getMaxX()),Math.abs(n.getMaxY()),Math.abs(n.getMinX()),Math.abs(n.getMinY()))+2*(t>0?t:0),o=r-Math.trunc(Math.log(i)/Math.log(10)+1);return Math.pow(10,o)},jh.CAP_ROUND.get=function(){return Jf.CAP_ROUND},jh.CAP_BUTT.get=function(){return Jf.CAP_FLAT},jh.CAP_FLAT.get=function(){return Jf.CAP_FLAT},jh.CAP_SQUARE.get=function(){return Jf.CAP_SQUARE},jh.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(Rh,jh);var Gh=function(){this._pt=[new Mu,new Mu],this._distance=wu.NaN,this._isNull=!0};Gh.prototype.getCoordinates=function(){return this._pt},Gh.prototype.getCoordinate=function(e){return this._pt[e]},Gh.prototype.setMinimum=function(){if(1===arguments.length){var e=arguments[0];this.setMinimum(e._pt[0],e._pt[1])}else if(2===arguments.length){var t=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(t,r),null;var n=t.distance(r);n<this._distance&&this.initialize(t,r,n)}},Gh.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var e=arguments[0],t=arguments[1];this._pt[0].setCoordinate(e),this._pt[1].setCoordinate(t),this._distance=e.distance(t),this._isNull=!1}else if(3===arguments.length){var r=arguments[0],n=arguments[1],i=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(n),this._distance=i,this._isNull=!1}},Gh.prototype.getDistance=function(){return this._distance},Gh.prototype.setMaximum=function(){if(1===arguments.length){var e=arguments[0];this.setMaximum(e._pt[0],e._pt[1])}else if(2===arguments.length){var t=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(t,r),null;var n=t.distance(r);n>this._distance&&this.initialize(t,r,n)}},Gh.prototype.interfaces_=function(){return[]},Gh.prototype.getClass=function(){return Gh};var Vh=function(){};Vh.prototype.interfaces_=function(){return[]},Vh.prototype.getClass=function(){return Vh},Vh.computeDistance=function(){if(arguments[2]instanceof Gh&&arguments[0]instanceof hc&&arguments[1]instanceof Mu)for(var e=arguments[0],t=arguments[1],r=arguments[2],n=e.getCoordinates(),i=new Rf,o=0;o<n.length-1;o++){i.setCoordinates(n[o],n[o+1]);var a=i.closestPoint(t);r.setMinimum(a,t)}else if(arguments[2]instanceof Gh&&arguments[0]instanceof gc&&arguments[1]instanceof Mu){var s=arguments[0],u=arguments[1],l=arguments[2];Vh.computeDistance(s.getExteriorRing(),u,l);for(var c=0;c<s.getNumInteriorRing();c++)Vh.computeDistance(s.getInteriorRingN(c),u,l)}else if(arguments[2]instanceof Gh&&arguments[0]instanceof yl&&arguments[1]instanceof Mu){var f=arguments[0],h=arguments[1],p=arguments[2];if(f instanceof hc)Vh.computeDistance(f,h,p);else if(f instanceof gc)Vh.computeDistance(f,h,p);else if(f instanceof ic)for(var d=f,y=0;y<d.getNumGeometries();y++){var g=d.getGeometryN(y);Vh.computeDistance(g,h,p)}else p.setMinimum(f.getCoordinate(),h)}else if(arguments[2]instanceof Gh&&arguments[0]instanceof Rf&&arguments[1]instanceof Mu){var v=arguments[0],m=arguments[1],_=arguments[2],b=v.closestPoint(m);_.setMinimum(b,m)}};var Ah=function(e){this._maxPtDist=new Gh,this._inputGeom=e||null},Dh={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};Ah.prototype.computeMaxMidpointDistance=function(e){var t=new Bh(this._inputGeom);e.apply(t),this._maxPtDist.setMaximum(t.getMaxPointDistance())},Ah.prototype.computeMaxVertexDistance=function(e){var t=new Fh(this._inputGeom);e.apply(t),this._maxPtDist.setMaximum(t.getMaxPointDistance())},Ah.prototype.findDistance=function(e){return this.computeMaxVertexDistance(e),this.computeMaxMidpointDistance(e),this._maxPtDist.getDistance()},Ah.prototype.getDistancePoints=function(){return this._maxPtDist},Ah.prototype.interfaces_=function(){return[]},Ah.prototype.getClass=function(){return Ah},Dh.MaxPointDistanceFilter.get=function(){return Fh},Dh.MaxMidpointDistanceFilter.get=function(){return Bh},Object.defineProperties(Ah,Dh);var Fh=function(e){this._maxPtDist=new Gh,this._minPtDist=new Gh,this._geom=e||null};Fh.prototype.filter=function(e){this._minPtDist.initialize(),Vh.computeDistance(this._geom,e,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Fh.prototype.getMaxPointDistance=function(){return this._maxPtDist},Fh.prototype.interfaces_=function(){return[ml]},Fh.prototype.getClass=function(){return Fh};var Bh=function(e){this._maxPtDist=new Gh,this._minPtDist=new Gh,this._geom=e||null};Bh.prototype.filter=function(e,t){if(0===t)return null;var r=e.getCoordinate(t-1),n=e.getCoordinate(t),i=new Mu((r.x+n.x)/2,(r.y+n.y)/2);this._minPtDist.initialize(),Vh.computeDistance(this._geom,i,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Bh.prototype.isDone=function(){return!1},Bh.prototype.isGeometryChanged=function(){return!1},Bh.prototype.getMaxPointDistance=function(){return this._maxPtDist},Bh.prototype.interfaces_=function(){return[nc]},Bh.prototype.getClass=function(){return Bh};var qh=function(e){this._comps=e||null};qh.prototype.filter=function(e){e instanceof gc&&this._comps.add(e)},qh.prototype.interfaces_=function(){return[rc]},qh.prototype.getClass=function(){return qh},qh.getPolygons=function(){if(1===arguments.length){var e=arguments[0];return qh.getPolygons(e,new Il)}if(2===arguments.length){var t=arguments[0],r=arguments[1];return t instanceof gc?r.add(t):t instanceof ic&&t.apply(new qh(r)),r}};var Jh=function(){if(this._lines=null,this._isForcedToLineString=!1,1===arguments.length){var e=arguments[0];this._lines=e}else if(2===arguments.length){var t=arguments[0],r=arguments[1];this._lines=t,this._isForcedToLineString=r}};Jh.prototype.filter=function(e){if(this._isForcedToLineString&&e instanceof mc){var t=e.getFactory().createLineString(e.getCoordinateSequence());return this._lines.add(t),null}e instanceof hc&&this._lines.add(e)},Jh.prototype.setForceToLineString=function(e){this._isForcedToLineString=e},Jh.prototype.interfaces_=function(){return[dl]},Jh.prototype.getClass=function(){return Jh},Jh.getGeometry=function(){if(1===arguments.length){var e=arguments[0];return e.getFactory().buildGeometry(Jh.getLines(e))}if(2===arguments.length){var t=arguments[0],r=arguments[1];return t.getFactory().buildGeometry(Jh.getLines(t,r))}},Jh.getLines=function(){if(1===arguments.length){var e=arguments[0];return Jh.getLines(e,!1)}if(2===arguments.length){if(ju(arguments[0],Pl)&&ju(arguments[1],Pl)){for(var t=arguments[0],r=arguments[1],n=t.iterator();n.hasNext();){var i=n.next();Jh.getLines(i,r)}return r}if(arguments[0]instanceof yl&&"boolean"==typeof arguments[1]){var o=arguments[0],a=arguments[1],s=new Il;return o.apply(new Jh(s,a)),s}if(arguments[0]instanceof yl&&ju(arguments[1],Pl)){var u=arguments[0],l=arguments[1];return u instanceof hc?l.add(u):u.apply(new Jh(l)),l}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&ju(arguments[0],Pl)&&ju(arguments[1],Pl)){for(var c=arguments[0],f=arguments[1],h=arguments[2],p=c.iterator();p.hasNext();){var d=p.next();Jh.getLines(d,f,h)}return f}if("boolean"==typeof arguments[2]&&arguments[0]instanceof yl&&ju(arguments[1],Pl)){var y=arguments[0],g=arguments[1],v=arguments[2];return y.apply(new Jh(g,v)),g}}};var Uh=function(){if(this._boundaryRule=_l.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,0===arguments.length);else if(1===arguments.length){var e=arguments[0];if(null===e)throw new xu("Rule must be non-null");this._boundaryRule=e}};Uh.prototype.locateInternal=function(){if(arguments[0]instanceof Mu&&arguments[1]instanceof gc){var e=arguments[0],t=arguments[1];if(t.isEmpty())return Nu.EXTERIOR;var r=t.getExteriorRing(),n=this.locateInPolygonRing(e,r);if(n===Nu.EXTERIOR)return Nu.EXTERIOR;if(n===Nu.BOUNDARY)return Nu.BOUNDARY;for(var i=0;i<t.getNumInteriorRing();i++){var o=t.getInteriorRingN(i),a=this.locateInPolygonRing(e,o);if(a===Nu.INTERIOR)return Nu.EXTERIOR;if(a===Nu.BOUNDARY)return Nu.BOUNDARY}return Nu.INTERIOR}if(arguments[0]instanceof Mu&&arguments[1]instanceof hc){var s=arguments[0],u=arguments[1];if(!u.getEnvelopeInternal().intersects(s))return Nu.EXTERIOR;var l=u.getCoordinates();return u.isClosed()||!s.equals(l[0])&&!s.equals(l[l.length-1])?hl.isOnLine(s,l)?Nu.INTERIOR:Nu.EXTERIOR:Nu.BOUNDARY}if(arguments[0]instanceof Mu&&arguments[1]instanceof dc){var c=arguments[0],f=arguments[1],h=f.getCoordinate();return h.equals2D(c)?Nu.INTERIOR:Nu.EXTERIOR}},Uh.prototype.locateInPolygonRing=function(e,t){return t.getEnvelopeInternal().intersects(e)?hl.locatePointInRing(e,t.getCoordinates()):Nu.EXTERIOR},Uh.prototype.intersects=function(e,t){return this.locate(e,t)!==Nu.EXTERIOR},Uh.prototype.updateLocationInfo=function(e){e===Nu.INTERIOR&&(this._isIn=!0),e===Nu.BOUNDARY&&this._numBoundaries++},Uh.prototype.computeLocation=function(e,t){var r=this;if(t instanceof dc&&this.updateLocationInfo(this.locateInternal(e,t)),t instanceof hc)this.updateLocationInfo(this.locateInternal(e,t));else if(t instanceof gc)this.updateLocationInfo(this.locateInternal(e,t));else if(t instanceof oc)for(var n=t,i=0;i<n.getNumGeometries();i++){var o=n.getGeometryN(i);r.updateLocationInfo(r.locateInternal(e,o))}else if(t instanceof _c)for(var a=t,s=0;s<a.getNumGeometries();s++){var u=a.getGeometryN(s);r.updateLocationInfo(r.locateInternal(e,u))}else if(t instanceof ic)for(var l=new ah(t);l.hasNext();){var c=l.next();c!==t&&r.computeLocation(e,c)}},Uh.prototype.locate=function(e,t){return t.isEmpty()?Nu.EXTERIOR:t instanceof hc||t instanceof gc?this.locateInternal(e,t):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(e,t),this._boundaryRule.isInBoundary(this._numBoundaries)?Nu.BOUNDARY:this._numBoundaries>0||this._isIn?Nu.INTERIOR:Nu.EXTERIOR)},Uh.prototype.interfaces_=function(){return[]},Uh.prototype.getClass=function(){return Uh};var zh=function e(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length){var t=arguments[0],r=arguments[1];e.call(this,t,e.INSIDE_AREA,r)}else if(3===arguments.length){var n=arguments[0],i=arguments[1],o=arguments[2];this._component=n,this._segIndex=i,this._pt=o}},Wh={INSIDE_AREA:{configurable:!0}};zh.prototype.isInsideArea=function(){return this._segIndex===zh.INSIDE_AREA},zh.prototype.getCoordinate=function(){return this._pt},zh.prototype.getGeometryComponent=function(){return this._component},zh.prototype.getSegmentIndex=function(){return this._segIndex},zh.prototype.interfaces_=function(){return[]},zh.prototype.getClass=function(){return zh},Wh.INSIDE_AREA.get=function(){return-1},Object.defineProperties(zh,Wh);var Hh=function(e){this._pts=e||null};Hh.prototype.filter=function(e){e instanceof dc&&this._pts.add(e)},Hh.prototype.interfaces_=function(){return[rc]},Hh.prototype.getClass=function(){return Hh},Hh.getPoints=function(){if(1===arguments.length){var e=arguments[0];return e instanceof dc?_f.singletonList(e):Hh.getPoints(e,new Il)}if(2===arguments.length){var t=arguments[0],r=arguments[1];return t instanceof dc?r.add(t):t instanceof ic&&t.apply(new Hh(r)),r}};var Xh=function(){this._locations=null;var e=arguments[0];this._locations=e};Xh.prototype.filter=function(e){(e instanceof dc||e instanceof hc||e instanceof gc)&&this._locations.add(new zh(e,0,e.getCoordinate()))},Xh.prototype.interfaces_=function(){return[rc]},Xh.prototype.getClass=function(){return Xh},Xh.getLocations=function(e){var t=new Il;return e.apply(new Xh(t)),t};var Zh=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Uh,this._minDistanceLocation=null,this._minDistance=wu.MAX_VALUE,2===arguments.length){var e=arguments[0],t=arguments[1];this._geom=[e,t],this._terminateDistance=0}else if(3===arguments.length){var r=arguments[0],n=arguments[1],i=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=r,this._geom[1]=n,this._terminateDistance=i}};Zh.prototype.computeContainmentDistance=function(){var e=this;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 r=arguments[0],n=arguments[1],i=1-r,o=qh.getPolygons(this._geom[r]);if(o.size()>0){var a=Xh.getLocations(this._geom[i]);if(this.computeContainmentDistance(a,o,n),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[i]=n[0],this._minDistanceLocation[r]=n[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&ju(arguments[0],Tl)&&ju(arguments[1],Tl)){for(var s=arguments[0],u=arguments[1],l=arguments[2],c=0;c<s.size();c++)for(var f=s.get(c),h=0;h<u.size();h++)if(e.computeContainmentDistance(f,u.get(h),l),e._minDistance<=e._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof zh&&arguments[1]instanceof gc){var p=arguments[0],d=arguments[1],y=arguments[2],g=p.getCoordinate();if(Nu.EXTERIOR!==this._ptLocator.locate(g,d))return this._minDistance=0,y[0]=p,y[1]=new zh(d,g),null}},Zh.prototype.computeMinDistanceLinesPoints=function(e,t,r){for(var n=this,i=0;i<e.size();i++)for(var o=e.get(i),a=0;a<t.size();a++){var s=t.get(a);if(n.computeMinDistance(o,s,r),n._minDistance<=n._terminateDistance)return null}},Zh.prototype.computeFacetDistance=function(){var e=new Array(2).fill(null),t=Jh.getLines(this._geom[0]),r=Jh.getLines(this._geom[1]),n=Hh.getPoints(this._geom[0]),i=Hh.getPoints(this._geom[1]);return this.computeMinDistanceLines(t,r,e),this.updateMinDistance(e,!1),this._minDistance<=this._terminateDistance?null:(e[0]=null,e[1]=null,this.computeMinDistanceLinesPoints(t,i,e),this.updateMinDistance(e,!1),this._minDistance<=this._terminateDistance?null:(e[0]=null,e[1]=null,this.computeMinDistanceLinesPoints(r,n,e),this.updateMinDistance(e,!0),this._minDistance<=this._terminateDistance?null:(e[0]=null,e[1]=null,this.computeMinDistancePoints(n,i,e),void this.updateMinDistance(e,!1))))},Zh.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},Zh.prototype.updateMinDistance=function(e,t){if(null===e[0])return null;t?(this._minDistanceLocation[0]=e[1],this._minDistanceLocation[1]=e[0]):(this._minDistanceLocation[0]=e[0],this._minDistanceLocation[1]=e[1])},Zh.prototype.nearestPoints=function(){return this.computeMinDistance(),[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()]},Zh.prototype.computeMinDistance=function(){var e=this;if(0===arguments.length){if(null!==this._minDistanceLocation)return null;if(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance)return null;this.computeFacetDistance()}else if(3===arguments.length)if(arguments[2]instanceof Array&&arguments[0]instanceof hc&&arguments[1]instanceof dc){var t=arguments[0],r=arguments[1],n=arguments[2];if(t.getEnvelopeInternal().distance(r.getEnvelopeInternal())>this._minDistance)return null;for(var i=t.getCoordinates(),o=r.getCoordinate(),a=0;a<i.length-1;a++){var s=hl.distancePointLine(o,i[a],i[a+1]);if(s<e._minDistance){e._minDistance=s;var u=new Rf(i[a],i[a+1]),l=u.closestPoint(o);n[0]=new zh(t,a,l),n[1]=new zh(r,0,o)}if(e._minDistance<=e._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof hc&&arguments[1]instanceof hc){var c=arguments[0],f=arguments[1],h=arguments[2];if(c.getEnvelopeInternal().distance(f.getEnvelopeInternal())>this._minDistance)return null;for(var p=c.getCoordinates(),d=f.getCoordinates(),y=0;y<p.length-1;y++)for(var g=0;g<d.length-1;g++){var v=hl.distanceLineLine(p[y],p[y+1],d[g],d[g+1]);if(v<e._minDistance){e._minDistance=v;var m=new Rf(p[y],p[y+1]),_=new Rf(d[g],d[g+1]),b=m.closestPoints(_);h[0]=new zh(c,y,b[0]),h[1]=new zh(f,g,b[1])}if(e._minDistance<=e._terminateDistance)return null}}},Zh.prototype.computeMinDistancePoints=function(e,t,r){for(var n=this,i=0;i<e.size();i++)for(var o=e.get(i),a=0;a<t.size();a++){var s=t.get(a),u=o.getCoordinate().distance(s.getCoordinate());if(u<n._minDistance&&(n._minDistance=u,r[0]=new zh(o,0,o.getCoordinate()),r[1]=new zh(s,0,s.getCoordinate())),n._minDistance<=n._terminateDistance)return null}},Zh.prototype.distance=function(){if(null===this._geom[0]||null===this._geom[1])throw new xu("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},Zh.prototype.computeMinDistanceLines=function(e,t,r){for(var n=this,i=0;i<e.size();i++)for(var o=e.get(i),a=0;a<t.size();a++){var s=t.get(a);if(n.computeMinDistance(o,s,r),n._minDistance<=n._terminateDistance)return null}},Zh.prototype.interfaces_=function(){return[]},Zh.prototype.getClass=function(){return Zh},Zh.distance=function(e,t){return new Zh(e,t).distance()},Zh.isWithinDistance=function(e,t,r){return new Zh(e,t,r).distance()<=r},Zh.nearestPoints=function(e,t){return new Zh(e,t).nearestPoints()};var Yh=function(){this._pt=[new Mu,new Mu],this._distance=wu.NaN,this._isNull=!0};Yh.prototype.getCoordinates=function(){return this._pt},Yh.prototype.getCoordinate=function(e){return this._pt[e]},Yh.prototype.setMinimum=function(){if(1===arguments.length){var e=arguments[0];this.setMinimum(e._pt[0],e._pt[1])}else if(2===arguments.length){var t=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(t,r),null;var n=t.distance(r);n<this._distance&&this.initialize(t,r,n)}},Yh.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var e=arguments[0],t=arguments[1];this._pt[0].setCoordinate(e),this._pt[1].setCoordinate(t),this._distance=e.distance(t),this._isNull=!1}else if(3===arguments.length){var r=arguments[0],n=arguments[1],i=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(n),this._distance=i,this._isNull=!1}},Yh.prototype.toString=function(){return nl.toLineString(this._pt[0],this._pt[1])},Yh.prototype.getDistance=function(){return this._distance},Yh.prototype.setMaximum=function(){if(1===arguments.length){var e=arguments[0];this.setMaximum(e._pt[0],e._pt[1])}else if(2===arguments.length){var t=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(t,r),null;var n=t.distance(r);n>this._distance&&this.initialize(t,r,n)}},Yh.prototype.interfaces_=function(){return[]},Yh.prototype.getClass=function(){return Yh};var Kh=function(){};Kh.prototype.interfaces_=function(){return[]},Kh.prototype.getClass=function(){return Kh},Kh.computeDistance=function(){if(arguments[2]instanceof Yh&&arguments[0]instanceof hc&&arguments[1]instanceof Mu)for(var e=arguments[0],t=arguments[1],r=arguments[2],n=new Rf,i=e.getCoordinates(),o=0;o<i.length-1;o++){n.setCoordinates(i[o],i[o+1]);var a=n.closestPoint(t);r.setMinimum(a,t)}else if(arguments[2]instanceof Yh&&arguments[0]instanceof gc&&arguments[1]instanceof Mu){var s=arguments[0],u=arguments[1],l=arguments[2];Kh.computeDistance(s.getExteriorRing(),u,l);for(var c=0;c<s.getNumInteriorRing();c++)Kh.computeDistance(s.getInteriorRingN(c),u,l)}else if(arguments[2]instanceof Yh&&arguments[0]instanceof yl&&arguments[1]instanceof Mu){var f=arguments[0],h=arguments[1],p=arguments[2];if(f instanceof hc)Kh.computeDistance(f,h,p);else if(f instanceof gc)Kh.computeDistance(f,h,p);else if(f instanceof ic)for(var d=f,y=0;y<d.getNumGeometries();y++){var g=d.getGeometryN(y);Kh.computeDistance(g,h,p)}else p.setMinimum(f.getCoordinate(),h)}else if(arguments[2]instanceof Yh&&arguments[0]instanceof Rf&&arguments[1]instanceof Mu){var v=arguments[0],m=arguments[1],_=arguments[2],b=v.closestPoint(m);_.setMinimum(b,m)}};var Qh=function(){this._g0=null,this._g1=null,this._ptDist=new Yh,this._densifyFrac=0;var e=arguments[0],t=arguments[1];this._g0=e,this._g1=t},$h={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};Qh.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},Qh.prototype.setDensifyFraction=function(e){if(e>1||e<=0)throw new xu("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=e},Qh.prototype.compute=function(e,t){this.computeOrientedDistance(e,t,this._ptDist),this.computeOrientedDistance(t,e,this._ptDist)},Qh.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Qh.prototype.computeOrientedDistance=function(e,t,r){var n=new ep(t);if(e.apply(n),r.setMaximum(n.getMaxPointDistance()),this._densifyFrac>0){var i=new tp(t,this._densifyFrac);e.apply(i),r.setMaximum(i.getMaxPointDistance())}},Qh.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Qh.prototype.interfaces_=function(){return[]},Qh.prototype.getClass=function(){return Qh},Qh.distance=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1],r=new Qh(e,t);return r.distance()}if(3===arguments.length){var n=arguments[0],i=arguments[1],o=arguments[2],a=new Qh(n,i);return a.setDensifyFraction(o),a.distance()}},$h.MaxPointDistanceFilter.get=function(){return ep},$h.MaxDensifiedByFractionDistanceFilter.get=function(){return tp},Object.defineProperties(Qh,$h);var ep=function(){this._maxPtDist=new Yh,this._minPtDist=new Yh,this._euclideanDist=new Kh,this._geom=null;var e=arguments[0];this._geom=e};ep.prototype.filter=function(e){this._minPtDist.initialize(),Kh.computeDistance(this._geom,e,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},ep.prototype.getMaxPointDistance=function(){return this._maxPtDist},ep.prototype.interfaces_=function(){return[ml]},ep.prototype.getClass=function(){return ep};var tp=function(){this._maxPtDist=new Yh,this._minPtDist=new Yh,this._geom=null,this._numSubSegs=0;var e=arguments[0],t=arguments[1];this._geom=e,this._numSubSegs=Math.trunc(Math.round(1/t))};tp.prototype.filter=function(e,t){var r=this;if(0===t)return null;for(var n=e.getCoordinate(t-1),i=e.getCoordinate(t),o=(i.x-n.x)/this._numSubSegs,a=(i.y-n.y)/this._numSubSegs,s=0;s<this._numSubSegs;s++){var u=n.x+s*o,l=n.y+s*a,c=new Mu(u,l);r._minPtDist.initialize(),Kh.computeDistance(r._geom,c,r._minPtDist),r._maxPtDist.setMaximum(r._minPtDist)}},tp.prototype.isDone=function(){return!1},tp.prototype.isGeometryChanged=function(){return!1},tp.prototype.getMaxPointDistance=function(){return this._maxPtDist},tp.prototype.interfaces_=function(){return[nc]},tp.prototype.getClass=function(){return tp};var rp=function(e,t,r){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=e||null,this._bufDistance=t||null,this._result=r||null},np={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};rp.prototype.checkMaximumDistance=function(e,t,r){var n=new Qh(t,e);if(n.setDensifyFraction(.25),this._maxDistanceFound=n.orientedDistance(),this._maxDistanceFound>r){this._isValid=!1;var i=n.getCoordinates();this._errorLocation=i[1],this._errorIndicator=e.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+nl.toLineString(i[0],i[1])+")"}},rp.prototype.isValid=function(){var e=Math.abs(this._bufDistance),t=rp.MAX_DISTANCE_DIFF_FRAC*e;return this._minValidDistance=e-t,this._maxValidDistance=e+t,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),rp.VERBOSE&&Zu.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},rp.prototype.checkNegativeValid=function(){if(!(this._input instanceof gc||this._input instanceof _c||this._input instanceof ic))return null;var e=this.getPolygonLines(this._input);if(this.checkMinimumDistance(e,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(e,this._result,this._maxValidDistance)},rp.prototype.getErrorIndicator=function(){return this._errorIndicator},rp.prototype.checkMinimumDistance=function(e,t,r){var n=new Zh(e,t,r);if(this._minDistanceFound=n.distance(),this._minDistanceFound<r){this._isValid=!1;var i=n.nearestPoints();this._errorLocation=n.nearestPoints()[1],this._errorIndicator=e.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+nl.toLineString(i[0],i[1])+" )"}},rp.prototype.checkPositiveValid=function(){var e=this._result.getBoundary();if(this.checkMinimumDistance(this._input,e,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,e,this._maxValidDistance)},rp.prototype.getErrorLocation=function(){return this._errorLocation},rp.prototype.getPolygonLines=function(e){for(var t=new Il,r=new Jh(t),n=qh.getPolygons(e).iterator();n.hasNext();)n.next().apply(r);return e.getFactory().buildGeometry(t)},rp.prototype.getErrorMessage=function(){return this._errMsg},rp.prototype.interfaces_=function(){return[]},rp.prototype.getClass=function(){return rp},np.VERBOSE.get=function(){return!1},np.MAX_DISTANCE_DIFF_FRAC.get=function(){return.012},Object.defineProperties(rp,np);var ip=function(e,t,r){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=e||null,this._distance=t||null,this._result=r||null},op={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};ip.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},ip.prototype.checkEnvelope=function(){if(this._distance<0)return null;var e=this._distance*ip.MAX_ENV_DIFF_FRAC;0===e&&(e=.001);var t=new Ku(this._input.getEnvelopeInternal());t.expandBy(this._distance);var r=new Ku(this._result.getEnvelopeInternal());r.expandBy(e),r.contains(t)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(r)),this.report("Envelope")},ip.prototype.checkDistance=function(){var e=new rp(this._input,this._distance,this._result);e.isValid()||(this._isValid=!1,this._errorMsg=e.getErrorMessage(),this._errorLocation=e.getErrorLocation(),this._errorIndicator=e.getErrorIndicator()),this.report("Distance")},ip.prototype.checkArea=function(){var e=this._input.getArea(),t=this._result.getArea();this._distance>0&&e>t&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&e<t&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},ip.prototype.checkPolygonal=function(){this._result instanceof gc||this._result instanceof _c||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},ip.prototype.getErrorIndicator=function(){return this._errorIndicator},ip.prototype.getErrorLocation=function(){return this._errorLocation},ip.prototype.checkExpectedEmpty=function(){return this._input.getDimension()>=2||this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},ip.prototype.report=function(e){if(!ip.VERBOSE)return null;Zu.out.println("Check "+e+": "+(this._isValid?"passed":"FAILED"))},ip.prototype.getErrorMessage=function(){return this._errorMsg},ip.prototype.interfaces_=function(){return[]},ip.prototype.getClass=function(){return ip},ip.isValidMsg=function(e,t,r){var n=new ip(e,t,r);return n.isValid()?null:n.getErrorMessage()},ip.isValid=function(e,t,r){return!!new ip(e,t,r).isValid()},op.VERBOSE.get=function(){return!1},op.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(ip,op);var ap=function(){this._pts=null,this._data=null;var e=arguments[0],t=arguments[1];this._pts=e,this._data=t};ap.prototype.getCoordinates=function(){return this._pts},ap.prototype.size=function(){return this._pts.length},ap.prototype.getCoordinate=function(e){return this._pts[e]},ap.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},ap.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:If.octant(this.getCoordinate(e),this.getCoordinate(e+1))},ap.prototype.setData=function(e){this._data=e},ap.prototype.getData=function(){return this._data},ap.prototype.toString=function(){return nl.toLineString(new Pc(this._pts))},ap.prototype.interfaces_=function(){return[Lf]},ap.prototype.getClass=function(){return ap};var sp=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new Il,this._intersectionCount=0,this._keepIntersections=!0;var e=arguments[0];this._li=e,this._interiorIntersection=null};sp.prototype.getInteriorIntersection=function(){return this._interiorIntersection},sp.prototype.setCheckEndSegmentsOnly=function(e){this._isCheckEndSegmentsOnly=e},sp.prototype.getIntersectionSegments=function(){return this._intSegments},sp.prototype.count=function(){return this._intersectionCount},sp.prototype.getIntersections=function(){return this._intersections},sp.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e},sp.prototype.setKeepIntersections=function(e){this._keepIntersections=e},sp.prototype.processIntersections=function(e,t,r,n){if(!this._findAllIntersections&&this.hasIntersection())return null;if(e===r&&t===n)return null;if(this._isCheckEndSegmentsOnly&&!this.isEndSegment(e,t)&&!this.isEndSegment(r,n))return null;var i=e.getCoordinates()[t],o=e.getCoordinates()[t+1],a=r.getCoordinates()[n],s=r.getCoordinates()[n+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++)},sp.prototype.isEndSegment=function(e,t){return 0===t||t>=e.size()-2},sp.prototype.hasIntersection=function(){return null!==this._interiorIntersection},sp.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},sp.prototype.interfaces_=function(){return[ph]},sp.prototype.getClass=function(){return sp},sp.createAllIntersectionsFinder=function(e){var t=new sp(e);return t.setFindAllIntersections(!0),t},sp.createAnyIntersectionFinder=function(e){return new sp(e)},sp.createIntersectionCounter=function(e){var t=new sp(e);return t.setFindAllIntersections(!0),t.setKeepIntersections(!1),t};var up=function(){this._li=new ll,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var e=arguments[0];this._segStrings=e};up.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},up.prototype.getIntersections=function(){return this._segInt.getIntersections()},up.prototype.isValid=function(){return this.execute(),this._isValid},up.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e},up.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new sp(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var e=new Bf;if(e.setSegmentIntersector(this._segInt),e.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},up.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Hc(this.getErrorMessage(),this._segInt.getInteriorIntersection())},up.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var e=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+nl.toLineString(e[0],e[1])+" and "+nl.toLineString(e[2],e[3])},up.prototype.interfaces_=function(){return[]},up.prototype.getClass=function(){return up},up.computeIntersections=function(e){var t=new up(e);return t.setFindAllIntersections(!0),t.isValid(),t.getIntersections()};var lp=function e(){this._nv=null;var t=arguments[0];this._nv=new up(e.toSegmentStrings(t))};lp.prototype.checkValid=function(){this._nv.checkValid()},lp.prototype.interfaces_=function(){return[]},lp.prototype.getClass=function(){return lp},lp.toSegmentStrings=function(e){for(var t=new Il,r=e.iterator();r.hasNext();){var n=r.next();t.add(new ap(n.getCoordinates(),n))}return t},lp.checkValid=function(e){new lp(e).checkValid()};var cp=function(e){this._mapOp=e};cp.prototype.map=function(e){for(var t=new Il,r=0;r<e.getNumGeometries();r++){var n=this._mapOp.map(e.getGeometryN(r));n.isEmpty()||t.add(n)}return e.getFactory().createGeometryCollection(Rc.toGeometryArray(t))},cp.prototype.interfaces_=function(){return[]},cp.prototype.getClass=function(){return cp},cp.map=function(e,t){return new cp(t).map(e)};var fp=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new Il,this._resultLineList=new Il;var e=arguments[0],t=arguments[1],r=arguments[2];this._op=e,this._geometryFactory=t,this._ptLocator=r};fp.prototype.collectLines=function(e){for(var t=this,r=this._op.getGraph().getEdgeEnds().iterator();r.hasNext();){var n=r.next();t.collectLineEdge(n,e,t._lineEdgesList),t.collectBoundaryTouchEdge(n,e,t._lineEdgesList)}},fp.prototype.labelIsolatedLine=function(e,t){var r=this._ptLocator.locate(e.getCoordinate(),this._op.getArgGeometry(t));e.getLabel().setLocation(t,r)},fp.prototype.build=function(e){return this.findCoveredLineEdges(),this.collectLines(e),this.buildLines(e),this._resultLineList},fp.prototype.collectLineEdge=function(e,t,r){var n=e.getLabel(),i=e.getEdge();e.isLineEdge()&&(e.isVisited()||!zp.isResultOfOp(n,t)||i.isCovered()||(r.add(i),e.setVisitedEdge(!0)))},fp.prototype.findCoveredLineEdges=function(){for(var e=this._op.getGraph().getNodes().iterator();e.hasNext();)e.next().getEdges().findCoveredLineEdges();for(var t=this._op.getGraph().getEdgeEnds().iterator();t.hasNext();){var r=t.next(),n=r.getEdge();if(r.isLineEdge()&&!n.isCoveredSet()){var i=this._op.isCoveredByA(r.getCoordinate());n.setCovered(i)}}},fp.prototype.labelIsolatedLines=function(e){for(var t=e.iterator();t.hasNext();){var r=t.next(),n=r.getLabel();r.isIsolated()&&(n.isNull(0)?this.labelIsolatedLine(r,0):this.labelIsolatedLine(r,1))}},fp.prototype.buildLines=function(e){for(var t=this._lineEdgesList.iterator();t.hasNext();){var r=t.next(),n=this._geometryFactory.createLineString(r.getCoordinates());this._resultLineList.add(n),r.setInResult(!0)}},fp.prototype.collectBoundaryTouchEdge=function(e,t,r){var n=e.getLabel();return e.isLineEdge()||e.isVisited()||e.isInteriorAreaEdge()||e.getEdge().isInResult()?null:(al.isTrue(!(e.isInResult()||e.getSym().isInResult())||!e.getEdge().isInResult()),void(zp.isResultOfOp(n,t)&&t===zp.INTERSECTION&&(r.add(e.getEdge()),e.setVisitedEdge(!0))))},fp.prototype.interfaces_=function(){return[]},fp.prototype.getClass=function(){return fp};var hp=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new Il;var e=arguments[0],t=arguments[1];this._op=e,this._geometryFactory=t};hp.prototype.filterCoveredNodeToPoint=function(e){var t=e.getCoordinate();if(!this._op.isCoveredByLA(t)){var r=this._geometryFactory.createPoint(t);this._resultPointList.add(r)}},hp.prototype.extractNonCoveredResultNodes=function(e){for(var t=this._op.getGraph().getNodes().iterator();t.hasNext();){var r=t.next();if(!(r.isInResult()||r.isIncidentEdgeInResult()||0!==r.getEdges().getDegree()&&e!==zp.INTERSECTION)){var n=r.getLabel();zp.isResultOfOp(n,e)&&this.filterCoveredNodeToPoint(r)}}},hp.prototype.build=function(e){return this.extractNonCoveredResultNodes(e),this._resultPointList},hp.prototype.interfaces_=function(){return[]},hp.prototype.getClass=function(){return hp};var pp=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};pp.prototype.transformPoint=function(e,t){return this._factory.createPoint(this.transformCoordinates(e.getCoordinateSequence(),e))},pp.prototype.transformPolygon=function(e,t){var r=!0,n=this.transformLinearRing(e.getExteriorRing(),e);null!==n&&n instanceof mc&&!n.isEmpty()||(r=!1);for(var i=new Il,o=0;o<e.getNumInteriorRing();o++){var a=this.transformLinearRing(e.getInteriorRingN(o),e);null===a||a.isEmpty()||(a instanceof mc||(r=!1),i.add(a))}if(r)return this._factory.createPolygon(n,i.toArray([]));var s=new Il;return null!==n&&s.add(n),s.addAll(i),this._factory.buildGeometry(s)},pp.prototype.createCoordinateSequence=function(e){return this._factory.getCoordinateSequenceFactory().create(e)},pp.prototype.getInputGeometry=function(){return this._inputGeom},pp.prototype.transformMultiLineString=function(e,t){for(var r=new Il,n=0;n<e.getNumGeometries();n++){var i=this.transformLineString(e.getGeometryN(n),e);null!==i&&(i.isEmpty()||r.add(i))}return this._factory.buildGeometry(r)},pp.prototype.transformCoordinates=function(e,t){return this.copy(e)},pp.prototype.transformLineString=function(e,t){return this._factory.createLineString(this.transformCoordinates(e.getCoordinateSequence(),e))},pp.prototype.transformMultiPoint=function(e,t){for(var r=new Il,n=0;n<e.getNumGeometries();n++){var i=this.transformPoint(e.getGeometryN(n),e);null!==i&&(i.isEmpty()||r.add(i))}return this._factory.buildGeometry(r)},pp.prototype.transformMultiPolygon=function(e,t){for(var r=new Il,n=0;n<e.getNumGeometries();n++){var i=this.transformPolygon(e.getGeometryN(n),e);null!==i&&(i.isEmpty()||r.add(i))}return this._factory.buildGeometry(r)},pp.prototype.copy=function(e){return e.copy()},pp.prototype.transformGeometryCollection=function(e,t){for(var r=new Il,n=0;n<e.getNumGeometries();n++){var i=this.transform(e.getGeometryN(n));null!==i&&(this._pruneEmptyGeometry&&i.isEmpty()||r.add(i))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(Rc.toGeometryArray(r)):this._factory.buildGeometry(r)},pp.prototype.transform=function(e){if(this._inputGeom=e,this._factory=e.getFactory(),e instanceof dc)return this.transformPoint(e,null);if(e instanceof vc)return this.transformMultiPoint(e,null);if(e instanceof mc)return this.transformLinearRing(e,null);if(e instanceof hc)return this.transformLineString(e,null);if(e instanceof oc)return this.transformMultiLineString(e,null);if(e instanceof gc)return this.transformPolygon(e,null);if(e instanceof _c)return this.transformMultiPolygon(e,null);if(e instanceof ic)return this.transformGeometryCollection(e,null);throw new xu("Unknown Geometry subtype: "+e.getClass().getName())},pp.prototype.transformLinearRing=function(e,t){var r=this.transformCoordinates(e.getCoordinateSequence(),e);if(null===r)return this._factory.createLinearRing(null);var n=r.size();return n>0&&n<4&&!this._preserveType?this._factory.createLineString(r):this._factory.createLinearRing(r)},pp.prototype.interfaces_=function(){return[]},pp.prototype.getClass=function(){return pp};var dp=function e(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new Rf,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof hc&&"number"==typeof arguments[1]){var t=arguments[0],r=arguments[1];e.call(this,t.getCoordinates(),r)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var n=arguments[0],i=arguments[1];this._srcPts=n,this._isClosed=e.isClosed(n),this._snapTolerance=i}};dp.prototype.snapVertices=function(e,t){for(var r=this._isClosed?e.size()-1:e.size(),n=0;n<r;n++){var i=e.get(n),o=this.findSnapForVertex(i,t);null!==o&&(e.set(n,new Mu(o)),0===n&&this._isClosed&&e.set(e.size()-1,new Mu(o)))}},dp.prototype.findSnapForVertex=function(e,t){for(var r=0;r<t.length;r++){if(e.equals2D(t[r]))return null;if(e.distance(t[r])<this._snapTolerance)return t[r]}return null},dp.prototype.snapTo=function(e){var t=new Cl(this._srcPts);return this.snapVertices(t,e),this.snapSegments(t,e),t.toCoordinateArray()},dp.prototype.snapSegments=function(e,t){if(0===t.length)return null;var r=t.length;t[0].equals2D(t[t.length-1])&&(r=t.length-1);for(var n=0;n<r;n++){var i=t[n],o=this.findSegmentIndexToSnap(i,e);o>=0&&e.add(o+1,new Mu(i),!1)}},dp.prototype.findSegmentIndexToSnap=function(e,t){for(var r=this,n=wu.MAX_VALUE,i=-1,o=0;o<t.size()-1;o++){if(r._seg.p0=t.get(o),r._seg.p1=t.get(o+1),r._seg.p0.equals2D(e)||r._seg.p1.equals2D(e)){if(r._allowSnappingToSourceVertices)continue;return-1}var a=r._seg.distance(e);a<r._snapTolerance&&a<n&&(n=a,i=o)}return i},dp.prototype.setAllowSnappingToSourceVertices=function(e){this._allowSnappingToSourceVertices=e},dp.prototype.interfaces_=function(){return[]},dp.prototype.getClass=function(){return dp},dp.isClosed=function(e){return!(e.length<=1)&&e[0].equals2D(e[e.length-1])};var yp=function(e){this._srcGeom=e||null},gp={SNAP_PRECISION_FACTOR:{configurable:!0}};yp.prototype.snapTo=function(e,t){var r=this.extractTargetCoordinates(e);return new vp(t,r).transform(this._srcGeom)},yp.prototype.snapToSelf=function(e,t){var r=this.extractTargetCoordinates(this._srcGeom),n=new vp(e,r,!0).transform(this._srcGeom),i=n;return t&&ju(i,yc)&&(i=n.buffer(0)),i},yp.prototype.computeSnapTolerance=function(e){return this.computeMinimumSegmentLength(e)/10},yp.prototype.extractTargetCoordinates=function(e){for(var t=new Kl,r=e.getCoordinates(),n=0;n<r.length;n++)t.add(r[n]);return t.toArray(new Array(0).fill(null))},yp.prototype.computeMinimumSegmentLength=function(e){for(var t=wu.MAX_VALUE,r=0;r<e.length-1;r++){var n=e[r].distance(e[r+1]);n<t&&(t=n)}return t},yp.prototype.interfaces_=function(){return[]},yp.prototype.getClass=function(){return yp},yp.snap=function(e,t,r){var n=new Array(2).fill(null),i=new yp(e);n[0]=i.snapTo(t,r);var o=new yp(t);return n[1]=o.snapTo(n[0],r),n},yp.computeOverlaySnapTolerance=function(){if(1===arguments.length){var e=arguments[0],t=yp.computeSizeBasedSnapTolerance(e),r=e.getPrecisionModel();if(r.getType()===Ic.FIXED){var n=1/r.getScale()*2/1.415;n>t&&(t=n)}return t}if(2===arguments.length){var i=arguments[0],o=arguments[1];return Math.min(yp.computeOverlaySnapTolerance(i),yp.computeOverlaySnapTolerance(o))}},yp.computeSizeBasedSnapTolerance=function(e){var t=e.getEnvelopeInternal();return Math.min(t.getHeight(),t.getWidth())*yp.SNAP_PRECISION_FACTOR},yp.snapToSelf=function(e,t,r){return new yp(e).snapToSelf(t,r)},gp.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(yp,gp);var vp=function(e){function t(t,r,n){e.call(this),this._snapTolerance=t||null,this._snapPts=r||null,this._isSelfSnap=void 0!==n&&n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.snapLine=function(e,t){var r=new dp(e,this._snapTolerance);return r.setAllowSnappingToSourceVertices(this._isSelfSnap),r.snapTo(t)},t.prototype.transformCoordinates=function(e,t){var r=e.toCoordinateArray(),n=this.snapLine(r,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(n)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(pp),mp=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};mp.prototype.getCommon=function(){return wu.longBitsToDouble(this._commonBits)},mp.prototype.add=function(e){var t=wu.doubleToLongBits(e);return this._isFirst?(this._commonBits=t,this._commonSignExp=mp.signExpBits(this._commonBits),this._isFirst=!1,null):mp.signExpBits(t)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=mp.numCommonMostSigMantissaBits(this._commonBits,t),void(this._commonBits=mp.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},mp.prototype.toString=function(){if(1===arguments.length){var e=arguments[0],t=wu.longBitsToDouble(e),r=wu.toBinaryString(e),n="0000000000000000000000000000000000000000000000000000000000000000"+r,i=n.substring(n.length-64),o=i.substring(0,1)+" "+i.substring(1,12)+"(exp) "+i.substring(12)+" [ "+t+" ]";return o}},mp.prototype.interfaces_=function(){return[]},mp.prototype.getClass=function(){return mp},mp.getBit=function(e,t){return 0!=(e&1<<t)?1:0},mp.signExpBits=function(e){return e>>52},mp.zeroLowerBits=function(e,t){return e&~((1<<t)-1)},mp.numCommonMostSigMantissaBits=function(e,t){for(var r=0,n=52;n>=0;n--){if(mp.getBit(e,n)!==mp.getBit(t,n))return r;r++}return 52};var _p=function(){this._commonCoord=null,this._ccFilter=new Sp},bp={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};_p.prototype.addCommonBits=function(e){var t=new xp(this._commonCoord);e.apply(t),e.geometryChanged()},_p.prototype.removeCommonBits=function(e){if(0===this._commonCoord.x&&0===this._commonCoord.y)return e;var t=new Mu(this._commonCoord);t.x=-t.x,t.y=-t.y;var r=new xp(t);return e.apply(r),e.geometryChanged(),e},_p.prototype.getCommonCoordinate=function(){return this._commonCoord},_p.prototype.add=function(e){e.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},_p.prototype.interfaces_=function(){return[]},_p.prototype.getClass=function(){return _p},bp.CommonCoordinateFilter.get=function(){return Sp},bp.Translater.get=function(){return xp},Object.defineProperties(_p,bp);var Sp=function(){this._commonBitsX=new mp,this._commonBitsY=new mp};Sp.prototype.filter=function(e){this._commonBitsX.add(e.x),this._commonBitsY.add(e.y)},Sp.prototype.getCommonCoordinate=function(){return new Mu(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},Sp.prototype.interfaces_=function(){return[ml]},Sp.prototype.getClass=function(){return Sp};var xp=function(){this.trans=null;var e=arguments[0];this.trans=e};xp.prototype.filter=function(e,t){var r=e.getOrdinate(t,0)+this.trans.x,n=e.getOrdinate(t,1)+this.trans.y;e.setOrdinate(t,0,r),e.setOrdinate(t,1,n)},xp.prototype.isDone=function(){return!1},xp.prototype.isGeometryChanged=function(){return!0},xp.prototype.interfaces_=function(){return[nc]},xp.prototype.getClass=function(){return xp};var wp=function(e,t){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=e,this._geom[1]=t,this.computeSnapTolerance()};wp.prototype.selfSnap=function(e){return new yp(e).snapTo(e,this._snapTolerance)},wp.prototype.removeCommonBits=function(e){this._cbr=new _p,this._cbr.add(e[0]),this._cbr.add(e[1]);var t=new Array(2).fill(null);return t[0]=this._cbr.removeCommonBits(e[0].copy()),t[1]=this._cbr.removeCommonBits(e[1].copy()),t},wp.prototype.prepareResult=function(e){return this._cbr.addCommonBits(e),e},wp.prototype.getResultGeometry=function(e){var t=this.snap(this._geom),r=zp.overlayOp(t[0],t[1],e);return this.prepareResult(r)},wp.prototype.checkValid=function(e){e.isValid()||Zu.out.println("Snapped geometry is invalid")},wp.prototype.computeSnapTolerance=function(){this._snapTolerance=yp.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},wp.prototype.snap=function(e){var t=this.removeCommonBits(e);return yp.snap(t[0],t[1],this._snapTolerance)},wp.prototype.interfaces_=function(){return[]},wp.prototype.getClass=function(){return wp},wp.overlayOp=function(e,t,r){return new wp(e,t).getResultGeometry(r)},wp.union=function(e,t){return wp.overlayOp(e,t,zp.UNION)},wp.intersection=function(e,t){return wp.overlayOp(e,t,zp.INTERSECTION)},wp.symDifference=function(e,t){return wp.overlayOp(e,t,zp.SYMDIFFERENCE)},wp.difference=function(e,t){return wp.overlayOp(e,t,zp.DIFFERENCE)};var Op=function(e,t){this._geom=new Array(2).fill(null),this._geom[0]=e,this._geom[1]=t};Op.prototype.getResultGeometry=function(e){var t=null,r=!1,n=null;try{t=zp.overlayOp(this._geom[0],this._geom[1],e),r=!0}catch(e){if(!(e instanceof il))throw e;n=e}if(!r)try{t=wp.overlayOp(this._geom[0],this._geom[1],e)}catch(e){throw e instanceof il?n:e}return t},Op.prototype.interfaces_=function(){return[]},Op.prototype.getClass=function(){return Op},Op.overlayOp=function(e,t,r){return new Op(e,t).getResultGeometry(r)},Op.union=function(e,t){return Op.overlayOp(e,t,zp.UNION)},Op.intersection=function(e,t){return Op.overlayOp(e,t,zp.INTERSECTION)},Op.symDifference=function(e,t){return Op.overlayOp(e,t,zp.SYMDIFFERENCE)},Op.difference=function(e,t){return Op.overlayOp(e,t,zp.DIFFERENCE)};var Pp=function(){this.mce=null,this.chainIndex=null;var e=arguments[0],t=arguments[1];this.mce=e,this.chainIndex=t};Pp.prototype.computeIntersections=function(e,t){this.mce.computeIntersectsForChain(this.chainIndex,e.mce,e.chainIndex,t)},Pp.prototype.interfaces_=function(){return[]},Pp.prototype.getClass=function(){return Pp};var Ep=function e(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var t=arguments[0],r=arguments[1];this._eventType=e.DELETE,this._xValue=t,this._insertEvent=r}else if(3===arguments.length){var n=arguments[0],i=arguments[1],o=arguments[2];this._eventType=e.INSERT,this._label=n,this._xValue=i,this._obj=o}},kp={INSERT:{configurable:!0},DELETE:{configurable:!0}};Ep.prototype.isDelete=function(){return this._eventType===Ep.DELETE},Ep.prototype.setDeleteEventIndex=function(e){this._deleteEventIndex=e},Ep.prototype.getObject=function(){return this._obj},Ep.prototype.compareTo=function(e){var t=e;return this._xValue<t._xValue?-1:this._xValue>t._xValue?1:this._eventType<t._eventType?-1:this._eventType>t._eventType?1:0},Ep.prototype.getInsertEvent=function(){return this._insertEvent},Ep.prototype.isInsert=function(){return this._eventType===Ep.INSERT},Ep.prototype.isSameLabel=function(e){return null!==this._label&&this._label===e._label},Ep.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},Ep.prototype.interfaces_=function(){return[Pu]},Ep.prototype.getClass=function(){return Ep},kp.INSERT.get=function(){return 1},kp.DELETE.get=function(){return 2},Object.defineProperties(Ep,kp);var Tp=function(){};Tp.prototype.interfaces_=function(){return[]},Tp.prototype.getClass=function(){return Tp};var Mp=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 e=arguments[0],t=arguments[1],r=arguments[2];this._li=e,this._includeProper=t,this._recordIsolated=r};Mp.prototype.isTrivialIntersection=function(e,t,r,n){if(e===r&&1===this._li.getIntersectionNum()){if(Mp.isAdjacentSegments(t,n))return!0;if(e.isClosed()){var i=e.getNumPoints()-1;if(0===t&&n===i||0===n&&t===i)return!0}}return!1},Mp.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Mp.prototype.setIsDoneIfProperInt=function(e){this._isDoneWhenProperInt=e},Mp.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Mp.prototype.isBoundaryPointInternal=function(e,t){for(var r=t.iterator();r.hasNext();){var n=r.next().getCoordinate();if(e.isIntersection(n))return!0}return!1},Mp.prototype.hasProperIntersection=function(){return this._hasProper},Mp.prototype.hasIntersection=function(){return this._hasIntersection},Mp.prototype.isDone=function(){return this._isDone},Mp.prototype.isBoundaryPoint=function(e,t){return!(null===t||!this.isBoundaryPointInternal(e,t[0])&&!this.isBoundaryPointInternal(e,t[1]))},Mp.prototype.setBoundaryNodes=function(e,t){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=e,this._bdyNodes[1]=t},Mp.prototype.addIntersections=function(e,t,r,n){if(e===r&&t===n)return null;this.numTests++;var i=e.getCoordinates()[t],o=e.getCoordinates()[t+1],a=r.getCoordinates()[n],s=r.getCoordinates()[n+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&(this._recordIsolated&&(e.setIsolated(!1),r.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(e,t,r,n)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(e.addIntersections(this._li,t,0),r.addIntersections(this._li,n,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))))},Mp.prototype.interfaces_=function(){return[]},Mp.prototype.getClass=function(){return Mp},Mp.isAdjacentSegments=function(e,t){return 1===Math.abs(e-t)};var Ip=function(e){function t(){e.call(this),this.events=new Il,this.nOverlaps=null}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.prepareEvents=function(){_f.sort(this.events);for(var e=0;e<this.events.size();e++){var t=this.events.get(e);t.isDelete()&&t.getInsertEvent().setDeleteEventIndex(e)}},t.prototype.computeIntersections=function(){if(1===arguments.length){var e=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var t=0;t<this.events.size();t++){var r=this.events.get(t);if(r.isInsert()&&this.processOverlaps(t,r.getDeleteEventIndex(),r,e),e.isDone())break}}else if(3===arguments.length)if(arguments[2]instanceof Mp&&ju(arguments[0],Tl)&&ju(arguments[1],Tl)){var n=arguments[0],i=arguments[1],o=arguments[2];this.addEdges(n,n),this.addEdges(i,i),this.computeIntersections(o)}else if("boolean"==typeof arguments[2]&&ju(arguments[0],Tl)&&arguments[1]instanceof Mp){var a=arguments[0],s=arguments[1],u=arguments[2];u?this.addEdges(a,null):this.addEdges(a),this.computeIntersections(s)}},t.prototype.addEdge=function(e,t){for(var r=e.getMonotoneChainEdge(),n=r.getStartIndexes(),i=0;i<n.length-1;i++){var o=new Pp(r,i),a=new Ep(t,r.getMinX(i),o);this.events.add(a),this.events.add(new Ep(r.getMaxX(i),a))}},t.prototype.processOverlaps=function(e,t,r,n){for(var i=r.getObject(),o=e;o<t;o++){var a=this.events.get(o);if(a.isInsert()){var s=a.getObject();r.isSameLabel(a)||(i.computeIntersections(s,n),this.nOverlaps++)}}},t.prototype.addEdges=function(){if(1===arguments.length)for(var e=arguments[0],t=e.iterator();t.hasNext();){var r=t.next();this.addEdge(r,r)}else if(2===arguments.length)for(var n=arguments[0],i=arguments[1],o=n.iterator();o.hasNext();){var a=o.next();this.addEdge(a,i)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Tp),Lp=function(){this._min=wu.POSITIVE_INFINITY,this._max=wu.NEGATIVE_INFINITY},Cp={NodeComparator:{configurable:!0}};Lp.prototype.getMin=function(){return this._min},Lp.prototype.intersects=function(e,t){return!(this._min>t||this._max<e)},Lp.prototype.getMax=function(){return this._max},Lp.prototype.toString=function(){return nl.toLineString(new Mu(this._min,0),new Mu(this._max,0))},Lp.prototype.interfaces_=function(){return[]},Lp.prototype.getClass=function(){return Lp},Cp.NodeComparator.get=function(){return Np},Object.defineProperties(Lp,Cp);var Np=function(){};Np.prototype.compare=function(e,t){var r=e,n=t,i=(r._min+r._max)/2,o=(n._min+n._max)/2;return i<o?-1:i>o?1:0},Np.prototype.interfaces_=function(){return[ku]},Np.prototype.getClass=function(){return Np};var Rp=function(e){function t(){e.call(this),this._item=null;var t=arguments[0],r=arguments[1],n=arguments[2];this._min=t,this._max=r,this._item=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.query=function(e,t,r){if(!this.intersects(e,t))return null;r.visitItem(this._item)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Lp),jp=function(e){function t(){e.call(this),this._node1=null,this._node2=null;var t=arguments[0],r=arguments[1];this._node1=t,this._node2=r,this.buildExtent(this._node1,this._node2)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.buildExtent=function(e,t){this._min=Math.min(e._min,t._min),this._max=Math.max(e._max,t._max)},t.prototype.query=function(e,t,r){if(!this.intersects(e,t))return null;null!==this._node1&&this._node1.query(e,t,r),null!==this._node2&&this._node2.query(e,t,r)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Lp),Gp=function(){this._leaves=new Il,this._root=null,this._level=0};Gp.prototype.buildTree=function(){_f.sort(this._leaves,new Lp.NodeComparator);for(var e=this._leaves,t=null,r=new Il;;){if(this.buildLevel(e,r),1===r.size())return r.get(0);t=e,e=r,r=t}},Gp.prototype.insert=function(e,t,r){if(null!==this._root)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new Rp(e,t,r))},Gp.prototype.query=function(e,t,r){this.init(),this._root.query(e,t,r)},Gp.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},Gp.prototype.printNode=function(e){Zu.out.println(nl.toLineString(new Mu(e._min,this._level),new Mu(e._max,this._level)))},Gp.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},Gp.prototype.buildLevel=function(e,t){this._level++,t.clear();for(var r=0;r<e.size();r+=2){var n=e.get(r);if(null===(r+1<e.size()?e.get(r):null))t.add(n);else{var i=new jp(e.get(r),e.get(r+1));t.add(i)}}},Gp.prototype.interfaces_=function(){return[]},Gp.prototype.getClass=function(){return Gp};var Vp=function(){this._items=new Il};Vp.prototype.visitItem=function(e){this._items.add(e)},Vp.prototype.getItems=function(){return this._items},Vp.prototype.interfaces_=function(){return[yf]},Vp.prototype.getClass=function(){return Vp};var Ap=function(){this._index=null;var e=arguments[0];if(!ju(e,yc))throw new xu("Argument must be Polygonal");this._index=new Bp(e)},Dp={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};Ap.prototype.locate=function(e){var t=new fl(e),r=new Fp(t);return this._index.query(e.y,e.y,r),t.getLocation()},Ap.prototype.interfaces_=function(){return[oh]},Ap.prototype.getClass=function(){return Ap},Dp.SegmentVisitor.get=function(){return Fp},Dp.IntervalIndexedGeometry.get=function(){return Bp},Object.defineProperties(Ap,Dp);var Fp=function(){this._counter=null;var e=arguments[0];this._counter=e};Fp.prototype.visitItem=function(e){var t=e;this._counter.countSegment(t.getCoordinate(0),t.getCoordinate(1))},Fp.prototype.interfaces_=function(){return[yf]},Fp.prototype.getClass=function(){return Fp};var Bp=function(){this._index=new Gp;var e=arguments[0];this.init(e)};Bp.prototype.init=function(e){for(var t=Jh.getLines(e).iterator();t.hasNext();){var r=t.next().getCoordinates();this.addLine(r)}},Bp.prototype.addLine=function(e){for(var t=1;t<e.length;t++){var r=new Rf(e[t-1],e[t]),n=Math.min(r.p0.y,r.p1.y),i=Math.max(r.p0.y,r.p1.y);this._index.insert(n,i,r)}},Bp.prototype.query=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1],r=new Vp;return this._index.query(e,t,r),r.getItems()}if(3===arguments.length){var n=arguments[0],i=arguments[1],o=arguments[2];this._index.query(n,i,o)}},Bp.prototype.interfaces_=function(){return[]},Bp.prototype.getClass=function(){return Bp};var qp=function(e){function t(){if(e.call(this),this._parentGeom=null,this._lineEdgeMap=new Mc,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Uh,2===arguments.length){var t=arguments[0],r=arguments[1],n=_l.OGC_SFS_BOUNDARY_RULE;this._argIndex=t,this._parentGeom=r,this._boundaryNodeRule=n,null!==r&&this.add(r)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];this._argIndex=i,this._parentGeom=o,this._boundaryNodeRule=a,null!==o&&this.add(o)}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.insertBoundaryPoint=function(e,r){var n=this._nodes.addNode(r).getLabel(),i=1;n.getLocation(e,qc.ON)===Nu.BOUNDARY&&i++;var o=t.determineBoundary(this._boundaryNodeRule,i);n.setLocation(e,o)},t.prototype.computeSelfNodes=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];return this.computeSelfNodes(e,t,!1)}if(3===arguments.length){var r=arguments[0],n=arguments[1],i=arguments[2],o=new Mp(r,!0,!1);o.setIsDoneIfProperInt(i);var a=this.createEdgeSetIntersector(),s=this._parentGeom instanceof mc||this._parentGeom instanceof gc||this._parentGeom instanceof _c,u=n||!s;return a.computeIntersections(this._edges,o,u),this.addSelfIntersectionNodes(this._argIndex),o}},t.prototype.computeSplitEdges=function(e){for(var t=this._edges.iterator();t.hasNext();)t.next().eiList.addSplitEdges(e)},t.prototype.computeEdgeIntersections=function(e,t,r){var n=new Mp(t,r,!0);return n.setBoundaryNodes(this.getBoundaryNodes(),e.getBoundaryNodes()),this.createEdgeSetIntersector().computeIntersections(this._edges,e._edges,n),n},t.prototype.getGeometry=function(){return this._parentGeom},t.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},t.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},t.prototype.addPoint=function(){if(arguments[0]instanceof dc){var e=arguments[0],t=e.getCoordinate();this.insertPoint(this._argIndex,t,Nu.INTERIOR)}else if(arguments[0]instanceof Mu){var r=arguments[0];this.insertPoint(this._argIndex,r,Nu.INTERIOR)}},t.prototype.addPolygon=function(e){this.addPolygonRing(e.getExteriorRing(),Nu.EXTERIOR,Nu.INTERIOR);for(var t=0;t<e.getNumInteriorRing();t++){var r=e.getInteriorRingN(t);this.addPolygonRing(r,Nu.INTERIOR,Nu.EXTERIOR)}},t.prototype.addEdge=function(e){this.insertEdge(e);var t=e.getCoordinates();this.insertPoint(this._argIndex,t[0],Nu.BOUNDARY),this.insertPoint(this._argIndex,t[t.length-1],Nu.BOUNDARY)},t.prototype.addLineString=function(e){var t=Nl.removeRepeatedPoints(e.getCoordinates());if(t.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=t[0],null;var r=new Sh(t,new Kc(this._argIndex,Nu.INTERIOR));this._lineEdgeMap.put(e,r),this.insertEdge(r),al.isTrue(t.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,t[0]),this.insertBoundaryPoint(this._argIndex,t[t.length-1])},t.prototype.getInvalidPoint=function(){return this._invalidPoint},t.prototype.getBoundaryPoints=function(){for(var e=this.getBoundaryNodes(),t=new Array(e.size()).fill(null),r=0,n=e.iterator();n.hasNext();){var i=n.next();t[r++]=i.getCoordinate().copy()}return t},t.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},t.prototype.addSelfIntersectionNode=function(e,t,r){if(this.isBoundaryNode(e,t))return null;r===Nu.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(e,t):this.insertPoint(e,t,r)},t.prototype.addPolygonRing=function(e,t,r){if(e.isEmpty())return null;var n=Nl.removeRepeatedPoints(e.getCoordinates());if(n.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=n[0],null;var i=t,o=r;hl.isCCW(n)&&(i=r,o=t);var a=new Sh(n,new Kc(this._argIndex,Nu.BOUNDARY,i,o));this._lineEdgeMap.put(e,a),this.insertEdge(a),this.insertPoint(this._argIndex,n[0],Nu.BOUNDARY)},t.prototype.insertPoint=function(e,t,r){var n=this._nodes.addNode(t),i=n.getLabel();null===i?n._label=new Kc(e,r):i.setLocation(e,r)},t.prototype.createEdgeSetIntersector=function(){return new Ip},t.prototype.addSelfIntersectionNodes=function(e){for(var t=this._edges.iterator();t.hasNext();)for(var r=t.next(),n=r.getLabel().getLocation(e),i=r.eiList.iterator();i.hasNext();){var o=i.next();this.addSelfIntersectionNode(e,o.coord,n)}},t.prototype.add=function(){if(1!==arguments.length)return e.prototype.add.apply(this,arguments);var t=arguments[0];if(t.isEmpty())return null;if(t instanceof _c&&(this._useBoundaryDeterminationRule=!1),t instanceof gc)this.addPolygon(t);else if(t instanceof hc)this.addLineString(t);else if(t instanceof dc)this.addPoint(t);else if(t instanceof vc)this.addCollection(t);else if(t instanceof oc)this.addCollection(t);else if(t instanceof _c)this.addCollection(t);else{if(!(t instanceof ic))throw new Error(t.getClass().getName());this.addCollection(t)}},t.prototype.addCollection=function(e){for(var t=0;t<e.getNumGeometries();t++){var r=e.getGeometryN(t);this.add(r)}},t.prototype.locate=function(e){return ju(this._parentGeom,yc)&&this._parentGeom.getNumGeometries()>50?(null===this._areaPtLocator&&(this._areaPtLocator=new Ap(this._parentGeom)),this._areaPtLocator.locate(e)):this._ptLocator.locate(e,this._parentGeom)},t.prototype.findEdge=function(){if(1===arguments.length){var t=arguments[0];return this._lineEdgeMap.get(t)}return e.prototype.findEdge.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.determineBoundary=function(e,t){return e.isInBoundary(t)?Nu.BOUNDARY:Nu.INTERIOR},t}(cf),Jp=function(){if(this._li=new ll,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var e=arguments[0];this.setComputationPrecision(e.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new qp(0,e)}else if(2===arguments.length){var t=arguments[0],r=arguments[1],n=_l.OGC_SFS_BOUNDARY_RULE;t.getPrecisionModel().compareTo(r.getPrecisionModel())>=0?this.setComputationPrecision(t.getPrecisionModel()):this.setComputationPrecision(r.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new qp(0,t,n),this._arg[1]=new qp(1,r,n)}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 qp(0,i,a),this._arg[1]=new qp(1,o,a)}};Jp.prototype.getArgGeometry=function(e){return this._arg[e].getGeometry()},Jp.prototype.setComputationPrecision=function(e){this._resultPrecisionModel=e,this._li.setPrecisionModel(this._resultPrecisionModel)},Jp.prototype.interfaces_=function(){return[]},Jp.prototype.getClass=function(){return Jp};var Up=function(){};Up.prototype.interfaces_=function(){return[]},Up.prototype.getClass=function(){return Up},Up.map=function(){if(arguments[0]instanceof yl&&ju(arguments[1],Up.MapOp)){for(var e=arguments[0],t=arguments[1],r=new Il,n=0;n<e.getNumGeometries();n++){var i=t.map(e.getGeometryN(n));null!==i&&r.add(i)}return e.getFactory().buildGeometry(r)}if(ju(arguments[0],Pl)&&ju(arguments[1],Up.MapOp)){for(var o=arguments[0],a=arguments[1],s=new Il,u=o.iterator();u.hasNext();){var l=u.next(),c=a.map(l);null!==c&&s.add(c)}return s}},Up.MapOp=function(){};var zp=function(e){function t(){var t=arguments[0],r=arguments[1];e.call(this,t,r),this._ptLocator=new Uh,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new hh,this._resultPolyList=new Il,this._resultLineList=new Il,this._resultPointList=new Il,this._graph=new cf(new ch),this._geomFact=t.getFactory()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.insertUniqueEdge=function(e){var t=this._edgeList.findEqualEdge(e);if(null!==t){var r=t.getLabel(),n=e.getLabel();t.isPointwiseEqual(e)||(n=new Kc(e.getLabel())).flip();var i=t.getDepth();i.isNull()&&i.add(r),i.add(n),r.merge(n)}else this._edgeList.add(e)},t.prototype.getGraph=function(){return this._graph},t.prototype.cancelDuplicateResultEdges=function(){for(var e=this._graph.getEdgeEnds().iterator();e.hasNext();){var t=e.next(),r=t.getSym();t.isInResult()&&r.isInResult()&&(t.setInResult(!1),r.setInResult(!1))}},t.prototype.isCoveredByLA=function(e){return!!this.isCovered(e,this._resultLineList)||!!this.isCovered(e,this._resultPolyList)},t.prototype.computeGeometry=function(e,r,n,i){var o=new Il;return o.addAll(e),o.addAll(r),o.addAll(n),o.isEmpty()?t.createEmptyResult(i,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(o)},t.prototype.mergeSymLabels=function(){for(var e=this._graph.getNodes().iterator();e.hasNext();)e.next().getEdges().mergeSymLabels()},t.prototype.isCovered=function(e,t){for(var r=t.iterator();r.hasNext();){var n=r.next();if(this._ptLocator.locate(e,n)!==Nu.EXTERIOR)return!0}return!1},t.prototype.replaceCollapsedEdges=function(){for(var e=new Il,t=this._edgeList.iterator();t.hasNext();){var r=t.next();r.isCollapsed()&&(t.remove(),e.add(r.getCollapsedEdge()))}this._edgeList.addAll(e)},t.prototype.updateNodeLabelling=function(){for(var e=this._graph.getNodes().iterator();e.hasNext();){var t=e.next(),r=t.getEdges().getLabel();t.getLabel().merge(r)}},t.prototype.getResultGeometry=function(e){return this.computeOverlay(e),this._resultGeom},t.prototype.insertUniqueEdges=function(e){for(var t=e.iterator();t.hasNext();){var r=t.next();this.insertUniqueEdge(r)}},t.prototype.computeOverlay=function(e){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var t=new Il;this._arg[0].computeSplitEdges(t),this._arg[1].computeSplitEdges(t),this.insertUniqueEdges(t),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),lp.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(e),this.cancelDuplicateResultEdges();var r=new ff(this._geomFact);r.add(this._graph),this._resultPolyList=r.getPolygons();var n=new fp(this,this._geomFact,this._ptLocator);this._resultLineList=n.build(e);var i=new hp(this,this._geomFact,this._ptLocator);this._resultPointList=i.build(e),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,e)},t.prototype.labelIncompleteNode=function(e,t){var r=this._ptLocator.locate(e.getCoordinate(),this._arg[t].getGeometry());e.getLabel().setLocation(t,r)},t.prototype.copyPoints=function(e){for(var t=this._arg[e].getNodeIterator();t.hasNext();){var r=t.next();this._graph.addNode(r.getCoordinate()).setLabel(e,r.getLabel().getLocation(e))}},t.prototype.findResultAreaEdges=function(e){for(var r=this._graph.getEdgeEnds().iterator();r.hasNext();){var n=r.next(),i=n.getLabel();i.isArea()&&!n.isInteriorAreaEdge()&&t.isResultOfOp(i.getLocation(0,qc.RIGHT),i.getLocation(1,qc.RIGHT),e)&&n.setInResult(!0)}},t.prototype.computeLabelsFromDepths=function(){for(var e=this._edgeList.iterator();e.hasNext();){var t=e.next(),r=t.getLabel(),n=t.getDepth();if(!n.isNull()){n.normalize();for(var i=0;i<2;i++)r.isNull(i)||!r.isArea()||n.isNull(i)||(0===n.getDelta(i)?r.toLine(i):(al.isTrue(!n.isNull(i,qc.LEFT),"depth of LEFT side has not been initialized"),r.setLocation(i,qc.LEFT,n.getLocation(i,qc.LEFT)),al.isTrue(!n.isNull(i,qc.RIGHT),"depth of RIGHT side has not been initialized"),r.setLocation(i,qc.RIGHT,n.getLocation(i,qc.RIGHT))))}}},t.prototype.computeLabelling=function(){for(var e=this._graph.getNodes().iterator();e.hasNext();)e.next().getEdges().computeLabelling(this._arg);this.mergeSymLabels(),this.updateNodeLabelling()},t.prototype.labelIncompleteNodes=function(){for(var e=this._graph.getNodes().iterator();e.hasNext();){var t=e.next(),r=t.getLabel();t.isIsolated()&&(r.isNull(0)?this.labelIncompleteNode(t,0):this.labelIncompleteNode(t,1)),t.getEdges().updateLabelling(r)}},t.prototype.isCoveredByA=function(e){return!!this.isCovered(e,this._resultPolyList)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Jp);zp.overlayOp=function(e,t,r){return new zp(e,t).getResultGeometry(r)},zp.intersection=function(e,t){if(e.isEmpty()||t.isEmpty())return zp.createEmptyResult(zp.INTERSECTION,e,t,e.getFactory());if(e.isGeometryCollection()){var r=t;return cp.map(e,{interfaces_:function(){return[Up.MapOp]},map:function(e){return e.intersection(r)}})}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),Op.overlayOp(e,t,zp.INTERSECTION)},zp.symDifference=function(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return zp.createEmptyResult(zp.SYMDIFFERENCE,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),Op.overlayOp(e,t,zp.SYMDIFFERENCE)},zp.resultDimension=function(e,t,r){var n=t.getDimension(),i=r.getDimension(),o=-1;switch(e){case zp.INTERSECTION:o=Math.min(n,i);break;case zp.UNION:o=Math.max(n,i);break;case zp.DIFFERENCE:o=n;break;case zp.SYMDIFFERENCE:o=Math.max(n,i)}return o},zp.createEmptyResult=function(e,t,r,n){var i=null;switch(zp.resultDimension(e,t,r)){case-1:i=n.createGeometryCollection(new Array(0).fill(null));break;case 0:i=n.createPoint();break;case 1:i=n.createLineString();break;case 2:i=n.createPolygon()}return i},zp.difference=function(e,t){return e.isEmpty()?zp.createEmptyResult(zp.DIFFERENCE,e,t,e.getFactory()):t.isEmpty()?e.copy():(e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),Op.overlayOp(e,t,zp.DIFFERENCE))},zp.isResultOfOp=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1],r=e.getLocation(0),n=e.getLocation(1);return zp.isResultOfOp(r,n,t)}if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];switch(i===Nu.BOUNDARY&&(i=Nu.INTERIOR),o===Nu.BOUNDARY&&(o=Nu.INTERIOR),a){case zp.INTERSECTION:return i===Nu.INTERIOR&&o===Nu.INTERIOR;case zp.UNION:return i===Nu.INTERIOR||o===Nu.INTERIOR;case zp.DIFFERENCE:return i===Nu.INTERIOR&&o!==Nu.INTERIOR;case zp.SYMDIFFERENCE:return i===Nu.INTERIOR&&o!==Nu.INTERIOR||i!==Nu.INTERIOR&&o===Nu.INTERIOR}return!1}},zp.INTERSECTION=1,zp.UNION=2,zp.DIFFERENCE=3,zp.SYMDIFFERENCE=4;var Wp=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Uh,this._seg=new Rf;var e=arguments[0],t=arguments[1];this._g=e,this._boundaryDistanceTolerance=t,this._linework=this.extractLinework(e)};Wp.prototype.isWithinToleranceOfBoundary=function(e){for(var t=this,r=0;r<this._linework.getNumGeometries();r++)for(var n=t._linework.getGeometryN(r).getCoordinateSequence(),i=0;i<n.size()-1;i++)if(n.getCoordinate(i,t._seg.p0),n.getCoordinate(i+1,t._seg.p1),t._seg.distance(e)<=t._boundaryDistanceTolerance)return!0;return!1},Wp.prototype.getLocation=function(e){return this.isWithinToleranceOfBoundary(e)?Nu.BOUNDARY:this._ptLocator.locate(e,this._g)},Wp.prototype.extractLinework=function(e){var t=new Hp;e.apply(t);var r=t.getLinework(),n=Rc.toLineStringArray(r);return e.getFactory().createMultiLineString(n)},Wp.prototype.interfaces_=function(){return[]},Wp.prototype.getClass=function(){return Wp};var Hp=function(){this._linework=null,this._linework=new Il};Hp.prototype.getLinework=function(){return this._linework},Hp.prototype.filter=function(e){if(e instanceof gc){var t=e;this._linework.add(t.getExteriorRing());for(var r=0;r<t.getNumInteriorRing();r++)this._linework.add(t.getInteriorRingN(r))}},Hp.prototype.interfaces_=function(){return[rc]},Hp.prototype.getClass=function(){return Hp};var Xp=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var e=arguments[0];this._g=e};Xp.prototype.extractPoints=function(e,t,r){for(var n=e.getCoordinates(),i=0;i<n.length-1;i++)this.computeOffsetPoints(n[i],n[i+1],t,r)},Xp.prototype.setSidesToGenerate=function(e,t){this._doLeft=e,this._doRight=t},Xp.prototype.getPoints=function(e){for(var t=new Il,r=Jh.getLines(this._g).iterator();r.hasNext();){var n=r.next();this.extractPoints(n,e,t)}return t},Xp.prototype.computeOffsetPoints=function(e,t,r,n){var i=t.x-e.x,o=t.y-e.y,a=Math.sqrt(i*i+o*o),s=r*i/a,u=r*o/a,l=(t.x+e.x)/2,c=(t.y+e.y)/2;if(this._doLeft){var f=new Mu(l-u,c+s);n.add(f)}if(this._doRight){var h=new Mu(l+u,c-s);n.add(h)}},Xp.prototype.interfaces_=function(){return[]},Xp.prototype.getClass=function(){return Xp};var Zp=function e(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=e.TOLERANCE,this._testCoords=new Il;var t=arguments[0],r=arguments[1],n=arguments[2];this._boundaryDistanceTolerance=e.computeBoundaryDistanceTolerance(t,r),this._geom=[t,r,n],this._locFinder=[new Wp(this._geom[0],this._boundaryDistanceTolerance),new Wp(this._geom[1],this._boundaryDistanceTolerance),new Wp(this._geom[2],this._boundaryDistanceTolerance)]},Yp={TOLERANCE:{configurable:!0}};Zp.prototype.reportResult=function(e,t,r){Zu.out.println("Overlay result invalid - A:"+Nu.toLocationSymbol(t[0])+" B:"+Nu.toLocationSymbol(t[1])+" expected:"+(r?"i":"e")+" actual:"+Nu.toLocationSymbol(t[2]))},Zp.prototype.isValid=function(e){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var t=this.checkValid(e);return t},Zp.prototype.checkValid=function(){var e=this;if(1===arguments.length){for(var t=arguments[0],r=0;r<this._testCoords.size();r++){var n=e._testCoords.get(r);if(!e.checkValid(t,n))return e._invalidLocation=n,!1}return!0}if(2===arguments.length){var i=arguments[0],o=arguments[1];return this._location[0]=this._locFinder[0].getLocation(o),this._location[1]=this._locFinder[1].getLocation(o),this._location[2]=this._locFinder[2].getLocation(o),!!Zp.hasLocation(this._location,Nu.BOUNDARY)||this.isValidResult(i,this._location)}},Zp.prototype.addTestPts=function(e){var t=new Xp(e);this._testCoords.addAll(t.getPoints(5*this._boundaryDistanceTolerance))},Zp.prototype.isValidResult=function(e,t){var r=zp.isResultOfOp(t[0],t[1],e),n=!(r^t[2]===Nu.INTERIOR);return n||this.reportResult(e,t,r),n},Zp.prototype.getInvalidLocation=function(){return this._invalidLocation},Zp.prototype.interfaces_=function(){return[]},Zp.prototype.getClass=function(){return Zp},Zp.hasLocation=function(e,t){for(var r=0;r<3;r++)if(e[r]===t)return!0;return!1},Zp.computeBoundaryDistanceTolerance=function(e,t){return Math.min(yp.computeSizeBasedSnapTolerance(e),yp.computeSizeBasedSnapTolerance(t))},Zp.isValid=function(e,t,r,n){return new Zp(e,t,n).isValid(r)},Yp.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Zp,Yp);var Kp=function e(t){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=e.extractFactory(t),this._inputGeoms=t};Kp.prototype.extractElements=function(e,t){if(null===e)return null;for(var r=0;r<e.getNumGeometries();r++){var n=e.getGeometryN(r);this._skipEmpty&&n.isEmpty()||t.add(n)}},Kp.prototype.combine=function(){for(var e=new Il,t=this._inputGeoms.iterator();t.hasNext();){var r=t.next();this.extractElements(r,e)}return 0===e.size()?null!==this._geomFactory?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(e)},Kp.prototype.interfaces_=function(){return[]},Kp.prototype.getClass=function(){return Kp},Kp.combine=function(){if(1===arguments.length){var e=arguments[0],t=new Kp(e);return t.combine()}if(2===arguments.length){var r=arguments[0],n=arguments[1],i=new Kp(Kp.createList(r,n));return i.combine()}if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2],u=new Kp(Kp.createList(o,a,s));return u.combine()}},Kp.extractFactory=function(e){return e.isEmpty()?null:e.iterator().next().getFactory()},Kp.createList=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1],r=new Il;return r.add(e),r.add(t),r}if(3===arguments.length){var n=arguments[0],i=arguments[1],o=arguments[2],a=new Il;return a.add(n),a.add(i),a.add(o),a}};var Qp=function(){this._inputPolys=null,this._geomFactory=null;var e=arguments[0];this._inputPolys=e,null===this._inputPolys&&(this._inputPolys=new Il)},$p={STRTREE_NODE_CAPACITY:{configurable:!0}};Qp.prototype.reduceToGeometries=function(e){for(var t=new Il,r=e.iterator();r.hasNext();){var n=r.next(),i=null;ju(n,Tl)?i=this.unionTree(n):n instanceof yl&&(i=n),t.add(i)}return t},Qp.prototype.extractByEnvelope=function(e,t,r){for(var n=new Il,i=0;i<t.getNumGeometries();i++){var o=t.getGeometryN(i);o.getEnvelopeInternal().intersects(e)?n.add(o):r.add(o)}return this._geomFactory.buildGeometry(n)},Qp.prototype.unionOptimized=function(e,t){var r=e.getEnvelopeInternal(),n=t.getEnvelopeInternal();if(!r.intersects(n))return Kp.combine(e,t);if(e.getNumGeometries()<=1&&t.getNumGeometries()<=1)return this.unionActual(e,t);var i=r.intersection(n);return this.unionUsingEnvelopeIntersection(e,t,i)},Qp.prototype.union=function(){if(null===this._inputPolys)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var e=new Pf(Qp.STRTREE_NODE_CAPACITY),t=this._inputPolys.iterator();t.hasNext();){var r=t.next();e.insert(r.getEnvelopeInternal(),r)}this._inputPolys=null;var n=e.itemsTree();return this.unionTree(n)},Qp.prototype.binaryUnion=function(){if(1===arguments.length){var e=arguments[0];return this.binaryUnion(e,0,e.size())}if(3===arguments.length){var t=arguments[0],r=arguments[1],n=arguments[2];if(n-r<=1){var i=Qp.getGeometry(t,r);return this.unionSafe(i,null)}if(n-r==2)return this.unionSafe(Qp.getGeometry(t,r),Qp.getGeometry(t,r+1));var o=Math.trunc((n+r)/2),a=this.binaryUnion(t,r,o),s=this.binaryUnion(t,o,n);return this.unionSafe(a,s)}},Qp.prototype.repeatedUnion=function(e){for(var t=null,r=e.iterator();r.hasNext();){var n=r.next();t=null===t?n.copy():t.union(n)}return t},Qp.prototype.unionSafe=function(e,t){return null===e&&null===t?null:null===e?t.copy():null===t?e.copy():this.unionOptimized(e,t)},Qp.prototype.unionActual=function(e,t){return Qp.restrictToPolygons(e.union(t))},Qp.prototype.unionTree=function(e){var t=this.reduceToGeometries(e);return this.binaryUnion(t)},Qp.prototype.unionUsingEnvelopeIntersection=function(e,t,r){var n=new Il,i=this.extractByEnvelope(r,e,n),o=this.extractByEnvelope(r,t,n),a=this.unionActual(i,o);return n.add(a),Kp.combine(n)},Qp.prototype.bufferUnion=function(){if(1===arguments.length){var e=arguments[0],t=e.get(0).getFactory(),r=t.buildGeometry(e),n=r.buffer(0);return n}if(2===arguments.length){var i=arguments[0],o=arguments[1],a=i.getFactory(),s=a.createGeometryCollection([i,o]),u=s.buffer(0);return u}},Qp.prototype.interfaces_=function(){return[]},Qp.prototype.getClass=function(){return Qp},Qp.restrictToPolygons=function(e){if(ju(e,yc))return e;var t=qh.getPolygons(e);return 1===t.size()?t.get(0):e.getFactory().createMultiPolygon(Rc.toPolygonArray(t))},Qp.getGeometry=function(e,t){return t>=e.size()?null:e.get(t)},Qp.union=function(e){return new Qp(e).union()},$p.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Qp,$p);var ed=function(){};function td(){return new rd}function rd(){this.reset()}ed.prototype.interfaces_=function(){return[]},ed.prototype.getClass=function(){return ed},ed.union=function(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return zp.createEmptyResult(zp.UNION,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),Op.overlayOp(e,t,zp.UNION)},rd.prototype={constructor:rd,reset:function(){this.s=this.t=0},add:function(e){id(nd,e,this.t),id(this,nd.s,this.s),this.s?this.t+=nd.t:this.s=nd.t},valueOf:function(){return this.s}};var nd=new rd;function id(e,t,r){var n=e.s=t+r,i=n-t,o=n-i;e.t=t-o+(r-i)}var od=1e-6,ad=Math.PI,sd=ad/2,ud=ad/4,ld=2*ad,cd=180/ad,fd=ad/180,hd=Math.abs,pd=Math.atan,dd=Math.atan2,yd=Math.cos,gd=Math.sin,vd=Math.sqrt;function md(e){return e>1?0:e<-1?ad:Math.acos(e)}function _d(e){return e>1?sd:e<-1?-sd:Math.asin(e)}function bd(){}function Sd(e,t){e&&Pd.hasOwnProperty(e.type)&&Pd[e.type](e,t)}var xd,wd,Od={Feature:function(e,t){Sd(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n<i;)Sd(r[n].geometry,t)}},Pd={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)e=r[n],t.point(e[0],e[1],e[2])},LineString:function(e,t){Ed(e.coordinates,t,0)},MultiLineString:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)Ed(r[n],t,0)},Polygon:function(e,t){kd(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)kd(r[n],t)},GeometryCollection:function(e,t){for(var r=e.geometries,n=-1,i=r.length;++n<i;)Sd(r[n],t)}};function Ed(e,t,r){var n,i=-1,o=e.length-r;for(t.lineStart();++i<o;)n=e[i],t.point(n[0],n[1],n[2]);t.lineEnd()}function kd(e,t){var r=-1,n=e.length;for(t.polygonStart();++r<n;)Ed(e[r],t,1);t.polygonEnd()}function Td(e){return[dd(e[1],e[0]),_d(e[2])]}function Md(e){var t=e[0],r=e[1],n=yd(r);return[n*yd(t),n*gd(t),gd(r)]}function Id(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Ld(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Cd(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Nd(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Rd(e){var t=vd(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function jd(e,t){function r(r,n){return r=e(r,n),t(r[0],r[1])}return e.invert&&t.invert&&(r.invert=function(r,n){return(r=t.invert(r,n))&&e.invert(r[0],r[1])}),r}function Gd(e,t){return[e>ad?e-ld:e<-ad?e+ld:e,t]}function Vd(e){return function(t,r){return[(t+=e)>ad?t-ld:t<-ad?t+ld:t,r]}}function Ad(e){var t=Vd(e);return t.invert=Vd(-e),t}function Dd(e,t){var r=yd(e),n=gd(e),i=yd(t),o=gd(t);function a(e,t){var a=yd(t),s=yd(e)*a,u=gd(e)*a,l=gd(t),c=l*r+s*n;return[dd(u*i-c*o,s*r-l*n),_d(c*i+u*o)]}return a.invert=function(e,t){var a=yd(t),s=yd(e)*a,u=gd(e)*a,l=gd(t),c=l*i-u*o;return[dd(u*i+l*o,s*r+c*n),_d(c*r-s*n)]},a}function Fd(e,t){(t=Md(t))[0]-=e,Rd(t);var r=md(-t[1]);return((-t[2]<0?-r:r)+ld-od)%ld}function Bd(){var e,t=[];return{point:function(t,r){e.push([t,r])},lineStart:function(){t.push(e=[])},lineEnd:bd,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],e=null,r}}}function qd(e,t){return hd(e[0]-t[0])<od&&hd(e[1]-t[1])<od}function Jd(e,t,r,n){this.x=e,this.z=t,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function Ud(e,t,r,n,i){var o,a,s=[],u=[];if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,r,n=e[0],a=e[t];if(qd(n,a)){for(i.lineStart(),o=0;o<t;++o)i.point((n=e[o])[0],n[1]);i.lineEnd()}else s.push(r=new Jd(n,e,null,!0)),u.push(r.o=new Jd(n,null,r,!1)),s.push(r=new Jd(a,e,null,!1)),u.push(r.o=new Jd(a,null,r,!0))}}),s.length){for(u.sort(t),zd(s),zd(u),o=0,a=u.length;o<a;++o)u[o].e=r=!r;for(var l,c,f=s[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;l=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(o=0,a=l.length;o<a;++o)i.point((c=l[o])[0],c[1]);else n(h.x,h.n.x,1,i);h=h.n}else{if(p)for(l=h.p.z,o=l.length-1;o>=0;--o)i.point((c=l[o])[0],c[1]);else n(h.x,h.p.x,-1,i);h=h.p}l=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function zd(e){if(t=e.length){for(var t,r,n=0,i=e[0];++n<t;)i.n=r=e[n],r.p=i,i=r;i.n=r=e[0],r.p=i}}function Wd(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Hd(e){for(var t,r,n,i=e.length,o=-1,a=0;++o<i;)a+=e[o].length;for(r=new Array(a);--i>=0;)for(t=(n=e[i]).length;--t>=0;)r[--a]=n[t];return r}td(),td(),td(),Gd.invert=Gd,1===(xd=Wd).length&&(wd=xd,xd=function(e,t){return Wd(wd(e),t)});var Xd=1e9,Zd=-Xd,Yd=td();function Kd(e){return e}td(),td(),td();var Qd=1/0,$d=Qd,ey=-Qd,ty=ey,ry={point:function(e,t){e<Qd&&(Qd=e),e>ey&&(ey=e),t<$d&&($d=t),t>ty&&(ty=t)},lineStart:bd,lineEnd:bd,polygonStart:bd,polygonEnd:bd,result:function(){var e=[[Qd,$d],[ey,ty]];return ey=ty=-($d=Qd=1/0),e}};function ny(e,t,r,n){return function(i,o){var a,s,u,l=t(o),c=i.invert(n[0],n[1]),f=Bd(),h=t(f),p=!1,d={point:y,lineStart:v,lineEnd:m,polygonStart:function(){d.point=_,d.lineStart=b,d.lineEnd=S,s=[],a=[]},polygonEnd:function(){d.point=y,d.lineStart=v,d.lineEnd=m,s=Hd(s);var e=function(e,t){var r=t[0],n=t[1],i=[gd(r),-yd(r),0],o=0,a=0;Yd.reset();for(var s=0,u=e.length;s<u;++s)if(c=(l=e[s]).length)for(var l,c,f=l[c-1],h=f[0],p=f[1]/2+ud,d=gd(p),y=yd(p),g=0;g<c;++g,h=m,d=b,y=S,f=v){var v=l[g],m=v[0],_=v[1]/2+ud,b=gd(_),S=yd(_),x=m-h,w=x>=0?1:-1,O=w*x,P=O>ad,E=d*b;if(Yd.add(dd(E*w*gd(O),y*S+E*yd(O))),o+=P?x+w*ld:x,P^h>=r^m>=r){var k=Ld(Md(f),Md(v));Rd(k);var T=Ld(i,k);Rd(T);var M=(P^x>=0?-1:1)*_d(T[2]);(n>M||n===M&&(k[0]||k[1]))&&(a+=P^x>=0?1:-1)}}return(o<-1e-6||o<od&&Yd<-1e-6)^1&a}(a,c);s.length?(p||(o.polygonStart(),p=!0),Ud(s,oy,e,r,o)):e&&(p||(o.polygonStart(),p=!0),o.lineStart(),r(null,null,1,o),o.lineEnd()),p&&(o.polygonEnd(),p=!1),s=a=null},sphere:function(){o.polygonStart(),o.lineStart(),r(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function y(t,r){var n=i(t,r);e(t=n[0],r=n[1])&&o.point(t,r)}function g(e,t){var r=i(e,t);l.point(r[0],r[1])}function v(){d.point=g,l.lineStart()}function m(){d.point=y,l.lineEnd()}function _(e,t){u.push([e,t]);var r=i(e,t);h.point(r[0],r[1])}function b(){h.lineStart(),u=[]}function S(){_(u[0][0],u[0][1]),h.lineEnd();var e,t,r,n,i=h.clean(),l=f.result(),c=l.length;if(u.pop(),a.push(u),u=null,c)if(1&i){if((t=(r=l[0]).length-1)>0){for(p||(o.polygonStart(),p=!0),o.lineStart(),e=0;e<t;++e)o.point((n=r[e])[0],n[1]);o.lineEnd()}}else c>1&&2&i&&l.push(l.pop().concat(l.shift())),s.push(l.filter(iy))}return d}}function iy(e){return e.length>1}function oy(e,t){return((e=e.x)[0]<0?e[1]-sd-od:sd-e[1])-((t=t.x)[0]<0?t[1]-sd-od:sd-t[1])}td();var ay=ny(function(){return!0},function(e){var t,r=NaN,n=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?ad:-ad,u=hd(o-r);hd(u-ad)<od?(e.point(r,n=(n+a)/2>0?sd:-sd),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(o,n),t=0):i!==s&&u>=ad&&(hd(r-i)<od&&(r-=i*od),hd(o-s)<od&&(o-=s*od),n=function(e,t,r,n){var i,o,a=gd(e-r);return hd(a)>od?pd((gd(t)*(o=yd(n))*gd(r)-gd(n)*(i=yd(t))*gd(e))/(i*o*a)):(t+n)/2}(r,n,o,a),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(s,n),t=0),e.point(r=o,n=a),i=s},lineEnd:function(){e.lineEnd(),r=n=NaN},clean:function(){return 2-t}}},function(e,t,r,n){var i;if(null==e)i=r*sd,n.point(-ad,i),n.point(0,i),n.point(ad,i),n.point(ad,0),n.point(ad,-i),n.point(0,-i),n.point(-ad,-i),n.point(-ad,0),n.point(-ad,i);else if(hd(e[0]-t[0])>od){var o=e[0]<t[0]?ad:-ad;i=r*o/2,n.point(-o,i),n.point(0,i),n.point(o,i)}else n.point(t[0],t[1])},[-ad,-sd]);function sy(e){return function(t){var r=new uy;for(var n in e)r[n]=e[n];return r.stream=t,r}}function uy(){}function ly(e,t,r){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],o=e.clipExtent&&e.clipExtent();e.scale(150).translate([0,0]),null!=o&&e.clipExtent(null),function(e,t){e&&Od.hasOwnProperty(e.type)?Od[e.type](e,t):Sd(e,t)}(r,e.stream(ry));var a=ry.result(),s=Math.min(n/(a[1][0]-a[0][0]),i/(a[1][1]-a[0][1])),u=+t[0][0]+(n-s*(a[1][0]+a[0][0]))/2,l=+t[0][1]+(i-s*(a[1][1]+a[0][1]))/2;return null!=o&&e.clipExtent(o),e.scale(150*s).translate([u,l])}uy.prototype={constructor:uy,point:function(e,t){this.stream.point(e,t)},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()}};var cy=yd(30*fd);function fy(e,t){return+t?function(e,t){function r(n,i,o,a,s,u,l,c,f,h,p,d,y,g){var v=l-n,m=c-i,_=v*v+m*m;if(_>4*t&&y--){var b=a+h,S=s+p,x=u+d,w=vd(b*b+S*S+x*x),O=_d(x/=w),P=hd(hd(x)-1)<od||hd(o-f)<od?(o+f)/2:dd(S,b),E=e(P,O),k=E[0],T=E[1],M=k-n,I=T-i,L=m*M-v*I;(L*L/_>t||hd((v*M+m*I)/_-.5)>.3||a*h+s*p+u*d<cy)&&(r(n,i,o,a,s,u,k,T,P,b/=w,S/=w,x,y,g),g.point(k,T),r(k,T,P,b,S,x,l,c,f,h,p,d,y,g))}}return function(t){var n,i,o,a,s,u,l,c,f,h,p,d,y={point:g,lineStart:v,lineEnd:_,polygonStart:function(){t.polygonStart(),y.lineStart=b},polygonEnd:function(){t.polygonEnd(),y.lineStart=v}};function g(r,n){r=e(r,n),t.point(r[0],r[1])}function v(){c=NaN,y.point=m,t.lineStart()}function m(n,i){var o=Md([n,i]),a=e(n,i);r(c,f,l,h,p,d,c=a[0],f=a[1],l=n,h=o[0],p=o[1],d=o[2],16,t),t.point(c,f)}function _(){y.point=g,t.lineEnd()}function b(){v(),y.point=S,y.lineEnd=x}function S(e,t){m(n=e,t),i=c,o=f,a=h,s=p,u=d,y.point=m}function x(){r(c,f,l,h,p,d,i,o,n,a,s,u,16,t),y.lineEnd=_,_()}return y}}(e,t):function(e){return sy({point:function(t,r){t=e(t,r),this.stream.point(t[0],t[1])}})}(e)}var hy=sy({point:function(e,t){this.stream.point(e*fd,t*fd)}});function py(e){return function(e){var t,r,n,i,o,a,s,u,l,c,f=150,h=480,p=250,d=0,y=0,g=0,v=0,m=0,_=null,b=ay,S=null,x=Kd,w=.5,O=fy(k,w);function P(e){return[(e=o(e[0]*fd,e[1]*fd))[0]*f+r,n-e[1]*f]}function E(e){return(e=o.invert((e[0]-r)/f,(n-e[1])/f))&&[e[0]*cd,e[1]*cd]}function k(e,i){return[(e=t(e,i))[0]*f+r,n-e[1]*f]}function T(){o=jd(i=function(e,t,r){return(e%=ld)?t||r?jd(Ad(e),Dd(t,r)):Ad(e):t||r?Dd(t,r):Gd}(g,v,m),t);var e=t(d,y);return r=h-e[0]*f,n=p+e[1]*f,M()}function M(){return l=c=null,P}return P.stream=function(e){return l&&c===e?l:l=hy(b(i,O(x(c=e))))},P.clipAngle=function(e){return arguments.length?(b=+e?function(e,t){var r=yd(e),n=r>0,i=hd(r)>od;function o(e,t){return yd(e)*yd(t)>r}function a(e,t,n){var i=[1,0,0],o=Ld(Md(e),Md(t)),a=Id(o,o),s=o[0],u=a-s*s;if(!u)return!n&&e;var l=r*a/u,c=-r*s/u,f=Ld(i,o),h=Nd(i,l);Cd(h,Nd(o,c));var p=f,d=Id(h,p),y=Id(p,p),g=d*d-y*(Id(h,h)-1);if(!(g<0)){var v=vd(g),m=Nd(p,(-d-v)/y);if(Cd(m,h),m=Td(m),!n)return m;var _,b=e[0],S=t[0],x=e[1],w=t[1];S<b&&(_=b,b=S,S=_);var O=S-b,P=hd(O-ad)<od;if(!P&&w<x&&(_=x,x=w,w=_),P||O<od?P?x+w>0^m[1]<(hd(m[0]-b)<od?x:w):x<=m[1]&&m[1]<=w:O>ad^(b<=m[0]&&m[0]<=S)){var E=Nd(p,(-d+v)/y);return Cd(E,h),[m,Td(E)]}}}function s(t,r){var i=n?e:ad-e,o=0;return t<-i?o|=1:t>i&&(o|=2),r<-i?o|=4:r>i&&(o|=8),o}return ny(o,function(e){var t,r,u,l,c;return{lineStart:function(){l=u=!1,c=1},point:function(f,h){var p,d=[f,h],y=o(f,h),g=n?y?0:s(f,h):y?s(f+(f<0?ad:-ad),h):0;if(!t&&(l=u=y)&&e.lineStart(),y!==u&&(!(p=a(t,d))||qd(t,p)||qd(d,p))&&(d[0]+=od,d[1]+=od,y=o(d[0],d[1])),y!==u)c=0,y?(e.lineStart(),p=a(d,t),e.point(p[0],p[1])):(p=a(t,d),e.point(p[0],p[1]),e.lineEnd()),t=p;else if(i&&t&&n^y){var v;g&r||!(v=a(d,t,!0))||(c=0,n?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1])))}!y||t&&qd(t,d)||e.point(d[0],d[1]),t=d,u=y,r=g},lineEnd:function(){u&&e.lineEnd(),t=null},clean:function(){return c|(l&&u)<<1}}},function(r,n,i,o){!function(e,t,r,n,i,o){if(r){var a=yd(t),s=gd(t),u=n*r;null==i?(i=t+n*ld,o=t-u/2):(i=Fd(a,i),o=Fd(a,o),(n>0?i<o:i>o)&&(i+=n*ld));for(var l,c=i;n>0?c>o:c<o;c-=u)l=Td([a,-s*yd(c),-s*gd(c)]),e.point(l[0],l[1])}}(o,e,t,i,r,n)},n?[0,-e]:[-ad,e-ad])}(_=e*fd,6*fd):(_=null,ay),M()):_*cd},P.clipExtent=function(e){return arguments.length?(x=null==e?(S=a=s=u=null,Kd):function(e,t,r,n){function i(i,o){return e<=i&&i<=r&&t<=o&&o<=n}function o(i,o,s,l){var c=0,f=0;if(null==i||(c=a(i,s))!==(f=a(o,s))||u(i,o)<0^s>0)do{l.point(0===c||3===c?e:r,c>1?n:t)}while((c=(c+s+4)%4)!==f);else l.point(o[0],o[1])}function a(n,i){return hd(n[0]-e)<od?i>0?0:3:hd(n[0]-r)<od?i>0?2:1:hd(n[1]-t)<od?i>0?1:0:i>0?3:2}function s(e,t){return u(e.x,t.x)}function u(e,t){var r=a(e,1),n=a(t,1);return r!==n?r-n:0===r?t[1]-e[1]:1===r?e[0]-t[0]:2===r?e[1]-t[1]:t[0]-e[0]}return function(a){var u,l,c,f,h,p,d,y,g,v,m,_=a,b=Bd(),S={point:x,lineStart:function(){S.point=w,l&&l.push(c=[]),v=!0,g=!1,d=y=NaN},lineEnd:function(){u&&(w(f,h),p&&g&&b.rejoin(),u.push(b.result())),S.point=x,g&&_.lineEnd()},polygonStart:function(){_=b,u=[],l=[],m=!0},polygonEnd:function(){var t=function(){for(var t=0,r=0,i=l.length;r<i;++r)for(var o,a,s=l[r],u=1,c=s.length,f=s[0],h=f[0],p=f[1];u<c;++u)o=h,a=p,h=(f=s[u])[0],p=f[1],a<=n?p>n&&(h-o)*(n-a)>(p-a)*(e-o)&&++t:p<=n&&(h-o)*(n-a)<(p-a)*(e-o)&&--t;return t}(),r=m&&t,i=(u=Hd(u)).length;(r||i)&&(a.polygonStart(),r&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&Ud(u,s,t,o,a),a.polygonEnd()),_=a,u=l=c=null}};function x(e,t){i(e,t)&&_.point(e,t)}function w(o,a){var s=i(o,a);if(l&&c.push([o,a]),v)f=o,h=a,p=s,v=!1,s&&(_.lineStart(),_.point(o,a));else if(s&&g)_.point(o,a);else{var u=[d=Math.max(Zd,Math.min(Xd,d)),y=Math.max(Zd,Math.min(Xd,y))],b=[o=Math.max(Zd,Math.min(Xd,o)),a=Math.max(Zd,Math.min(Xd,a))];!function(e,t,r,n,i,o){var a,s=e[0],u=e[1],l=0,c=1,f=t[0]-s,h=t[1]-u;if(a=r-s,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<c&&(c=a)}else if(f>0){if(a>c)return;a>l&&(l=a)}if(a=i-s,f||!(a<0)){if(a/=f,f<0){if(a>c)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<c&&(c=a)}if(a=n-u,h||!(a>0)){if(a/=h,h<0){if(a<l)return;a<c&&(c=a)}else if(h>0){if(a>c)return;a>l&&(l=a)}if(a=o-u,h||!(a<0)){if(a/=h,h<0){if(a>c)return;a>l&&(l=a)}else if(h>0){if(a<l)return;a<c&&(c=a)}return l>0&&(e[0]=s+l*f,e[1]=u+l*h),c<1&&(t[0]=s+c*f,t[1]=u+c*h),!0}}}}}(u,b,e,t,r,n)?s&&(_.lineStart(),_.point(o,a),m=!1):(g||(_.lineStart(),_.point(u[0],u[1])),_.point(b[0],b[1]),s||_.lineEnd(),m=!1)}d=o,y=a,g=s}return S}}(S=+e[0][0],a=+e[0][1],s=+e[1][0],u=+e[1][1]),M()):null==S?null:[[S,a],[s,u]]},P.scale=function(e){return arguments.length?(f=+e,T()):f},P.translate=function(e){return arguments.length?(h=+e[0],p=+e[1],T()):[h,p]},P.center=function(e){return arguments.length?(d=e[0]%360*fd,y=e[1]%360*fd,T()):[d*cd,y*cd]},P.rotate=function(e){return arguments.length?(g=e[0]%360*fd,v=e[1]%360*fd,m=e.length>2?e[2]%360*fd:0,T()):[g*cd,v*cd,m*cd]},P.precision=function(e){return arguments.length?(O=fy(k,w=e*e),M()):vd(w)},P.fitExtent=function(e,t){return ly(P,e,t)},P.fitSize=function(e,t){return function(e,t,r){return ly(e,[[0,0],t],r)}(P,e,t)},function(){return t=e.apply(this,arguments),P.invert=t.invert&&E,T()}}(function(){return e})()}var dy=function(e,t){var r=yd(e),n=yd(t),i=function(e){return(e=md(e))&&e/gd(e)}(r*n);return[i*n*gd(e),i*gd(t)]};function yy(e,t,n,i){var o=e.properties||{},s="Feature"===e.type?e.geometry:e;if("GeometryCollection"===s.type){var u=[];return F(e,function(e){var r=yy(e,t,n,i);r&&u.push(r)}),d(u)}var l=function(e){var t=lr(e).geometry.coordinates,n=[-t[0],-t[1]];return py(dy).scale(79.4188).clipAngle(179.999).rotate(n).scale(r)}(s),c={type:s.type,coordinates:function e(t,r){return"object"!=typeof t[0]?r(t):t.map(function(t){return e(t,r)})}(s.coordinates,l)},f=(new Fc).read(c),h=b(S(t,n),"meters"),p=Rh.bufferOp(f,h,i);if(!function e(t){return Array.isArray(t[0])?e(t[0]):isNaN(t[0])}((p=(new Bc).write(p)).coordinates))return a({type:p.type,coordinates:function e(t,r){return"object"!=typeof t[0]?r.invert(t):t.map(function(t){return e(t,r)})}(p.coordinates,l)},o)}function gy(e,t,r){void 0===r&&(r={});var n=ie(e),i=ie(t),o=bu.intersection(n.coordinates,i.coordinates);return 0===o.length?null:1===o.length?c(o[0],r.properties):v(o,r.properties)}function vy(e,t,r){void 0===r&&(r={});var n=JSON.stringify(r.properties||{}),i=e[0],o=e[1],a=e[2],s=e[3],u=(o+s)/2,l=(i+a)/2,c=2*t/vt([i,u],[a,u],r)*(a-i),f=2*t/vt([l,o],[l,s],r)*(s-o),h=c/2,p=2*h,y=Math.sqrt(3)/2*f,g=a-i,v=s-o,m=.75*p,_=y,b=(g-p)/(p-h/2),S=Math.floor(b),x=(S*m-h/2-g)/2-h/2+m/2,w=Math.floor((v-y)/y),O=(v-w*y)/2,P=w*y-v>y/2;P&&(O-=y/4);for(var E=[],k=[],T=0;T<6;T++){var M=2*Math.PI/6*T;E.push(Math.cos(M)),k.push(Math.sin(M))}for(var I=[],L=0;L<=S;L++)for(var C=0;C<=w;C++){var N=L%2==1;if(!(0===C&&N||0===C&&P)){var R=L*m+i-x,j=C*_+o+O;if(N&&(j-=y/2),!0===r.triangles)_y([R,j],c/2,f/2,JSON.parse(n),E,k).forEach(function(e){r.mask?gy(r.mask,e)&&I.push(e):I.push(e)});else{var G=my([R,j],c/2,f/2,JSON.parse(n),E,k);r.mask?gy(r.mask,G)&&I.push(G):I.push(G)}}}return d(I)}function my(e,t,r,n,i,o){for(var a=[],s=0;s<6;s++){var u=e[0]+t*i[s],l=e[1]+r*o[s];a.push([u,l])}return a.push(a[0].slice()),c([a],n)}function _y(e,t,r,n,i,o){for(var a=[],s=0;s<6;s++){var u=[];u.push(e),u.push([e[0]+t*i[s],e[1]+r*o[s]]),u.push([e[0]+t*i[(s+1)%6],e[1]+r*o[(s+1)%6]]),u.push(e),a.push(c([u],n))}return a}function by(e){return v(e)}function Sy(e,t,r){return void 0===r&&(r={}),function(e,t,r,n){void 0===n&&(n={});for(var i=[],o=e[0],a=e[1],s=e[2],u=e[3],l=t/vt([o,a],[s,a],n)*(s-o),f=r/vt([o,a],[o,u],n)*(u-a),h=s-o,p=u-a,y=Math.floor(h/l),g=Math.floor(p/f),v=(p-g*f)/2,m=o+(h-y*l)/2,_=0;_<y;_++){for(var b=a+v,S=0;S<g;S++){var x=c([[[m,b],[m,b+f],[m+l,b+f],[m+l,b],[m,b]]],n.properties);n.mask?oa(n.mask,x)&&i.push(x):i.push(x),b+=f}m+=l}return d(i)}(e,t,t,r)}function xy(e,t,r){void 0===r&&(r={});for(var n=[],i=t/vt([e[0],e[1]],[e[2],e[1]],r)*(e[2]-e[0]),o=t/vt([e[0],e[1]],[e[0],e[3]],r)*(e[3]-e[1]),a=0,s=e[0];s<=e[2];){for(var u=0,l=e[1];l<=e[3];){var f=null,h=null;a%2==0&&u%2==0?(f=c([[[s,l],[s,l+o],[s+i,l],[s,l]]],r.properties),h=c([[[s,l+o],[s+i,l+o],[s+i,l],[s,l+o]]],r.properties)):a%2==0&&u%2==1?(f=c([[[s,l],[s+i,l+o],[s+i,l],[s,l]]],r.properties),h=c([[[s,l],[s,l+o],[s+i,l+o],[s,l]]],r.properties)):u%2==0&&a%2==1?(f=c([[[s,l],[s,l+o],[s+i,l+o],[s,l]]],r.properties),h=c([[[s,l],[s+i,l+o],[s+i,l],[s,l]]],r.properties)):u%2==1&&a%2==1&&(f=c([[[s,l],[s,l+o],[s+i,l],[s,l]]],r.properties),h=c([[[s,l+o],[s+i,l+o],[s+i,l],[s,l+o]]],r.properties)),r.mask?(gy(r.mask,f)&&n.push(f),gy(r.mask,h)&&n.push(h)):(n.push(f),n.push(h)),l+=o,u++}a++,s+=i}return d(n)}dy.invert=function(e,t){var r=vd(e*e+t*t),n=function(e){return e}(r),i=gd(n),o=yd(n);return[dd(e*i,r*o),_d(r&&t*i/r)]},t.along=function(e,t,r){void 0===r&&(r={});for(var n=ie(e).coordinates,i=0,o=0;o<n.length&&!(t>=i&&o===n.length-1);o++){if(i>=t){var a=t-i;if(a){var s=ur(n[o],n[o-1])-180;return ar(n[o],a,s,r)}return u(n[o])}i+=vt(n[o],n[o+1],r)}return u(n[n.length-1])},t.angle=function(e,t,r,n){if(void 0===n&&(n={}),!M(n))throw new Error("options is invalid");if(!e)throw new Error("startPoint is required");if(!t)throw new Error("midPoint is required");if(!r)throw new Error("endPoint is required");var i=e,o=t,a=r,s=w(!0!==n.mercator?ur(i,o):_i(i,o)),u=w(!0!==n.mercator?ur(a,o):_i(a,o)),l=Math.abs(s-u);return!0===n.explementary?360-l:l},t.applyFilter=Rs,t.area=xn,t.areaFactors=o,t.bbox=K,t.bboxClip=function(e,t){var r=ie(e),n=r.type,i="Feature"===e.type?e.properties:{},o=r.coordinates;switch(n){case"LineString":case"MultiLineString":var a=[];return"LineString"===n&&(o=[o]),o.forEach(function(e){!function(e,t,r){var n,i,o,a,s,u=e.length,l=fi(e[0],t),c=[];for(r||(r=[]),n=1;n<u;n++){for(a=e[n-1],i=o=fi(s=e[n],t);;){if(!(l|i)){c.push(a),i!==o?(c.push(s),n<u-1&&(r.push(c),c=[])):n===u-1&&c.push(s);break}if(l&i)break;l?l=fi(a=ci(a,s,l,t),t):i=fi(s=ci(a,s,i,t),t)}l=o}c.length&&r.push(c)}(e,t,a)}),1===a.length?h(a[0],i):y(a,i);case"Polygon":return c(hi(o,t),i);case"MultiPolygon":return v(o.map(function(e){return hi(e,t)}),i);default:throw new Error("geometry "+n+" not supported")}},t.bboxPolygon=nr,t.bearing=ur,t.bearingToAngle=w,t.bearingToAzimuth=w,t.bezier=rr,t.bezierSpline=rr,t.booleanClockwise=Pi,t.booleanContains=function(e,t){var r=ie(e),n=ie(t),i=r.type,o=n.type,a=r.coordinates,s=n.coordinates;switch(i){case"Point":switch(o){case"Point":return Xo(a,s);default:throw new Error("feature2 "+o+" geometry not supported")}case"MultiPoint":switch(o){case"Point":return function(e,t){var r,n=!1;for(r=0;r<e.coordinates.length;r++)if(Xo(e.coordinates[r],t.coordinates)){n=!0;break}return n}(r,n);case"MultiPoint":return function(e,t){for(var r=0,n=t.coordinates;r<n.length;r++){for(var i=n[r],o=!1,a=0,s=e.coordinates;a<s.length;a++)if(Xo(i,s[a])){o=!0;break}if(!o)return!1}return!0}(r,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"Point":return Tn(n,r,{ignoreEndVertices:!0});case"LineString":return function(e,t){for(var r=!1,n=0,i=t.coordinates;n<i.length;n++){var o=i[n];if(Tn({type:"Point",coordinates:o},e,{ignoreEndVertices:!0})&&(r=!0),!Tn({type:"Point",coordinates:o},e,{ignoreEndVertices:!1}))return!1}return r}(r,n);case"MultiPoint":return function(e,t){for(var r=!1,n=0,i=t.coordinates;n<i.length;n++){var o=i[n];if(Tn(o,e,{ignoreEndVertices:!0})&&(r=!0),!Tn(o,e))return!1}return!!r}(r,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"Point":return dt(n,r,{ignoreBoundary:!0});case"LineString":return function(e,t){var r=!1,n=0,i=K(e),o=K(t);if(!Ho(i,o))return!1;for(;n<t.coordinates.length-1;n++)if(dt({type:"Point",coordinates:Zo(t.coordinates[n],t.coordinates[n+1])},e,{ignoreBoundary:!0})){r=!0;break}return r}(r,n);case"Polygon":return function(e,t){if("Feature"===e.type&&null===e.geometry)return!1;if("Feature"===t.type&&null===t.geometry)return!1;var r=K(e),n=K(t);if(!Ho(r,n))return!1;for(var i=ie(t).coordinates,o=0,a=i;o<a.length;o++)for(var s=0,u=a[o];s<u.length;s++)if(!dt(u[s],e))return!1;return!0}(r,n);case"MultiPoint":return function(e,t){for(var r=0,n=t.coordinates;r<n.length;r++)if(!dt(n[r],e,{ignoreBoundary:!0}))return!1;return!0}(r,n);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}},t.booleanCrosses=function(e,t){var r=ie(e),n=ie(t),i=r.type,o=n.type;switch(i){case"MultiPoint":switch(o){case"LineString":return Yo(r,n);case"Polygon":return Qo(r,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"MultiPoint":return Yo(n,r);case"LineString":return function(e,t){if(fn(e,t).features.length>0)for(var r=0;r<e.coordinates.length-1;r++)for(var n=0;n<t.coordinates.length-1;n++){var i=!0;if(0!==n&&n!==t.coordinates.length-2||(i=!1),$o(e.coordinates[r],e.coordinates[r+1],t.coordinates[n],i))return!0}return!1}(r,n);case"Polygon":return Ko(r,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"MultiPoint":return Qo(n,r);case"LineString":return Ko(n,r);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}},t.booleanDisjoint=Jo,t.booleanEqual=function(e,t){return ie(e).type===ie(t).type&&new ia({precision:6}).compare(zt(e),zt(t))},t.booleanIntersects=oa,t.booleanOverlap=function(e,t){var r=ie(e),n=ie(t),i=r.type,o=n.type;if("MultiPoint"===i&&"MultiPoint"!==o||("LineString"===i||"MultiLineString"===i)&&"LineString"!==o&&"MultiLineString"!==o||("Polygon"===i||"MultiPolygon"===i)&&"Polygon"!==o&&"MultiPolygon"!==o)throw new Error("features must be of the same type");if("Point"===i)throw new Error("Point geometry not supported");if(new ia({precision:6}).compare(e,t))return!1;var a=0;switch(i){case"MultiPoint":for(var s=0;s<r.coordinates.length;s++)for(var u=0;u<n.coordinates.length;u++){var l=r.coordinates[s],c=n.coordinates[u];if(l[0]===c[0]&&l[1]===c[1])return!0}return!1;case"LineString":case"MultiLineString":U(e,function(e){U(t,function(t){gi(e,t).features.length&&a++})});break;case"Polygon":case"MultiPolygon":U(e,function(e){U(t,function(t){fn(e,t).features.length&&a++})})}return a>0},t.booleanParallel=function(e,t){if(!e)throw new Error("line1 is required");if(!t)throw new Error("line2 is required");if("LineString"!==ma(e,"line1"))throw new Error("line1 must be a LineString");if("LineString"!==ma(t,"line2"))throw new Error("line2 must be a LineString");for(var r=Dr(zt(e)).features,n=Dr(zt(t)).features,i=0;i<r.length;i++){var o=r[i].geometry.coordinates;if(!n[i])break;if(!va(o,n[i].geometry.coordinates))return!1}return!0},t.booleanPointInPolygon=dt,t.booleanPointOnLine=Tn,t.booleanWithin=In,t.buffer=function(e,t,r){var n=(r=r||{}).units||"kilometers",i=r.steps||8;if(!e)throw new Error("geojson is required");if("object"!=typeof r)throw new Error("options must be an object");if("number"!=typeof i)throw new Error("steps must be an number");if(void 0===t)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var o=[];switch(e.type){case"GeometryCollection":return F(e,function(e){var r=yy(e,t,n,i);r&&o.push(r)}),d(o);case"FeatureCollection":return V(e,function(e){var r=yy(e,t,n,i);r&&V(r,function(e){e&&o.push(e)})}),d(o)}return yy(e,t,n,i)},t.center=lr,t.centerMean=ls,t.centerMedian=function(e,t){if(void 0===t&&(t={}),!M(t=t||{}))throw new Error("options is invalid");var r=t.counter||10;if(!T(r))throw new Error("counter must be a number");var n=t.weight,i=ls(e,{weight:t.weight}),o=d([]);V(e,function(e){var t;o.features.push(cr(e,{properties:{weight:null===(t=e.properties)||void 0===t?void 0:t[n]}}))});var a={tolerance:t.tolerance,medianCandidates:[]};return function e(t,r,n,i,o){var a=i.tolerance||.001,s=0,l=0,c=0,f=0;if(V(n,function(e){var r,n=null===(r=e.properties)||void 0===r?void 0:r.weight,i=null==n?1:n;if(!T(i=Number(i)))throw new Error("weight value must be a number");if(i>0){f+=1;var o=i*vt(e,t);0===o&&(o=1);var a=i/o;s+=e.geometry.coordinates[0]*a,l+=e.geometry.coordinates[1]*a,c+=a}}),f<1)throw new Error("no features to measure");var h=s/c,p=l/c;return 1===f||0===o||Math.abs(h-r[0])<a&&Math.abs(p-r[1])<a?u([h,p],{medianCandidates:i.medianCandidates}):(i.medianCandidates.push([h,p]),e([h,p],t,n,i,o-1))}(i.geometry.coordinates,[0,0],o,a,r)},t.centerOfMass=function e(t,r){switch(void 0===r&&(r={}),oe(t)){case"Point":return u(Q(t),r.properties);case"Polygon":var n=[];N(t,function(e){n.push(e)});var i,o,a,s,l,c,f,h,p=cr(t,{properties:r.properties}),d=p.geometry.coordinates,y=0,g=0,v=0,m=n.map(function(e){return[e[0]-d[0],e[1]-d[1]]});for(i=0;i<n.length-1;i++)s=(o=m[i])[0],c=o[1],l=(a=m[i+1])[0],v+=h=s*(f=a[1])-l*c,y+=(s+l)*h,g+=(c+f)*h;if(0===v)return p;var _=1/(.5*v*6);return u([d[0]+_*y,d[1]+_*g],r.properties);default:var b=pt(t);return b?e(b,{properties:r.properties}):cr(t,{properties:r.properties})}},t.centroid=cr,t.circle=sr,t.cleanCoords=zt,t.clone=xt,t.clusterEach=Ls,t.clusterReduce=Cs,t.clusters=Vs,t.clustersDbscan=function(e,t,r){void 0===r&&(r={}),!0!==r.mutate&&(e=xt(e)),r.minPoints=r.minPoints||3;var n=new ca.DBSCAN,i=n.run(D(e),E(t,r.units),r.minPoints,vt),o=-1;return i.forEach(function(t){o++,t.forEach(function(t){var r=e.features[t];r.properties||(r.properties={}),r.properties.cluster=o,r.properties.dbscan="core"})}),n.noise.forEach(function(t){var r=e.features[t];r.properties||(r.properties={}),r.properties.cluster?r.properties.dbscan="edge":r.properties.dbscan="noise"}),e},t.clustersKmeans=function(e,t){void 0===t&&(t={});var r=e.features.length;t.numberOfClusters=t.numberOfClusters||Math.round(Math.sqrt(r/2)),t.numberOfClusters>r&&(t.numberOfClusters=r),!0!==t.mutate&&(e=xt(e));var n=D(e),i=n.slice(0,t.numberOfClusters),o=ga(n,t.numberOfClusters,i),a={};return o.centroids.forEach(function(e,t){a[t]=e}),V(e,function(e,t){var r=o.idxs[t];e.properties.cluster=r,e.properties.centroid=a[r]}),e},t.collect=function(e,t,r,n){var i=we(6),o=t.features.map(function(e){var t;return{minX:e.geometry.coordinates[0],minY:e.geometry.coordinates[1],maxX:e.geometry.coordinates[0],maxY:e.geometry.coordinates[1],property:null===(t=e.properties)||void 0===t?void 0:t[r]}});return i.load(o),e.features.forEach(function(e){e.properties||(e.properties={});var t=K(e),r=i.search({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}),o=[];r.forEach(function(t){dt([t.minX,t.minY],e)&&o.push(t.property)}),e.properties[n]=o}),e},t.collectionOf=ne,t.combine=function(e){var t={MultiPoint:{coordinates:[],properties:[]},MultiLineString:{coordinates:[],properties:[]},MultiPolygon:{coordinates:[],properties:[]}};return V(e,function(e){var r,n,i,o;switch(null===(o=e.geometry)||void 0===o?void 0:o.type){case"Point":t.MultiPoint.coordinates.push(e.geometry.coordinates),t.MultiPoint.properties.push(e.properties);break;case"MultiPoint":(r=t.MultiPoint.coordinates).push.apply(r,e.geometry.coordinates),t.MultiPoint.properties.push(e.properties);break;case"LineString":t.MultiLineString.coordinates.push(e.geometry.coordinates),t.MultiLineString.properties.push(e.properties);break;case"MultiLineString":(n=t.MultiLineString.coordinates).push.apply(n,e.geometry.coordinates),t.MultiLineString.properties.push(e.properties);break;case"Polygon":t.MultiPolygon.coordinates.push(e.geometry.coordinates),t.MultiPolygon.properties.push(e.properties);break;case"MultiPolygon":(i=t.MultiPolygon.coordinates).push.apply(i,e.geometry.coordinates),t.MultiPolygon.properties.push(e.properties)}}),d(Object.keys(t).filter(function(e){return t[e].coordinates.length}).sort().map(function(e){return a({type:e,coordinates:t[e].coordinates},{collectedProperties:t[e].properties})}))},t.concave=function(e,t){void 0===t&&(t={});var r=t.maxEdge||1/0,n=mt(function(e){var t=[],r={};return V(e,function(e){if(e.geometry){var n=e.geometry.coordinates.join("-");Object.prototype.hasOwnProperty.call(r,n)||(t.push(e),r[n]=!0)}}),d(t)}(e));if(n.features=n.features.filter(function(e){var n=e.geometry.coordinates[0][0],i=e.geometry.coordinates[0][1],o=e.geometry.coordinates[0][2],a=vt(n,i,t),s=vt(i,o,t),u=vt(n,o,t);return a<=r&&s<=r&&u<=r}),n.features.length<1)return null;var i=Ut(n);return 1===i.coordinates.length&&(i.coordinates=i.coordinates[0],i.type="Polygon"),a(i)},t.containsNumber=ee,t.convertArea=k,t.convertDistance=E,t.convertLength=E,t.convex=pt,t.coordAll=D,t.coordEach=N,t.coordReduce=R,t.createBins=Ns,t.degrees2radians=P,t.degreesToRadians=P,t.destination=ar,t.difference=function(e,t){var r=ie(e),n=ie(t),i=e.properties||{},o=bu.difference(r.coordinates,n.coordinates);return 0===o.length?null:1===o.length?c(o[0],i):v(o,i)},t.dissolve=function(e,t){if(!M(t=t||{}))throw new Error("options is invalid");var r=t.propertyName;ne(e,"Polygon","dissolve");var n=[];if(!t.propertyName)return Gn(v(bu.union.apply(null,e.features.map(function(e){return e.geometry.coordinates}))));var i={};V(e,function(e){Object.prototype.hasOwnProperty.call(i,e.properties[r])||(i[e.properties[r]]=[]),i[e.properties[r]].push(e)});for(var o=Object.keys(i),a=0;a<o.length;a++){var s=v(bu.union.apply(null,i[o[a]].map(function(e){return e.geometry.coordinates})));s.properties[r]=o[a],n.push(s)}return Gn(d(n))},t.distance=vt,t.distanceToDegrees=x,t.distanceToRadians=S,t.distanceWeight=ds,t.earthRadius=r,t.ellipse=ss,t.envelope=ir,t.explode=fr,t.factors=n,t.feature=a,t.featureCollection=d,t.featureEach=V,t.featureOf=re,t.featureReduce=A,t.filterProperties=Gs,t.findPoint=Z,t.findSegment=X,t.flatten=Gn,t.flattenEach=q,t.flattenReduce=J,t.flip=function(e,t){if(!M(t=t||{}))throw new Error("options is invalid");var r=t.mutate;if(!e)throw new Error("geojson is required");return!1!==r&&void 0!==r||(e=xt(e)),N(e,function(e){var t=e[0],r=e[1];e[0]=r,e[1]=t}),e},t.geojsonType=te,t.geomEach=F,t.geomReduce=B,t.geometry=s,t.geometryCollection=m,t.getCluster=Is,t.getCoord=Q,t.getCoords=$,t.getGeom=ie,t.getType=oe,t.greatCircle=function(e,t,r){if("object"!=typeof(r=r||{}))throw new Error("options is invalid");var n=r.properties,i=r.npoints,o=r.offset;return e=Q(e),t=Q(t),n=n||{},i=i||100,o=o||10,new Yn({x:e[0],y:e[1]},{x:t[0],y:t[1]},n).Arc(i,{offset:o}).json()},t.helpers=C,t.hexGrid=vy,t.inside=dt,t.interpolate=function(e,t,r){if("object"!=typeof(r=r||{}))throw new Error("options is invalid");var n=r.gridType,i=r.property,o=r.weight;if(!e)throw new Error("points is required");if(ne(e,"Point","input must contain Points"),!t)throw new Error("cellSize is required");if(void 0!==o&&"number"!=typeof o)throw new Error("weight must be a number");i=i||"elevation",n=n||"square",o=o||1;var a,s=K(e);switch(n){case"point":case"points":a=Rn(s,t,r);break;case"square":case"squares":a=Sy(s,t,r);break;case"hex":case"hexes":a=vy(s,t,r);break;case"triangle":case"triangles":a=xy(s,t,r);break;default:throw new Error("invalid gridType")}var u=[];return V(a,function(t){var a=0,s=0;V(e,function(e){var u,l=vt("point"===n?t:cr(t),e,r);if(void 0!==i&&(u=e.properties[i]),void 0===u&&(u=e.geometry.coordinates[2]),void 0===u)throw new Error("zValue is missing");0===l&&(a=u);var c=1/Math.pow(l,o);s+=c,a+=c*u});var l=xt(t);l.properties[i]=a/s,u.push(l)}),d(u)},t.intersect=gy,t.invariant=ae,t.isNumber=T,t.isObject=M,t.isobands=function(e,t,r){if(!M(r=r||{}))throw new Error("options is invalid");var n=r.zProperty||"elevation",i=r.commonProperties||{},o=r.breaksProperties||[];if(ne(e,"Point","Input must contain Points"),!t)throw new Error("breaks is required");if(!Array.isArray(t))throw new Error("breaks is not an Array");if(!M(i))throw new Error("commonProperties is not an Object");if(!Array.isArray(o))throw new Error("breaksProperties is not an Array");var a=function(e,t){if(!M(t=t||{}))throw new Error("options is invalid");var r=t.zProperty||"elevation",n=t.flip,i=t.flags;ne(e,"Point","input must contain Points");for(var o=function(e,t){var r={};return V(e,function(e){var t=$(e)[1];r[t]||(r[t]=[]),r[t].push(e)}),Object.keys(r).map(function(e){return r[e].sort(function(e,t){return $(e)[0]-$(t)[0]})}).sort(function(e,r){return t?$(e[0])[1]-$(r[0])[1]:$(r[0])[1]-$(e[0])[1]})}
|
|
54
|
+
/*!
|
|
55
|
+
* @license GNU Affero General Public License.
|
|
56
|
+
* Copyright (c) 2015, 2015 Ronny Lorenz <ronny@tbi.univie.ac.at>
|
|
57
|
+
* v. 1.2.0
|
|
58
|
+
* https://github.com/RaumZeit/MarchingSquares.js
|
|
59
|
+
*
|
|
60
|
+
* MarchingSquaresJS is free software: you can redistribute it and/or modify
|
|
61
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
62
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
63
|
+
* (at your option) any later version.
|
|
64
|
+
*
|
|
65
|
+
* MarchingSquaresJS is distributed in the hope that it will be useful,
|
|
66
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
67
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
68
|
+
* GNU Affero General Public License for more details.
|
|
69
|
+
*
|
|
70
|
+
* As additional permission under GNU Affero General Public License version 3
|
|
71
|
+
* section 7, third-party projects (personal or commercial) may distribute,
|
|
72
|
+
* include, or link against UNMODIFIED VERSIONS of MarchingSquaresJS without the
|
|
73
|
+
* requirement that said third-party project for that reason alone becomes
|
|
74
|
+
* subject to any requirement of the GNU Affero General Public License version 3.
|
|
75
|
+
* Any modifications to MarchingSquaresJS, however, must be shared with the public
|
|
76
|
+
* and made available.
|
|
77
|
+
*
|
|
78
|
+
* In summary this:
|
|
79
|
+
* - allows you to use MarchingSquaresJS at no cost
|
|
80
|
+
* - allows you to use MarchingSquaresJS for both personal and commercial purposes
|
|
81
|
+
* - allows you to distribute UNMODIFIED VERSIONS of MarchingSquaresJS under any
|
|
82
|
+
* license as long as this license notice is included
|
|
83
|
+
* - enables you to keep the source code of your program that uses MarchingSquaresJS
|
|
84
|
+
* undisclosed
|
|
85
|
+
* - forces you to share any modifications you have made to MarchingSquaresJS,
|
|
86
|
+
* e.g. bug-fixes
|
|
87
|
+
*
|
|
88
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
89
|
+
* along with MarchingSquaresJS. If not, see <http://www.gnu.org/licenses/>.
|
|
90
|
+
*/(e,n),a=[],s=0;s<o.length;s++){for(var u=o[s],l=[],c=0;c<u.length;c++){var f=u[c];f.properties[r]?l.push(f.properties[r]):l.push(0),!0===i&&(f.properties.matrixPosition=[s,c])}a.push(l)}return a}(e,{zProperty:n,flip:!0}),s=function(e,t,r){for(var n=[],i=1;i<t.length;i++){var o=+t[i-1],a=+t[i],s=To(ko(Li(e,o,a-o))),u={};u.groupedRings=s,u[r]=o+"-"+a,n.push(u)}return n}(a,t,n);return d((s=function(e,t,r){var n=K(r),i=n[2]-n[0],o=n[3]-n[1],a=n[0],s=n[1],u=t[0].length-1,l=t.length-1,c=i/u,f=o/l,h=function(e){e[0]=e[0]*c+a,e[1]=e[1]*f+s};return e.forEach(function(e){e.groupedRings.forEach(function(e){e.forEach(function(e){e.forEach(h)})})}),e}(s,a,e)).map(function(e,t){if(o[t]&&!M(o[t]))throw new Error("Each mappedProperty is required to be an Object");var r=ce({},i,o[t]);return r[n]=e[n],v(e.groupedRings,r)}))},t.isolines=function(e,t,r){if(!M(r=r||{}))throw new Error("options is invalid");var n=r.zProperty||"elevation",i=r.commonProperties||{},o=r.breaksProperties||[];if(ne(e,"Point","Input must contain Points"),!t)throw new Error("breaks is required");if(!Array.isArray(t))throw new Error("breaks must be an Array");if(!M(i))throw new Error("commonProperties must be an Object");if(!Array.isArray(o))throw new Error("breaksProperties must be an Array");var a=function(e,t){if(!M(t=t||{}))throw new Error("options is invalid");var r=t.zProperty||"elevation",n=t.flip,i=t.flags;ne(e,"Point","input must contain Points");for(var o=function(e,t){var r={};return V(e,function(e){var t=$(e)[1];r[t]||(r[t]=[]),r[t].push(e)}),Object.keys(r).map(function(e){return r[e].sort(function(e,t){return $(e)[0]-$(t)[0]})}).sort(function(e,r){return t?$(e[0])[1]-$(r[0])[1]:$(r[0])[1]-$(e[0])[1]})}(e,n),a=[],s=0;s<o.length;s++){for(var u=o[s],l=[],c=0;c<u.length;c++){var f=u[c];f.properties[r]?l.push(f.properties[r]):l.push(0),!0===i&&(f.properties.matrixPosition=[s,c])}a.push(l)}return a}(e,{zProperty:n,flip:!0});return d(function(e,t,r){var n=K(r),i=n[2]-n[0],o=n[3]-n[1],a=n[0],s=n[1],u=t[0].length-1,l=t.length-1,c=i/u,f=o/l,h=function(e){e[0]=e[0]*c+a,e[1]=e[1]*f+s};return e.forEach(function(e){N(e,h)}),e}(function(e,t,r,n,i){for(var o=[],a=1;a<t.length;a++){var s=+t[a],u=ce({},n,i[a]);u[r]=s;var l=y(pe(e,s),u);o.push(l)}return o}(a,t,n,i,o),a,e))},t.kinks=function(e){var t,r,n={type:"FeatureCollection",features:[]};if("LineString"===(r="Feature"===e.type?e.geometry:e).type)t=[r.coordinates];else if("MultiLineString"===r.type)t=r.coordinates;else if("MultiPolygon"===r.type)t=[].concat.apply([],r.coordinates);else{if("Polygon"!==r.type)throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");t=r.coordinates}return t.forEach(function(e){t.forEach(function(t){for(var r=0;r<e.length-1;r++)for(var i=r;i<t.length-1;i++){if(e===t){if(1===Math.abs(r-i))continue;if(0===r&&i===e.length-2&&e[r][0]===e[e.length-1][0]&&e[r][1]===e[e.length-1][1])continue}var o=mn(e[r][0],e[r][1],e[r+1][0],e[r+1][1],t[i][0],t[i][1],t[i+1][0],t[i+1][1]);o&&n.features.push(u([o[0],o[1]]))}})}),n},t.length=En,t.lengthToDegrees=x,t.lengthToRadians=S,t.lineArc=ti,t.lineChunk=function(e,t,r){if(!M(r=r||{}))throw new Error("options is invalid");var n=r.units,i=r.reverse;if(!e)throw new Error("geojson is required");if(t<=0)throw new Error("segmentLength must be greater than 0");var o=[];return q(e,function(e){i&&(e.geometry.coordinates=e.geometry.coordinates.reverse()),function(e,t,r,n){var i=En(e,{units:r});if(i<=t)return n(e);var o=i/t;Number.isInteger(o)||(o=Math.floor(o)+1);for(var a=0;a<o;a++)n(kn(e,t*a,t*(a+1),{units:r}))}(e,t,n,function(e){o.push(e)})}),d(o)},t.lineDistance=En,t.lineEach=W,t.lineIntersect=fn,t.lineOffset=function(e,t,r){if(!M(r=r||{}))throw new Error("options is invalid");var n=r.units;if(!e)throw new Error("geojson is required");if(null==t||isNaN(t))throw new Error("distance is required");var i=oe(e),o=e.properties;switch(i){case"LineString":return Go(e,t,n);case"MultiLineString":var a=[];return q(e,function(e){a.push(Go(e,t,n).geometry.coordinates)}),y(a,o);default:throw new Error("geometry "+i+" is not supported")}},t.lineOverlap=gi,t.lineReduce=H,t.lineSegment=Dr,t.lineSlice=function(e,t,r){var n=$(r);if("LineString"!==oe(r))throw new Error("line must be a LineString");for(var i,o=pn(r,e),a=pn(r,t),s=[(i=o.properties.index<=a.properties.index?[o,a]:[a,o])[0].geometry.coordinates],u=i[0].properties.index+1;u<i[1].properties.index+1;u++)s.push(n[u]);return s.push(i[1].geometry.coordinates),h(s,r.properties)},t.lineSliceAlong=kn,t.lineSplit=function(e,t){if(!e)throw new Error("line is required");if(!t)throw new Error("splitter is required");var r=oe(e),n=oe(t);if("LineString"!==r)throw new Error("line must be LineString");if("FeatureCollection"===n)throw new Error("splitter cannot be a FeatureCollection");if("GeometryCollection"===n)throw new Error("splitter cannot be a GeometryCollection");var i=jn(t,{precision:7});switch(n){case"Point":return Qn(e,i);case"MultiPoint":return Kn(e,i);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return Kn(e,fn(e,i))}},t.lineString=h,t.lineStringToPolygon=ai,t.lineStrings=p,t.lineToPolygon=ai,t.mask=function(e,t){var r,n=function(e){return c(e&&e.geometry.coordinates||[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]])}(t);return("FeatureCollection"===e.type?by(2===(r=e).features.length?bu.union(r.features[0].geometry.coordinates,r.features[1].geometry.coordinates):bu.union.apply(bu,r.features.map(function(e){return e.geometry.coordinates}))):by(bu.union(e.geometry.coordinates))).geometry.coordinates.forEach(function(e){n.geometry.coordinates.push(e[0])}),n},t.meta=Y,t.midpoint=function(e,t){return ar(e,vt(e,t)/2,ur(e,t))},t.moranIndex=function(e,t){var r=t.inputField,n=t.threshold||1e5,i=t.p||2,o=t.binary||!1,a=ds(e,{alpha:t.alpha||-1,binary:o,p:i,standardization:t.standardization||!0,threshold:n}),s=[];V(e,function(e){var t=e.properties||{};s.push(t[r])});for(var u=ys(s),l=function(e){for(var t=ys(e),r=0,n=0,i=e;n<i.length;n++){var o=i[n];r+=Math.pow(o-t,2)}return r/e.length}(s),c=0,f=0,h=0,p=0,d=a.length,y=0;y<d;y++){for(var g=0,v=0;v<d;v++)c+=a[y][v]*(s[y]-u)*(s[v]-u),f+=a[y][v],h+=Math.pow(a[y][v]+a[v][y],2),g+=a[y][v]+a[v][y];p+=Math.pow(g,2)}var m=c/f/l,_=-1/(d-1),b=(d*d*(h*=.5)-d*p+f*f*3)/((d-1)*(d+1)*(f*f))-_*_,S=Math.sqrt(b);return{expectedMoranIndex:_,moranIndex:m,stdNorm:S,zNorm:(m-_)/S}},t.multiLineString=y,t.multiPoint=g,t.multiPolygon=v,t.nearest=Ar,t.nearestPoint=Ar,t.nearestPointOnLine=pn,t.nearestPointToLine=function(e,t,r){void 0===r&&(r={});var n=r.units,i=r.properties||{},o=function(e){var t=[];switch(e.geometry?e.geometry.type:e.type){case"GeometryCollection":return F(e,function(e){"Point"===e.type&&t.push({type:"Feature",properties:{},geometry:e})}),{type:"FeatureCollection",features:t};case"FeatureCollection":return e.features=e.features.filter(function(e){return"Point"===e.geometry.type}),e;default:throw new Error("points must be a Point Collection")}}(e);if(!o.features.length)throw new Error("points must contain features");if(!t)throw new Error("line is required");if("LineString"!==oe(t))throw new Error("line must be a LineString");var a=1/0,s=null;return V(o,function(e){var r=yn(e,t,{units:n});r<a&&(a=r,s=e)}),s&&(s.properties=ce({dist:a},s.properties,i)),s},t.planepoint=function(e,t){var r=Q(e),n=ie(t).coordinates[0];if(n.length<4)throw new Error("OuterRing of a Polygon must have 4 or more Positions.");var i=t.properties||{},o=i.a,a=i.b,s=i.c,u=r[0],l=r[1],c=n[0][0],f=n[0][1],h=void 0!==o?o:n[0][2],p=n[1][0],d=n[1][1],y=void 0!==a?a:n[1][2],g=n[2][0],v=n[2][1],m=void 0!==s?s:n[2][2];return(m*(u-c)*(l-d)+h*(u-p)*(l-v)+y*(u-g)*(l-f)-y*(u-c)*(l-v)-m*(u-p)*(l-f)-h*(u-g)*(l-d))/((u-c)*(l-d)+(u-p)*(l-v)+(u-g)*(l-f)-(u-c)*(l-v)-(u-p)*(l-f)-(u-g)*(l-d))},t.point=u,t.pointGrid=Rn,t.pointOnFeature=_n,t.pointOnLine=pn,t.pointOnSurface=_n,t.pointToLineDistance=yn,t.points=l,t.pointsWithinPolygon=gt,t.polygon=c,t.polygonSmooth=function(e,t){var r=[],n=t.iterations||1;if(!e)throw new Error("inputPolys is required");return F(e,function(e,t,i){var o,a,s;switch(e.type){case"Polygon":o=[[]];for(var u=0;u<n;u++)s=[[]],a=e,u>0&&(a=c(o).geometry),fs(a,s),o=s.slice(0);r.push(c(o,i));break;case"MultiPolygon":o=[[[]]];for(var l=0;l<n;l++)s=[[[]]],a=e,l>0&&(a=v(o).geometry),hs(a,s),o=s.slice(0);r.push(v(o,i));break;default:throw new Error("geometry is invalid, must be Polygon or MultiPolygon")}}),d(r)},t.polygonTangents=function(e,t){var r,n,i,o,a=$(e),s=$(t),l=K(t),c=0,f=null;switch(a[0]>l[0]&&a[0]<l[2]&&a[1]>l[1]&&a[1]<l[3]&&(c=(f=Ar(e,fr(t))).properties.featureIndex),oe(t)){case"Polygon":r=s[0][c],n=s[0][0],null!==f&&f.geometry.coordinates[1]<a[1]&&(n=s[0][c]),o=Oi(s[0][0],s[0][s[0].length-1],a);var h=xi(s[0],a,o,i,r,n);r=h[0],n=h[1];break;case"MultiPolygon":for(var p=0,y=0,g=0,v=0;v<s[0].length;v++){p=v;for(var m=!1,_=0;_<s[0][v].length;_++){if(y=_,g===c){m=!0;break}g++}if(m)break}r=s[0][p][y],n=s[0][p][y],o=Oi(s[0][0][0],s[0][0][s[0][0].length-1],a),s.forEach(function(e){var t=xi(e[0],a,o,i,r,n);r=t[0],n=t[1]})}return d([u(r),u(n)])},t.polygonToLine=ni,t.polygonToLineString=ni,t.polygonize=function(e){var t=qo.fromGeoJson(e);t.deleteDangles(),t.deleteCutEdges();var r=[],n=[];return t.getEdgeRings().filter(function(e){return e.isValid()}).forEach(function(e){e.isHole()?r.push(e):n.push(e)}),r.forEach(function(e){Bo.findEdgeRingContaining(e,n)&&n.push(e)}),d(n.map(function(e){return e.toPolygon()}))},t.polygons=f,t.projection=Ss,t.propEach=j,t.propReduce=G,t.propertiesContainsFilter=js,t.radians2degrees=O,t.radiansToDegrees=O,t.radiansToDistance=b,t.radiansToLength=b,t.random=Ms,t.randomLineString=Es,t.randomPoint=Os,t.randomPolygon=Ps,t.randomPosition=ws,t.rewind=function(e,t){if(!M(t=t||{}))throw new Error("options is invalid");var r=t.reverse||!1,n=t.mutate||!1;if(!e)throw new Error("<geojson> is required");if("boolean"!=typeof r)throw new Error("<reverse> must be a boolean");if("boolean"!=typeof n)throw new Error("<mutate> must be a boolean");!1===n&&(e=xt(e));var i=[];switch(e.type){case"GeometryCollection":return F(e,function(e){Ei(e,r)}),e;case"FeatureCollection":return V(e,function(e){V(Ei(e,r),function(e){i.push(e)})}),d(i)}return Ei(e,r)},t.rhumbBearing=_i,t.rhumbDestination=Si,t.rhumbDistance=dn,t.round=_,t.sample=function(e,t){if(!e)throw new Error("featurecollection is required");if(null==t)throw new Error("num is required");if("number"!=typeof t)throw new Error("num must be a number");return d(function(e,t){for(var r,n,i=e.slice(0),o=e.length,a=o-t;o-- >a;)r=i[n=Math.floor((o+1)*Math.random())],i[n]=i[o],i[o]=r;return i.slice(a)}(e.features,t))},t.sector=function(e,t,r,n,i){if(!M(i=i||{}))throw new Error("options is invalid");var o=i.properties;if(!e)throw new Error("center is required");if(null==r)throw new Error("bearing1 is required");if(null==n)throw new Error("bearing2 is required");if(!t)throw new Error("radius is required");if("object"!=typeof i)throw new Error("options must be an object");if(mi(r)===mi(n))return sr(e,t,i);var a=$(e),s=ti(e,t,r,n,i),u=[[a]];return N(s,function(e){u[0].push(e)}),u[0].push(a),c(u,o)},t.segmentEach=U,t.segmentReduce=z,t.shortestPath=function(e,t,r){if(!M(r=r||{}))throw new Error("options is invalid");var n=r.resolution,i=r.minDistance,o=r.obstacles||d([]);if(!e)throw new Error("start is required");if(!t)throw new Error("end is required");if(n&&!T(n)||n<=0)throw new Error("options.resolution must be a number, greater than 0");if(i)throw new Error("options.minDistance is not yet implemented");var s=Q(e),l=Q(t);switch(e=u(s),t=u(l),oe(o)){case"FeatureCollection":if(0===o.features.length)return h([s,l]);break;case"Polygon":o=d([a(ie(o))]);break;default:throw new Error("invalid obstacles")}var c=o;c.features.push(e),c.features.push(t);var f=K(Co(nr(K(c)),1.15));n||(n=vt([f[0],f[1]],[f[2],f[1]],r)/100),c.features.pop(),c.features.pop();for(var p=f[0],y=f[1],g=f[2],v=f[3],m=n/vt([p,y],[g,y],r)*(g-p),_=n/vt([p,y],[p,v],r)*(v-y),b=g-p,S=v-y,x=Math.floor(b/m),w=Math.floor(S/_),O=(b-x*m)/2,P=[],E=[],k=[],I=[],L=1/0,C=1/0,N=v-(S-w*_)/2,R=0;N>=y;){for(var j=[],G=[],V=p+O,A=0;V<=g;){var D=u([V,N]),F=Oa(D,o);j.push(F?0:1),G.push(V+"|"+N);var B=vt(D,e);!F&&B<L&&(L=B,k={x:A,y:R});var q=vt(D,t);!F&&q<C&&(C=q,I={x:A,y:R}),V+=m,A++}E.push(j),P.push(G),N-=_,R++}var J=new Sa(E,{diagonal:!0}),U=J.grid[k.y][k.x],z=J.grid[I.y][I.x],W=ba.search(J,U,z),H=[s];return W.forEach(function(e){var t=P[e.x][e.y].split("|");H.push([+t[0],+t[1]])}),H.push(l),zt(h(H))},t.simplify=function(e,t){if(!M(t=t||{}))throw new Error("options is invalid");var r=void 0!==t.tolerance?t.tolerance:1,n=t.highQuality||!1,i=t.mutate||!1;if(!e)throw new Error("geojson is required");if(r&&r<0)throw new Error("invalid tolerance");return!0!==i&&(e=xt(e)),F(e,function(e){!function(e,t,r){var n=e.type;if("Point"===n||"MultiPoint"===n)return e;zt(e,!0);var i=e.coordinates;switch(n){case"LineString":e.coordinates=Qt(i,t,r);break;case"MultiLineString":e.coordinates=i.map(function(e){return Qt(e,t,r)});break;case"Polygon":e.coordinates=$t(i,t,r);break;case"MultiPolygon":e.coordinates=i.map(function(e){return $t(e,t,r)})}}(e,r,n)}),e},t.square=or,t.squareGrid=Sy,t.standardDeviationalEllipse=function(e,t){if(!M(t=t||{}))throw new Error("options is invalid");var r=t.steps||64,n=t.weight,i=t.properties||{};if(!T(r))throw new Error("steps must be a number");if(!M(i))throw new Error("properties must be a number");var o=D(e).length,a=ls(e,{weight:n}),s=0,u=0,l=0;V(e,function(e){var t=e.properties[n]||1,r=cs($(e),$(a));s+=Math.pow(r.x,2)*t,u+=Math.pow(r.y,2)*t,l+=r.x*r.y*t});var c=s-u,f=Math.sqrt(Math.pow(c,2)+4*Math.pow(l,2)),h=2*l,p=Math.atan((c+f)/h),y=180*p/Math.PI,g=0,v=0,m=0;V(e,function(e){var t=e.properties[n]||1,r=cs($(e),$(a));g+=Math.pow(r.x*Math.cos(p)-r.y*Math.sin(p),2)*t,v+=Math.pow(r.x*Math.sin(p)+r.y*Math.cos(p),2)*t,m+=t});var _=Math.sqrt(2*g/m),b=Math.sqrt(2*v/m),S=ss(a,_,b,{units:"degrees",angle:y,steps:r,properties:i}),x=gt(e,d([S])),w={meanCenterCoordinates:$(a),semiMajorAxis:_,semiMinorAxis:b,numberOfFeatures:o,angle:y,percentageWithinEllipse:100*D(x).length/o};return S.properties.standardDeviationalEllipse=w,S},t.tag=function(e,t,r,n){return e=xt(e),t=xt(t),V(e,function(e){e.properties||(e.properties={}),V(t,function(t){void 0===e.properties[n]&&dt(e,t)&&(e.properties[n]=t.properties[r])})}),e},t.tesselate=function(e){if(!e.geometry||"Polygon"!==e.geometry.type&&"MultiPolygon"!==e.geometry.type)throw new Error("input must be a Polygon or MultiPolygon");var t={type:"FeatureCollection",features:[]};return"Polygon"===e.geometry.type?t.features=Vr(e.geometry.coordinates):e.geometry.coordinates.forEach(function(e){t.features=t.features.concat(Vr(e))}),t},t.tin=mt,t.toMercator=gs,t.toWgs84=vs,t.transformRotate=Lo,t.transformScale=Co,t.transformTranslate=function(e,t,r,n){if(!M(n=n||{}))throw new Error("options is invalid");var i=n.units,o=n.zTranslation,a=n.mutate;if(!e)throw new Error("geojson is required");if(null==t||isNaN(t))throw new Error("distance is required");if(o&&"number"!=typeof o&&isNaN(o))throw new Error("zTranslation is not a number");if(o=void 0!==o?o:0,0===t&&0===o)return e;if(null==r||isNaN(r))throw new Error("direction is required");return t<0&&(t=-t,r+=180),!1!==a&&void 0!==a||(e=xt(e)),N(e,function(e){var n=$(Si(e,t,r,{units:i}));e[0]=n[0],e[1]=n[1],o&&3===e.length&&(e[2]+=o)}),e},t.triangleGrid=xy,t.truncate=jn,t.union=function(e,t,r){void 0===r&&(r={});var n=ie(e),i=ie(t),o=bu.union(n.coordinates,i.coordinates);return 0===o.length?null:1===o.length?c(o[0],r.properties):v(o,r.properties)},t.unitsFactors=i,t.unkinkPolygon=function(e){var t=[];return q(e,function(e){"Polygon"===e.geometry.type&&V(An(e),function(r){t.push(c(r.geometry.coordinates,e.properties))})}),d(t)},t.validateBBox=I,t.validateId=L,t.voronoi=function(e,t){if(!M(t=t||{}))throw new Error("options is invalid");var r=t.bbox||[-180,-85,180,85];if(!e)throw new Error("points is required");if(!Array.isArray(r))throw new Error("bbox is invalid");return ne(e,"Point","points"),d(function(){var e=Ea,t=ka,r=null;function n(n){return new os(n.map(function(r,i){var o=[Math.round(e(r,i,n)/rs)*rs,Math.round(t(r,i,n)/rs)*rs];return o.index=i,o.data=r,o}),r)}return n.polygons=function(e){return n(e).polygons()},n.links=function(e){return n(e).links()},n.triangles=function(e){return n(e).triangles()},n.x=function(t){return arguments.length?(e="function"==typeof t?t:Pa(+t),n):e},n.y=function(e){return arguments.length?(t="function"==typeof e?e:Pa(+e),n):t},n.extent=function(e){return arguments.length?(r=null==e?null:[[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]],n):r&&[[r[0][0],r[0][1]],[r[1][0],r[1][1]]]},n.size=function(e){return arguments.length?(r=null==e?null:[[0,0],[+e[0],+e[1]]],n):r&&[r[1][0]-r[0][0],r[1][1]-r[0][1]]},n}().x(function(e){return e.geometry.coordinates[0]}).y(function(e){return e.geometry.coordinates[1]}).extent([[r[0],r[1]],[r[2],r[3]]]).polygons(e.features).map(as))},t.within=gt,Object.defineProperty(t,"__esModule",{value:!0})}(t)}).call(this,r(239))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=s(r(2)),o=r(0),a=s(r(118));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(t,r,n,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.red=(0,o.defaultValue)(t,0),this.green=(0,o.defaultValue)(r,0),this.blue=(0,o.defaultValue)(n,0),this.alpha=(0,o.defaultValue)(i,1)}return n(e,[{key:"toCesiumRGB",value:function(){return{red:this.red/255,green:this.green/255,blue:this.blue/255,alpha:this.alpha}}},{key:"toCssRGBAString",value:function(){return"rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")"}},{key:"toCssRGBString",value:function(){return"rgb("+this.red+","+this.green+","+this.blue+")"}},{key:"clone",value:function(){return new e(this.red,this.green,this.blue,this.alpha)}},{key:"toJSON",value:function(){return{red:this.red,green:this.green,blue:this.blue,alpha:this.alpha}}}]),e}();u.fromRGBString=function(e){if(u.isRGB(e))if(e.indexOf("rgba")>-1||e.indexOf("RGBA")>-1){var t=e.substring(5,e.length-1);if(4===(t=t.split(",")).length)return new u(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3]))}else if(e.indexOf("rgb")>-1||e.indexOf("RGB")>-1){var r=e.substring(4,e.length-1);if(3===(r=r.split(",")).length)return new u(Number(r[0]),Number(r[1]),Number(r[2]))}},u.fromHexString=function(e){if(u.isHex(e)){var t=u.hexToRgb(e);if(t.indexOf("rgba")>-1||t.indexOf("RGBA")>-1)return u.fromRGBString(t);if(t.indexOf("rgb")>-1||t.indexOf("RGB")>-1)return u.fromRGBString(t)}},u.fromJSON=function(e){e=(0,o.defaultValue)(e,{});var t=(0,o.defaultValue)(e.red,255),r=(0,o.defaultValue)(e.green,255),n=(0,o.defaultValue)(e.blue,255),i=(0,o.defaultValue)(e.alpha,1);return new u(t,r,n,i)},u.hexToRgb=function(e){if(/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(e)){var t=e.toLowerCase().replace(/\#/g,""),r=t.length;if(3===r||4===r){for(var n="",i=0;i<r;i++)n+=t.slice(i,i+1).concat(t.slice(i,i+1));r=(t=n).length}for(var o=[],a=0;a<r;a+=2){var s=t.slice(a,a+2);o.push(parseInt("0x"+s))}var u=void 0;if(6===r)u="rgb("+o.join(",")+")";else if(8===r){u="rgba(";for(var l=0;l<3;l++)u+=o[l]+",";u+=o[3]/255+")"}return u}},u.rgbToHex=function(e){if(/^(rgb|rgba|RGB|RGBA)/.test(e)){var t=void 0;t=e.indexOf("rgba")>-1||e.indexOf("RGBA")>-1?e.slice(5,e.length-1).split(","):e.slice(4,e.length-1).split(",");for(var r="#",n=0;n<3;n++)r+=i(t[n]);return 4===t.length&&(r+=i(255*Number(t[3]))),r}function i(e){var t=Number(e).toString(16);return"0"===t&&(t+="0"),1===t.length&&(t="0"+t),t}},u.fromCssString=function(e){if(!e||"string"!=typeof e)return u.fromHexString("#000000");var t=e.toLowerCase(),r=a.default[t];return r?u.fromHexString(r):u.fromHexString("#000000")},u.fromColor=function(e){return"string"==typeof e?u.isHex(e)?u.fromHexString(e):u.isRGB(e)?u.fromRGBString(e):u.fromCssString(e):e instanceof u?e:Array.isArray(e)?3===e.length?new u(e[0],e[1],e[2]):4===e.length?new u(e[0],e[1],e[2],e[3]):(o.Log.info("非法颜色值数组!"),new u):e instanceof Object?u.fromJSON(e):new u},u.isHex=function(e){return/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(e)},u.isRGB=function(e){return/^(rgb|rgba|RGB|RGBA)/.test(e)},i.default.Color=u,t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=l(r(2)),a=l(r(13)),s=r(3),u=l(r(33));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(e=(0,i.defaultValue)(e,{}),r.coordinates=(0,i.defaultValue)(e.coordinates,[]),r.type=s.GeometryType.point,!Array.isArray(r.coordinates))throw new Error("坐标必须为数组");if(r.coordinates.length<2||r.coordinates.length>3)throw new Error("坐标数组的长度必须在合理范围内(2或者3)");if(!(0,i.isNumber)(r.coordinates[0])||!(0,i.isNumber)(r.coordinates[1]))throw new Error("坐标数组成员必须为数字");return 3===r.coordinates.length?r.hasZ=!0:r.hasZ=!1,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),n(t,[{key:"copy",value:function(e){return t.fromJSON(e.toJSON()),this}},{key:"distance",value:function(e){if(!e)throw new Error("输入参数不合法.");var r=t.toCoordinates(e),n=Math.abs(this.coordinates[0]-r[0]),i=Math.abs(this.coordinates[1]-r[1]),o=0;return this.hasZ&&r.length>=3&&(o=Math.abs(this.coordinates[2]-e.coordinates[[2]])),Math.sqrt(Math.pow(n,2)+Math.pow(i,2)+Math.pow(o,2))}},{key:"equals",value:function(e){if(e instanceof t)return this.hasZ?!!Math.abs(this.coordinates[0]-e.coordinates[0])<=1e-7&&!!Math.abs(this.coordinates[1]-e.coordinates[1])<=1e-7&&!!Math.abs(this.coordinates[2]-e.coordinates[2])<=1e-7:!!Math.abs(this.coordinates[0]-e.coordinates[0])<=1e-7&&!!Math.abs(this.coordinates[1]-e.coordinates[1])<=1e-7;if(e instanceof Array){if(2===e.length)return!!Math.abs(this.coordinates[0]-e[0])<=1e-7&&!!Math.abs(this.coordinates[1]-e[1])<=1e-7;if(3===e.length)return!!Math.abs(this.coordinates[0]-e[0])<=1e-7&&!!Math.abs(this.coordinates[1]-e[1])<=1e-7&&!!Math.abs(this.coordinates[2]-e[2])<=1e-7;throw new Error("坐标数组的数量有误!")}throw new Error("必须为点对象或坐标数组才能比较是否相等!")}},{key:"normalize",value:function(){var e=void 0;e=this.hasZ?new t({coordinates:[0,0,0]}):new t({coordinates:[0,0]});var r=this.distance(e),n=this._cloneCoordinates();return n[0]/=r,n[1]/=r,this.hasZ&&(n[2]/=r),this.coordinates=n,this}},{key:"toString",value:function(){return this.hasZ?this.coordinates[0]+","+this.coordinates[1]+","+this.coordinates[2]:this.coordinates[0]+","+this.coordinates[1]}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.coordinates=JSON.parse(JSON.stringify(this.coordinates)),e.extent=(0,i.toJSON)(this.extent,u.default),e}},{key:"getIGSType",value:function(){return this.hasZ?s.IGSGeometryType.point3D:s.IGSGeometryType.point}},{key:"toOldIGSGeometry",value:function(){return{PntGeom:[{Dot:{x:this.coordinates[0],y:this.coordinates[1]}}],GID:parseInt(String(1e7*Math.random()))}}},{key:"_cloneCoordinates",value:function(){return JSON.parse(JSON.stringify(this.coordinates))}},{key:"_calcExtent",value:function(e,t){return t?new u.default({xmin:e[0],ymin:e[1],zmin:e[2],xmax:e[0],ymax:e[1],zmax:e[2],spatialReference:this.spatialReference}):new u.default({xmin:e[0],ymin:e[1],xmax:e[0],ymax:e[1],spatialReference:this.spatialReference})}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"toCoordinates",value:function(e){if(!e)throw new Error("输入参数不合法.");var r=JSON.parse(JSON.stringify(e));if(e instanceof t)r=e._cloneCoordinates();else{if(e instanceof Array)return r;e instanceof Object&&(r=t.fromJSON(e)._cloneCoordinates())}return r}},{key:"fromJSON",value:function(e){return new t(e=(0,i.defaultValue)(e,{}))}}]),t}();Object.defineProperties(c.prototype,{extent:{configurable:!1,get:function(){return this._calcExtent(this.coordinates,this.hasZ)}}}),o.default.Geometry.Point=c,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGeometryFilter=t.getFullBaseUrl=t.appendUrlParams=t.getGeometryTypeByFeatureSet=t.getZoomOffset=t.getTileResolution=t.initCorporationType=t.getEPSGCodeFromOGCSupportedCRSString=t.formatIGSRenderer=t.formatIGSSymbol=t.getLayerViewScaleVisible=t.showLayerByScale=t.isCustomSP=t.is4326=t.getUrlType=t.getEPSGFromTileMatrixSetId=void 0;var n=r(3),i=r(0),o=r(1),a=r(113);function s(e){switch((e=(0,i.defaultValue)(e,{})).type){case n.SymbolType.simpleMarker:case n.SymbolType.simpleFill:e.color&&(e.color=new o.Color(e.color[0],e.color[1],e.color[2],e.color[3]/255)),e.outline&&e.outline.color&&(e.outline.color=new o.Color(e.outline.color[0],e.outline.color[1],e.outline.color[2],e.outline.color[3]/255));break;case n.SymbolType.simpleLine:e.color&&(e.color=new o.Color(e.color[0],e.color[1],e.color[2],e.color[3]/255));break;case n.SymbolType.pictureMarker:e.color&&(e.color=new o.Color(e.color[0],e.color[1],e.color[2],e.color[3]/255)),e.url||(e.url=e.imageData);break;case n.SymbolType.pictureFill:e.outline&&e.outline.color&&(e.outline.color=new o.Color(e.outline.color[0],e.outline.color[1],e.outline.color[2],e.outline.color[3]/255)),e.url||(e.url=e.imageData);break;case n.SymbolType.text:e.color&&(e.color=new o.Color(e.color[0],e.color[1],e.color[2],e.color[3]/255)),e.backgroundColor&&(e.backgroundColor=new o.Color(e.backgroundColor[0],e.backgroundColor[1],e.backgroundColor[2],e.backgroundColor[3]/255)),e.borderLineColor&&(e.borderLineColor=new o.Color(e.borderLineColor[0],e.borderLineColor[1],e.borderLineColor[2],e.borderLineColor[3]/255)),e.haloColor&&(e.haloColor=new o.Color(e.haloColor[0],e.haloColor[1],e.haloColor[2],e.haloColor[3]/255))}return e}function u(e,t){t=(0,i.defaultValue)(t,{});var r="";return Object.keys(t).forEach(function(e){r+=e+"="+t[e]+"&"}),""===(r=r.substring(0,r.length-1))?e:e.indexOf("?")>-1?e.indexOf("&")>-1?e+"&"+r:""+e+r:e+"?"+r}t.getEPSGFromTileMatrixSetId=function(e){if(!e)return"EPSG:4326";var t=e;return e.indexOf("EPSG:4326")>-1?t="EPSG:4326":e.indexOf("EPSG:4490")>-1?t="EPSG:4490":e.indexOf("EPSG:4610")>-1?t="EPSG:4610":e.indexOf("EPSG:3857")>-1&&(t="EPSG:3857"),t},t.getUrlType=function(e){var t=void 0,r=new RegExp("^http://t[0-6].tianditu.gov.cn/[a-z]{3}_[w|c]{1}/wmts$"),i=new RegExp("^http://[0-9.a-zA-Z]+:[0-9]{1,5}/igs/rest/services/[一-龟\\w/:_]+/WMTSServer$"),o=new RegExp("^https://[0-9.a-zA-Z]+:[0-9]{1,5}/igs/rest/services/[一-龟\\w/:_]+/WMTSServer$"),a=new RegExp("^http://[0-9.a-zA-Z]+/igs/rest/services/[一-龟\\w/:_]+/WMTSServer$"),s=new RegExp("^https://[0-9.a-zA-Z]+/igs/rest/services/[一-龟\\w/:_]+/WMTSServer$"),u=new RegExp("^http://[0-9.a-zA-Z]+:[0-9]{1,5}/arcgis/rest/services/[一-龟\\w/:_]+/WMTSServer$"),l=new RegExp("^https://[0-9.a-zA-Z]+:[0-9]{1,5}/arcgis/rest/services/[一-龟\\w/:_]+/WMTSServer$"),c=new RegExp("^http://[0-9.a-zA-Z]+/arcgis/rest/services/[一-龟\\w/:_]+/WMTSServer$"),f=new RegExp("^https://[0-9.a-zA-Z]+/arcgis/rest/services/[一-龟\\w/:_]+/WMTSServer$");return r.test(e)?t=n.UrlServerType.tdt:i.test(e)||o.test(e)||a.test(e)||s.test(e)?t=n.UrlServerType.igs_2:(u.test(e)||l.test(e)||c.test(e)||f.test(e))&&(t=n.UrlServerType.igs_2),t},t.is4326=function(e){return"4326"===String(e.wkid)||"4214"===String(e.wkid)||"4490"===String(e.wkid)||"4610"===String(e.wkid)},t.isCustomSP=function(e){return"4326"!==String(e.wkid)&&"4214"!==String(e.wkid)&&"4490"!==String(e.wkid)&&"4610"!==String(e.wkid)&&"3857"!==String(e.wkid)&&"900913"!==String(e.wkid)},t.showLayerByScale=function(e,t){t.visible&&function(e,t){var r=new a.LayerViewUpdateContent({name:"visible",params:[void 0],dataChanged:!0,operationType:"property",extendOptions:{type:"scaleVisible",viewId:t._id}});e._fireUpdateEvent("最大最小比例尺引起图层显隐变化",[r])}(t,e)},t.getLayerViewScaleVisible=function(e){var t=void 0,r=e.view,n=e.layer,i=r.scale;if(!r.scale&&r.getScale&&(i=r.getScale()),!i)return!0;var o=n.minScale,a=n.maxScale;return"number"==typeof i&&i>0&&(t="number"==typeof o&&"number"==typeof a&&o>0&&a>0?i<=o&&i>=a:"number"==typeof o&&o>0&&("number"!=typeof a||a<=0)?i<=o:!("number"==typeof a&&a>0&&("number"!=typeof o||o<=0))||i>=a),t},t.formatIGSSymbol=s,t.formatIGSRenderer=function(e){switch((e=(0,i.defaultValue)(e,{})).type){case n.RendererType.simple:e.symbol=s(e.symbol);break;case n.RendererType.uniqueValue:e.defaultSymbol=s(e.defaultSymbol);for(var t=0;t<e.uniqueValueInfos.length;t++)e.uniqueValueInfos[t].symbol=s(e.uniqueValueInfos[t].symbol);break;case n.RendererType.classBreak:e.defaultSymbol=s(e.defaultSymbol);for(var r=0;r<e.classBreakInfos.length;r++)e.classBreakInfos[r].symbol=s(e.classBreakInfos[r].symbol);if(e.classBreakInfos.length>0){e.classBreakInfos[0].minValue=e.minValue,e.classBreakInfos[0].maxValue=e.classBreakInfos[0].classMaxValue;for(var o=1;o<e.classBreakInfos.length;o++)e.classBreakInfos[o].minValue=e.classBreakInfos[o-1].classMaxValue,e.classBreakInfos[o].maxValue=e.classBreakInfos[o].classMaxValue}}return e},t.getEPSGCodeFromOGCSupportedCRSString=function(e){var t=4326,r=-1;return(r=e.search("EPSG::"))>-1?t=parseInt(e.substring(r+"EPSG::".length)):(r=e.search("EPSG:"))>-1&&e.search("3857")>0?t=3857:((r=e.search("OGC:2:84"))<0&&(r=e.search("OGC:1.3:CRS84")),r>-1&&(t=4326)),3867!==t&&900913!==t&&102100!==t||(t=3857),t},t.initCorporationType=function(e){return void 0===e?n.WMTSCorporation.none:e.search("arcgis/rest/services")>0?n.WMTSCorporation.corporationArcGIS:e.search("WMTSServer")>0||e.search("WMSServer")>0?n.WMTSCorporation.corporationZD:e.search("geoserver")>0?n.WMTSCorporation.corporationGeoServer:e.search("tianditu.com")>0||e.search("tianditu.gov.cn")>0?n.WMTSCorporation.corporationTianDiTu:n.WMTSCorporation.corporationOther},t.getTileResolution=function(e,t,r,i){var o="",a=-1,s=0,u=0,l=0,c=25.4/96,f=1e3;return t===n.WMTSCorporation.corporationZD?(a=e.lastIndexOf("_GB"))>0?((a=(o=e.slice(0,e.length-3)).lastIndexOf("_"))>0&&(o=o.slice(a+1)),"028mm"===o?s=0:"arcgis"===o?s=1:"dpi96"===o?s=2:"GoogleMapsCompatible"===o&&(s=3),i.isGeographic?0===s?(f=111319490.79327358,c=.28):1===s?(c=.28,f=111194872.221777):2===s&&(f=111319490.79327358,c=25.4/96):0===s?c=.28:1===s?c=.28:2===s?c=25.4/96:3===s&&(c=.28)):i.isGeographic?(f=111194872.221777,c=25.4/96):c=25.4/96:t===n.WMTSCorporation.corporationArcGIS?(u=e.includes("default")?0:e.includes("native")?1:e.includes("GoogleMapsCompatible")?2:3,i.isGeographic?0===u?(r=.28*r*96/25.4,f=111194872.221777,c=.2645838625):1===u&&(f=111194872.221777,c=.2645838625):0===u?(r=.28*r*96/25.4,c=.2645838625):1===u?c=.2645838625:2===u&&(c=.28)):t===n.WMTSCorporation.corporationGeoServer?i.isGeographic?(f=111319490.79327358,c=.28):c=.28:t===n.WMTSCorporation.corporationTianDiTu?i.isGeographic?(f=111319490.79327358,c=25.4/96):c=25.4/96:(e.includes("028")&&(l=1),"".includes("GoogleMapsCompatible")&&(l=1),"".includes("GoogleCRS84Quad")&&(l=1),i.isGeographic?1===l?(r=.28*r*96/25.4,f=111194872.221777,c=.2645838625):(f=111319490.79327358,c=25.4/96):1===l?(r=.28*r*96/25.4,c=.2645838625):c=25.4/96),r*c/f},t.getZoomOffset=function(e,t,r){r=(0,i.defaultValue)(r,.01);for(var n=0;n<e.length;n++)if(Math.abs(e[n].resolution-t.resolution)/t.resolution<r)return e[0].level-n+t.level;return 0},t.getGeometryTypeByFeatureSet=function(e){var t=n.GeometryType.geometry;return e&&e.features&&Array.isArray(e.features)&&e.features.length>0&&(t=e.features[0].geometry.type),t},t.appendUrlParams=u,t.getFullBaseUrl=function(e){var t={};return e.tokenKey&&e.tokenValue&&(t[e.tokenKey]=e.tokenValue),u(e.url,t)},t.getGeometryFilter=function(e,t){var r={geometryType:void 0,geometry:"",spatialRel:t=(0,i.defaultValue)(t,o.SpatialRelation.Intersects)};function a(e){for(var t="",r=0;r<e.length;r++){for(var n=0;n<e[r].length;n++)t+=e[r][n][0]+","+e[r][n][1]+",";t=t.substring(0,t.length-1),t+="|"}return t=t.substring(0,t.length-1)}switch(e.type){case n.GeometryType.extent:return r.geometryType="rect",r.geometry=e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,r;case n.GeometryType.polygon:return r.geometryType="polygon",r.geometry=a(e.coordinates),r;case n.GeometryType.multiPolygon:r.geometryType="polygon";for(var s=0;s<e.coordinates.length;s++)r.geometry+=a(e.coordinates[s]),r.geometry+=";";return r.geometry=r.geometry.substring(0,r.geometry.length-1),r;default:return}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(4),a=l(r(23)),s=l(r(17)),u=r(0);function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r._initEvent(),r.type="sketchPointDrawTool",r._drawTools=[r],r._otherDrawTools=[],r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),n(t,[{key:"_initEvent",value:function(){this._processEvent=this._processEvent.bind(this),this.on("pan",this._processEvent)}},{key:"getPanEvent",value:function(e,t,r){return{event:e,target:t,type:r}}},{key:"drawFeature",value:function(){var e=this;this._editMode=i.SketchEditMode.DRAWING,this.view._mapActionControl("video-map-active",!0),this.cursorStyle=this.view.cursor,(0,u.isNull)(this.cursorStyle)&&(this.view.cursor="crosshair"),this._setInitSnap(),this._fireStartDrawEvent();var t=function(t){if(t&&t.x&&t.y){e.view.off(i.ViewEventType.pointerMove,e._handlerInitMouseMove),e.sketchStage.snapGraphics.length>0&&(e.sketchStage.snapGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.snapGraphics=[]);var r={x:t.x,y:t.y},n=null;n=e._snapPoint?e._snapPoint:e.view.toMap({x:r.x,y:r.y});var o=e._getFeature(n);e.sketchStage.entityGraphic=o,e._addFeatureToLayer(o,e.layer),e.stop(),e._editMode=i.SketchEditMode.NONE,e.view.cursor=e.cursorStyle,e.fire("drawn",{geometry:o.geometry,feature:o},self),e._fireStopDrawEvent(o),e.view._mapActionControl("video-map-active",!1)}};this._drawEventHandlers.push(t),this.view.on(i.ViewEventType.pointerDown,t)}},{key:"addFeature",value:function(e,t,r,n){var i=null;i=t&&t.vertexStyle?t.vertexStyle:this.sketchStyle._vertexStyle;var o=this._getFeature(e,i);r&&(o.attributes=r),this.sketchStage.entityGraphic=o,this._addFeatureToLayer(o,n)}},{key:"addFeatureByGeometry",value:function(e,t,r,n){var o=null;o=t&&t.vertexStyle?t.vertexStyle:this.sketchStyle._vertexStyle;var a=new i.Feature({geometry:e,symbol:o,elevationInfo:this.elevationInfo});r&&(a.attributes=r),this.sketchStage.entityGraphic=a,this._addFeatureToLayer(a,n)}},{key:"_getFeature",value:function(e,t){return e||(e=i.Projection.project(new o.Point({coordinates:[0,0,0]}),this._spatialReference)),t||(t=this._sketchDataType===i.SketchDataType.TEXT?this.sketchStyle.textStyle:this.sketchStyle.vertexStyle),new i.Feature({geometry:e,symbol:t,elevationInfo:this.elevationInfo})}},{key:"hitTestFeature",value:function(e,t){this.view._mapActionControl("video-map-active",!0),this.editOption.showSelectBox?(this._editMode=i.SketchEditMode.EDITGRAGIC,this.selectFeature(e)):this._parent._sketchDataType===i.SketchDataType.POINT||this._parent._sketchDataType===i.SketchDataType.TEXT?this.startPanGraphics(e,t):this._parent&&this._parent._editMode===i.SketchEditMode.EDITGRAGIC?"circleVertex"===e.attributes.type?this.startCircleVertexScaleGraphics(e,t):"midVertex"===e.attributes.type?this.startMidVertexScaleGraphics(e,t):this.startVertexScaleGraphics(e,t):this._parent&&this._parent._editMode===i.SketchEditMode.EDITVERTEX&&this.startVertexMoveGraphics(e,t)}},{key:"selectFeature",value:function(e){var r=this;if(this.editOption.showSelectBox){var n=new t({view:this.view,layer:this._sketchInnerLayer,sketchInnerLayer:this._sketchInnerLayer,sketchStyle:new s.default({vertexStyle:this._sketchDataType===i.SketchDataType.TEXT?this.sketchStyle._selectTextStyle:this.sketchStyle._selectVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this}),o=e.geometry;if(this._drawTools.push(n),n.addFeatureByGeometry(o,null,null,this.sketchInnerLayer),this.sketchStage.selectBoxGraphics=[n.sketchStage.entityGraphic],this._otherDrawTools.push(n),this.undoRedoManager&&this.undoRedoManager.addProcess("add",this.sketchStage),!this._parent||this._parent&&!this._parent._mapClickEvent){var a=function(){r._preventFirstCall?r._preventFirstCall=void 0:(r.sketchStage.selectBoxGraphics.forEach(function(e){r._removeFeatureFromLayer(e,r.sketchInnerLayer)}),r.view.off(i.ViewEventType.immediateClick,r._mapClickEvent),r._mapClickEvent=void 0,r.fire("selected",{isSelected:!1},self),r.sketchStage.selectBoxGraphics=[],r.view._mapActionControl("video-map-active",!1))};this._hitTestEventHandlers.push(this._mapClickEvent),this._mapClickEvent||(this._mapClickEvent=a,this.view.on(i.ViewEventType.immediateClick,a)),"leaflet"===this.view.engineType&&this.sketchDataType===i.SketchDataType.TEXT?this._preventFirstCall=!1:this._preventFirstCall=!0}}}},{key:"startPanGraphics",value:function(e,t){var r=this;this.view._mapActionControl("drag-pan",!1);var n=!1;this._startPan=!0;var o=null;o=t.mapPoint,this._parent&&this._parent._mapClickEvent&&this.view.off(i.ViewEventType.immediateClick,this._parent._mapClickEvent),this._parent&&this._fireStartPanEvent(this._parent.sketchStage.entityGraphic,this._parent);var a=function(e){if(e&&e.x&&e.y&&!n&&r._startPan){clearTimeout(null),n=!0;var t={x:e.x,y:e.y},i=r.view.toMap({x:t.x,y:t.y}),a=i.coordinates[0]-o.coordinates[0],s=i.coordinates[1]-o.coordinates[1];if(0!==a||0!==s){var u=r.getPanCoordinates(r.sketchStage.entityGraphic.geometry.coordinates,a,s);o.coordinates=u,r.sketchStage.entityGraphic.geometry.coordinates=u,n=!1,r._parent&&(r._parent.sketchStage.entityGraphic.geometry.coordinates=u,r._firePanningEvent(r._parent.sketchStage.entityGraphic,r._parent))}else n=!1}},s=function e(){r._startPan&&(r._startPan=!1,r.view.off(i.ViewEventType.pointerUp,e),r.view.off(i.ViewEventType.pointerMove,a),r._parent&&r._parent.undoRedoManager&&r._parent.undoRedoManager.addProcess("update",r._parent.sketchStage),r._parent&&r._parent._mapClickEvent&&r.view.on(i.ViewEventType.immediateClick,r._parent._mapClickEvent),r._parent&&r._fireStopPanEvent(r._parent.sketchStage.entityGraphic,r._parent),setTimeout(function(){r.view._mapActionControl("drag-pan",!0)},0))};this._hitTestEventHandlers.push(a),this._hitTestEventHandlers.push(s),this.view.on(i.ViewEventType.pointerUp,s),this.view.on(i.ViewEventType.pointerMove,a)}},{key:"startVertexScaleGraphics",value:function(e,t){var r=this;this.view._mapActionControl("drag-pan",!1);var n=!1;this._startPan=!0;var a;a=t.mapPoint;var s=void 0;s=this._parent.sketchStage.entityGraphic.geometry instanceof o.Extent?this._parent.sketchStage.entityGraphic.geometry:this._parent.sketchStage.entityGraphic.geometry.extent,this._parent&&this._parent._mapClickEvent&&this.view.off(i.ViewEventType.immediateClick,this._mapClickEvent);var u=e.attributes.direction;this._parent&&this._fireStartScaleEvent(this._parent.sketchStage.entityGraphic,this._parent);var l=function(t){if(t&&t.x&&t.y&&!n&&r._startPan){clearTimeout(null),n=!0;var i={x:t.x,y:t.y},o=r.view.toMap({x:i.x,y:i.y}),l=o.coordinates[0]-a.coordinates[0],c=o.coordinates[1]-a.coordinates[1],f=o.coordinates[0]/a.coordinates[0],h=o.coordinates[1]/a.coordinates[1];0!==l||0!==c?(r._dispatchEvent("vertexScale",{startPoint:a,movePoint:o,deltaPosition:{x:l,y:c},scale:{x:f,y:h},direction:u,extent:s,feature:e,action:"scale"},r),n=!1,r._parent&&r._fireScalingEvent(r._parent.sketchStage.entityGraphic,r._parent)):n=!1}},c=function e(){r._startPan&&(r._dispatchEvent("vertexScale",{action:"stop"},r),r._startPan=!1,r.view.off(i.ViewEventType.pointerUp,e),r.view.off(i.ViewEventType.pointerMove,l),r._parent&&r._parent.undoRedoManager&&r._parent.undoRedoManager.addProcess("update",r._parent.sketchStage),r._parent&&r._parent._mapClickEvent&&setTimeout(function(){r.view.on(i.ViewEventType.immediateClick,r._parent._mapClickEvent)},0),r.view._mapActionControl("drag-pan",!0),r._parent&&r._fireStopScaleEvent(r._parent.sketchStage.entityGraphic,r._parent))};this._hitTestEventHandlers.push(l),this._hitTestEventHandlers.push(c),this.view.on(i.ViewEventType.pointerUp,c),this.view.on(i.ViewEventType.pointerMove,l)}},{key:"startMidVertexScaleGraphics",value:function(e,t){var r=this;this.view._mapActionControl("drag-pan",!1);var n=!1;this._startPan=!0;var a;a=t.mapPoint;var s=void 0;s=this._parent.sketchStage.entityGraphic.geometry instanceof o.Extent?this._parent.sketchStage.entityGraphic.geometry:this._parent.sketchStage.entityGraphic.geometry.extent,this._parent&&this._parent._mapClickEvent&&this.view.off(i.ViewEventType.immediateClick,this._parent._mapClickEvent);var u=e.attributes.direction;this._parent&&this._fireStartScaleEvent(this._parent.sketchStage.entityGraphic,this._parent);var l=function(e){if(e&&e.x&&e.y&&!n&&r._startPan){clearTimeout(null),n=!0;var t={x:e.x,y:e.y},i=r.view.toMap({x:t.x,y:t.y}),o=i.coordinates[0]-a.coordinates[0],l=i.coordinates[1]-a.coordinates[1],c=i.coordinates[0]/a.coordinates[0],f=i.coordinates[1]/a.coordinates[1];0!==o||0!==l?(r._dispatchEvent("midVertexScale",{startPoint:a,movePoint:i,deltaPosition:{x:o,y:l},scale:{x:c,y:f},direction:u,extent:s,action:"scale"},r),n=!1,r._parent&&r._fireScalingEvent(r._parent.sketchStage.entityGraphic,r._parent)):n=!1}},c=function e(){r._startPan&&(r._dispatchEvent("vertexScale",{action:"stop"},r),r._startPan=!1,r.view.off(i.ViewEventType.pointerUp,e),r.view.off(i.ViewEventType.pointerMove,l),r.view._mapActionControl("drag-pan",!0),r._parent&&r._parent.undoRedoManager&&r._parent.undoRedoManager.addProcess("update",r._parent.sketchStage),r._parent&&r._parent._mapClickEvent&&setTimeout(function(){r.view.on(i.ViewEventType.immediateClick,r._parent._mapClickEvent)},0),r.view._mapActionControl("drag-pan",!0),r._parent&&r._fireStopScaleEvent(r._parent.sketchStage.entityGraphic,r._parent))};this._hitTestEventHandlers.push(l),this._hitTestEventHandlers.push(c),this.view.on(i.ViewEventType.pointerUp,c),this.view.on(i.ViewEventType.pointerMove,l)}},{key:"startCircleVertexScaleGraphics",value:function(e,t){var r=this;this.view._mapActionControl("drag-pan",!1);var n=!1;this._startPan=!0;var o;o=t.mapPoint;var a=this._parent.sketchStage.entityGraphic.geometry.extent;this._parent&&this._parent._mapClickEvent&&this.view.off(i.ViewEventType.immediateClick,this._mapClickEvent);var s=e.attributes.direction;this._parent&&this._fireStartScaleEvent(this._parent.sketchStage.entityGraphic,this._parent);var u=function(t){if(t&&t.x&&t.y&&!n&&r._startPan){clearTimeout(null),n=!0;var i={x:t.x,y:t.y},u=r.view.toMap({x:i.x,y:i.y}),l=u.coordinates[0]-o.coordinates[0],c=u.coordinates[1]-o.coordinates[1],f=u.coordinates[0]/o.coordinates[0],h=u.coordinates[1]/o.coordinates[1];0!==l||0!==c?(r._dispatchEvent("circleVertexScale",{startPoint:o,movePoint:u,deltaPosition:{x:l,y:c},scale:{x:f,y:h},direction:s,extent:a,feature:e,action:"scale"},r),n=!1,r._parent&&r._fireScalingEvent(r._parent.sketchStage.entityGraphic,r._parent)):n=!1}},l=function e(){r._startPan&&(r._dispatchEvent("circleVertexScale",{action:"stop"},r),r._startPan=!1,r.view.off(i.ViewEventType.pointerUp,e),r.view.off(i.ViewEventType.pointerMove,u),r._parent&&r._parent.undoRedoManager&&r._parent.undoRedoManager.addProcess("update",r._parent.sketchStage),r._parent&&r._parent._mapClickEvent&&setTimeout(function(){r.view.on(i.ViewEventType.immediateClick,r._parent._mapClickEvent)},0),r.view._mapActionControl("drag-pan",!0),r._parent&&r._fireStopScaleEvent(r._parent.sketchStage.entityGraphic,r._parent))};this._hitTestEventHandlers.push(u),this._hitTestEventHandlers.push(l),this.view.on(i.ViewEventType.pointerUp,l),this.view.on(i.ViewEventType.pointerMove,u)}},{key:"startVertexMoveGraphics",value:function(e,t){var r=this;this.view._mapActionControl("drag-pan",!1);var n=!1;this._startPan=!0;var o=null;o=t.mapPoint;var a=e.attributes?e.attributes.vertexIndex:-2;"midVertex"===e.attributes.type?(this._fireAddVertexEvent(this._parent.sketchStage.entityGraphic,this._parent),this._dispatchEvent("midVertexAdd",{point:o,vertexIndex:e.attributes?a:void 0,action:"changeFeature"},this),this._startPan=!0):this._startPan=!0,this._parent&&this._parent._mapClickEvent&&this.view.off(i.ViewEventType.immediateClick,this._parent._mapClickEvent),this._parent&&this._fireStartVertexMoveEvent(this._parent.sketchStage.entityGraphic,this._parent);var s=function(t){if(t&&t.x&&t.y&&!n&&r._startPan){clearTimeout(null),n=!0;var i={x:t.x,y:t.y},s=r.view.toMap({x:i.x,y:i.y}),u=s.coordinates[0]-o.coordinates[0],l=s.coordinates[1]-o.coordinates[1];0!==u||0!==l?("midVertex"===e.attributes.type?r._dispatchEvent("midVertexAdd",{startPoint:o,movePoint:s,vertexIndex:a,vertexType:e.attributes?e.attributes.type:void 0,action:"moveMidVertex"},r):r._dispatchEvent("vertexMove",{startPoint:o,movePoint:s,vertexIndex:a,vertexType:e.attributes?e.attributes.type:void 0},r),o=s,n=!1,r._parent&&r._fireUpdateVertex(r._parent.sketchStage.entityGraphic,r._parent)):n=!1}},u=function t(a){if(a&&a.x&&a.y&&r._startPan){if(r.view._mapActionControl("drag-pan",!1),r._startPan=!1,r.view.off(i.ViewEventType.pointerUp,t),r.view.off(i.ViewEventType.pointerMove,s),r.view._mapActionControl("drag-pan",!0),"midVertex"===e.attributes.type){var u=e.attributes.vertexIndex;r._dispatchEvent("midVertexAdd",{point:o,vertexIndex:e.attributes?u:void 0,action:"addVertex"},r)}n=!1,r._parent&&r._parent.undoRedoManager&&r._parent.undoRedoManager.addProcess("update",r._parent.sketchStage),r._parent&&r._parent._mapClickEvent&&setTimeout(function(){r.view.on(i.ViewEventType.immediateClick,r._parent._mapClickEvent)},0),r.view._mapActionControl("drag-pan",!0),r._parent&&r._fireStopVertexMoveEvent(r._parent.sketchStage.entityGraphic,r._parent)}};this._hitTestEventHandlers.push(s),this._hitTestEventHandlers.push(u),this.view.on(i.ViewEventType.pointerUp,u),this.view.on(i.ViewEventType.pointerMove,s)}},{key:"_processEvent",value:function(e){"pan"===e.type?this._handlerPanEvent(e):"vertexScale"===e.type?this._handlerVertexScaleEvent(e):"midVertexScale"===e.type?this._handlerMidVertexScaleEvent(e):"circleVertexScale"===e.type&&this._handlerCircleVertexScaleEvent(e)}},{key:"_handlerPanEvent",value:function(e){var t=this.getPanCoordinates(this.sketchStage.entityGraphic.geometry.coordinates,e.deltaPosition.x,e.deltaPosition.y),r=new o.Point({coordinates:t,spatialReference:this._spatialReference});this.sketchStage.entityGraphic.geometry=r}},{key:"_handlerVertexScaleEvent",value:function(e){if("scale"===e.action){if(!this.sketchStage.entityGraphic.attributes.lastCoordinates){var t=JSON.parse(JSON.stringify([this.sketchStage.entityGraphic.geometry.coordinates]));this.sketchStage.entityGraphic.attributes.lastCoordinates=t}this.sketchStage.entityGraphic.attributes=this.sketchStage.entityGraphic.attributes?this.sketchStage.entityGraphic.attributes:{};var r=this.getScaleCoordinates([this.sketchStage.entityGraphic.geometry.coordinates],e.direction,e.extent,e.startPoint,e.movePoint,this.sketchStage.entityGraphic.attributes.lastCoordinates),n=new o.Point({coordinates:r[0],spatialReference:this._spatialReference});this.sketchStage.entityGraphic.geometry=n}"stop"===e.action&&this.sketchStage.entityGraphic.attributes.lastCoordinates&&(this.sketchStage.entityGraphic.attributes.lastCoordinates=void 0)}},{key:"_handlerMidVertexScaleEvent",value:function(e){if("scale"===e.action){var t;if(!this.sketchStage.entityGraphic.attributes.lastCoordinates){var r=JSON.parse(JSON.stringify([this.sketchStage.entityGraphic.geometry.coordinates]));this.sketchStage.entityGraphic.attributes.lastCoordinates=r}var n=this.getMidScaleCoordinates([this.sketchStage.entityGraphic.geometry.coordinates],e.direction,e.extent,e.startPoint,e.movePoint,this.sketchStage.entityGraphic.attributes.lastCoordinates);t=new o.Point({coordinates:n[0],spatialReference:this._spatialReference}),this.sketchStage.entityGraphic.geometry=t,this._parent&&this._parent.sketchStage.updateGraphic(this.sketchStage.entityGraphic)}else"stop"===e.action&&this.sketchStage.entityGraphic.attributes.lastCoordinates&&(this.sketchStage.entityGraphic.attributes.lastCoordinates=void 0)}},{key:"_handlerCircleVertexScaleEvent",value:function(e){this._handlerMidVertexScaleEvent(e)}}]),t}();t.default=c,i.Zondy.SketchPointDrawTool=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(0),a=r(4),s=function(e){return e&&e.__esModule?e:{default:e}}(r(458)),u=r(97);var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));r._id=(0,o.defaultValue)(e.id,(0,o.getGUID)()),r.view=(0,o.defaultValue)(e.view,null),r.layer=(0,o.defaultValue)(e.layer,void 0),r.sketchInnerLayer=(0,o.defaultValue)(e.sketchInnerLayer,void 0),r.sketchStage=new s.default,void 0!==e.sketchStyle&&(r.sketchStyle=e.sketchStyle.clone()),r.elevationInfo=(0,o.defaultValue)(e.elevationInfo,void 0),r.type="sketchBaseDrawTool",r.extendOptions=(0,o.defaultValue)(e.extendOptions,void 0),r._editMode=i.SketchEditMode.NONE,r._spatialReference=e.view._spatialReference?e.view._spatialReference:new a.SpatialReference("EPSG:4326"),r._drawEventHandlers=[],r._hitTestEventHandlers=[],r._sketchDataType=null,r._parent=(0,o.defaultValue)(e._parent,void 0),r.undoRedoManager=(0,o.defaultValue)(e.undoRedoManager,void 0);return r.editOption=(0,o.defaultValue)(e.editOption,{showSelectBox:!0,showSelectVertex:!1,canEditFeature:!0,canEditVertex:!0,_hitTestMode:0}),r._drawTools=[],r._hitTestDrawToolStack=[],r._clampToGround=!0,r.snapAndReferGeometries=[],r._sketchEditor=(0,o.defaultValue)(e._sketchEditor,void 0),r._sketchEditor&&(r.sketchSnappingTool=r._sketchEditor._sketchSnappingTool,r.snapAndReferGeometries=r._sketchEditor.snapAndReferGeometries),r.cursorStyle=null,r._snapPoint=null,r._sketchDataType=e.sketchDataType,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Evented),n(t,[{key:"start",value:function(){this.stop(),this.drawFeature()}},{key:"stop",value:function(){this._editMode===i.SketchEditMode.DRAWING||this._editMode===i.SketchEditMode.NONE?this._stopDraw():this._editMode===i.SketchEditMode.EDITGRAGIC||this._editMode===i.SketchEditMode.EDITVERTEX?this._stopHitTest():(this._stopDraw(),this._stopHitTest())}},{key:"_stopAll",value:function(){this._stopDraw(),this._stopHitTest()}},{key:"_stopDraw",value:function(){var e=this;this._drawEventHandlers&&(this._drawEventHandlers.forEach(function(t){e.view.off(i.ViewEventType.immediateClick,t),e.view.off(i.ViewEventType.pointerUp,t),e.view.off(i.ViewEventType.pointerMove,t),e.view.off(i.ViewEventType.pointerDown,t),e.view.off(i.ViewEventType.doubleClick,t),e.view.off(i.ViewEventType.drag,t)}),this._drawEventHandlers=[]),this._stopInitSnap()}},{key:"_stopHitTest",value:function(){var e=this;this._hitTestEventHandlers&&(this._hitTestEventHandlers.forEach(function(t){e.view.off(i.ViewEventType.pointerUp,t),e.view.off(i.ViewEventType.pointerMove,t),e.view.off(i.ViewEventType.pointerDown,t),e.view.off(i.ViewEventType.click,t),e.view.off(i.ViewEventType.immediateClick,e._mapClickEvent)}),this._mapClickEvent=null,this._hitTestEventHandlers=[])}},{key:"setSketchStyle",value:function(e){this.sketchStyle=e}},{key:"_clearEditGraphics",value:function(e){var t=this,r=function(){t.sketchStage.selectBoxGraphics.concat(t.sketchStage.selectBoxVertexGraphics).forEach(function(e){t._removeFeatureFromLayer(e,t.sketchInnerLayer)}),t._otherDrawTools=[],t.sketchStage.selectBoxGraphics=[],t.sketchStage.selectBoxVertexGraphics=[]},n=function(){var e=null;(e=t._parent?t._parent:t).sketchStage.vertexGraphics.concat(e.sketchStage.midVertexGraphics).forEach(function(e){t._removeFeatureFromLayer(e,t.sketchInnerLayer)}),e._otherDrawTools=[],e.sketchStage.vertexGraphics=[],e.sketchStage.midVertexGraphics=[]};e===i.SketchEditMode.EDITGRAGIC?r():e===i.SketchEditMode.EDITVERTEX?n():(r(),n())}},{key:"_isDrawToolFeature",value:function(e){var t=this,r=e.id,n=!1;return this.sketchStage.entityGraphic.id===r&&(n=!0,this._editMode=i.SketchEditMode.EDITGRAGIC),this.sketchStage.vertexGraphics.forEach(function(e){e.id===r&&(n=!0,t._editMode=i.SketchEditMode.EDITVERTEX)}),this.sketchStage.midVertexGraphics.forEach(function(e){e.id===r&&(n=!0,t._editMode=i.SketchEditMode.EDITVERTEX)}),n||(this._editMode=i.SketchEditMode.NONE),n}},{key:"_getDrawToolByFeature",value:function(e){var t=e.id,r=null;return this.sketchStage.entityGraphic.id===t&&(r=this.sketchStage.entityGraphic),r.length>0?r[0]:null}},{key:"_addFeaturesToMap",value:function(e){this.layer&&this.layer.add(e)}},{key:"_addFeatureToLayer",value:function(e,t){t&&t.add(e)}},{key:"_removeFeatureFromMap",value:function(e){this.layer&&this.layer.remove(e)}},{key:"_removeFeatureFromLayer",value:function(e,t){t&&t.remove(e)}},{key:"_dispatchEvent",value:function(e,t,r){return this._parent&&this._parent.fire(e,t,r),this}},{key:"updateFeature",value:function(e,t){var r=t.id;this.sketchStage.entityGraphic.id===r&&(this.sketchStage.entityGraphic.coordinates=e.coordinates,this.sketchStage.entityGraphic.geometry=e,t=this.sketchStage.entityGraphic)}},{key:"removeDrawTool",value:function(){var e=this;this._removeFeatureFromLayer(this.sketchStage.entityGraphic,this.layer),this.sketchStage.getAllFeatures().forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),this._stopAll()}},{key:"removeEntityGraphic",value:function(){this._removeFeatureFromLayer(this.sketchStage.entityGraphic,this._layer),this.sketchStage.entityGraphic=null}},{key:"removeVertexGraphics",value:function(){var e=this;this.sketchStage.vertexGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e._sketchInnerLayer)}),this.sketchStage.vertexGraphics=[]}},{key:"addVertex",value:function(e,t){}},{key:"updateVertex",value:function(e,t){}},{key:"removeVertex",value:function(e,t){}},{key:"getDistanceByPixel",value:function(e){return this.view.getResolution?this.view.getResolution()*e:1e3}},{key:"getPanCoordinates",value:function(e,t,r){return e.length>2?[e[0]+t,e[1]+r,e[2]]:[e[0]+t,e[1]+r]}},{key:"getScaleCoordinates",value:function(e,t,r,n,i,o){var a=[];return o=o||[],e.forEach(function(e,s){var u=function(e,t,r,o){var a=1,s=1,u=Number(e[0].toString()),l=Number(e[1].toString()),c=n.coordinates,f=i.coordinates;return o=o||[],"ne"===r&&(a=(f[0]-t.xmin)/(c[0]-t.xmin),u=([o[0]]-t.xmin)*a+t.xmin,s=(f[1]-t.ymin)/(c[1]-t.ymin),l=(o[1]-t.ymin)*s+t.ymin),"se"===r&&(a=(f[0]-t.xmin)/(c[0]-t.xmin),u=([o[0]]-t.xmin)*a+t.xmin,s=(f[1]-t.ymax)/(c[1]-t.ymax),l=(o[1]-t.ymax)*s+t.ymax),"sw"===r&&(a=(f[0]-t.xmax)/(c[0]-t.xmax),u=([o[0]]-t.xmax)*a+t.xmax,s=(f[1]-t.ymax)/(c[1]-t.ymax),l=(o[1]-t.ymax)*s+t.ymax),"nw"===r&&(a=(f[0]-t.xmax)/(c[0]-t.xmax),u=([o[0]]-t.xmax)*a+t.xmax,s=(f[1]-t.ymin)/(c[1]-t.ymin),l=(o[1]-t.ymin)*s+t.ymin),[u,l]}(e,r,t,o[s]);void 0!==e[2]&&(u[2]=e[2]),a.push(u)}),a}},{key:"getMidScaleCoordinates",value:function(e,t,r,n,i,o){var a=[];return o=o||[],e.forEach(function(e,s){var u=function(e,t,r,o){var a=1,s=1,u=e[0],l=e[1],c=n.coordinates,f=i.coordinates;return o=o||[],"e"===r&&(a=(f[0]-t.xmin)/(c[0]-t.xmin),u=([o[0]]-t.xmin)*a+t.xmin),"s"===r&&(s=(f[1]-t.ymax)/(c[1]-t.ymax),l=(o[1]-t.ymax)*s+t.ymax),"w"===r&&(a=(f[0]-t.xmax)/(c[0]-t.xmax),u=([o[0]]-t.xmax)*a+t.xmax),"n"===r&&(s=(f[1]-t.ymin)/(c[1]-t.ymin),l=(o[1]-t.ymin)*s+t.ymin),[u,l]}(e,r,t,o[s]);e[2]&&(u[2]=e[2]),a.push(u)}),a}},{key:"getCenterScaleCoordinates",value:function(e,t,r,n,i,o){var a=[];return o=o||[],e.forEach(function(e,s){var u=function(e,t,r,o){var a=1,s=1,u=e[0],l=e[1],c=n.coordinates,f=i.coordinates;return o=o||[],"e"===r&&(a=(f[0]-t.xmin)/(c[0]-t.xmin),u=([o[0]]-t.xmin)*a+t.xmin),"s"===r&&(s=(f[1]-t.ymax)/(c[1]-t.ymax),l=(o[1]-t.ymax)*s+t.ymax),"w"===r&&(a=(f[0]-t.xmax)/(c[0]-t.xmax),u=([o[0]]-t.xmax)*a+t.xmax),"n"===r&&(s=(f[1]-t.ymin)/(c[1]-t.ymin),l=(o[1]-t.ymin)*s+t.ymin),[u,l]}(e,r,t,o[s]);e[2]&&(u[2]=e[2]),a.push(u)}),a}},{key:"_setSketchStage",value:function(e){this.sketchStage=e}},{key:"_getDrawToolByFeatureId",value:function(e){return this._drawTools.find(function(t){return t.sketchStage.entityGraphic&&t.sketchStage.entityGraphic.id===e})}},{key:"_removeEditGraphics",value:function(){var e=this;this.sketchStage.selectBoxGraphics.concat(this.sketchStage.selectBoxVertexGraphics).concat(this.sketchStage.vertexGraphics).concat(this.sketchStage.midVertexGraphics).forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),this.sketchStage.selectBoxGraphics=[],this.sketchStage.selectBoxVertexGraphics=[],this.sketchStage.vertexGraphics=[],this.sketchStage.midVertexGraphics=[]}},{key:"_getInteractiveDom",value:function(){for(var e=[],t=document.getElementsByClassName("leaflet-interactive"),r=0;r<t.length;r++)e.push(t[r]);return e}},{key:"_removeInteractiveStyle",value:function(e){for(var t=0;t<e.length;t++)e[t].classList.remove("leaflet-interactive")}},{key:"_addInteractiveStyle",value:function(e){for(var t=0;t<e.length;t++)e[t].classList.add("leaflet-interactive")}},{key:"_setInitSnap",value:function(){var e=this;this._snapPoint=null,this._handlerInitMouseMove=function(t){if(t&&t.x&&t.y){var r={x:t.x,y:t.y},n=e.view.toMap({x:r.x,y:r.y});e.sketchStage.snapGraphics.length>0&&(e.sketchStage.snapGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.snapGraphics=[]),e._snapPoint=e.getSnapGraphics(n)}},this._drawEventHandlers.push(this._handlerInitMouseMove),this.view.on(i.ViewEventType.pointerMove,this._handlerInitMouseMove)}},{key:"_stopInitSnap",value:function(){this._handlerInitMouseMove&&(this.view.off(i.ViewEventType.pointerMove,this._handlerInitMouseMove),this._handlerInitMouseMove=void 0)}},{key:"_fireStartDrawEvent",value:function(e){e=e||this;var t=new u.SketchEditorEvent({type:i.SketchEditorEventType.create,toolEventInfo:{},state:i.SketchEditorState.start});e.fire(i.SketchEditorEventType.create,t,self)}},{key:"_fireDrawVertexEvent",value:function(e,t){t=t||this;var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.create,toolEventInfo:{type:i.SketchEditorToolEventType.vertexAdd},state:i.SketchEditorState.active,feature:e,geometry:e?e.geometry:void 0});t.fire(i.SketchEditorEventType.create,r,self)}},{key:"_fireChangeCursorEvent",value:function(e,t){t=t||this;var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.create,toolEventInfo:{type:i.SketchEditorToolEventType.cursorChange},state:i.SketchEditorState.active,feature:e,geometry:e.geometry});t.fire(i.SketchEditorEventType.create,r,self)}},{key:"_fireStopDrawEvent",value:function(e,t){t=t||this;var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.create,toolEventInfo:null,state:i.SketchEditorState.complete,feature:e,geometry:e.geometry});t.fire(i.SketchEditorEventType.create,r,self)}},{key:"_fireStartPanEvent",value:function(e,t){t=t||this;var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.update,toolEventInfo:{type:i.SketchEditorToolEventType.moveStart},state:i.SketchEditorState.active,feature:e,geometry:e.geometry});t.fire(i.SketchEditorEventType.update,r,self)}},{key:"_firePanningEvent",value:function(e,t){t=t||this;var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.update,toolEventInfo:{type:i.SketchEditorToolEventType.move},state:i.SketchEditorState.active,feature:e,geometry:e.geometry});t.fire(i.SketchEditorEventType.update,r,self)}},{key:"_fireStopPanEvent",value:function(e,t){var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.update,toolEventInfo:{type:i.SketchEditorToolEventType.moveStop},state:i.SketchEditorState.active,feature:e,geometry:e.geometry});t.fire(i.SketchEditorEventType.update,r,self)}},{key:"_fireStartScaleEvent",value:function(e,t){t=t||this;var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.update,toolEventInfo:{type:i.SketchEditorToolEventType.scaleStart},state:i.SketchEditorState.active,feature:e,geometry:e.geometry});t.fire(i.SketchEditorEventType.update,r,self)}},{key:"_fireScalingEvent",value:function(e,t){t=t||this;var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.update,toolEventInfo:{type:i.SketchEditorToolEventType.scale},state:i.SketchEditorState.active,feature:e,geometry:e.geometry});t.fire(i.SketchEditorEventType.update,r,self)}},{key:"_fireStopScaleEvent",value:function(e,t){t=t||this;var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.update,toolEventInfo:{type:i.SketchEditorToolEventType.scaleStop},state:i.SketchEditorState.active,feature:e,geometry:e.geometry});t.fire(i.SketchEditorEventType.update,r,self)}},{key:"_fireStartVertexMoveEvent",value:function(e,t){t=t||this;var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.update,toolEventInfo:{type:i.SketchEditorToolEventType.vertexMoveStart},state:i.SketchEditorState.active,feature:e,geometry:e.geometry});t.fire(i.SketchEditorEventType.update,r,self)}},{key:"_fireUpdateVertex",value:function(e,t){t=t||this;var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.update,toolEventInfo:{type:i.SketchEditorToolEventType.vertexUpdate},state:i.SketchEditorState.active,feature:e,geometry:e.geometry});t.fire(i.SketchEditorEventType.update,r,self)}},{key:"_fireStopVertexMoveEvent",value:function(e,t){t=t||this;var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.update,toolEventInfo:{type:i.SketchEditorToolEventType.vertexMoveStop},state:i.SketchEditorState.active,feature:e,geometry:e.geometry});t.fire(i.SketchEditorEventType.update,r,self)}},{key:"_fireAddVertexEvent",value:function(e,t){t=t||this;var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.update,toolEventInfo:{type:i.SketchEditorToolEventType.vertexAdd},state:i.SketchEditorState.active,feature:e,geometry:e.geometry});t.fire(i.SketchEditorEventType.update,r,self)}},{key:"_fireAddVertexEventByFun",value:function(e,t){t=t||this;var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.update,toolEventInfo:{type:i.SketchEditorToolEventType.vertexAdd},state:i.SketchEditorState.complete,feature:e,geometry:e.geometry});t.fire(i.SketchEditorEventType.update,r,this)}},{key:"_fireUpdateVertexByFun",value:function(e,t){t=t||this;var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.update,toolEventInfo:{type:i.SketchEditorToolEventType.vertexUpdate},state:i.SketchEditorState.active,feature:e,geometry:e.geometry});t.fire(i.SketchEditorEventType.update,r,self)}},{key:"_fireRemoveVertexByFun",value:function(e,t){t=t||this;var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.update,toolEventInfo:{type:i.SketchEditorToolEventType.vertexRemove},state:i.SketchEditorState.complete,feature:e,geometry:e.geometry});t.fire(i.SketchEditorEventType.update,r,this)}},{key:"_fireRemoveSelectEvent",value:function(e,t){t=t||this;var r=new u.SketchEditorEvent({type:i.SketchEditorEventType.update,toolEventInfo:null,state:i.SketchEditorState.complete,feature:e,geometry:e.geometry});t.fire(i.SketchEditorEventType.update,r,self)}},{key:"_fireUnsimpleDraw",value:function(e){e=e||this;var t=new u.SketchEditorEvent({type:i.SketchEditorEventType.create,toolEventInfo:{type:i.SketchEditorToolEventType.geometryUnsimple},state:i.SketchEditorState.active});e.fire(i.SketchEditorEventType.create,t,self)}},{key:"_fireUnsimpleUpdate",value:function(e){e=e||this;var t=new u.SketchEditorEvent({type:i.SketchEditorEventType.update,toolEventInfo:{type:i.SketchEditorToolEventType.geometryUnsimple},state:i.SketchEditorState.active});e.fire(i.SketchEditorEventType.update,t,self)}},{key:"_fireUnsimpleUpdateByFun",value:function(e){e=e||this;var t=new u.SketchEditorEvent({type:i.SketchEditorEventType.update,toolEventInfo:{type:i.SketchEditorToolEventType.geometryUnsimple},state:i.SketchEditorState.complete});e.fire(i.SketchEditorEventType.update,t,self)}},{key:"getSnapGraphics",value:function(e,t){var r=this,n=null,o=null,s=[],u=null;t&&0!==t.length?1===t.length?o=new a.LineString({coordinates:[t[0],e.coordinates],spatialReference:this._spatialReference}):(o=new a.LineString({coordinates:t.slice(-2),spatialReference:this._spatialReference}),"sketchFreehandPolylineDrawTool"!==this.type&&"sketchFreehandPolygonDrawTool"!==this.type&&(u=new a.LineString({coordinates:t.slice(0,t.length),spatialReference:this._spatialReference}))):o=e,s=this.snapAndReferGeometries,this.sketchSnappingTool.snapSketchGeometry&&u&&(s=this.snapAndReferGeometries.concat([u])),t&&t.length>0&&("sketchFreehandPolylineDrawTool"===this.type||"sketchFreehandPolygonDrawTool"===this.type)&&s.push(new a.Point({coordinates:t[0],spatialReference:this._spatialReference}));var l=this.sketchSnappingTool.snapGeometries(e,o,s);if(l.coincidentPoint){var c=new i.Feature({geometry:l.coincidentPoint.realPoint,symbol:this.sketchStyle._coincidentPointStyle,elevationInfo:this.elevationInfo});this.sketchStage.snapGraphics.push(c),n=l.coincidentPoint.realPoint}else if(l.inLineAndParallel){l.inLineAndParallel.lines.forEach(function(e){var t=new i.Feature({geometry:e,symbol:r.sketchStyle._parallelLineStyle,elevationInfo:r.elevationInfo});r.sketchStage.snapGraphics.push(t)});var f=new i.Feature({geometry:l.inLineAndParallel.realPoint,symbol:this.sketchStyle._highlightPointStyle,elevationInfo:this.elevationInfo});if(this.sketchStage.snapGraphics.push(f),l.inLineAndParallel.symbolGeometry){var h=new i.Feature({geometry:l.inLineAndParallel.symbolGeometry,symbol:this.sketchStyle._parallelLineStyle,elevationInfo:this.elevationInfo});this.sketchStage.snapGraphics.push(h)}n=l.inLineAndParallel.realPoint}else if(l.inLineAndPerpendicular){l.inLineAndPerpendicular.lines.forEach(function(e){var t=new i.Feature({geometry:e,symbol:r.sketchStyle._perpendicularLineStyle,elevationInfo:r.elevationInfo});r.sketchStage.snapGraphics.push(t)});var p=new i.Feature({geometry:l.inLineAndPerpendicular.realPoint,symbol:this.sketchStyle._highlightPointStyle,elevationInfo:this.elevationInfo});if(this.sketchStage.snapGraphics.push(p),l.inLineAndPerpendicular.symbolGeometry){var d=new i.Feature({geometry:l.inLineAndPerpendicular.symbolGeometry,symbol:this.sketchStyle._perpendicularLineStyle,elevationInfo:this.elevationInfo});this.sketchStage.snapGraphics.push(d)}n=l.inLineAndPerpendicular.realPoint}else if(l.pointInLine){var y=new i.Feature({geometry:l.pointInLine.line,symbol:this.sketchStyle._highlightLineStyle,elevationInfo:this.elevationInfo});this.sketchStage.snapGraphics.push(y);var g=new i.Feature({geometry:l.pointInLine.realPoint,symbol:this.sketchStyle._highlightPointStyle,elevationInfo:this.elevationInfo});this.sketchStage.snapGraphics.push(g),n=l.pointInLine.realPoint}else if(l.parallelLine){var v=new i.Feature({geometry:l.parallelLine.line,symbol:this.sketchStyle._parallelLineStyle,elevationInfo:this.elevationInfo});this.sketchStage.snapGraphics.push(v);var m=new i.Feature({geometry:l.parallelLine.realPoint,symbol:this.sketchStyle._highlightPointStyle,elevationInfo:this.elevationInfo});if(this.sketchStage.snapGraphics.push(m),l.parallelLine.symbolGeometry){var _=new i.Feature({geometry:l.parallelLine.symbolGeometry,symbol:this.sketchStyle._parallelLineStyle,elevationInfo:this.elevationInfo});this.sketchStage.snapGraphics.push(_)}n=l.parallelLine.realPoint}else if(l.perpendicularLine){var b=new i.Feature({geometry:l.perpendicularLine.line,symbol:this.sketchStyle._perpendicularLineStyle,elevationInfo:this.elevationInfo});this.sketchStage.snapGraphics.push(b);var S=new i.Feature({geometry:l.perpendicularLine.realPoint,symbol:this.sketchStyle._highlightPointStyle,elevationInfo:this.elevationInfo});if(this.sketchStage.snapGraphics.push(S),l.perpendicularLine.symbolGeometry){var x=new i.Feature({geometry:l.perpendicularLine.symbolGeometry,symbol:this.sketchStyle._perpendicularLineStyle,elevationInfo:this.elevationInfo});this.sketchStage.snapGraphics.push(x)}n=l.perpendicularLine.realPoint}return this.sketchStage.snapGraphics.forEach(function(e){r._addFeatureToLayer(e,r.sketchInnerLayer)}),n}},{key:"setSnapAndReferGeometries",value:function(e){e?this.snapAndReferGeometries=e:this._sketchEditor&&(this.snapAndReferGeometries=this._sketchEditor.snapAndReferGeometries)}},{key:"debounce",value:function(e,t){var r=void 0;return function(){var n=this,i=arguments;clearTimeout(r),r=setTimeout(function(){e.apply(n,i)},t)}}}]),t}();t.default=l,i.Zondy.SketchBaseDrawTool=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasemapChangeEvent=t.LayerLoadedEvent=t.LayerChangeEvent=t.CollectionChangeEvent=t.ProxyEvent=t.LayerViewUpdateEvent=t.LayerEvent=t.ErrorEvent=t.Event=void 0;var n=h(r(25)),i=h(r(240)),o=h(r(112)),a=r(113),s=h(r(285)),u=h(r(286)),l=h(r(287)),c=h(r(288)),f=h(r(289));function h(e){return e&&e.__esModule?e:{default:e}}t.Event=n.default,t.ErrorEvent=i.default,t.LayerEvent=o.default,t.LayerViewUpdateEvent=a.LayerViewUpdateEvent,t.ProxyEvent=s.default,t.CollectionChangeEvent=u.default,t.LayerChangeEvent=l.default,t.LayerLoadedEvent=c.default,t.BasemapChangeEvent=f.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.initPropertys(t)}return n(e,[{key:"initPropertys",value:function(e){var t=e||{};return this.type=t.type,this.target=t.target,t}},{key:"addProperty",value:function(e,t){e&&(this[e]=t)}}]),e}();t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calcExtent=t.editGeometryByArc3=t.editFeatureByArc3=t.createGeometryByGeoJSON=t.createGeometry=void 0;var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(18)),i=r(0),o=r(3),a=r(4),s=r(86);t.createGeometry=function(e){switch((e=(0,i.defaultValue)(e,{})).type){case o.GeometryType.point:return new a.Point(e);case o.GeometryType.multiPoint:return new a.MultiPoint(e);case o.GeometryType.lineString:return new a.LineString(e);case o.GeometryType.multiLineString:return new a.MultiLineString(e);case o.GeometryType.polygon:return new a.Polygon(e);case o.GeometryType.multiPolygon:return new a.MultiPolygon(e);case o.GeometryType.circle:return new a.Circle(e);case o.GeometryType.extent:return new a.Extent(e);default:i.Log.error("未输入正确的几何类型")}},t.createGeometryByGeoJSON=function(e){var t=void 0;switch((t="Feature"===e.type?e.geometry:e).type){case o.GeometryType.point:return new a.Point({coordinates:t.coordinates});case o.GeometryType.multiPoint:case o.GeometryType.lineString:return new a.LineString({coordinates:t.coordinates});case o.GeometryType.multiLineString:return new a.MultiLineString({coordinates:t.coordinates});case o.GeometryType.polygon:return new a.Polygon({coordinates:t.coordinates});case o.GeometryType.multiPolygon:return new a.MultiPolygon({coordinates:t.coordinates});default:i.Log.error("无法解析geojson")}},t.editFeatureByArc3=function(e){var t=s.Feature.fromJSON(e),r=a.GeometryEngine.getArcFromGeometry({geometry:t.geometry,arcInfo:t.additional.arc3}),n=t.toJSON();return n.geometry.coordinates=r.coordinates,t=s.Feature.fromJSON(n)},t.editGeometryByArc3=function(e,t){return t&&t.arc3?a.GeometryEngine.getArcFromGeometry({geometry:e,arcInfo:t.arc3}):e},t.calcExtent=function(e,t,r,s){var u=void 0;switch(r=(0,i.defaultValue)(r,o.GeometryType.polygon)){case o.GeometryType.polygon:u=n.polygon(e);break;case o.GeometryType.lineString:u=n.lineString(e);break;case o.GeometryType.multiPolygon:u=n.multiPolygon(e);break;case o.GeometryType.multiLineString:u=n.multiLineString(e)}var l=n.bbox(u);if(!t)return new a.Extent({xmin:l[0],ymin:l[1],xmax:l[2],ymax:l[3],spatialReference:s});var c=[];switch(r){case o.GeometryType.polygon:case o.GeometryType.multiLineString:for(var f=0;f<e.length;f++)for(var h=0;h<e[f].length;h++)c.push(e[f][h][2]);break;case o.GeometryType.lineString:for(var p=0;p<e.length;p++)c.push(e[p][2]);break;case o.GeometryType.multiPolygon:for(var d=0;d<e.length;d++)for(var y=0;y<e[d].length;y++)for(var g=0;g<e[d][y].length;g++)c.push(e[d][y][g][2])}c.sort(function(e,t){return e-t});var v=c[0],m=c[c.length-1];return new a.Extent({xmin:l[0],ymin:l[1],xmax:l[2],ymax:l[3],zmin:v,zmax:m,spatialReference:s})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(2));var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type="unkown"}return n(e,[{key:"toJSON",value:function(){return{type:this.type}}},{key:"clone",value:function(){}}],[{key:"fromJSON",value:function(){}}]),e}();i.default.Symbol.Symbol3DLayer=o,t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(0),a=r(3),s=r(24),u=function(e){return e&&e.__esModule?e:{default:e}}(r(32)),l=r(4),c=r(21),f=r(29);var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e=(0,o.defaultValue)(e,{}),r.id=(0,o.defaultValue)(e.id,(0,o.getGUID)()),r.description=(0,o.defaultValue)(e.description,"图层基类"),r.copyright=(0,o.defaultValue)(e.copyright,"中地数码版权所有"),r.loadStatus=(0,o.defaultValue)(e.loadStatus,a.LoadStatus.notLoaded),r.loaded=!1,r.tokenKey=(0,o.defaultValue)(e.tokenKey,"token"),r.tokenValue=(0,o.defaultValue)(e.tokenValue,void 0),r.index=(0,o.defaultValue)(e.index,void 0),r.title=(0,o.defaultValue)(e.title,void 0),r.minScale=(0,o.defaultValue)(e.minScale,0),r.maxScale=(0,o.defaultValue)(e.maxScale,0),r.extendProps=(0,o.defaultValue)(e.extendProps,{}),r.type=a.LayerType.baseLayer,r.httpMethod=(0,o.defaultValue)(e.httpMethod,a.FetchMethod.get),r.headers=(0,o.defaultValue)(e.headers,void 0),r.extendOptions=(0,o.defaultValue)(e.extendOptions,{}),r._visible=(0,o.defaultValue)(e.visible,!0),r._opacity=parseFloat((0,o.defaultValue)(e.opacity,1)),r._spatialReference=e.spatialReference?u.default.fromJSON(e.spatialReference):void 0,r._extendPropertyKeys=[],r._realIndex=void 0,r._isBasemapLayer=!1,r.autoAddTo2D=(0,o.defaultValue)(e.autoAddTo2D,!0),r.autoAddTo3D=(0,o.defaultValue)(e.autoAddTo3D,!0),r._loadPromise=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Evented),n(t,[{key:"isLoaded",value:function(){return this.loadStatus===a.LoadStatus.loaded}},{key:"load",value:function(){return this.loadStatus===a.LoadStatus.notLoaded?(this.loadStatus=a.LoadStatus.loading,this._loadPromise=this._load()):(this.loadStatus,a.LoadStatus.loading),this._loadPromise}},{key:"_load",value:function(){var e=this;return new Promise(function(t){e.loadStatus=a.LoadStatus.loaded,e.loaded=!0,t(self)})}},{key:"setMap",value:function(e){this._map=e}},{key:"destroy",value:function(){}},{key:"extendProperty",value:function(e,t){(0,o.defined)(this[e])||(this._extendPropertyKeys.push(e),this[e]=t)}},{key:"_fireUpdateEvent",value:function(e,t){this._map&&this._map.fire(a.LayerEventType.layerUpdate,new s.LayerViewUpdateEvent({type:a.LayerEventType.layerUpdate,target:this._map,layer:this,message:e,updateContent:t}))}},{key:"toJSON",value:function(){return{id:this.id,description:this.description,copyright:this.copyright,loadStatus:a.LoadStatus.notLoaded,loaded:!1,tokenKey:this.tokenKey,tokenValue:this.tokenValue,index:this.index,title:this.title,minScale:this.minScale,maxScale:this.maxScale,type:this.type,visible:this.visible,opacity:this.opacity,spatialReference:(0,o.toJSON)(this.spatialReference,u.default),extent:(0,o.toJSON)(this.extent,l.Extent),autoAddTo2D:this.autoAddTo2D,autoAddTo3D:this.autoAddTo3D}}},{key:"clone",value:function(){return new t(this.toJSON())}},{key:"refresh",value:function(){this._fireUpdateEvent("刷新图层",[{params:arguments,dataChanged:!0,name:"refresh",operationType:"method"}])}},{key:"_updateIndex",value:function(){this._fireUpdateEvent("修改图层的index",[{name:"index",params:[this],dataChanged:!0,operationType:"property"}])}},{key:"_buildRequestUrl",value:function(){var e={};return this.tokenKey&&this.tokenValue&&(e[this.tokenKey]=this.tokenValue),(0,c.appendUrlParams)(this.url,e)}}],[{key:"fromJSON",value:function(e){return e=e||{},(0,f.createLayer)(e)}},{key:"fromServerUrl",value:function(e,r){return new Promise(function(n){r.url=e,n(new t(r))})}}]),t}();Object.defineProperties(h.prototype,{visible:{get:function(){return this._visible},set:function(e){this._visible=e,this._fireUpdateEvent("显隐变化",[{name:"visible",params:[this._visible],dataChanged:!0,operationType:"property"}])}},opacity:{get:function(){return this._opacity},set:function(e){this._opacity=Number(e),this._fireUpdateEvent("透明度变化",[{name:"opacity",params:[this._opacity],dataChanged:!0,operationType:"property"}])}},spatialReference:{get:function(){return this._spatialReference},set:function(e){this._spatialReference=e}},extent:{get:function(){return this._extentSrc},set:function(e){this._extentSrc=e}}}),i.Zondy.Layer.Layer=h,t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toSublayerArr=t.getLayersCollection=t.createLayer=t.flatServerSublayerInfos=t.setElevationInfo=t.fireEvent=t.setSublayer=void 0;var n=r(1),i=r(3),o=r(8),a=r(16);t.setSublayer=function(e,t,r){for(var n=!0,i=0;i<e._sublayers.length;i++)if(String(e._sublayers[i].name)===String(t.name)||String(e._sublayers[i].id)===String(t.id)){Object.assign(e._sublayers[i],t),n=!1;break}for(var o=0;o<e.allSublayers.length;o++)if(String(e.allSublayers[o].name)===String(t.name)||String(e.allSublayers[o].id)===String(t.id)){Object.assign(e.allSublayers[o],t),n=!1;break}if(n)if(t instanceof r)e._sublayers.push(t);else if(t instanceof Object&&!(t instanceof Array))for(var a=0;a<e.allSublayers.length;a++)if(String(t.id)===String(e.allSublayers[a].id)||String(t.name)===String(e.allSublayers[a].name)){e._sublayers.push(new r(Object.assign(e.allSublayers[a].toJSON(),t)));break}},t.fireEvent=function(e,t,r){e._map&&e._map.fire(t,new n.LayerEvent({type:r,target:e._map,layer:e,extend:{type:r}}))},t.setElevationInfo=function(e,t){e.elevationInfo||(t.elevationInfo?e.elevationInfo=t.elevationInfo:e.elevationInfo=new n.ElevationInfo)},t.flatServerSublayerInfos=function e(t,r){!t||!Array.isArray(t)||t.length<=0||t.forEach(function(t){r.push(t),t.children&&e(t.children,r)})},t.createLayer=function(e){var t=void 0;switch((e=e||{}).type){case i.LayerType.arcgisMapImage:t=a.ArcGISMapImageLayer.fromJSON(e);break;case i.LayerType.arcgisTile:t=a.ArcGISTileLayer.fromJSON(e);break;case i.LayerType.arcgisVectorTile:t=a.ArcGISVectorTileLayer.fromJSON(e);break;case i.LayerType.cesium3DTiles:t=a.Cesium3DTilesCacheLayer.fromJSON(e);break;case i.LayerType.echarts:t=a.EchartsLayer.fromJSON(e);break;case i.LayerType.feature:t=a.FeatureLayer.fromJSON(e);break;case i.LayerType.geojson:t=a.GeoJSONLayer.fromJSON(e);break;case i.LayerType.graphics:t=a.GraphicsLayer.fromJSON(e);break;case i.LayerType.group:t=a.GroupLayer.fromJSON(e);break;case i.LayerType.igsFeature:t=a.IGSFeatureLayer.fromJSON(e);break;case i.LayerType.igsMapImage:t=a.IGSMapImageLayer.fromJSON(e);break;case i.LayerType.igsVectorTile:t=a.IGSVectorTileLayer.fromJSON(e);break;case i.LayerType.igsTile:t=a.IGSTileLayer.fromJSON(e);break;case i.LayerType.m3dCache:t=a.M3DModelCacheLayer.fromJSON(e);break;case i.LayerType.mapv:t=a.MapVLayer.fromJSON(e);break;case i.LayerType.terrain:t=a.TerrainCacheLayer.fromJSON(e);break;case i.LayerType.webTileLayer:t=a.WebTileLayer.fromJSON(e);break;case i.LayerType.wfs:t=a.WFSLayer.fromJSON(e);break;case i.LayerType.wms:t=a.WMSLayer.fromJSON(e);break;case i.LayerType.wmts:t=a.WMTSLayer.fromJSON(e);break;case i.LayerType.unknown:default:t=a.UnknownLayer.fromJSON(e)}return t},t.getLayersCollection=function(e){return(e=e||[])instanceof n.Collection?e:(e=e.filter(function(e){return e}).map(function(e){return e instanceof a.Layer?e:a.Layer.fromJSON(e)}),new n.Collection(e))},t.toSublayerArr=function(e){if(e){var t=[];return e instanceof n.Collection?t=e.items:Array.isArray(e)&&(t=e),t=t.map(function(e){return e instanceof o.SubLayer?e.toJSON():e})}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(39),o=r(1);var a=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.type="",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.Evented),n(t,[{key:"toJSON",value:function(){return{type:this.type}}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();a.fromJSON=function(e){return(0,i.createRender)(e)},t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=c(r(46)),o=c(r(2)),a=r(1),s=r(0),u=r(3),l=r(11);function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e=(0,s.defaultValue)(e,{}),r.color=a.Color.fromColor((0,s.defaultValue)(e.color,new a.Color(255,255,255,.25))),r.type=u.SymbolType.default,r.extendOptions=(0,s.defaultValue)(e.extendOptions,{}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){return{color:a.Color.fromColor(this.color).toJSON(),type:this.type,extendOptions:(0,s.cloneObject)(this.extendOptions)}}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return(0,l.createSymbol)(e)}}]),t}();o.default.Symbol.Symbol=f,t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),a=r(0),s=r(128);var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,a.defaultValue)(t,{});var r=this._parseSpatialReferenceOptions(t),n=r.wkid,i=r.wkt;this.wkid=n,this.wkt=i,this.unit=t.unit}return i(e,[{key:"_parseSpatialReferenceOptions",value:function(e){var t=4326,r=void 0;if(e.wkid&&e.wkt)return{wkid:e.wkid,wkt:e.wkt};if("string"==typeof e){var i=e.match(/\d+$/);/^(EPSG|epsg)(:)?\d+$/.test(e)&&i?(t=parseInt(i[0]),r=void 0):(r=e,t=void 0)}else"object"===(void 0===e?"undefined":n(e))?((0,a.defined)(e.wkid)&&(t=parseInt(e.wkid)),e.wkt&&(r=e.wkt,t=void 0)):a.Log.error("无法解析传入的空间参考系参数");return{wkid:t,wkt:r}}},{key:"clone",value:function(){return new e(this.toJSON())}},{key:"toJSON",value:function(){return{wkid:this.wkid,wkt:this.wkt}}},{key:"toString",value:function(){return this.wkid?"EPSG:"+this.wkid:this.wkt?this.wkt:void 0}},{key:"equals",value:function(t){if(!(t instanceof e||t instanceof Object&&t.hasOwnProperty("wkid")&&t.hasOwnProperty("wkt")))throw new Error("spatialReference的格式不正确!");return!!(this===t||this.wkid&&t.wkid&&this.wkid===t.wkid||this.wkt&&t.wkt&&this.wkt.toUpperCase()===t.toUpperCase())}},{key:"isWGS84",get:function(){return 4326===this.wkid}},{key:"isGeographic",get:function(){return!!(this.wkid&&void 0===s.ProjUnitWkidMap[this.wkid]||/^GEOGCS/.test(this.wkt)||/^[+]proj=longlat/.test(this.wkt))}},{key:"isWebMercator",get:function(){return[102113,102100,900913,3857].indexOf(this.wkid)>-1}},{key:"isWrappable",get:function(){return[4326,4490,4610,4214,102113,102100,900913,3857].indexOf(this.wkid)>-1}},{key:"WebMercator",get:function(){return this.isWebMercator?this.clone():void 0}},{key:"WGS84",get:function(){return this.isGeographic?this.clone():void 0}}],[{key:"fromJSON",value:function(t){return new e(t=(0,a.defaultValue)(t,{}))}}]),e}();o.default.SpatialReference=u,t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(18)),o=d(r(13)),a=r(0),s=d(r(2)),u=d(r(20)),l=r(3),c=d(r(47)),f=d(r(32)),h=d(r(38)),p=d(r(49));function d(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(e=(0,a.defaultValue)(e,{}),r.xmin=(0,a.defaultValue)(e.xmin,0),r.ymin=(0,a.defaultValue)(e.ymin,0),r.xmax=(0,a.defaultValue)(e.xmax,0),r.ymax=(0,a.defaultValue)(e.ymax,0),r.zmin=(0,a.defaultValue)(e.zmin,void 0),r.zmax=(0,a.defaultValue)(e.zmax,void 0),r.type=l.GeometryType.extent,r.hasZ=!(!(0,a.isNumber)(r.zmin)||!(0,a.isNumber)(r.zmax)),!(0,a.isNumber)(r.xmin)||!(0,a.isNumber)(r.ymin)||!(0,a.isNumber)(r.xmax)||!(0,a.isNumber)(r.ymax)||void 0!==r.zmin&&!(0,a.isNumber)(r.zmin)||void 0!==r.zmax&&!(0,a.isNumber)(r.zmax))throw new Error("坐标必须为数字");return r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"centerAt",value:function(e){if(!e)throw new Error("传入参数错误");var t=u.default.toCoordinates(e),r=this.width,n=this.height;if(this.xmin=t[0]-r/2,this.xmax=t[0]+r/2,this.ymin=t[1]-n/2,this.ymax=t[1]+n/2,this.hasZ&&e.hasZ){var i=this.zmax-this.zmin;this.zmin=t[2]-i/2,this.zmax=t[2]+i/2}return this}},{key:"contains",value:function(e){if(!(e instanceof u.default||e instanceof t))return!1;var r=e;r.isGeographic||(r=c.default.project(e,new f.default({wkid:4326})));var n=this;n.isGeographic||(n=c.default.project(this,new f.default({wkid:4326})));var o=i.polygon([[[n.xmin,n.ymin],[n.xmin,n.ymax],[n.xmax,n.ymax],[n.xmax,n.ymin],[n.xmin,n.ymin]]]),a=void 0;return a=r instanceof u.default?i.point(r._cloneCoordinates()):i.polygon([[[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin]]]),i.booleanContains(o,a)}},{key:"intersection",value:function(e){e||a.Log.error("传入参数错误!"),e instanceof t||a.Log.error("extent不是Extent几何!"),this.spatialReference.equals(e.spatialReference)||a.Log.error("不是同一个坐标系!");var r=e;r.isGeographic||(r=c.default.project(e,new f.default({wkid:4326})));var n=this;n.isGeographic||(n=c.default.project(this,new f.default({wkid:4326})));var o=i.polygon([[[n.xmin,n.ymin],[n.xmin,n.ymax],[n.xmax,n.ymax],[n.xmax,n.ymin],[n.xmin,n.ymin]]]),s=i.polygon([[[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin]]]),u=null,l=i.intersect(o,s);if(l&&l.geometry){var h=void 0;"Polygon"===l.geometry.type?h=i.bbox(i.polygon(l.geometry.coordinates)):"MultiPolygon"===l.geometry.type&&(h=i.bbox(i.multiPolygon(l.geometry.coordinates))),h&&(u=new t({xmin:h[0],ymin:h[1],xmax:h[2],ymax:h[3]}),this.spatialReference.isGeographic||(u=c.default.project(u,f.default.fromJSON(this.spatialReference))))}return u}},{key:"intersects",value:function(e){return h.default.intersects(this,e)}},{key:"equals",value:function(e){if(!e)throw new Error("传入参数错误");var t=!!Math.abs(this.xmax-e.xmax)<=1e-7,r=!!Math.abs(this.xmin-e.xmin)<=1e-7,n=!!Math.abs(this.ymax-e.ymax)<=1e-7,i=!!Math.abs(this.ymin-e.ymin)<=1e-7;if(!this.hasZ)return t&&r&&n&&i;var o=!!Math.abs(this.zmax-e.zmax)<=1e-7,a=!!Math.abs(this.zmin-e.zmin)<=1e-7;return t&&r&&n&&i&&o&&a}},{key:"expand",value:function(e){if("number"==typeof e){if(e>=1){e=Math.abs(e);var t=this.width*e,r=this.height*e,n=t-this.width,i=r-this.height;this.xmin-=n/2,this.xmax+=n/2,this.ymin-=i/2,this.ymax+=i/2}return this}throw new Error("按照给定的因子扩大范围,需要的是一个num值")}},{key:"offset",value:function(e,t,r){if(!(0,a.isNumber)(e)||!(0,a.isNumber)(t)||this.hasZ&&!(0,a.isNumber)(r))throw new Error("传入参数错误");return this.xmax+=e,this.xmin+=e,this.ymax+=t,this.ymin+=t,this.hasZ&&(this.zmax+=r,this.zmin+=r),this}},{key:"union",value:function(e){if(!e)throw new Error("传入参数错误");return this.hasZ?new t({xmin:e.xmin<this.xmin?e.xmin:this.xmin,xmax:e.xmax>this.xmax?e.xmax:this.xmax,ymin:e.ymin<this.ymin?e.ymin:this.ymin,ymax:e.ymax>this.ymax?e.ymax:this.ymax,zmin:e.zmin<this.zmin?e.zmin:this.zmin,zmax:e.zmax>this.zmax?e.zmax:this.zmax}):new t({xmin:e.xmin<this.xmin?e.xmin:this.xmin,xmax:e.xmax>this.xmax?e.xmax:this.xmax,ymin:e.ymin<this.ymin?e.ymin:this.ymin,ymax:e.ymax>this.ymax?e.ymax:this.ymax})}},{key:"toString",value:function(){return this.hasZ?this.xmin+","+this.ymin+","+this.zmin+","+this.xmax+","+this.ymax+","+this.zmax:this.xmin+","+this.ymin+","+this.xmax+","+this.ymax}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.xmin=this.xmin,e.ymin=this.ymin,e.xmax=this.xmax,e.ymax=this.ymax,e.zmin=this.zmin,e.zmax=this.zmax,e.width=this.width,e.height=this.height,e}},{key:"toIGSOldString",value:function(){return this.xmin+"$"+this.ymin+"$"+this.xmax+"$"+this.ymax}},{key:"getIGSType",value:function(){return this.hasZ?l.IGSGeometryType.extent3D:l.IGSGeometryType.extent}},{key:"normalize",value:function(){var e=new u.default({coordinates:[this.xmin,this.ymin]}),r=new u.default({coordinates:[this.xmax,this.ymax]});return e=e.normalize(),r=r.normalize(),new t({xmin:e.coordinates[0],ymin:e.coordinates[1],xmax:r.coordinates[0],ymax:r.coordinates[1]})}},{key:"clone",value:function(){return new t(this.toJSON())}},{key:"toPolygon",value:function(){return p.default.fromExtent(this)}},{key:"toGeoJSON",value:function(){return this.toPolygon().toGeoJSON()}}],[{key:"fromJSON",value:function(e){return new t(e=(0,a.defaultValue)(e,{}))}}]),t}();Object.defineProperties(y.prototype,{width:{configurable:!1,get:function(){return this.xmax-this.xmin}},height:{configurable:!1,get:function(){return this.ymax-this.ymin}},center:{configurable:!1,set:function(e){this.centerAt(e)},get:function(){return this.hasZ?new u.default({coordinates:[(this.xmax-this.xmin)/2+this.xmin,(this.ymax-this.ymin)/2+this.ymin,(this.zmax-this.zmin)/2+this.zmin],spatialReference:this.spatialReference}):new u.default({coordinates:[(this.xmax-this.xmin)/2+this.xmin,(this.ymax-this.ymin)/2+this.ymin],spatialReference:this.spatialReference})}}}),s.default.Geometry.Extent=y,t.default=y},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(4),a=c(r(23)),s=c(r(22)),u=c(r(17)),l=r(0);function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r._initEvent(),r.type="sketchPolygonDrawTool",r._drawTools=[r],r._otherDrawTools=[],r._currentMovePoint=void 0,r.vertexNum=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),n(t,[{key:"_initEvent",value:function(){this._processEvent=this._processEvent.bind(this),this.on("pan",this._processEvent),this.on("vertexScale",this._processEvent),this.on("midVertexScale",this._processEvent),this.on("vertexMove",this._processEvent),this.on("midVertexAdd",this._processEvent)}},{key:"drawFeature",value:function(){var e=this;this._editMode=i.SketchEditMode.DRAWING,this.view._mapActionControl("double-click-zoom",!1),this.view._mapActionControl("video-map-active",!0);var t=!1,r=!1,n=null,a=[],u=[];this.vertexNum=0;var c=null;this.cursorStyle=this.view.cursor,(0,l.isNull)(this.cursorStyle)&&(this.view.cursor="crosshair");var f=this._getInteractiveDom(),h=this.extendOptions&&this.extendOptions.vertexNumber?this.extendOptions.vertexNumber:null;this._setInitSnap(),this._fireStartDrawEvent();var p=function r(a){if(a&&a.x&&a.y){e._stopInitSnap(),clearTimeout(null);var f={x:a.x,y:a.y};f,e._editMode=i.SketchEditMode.DRAWING;var p=null;p=e._snapPoint?e._snapPoint:e.view.toMap({x:f.x,y:f.y});var d=e.vertexNum+1;if(1===d)u=[p.coordinates],(n=e._getFeature()).geometry.coordinates=[[u[0],u[0],u[0],u[0]]];else if(2===d){var y=n.geometry.coordinates[0][0];if(y&&y[0]===p.coordinates[0]&&y[1]===p.coordinates[1])return l.Log.info("相邻两顶点重复!");u=[n.geometry.coordinates[0][0],n.geometry.coordinates[0][1]]}else{var g=(u=n.geometry.coordinates[0].slice(0,n.geometry.coordinates[0].length-2))[u.length-1];if(g&&g[0]===p.coordinates[0]&&g[1]===p.coordinates[1])return l.Log.info("相邻两顶点重复!");if(u.push(p.coordinates),e._sketchEditor.isSimple){var v=new o.Polygon({coordinates:[u.concat([u[0]])],spatialReference:e._spatialReference});if(!o.GeometryEngine.isSimple(v))return e._fireUnsimpleDraw(),l.Log.info("该坐标构成的几何不符合拓扑规范!")}}if(e.vertexNum=d,h&&d>=h)e.view.off(i.ViewEventType.immediateClick,r);else{e.sketchStage.entityGraphic=n;var m=new s.default({view:e.view,layer:e.layer,_parent:e,sketchStyle:e.sketchStyle,elevationInfo:e.elevationInfo});m.addFeature(p,void 0,void 0,e.sketchInnerLayer),e._drawTools.push(m);var _=m.sketchStage.entityGraphic;e.sketchStage.vertexGraphics.push(_),n&&(t=!0),c="click",e.fire("drawn-vertex",{geometry:m.sketchStage.entityGraphic.geometry,feature:m.sketchStage.entityGraphic},self),e._fireDrawVertexEvent(n),e.undoRedoManager&&e.undoRedoManager.addProcess("add-vertex",e.sketchStage,e._editMode)}}},d=!0,y=function(i){if(i&&i.x&&i.y&&t&&!r){clearTimeout(null),r=!0,n=e.sketchStage.entityGraphic,e.sketchStage.snapGraphics.length>0&&(e.sketchStage.snapGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.snapGraphics=[]);var o={x:i.x,y:i.y};a[a.length-1]=o;var s=e.view.toMap({x:o.x,y:o.y}),l=h&&e.vertexNum===h?e.vertexNum-1:e.vertexNum;1===l?u=[n.geometry.coordinates[0][0]]:2===l?(n.geometry.coordinates[0][2]=s.coordinates,u=n.geometry.coordinates[0].slice(0,n.geometry.coordinates[0].length-2)):u=n.geometry.coordinates[0].slice(0,n.geometry.coordinates[0].length-2),1===e.vertexNum?e._snapPoint=e.getSnapGraphics(s,u):e.vertexNum>1&&(e._snapPoint=e.getSnapGraphics(s,u)),e._snapPoint&&(s=e._snapPoint),e._currentMovePoint=s,1===l?(n.geometry.coordinates[0][1]=s.coordinates,n.geometry.coordinates[0][2]=s.coordinates):2===l?n.geometry.coordinates[0][2]=s.coordinates:"click"===c?n.geometry.coordinates[0].splice(n.geometry.coordinates[0].length-1,0,s.coordinates):"move"===c&&n.geometry.coordinates[0].splice(n.geometry.coordinates[0].length-2,1,s.coordinates),e.sketchStage.entityGraphic=n,n.geometry.coordinates=[JSON.parse(JSON.stringify(n.geometry.coordinates[0]))],d&&(e._addFeatureToLayer(n,e.layer),d=!1),r=!1,c="move";var p=e._getInteractiveDom();f=f.concat(p),e._removeInteractiveStyle(p),e._fireChangeCursorEvent(n)}},g=function(){if(clearTimeout(null),clearTimeout(null),!t)return n=null,u=[],void(a=[]);if((n=e.sketchStage.entityGraphic)&&e._sketchEditor.isSimple&&!o.GeometryEngine.isSimple(n.geometry))return e._fireUnsimpleDraw(),l.Log.info("该坐标构成的几何不符合拓扑规范!");if(e.vertexNum<3&&e.sketchStage.entityGraphic)return l.Log.info("区几何顶点少于三个,不符合规范!");u=[],a=[],t=!1,e.stop(),e.sketchStage.snapGraphics.length>0&&(e.sketchStage.snapGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.snapGraphics=[]),e._editMode=i.SketchEditMode.NONE,c="doubleClick",e.view.cursor=e.cursorStyle,e._addInteractiveStyle(f),e.fire("drawn",{geometry:n.geometry,feature:n},self),e._fireStopDrawEvent(n),e.sketchStage.vertexGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.vertexNum=0,e.sketchStage.vertexGraphics=[],e._currentMovePoint=void 0,e.undoRedoManager._initDrawProcess(),setTimeout(function(){e.view._mapActionControl("double-click-zoom",!0),e.view._mapActionControl("video-map-active",!1)},0)};this._drawEventHandlers.push(p,y,g),this.view.on(i.ViewEventType.immediateClick,p),this.view.on(i.ViewEventType.pointerMove,y),this.view.on(i.ViewEventType.doubleClick,g)}},{key:"addFeature",value:function(e,t,r,n){var i=null;i=t&&t.fillStyle?t.fillStyle:this.sketchStyle._fillStyle;var o=this._getFeature(e,i);r&&(o.attributes=r),this.sketchStage.entityGraphic=o,this._addFeatureToLayer(o,n)}},{key:"addFeatureByGeometry",value:function(e,t,r,n){var o=null;o=t&&t.fillStyle?t.fillStyle:this.sketchStyle._fillStyle;var a=new i.Feature({geometry:e,symbol:o,elevationInfo:this.elevationInfo});r&&(a.attributes=r),this.sketchStage.entityGraphic=a,this._addFeatureToLayer(a,n)}},{key:"_getFeature",value:function(e){e||(e=[[0,0],[0,0],[0,0],[0,0]]);var t=new o.Polygon({coordinates:[e],spatialReference:this._spatialReference}),r=this.sketchStyle.fillStyle.clone(),n=new i.Feature({geometry:t,symbol:r,elevationInfo:this.elevationInfo});return n.isShowArea=this.sketchStyle.isShowArea,n.isShowArea&&(n._textStyle=this.sketchStyle.textStyle),n}},{key:"hitTestFeature",value:function(e,t){this.view._mapActionControl("video-map-active",!0),!this._parent&&this.editOption.showSelectBox&&(this._editMode===i.SketchEditMode.NONE?this._editMode=i.SketchEditMode.EDITGRAGIC:this._editMode===i.SketchEditMode.EDITVERTEX&&(this.view.off(i.ViewEventType.immediateClick,this._mapClickEvent),this._mapClickEvent=null,this._editMode=i.SketchEditMode.EDITGRAGIC),this.selectFeature(e)),this._parent&&this._parent._editMode===i.SketchEditMode.EDITGRAGIC&&this.startPanGraphics(e,t)}},{key:"selectFeature",value:function(e){var r=this;if(this.editOption.showSelectBox){this._clearEditGraphics(2);var n=e.geometry.extent,a=new t({view:this.view,layer:this.layer,sketchStyle:new u.default({fillStyle:this.sketchStyle._selectBoxStyle,isShowSegmentLength:!0,isShowArea:!0}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(a),a.addFeature([[n.xmax,n.ymax],[n.xmax,n.ymin],[n.xmin,n.ymin],[n.xmin,n.ymax],[n.xmax,n.ymax]],void 0,void 0,this.sketchInnerLayer),this.sketchStage.selectBoxGraphics=[a.sketchStage.entityGraphic];var l=[];if(l=[{point:new o.Point({coordinates:[n.xmax,n.ymax],spatialReference:this._spatialReference}),direction:"ne"},{point:new o.Point({coordinates:[n.xmax,n.ymin],spatialReference:this._spatialReference}),direction:"se"},{point:new o.Point({coordinates:[n.xmin,n.ymin],spatialReference:this._spatialReference}),direction:"sw"},{point:new o.Point({coordinates:[n.xmin,n.ymax],spatialReference:this._spatialReference}),direction:"nw"}],this._sketchEditor&&this._sketchEditor._getCenterCoordinate){var c=[{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([n.xmax,n.ymax],[n.xmax,n.ymin]),spatialReference:this._spatialReference}),direction:"e",type:"midVertex"},{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([n.xmax,n.ymin],[n.xmin,n.ymin]),spatialReference:this._spatialReference}),direction:"s",type:"midVertex"},{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([n.xmin,n.ymin],[n.xmin,n.ymax]),spatialReference:this._spatialReference}),direction:"w",type:"midVertex"},{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([n.xmin,n.ymax],[n.xmax,n.ymax]),spatialReference:this._spatialReference}),direction:"n",type:"midVertex"}];l=l.concat(c)}var f=[],h=[];l.forEach(function(e){var t=new s.default({view:r.view,layer:r.layer,sketchStyle:new u.default({vertexStyle:r.sketchStyle._selectBoxVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:r.elevationInfo,_parent:r});r._drawTools.push(t),t.addFeature(e.point,r.sketchStage,{direction:e.direction,type:e.type},r.sketchInnerLayer),f.push(t),h.push(t.sketchStage.entityGraphic)}),this.sketchStage.selectBoxVertexGraphics=h,this._otherDrawTools?this._otherDrawTools.push(a):this._otherDrawTools=[a],this._otherDrawTools=this._otherDrawTools.concat(f),this.undoRedoManager&&this.undoRedoManager.addProcess("add",this.sketchStage,this._editMode),this._mapClickEvent||this._parent&&(!this._parent||this._parent._mapClickEvent)||(this._mapClickEvent=function(){r._preventFirstCall?r._preventFirstCall=void 0:(r.sketchStage.selectBoxGraphics.concat(r.sketchStage.selectBoxVertexGraphics).concat(r.sketchStage.vertexGraphics).concat(r.sketchStage.midVertexGraphics).forEach(function(e){r._removeFeatureFromLayer(e,r.sketchInnerLayer)}),r.view.off(i.ViewEventType.immediateClick,r._mapClickEvent),r.view._mapActionControl("drag-pan",!0),r._mapClickEvent=null,r.fire("selected",{isSelected:!1},self),r._fireRemoveSelectEvent(r.sketchStage.entityGraphic),r.sketchStage.selectBoxGraphics=[],r.sketchStage.selectBoxVertexGraphics=[],r.sketchStage.vertexGraphics=[],r.sketchStage.midVertexGraphics=[],r._editMode=i.SketchEditMode.NONE,r.view._mapActionControl("video-map-active",!1))},this._hitTestEventHandlers.push(this._mapClickEvent),setTimeout(function(){r.view.on(i.ViewEventType.immediateClick,r._mapClickEvent)},0))}}},{key:"selectFeatureVertex",value:function(e){var t=this;this._clearEditGraphics(1);var r=[],n=[];e.geometry.coordinates[0].forEach(function(i,a){if(a<e.geometry.coordinates[0].length-1){var l=new s.default({view:t.view,layer:t.layer,sketchStyle:new u.default({vertexStyle:t.sketchStyle._selectVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:t.elevationInfo,_parent:t}),c=new o.Point({coordinates:i,spatialReference:t._spatialReference});t._drawTools.push(l),l.addFeature(c,void 0,{vertexIndex:a},t.sketchInnerLayer),r.push(l),t.sketchStage.vertexGraphics.push(l.sketchStage.entityGraphic)}if(a>0){var f=new s.default({view:t.view,layer:t.layer,sketchStyle:new u.default({vertexStyle:t.sketchStyle._selectMidVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:t.elevationInfo,_parent:t});n.push(f);var h=e.geometry.coordinates[0][a-1],p=null;p=i.length>2?new o.Point({coordinates:[(i[0]+h[0])/2,(i[1]+h[1])/2,(i[2]+h[2])/2],spatialReference:t._spatialReference}):new o.Point({coordinates:[(i[0]+h[0])/2,(i[1]+h[1])/2],spatialReference:t._spatialReference}),t._drawTools.push(f),f.addFeature(p,void 0,{vertexIndex:a-1,type:"midVertex"},t.sketchInnerLayer),t.sketchStage.midVertexGraphics.push(f.sketchStage.entityGraphic)}});var i=r.concat(n);this._otherDrawTools=this._otherDrawTools?this._otherDrawTools.concat(i):i,this.undoRedoManager&&this.undoRedoManager.addProcess("add",this.sketchStage,this._editMode)}},{key:"startPanGraphics",value:function(e,t){var r=this;this.view._mapActionControl("drag-pan",!1);var n=!1;this._startPan=!0;var a=null;a=t.mapPoint;var s=!0,u=setTimeout(function(){s=!1,r._parent&&r._fireStartPanEvent(r._parent.sketchStage.entityGraphic,r._parent)},200);this._parent&&this._parent._mapClickEvent&&this.view.off(i.ViewEventType.immediateClick,this._parent._mapClickEvent);var l=function(t){if(t&&t.x&&t.y&&!n&&r._startPan&&!r._editMode!==i.SketchEditMode.EDITGRAGIC&&!s){clearTimeout(null),n=!0;var u={x:t.x,y:t.y},l=r.view.toMap({x:u.x,y:u.y}),c=l.coordinates[0]-a.coordinates[0],f=l.coordinates[1]-a.coordinates[1];if(0!==c||0!==f){var h=[];e.geometry.coordinates[0].forEach(function(e){h.push(r.getPanCoordinates(e,c,f))});var p=new o.Polygon({coordinates:[h],spatialReference:r._spatialReference});a=l,r._dispatchEvent("pan",{deltaPosition:{x:c,y:f}},r),r.updateFeature(p,e),n=!1,r._parent&&r._firePanningEvent(r._parent.sketchStage.entityGraphic,r._parent)}else n=!1}},c=function e(){if(!r._editMode!==i.SketchEditMode.EDITGRAGIC&&r._startPan){if(s&&r._parent&&r._parent._editMode===i.SketchEditMode.EDITGRAGIC&&"sketchPointDrawTool"!==r._parent.type&&r._parent.selectFeatureVertex)return r._parent._editMode=i.SketchEditMode.EDITVERTEX,clearTimeout(u),r._parent.selectFeatureVertex(r._parent.sketchStage.entityGraphic),r._parent&&r._parent._mapClickEvent&&setTimeout(function(){r.view.on(i.ViewEventType.immediateClick,r._parent._mapClickEvent)},0),r._startPan=!1,r.view.off(i.ViewEventType.pointerMove,l),void r.view.off(i.ViewEventType.pointerUp,e);r._editMode=i.SketchEditMode.NONE,r._startPan=!1,r.view.off(i.ViewEventType.pointerMove,l),r.view.off(i.ViewEventType.pointerUp,e),r._parent&&r._parent.undoRedoManager&&r._parent.undoRedoManager.addProcess("update",r._parent.sketchStage,r._editMode),r._parent&&r._parent._mapClickEvent&&r.view.on(i.ViewEventType.immediateClick,r._parent._mapClickEvent),r._parent&&r._fireStopPanEvent(r._parent.sketchStage.entityGraphic,r._parent),setTimeout(function(){r.view._mapActionControl("drag-pan",!0)},0)}};this._hitTestEventHandlers.push(l),this._hitTestEventHandlers.push(c),this.view.on(i.ViewEventType.pointerUp,c),this.view.on(i.ViewEventType.pointerMove,l)}},{key:"_processEvent",value:function(e){"pan"===e.type?this._handlerPanEvent(e):"vertexScale"===e.type?this._handlerVertexScaleEvent(e):"midVertexScale"===e.type?this._handlerMidVertexScaleEvent(e):"circleVertexScale"===e.type?this._handlerCircleVertexScaleEvent(e):"vertexMove"===e.type?this._handlerVertexMoveEvent(e):"midVertexAdd"===e.type&&this._handlerMidVertexAddEvent(e)}},{key:"_handlerPanEvent",value:function(e){var t=this,r=[];this.sketchStage.entityGraphic.geometry.coordinates[0].forEach(function(n){r.push(t.getPanCoordinates(n,e.deltaPosition.x,e.deltaPosition.y))});var n=new o.Polygon({coordinates:[r],spatialReference:this._spatialReference});this.sketchStage.entityGraphic.geometry=n,this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)})}},{key:"_handlerVertexScaleEvent",value:function(e){if("scale"===e.action){var t;if(!this.sketchStage.entityGraphic.attributes.lastCoordinates){var r=JSON.parse(JSON.stringify(this.sketchStage.entityGraphic.geometry.coordinates[0]));this.sketchStage.entityGraphic.attributes.lastCoordinates=r}var n=this.getScaleCoordinates(this.sketchStage.entityGraphic.geometry.coordinates[0],e.direction,e.extent,e.startPoint,e.movePoint,this.sketchStage.entityGraphic.attributes.lastCoordinates);t=new o.Polygon({coordinates:[n],spatialReference:this._spatialReference}),this.sketchStage.entityGraphic.geometry=t,this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)})}"stop"===e.action&&(this.sketchStage.entityGraphic.attributes.lastCoordinates&&(this.sketchStage.entityGraphic.attributes.lastCoordinates=void 0),this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}),this._resetSelectBoxDirection())}},{key:"_handlerMidVertexScaleEvent",value:function(e){var t;if(!this.sketchStage.entityGraphic.attributes.lastCoordinates){var r=JSON.parse(JSON.stringify(this.sketchStage.entityGraphic.geometry.coordinates[0]));this.sketchStage.entityGraphic.attributes.lastCoordinates=r}var n=this.getMidScaleCoordinates(this.sketchStage.entityGraphic.geometry.coordinates[0],e.direction,e.extent,e.startPoint,e.movePoint,this.sketchStage.entityGraphic.attributes.lastCoordinates);t=new o.Polygon({coordinates:[n],spatialReference:this._spatialReference}),this.sketchStage.entityGraphic.geometry=t,this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}),"stop"===e.action&&(this.sketchStage.entityGraphic.attributes.lastCoordinates&&(this.sketchStage.entityGraphic.attributes.lastCoordinates=void 0),this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}),this._resetSelectBoxDirection())}},{key:"_resetSelectBoxDirection",value:function(){var e=this,t=this.sketchStage.entityGraphic.geometry.extent;this.sketchStage.selectBoxVertexGraphics.forEach(function(r){r.attributes&&("ne"===r.attributes.direction?r.geometry.coordinates=[t.xmax,t.ymax]:"se"===r.attributes.direction?r.geometry.coordinates=[t.xmax,t.ymin]:"sw"===r.attributes.direction?r.geometry.coordinates=[t.xmin,t.ymin]:"nw"===r.attributes.direction?r.geometry.coordinates=[t.xmin,t.ymax]:"e"===r.attributes.direction?r.geometry.coordinates=e._sketchEditor._getCenterCoordinate([t.xmax,t.ymax],[t.xmax,t.ymin]):"s"===r.attributes.direction?r.geometry.coordinates=e._sketchEditor._getCenterCoordinate([t.xmax,t.ymin],[t.xmin,t.ymin]):"w"===r.attributes.direction?r.geometry.coordinates=e._sketchEditor._getCenterCoordinate([t.xmin,t.ymin],[t.xmin,t.ymax]):"n"===r.attributes.direction&&(r.geometry.coordinates=e._sketchEditor._getCenterCoordinate([t.xmin,t.ymax],[t.xmax,t.ymax])))})}},{key:"_handlerCircleVertexScaleEvent",value:function(e){if(this._parent&&this._parent.sketchStage.entityGraphic){var t=null,r=this._parent.sketchStage.entityGraphic.geometry.extent,n=[[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax]];(t=new o.Polygon({coordinates:[[[0,0],[0,0],[0,0],[0,0]]],spatialReference:this._spatialReference})).coordinates=[n],this.sketchStage.entityGraphic.geometry=t,this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}),"stop"===e.action&&(this.sketchStage.entityGraphic.attributes.lastCoordinates&&(this.sketchStage.entityGraphic.attributes.lastCoordinates=void 0),this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}))}}},{key:"_handlerVertexMoveEvent",value:function(e){this.sketchStage.currentVertexIndex=e.vertexIndex;var t=this.sketchStage.entityGraphic,r=t.geometry.coordinates[0],n=JSON.parse(JSON.stringify(r));n[e.vertexIndex]=e.movePoint.coordinates,n.length-1===e.vertexIndex?n[0]=e.movePoint.coordinates:0===e.vertexIndex&&(n[t.geometry.coordinates[0].length-1]=e.movePoint.coordinates);var i=new o.Polygon({coordinates:[n],spatialReference:this._spatialReference});if(this._sketchEditor.isSimple&&!o.GeometryEngine.isSimple(i))return this._fireUnsimpleUpdate(),l.Log.info("该坐标构成的几何不符合拓扑规范!");if(t.geometry=i,this._otherDrawTools){var a=e.vertexIndex,s=0===a?a-1+this.sketchStage.midVertexGraphics.length:a-1,u=a===this.sketchStage.midVertexGraphics.length-1?0:a+1,c=this.sketchStage.midVertexGraphics[a],f=this.sketchStage.midVertexGraphics[s],h=this.sketchStage.vertexGraphics[a],p=n[s],d=n[a],y=n[u];c.geometry.coordinates=[(y[0]+d[0])/2,(y[1]+d[1])/2],f.geometry.coordinates=[(p[0]+d[0])/2,(p[1]+d[1])/2],h.geometry.coordinates=d}}},{key:"_handlerMidVertexAddEvent",value:function(e){var t=this;if("changeFeature"===e.action&&(this.sketchStage.entityGraphic.geometry.coordinates[0].splice(e.vertexIndex+1,0,e.point.coordinates),this.sketchStage.entityGraphic.geometry=new o.Polygon({coordinates:[this.sketchStage.entityGraphic.geometry.coordinates[0]],spatialReference:this._spatialReference})),"moveMidVertex"===e.action){var r=JSON.parse(JSON.stringify(this.sketchStage.entityGraphic.geometry.coordinates[0]));r[e.vertexIndex+1]=e.movePoint.coordinates;var n=new o.Polygon({coordinates:[r],spatialReference:this._spatialReference});if(this._sketchEditor.isSimple)if(!o.GeometryEngine.isSimple(n))return this._fireUnsimpleUpdate(),l.Log.info("该坐标构成的几何不符合拓扑规范!");this.sketchStage.currentVertexIndex=e.vertexIndex,this.sketchStage.entityGraphic.geometry=n,this.sketchStage.midVertexGraphics[e.vertexIndex].geometry.coordinates=e.movePoint.coordinates}if("addVertex"===e.action){var i=this.sketchStage.midVertexGraphics[e.vertexIndex].id.toString(),a=new s.default({view:this.view,layer:this.layer,sketchStyle:new u.default({vertexStyle:this.sketchStyle._selectVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(a),a.addFeature(e.point,void 0,void 0,this.sketchInnerLayer),this.sketchStage.vertexGraphics.splice(e.vertexIndex+1,0,a.sketchStage.entityGraphic);var c=this.sketchStage.entityGraphic.geometry.coordinates[0][e.vertexIndex],f=null,h=null;this._getHight&&(h=0),f=h?new o.Point({coordinates:[(c[0]+e.point.coordinates[0])/2,(c[1]+e.point.coordinates[1])/2,h],spatialReference:this._spatialReference}):new o.Point({coordinates:[(c[0]+e.point.coordinates[0])/2,(c[1]+e.point.coordinates[1])/2],spatialReference:this._spatialReference});var p=new s.default({view:this.view,layer:this.layer,sketchStyle:new u.default({vertexStyle:this.sketchStyle._selectMidVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(p),p.addFeature(f,void 0,{type:"midVertex"},this.sketchInnerLayer),this.sketchStage.midVertexGraphics.splice(e.vertexIndex,1,p.sketchStage.entityGraphic);var d=this.sketchStage.entityGraphic.geometry.coordinates[0][e.vertexIndex+2],y=null,g=null;this._getHight&&(g=0),y=g?new o.Point({coordinates:[(d[0]+e.point.coordinates[0])/2,(d[1]+e.point.coordinates[1])/2,g],spatialReference:this._spatialReference}):new o.Point({coordinates:[(d[0]+e.point.coordinates[0])/2,(d[1]+e.point.coordinates[1])/2],spatialReference:this._spatialReference});var v=new s.default({view:this.view,layer:this.layer,sketchStyle:new u.default({vertexStyle:this.sketchStyle._selectMidVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(v),v.addFeature(y,void 0,{type:"midVertex"},this.sketchInnerLayer),this.sketchStage.midVertexGraphics.splice(e.vertexIndex+1,0,v.sketchStage.entityGraphic),this.sketchStage.vertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}}),this.sketchStage.midVertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}}),this._otherDrawTools.forEach(function(e){e.sketchStage.entityGraphic.id===i&&t._removeFeatureFromLayer(e.sketchStage.entityGraphic,t.sketchInnerLayer)}),this._otherDrawTools.push(a),this._otherDrawTools.push(p),this._otherDrawTools.push(v)}}},{key:"addMidVertex",value:function(e,t){var r=new s.default;r.addPoint(t),this.sketchStage.midVertexGraphics=r}},{key:"addVertex",value:function(e,t){var r=null;if(--t>-1){var n=[];if(t<this.sketchStage.entityGraphic.geometry.coordinates[0].length-1){if((n=JSON.parse(JSON.stringify(this.sketchStage.entityGraphic.geometry.coordinates[0]))).splice(t,0,e.coordinates),0===t?n[n.length-1]=e.coordinates:t===n.length-1&&n.splice(0,0,e.coordinates),r=new o.Polygon({coordinates:[n],spatialReference:this._spatialReference}),this._sketchEditor.isSimple)if(!o.GeometryEngine.isSimple(r))return this._fireUnsimpleUpdateByFun(),l.Log.info("该坐标构成的几何不符合拓扑规范!");this.sketchStage.entityGraphic.geometry=r;var i=void 0,a=void 0,c=this.sketchStage.entityGraphic.geometry.extent;if(this.sketchStage.selectBoxGraphics.length>0&&this.sketchStage.selectBoxGraphics.forEach(function(e){e.geometry.coordinates=[[[c.xmax,c.ymax],[c.xmax,c.ymin],[c.xmin,c.ymin],[c.xmin,c.ymax],[c.xmax,c.ymax]]]}),this.sketchStage.selectBoxVertexGraphics.length>0){var f=[[c.xmax,c.ymax],[c.xmax,c.ymin],[c.xmin,c.ymin],[c.xmin,c.ymax],[(c.xmax+c.xmin)/2,c.ymax],[(c.xmax+c.xmin)/2,c.ymin],[c.xmax,(c.ymax+c.ymin)/2],[c.xmin,(c.ymax+c.ymin)/2]];this.sketchStage.selectBoxVertexGraphics.forEach(function(e,t){e.geometry.coordinates=f[t]})}if(this.sketchStage.vertexGraphics.length>0&&(i=new s.default({view:this.view,layer:this.layer,sketchStyle:new u.default({vertexStyle:this.sketchStyle._selectVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this}),this._drawTools.push(i),i.addFeatureByGeometry(e,void 0,void 0,this.sketchInnerLayer),this.sketchStage.vertexGraphics.splice(t,0,i.sketchStage.entityGraphic),this.sketchStage.vertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}})),this.sketchStage.midVertexGraphics.length>0){var h=-1,p=-1,d=null,y=null;0===t?(p=0,h=this.sketchStage.midVertexGraphics.length-1,d=this.sketchStage.entityGraphic.geometry.coordinates[0][this.sketchStage.entityGraphic.geometry.coordinates[0].length-2],y=this.sketchStage.entityGraphic.geometry.coordinates[0][1]):(h=t-1,p=t+1,d=this.sketchStage.entityGraphic.geometry.coordinates[0][h],y=this.sketchStage.entityGraphic.geometry.coordinates[0][p]);var g=new o.Point({coordinates:[(d[0]+e.coordinates[0])/2,(d[1]+e.coordinates[1])/2],spatialReference:this._spatialReference});this.sketchStage.midVertexGraphics[h].geometry.coordinates=g.coordinates;var v=new o.Point({coordinates:[(y[0]+e.coordinates[0])/2,(y[1]+e.coordinates[1])/2],spatialReference:this._spatialReference});a=new s.default({view:this.view,layer:this.layer,sketchStyle:new u.default({vertexStyle:this.sketchStyle._selectMidVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this}),this._drawTools.push(a),a.addFeatureByGeometry(v,void 0,{type:"midVertex"}),this.sketchStage.midVertexGraphics.splice(t,0,a.sketchStage.entityGraphic),this.sketchStage.midVertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}})}i&&this._otherDrawTools.push(i),a&&this._otherDrawTools.push(a),this.undoRedoManager.addProcess("update",this.sketchStage,this._editMode),this._fireAddVertexEventByFun(i.sketchStage.entityGraphic,this._parent)}return r}}},{key:"updateVertex",value:function(e,t){var r=null;if(--t>-1){if(t<this.sketchStage.entityGraphic.geometry.coordinates[0].length-1){var n=this.sketchStage.entityGraphic,i=JSON.parse(JSON.stringify(n.geometry.coordinates[0]));if(this.currentVertexIndex=t,i[t]=e.coordinates,i.length-1===t?i[0]=e.coordinates:0===t&&(i[i.length-1]=e.coordinates),r=new o.Polygon({coordinates:[i],spatialReference:this._spatialReference}),this._sketchEditor.isSimple)if(!o.GeometryEngine.isSimple(r))return this._fireUnsimpleUpdateByFun(),l.Log.info("该坐标构成的几何不符合拓扑规范!");n.geometry.coordinates=[i];var a=n.geometry.extent;if(this.sketchStage.selectBoxGraphics.length>0&&this.sketchStage.selectBoxGraphics.forEach(function(e){e.geometry.coordinates=[[[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax]]]}),this.sketchStage.selectBoxVertexGraphics.length>0){var s=[[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin],[a.xmin,a.ymax],[(a.xmax+a.xmin)/2,a.ymax],[(a.xmax+a.xmin)/2,a.ymin],[a.xmax,(a.ymax+a.ymin)/2],[a.xmin,(a.ymax+a.ymin)/2]];this.sketchStage.selectBoxVertexGraphics.forEach(function(e,t){e.geometry.coordinates=s[t]})}if(this.sketchStage.vertexGraphics.length>0&&(this.sketchStage.vertexGraphics[t].geometry.coordinates=e.coordinates),this.sketchStage.midVertexGraphics.length>0){var u=t,c=0===u?u-1+this.sketchStage.midVertexGraphics.length:u-1,f=u===this.sketchStage.midVertexGraphics.length-1?0:u+1,h=this.sketchStage.midVertexGraphics[u],p=this.sketchStage.midVertexGraphics[c],d=i[c],y=i[u],g=i[f];h.geometry.coordinates=[(g[0]+y[0])/2,(g[1]+y[1])/2],h.geometry=new o.Point({coordinates:h.geometry.coordinates,spatialReference:this._spatialReference}),p.geometry.coordinates=[(d[0]+y[0])/2,(d[1]+y[1])/2],p.geometry=new o.Point({coordinates:p.geometry.coordinates,spatialReference:this._spatialReference})}}this.undoRedoManager.addProcess("update",this.sketchStage,this._editMode),this._fireUpdateVertexByFun(this.sketchStage.entityGraphic,this._parent)}return r}},{key:"removeVertex",value:function(e){var t=null;if(--e>-1){var r=this.sketchStage.entityGraphic.geometry.coordinates[0].length-1;if(r>3&&e<r){var n=JSON.parse(JSON.stringify(this.sketchStage.entityGraphic.geometry.coordinates[0]));if(n.splice(e,1),0===e&&n.splice(n.length-1,1,n[0]),t=new o.Polygon({coordinates:[n],spatialReference:this._spatialReference}),this._sketchEditor.isSimple)if(!o.GeometryEngine.isSimple(t))return this._fireUnsimpleUpdateByFun(),l.Log.info("该坐标构成的几何不符合拓扑规范!");this.sketchStage.entityGraphic.geometry=t;var i=this.sketchStage.entityGraphic.geometry.extent;if(this.sketchStage.selectBoxGraphics.length>0&&this.sketchStage.selectBoxGraphics.forEach(function(e){e.geometry.coordinates=[[[i.xmax,i.ymax],[i.xmax,i.ymin],[i.xmin,i.ymin],[i.xmin,i.ymax],[i.xmax,i.ymax]]]}),this.sketchStage.selectBoxVertexGraphics.length>0){var a=[[i.xmax,i.ymax],[i.xmax,i.ymin],[i.xmin,i.ymin],[i.xmin,i.ymax],[(i.xmax+i.xmin)/2,i.ymax],[(i.xmax+i.xmin)/2,i.ymin],[i.xmax,(i.ymax+i.ymin)/2],[i.xmin,(i.ymax+i.ymin)/2]];this.sketchStage.selectBoxVertexGraphics.forEach(function(e,t){e.geometry.coordinates=a[t]})}if(this.sketchStage.vertexGraphics.length>0){var s=this.sketchStage.vertexGraphics[e].id.toString();this._removeFeatureFromLayer(this.sketchStage.vertexGraphics[e],this.sketchInnerLayer),this.sketchStage.vertexGraphics.splice(e,1),this.sketchStage.vertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}}),this._otherDrawTools=this._otherDrawTools.filter(function(e){if(e.sketchStage.entityGraphic.id!==s)return e})}if(this.sketchStage.midVertexGraphics.length>0){var u=[],c=-1;0===e?(u=[(t.coordinates[0][t.coordinates[0].length-2][0]+t.coordinates[0][e][0])/2,(t.coordinates[0][t.coordinates[0].length-2][1]+t.coordinates[0][e][1])/2],c=this.sketchStage.midVertexGraphics.length-1):(u=[(t.coordinates[0][e-1][0]+t.coordinates[0][e][0])/2,(t.coordinates[0][e-1][1]+t.coordinates[0][e][1])/2],c=e-1),this.sketchStage.midVertexGraphics[c].geometry=new o.Point({coordinates:u,spatialReference:this._spatialReference});var f=this.sketchStage.vertexGraphics[e].id.toString();this._removeFeatureFromLayer(this.sketchStage.midVertexGraphics[e],this.sketchInnerLayer),this.sketchStage.midVertexGraphics.splice(e,1),this.sketchStage.midVertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}}),this._otherDrawTools=this._otherDrawTools.filter(function(e){if(e.sketchStage.entityGraphic.id!==f)return e})}}this.undoRedoManager.addProcess("update",this.sketchStage,this._editMode),this._fireRemoveVertexByFun(this.sketchStage.entityGraphic,this._parent)}return t}}]),t}();t.default=f,i.Zondy.SketchPolygonDrawTool=f},function(e,t,r){"use strict";r.r(t),t.default=function(e,t,r){var n=e*t;return r/Math.sqrt(1-n*n)}},function(e,t,r){"use strict";r.r(t),t.default=function(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(3),o=r(1);var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"info",value:function(){if([i.LogType.info,i.LogType.all,i.LogType.infoAndError].indexOf(o.Zondy.LogType)>-1){var e=Array.prototype.slice.call(arguments);e.unshift("%c info ","color:rgb(255,128,0);background-color: wheat;border: 1px solid rgb(255,128,0);border-radius: 3px;"),console.log.apply(console,e)}}},{key:"error",value:function(){if([i.LogType.error,i.LogType.all,i.LogType.infoAndError,i.LogType.warningAndError].indexOf(o.Zondy.LogType)>-1){var e=Array.prototype.slice.call(arguments),t=e.toString();throw e.unshift("%c error ","color:rgb(255,0,0);background-color: rgb(250,181,181);border: 1px solid rgb(255,0,0);border-radius: 3px;"),console.log.apply(console,e),new Error(t)}}},{key:"warning",value:function(){if([i.LogType.warning,i.LogType.warningAndError,i.LogType.all].indexOf(o.Zondy.LogType)>-1){var e=Array.prototype.slice.call(arguments);e.toString();e.unshift("%c warning ","color:rgb(230 162 60);background-color: rgb(253 246 236);border: 1px solid rgb(230 162 60);border-radius: 3px;"),console.log.apply(console,e)}}}]),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(18)),i=_(r(2)),o=r(0),a=r(3),s=_(r(13)),u=_(r(49)),l=_(r(129)),c=_(r(130)),f=_(r(47)),h=_(r(32)),p=_(r(66)),d=_(r(131)),y=_(r(20)),g=_(r(132)),v=_(r(33)),m=_(r(133));function _(e){return e&&e.__esModule?e:{default:e}}var b=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};b.difference=function(e,t){(0,o.isNull)(e)&&o.Log.error("inputGeometry不能为空!"),(0,o.isNull)(t)&&o.Log.error("subtractGeometry不能为空!"),e instanceof u.default||e instanceof c.default||e instanceof v.default||e instanceof g.default||o.Log.error("inputGeometry类型错误!"),t instanceof u.default||t instanceof c.default||t instanceof v.default||t instanceof g.default||o.Log.error("subtractGeometry类型错误!");var r=void 0;switch(e.type){case p.default.polygon:r=b._polygonDifferenceGeometry(n.polygon(e.coordinates),t);break;case p.default.extent:var i=new u.default({coordinates:[[[e.xmin,e.ymin],[e.xmax,e.ymin],[e.xmax,e.ymax],[e.xmin,e.ymax],[e.xmin,e.ymin]]]});r=b._polygonDifferenceGeometry(n.polygon(i.coordinates),t);break;case p.default.circle:r=b._polygonDifferenceGeometry(n.polygon(e.toPolygon().coordinates),t);break;case p.default.multiPolygon:r=b._polygonDifferenceGeometry(n.multiPolygon(e.coordinates),t)}return(0,o.isNull)(r)||(r="Polygon"===r.geometry.type?new u.default({coordinates:r.geometry.coordinates,spatialReference:h.default.fromJSON(e.spatialReference)}):new c.default({coordinates:r.geometry.coordinates,spatialReference:h.default.fromJSON(e.spatialReference)})),r},b._polygonDifferenceGeometry=function(e,t){var r=e,i=void 0;switch(t.type){case p.default.polygon:i=n.polygon(t.coordinates);break;case p.default.multiPolygon:i=n.multiPolygon(t.coordinates);break;case p.default.circle:i=n.polygon(t.toPolygon().coordinates);break;case p.default.extent:var o=new u.default({coordinates:[[[t.xmin,t.ymin],[t.xmax,t.ymin],[t.xmax,t.ymax],[t.xmin,t.ymax],[t.xmin,t.ymin]]]});i=n.polygon(o.coordinates)}return n.difference(r,i)},b.buffer=function(e,t,r,n){r=(0,o.defaultValue)(r,a.LengthUnit.meter),n=(0,o.defaultValue)(n,!1),t=(0,o.defaultValue)(t,1e3),b._checkBufferOptions(e,t,r,n);var i=void 0;if(e instanceof Array)if(t instanceof Array){if(t.length<e.length){i=[];for(var l=t.length>0?t[t.length-1]:1e3,c=t.length;c<e.length;c++)i.push(l)}}else{i=[];for(var d=0;d<e.length;d++)i.push(t)}else i=t instanceof Array?t.length>0?t[0]:1e3:t;var y=e;if(e instanceof Array){y=[];for(var g=0;g<e.length;g++)y.push(f.default.projectGeometry(e[g],new h.default({wkid:4326})))}else 4326!==e.spatialReference.wkid&&(y=f.default.projectGeometry(e,new h.default({wkid:4326})));var v=void 0;if(e instanceof Array){if(e instanceof Array){if(v=[],t instanceof Array&&t.length<e.length)for(var m=t[t.length-1],_=t.length-1;_<e.length;_++)t.push(m);for(var S=0;S<y.length;S++){var x=0;x=t instanceof Array?t[S]:t,v.push(b._polygonBuffer(y[S],x,r))}n&&(v=b.union(v))}}else switch(e.type){case p.default.point:case p.default.multiPoint:case p.default.lineString:case p.default.multiLineString:case p.default.polygon:case p.default.multiPolygon:v=b._polygonBuffer(y,i,r);break;case p.default.extent:var w=new u.default({coordinates:[[[y.xmin,y.ymin],[y.xmax,y.ymin],[y.xmax,y.ymax],[y.xmin,y.ymax],[y.xmin,y.ymin]]]});v=b._polygonBuffer(w,i,r);break;case p.default.circle:(v=s.default.fromJSON(e)).radius+=i;break;default:o.Log.error("geometry是不支持的几何类型!")}if(e instanceof Array){if(!e[0].spatialReference.isGeographic)if(v instanceof Array)for(var O=0;O<v.length;O++)v[O].type!==p.default.circle&&(v[O]=f.default.projectGeometry(v[O],h.default.fromJSON(e[0].spatialReference)));else v.type!==p.default.circle&&(v=f.default.projectGeometry(v,h.default.fromJSON(e[0].spatialReference)))}else e.spatialReference.isGeographic||e.type===p.default.circle||(v=f.default.projectGeometry(v,h.default.fromJSON(e.spatialReference)));return v},b._checkBufferOptions=function(e,t,r,n){if((0,o.isNull)(e)&&o.Log.error("geometry不能为空!"),(0,o.isNull)(t)&&o.Log.error("distance不能为空!"),(0,o.isNull)(e)&&o.Log.error("unit不能为空!"),(0,o.isNull)(e)&&o.Log.error("unionResults不能为空!"),e instanceof Array){for(var i=0;i<e.length;i++)if(!(e[i]instanceof u.default||e[i]instanceof c.default)){o.Log.error("geometry的子元素类型不为Polygon或者MultiPolygon!");break}0===e.length&&o.Log.error("geometry的长度为0!")}else e instanceof s.default||o.Log.error("geometry不是基础几何类型!");if(t instanceof Array){e instanceof Array||o.Log.error("distance的类型为数组,但是geometry的类型不是数组!");for(var l=0;l<t.length;l++)if("number"!=typeof t[l]){o.Log.error("distance的子元素不是数字类型!");break}}else"number"!=typeof t&&o.Log.error("distance的不是数字类型!");if("string"==typeof r)if(r){var f=!1;Object.keys(a.LengthUnit).forEach(function(e){f||a.LengthUnit[e]!==r||(f=!0)}),f||o.Log.error("unit是不支持的单位类型!")}else o.Log.error("unit的值不能为空!");else o.Log.error("unit类型不是字符串!");"boolean"!=typeof n&&o.Log.error("unionResults类型不是布尔值类型!")},b._polygonBuffer=function(e,t,r){var i=void 0;switch(e.type){case p.default.point:i=n.point(e.coordinates);break;case p.default.multiPoint:i=n.multiPoint(e.coordinates);break;case p.default.lineString:i=n.lineString(e.coordinates);break;case p.default.multiLineString:i=n.multiLineString(e.coordinates);break;case p.default.polygon:i=n.polygon(e.coordinates);break;case p.default.multiPolygon:i=n.multiPolygon(e.coordinates)}var o=n.buffer(i,t,{units:r});return s.default.fromJSON({type:o.geometry.type,coordinates:o.geometry.coordinates})},b._multiPolygonBuffer=function(e,t,r){var i=n.multiPolygon(e.coordinates),o=n.buffer(i,t,{units:r});return"Polygon"===o.geometry.type?new u.default({coordinates:o.geometry.coordinates}):new c.default({coordinates:o.geometry.coordinates})},b._buffer=function(e,t,r){if(e.hasOwnProperty("coordinates")||o.Log.error("geometry缺少coordinates属性!"),e instanceof u.default){var i=n.polygon(e.coordinates);return n.buffer(i,t,{units:r})}},b.union=function(e){if((e=(0,o.defaultValue)(e,[]))instanceof Array||o.Log.error("geometries必须为数组类型!"),0===e.length)return[];var t=!0,r=!0,i=e[0].type;if(e.length>1){switch(e[0].type){case p.default.polygon:case p.default.multiPolygon:for(var a=1;a<e.length;a++)if(e[a].type!==p.default.polygon&&e[a].type!==p.default.multiPolygon){t=!1;break}break;case p.default.point:case p.default.multiPoint:for(var s=1;s<e.length;s++)if(e[s].type!==p.default.point&&e[s].type!==p.default.multiPoint){t=!1;break}break;case p.default.circle:for(var f=1;f<e.length;f++)if(e[f].type!==p.default.circle){t=!1;break}break;case p.default.extent:for(var g=1;g<e.length;g++)if(e[g].type!==p.default.extent){t=!1;break}break;case p.default.lineString:case p.default.multiLineString:for(var v=1;v<e.length;v++)if(e[v].type!==p.default.lineString&&e[v].type!==p.default.multiLineString){t=!1;break}break;default:o.Log.error("geometries的子元素中有求并方法不支持的数据类型!")}t||o.Log.error("几何数组的类型不同!");for(var _=e[0].spatialReference,S=1;S<e.length;S++)_.equals(e[S].spatialReference)||(r=!1);r||o.Log.error("几何数组的坐标系不同!");var x=void 0,w=[];switch(i){case p.default.point:case p.default.multiPoint:for(var O=[],P=0;P<e.length;P++)e[P]instanceof y.default?O.push(e[P].coordinates):e[P]instanceof d.default&&(O=O.concat(e[P].coordinates));if(1===O.length)x=new y.default({coordinates:O[0],spatialReference:h.default.fromJSON(e[0].spatialReference)});else{var E=n.multiPoint(O);E=n.cleanCoords(E),x=new d.default({coordinates:E.geometry.coordinates,spatialReference:h.default.fromJSON(e[0].spatialReference)})}break;case p.default.polygon:case p.default.multiPolygon:var k=void 0,T=e[0].type===p.default.polygon?n.polygon(e[0].coordinates):n.multiPolygon(e[0].coordinates),M=e[1].type===p.default.polygon?n.polygon(e[1].coordinates):n.multiPolygon(e[1].coordinates);k=n.union(T,M);for(var I=2;I<e.length;I++){var L=e[I].type===p.default.polygon?n.polygon(e[I].coordinates):n.multiPolygon(e[I].coordinates);k=n.union(k.geometry,L)}x=k.geometry.type===p.default.polygon?new u.default({coordinates:k.geometry.coordinates,spatialReference:h.default.fromJSON(e[0].spatialReference)}):new c.default({coordinates:k.geometry.coordinates,spatialReference:h.default.fromJSON(e[0].spatialReference)});break;case p.default.lineString:case p.default.multiLineString:for(var C=[],N=0;N<e.length;N++)e[N]instanceof l.default?C.push(e[N].coordinates):C=C.concat(e[N].coordinates);x=1===C.length?new l.default({coordinates:C[0],spatialReference:h.default.fromJSON(e[0].spatialReference)}):new m.default({coordinates:C,spatialReference:h.default.fromJSON(e[0].spatialReference)});break;case p.default.extent:w=[];for(var R=0;R<e.length;R++){var j=new u.default({coordinates:[[[e[R].xmin,e[R].ymin],[e[R].xmax,e[R].ymin],[e[R].xmax,e[R].ymax],[e[R].xmin,e[R].ymax],[e[R].xmin,e[R].ymin]]],spatialReference:h.default.fromJSON(e[0].spatialReference)});w.push(j)}x=b.union(w);break;case p.default.circle:w=[];for(var G=0;G<e.length;G++)w.push(e[G].toPolygon());x=b.union(w)}return x}return 1===e.length?e[0]:void 0},b.intersects=function(e,t){b._checkTwoGeometry(e,t);var r=b._geometryToTurf(e),i=b._geometryToTurf(t);return!n.booleanDisjoint(r,i)},b.geodesicLength=function(e,t){(0,o.isNull)(e)&&o.Log.error("geometry对象不能为空!"),e instanceof l.default||o.Log.error("geometry类型不正确!"),"string"!=typeof(t=(0,o.defaultValue)(t,a.LengthUnit.meter))&&o.Log.error("unit类型不正确!");var r=0;switch(e.type){case p.default.lineString:var i=n.lineString(e.coordinates);r=1e3*n.length(i,{units:"kilometers"})}if(!e.spatialReference.isGeographic)switch(t){case a.LengthUnit.kilometer:r/=1e3;break;case a.LengthUnit.mile:r*=.000621371192237}return r},b.geodesicArea=function(e,t){(0,o.isNull)(e)&&o.Log.error("geometry对象不能为空!"),e instanceof u.default||e instanceof c.default||e instanceof g.default||e instanceof v.default||o.Log.error("polygon对象不是Polyon或MultiPolygon或Circle或Extent类型!"),t=(0,o.defaultValue)(t,a.LinearUnits.meters);var r=0;switch(e instanceof u.default||e instanceof c.default?r=b._geodesicPolygonArea(e):(e instanceof g.default||e instanceof v.default)&&(r=b._geodesicPolygonArea(e.toPolygon())),t){case a.AreaUnits.squareKilometers:r*=1e-6;break;case a.AreaUnits.squareMiles:r*=6214e-7*6214e-7;break;case a.AreaUnits.squareYards:r*=1.1959900499368898;break;case a.AreaUnits.squareFeet:r*=10.763910416689228;break;case a.AreaUnits.acres:r*=2471e-7;break;case a.AreaUnits.ares:r*=.01;break;case a.AreaUnits.hectares:r*=1e-4;break;case a.AreaUnits.squareMeters:}return r},b._geodesicPolygonArea=function(e){return n.area(n.polygon(e.coordinates))},b._geometryToTurf=function(e){var t=void 0;switch(e.type!==p.default.extent&&e.type!==p.default.circle&&(t=JSON.parse(JSON.stringify(e.coordinates))),e.type){case p.default.point:return n.point(t);case p.default.multiPoint:return n.multiPoint(t);case p.default.lineString:return n.lineString(t);case p.default.multiLineString:return n.multiLineString(t);case p.default.polygon:return n.polygon(t);case p.default.multiPolygon:return n.multiPolygon(t);case p.default.extent:return n.polygon([[[e.xmin,e.ymin],[e.xmax,e.ymin],[e.xmax,e.ymax],[e.xmin,e.ymax],[e.xmin,e.ymin]]]);case p.default.circle:return n.polygon(e.toPolygon().coordinates);default:o.Log.error("geometry为不支持的几何类型!")}},b._lineContainPoint=function(e,t){var r=n.point(t.coordinates),i=n.lineString(e.coordinates),o=n.booleanContains(i,r);if(!o)for(var a=0;a<e.coordinates.length;a++){var s=new y.default({coordinates:e.coordinates[a],spatialReference:h.default.fromJSON(e.spatialReference)});if(b.equals(t,s)){o=!0;break}}return o},b._multiLineContainPoint=function(e,t){for(var r=!1,n=0;n<e.coordinates.length;n++){var i=new l.default({coordinates:e.coordinates[n],spatialReference:h.default.fromJSON(e.spatialReference)});if(b._lineContainPoint(i,t)){r=!0;break}}return r},b._polygonContainPoint=function(e,t){var r=n.point(t.coordinates),i=n.polygon(e.coordinates);return n.booleanContains(i,r)},b._polygonContainLine=function(e,t){var r=n.polygon(e.coordinates),i=n.lineString(t.coordinates);return n.booleanContains(r,i)},b._multiPointContainsPoint=function(e,t){var r=n.point(t.coordinates),i=n.multiPoint(e.coordinates);return n.booleanContains(i,r)},b._lineContainMultiPoint=function(e,t){for(var r=!0,n=0;n<t.coordinates.length;n++){var i=new y.default({coordinates:t.coordinates[n]});if(!(r=b._lineContainPoint(e,i)))break}return r},b._polygonContainMultiPoint=function(e,t){for(var r=!0,n=0;n<t.coordinates.length;n++){var i=new y.default({coordinates:t.coordinates[n]});if(!(r=b._polygonContainPoint(e,i)))break}return r},b._checkTwoGeometry=function(e,t){(0,o.isNull)(e)&&o.Log.error("geometry1对象为空!"),(0,o.isNull)(t)&&o.Log.error("geometry2对象为空!"),e instanceof s.default||o.Log.error("geometry1对象未继承于Geometry对象!"),t instanceof s.default||o.Log.error("geometry2对象未继承于Geometry对象!"),e.spatialReference.equals(t.spatialReference)||o.Log.error("geometry1和geometry2的坐标系不相同!")},b.intersect=function(e,t){(0,o.isNull)(e)&&o.Log.error("geometry1不能为空!"),(0,o.isNull)(t)&&o.Log.error("geometry2不能为空!"),e instanceof s.default||e instanceof Array||o.Log.error("geometry1必须为几何对象或者数组对象!"),t instanceof s.default||o.Log.error("geometry2必须为几何对象或者数组对象!");var r=void 0;if(e instanceof Array){r=[];for(var n=0;n<e.length;n++)r.push(b.intersect(e[n],t));return r}switch(e.type){case p.default.point:r=b._pointIntersectGeometry(e,t);break;case p.default.multiPoint:r=b._multiPointIntersectGeometry(e,t);break;case p.default.lineString:switch(t.type){case p.default.point:b.contains(e,t)&&(r=new y.default({coordinates:t.coordinates}));break;case p.default.multiPoint:r=b._lineIntersectMultiPoint(e,t);break;case p.default.polygon:r=b._lineIntersectPolygon(e,t);break;case p.default.multiPolygon:r=b._lineIntersectMultiPolygon(e,t);break;case p.default.lineString:case p.default.multiLineString:r=b._lineIntersectLine(e,t);break;case p.default.extent:r=b._lineIntersectExtent(e,t);break;case p.default.circle:r=b._lineIntersectPolygon(e,t.toPolygon())}break;case p.default.polygon:switch(t.type){case p.default.point:r=b._pointIntersectGeometry(t,e);break;case p.default.multiPoint:r=b._multiPointIntersectGeometry(t,e);break;case p.default.lineString:r=b._lineIntersectPolygon(t,e);break;case p.default.multiLineString:r=b._multiLineIntersectPolygon(t,e);break;case p.default.polygon:r=b._polygonIntersectPolygon(e,t);break;case p.default.multiPolygon:r=b._polygonIntersectMultiPolygon(e,t);break;case p.default.circle:r=b._polygonIntersectPolygon(e,t.toPolygon());break;case p.default.extent:r=b._polygonIntersectExtent(e,t)}break;case p.default.multiPolygon:switch(t.type){case p.default.point:r=b._pointIntersectGeometry(t,e);break;case p.default.multiPoint:r=b._multiPointIntersectGeometry(t,e);break;case p.default.lineString:r=b._lineIntersectMultiPolygon(t,e);break;case p.default.multiLineString:r=b._multiLineIntersectMultiPolygon(t,e);break;case p.default.polygon:r=b._polygonIntersectMultiPolygon(t,e);break;case p.default.multiPolygon:r=b._multiPolygonIntersectMultiPolygon(e,t);break;case p.default.extent:r=b._multiPolygonIntersectExtent(e,t);break;case p.default.circle:r=b._polygonIntersectMultiPolygon(t.toPolygon(),e)}break;case p.default.extent:switch(t.type){case p.default.point:r=b._pointIntersectGeometry(t,e);break;case p.default.multiPoint:r=b._multiPointIntersectGeometry(t,e);break;case p.default.lineString:r=b._lineIntersectExtent(t,e);break;case p.default.multiLineString:r=b._multiLineIntersectExtent(t,e);break;case p.default.polygon:r=b._polygonIntersectExtent(t,e);break;case p.default.multiPolygon:r=b._multiPolygonIntersectExtent(t,e);break;case p.default.extent:var i=new u.default({coordinates:[[[t.xmin,t.ymin],[t.xmax,t.ymin],[t.xmax,t.ymax],[t.xmin,t.ymax],[t.xmin,t.ymin]]]});r=b._polygonIntersectExtent(i,e);break;case p.default.circle:var a=new u.default({coordinates:[[[e.xmin,e.ymin],[e.xmax,e.ymin],[e.xmax,e.ymax],[e.xmin,e.ymax],[e.xmin,e.ymin]]]});r=b._polygonIntersectPolygon(a,t.toPolygon())}break;case p.default.circle:var c=e.toPolygon();switch(t.type){case p.default.point:r=b._pointIntersectGeometry(t,c);break;case p.default.multiPoint:r=b._multiPointIntersectGeometry(t,c);break;case p.default.lineString:r=b._lineIntersectPolygon(t,c);break;case p.default.multiLineString:r=b._multiLineIntersectPolygon(t,c);break;case p.default.polygon:r=b._polygonIntersectPolygon(t,c);break;case p.default.multiPolygon:r=b._polygonIntersectMultiPolygon(c,t);break;case p.default.circle:r=b._polygonIntersectPolygon(t.toPolygon(),c);break;case p.default.extent:r=b._polygonIntersectExtent(c,t)}break;case p.default.multiLineString:switch(t.type){case p.default.point:r=b._pointIntersectGeometry(t,e);break;case p.default.multiPoint:r=b._multiPointIntersectGeometry(t,e);break;case p.default.lineString:r=b._lineIntersectLine(t,e);break;case p.default.multiLineString:for(var f=[],h=[],d=0;d<e.coordinates.length;d++){var g=new l.default({coordinates:e.coordinates[d]}),v=b._lineIntersectLine(g,t);v&&v.point&&f.push(v.point),v&&v.lineString&&h.push(v.lineString)}(r={point:void 0,lineString:void 0}).point=b.union(f),r.lineString=b.union(h);break;case p.default.polygon:r=b._multiLineIntersectPolygon(e,t);break;case p.default.multiPolygon:r=b._multiLineIntersectMultiPolygon(e,t)}}return r},b._lineIntersectLine=function(e,t){var r=void 0,i=void 0;r=e.type===p.default.lineString?n.lineString(e.coordinates):n.multiLineString(e.coordinates),i=t.type===p.default.lineString?n.lineString(t.coordinates):n.multiLineString(t.coordinates);var o=void 0,a=void 0;if(e.type===p.default.lineString)o=[e];else{o=[];for(var s=0;s<e.coordinates.length;s++)o.push(new l.default({coordinates:e.coordinates[s]}))}if(t.type===p.default.lineString)a=[t];else{a=[];for(var u=0;u<t.coordinates.length;u++)a.push(new l.default({coordinates:t.coordinates[u]}))}for(var c=[],f=0;f<o.length;f++)for(var h=0;h<a.length;h++){var g=n.lineString(o[f].coordinates),v=n.lineString(a[h].coordinates),m=n.lineOverlap(g,v);if(m.features.length>0)for(var _=0;_<m.features.length;_++)c.push(new l.default({coordinates:m.features[_].geometry.coordinates}))}var S=n.lineIntersect(r,i),x={point:void 0,lineString:void 0};1===c.length?x.lineString=new l.default({coordinates:c[0].coordinates}):c.length>1&&(x.lineString=b.union(c));for(var w=0;w<S.features.length;w++){var O=new y.default({coordinates:S.features[w].geometry.coordinates});x.lineString&&b.contains(x.lineString,O)&&S.features.splice(w,1)}if(1===S.features.length)x.point=new y.default({coordinates:S.features[0].geometry.coordinates});else if(S.features.length>1){for(var P=[],E=0;E<S.features.length;E++)P.push(S.features[E].geometry.coordinates);x.point=new d.default({coordinates:P})}return x},b._lineIntersectMultiPoint=function(e,t){for(var r=[],n=void 0,i=0;i<t.coordinates.length;i++){var o=new y.default({coordinates:t.coordinates[i]});b.contains(e,o)&&r.push(o.coordinates)}return 1===r.length?n=new y.default({coordinates:r[0]}):r.length>1&&(n=new d.default({coordinates:r})),n},b._lineIntersectPolygon=function(e,t){var r=n.lineString(e.coordinates),i=n.polygon(t.coordinates),o=n.lineIntersect(r,i);o.features=o.features.sort(function(e,t){return e.geometry.coordinates[0]-t.geometry.coordinates[0]});for(var a=[],s=0;s<e.coordinates.length-1;s++){var u=new l.default({coordinates:[e.coordinates[s],e.coordinates[s+1]]});u.coordinates=u.coordinates.sort(function(e,t){return e-t});for(var c=[],f=0;f<o.features.length;f++){var h=new y.default({coordinates:o.features[f].geometry.coordinates});b.contains(u,h)&&c.push(h)}var g=new y.default({coordinates:e.coordinates[s]});c[0]&&b.equals(g,c[0])||(c=[g].concat(c));var v=new y.default({coordinates:e.coordinates[s+1]});0!==c.length&&b.equals(v,c[c.length-1])||c.push(v);for(var _=0;_<c.length-1;_++){var S=new l.default({coordinates:[c[_].coordinates,c[_+1].coordinates]});b.contains(t,S)&&a.push(S)}}if(1===a.length)return a[0];if(a.length>1){for(var x=[],w=0;w<a.length;w++)x.push(a[w].coordinates);return new m.default({coordinates:x})}for(var O=[],P=0;P<o.features.length;P++)o.features[P].geometry.type===p.default.point&&O.push(o.features[P].geometry.coordinates);return 1===O.length?new y.default({coordinates:O[0]}):O.length>1?new d.default({coordinates:O}):void 0},b._multiLineIntersectPolygon=function(e,t){for(var r=[],n=0;n<e.coordinates.length;n++){var i=new l.default({coordinates:e.coordinates[n]}),o=b._lineIntersectPolygon(i,t);o&&r.push(o)}if(1===r.length)return new l.default({coordinates:r[0].coordinates});if(r.length>1){for(var a=[],s=0;s<r.length;s++)r[s].type===p.default.lineString?a.push(r[s].coordinates):a=a.concat(r[s].coordinates);return new m.default({coordinates:a})}},b._multiLineIntersectMultiPolygon=function(e,t){for(var r=[],n=0;n<t.coordinates.length;n++){var i=new u.default({coordinates:t.coordinates[n]}),o=b._multiLineIntersectPolygon(e,i);o&&r.push(o)}return b.union(r)},b._lineIntersectExtent=function(e,t){var r=new u.default({coordinates:[[[t.xmin,t.ymin],[t.xmax,t.ymin],[t.xmax,t.ymax],[t.xmin,t.ymax],[t.xmin,t.ymin]]]});return b._lineIntersectPolygon(e,r)},b._multiLineIntersectExtent=function(e,t){for(var r=[],n=0;n<e.coordinates.length;n++){var i=new l.default({coordinates:e.coordinates[n]}),o=b._lineIntersectExtent(i,t);o&&r.push(o)}if(1===r.length)return r[0];if(r.length>1){for(var a=[],s=0;s<r.length;s++)a.push(r[s].coordinates);return new m.default({coordinates:a})}},b._lineIntersectMultiPolygon=function(e,t){for(var r=void 0,n=[],i=0;i<t.coordinates.length;i++){var o=new u.default({coordinates:t.coordinates[i]});n.push(b._lineIntersectPolygon(e,o))}for(var a=[],s=0;s<n.length;s++)n[s].type===p.default.lineString?a.push(n[s].coordinates):a=a.concat(n[s].coordinates);return 1===a.length?r=new l.default({coordinates:a}):a.length>1&&(r=new m.default({coordinates:a})),r},b._pointIntersectGeometry=function(e,t){if(b.contains(t,e))return new y.default({coordinates:e.coordinates})},b._multiPointIntersectGeometry=function(e,t){for(var r=[],n=0;n<e.coordinates.length;n++){var i=new y.default({coordinates:e.coordinates[n]});b.contains(t,i)&&r.push(i.coordinates)}var o=void 0;return 1===r.length?o=new y.default({coordinates:r[0]}):r.length>1&&(o=new d.default({coordinates:r})),o},b._polygonIntersectPolygon=function(e,t){var r=n.polygon(e.coordinates),i=n.polygon(t.coordinates),o=n.intersect(r,i);if(o)return o.geometry.type===p.default.polygon?new u.default({coordinates:o.geometry.coordinates}):new c.default({coordinates:o.geometry.coordinates})},b._polygonIntersectMultiPolygon=function(e,t){for(var r=[],n=0;n<t.coordinates.length;n++){var i=new u.default({coordinates:t.coordinates[n]}),o=b._polygonIntersectPolygon(e,i);o&&r.push(o)}return b.union(r)},b._multiPolygonIntersectMultiPolygon=function(e,t){for(var r=[],n=0;n<e.coordinates.length;n++){var i=new u.default({coordinates:e.coordinates[n]}),o=b._polygonIntersectMultiPolygon(i,t);o&&r.push(o)}return b.union(r)},b._polygonIntersectExtent=function(e,t){var r=new u.default({coordinates:[[[t.xmin,t.ymin],[t.xmax,t.ymin],[t.xmax,t.ymax],[t.xmin,t.ymax],[t.xmin,t.ymin]]]});return b._polygonIntersectPolygon(e,r)},b._multiPolygonIntersectExtent=function(e,t){for(var r=[],n=0;n<e.coordinates.length;n++){var i=new u.default({coordinates:e.coordinates[n]}),o=b._polygonIntersectExtent(i,t);o&&r.push(o)}return b.union(r)},b.overlaps=function(e,t){return!!b.intersects(e,t)&&(!b.contains(e,t)&&!b.contains(t,e))},b.rotate=function(e,t,r){t=(0,o.defaultValue)(t,0),(0,o.isNull)(e)&&o.Log.error("geometry不能为空!"),(0,o.isNull)(t)&&o.Log.error("angle不能为空!"),e instanceof s.default||o.Log.error("geometry不是基础几何对象!"),"number"!=typeof t&&o.Log.error("angle不是数字!"),!r||r instanceof y.default||o.Log.error("rotationOrigin不是Point对象!"),r&&!e.spatialReference.equals(r.spatialReference)&&o.Log.error("rotationOrigin和geometry不是同一个坐标系!");var i=void 0,a=void 0;e.spatialReference.isGeographic?(i=e,a=r):(i=f.default.projectGeometry(e,new h.default({wkid:4326})),a=f.default.projectGeometry(r,new h.default({wkid:4326})));var u=b._geometryToTurf(i),l=void 0;a&&(l=[a.coordinates[0],a.coordinates[1]]);var c={pivot:l,mutate:!0},p=n.transformRotate(u,t,c);return p=b._turfFeatureToGeometry(p),e.spatialReference.isGeographic||(p=f.default.projectGeometry(p,h.default.fromJSON(e.spatialReference))),p},b._turfFeatureToGeometry=function(e){switch(e.geometry.type){case p.default.point:return new y.default({coordinates:e.geometry.coordinates});case p.default.multiPoint:return new d.default({coordinates:e.geometry.coordinates});case p.default.lineString:return new l.default({coordinates:e.geometry.coordinates});case p.default.multiLineString:return new m.default({coordinates:e.geometry.coordinates});case p.default.polygon:return new u.default({coordinates:e.geometry.coordinates});case p.default.multiPolygon:return new c.default({coordinates:e.geometry.coordinates})}},b.nearestCoordinate=function(e,t){(0,o.isNull)(e)&&o.Log.error("geometry不能为空!"),(0,o.isNull)(t)&&o.Log.error("inputPoint不能为空!");var r=e,i=t;if(i instanceof y.default||o.Log.error("inputPoint类型错误,需要输入Point!"),r instanceof y.default||r instanceof l.default||r instanceof u.default||r instanceof d.default||r instanceof m.default||r instanceof c.default||r instanceof v.default||r instanceof g.default||o.Log.error("geometry类型错误!"),r.spatialReference.equals(i.spatialReference)||o.Log.error("_geometryPro1、inputPoint坐标系不同!"),r=(0,o.defaultValue)(r,void 0),i=(0,o.defaultValue)(i,void 0),r.spatialReference.isGeographic||(r=f.default.projectGeometry(r,new h.default({wkid:4326})),i=f.default.projectGeometry(i,new h.default({wkid:4326}))),!(0,o.isNull)(r)&&!(0,o.isNull)(i)){var a=void 0,_=void 0,b=void 0,S=[],x=n.point(i.coordinates);switch(r.type){case p.default.multiPoint:for(var w=0;w<r.coordinates.length;w++)S.push(n.point(r.coordinates[w]));var O=n.featureCollection(S);a=n.nearestPoint(x,O);break;case p.default.lineString:_=n.lineString(r.coordinates),a=n.nearestPointOnLine(_,x,{units:"kilometers"});break;case p.default.multiLineString:_=n.multiLineString(r.coordinates),a=n.nearestPointOnLine(_,x,{units:"kilometers"});break;case p.default.polygon:for(var P=0;P<r.coordinates[0].length;P++)S.push(r.coordinates[0][P]);_=n.lineString(S),a=n.nearestPointOnLine(_,x,{units:"kilometers"});break;case p.default.multiPolygon:for(var E=[],k=0;k<r.coordinates.length;k++){S=[];for(var T=0;T<r.coordinates[k][0].length;T++)S.push(r.coordinates[k][0][T]);E.push(S),_=n.multiLineString(E)}a=n.nearestPointOnLine(_,x,{units:"kilometers"});break;case p.default.circle:b=n.polygon(r.toPolygon().coordinates);for(var M=0;M<b.geometry.coordinates[0].length;M++)S.push(b.geometry.coordinates[0][M]);_=n.lineString(S),a=n.nearestPointOnLine(_,x,{units:"kilometers"});break;case p.default.extent:b=new u.default({coordinates:[[[r.xmin,r.ymin],[r.xmax,r.ymin],[r.xmax,r.ymax],[r.xmin,r.ymax],[r.xmin,r.ymin]]]});for(var I=0;I<b.coordinates[0].length;I++)S.push(b.coordinates[0][I]);_=n.lineString(S),a=n.nearestPointOnLine(_,x,{units:"kilometers"})}return a=s.default.fromJSON(a.geometry),t.spatialReference.isGeographic||(a=f.default.projectGeometry(a,t.spatialReference)),a}},b.planarArea=function(e,t){t=(0,o.defaultValue)(t,a.LinearUnits.meters),e instanceof u.default||e instanceof c.default||e instanceof g.default||e instanceof v.default||o.Log.error("polygon对象不是Polyon或MultiPolygon或Circle或Extent类型!");var r=0;if(e instanceof u.default)r=b._polygonArea(e);else if(e instanceof c.default)for(var n=e.toPolygonArray(),i=0;i<n.length;i++)r+=b._polygonArea(n[i]);else e instanceof g.default?r=Math.abs(Math.PI*e.radius*e.radius):e instanceof v.default&&(r=Math.abs((e.xmax-e.xmin)*(e.ymax-e.ymin)));switch(t){case a.AreaUnits.squareKilometers:r*=1e-6;break;case a.AreaUnits.squareMiles:r*=6214e-7*6214e-7;break;case a.AreaUnits.squareYards:r*=1.1959900499368898;break;case a.AreaUnits.squareFeet:r*=10.763910416689228;break;case a.AreaUnits.acres:r*=2471e-7;break;case a.AreaUnits.ares:r*=.01;break;case a.AreaUnits.hectares:r*=1e-4;break;case a.AreaUnits.squareMeters:}return r},b._ringArea=function(e){for(var t=0,r=0;r<e.length;r++){t+=e[r][0]*e[r===e.length-1?0:r+1][1]*.5,t-=e[r===e.length-1?0:r+1][0]*e[r][1]*.5}return Math.abs(t)},b._polygonArea=function(e){for(var t=b._ringArea(e.coordinates[0]),r=0,n=1;n<e.coordinates.length;n++)r+=b._ringArea(e.coordinates[n]);return t-r},b.planarLength=function(e,t){t=(0,o.defaultValue)(t,a.LinearUnits.meters),(0,o.isNull)(e)&&o.Log.error("geometry对象不能为空!"),e instanceof l.default||e instanceof m.default||e instanceof u.default||e instanceof c.default||e instanceof g.default||e instanceof v.default||o.Log.error("geometry类型不正确!");var r=0,n=void 0;switch(e.type){case p.default.lineString:r=b._planarLineStringLength(e);break;case p.default.multiLineString:r=b._planarMultiLineStringLength(e);break;case p.default.polygon:n=new u.default({coordinates:[e.coordinates[0]]}),r=b._planarMultiLineStringLength(n);break;case p.default.multiPolygon:for(var i=0;i<e.coordinates.length;i++){var s=new u.default({coordinates:[e.coordinates[i][0]]});r+=b._planarMultiLineStringLength(s)}break;case p.default.circle:r=2*Math.PI*e.radius;break;case p.default.extent:n=new u.default({coordinates:[[[e.xmin,e.ymin],[e.xmax,e.ymin],[e.xmax,e.ymax],[e.xmin,e.ymax],[e.xmin,e.ymin]]]}),r+=b._planarMultiLineStringLength(n)}switch(t){case a.LinearUnits.kilometers:r*=.001;break;case a.LinearUnits.feet:r*=3.28083989501;break;case a.LinearUnits.miles:r*=6214e-7;break;case a.LinearUnits.nauticalMiles:r*=54e-5;break;case a.LinearUnits.yards:r*=1.0936133;break;case a.LinearUnits.meters:}return r},b._planarLineStringLength=function(e){for(var t=0,r=0;r<e.coordinates.length-1;r++){var n=Math.abs(e.coordinates[r+1][0]-e.coordinates[r][0]),i=Math.abs(e.coordinates[r+1][1]-e.coordinates[r][1]);t+=Math.sqrt(Math.pow(n,2)+Math.pow(i,2))}return t},b._planarMultiLineStringLength=function(e){for(var t=0,r=0;r<e.coordinates.length;r++){var n=new l.default({coordinates:e.coordinates[r]});t+=b._planarLineStringLength(n)}return t},b.contains=function(e,t){b._checkTwoGeometry(e,t);var r=!1,n=void 0;switch(e.type){case p.default.point:switch(t.type){case p.default.point:return b.equals(e,t)}break;case p.default.multiPoint:switch(t.type){case p.default.point:return b._multiPointContainsPoint(e,t);case p.default.multiPoint:r=!0;for(var i=0;i<t.coordinates.length&&(n=new y.default({coordinates:t.coordinates[i]}),r=b._lineContainPoint(e,n));i++);return r}break;case p.default.lineString:switch(t.type){case p.default.point:return b._lineContainPoint(e,t);case p.default.multiPoint:r=!0;for(var o=0;o<t.coordinates.length;o++)if(n=new y.default({coordinates:t.coordinates[o],spatialReference:h.default.fromJSON(t.spatialReference)}),!b._lineContainPoint(e,n)){r=!1;break}return r;case p.default.lineString:return b._lineContainLine(e,t);case p.default.multiLineString:r=!0;for(var a=0;a<t.coordinates.length;a++){var s=new l.default({coordinates:t.coordinates[a],spatialReference:h.default.fromJSON(t.spatialReference)});if(!b._lineContainLine(e,s)){r=!1;break}}return r}break;case p.default.multiLineString:switch(t.type){case p.default.point:return b._multiLineContainPoint(e,t);case p.default.multiPoint:r=!0;for(var c=0;c<t.coordinates.length;c++){var f=new y.default({coordinates:t.coordinates[c],spatialReference:h.default.fromJSON(t.spatialReference)});if(!b._multiLineContainPoint(e,f)){r=!1;break}}return r;case p.default.lineString:return b._multiLineContainLine(e,t);case p.default.multiLineString:r=!0;for(var d=0;d<t.coordinates.length;d++){var g=new l.default({coordinates:t.coordinates[d],spatialReference:h.default.fromJSON(t.spatialReference)});if(!b._multiLineContainLine(e,g)){r=!1;break}}return r}break;case p.default.polygon:switch(t.type){case p.default.point:return b._polygonContainPoint(e,t);case p.default.multiPoint:r=!0;for(var v=0;v<t.coordinates.length;v++){var m=new y.default({coordinates:t.coordinates[v]});if(!b._polygonContainPoint(e,m)){r=!1;break}}return r;case p.default.lineString:return b._polygonContainLine(e,t);case p.default.multiLineString:r=!0;for(var _=0;_<t.coordinates.length;_++){var S=new l.default({coordinates:t.coordinates[_]});if(!b._polygonContainLine(e,S)){r=!1;break}}return r;case p.default.polygon:return b._polygonContainPolygon(e,t);case p.default.multiPolygon:r=!0;for(var x=0;x<t.coordinates.length;x++){var w=new u.default({coordinates:t.coordinates[x]});if(!b._polygonContainPolygon(e,w)){r=!1;break}}return r;case p.default.circle:return b._polygonContainPolygon(e,t.toPolygon());case p.default.extent:var O=new u.default({coordinates:[[[t.xmin,t.ymin],[t.xmax,t.ymin],[t.xmax,t.ymax],[t.xmin,t.ymax],[t.xmin,t.ymin]]]});return b._polygonContainPolygon(e,O)}break;case p.default.multiPolygon:switch(t.type){case p.default.point:return b._multiPolygonContainsPoint(e,t);case p.default.multiPoint:return b._multiContainsMulti(e,t,y.default,b._multiPolygonContainsPoint);case p.default.lineString:return b._multiPolygonContainsLine(e,t);case p.default.multiLineString:return b._multiContainsMulti(e,t,l.default,b._multiPolygonContainsLine);case p.default.polygon:return b._multiPolygonContainsPolygon(e,t);case p.default.multiPolygon:return b._multiContainsMulti(e,t,u.default,b._multiPolygonContainsPolygon);case p.default.circle:r=!1;for(var P=0;P<e.coordinates.length;P++){var E=new u.default({coordinates:e.coordinates[P]});if(b._polygonContainPolygon(E,t.toPolygon())){r=!0;break}}return r;case p.default.extent:r=!1;for(var k=0;k<e.coordinates.length;k++){var T=new u.default({coordinates:e.coordinates[k]}),M=new u.default({coordinates:[[[t.xmin,t.ymin],[t.xmax,t.ymin],[t.xmax,t.ymax],[t.xmin,t.ymax],[t.xmin,t.ymin]]]});if(b._polygonContainPolygon(T,M)){r=!0;break}}return r}break;case p.default.circle:switch(t.type){case p.default.point:return b._polygonContainPoint(e.toPolygon(),t);case p.default.multiPoint:return b._singleContainsMulti(e.toPolygon(),t,y.default,b._polygonContainPoint);case p.default.lineString:return b._polygonContainMultiPoint(e.toPolygon(),t);case p.default.multiLineString:return b._singleContainsMulti(e.toPolygon(),t,l.default,b._polygonContainMultiPoint);case p.default.polygon:return b._polygonContainPolygon(e.toPolygon(),t);case p.default.multiPolygon:return b._singleContainsMulti(e.toPolygon(),t,u.default,b._polygonContainPolygon);case p.default.circle:return b._polygonContainPolygon(e.toPolygon(),t.toPolygon());case p.default.extent:var I=new u.default({coordinates:[[[t.xmin,t.ymin],[t.xmax,t.ymin],[t.xmax,t.ymax],[t.xmin,t.ymax],[t.xmin,t.ymin]]]});return b._polygonContainPolygon(e.toPolygon(),I)}break;case p.default.extent:var L=new u.default({coordinates:[[[e.xmin,e.ymin],[e.xmax,e.ymin],[e.xmax,e.ymax],[e.xmin,e.ymax],[e.xmin,e.ymin]]]});switch(t.type){case p.default.point:return b._polygonContainPoint(L,t);case p.default.multiPoint:return b._singleContainsMulti(L,t,y.default,b._polygonContainPoint);case p.default.lineString:return b._polygonContainMultiPoint(L,t);case p.default.multiLineString:return b._singleContainsMulti(L,t,l.default,b._polygonContainMultiPoint);case p.default.polygon:return b._polygonContainPolygon(L,t);case p.default.multiPolygon:return b._singleContainsMulti(L,t,u.default,b._polygonContainPolygon);case p.default.circle:return b._polygonContainPolygon(L,t.toPolygon());case p.default.extent:var C=new u.default({coordinates:[[[t.xmin,t.ymin],[t.xmax,t.ymin],[t.xmax,t.ymax],[t.xmin,t.ymax],[t.xmin,t.ymin]]]});return b._polygonContainPolygon(L,C)}break;default:return!1}},b._singleContainsMulti=function(e,t,r,n){for(var i=!0,o=0;o<t.coordinates.length;o++){if(!n(e,new r({coordinates:t.coordinates[o]}))){i=!1;break}}return i},b._multiContainsMulti=function(e,t,r,n){for(var i=!0,o=0;o<t.coordinates.length;o++){if(!n(e,new r({coordinates:t.coordinates[o]}))){i=!1;break}}return i},b._multiPolygonContainsPoint=function(e,t){for(var r=!1,n=0;n<e.coordinates.length;n++){var i=new u.default({coordinates:e.coordinates[n]});if(b._polygonContainPoint(i,t)){r=!0;break}}return r},b._multiPolygonContainsLine=function(e,t){for(var r=!1,n=0;n<e.coordinates.length;n++){var i=new u.default({coordinates:e.coordinates[n]});if(b._polygonContainMultiPoint(i,t)){r=!0;break}}return r},b._multiPolygonContainsPolygon=function(e,t){for(var r=!1,n=0;n<e.coordinates.length;n++){var i=new u.default({coordinates:e.coordinates[n]});if(b._polygonContainPolygon(i,t)){r=!0;break}}return r},b._lineContainLine=function(e,t){var r=n.lineString(e.coordinates),i=n.lineString(t.coordinates),o=n.booleanContains(r,i);if(o||(o=b.equals(e,t)),!o){var a=new l.default({coordinates:[t.coordinates[1],t.coordinates[0]]});o=b.equals(e,a)}return o},b._multiLineContainLine=function(e,t){for(var r=!1,n=0;n<e.coordinates.length;n++){var i=new l.default({coordinates:e.coordinates[n],spatialReference:h.default.fromJSON(e.spatialReference)});if(b._lineContainLine(i,t)){r=!0;break}}return r},b._polygonContainPolygon=function(e,t){var r=n.polygon(e.coordinates),i=n.polygon(t.coordinates);return n.booleanContains(r,i)},b.distance=function(e,t,r){((0,o.isNull)(e)&&o.Log.error("geometry1不能为空!"),(0,o.isNull)(t)&&o.Log.error("geometry2不能为空!"),e instanceof y.default||o.Log.error("geometry1类型错误,需要输入Point!"),t instanceof y.default||t instanceof l.default||t instanceof u.default||t instanceof d.default||t instanceof m.default||t instanceof c.default||t instanceof v.default||t instanceof g.default||o.Log.error("geometry2类型错误!"),e.spatialReference.equals(t.spatialReference)||o.Log.error("geometry1、geometry2坐标系不同!"),r=(0,o.defaultValue)(r,a.LengthUnit.kilometer),e=(0,o.defaultValue)(e,void 0),t=(0,o.defaultValue)(t,void 0),e.spatialReference.isGeographic)||(e=f.default.projectGeometry(e,new h.default({wkid:4326})),t=f.default.projectGeometry(t,new h.default({wkid:4326})));if(!(0,o.isNull)(e)&&!(0,o.isNull)(t)){var i=void 0,s=void 0,_=void 0,b=[],S=[],x=n.point(e.coordinates);switch(t.type){case p.default.point:s=n.point(t.coordinates),i=n.distance(x,s,{units:r});break;case p.default.multiPoint:for(var w=0;w<t.coordinates.length;w++)b.push(n.point(t.coordinates[w]));var O=n.featureCollection(b),P=n.nearestPoint(x,O);i=n.distance(x,P,{units:r});break;case p.default.lineString:s=n.lineString(t.coordinates),i=n.pointToLineDistance(x,s,{units:r});break;case p.default.multiLineString:for(var E=0;E<t.coordinates.length;E++)s=n.lineString(t.coordinates[E]),S.push(n.pointToLineDistance(x,s,{units:r}));S.sort(function(e,t){return e-t}),i=S[0];break;case p.default.polygon:for(var k=0;k<t.coordinates[0].length;k++)b.push(t.coordinates[0][k]);s=n.lineString(b),i=n.pointToLineDistance(x,s,{units:r});break;case p.default.multiPolygon:for(var T=0;T<t.coordinates.length;T++){b=[];for(var M=0;M<t.coordinates[T][0].length;M++)b.push(t.coordinates[T][0][M]);s=n.lineString(b),S.push(n.pointToLineDistance(x,s,{units:r}))}S.sort(function(e,t){return e-t}),i=S[0];break;case p.default.circle:_=n.polygon(t.toPolygon().coordinates);for(var I=0;I<_.geometry.coordinates[0].length;I++)b.push(_.geometry.coordinates[0][I]);s=n.lineString(b),i=n.pointToLineDistance(x,s,{units:r});break;case p.default.extent:for(var L=new u.default({coordinates:[[[t.xmin,t.ymin],[t.xmax,t.ymin],[t.xmax,t.ymax],[t.xmin,t.ymax],[t.xmin,t.ymin]]]}),C=0;C<L.coordinates[0].length;C++)b.push(L.coordinates[0][C]);s=n.lineString(b),i=n.pointToLineDistance(x,s,{units:r})}return i}},b.equals=function(e,t){if((0,o.isNull)(e)&&o.Log.error("geometry1对象为空!"),(0,o.isNull)(t)&&o.Log.error("geometry2对象为空!"),e instanceof s.default||o.Log.error("geometry1对象未继承于Geometry对象!"),t instanceof s.default||o.Log.error("geometry2对象未继承于Geometry对象!"),e.type!==t.type)return!1;if(!e.spatialReference.equals(t.spatialReference))return!1;switch(e.type){case p.default.point:if(!e.equals(t))return!1;break;case p.default.polygon:return b._equalPolygon(e,t);case p.default.lineString:return b._equalLinePoint(e,t);case p.default.extent:if(e.xmin!==t.xmin||e.ymin!==t.ymin||e.xmax!==t.xmax||e.ymax!==t.ymax)return!1;break;case p.default.circle:if(e.radius!==t.radius||e.radiusUnit!==t.radiusUnit)return!1;if(e.center.length!==t.center.length)return!1;for(var r=0;r<e.center.length;r++)if(e.center[r]!==t.center[r])return!1;break;case p.default.multiPoint:return b._equalLinePoint(e,t);case p.default.multiLineString:if(e.coordinates.length!==t.coordinates.length)return!1;for(var n=0;n<e.coordinates.length;n++){var i=new l.default({coordinates:e.coordinates[n],spatialReference:e.spatialReference}),a=new l.default({coordinates:t.coordinates[n],spatialReference:t.spatialReference});if(!b.equals(i,a))return!1}break;case p.default.multiPolygon:if(e.coordinates.length!==t.coordinates.length)return!1;for(var c=0;c<e.coordinates.length;c++){var f=new u.default({coordinates:e.coordinates[c],spatialReference:e.spatialReference}),h=new u.default({coordinates:t.coordinates[c],spatialReference:t.spatialReference});if(!b.equals(f,h))return!1}}return!0},b._equalLinePoint=function(e,t){if(e.coordinates.length!==t.coordinates.length)return!1;for(var r=0;r<e.coordinates.length;r++){var n=new y.default({coordinates:e.coordinates[r]}),i=new y.default({coordinates:t.coordinates[r]});if(!n.equals(i))return!1}return!0},b._equalPolygon=function(e,t){if(e.coordinates.length!==t.coordinates.length)return!1;for(var r=0;r<e.coordinates.length;r++)if(e.coordinates[r].length!==t.coordinates[r].length)return!1;for(var n=0;n<e.coordinates.length;n++){var i=new l.default({coordinates:e.coordinates[n],spatialReference:e.spatialReference}),o=new l.default({coordinates:t.coordinates[n],spatialReference:t.spatialReference});if(!b.equals(i,o))return!1}return!0},b.disjoint=function(e,t){return!b.intersects(e,t)},b.within=function(e,t){return b.contains(t,e)},b.crosses=function(e,t){if((0,o.isNull)(e)&&o.Log.error("geometry1不能为空!"),(0,o.isNull)(t)&&o.Log.error("geometry2不能为空!"),e.spatialReference.equals(t.spatialReference)||o.Log.error("geometry1、geometry2坐标系不同!"),e instanceof l.default||e instanceof m.default)return b._crosses(e,t);if(t instanceof l.default||t instanceof m.default){var r=e;return b._crosses(e=t,t=r)}o.Log.error("geometry1和geometry2中至少有一个参数类型必须为lineString和multiLineString中的一个!")},b._crosses=function(e,t){(t instanceof l.default||t instanceof u.default||t instanceof m.default||t instanceof c.default||t instanceof v.default||t instanceof g.default||o.Log.error("geometry2类型错误!"),e=(0,o.defaultValue)(e,void 0),t=(0,o.defaultValue)(t,void 0),e.spatialReference.isGeographic)||(e=f.default.projectGeometry(e,new h.default({wkid:4326})),t=f.default.projectGeometry(t,new h.default({wkid:4326})));if(!(0,o.isNull)(e)&&!(0,o.isNull)(t)){var r=void 0,i=void 0,a=void 0;switch(e.type){case p.default.lineString:switch(t.type){case p.default.lineString:if(i=b._geometryToTurf(e),a=b._geometryToTurf(t),!(r=n.booleanCrosses(i,a))&&b.intersects(e,t)){var s=[],_=new d.default({coordinates:[t.coordinates[0],t.coordinates[t.coordinates.length-1]]});if(_.coordinates[0].toString()===_.coordinates[1].toString()){var S=b.intersect(e,t);if("MultiPoint"===S.point.type)r=!0;else if("Point"===S.point.type){var x=new y.default({coordinates:e.coordinates[0]}),w=new y.default({coordinates:e.coordinates[e.coordinates.length-1]});r=!b.contains(t,x)&&!b.contains(t,w)}}else{for(var O=0;O<e.coordinates.length;O++)s.push(e.coordinates[O]);for(var P=0;P<t.coordinates.length;P++)s.push(t.coordinates[P]);var E=n.multiPoint(s);if(!(n.cleanCoords(E).geometry.coordinates.length<E.geometry.coordinates.length)){for(var k=void 0,T=0;T<e.coordinates.length;T++){if(k){r=!k;break}var M=new y.default({coordinates:e.coordinates[T]});k=b.contains(t,M)}for(var I=0;I<t.coordinates.length;I++){if(k){r=!k;break}var L=new y.default({coordinates:t.coordinates[I]});k=b.contains(e,L)}k||(r=!0);break}r=!1}}break;case p.default.multiLineString:for(var C=0;C<t.coordinates.length&&!r;C++)a=new l.default({coordinates:t.coordinates[C]}),r=b._crosses(e,a);break;case p.default.polygon:case p.default.extent:case p.default.circle:if(i=b._geometryToTurf(e),a=b._geometryToTurf(t),r=n.booleanCrosses(i,a))"Point"===b.intersect(e,t).type&&(r=!1);break;case p.default.multiPolygon:for(var N=0;N<t.coordinates.length&&!r;N++)a=new u.default({coordinates:t.coordinates[N]}),r=b._crosses(e,a)}break;case p.default.multiLineString:for(var R=0;R<e.coordinates.length&&!r;R++)i=new l.default({coordinates:e.coordinates[R]}),r=b._crosses(i,t)}return r}},b.touches=function(e,t){((0,o.isNull)(e)&&o.Log.error("geometry1不能为空!"),(0,o.isNull)(t)&&o.Log.error("geometry2不能为空!"),e instanceof l.default||e instanceof u.default||e instanceof m.default||e instanceof c.default||e instanceof v.default||e instanceof g.default||o.Log.error("geometry1类型错误,需要输入LineString、Polygon、MultiLineString、MultiPolygon、Circle、Extent!"),t instanceof y.default||t instanceof l.default||t instanceof u.default||t instanceof d.default||t instanceof m.default||t instanceof c.default||t instanceof v.default||t instanceof g.default||o.Log.error("geometry2类型错误!"),e.spatialReference.equals(t.spatialReference)||o.Log.error("geometry1、geometry2坐标系不同!"),e=(0,o.defaultValue)(e,void 0),t=(0,o.defaultValue)(t,void 0),e.spatialReference.isGeographic)||(e=f.default.projectGeometry(e,new h.default({wkid:4326})),t=f.default.projectGeometry(t,new h.default({wkid:4326})));if(!(0,o.isNull)(e)&&!(0,o.isNull)(t)){var r=!1,n=void 0,i=void 0,a=[];switch(e.type){case p.default.lineString:switch(t.type){case p.default.point:var s=new d.default({coordinates:[e.coordinates[0],e.coordinates[e.coordinates.length-1]]});b.contains(s,t)&&s.coordinates[0].toString()!==s.coordinates[1].toString()&&(r=!0);break;case p.default.multiPoint:for(var _=0;_<t.coordinates.length;_++){var S=new y.default({coordinates:t.coordinates[_]}),x=b.touches(e,S);if(x)r=x;else if(b.intersects(e,S)){r=!1;break}}break;case p.default.lineString:if(b.intersect(e,t).point){var w=new y.default({coordinates:e.coordinates[0]}),O=new y.default({coordinates:e.coordinates[e.coordinates.length-1]});if(b.contains(t,w)||b.contains(t,O))r=!b.crosses(e,t);else{var P=new y.default({coordinates:t.coordinates[0]}),E=new y.default({coordinates:t.coordinates[t.coordinates.length-1]});r=!(!b.contains(e,P)&&!b.contains(e,E))&&!b.crosses(e,t)}}else r=!1;break;case p.default.multiLineString:for(var k=0;k<t.coordinates.length;k++){i=new l.default({coordinates:t.coordinates[k]});var T=b.touches(e,i);if(T)r=T;else if(b.intersects(e,i)){r=!1;break}}break;case p.default.polygon:for(var M=0;M<t.coordinates[0].length;M++)a.push(t.coordinates[0][M]);i=new l.default({coordinates:a}),b.intersects(e,i)&&(b.crosses(e,i)||(r=!0));break;case p.default.multiPolygon:for(var I=0;I<t.coordinates.length;I++){i=new u.default({coordinates:t.coordinates[I]});var L=b.touches(e,i);if(L)r=L;else if(b.intersects(e,i)){r=!1;break}}break;case p.default.circle:var C=new y.default({coordinates:t.center}),N=b.nearestCoordinate(e,C),R=new l.default({coordinates:[t.center,N.geometry.coordinates]}),j=b.planarLength(R);Math.round(j)===t.radius&&(r=!0);break;case p.default.extent:var G=new u.default({coordinates:[[[t.xmin,t.ymin],[t.xmax,t.ymin],[t.xmax,t.ymax],[t.xmin,t.ymax],[t.xmin,t.ymin]]]});r=b.touches(e,G)}break;case p.default.multiLineString:for(var V=0;V<e.coordinates.length;V++){n=new l.default({coordinates:e.coordinates[V]});var A=b.touches(n,t);if(A)r=A;else if(b.intersects(n,t)){r=!1;break}}break;case p.default.polygon:switch(t.type){case p.default.point:if(!b.contains(e,t)){for(var D=0;D<e.coordinates.length;D++)a.push(e.coordinates[D]);n=new m.default({coordinates:a}),b.contains(n,t)&&(r=!0)}break;case p.default.multiPoint:for(var F=0;F<t.coordinates.length;F++){var B=new y.default({coordinates:t.coordinates[F]}),q=b.touches(e,B);if(q)r=q;else if(b.contains(e,B)){r=!1;break}}break;case p.default.lineString:case p.default.multiLineString:r=b.touches(t,e);break;case p.default.polygon:b.intersects(e,t)&&(b.intersect(e,t)||(r=!0));break;case p.default.multiPolygon:for(var J=0;J<t.coordinates.length;J++){i=new u.default({coordinates:t.coordinates[J]});var U=b.touches(e,i);if(U)r=U;else if(b.intersects(e,i)){r=!1;break}}break;case p.default.circle:for(var z=0;z<e.coordinates[0].length;z++)a.push(e.coordinates[0][z]);n=new l.default({coordinates:a});var W=new y.default({coordinates:t.center}),H=b.nearestCoordinate(n,W),X=new l.default({coordinates:[t.center,H.geometry.coordinates]}),Z=b.planarLength(X);Math.round(Z)===t.radius&&(b.intersect(e,t)||(r=!0));break;case p.default.extent:var Y=new u.default({coordinates:[[[t.xmin,t.ymin],[t.xmax,t.ymin],[t.xmax,t.ymax],[t.xmin,t.ymax],[t.xmin,t.ymin]]]});r=b.touches(e,Y)}break;case p.default.multiPolygon:switch(t.type){case p.default.point:for(var K=0;K<e.coordinates.length;K++){n=new u.default({coordinates:e.coordinates[K]});var Q=b.touches(n,t);if(Q)r=Q;else if(b.contains(n,t)){r=!1;break}}break;case p.default.multiPoint:for(var $=0;$<t.coordinates.length;$++){var ee=new y.default({coordinates:t.coordinates[$]}),te=b.touches(e,ee);if(te)r=te;else if(b.contains(e,ee)){r=!1;break}}break;case p.default.lineString:case p.default.multiLineString:case p.default.polygon:r=b.touches(t,e);break;case p.default.multiPolygon:for(var re=0;re<t.coordinates.length;re++){i=new u.default({coordinates:t.coordinates[re]});var ne=b.touches(e,i);if(ne)r=ne;else if(b.intersects(e,i)){r=!1;break}}break;case p.default.extent:var ie=new u.default({coordinates:[[[t.xmin,t.ymin],[t.xmax,t.ymin],[t.xmax,t.ymax],[t.xmin,t.ymax],[t.xmin,t.ymin]]]});r=b.touches(e,ie);break;case p.default.circle:for(var oe=0;oe<e.coordinates.length;oe++){n=new u.default({coordinates:e.coordinates[oe]});var ae=b.touches(n,t);if(ae)r=ae;else if(b.intersects(n,t)){r=!1;break}}}break;case p.default.extent:var se=new u.default({coordinates:[[[e.xmin,e.ymin],[e.xmax,e.ymin],[e.xmax,e.ymax],[e.xmin,e.ymax],[e.xmin,e.ymin]]]});r=b.touches(se,t);break;case p.default.circle:switch(t.type){case p.default.point:var ue=new l.default({coordinates:[e.center,t.coordinates]}),le=b.planarLength(ue);Math.round(le)===e.radius&&(r=!0);break;case p.default.multiPoint:for(var ce=0;ce<t.coordinates.length;ce++){var fe=new y.default({coordinates:t.coordinates[ce]}),he=b.touches(e,fe);if(he)r=he;else{var pe=new l.default({coordinates:[e.center,fe.coordinates]}),de=b.planarLength(pe);if(Math.round(de)<e.radius){r=!1;break}}}break;case p.default.lineString:case p.default.multiLineString:case p.default.polygon:case p.default.multiPolygon:case p.default.extent:r=b.touches(t,e);break;case p.default.circle:var ye=new l.default({coordinates:[e.center,t.center]}),ge=b.planarLength(ye);Math.round(ge)===e.radius+t.radius&&(r=!0)}}return r}},b.cut=function(e,t){if((0,o.isNull)(e)&&o.Log.error("geometry不能为空!"),(0,o.isNull)(t)&&o.Log.error("cutter不能为空!"),e instanceof l.default||e instanceof m.default||e instanceof u.default||e instanceof c.default||o.Log.error("geometry类型错误!"),t instanceof l.default||o.Log.error("cutter类型错误!"),e.spatialReference.equals(t.spatialReference)||o.Log.error("geometry对象和cutter对象的坐标系不同!"),!b.intersects(e,t))return[];var r=[],n=void 0,i=void 0;switch(e.type){case p.default.lineString:r=b._lineCutLine(e,t);break;case p.default.multiLineString:for(var a=0;a<e.coordinates.length;a++){var s=new l.default({coordinates:e.coordinates[a],spatialReference:h.default.fromJSON(e.spatialReference)});r=r.concat(b._lineCutLine(s,t))}break;case p.default.polygon:if(n=void 0,e.spatialReference.isGeographic)n=e,i=t;else{var f=b._polygonAndCutterToWGS84(e,t);n=f.polygon,i=f.cutter}if(r=b._lineCutPolygon(n,i),!e.spatialReference.isGeographic)for(var d=0;d<r.length;d++)r[d]=b._geometryToOrigin(r[d]);break;case p.default.multiPolygon:if(n=void 0,e.spatialReference.isGeographic)n=e,i=t;else{var y=b._polygonAndCutterToWGS84(e,t);n=y.polygon,i=y.cutter}for(var g=0;g<n.coordinates.length;g++){var v=new u.default({coordinates:n.coordinates[g],spatialReference:h.default.fromJSON(e.spatialReference)});r=r.concat(b._lineCutPolygon(v,i))}if(!e.spatialReference.isGeographic)for(var _=0;_<r.length;_++)r[_]=b._geometryToOrigin(r[_])}return r},b._polygonAndCutterToWGS84=function(e,t){return{polygon:e.spatialReference.isGeographic?e:b._geometryToWGS84(e),cutter:t.spatialReference.isGeographic?t:b._geometryToWGS84(t)}},b._lineCutLine=function(e,t){for(var r=[],i=n.lineString(e.coordinates),o=n.lineString(t.coordinates),a=n.lineSplit(i,o),s=0;s<a.features.length;s++)r.push(new l.default({coordinates:a.features[s].geometry.coordinates,spatialReference:h.default.fromJSON(e.spatialReference)}));return r},b._lineCutPolygon=function(e,t){var r=[],i=new l.default({coordinates:e.coordinates[0]}),o=n.lineString(i.coordinates),a=n.lineString(t.coordinates);if(n.booleanDisjoint(a,i))return e.clone();for(var s=[],c=0;c<t.coordinates.length-1;c++){var f=n.lineString([t.coordinates[c],t.coordinates[c+1]]);n.booleanDisjoint(f,i)||s.push(t.coordinates[c],t.coordinates[c+1])}a=n.lineString(s),a=n.cleanCoords(a);for(var d=n.lineSplit(o,a),y=n.lineSplit(a,o),g=[],v=new u.default({coordinates:[e.coordinates[0]]}),m=0;m<y.features.length;m++){var _=new l.default({coordinates:y.features[m].geometry.coordinates});b.contains(v,_)&&g.push(y.features[m])}d.features=d.features.concat(g);for(var S=0;S<d.features.length;S++)for(var x=0;x<d.features[S].geometry.coordinates.length;x++)d.features[S].geometry.coordinates[x][0]=d.features[S].geometry.coordinates[x][0].toFixed(7)/1,d.features[S].geometry.coordinates[x][1]=d.features[S].geometry.coordinates[x][1].toFixed(7)/1;for(var w=n.polygonize(d),O=0;O<w.features.length;O++){var P=new u.default({coordinates:w.features[O].geometry.coordinates,spatialReference:h.default.fromJSON(e.spatialReference)});r.push(P)}if(e.coordinates.length>1)for(var E=0;E<r.length;E++)for(var k=1;k<e.coordinates.length;k++){var T=new u.default({coordinates:[e.coordinates[k]]}),M=n.polygon(T.coordinates),I=n.polygon(r[E].coordinates);n.booleanDisjoint(M,I)||(r[E]=b.difference(r[E],T))}for(var L=[],C=0;C<r.length;C++)if(r[C].type===p.default.multiPolygon)for(var N=0;N<r[C].coordinates.length;N++)L.push(new u.default({coordinates:r[C].coordinates[N],spatialReference:h.default.fromJSON(e.spatialReference)}));else L.push(r[C]);return r=L},b._coordinateToWGS84=function(e){var t=e[0]/20037508.34*180,r=e[1]/20037508.34*180;return[t.toFixed(7)/1,r.toFixed(7)/1]},b._coordinateToOrigin=function(e){return[20037508.34*e[0]/180,20037508.34*e[1]/180]},b._geometryToWGS84=function(e){var t=void 0;switch(e.type){case p.default.polygon:t=u.default.fromJSON(e.toJSON());for(var r=0;r<t.coordinates.length;r++)for(var n=0;n<t.coordinates[r].length;n++)t.coordinates[r][n]=b._coordinateToWGS84(t.coordinates[r][n]);break;case p.default.multiPolygon:t=c.default.fromJSON(e.toJSON());for(var i=0;i<t.coordinates.length;i++)for(var o=0;o<t.coordinates[i].length;o++)for(var a=0;a<t.coordinates[i][o].length;a++)t.coordinates[i][o][a]=b._coordinateToWGS84(t.coordinates[i][o][a]);break;case p.default.lineString:t=l.default.fromJSON(e.toJSON());for(var s=0;s<t.coordinates.length;s++)t.coordinates[s]=b._coordinateToWGS84(t.coordinates[s])}return t},b._geometryToOrigin=function(e){var t=void 0;switch(e.type){case p.default.polygon:t=u.default.fromJSON(e.toJSON());for(var r=0;r<t.coordinates.length;r++)for(var n=0;n<t.coordinates[r].length;n++)t.coordinates[r][n]=b._coordinateToOrigin(t.coordinates[r][n]);break;case p.default.lineString:t=l.default.fromJSON(e.toJSON());for(var i=0;i<t.coordinates.length;i++)t.coordinates[i]=b._coordinateToOrigin(t.coordinates[i])}return t},b.isSimple=function(e){(0,o.isNull)(e)&&o.Log.error("geometry不能为空!"),e instanceof l.default||e instanceof m.default||e instanceof u.default||e instanceof c.default||o.Log.error("geometry为不支持的类型!");var t=!0;switch(e.type){case p.default.lineString:t=b._lineIsSimple(e);break;case p.default.multiLineString:t=b._multiLineIsSimple(e);break;case p.default.polygon:t=b._polygonIsSimple(e);break;case p.default.multiPolygon:t=b._multiPolygonIsSimple(e)}return t},b._lineIsSimple=function(e){var t=!0;if(e.coordinates.length>2){for(var r=[],i=0;i<e.coordinates.length-1;i++)r.push(new l.default({coordinates:[e.coordinates[i],e.coordinates[i+1]]}));for(var o=0;o<r.length-1;o++)for(var a=o+1;a<r.length;a++)if(b.contains(r[o],r[a])||b.contains(r[a],r[o])){t=!1;break}for(var s=0;s<r.length-2;s++)for(var u=s+2;u<r.length;u++)if(b.intersects(r[s],r[u])){var c=n.multiPoint([r[s].coordinates[0],r[s].coordinates[1],r[u].coordinates[0],r[u].coordinates[1]]);if(3!==(c=n.cleanCoords(c)).geometry.coordinates.length){t=!1;break}t=!0}for(var f=0;f<e.coordinates.length;f++){for(var h=!1,p=f+1;p<e.coordinates.length;p++)if(b._equalPoints(e.coordinates[f],e.coordinates[p])){h=!0;break}if(h){t=!1;break}}return t}return 2===e.coordinates.length?b._equalPoints(e.coordinates[0],e.coordinates[1]):t},b._equalPoints=function(e,t){return 2===e.length&&t.length>=2?e[0]===t[0]&&e[1]===t[1]:3===e.length&&t.length>=3&&(e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2])},b._getLinesFromPolygon=function(e){for(var t=[],r=0;r<e.coordinates.length;r++)for(var n=0;n<e.coordinates[r].length-1;n++)t.push(new l.default({coordinates:[e.coordinates[r][n],e.coordinates[r][n+1]]}));return t},b._multiLineIsSimple=function(e){var t=!0;if(1===e.coordinates.length){var r=new l.default({coordinates:e.coordinates[0]});t=b._lineIsSimple(r)}else{for(var n=0;n<e.coordinates.length;n++){var i=new l.default({coordinates:e.coordinates[n]});if(b._lineIsSimple(i)){t=!1;break}}if(t)for(var o=0;o<e.coordinates.length-1;o++){var a=new l.default({coordinates:e.coordinates[o]}),s=new l.default({coordinates:e.coordinates[o+1]});if(b.intersects(a,s)){t=!1;break}}}return t},b._polygonIsSimple=function(e){var t=[],r=[];e.coordinates.forEach(function(e){t.push(e.slice(0,e.length-1));for(var n=[],i=1;i<e.length-3;i++)n.push([e[i],e[i+1]]);n.push([e[e.length-2],e[e.length-1]]),r.push(n)});for(var n=new m.default({coordinates:t}),i=b._multiLineIsSimple(n),o=!1,a=0;a<r.length;a++){for(var s=new l.default({coordinates:r[a][r[a].length-1]}),u=0;u<r[a].length-1;u++)if(o=b.intersects(new l.default({coordinates:r[a][u]}),s)){i=!1;break}if(o)break}return i},b._multiPolygonIsSimple=function(e){var t=[];e.coordinates.forEach(function(e){e.forEach(function(e){t.push(e.slice(0,e.length-1))})});var r=new m.default({coordinates:t});return b._multiLineIsSimple(r)},b.getPositionsFromArc=function(e){var t=[(e=(0,o.defaultValue)(e,{})).point1,e.point2,e.point3],r=b.getCenter(t[0],t[1],t[2]);return t=b._tranArcToPath({center:r,pointBegan:t[0],pointEnd:t[2],spatialReference:e.spatialReference,numberOfPoints:e.numberOfPoints})},b._tranArcToPath=function(e){var t=(0,o.defaultValue)(e.center,void 0);t=JSON.parse(JSON.stringify(t));var r=(0,o.defaultValue)(e.pointBegan,void 0);r=JSON.parse(JSON.stringify(r));var n=(0,o.defaultValue)(e.pointEnd,void 0);n=JSON.parse(JSON.stringify(n));var i=(0,o.defaultValue)(e.numberOfPoints,360),a=(0,o.defaultValue)(e.spatialReference,new h.default({wkid:4326}));if(!(a=h.default.fromJSON(a)).isGeographic){var s=new h.default({wkid:4326});t=f.default.project(new y.default({coordinates:t,spatialReference:a}),s).coordinates,r=f.default.project(new y.default({coordinates:r,spatialReference:a}),s).coordinates,n=f.default.project(new y.default({coordinates:n,spatialReference:a}),s).coordinates}var u=new l.default({coordinates:[t,r]}),c=b.planarLength(u),p=b.getAngleFromPoints(r,t,[t[0]+10,t[1]]),d=b.getAngleFromPoints(n,t,[t[0]+10,t[1]])-p;i*=d/360,i=Math.abs(i);var g=Math.PI*(d/180)/i;p=Math.PI*(p/180);for(var v=[r],m=0;m<i-1;m++){p+=g;var _=[t[0]+c*Math.cos(p),t[1]+c*Math.sin(p)];v.push(_)}return v.push(n),this.hasZ&&v.map(function(e){return[e[0],e[1],t[2]]}),v},b.getCenter=function(e,t,r,n){var i=e[0],o=t[0],a=r[0],s=e[1],u=t[1],l=r[1],c=0*s-0*u-0*s+0*l+0*u-0*l,f=-(0*i-0*o-0*i+0*a+0*o-0*a),h=i*u-o*s-i*l+a*s+o*l-a*u,p=-(i*u*0-i*l*0-o*s*0+o*l*0+a*s*0-a*u*0),d=2*(o-i),y=2*(u-s),g=i*i+s*s+0-o*o-u*u-0,v=2*(a-i),m=2*(l-s),_=i*i+s*s+0-a*a-l*l-0,b=-(0*f*_-0*f*g-y*h*_+0*y*p+m*h*g-0*m*p)/(c*y*0-c*m*0-d*f*0+d*m*h+v*f*0-v*y*h),S=(0*c*_-0*c*g-d*h*_+0*d*p+v*h*g-0*v*p)/(c*y*0-c*m*0-d*f*0+d*m*h+v*f*0-v*y*h);return n?[b,S,e[2]]:[b,S]},b._getArcFromPath=function(e){e=(0,o.defaultValue)(e,{});var t=(0,o.defaultValue)(e.coordinates,[]),r=(0,o.defaultValue)(e.arcInfo,[]),n=(0,o.defaultValue)(e.spatialReference,new h.default({wkid:4326})),i=(0,o.defaultValue)(e.numberOfPoints,360),a=[],s=t.slice(0,r[0].centerPointIndex-1);a=a.concat(s);var u=Number(r[0].centerPointIndex),l=[t[u-1],t[u],t[u+1]],c=b.getPositionsFromArc({point1:l[0],point2:l[1],point3:l[2],spatialReference:n,numberOfPoints:i});a=a.concat(c);for(var f=1;f<r.length;f++)if(r[f].hasOwnProperty("centerPointIndex")){var p=t.slice(r[f-1].centerPointIndex+2,r[f].centerPointIndex+1);a=a.concat(p);var d=Number(r[f].centerPointIndex),y=[t[d-1],t[d],t[d+1]],g=b.getPositionsFromArc({point1:y[0],point2:y[1],point3:y[2],spatialReference:n,numberOfPoints:i});a=a.concat(g)}var v=t.slice(r[r.length-1].centerPointIndex+2,t.length);return a=a.concat(v)},b._getArcInfos=function(e,t,r){var n={};switch(r){case p.default.multiLineString:case p.default.polygon:for(var i=0;i<t.length;i++){n[i]=[];for(var o=0;o<e.length;o++){(r===p.default.multiLineString?e[o].lineIndex:e[o].ringIndex)===i&&n[i].push(e[o])}n[i].sort(function(e,t){return Number(e.centerPointIndex)-Number(t.centerPointIndex)})}return n;case p.default.multiPolygon:for(var a=0;a<t.length;a++){n[a]=[];for(var s=0;s<e.length;s++)e[s].polygonIndex===a&&n[a].push(e[s]);n[a]=b._getArcInfos(n[a],t[a],p.default.polygon)}return n;default:return n}},b.getAngleFromPoints=function(e,t,r){var n=e[0]-t[0],i=e[1]-t[1],o=r[0]-t[0],a=r[1]-t[1],s=(n*o+i*a)/(Math.sqrt(n*n+i*i)*Math.sqrt(o*o+a*a)),u=180*Math.acos(s)/Math.PI;return 0===Math.abs(u)||180===Math.abs(u)?Math.abs(u):e[1]<r[1]?-1*u:u},b.getArcFromGeometry=function(e){e=(0,o.defaultValue)(e,{});var t=(0,o.defaultValue)(e.geometry,void 0),r=(0,o.defaultValue)(e.numberOfPoints,360),n=(0,o.defaultValue)(e.arcInfo,[]);if(!t)return t;if(!(t instanceof s.default))return o.Log.error("geometry不是基础几何类型!"),t;if(!n)return t;if(!(n instanceof Array))return t;if(n.length<1)return t;var i=t.coordinates,a=t.spatialReference,f=void 0,d=void 0;switch(t.type){case p.default.lineString:return f=b._getArcFromPath({coordinates:i,arcInfo:n,spatialReference:a,numberOfPoints:r}),new l.default({coordinates:f,spatialReference:h.default.fromJSON(t.spatialReference)});case p.default.multiLineString:return d=b._getArcInfos(n,i,p.default.multiLineString),f=[],Object.keys(d).forEach(function(e){f.push(b._getArcFromPath({coordinates:i[e],arcInfo:d[e],spatialReference:a,numberOfPoints:r}))}),new m.default({coordinates:f,spatialReference:a});case p.default.polygon:return d=b._getArcInfos(n,i,p.default.polygon),f=[],Object.keys(d).forEach(function(e){var t=i[e].slice(0,i[e].length),n=b._getArcFromPath({coordinates:t,arcInfo:d[e],spatialReference:a,numberOfPoints:r});n.push(n[0]),f.push(n)}),new u.default({coordinates:f,spatialReference:a});case p.default.multiPolygon:d=b._getArcInfos(n,i,p.default.multiPolygon),f=[];for(var y=function(e){var t=[];Object.keys(d[e]).forEach(function(n){var o=i[e][n].slice(0,i[e][n].length),s=b._getArcFromPath({coordinates:o,arcInfo:d[e][n],spatialReference:a,numberOfPoints:r});s.push(s[0]),t.push(s)}),f.push(t)},g=0;g<i.length;g++)y(g);return new c.default({coordinates:f,spatialReference:a});default:return t}},b._getTurfMultiLineStringFromLines=function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].coordinates);return n.multiLineString(t)},b._initIntersects=function(e){for(var t={},r=0;r<e.length;r++)e[r].id=r,t[r]={intersectPoints:[],intersectLines:[]};return t},b._pointOnLineEndPoint=function(e,t){return e.coordinates[0]===t.coordinates[0][0]&&e.coordinates[1]===t.coordinates[0][1]||e.coordinates[0]===t.coordinates[1][0]&&e.coordinates[1]===t.coordinates[1][1]},b._lineEqualLine=function(e,t){return e.coordinates[0][0]===t.coordinates[0][0]&&e.coordinates[0][1]===t.coordinates[0][1]&&e.coordinates[1][0]===t.coordinates[1][0]&&e.coordinates[1][1]===t.coordinates[1][1]||e.coordinates[0][0]===t.coordinates[1][0]&&e.coordinates[0][1]===t.coordinates[1][1]&&e.coordinates[1][0]===t.coordinates[0][0]&&e.coordinates[1][1]===t.coordinates[0][1]},b._lineEqualLineTurf=function(e,t){return e.geometry.coordinates[0][0]===t.geometry.coordinates[0][0]&&e.geometry.coordinates[0][1]===t.geometry.coordinates[0][1]&&e.geometry.coordinates[1][0]===t.geometry.coordinates[1][0]&&e.geometry.coordinates[1][1]===t.geometry.coordinates[1][1]},b._singRingSimplify=function(e){for(var t=b._getLinesFromPolygon(e),r=b._initIntersects(t),i=0;i<t.length-1;i++)for(var o=i+1;o<t.length;o++){var a=b.intersect(t[i],t[o]);a.point&&(b._pointOnLineEndPoint(a.point,t[i])||b._pointOnLineEndPoint(a.point,t[o])||(r[i].intersectPoints.push(a.point),r[o].intersectPoints.push(a.point))),a.lineString&&(r[i].intersectLines.push(a.lineString),r[o].intersectLines.push(a.lineString))}for(var s=[],u=0;u<t.length;u++){for(var l=!1,c=0;c<r[u].intersectLines.length;c++){if(b._lineEqualLine(t[u],r[u].intersectLines[c])){l=!0;break}t[u].coordinates[0][0]===r[u].intersectLines[c].coordinates[0][0]&&t[u].coordinates[0][1]===r[u].intersectLines[c].coordinates[0][1]||r[u].intersectPoints.push(new y.default({coordinates:r[u].intersectLines[c].coordinates[0]}),new y.default({coordinates:r[u].intersectLines[c].coordinates[0]})),t[u].coordinates[1][0]===r[u].intersectLines[c].coordinates[1][0]&&t[u].coordinates[1][1]===r[u].intersectLines[c].coordinates[1][1]||r[u].intersectPoints.push(new y.default({coordinates:r[u].intersectLines[c].coordinates[1]}),new y.default({coordinates:r[u].intersectLines[c].coordinates[1]}))}if(!l){r[u].intersectPoints.sort(function(e,t){return e.coordinates[0]-t.coordinates[0]}),r[u].intersectPoints.sort(function(e,t){return t.coordinates[1]-e.coordinates[1]}),r[u].intersectPoints.splice(0,0,new y.default({coordinates:t[u].coordinates[0]})),r[u].intersectPoints.push(new y.default({coordinates:t[u].coordinates[1]}));for(var f=b.union(r[u].intersectPoints),h=0;h<f.coordinates.length-1;h++)s.push(n.lineString([f.coordinates[h],f.coordinates[h+1]]))}}for(var p=0;p<s.length;p++)for(var d=p+1;d<s.length;d++)b._lineEqualLineTurf(s[p],s[d])&&(s.splice(d,1),d--);var g=n.featureCollection(s);return n.polygonize(g)},b._getPolygonsFromRings=function(e,t){for(var r=0;r<e.length;r++)e[r].isOuter=!0,e[r].innerPolygons=[];1===e.length&&t.push(e[0]);for(var n=0;n<e.length-1;n++)if(e[n].isOuter){t.push(e[n]);for(var i=n+1;i<e.length;i++)b.contains(e[n],e[i])&&(e[i].isOuter=!1,e[n].innerPolygons.push(e[i]))}e.length>1&&e[e.length-1].isOuter&&t.push(e[e.length-1]);for(var o=[],a=0;a<t.length;a++){for(var s=[],u=0;u<t[a].innerPolygons.length-1;u++)for(var l=u+1;l<t[a].innerPolygons.length;l++)b.contains(t[a].innerPolygons[u],t[a].innerPolygons[l])&&!t[a].innerPolygons[l].isOuter&&(t[a].innerPolygons[l].isOuter=!0,t[a].innerPolygons[l].innerPolygons=[],s.push(t[a].innerPolygons[l]));for(var c=0;c<t[a].innerPolygons.length;c++)t[a].innerPolygons[c].isOuter&&(t[a].innerPolygons.splice(c,1),c--);if(s.length>0){var f=b._getPolygonsFromRings(s,[]);o=o.concat(f)}}return t=t.concat(o)},b._singlePolygonSimplify=function(e){for(var t={largerInnerPolygon:[],intersectInnerPolygon:[],smallInnerPolygon:[]},r=new u.default({coordinates:[e.coordinates[0]],spatialReference:h.default.fromJSON(e.spatialReference)}),n=[],i=1;i<e.coordinates.length;i++){var o=new u.default({coordinates:[e.coordinates[i]],spatialReference:h.default.fromJSON(e.spatialReference)});n.push(o)}for(var a=0;a<n.length-1;a++)for(var l=a+1;l<n.length;l++){var f=b.intersect(n[a],n[l]);(f instanceof u.default||f instanceof c.default)&&(n[a]=b.difference(n[a],f),n[l]=b.difference(n[l],f))}for(var p=0;p<n.length;p++){var d=n[p];if(b.contains(r,d)){var y=b.difference(r,d),g=JSON.parse(JSON.stringify(r.coordinates[0])),v=JSON.parse(JSON.stringify(y.coordinates[0]));g.sort(function(e,t){return e[0]-t[0]}),g.sort(function(e,t){return e[1]-t[1]}),v.sort(function(e,t){return e[0]-t[0]}),v.sort(function(e,t){return e[1]-t[1]}),JSON.stringify(g)===JSON.stringify(v)?t.smallInnerPolygon.push(d):t.intersectInnerPolygon.push(d)}else if(b.contains(d,r)){var m=r.toJSON(),_=d.toJSON();r=s.default.fromJSON(_),d=s.default.fromJSON(m),t.smallInnerPolygon.push(d)}else b.intersects(r,d)?t.intersectInnerPolygon.push(d):b.disjoint(r,d)&&t.largerInnerPolygon.push(d)}for(var S=[],x=0;x<t.intersectInnerPolygon.length;x++){var w=b.intersect(r,t.intersectInnerPolygon[x]);if(w instanceof u.default||w instanceof c.default){r=b.difference(r,w);var O=b.difference(t.intersectInnerPolygon[x],w);S.push(O)}}for(var P=b._singRingSimplify(r),E=0;E<P.features.length;E++)S.push(new u.default({coordinates:P.features[E].geometry.coordinates}));if(t.largerInnerPolygon.length>0)for(var k=0;k<t.largerInnerPolygon.length;k++)S.push(t.largerInnerPolygon[k]);for(var T=[],M=0;M<t.smallInnerPolygon.length;M++)for(var I=b._singRingSimplify(t.smallInnerPolygon[M]),L=0;L<I.features.length;L++){var C=new u.default({coordinates:I.features[L].geometry.coordinates});C.isPicked=!1,T.push(C)}!(T=b.union(T))||T instanceof Array||(T=[T]);for(var N=0;N<S.length;N++)for(var R=0;R<T.length;R++)!T[R].isPicked&&S[N]&&T[R]&&b.contains(S[N],T[R])&&(S[N].coordinates.push(T[R].coordinates[0]),T[R].isPicked=!0);return S},b.simplify=function(e){if((0,o.isNull)(e)&&o.Log.error("geometry不能为空!"),e.type===p.default.point||e.type===p.default.multiPoint||e.type===p.default.extent||e.type===p.default.circle)return e;switch(e.type){case p.default.polygon:case p.default.multiPolygon:var t=[],r=void 0;if(e.type===p.default.polygon){r=JSON.parse(JSON.stringify(e.coordinates));for(var n=0;n<r.length;n++)t.push(new u.default({coordinates:[r[n]],spatialReference:h.default.fromJSON(e.spatialReference)}))}else for(var i=JSON.parse(JSON.stringify(e.coordinates)),a=0;a<i.length;a++)for(var s=0;s<i[a].length;s++)t.push(new u.default({coordinates:[i[a][s]],spatialReference:h.default.fromJSON(e.spatialReference)}));for(var l=0;l<t.length;l++)t[l].area=b.planarArea(t[l]);t.sort(function(e,t){return t.area-e.area});for(var f=b._getPolygonsFromRings(t,[]),d=0;d<f.length-1;d++)for(var y=d+1;y<f.length;y++)if(!b.contains(f[d],f[y])){var g=b.intersect(f[d],f[y]);g&&(f[d].coordinates=b.difference(f[d],g).coordinates,f[y].coordinates=b.difference(f[y],g).coordinates)}for(var v=[],m=0;m<f.length;m++){for(var _=0;_<f[m].innerPolygons.length;_++)f[m].coordinates.push(f[m].innerPolygons[_].coordinates[0]);var S=b._singlePolygonSimplify(f[m]);v=v.concat(S)}if(1===v.length)return v[0];if(v.length>1){for(var x=[],w=0;w<v.length;w++)v[w]&&x.push(v[w].coordinates);return new c.default({coordinates:x,spatialReference:h.default.fromJSON(e.spatialReference)})}break;case p.default.lineString:}},b.getEllipseCoordinates=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:50;if(!e||!e.coordinates||void 0===t||void 0===r)return[];for(var i=[],o=e.coordinates,a=0;a<=n;a++){var s=a/n*2*Math.PI,u=o[0]+t*Math.cos(s),l=o[1]+r*Math.sin(s);i.push([u,l])}return i.push(i[0]),i},b.getCenterOID=function(e){var t=e.type;if(t===p.default.circle)return new y.default({coordinates:[e.center[0],e.center[1],0]});if(t===p.default.extent)return new y.default({coordinates:[(e.xmin+e.xmax)/2,(e.ymin+e.ymax)/2,0]});var r=[],i=void 0;switch(t){case p.default.point:return y.default.fromJSON(e.toJSON());case p.default.multiPoint:case p.default.lineString:i=e.coordinates;break;case p.default.polygon:i=e.coordinates[0];break;default:return}for(var o=0;o<i.length;o++)r.push(n.point(i[o]));var a=n.featureCollection(r),s=n.center(a);return new y.default({coordinates:[s.geometry.coordinates[0],s.geometry.coordinates[1],0]})},i.default.Geometry.GeometryEngine=b,t.default=b},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VisualVariable=t.OpacityVariable=t.ColorVariable=t.SizeVariable=t.HeatmapColorStop=t.ClusterInfo=t.getIGSDynamicLayer=t.createRender=t.HeatmapRenderer=t.RankRenderer=t.RandomRenderer=t.ClusterRenderer=t.SimpleRenderer=t.ClassBreakRenderer=t.UniqueValueRenderer=t.BaseRenderer=void 0;var n=v(r(30)),i=v(r(402)),o=v(r(410)),a=v(r(412)),s=v(r(413)),u=v(r(414)),l=v(r(415)),c=v(r(416)),f=r(3),h=r(0),p=r(417),d=v(r(162)),y=v(r(163)),g=r(53);function v(e){return e&&e.__esModule?e:{default:e}}t.BaseRenderer=n.default,t.UniqueValueRenderer=i.default,t.ClassBreakRenderer=o.default,t.SimpleRenderer=a.default,t.ClusterRenderer=s.default,t.RandomRenderer=u.default,t.RankRenderer=l.default,t.HeatmapRenderer=c.default,t.createRender=function(e){switch((e=(0,h.defaultValue)(e,{})).type){case f.RendererType.simple:return new a.default(e);case f.RendererType.uniqueValue:return new i.default(e);case f.RendererType.classBreak:return new o.default(e);case f.RendererType.cluster:return new s.default(e);case f.RendererType.random:return new u.default(e);case f.RendererType.rank:return new l.default(e);case f.RendererType.heatmap:return new c.default(e);default:return new a.default(e)}},t.getIGSDynamicLayer=p.getIGSDynamicLayer,t.ClusterInfo=d.default,t.HeatmapColorStop=y.default,t.SizeVariable=g.SizeVariable,t.ColorVariable=g.ColorVariable,t.OpacityVariable=g.OpacityVariable,t.VisualVariable=g.VisualVariable},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={default:"default",color:"color",opacity:"opacity",size:"size"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.VisualVariableType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(0),a=function(e){return e&&e.__esModule?e:{default:e}}(r(70)),s=r(4);var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=t||{},this.dpi=(0,o.defaultValue)(t.dpi,-1),this.format=(0,o.defaultValue)(t.format,"png"),this.origin=t.origin?s.Point.fromJSON(t.origin):void 0;for(var r=[],n=(0,o.defaultValue)(t.lods,[]),i=0;i<n.length;i++)r.push(a.default.fromJSON(n[i]));this.lods=r,this.size=t.size,this.spatialReference=t.spatialReference}return n(e,[{key:"toJSON",value:function(){return{dpi:this.dpi,format:this.format,origin:this.origin?this.origin.toJSON():void 0,lods:this.lods.map(function(e){return e.toJSON()}),size:this.size?[this.size[0],this.size[1]]:void 0,spatialReference:this.spatialReference&&this.spatialReference.toJSON()}}},{key:"scaleToZoom",value:function(e){return 0}},{key:"zoomToScale",value:function(e){return 0}},{key:"getTileSize",value:function(){return Array.isArray(this.size)&&this.size.length>=2?Math.max(this.size[0],this.size[1]):256}}],[{key:"fromJSON",value:function(t){return new e(t)}}]),e}();i.Zondy.TileInfo=u,t.default=u},function(e,t,r){"use strict";r.r(t),t.default=function(e){return e<0?-1:1}},function(e,t,r){"use strict";r.r(t),t.default=function(e,t){e=Math.abs(e),t=Math.abs(t);var r=Math.max(e,t),n=Math.min(e,t)/(r||1);return r*Math.sqrt(1+Math.pow(n,2))}},function(e,t,r){"use strict";r.r(t);var n=r(5),i=r(42);t.default=function(e){return Math.abs(e)<n.HALF_PI?e:e-Object(i.default)(e)*Math.PI}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debouncePromise=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=void 0,i=void 0,o=void 0,a=[];return function(){var s=function(e){return"function"==typeof e?e():e}(t),u=(new Date).getTime(),l=!n||u-n>s;n=u;for(var c=arguments.length,f=Array(c),h=0;h<c;h++)f[h]=arguments[h];if(l&&r.leading)return r.accumulate?Promise.resolve(e.call(this,[f])).then(function(e){return e[0]}):Promise.resolve(e.call.apply(e,[this].concat(f)));if(i?clearTimeout(o):i=function(){var e={};return e.promise=new Promise(function(t,r){e.resolve=t,e.reject=r}),e}(),a.push(f),o=setTimeout(function(){var t=i;clearTimeout(o),Promise.resolve(r.accumulate?e.call(this,a):e.apply(this,a[a.length-1])).then(t.resolve,t.reject),a=[],i=null}.bind(this),s),r.accumulate){var p=a.length-1;return i.promise.then(function(e){return e[p]})}return i.promise}},t.inOrderPromise=async function(e){for(var t=[],r=0;r<e.length;r++)try{var n=await e[r];t.push(n)}catch(e){}return t},t.allSettled=function(e){var t=function(e){return{status:"rejected",reason:e}},r=function(e){return{status:"fulfilled",value:e}},n=e.map(function(e){return Promise.resolve(e).then(r,t)});return Promise.all(n)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(290)),s=r(24);var u=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._createEventedProxy()}return i(e,[{key:"_createEventedProxy",value:function(){this._decorateParents=[],this._decorateProperties={};var t=this;return new Proxy(this,{set:function(r,n,i,o){if(t._decorateProperties[n]){var a=t._decorateProperties[n],s=a.type,u=a.createInstance;s&&i instanceof s||(i=u(i)),i instanceof e&&Array.isArray(i._decorateParents)&&-1===i._decorateParents.findIndex(function(e){return e.instance===t})&&i._decorateParents.push({instance:t,key:n})}if(r[n]===i)return!0;var l={target:r,key:n,value:i,oldValue:Reflect.get(r,n),receiver:o},c=Reflect.set(r,n,i,o);return/^_[^_].*/.test(n)?c:(t.decorateEventFire("set",l),c)},get:function(e,t,r){return Reflect.get(e,t,r)}})}},{key:"decorateEventFire",value:function(e,t){this._decorateEventFire(this,this,[],e,t,t)}},{key:"_decorateEventFire",value:function(e,t,r,n,i,o){var a=this,u=i.key,l=i.value,c=i.oldValue,f=r.concat();f.unshift(u);var h={key:u,value:l,oldValue:c},p=new s.ProxyEvent({eventName:n,target:e,eventData:h,eventPath:f.concat(),sourceTarget:t,sourceEventData:o});e.fire(n,p),(e._decorateParents||[]).forEach(function(r){var i=r.instance,s=r.key;i&&"collection"===i.type&&(s=""+e.id);var u={key:s,value:i[s]||e,oldValue:i[s]||e};a._decorateEventFire(i,t,f,n,u,o)})}},{key:"_decorate",value:function(e,t,r,n){n=(0,o.defaultValue)(n,function(e){return e});var i=t;return r&&t instanceof r||(i=n((0,o.defaultValue)(t,{}))),this._decorateProperties[e]={type:r,createInstance:n},i}},{key:"on",value:function(e,t,r){if("object"===(void 0===e?"undefined":n(e)))for(var i in e)this._on(i,e[i],t);else for(var o=0,s=(e=a.splitWords(e)).length;o<s;o++)this._on(e[o],t,r);return this}},{key:"off",value:function(e,t,r){if(e)if("object"===(void 0===e?"undefined":n(e)))for(var i in e)this._off(i,e[i],t);else for(var o=0,s=(e=a.splitWords(e)).length;o<s;o++)this._off(e[o],t,r);else delete this._Evented;return this}},{key:"_on",value:function(e,t,r){this._Evented=this._Evented||{};var n=this._Evented[e];n||(n=[],this._Evented[e]=n),r===this&&(r=void 0);for(var i={fn:t,ctx:r},o=n,a=0,s=o.length;a<s;a++)if(o[a].fn===t&&o[a].ctx===r)return;o.push(i)}},{key:"_off",value:function(e,t,r){var n=void 0,i=void 0,o=void 0;if(this._Evented&&(n=this._Evented[e]))if(t){if(r===this&&(r=void 0),n)for(i=0,o=n.length;i<o;i++){var s=n[i];if(s.ctx===r&&s.fn===t)return s.fn=a.falseFn,this._firingCount&&(this._Evented[e]=n=n.slice()),void n.splice(i,1)}}else{for(i=0,o=n.length;i<o;i++)n[i].fn=a.falseFn;delete this._Evented[e]}}},{key:"fire",value:function(e,t,r){if(!this.listens(e,r))return this;var n=t;if(n&&(n.type=e,n.target=this,n.sourceTarget=t&&t.sourceTarget||this),this._Evented){var i=this._Evented[e];if(i){this._firingCount=this._firingCount+1||1;for(var o=0,a=i.length;o<a;o++){var s=i[o];s.fn.call(s.ctx||this,n)}this._firingCount--}}return r&&this._propagateEvent(n),this}},{key:"listens",value:function(e,t){var r=this._Evented&&this._Evented[e];if(r&&r.length)return!0;if(t)for(var n in this._eventParents)if(this._eventParents[n].listens(e,t))return!0;return!1}},{key:"once",value:function(e,t,r){var i=this;if("object"===(void 0===e?"undefined":n(e))){for(var o in e)this.once(o,e[o],t);return this}var s=a.bind(function(){i.off(e,t,r).off(e,s,r)},this);return this.on(e,t,r).on(e,s,r)}},{key:"addEventParent",value:function(e){return this._eventParents=this._eventParents||{},this._eventParents[a.stamp(e)]=e,this}},{key:"removeEventParent",value:function(e){return this._eventParents&&delete this._eventParents[a.stamp(e)],this}},{key:"_propagateEvent",value:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,a.extend({layer:e.target,propagatedFrom:e.target},e),!0)}}]),e}();t.default=u,u.addEventListener=u.on,u.removeEventListener=u.clearAllEventListeners=u.off,u.addOneTimeEventListener=u.once,u.fireEvent=u.fire,u.hasEventListeners=u.listens},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=l(r(98)),i=l(r(85)),o=r(0),a=l(r(2)),s=r(4),u=l(r(66));function l(e){return e&&e.__esModule?e:{default:e}}var c=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};c.projectMercatorToLonLat=function(e){var t={longitude:0,latitude:0},r=e.x/20037508.34*180,n=e.y/20037508.34*180;return n=180/Math.PI*(2*Math.atan(Math.exp(n*Math.PI/180))-Math.PI/2),t.longitude=r,t.latitude=n,t},c.projectToGeographyPoints=function(e){e=(0,o.defaultValue)(e,{});var t=(0,o.defaultValue)(e.points,[]),r=(0,o.defaultValue)(e.wkid,-1),i=(0,o.defaultValue)(e.proj4Defs,void 0),a=[],s=void 0;if(i)s=i;else{var u=c.getEPSGByWKID(r);u&&(s=u.strProject)}if(s)for(var l=0;l<t.length;l++)a.push((0,n.default)(s,"+proj=longlat +datum=WGS84 +no_defs +type=crs",t[l]));return a},c.projectPoints=function(e){e=(0,o.defaultValue)(e,{});var t=(0,o.defaultValue)(e.points,[]),r=(0,o.defaultValue)(e.originWKID,-1),i=(0,o.defaultValue)(e.originDefs,void 0),a=(0,o.defaultValue)(e.targetWKID,-1),s=(0,o.defaultValue)(e.targetDefs,void 0),u=void 0,l=void 0,f=[];try{if(i)u=i;else{var h=c.getEPSGByWKID(r);h&&(u=h.strProject)}if(s)l=s;else{var p=c.getEPSGByWKID(a);p&&(l=p.strProject)}if(u&&l)for(var d=0;d<t.length;d++)f.push((0,n.default)(u,l,t[d]))}catch(e){o.Log.error("proj4投影超限")}return f},c.getEPSGByWKID=function(e){for(var t=void 0,r=0;r<i.default.length;r++)if(String(i.default[r].id)===String(e)){t=i.default[r];break}return t||o.Log.error("epsg未定义wkid为"+e+"的坐标系信息"),t},c.projectGeometry=function(e,t){var r=[],n={originWKID:e.spatialReference.wkid,originDefs:e.spatialReference.wkt,targetWKID:t.wkid,targetDefs:t.wkt};switch(e.type){case u.default.point:return r=[e.coordinates],n.points=r,r=c.projectPoints(n),new s.Point({coordinates:r[0],spatialReference:new s.SpatialReference(t)});case u.default.multiPoint:return r=e.coordinates,n.points=r,r=c.projectPoints(n),new s.MultiPoint({coordinates:r,spatialReference:new s.SpatialReference(t)});case u.default.lineString:return r=e.coordinates,n.points=r,r=c.projectPoints(n),new s.LineString({coordinates:r,spatialReference:new s.SpatialReference(t)});case u.default.multiLineString:r=e.coordinates;for(var i=[],o=0;o<r.length;o++)n.points=r[o],i.push(c.projectPoints(n));return new s.MultiLineString({coordinates:i,spatialReference:new s.SpatialReference(t)});case u.default.polygon:r=e.coordinates;for(var a=[],l=0;l<r.length;l++)n.points=r[l],a.push(c.projectPoints(n));return new s.Polygon({coordinates:a,spatialReference:new s.SpatialReference(t)});case u.default.multiPolygon:r=e.coordinates;for(var f=[],h=0;h<r.length;h++){for(var p=[],d=0;d<r[h].length;d++)n.points=r[h][d],p.push(c.projectPoints(n));f.push(p)}return new s.MultiPolygon({coordinates:f,spatialReference:new s.SpatialReference(t)});case u.default.circle:return r=[[e.center[0],e.center[1],e.center[2]],[e.center[0]+e.radius,e.center[1]+e.radius,e.center[2]]],n.points=r,r=c.projectPoints(n),new s.Circle({center:r[0],radius:e.radius});case u.default.extent:return r=[[e.xmin,e.ymin,e.zmin],[e.xmax,e.ymax,e.zmax]],n.points=r,r=c.projectPoints(n),new s.Extent({xmin:r[0][0],ymin:r[0][1],zmin:r[0][2],xmax:r[1][0],ymax:r[1][1],zmax:r[1][2],spatialReference:new s.SpatialReference(t)});default:return e}},c.project=function(e,t){if(e instanceof Array){for(var r=[],n=0;n<e.length;n++)r.push(c.projectGeometry(e[n],t));return r}if(e.spatialReference.isGeographic){var i=function(e){return e>89.99999999?e=89.99999999:e<-89.99999999&&(e=-89.99999999),e};e.coordinates&&e.coordinates.length>1&&(e.coordinates[1]=i(e.coordinates[1])),e.ymax=i(e.ymax),e.ymin=i(e.ymin)}return c.projectGeometry(e,t)},a.default.Geometry.Projection=c,a.default.Geometry.Proj4=n.default,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=l(r(2)),o=r(0),a=l(r(83)),s=l(r(31)),u=r(122);function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));e=(0,o.defaultValue)(e,{}),r.styleOrigin=void 0,r.symbolLayers=new a.default;var n=(0,o.defaultValue)(e.symbolLayers,[]);if(n instanceof Array&&n.length>0)for(var i=0;i<n.length;i++)r.symbolLayers.add((0,u.createSymbol3DLayer)(n[i]));return r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),n(t,[{key:"toJSON",value:function(){var e=[];return this.symbolLayers.forEach(function(t){e.push(t.toJSON())}),{type:this.type,styleOrigin:this.styleOrigin,symbolLayers:e}}}]),t}();i.default.Symbol.Symbol3D=c,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(18)),o=h(r(13)),a=r(0),s=h(r(2)),u=r(3),l=h(r(20)),c=h(r(33)),f=r(26);function h(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(e=(0,a.defaultValue)(e,{}),r.coordinates=(0,a.defaultValue)(e.coordinates,[]),r.type=u.GeometryType.polygon,!Array.isArray(r.coordinates))throw new Error("坐标必须为数组");for(var n=0;n<r.coordinates.length;n++){var i=r.coordinates[n];if(i.length<4)throw new Error("每个环至少有四个点");if(i[i.length-1].length!==i[0].length)throw new Error("首尾点维度不相等");for(var o=0;o<i[i.length-1].length;o++)if(i[i.length-1][o]!==i[0][o])throw new Error("第一个位置和最后一个位置不相等")}return 3===r.coordinates[0][0].length&&(r.hasZ=!0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"addRing",value:function(e){if(!Array.isArray(e))throw new Error("传入参数错误");var t=[];return e.forEach(function(e){t.push(l.default.toCoordinates(e))}),this.coordinates.push(t),this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),this}},{key:"removeRing",value:function(e){if(e=Number(e),!this._isValidate(e,0))return null;var t=JSON.parse(JSON.stringify(this._cloneCoordinates()[e]));this.coordinates.splice(e,1),this.coordinates=JSON.parse(JSON.stringify(this.coordinates));for(var r=[],n=0;n<t.length;n++){var i=new l.default({coordinates:t[n]});r.push(i)}return r}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.coordinates=JSON.parse(JSON.stringify(this.coordinates)),e.extent=this.extent.toJSON(),e.centroid=this.centroid.toJSON(),e}},{key:"contains",value:function(e){if(!e)throw new Error("传入参数错误");var t=i.polygon(this._cloneCoordinates()),r=i.point(l.default.toCoordinates(e));return i.booleanPointInPolygon(r,t)}},{key:"getPoint",value:function(e,t){if(!this._isValidate(e,t))return null;var r=this._cloneCoordinates()[e];return new l.default({coordinates:r[t]})}},{key:"insertPoint",value:function(e,t,r){if(!this._isValidate(e,t))return null;var n=this.coordinates[e];return Array.isArray(n)&&n.splice(t,0,r._cloneCoordinates()),this.coordinates[e]=n,this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),this}},{key:"removePoint",value:function(e,t){if(!this._isValidate(e,t))return null;var r=this.clone(),n=r.coordinates[e],i=new l.default({coordinates:n[t]});return Array.isArray(n)&&n.splice(t,1),this.coordinates=r.coordinates,this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),i}},{key:"setPoint",value:function(e,t,r){if(!this._isValidate(e,t))return this;r instanceof l.default&&(r=r._cloneCoordinates());var n=this.coordinates[e];return Array.isArray(n)&&n.splice(t,1,r),this.coordinates[e]=n,this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),this}},{key:"toXMl",value:function(){return""}},{key:"toString",value:function(){for(var e="",t=0;t<this.coordinates.length;t++){for(var r=this.coordinates[t],n=0;n<r.length;n++)for(var i=r[n],o=0;o<i.length;o++)e+=i[o]+",";e=e.substring(0,e.length-1),e+="|"}return e=e.substring(0,e.length-1)}},{key:"toOldIGSGeometry",value:function(){for(var e=[],t={Rings:[],GID:0},r={},n=this.coordinates,i=0;i<n.length;i++){r={Arcs:[]};for(var o=[],a=0;a<n[i].length;a++){var s=n[i][a];o.push({x:s[0],y:s[1]})}r.Arcs.push({Dots:o,ArcID:i}),t.Rings.push(r)}return e.push(t),{RegGeom:e}}},{key:"getIGSType",value:function(){return u.IGSGeometryType.polygon}},{key:"toDots",value:function(){for(var e=[],t=this.coordinates[0],r=0;r<t.length;r++)e.push({x:t[r][0],y:t[r][1]});return e}},{key:"isClockwise",value:function(e){var t=!1,r=[];if(!(e instanceof Array))throw new Error("ring不是数组类型!");for(var n=0;n<e.length;n++)if(e[n]instanceof l.default)r.push(e[n].coordinates);else{if(!(e[n]instanceof Array&&e[n].length>=2))throw new Error("ring中的点不是数组或Point类型!");r.push(e[n])}var o=i.lineString(r);return t=i.booleanClockwise(o),t}},{key:"_isValidate",value:function(e,t){var r=this.coordinates.length;if(!(0,a.isNumber)(e)||e<0||e>=r)return!1;var n=this.coordinates[e].length;return!(!(0,a.isNumber)(t)||t<0||t>=n)}},{key:"_cloneCoordinates",value:function(){return JSON.parse(JSON.stringify(this.coordinates))}},{key:"_calcExtent",value:function(e,t){return(0,f.calcExtent)(e,t,u.GeometryType.polygon,this.spatialReference)}},{key:"_isSelfIntersecting",value:function(){var e=i.polygon(this.coordinates);return i.kinks(e).features.length>0}},{key:"_setCentroid",value:function(){var e=i.polygon(this.coordinates),t=i.centroid(e);if(this.hasZ){for(var r=0,n=0,o=0;o<this.coordinates.length;o++){r+=this.coordinates[o].length;for(var a=0;a<this.coordinates[o].length;a++)n+=this.coordinates[o][a][2]}return n/=r,new l.default({coordinates:[t.geometry.coordinates[0],t.geometry.coordinates[1],n],spatialReference:this.spatialReference})}return new l.default({coordinates:[t.geometry.coordinates[0],t.geometry.coordinates[1]],spatialReference:this.spatialReference})}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromExtent",value:function(e){var r=[];if(e instanceof c.default){var n=[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]];if(e&&e.hasZ){var i=e.zmin+.5*(e.zmax-e.zmin);n.forEach(function(e){i.push(e)})}r.push(n)}return new t({coordinates:r,spatialReference:e.spatialReference.clone()})}},{key:"fromJSON",value:function(e){return new t(e=(0,a.defaultValue)(e,{}))}}]),t}();Object.defineProperties(p.prototype,{extent:{configurable:!1,get:function(){return this._calcExtent(this.coordinates,this.hasZ)}},isSelfIntersecting:{configurable:!1,get:function(){return this._isSelfIntersecting()}},centroid:{configurable:!1,get:function(){return this._setCentroid()}}}),s.default.Geometry.Polygon=p,t.default=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertIGSClippingString=t.ServiceConfigResponseInterceptors=t.ServiceConfigRequestInterceptors=t.ServiceConfigToken=t.formatBaseUrl=t.getWFSFeature=t.getParametersObject=t.getWFSInfoFromXML=t.getWMTSInfoFromXML=t.getDoc=t.getWMSInfoFromXML=t.checkPathParameters=t.getParameters=t.checkParam=t.fromQueryResult=void 0;var n=r(4),i=function(e){return e&&e.__esModule?e:{default:e}}(r(37)),o=r(0),a=r(1),s=r(21);function u(e,t,r){for(var i="",a=function(a){var s=(0,o.defaultValue)(t[e[a]],r[e[a]].default);if(void 0!==s){var u="";if((0,o.isNull)(r[e[a]].process))switch(r[e[a]].type){case"String":case"Number":case"Boolean":i+="&"+(r[e[a]].alias||e[a])+"="+encodeURIComponent(s);break;case"Geometry":case"Point":case"MultiPoint":case"Extent":case"Circle":case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":i+="&"+e[a]+"="+encodeURIComponent(s.toString())+"&geometryType="+encodeURIComponent(s.getIGSType());break;case"layerDefs":u="[";for(var l=function(e){s[e]instanceof Object&&!(s[e]instanceof Array)&&(u+="{",Object.keys(s[e]).forEach(function(t){s[e].hasOwnProperty(t)&&(u+='"'+t+'":"'+s[e][t]+'",')}),u=u.substring(0,u.length-1),u+="},")},c=0;c<s.length;c++)l(c);s.length>0&&(u=u.substring(0,u.length-1)),"[]"!==(u+="]")&&(i+="&"+e[a]+"="+encodeURIComponent(u));break;case"OutStatistics":u+="[";for(var f=function(e){s[e]instanceof Object&&!(s[e]instanceof Array)&&(u+="{",Object.keys(s[e]).forEach(function(t){s[e].hasOwnProperty(t)&&("statisticType"!==t&&"onStatisticField"!==t&&"outStatisticFieldName"!==t||(u+='"'+t+'":"'+s[e][t]+'",'))}),u=u.substring(0,u.length-1),u+="},")},h=0;h<s.length;h++)f(h);s.length>0&&(u=u.substring(0,u.length-1)),"[]"!==(u+="]")&&(i+="&"+e[a]+"="+encodeURIComponent(u));break;case"FeatureSet":u="&"+e[a]+"="+encodeURIComponent(JSON.stringify(t[e[a]].toGeoJSON())),i+=u;break;case"FeatureCollection":i+="&"+e[a]+"="+encodeURIComponent(JSON.stringify(t[e[a]]));break;default:i+="&"+e[a]+"="+encodeURIComponent(s)}else if("string"==typeof r[e[a]].process)switch(r[e[a]].process){case"igsGeometryServer":i+="&"+e[a]+"="+encodeURIComponent(JSON.stringify(s.toGeoJSON()))+"&srs=",s.spatialReference?s.spatialReference instanceof n.SpatialReference?i+=encodeURIComponent(s.spatialReference.toString()):s.spatialReference instanceof Object&&!(s.spatialReference instanceof Array)?i+=encodeURIComponent(s.spatialReference.wkt?s.spatialReference.wkt:"EPSG:4326"):"string"==typeof s.spatialReference&&(i+=encodeURIComponent(s.spatialReference)):i+=encodeURIComponent("EPSG:4326");break;case"igsGeometryServerNoSRS":i+="&"+e[a]+"="+encodeURIComponent(JSON.stringify(s.toGeoJSON()));break;case"igsRange$":i+="&"+(r[e[a]].alias||e[a])+"="+encodeURIComponent(s.toIGSOldString());break;case"igsGeometryOld":"Point"===s.type||"LineString"===s.type?"Point"===s.type&&!0===s.hasZ?i+="&"+e[a]+"="+encodeURIComponent(s.toString()+","+(t.distance||r.distance.default))+"&geometryType="+encodeURIComponent(s.getIGSType()):i+="&"+e[a]+"="+encodeURIComponent(s.toString()+";"+(t.distance||r.distance.default))+"&geometryType="+encodeURIComponent(s.getIGSType()):i+="&"+e[a]+"="+encodeURIComponent(s.toString())+"&geometryType="+encodeURIComponent(s.getIGSType());break;default:i+="&"+e[a]+"="+encodeURIComponent(s.toString())+"&geometryType="+encodeURIComponent(s.getIGSType())}else r[e[a]].process instanceof Function&&(i+=r[e[a]].process(t[e[a]],r[e[a]].default))}},s=0;s<e.length;s++)a(s);return i}function l(e,t,r){for(var n={},i=0;i<e.length;i++){var a=(0,o.defaultValue)(t[e[i]],r[e[i]].default);if(void 0!==a)if((0,o.isNull)(r[e[i]].process))switch(r[e[i]].type){case"String":case"Number":case"Boolean":default:n[r[e[i]].alias||e[i]]=a;break;case"Geometry":case"Point":case"MultiPoint":case"Extent":case"Circle":case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":n[r[e[i]].alias||e[i]]=a.toString()+"&geometryType="+a.getIGSType()}else if("string"==typeof r[e[i]].process)switch(r[e[i]].process){case"igsDots":n[r[e[i]].alias||"Dots"]=a.toDots();break;case"toOldIGSGeometry":switch(a.type){case"Point":n[r[e[i]].alias||"Pnt"]=a.toOldIGSGeometry().PntGeom[0];break;case"LineString":n[r[e[i]].alias||"Line"]=a.toOldIGSGeometry().LinGeom[0];break;case"Polygon":n[r[e[i]].alias||"Reg"]=a.toOldIGSGeometry().RegGeom[0]}break;default:n[r[e[i]].alias||e[i]]=a}else r[e[i]].process instanceof Function&&(n[e[i]]=r[e[i]].process(t[e[i]],r[e[i]].default))}return encodeURIComponent(JSON.stringify(n))}function c(e,t){if("function"==typeof e)return e(t);var r=void 0;switch(e){case"String":r=(0,o.isString)(t);break;case"Number":r=(0,o.isNumber)(t);break;case"Boolean":r=(0,o.isBoolean)(t);break;case"Extent":r=t instanceof n.Extent;break;case"Geometry":r=t instanceof n.Geometry;break;case"Point":r=t instanceof n.Point;break;case"Polygon":r=t instanceof n.Polygon;break;case"MultiPolygon":r=t instanceof n.MultiPolygon;break;case"Circle":r=t instanceof n.Circle;break;case"LineString":r=t instanceof n.LineString;break;case"MultiLineString":r=t instanceof n.MultiLineString;break;case"LineString | MultiLineString":r=t instanceof n.LineString||t instanceof n.MultiLineString;break;case"Polygon | Extent":r=t instanceof n.Polygon||t instanceof n.Extent;break;case"Array":r=t instanceof Array;break;case"Object":r=t instanceof Object;break;case"OutStatistics":r=function(e){if(!(e instanceof Array))return!1;for(var t=0;t<e.length;t++){if(!(e[t]instanceof Object))return!1;if(e[t]instanceof Object&&e[t]instanceof Array)return!1;if(!e[t].hasOwnProperty("statisticType")||!e[t].hasOwnProperty("onStatisticField")||!e[t].hasOwnProperty("outStatisticFieldName"))return!1;if((0,o.isNull)(e[t].statisticType)||(0,o.isNull)(e[t].onStatisticField)||(0,o.isNull)(e[t].outStatisticFieldName))return!1;if(!(0,o.isString)(e[t].statisticType)||!(0,o.isString)(e[t].onStatisticField)||!(0,o.isString)(e[t].outStatisticFieldName))return!1}return!0}(t);break;case"FeatureSet":r=t instanceof a.FeatureSet;break;case"FeatureCollection":r=t instanceof Object&&!(t instanceof Array)&&t.hasOwnProperty("features")&&"FeatureCollection"===t.type;break;case"Color":r=t instanceof a.Color;break;default:r=(0,o.isString)(t)}return r}function f(e,t){var r=void 0;if("1.1.1"===t)(r={minx:e.attributes.minx.value,miny:e.attributes.miny.value,maxx:e.attributes.maxx.value,maxy:e.attributes.maxy.value}).crs=e.attributes.SRS.value;else{var n=e.attributes.CRS.value,i=Number(n.split(":")[1]);(r=i>=2327&&i<=2442||i>=4491&&i<=4554||i>=21413&&i<=21423||i>=21473&&i<=21483?{minx:e.attributes.miny.value,miny:e.attributes.minx.value,maxx:e.attributes.maxy.value,maxy:e.attributes.maxx.value}:4326===i||4214===i||4490===i||4610===i?{minx:e.attributes.miny.value,miny:e.attributes.minx.value,maxx:e.attributes.maxy.value,maxy:e.attributes.maxx.value}:{minx:e.attributes.minx.value,miny:e.attributes.miny.value,maxx:e.attributes.maxx.value,maxy:e.attributes.maxy.value}).crs=e.attributes.CRS.value}return r}function h(e,t,r){if("Name"===e.nodeName)t.name=e.innerHTML;else if("Abstract"===e.nodeName)t.abstract=e.innerHTML;else if("Title"===e.nodeName){var n=e.innerHTML;n.indexOf(":")>-1&&(n=n.split(":")[1]),t.title=n}else if("SRS"===e.nodeName)t.crs.push(e.innerHTML);else if("CRS"===e.nodeName)t.crs.push(e.innerHTML);else if("BoundingBox"===e.nodeName){var i={};i=r.corporation===a.WMTSCorporation.corporationZD?f(e,r.version):(r.corporation,a.WMTSCorporation.corporationArcGIS,f(e,r.version)),t.boundingBox.push(i)}else"LatLonBoundingBox"===e.nodeName?t.latLonBoundingBox={minx:e.attributes.miny.value,miny:e.attributes.minx.value,maxx:e.attributes.maxy.value,maxy:e.attributes.maxx.value}:"EX_GeographicBoundingBox"===e.nodeName&&(t.geographicBoundingBox={westBoundLongitude:e.childNodes[0].innerHTML,eastBoundLongitude:e.childNodes[1].innerHTML,southBoundLatitude:e.childNodes[2].innerHTML,northBoundLatitude:e.childNodes[3].innerHTML})}function p(e){var t={attributes:{}};if(e.attributes)for(var r=0;r<e.attributes.length;r++)t.attributes[e.attributes[r].nodeName]=e.attributes[r].value;if(t.children={},e.childNodes){for(var n=0;n<e.childNodes.length;n++)t.children[e.childNodes[n].nodeName]=p(e.childNodes[n]);0===e.childNodes.length&&(t[e.nodeName]=e.textContent)}return t}function d(e){var t="EPSG:4326";if(!e)return t;var r=e.getAttribute("srsName");if(!r)return t;var n=r.match(/EPSG::\d+/);return n[0]&&(t="EPSG:"+n[0].replace("EPSG::","")),t}t.fromQueryResult=function(e){function t(e){if(!e.hasOwnProperty("SFEleArray")||!e.hasOwnProperty("AttStruct")||e.hasOwnProperty("SFEleArray")&&!e.SFEleArray||e.hasOwnProperty("AttStruct")&&!e.AttStruct)return[];for(var t=e.SFEleArray,r=e.AttStruct,i=new a.FeatureSet({spatialReference:new n.SpatialReference("EPSG:0000")}),o=void 0,s=void 0,u=void 0,l=0;l<t.length;l++){for(var c={},f=0;f<t[l].AttValue.length;f++)""!==t[l].AttValue[f]&&(c[r.FldName[f]]=t[l].AttValue[f]);if(t[l].fGeom)switch(t[l].ftype){case 1:var h=t[l].fGeom.PntGeom;u=[];for(var p=0;p<h.length;p++){var d=h[p].Dot;u.push([d.x,d.y])}s=new n.MultiPoint({coordinates:u});break;case 2:var y=t[l].fGeom.LinGeom;u=[];for(var g=0;g<y.length;g++){for(var v=y[g].Line.Arcs[0].Dots,m=[],_=0;_<v.length;_++)m.push([v[_].x,v[_].y]);u.push(m)}s=new n.MultiLineString({coordinates:u});break;case 3:default:var b=t[l].fGeom.RegGeom;u=[];for(var S=0;S<b.length;S++){for(var x=b[S].Rings[0].Arcs[0].Dots,w=[],O=0;O<x.length;O++)w.push([x[O].x,x[O].y]);for(var P=[w],E=1;E<b[S].Rings.length;E++){for(var k=b[S].Rings[E].Arcs[0].Dots,T=[],M=0;M<k.length;M++)T.push([k[M].x,k[M].y]);P.push(T)}u.push(P)}s=new n.MultiPolygon({coordinates:u})}var I=void 0;if(t[l].GraphicInfo){var L=t[l].GraphicInfo;switch(L.InfoType){case 1:I=L.PntInfo;break;case 2:I=L.LinInfo;break;case 3:default:I=L.RegInfo}}o=new a.Feature({id:t[l].FID,attributes:c,geometry:s,symbol:I}),i.features.push(o)}return i}if(e instanceof Array){for(var r=[],i=0;i<e.length;i++)r.push(t(e[i]));return r}return[t(e)]},t.checkParam=function(e,t){var r=!0,n="",a="",s=void 0,f="";try{var h=!0;if(Object.keys(t).forEach(function(r){if(e.hasOwnProperty(r)&&t.hasOwnProperty(r)||t.hasOwnProperty(r)&&t[r].required){if(t[r].required)if((0,o.isNull)(t[r].oneOf)){if((0,o.isNull)(e[r]))throw s=r,new Error("isNull")}else{var n=!1;(0,o.isNull)(e[r])&&(n=!0);for(var i=0;i<t[r].oneOf.length;i++)if(!(0,o.isNull)(e[t[r].oneOf[i]])){n=!1;break}if(n)throw s=r+","+t[r].oneOf.toString(),new Error("isNull")}if((0,o.isNull)(e[r])||(h=c(t[r].type,e[r])),!h)throw s=r,new Error("wrongType")}}),h){var p=[];Object.keys(t).forEach(function(e){t.hasOwnProperty(e)&&p.push(e)}),f=e.useObject?l(p,e,t):u(p,e,t)}}catch(e){switch(r=!1,e.message){case"isNull":n=s+"值不能为空!",a="isNull",i.default.error(n);break;case"wrongType":n=s+"类型错误!",a="isWrongType",i.default.error(n);break;default:n=s+"值不能为空!",a="isNull",i.default.error(n)}}return{isChecked:r,errorMessage:n,errorType:a,queryString:f}},t.getParameters=u,t.checkPathParameters=function(e,t){var r="",n="",a=!0;try{Object.keys(e).forEach(function(n){if(e.hasOwnProperty(n)){if(!t.hasOwnProperty(n))throw r="isNull",a=!1,new Error(n+"不能为空!");var i=t[n];if((0,o.isNull)(i))throw r="isNull",a=!1,new Error(n+"不能为空!");if(!c(e[n].type,t[n]))throw r="isWrongType",a=!1,new Error(n+"类型错误!")}})}catch(e){return i.default.error(e),{isChecked:a,errorMessage:n=e,errorType:r}}return{isChecked:a,errorMessage:n,errorType:r}},t.getWMSInfoFromXML=function(e,t,r){var n=(0,s.initCorporationType)(r),i="1.0";n===a.WMTSCorporation.corporationZD&&r.indexOf("igs/rest/ogc/doc")<0&&(i="2.0");for(var o={boundingBox:[],layer:[],crs:[]},u=e.childNodes,l=0;l<u.length;l++)if(("WMT_MS_Capabilities"===u[l].nodeName||"WMS_Capabilities"===u[l].nodeName)&&u[l].childNodes.length>0){for(var c=u[l].childNodes,f=0;f<c.length;f++)if("Capability"===c[f].nodeName){for(var p=c[f].childNodes,d=0;d<p.length;d++)if("Layer"===p[d].nodeName){for(var y=p[d].childNodes,g=0;g<y.length;g++)if("Layer"===y[g].nodeName){for(var v=y[g].childNodes,m={boundingBox:[],crs:[]},_=0;_<v.length;_++)h(v[_],m,{corporation:n,version:t,igsVersion:i});o.layer.push(m)}else h(y[g],o,{corporation:n,version:t,igsVersion:i});break}break}break}return o},t.getDoc=function(e){var t=null;return window.DOMParser?t=(new DOMParser).parseFromString(e,"text/xml"):((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)),t},t.getWMTSInfoFromXML=function(e){for(var t=e.childNodes,r={layers:[],tileMatrixSets:[],XMLInfo:{}},n=0;n<t.length;n++)if("Capabilities"===t[n].nodeName){for(var i=t[n].childNodes,o=0;o<i.length;o++){if("Contents"===i[o].nodeName)for(var a=i[o].childNodes,s=0;s<a.length;s++)if("Layer"===a[s].nodeName){for(var u={infoFormat:[],tileMatrixSetLink:[]},l=a[s].childNodes,c=0;c<l.length;c++)if("ows:Title"===l[c].nodeName)u.title=l[c].innerHTML;else if("ows:Identifier"===l[c].nodeName)u.identifier=l[c].innerHTML;else if("ows:BoundingBox"===l[c].nodeName){for(var f={},h=0;h<l[c].childNodes.length;h++)"ows:LowerCorner"===l[c].childNodes[h].nodeName&&(f.lowerCorner=l[c].childNodes[h].innerHTML),"ows:UpperCorner"===l[c].childNodes[h].nodeName&&(f.upperCorner=l[c].childNodes[h].innerHTML);u.boundingBox=f}else if("Style"===l[c].nodeName){for(var d={},y=0;y<l[c].childNodes.length;y++)"ows:Identifier"===l[c].childNodes[y].nodeName&&(d.identifier=l[c].childNodes[y].innerHTML),"ows:Title"===l[c].childNodes[y].nodeName&&(d.title=l[c].childNodes[y].innerHTML);u.Style=d}else if("Format"===l[c].nodeName)u.format=l[c].innerHTML;else if("InfoFormat"===l[c].nodeName)u.infoFormat.push(l[c].innerHTML);else if("TileMatrixSetLink"===l[c].nodeName){for(var g=l[c].childNodes,v={tileMatrixSetLimits:[]},m=0;m<g.length;m++)if("TileMatrixSet"===g[m].nodeName)v.tileMatrixSet=g[m].innerHTML;else if("TileMatrixSetLimits"===g[m].nodeName)for(var _=g[m].childNodes,b=0;b<_.length;b++){for(var S=_[b].childNodes,x={},w=0;w<S.length;w++)"TileMatrix"===S[w].nodeName?x.tileMatrix=S[w].innerHTML:"MinTileRow"===S[w].nodeName?x.minTileRow=S[w].innerHTML:"MaxTileRow"===S[w].nodeName?x.maxTileRow=S[w].innerHTML:"MinTileCol"===S[w].nodeName?x.minTileCol=S[w].innerHTML:"MaxTileCol"===S[w].nodeName&&(x.maxTileCol=S[w].innerHTML);v.tileMatrixSetLimits.push(x)}u.tileMatrixSetLink.push(v)}r.layers.push(u)}else if("TileMatrixSet"===a[s].nodeName){for(var O=a[s].childNodes,P={tileMatrix:[]},E=0;E<O.length;E++)if("ows:Title"===O[E].nodeName)P.title=O[E].innerHTML;else if("ows:Abstract"===O[E].nodeName)P.abstract=O[E].innerHTML;else if("ows:Identifier"===O[E].nodeName)P.identifier=O[E].innerHTML;else if("ows:SupportedCRS"===O[E].nodeName)P.supportedCRS=O[E].innerHTML;else if("TileMatrix"===O[E].nodeName){for(var k=O[E].childNodes,T={},M=0;M<k.length;M++)"ows:Identifier"===k[M].nodeName?T.identifier=k[M].innerHTML:"ScaleDenominator"===k[M].nodeName?T.scaleDenominator=k[M].innerHTML:"TopLeftCorner"===k[M].nodeName?T.topLeftCorner=k[M].innerHTML:"TileWidth"===k[M].nodeName?T.tileWidth=k[M].innerHTML:"TileHeight"===k[M].nodeName?T.tileHeight=k[M].innerHTML:"MatrixWidth"===k[M].nodeName?T.matrixWidth=k[M].innerHTML:"MatrixHeight"===k[M].nodeName&&(T.matrixHeight=k[M].innerHTML);P.tileMatrix.push(T)}r.tileMatrixSets.push(P)}r.XMLInfo[i[o].nodeName]=p(i[o])}break}return r},t.getWFSInfoFromXML=function(e){for(var t=e.childNodes,r={featureTypeList:[],version:"1.0.0"},n=e.firstChild.attributes,i=0;i<n.length;i++)if(n[i].name&&"version"===n[i].name.toLowerCase()){r.version=n[i].nodeValue;break}for(var o=0;o<t.length;o++)if("wfs:WFS_Capabilities"===t[o].nodeName)for(var a=t[o].childNodes,s=0;s<a.length;s++)if("FeatureTypeList"===a[s].nodeName){for(var u=a[s].childNodes,l=0;l<u.length;l++)if("FeatureType"===u[l].nodeName){for(var c={},f=u[l].childNodes,h=0;h<f.length;h++)"name"===f[h].nodeName.toLowerCase()?c.name=f[h].innerHTML:"title"===f[h].nodeName.toLowerCase()?c.title=f[h].innerHTML:"abstract"===f[h].nodeName.toLowerCase()?c.abstract=f[h].innerHTML:"defaultsrs"===f[h].nodeName.toLowerCase()?c.defaultSRS=f[h].innerHTML:"ows:wgs84boundingbox"===f[h].nodeName.toLowerCase()&&(c.WGS84BoundingBox={lowerCorner:f[h].childNodes[0].innerHTML,UpperCorner:f[h].childNodes[1].innerHTML});r.featureTypeList.push(c)}break}return r},t.getParametersObject=l,t.getWFSFeature=function(e,t){var r=e.childNodes[0].childNodes,i=new a.FeatureSet;t=(0,o.defaultValue)(t,"2.0.0");for(var s=0;s<r.length;s++){for(var u=r[s].childNodes[0].childNodes,l={},c=void 0,f=0;f<u.length;f++)if(u[f].nodeName.indexOf(":the_geom")>-1){var h=u[f],p=d(h.childNodes[0]),y=Number(p.split(":")[1]);if(i.spatialReference=new n.SpatialReference(p),h.childNodes[0].nodeName.indexOf("MultiSurface")>-1){var g=h.childNodes[0].childNodes;if(1===g.length){for(var v=g[0].childNodes[0].childNodes,m=0;m<v.length;m++)if(v[m].nodeName.indexOf("exterior")>-1){var _=v[m].childNodes[0].childNodes[0].innerHTML.split(" "),b=[];switch(t){case"2.0.0":case"1.1.0":default:for(var S=0;S<_.length;S+=2)[4326,4490,4610,4214].indexOf(y)>-1||y>=2327&&y<=2442||y>=4491&&y<=4554||y>=21413&&y<=21423||y>=21473&&y<=21483?b.push([Number(_[S+1]),Number(_[S])]):b.push([Number(_[S]),Number(_[S+1])]);break;case"1.0.0":for(var x=0;x<_.length;x+=2)b.push([Number(_[x]),Number(_[x+1])])}c=new n.Polygon({coordinates:[b],spatialReference:new n.SpatialReference(p)})}}else g.length}else if(h.childNodes[0].nodeName.indexOf("MultiCurve")>-1){var w=h.childNodes[0].childNodes;if(1===w.length){for(var O=w[0].childNodes[0].childNodes,P=0;P<O.length;P++)if(O[P].nodeName.indexOf("posList")>-1){var E=O[P].innerHTML.split(" "),k=[];switch(t){case"2.0.0":case"1.1.0":default:if([4326,4490,4610,4214].indexOf(y)>-1||y>=2327&&y<=2442||y>=4491&&y<=4554||y>=21413&&y<=21423||y>=21473&&y<=21483)for(var T=0;T<E.length;T+=2)k.push([Number(E[T+1]),Number(E[T])]);else for(var M=0;M<E.length;M+=2)k.push([Number(E[M]),Number(E[M+1])]);break;case"1.0.0":for(var I=0;I<E.length;I+=2)k.push([Number(E[I]),Number(E[I+1])])}c=new n.LineString({coordinates:k,spatialReference:new n.SpatialReference(p)})}}else w.length}else if(h.childNodes[0].nodeName.indexOf("MultiPoint")>-1){var L=h.childNodes[0].childNodes;if(1===L.length){var C=L[0].childNodes[0].childNodes[0].innerHTML.split(" "),N=void 0;switch(t){case"2.0.0":case"1.1.0":default:N=[4326,4490,4610,4214].indexOf(y)>-1||y>=2327&&y<=2442||y>=4491&&y<=4554||y>=21413&&y<=21423||y>=21473&&y<=21483?[Number(C[1]),Number(C[0])]:[Number(C[0]),Number(C[1])];break;case"1.0.0":N=[Number(C[0]),Number(C[1])]}c=new n.Point({coordinates:N,spatialReference:new n.SpatialReference(p)})}else L.length}}else{var R=u[f].nodeName;l[R=R.split(":")[1]]=u[f].innerHTML}var j=new a.Feature({geometry:c,attributes:l});i.features.push(j)}return i},t.formatBaseUrl=function(e){var t=e.indexOf("?");if(t<0)return{baseUrl:e,params:{}};var r=e.substring(0,t),n=e.substring(t+1,e.length);return{baseUrl:r,paramString:n?"&"+n:""}},t.ServiceConfigToken=function(e){var t="";return e&&e.tokenKey&&e.tokenValue&&(t=e.tokenKey+"="+e.tokenValue),t},t.ServiceConfigRequestInterceptors=function(e,t){t=(0,o.defaultValue)(t,"");var r=e.request.interceptors,n=decodeURI(t);if(r&&r instanceof Array)for(var i="",a=0;a<r.length;a++){var s=r[a].urls,u=r[a].before;if(s){if("string"==typeof s){var l=decodeURI(s);if(n.indexOf(l)>-1&&u&&u instanceof Function){var c=u(t);c&&(i+=c)}}else if(s instanceof Array)for(var f=0;f<s.length;f++){var h=decodeURI(s[f]);if(n.indexOf(h)>-1&&u&&u instanceof Function){var p=u(t);p&&(i+=p)}}}else if(u&&u instanceof Function){var d=u(t);d&&(i+=d)}i&&(t=i)}return t},t.ServiceConfigResponseInterceptors=function(e,t,r){t=(0,o.defaultValue)(t,"");var n=e.request.interceptors,i=decodeURI(t);if(n&&n instanceof Array)for(var a=0;a<n.length;a++){var s=n[a].urls,u=n[a].after;if(!s||s instanceof Array&&0===s.length){if(u&&u instanceof Function){var l=u(r);if(l)return l}}else if("string"==typeof s){var c=decodeURI(s);if(i.indexOf(c)>-1&&u&&u instanceof Function){var f=u(r);if(f)return f}}else if(s instanceof Array)for(var h=0;h<s.length;h++){var p=decodeURI(s[h]);if(i.indexOf(p)>-1&&u&&u instanceof Function){var d=u(r);if(d)return d}}}return r},t.convertIGSClippingString=function(e){if(!Array.isArray(e)||0===e.length)return"";var t=[];return e.forEach(function(e){var r="";e.forEach(function(e){r+=e[0]+","+e[1]+","}),r=r.substring(0,r.length-1),t.push(r)}),1===t.length?t[0]:t.join("|")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(0);var o=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,i.defaultValue)(t,{}),(0,i.extend)(this,t),this.Caption=void 0!==t.Caption?t.Caption:null,this.IsVisible=void 0===t.IsVisible||t.IsVisible,this.MaxScale=void 0!==t.MaxScale?parseFloat(t.MaxScale):0,this.MinScale=void 0!==t.MinScale?parseFloat(t.MinScale):0,this.RegInfo=void 0!==t.RegInfo?t.RegInfo:null,this.LinInfo=void 0!==t.LinInfo?t.LinInfo:null,this.PntInfo=void 0!==t.PntInfo?t.PntInfo:null};t.default=o,n.Zondy.Object.Theme.CThemeInfo=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(0),a=r(3);var s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.id=(0,o.defaultValue)(e.id,(0,o.getGUID)()),r.layer=(0,o.defaultValue)(e.layer,void 0),r.sublayers=(0,o.defaultValue)(e.sublayers,new i.Collection),r.title=(0,o.defaultValue)(e.title||e.layerName,void 0),r._visible=(0,o.defaultValue)(e.visible,!0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Evented),n(t,[{key:"toJSON",value:function(){var e=[];return this.sublayers.forEach(function(r){e.push((0,o.toJSON)(r,t))}),{id:this.id,sublayers:e,title:this.title,visible:this.visible}}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();Object.defineProperties(s.prototype,{visible:{get:function(){return this._visible},set:function(e){if(this._visible=e,this.layer&&this.layer.refresh)switch(this.layer.type){case a.LayerType.wms:this.layer.setSubLayer(this)}}}}),i.Zondy.Layer.SubLayer=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createVisualVariable=t.OpacityVariable=t.SizeVariable=t.ColorVariable=t.VisualVariable=void 0;var n=r(0),i=l(r(40)),o=l(r(69)),a=l(r(403)),s=l(r(405)),u=l(r(407));function l(e){return e&&e.__esModule?e:{default:e}}t.VisualVariable=o.default,t.ColorVariable=a.default,t.SizeVariable=s.default,t.OpacityVariable=u.default,t.createVisualVariable=function(e){switch((e=(0,n.defaultValue)(e,{})).type){case i.default.color:return new a.default(e);case i.default.size:return new s.default(e);case i.default.opacity:return new u.default(e);default:n.Log.error("视觉变量传入type类型参数有误!")}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(4),o=r(0),a=c(r(70)),s=c(r(41)),u=r(3),l=r(1);c(r(165));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"parseTileInfo1",value:function(e){e||o.Log.error("tileInfo未定义");var t=e.tileWidth,r=e.tileHeight,n=e.lods,u=e.originX,l=e.originY;return new s.default({origin:new i.Point({coordinates:[u,l]}),lods:n.map(function(e){return a.default.fromJSON(e)}),size:[t,r]})}},{key:"parseTileInfo2",value:function(e){e||o.Log.error("tileInfo未定义");var t=e.cols,r=e.rows,n=e.dpi,u=e.format,l=e.origin,c=e.lods,f=e.spatialReference;return new s.default({dpi:n,format:u,origin:new i.Point({coordinates:[l.x,l.y],spatialReference:new i.SpatialReference(f)}),lods:c.map(function(e){return a.default.fromJSON(e)}),size:[t,r],spatialReference:new i.SpatialReference(f)})}},{key:"parseArcgisTileInfo",value:function(e){e||o.Log.error("tileInfo未定义");var t=e.cols,r=e.rows,n=e.dpi,u=e.format,l=e.origin,c=e.lods,f=e.spatialReference;return new s.default({dpi:n,format:u,origin:new i.Point({coordinates:[l.x,l.y],spatialReference:new i.SpatialReference({wkid:f.latestWkid||f.wkid})}),lods:c.map(function(e){return a.default.fromJSON(e)}),size:[t,r],spatialReference:new i.SpatialReference({wkid:f.latestWkid||f.wkid})})}},{key:"parseWMSTileInfo",value:function(t){t||o.Log.error("wmsLayer未定义");var r=t.extent,n=Math.max(t.imageWidth,t.imageHeight),i=t.spatialReferences[0];return e.generateTileInfo(r,n,i)}},{key:"generateTileInfo",value:function(e,t,r){e&&t||o.Log.error("动态计算tileInfo传入参数不合法");var n=Math.max(e.ymax-e.ymin,e.xmax-e.xmin)/t,u=[];u.push(n);for(var l=0;l<20;l++)u.push(u[l]/2);var c=new i.Point({coordinates:[e.xmin,e.ymax],spatialReference:r});return new s.default({origin:c,lods:u.map(function(e,t){return a.default.fromJSON({level:t,resolution:e,scale:96*e/.0254})}),size:[t,t],spatialReference:r})}},{key:"parseWebTileLayerInfo",value:function(e,t,r){e||o.Log.error("IGSMapImageLayer未定义"),r=(0,o.defaultValue)(r,2);var n=e.tileSize,u=(t.xmax-t.xmin)/r/n,l=[];l.push(u);for(var c=0;c<19;c++)l.push(l[c]/2);var f=new i.Point({coordinates:[t.xmin,t.ymax],spatialReference:e.spatialReference}),h=1;return e.spatialReference.isGeographic&&(h=111319490.79327358),new s.default({origin:f,lods:l.map(function(e,t){return a.default.fromJSON({level:t,resolution:e,scale:h*(96*e)/.0254})}),size:[n,n],spatialReference:e.spatialReference})}},{key:"getLods",value:function(e,t,r){for(var n=Math.max(0,r),i=[],o=2*Math.PI*6378137/360,s=0;s<n;s++){var u=e/Math.pow(2,s),l=void 0;l="degree"===t?o*u:96*u/.0254,i.push(new a.default({level:s,resolution:u,scale:l}))}return i}},{key:"getReferenceLayer",value:function(e){for(var t=null,r=null,n=0;n<e.length;n++){var i=e[n];if(i.loaded&&(i.type===u.LayerType.igsTile||i.type===u.LayerType.arcgisTile||i.type===u.LayerType.wmts||i.type===u.LayerType.igsVectorTile||i.type===u.LayerType.arcgisVectorTile||i.type===u.LayerType.webTileLayer)){r=i,t=i.spatialReference;break}}if(!t)for(var o=0;o<e.length;o++){var a=e[o];if(a.loaded&&(a.type===u.LayerType.igsMapImage||a.type===u.LayerType.arcgisMapImage||a.type===u.LayerType.wms||a.type===u.LayerType.igsFeature||a.type===u.LayerType.wfs||a.type===u.LayerType.geojson)){r=a,t=a.spatialReference;break}}return r}},{key:"setLayerSpatialReference",value:function(e,t){t&&e.forEach(function(e){if((e.type===u.LayerType.igsMapImage||e.type===u.LayerType.arcgisMapImage||e.type===u.LayerType.feature)&&e.loaded){var r=!1;e.spatialReference?void 0!==e.spatialReference.wkid&&void 0!==t.wkid?e.spatialReference.wkid!==t.wkid&&(r=!0):e.spatialReference.wkt!==t.wkt&&(r=!0):r=!0,r&&(e.spatialReference=t,e._extentSrc=l.Projection.project(e._extentSrc,t))}})}},{key:"isSameSpatialReference",value:function(e,t){var r=!1,n=void 0,o=void 0,a=void 0,s=void 0,u=void 0,l=void 0;return void 0!==e&&void 0!==t&&(e instanceof i.SpatialReference?(n=e.wkt?e.wkt.toString():void 0,o=e.wkid?e.wkid.toString():void 0):a=e.toString(),t instanceof i.SpatialReference?(s=t.wkt?t.wkt.toString():void 0,u=t.wkid?t.wkid.toString():void 0):l=t.toString()),n&&s&&n===s?r=!0:o&&u&&(o===u||["4326","4490","4610","4214"].indexOf(o)>-1&&["4326","4490","4610","4214"].indexOf(u)>-1||["102113","102100","900913","3857"].indexOf(o)>-1&&["102113","102100","900913","3857"].indexOf(u)>-1)?r=!0:a&&l&&a===l&&(r=!0),r}}]),e}();t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(0),a=r(16);var s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),n=(0,o.defaultValue)(e,{});return r.view=n.view,r.view||o.Log.error("视图对象不存在!"),r.layer=n.layer,r.layer||o.Log.error("图层对象不存在!"),r.innerLayer=null,r.id=r.layer.id,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Evented),n(t,[{key:"onAdd",value:function(e){}},{key:"onRemove",value:function(e){}},{key:"onUpdate",value:function(e){}},{key:"_getLayerViewVisible",value:function(e){var t=void 0;if(void 0===e&&(e=void 0===this.layer.visible||this.layer.visible),e){var r=(0,a.getLayerViewScaleVisible)(this);t=e&&r}else t=e;return t}}]),t}();Object.defineProperties(s.prototype,{innerView:{get:function(){return this.view.getInnerView()}}}),t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VectorTileLayer=t.LOD=t.getFullBaseUrl=t.appendUrlParams=t.TileInfo=t.FeatureCollection=t.getZoomOffset=t.WebTileLayer=t.ArcGISVectorTileLayer=t.VisualVariable=t.OpacityVariable=t.ColorVariable=t.SizeVariable=t.HeatmapColorStop=t.ClusterInfo=t.setElevationInfo=t.Layer=t.TileInfoUtil=t.getIGSDynamicLayer=t.showLayerByScale=t.isCustomSP=t.is4326=t.getUrlType=t.ArcGISTileLayer=t.ArcGISMapImageSubLayer=t.ArcGISMapImageLayer=t.LabelClass=t.Projection=t.Basemap=t.Map=t.M3DModelCacheLayer=t.BaseRenderer=t.HeatmapRenderer=t.RankRenderer=t.RandomRenderer=t.ClusterRenderer=t.SimpleRenderer=t.ClassBreakRenderer=t.UniqueValueRenderer=t.VideoLayer=t.VideoMapLayer=t.TerrainCacheLayer=t.Cesium3DTilesCacheLayer=t.GeoJSONLayer=t.GraphicsLayer=t.GroupLayer=t.MapVLayer=t.EchartsLayer=t.IGSFeatureLayer=t.Scene=t.IGSTileLayer=t.IGSSceneSubLayer=t.IGSSceneLayer=t.IGSMapImageSubLayer=t.IGSMapImageLayer=t.IGSImageLayer=t.IGSVectorTileSubLayer=t.IGSVectorTileLayer=t.WMTSSubLayer=t.WFSLayer=t.WMSSubLayer=t.WMSLayer=t.WMTSLayer=t.OGCLayer=void 0;var n=r(16),i=r(39),o=r(449),a=function(e){return e&&e.__esModule?e:{default:e}}(r(68));t.OGCLayer=n.OGCLayer,t.WMTSLayer=n.WMTSLayer,t.WMSLayer=n.WMSLayer,t.WMSSubLayer=n.WMSSubLayer,t.WFSLayer=n.WFSLayer,t.WMTSSubLayer=n.WMTSSubLayer,t.IGSVectorTileLayer=n.IGSVectorTileLayer,t.IGSVectorTileSubLayer=n.IGSVectorTileSubLayer,t.IGSImageLayer=n.IGSImageLayer,t.IGSMapImageLayer=n.IGSMapImageLayer,t.IGSMapImageSubLayer=n.IGSMapImageSubLayer,t.IGSSceneLayer=n.IGSSceneLayer,t.IGSSceneSubLayer=n.IGSSceneSubLayer,t.IGSTileLayer=n.IGSTileLayer,t.Scene=n.Scene,t.IGSFeatureLayer=n.IGSFeatureLayer,t.EchartsLayer=n.EchartsLayer,t.MapVLayer=n.MapVLayer,t.GroupLayer=n.GroupLayer,t.GraphicsLayer=n.GraphicsLayer,t.GeoJSONLayer=n.GeoJSONLayer,t.Cesium3DTilesCacheLayer=n.Cesium3DTilesCacheLayer,t.TerrainCacheLayer=n.TerrainCacheLayer,t.VideoMapLayer=n.VideoMapLayer,t.VideoLayer=n.VideoLayer,t.UniqueValueRenderer=i.UniqueValueRenderer,t.ClassBreakRenderer=i.ClassBreakRenderer,t.SimpleRenderer=i.SimpleRenderer,t.ClusterRenderer=i.ClusterRenderer,t.RandomRenderer=i.RandomRenderer,t.RankRenderer=i.RankRenderer,t.HeatmapRenderer=i.HeatmapRenderer,t.BaseRenderer=i.BaseRenderer,t.M3DModelCacheLayer=n.M3DModelCacheLayer,t.Map=o.Map,t.Basemap=o.Basemap,t.Projection=n.Projection,t.LabelClass=a.default,t.ArcGISMapImageLayer=n.ArcGISMapImageLayer,t.ArcGISMapImageSubLayer=n.ArcGISMapImageSubLayer,t.ArcGISTileLayer=n.ArcGISTileLayer,t.getUrlType=n.getUrlType,t.is4326=n.is4326,t.isCustomSP=n.isCustomSP,t.showLayerByScale=n.showLayerByScale,t.getIGSDynamicLayer=i.getIGSDynamicLayer,t.TileInfoUtil=n.TileInfoUtil,t.Layer=n.Layer,t.setElevationInfo=n.setElevationInfo,t.ClusterInfo=i.ClusterInfo,t.HeatmapColorStop=i.HeatmapColorStop,t.SizeVariable=i.SizeVariable,t.ColorVariable=i.ColorVariable,t.OpacityVariable=i.OpacityVariable,t.VisualVariable=i.VisualVariable,t.ArcGISVectorTileLayer=n.ArcGISVectorTileLayer,t.WebTileLayer=n.WebTileLayer,t.getZoomOffset=n.getZoomOffset,t.FeatureCollection=n.FeatureCollection,t.TileInfo=n.TileInfo,t.appendUrlParams=n.appendUrlParams,t.getFullBaseUrl=n.getFullBaseUrl,t.LOD=n.LOD,t.VectorTileLayer=n.VectorTileLayer},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VectorTileLayer=t.ColorNameToHexMap=t.GeometryFilter=t.SceneSubLayerType=t.convertIGSClippingString=t.LOD=void 0,t.getFullBaseUrl=t.appendUrlParams=t.TileInfo=t.FetchRequest=t.AreaUnits=t.LinearUnits=t.allSettled=t.inOrderPromise=t.debouncePromise=t.throttle=t.convertImageSourceToBase64=t.isWMSReverse=t.getProjectionSrs=t.FeatureCollection=t.getZoomOffset=t.WebTileLayer=t.ArcGISVectorTileLayer=t.ColorMaterial=t.MaterialType=t.WaveStrength=t.WaterbodySize=t.WaterSymbol3DLayer=t.TextHalo=t.TextSymbol3DLayer=t.Edges3D=t.ExtrudeSymbol3DLayer=t.ObjectSymbol3DLayer=t.IconResource=t.PointSymbol3DOutline=t.IconSymbol3DLayer=t.PatternStyle=t.FillSymbol3DOutline=t.FillSymbol3DLayer=t.ProfileType=t.AnchorType=t.PathSymbol3DLayer=t.LineSymbol3DLayer=t.LineStylePattern3D=t.LinePatternStyle=t.LineStyleMarker3D=t.LineMarkerStyle=t.LineMarkerPlacement=t.LineJoinType=t.LineCapType=t.Symbol3DLayerType=t.Symbol3DLayer=t.Symbol3DVerticalOffset=t.Callout3D=t.LineCallout3D=t.PolygonSymbol3D=t.PointSymbol3D=t.LineSymbol3D=t.LabelSymbol3D=t.Symbol3D=t.RendererUtil=t.VisualVariable=t.OpacityVariable=t.ColorVariable=t.SizeVariable=t.HeatmapColorStop=t.LabelClass=t.ClusterInfo=t.setElevationInfo=t.WMTSCorporation=t.TileInfoUtil=t.BaseFeatureLayerView=t.createSimpleFillSymbolCanvas=t.createSimpleMarkerSymbolCanvas=t.ServiceConfigRequestInterceptors=t.ServiceConfigToken=t.Config=t.editGeometryByArc3=t.editFeatureByArc3=t.Geometry=t.RadiusUnit=t.formatBaseUrl=t.showLayerByScale=t.T=t.proj4=t.EPSG=t.isCustomSP=t.is4326=t.getUrlType=t.PictureFormat=t.UrlServerType=t.SpatialReference=t.LayerView=t.GroupLayerView=t.BaseRendererLayerView=t.BaseGraphicsLayerView=t.SceneView=t.MapView=t.BaseView=t.inputCss=t.getBaseUrl=t.toJSON=t.VideoPixelCoordTransforms=t.GDALComposeGeoTransforms=t.GDALGCPsToGeoTransform=t.GDALInvGeoTransform=void 0,t.GDALApplyGeoTransform=t.getVideoType=t.isObject=t.notNULL=t.cloneObject=t.returnPoint=t.formatPoints=t.newGuid=t.extendDeep=t.isBoolean=t.deepClone=t.isString=t.Log=t.getOutStatisticsParameter=t.getGeometryParameter=t.isNull=t.createGeometry=t.normalize=t.defined=t.defaultValue=t.getGUID=t.bind=t.getParameterString=t.urlAppend=t.transformResult=t.isInTheSameDomain=t.isNumber=t.isArray=t.extend=t.getIGSDynamicLayer=t.BaseRenderer=t.HeatmapRenderer=t.RankRenderer=t.RandomRenderer=t.ClusterRenderer=t.SimpleRenderer=t.ClassBreakRenderer=t.UniqueValueRenderer=t.MapGISTextSymbol=t.PictureFillSymbol=t.PictureMarkerSymbol=t.Symbol=t.TextSymbol=t.SimpleMarkerSymbol=t.SimpleLineSymbol=t.SimpleFillSymbol=t.ShadowMode=t.SceneMode=t.VerticalAlignment=t.HorizontalAlignment=t.ElevationInfo=t.ElevationMode=t.IGSSymbolType=t.SymbolType=t.IGSRendererType=t.SketchEditorToolEventType=t.SketchEditorState=t.SketchEditorEventType=t.SketchEditMode=t.SketchDataType=t.VideoSourceType=t.VectorTileGeometryType=t.RendererType=t.AngleUnit=t.LengthUnit=t.ViewEventType=t.LoadStatus=t.LogType=t.IGSGeometryType=t.TokenAttachType=t.LayerType=t.GeometryType=t.SpatialRelation=t.StatisticType=t.MapEventType=t.LayerEventType=t.FetchMethod=t.ReturnFormat=t.getFeaturesFromFeatureSet=t.Feature=t.FeatureSet=t.Collection=t.ErrorEvent=t.FeatureRender=t.Evented=t.Zondy=t.Event=t.LayerEvent=t.Font=t.Color=t.GeometryEngine=t.MultiPoint=t.MultiLineString=t.MultiPolygon=t.Circle=t.Point=t.LineString=t.Polygon=t.Extent=t.VideoMapView=void 0,t.SketchEditorEvent=t.SketchStyle=t.SketchFreehandPolygonDrawTool=t.SketchFreehandPolylineDrawTool=t.SketchExtentDrawTool=t.SketchCircleDrawTool=t.SketchPolygonDrawTool=t.SketchPolylineDrawTool=t.SketchPointDrawTool=t.SketchBaseDrawTool=t.SketchEditor3D=t.SketchEditor=t.SketchEditorVideoBase=t.SketchEditorVideo=t.Projection=t.Layer=t.VideoLayer=t.VideoMapLayer=t.TerrainCacheLayer=t.Cesium3DTilesCacheLayer=t.GeoJSONLayer=t.GraphicsLayer=t.GroupLayer=t.MapVLayer=t.EchartsLayer=t.IGSFeatureLayer=t.Scene=t.IGSTileLayer=t.IGSSceneSubLayer=t.IGSSceneLayer=t.IGSMapImageSubLayer=t.IGSMapImageLayer=t.IGSImageLayer=t.IGSVectorTileSubLayer=t.IGSVectorTileLayer=t.WMTSSubLayer=t.WFSLayer=t.WMSSubLayer=t.WMSLayer=t.WMTSLayer=t.ArcGISTileLayer=t.ArcGISMapImageSubLayer=t.M3DModelCacheLayer=t.ArcGISMapImageLayer=t.Basemap=t.Map=t.ArcGISVectorTileServer=t.ArcGISFeatureServer=t.ArcGISGeometryServer=t.ThemesInfo=t.ThemeServer=t.ItemValue=t.FolderInfoAttribute=t.FolderInfo=t.ExpInfo=t.CUniqueThemeInfo=t.CUniqueTheme=t.CThemeInfo=t.CTheme=t.CSimpleTheme=t.CRegInfo=t.CRangeThemeInfo=t.CRangeTheme=t.CRandomTheme=t.CPntInfo=t.CMultiClassTheme=t.CLinInfo=t.CGraduatedSymbolTheme=t.CFourColorTheme=t.CDotDensityTheme=t.CChartType=t.CChartThemeRepresentInfo=t.CChartThemeInfo=t.CChartTheme=t.CChartLabelFormat=t.CAnnInfo=t.CAllOtherDataItemInfoSource=t.ArcGISMapServer=t.WFSServer=t.WMTSServer=t.WMSServer=t.SceneServer=t.ResourceServer=t.PlotServer=t.VectorTileServer=t.TileServer=t.RootServer=t.SecurityServer=t.TerrainServer=t.PoiServer=t.Cesium3DTilesServer=t.AddressServer=t.GeometryServer=t.ImageServer=t.M3DServer=t.FeatureServer=t.MapServer=t.ResponseInterceptor=t.RequestInterceptor=t.FetchServer=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(98)),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(18)),o=r(12),a=r(394),s=r(56),u=r(4),l=r(1),c=r(0),f=r(3),h=r(11),p=r(172),d=r(456),y=r(96),g=r(465);var v={FetchServer:o.FetchServer,RequestInterceptor:o.RequestInterceptor,ResponseInterceptor:o.ResponseInterceptor,MapServer:o.MapServer,FeatureServer:o.FeatureServer,M3DServer:o.M3DServer,ImageServer:o.ImageServer,GeometryServer:o.GeometryServer,AddressServer:o.AddressServer,Cesium3DTilesServer:o.Cesium3DTilesServer,PoiServer:o.PoiServer,TerrainServer:o.TerrainServer,SecurityServer:o.SecurityServer,RootServer:o.RootServer,TileServer:o.TileServer,VectorTileServer:o.VectorTileServer,PlotServer:o.PlotServer,ResourceServer:o.ResourceServer,SceneServer:o.SceneServer,WMSServer:o.WMSServer,WMTSServer:o.WMTSServer,WFSServer:o.WFSServer,ArcGISMapServer:o.ArcGISMapServer,CAllOtherDataItemInfoSource:o.CAllOtherDataItemInfoSource,CAnnInfo:o.CAnnInfo,CChartLabelFormat:o.CChartLabelFormat,CChartTheme:o.CChartTheme,CChartThemeInfo:o.CChartThemeInfo,CChartThemeRepresentInfo:o.CChartThemeRepresentInfo,CChartType:o.CChartType,CDotDensityTheme:o.CDotDensityTheme,CFourColorTheme:o.CFourColorTheme,CGraduatedSymbolTheme:o.CGraduatedSymbolTheme,CLinInfo:o.CLinInfo,CMultiClassTheme:o.CMultiClassTheme,CPntInfo:o.CPntInfo,CRandomTheme:o.CRandomTheme,CRangeTheme:o.CRangeTheme,CRangeThemeInfo:o.CRangeThemeInfo,CRegInfo:o.CRegInfo,CSimpleTheme:o.CSimpleTheme,CTheme:o.CTheme,CThemeInfo:o.CThemeInfo,CUniqueTheme:o.CUniqueTheme,CUniqueThemeInfo:o.CUniqueThemeInfo,ExpInfo:o.ExpInfo,FolderInfo:o.FolderInfo,FolderInfoAttribute:o.FolderInfoAttribute,ItemValue:o.ItemValue,ThemeServer:o.ThemeServer,ThemesInfo:o.ThemesInfo,ArcGISGeometryServer:o.ArcGISGeometryServer,ArcGISFeatureServer:o.ArcGISFeatureServer,ArcGISVectorTileServer:o.ArcGISVectorTileServer,Map:s.Map,Basemap:s.Basemap,ArcGISMapImageLayer:s.ArcGISMapImageLayer,M3DModelCacheLayer:s.M3DModelCacheLayer,ArcGISMapImageSubLayer:s.ArcGISMapImageSubLayer,ArcGISTileLayer:s.ArcGISTileLayer,WMTSLayer:s.WMTSLayer,WMSLayer:s.WMSLayer,WMSSubLayer:s.WMSSubLayer,WFSLayer:s.WFSLayer,WMTSSubLayer:s.WMTSSubLayer,IGSVectorTileLayer:s.IGSVectorTileLayer,IGSVectorTileSubLayer:s.IGSVectorTileSubLayer,IGSImageLayer:s.IGSImageLayer,IGSMapImageLayer:s.IGSMapImageLayer,IGSMapImageSubLayer:s.IGSMapImageSubLayer,IGSSceneLayer:s.IGSSceneLayer,IGSSceneSubLayer:s.IGSSceneSubLayer,IGSTileLayer:s.IGSTileLayer,Scene:s.Scene,IGSFeatureLayer:s.IGSFeatureLayer,EchartsLayer:s.EchartsLayer,MapVLayer:s.MapVLayer,GroupLayer:s.GroupLayer,GraphicsLayer:s.GraphicsLayer,GeoJSONLayer:s.GeoJSONLayer,Cesium3DTilesCacheLayer:s.Cesium3DTilesCacheLayer,TerrainCacheLayer:s.TerrainCacheLayer,VideoMapLayer:s.VideoMapLayer,VideoLayer:s.VideoLayer,Layer:s.Layer,Projection:l.Projection,SketchEditorVideo:d.SketchEditorVideo,SketchEditorVideoBase:y.SketchEditorVideoBase,SketchEditor:y.SketchEditor,SketchEditor3D:y.SketchEditor3D,SketchBaseDrawTool:y.SketchBaseDrawTool,SketchPointDrawTool:y.SketchPointDrawTool,SketchPolylineDrawTool:y.SketchPolylineDrawTool,SketchPolygonDrawTool:y.SketchPolygonDrawTool,SketchCircleDrawTool:y.SketchCircleDrawTool,SketchExtentDrawTool:y.SketchExtentDrawTool,SketchFreehandPolylineDrawTool:y.SketchFreehandPolylineDrawTool,SketchFreehandPolygonDrawTool:y.SketchFreehandPolygonDrawTool,SketchStyle:y.SketchStyle,SketchEditorEvent:y.SketchEditorEvent,VideoMapView:a.VideoMapView,Extent:u.Extent,Polygon:u.Polygon,LineString:u.LineString,Point:u.Point,Circle:u.Circle,MultiPolygon:u.MultiPolygon,MultiLineString:u.MultiLineString,MultiPoint:u.MultiPoint,GeometryEngine:u.GeometryEngine,Color:l.Color,Font:l.Font,LayerEvent:l.LayerEvent,Event:l.Event,Zondy:l.Zondy,Evented:l.Evented,FeatureRender:l.FeatureRender,ErrorEvent:l.ErrorEvent,Collection:l.Collection,CollectionFlattener:l.CollectionFlattener,FeatureSet:l.FeatureSet,Feature:l.Feature,getFeaturesFromFeatureSet:l.getFeaturesFromFeatureSet,ReturnFormat:f.ReturnFormat,FetchMethod:f.FetchMethod,LayerEventType:f.LayerEventType,MapEventType:f.MapEventType,StatisticType:f.StatisticType,SpatialRelation:f.SpatialRelation,GeometryType:f.GeometryType,LayerType:f.LayerType,TokenAttachType:f.TokenAttachType,IGSGeometryType:f.IGSGeometryType,LogType:f.LogType,LoadStatus:f.LoadStatus,ViewEventType:f.ViewEventType,LengthUnit:f.LengthUnit,AngleUnit:f.AngleUnit,RendererType:f.RendererType,VectorTileGeometryType:f.VectorTileGeometryType,VideoSourceType:f.VideoSourceType,SketchDataType:f.SketchDataType,SketchEditMode:f.SketchEditMode,SketchEditorEventType:f.SketchEditorEventType,SketchEditorState:f.SketchEditorState,SketchEditorToolEventType:f.SketchEditorToolEventType,IGSRendererType:f.IGSRendererType,SymbolType:f.SymbolType,IGSSymbolType:f.IGSSymbolType,ElevationMode:f.ElevationMode,ElevationInfo:l.ElevationInfo,HorizontalAlignment:f.HorizontalAlignment,VerticalAlignment:f.VerticalAlignment,SceneMode:f.SceneMode,ShadowMode:f.ShadowMode,SimpleFillSymbol:h.SimpleFillSymbol,SimpleLineSymbol:h.SimpleLineSymbol,SimpleMarkerSymbol:h.SimpleMarkerSymbol,TextSymbol:h.TextSymbol,Symbol:h.Symbol,PictureMarkerSymbol:h.PictureMarkerSymbol,PictureFillSymbol:h.PictureFillSymbol,MapGISTextSymbol:h.MapGISTextSymbol,UniqueValueRenderer:s.UniqueValueRenderer,ClassBreakRenderer:s.ClassBreakRenderer,SimpleRenderer:s.SimpleRenderer,ClusterRenderer:s.ClusterRenderer,RandomRenderer:s.RandomRenderer,RankRenderer:s.RankRenderer,HeatmapRenderer:s.HeatmapRenderer,BaseRenderer:s.BaseRenderer,getIGSDynamicLayer:s.getIGSDynamicLayer,extend:c.extend,isArray:c.isArray,isNumber:c.isNumber,isInTheSameDomain:c.isInTheSameDomain,transformResult:c.transformResult,urlAppend:c.urlAppend,getParameterString:c.getParameterString,bind:c.bind,getGUID:c.getGUID,defaultValue:c.defaultValue,defined:c.defined,normalize:c.normalize,createGeometry:c.createGeometry,isNull:c.isNull,getGeometryParameter:c.getGeometryParameter,getOutStatisticsParameter:c.getOutStatisticsParameter,Log:c.Log,isString:c.isString,deepClone:c.deepClone,isBoolean:c.isBoolean,extendDeep:c.extendDeep,newGuid:c.newGuid,formatPoints:c.formatPoints,returnPoint:c.returnPoint,cloneObject:c.cloneObject,notNULL:c.notNULL,isObject:c.isObject,getVideoType:c.getVideoType,GDALApplyGeoTransform:c.GDALApplyGeoTransform,GDALInvGeoTransform:c.GDALInvGeoTransform,GDALGCPsToGeoTransform:c.GDALGCPsToGeoTransform,GDALComposeGeoTransforms:c.GDALComposeGeoTransforms,VideoPixelCoordTransforms:c.VideoPixelCoordTransforms,toJSON:c.toJSON,getBaseUrl:c.getBaseUrl,inputCss:c.inputCss,BaseView:p.BaseView,MapView:p.MapView,SceneView:p.SceneView,BaseGraphicsLayerView:p.BaseGraphicsLayerView,BaseRendererLayerView:p.BaseRendererLayerView,GroupLayerView:p.GroupLayerView,LayerView:p.LayerView,SpatialReference:u.SpatialReference,UrlServerType:f.UrlServerType,PictureFormat:f.PictureFormat,getUrlType:s.getUrlType,is4326:s.is4326,isCustomSP:s.isCustomSP,EPSG:l.EPSG,proj4:n.default,T:i,showLayerByScale:s.showLayerByScale,formatBaseUrl:o.formatBaseUrl,RadiusUnit:f.RadiusUnit,Geometry:u.Geometry,editFeatureByArc3:u.editFeatureByArc3,editGeometryByArc3:u.editGeometryByArc3,Config:o.Config,ServiceConfigToken:o.ServiceConfigToken,ServiceConfigRequestInterceptors:o.ServiceConfigRequestInterceptors,createSimpleMarkerSymbolCanvas:g.createSimpleMarkerSymbolCanvas,createSimpleFillSymbolCanvas:g.createSimpleFillSymbolCanvas,BaseFeatureLayerView:p.BaseFeatureLayerView,TileInfoUtil:s.TileInfoUtil,WMTSCorporation:f.WMTSCorporation,setElevationInfo:s.setElevationInfo,ClusterInfo:s.ClusterInfo,LabelClass:s.LabelClass,HeatmapColorStop:s.HeatmapColorStop,SizeVariable:s.SizeVariable,ColorVariable:s.ColorVariable,OpacityVariable:s.OpacityVariable,VisualVariable:s.VisualVariable,RendererUtil:p.RendererUtil,Symbol3D:h.Symbol3D,LabelSymbol3D:h.LabelSymbol3D,LineSymbol3D:h.LineSymbol3D,PointSymbol3D:h.PointSymbol3D,PolygonSymbol3D:h.PolygonSymbol3D,LineCallout3D:h.LineCallout3D,Callout3D:h.Callout3D,Symbol3DVerticalOffset:h.Symbol3DVerticalOffset,Symbol3DLayer:h.Symbol3DLayer,Symbol3DLayerType:f.Symbol3DLayerType,LineCapType:f.LineCapType,LineJoinType:f.LineJoinType,LineMarkerPlacement:f.LineMarkerPlacement,LineMarkerStyle:f.LineMarkerStyle,LineStyleMarker3D:h.LineStyleMarker3D,LinePatternStyle:f.LinePatternStyle,LineStylePattern3D:h.LineStylePattern3D,LineSymbol3DLayer:h.LineSymbol3DLayer,PathSymbol3DLayer:h.PathSymbol3DLayer,AnchorType:f.AnchorType,ProfileType:f.ProfileType,FillSymbol3DLayer:h.FillSymbol3DLayer,FillSymbol3DOutline:h.FillSymbol3DOutline,PatternStyle:f.PatternStyle,IconSymbol3DLayer:h.IconSymbol3DLayer,PointSymbol3DOutline:h.PointSymbol3DOutline,IconResource:h.IconResource,ObjectSymbol3DLayer:h.ObjectSymbol3DLayer,ExtrudeSymbol3DLayer:h.ExtrudeSymbol3DLayer,Edges3D:h.Edges3D,TextSymbol3DLayer:h.TextSymbol3DLayer,TextHalo:h.TextHalo,WaterSymbol3DLayer:h.WaterSymbol3DLayer,WaterbodySize:f.WaterbodySize,WaveStrength:f.WaveStrength,MaterialType:f.MaterialType,ColorMaterial:h.ColorMaterial,ArcGISVectorTileLayer:s.ArcGISVectorTileLayer,WebTileLayer:s.WebTileLayer,getZoomOffset:s.getZoomOffset,FeatureCollection:s.FeatureCollection,getProjectionSrs:c.getProjectionSrs,isWMSReverse:c.isWMSReverse,convertImageSourceToBase64:c.convertImageSourceToBase64,throttle:c.throttle,debouncePromise:c.debouncePromise,inOrderPromise:c.inOrderPromise,allSettled:c.allSettled,LinearUnits:f.LinearUnits,AreaUnits:f.AreaUnits,FetchRequest:o.FetchRequest,TileInfo:s.TileInfo,appendUrlParams:s.appendUrlParams,getFullBaseUrl:s.getFullBaseUrl,LOD:s.LOD,SceneSubLayerType:f.SceneSubLayerType,VectorTileLayer:s.VectorTileLayer};window.MapGISCommon=v,t.FetchServer=o.FetchServer,t.RequestInterceptor=o.RequestInterceptor,t.ResponseInterceptor=o.ResponseInterceptor,t.MapServer=o.MapServer,t.FeatureServer=o.FeatureServer,t.M3DServer=o.M3DServer,t.ImageServer=o.ImageServer,t.GeometryServer=o.GeometryServer,t.AddressServer=o.AddressServer,t.Cesium3DTilesServer=o.Cesium3DTilesServer,t.PoiServer=o.PoiServer,t.TerrainServer=o.TerrainServer,t.SecurityServer=o.SecurityServer,t.RootServer=o.RootServer,t.TileServer=o.TileServer,t.VectorTileServer=o.VectorTileServer,t.PlotServer=o.PlotServer,t.ResourceServer=o.ResourceServer,t.SceneServer=o.SceneServer,t.WMSServer=o.WMSServer,t.WMTSServer=o.WMTSServer,t.WFSServer=o.WFSServer,t.ArcGISMapServer=o.ArcGISMapServer,t.CAllOtherDataItemInfoSource=o.CAllOtherDataItemInfoSource,t.CAnnInfo=o.CAnnInfo,t.CChartLabelFormat=o.CChartLabelFormat,t.CChartTheme=o.CChartTheme,t.CChartThemeInfo=o.CChartThemeInfo,t.CChartThemeRepresentInfo=o.CChartThemeRepresentInfo,t.CChartType=o.CChartType,t.CDotDensityTheme=o.CDotDensityTheme,t.CFourColorTheme=o.CFourColorTheme,t.CGraduatedSymbolTheme=o.CGraduatedSymbolTheme,t.CLinInfo=o.CLinInfo,t.CMultiClassTheme=o.CMultiClassTheme,t.CPntInfo=o.CPntInfo,t.CRandomTheme=o.CRandomTheme,t.CRangeTheme=o.CRangeTheme,t.CRangeThemeInfo=o.CRangeThemeInfo,t.CRegInfo=o.CRegInfo,t.CSimpleTheme=o.CSimpleTheme,t.CTheme=o.CTheme,t.CThemeInfo=o.CThemeInfo,t.CUniqueTheme=o.CUniqueTheme,t.CUniqueThemeInfo=o.CUniqueThemeInfo,t.ExpInfo=o.ExpInfo,t.FolderInfo=o.FolderInfo,t.FolderInfoAttribute=o.FolderInfoAttribute,t.ItemValue=o.ItemValue,t.ThemeServer=o.ThemeServer,t.ThemesInfo=o.ThemesInfo,t.ArcGISGeometryServer=o.ArcGISGeometryServer,t.ArcGISFeatureServer=o.ArcGISFeatureServer,t.ArcGISVectorTileServer=o.ArcGISVectorTileServer,t.Map=s.Map,t.Basemap=s.Basemap,t.ArcGISMapImageLayer=s.ArcGISMapImageLayer,t.M3DModelCacheLayer=s.M3DModelCacheLayer,t.ArcGISMapImageSubLayer=s.ArcGISMapImageSubLayer,t.ArcGISTileLayer=s.ArcGISTileLayer,t.WMTSLayer=s.WMTSLayer,t.WMSLayer=s.WMSLayer,t.WMSSubLayer=s.WMSSubLayer,t.WFSLayer=s.WFSLayer,t.WMTSSubLayer=s.WMTSSubLayer,t.IGSVectorTileLayer=s.IGSVectorTileLayer,t.IGSVectorTileSubLayer=s.IGSVectorTileSubLayer,t.IGSImageLayer=s.IGSImageLayer,t.IGSMapImageLayer=s.IGSMapImageLayer,t.IGSMapImageSubLayer=s.IGSMapImageSubLayer,t.IGSSceneLayer=s.IGSSceneLayer,t.IGSSceneSubLayer=s.IGSSceneSubLayer,t.IGSTileLayer=s.IGSTileLayer,t.Scene=s.Scene,t.IGSFeatureLayer=s.IGSFeatureLayer,t.EchartsLayer=s.EchartsLayer,t.MapVLayer=s.MapVLayer,t.GroupLayer=s.GroupLayer,t.GraphicsLayer=s.GraphicsLayer,t.GeoJSONLayer=s.GeoJSONLayer,t.Cesium3DTilesCacheLayer=s.Cesium3DTilesCacheLayer,t.TerrainCacheLayer=s.TerrainCacheLayer,t.VideoMapLayer=s.VideoMapLayer,t.VideoLayer=s.VideoLayer,t.Layer=s.Layer,t.Projection=l.Projection,t.SketchEditorVideo=d.SketchEditorVideo,t.SketchEditorVideoBase=y.SketchEditorVideoBase,t.SketchEditor=y.SketchEditor,t.SketchEditor3D=y.SketchEditor3D,t.SketchBaseDrawTool=y.SketchBaseDrawTool,t.SketchPointDrawTool=y.SketchPointDrawTool,t.SketchPolylineDrawTool=y.SketchPolylineDrawTool,t.SketchPolygonDrawTool=y.SketchPolygonDrawTool,t.SketchCircleDrawTool=y.SketchCircleDrawTool,t.SketchExtentDrawTool=y.SketchExtentDrawTool,t.SketchFreehandPolylineDrawTool=y.SketchFreehandPolylineDrawTool,t.SketchFreehandPolygonDrawTool=y.SketchFreehandPolygonDrawTool,t.SketchStyle=y.SketchStyle,t.SketchEditorEvent=y.SketchEditorEvent,t.VideoMapView=a.VideoMapView,t.Extent=u.Extent,t.Polygon=u.Polygon,t.LineString=u.LineString,t.Point=u.Point,t.Circle=u.Circle,t.MultiPolygon=u.MultiPolygon,t.MultiLineString=u.MultiLineString,t.MultiPoint=u.MultiPoint,t.GeometryEngine=u.GeometryEngine,t.Color=l.Color,t.Font=l.Font,t.LayerEvent=l.LayerEvent,t.Event=l.Event,t.Zondy=l.Zondy,t.Evented=l.Evented,t.FeatureRender=l.FeatureRender,t.ErrorEvent=l.ErrorEvent,t.Collection=l.Collection,t.FeatureSet=l.FeatureSet,t.Feature=l.Feature,t.getFeaturesFromFeatureSet=l.getFeaturesFromFeatureSet,t.ReturnFormat=f.ReturnFormat,t.FetchMethod=f.FetchMethod,t.LayerEventType=f.LayerEventType,t.MapEventType=f.MapEventType,t.StatisticType=f.StatisticType,t.SpatialRelation=f.SpatialRelation,t.GeometryType=f.GeometryType,t.LayerType=f.LayerType,t.TokenAttachType=f.TokenAttachType,t.IGSGeometryType=f.IGSGeometryType,t.LogType=f.LogType,t.LoadStatus=f.LoadStatus,t.ViewEventType=f.ViewEventType,t.LengthUnit=f.LengthUnit,t.AngleUnit=f.AngleUnit,t.RendererType=f.RendererType,t.VectorTileGeometryType=f.VectorTileGeometryType,t.VideoSourceType=f.VideoSourceType,t.SketchDataType=f.SketchDataType,t.SketchEditMode=f.SketchEditMode,t.SketchEditorEventType=f.SketchEditorEventType,t.SketchEditorState=f.SketchEditorState,t.SketchEditorToolEventType=f.SketchEditorToolEventType,t.IGSRendererType=f.IGSRendererType,t.SymbolType=f.SymbolType,t.IGSSymbolType=f.IGSSymbolType,t.ElevationMode=f.ElevationMode,t.ElevationInfo=l.ElevationInfo,t.HorizontalAlignment=f.HorizontalAlignment,t.VerticalAlignment=f.VerticalAlignment,t.SceneMode=f.SceneMode,t.ShadowMode=f.ShadowMode,t.SimpleFillSymbol=h.SimpleFillSymbol,t.SimpleLineSymbol=h.SimpleLineSymbol,t.SimpleMarkerSymbol=h.SimpleMarkerSymbol,t.TextSymbol=h.TextSymbol,t.Symbol=h.Symbol,t.PictureMarkerSymbol=h.PictureMarkerSymbol,t.PictureFillSymbol=h.PictureFillSymbol,t.MapGISTextSymbol=h.MapGISTextSymbol,t.UniqueValueRenderer=s.UniqueValueRenderer,t.ClassBreakRenderer=s.ClassBreakRenderer,t.SimpleRenderer=s.SimpleRenderer,t.ClusterRenderer=s.ClusterRenderer,t.RandomRenderer=s.RandomRenderer,t.RankRenderer=s.RankRenderer,t.HeatmapRenderer=s.HeatmapRenderer,t.BaseRenderer=s.BaseRenderer,t.getIGSDynamicLayer=s.getIGSDynamicLayer,t.extend=c.extend,t.isArray=c.isArray,t.isNumber=c.isNumber,t.isInTheSameDomain=c.isInTheSameDomain,t.transformResult=c.transformResult,t.urlAppend=c.urlAppend,t.getParameterString=c.getParameterString,t.bind=c.bind,t.getGUID=c.getGUID,t.defaultValue=c.defaultValue,t.defined=c.defined,t.normalize=c.normalize,t.createGeometry=c.createGeometry,t.isNull=c.isNull,t.getGeometryParameter=c.getGeometryParameter,t.getOutStatisticsParameter=c.getOutStatisticsParameter,t.Log=c.Log,t.isString=c.isString,t.deepClone=c.deepClone,t.isBoolean=c.isBoolean,t.extendDeep=c.extendDeep,t.newGuid=c.newGuid,t.formatPoints=c.formatPoints,t.returnPoint=c.returnPoint,t.cloneObject=c.cloneObject,t.notNULL=c.notNULL,t.isObject=c.isObject,t.getVideoType=c.getVideoType,t.GDALApplyGeoTransform=c.GDALApplyGeoTransform,t.GDALInvGeoTransform=c.GDALInvGeoTransform,t.GDALGCPsToGeoTransform=c.GDALGCPsToGeoTransform,t.GDALComposeGeoTransforms=c.GDALComposeGeoTransforms,t.VideoPixelCoordTransforms=c.VideoPixelCoordTransforms,t.toJSON=c.toJSON,t.getBaseUrl=c.getBaseUrl,t.inputCss=c.inputCss,t.BaseView=p.BaseView,t.MapView=p.MapView,t.SceneView=p.SceneView,t.BaseGraphicsLayerView=p.BaseGraphicsLayerView,t.BaseRendererLayerView=p.BaseRendererLayerView,t.GroupLayerView=p.GroupLayerView,t.LayerView=p.LayerView,t.SpatialReference=u.SpatialReference,t.UrlServerType=f.UrlServerType,t.PictureFormat=f.PictureFormat,t.getUrlType=s.getUrlType,t.is4326=s.is4326,t.isCustomSP=s.isCustomSP,t.EPSG=l.EPSG,t.proj4=n.default,t.T=i,t.showLayerByScale=s.showLayerByScale,t.formatBaseUrl=o.formatBaseUrl,t.RadiusUnit=f.RadiusUnit,t.Geometry=u.Geometry,t.editFeatureByArc3=u.editFeatureByArc3,t.editGeometryByArc3=u.editGeometryByArc3,t.Config=o.Config,t.ServiceConfigToken=o.ServiceConfigToken,t.ServiceConfigRequestInterceptors=o.ServiceConfigRequestInterceptors,t.createSimpleMarkerSymbolCanvas=g.createSimpleMarkerSymbolCanvas,t.createSimpleFillSymbolCanvas=g.createSimpleFillSymbolCanvas,t.BaseFeatureLayerView=p.BaseFeatureLayerView,t.TileInfoUtil=s.TileInfoUtil,t.WMTSCorporation=f.WMTSCorporation,t.setElevationInfo=s.setElevationInfo,t.ClusterInfo=s.ClusterInfo,t.LabelClass=s.LabelClass,t.HeatmapColorStop=s.HeatmapColorStop,t.SizeVariable=s.SizeVariable,t.ColorVariable=s.ColorVariable,t.OpacityVariable=s.OpacityVariable,t.VisualVariable=s.VisualVariable,t.RendererUtil=p.RendererUtil,t.Symbol3D=h.Symbol3D,t.LabelSymbol3D=h.LabelSymbol3D,t.LineSymbol3D=h.LineSymbol3D,t.PointSymbol3D=h.PointSymbol3D,t.PolygonSymbol3D=h.PolygonSymbol3D,t.LineCallout3D=h.LineCallout3D,t.Callout3D=h.Callout3D,t.Symbol3DVerticalOffset=h.Symbol3DVerticalOffset,t.Symbol3DLayer=h.Symbol3DLayer,t.Symbol3DLayerType=f.Symbol3DLayerType,t.LineCapType=f.LineCapType,t.LineJoinType=f.LineJoinType,t.LineMarkerPlacement=f.LineMarkerPlacement,t.LineMarkerStyle=f.LineMarkerStyle,t.LineStyleMarker3D=h.LineStyleMarker3D,t.LinePatternStyle=f.LinePatternStyle,t.LineStylePattern3D=h.LineStylePattern3D,t.LineSymbol3DLayer=h.LineSymbol3DLayer,t.PathSymbol3DLayer=h.PathSymbol3DLayer,t.AnchorType=f.AnchorType,t.ProfileType=f.ProfileType,t.FillSymbol3DLayer=h.FillSymbol3DLayer,t.FillSymbol3DOutline=h.FillSymbol3DOutline,t.PatternStyle=f.PatternStyle,t.IconSymbol3DLayer=h.IconSymbol3DLayer,t.PointSymbol3DOutline=h.PointSymbol3DOutline,t.IconResource=h.IconResource,t.ObjectSymbol3DLayer=h.ObjectSymbol3DLayer,t.ExtrudeSymbol3DLayer=h.ExtrudeSymbol3DLayer,t.Edges3D=h.Edges3D,t.TextSymbol3DLayer=h.TextSymbol3DLayer,t.TextHalo=h.TextHalo,t.WaterSymbol3DLayer=h.WaterSymbol3DLayer,t.WaterbodySize=f.WaterbodySize,t.WaveStrength=f.WaveStrength,t.MaterialType=f.MaterialType,t.ColorMaterial=h.ColorMaterial,t.ArcGISVectorTileLayer=s.ArcGISVectorTileLayer,t.WebTileLayer=s.WebTileLayer,t.getZoomOffset=s.getZoomOffset,t.FeatureCollection=s.FeatureCollection,t.getProjectionSrs=c.getProjectionSrs,t.isWMSReverse=c.isWMSReverse,t.convertImageSourceToBase64=c.convertImageSourceToBase64,t.throttle=c.throttle,t.debouncePromise=c.debouncePromise,t.inOrderPromise=c.inOrderPromise,t.allSettled=c.allSettled,t.LinearUnits=f.LinearUnits,t.AreaUnits=f.AreaUnits,t.FetchRequest=o.FetchRequest,t.TileInfo=s.TileInfo,t.appendUrlParams=s.appendUrlParams,t.getFullBaseUrl=s.getFullBaseUrl,t.LOD=s.LOD,t.convertIGSClippingString=o.convertIGSClippingString,t.SceneSubLayerType=f.SceneSubLayerType,t.GeometryFilter=o.GeometryFilter,t.ColorNameToHexMap=f.ColorNameToHexMap,t.VectorTileLayer=s.VectorTileLayer},function(e,t,r){"use strict";r.r(t),r.d(t,"default",function(){return i});var n=/[\s_\-\/\(\)]/g;function i(e,t){if(e[t])return e[t];for(var r,i=Object.keys(e),o=t.toLowerCase().replace(n,""),a=-1;++a<i.length;)if((r=i[a]).toLowerCase().replace(n,"")===o)return e[r]}},function(e,t,r){"use strict";r.r(t);var n=r(5);t.default=function(e,t,r){var i=e*r,o=.5*e;return i=Math.pow((1-i)/(1+i),o),Math.tan(.5*(n.HALF_PI-t))/i}},function(e,t,r){"use strict";r.r(t);var n=r(5);t.default=function(e,t){for(var r,i,o=.5*e,a=n.HALF_PI-2*Math.atan(t),s=0;s<=15;s++)if(r=e*Math.sin(a),a+=i=n.HALF_PI-2*Math.atan(t*Math.pow((1-r)/(1+r),o))-a,Math.abs(i)<=1e-10)return a;return-9999}},function(e,t,r){"use strict";r.r(t),t.default=function(e,t,r,n,i){return e*i-t*Math.sin(2*i)+r*Math.sin(4*i)-n*Math.sin(6*i)}},function(e,t,r){"use strict";r.r(t),t.default=function(e){return 1-.25*e*(1+e/16*(3+1.25*e))}},function(e,t,r){"use strict";r.r(t),t.default=function(e){return.375*e*(1+.25*e*(1+.46875*e))}},function(e,t,r){"use strict";r.r(t),t.default=function(e){return.05859375*e*e*(1+.75*e)}},function(e,t,r){"use strict";r.r(t),t.default=function(e){return e*e*e*(35/3072)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={geometry:"Geometry",point:"Point",lineString:"LineString",polygon:"Polygon",multiPoint:"MultiPoint",multiLineString:"MultiLineString",multiPolygon:"MultiPolygon",circle:"Circle",extent:"Extent"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.GeometryType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(1),o=r(3),a=window.fetch,s={commit:function(e,t,r,n){switch(e=e?e.toUpperCase():e){case"GET":return this._get(t,n);case"POST":return this._post(t,r,n);case"PUT":return this._put(t,r,n);case"DELETE":return this._delete(t,r,n);default:return this._get(t,n)}},_get:function(e,t){return t=(0,n.defaultValue)(t,{}),this._fetch(e,void 0,t,o.FetchMethod.get)},_delete:function(e,t,r){return r=(0,n.defaultValue)(r,{}),this._fetch(e,t,r,o.FetchMethod.delete)},_post:function(e,t,r){return r=(0,n.defaultValue)(r,{}),this._fetch(e,t,r,o.FetchMethod.post)},_put:function(e,t,r){return r=(0,n.defaultValue)(r,{}),this._fetch(e,t,r,o.FetchMethod.put)},_fetch:function(e,t,r,i){if((r=(0,n.defaultValue)(r,{})).headers=(0,n.defaultValue)(r.headers,{}),r.requestTimeout=(0,n.defaultValue)(r.requestTimeout,45e3),r.headers["Content-Type"]||(r.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),!(0,n.isNull)(r.tokenKey)&&!(0,n.isNull)(r.tokenValue))switch((0,n.defaultValue)(r.tokenAttachType,o.TokenAttachType.url)){case o.TokenAttachType.url:default:e.indexOf("?")<0?e+="?"+r.tokenKey+"="+r.tokenValue:e+="&"+r.tokenKey+"="+r.tokenValue;break;case o.TokenAttachType.header:r.headers[r.tokenKey]=r.tokenValue;break;case o.TokenAttachType.body:"string"==typeof t?t+="&"+r.tokenKey+"="+r.tokenValue:t instanceof Object&&(t[r.tokenKey]=r.tokenValue)}var s={method:i,body:t,headers:r.headers,credentials:r.withCredentials?"include":"omit",mode:"cors",timeout:r.requestTimeout};return r.responseType&&(s.responseType=r.responseType),a(e,s).then(function(e){return e}).catch(function(e){return e})}};i.Zondy.Service.FetchRequest=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(0),a=r(11);var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.symbol=new a.MapGISTextSymbol(t.symbol),this.renderMode=(0,o.defaultValue)(t.renderMode,"canvas"),this.deconflictionStrategy=(0,o.defaultValue)(t.deconflictionStrategy,"static"),this.maxScale=t.maxScale,this.minScale=t.minScale,this.elevationInfo=new i.ElevationInfo(t.elevationInfo),this.labelPlacement=t.labelPlacement,this.currentAttributeName=t.currentAttributeName,this.labelExpression=t.labelExpression,this.repeatLabel=(0,o.defaultValue)(t.repeatLabel,!0),this.repeatLabelDistance=(0,o.defaultValue)(t.repeatLabelDistance,6e3),this.repeatStartRate=(0,o.defaultValue)(t.repeatStartRate,.3),this.repeatEndRate=(0,o.defaultValue)(t.repeatEndRate,.7),this.lineLabelSpread=(0,o.defaultValue)(t.lineLabelSpread,"auto-spread"),this.labelPositionAlong=(0,o.defaultValue)(t.labelPositionAlong,"middle"),this.skeletonLineStartRate=(0,o.defaultValue)(t.skeletonLineStartRate,.4),this.skeletonLineEndRate=(0,o.defaultValue)(t.skeletonLineEndRate,.6),this.groundScale=(0,o.defaultValue)(t.groundScale,20),this.extendOptions=(0,o.defaultValue)(t.extendOptions,{})}return n(e,[{key:"toJSON",value:function(){return{symbol:this.symbol.toJSON(),renderMode:this.renderMode,deconflictionStrategy:this.deconflictionStrategy,maxScale:this.maxScale,minScale:this.minScale,elevationInfo:this.elevationInfo.toJSON(),labelPlacement:this.labelPlacement,currentAttributeName:this.currentAttributeName,labelExpression:this.labelExpression,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,repeatStartRate:this.repeatStartRate,repeatEndRate:this.repeatEndRate,lineLabelSpread:this.lineLabelSpread,labelPositionAlong:this.labelPositionAlong,skeletonLineStartRate:this.skeletonLineStartRate,skeletonLineEndRate:this.skeletonLineEndRate,groundScale:this.groundScale,extendOptions:(0,o.cloneObject)(this.extendOptions)}}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t=(0,o.defaultValue)(t,{}))}}]),e}();i.Zondy.LabelClass=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(40)),o=r(0),a=r(1),s=r(53);var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.type=i.default.default,this.field=(0,o.defaultValue)(t.field,""),this.valueExpression=(0,o.defaultValue)(t.valueExpression,""),this.valueExpressionTitle=(0,o.defaultValue)(t.valueExpressionTitle,"")}return n(e,[{key:"toJSON",value:function(){var e={};return e.field=this.field,e.valueExpression=this.valueExpression,e.valueExpressionTitle=this.valueExpressionTitle,e}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(e){return e=(0,o.defaultValue)(e,{}),(0,s.createVisualVariable)(e)}}]),e}();a.Zondy.Renderer.VisualVariable.VisualVariable=u,t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1);var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=t||{},this.level=t.level,this.resolution=t.resolution,this.scale=t.scale}return n(e,[{key:"toJSON",value:function(){return{level:this.level,resolution:this.resolution,scale:this.scale}}},{key:"clone",value:function(){return e.fromJSON(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t)}}]),e}();i.Zondy.LOD=o,t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(0),a=r(8);var s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.version=(0,o.defaultValue)(e.version,""),r.customParameters=(0,o.defaultValue)(e.customParameters,{}),r.customLayerParameters=(0,o.defaultValue)(e.customLayerParameters,{}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.Layer),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.version=this.version,e.customParameters=JSON.parse(JSON.stringify(this.customParameters)),e.customLayerParameters=JSON.parse(JSON.stringify(this.customLayerParameters)),e}}]),t}();i.Zondy.Layer.OGCLayer=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(0),a=r(3),s=d(r(55)),u=r(4),l=d(r(171)),c=d(r(95)),f=d(r(448)),h=r(45),p=r(56);function d(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e=(0,o.defaultValue)(e,{}),r._map=null,r._id=(0,o.getGUID)(),r._cursor=(0,o.defaultValue)(e.cursor,void 0),r.scale=(0,o.defaultValue)(e.scale,void 0),r.minScale=void 0,r.maxScale=void 0,r.rotation=0,r.center=(0,o.defaultValue)(e.center,[0,0]),r.minZoom=(0,o.defaultValue)(e.minZoom,0),r.maxZoom=(0,o.defaultValue)(e.maxZoom,19),r.zoom=(0,o.defaultValue)(e.zoom,1),r.popup=void 0,r.stationary=!0,r._spatialReference=new u.SpatialReference("EPSG:4326"),r.layerViews=new i.Collection,r.basemapLayerViews=new i.Collection,r._viewLayersMap=new l.default,r._graphicsLayers=r._viewLayersMap.groupLayer,r._viewLayersGroupLayerView=void 0,r._setViewLayers(r._graphicsLayers),r.allLayerViews=new i.CollectionFlattener({getCollections:function(){return[r.basemapLayerViews,r.layerViews,r._viewLayersGroupLayerView.allLayerViews]},getChildrenFunction:function(e){return e.layerViews}}),r._initMapEventHandlers(),r.setMap(e.map),r._viewId=(0,o.defaultValue)(e.viewId,""),r._innerView=null,r._initCursor(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Evented),n(t,[{key:"setMap",value:function(e){this._map||(this._map=e instanceof l.default?e:l.default.fromJSON(e),this._linkMapEvent(this._map),this._linkLayerEvent(this._map),this._map._loadLayers(),this.groupLayerView=new c.default({layer:this._map.groupLayer,layerViews:this.layerViews,view:this}),this._map.basemap&&this._setBasemapLayerView())}},{key:"getInnerView",value:function(){return this._innerView}},{key:"getInnerLayer",value:function(e){if(e){var t="string"==typeof e?e:e.id;return(this._findLayerViewById(t)||{}).innerLayer}}},{key:"getLayer",value:function(e){return(this._findLayerViewById(e)||{}).layer}},{key:"_setBasemapLayerView",value:function(){this._basemapView=new f.default({baseGroupLayer:this._map.basemap._baseGroupLayer,baseLayerViews:this.basemapLayerViews,view:this}),this.basemapGroupLayerView=this._basemapView.groupLayerView}},{key:"_removeBasemapLayerView",value:function(){this._basemapView=null,this.basemapGroupLayerView=null}},{key:"_linkLayerEvent",value:function(e){var t=this;if(e){var r=function(r){var n=t;e.on(a.LayerEventType[r],function(e){var t=e;t instanceof i.Event?t.addProperty("view",n):t&&(t.view=n),n.fire(a.LayerEventType[r],t)},e)};for(var n in a.LayerEventType)r(n)}}},{key:"_linkMapEvent",value:function(e){var t=this;if(e){var r=function(r){var n=t;e.on(a.MapEventType[r],function(e){var t=e;t instanceof i.Event?t.addProperty("view",n):t&&(t.view=n),n.fire(a.MapEventType[r],t)})};for(var n in a.MapEventType)r(n)}}},{key:"_getLayerView",value:function(e){if(e)return this._findLayerViewById(e.id)}},{key:"_initMapEventHandlers",value:function(){this.on(a.MapEventType.layerLoaded,this._processEvent,this),this.on(a.MapEventType.layerChange,this._processEvent,this),this.on(a.LayerEventType.layerUpdate,this._processEvent,this),this.on(a.MapEventType.basemapChange,this._processEvent,this)}},{key:"_processEvent",value:function(e){e.type===a.MapEventType.layerChange&&this._processLayerChange(e),e.type===a.MapEventType.layerLoaded&&this._processLayerLoad(e),e.type===a.LayerEventType.layerUpdate&&e.layer instanceof p.Layer&&this._updateLayerView(e.layer,e),e.type===a.MapEventType.basemapChange&&e.detail&&(e.detail.find(function(e){return"baseLayers-destroy"===e.action})?this._removeBasemapLayerView(e):e.detail.find(function(e){return"basemap-create"===e.action})&&(this._basemapView||this._setBasemapLayerView(e)))}},{key:"_processLayerLoad",value:function(e){var t=this;if(e){var r=e.addDetail;this._prePromise||(this._prePromise=Promise.resolve()),this._prePromise=this._prePromise.then(function(){return t._loadViewSpatialReference().then(function(e){if(!1!==e){var n=Promise.resolve();return r.forEach(function(e){n=n.then(function(){var r=e.added,n=e.sourceTarget,i=t._findGroupLayerViewById(n.id);if(i)return i.addMany(r).then(function(e){i._fireLayerViewCreatedByLayerViews(e),Array.isArray(e)&&e.forEach(function(e){i._reorderLayerView(e)})})})}),n}}).catch(function(e){o.Log.error(e)})})}}},{key:"_processLayerChange",value:function(e){var t=this;if(e&&this.groupLayerView){var r=e.added,n=e.removed,i=e.moved,a=e.sourceTarget,s=this._findGroupLayerViewById(a.id);if(s){var u=void 0;0===n.length&&0===r.length&&0===i.length?u=s.removeAll():n.length>0&&(u=s.removeMany(n)),u&&u.then(function(){return t._loadViewSpatialReference().then().catch(function(e){o.Log.info(e)})}),i.length>0&&i.forEach(function(e){s.reorder(e)})}}}},{key:"_findGroupLayerViewById",value:function(e){var t=void 0;return e===this.groupLayerView.id?t=this.groupLayerView:this.basemapGroupLayerView&&e===this.basemapGroupLayerView.id?t=this.basemapGroupLayerView:this._viewLayersMap&&this._viewLayersGroupLayerView&&e===this._viewLayersGroupLayerView.id?t=this._viewLayersGroupLayerView:!(t=this.groupLayerView._findFlatLayerViewById(e))&&this.basemapGroupLayerView&&(t=this.basemapGroupLayerView._findFlatLayerViewById(e)),t}},{key:"_loadViewSpatialReference",value:function(){var e=this;return new Promise(function(t,r){e._map._setSpatialReference(e._spatialReference),e._map.getFullExtent(),e._spatialReference?t(!0):r()})}},{key:"_loadLayerViews",value:function(){var e=this;return new Promise(function(t){e._map._spatialReference=e._spatialReference,e._map._fullExtent=e._fullExtent,t()})}},{key:"_addAllLayerViews",value:function(){var e=this,t=[];return this.basemapGroupLayerView&&t.push(this.basemapGroupLayerView.onAdd().then(function(){e.basemapGroupLayerView._fireLayerViewCreatedByLayerViews(e.basemapGroupLayerView.layerViews.items)})),this.groupLayerView&&t.push(this.groupLayerView.onAdd().then(function(){e.groupLayerView._fireLayerViewCreatedByLayerViews(e.groupLayerView.layerViews.items)})),this._viewLayersMap&&this._viewLayersGroupLayerView&&t.push(this._viewLayersGroupLayerView.onAdd().then(function(){e._viewLayersGroupLayerView._fireLayerViewCreatedByLayerViews(e._viewLayersGroupLayerView.layerViews.items)})),(0,h.inOrderPromise)(t)}},{key:"_removeAllLayerViews",value:function(){var e=[];return this.basemapGroupLayerView&&e.push(this.basemapGroupLayerView.onRemove()),this.groupLayerView&&e.push(this.groupLayerView.onRemove()),this._viewLayersMap&&this._viewLayersGroupLayerView&&e.push(this._viewLayersGroupLayerView.onRemove()),(0,h.inOrderPromise)(e)}},{key:"_getFlyToCenter",value:function(e){var t=void 0;if(e.center){if(Array.isArray(e.center)&&e.center.length>1){var r=e.center.length>2?[e.center[0],e.center[1],e.center[2]]:[e.center[0],e.center[1]],n=this._innerView.options&&this._innerView.options.crs?this._innerView.options.crs.code:"EPSG:4326";t=new u.Point({coordinates:r,spatialReference:new u.SpatialReference(n)})}else e.center instanceof u.Point?t=u.Point.fromJSON(e.center):e.center instanceof u.Point||o.Log.error("center类型为不支持的类型!");t.spatialReference.isGeographic||(t=i.Projection.project(t,new u.SpatialReference({wkid:4326})))}return t}},{key:"_getFlyToExtent",value:function(e){var t=void 0;return e.extent&&(e.extent instanceof u.Extent?(t=u.Extent.fromJSON(e.extent)).spatialReference.isGeographic||(t=i.Projection.project(t,new u.SpatialReference({wkid:4326}))):o.Log.error("extent类型为不支持的类型!")),t}},{key:"_updateLayerView",value:function(e,t){var r=this,n=this._findLayerViewById(e.id);return n instanceof s.default?n.onUpdate(t).then(function(){return n}).then(function(n){o.Log.info("更新图层",e),t&&(t.addProperty("view",self),t.addProperty("layerView",n)),r.dispatchEvent(a.LayerEventType.layerViewUpdate,t)}):(o.Log.info("图层更新失败,未找到该类型的视图!"),Promise.resolve())}},{key:"dispatchEvent",value:function(e,t,r){return t instanceof i.LayerEvent&&t.layer&&t.layer.fire(e,t,r),this._map&&this._map.dispatchEvent(e,t,r),this._map&&this._map.basemap&&t.layer&&t.layer._isBasemapLayer&&this._map.basemap.dispatchEvent(e,t,r),this}},{key:"_findLayerViewById",value:function(e){var t=this.allLayerViews.items.find(function(t){return t.id===e});return t||(t=this._viewLayersGroupLayerView.allLayerViews.items.find(function(t){return t.id===e})),t}},{key:"_removeLayerViewById",value:function(e){var t=this._findLayerViewById(e);if(t){var r=t.layer.parent;if(r===this._map.groupLayer)this.layerViews.remove(t);else if(r){var n=this._findLayerViewById(r.id);n instanceof c.default&&n.layerViews.remove(t)}}}},{key:"_showLayerByScale",value:function(){var e=this;this._map.allLayers.forEach(function(t){(0,p.showLayerByScale)(e,t)})}},{key:"_orderLayerView",value:function(e,t){if(e instanceof c.default)this._moveGroupLayerView(e,t);else if(t instanceof c.default){var r=this._getLastLayerView(t);this._moveLayerView(e,r)}else if(t instanceof c.default&&e instanceof c.default){var n=this._getLastLayerView(t);this._moveGroupLayerView(e,n)}else this._moveLayerView(e,t)}},{key:"_isLayerViewSupportReorder",value:function(e){return!(e.layer instanceof p.IGSFeatureLayer||e.layer instanceof p.M3DModelCacheLayer||e.layer instanceof p.IGSSceneLayer||e.layer instanceof p.TerrainCacheLayer||e.layer instanceof p.Cesium3DTilesCacheLayer||e.layer instanceof p.GeoJSONLayer||e.layer instanceof p.WFSLayer||e.layer instanceof p.GroupLayer||e.layer instanceof p.EchartsLayer||e.layer instanceof p.MapVLayer)}},{key:"_moveGroupLayerView",value:function(e,t){var r=this;e.allLayerViews.forEach(function(e){e instanceof c.default?r._moveGroupLayerView(e,t):r._moveLayerView(e,t)})}},{key:"_moveLayerView",value:function(e,t){}},{key:"_getLastLayerView",value:function(e){var t=e.toArray(),r=t[t.length-1];return r instanceof c.default?this._getLastLayerView(r):r}},{key:"_createLayerView",value:function(e){return null}},{key:"_initCursor",value:function(){this._setCursor(this.cursor)}},{key:"_setCursor",value:function(e){this._innerView&&(e&&null!==e?this._innerView._container.style.cursor=e:this._innerView._container.style.removeProperty("cursor"),this._cursor=e)}},{key:"_getTargetExtent",value:function(e){var t=void 0;if(e instanceof u.Geometry)e instanceof u.Extent?t=this._getFlyToExtent({extent:e}):e.extent&&(t=this._getFlyToExtent({extent:e.extent}));else{var r=[],n=void 0;Array.isArray(e)?r=e:e instanceof i.Collection&&(r=e.items),r.forEach(function(e){var t=void 0;e instanceof u.Extent?t=e:e instanceof u.Geometry&&e.extent&&(t=e.extent),t.spatialReference.isGeographic||(t=i.Projection.project(t.clone(),new u.SpatialReference("EPSG:4326"))),n?(n.xmin>t.xmin&&(n.xmin=t.xmin),n.xmax<t.xmax&&(n.xmax=t.xmax),n.ymin>t.ymin&&(n.ymin=t.ymin),n.ymax<t.ymax&&(n.ymax=t.ymax)):n=t}),t=this._getFlyToExtent({extent:n})}return t}},{key:"_setViewLayers",value:function(e){this._linkMapEvent(this._viewLayersMap),this._linkLayerEvent(this._viewLayersMap),this._viewLayersGroupLayerView=new c.default({layer:this._viewLayersMap.groupLayer,view:this})}},{key:"_processGraphicsLayersChange",value:function(e){var t=e.added,r=e.removed;t&&t.length>0&&this._viewLayersMap.addMany(t),r&&r.length>0&&this._viewLayersMap.removeMany(r)}},{key:"toJSON",value:function(){return{}}}]),t}();Object.defineProperties(y.prototype,{map:{get:function(){return this._map},set:function(e){this._map=e}},cursor:{get:function(){return this._cursor},set:function(e){this._setCursor(e)}},spatialReference:{get:function(){return this._spatialReference},set:function(){}}}),t.default=y},function(e,t,r){"use strict";r.r(t);var n=r(182),i=r(188),o=r(189),a=r(192),s=r(194),u=r(195),l=r(58),c=r(102);function f(e,t){if(!(this instanceof f))return new f(e);t=t||function(e){if(e)throw e};var r=Object(n.default)(e);if("object"==typeof r){var o=f.projections.get(r.projName);if(o){if(r.datumCode&&"none"!==r.datumCode){var h=Object(l.default)(s.default,r.datumCode);h&&(r.datum_params=r.datum_params||(h.towgs84?h.towgs84.split(","):null),r.ellps=h.ellipse,r.datumName=h.datumName?h.datumName:r.datumCode)}r.k0=r.k0||1,r.axis=r.axis||"enu",r.ellps=r.ellps||"wgs84",r.lat1=r.lat1||r.lat0;var p=Object(a.sphere)(r.a,r.b,r.rf,r.ellps,r.sphere),d=Object(a.eccentricity)(p.a,p.b,p.rf,r.R_A),y=Object(c.getNadgrids)(r.nadgrids),g=r.datum||Object(u.default)(r.datumCode,r.datum_params,p.a,p.b,d.es,d.ep2,y);Object(i.default)(this,r),Object(i.default)(this,o),this.a=p.a,this.b=p.b,this.rf=p.rf,this.sphere=p.sphere,this.es=d.es,this.e=d.e,this.ep2=d.ep2,this.datum=g,this.init(),t(null,this)}else t(e)}else t(e)}f.projections=o.default,f.projections.start(),t.default=f},function(e,t,r){"use strict";r.r(t),t.default=function(e,t,r,n){return r*=t,t*=t,n[0]*e-r*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}},function(e,t,r){"use strict";r.r(t),t.default=function(e,t,r){var n=t*r;return e/Math.sqrt(1-n*n)}},function(e,t,r){"use strict";r.r(t),t.default=function(e,t,r,n,i){var o,a;o=e/t;for(var s=0;s<15;s++)if(o+=a=(e-(t*o-r*Math.sin(2*o)+n*Math.sin(4*o)-i*Math.sin(6*o)))/(t-2*r*Math.cos(2*o)+4*n*Math.cos(4*o)-6*i*Math.cos(6*o)),Math.abs(a)<=1e-10)return o;return NaN}},function(e,t,r){"use strict";r.r(t),t.default=function(e,t){var r;return e>1e-7?(1-e*e)*(t/(1-(r=e*t)*r)-.5/e*Math.log((1-r)/(1+r))):2*t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={default:"default",line:"simple-line",simpleLine:"simple-line",fill:"simple-fill",simpleFill:"simple-fill",marker:"simple-marker",simpleMarker:"simple-marker",pictureMarker:"picture-marker",text:"text",pictureFill:"picture-fill",mapgisText:"mapgis-text",point3D:"point-3d",polygon3D:"polygon-3d",line3D:"line-3d",label3D:"label-3d"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.SymbolType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={left:"left",right:"right",center:"center"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.HorizontalAlignment=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={baseline:"baseline",top:"top",middle:"middle",bottom:"bottom"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.VerticalAlignment=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={butt:"butt",round:"round",square:"square"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.LineCapType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={bevel:"bevel",miter:"miter",round:"round"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.LineJoinType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0),a=l(r(46)),s=l(r(2)),u=r(24);function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.type="collection",e instanceof t?r._items=e.all():Array.isArray(e)?r._items=e:r._items=[],r._items=r._items.map(function(e){return r.createInstance(e)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),i(t,[{key:"add",value:function(e,t){return this._add(e,t),this._fireCollectionChangeEvent({added:[e],target:this,sourceTarget:this}),this}},{key:"addMany",value:function(e,t){var r=this;if(Array.isArray(e)){var n=e.map(function(e){return r.createInstance(e)}),i=this._getNextIndex(t);n.forEach(function(e,t){r._items.splice(i+t,0,e)}),this._fireCollectionChangeEvent({target:this,sourceTarget:this,added:n})}}},{key:"at",value:function(e){return(e=Number(e))>=0?this._items[e]:this._items[this._items.length-1+e]}},{key:"clone",value:function(){for(var e=[],r=0;r<this._items.length;r++)e.push((0,o.cloneObject)(this.items[r]));return new t(e)}},{key:"concat",value:function(e){var t=e;e instanceof this.constructor?t=e.all():e instanceof Array?t=e:"object"===(void 0===e?"undefined":n(e))&&(t=[],Object.keys(e).forEach(function(r){t.push(e[r])}));var r=this._items;return t.forEach(function(e){r.push(e)}),new this.constructor(r)}},{key:"every",value:function(e){var t=!0;if(!(e instanceof Function))return t=!1;for(var r=0;r<this._items.length;r++)if(!e(this._items[r])){t=!1;break}return t}},{key:"filter",value:function(e){if(e instanceof Function){for(var r=[],n=0;n<this._items.length;n++)e(this._items[n])&&r.push(this._items[n]);return new t(r)}}},{key:"find",value:function(e){if(e instanceof Function){for(var t=void 0,r=0;r<this._items.length;r++)if(e(this._items[r])){t=this._items[r];break}return t}}},{key:"findIndex",value:function(e){return this._items.findIndex(e)}},{key:"flatten",value:function(e){if(e instanceof Function){for(var r=[],n=0;n<this._items.length;n++)r.push(this._items[n]);for(var i=0;i<r.length;i++)r=r.concat(o(r[i],e));return new t(r)}function o(e,r){var n=r(e);if(n){if(n instanceof Array)return n;if(n instanceof t){for(var i=n.toArray(),a=0;a<n._items.length;a++)i=i.concat(o(n._items[a],r));return i}return[n]}return[]}}},{key:"forEach",value:function(e){return this._items.forEach(e)}},{key:"getItemAt",value:function(e){return this._items[e]}},{key:"includes",value:function(e){return this._items.includes(e)}},{key:"indexOf",value:function(e,t){return this._items.indexOf(e,t)}},{key:"join",value:function(e){for(var t="",r=0;r<this._items.length-1;r++)t+=this._items[r]+e;return t+=this._items[this._items.length-1]}},{key:"lastIndexOf",value:function(e,t){for(var r=-1,n=t=(0,o.defaultValue)(t,this._items.length-1);n>=0;n--)if(this._items[n]===e){r=n;break}return r}},{key:"map",value:function(e){var t=this;if(Array.isArray(this._items))return new this.constructor(this._items.map(e));var r={};return Object.keys(this._items).forEach(function(n){r[n]=e(t._items[n],n)}),new this.constructor(r)}},{key:"pop",value:function(){return this._items.pop()}},{key:"push",value:function(e){return this.add(e)}},{key:"reduce",value:function(e,t){var r=this,n=null;return void 0!==t&&(n=t),Array.isArray(this._items)?this._items.forEach(function(t){n=e(n,t)}):Object.keys(this._items).forEach(function(t){n=e(n,r._items[t],t)}),n}},{key:"reduceRight",value:function(e,r){for(var n=[],i=this._items.length-1;i>=0;i--)n.push(this._items[i]);return new t(n).reduce(e,r)}},{key:"remove",value:function(e){var t=this._remove(e);return t&&this._fireCollectionChangeEvent({removed:[e],target:this,sourceTarget:this}),t}},{key:"removeAll",value:function(){this._items=[],this._fireCollectionChangeEvent({target:this,sourceTarget:this})}},{key:"removeAt",value:function(e){var t=this._items.splice(e,1);return this._fireCollectionChangeEvent({target:this,sourceTarget:this}),t}},{key:"removeMany",value:function(e){var t=this;if(Array.isArray(e)){for(var r=[],n=[],i=function(i){var o=t._items.findIndex(function(t){return t===e[i]});o>-1&&(n.push(o),r.push(e[i]))},o=0;o<e.length;o++)i(o);return r.length>0&&(this._items=this._items.filter(function(e,t){return n.every(function(e){return e!==t})}),this._fireCollectionChangeEvent({removed:r,target:this,sourceTarget:this})),r}}},{key:"reorder",value:function(e,t){this._reorder(e,t)&&this._fireCollectionChangeEvent({moved:[e],target:this,sourceTarget:this})}},{key:"reverse",value:function(){var e=[].concat(this._items).reverse();return new this.constructor(e)}},{key:"shift",value:function(){return this._items.shift()}},{key:"slice",value:function(e,t){var r=this._items.slice(e);return void 0!==t&&(r=r.slice(0,t)),new this.constructor(r)}},{key:"some",value:function(e){if(!(e instanceof Function))return!1;for(var t=!1,r=0;r<this._items.length;r++)if(e(this._items[r])){t=!0;break}return t}},{key:"sort",value:function(e){var t=[].concat(this._items);return void 0===e?this.every(function(e){return"number"==typeof e})?t.sort(function(e,t){return e-t}):t.sort():t.sort(e),new this.constructor(t)}},{key:"splice",value:function(e,r){for(var n,i=arguments.length,o=Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];return new t((n=this._items).splice.apply(n,[e,r].concat(o)))}},{key:"toArray",value:function(){for(var e=[],t=0;t<this._items.length;t++)e.push(this.items[t]);return e}},{key:"unshift",value:function(){var e;(e=this._items).unshift.apply(e,arguments)}},{key:"all",value:function(){return this.toArray()}},{key:"unique",value:function(e){var t=void 0;if(void 0===e)t=this._items.filter(function(e,t,r){return r.indexOf(e)===t});else{t=[];for(var r=[],n=0,i=this._items.length;n<i;n+=1){var o=void 0;o=e instanceof Function?e(this._items[n]):this._items[n][e],-1===r.indexOf(o)&&(t.push(this._items[n]),r.push(o))}}return new this.constructor(t)}},{key:"createInstance",value:function(e){return e}},{key:"_fireCollectionChangeEvent",value:function(e){if(this.fire("change",new u.CollectionChangeEvent(e),!1),this.fire("collection-refresh",new u.CollectionChangeEvent(e),!1),this._parentCollection)for(var t=this._parentCollection;t;)t.fire("collection-refresh",new u.CollectionChangeEvent(e),!1),t=t._parentCollection}},{key:"_addParentCollection",value:function(e){this._parentCollection=e}},{key:"_removeParentCollection",value:function(){this._parentCollection=void 0}},{key:"_getNextIndex",value:function(e){return e=(0,o.defaultValue)(e,this._items.length),e=Math.max(0,Math.min(this._items.length,e))}},{key:"_add",value:function(e,t){var r=this.createInstance(e);this._items.splice(this._getNextIndex(t),0,r)}},{key:"_remove",value:function(e){var t=this._items.indexOf(e);return t>-1&&(this._items.splice(t,1),!0)}},{key:"_reorder",value:function(e,t){var r=this._items.length;t=(0,o.defaultValue)(t,r-1);var n=this._items.indexOf(e);return n>-1&&(t=Math.min(Math.max(0,t),r-1))!==n&&(this._items.splice(n,1),this._items.splice(t,0,e),!0)}}],[{key:"isCollection",value:function(e){return e instanceof t}}]),t}();Object.defineProperties(c.prototype,{items:{get:function(){return this._items},set:function(e){var t=this;this._items=e;var r=e.map(function(e){return t.createInstance(e)});this._fireCollectionChangeEvent({target:this,sourceTarget:this,added:r})}}}),s.default.Collection=c,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r(2));var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,i.defaultValue)(t,{}),this.family=(0,i.defaultValue)(t.family,"Microsoft YaHei"),this.size=(0,i.defaultValue)(t.size,12),this.style=(0,i.defaultValue)(t.style,"normal"),this.weight=(0,i.defaultValue)(t.weight,"normal"),this.decoration=(0,i.defaultValue)(t.decoration,"none")}return n(e,[{key:"toJSON",value:function(){var e={};return e.family=this.family,e.size=this.size,e.style=this.style,e.weight=this.weight,e.decoration=this.decoration,e}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t=(0,i.defaultValue)(t,{}))}}]),e}();o.default.Font=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=[{id:2348,name:"高斯大地坐标系_西安80_23带6_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2347,name:"高斯大地坐标系_西安80_22带6_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2346,name:"高斯大地坐标系_西安80_21带6_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2345,name:"高斯大地坐标系_西安80_20带6_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2344,name:"高斯大地坐标系_西安80_19带6_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2343,name:"高斯大地坐标系_西安80_18带6_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2342,name:"高斯大地坐标系_西安80_17带6_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2341,name:"高斯大地坐标系_西安80_16带6_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2340,name:"高斯大地坐标系_西安80_15带6_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2339,name:"高斯大地坐标系_西安80_14带6_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2338,name:"高斯大地坐标系_西安80_13带6_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2390,name:"高斯大地坐标系_西安80_45带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2389,name:"高斯大地坐标系_西安80_44带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2388,name:"高斯大地坐标系_西安80_43带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2387,name:"高斯大地坐标系_西安80_42带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2386,name:"高斯大地坐标系_西安80_41带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2385,name:"高斯大地坐标系_西安80_40带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2384,name:"高斯大地坐标系_西安80_39带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2383,name:"高斯大地坐标系_西安80_38带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2382,name:"高斯大地坐标系_西安80_37带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2381,name:"高斯大地坐标系_西安80_36带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2380,name:"高斯大地坐标系_西安80_35带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2379,name:"高斯大地坐标系_西安80_34带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2378,name:"高斯大地坐标系_西安80_33带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2377,name:"高斯大地坐标系_西安80_32带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2376,name:"高斯大地坐标系_西安80_31带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2375,name:"高斯大地坐标系_西安80_30带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2374,name:"高斯大地坐标系_西安80_29带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2373,name:"高斯大地坐标系_西安80_28带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2372,name:"高斯大地坐标系_西安80_27带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2371,name:"高斯大地坐标系_西安80_26带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2370,name:"高斯大地坐标系_西安80_25带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2327,name:"高斯大地坐标系_西安80_13带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2328,name:"高斯大地坐标系_西安80_14带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2329,name:"高斯大地坐标系_西安80_15带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2330,name:"高斯大地坐标系_西安80_16带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2331,name:"高斯大地坐标系_西安80_17带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2332,name:"高斯大地坐标系_西安80_18带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2333,name:"高斯大地坐标系_西安80_19带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2334,name:"高斯大地坐标系_西安80_20带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2335,name:"高斯大地坐标系_西安80_21带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2336,name:"高斯大地坐标系_西安80_22带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2337,name:"高斯大地坐标系_西安80_23带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2403,name:"高斯大地坐标系_西安80_27带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2404,name:"高斯大地坐标系_西安80_28带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2405,name:"高斯大地坐标系_西安80_29带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2406,name:"高斯大地坐标系_西安80_30带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2407,name:"高斯大地坐标系_西安80_31带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2408,name:"高斯大地坐标系_西安80_32带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2409,name:"高斯大地坐标系_西安80_33带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2410,name:"高斯大地坐标系_西安80_34带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2411,name:"高斯大地坐标系_西安80_35带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2412,name:"高斯大地坐标系_西安80_36带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2413,name:"高斯大地坐标系_西安80_37带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2414,name:"高斯大地坐标系_西安80_38带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2415,name:"高斯大地坐标系_西安80_39带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2416,name:"高斯大地坐标系_西安80_40带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2417,name:"高斯大地坐标系_西安80_41带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2418,name:"高斯大地坐标系_西安80_42带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2419,name:"高斯大地坐标系_西安80_43带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2420,name:"高斯大地坐标系_西安80_44带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2421,name:"高斯大地坐标系_西安80_45带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2349,name:"高斯大地坐标系_西安80_25带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2350,name:"高斯大地坐标系_西安80_26带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2351,name:"高斯大地坐标系_西安80_27带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2352,name:"高斯大地坐标系_西安80_28带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2353,name:"高斯大地坐标系_西安80_29带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2354,name:"高斯大地坐标系_西安80_30带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2355,name:"高斯大地坐标系_西安80_31带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2356,name:"高斯大地坐标系_西安80_32带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2357,name:"高斯大地坐标系_西安80_33带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2358,name:"高斯大地坐标系_西安80_34带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2359,name:"高斯大地坐标系_西安80_35带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2360,name:"高斯大地坐标系_西安80_36带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2361,name:"高斯大地坐标系_西安80_37带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2362,name:"高斯大地坐标系_西安80_38带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2363,name:"高斯大地坐标系_西安80_39带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2364,name:"高斯大地坐标系_西安80_40带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2365,name:"高斯大地坐标系_西安80_41带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2366,name:"高斯大地坐标系_西安80_42带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2367,name:"高斯大地坐标系_西安80_43带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2368,name:"高斯大地坐标系_西安80_44带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:2369,name:"高斯大地坐标系_西安80_45带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"},{id:21413,name:"高斯大地坐标系_北京54_13带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:21414,name:"高斯大地坐标系_北京54_14带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:21415,name:"高斯大地坐标系_北京54_15带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:21416,name:"高斯大地坐标系_北京54_16带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:21417,name:"高斯大地坐标系_北京54_17带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:21418,name:"高斯大地坐标系_北京54_18带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:21419,name:"高斯大地坐标系_北京54_19带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:21420,name:"高斯大地坐标系_北京54_20带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:21421,name:"高斯大地坐标系_北京54_21带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:21422,name:"高斯大地坐标系_北京54_22带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:21423,name:"高斯大地坐标系_北京54_23带6_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2431,name:"高斯大地坐标系_北京54_34带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2401,name:"高斯大地坐标系_北京54_25带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:2402,name:"高斯大地坐标系_北京54_26带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs"},{id:32646,name:"Beijing 1954 / 3-degree Gauss-Kruger CM 102E",type:1,strProject:"+proj=utm +zone=46 +datum=WGS84 +units=m +no_defs"},{id:4502,name:"高斯大地坐标系_中国2000_13带6_北",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4503,name:"高斯大地坐标系_中国2000_14带6_北",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4504,name:"高斯大地坐标系_中国2000_15带6_北",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4505,name:"高斯大地坐标系_中国2000_16带6_北",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4506,name:"高斯大地坐标系_中国2000_17带6_北",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4507,name:"高斯大地坐标系_中国2000_18带6_北",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4508,name:"高斯大地坐标系_中国2000_19带6_北",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4509,name:"高斯大地坐标系_中国2000_20带6_北",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4510,name:"高斯大地坐标系_中国2000_21带6_北",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4511,name:"高斯大地坐标系_中国2000_22带6_北",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4512,name:"高斯大地坐标系_中国2000_23带6_北",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4513,name:"高斯大地坐标系_中国2000_25带6_北",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4514,name:"高斯大地坐标系_中国2000_26带6_北",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4515,name:"高斯大地坐标系_中国2000_27带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4516,name:"高斯大地坐标系_中国2000_28带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4517,name:"高斯大地坐标系_中国2000_29带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4518,name:"高斯大地坐标系_中国2000_30带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4519,name:"高斯大地坐标系_中国2000_31带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4520,name:"高斯大地坐标系_中国2000_32带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4521,name:"高斯大地坐标系_中国2000_33带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4522,name:"高斯大地坐标系_中国2000_34带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4523,name:"高斯大地坐标系_中国2000_35带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4524,name:"高斯大地坐标系_中国2000_36带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4525,name:"高斯大地坐标系_中国2000_37带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4526,name:"高斯大地坐标系_中国2000_38带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4527,name:"高斯大地坐标系_中国2000_39带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4528,name:"高斯大地坐标系_中国2000_40带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4529,name:"高斯大地坐标系_中国2000_41带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4530,name:"高斯大地坐标系_中国2000_42带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4531,name:"高斯大地坐标系_中国2000_43带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4532,name:"高斯大地坐标系_中国2000_44带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4533,name:"高斯大地坐标系_中国2000_45带3_北2",type:0,strProject:"+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4546,name:"高斯大地坐标系_中国2000_37带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4547,name:"高斯大地坐标系_中国2000_38带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:4545,name:"高斯大地坐标系_中国2000_36带3_北",type:1,strProject:"+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{id:3857,name:"Web墨卡托_WGS1984",type:1,strProject:"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"},{id:900913,name:"天地图3857",type:1,strProject:"+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs"},{id:4610,name:"地理坐标系(西安)_度",type:0,strProject:"+proj=longlat +a=6378140 +b=6356755.288157528 +units=degrees +no_defs"},{id:4214,name:"地理坐标系(北京)_度",type:0,strProject:"+proj=longlat +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +no_defs"},{id:4490,name:"中国2000国家大地坐标系_度",type:0,strProject:"+proj=longlat +ellps=GRS80 +units=degrees +no_defs"},{id:4326,name:"WGS1984_度",type:0,strProject:"+proj=longlat +datum=WGS84 +no_defs +type=crs"}]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeaturesFromFeatureSet=t.FeatureSet=t.Feature=void 0;var n=a(r(121)),i=a(r(328)),o=r(329);function a(e){return e&&e.__esModule?e:{default:e}}t.Feature=n.default,t.FeatureSet=i.default,t.getFeaturesFromFeatureSet=o.getFeaturesFromFeatureSet},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=l(r(2)),o=r(0),a=r(3),s=l(r(318)),u=l(r(319));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));e=(0,o.defaultValue)(e,{}),r.type=a.SymbolType.simpleLine,r.cap=(0,o.defaultValue)(e.cap,"round"),r.join=(0,o.defaultValue)(e.join,"round"),r.miterLimit=(0,o.defaultValue)(e.miterLimit,2),r.style=(0,o.defaultValue)(e.style,"solid");var n=(0,o.defaultValue)(e.marker,null);return n?(n.color=(0,o.defaultValue)(n.color,r.color.clone()),r.marker=u.default.fromJSON(n)):r.marker=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),n(t,[{key:"clone",value:function(){return new t(this.toJSON())}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.cap=this.cap,e.join=this.join,e.miterLimit=this.miterLimit,e.style=this.style,e.marker=this.marker?this.marker.toJSON():null,e}}],[{key:"fromJSON",value:function(e){return new t(e=(0,o.defaultValue)(e,{}))}}]),t}();i.default.Symbol.SimpleLineSymbol=c,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,[{key:"drawFeature",value:function(e,t){}},{key:"updateFeature",value:function(e,t,r){}},{key:"clearFeature",value:function(e,t){}},{key:"clear",value:function(e){}}]),e}();t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(0);var o=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,i.defaultValue)(t,{}),this.before=(0,i.defaultValue)(t.success,void 0),this.failure=(0,i.defaultValue)(t.failure,void 0)};n.Zondy.Service.RequestInterceptor=o,t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(0);var o=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,i.defaultValue)(t,{}),this.success=(0,i.defaultValue)(t.success,void 0),this.failure=(0,i.defaultValue)(t.failure,void 0)};n.Zondy.Service.ResponseInterceptor=o,t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(0),o=function(e){var t=(0,i.defaultValue)(e,{});(0,i.extend)(this,t),this.FldNumber=(0,i.defaultValue)(t.FldNumber,0),this.FldName=(0,i.defaultValue)(t.FldName,null),this.FldType=(0,i.defaultValue)(t.FldType,null)};t.default=o,n.Zondy.Object.CAttStruct=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(8),a=r(0),s=r(4);var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(e=(0,a.defaultValue)(e,{}),r.id=(0,a.defaultValue)(e.layerIndex,(0,a.getGUID)()),r.layerIndex=(0,a.defaultValue)(e.layerIndex,0),r.layerRenderIndex=(0,a.defaultValue)(e.layerRenderIndex,0),r.type=(0,a.defaultValue)(e.layerType,void 0),r.renderType=(0,a.defaultValue)(e.layerRenderType,void 0),r.labelingInfo=(0,a.defaultValue)(e.labelingInfo,[]),r.beginLevel=(0,a.defaultValue)(e.beginLevel,-1),r.endLevel=(0,a.defaultValue)(e.endLevel,-1),r._renderer=(0,a.defaultValue)(e.renderer,void 0),e.originalPoints?r.originPoint=new s.Point({coordinates:[e.originalPoints.x,e.originalPoints.y]}):r.originPoint=void 0,e.frameSizes?r.maxFrameSize=e.frameSizes[0]:r.maxFrameSize=void 0,r.extendOptions=(0,a.defaultValue)(e.extendOptions,{}),r.url=(0,a.defaultValue)(e.url||e.gdbpUrl,void 0),e.range?r.range=new s.Extent({xmin:e.range.xMin,ymin:e.range.yMin,xmax:e.range.xMax,ymax:e.range.yMax}):r.range=void 0,e.range3D?r.range3D=new s.Extent({xmin:e.range3D.xMin,ymin:e.range3D.yMin,xmax:e.range3D.xMax,ymax:e.range3D.yMax,zmin:e.range3D.zMin,zmax:e.range3D.zMax}):r.range3D=void 0,r.layer=(0,a.defaultValue)(e.layer,void 0),e.children&&e.children instanceof Array&&e.children.length>0)for(var n=0;n<e.children.length;n++)e.children[n].layer=r.layer,r.sublayers.push(new t(e.children[n]));return r.elevationScale=(0,a.defaultValue)(e.elevationScale,void 0),r.requestVertexNormals=(0,a.defaultValue)(e.requestVertexNormals,!1),r.labelLayer=(0,a.defaultValue)(e.labelLayer,void 0),r.layerName=(0,a.defaultValue)(e.layerName,void 0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.SubLayer),n(t,[{key:"toJSON",value:function(){for(var e=[],r=0;r<this.sublayers.length;r++)e.push((0,a.toJSON)(this.sublayers[r],t));return{id:this.id,sublayers:this.sublayers,title:this.title,visible:this.visible,layerIndex:this.layerIndex,type:this.type,renderType:this.renderType,beginLevel:this.beginLevel,endLevel:this.endLevel,originPoint:this.originPoint,maxFrameSize:this.maxFrameSize,extendOptions:this.extendOptions}}}]),t}();u.fromJSON=function(e){return new u(e)},Object.defineProperties(u.prototype,{renderer:{get:function(){return this._renderer},set:function(e){this._renderer=e,this.layer&&this.layer._fireUpdateEvent("设置专题图",[{name:"renderer",params:[this._renderer,this.id],dataChanged:!0,operationType:"property"}])}}}),i.Zondy.Layer.IGSSceneSubLayer=u,t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(8),o=r(0),a=r(1),s=r(3);var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=s.LayerType.overlay,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Layer),n(t,[{key:"toJSON",value:function(){return function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this)}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();a.Zondy.Layer.OverlayLayer=u,t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1);var o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Collection),n(t,[{key:"createInstance",value:function(e){var t=e;return e instanceof i.Feature||(t=i.Feature.fromJSON(e)),Array.isArray(t._decorateParents)||(t._decorateParents=[]),t._decorateParents.push({instance:this,key:t.id}),t}},{key:"getFeatureById",value:function(e){var t=this.findIndex(function(t){return t.id===e});if(t>-1)return this.items[t]}},{key:"removeFeatureById",value:function(e){var t=this.findIndex(function(t){return t.id===e});return t>-1&&(this.items.splice(t,1),!0)}}],[{key:"collect",value:function(e){return new t(e)}}]),t}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(55)),o=r(1),a=r(3),s=r(45),u=r(0);var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.layerViews=e.layerViews||new o.Collection,r.allLayerViews=new o.CollectionFlattener({getCollections:function(){return[r.layerViews]},getChildrenFunction:function(e){return e.layerViews}}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"onAdd",value:function(e){var t=this;return this.addMany(this.layer.layers.items).then(function(){return t})}},{key:"add",value:function(e,t){return this.addMany([e],t)}},{key:"remove",value:function(e){return this.removeMany([e])}},{key:"addMany",value:function(e,t){var r=this;if(!e||!this.layerViews)return Promise.resolve([]);var n=this.view,o=this.layer,a=e.filter(function(e){return e&&o.findLayerById(e.id)&&!r._findLayerViewById(e.id)}).map(function(e){return n._createLayerView(e)}).filter(function(e){return e}),l=(0,s.inOrderPromise)(a.map(function(e){return e.onAdd().catch(function(t){u.Log.error(t),r._fireLayerCreatedError(e.layer,e,t)}).then(function(e){return e||void 0})}));return l.catch(function(e){r._fireLayerCreatedError(r.layer,r,e)}),l.then(function(e){var n=e.filter(function(e){return e instanceof i.default});return n.length>0&&(r._setItemParent(n,r),r.layerViews.addMany(n,t)),n})}},{key:"removeMany",value:function(e){var t=this;if(!e||!this.layerViews)return Promise.resolve([]);var r=e.map(function(e){return t._findLayerViewById(e.id)}).filter(function(e){return e});return 0===r.length?Promise.resolve([]):this._removeLayerViews(r)}},{key:"_removeLayerViews",value:function(e){var t=this,r=e.map(function(e){return e.onRemove().then(function(e){return t._fireLayerViewRemove(e.layer,e),e}).catch(function(e){u.Log.error(e)})});return(0,s.allSettled)(r).then(function(e){var r=e.filter(function(e){return"fulfilled"===e.status}).map(function(e){return e.value});t.layerViews.removeMany(r),t._setItemParent(r,null)})}},{key:"removeAll",value:function(){this.layerViews&&this._removeLayerViews(this.layerViews.items.map(function(e){return e}))}},{key:"reorder",value:function(e){var t=this;if(this.layerViews&&e&&e.parent){var r=e.parent,n=this.layerViews.items.findIndex(function(t){return t.id===e.id}),i=r.layers.items.filter(function(e){return t.layerViews.items.some(function(t){return t.id===e.id})}),o=i.findIndex(function(t){return t.id===e.id});if(n!==o&&-1!==n&&-1!==o){var a=this.layerViews.items[n];if(this.layerViews.reorder(a,o),o===i.length-1)i.slice(0,o).reverse().forEach(function(e){var r=t._findLayerViewById(e.id);r&&t._reorderLayerView(r)});else this._reorderLayerView(a)}}}},{key:"onRemove",value:function(e){var t=this;return this.removeMany(this.layer.layers.items).then(function(){return t})}},{key:"onUpdate",value:function(e){var t=this,r=this.layerViews.items;return Promise.all(r.map(function(t){return t.onUpdate(e)})).then(function(){return t})}},{key:"_setItemParent",value:function(e,t){(e instanceof o.Collection?e._items:Array.isArray(e)?e:[e]).forEach(function(e){e&&(e.parent=t)})}},{key:"_fireLayerViewCreatedByLayerViews",value:function(e){if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];if(n instanceof i.default){if(n instanceof t){var o=n.layerViews.items;this._fireLayerViewCreatedByLayerViews(o)}this._fireLayerViewCreated(n.layer,n)}}}},{key:"_fireLayerViewCreated",value:function(e,t){var r=new o.LayerEvent({type:a.LayerEventType.layerViewCreated,message:"图层在视图中创建完毕",layer:e});r.addProperty("view",this.view),r.addProperty("layerView",t),e.fire(a.LayerEventType.layerViewCreated,r),this.view.fire(a.LayerEventType.layerViewCreated,r)}},{key:"_fireLayerCreatedError",value:function(e,t,r){var n=new o.LayerEvent({type:a.LayerEventType.layerViewCreatedError,target:e,error:r||"图层在视图中创建失败",layer:e});n.addProperty("view",this.view),n.addProperty("layerView",t),e.fire(a.LayerEventType.layerViewCreatedError,n),this.view.fire(a.LayerEventType.layerViewCreatedError,n)}},{key:"_fireLayerViewRemove",value:function(e,t){var r=new o.LayerEvent({type:a.LayerEventType.layerViewRemove,message:"移除图层视图",layer:e});r.addProperty("view",this.view),r.addProperty("layerView",t),e.fire(a.LayerEventType.layerViewRemove,r),this.view.fire(a.LayerEventType.layerViewRemove,r)}},{key:"_findLayerViewById",value:function(e){return this.layerViews.items.find(function(t){return t.id===e})}},{key:"_findFlatLayerViewById",value:function(e){return this.allLayerViews.items.find(function(t){return t.id===e})}},{key:"_findLastLayerViewById",value:function(e){var r=this.view;if(e&&r){var n=this._findLayerViewById(e);if(n){var i=n;if(n instanceof t){var o=n.allLayerViews.items.filter(function(e){return!(e instanceof t)});if(0===o.length)return;i=o[o.length-1]}var a=r.allLayerViews.items.findIndex(function(e){return e.id===i.id});if(-1!==a){var s=r.allLayerViews.items.slice(a+1).filter(function(e){return!(e instanceof t)});if(0!==s.length)return s[0]}}}}},{key:"_reorderLayerView",value:function(e){var t=this._findLastLayerViewById(e.id);t&&this.view._orderLayerView(e,t)}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchFreehandPolygonDrawTool=t.SketchFreehandPolylineDrawTool=t.SketchExtentDrawTool=t.SketchCircleDrawTool=t.SketchPolygonDrawTool=t.SketchPolylineDrawTool=t.SketchPointDrawTool=t.SketchBaseDrawTool=t.SketchEditor3D=t.SketchEditor=t.SketchEditorVideoBase=t.SketchEditorEvent=t.SketchStyle=void 0;var n=g(r(17)),i=r(97),o=g(r(457)),a=g(r(175)),s=g(r(463)),u=g(r(23)),l=g(r(22)),c=g(r(176)),f=g(r(34)),h=g(r(177)),p=g(r(178)),d=g(r(179)),y=g(r(180));function g(e){return e&&e.__esModule?e:{default:e}}t.SketchStyle=n.default,t.SketchEditorEvent=i.SketchEditorEvent,t.SketchEditorVideoBase=o.default,t.SketchEditor=a.default,t.SketchEditor3D=s.default,t.SketchBaseDrawTool=u.default,t.SketchPointDrawTool=l.default,t.SketchPolylineDrawTool=c.default,t.SketchPolygonDrawTool=f.default,t.SketchCircleDrawTool=h.default,t.SketchExtentDrawTool=p.default,t.SketchFreehandPolylineDrawTool=d.default,t.SketchFreehandPolygonDrawTool=y.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchEditorEvent=void 0;var n=r(0);t.SketchEditorEvent=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=(0,n.defaultValue)(t,{});this.type=(0,n.defaultValue)(r.type,""),this.toolEventInfo=(0,n.defaultValue)(r.toolEventInfo,null),this.state=(0,n.defaultValue)(r.state,null),this.feature=(0,n.defaultValue)(r.feature,null)}},function(e,t,r){"use strict";r.r(t);var n=r(181),i=r(73),o=r(199),a=r(105),s=r(99),u=r(102),l=r(103),c=r(106),f=r(200);n.default.defaultDatum="WGS84",n.default.Proj=i.default,n.default.WGS84=new n.default.Proj("WGS84"),n.default.Point=o.default,n.default.toPoint=a.default,n.default.defs=s.default,n.default.nadgrid=u.default,n.default.transform=l.default,n.default.mgrs=c.default,n.default.version="__VERSION__",Object(f.default)(n.default),t.default=n.default},function(e,t,r){"use strict";r.r(t);var n=r(183),i=r(100),o=r(101);function a(e){var t=this;if(2===arguments.length){var r=arguments[1];"string"==typeof r?"+"===r.charAt(0)?a[e]=Object(i.default)(arguments[1]):a[e]=Object(o.default)(arguments[1]):a[e]=r}else if(1===arguments.length){if(Array.isArray(e))return e.map(function(e){Array.isArray(e)?a.apply(t,e):a(e)});if("string"==typeof e){if(e in a)return a[e]}else"EPSG"in e?a["EPSG:"+e.EPSG]=e:"ESRI"in e?a["ESRI:"+e.ESRI]=e:"IAU2000"in e?a["IAU2000:"+e.IAU2000]=e:console.log(e);return}}Object(n.default)(a),t.default=a},function(e,t,r){"use strict";r.r(t);var n=r(5),i=r(184),o=r(185),a=r(58);t.default=function(e){var t,r,s,u={},l=e.split("+").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var r=t.split("=");return r.push(!0),e[r[0].toLowerCase()]=r[1],e},{}),c={proj:"projName",datum:"datumCode",rf:function(e){u.rf=parseFloat(e)},lat_0:function(e){u.lat0=e*n.D2R},lat_1:function(e){u.lat1=e*n.D2R},lat_2:function(e){u.lat2=e*n.D2R},lat_ts:function(e){u.lat_ts=e*n.D2R},lon_0:function(e){u.long0=e*n.D2R},lon_1:function(e){u.long1=e*n.D2R},lon_2:function(e){u.long2=e*n.D2R},alpha:function(e){u.alpha=parseFloat(e)*n.D2R},gamma:function(e){u.rectified_grid_angle=parseFloat(e)},lonc:function(e){u.longc=e*n.D2R},x_0:function(e){u.x0=parseFloat(e)},y_0:function(e){u.y0=parseFloat(e)},k_0:function(e){u.k0=parseFloat(e)},k:function(e){u.k0=parseFloat(e)},a:function(e){u.a=parseFloat(e)},b:function(e){u.b=parseFloat(e)},r:function(e){u.a=u.b=parseFloat(e)},r_a:function(){u.R_A=!0},zone:function(e){u.zone=parseInt(e,10)},south:function(){u.utmSouth=!0},towgs84:function(e){u.datum_params=e.split(",").map(function(e){return parseFloat(e)})},to_meter:function(e){u.to_meter=parseFloat(e)},units:function(e){u.units=e;var t=Object(a.default)(o.default,e);t&&(u.to_meter=t.to_meter)},from_greenwich:function(e){u.from_greenwich=e*n.D2R},pm:function(e){var t=Object(a.default)(i.default,e);u.from_greenwich=(t||parseFloat(e))*n.D2R},nadgrids:function(e){"@null"===e?u.datumCode="none":u.nadgrids=e},axis:function(e){3===e.length&&-1!=="ewnsud".indexOf(e.substr(0,1))&&-1!=="ewnsud".indexOf(e.substr(1,1))&&-1!=="ewnsud".indexOf(e.substr(2,1))&&(u.axis=e)},approx:function(){u.approx=!0}};for(t in l)r=l[t],t in c?"function"==typeof(s=c[t])?s(r):u[s]=r:u[t]=r;return"string"==typeof u.datumCode&&"WGS84"!==u.datumCode&&(u.datumCode=u.datumCode.toLowerCase()),u}},function(e,t,r){"use strict";r.r(t);var n=r(186),i=r(187),o=.017453292519943295;function a(e){return e*o}t.default=function(e){var t=Object(n.default)(e),r=t.shift(),o=t.shift();t.unshift(["name",o]),t.unshift(["type",r]);var s={};return Object(i.sExpr)(t,s),function(e){if("GEOGCS"===e.type?e.projName="longlat":"LOCAL_CS"===e.type?(e.projName="identity",e.local=!0):"object"==typeof e.PROJECTION?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var t="",r=0,n=e.AXIS.length;r<n;++r){var i=[e.AXIS[r][0].toLowerCase(),e.AXIS[r][1].toLowerCase()];-1!==i[0].indexOf("north")||("y"===i[0]||"lat"===i[0])&&"north"===i[1]?t+="n":-1!==i[0].indexOf("south")||("y"===i[0]||"lat"===i[0])&&"south"===i[1]?t+="s":-1!==i[0].indexOf("east")||("x"===i[0]||"lon"===i[0])&&"east"===i[1]?t+="e":-1===i[0].indexOf("west")&&("x"!==i[0]&&"lon"!==i[0]||"west"!==i[1])||(t+="w")}2===t.length&&(t+="u"),3===t.length&&(e.axis=t)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.UNIT.convert&&("GEOGCS"===e.type?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var o=e.GEOGCS;function s(t){return t*(e.to_meter||1)}"GEOGCS"===e.type&&(o=e),o&&(o.DATUM?e.datumCode=o.DATUM.name.toLowerCase():e.datumCode=o.name.toLowerCase(),"d_"===e.datumCode.slice(0,2)&&(e.datumCode=e.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==e.datumCode&&"new_zealand_1949"!==e.datumCode||(e.datumCode="nzgd49"),"wgs_1984"!==e.datumCode&&"world_geodetic_system_1984"!==e.datumCode||("Mercator_Auxiliary_Sphere"===e.PROJECTION&&(e.sphere=!0),e.datumCode="wgs84"),"_ferro"===e.datumCode.slice(-6)&&(e.datumCode=e.datumCode.slice(0,-6)),"_jakarta"===e.datumCode.slice(-8)&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf("belge")&&(e.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(e.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===e.ellps.toLowerCase().slice(0,13)&&(e.ellps="intl"),e.a=o.DATUM.SPHEROID.a,e.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(e.datum_params=o.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),"ch1903+"===e.datumCode&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",a],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",a],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",a],["lat0","latitude_of_origin",a],["lat0","standard_parallel_1",a],["lat1","standard_parallel_1",a],["lat2","standard_parallel_2",a],["azimuth","Azimuth"],["alpha","azimuth",a],["srsCode","name"]].forEach(function(t){return function(e,t){var r=t[0],n=t[1];!(r in e)&&n in e&&(e[r]=e[n],3===t.length&&(e[r]=t[2](e[r])))}(e,t)}),e.long0||!e.longc||"Albers_Conic_Equal_Area"!==e.projName&&"Lambert_Azimuthal_Equal_Area"!==e.projName||(e.long0=e.longc),e.lat_ts||!e.lat1||"Stereographic_South_Pole"!==e.projName&&"Polar Stereographic (variant B)"!==e.projName?!e.lat_ts&&e.lat0&&"Polar_Stereographic"===e.projName&&(e.lat_ts=e.lat0,e.lat0=a(e.lat0>0?90:-90)):(e.lat0=a(e.lat1>0?90:-90),e.lat_ts=e.lat1)}(s),s}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",function(){return i}),r.d(t,"getNadgrids",function(){return o});var n={};function i(e,t){var r=new DataView(t),i=function(e){var t=e.getInt32(8,!1);if(11===t)return!1;11!==(t=e.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian");return!0}(r),o=function(e,t){return{nFields:e.getInt32(8,t),nSubgridFields:e.getInt32(24,t),nSubgrids:e.getInt32(40,t),shiftType:u(e,56,64).trim(),fromSemiMajorAxis:e.getFloat64(120,t),fromSemiMinorAxis:e.getFloat64(136,t),toSemiMajorAxis:e.getFloat64(152,t),toSemiMinorAxis:e.getFloat64(168,t)}}(r,i),a={header:o,subgrids:function(e,t,r){for(var n=176,i=[],o=0;o<t.nSubgrids;o++){var a=c(e,n,r),u=f(e,n,a,r),h=Math.round(1+(a.upperLongitude-a.lowerLongitude)/a.longitudeInterval),p=Math.round(1+(a.upperLatitude-a.lowerLatitude)/a.latitudeInterval);i.push({ll:[s(a.lowerLongitude),s(a.lowerLatitude)],del:[s(a.longitudeInterval),s(a.latitudeInterval)],lim:[h,p],count:a.gridNodeCount,cvs:l(u)}),n+=176+16*a.gridNodeCount}return i}(r,o,i)};return n[e]=a,a}function o(e){return void 0===e?null:e.split(",").map(a)}function a(e){if(0===e.length)return null;var t="@"===e[0];return t&&(e=e.slice(1)),"null"===e?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:e,mandatory:!t,grid:n[e]||null,isNull:!1}}function s(e){return e/3600*Math.PI/180}function u(e,t,r){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(t,r)))}function l(e){return e.map(function(e){return[s(e.longitudeShift),s(e.latitudeShift)]})}function c(e,t,r){return{name:u(e,t+8,t+16).trim(),parent:u(e,t+24,t+24+8).trim(),lowerLatitude:e.getFloat64(t+72,r),upperLatitude:e.getFloat64(t+88,r),lowerLongitude:e.getFloat64(t+104,r),upperLongitude:e.getFloat64(t+120,r),latitudeInterval:e.getFloat64(t+136,r),longitudeInterval:e.getFloat64(t+152,r),gridNodeCount:e.getInt32(t+168,r)}}function f(e,t,r,n){for(var i=t+176,o=[],a=0;a<r.gridNodeCount;a++){var s={latitudeShift:e.getFloat32(i+16*a,n),longitudeShift:e.getFloat32(i+16*a+4,n),latitudeAccuracy:e.getFloat32(i+16*a+8,n),longitudeAccuracy:e.getFloat32(i+16*a+12,n)};o.push(s)}return o}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",function(){return l});var n=r(5),i=r(196),o=r(197),a=r(73),s=r(105),u=r(198);function l(e,t,r,c){var f,h=void 0!==(r=Array.isArray(r)?Object(s.default)(r):{x:r.x,y:r.y,z:r.z,m:r.m}).z;if(Object(u.default)(r),e.datum&&t.datum&&function(e,t){return(e.datum.datum_type===n.PJD_3PARAM||e.datum.datum_type===n.PJD_7PARAM||e.datum.datum_type===n.PJD_GRIDSHIFT)&&"WGS84"!==t.datumCode||(t.datum.datum_type===n.PJD_3PARAM||t.datum.datum_type===n.PJD_7PARAM||t.datum.datum_type===n.PJD_GRIDSHIFT)&&"WGS84"!==e.datumCode}(e,t)&&(r=l(e,f=new a.default("WGS84"),r,c),e=f),c&&"enu"!==e.axis&&(r=Object(o.default)(e,!1,r)),"longlat"===e.projName)r={x:r.x*n.D2R,y:r.y*n.D2R,z:r.z||0};else if(e.to_meter&&(r={x:r.x*e.to_meter,y:r.y*e.to_meter,z:r.z||0}),!(r=e.inverse(r)))return;if(e.from_greenwich&&(r.x+=e.from_greenwich),r=Object(i.default)(e.datum,t.datum,r))return t.from_greenwich&&(r={x:r.x-t.from_greenwich,y:r.y,z:r.z||0}),"longlat"===t.projName?r={x:r.x*n.R2D,y:r.y*n.R2D,z:r.z||0}:(r=t.forward(r),t.to_meter&&(r={x:r.x/t.to_meter,y:r.y/t.to_meter,z:r.z||0})),c&&"enu"!==t.axis?Object(o.default)(t,!0,r):(r&&!h&&delete r.z,r)}},function(e,t,r){"use strict";r.r(t),r.d(t,"compareDatums",function(){return i}),r.d(t,"geodeticToGeocentric",function(){return o}),r.d(t,"geocentricToGeodetic",function(){return a}),r.d(t,"geocentricToWgs84",function(){return s}),r.d(t,"geocentricFromWgs84",function(){return u});var n=r(5);function i(e,t){return e.datum_type===t.datum_type&&(!(e.a!==t.a||Math.abs(e.es-t.es)>5e-11)&&(e.datum_type===n.PJD_3PARAM?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type!==n.PJD_7PARAM||e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6]))}function o(e,t,r){var i,o,a,s,u=e.x,l=e.y,c=e.z?e.z:0;if(l<-n.HALF_PI&&l>-1.001*n.HALF_PI)l=-n.HALF_PI;else if(l>n.HALF_PI&&l<1.001*n.HALF_PI)l=n.HALF_PI;else{if(l<-n.HALF_PI)return{x:-1/0,y:-1/0,z:e.z};if(l>n.HALF_PI)return{x:1/0,y:1/0,z:e.z}}return u>Math.PI&&(u-=2*Math.PI),o=Math.sin(l),s=Math.cos(l),a=o*o,{x:((i=r/Math.sqrt(1-t*a))+c)*s*Math.cos(u),y:(i+c)*s*Math.sin(u),z:(i*(1-t)+c)*o}}function a(e,t,r,i){var o,a,s,u,l,c,f,h,p,d,y,g,v,m,_,b=e.x,S=e.y,x=e.z?e.z:0;if(o=Math.sqrt(b*b+S*S),a=Math.sqrt(b*b+S*S+x*x),o/r<1e-12){if(m=0,a/r<1e-12)return n.HALF_PI,_=-i,{x:e.x,y:e.y,z:e.z}}else m=Math.atan2(S,b);s=x/a,h=(u=o/a)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*u*u)),p=s*l,v=0;do{v++,c=t*(f=r/Math.sqrt(1-t*p*p))/(f+(_=o*h+x*p-f*(1-t*p*p))),g=(y=s*(l=1/Math.sqrt(1-c*(2-c)*u*u)))*h-(d=u*(1-c)*l)*p,h=d,p=y}while(g*g>1e-24&&v<30);return{x:m,y:Math.atan(y/Math.abs(d)),z:_}}function s(e,t,r){if(t===n.PJD_3PARAM)return{x:e.x+r[0],y:e.y+r[1],z:e.z+r[2]};if(t===n.PJD_7PARAM){var i=r[0],o=r[1],a=r[2],s=r[3],u=r[4],l=r[5],c=r[6];return{x:c*(e.x-l*e.y+u*e.z)+i,y:c*(l*e.x+e.y-s*e.z)+o,z:c*(-u*e.x+s*e.y+e.z)+a}}}function u(e,t,r){if(t===n.PJD_3PARAM)return{x:e.x-r[0],y:e.y-r[1],z:e.z-r[2]};if(t===n.PJD_7PARAM){var i=r[0],o=r[1],a=r[2],s=r[3],u=r[4],l=r[5],c=r[6],f=(e.x-i)/c,h=(e.y-o)/c,p=(e.z-a)/c;return{x:f+l*h-u*p,y:-l*f+h+s*p,z:u*f-s*h+p}}}},function(e,t,r){"use strict";r.r(t),t.default=function(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t}},function(e,t,r){"use strict";r.r(t),r.d(t,"forward",function(){return f}),r.d(t,"inverse",function(){return h}),r.d(t,"toPoint",function(){return p});var n=6,i="AJSAJS",o="AFAFAF",a=65,s=73,u=79,l=86,c=90;function f(e,t){return t=t||5,function(e,t){var r="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+function(e,t,r){var n=v(r),f=Math.floor(e/1e5),h=Math.floor(t/1e5)%20;return function(e,t,r){var n=r-1,f=i.charCodeAt(n),h=o.charCodeAt(n),p=f+e-1,d=h+t,y=!1;p>c&&(p=p-c+a-1,y=!0);(p===s||f<s&&p>s||(p>s||f<s)&&y)&&p++;(p===u||f<u&&p>u||(p>u||f<u)&&y)&&++p===s&&p++;p>c&&(p=p-c+a-1);d>l?(d=d-l+a-1,y=!0):y=!1;(d===s||h<s&&d>s||(d>s||h<s)&&y)&&d++;(d===u||h<u&&d>u||(d>u||h<u)&&y)&&++d===s&&d++;d>l&&(d=d-l+a-1);return String.fromCharCode(p)+String.fromCharCode(d)}(f,h,n)}(e.easting,e.northing,e.zoneNumber)+r.substr(r.length-5,t)+n.substr(n.length-5,t)}(function(e){var t,r,n,i,o,a,s,u=e.lat,l=e.lon,c=6378137,f=d(u),h=d(l);s=Math.floor((l+180)/6)+1,180===l&&(s=60);u>=56&&u<64&&l>=3&&l<12&&(s=32);u>=72&&u<84&&(l>=0&&l<9?s=31:l>=9&&l<21?s=33:l>=21&&l<33?s=35:l>=33&&l<42&&(s=37));a=d(6*(s-1)-180+3),.006739496752268451,t=c/Math.sqrt(1-.00669438*Math.sin(f)*Math.sin(f)),r=Math.tan(f)*Math.tan(f),n=.006739496752268451*Math.cos(f)*Math.cos(f),i=Math.cos(f)*(h-a),o=c*(.9983242984503243*f-.002514607064228144*Math.sin(2*f)+2639046602129982e-21*Math.sin(4*f)-3.418046101696858e-9*Math.sin(6*f));var p=.9996*t*(i+(1-r+n)*i*i*i/6+(5-18*r+r*r+72*n-.39089081163157013)*i*i*i*i*i/120)+5e5,y=.9996*(o+t*Math.tan(f)*(i*i/2+(5-r+9*n+4*n*n)*i*i*i*i/24+(61-58*r+r*r+600*n-2.2240339282485886)*i*i*i*i*i*i/720));u<0&&(y+=1e7);return{northing:Math.round(y),easting:Math.round(p),zoneNumber:s,zoneLetter:function(e){var t="Z";84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C");return t}(u)}}({lat:e[1],lon:e[0]}),t)}function h(e){var t=g(m(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function p(e){var t=g(m(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function d(e){return e*(Math.PI/180)}function y(e){return e/Math.PI*180}function g(e){var t=e.northing,r=e.easting,n=e.zoneLetter,i=e.zoneNumber;if(i<0||i>60)return null;var o,a,s,u,l,c,f,h,p=6378137,d=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),v=r-5e5,m=t;n<"N"&&(m-=1e7),c=6*(i-1)-180+3,h=(f=m/.9996/6367449.145945056)+(3*d/2-27*d*d*d/32)*Math.sin(2*f)+(21*d*d/16-55*d*d*d*d/32)*Math.sin(4*f)+151*d*d*d/96*Math.sin(6*f),o=p/Math.sqrt(1-.00669438*Math.sin(h)*Math.sin(h)),a=Math.tan(h)*Math.tan(h),s=.006739496752268451*Math.cos(h)*Math.cos(h),u=.99330562*p/Math.pow(1-.00669438*Math.sin(h)*Math.sin(h),1.5),l=v/(.9996*o);var _=h-o*Math.tan(h)/u*(l*l/2-(5+3*a+10*s-4*s*s-.06065547077041606)*l*l*l*l/24+(61+90*a+298*s+45*a*a-1.6983531815716497-3*s*s)*l*l*l*l*l*l/720);_=y(_);var b,S=(l-(1+2*a+s)*l*l*l/6+(5-2*s+28*a-3*s*s+.05391597401814761+24*a*a)*l*l*l*l*l/120)/Math.cos(h);if(S=c+y(S),e.accuracy){var x=g({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});b={top:x.lat,right:x.lon,bottom:_,left:S}}else b={lat:_,lon:S};return b}function v(e){var t=e%n;return 0===t&&(t=n),t}function m(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,r=e.length,n=null,f="",h=0;!/[A-Z]/.test(t=e.charAt(h));){if(h>=2)throw"MGRSPoint bad conversion from: "+e;f+=t,h++}var p=parseInt(f,10);if(0===h||h+3>r)throw"MGRSPoint bad conversion from: "+e;var d=e.charAt(h++);if(d<="A"||"B"===d||"Y"===d||d>="Z"||"I"===d||"O"===d)throw"MGRSPoint zone letter "+d+" not handled: "+e;n=e.substring(h,h+=2);for(var y=v(p),g=function(e,t){var r=i.charCodeAt(t-1),n=1e5,o=!1;for(;r!==e.charCodeAt(0);){if(++r===s&&r++,r===u&&r++,r>c){if(o)throw"Bad character: "+e;r=a,o=!0}n+=1e5}return n}(n.charAt(0),y),m=function(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;var r=o.charCodeAt(t-1),n=0,i=!1;for(;r!==e.charCodeAt(0);){if(++r===s&&r++,r===u&&r++,r>l){if(i)throw"Bad character: "+e;r=a,i=!0}n+=1e5}return n}(n.charAt(1),y);m<_(d);)m+=2e6;var b=r-h;if(b%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+e;var S,x,w,O=b/2,P=0,E=0;return O>0&&(S=1e5/Math.pow(10,O),x=e.substring(h,h+O),P=parseFloat(x)*S,w=e.substring(h+O),E=parseFloat(w)*S),{easting:P+g,northing:E+m,zoneLetter:d,zoneNumber:p,accuracy:S}}function _(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}t.default={forward:f,inverse:h,toPoint:p}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return l}),r.d(t,"forward",function(){return c}),r.d(t,"inverse",function(){return f}),r.d(t,"names",function(){return h});var n=r(108),i=r(74),o=r(109),a=r(7),s=r(5),u=r(42);function l(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Object(n.default)(this.es),this.ml0=Object(i.default)(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function c(e){var t,r,n,o=e.x,u=e.y,l=Object(a.default)(o-this.long0),c=Math.sin(u),f=Math.cos(u);if(this.es){var h=f*l,p=Math.pow(h,2),d=this.ep2*Math.pow(f,2),y=Math.pow(d,2),g=Math.abs(f)>s.EPSLN?Math.tan(u):0,v=Math.pow(g,2),m=Math.pow(v,2);t=1-this.es*Math.pow(c,2),h/=Math.sqrt(t);var _=Object(i.default)(u,c,f,this.en);r=this.a*(this.k0*h*(1+p/6*(1-v+d+p/20*(5-18*v+m+14*d-58*v*d+p/42*(61+179*m-m*v-479*v)))))+this.x0,n=this.a*(this.k0*(_-this.ml0+c*l*h/2*(1+p/12*(5-v+9*d+4*y+p/30*(61+m-58*v+270*d-330*v*d+p/56*(1385+543*m-m*v-3111*v))))))+this.y0}else{var b=f*Math.sin(l);if(Math.abs(Math.abs(b)-1)<s.EPSLN)return 93;if(r=.5*this.a*this.k0*Math.log((1+b)/(1-b))+this.x0,n=f*Math.cos(l)/Math.sqrt(1-Math.pow(b,2)),(b=Math.abs(n))>=1){if(b-1>s.EPSLN)return 93;n=0}else n=Math.acos(n);u<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return e.x=r,e.y=n,e}function f(e){var t,r,n,i,l=(e.x-this.x0)*(1/this.a),c=(e.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+c/this.k0,r=Object(o.default)(t,this.es,this.en),Math.abs(r)<s.HALF_PI){var f=Math.sin(r),h=Math.cos(r),p=Math.abs(h)>s.EPSLN?Math.tan(r):0,d=this.ep2*Math.pow(h,2),y=Math.pow(d,2),g=Math.pow(p,2),v=Math.pow(g,2);t=1-this.es*Math.pow(f,2);var m=l*Math.sqrt(t)/this.k0,_=Math.pow(m,2);n=r-(t*=p)*_/(1-this.es)*.5*(1-_/12*(5+3*g-9*d*g+d-4*y-_/30*(61+90*g-252*d*g+45*v+46*d-_/56*(1385+3633*g+4095*v+1574*v*g)))),i=Object(a.default)(this.long0+m*(1-_/6*(1+2*g+d-_/20*(5+28*g+24*v+8*d*g+6*d-_/42*(61+662*g+1320*v+720*v*g))))/h)}else n=s.HALF_PI*Object(u.default)(c),i=0;else{var b=Math.exp(l/this.k0),S=.5*(b-1/b),x=this.lat0+c/this.k0,w=Math.cos(x);t=Math.sqrt((1-Math.pow(w,2))/(1+Math.pow(S,2))),n=Math.asin(t),c<0&&(n=-n),i=0===S&&0===w?0:Object(a.default)(Math.atan2(S,w)+this.long0)}return e.x=i,e.y=n,e}var h=["Fast_Transverse_Mercator","Fast Transverse Mercator"];t.default={init:l,forward:c,inverse:f,names:h}},function(e,t,r){"use strict";r.r(t);var n=.01068115234375;t.default=function(e){var t=[];t[0]=1-e*(.25+e*(.046875+e*(.01953125+e*n))),t[1]=e*(.75-e*(.046875+e*(.01953125+e*n)));var r=e*e;return t[2]=r*(.46875-e*(.013020833333333334+.007120768229166667*e)),r*=e,t[3]=r*(.3645833333333333-.005696614583333333*e),t[4]=r*e*.3076171875,t}},function(e,t,r){"use strict";r.r(t);var n=r(74),i=r(5);t.default=function(e,t,r){for(var o=1/(1-t),a=e,s=20;s;--s){var u=Math.sin(a),l=1-t*u*u;if(a-=l=(Object(n.default)(a,u,Math.cos(a),r)-e)*(l*Math.sqrt(l))*o,Math.abs(l)<i.EPSLN)return a}return a}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return f}),r.d(t,"forward",function(){return h}),r.d(t,"inverse",function(){return p}),r.d(t,"names",function(){return d});var n=r(107),i=r(111),o=r(43),a=r(201),s=r(203),u=r(204),l=r(205),c=r(7);function f(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(n.default.init.apply(this),this.forward=n.default.forward,this.inverse=n.default.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),r=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+t*(-2854/675)))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))-2),r*=t,this.cgb[1]=r*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=r*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),r*=t,this.cgb[2]=r*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=r*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),r*=t,this.cgb[3]=r*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=r*(1237/630+t*(t*(-24832/14175)-2.4)),r*=t,this.cgb[4]=r*(4174/315+t*(-144838/6237)),this.cbg[4]=r*(-734/315+t*(109598/31185)),r*=t,this.cgb[5]=r*(601676/22275),this.cbg[5]=r*(444337/155925),r=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+r*(.25+r*(1/64+r/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=r*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=r*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),r*=t,this.utg[2]=r*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=r*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),r*=t,this.utg[3]=r*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=r*(49561/161280+t*(-179/168+t*(6601661/7257600))),r*=t,this.utg[4]=r*(-4583/161280+t*(108847/3991680)),this.gtu[4]=r*(34729/80640+t*(-3418889/1995840)),r*=t,this.utg[5]=-.03233083094085698*r,this.gtu[5]=.6650675310896665*r;var i=Object(s.default)(this.cbg,this.lat0);this.Zb=-this.Qn*(i+Object(u.default)(this.gtu,2*i))}function h(e){var t=Object(c.default)(e.x-this.long0),r=e.y;r=Object(s.default)(this.cbg,r);var n=Math.sin(r),i=Math.cos(r),u=Math.sin(t),f=Math.cos(t);r=Math.atan2(n,f*i),t=Math.atan2(u*i,Object(o.default)(n,i*f)),t=Object(a.default)(Math.tan(t));var h,p,d=Object(l.default)(this.gtu,2*r,2*t);return r+=d[0],t+=d[1],Math.abs(t)<=2.623395162778?(h=this.a*(this.Qn*t)+this.x0,p=this.a*(this.Qn*r+this.Zb)+this.y0):(h=1/0,p=1/0),e.x=h,e.y=p,e}function p(e){var t,r,n=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);if(a=(a-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var u=Object(l.default)(this.utg,2*a,2*n);a+=u[0],n+=u[1],n=Math.atan(Object(i.default)(n));var f=Math.sin(a),h=Math.cos(a),p=Math.sin(n),d=Math.cos(n);a=Math.atan2(f*d,Object(o.default)(p,d*h)),n=Math.atan2(p,d*h),t=Object(c.default)(n+this.long0),r=Object(s.default)(this.cgb,a)}else t=1/0,r=1/0;return e.x=t,e.y=r,e}var d=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];t.default={init:f,forward:h,inverse:p,names:d}},function(e,t,r){"use strict";r.r(t),t.default=function(e){var t=Math.exp(e);return t=(t-1/t)/2}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(25));var o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"initPropertys",value:function(e){var r=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"initPropertys",this).call(this,e);return this.layer=r.layer,this.message=r.message,this.layerView=r.layerView,this.view=r.view,r}}]),t}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LayerViewUpdateEvent=t.LayerViewUpdateContent=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r(112));function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(e){function t(){return a(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"initPropertys",value:function(e){var r=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"initPropertys",this).call(this,e);return this.updateContent=(0,i.defaultValue)(r.updateContent,[]),r}}]),t}();t.LayerViewUpdateContent=function e(t){a(this,e);var r=(0,i.defaultValue)(t,{});this.dataChanged=(0,i.defaultValue)(r.dataChanged,!1),this.name=(0,i.defaultValue)(r.name,""),this.operationType=(0,i.defaultValue)(r.operationType,"method"),this.params=(0,i.defaultValue)(r.params,[]),this.extendOptions=(0,i.defaultValue)(r.extendOptions,void 0)},t.LayerViewUpdateEvent=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2));var i=Object.freeze({rtmp:"rtmp",mp4:"mp4",hls:"m3u8",videoPlayer:"videoPlayer",videoHTML:"videoHTML"});n.default.Enum.VideoSourceType=i,t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={backwardDiagonal:"backward-diagonal",cross:"cross",diagonalCross:"diagonal-cross",forwardDiagonal:"forward-diagonal",horizontal:"horizontal",none:"none",solid:"solid",vertical:"vertical"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.PatternStyle=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={small:"small",medium:"medium",large:"large"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.WaterbodySize=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={calm:"calm",rippled:"rippled",slight:"slight",moderate:"moderate"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.WaveStrength=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",auqamarin:"#7fffaa",azure:"#f0ffff",beige:"#6b8e23",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",brulywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornislk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkvoilet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",doderblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e1ffff",lightgoldenrodyellow:"#fafad2",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#00fa9a",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumslateblue:"#7b68ee",mediumspringgreen:"#f5fffa",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#00ff7f",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#556b2f",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegodenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#3cb371",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.ColorNameToHexMap=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GDALComposeGeoTransforms=i,t.GDALInvGeoTransform=o,t.GDALApplyGeoTransform=a,t.GDALGCPsToGeoTransform=function(e,t,r){var s=.25;r||(r=!0,s=.25);var u=e.length;if(u<2)return!1;if(2===u)return e[1].dfGCPPixel!=e[0].dfGCPPixel&&e[1].dfGCPLine!=e[0].dfGCPLine&&(t[1]=(e[1].dfGCPX-e[0].dfGCPX)/(e[1].dfGCPPixel-e[0].dfGCPPixel),t[2]=0,t[4]=0,t[5]=(e[1].dfGCPY-e[0].dfGCPY)/(e[1].dfGCPLine-e[0].dfGCPLine),t[0]=e[0].dfGCPX-e[0].dfGCPPixel*t[1]-e[0].dfGCPLine*t[2],t[3]=e[0].dfGCPY-e[0].dfGCPPixel*t[4]-e[0].dfGCPLine*t[5],!0);if(4==u&&e[0].dfGCPLine==e[1].dfGCPLine&&e[2].dfGCPLine==e[3].dfGCPLine&&e[0].dfGCPPixel==e[3].dfGCPPixel&&e[1].dfGCPPixel==e[2].dfGCPPixel&&e[0].dfGCPLine!=e[2].dfGCPLine&&e[0].dfGCPPixel!=e[1].dfGCPPixel&&e[0].dfGCPY==e[1].dfGCPY&&e[2].dfGCPY==e[3].dfGCPY&&e[0].dfGCPX==e[3].dfGCPX&&e[1].dfGCPX==e[2].dfGCPX&&e[0].dfGCPY!=e[2].dfGCPY&&e[0].dfGCPX!=e[1].dfGCPX)return t[1]=(e[1].dfGCPX-e[0].dfGCPX)/(e[1].dfGCPPixel-e[0].dfGCPPixel),t[2]=0,t[4]=0,t[5]=(e[2].dfGCPY-e[1].dfGCPY)/(e[2].dfGCPLine-e[1].dfGCPLine),t[0]=e[0].dfGCPX-e[0].dfGCPPixel*t[1],t[3]=e[0].dfGCPY-e[0].dfGCPLine*t[5],!0;for(var l=e[0].dfGCPPixel,c=e[0].dfGCPPixel,f=e[0].dfGCPLine,h=e[0].dfGCPLine,p=e[0].dfGCPX,d=e[0].dfGCPX,y=e[0].dfGCPY,g=e[0].dfGCPY,v=1;v<u;++v)l=Math.min(l,e[v].dfGCPPixel),c=Math.max(c,e[v].dfGCPPixel),f=Math.min(f,e[v].dfGCPLine),h=Math.max(h,e[v].dfGCPLine),p=Math.min(p,e[v].dfGCPX),d=Math.max(d,e[v].dfGCPX),y=Math.min(y,e[v].dfGCPY),g=Math.max(g,e[v].dfGCPY);if(Math.abs(c-l)<1e-12||Math.abs(h-f)<1e-12||Math.abs(d-p)<1e-12||Math.abs(g-y)<1e-12)return!1;var m=new Float64Array(6),_=new Float64Array(6);m[0]=-l/(c-l),m[1]=1/(c-l),m[2]=0,m[3]=-f/(h-f),m[4]=0,m[5]=1/(h-f),_[0]=-p/(d-p),_[1]=1/(d-p),_[2]=0,_[3]=-y/(g-y),_[4]=0,_[5]=1/(g-y);for(var b=0,S=0,x=0,w=0,O=0,P=0,E=0,k=0,T=0,M=0,I=0,L=0;L<u;++L){var C=a(m,e[L].dfGCPPixel,e[L].dfGCPLine),N=C.pdfGeoX,R=C.pdfGeoY,j=a(_,e[L].dfGCPX,e[L].dfGCPY),G=j.pdfGeoX,V=j.pdfGeoY;b+=N,S+=R,x+=N*R,w+=N*N,O+=R*R,P+=G,E+=G*N,k+=G*R,T+=V,M+=V*N,I+=V*R}var A=u*(w*O-x*x)+2*b*S*x-S*S*w-b*b*O;if(0===A)return!1;var D=new Float64Array(6);D[0]=(P*(w*O-x*x)+E*(S*x-b*O)+k*(b*x-S*w))/A,D[3]=(T*(w*O-x*x)+M*(S*x-b*O)+I*(b*x-S*w))/A,D[1]=(P*(S*x-b*O)+E*(u*O-S*S)+k*(b*S-x*u))/A,D[2]=(P*(b*x-S*w)+E*(b*S-u*x)+k*(u*w-b*b))/A,D[4]=(T*(S*x-b*O)+M*(u*O-S*S)+I*(b*S-x*u))/A,D[5]=(T*(b*x-S*w)+M*(b*S-u*x)+I*(u*w-b*b))/A;var F=new Float64Array(6),B=new Float64Array(6);if(!o(_,B))return!1;if(i(m,D,F),i(F,B,t),r){var q=.5*(Math.abs(t[1])+Math.abs(t[2])+Math.abs(t[4])+Math.abs(t[5]));if(0===q)return n.default.info("dfPixelSize = 0"),!1;for(var J=0;J<u;J++){var U=e[J].dfGCPPixel*t[1]+e[J].dfGCPLine*t[2]+t[0]-e[J].dfGCPX,z=e[J].dfGCPPixel*t[4]+e[J].dfGCPLine*t[5]+t[3]-e[J].dfGCPY;if(Math.abs(U)>s*q||Math.abs(z)>s*q)return n.default.info("dfErrorX/dfPixelSize = "+Math.abs(U)/q+", dfErrorY/dfPixelSize = "+Math.abs(z)/q),!1}}return!0};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(37));function i(e,t,r){r[1]=t[1]*e[1]+t[2]*e[4],r[2]=t[1]*e[2]+t[2]*e[5],r[0]=t[1]*e[0]+t[2]*e[3]+1*t[0],r[4]=t[4]*e[1]+t[5]*e[4],r[5]=t[4]*e[2]+t[5]*e[5],r[3]=t[4]*e[0]+t[5]*e[3]+1*t[3]}function o(e,t){if(0===e[2]&&0===e[4]&&0!==e[1]&&0!==e[5])return t[0]=-e[0]/e[1],t[1]=1/e[1],t[2]=0,t[3]=-e[3]/e[5],t[4]=0,t[5]=1/e[5],1;var r=e[1]*e[5]-e[2]*e[4],n=Math.max(Math.max(Math.abs(e[1]),Math.abs(e[2])),Math.max(Math.abs(e[4]),Math.abs(e[5])));if(Math.abs(r)<=1e-10*n*n)return 0;var i=1/r;return t[1]=e[5]*i,t[4]=-e[4]*i,t[2]=-e[2]*i,t[5]=e[1]*i,t[0]=(e[2]*e[3]-e[0]*e[5])*i,t[3]=(-e[1]*e[3]+e[0]*e[4])*i,1}function a(e,t,r){return{pdfGeoX:e[0]+t*e[1]+r*e[2],pdfGeoY:e[3]+t*e[4]+r*e[5]}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),o=r(0);var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.extent=(0,o.defaultValue)(t.extent,void 0),this.id=(0,o.defaultValue)(t.id,(0,o.getGUID)()),this.tileInfo=t.tileInfo,this.layer=(0,o.defaultValue)(t.layer,void 0),this.tileMatrix=(0,o.defaultValue)(t.tileMatrix,[]),this.identifier=(0,o.defaultValue)(t.identifier,void 0),this.supportedCRS=(0,o.defaultValue)(t.supportedCRS,void 0)}return n(e,[{key:"getTileResolution",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.28,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[],n=0;n<this.tileMatrix.length;n++){var i=t?Number(this.tileMatrix[n].scaleDenominator)*e/111319490.7932735:Number(this.tileMatrix[n].scaleDenominator)*e/1e3;r.push(i)}return r}},{key:"toJSON",value:function(){return{extent:this.extent&&this.extent.toJSON(),id:this.id,tileInfo:this.tileInfo&&this.tileInfo.toJSON(),tileMatrix:this.tileMatrix,identifier:this.identifier,supportedCRS:this.supportedCRS}}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t=(0,o.defaultValue)(t,{}))}}]),e}();i.default.TileMatrixSet=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=c(r(2)),o=c(r(46)),a=r(0),s=r(4),u=r(11),l=r(3);function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r.id=(0,a.defaultValue)(e.id,(0,a.getGUID)()),r.attributes=(0,a.defaultValue)(e.attributes,{}),r.geometry=r._decorate("geometry",e.geometry,s.Geometry,s.Geometry.fromJSON),r.geometry||a.Log.error("要素几何信息缺失"),r.symbol=r._decorate("symbol",e.symbol,u.Symbol,r._getSymbol.bind(r)),r.visible=(0,a.defaultValue)(e.visible,!0),r.type="Feature",r.elevationInfo=(0,a.defaultValue)(e.elevationInfo,void 0),r.additional=(0,a.defaultValue)(e.additional,{}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"_getSymbol",value:function(e){var t=e?e.type:"undefine",r=this.geometry.type,n=e instanceof u.Symbol?e:u.Symbol.fromJSON(e);switch(r){case l.GeometryType.multiPoint:case l.GeometryType.point:var i=[l.SymbolType.simpleMarker,l.SymbolType.text,l.SymbolType.mapgisText,l.SymbolType.pictureMarker,l.SymbolType.point3D,l.SymbolType.label3D];if((0,a.defined)(e)||(n=new u.SimpleMarkerSymbol),!i.some(function(e){return e===t})){a.Log.info("图元几何和符号不匹配");var o=n.toJSON();n=new u.SimpleMarkerSymbol({color:o.color})}break;case l.GeometryType.multiLineString:case l.GeometryType.lineString:var s=[l.SymbolType.simpleLine,l.SymbolType.line3D];if((0,a.defined)(e)||(n=new u.SimpleLineSymbol),!s.some(function(e){return e===t})){a.Log.info("图元几何和符号不匹配");var c=n.toJSON();n=new u.SimpleLineSymbol({color:c.color})}break;case l.GeometryType.polygon:case l.GeometryType.extent:case l.GeometryType.circle:case l.GeometryType.multiPolygon:var f=[l.SymbolType.simpleFill,l.SymbolType.simpleMarker,l.SymbolType.text,l.SymbolType.mapgisText,l.SymbolType.pictureMarker,l.SymbolType.pictureFill,l.SymbolType.polygon3D];if((0,a.defined)(e)||(n=new u.SimpleFillSymbol),!f.some(function(e){return e===t})){a.Log.info("图元几何和符号不匹配");var h=n.toJSON();n=new u.SimpleFillSymbol({color:h.color})}}return n}},{key:"clone",value:function(){return new t(this.toJSON())}},{key:"toJSON",value:function(){var e={};return e.id=this.id,e.attributes=JSON.parse(JSON.stringify(this.attributes)),e.geometry=this.geometry.toJSON(),e.symbol=this.symbol.toJSON(),e.visible=this.visible,e.type=this.type,e.elevationInfo=this.elevationInfo,e}},{key:"fromGeoJSON",value:function(e){e=(0,a.defaultValue)(e,{});var t=this,r=(0,a.defaultValue)(e.geometry,{});t.geometry=s.Geometry.fromGeoJSON(r);var n=(0,a.defaultValue)(e.properties,{});Object.keys(n).forEach(function(e){n.hasOwnProperty(e)&&(t.attributes[e]=n[e])})}},{key:"toGeoJSON",value:function(){var e=JSON.parse(JSON.stringify(this.attributes));return e.id=this.id,{type:"Feature",geometry:this.geometry.toGeoJSON(),properties:e,style:this.symbol.toJSON(),id:this.id}}},{key:"toIGSFeature",value:function(){var e=this.geometry.toJSON();return{type:"Feature",geometry:{type:e.type,coordinates:e.coordinates},attributes:JSON.parse(JSON.stringify(this.attributes)),styleInfo:null}}},{key:"toOldIGSFeature",value:function(){return{fGeom:this.geometry.toOldIGSGeometry(),GraphicInfo:this.toGraphicInfo(),AttValue:this.toAttValue(),FID:this.id,bound:null,ftype:this.toFType()}}},{key:"toGraphicInfo",value:function(){var e=void 0;switch(this.geometry.type){case"Point":case"MultiPoint":e={InfoType:1,PntInfo:this.symbol};break;case"LineString":case"MultiLineString":e={InfoType:2,LinInfo:this.symbol};break;case"Polygon":case"MultiPolygon":default:e={InfoType:3,RegInfo:this.symbol}}return e}},{key:"toAttValue",value:function(){var e=[],t=this;return Object.keys(this.attributes).forEach(function(r){t.attributes.hasOwnProperty(r)&&e.push(t.attributes[r])}),e}},{key:"toFType",value:function(){var e=void 0;switch(this.geometry.type){case"Point":case"MultiPoint":e=1;break;case"LineString":case"MultiLineString":e=2;break;case"Polygon":case"MultiPolygon":default:e=3}return e}}],[{key:"fromJSON",value:function(e){return new t(e=(0,a.defaultValue)(e,{}))}}]),t}();i.default.Feature=f,t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSymbol3DLayer=t.WaterSymbol3DLayer=t.TextSymbol3DLayer=t.ExtrudeSymbol3DLayer=t.ObjectSymbol3DLayer=t.IconSymbol3DLayer=t.FillSymbol3DLayer=t.LineSymbol3DLayer=t.PathSymbol3DLayer=t.Symbol3DLayer=void 0;var n=p(r(27)),i=p(r(298)),o=p(r(309)),a=p(r(310)),s=p(r(312)),u=p(r(313)),l=p(r(314)),c=p(r(315)),f=p(r(316)),h=r(3);function p(e){return e&&e.__esModule?e:{default:e}}t.Symbol3DLayer=n.default,t.PathSymbol3DLayer=i.default,t.LineSymbol3DLayer=o.default,t.FillSymbol3DLayer=a.default,t.IconSymbol3DLayer=s.default,t.ObjectSymbol3DLayer=u.default,t.ExtrudeSymbol3DLayer=l.default,t.TextSymbol3DLayer=c.default,t.WaterSymbol3DLayer=f.default,t.createSymbol3DLayer=function(e){var t=e||{},r=null;switch(t.type){case h.Symbol3DLayerType.line:r=new o.default(t);break;case h.Symbol3DLayerType.path:r=new i.default(t);break;case h.Symbol3DLayerType.fill:r=new a.default(t);break;case h.Symbol3DLayerType.icon:r=new s.default(t);break;case h.Symbol3DLayerType.object:r=new u.default(t);break;case h.Symbol3DLayerType.extrude:r=new l.default(t);break;case h.Symbol3DLayerType.text:r=new c.default(t);break;case h.Symbol3DLayerType.water:r=new f.default(t)}return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(2));var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,[{key:"toJSON",value:function(){}},{key:"clone",value:function(){}}],[{key:"fromJSON",value:function(){}}]),e}();i.default.Symbol.Callout3D=o,t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),o=r(0),a=r(1);var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.color=t.color?a.Color.fromJSON(t.color):new a.Color,this.size=(0,o.defaultValue)(t.size,0)}return n(e,[{key:"toJSON",value:function(){return{color:(0,o.toJSON)(this.color,a.Color),size:this.size}}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t)}}]),e}();i.default.Symbol.TextHalo=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=h(r(31)),o=h(r(2)),a=r(0),s=r(3),u=h(r(19)),l=h(r(79)),c=h(r(80)),f=h(r(84));function h(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r.type=s.SymbolType.text,r.angle=(0,a.defaultValue)(e.angle,0),r.backgroundColor=(0,a.defined)(e.backgroundColor)?u.default.fromColor((0,a.defaultValue)(e.backgroundColor,new u.default(255,255,255,.25))):void 0,r.borderLineColor=u.default.fromColor((0,a.defaultValue)(e.borderLineColor,new u.default(0,0,0,1))),r.borderLineSize=(0,a.defaultValue)(e.borderLineSize,0),r.color=u.default.fromColor((0,a.defaultValue)(e.color,new u.default)),r.font=f.default.fromJSON((0,a.defaultValue)(e.font,{})),r.haloColor=u.default.fromColor((0,a.defaultValue)(e.haloColor,new u.default)),r.haloSize=(0,a.defaultValue)(e.haloSize,0),r.horizontalAlignment=(0,a.defaultValue)(e.horizontalAlignment,l.default.center),r.kerning=(0,a.defaultValue)(e.kerning,!1),r.lineHeight=(0,a.defaultValue)(e.lineHeight,1.1),r.lineWidth=(0,a.defaultValue)(e.lineWidth,192),r.rotated=(0,a.defaultValue)(e.rotated,!1),r.text=(0,a.defaultValue)(e.text,""),r.verticalAlignment=(0,a.defaultValue)(e.verticalAlignment,c.default.baseline),r.xoffset=(0,a.defaultValue)(e.xoffset,0),r.yoffset=(0,a.defaultValue)(e.yoffset,0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"clone",value:function(){return new t(this.toJSON())}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.angle=this.angle,e.backgroundColor=(0,a.toJSON)(this.backgroundColor,u.default),e.borderLineColor=(0,a.toJSON)(this.borderLineColor,u.default),e.borderLineSize=this.borderLineSize,e.color=(0,a.toJSON)(this.color,u.default),e.font=(0,a.toJSON)(this.font,f.default),e.haloColor=(0,a.toJSON)(this.haloColor,u.default),e.haloSize=this.haloSize,e.horizontalAlignment=this.horizontalAlignment,e.kerning=this.kerning,e.lineHeight=this.lineHeight,e.lineWidth=this.lineWidth,e.rotated=this.rotated,e.text=this.text,e.verticalAlignment=this.verticalAlignment,e.xoffset=this.xoffset,e.yoffset=this.yoffset,e}}],[{key:"fromJSON",value:function(e){return new t(e=(0,a.defaultValue)(e,{}))}}]),t}();o.default.Symbol.TextSymbol=p,t.default=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(3),a=function(e){return e&&e.__esModule?e:{default:e}}(r(31));var s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,i.defaultValue)(e,{}),r.type=o.SymbolType.simpleMarker,r.xoffset=(0,i.defaultValue)(e.xoffset,0),r.yoffset=(0,i.defaultValue)(e.yoffset,0),r.angle=(0,i.defaultValue)(e.angle,0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.angle=this.angle,e.xoffset=this.xoffset,e.yoffset=this.yoffset,e}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=u(r(31)),a=u(r(87)),s=r(3);function u(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,i.defaultValue)(e,{}),r.type=s.SymbolType.simpleFill,r.outline=r._decorate("outline",e.outline,a.default,a.default.fromJSON),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.type=this.type,e.outline=this.outline.toJSON(),e}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ProjUnitWkidMap={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.116756,5e4,15e4],2000:0,2001:0,2002:0,2003:0,2004:0,2005:0,2006:0,2007:0,2008:0,2009:0,2010:0,2011:0,2012:0,2013:0,2014:0,2015:0,2016:0,2017:0,2018:0,2019:0,2020:0,2021:0,2022:0,2023:0,2024:0,2025:0,2026:0,2027:0,2028:0,2029:0,2030:0,2031:0,2032:0,2033:0,2034:0,2035:0,2036:0,2037:0,2038:0,2039:0,2040:0,2041:0,2042:0,2043:0,2044:0,2045:0,2056:0,2057:0,2058:0,2059:0,2060:0,2061:0,2062:0,2063:0,2064:0,2065:0,2066:5,2067:0,2068:0,2069:0,2070:0,2071:0,2072:0,2073:0,2074:0,2075:0,2076:0,2077:0,2078:0,2079:0,2080:0,2081:0,2082:0,2083:0,2084:0,2085:0,2086:0,2087:0,2088:0,2089:0,2090:0,2091:0,2092:0,2093:0,2094:0,2095:0,2096:0,2097:0,2098:0,2099:0,2100:0,2101:0,2102:0,2103:0,2104:0,2105:0,2106:0,2107:0,2108:0,2109:0,2110:0,2111:0,2112:0,2113:0,2114:0,2115:0,2116:0,2117:0,2118:0,2119:0,2120:0,2121:0,2122:0,2123:0,2124:0,2125:0,2126:0,2127:0,2128:0,2129:0,2130:0,2131:0,2132:0,2133:0,2134:0,2135:0,2136:12,2137:0,2138:0,2139:0,2140:0,2141:0,2142:0,2143:0,2144:0,2145:0,2146:0,2147:0,2148:0,2149:0,2150:0,2151:0,2152:0,2153:0,2154:0,2155:2,2157:0,2158:0,2159:12,2160:12,2161:0,2162:0,2163:0,2164:0,2165:0,2166:0,2167:0,2168:0,2169:0,2170:0,2172:0,2173:0,2174:0,2175:0,2176:0,2177:0,2178:0,2179:0,2180:0,2181:0,2182:0,2183:0,2184:0,2185:0,2186:0,2187:0,2188:0,2189:0,2190:0,2191:0,2192:0,2193:0,2195:0,2196:0,2197:0,2198:0,2200:0,2201:0,2202:0,2203:0,2204:2,2205:0,2206:0,2207:0,2208:0,2209:0,2210:0,2211:0,2212:0,2213:0,2214:0,2215:0,2216:0,2217:0,2219:0,2220:0,2222:1,2223:1,2224:1,2225:2,2226:2,2227:2,2228:2,2229:2,2230:2,2231:2,2232:2,2233:2,2234:2,2235:2,2236:2,2237:2,2238:2,2239:2,2240:2,2241:2,2242:2,2243:2,2244:2,2245:2,2246:2,2247:2,2248:2,2249:2,2250:2,2251:1,2252:1,2253:1,2254:2,2255:2,2256:1,2257:2,2258:2,2259:2,2260:2,2261:2,2262:2,2263:2,2264:2,2265:1,2266:1,2267:2,2268:2,2269:1,2270:1,2271:2,2272:2,2273:1,2274:2,2275:2,2276:2,2277:2,2278:2,2279:2,2280:1,2281:1,2282:1,2283:2,2284:2,2285:2,2286:2,2287:2,2288:2,2289:2,2290:0,2291:0,2292:0,2294:0,2295:0,2308:0,2309:0,2310:0,2311:0,2312:0,2313:0,2314:3,2315:0,2316:0,2317:0,2318:0,2319:0,2320:0,2321:0,2322:0,2323:0,2324:0,2325:0,2326:0,2327:0,2328:0,2329:0,2330:0,2331:0,2332:0,2333:0,2334:0,2335:0,2336:0,2337:0,2338:0,2339:0,2340:0,2341:0,2342:0,2343:0,2344:0,2345:0,2346:0,2347:0,2348:0,2349:0,2350:0,2351:0,2352:0,2353:0,2354:0,2355:0,2356:0,2357:0,2358:0,2359:0,2360:0,2361:0,2362:0,2363:0,2364:0,2365:0,2366:0,2367:0,2368:0,2369:0,2370:0,2371:0,2372:0,2373:0,2374:0,2375:0,2376:0,2377:0,2378:0,2379:0,2380:0,2381:0,2382:0,2383:0,2384:0,2385:0,2386:0,2387:0,2388:0,2389:0,2390:0,2391:0,2392:0,2393:0,2394:0,2395:0,2396:0,2397:0,2398:0,2399:0,2400:0,2401:0,2402:0,2403:0,2404:0,2405:0,2406:0,2407:0,2408:0,2409:0,2410:0,2411:0,2412:0,2413:0,2414:0,2415:0,2416:0,2417:0,2418:0,2419:0,2420:0,2421:0,2422:0,2423:0,2424:0,2425:0,2426:0,2427:0,2428:0,2429:0,2430:0,2431:0,2432:0,2433:0,2434:0,2435:0,2436:0,2437:0,2438:0,2439:0,2440:0,2441:0,2442:0,2443:0,2444:0,2445:0,2446:0,2447:0,2448:0,2449:0,2450:0,2451:0,2452:0,2453:0,2454:0,2455:0,2456:0,2457:0,2458:0,2459:0,2460:0,2461:0,2462:0,2523:0,2524:0,2525:0,2526:0,2527:0,2528:0,2529:0,2530:0,2531:0,2532:0,2533:0,2534:0,2535:0,2536:0,2537:0,2538:0,2539:0,2540:0,2541:0,2542:0,2543:0,2544:0,2545:0,2546:0,2547:0,2548:0,2549:0,2550:0,2551:0,2552:0,2553:0,2554:0,2555:0,2556:0,2557:0,2558:0,2559:0,2560:0,2561:0,2562:0,2563:0,2564:0,2565:0,2566:0,2567:0,2568:0,2569:0,2570:0,2571:0,2572:0,2573:0,2574:0,2575:0,2576:0,2577:0,2578:0,2579:0,2580:0,2581:0,2582:0,2583:0,2584:0,2585:0,2586:0,2587:0,2588:0,2589:0,2590:0,2591:0,2592:0,2593:0,2594:0,2595:0,2596:0,2597:0,2598:0,2599:0,2600:0,2601:0,2602:0,2603:0,2604:0,2605:0,2606:0,2607:0,2608:0,2609:0,2610:0,2611:0,2612:0,2613:0,2614:0,2615:0,2616:0,2617:0,2618:0,2619:0,2620:0,2621:0,2622:0,2623:0,2624:0,2625:0,2626:0,2627:0,2628:0,2629:0,2630:0,2631:0,2632:0,2633:0,2634:0,2635:0,2636:0,2637:0,2638:0,2639:0,2640:0,2641:0,2642:0,2643:0,2644:0,2645:0,2646:0,2647:0,2648:0,2649:0,2650:0,2651:0,2652:0,2653:0,2654:0,2655:0,2656:0,2657:0,2658:0,2659:0,2660:0,2661:0,2662:0,2663:0,2664:0,2665:0,2666:0,2667:0,2668:0,2669:0,2670:0,2671:0,2672:0,2673:0,2674:0,2675:0,2676:0,2677:0,2678:0,2679:0,2680:0,2681:0,2682:0,2683:0,2684:0,2685:0,2686:0,2687:0,2688:0,2689:0,2690:0,2691:0,2692:0,2693:0,2694:0,2695:0,2696:0,2697:0,2698:0,2699:0,2700:0,2701:0,2702:0,2703:0,2704:0,2705:0,2706:0,2707:0,2708:0,2709:0,2710:0,2711:0,2712:0,2713:0,2714:0,2715:0,2716:0,2717:0,2718:0,2719:0,2720:0,2721:0,2722:0,2723:0,2724:0,2725:0,2726:0,2727:0,2728:0,2729:0,2730:0,2731:0,2732:0,2733:0,2734:0,2735:0,2736:0,2737:0,2738:0,2739:0,2740:0,2741:0,2742:0,2743:0,2744:0,2745:0,2746:0,2747:0,2748:0,2749:0,2750:0,2751:0,2752:0,2753:0,2754:0,2755:0,2756:0,2757:0,2758:0,2759:0,2760:0,2761:0,2762:0,2763:0,2764:0,2765:0,2766:0,2767:0,2768:0,2769:0,2770:0,2771:0,2772:0,2773:0,2774:0,2775:0,2776:0,2777:0,2778:0,2779:0,2780:0,2781:0,2782:0,2783:0,2784:0,2785:0,2786:0,2787:0,2788:0,2789:0,2790:0,2791:0,2792:0,2793:0,2794:0,2795:0,2796:0,2797:0,2798:0,2799:0,2800:0,2801:0,2802:0,2803:0,2804:0,2805:0,2806:0,2807:0,2808:0,2809:0,2810:0,2811:0,2812:0,2813:0,2814:0,2815:0,2816:0,2817:0,2818:0,2819:0,2820:0,2821:0,2822:0,2823:0,2824:0,2825:0,2826:0,2827:0,2828:0,2829:0,2830:0,2831:0,2832:0,2833:0,2834:0,2835:0,2836:0,2837:0,2838:0,2839:0,2840:0,2841:0,2842:0,2843:0,2844:0,2845:0,2846:0,2847:0,2848:0,2849:0,2850:0,2851:0,2852:0,2853:0,2854:0,2855:0,2856:0,2857:0,2858:0,2859:0,2860:0,2861:0,2862:0,2863:0,2864:0,2865:0,2866:0,2867:1,2868:1,2869:1,2870:2,2871:2,2872:2,2873:2,2874:2,2875:2,2876:2,2877:2,2878:2,2879:2,2880:2,2881:2,2882:2,2883:2,2884:2,2885:2,2886:2,2887:2,2888:2,2891:2,2892:2,2893:2,2894:2,2895:2,2896:1,2897:1,2898:1,2899:2,2900:2,2901:1,2902:2,2903:2,2904:2,2905:2,2906:2,2907:2,2908:2,2909:1,2910:1,2911:2,2912:2,2913:1,2914:1,2915:2,2916:2,2917:2,2918:2,2919:2,2920:2,2921:1,2922:1,2923:1,2924:2,2925:2,2926:2,2927:2,2928:2,2929:2,2930:2,2931:0,2932:0,2933:0,2934:0,2935:0,2936:0,2937:0,2938:0,2939:0,2940:0,2941:0,2942:0,2943:0,2944:0,2945:0,2946:0,2947:0,2948:0,2949:0,2950:0,2951:0,2952:0,2953:0,2954:0,2955:0,2956:0,2957:0,2958:0,2959:0,2960:0,2961:0,2962:0,2964:2,2965:2,2966:2,2967:2,2968:2,2969:0,2970:0,2971:0,2972:0,2973:0,2975:0,2976:0,2977:0,2978:0,2979:0,2980:0,2981:0,2982:0,2983:0,2984:0,2985:0,2986:0,2987:0,2988:0,2989:0,2990:0,2991:0,2992:1,2993:0,2994:1,2995:0,2996:0,2997:0,2998:0,2999:0,3000:0,3001:0,3002:0,3003:0,3004:0,3005:0,3006:0,3007:0,3008:0,3009:0,3010:0,3011:0,3012:0,3013:0,3014:0,3015:0,3016:0,3017:0,3018:0,3019:0,3020:0,3021:0,3022:0,3023:0,3024:0,3025:0,3026:0,3027:0,3028:0,3029:0,3030:0,3031:0,3032:0,3033:0,3034:0,3035:0,3036:0,3037:0,3038:0,3039:0,3040:0,3041:0,3042:0,3043:0,3044:0,3045:0,3046:0,3047:0,3048:0,3049:0,3050:0,3051:0,3054:0,3055:0,3056:0,3057:0,3058:0,3059:0,3060:0,3061:0,3062:0,3063:0,3064:0,3065:0,3066:0,3067:0,3068:0,3069:0,3070:0,3071:0,3072:0,3073:0,3074:0,3075:0,3076:0,3077:0,3078:0,3079:0,3080:1,3081:0,3082:0,3083:0,3084:0,3085:0,3086:0,3087:0,3088:0,3089:2,3090:0,3091:2,3092:0,3093:0,3094:0,3095:0,3096:0,3097:0,3098:0,3099:0,3100:0,3101:0,3102:2,3106:0,3107:0,3108:0,3109:0,3110:0,3111:0,3112:0,3113:0,3114:0,3115:0,3116:0,3117:0,3118:0,3119:0,3120:0,3121:0,3122:0,3123:0,3124:0,3125:0,3126:0,3127:0,3128:0,3129:0,3130:0,3131:0,3132:0,3133:0,3134:0,3135:0,3136:0,3137:0,3138:0,3141:0,3142:0,3146:0,3147:0,3148:0,3149:0,3150:0,3151:0,3153:0,3154:0,3155:0,3156:0,3157:0,3158:0,3159:0,3160:0,3161:0,3162:0,3163:0,3164:0,3165:0,3166:0,3167:13,3168:0,3169:0,3170:0,3171:0,3172:0,3174:0,3175:0,3176:0,3177:0,3178:0,3179:0,3180:0,3181:0,3182:0,3183:0,3184:0,3185:0,3186:0,3187:0,3188:0,3189:0,3190:0,3191:0,3192:0,3193:0,3194:0,3195:0,3196:0,3197:0,3198:0,3199:0,3200:0,3201:0,3202:0,3203:0,3294:0,3295:0,3296:0,3297:0,3298:0,3299:0,3300:0,3301:0,3302:0,3303:0,3304:0,3305:0,3306:0,3307:0,3308:0,3309:0,3310:0,3311:0,3312:0,3313:0,3314:0,3315:0,3316:0,3317:0,3318:0,3319:0,3320:0,3321:0,3322:0,3323:0,3324:0,3325:0,3326:0,3327:0,3328:0,3329:0,3330:0,3331:0,3332:0,3333:0,3334:0,3335:0,3336:0,3337:0,3338:0,3339:0,3340:0,3341:0,3342:0,3343:0,3344:0,3345:0,3346:0,3347:0,3348:0,3349:0,3350:0,3351:0,3352:0,3353:0,3354:0,3355:0,3356:0,3357:0,3358:0,3359:2,3360:0,3361:1,3362:0,3363:2,3364:0,3365:2,3366:3,3367:0,3368:0,3369:0,3370:0,3371:0,3372:0,3373:0,3374:0,3375:0,3376:0,3377:0,3378:0,3379:0,3380:0,3381:0,3382:0,3383:0,3384:0,3385:0,3386:0,3387:0,3388:0,3389:0,3390:0,3391:0,3392:0,3393:0,3394:0,3395:0,3396:0,3397:0,3398:0,3399:0,3400:0,3401:0,3402:0,3403:0,3404:2,3405:0,3406:0,3407:3,3408:0,3409:0,3410:0,3411:0,3412:0,3413:0,3414:0,3415:0,3416:0,3417:2,3418:2,3419:2,3420:2,3421:2,3422:2,3423:2,3424:2,3425:2,3426:2,3427:2,3428:2,3429:2,3430:2,3431:2,3432:2,3433:2,3434:2,3435:2,3436:2,3437:2,3438:2,3439:0,3440:0,3441:2,3442:2,3443:2,3444:2,3445:2,3446:2,3447:0,3448:0,3449:0,3450:0,3451:2,3452:2,3453:2,3454:2,3455:2,3456:2,3457:2,3458:2,3459:2,3460:0,3461:0,3462:0,3463:0,3464:0,3465:0,3466:0,3467:0,3468:0,3469:0,3470:0,3471:0,3472:0,3473:0,3474:0,3475:0,3476:0,3477:0,3478:0,3479:1,3480:0,3481:1,3482:0,3483:1,3484:0,3485:2,3486:0,3487:2,3488:0,3489:0,3490:2,3491:0,3492:2,3493:0,3494:2,3495:0,3496:2,3497:0,3498:2,3499:0,3500:2,3501:0,3502:2,3503:0,3504:2,3505:0,3506:2,3507:0,3508:2,3509:0,3510:2,3511:0,3512:2,3513:0,3514:0,3515:2,3516:0,3517:2,3518:0,3519:2,3520:0,3521:2,3522:0,3523:2,3524:0,3525:2,3526:0,3527:2,3528:0,3529:2,3530:0,3531:2,3532:0,3533:2,3534:0,3535:2,3536:0,3537:2,3538:0,3539:2,3540:0,3541:2,3542:0,3543:2,3544:0,3545:2,3546:0,3547:2,3548:0,3549:2,3550:0,3551:2,3552:0,3553:2,3554:0,3555:0,3556:0,3557:0,3558:0,3559:0,3560:2,3561:2,3562:2,3563:2,3564:2,3565:2,3566:2,3567:2,3568:2,3569:2,3570:2,3571:0,3572:0,3573:0,3574:0,3575:0,3576:0,3577:0,3578:0,3579:0,3580:0,3581:0,3582:2,3583:0,3584:2,3585:0,3586:2,3587:0,3588:1,3589:0,3590:1,3591:0,3592:0,3593:1,3594:0,3595:0,3596:0,3597:0,3598:2,3599:0,3600:2,3601:0,3602:0,3603:0,3604:0,3605:1,3606:0,3607:0,3608:2,3609:0,3610:2,3611:0,3612:2,3613:0,3614:2,3615:0,3616:2,3617:0,3618:2,3619:0,3620:2,3621:0,3622:2,3623:0,3624:2,3625:0,3626:2,3627:0,3628:2,3629:0,3630:2,3631:0,3632:2,3633:0,3634:1,3635:0,3636:1,3637:0,3638:0,3639:0,3640:2,3641:0,3642:2,3643:0,3644:1,3645:0,3646:1,3647:0,3648:1,3649:0,3650:2,3651:0,3652:2,3653:0,3654:2,3655:0,3656:1,3657:0,3658:2,3659:0,3660:2,3661:0,3662:2,3663:0,3664:2,3665:0,3666:0,3667:0,3668:2,3669:0,3670:2,3671:0,3672:2,3673:0,3674:2,3675:0,3676:1,3677:2,3678:0,3679:1,3680:2,3681:0,3682:1,3683:2,3684:0,3685:0,3686:2,3687:0,3688:2,3689:0,3690:2,3691:0,3692:2,3693:0,3694:0,3695:0,3696:2,3697:0,3698:2,3699:0,3700:2,3701:0,3702:0,3703:0,3704:0,3705:0,3706:0,3707:0,3708:0,3709:0,3710:0,3711:0,3712:0,3713:0,3714:0,3715:0,3716:0,3717:0,3718:0,3719:0,3720:0,3721:0,3722:0,3723:0,3724:0,3725:0,3726:0,3727:0,3728:2,3729:2,3730:2,3731:2,3732:2,3733:2,3734:2,3735:2,3736:2,3737:2,3738:2,3739:2,3740:0,3741:0,3742:0,3743:0,3744:0,3745:0,3746:0,3747:0,3748:0,3749:0,3750:0,3751:0,3753:2,3754:2,3755:2,3756:2,3757:2,3758:2,3759:2,3760:2,3761:0,3762:0,3763:0,3764:0,3765:0,3766:0,3767:0,3768:0,3769:0,3770:0,3771:0,3772:0,3773:0,3775:0,3776:0,3777:0,3779:0,3780:0,3781:0,3783:0,3784:0,3785:0,3788:0,3789:0,3790:0,3791:0,3793:0,3794:0,3797:0,3798:0,3799:0,3800:0,3801:0,3802:0,3812:0,3814:0,3815:0,3816:0,3825:0,3826:0,3827:0,3828:0,3829:0,3832:0,3833:0,3834:0,3835:0,3836:0,3837:0,3838:0,3839:0,3840:0,3841:0,3844:0,3845:0,3846:0,3847:0,3848:0,3849:0,3850:0,3851:0,3852:0,3854:0,3857:0,3873:0,3874:0,3875:0,3876:0,3877:0,3878:0,3879:0,3880:0,3881:0,3882:0,3883:0,3884:0,3885:0,3890:0,3891:0,3892:0,3893:0,3907:0,3908:0,3909:0,3910:0,3911:0,3912:0,3920:0,3942:0,3943:0,3944:0,3945:0,3946:0,3947:0,3948:0,3949:0,3950:0,3968:0,3969:0,3970:0,3973:0,3974:0,3975:0,3976:0,3978:0,3979:0,3986:0,3987:0,3988:0,3989:0,3991:2,3992:2,3994:0,3995:0,3996:0,3997:0,4026:0,4037:0,4038:0,4048:0,4049:0,4050:0,4051:0,4056:0,4057:0,4058:0,4059:0,4060:0,4061:0,4062:0,4063:0,4071:0,4082:0,4083:0,4093:0,4094:0,4095:0,4096:0,4217:2,4399:2,4400:2,4401:2,4402:2,4403:2,4404:2,4405:2,4406:2,4407:2,4408:2,4409:2,4410:2,4411:2,4412:2,4413:2,4414:0,4415:0,4417:0,4418:2,4419:2,4420:2,4421:2,4422:2,4423:2,4424:2,4425:2,4426:2,4427:2,4428:2,4429:2,4430:2,4431:2,4432:2,4433:2,4434:0,4437:0,4438:2,4439:2,4455:2,4456:2,4457:2,4462:0,4467:0,4471:0,4474:0,4484:0,4485:0,4486:0,4487:0,4488:0,4489:0,4491:0,4492:0,4493:0,4494:0,4495:0,4496:0,4497:0,4498:0,4499:0,4500:0,4501:0,4502:0,4503:0,4504:0,4505:0,4506:0,4507:0,4508:0,4509:0,4510:0,4511:0,4512:0,4513:0,4514:0,4515:0,4516:0,4517:0,4518:0,4519:0,4520:0,4521:0,4522:0,4523:0,4524:0,4525:0,4526:0,4527:0,4528:0,4529:0,4530:0,4531:0,4532:0,4533:0,4534:0,4535:0,4536:0,4537:0,4538:0,4539:0,4540:0,4541:0,4542:0,4543:0,4544:0,4545:0,4546:0,4547:0,4548:0,4549:0,4550:0,4551:0,4552:0,4553:0,4554:0,4559:0,4568:0,4569:0,4570:0,4571:0,4572:0,4573:0,4574:0,4575:0,4576:0,4577:0,4578:0,4579:0,4580:0,4581:0,4582:0,4583:0,4584:0,4585:0,4586:0,4587:0,4588:0,4589:0,4647:0,4652:0,4653:0,4654:0,4655:0,4656:0,4766:0,4767:0,4768:0,4769:0,4770:0,4771:0,4772:0,4773:0,4774:0,4775:0,4776:0,4777:0,4778:0,4779:0,4780:0,4781:0,4782:0,4783:0,4784:0,4785:0,4786:0,4787:0,4788:0,4789:0,4790:0,4791:0,4792:0,4793:0,4794:0,4795:0,4796:0,4797:0,4798:0,4799:0,4800:0,4822:0,4826:0,4839:0,5014:0,5015:0,5016:0,5018:0,5048:0,5069:0,5070:0,5071:0,5072:0,5105:0,5106:0,5107:0,5108:0,5109:0,5110:0,5111:0,5112:0,5113:0,5114:0,5115:0,5116:0,5117:0,5118:0,5119:0,5120:0,5121:0,5122:0,5123:0,5124:0,5125:0,5126:0,5127:0,5128:0,5129:0,5130:0,5167:0,5168:0,5173:0,5174:0,5175:0,5176:0,5177:0,5178:0,5179:0,5180:0,5181:0,5182:0,5183:0,5184:0,5185:0,5186:0,5187:0,5188:0,5221:0,5223:0,5234:0,5235:0,5243:0,5247:0,5253:0,5254:0,5255:0,5256:0,5257:0,5258:0,5259:0,5266:0,5269:0,5270:0,5271:0,5272:0,5273:0,5274:0,5275:0,5292:0,5293:0,5294:0,5295:0,5296:0,5297:0,5298:0,5299:0,5300:0,5301:0,5302:0,5303:0,5304:0,5305:0,5306:0,5307:0,5308:0,5309:0,5310:0,5311:0,5316:0,5320:0,5321:0,5325:0,5329:0,5330:0,5331:0,5337:0,5343:0,5344:0,5345:0,5346:0,5347:0,5348:0,5349:0,5355:0,5356:0,5357:0,5361:0,5362:0,5367:0,5382:0,5383:0,5387:0,5388:0,5389:0,5396:0,5456:0,5457:0,5459:0,5460:0,5461:0,5462:0,5463:0,5469:0,5472:4,5479:0,5480:0,5481:0,5482:0,5490:0,5513:0,5514:0,5518:0,5519:0,5520:0,5523:0,5530:0,5531:0,5532:0,5533:0,5534:0,5535:0,5536:0,5537:0,5538:0,5539:0,5550:0,5551:0,5552:0,5559:0,5562:0,5563:0,5564:0,5565:0,5566:0,5567:0,5568:0,5569:0,5570:0,5571:0,5572:0,5573:0,5574:0,5575:0,5576:0,5577:0,5578:0,5579:0,5580:0,5581:0,5582:0,5583:0,5588:1,5589:3,5596:0,5623:2,5624:2,5625:2,5627:0,5629:0,5631:0,5632:0,5633:0,5634:0,5635:0,5636:0,5637:0,5638:0,5639:0,5641:0,5643:0,5644:0,5646:2,5649:0,5650:0,5651:0,5652:0,5653:0,5654:2,5655:2,5659:0,5663:0,5664:0,5665:0,5666:0,5667:0,5668:0,5669:0,5670:0,5671:0,5672:0,5673:0,5674:0,5675:0,5676:0,5677:0,5678:0,5679:0,5680:0,5682:0,5683:0,5684:0,5685:0,5700:0,5825:0,5836:0,5837:0,5839:0,5842:0,5844:0,5858:0,5875:0,5876:0,5877:0,5879:0,5880:0,5887:0,5890:0,5921:0,5922:0,5923:0,5924:0,5925:0,5926:0,5927:0,5928:0,5929:0,5930:0,5931:0,5932:0,5933:0,5934:0,5935:0,5936:0,5937:0,5938:0,5939:0,5940:0,6050:0,6051:0,6052:0,6053:0,6054:0,6055:0,6056:0,6057:0,6058:0,6059:0,6060:0,6061:0,6062:0,6063:0,6064:0,6065:0,6066:0,6067:0,6068:0,6069:0,6070:0,6071:0,6072:0,6073:0,6074:0,6075:0,6076:0,6077:0,6078:0,6079:0,6080:0,6081:0,6082:0,6083:0,6084:0,6085:0,6086:0,6087:0,6088:0,6089:0,6090:0,6091:0,6092:0,6093:0,6094:0,6095:0,6096:0,6097:0,6098:0,6099:0,6100:0,6101:0,6102:0,6103:0,6104:0,6105:0,6106:0,6107:0,6108:0,6109:0,6110:0,6111:0,6112:0,6113:0,6114:0,6115:0,6116:0,6117:0,6118:0,6119:0,6120:0,6121:0,6122:0,6123:0,6124:0,6125:0,6128:1,6129:1,6141:1,6210:0,6211:0,6244:0,6245:0,6246:0,6247:0,6248:0,6249:0,6250:0,6251:0,6252:0,6253:0,6254:0,6255:0,6256:0,6257:0,6258:0,6259:0,6260:0,6261:0,6262:0,6263:0,6264:0,6265:0,6266:0,6267:0,6268:0,6269:0,6270:0,6271:0,6272:0,6273:0,6274:0,6275:0,6316:0,6328:0,6329:0,6330:0,6331:0,6332:0,6333:0,6334:0,6335:0,6336:0,6337:0,6338:0,6339:0,6340:0,6341:0,6342:0,6343:0,6344:0,6345:0,6346:0,6347:0,6348:0,6350:0,6351:0,6352:0,6353:0,6354:0,6391:1,20002:0,20003:0,20004:0,20005:0,20006:0,20007:0,20008:0,20009:0,20010:0,20011:0,20012:0,20013:0,20014:0,20015:0,20016:0,20017:0,20018:0,20019:0,20020:0,20021:0,20022:0,20023:0,20024:0,20025:0,20026:0,20027:0,20028:0,20029:0,20030:0,20031:0,20032:0,20062:0,20063:0,20064:0,20065:0,20066:0,20067:0,20068:0,20069:0,20070:0,20071:0,20072:0,20073:0,20074:0,20075:0,20076:0,20077:0,20078:0,20079:0,20080:0,20081:0,20082:0,20083:0,20084:0,20085:0,20086:0,20087:0,20088:0,20089:0,20090:0,20091:0,20092:0,20135:0,20136:0,20137:0,20138:0,20248:0,20249:0,20250:0,20251:0,20252:0,20253:0,20254:0,20255:0,20256:0,20257:0,20258:0,20348:0,20349:0,20350:0,20351:0,20352:0,20353:0,20354:0,20355:0,20356:0,20357:0,20358:0,20436:0,20437:0,20438:0,20439:0,20440:0,20499:0,20538:0,20539:0,20790:0,20791:0,20822:0,20823:0,20824:0,20934:0,20935:0,20936:0,21035:0,21036:0,21037:0,21095:0,21096:0,21097:0,21148:0,21149:0,21150:0,21291:0,21292:0,21413:0,21414:0,21415:0,21416:0,21417:0,21418:0,21419:0,21420:0,21421:0,21422:0,21423:0,21473:0,21474:0,21475:0,21476:0,21477:0,21478:0,21479:0,21480:0,21481:0,21482:0,21483:0,21500:0,21780:0,21781:0,21782:0,21817:0,21818:0,21891:0,21892:0,21893:0,21894:0,21896:0,21897:0,21898:0,21899:0,22032:0,22033:0,22091:0,22092:0,22171:0,22172:0,22173:0,22174:0,22175:0,22176:0,22177:0,22181:0,22182:0,22183:0,22184:0,22185:0,22186:0,22187:0,22191:0,22192:0,22193:0,22194:0,22195:0,22196:0,22197:0,22234:0,22235:0,22236:0,22332:0,22391:0,22392:0,22521:0,22522:0,22523:0,22524:0,22525:0,22700:0,22770:0,22780:0,22832:0,22991:0,22992:0,22993:0,22994:0,23028:0,23029:0,23030:0,23031:0,23032:0,23033:0,23034:0,23035:0,23036:0,23037:0,23038:0,23090:0,23095:0,23239:0,23240:0,23433:0,23700:0,23830:0,23831:0,23832:0,23833:0,23834:0,23835:0,23836:0,23837:0,23838:0,23839:0,23840:0,23841:0,23842:0,23843:0,23844:0,23845:0,23846:0,23847:0,23848:0,23849:0,23850:0,23851:0,23852:0,23853:0,23866:0,23867:0,23868:0,23869:0,23870:0,23871:0,23872:0,23877:0,23878:0,23879:0,23880:0,23881:0,23882:0,23883:0,23884:0,23886:0,23887:0,23888:0,23889:0,23890:0,23891:0,23892:0,23893:0,23894:0,23946:0,23947:0,23948:0,24047:0,24048:0,24100:3,24200:0,24305:0,24306:0,24311:0,24312:0,24313:0,24342:0,24343:0,24344:0,24345:0,24346:0,24347:0,24370:10,24371:10,24372:10,24373:10,24374:10,24375:0,24376:0,24377:0,24378:0,24379:0,24380:0,24381:0,24382:10,24383:0,24500:0,24547:0,24548:0,24571:9,24600:0,24718:0,24719:0,24720:0,24721:0,24817:0,24818:0,24819:0,24820:0,24821:0,24877:0,24878:0,24879:0,24880:0,24881:0,24882:0,24891:0,24892:0,24893:0,25000:0,25231:0,25391:0,25392:0,25393:0,25394:0,25395:0,25828:0,25829:0,25830:0,25831:0,25832:0,25833:0,25834:0,25835:0,25836:0,25837:0,25838:0,25884:0,25932:0,26191:0,26192:0,26193:0,26194:0,26195:0,26237:0,26331:0,26332:0,26391:0,26392:0,26393:0,26432:0,26591:0,26592:0,26632:0,26692:0,26701:0,26702:0,26703:0,26704:0,26705:0,26706:0,26707:0,26708:0,26709:0,26710:0,26711:0,26712:0,26713:0,26714:0,26715:0,26716:0,26717:0,26718:0,26719:0,26720:0,26721:0,26722:0,26729:2,26730:2,26731:2,26732:2,26733:2,26734:2,26735:2,26736:2,26737:2,26738:2,26739:2,26740:2,26741:2,26742:2,26743:2,26744:2,26745:2,26746:2,26747:2,26748:2,26749:2,26750:2,26751:2,26752:2,26753:2,26754:2,26755:2,26756:2,26757:2,26758:2,26759:2,26760:2,26761:2,26762:2,26763:2,26764:2,26765:2,26766:2,26767:2,26768:2,26769:2,26770:2,26771:2,26772:2,26773:2,26774:2,26775:2,26776:2,26777:2,26778:2,26779:2,26780:2,26781:2,26782:2,26783:2,26784:2,26785:2,26786:2,26787:2,26788:2,26789:2,26790:2,26791:2,26792:2,26793:2,26794:2,26795:2,26796:2,26797:2,26798:2,26799:2,26801:2,26802:2,26803:2,26811:2,26812:2,26813:2,26847:2,26848:2,26849:2,26850:2,26851:2,26852:2,26853:2,26854:2,26855:2,26856:2,26857:2,26858:2,26859:2,26860:2,26861:2,26862:2,26863:2,26864:2,26865:2,26866:2,26867:2,26868:2,26869:2,26870:2,26891:0,26892:0,26893:0,26894:0,26895:0,26896:0,26897:0,26898:0,26899:0,26901:0,26902:0,26903:0,26904:0,26905:0,26906:0,26907:0,26908:0,26909:0,26910:0,26911:0,26912:0,26913:0,26914:0,26915:0,26916:0,26917:0,26918:0,26919:0,26920:0,26921:0,26922:0,26923:0,26929:0,26930:0,26931:0,26932:0,26933:0,26934:0,26935:0,26936:0,26937:0,26938:0,26939:0,26940:0,26941:0,26942:0,26943:0,26944:0,26945:0,26946:0,26948:0,26949:0,26950:0,26951:0,26952:0,26953:0,26954:0,26955:0,26956:0,26957:0,26958:0,26959:0,26960:0,26961:0,26962:0,26963:0,26964:0,26965:0,26966:0,26967:0,26968:0,26969:0,26970:0,26971:0,26972:0,26973:0,26974:0,26975:0,26976:0,26977:0,26978:0,26979:0,26980:0,26981:0,26982:0,26983:0,26984:0,26985:0,26986:0,26987:0,26988:0,26989:0,26990:0,26991:0,26992:0,26993:0,26994:0,26995:0,26996:0,26997:0,26998:0,27037:0,27038:0,27039:0,27040:0,27120:0,27200:0,27205:0,27206:0,27207:0,27208:0,27209:0,27210:0,27211:0,27212:0,27213:0,27214:0,27215:0,27216:0,27217:0,27218:0,27219:0,27220:0,27221:0,27222:0,27223:0,27224:0,27225:0,27226:0,27227:0,27228:0,27229:0,27230:0,27231:0,27232:0,27258:0,27259:0,27260:0,27291:6,27292:6,27391:0,27392:0,27393:0,27394:0,27395:0,27396:0,27397:0,27398:0,27429:0,27492:0,27493:0,27500:0,27561:0,27562:0,27563:0,27564:0,27571:0,27572:0,27573:0,27574:0,27581:0,27582:0,27583:0,27584:0,27591:0,27592:0,27593:0,27594:0,27700:0,28191:0,28192:0,28193:0,28232:0,28348:0,28349:0,28350:0,28351:0,28352:0,28353:0,28354:0,28355:0,28356:0,28357:0,28358:0,28402:0,28403:0,28404:0,28405:0,28406:0,28407:0,28408:0,28409:0,28410:0,28411:0,28412:0,28413:0,28414:0,28415:0,28416:0,28417:0,28418:0,28419:0,28420:0,28421:0,28422:0,28423:0,28424:0,28425:0,28426:0,28427:0,28428:0,28429:0,28430:0,28431:0,28432:0,28462:0,28463:0,28464:0,28465:0,28466:0,28467:0,28468:0,28469:0,28470:0,28471:0,28472:0,28473:0,28474:0,28475:0,28476:0,28477:0,28478:0,28479:0,28480:0,28481:0,28482:0,28483:0,28484:0,28485:0,28486:0,28487:0,28488:0,28489:0,28490:0,28491:0,28492:0,28600:0,28991:0,28992:0,29100:0,29101:0,29118:0,29119:0,29120:0,29121:0,29122:0,29168:0,29169:0,29170:0,29171:0,29172:0,29177:0,29178:0,29179:0,29180:0,29181:0,29182:0,29183:0,29184:0,29185:0,29187:0,29188:0,29189:0,29190:0,29191:0,29192:0,29193:0,29194:0,29195:0,29220:0,29221:0,29333:0,29635:0,29636:0,29701:0,29738:0,29739:0,29849:0,29850:0,29871:8,29872:7,29873:0,29900:0,29901:0,29902:0,29903:0,30161:0,30162:0,30163:0,30164:0,30165:0,30166:0,30167:0,30168:0,30169:0,30170:0,30171:0,30172:0,30173:0,30174:0,30175:0,30176:0,30177:0,30178:0,30179:0,30200:5,30339:0,30340:0,30491:0,30492:0,30493:0,30494:0,30591:0,30592:0,30729:0,30730:0,30731:0,30732:0,30791:0,30792:0,30800:0,31028:0,31121:0,31154:0,31170:0,31171:0,31251:0,31252:0,31253:0,31254:0,31255:0,31256:0,31257:0,31258:0,31259:0,31265:0,31266:0,31267:0,31268:0,31275:0,31276:0,31277:0,31278:0,31279:0,31281:0,31282:0,31283:0,31284:0,31285:0,31286:0,31287:0,31288:0,31289:0,31290:0,31291:0,31292:0,31293:0,31294:0,31295:0,31296:0,31297:0,31370:0,31461:0,31462:0,31463:0,31464:0,31465:0,31466:0,31467:0,31468:0,31469:0,31491:0,31492:0,31493:0,31494:0,31495:0,31528:0,31529:0,31600:0,31700:0,31838:0,31839:0,31900:0,31901:0,31917:0,31918:0,31919:0,31920:0,31921:0,31922:0,31965:0,31966:0,31967:0,31968:0,31969:0,31970:0,31971:0,31972:0,31973:0,31974:0,31975:0,31976:0,31977:0,31978:0,31979:0,31980:0,31981:0,31982:0,31983:0,31984:0,31985:0,31986:0,31987:0,31988:0,31989:0,31990:0,31991:0,31992:0,31993:0,31994:0,31995:0,31996:0,31997:0,31998:0,31999:0,32000:0,32001:2,32002:2,32003:2,32005:2,32006:2,32007:2,32008:2,32009:2,32010:2,32011:2,32012:2,32013:2,32014:2,32015:2,32016:2,32017:2,32018:2,32019:2,32020:2,32021:2,32022:2,32023:2,32024:2,32025:2,32026:2,32027:2,32028:2,32029:2,32030:2,32031:2,32033:2,32034:2,32035:2,32036:2,32037:2,32038:2,32039:2,32040:2,32041:2,32042:2,32043:2,32044:2,32045:2,32046:2,32047:2,32048:2,32049:2,32050:2,32051:2,32052:2,32053:2,32054:2,32055:2,32056:2,32057:2,32058:2,32059:2,32060:2,32061:0,32062:0,32064:2,32065:2,32066:2,32067:2,32074:2,32075:2,32076:2,32077:2,32081:0,32082:0,32083:0,32084:0,32085:0,32086:0,32098:0,32099:2,32100:0,32104:0,32107:0,32108:0,32109:0,32110:0,32111:0,32112:0,32113:0,32114:0,32115:0,32116:0,32117:0,32118:0,32119:0,32120:0,32121:0,32122:0,32123:0,32124:0,32125:0,32126:0,32127:0,32128:0,32129:0,32130:0,32133:0,32134:0,32135:0,32136:0,32137:0,32138:0,32139:0,32140:0,32141:0,32142:0,32143:0,32144:0,32145:0,32146:0,32147:0,32148:0,32149:0,32150:0,32151:0,32152:0,32153:0,32154:0,32155:0,32156:0,32157:0,32158:0,32161:0,32164:2,32165:2,32166:2,32167:2,32180:0,32181:0,32182:0,32183:0,32184:0,32185:0,32186:0,32187:0,32188:0,32189:0,32190:0,32191:0,32192:0,32193:0,32194:0,32195:0,32196:0,32197:0,32198:0,32199:0,32201:0,32202:0,32203:0,32204:0,32205:0,32206:0,32207:0,32208:0,32209:0,32210:0,32211:0,32212:0,32213:0,32214:0,32215:0,32216:0,32217:0,32218:0,32219:0,32220:0,32221:0,32222:0,32223:0,32224:0,32225:0,32226:0,32227:0,32228:0,32229:0,32230:0,32231:0,32232:0,32233:0,32234:0,32235:0,32236:0,32237:0,32238:0,32239:0,32240:0,32241:0,32242:0,32243:0,32244:0,32245:0,32246:0,32247:0,32248:0,32249:0,32250:0,32251:0,32252:0,32253:0,32254:0,32255:0,32256:0,32257:0,32258:0,32259:0,32260:0,32301:0,32302:0,32303:0,32304:0,32305:0,32306:0,32307:0,32308:0,32309:0,32310:0,32311:0,32312:0,32313:0,32314:0,32315:0,32316:0,32317:0,32318:0,32319:0,32320:0,32321:0,32322:0,32323:0,32324:0,32325:0,32326:0,32327:0,32328:0,32329:0,32330:0,32331:0,32332:0,32333:0,32334:0,32335:0,32336:0,32337:0,32338:0,32339:0,32340:0,32341:0,32342:0,32343:0,32344:0,32345:0,32346:0,32347:0,32348:0,32349:0,32350:0,32351:0,32352:0,32353:0,32354:0,32355:0,32356:0,32357:0,32358:0,32359:0,32360:0,32601:0,32602:0,32603:0,32604:0,32605:0,32606:0,32607:0,32608:0,32609:0,32610:0,32611:0,32612:0,32613:0,32614:0,32615:0,32616:0,32617:0,32618:0,32619:0,32620:0,32621:0,32622:0,32623:0,32624:0,32625:0,32626:0,32627:0,32628:0,32629:0,32630:0,32631:0,32632:0,32633:0,32634:0,32635:0,32636:0,32637:0,32638:0,32639:0,32640:0,32641:0,32642:0,32643:0,32644:0,32645:0,32646:0,32647:0,32648:0,32649:0,32650:0,32651:0,32652:0,32653:0,32654:0,32655:0,32656:0,32657:0,32658:0,32659:0,32660:0,32661:0,32662:0,32664:2,32665:2,32666:2,32667:2,32701:0,32702:0,32703:0,32704:0,32705:0,32706:0,32707:0,32708:0,32709:0,32710:0,32711:0,32712:0,32713:0,32714:0,32715:0,32716:0,32717:0,32718:0,32719:0,32720:0,32721:0,32722:0,32723:0,32724:0,32725:0,32726:0,32727:0,32728:0,32729:0,32730:0,32731:0,32732:0,32733:0,32734:0,32735:0,32736:0,32737:0,32738:0,32739:0,32740:0,32741:0,32742:0,32743:0,32744:0,32745:0,32746:0,32747:0,32748:0,32749:0,32750:0,32751:0,32752:0,32753:0,32754:0,32755:0,32756:0,32757:0,32758:0,32759:0,32760:0,32761:0,32766:0,53001:0,53002:0,53003:0,53004:0,53008:0,53009:0,53010:0,53011:0,53012:0,53013:0,53014:0,53015:0,53016:0,53017:0,53018:0,53019:0,53021:0,53022:0,53023:0,53024:0,53025:0,53026:0,53027:0,53028:0,53029:0,53030:0,53031:0,53032:0,53034:0,53042:0,53043:0,53044:0,53045:0,53046:0,53048:0,53049:0,54001:0,54002:0,54003:0,54004:0,54008:0,54009:0,54010:0,54011:0,54012:0,54013:0,54014:0,54015:0,54016:0,54017:0,54018:0,54019:0,54021:0,54022:0,54023:0,54024:0,54025:0,54026:0,54027:0,54028:0,54029:0,54030:0,54031:0,54032:0,54034:0,54042:0,54043:0,54044:0,54045:0,54046:0,54048:0,54049:0,54050:0,54051:0,54052:0,54053:0,65061:2,65062:2,65161:0,65163:0,102001:0,102002:0,102003:0,102004:0,102005:0,102006:0,102007:0,102008:0,102009:0,102010:0,102011:0,102012:0,102013:0,102014:0,102015:0,102016:0,102017:0,102018:0,102019:0,102020:0,102021:0,102022:0,102023:0,102024:0,102025:0,102026:0,102027:0,102028:0,102029:0,102030:0,102031:0,102032:0,102033:0,102034:0,102035:0,102036:0,102037:0,102038:0,102039:0,102040:0,102041:2,102042:0,102043:0,102044:0,102045:0,102046:0,102047:0,102048:0,102049:0,102050:0,102051:0,102052:0,102053:0,102054:0,102055:0,102056:0,102057:0,102058:0,102059:0,102060:0,102061:0,102062:0,102063:0,102064:11,102065:0,102066:0,102067:0,102068:14,102069:15,102070:0,102071:0,102072:0,102073:0,102074:0,102075:0,102076:0,102077:0,102078:0,102079:0,102080:0,102081:0,102082:0,102083:0,102084:0,102085:0,102086:0,102087:0,102088:0,102089:0,102090:0,102091:0,102092:0,102093:0,102094:0,102095:0,102096:0,102097:0,102098:0,102099:0,102100:0,102101:0,102102:0,102103:0,102104:0,102105:0,102106:0,102107:0,102108:0,102109:0,102110:0,102111:0,102112:0,102113:0,102114:0,102115:0,102116:0,102117:0,102118:2,102119:1,102120:2,102121:2,102122:0,102123:0,102124:0,102125:0,102126:0,102127:0,102128:0,102129:0,102130:0,102131:0,102132:0,102133:0,102134:0,102135:0,102136:0,102137:0,102138:0,102139:0,102140:0,102141:0,102142:0,102143:0,102144:0,102145:0,102146:0,102147:0,102148:0,102149:0,102150:0,102151:0,102152:0,102153:0,102154:0,102155:0,102156:0,102157:0,102158:0,102159:0,102160:0,102161:0,102162:0,102163:0,102164:0,102165:0,102166:0,102167:0,102168:0,102169:0,102170:0,102171:0,102172:0,102173:0,102174:0,102175:0,102176:0,102177:0,102178:0,102179:0,102180:0,102181:0,102182:0,102183:0,102184:0,102185:0,102186:0,102187:0,102188:0,102189:0,102190:0,102191:0,102192:0,102193:0,102194:0,102195:0,102196:0,102197:0,102198:0,102199:0,102200:0,102201:0,102202:0,102203:0,102204:0,102205:0,102206:0,102207:0,102208:0,102209:0,102210:0,102211:0,102212:0,102213:0,102214:0,102215:0,102216:0,102217:2,102218:0,102219:2,102220:2,102221:0,102222:0,102223:0,102224:0,102225:0,102226:0,102227:0,102228:0,102229:0,102230:0,102231:0,102232:0,102233:0,102234:0,102235:0,102236:0,102237:0,102238:0,102239:0,102240:0,102241:0,102242:0,102243:0,102244:0,102245:0,102246:0,102247:0,102248:0,102249:0,102250:0,102251:0,102252:0,102253:0,102254:0,102255:0,102256:0,102257:0,102258:0,102259:0,102260:0,102261:0,102262:0,102263:0,102264:0,102265:0,102266:0,102267:0,102268:0,102269:0,102270:0,102271:0,102272:0,102273:0,102274:0,102275:0,102276:0,102277:0,102278:0,102279:0,102280:0,102281:0,102282:0,102283:0,102284:0,102285:0,102286:0,102287:0,102288:0,102289:0,102290:0,102291:0,102292:0,102293:0,102294:0,102295:0,102296:0,102297:0,102298:0,102299:0,102300:0,102301:0,102302:0,102303:0,102304:0,102305:0,102306:0,102307:0,102308:0,102309:0,102310:0,102311:0,102312:0,102313:0,102314:0,102315:0,102316:0,102317:0,102318:0,102319:0,102320:0,102321:0,102322:0,102323:0,102324:0,102325:0,102326:0,102327:0,102328:0,102329:0,102330:0,102331:0,102332:0,102333:0,102334:0,102335:0,102336:0,102337:0,102338:0,102339:0,102340:0,102341:0,102342:0,102343:0,102344:0,102345:0,102346:0,102347:0,102348:0,102349:0,102350:0,102351:0,102352:0,102353:0,102354:0,102355:0,102356:0,102357:0,102358:0,102359:0,102360:0,102361:0,102362:0,102363:0,102364:0,102365:0,102366:0,102367:0,102368:0,102369:0,102370:0,102371:0,102372:0,102373:0,102374:0,102375:0,102376:0,102377:0,102378:1,102379:1,102380:0,102381:1,102382:0,102383:0,102384:0,102385:0,102386:0,102387:0,102388:0,102389:2,102390:2,102391:2,102392:2,102393:2,102394:2,102395:2,102396:2,102397:2,102398:2,102401:0,102402:0,102403:0,102404:0,102405:0,102406:0,102407:0,102408:0,102409:0,102410:0,102411:0,102412:0,102413:0,102414:0,102415:0,102416:0,102417:0,102418:0,102419:0,102420:0,102421:0,102422:0,102423:0,102424:0,102425:0,102426:0,102427:0,102428:0,102429:0,102430:0,102431:0,102432:0,102433:0,102434:0,102435:0,102436:0,102437:0,102438:0,102439:0,102440:0,102441:0,102442:0,102443:0,102444:0,102445:2,102446:2,102447:2,102450:0,102451:0,102452:0,102461:2,102462:2,102463:2,102464:2,102465:2,102466:2,102467:2,102468:2,102469:0,102470:0,102471:0,102472:0,102473:0,102474:0,102475:0,102476:0,102477:0,102478:0,102479:0,102480:0,102481:0,102482:0,102483:0,102484:0,102485:0,102486:0,102487:0,102488:0,102489:0,102490:0,102491:0,102492:0,102493:0,102494:0,102495:0,102496:0,102500:1,102501:1,102502:1,102503:1,102504:1,102505:1,102506:1,102507:1,102508:1,102509:1,102510:1,102511:1,102512:1,102513:1,102514:1,102515:1,102516:1,102517:1,102518:1,102519:1,102520:0,102521:0,102522:0,102523:0,102524:0,102525:2,102526:2,102527:2,102528:2,102529:2,102530:0,102531:0,102532:0,102533:0,102534:0,102535:0,102536:0,102537:0,102538:0,102539:0,102540:0,102541:0,102542:0,102543:0,102544:0,102545:0,102546:0,102547:0,102548:0,102549:0,102570:0,102571:0,102572:0,102573:0,102574:0,102575:0,102576:0,102577:0,102578:0,102579:0,102580:0,102581:0,102582:0,102583:0,102584:0,102585:0,102586:0,102587:0,102588:0,102589:2,102590:0,102591:0,102592:0,102593:0,102594:0,102595:0,102596:0,102597:0,102598:0,102599:2,102600:2,102601:0,102602:0,102603:0,102604:2,102605:0,102606:0,102607:0,102608:0,102609:0,102610:0,102611:0,102612:0,102613:0,102614:0,102615:0,102616:0,102617:0,102618:0,102619:0,102620:0,102621:0,102622:0,102623:0,102624:0,102625:0,102626:0,102627:0,102628:0,102629:2,102630:2,102631:2,102632:2,102633:2,102634:2,102635:2,102636:2,102637:2,102638:2,102639:2,102640:2,102641:2,102642:2,102643:2,102644:2,102645:2,102646:2,102647:0,102648:2,102649:2,102650:2,102651:2,102652:2,102653:2,102654:2,102655:2,102656:2,102657:2,102658:2,102659:2,102660:2,102661:2,102662:2,102663:2,102664:2,102665:2,102666:2,102667:2,102668:2,102669:2,102670:2,102671:2,102672:2,102673:2,102674:2,102675:2,102676:2,102677:2,102678:2,102679:2,102680:2,102681:2,102682:2,102683:2,102684:2,102685:2,102686:2,102687:2,102688:2,102689:2,102690:2,102691:2,102692:2,102693:2,102694:2,102695:2,102696:2,102697:2,102698:2,102699:2,102700:2,102701:0,102702:0,102703:0,102704:2,102705:2,102707:2,102708:2,102709:2,102710:2,102711:2,102712:2,102713:2,102714:2,102715:2,102716:2,102717:2,102718:2,102719:2,102720:2,102721:2,102722:2,102723:2,102724:2,102725:2,102726:2,102727:2,102728:2,102729:2,102730:2,102733:2,102734:2,102735:2,102736:2,102737:2,102738:2,102739:2,102740:2,102741:2,102742:2,102743:2,102744:2,102745:2,102746:2,102747:2,102748:2,102749:2,102750:2,102751:2,102752:2,102753:2,102754:2,102755:2,102756:2,102757:2,102758:2,102761:2,102762:0,102763:2,102764:0,102765:0,102766:2,102767:0,102768:0,102769:0,102770:0,102771:0,102772:0,102773:0,102774:0,102775:0,102776:0,102777:0,102778:0,102779:0,102780:0,102781:0,102782:0,102783:0,102784:0,102785:0,102786:0,102787:0,102788:0,102789:0,102790:0,102791:0,102792:0,102793:0,102794:0,102795:0,102796:0,102797:0,102798:0,102962:0,102963:0,102964:0,102965:0,102966:0,102967:0,102968:0,102969:0,102970:1,102971:0,102972:0,102973:0,102974:2,102975:0,102976:0,102977:0,102978:0,102979:0,102980:0,102981:0,102982:0,102983:0,102984:0,102985:0,102986:0,102987:0,102988:0,102989:0,102990:1,102991:1,102992:1,102993:0,102994:0,102995:2,102996:2,102997:0,102998:0,102999:0,103000:0,103001:0,103002:0,103003:2,103004:2,103005:2,103006:2,103007:2,103008:2,103009:0,103010:0,103011:0,103012:2,103013:2,103014:2,103015:0,103016:2,103017:0,103018:2,103019:0,103020:0,103021:0,103022:2,103023:2,103024:2,103025:0,103026:0,103027:2,103028:2,103029:0,103030:0,103031:0,103032:2,103033:2,103034:2,103035:0,103036:0,103037:2,103038:2,103039:0,103040:0,103041:2,103042:2,103043:0,103044:0,103045:2,103046:2,103047:0,103048:0,103049:2,103050:2,103051:0,103052:2,103053:0,103054:2,103055:0,103056:2,103057:0,103058:0,103059:2,103060:2,103061:0,103062:0,103063:2,103064:2,103065:0,103066:0,103067:0,103068:0,103069:2,103070:0,103071:0,103072:2,103073:2,103074:0,103075:0,103076:0,103077:1,103078:1,103079:1,103080:0,103081:0,103082:0,103083:2,103084:2,103085:2,103086:0,103087:0,103088:2,103089:2,103090:0,103091:0,103092:0,103093:0,103094:1,103095:0,103096:2,103097:0,103098:0,103099:0,103100:2,103101:2,103102:2,103103:0,103104:2,103105:0,103106:2,103107:0,103108:0,103109:0,103110:2,103111:2,103112:2,103113:0,103114:0,103115:0,103116:0,103117:2,103118:2,103119:2,103120:2,103121:0,103122:2,103123:0,103124:0,103125:1,103126:1,103127:0,103128:0,103129:2,103130:2,103131:0,103132:0,103133:2,103134:2,103135:0,103136:0,103137:1,103138:1,103139:0,103140:2,103141:0,103142:2,103143:0,103144:2,103145:0,103146:1,103147:0,103148:0,103149:2,103150:2,103151:0,103152:2,103153:0,103154:0,103155:0,103156:0,103157:0,103158:2,103159:2,103160:2,103161:2,103162:2,103163:0,103164:0,103165:0,103166:1,103167:1,103168:1,103169:2,103170:2,103171:2,103172:0,103173:2,103174:0,103175:0,103176:2,103177:2,103178:0,103179:0,103180:2,103181:2,103182:0,103183:0,103184:2,103185:2,103186:0,103187:0,103188:0,103189:2,103190:2,103191:2,103192:0,103193:0,103194:0,103195:0,103196:2,103197:2,103198:2,103199:2,103200:0,103201:0,103202:0,103203:0,103204:0,103205:0,103206:0,103207:0,103208:0,103209:0,103210:0,103211:0,103212:0,103213:0,103214:0,103215:0,103216:0,103217:0,103218:0,103219:0,103220:0,103221:0,103222:0,103223:0,103224:0,103225:1,103226:1,103227:1,103228:0,103229:0,103230:2,103231:2,103232:0,103233:0,103234:0,103235:0,103236:0,103237:0,103238:2,103239:2,103240:2,103241:2,103242:2,103243:2,103244:0,103245:0,103246:0,103247:2,103248:2,103249:2,103250:0,103251:2,103252:0,103253:2,103254:0,103255:0,103256:0,103257:2,103258:2,103259:2,103260:0,103261:0,103262:2,103263:2,103264:0,103265:0,103266:0,103267:2,103268:2,103269:2,103270:0,103271:0,103272:2,103273:2,103274:0,103275:0,103276:2,103277:2,103278:0,103279:0,103280:2,103281:2,103282:0,103283:0,103284:2,103285:2,103286:0,103287:2,103288:0,103289:2,103290:0,103291:2,103292:0,103293:0,103294:2,103295:2,103296:0,103297:0,103298:2,103299:2,103300:0,103301:0,103302:0,103303:0,103304:0,103305:0,103306:0,103307:0,103308:0,103309:0,103310:0,103311:0,103312:0,103313:0,103314:0,103315:0,103316:0,103317:0,103318:0,103319:0,103320:0,103321:0,103322:0,103323:0,103324:0,103325:0,103326:0,103327:0,103328:0,103329:0,103330:0,103331:0,103332:0,103333:0,103334:0,103335:0,103336:0,103337:0,103338:0,103339:0,103340:0,103341:0,103342:0,103343:0,103344:0,103345:0,103346:0,103347:0,103348:0,103349:0,103350:0,103351:0,103352:0,103353:0,103354:0,103355:0,103356:0,103357:0,103358:0,103359:0,103360:0,103361:0,103362:0,103363:0,103364:0,103365:0,103366:0,103367:0,103368:0,103369:0,103370:0,103371:0,103372:0,103373:0,103374:0,103375:0,103376:2,103377:0,103378:0,103379:2,103380:2,103381:0,103382:0,103383:0,103384:1,103385:1,103386:1,103387:0,103388:0,103389:0,103390:2,103391:2,103392:2,103393:0,103394:0,103395:2,103396:2,103397:0,103398:0,103399:0,103400:2,103401:2,103402:2,103403:2,103404:2,103405:2,103406:2,103407:2,103408:2,103409:2,103410:2,103411:2,103412:2,103413:2,103414:2,103415:2,103416:2,103417:2,103418:2,103419:2,103420:2,103421:2,103422:2,103423:2,103424:2,103425:2,103426:2,103427:2,103428:2,103429:2,103430:2,103431:2,103432:2,103433:2,103434:2,103435:2,103436:2,103437:2,103438:2,103439:2,103440:2,103441:2,103442:2,103443:2,103444:2,103445:2,103446:2,103447:2,103448:2,103449:2,103450:2,103451:2,103452:2,103453:2,103454:2,103455:2,103456:2,103457:2,103458:2,103459:2,103460:2,103461:2,103462:2,103463:2,103464:2,103465:2,103466:2,103467:2,103468:2,103469:2,103470:2,103471:2,103472:0,103473:1,103474:0,103475:2,103476:0,103477:0,103478:0,103479:2,103480:2,103481:2,103482:0,103483:2,103484:0,103485:2,103486:0,103487:0,103488:0,103489:2,103490:2,103491:2,103492:0,103493:0,103494:0,103495:0,103496:2,103497:2,103498:2,103499:2,103500:0,103501:2,103502:0,103503:0,103504:1,103505:1,103506:0,103507:0,103508:2,103509:2,103510:0,103511:0,103512:2,103513:2,103514:0,103515:2,103516:0,103517:2,103518:0,103519:2,103520:0,103521:1,103522:0,103523:0,103524:2,103525:2,103526:0,103527:2,103528:0,103529:0,103530:0,103531:0,103532:0,103533:0,103534:0,103535:0,103536:0,103537:0,103538:0,103539:0,103540:0,103541:0,103542:0,103543:0,103544:2,103545:2,103546:2,103547:2,103548:2,103549:0,103550:0,103551:0,103552:1,103553:1,103554:1,103555:2,103556:2,103557:2,103558:0,103559:0,103560:0,103561:2,103562:2,103563:0,103564:0,103565:2,103566:2,103567:0,103568:0,103569:2,103570:2,103571:0,103572:0,103573:0,103574:2,103575:2,103576:2,103577:0,103578:0,103579:0,103580:0,103581:2,103582:2,103583:2,103584:0,103585:2,103600:0,103601:0,103602:0,103603:0,103604:0,103605:0,103606:0,103607:0,103608:0,103609:0,103610:0,103611:0,103612:0,103613:0,103614:0,103615:0,103616:0,103617:0,103618:0,103619:0,103620:0,103621:0,103622:0,103623:0,103624:0,103625:0,103626:0,103627:0,103628:0,103629:0,103630:0,103631:0,103632:0,103633:0,103634:0,103635:0,103636:0,103637:0,103638:0,103639:0,103640:0,103641:0,103642:0,103643:0,103644:0,103645:0,103646:0,103647:0,103648:0,103649:0,103650:0,103651:0,103652:0,103653:0,103654:0,103655:0,103656:0,103657:0,103658:0,103659:0,103660:0,103661:0,103662:0,103663:0,103664:0,103665:0,103666:0,103667:0,103668:0,103669:0,103670:0,103671:0,103672:0,103673:0,103674:0,103675:0,103676:0,103677:0,103678:0,103679:0,103680:0,103681:0,103682:0,103683:0,103684:0,103685:0,103686:0,103687:0,103688:0,103689:0,103690:0,103691:0,103692:0,103693:0,103694:0,103695:2,103700:2,103701:2,103702:2,103703:2,103704:2,103705:2,103706:2,103707:2,103708:2,103709:2,103710:2,103711:2,103712:2,103713:2,103714:2,103715:2,103716:2,103717:2,103718:2,103719:2,103720:2,103721:2,103722:2,103723:2,103724:2,103725:2,103726:2,103727:2,103728:2,103729:2,103730:2,103731:2,103732:2,103733:2,103734:2,103735:2,103736:2,103737:2,103738:2,103739:2,103740:2,103741:2,103742:2,103743:2,103744:2,103745:2,103746:2,103747:2,103748:2,103749:2,103750:2,103751:2,103752:2,103753:2,103754:2,103755:2,103756:2,103757:2,103758:2,103759:2,103760:2,103761:2,103762:2,103763:2,103764:2,103765:2,103766:2,103767:2,103768:2,103769:2,103770:2,103771:2,103772:2,103773:2,103774:2,103775:2,103776:2,103777:2,103778:2,103779:2,103780:2,103781:2,103782:2,103783:2,103784:2,103785:2,103786:2,103787:2,103788:2,103789:2,103790:2,103791:2,103792:2,103793:2,103794:0,103795:0,103796:0,103797:0,103798:0,103799:0,103800:0,103801:0,103802:0,103803:0,103804:0,103805:0,103806:0,103807:0,103808:0,103809:0,103810:0,103811:0,103812:0,103813:0,103814:0,103815:0,103816:0,103817:0,103818:0,103819:0,103820:0,103821:0,103822:0,103823:0,103824:0,103825:0,103826:0,103827:0,103828:0,103829:0,103830:0,103831:0,103832:0,103833:0,103834:0,103835:0,103836:0,103837:0,103838:0,103839:0,103840:0,103841:0,103842:0,103843:0,103844:0,103845:0,103846:0,103847:0,103848:0,103849:0,103850:0,103851:0,103852:0,103853:0,103854:0,103855:0,103856:0,103857:0,103858:0,103859:0,103860:0,103861:0,103862:0,103863:0,103864:0,103865:0,103866:0,103867:0,103868:0,103869:0,103870:0,103871:0,103900:2,103901:2,103902:2,103903:2,103904:2,103905:2,103906:2,103907:2,103908:2,103909:2,103910:2,103911:2,103912:2,103913:2,103914:2,103915:2,103916:2,103917:2,103918:2,103919:2,103920:2,103921:2,103922:2,103923:2,103924:2,103925:2,103926:2,103927:2,103928:2,103929:2,103930:2,103931:2,103932:2,103933:2,103934:2,103935:2,103936:2,103937:2,103938:2,103939:2,103940:2,103941:2,103942:2,103943:2,103944:2,103945:2,103946:2,103947:2,103948:2,103949:2,103950:2,103951:2,103952:2,103953:2,103954:2,103955:2,103956:2,103957:2,103958:2,103959:2,103960:2,103961:2,103962:2,103963:2,103964:2,103965:2,103966:2,103967:2,103968:2,103969:2,103970:2,103971:2,900913:0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=c(r(13)),o=r(0),a=c(r(2)),s=r(3),u=c(r(20)),l=r(26);function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(e=(0,o.defaultValue)(e,{}),r.type=s.GeometryType.lineString,r.coordinates=(0,o.defaultValue)(e.coordinates,[]),!Array.isArray(r.coordinates))throw new Error("坐标必须为数组");if(r.coordinates.length<2)throw new Error("坐标必须是两个或多个位置的数组");return 3===r.coordinates[0].length&&(r.hasZ=!0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"getPoint",value:function(e){return e=Number(e),this._isValidate(e)?new u.default({coordinates:this._cloneCoordinates()[e]}):null}},{key:"insertPoint",value:function(e,t){return this._isValidate(e)?(Array.isArray(this.coordinates)&&this.coordinates.splice(e,0,u.default.toCoordinates(t)),this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),this):null}},{key:"removePoint",value:function(e){if(e=Number(e),!this._isValidate(e))return this;var t=this._cloneCoordinates()[e];return this.coordinates.splice(e,1),this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),new u.default({coordinates:t})}},{key:"setPoint",value:function(e,t){return this._isValidate(e)?(Array.isArray(this.coordinates)&&this.coordinates.splice(e,1,u.default.toCoordinates(t)),this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),this):this}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.coordinates=JSON.parse(JSON.stringify(this.coordinates)),e.extent=this.extent.toJSON(),e}},{key:"toString",value:function(){for(var e="",t=0;t<this.coordinates.length;t++)for(var r=this.coordinates[t],n=0;n<r.length;n++)e+=r[n]+",";return e=e.substring(0,e.length-1)}},{key:"toXMl",value:function(){}},{key:"toOldIGSGeometry",value:function(){for(var e=[],t=0;t<this.coordinates.length;t++)e.push({x:this.coordinates[t][0],y:this.coordinates[t][1]});return{LinGeom:[{Line:{Arcs:[{Dots:e,ArcID:0}]},GID:0}],GID:parseInt(String(1e7*Math.random()))}}},{key:"getIGSType",value:function(){return s.IGSGeometryType.lineString}},{key:"toDots",value:function(){for(var e=[],t=this.coordinates,r=0;r<t.length;r++)e.push({x:t[r][0],y:t[r][1]});return e}},{key:"_isValidate",value:function(e){var t=this.coordinates.length;return!(!(0,o.isNumber)(e)||e<0||e>=t)}},{key:"_cloneCoordinates",value:function(){return JSON.parse(JSON.stringify(this.coordinates))}},{key:"_calcExtent",value:function(e,t){return(0,l.calcExtent)(e,t,s.GeometryType.lineString,this.spatialReference)}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e=(0,o.defaultValue)(e,{}))}}]),t}();Object.defineProperties(f.prototype,{extent:{configurable:!1,get:function(){return this._calcExtent(this.coordinates,this.hasZ)}}}),a.default.Geometry.LineString=f,t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(18)),o=d(r(13)),a=r(0),s=d(r(2)),u=r(3),l=d(r(49)),c=d(r(20)),f=d(r(32)),h=d(r(37)),p=r(26);function d(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(e=(0,a.defaultValue)(e,{}),r.coordinates=(0,a.defaultValue)(e.coordinates,[]),r.isSelfIntersecting=(0,a.defaultValue)(e.isSelfIntersecting,!1),r.type=u.GeometryType.multiPolygon,!Array.isArray(r.coordinates))throw new Error("坐标必须为数组");for(var n=0;n<r.coordinates.length;n++){var i=r.coordinates[n],o=!0,s=!1,l=void 0;try{for(var c,f=i[Symbol.iterator]();!(o=(c=f.next()).done);o=!0){var h=c.value;if(h.length<4)throw new Error("每个环至少有四个点");if(h[h.length-1].length!==h[0].length)throw new Error("首尾点维度不相等");for(var p=0;p<h[h.length-1].length;p++)if(h[h.length-1][p]!==h[0][p])throw new Error("第一个位置和最后一个位置不相等")}}catch(e){s=!0,l=e}finally{try{!o&&f.return&&f.return()}finally{if(s)throw l}}}return 3===r.coordinates[0][0][0].length&&(r.hasZ=!0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"addPolygon",value:function(e,t){if(t=(0,a.defaultValue)(t,"add"),e instanceof l.default||h.default.error("polygon类型不是Polygon对象类型!"),"add"===t)this.coordinates.push(e._cloneCoordinates());else{for(var r=[],n=0;n<this.coordinates.length;n++){var o=i.polygon(this.coordinates[n]),s=i.polygon(e.coordinates);i.booleanDisjoint(o,s)||(r.push(o),this.coordinates[n]=void 0)}for(var u=0;u<this.coordinates.length;u++)this.coordinates[u]||this.coordinates.splice(u,1);for(var c=i.polygon(e.coordinates),f=0;f<r.length;f++)c=i.union(c,r[f]).geometry;this.coordinates.push(c.coordinates)}return this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),this}},{key:"removePolygon",value:function(e){if(!this._isValidate(e))return null;var t=JSON.parse(JSON.stringify(this._cloneCoordinates()[e]));return this.coordinates.splice(e,1),this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),new l.default({coordinates:t})}},{key:"toXMl",value:function(){return""}},{key:"contains",value:function(e){if(!e)throw new Error("传入参数错误");var t=i.multiPolygon(this._cloneCoordinates()),r=i.point(c.default.toCoordinates(e));return i.booleanPointInPolygon(r,t)}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.coordinates=JSON.parse(JSON.stringify(this.coordinates)),e.extent=this.extent.toJSON(),e}},{key:"toString",value:function(){for(var e="",t=0;t<this.coordinates.length;t++){for(var r=this.coordinates[t],n=0;n<r.length;n++){for(var i=r[n],o=0;o<i.length;o++)for(var a=i[o],s=0;s<a.length;s++)e+=a[s]+",";e=e.substring(0,e.length-1),e+="|"}e=e.substring(0,e.length-1),e+=";"}return e=e.substring(0,e.length-1)}},{key:"toOldIGSGeometry",value:function(){for(var e=[],t={},r={},n=0;n<this.coordinates.length;n++){var i=this.coordinates[n];t={Rings:[],GID:n};for(var o=0;o<i.length;o++){r={Arcs:[]};for(var a=[],s=0;s<i[o].length;s++){var u=i[o][s];a.push({x:u[0],y:u[1]})}r.Arcs.push({Dots:a,ArcID:o}),t.Rings.push(r)}e.push(t)}return{RegGeom:e}}},{key:"_cloneCoordinates",value:function(){return JSON.parse(JSON.stringify(this.coordinates))}},{key:"_isValidate",value:function(e){var t=this.coordinates.length;return!(!(0,a.isNumber)(e)||e<0||e>=t)}},{key:"_calcExtent",value:function(e,t){return(0,p.calcExtent)(e,t,u.GeometryType.multiPolygon,this.spatialReference)}},{key:"getIGSType",value:function(){return u.IGSGeometryType.multiPolygon}},{key:"toPolygonArray",value:function(){for(var e=[],t=0;t<this.coordinates.length;t++)e.push(new l.default({coordinates:this.coordinates[t],spatialReference:f.default.fromJSON(this.spatialReference)}));return e}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e=(0,a.defaultValue)(e,{}))}}]),t}();Object.defineProperties(y.prototype,{extent:{configurable:!1,get:function(){return this._calcExtent(this.coordinates,this.hasZ)}}}),s.default.Geometry.MultiPolygon=y,t.default=y},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=f(r(2)),a=f(r(13)),s=r(3),u=f(r(20)),l=f(r(37)),c=r(26);function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(e=(0,i.defaultValue)(e,{}),r.coordinates=(0,i.defaultValue)(e.coordinates,[]),!Array.isArray(r.coordinates))throw new Error("坐标必须是数组");for(var n=0;n<r.coordinates.length;n++){if(r.coordinates[n].length<2||r.coordinates[n].length>3)throw new Error("多点的数组长度必须在合理范围内(2或者3)");3===r.coordinates[n].length?r.hasZ=!0:r.hasZ=!1}return r.type=s.GeometryType.multiPoint,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),n(t,[{key:"addPoint",value:function(e,t){if(t=(0,i.defaultValue)(t,"add"),e instanceof u.default)this._addPoint(e,t);else if(e instanceof Array){if(this._isNumberArray(e))this._addPoint(new u.default({coordinates:e}),t);else for(var r=0;r<e.length;r++)if(e[r]instanceof u.default)this._addPoint(e[r],t);else if(e[r]instanceof Array){this._isNumberArray(e[r])?this._addPoint(new u.default({coordinates:e[r]}),t):e instanceof u.default?this._addPoint(e[r],t):l.default.error("point的子元素类型不是点几何对象或者点坐标数组!")}else l.default.error("point的类型不是点几何对象或者点坐标数组!")}else l.default.error("point的类型不是点几何对象或者点坐标数组!");return this.coordinates.length>=2&&(this.extent=this._calcExtent(this.coordinates,this.hasZ)),this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),this}},{key:"_addPoint",value:function(e,t){"add"===t?this.coordinates.push(e.coordinates):this.contains(e)||this.coordinates.push(e.coordinates)}},{key:"_isNumberArray",value:function(e){if(!(e instanceof Array))return!1;var t=!0;if(2===e.length||3===e.length){for(var r=0;r<e.length;r++)if("number"!=typeof e[r]){t=!1;break}}else t=!1;return t}},{key:"contains",value:function(e){if(e instanceof u.default){for(var t=0;t<this.coordinates.length;t++)if(e.equals(this.coordinates[t]))return!0}else if(e instanceof Array&&(2===e.length||3===e.length))for(var r=0;r<this.coordinates.length;r++){if(new u.default({coordinates:e}).equals(this.coordinates[r]))return!0}else l.default.error("必须为点对象或坐标数组才能比较是否相等!");return!1}},{key:"getPoint",value:function(e){if(e=Number(e),!this._isValidate(e))throw new Error("未找到指定索引,请输入正确的索引");var t=this._cloneCoordinates();return new u.default({coordinates:t[e]})}},{key:"removePoint",value:function(e){if(e=Number(e),!this._isValidate(e))return null;var t=this._cloneCoordinates();return this.coordinates.splice(e,1),this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),new u.default({coordinates:t[e]})}},{key:"setPoint",value:function(e,t){if(!this._isValidate(e))throw new Error("未找到指定索引,请输入正确的索引");var r=this._cloneCoordinates();return Array.isArray(r)&&(r.splice(e,1,u.default.toCoordinates(t)),this.coordinates=r),this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),this}},{key:"getIGSType",value:function(){return s.IGSGeometryType.multiPoint}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.coordinates=JSON.parse(JSON.stringify(this.coordinates)),e.extent=this.extent?this.extent.toJSON():void 0,e}},{key:"toOldIGSGeometry",value:function(){for(var e=[],t=0;t<this.coordinates.length;t++){var r;r={x:this.coordinates[t][0],y:this.coordinates[t][1]},e.push({Dot:r,GID:t})}return{PntGeom:e}}},{key:"toString",value:function(){for(var e="",t=0;t<this.coordinates.length;t++)for(var r=this.coordinates[t],n=0;n<r.length;n++)e+=r[n]+",";return e=e.substring(0,e.length-1)}},{key:"toDots",value:function(){for(var e=[],t=this.coordinates,r=0;r<t.length;r++)e.push({x:t[r][0],y:t[r][1]});return e}},{key:"_isValidate",value:function(e){var t=this.coordinates.length;return!(!(0,i.isNumber)(e)||e<0||e>=t)}},{key:"_cloneCoordinates",value:function(){return JSON.parse(JSON.stringify(this.coordinates))}},{key:"_calcExtent",value:function(e,t){if(e.length>1)return(0,c.calcExtent)(e,t,s.GeometryType.lineString,this.spatialReference)}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e=(0,i.defaultValue)(e,{}))}}]),t}();Object.defineProperties(h.prototype,{extent:{configurable:!1,get:function(){return this._calcExtent(this.coordinates,this.hasZ)}}}),o.default.Geometry.MultiPoint=h,t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=p(r(13)),o=r(0),a=p(r(2)),s=r(3),u=p(r(49)),l=p(r(20)),c=p(r(32)),f=r(26),h=r(331);function p(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(e=(0,o.defaultValue)(e,{}),r.center=(0,o.defaultValue)(e.center,void 0),!r.center)throw new Error("缺少圆心坐标");if(r.center=l.default.toCoordinates(r.center),r.radius=(0,o.defaultValue)(e.radius,1e3),!(0,o.isNumber)(r.radius))throw new Error("半径必须为数字");if(r.geodesic=(0,o.defaultValue)(e.geodesic,!1),r.radiusUnit=(0,o.defaultValue)(e.radiusUnit,s.RadiusUnit.meters),r.numberOfPoints=(0,o.defaultValue)(e.numberOfPoints,40),!(0,o.isNumber)(r.numberOfPoints))throw new Error("圆曲线上点的数量必须为数字");return r.type=s.GeometryType.circle,3===r.center.length&&(r.hasZ=!0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.center=JSON.parse(JSON.stringify(this.center)),e.radius=this.radius,e.radiusUnit=this.radiusUnit,e.numberOfPoints=this.numberOfPoints,e.extent=this.extent.toJSON(),e}},{key:"toPolygon",value:function(){var e=this.spatialReference,t=this.geodesic,r=h.RadiusUnitToMeter[this.radiusUnit]||1,n=this.radius*r,i="geographic";if(e.isWebMercator)i="webMercator";else if(e.wkid&&(0,o.defined)(h.ProjUnitWkidMap[e.wkid]))i="proj";else if(e.wkt){var a=e.wkt;["PROJS","proj4","PROJCRS","+proj"].some(function(e){return 0===a.indexOf(e)})&&(i="proj")}if(!t){"geographic"===i&&(n/=h.RadiusUnitToMeter.degrees);var s=this._tranCircleToPath(this.center,n,this.numberOfPoints);return new u.default({coordinates:s,spatialReference:c.default.fromJSON(this.spatialReference)})}switch(i){case"proj":o.Log.error("暂时仅支持墨卡托投影坐标系和地理坐标系使用geodesic属性");break;case"webMercator":case"geographic":var l=6378137,f=Math.PI/180,p={latitude:this.center[1],longitude:this.center[0]};"webMercator"===i&&(p={longitude:180*p.longitude/Math.PI/l,latitude:180*(2*Math.atan(Math.exp(p.latitude/l))-Math.PI/2)/Math.PI});for(var d=n/1e3,y=d/(111.32*Math.cos(p.latitude*Math.PI/180)),g=d/110.574,v=[],m=0;m<this.numberOfPoints;m+=1){var _=m/this.numberOfPoints*(2*Math.PI),b=y*Math.cos(_),S=g*Math.sin(_),x=p.longitude+b,w=p.latitude+S;if("webMercator"===i){var O=Math.max(Math.min(85.0511287798,w),-85.0511287798),P=Math.sin(O*f);v.push([l*x*f,l*Math.log((1+P)/(1-P))/2])}else v.push([x,w])}return v.length<=3&&o.Log.error("生成圆几何点个数不能小于3"),v.push(v[0]),new u.default({coordinates:[v],spatialReference:c.default.fromJSON(this.spatialReference)})}}},{key:"toString",value:function(){return this.hasZ?this.center[0]+","+this.center[1]+","+this.center[2]+","+this.radius:this.center[0]+","+this.center[1]+","+this.radius}},{key:"toXMl",value:function(){return""}},{key:"getIGSType",value:function(){return s.IGSGeometryType.circle}},{key:"_tranCircleToPath",value:function(e,t,r){for(var n=2*Math.PI/r,i=0,o=[],a=[],s=0;s<r;s++){i-=n;var u=[e[0]+t*Math.cos(i),e[1]+t*Math.sin(i)];a.push(u)}var l=a[a.length-1],c=a[0];return Math.abs(l[0]-c[0])>1e-15&&Math.abs(l[1]-c[1])>1e-15&&a.push([c[0],c[1]]),o.push(a),this.hasZ&&(o=o.map(function(t){return t.map(function(t){return[t[0],t[1],e[2]]})})),o}},{key:"_calcExtent",value:function(e){var t=this.toPolygon();return(0,f.calcExtent)(t._cloneCoordinates(),e,s.GeometryType.polygon,this.spatialReference)}},{key:"clone",value:function(){return new t(this.toJSON())}},{key:"toGeoJSON",value:function(){return this.toPolygon().toGeoJSON()}}],[{key:"fromJSON",value:function(e){return new t(e=(0,o.defaultValue)(e,{}))}}]),t}();Object.defineProperties(d.prototype,{extent:{configurable:!1,get:function(){return this._calcExtent(this.hasZ)}}}),a.default.Geometry.Circle=d,t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=c(r(13)),o=r(0),a=c(r(2)),s=r(3),u=c(r(20)),l=r(26);function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(e=(0,o.defaultValue)(e,{}),r.coordinates=(0,o.defaultValue)(e.coordinates,[]),r.type=s.GeometryType.multiLineString,!Array.isArray(r.coordinates))throw new Error("坐标必须为数组");for(var n=0;n<r.coordinates.length;n++){if(r.coordinates[n].length<2)throw new Error("坐标必须是两个或多个位置的数组")}return 3===r.coordinates[0][0].length&&(r.hasZ=!0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"addPath",value:function(e){if(!Array.isArray(e))throw new Error("传入参数错误");var t=[];return e.forEach(function(e){t.push(u.default.toCoordinates(e))}),this.coordinates.push(t),this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),this}},{key:"removePath",value:function(e){if(!this._isValidate(e,0))return null;var t=JSON.parse(JSON.stringify(this._cloneCoordinates()[e]));return this.coordinates.splice(e,1),this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),t.map(function(e){return new u.default({coordinates:e})})}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.coordinates=JSON.parse(JSON.stringify(this.coordinates)),e.extent=this.extent.toJSON(),e}},{key:"getPoint",value:function(e,t){if(!this._isValidate(e,t))return null;var r=this._cloneCoordinates()[e];return new u.default({coordinates:r[t]})}},{key:"insertPoint",value:function(e,t,r){if(!this._isValidate(e,t))return null;var n=this.coordinates[e];return Array.isArray(n)&&n.splice(t,0,u.default.toCoordinates(r)),this.coordinates[e]=n,this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),this}},{key:"removePoint",value:function(e,t){if(!this._isValidate(e,t))return null;var r=this.coordinates[e];return Array.isArray(r)&&r.splice(t,1),this.coordinates=r,this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),this}},{key:"setPoint",value:function(e,t,r){if(!this._isValidate(e,t))return this;var n=this.coordinates[e];return Array.isArray(n)&&n.splice(t,1,u.default.toCoordinates(r)),this.coordinates[e]=n,this.coordinates=JSON.parse(JSON.stringify(this.coordinates)),this}},{key:"toString",value:function(){return""}},{key:"toXMl",value:function(){return""}},{key:"getIGSType",value:function(){return s.IGSGeometryType.multiLineString}},{key:"toOldIGSGeometry",value:function(){for(var e=[],t=0;t<this.coordinates.length;t++){for(var r=[],n=0;n<this.coordinates[t].length;n++)r.push({x:this.coordinates[t][n][0],y:this.coordinates[t][n][1]});e.push({Line:{Arcs:[{Dots:r,ArcID:0}]},GID:t})}return{LinGeom:e}}},{key:"_isValidate",value:function(e,t){var r=this.coordinates.length;if(!(0,o.isNumber)(e)||e<0||e>=r)return!1;var n=this.coordinates[e].length;return!(!(0,o.isNumber)(t)||t<0||t>=n)}},{key:"_cloneCoordinates",value:function(){return JSON.parse(JSON.stringify(this.coordinates))}},{key:"_calcExtent",value:function(e,t){return(0,l.calcExtent)(e,t,s.GeometryType.multiLineString,this.spatialReference)}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"clone",value:function(e){return new t(e.toJSON())}},{key:"fromJSON",value:function(e){return new t(e=(0,o.defaultValue)(e,{}))}}]),t}();Object.defineProperties(f.prototype,{extent:{configurable:!1,get:function(){return this._calcExtent(this.coordinates,this.hasZ)}}}),a.default.Geometry.MultiLineString=f,t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r(2));var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,i.defaultValue)(t,{}),this._videoRegisrationType=(0,i.defaultValue)(t.videoRegistrationType,null),this._calibrationParam=(0,i.defaultValue)(t.calibrationParam,void 0),this._cameraParam=(0,i.defaultValue)(t.cameraParam,void 0)}return n(e,[{key:"videoRegistrationType",get:function(){return this._videoRegisrationType}},{key:"calibrationParam",get:function(){return this._calibrationParam}},{key:"cameraParam",get:function(){return this._cameraParam}}]),e}();o.default.VideoRegistrationParam=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=p(r(67)),a=p(r(89)),s=p(r(90)),u=r(3),l=r(50),c=r(1),f=r(4),h=p(r(136));function p(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=(0,i.defaultValue)(r,{}),this.url=t,this.requestInterceptor=(0,i.defaultValue)(r.requestInterceptor,new a.default),this.responseInterceptor=(0,i.defaultValue)(r.responseInterceptor,new s.default),this.requestTimeout=(0,i.defaultValue)(r.requestTimeout,45e3),this.headers=(0,i.defaultValue)(r.headers,{}),this.tokenKey=(0,i.defaultValue)(r.tokenKey,"token"),this.tokenValue=(0,i.defaultValue)(r.tokenValue,void 0),this.tokenAttachType=(0,i.defaultValue)(r.tokenAttachType,u.TokenAttachType.url)}return n(e,[{key:"destroy",value:function(){this.url=null,this.options=null}},{key:"request",value:function(e){if(e=(0,i.defaultValue)(e,{}),!(0,i.isNull)(e.url))return!(0,i.isNull)(this.requestInterceptor)&&!(0,i.isNull)(this.requestInterceptor.before)&&this.requestInterceptor.before instanceof Function&&(e=this.requestInterceptor.before(e)),(0,i.isNull)(e)?void 0:this._commit(e);i.Log.error("url不存在!")}},{key:"_commit",value:function(e){var t=this;e.url.indexOf("?")>-1?e.url.indexOf("?")===e.url.length-1?e.url+=""+(0,l.ServiceConfigToken)(h.default):e.url+="&"+(0,l.ServiceConfigToken)(h.default):"POST"!==e.method&&(e.url+="?"+(0,l.ServiceConfigToken)(h.default)),e.url=(0,l.ServiceConfigRequestInterceptors)(h.default,e.url),e.headers=(0,i.defaultValue)(e.headers,{});var r=Object.assign(e.headers,this.headers),n={headers:r=Object.assign(r,h.default.headers),withCredentials:e.withCredentials,requestTimeout:this.requestTimeout,proxy:e.proxy,tokenKey:this.tokenKey||h.default.tokenKey,tokenValue:this.tokenValue||h.default.tokenValue,tokenAttachType:e.tokenAttachType||this.tokenAttachType};return e.responseType&&(n.responseType=e.responseType),o.default.commit(e.method,e.url,e.data,n).then(function(r){var o=void 0;if(r.text){if("blob"===n.responseType)return r.blob();o=function(){return r.text()}}else o=function(){return r.json()};return 200===r.status?new Promise(function(r){o().then(function(n){var o=void 0;if((0,i.isNull)(n))o={succeed:!0,msg:"服务器没有返回信息",data:void 0};else{var a=void 0;if("string"==typeof n)if(n.indexOf("<?xml")>-1)if(n.indexOf("OGC:WMS")>-1||n.indexOf("WMS_Capabilities")>-1||n.indexOf("<Keyword>WMS</Keyword>")>-1){var s="1.1.1";n.indexOf("1.3.0")>-1&&(s="1.3.0");var u=(0,l.getDoc)(n);a=(0,l.getWMSInfoFromXML)(u,s,e.url)}else if(n.indexOf("WMTS")>-1||n.indexOf("wmts/1.0")>-1){var p=(0,l.getDoc)(n);a=(0,l.getWMTSInfoFromXML)(p)}else if(n.indexOf("wfs:WFS_Capabilities")>-1){var d=(0,l.getDoc)(n);a=(0,l.getWFSInfoFromXML)(d)}else if(n.indexOf("wfs:FeatureCollection")>-1){var y=(0,l.getDoc)(n),g=e.url.toLowerCase(),v="2.0.0";g.indexOf("version=1.0.0")>-1?v="1.0.0":g.indexOf("version=1.1.0")>-1?v="1.1.0":g.indexOf("version=2.0.0")>-1&&(v="1.1.0"),a=(0,l.getWFSFeature)(y,v)}else n.indexOf("<svg")>-1&&(a=n);else{if(n.indexOf("html>")>-1)return!(0,i.isNull)(t.responseInterceptor)&&!(0,i.isNull)(t.responseInterceptor.failure)&&t.responseInterceptor.failure instanceof Function&&t.responseInterceptor.failure({succeed:!1,msg:"服务器不支持"+e.method+"请求或其他错误",data:void 0,errorType:"unKnownError"}),!(0,i.isNull)(e.failure)&&e.failure instanceof Function&&e.failure({succeed:!1,msg:"服务器不支持"+e.method+"请求或其他错误",data:void 0,errorType:"unKnownError"}),Promise.reject({succeed:!1,msg:"服务器不支持"+e.method+"请求或其他错误",data:void 0,errorType:"unKnownError"});if((a=JSON.parse(n))instanceof Object&&(e.url.indexOf("/igs/rest/mrfs/layer/query")>-1||e.url.indexOf("/igs/rest/mrfs/docs/")>-1)){var m=(0,l.fromQueryResult)(a);delete a.SFEleArray,a.featureSets=m;var _=[];if(m.length>1)for(var b=0;b<m.length;b++)_.push(a[String(b)]),delete a[String(b)];else a.AttStruct.TotalCount=a.TotalCount,_.push(a.AttStruct),delete a.AttStruct,delete a.TotalCount;a.featureInfos=_,(e.url.indexOf("/igs/rest/mrfs/docs/")>-1||e.url.indexOf("/igs/rest/mrfs/layer/")>-1)&&(m.length>0?a.featureSet=m[0]:a.featureSet=new c.FeatureSet)}}if(a instanceof Object){if(a.hasOwnProperty("features")&&a.features instanceof Array){var S=void 0,x=!1;a.spatialReference?S=new f.SpatialReference(a.spatialReference):e.extendOptions&&e.extendOptions.outSrs?S=new f.SpatialReference(e.extendOptions.outSrs):(x=!0,S=f.SpatialReference.fromJSON(a.spatialReference));var w=!1;/(igs)\/rest\/services\/.*\/WFSServer/.test(e.url)&&4326===S.wkid&&x&&(w=!0),a.featureSet=c.FeatureSet.fromArray(a.features,new c.FeatureSet({spatialReference:S}),{reverse:w})}else if(a.hasOwnProperty("layers")&&e.url.indexOf("igs/rest/mrcs/tiles")<0)for(var O=0;O<a.layers.length;O++){var P=void 0;P=e.extendOptions&&e.extendOptions.outSrs?new f.SpatialReference(e.extendOptions.outSrs):f.SpatialReference.fromJSON(a.layers[O].spatialReference),a.layers[O].featureSet=c.FeatureSet.fromArray(a.layers[O].features,new c.FeatureSet({spatialReference:P}))}else if(e.url.indexOf("/MapServer/query")>-1||e.url.indexOf("/SceneServer/query")>-1){if(a.layers&&a.layers instanceof Array){var E=new f.SpatialReference("EPSG:4326");a.spatialReference&&(E=new f.SpatialReference({wkid:a.spatialReference.wkid,wkt:a.spatialReference.wkt}));for(var k=a.layers,T=0;T<k.length;T++)k[T].features&&(k[T].featureSet=c.FeatureSet.fromArray(k[T].features,new c.FeatureSet({spatialReference:E})),delete k[T].features)}}else if(e.url.indexOf("/MapServer/layers?")>-1){!function e(t){for(var r=0;r<t.length;r++)t[r].id=t[r].index,t[r].children&&t[r].children instanceof Array&&e(t[r].children)}(a.layers)}o={succeed:!0,msg:"请求成功",data:a}}else o={succeed:!0,msg:a,data:a}}o=(0,l.ServiceConfigResponseInterceptors)(h.default,e.url,o),!(0,i.isNull)(t.responseInterceptor)&&!(0,i.isNull)(t.responseInterceptor.success)&&t.responseInterceptor.success instanceof Function&&(o=t.responseInterceptor.success(o)),!(0,i.isNull)(o)&&!(0,i.isNull)(e.success)&&e.success instanceof Function&&e.success(o),r(o)})},function(e){console.log("Fetch返回异常",e)}):new Promise(function(r){o().then(function(n){var o=void 0;if((0,i.isNull)(n))o={succeed:!1,msg:"请求失败,服务器没有返回信息",data:void 0};else{var a=JSON.parse(n);o=a instanceof Object?{succeed:!1,msg:"请求失败",data:a}:{succeed:!1,msg:a,data:void 0}}!(0,i.isNull)(t.responseInterceptor)&&!(0,i.isNull)(t.responseInterceptor.failure)&&t.responseInterceptor.failure instanceof Function&&(o=t.responseInterceptor.failure(o)),!(0,i.isNull)(o)&&!(0,i.isNull)(e.failure)&&e.failure instanceof Function&&e.failure(o),r(o)})},function(e){console.error("Fetch返回异常",e)})}).catch(function(r){var n={succeed:!1,msg:"请求失败",data:r};t._resolveFailure(n,e.failure,void 0)})}}]),e}();c.Zondy.Service.FetchServer=d,t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={tokenKey:"token",tokenValue:void 0,headers:{},request:{interceptors:[]}};r(1).Zondy.Service.Config=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArcGISVectorTileServer=t.ArcGISFeatureServer=t.ArcGISGeometryServer=t.ThemesInfo=t.ThemeServer=t.ItemValue=t.FolderInfoAttribute=t.FolderInfo=t.ExpInfo=t.CUniqueThemeInfo=t.CUniqueTheme=t.CThemeInfo=t.CTheme=t.CSimpleTheme=t.CRegInfo=t.CRangeThemeInfo=t.CRangeTheme=t.CRandomTheme=t.CPntInfo=t.CMultiClassTheme=t.CLinInfo=t.CGraduatedSymbolTheme=t.CFourColorTheme=t.CDotDensityTheme=t.CChartType=t.CChartThemeRepresentInfo=t.CChartThemeInfo=t.CChartTheme=t.CChartLabelFormat=t.CAnnInfo=t.CAllOtherDataItemInfoSource=t.ArcGISMapServer=t.WorkFlowServer=t.WFSServer=t.WMTSServer=t.WMSServer=t.SceneServer=t.ResourceServer=t.PlotServer=t.VectorTileServer=t.TileServer=t.RootServer=t.SecurityServer=t.TerrainServer=t.PoiServer=t.Cesium3DTilesServer=t.AddressServer=t.GeometryServer=t.ImageServer=t.M3DServer=t.FeatureServer=t.MapServer=void 0;var n=w(r(336)),i=w(r(337)),o=w(r(338)),a=w(r(339)),s=w(r(340)),u=w(r(341)),l=w(r(342)),c=w(r(343)),f=w(r(138)),h=w(r(344)),p=w(r(345)),d=w(r(346)),y=w(r(347)),g=w(r(348)),v=w(r(349)),m=w(r(350)),_=r(351),b=r(357),S=r(361),x=r(157);function w(e){return e&&e.__esModule?e:{default:e}}t.MapServer=n.default,t.FeatureServer=i.default,t.M3DServer=o.default,t.ImageServer=a.default,t.GeometryServer=s.default,t.AddressServer=u.default,t.Cesium3DTilesServer=l.default,t.PoiServer=c.default,t.TerrainServer=f.default,t.SecurityServer=h.default,t.RootServer=p.default,t.TileServer=d.default,t.VectorTileServer=y.default,t.PlotServer=g.default,t.ResourceServer=v.default,t.SceneServer=m.default,t.WMSServer=_.WMSServer,t.WMTSServer=_.WMTSServer,t.WFSServer=_.WFSServer,t.WorkFlowServer=x.WorkFlowServer,t.ArcGISMapServer=b.ArcGISMapServer,t.CAllOtherDataItemInfoSource=S.CAllOtherDataItemInfoSource,t.CAnnInfo=S.CAnnInfo,t.CChartLabelFormat=S.CChartLabelFormat,t.CChartTheme=S.CChartTheme,t.CChartThemeInfo=S.CChartThemeInfo,t.CChartThemeRepresentInfo=S.CChartThemeRepresentInfo,t.CChartType=S.CChartType,t.CDotDensityTheme=S.CDotDensityTheme,t.CFourColorTheme=S.CFourColorTheme,t.CGraduatedSymbolTheme=S.CGraduatedSymbolTheme,t.CLinInfo=S.CLinInfo,t.CMultiClassTheme=S.CMultiClassTheme,t.CPntInfo=S.CPntInfo,t.CRandomTheme=S.CRandomTheme,t.CRangeTheme=S.CRangeTheme,t.CRangeThemeInfo=S.CRangeThemeInfo,t.CRegInfo=S.CRegInfo,t.CSimpleTheme=S.CSimpleTheme,t.CTheme=S.CTheme,t.CThemeInfo=S.CThemeInfo,t.CUniqueTheme=S.CUniqueTheme,t.CUniqueThemeInfo=S.CUniqueThemeInfo,t.ExpInfo=S.ExpInfo,t.FolderInfo=S.FolderInfo,t.FolderInfoAttribute=S.FolderInfoAttribute,t.ItemValue=S.ItemValue,t.ThemeServer=S.ThemeServer,t.ThemesInfo=S.ThemesInfo,t.ArcGISGeometryServer=b.ArcGISGeometryServer,t.ArcGISFeatureServer=b.ArcGISFeatureServer,t.ArcGISVectorTileServer=b.ArcGISVectorTileServer},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1);var a=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"getLayerJSON",value:function(e){return this._queryByParameters(e,{},{},function(e){return e+"/layer.json"})}}]),t}();o.Zondy.Service.TerrainServer=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1);var a=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"queryResourceInfo",value:function(e){return this._querySimpleInfo(e,function(e){return e+"/resources/info"})}},{key:"getStyleList",value:function(e){return this._querySimpleInfo(e,function(e){return e+"/resources/styles"})}},{key:"getStyle",value:function(e){return this._queryByParameters(e,{styleId:{type:"String"}},{},function(e,t){return e+"/resources/styles/"+t.styleId+"?f=json"})}},{key:"getTileMap",value:function(e){return this._querySimpleInfo(e,function(e){return e+"/tilemap"})}}]),t}();o.Zondy.Service.ArcGISVectorTileServer=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i={DefaultThemeInfo:1,DataItemIntrinsicInfo:2};t.default=i,n.Zondy.Object.Theme.CAllOtherDataItemInfoSource=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(0),o=function(e){e=(0,i.defaultValue)(e,{}),(0,i.extend)(this,e),this.LibID=void 0!==e.LibID?e.LibID:0,this.Ovprnt=void 0!==e.Ovprnt&&e.Ovprnt,this.Angle=void 0!==e.Ovprnt?e.Ovprnt:0,this.BackClr=void 0!==e.BackClr?e.BackClr:0,this.BackExp=void 0!==e.BackExp?e.BackExp:0,this.Chnt=void 0!==e.Chnt?e.Chnt:0,this.Color=void 0!==e.Color?e.Color:0,this.FontAngle=void 0!==e.FontAngle?e.FontAngle:0,this.Height=void 0!==e.Height?e.Height:0,this.Ifnt=void 0!==e.Ifnt?e.Ifnt:0,this.Ifnx=void 0!==e.Ifnx?e.Ifnx:0,this.IsFilled=void 0!==e.IsFilled&&e.IsFilled,this.IsHzpl=void 0===e.IsHzpl||e.IsHzpl,this.OffsetX=void 0!==e.OffsetX?e.OffsetX:0,this.OffsetY=void 0!==e.OffsetY?e.OffsetY:0,this.Space=void 0!==e.Space?e.Space:0,this.Width=void 0!==e.Width?e.Width:0};t.default=o,n.Zondy.Object.Theme.CAnnInfo=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i={Unknown:0,Value:1,Percent:2};t.default=i,n.Zondy.Object.Theme.CChartLabelFormat=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=s(r(15)),o=s(r(144)),a=r(0);function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r.ChartType=void 0!==e.ChartType?e.ChartType:o.default.Bar,r.ChartThemeInfoArr=void 0!==e.ChartThemeInfoArr?e.ChartThemeInfoArr:null,r.RepresentInfo=void 0!==e.RepresentInfo?e.RepresentInfo:null,r.Type="CChartTheme",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),t}();t.default=u,n.Zondy.Object.Theme.CChartTheme=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i={Unknown:0,Bar:1,Bar3D:2,Pie:3,Pie3D:4,Line:5,Line3D:6,Point:7};t.default=i,n.Zondy.Object.Theme.CChartType=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r(15)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=(0,o.defaultValue)(e,{});var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.Expression=void 0!==e.Expression?e.Expression:"",r.Info=void 0!==e.Info?e.Info:null,r.Value=void 0!==e.Value?e.Value:null,r.Type="CDotDensityTheme",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),t}();t.default=a,n.Zondy.Object.Theme.CDotDensityTheme=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r(15)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=(0,o.defaultValue)(e,{});var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.ClrInfo=void 0!==e.ClrInfo?e.ClrInfo:[25,57,89,121],r.Type="CFourColorTheme",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),t}();t.default=a,n.Zondy.Object.Theme.CFourColorTheme=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r(15)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=(0,o.defaultValue)(e,{});var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.BaseValue=void 0!==e.BaseValue?e.BaseValue:141e-6,r.DispMinus=void 0!==e.DispMinus&&e.DispMinus,r.DispZero=void 0!==e.DispZero&&e.DispZero,r.Expression=void 0!==e.Expression?e.Expression:null,r.MinusPntInfo=void 0!==e.MinusPntInfo?e.MinusPntInfo:null,r.PlusPntInfo=void 0!==e.PlusPntInfo?e.PlusPntInfo:null,r.ZeroPntInfo=void 0!==e.ZeroPntInfo?e.ZeroPntInfo:null,r.Type="CGraduatedSymbolTheme",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),t}();t.default=a,n.Zondy.Object.Theme.CGraduatedSymbolTheme=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.XClsType={SFCls:"SFeatureCls",OCls:"ObjectCls",ACls:"AnnotationCls",GnetCls:"GNetCls",RDS:"RasterDataset",SFClsInfo:"sfcls_new"};t.VectClsType={Unknown:0,SFCls:"SFeatureCls",AnnoCls:"AnnotationCls"};t.FeatureType={Unknown:0,Pnt:1,Lin:2,Reg:3};t.FontShape={Positive:0,LeftOblique:1,RightOblique:2,LeftTowering:3,RightTowering:4};t.LabelLinType={Curved:0,Forward:1,Horizontal:2,Tangent:3};t.LabelRegType={Curved:0,Forward:1,Horizontal:2,Boundray:3,Outside:4};t.LabelPntType={PntAnyDir:0,PntEightDir:1,PntOnFea:2};t.RepeatType={Auto:0,NoRep:1,OnStep:2};t.LabelSpreadType={AutoSpread:0,Centralization:1,Decentralization:2};t.LineConstrain={Left:0,Right:1,Above:2,Below:3,Both:4,NoRes:5};t.EightDirType={East:0,North:1,NorthEast:2,NorthWest:3,South:4,SouthEast:5,SouthWest:6,West:7,NoDir:8};t.ISShowArc={Reg:0,Arc:1,All:2};t.NetAnalyType={UserMode:"UserMode",SysModeCommwayPrefer:"SysModeCommwayPrefer",SysModeHighWayPrefer:"SysModeHighWayPrefer",SysModeMinCost:"SysModeMinCost",SysModeMinDis:"SysModeMinDis",SysModeSysRecommend:"SysModeSysRecommend"};t.NetElemType={Node:1,Edge:2,CNode:3,Chain:4,Center:5,Source:13,Sink:13};t.CLinAdjustType={Adjust:0,NoAdjust:1};t.CLinHeadType={Round:0,Square:1,Butt:2};t.CLinJointType={Round:0,Square:1,Butt:2};t.CLinStyleMakeType={Byrule:0,Bypoint:1};t.CItemType={Unknown:0,UniqueTheme:1,RangeTheme:2};t.MapType={Doc:"mapType",Tile:"tileType"};t.LayerStatusType={Show:"show",Hide:"hide",Include:"include",Exclude:"exclude"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r(15)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=(0,o.defaultValue)(e,{});var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.DefaultInfo=void 0!==e.DefaultInfo?e.DefaultInfo:null,r.ExpInfoArr=void 0!==e.ExpInfoArr?e.ExpInfoArr:null,r.MultiClassThemeInfoArr=void 0!==e.MultiClassThemeInfoArr?e.MultiClassThemeInfoArr:null,r.GeoInfoType=void 0!==e.GeoInfoType?e.GeoInfoType:null,r.Type="CMultiClassTheme",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),t}();t.default=a,n.Zondy.Object.Theme.CMultiClassTheme=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r(15)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=(0,o.defaultValue)(e,{});var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.Type="CRandomTheme",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),t}();t.default=a,n.Zondy.Object.Theme.CRandomTheme=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=s(r(15)),o=s(r(140)),a=r(0);function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=(0,a.defaultValue)(e,{});var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.AllOtherDataItemInfoSource=void 0!==e.AllOtherDataItemInfoSource?e.AllOtherDataItemInfoSource:o.default.DefaultThemeInfo,r.Expression=void 0!==e.Expression?e.Expression:"",r.DefaultInfo=void 0!==e.DefaultInfo?e.DefaultInfo:null,r.RangeThemeInfoArr=void 0!==e.RangeThemeInfoArr?e.RangeThemeInfoArr:null,r.GeoInfoType=void 0!==e.GeoInfoType?e.GeoInfoType:null,r.Type="CRangeTheme",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),t}();t.default=u,n.Zondy.Object.Theme.CRangeTheme=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=s(r(15)),o=s(r(51)),a=r(0);function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=(0,a.defaultValue)(e,{});var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.ThemeInfo=void 0!==e.ThemeInfo?e.ThemeInfo:new o.default,r.Type="CSimpleTheme",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),t}();t.default=u,n.Zondy.Object.Theme.CSimpleTheme=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r(15)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=(0,o.defaultValue)(e,{});var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.DefaultInfo=void 0!==e.DefaultInfo?e.DefaultInfo:null,r.Expression=void 0!==e.Expression?e.Expression:"",r.UniqueThemeInfoArr=void 0!==e.UniqueThemeInfoArr?e.UniqueThemeInfoArr:null,r.GeoInfoType=void 0!==e.GeoInfoType?e.GeoInfoType:null,r.Type="CUniqueTheme",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),t}();t.default=a,n.Zondy.Object.Theme.CUniqueTheme=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=function(e,t){this.name=void 0!==e?e:null,this.attribute=void 0!==t?t:null};t.default=i,n.Zondy.Object.Theme.FolderInfo=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=function(e,t){this.name=void 0!==e?e:null,this.Value=void 0!==t?t:null};t.default=i,n.Zondy.Object.Theme.FolderInfoAttribute=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=function(e,t){this.LayerName=void 0!==e?e:null,this.ThemeArr=void 0!==t?t:null};t.default=i,n.Zondy.Object.Theme.ThemesInfo=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWorkflow=t.WorkFlowServer=void 0;var n=E(r(9)),i=E(r(372)),o=E(r(373)),a=E(r(374)),s=E(r(375)),u=E(r(376)),l=E(r(377)),c=E(r(378)),f=E(r(379)),h=E(r(380)),p=E(r(381)),d=E(r(382)),y=E(r(383)),g=E(r(384)),v=E(r(385)),m=E(r(386)),_=E(r(387)),b=E(r(388)),S=E(r(389)),x=E(r(390)),w=E(r(391)),O=E(r(392)),P=E(r(393));function E(e){return e&&e.__esModule?e:{default:e}}var k={WorkFlowServer:n.default,WorkFlowServer600227:i.default,WorkFlowServer600228:o.default,WorkFlowServer600229:a.default,WorkFlowServer600230:s.default,WorkFlowServer600231:u.default,WorkFlowServer600232:l.default,WorkFlowServer600233:c.default,WorkFlowServer600235:f.default,WorkFlowServer600237:h.default,WorkFlowServer600238:p.default,WorkFlowServer600239:d.default,WorkFlowServer600307:y.default,WorkFlowServer600308:g.default,WorkFlowServer600309:v.default,WorkFlowServer600314:m.default,WorkFlowServer600334:_.default,WorkFlowServer600336:b.default,WorkFlowServer600340:S.default,WorkFlowServer600354:x.default,WorkFlowServer600368:w.default,WorkFlowServer600369:O.default,WorkFlowServer600370:P.default};t.WorkFlowServer=n.default,t.createWorkflow=function(e){var t=((e||{}).url||"").match(/(workflow)(\/)\d+(\/)(WorkflowServer)/g);if(!t)throw new Error("未识别工作流id");var r=t[0].split("/"),n=void 0;if(Array.isArray(r)&&3===r.length&&(n=r[1]),!n)throw new Error("未识别工作流id "+n);var i=k["WorkFlowServer"+n];if(!i)throw new Error("id为"+n+"的工作流未定义");return new i(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(0),o=function(e,t,r){var n=(0,i.defaultValue)(r,{});(0,i.extend)(this,n),this.FID=(0,i.defaultValue)(t,0),this.Values=(0,i.defaultValue)(e,null)};t.default=o,n.Zondy.Object.CAttDataRow=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IGSFeatureLayer=t.Scene=t.IGSTileLayer=t.IGSSceneSubLayer=t.IGSSceneLayer=t.IGSMapImageSubLayer=t.IGSMapImageLayer=t.IGSImageLayer=t.IGSVectorTileSubLayer=t.IGSVectorTileLayer=void 0;var n=p(r(397)),i=p(r(164)),o=p(r(422)),a=p(r(423)),s=p(r(166)),u=p(r(424)),l=p(r(425)),c=p(r(92)),f=p(r(167)),h=p(r(426));function p(e){return e&&e.__esModule?e:{default:e}}t.IGSVectorTileLayer=n.default,t.IGSVectorTileSubLayer=i.default,t.IGSImageLayer=o.default,t.IGSMapImageLayer=a.default,t.IGSMapImageSubLayer=s.default,t.IGSSceneLayer=l.default,t.IGSSceneSubLayer=c.default,t.IGSTileLayer=u.default,t.Scene=f.default,t.IGSFeatureLayer=h.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=l(r(68)),a=l(r(399)),s=l(r(52)),u=r(3);function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,i.defaultValue)(e,{}),r.type=u.LayerType.vectorTileSubLayer,r._labelingInfo=(0,i.defaultValue)(e.labelingInfo,[]),r._styleLayers=(0,i.defaultValue)(e.styleLayers,[]),r._visible=(0,i.defaultValue)(e.visible,!0),r._renderer=(0,i.defaultValue)(e.renderer,void 0),r._updateStyle(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),n(t,[{key:"_updateStyle",value:function(){var e=this;this._convertLabelInfoToLabelClass(),this._renderer?this._styleLayers.forEach(function(t){e._updateStyleLayerByRenderer(t),e._updateStyleLayerVisibleBySublayer(t),e._updateStyleLayerByLabelingInfo(t)}):this._styleLayers.forEach(function(t){e._updateStyleLayerVisibleBySublayer(t),e._updateStyleLayerByLabelingInfo(t)})}},{key:"_updateStyleLayerVisibleBySublayer",value:function(e){var t=this.layer.getExtendProperties(e.id,"_preVisible");t||(e.layout||(e.layout={visibility:"visible"}),t=e.layout.visibility?e.layout.visibility:"visible",this.layer.setExtendProperties(e.id,"_preVisible",t)),e.layout.visibility=this._visible?t:"none"}},{key:"_updateStyleLayerByRenderer",value:function(e){var t=a.default.renderToStyle(this._renderer,e.type,JSON.parse(JSON.stringify(e)));if(t){var r=t.paint,n=t.layout;e.paint=Object.assign(e.paint,r),e.layout=Object.assign(e.layout,n)}}},{key:"_convertLabelInfoToLabelClass",value:function(){for(var e=(0,i.cloneObject)(this._labelingInfo),t=[],r=0;r<e.length;r++)t.push(new o.default(e[r]));this._labelingInfo=t}},{key:"_updateStyleLayerByLabelingInfo",value:function(e){this.layer.setExtendProperties(e.id,"labelingInfo",this._labelingInfo)}},{key:"_fireLayerUpdateEvent",value:function(e,t){e=(0,i.defaultValue)(e,"setStyleLayer"),t=(0,i.defaultValue)(t,[]),this.layer._fireLayerUpdateEvent([{params:t,dataChanged:!0,name:e,operationType:"method"}])}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.type=this.type,e.styleLayers=this.styleLayers,e.renderer=this.renderer?this.renderer.toJSON():null,e.labelingInfo=this.labelingInfo.map(function(e){return e.toJSON()}),e}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();Object.defineProperties(c.prototype,{styleLayers:{get:function(){return this._styleLayers}},renderer:{get:function(){return this._renderer},set:function(e){var t=this;this._renderer=e,this._styleLayers.forEach(function(e){t._updateStyleLayerByRenderer(e)}),this._fireLayerUpdateEvent()}},visible:{get:function(){return this._visible},set:function(e){var t=this;this._visible=e,this._styleLayers.forEach(function(e){t._updateStyleLayerVisibleBySublayer(e)}),this._fireLayerUpdateEvent()}},labelingInfo:{get:function(){return this._labelingInfo},set:function(e){var t=this;this._labelingInfo=e,this._convertLabelInfoToLabelClass(),this._styleLayers.forEach(function(e){t._updateStyleLayerByLabelingInfo(e)}),this._fireLayerUpdateEvent()}}}),t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMapboxExpression=t.convertColorToRgb=t.convertLineStyle=void 0;var n=r(1);var i="== != > < >= <= array at boolean case coalesce collator format image in interpolate interpolate-hcl interpolate-lab\nlength let literal match number number-format object step string to-boolean to-color to-number to-string var within";t.convertLineStyle=function(e,t){switch(e){case"dash":case"esriSLSDash":return t?[4,3]:[3,4];case"dash-dot":case"esriSLSDashDot":return t?[4,3,1,3]:[3,4,0,4];case"dot":case"esriSLSDot":return t?[1,3]:[0,4];case"long-dash":case"esriSLSLongDash":return t?[8,3]:[7,4];case"long-dash-dot":case"esriSLSLongDashDot":return t?[8,3,1,3]:[7,4,0,4];case"long-dash-dot-dot":case"esriSLSDashDotDot":return t?[8,3,1,3,1,3]:[7,4,0,4,0,4];case"short-dash":case"esriSLSShortDash":return t?[4,1]:[3,2];case"short-dash-dot":case"esriSLSShortDashDot":return t?[4,1,1,1]:[3,2,0,2];case"short-dash-dot-dot":case"esriSLSShortDashDotDot":return t?[4,1,1,1,1,1]:[3,2,0,2,0,2];case"short-dot":case"esriSLSShortDot":return t?[1,1]:[0,2];case"solid":case"esriSLSSolid":case"none":default:return}},t.convertColorToRgb=function(e){return e instanceof n.Color?e.toCssRGBAString():e},t.isMapboxExpression=function(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&i.indexOf(e[0])>-1}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(11),o=r(0);var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.symbol=i.Symbol.fromJSON(t.symbol),this.labelSymbol=t.labelSymbol?i.Symbol.fromJSON(t.labelSymbol):null,this.labelExpressionInfo=(0,o.defaultValue)(t.labelExpressionInfo,null),this.minValue=t.minValue,this.maxValue=t.maxValue}return n(e,[{key:"toJSON",value:function(){var e={};return e.symbol=this.symbol.toJSON(),e.labelSymbol=this.labelSymbol?this.labelSymbol.toJSON():null,e.labelExpressionInfo=this.labelExpressionInfo?JSON.parse(JSON.stringify(this.labelExpressionInfo)):null,e.minValue=this.minValue,e.maxValue=this.maxValue,e}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t=(0,o.defaultValue)(t,{}))}}]),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(1);var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,i.defaultValue)(t,{}),this.ratio=t.ratio,this.color=o.Color.fromColor((0,i.defaultValue)(t.color,{}))}return n(e,[{key:"toJSON",value:function(){var e={};return e.ratio=this.ratio,e.color=this.color.toJSON(),e}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t=(0,i.defaultValue)(t,{}))}}]),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(160));var o=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(8),o=r(0),a=r(4),s=r(16),u=r(1),l=r(3),c=function(e){return e&&e.__esModule?e:{default:e}}(r(41)),f=r(10);var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=l.LayerType.webTileLayer,r.spatialReference=void 0,r.extent=void 0,r.tileSize=void 0,r.tileInfo=void 0,r.tileSliceType=(0,o.defaultValue)(e.tileSliceType,l.TileSliceType.wmts),r.subDomains=(0,o.defaultValue)(e.subDomains,["a","b","c"]),e.tileInfo?(e.extent instanceof a.Extent||o.Log.error("非法的范围参数!"),r.extent=a.Extent.fromJSON(e.extent),e.tileInfo instanceof c.default||o.Log.error("非法的瓦片信息参数!"),r.tileInfo=e.tileInfo,e.spatialReference instanceof a.SpatialReference||o.Log.error("非法的坐标系参数!"),r.spatialReference=a.SpatialReference.fromJSON(e.spatialReference),r.tileInfo.size&&r.tileInfo.size[0]||o.Log.error("无法获取瓦片大小!"),r.tileSize=r.tileInfo.size[0]):(r.spatialReference=e.spatialReference?a.SpatialReference.fromJSON(e.spatialReference):new a.SpatialReference({wkid:4326}),r.spatialReference.isGeographic?(r.extent=new a.Extent({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:a.SpatialReference.fromJSON(r.spatialReference)}),r.tileSize=256,r.url.indexOf("tianditu.com/DataServer")>-1||r.url.indexOf("tianditu.gov.cn/DataServer")?r.tileInfo=s.TileInfoUtil.parseWebTileLayerInfo(r,r.extent,1):r.tileInfo=s.TileInfoUtil.parseWebTileLayerInfo(r,r.extent)):r.spatialReference.isWebMercator?(r.extent=new a.Extent({xmin:-20037508.3427892,ymin:-20037508.3427892,xmax:20037508.3427892,ymax:20037508.3427892,spatialReference:a.SpatialReference.fromJSON(r.spatialReference)}),r.tileSize=256,r.url.indexOf("tianditu.com/DataServer")>-1||r.url.indexOf("tianditu.gov.cn/DataServer")?r.tileInfo=s.TileInfoUtil.parseWebTileLayerInfo(r,r.extent,1):r.tileInfo=s.TileInfoUtil.parseWebTileLayerInfo(r,r.extent)):o.Log.error("默认坐标系仅支持地理坐标系和Web墨卡托坐标系!")),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.TileLayer),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.subDomains=this.subDomains.map(function(e){return e}),e}}],[{key:"fromJSON",value:function(e){var r=new t(e=(0,f.jsonClone)(e));return r.loadStatus=l.LoadStatus.loaded,r.loaded=!0,r}}]),t}();u.Zondy.Layer.WebTileLayer=h,t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(4),a=r(8),s=r(21),u=r(159),l=r(39),c=r(1);var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(r.url=(0,i.defaultValue)(e.url,""),r.name=(0,i.defaultValue)(e.name,""),r.type=(0,i.defaultValue)(e.type,""),r.fields=(0,i.defaultValue)(e.fields,[]),r.geomType=(0,i.defaultValue)(e.geomType||e.GeomType,""),r.maxScale=(0,i.defaultValue)(e.maxScale,0),r.minScale=(0,i.defaultValue)(e.minScale,0),e.range?r.extent=new o.Extent({xmin:e.range.xmin,ymin:e.range.ymin,xmax:e.range.xmax,ymax:e.range.ymax}):r.extent=new o.Extent({xmin:-180,ymin:-90,xmax:180,ymax:90}),r.spatialReference=e.spatialReference?new o.SpatialReference(e.spatialReference):new o.SpatialReference({wkid:4326}),r.supportedMethods=(0,i.defaultValue)(e.supportedMethods,[]),r.systemLibGuid=(0,i.defaultValue)(e.systemLibGuid,void 0),r.systemLibName=(0,i.defaultValue)(e.systemLibName,void 0),r.id=(0,i.defaultValue)(e.id,e.LayerIndex||e.index),void 0!==r.id&&null!==r.id&&""!==r.id||(r.id=(0,i.getGUID)()),r.index=(0,i.defaultValue)(e.index,void 0),r._renderer=e.renderer?l.BaseRenderer.fromJSON(e.renderer):void 0,r._definitionExpression=(0,i.defaultValue)(e.definitionExpression,void 0),r._definitionExpressionChanged=(0,i.defaultValue)(e.definitionExpressionChanged,!1),r.geometryFilter=(0,i.defaultValue)(e.geometryFilter,void 0),e.sublayers&&Array.isArray(e.sublayers)){for(var n=new c.Collection,a=0;a<e.sublayers.length;a++){var s=e.sublayers[a];s.layer=r,n.add(new t(s))}r.sublayers=n}return r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.SubLayer),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.url=this.url,e.name=this.name,e.type=this.type,e.fields=this.fields,e.geomType=this.geomType,e.maxScale=this.maxScale,e.minScale=this.minScale,e.extent=this.extent.toJSON(),e.spatialReference=this.spatialReference.toJSON(),e.supportedMethods=this.supportedMethods,e.systemLibGuid=this.systemLibGuid,e.systemLibName=this.systemLibName,e.index=this.index,e.renderer=this._renderer?this._renderer.toJSON():void 0,e}},{key:"clone",value:function(){return new t(this.toJSON())}},{key:"load",value:function(){if(this.layer&&this.layer._mapServer){var e=this;return this.layer._mapServer.queryLayerInfo({layerId:this.id}).then(function(t){var r=t.data;return r&&(r.drawingInfo&&r.drawingInfo.renderer&&(e._renderer=(0,s.formatIGSRenderer)(r.drawingInfo.renderer)),e.fields=r.fields,e.geomType=r.geomType,e.index=r.index,e.id=r.index,e.maxScale=r.maxScale,e.minScale=r.minScale,e.name=r.name,e.extent=new o.Extent({xmin:r.range.xmin,ymin:r.range.ymin,xmax:r.range.xmax,ymax:r.range.ymax}),e.spatialReference=r.spatialReference?new o.SpatialReference(r.spatialReference):new o.SpatialReference({wkid:4326}),e.systemLibGuid=r.systemLibGuid,e.systemLibName=r.systemLibName,e.type=r.type,e.url=r.url),new Promise(function(t){t(e)})})}}},{key:"_getSourceLayer",value:function(){for(var e=this.layer;e&&!(e instanceof u.IGSMapImageLayer);)e=e.layer;return e instanceof u.IGSMapImageLayer?e:null}}]),t}();Object.defineProperties(f.prototype,{renderer:{get:function(){return this._renderer},set:function(e){e instanceof l.BaseRenderer?this._renderer=e:this._renderer=l.BaseRenderer.fromJSON(e);var t=this._getSourceLayer();t&&t.refresh()}},definitionExpression:{get:function(){return this._definitionExpression},set:function(e){if(e){this._definitionExpressionChanged=!0,this._definitionExpression=e;var t=this._getSourceLayer();t&&t.refresh()}}},visible:{get:function(){return this._visible},set:function(e){this._visible=e;var t=this._getSourceLayer();t&&t.refresh()}}}),t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(4),a=function(e){return e&&e.__esModule?e:{default:e}}(r(92));var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,i.defaultValue)(t,{}),this.sceneIndex=(0,i.defaultValue)(t.sceneIndex,0),this.sceneName=(0,i.defaultValue)(t.sceneName,void 0),this.sceneMode=(0,i.defaultValue)(t.sceneMode,void 0),this.sceneRange=(0,i.defaultValue)(new o.Extent({xmin:t.sceneRange.xMin,ymin:t.sceneRange.yMin,xmax:t.sceneRange.xMax,ymax:t.sceneRange.yMax,zmin:t.sceneRange.zMin,zmax:t.sceneRange.zMax}),void 0),this.sublayers=(0,i.defaultValue)(t.sublayers,[]),this.layer=(0,i.defaultValue)(t.layer,void 0),this.extendedProps=(0,i.defaultValue)(t.extendedProps,void 0)}return n(e,[{key:"findSublayerByGDBP",value:function(e){for(var t=void 0,r=0;r<this.sublayers.length;r++)if(this.sublayers[r].url===e){t=this.sublayers[r];break}return t}},{key:"toJSON",value:function(){for(var e=[],t=0;t<this.sublayers.length;t++)e.push((0,i.toJSON)(this.sublayers[t],a.default));return{sceneIndex:this.sceneIndex,sceneName:this.sceneName,sceneMode:this.sceneMode,sceneRange:(0,i.toJSON)(this.sceneRange,o.Extent),extendedProps:this.extendedProps,sublayers:e}}}]),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(4),a=r(8);var s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.url=(0,i.defaultValue)(e.url,""),r.name=(0,i.defaultValue)(e.name,""),r.type=(0,i.defaultValue)(e.type,""),r.fields=(0,i.defaultValue)(e.fields,[]),r.geomType=(0,i.defaultValue)(e.geomType||e.GeomType,""),r.maxScale=(0,i.defaultValue)(e.maxScale,0),r.minScale=(0,i.defaultValue)(e.minScale,0),e.range?r.extent=new o.Extent({xmin:e.range.xmin,ymin:e.range.ymin,xmax:e.range.xmax,ymax:e.range.ymax}):r.extent=new o.Extent({xmin:-180,ymin:-90,xmax:180,ymax:90}),r.spatialReference=(0,i.defaultValue)(e.spatialReference,void 0),r.supportedMethods=(0,i.defaultValue)(e.supportedMethods,[]),r.systemLibGuid=(0,i.defaultValue)(e.systemLibGuid,void 0),r.systemLibName=(0,i.defaultValue)(e.systemLibName,void 0),r.id=e.id,r.index=(0,i.defaultValue)(e.index,void 0),r.moveIndex=(0,i.defaultValue)(e.moveIndex,void 0),r._renderer=(0,i.defaultValue)(e.renderer,void 0),r.layer=(0,i.defaultValue)(e.layer,void 0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.SubLayer),n(t,null,[{key:"fromJSON",value:function(e){return new t(e=(0,i.defaultValue)(e,{}))}}]),t}();Object.defineProperties(s.prototype,{renderer:{get:function(){return this._renderer},set:function(e){this._renderer=e,this.layer.setSubLayer(this)}}}),t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(8),o=r(1),a=r(0),s=r(4),u=(r(21),c(r(33))),l=c(r(41));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(e=(0,a.defaultValue)(e,{}),r.description="IGS WMTS子图层",r.imageFormat=(0,a.defaultValue)(e.imageFormat,"image/png"),r.identifier=(0,a.defaultValue)(e.identifier,""),r.title=(0,a.defaultValue)(e.title,""),r.imageFormats=(0,a.defaultValue)(e.imageFormats,void 0),r.styleId=(0,a.defaultValue)(e.styleId,void 0),r.styles=(0,a.defaultValue)(e.styles,void 0),r.tileMatrixSets=(0,a.defaultValue)(e.tileMatrixSets,void 0),r.tileMatrixSets&&r.tileMatrixSets instanceof Array)for(var n=0;n<r.tileMatrixSets.length;n++)r.tileMatrixSets[n]instanceof o.TileMatrixSet||(r.tileMatrixSets[n]=o.TileMatrixSet.fromJSON(r.tileMatrixSets[n]),!r.tileMatrixSets[n].tileInfo||r.tileMatrixSets[n].tileInfo instanceof l.default||(r.tileMatrixSets[n].tileInfo=l.default.fromJSON(r.tileMatrixSets[n].tileInfo)));r.tileMatrixSetId=(0,a.defaultValue)(e.tileMatrixSetId,void 0),r.tileMatrixSet=(0,a.defaultValue)(e.tileMatrixSet,void 0),r.extent=(0,a.defaultValue)(e.extent,void 0),r.resourceURLTemplates=(0,a.defaultValue)(e.resourceURLTemplates,void 0);for(var i=0;i<r.tileMatrixSets.length;i++)r.tileMatrixSets[i].id===r.tileMatrixSetId&&(r.spatialReference=s.SpatialReference.fromJSON(r.tileMatrixSets[i].tileInfo.spatialReference));return r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Layer),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);e.description=this.description,e.imageFormat=this.imageFormat,e.identifier=this.identifier,e.title=this.title,e.imageFormats=this.imageFormats,e.styleId=this.styleId,e.tileMatrixSets=this.tileMatrixSets,e.tileMatrixSetId=this.tileMatrixSetId,e.tileMatrixSet=(0,a.toJSON)(this.tileMatrixSet,o.TileMatrixSet),e.extent=this.extent instanceof u.default?this.extent.toJSON():this.extent,e.resourceURLTemplates=this.resourceURLTemplates,e.spatialReference=this.spatialReference instanceof s.SpatialReference?this.spatialReference.toJSON():this.spatialReference;var r=[];if(this.styles)for(var n=0;n<this.styles.length;n++)r.push(this.styles[n]instanceof o.WMTSStyle?this.styles[n].toJSON():this.styles[n]);return e.styles=r,e}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();f.fromJSON=function(e){return e=(0,a.defaultValue)(e,{}),new f(e)},o.Zondy.Layer.WMTSSubLayer=f,t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r(52)),a=r(4);var s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.name=(0,i.defaultValue)(e.name,void 0),r.description=(0,i.defaultValue)(e.abstract,void 0),r.queryable=(0,i.defaultValue)(e.queryable,!0),r.spatialReferences=(0,i.defaultValue)(e.spatialReferences,[]),r.spatialReference=(0,i.defaultValue)(e.spatialReference,void 0),r.extent=(0,i.defaultValue)(e.extent,void 0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);e.spatialReference=(0,i.toJSON)(this.spatialReference,a.SpatialReference),e.name=this.name,e.extent=(0,i.toJSON)(this.extent,a.Extent);for(var r=[],n=0;n<this.spatialReferences.length;n++)r.push((0,i.toJSON)(this.spatialReferences[n],a.SpatialReference));return e.spatialReferences=r,e}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(3),a=r(8),s=r(0),u=r(16),l=r(24),c=r(4),f=r(45);var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=(0,s.defaultValue)(e,{});var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._id=(0,s.defaultValue)(e.id,(0,s.getGUID)()),r._basemap=(0,s.defaultValue)(e.basemap,void 0),r.groupLayer=new u.GroupLayer({layers:e.layers}),r.groupLayer.setMap(r),r.layers=r.groupLayer.layers,r.allLayers=new i.CollectionFlattener({getCollections:function(){return r._basemap&&r._basemap.baseLayers?[r._basemap.baseLayers,r.groupLayer.layers]:[r.groupLayer.layers]},getChildrenFunction:function(e){return e.layers}}),r._spatialReference=null,r._fullExtent=null,r._waitLoadStorage=[],r._isInitLayersLoaded=!1,r._initHandlers(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Evented),n(t,[{key:"toJSON",value:function(){for(var e={layers:[]},t=0;t<this.layers.items.length;t++)e.layers.push((0,s.toJSON)(this.layers.items[t],a.Layer));return e.exportTime=(new Date).toISOString(),e}},{key:"clone",value:function(){return(0,s.cloneObject)(this)}},{key:"add",value:function(e,t){if(e){var r=e instanceof a.Layer?e:a.Layer.fromJSON(e);this._isValidateLayers([r]),this.groupLayer.add(e,t)}}},{key:"addMany",value:function(e,t){if(e&&Array.isArray(e)){var r=e.map(function(e){return e instanceof a.Layer?e:a.Layer.fromJSON(e)});this._isValidateLayers(r),this.groupLayer.addMany(e,t)}}},{key:"remove",value:function(e){e&&this.groupLayer.remove(e)}},{key:"removeMany",value:function(e){e&&Array.isArray(e)&&this.groupLayer.removeMany(e)}},{key:"removeAll",value:function(){this.groupLayer.removeAll()}},{key:"destroy",value:function(){this.removeAll(),this._removeHandlers()}},{key:"reorder",value:function(e,t){this.groupLayer.reorder(e,t)}},{key:"findLayerById",value:function(e){return this.groupLayer.findLayerById(e)}},{key:"dispatchEvent",value:function(e,t,r){return this.fire(e,t,r),this}},{key:"getFullExtent",value:function(){return this._getLayersExtent(this.allLayers)}},{key:"_isValidateLayers",value:function(e){this.groupLayer._isValidateLayers(e)}},{key:"_initHandlers",value:function(){this._initBasemapHandlers(),this.groupLayer.on(o.MapEventType.layerChange,this._processGroupLayerChange,this)}},{key:"_removeHandlers",value:function(){this.groupLayer.off(o.MapEventType.layerChange,this._processGroupLayerChange,this),this._basemap&&this._basemap._baseGroupLayer.off(o.MapEventType.layerChange,this._processGroupLayerChange,this)}},{key:"_initBasemap",value:function(){this._basemap&&(this._basemap.baseLayers&&this.allLayers._addCollection(this._basemap.baseLayers,0),this._initBasemapHandlers(),this.basemap._baseGroupLayer.fire(o.MapEventType.layerChange,new l.LayerChangeEvent({added:this._basemap._baseGroupLayer.layers.items.map(function(e){return e}),path:[this._basemap._baseGroupLayer]})),this.fire(o.MapEventType.basemapChange,new l.BasemapChangeEvent({basemap:this._basemap,detail:[{action:"basemap-create"}]})))}},{key:"_initBasemapHandlers",value:function(){this._basemap&&this._basemap._baseGroupLayer.on(o.MapEventType.layerChange,this._processGroupLayerChange,this)}},{key:"_processGroupLayerChange",value:function(e){var t=e.added,r=e.moved,n=e.removed,i=e.sourceTarget,a=e.path;this._dispatchOldMapEvent(e),this.fire(o.MapEventType.layerChange,new l.LayerChangeEvent({type:o.MapEventType.layerChange,sourceTarget:i,removed:n,path:a,moved:r,added:t})),t.length>0&&(this._waitLoadStorage.push(e),this._triggerLayersAddToView()),0===n.length&&0===t.length&&0===r.length?this._waitLoadStorage=this._waitLoadStorage.filter(function(e){return e.sourceTarget!==i}):n.length>0&&(this._waitLoadStorage.forEach(function(e){e&&e.sourceTarget===i&&(e.added=e.added.filter(function(e){return!n.some(function(t){return t&&e&&t.id===e.id})}))}),this._waitLoadStorage=this._waitLoadStorage.filter(function(e){return e&&e.added&&e.added.length>0}))}},{key:"_triggerLayersAddToView",value:function(){this._isInitLayersLoaded?this._processLoadStorage():(this._cacheProcessLoadStorage||(this._cacheProcessLoadStorage=(0,f.debouncePromise)(this._processLoadStorage,10).bind(this)),this._cacheProcessLoadStorage())}},{key:"_processLoadStorage",value:function(){var e=this;if(0!==this._waitLoadStorage.length){var t=this._waitLoadStorage.map(function(e){var t=e.sourceTarget,r=e.added.filter(function(e){return e});return t.load().then(function(){return{added:r,sourceTarget:t}})});(0,f.allSettled)(t).then(function(t){if(t&&Array.isArray(t)){var r=[];t.forEach(function(e){var t=e.value,n=t.added.filter(function(e){return e&&e.type!==o.LayerType.unknown});n.length>0&&r.push({added:n,sourceTarget:t.sourceTarget})}),r.length>0&&(e._isInitLayersLoaded=!0,e.fire(o.MapEventType.layerLoaded,new l.LayerLoadedEvent({addDetail:r})))}}),this._waitLoadStorage=[]}}},{key:"_dispatchOldMapEvent",value:function(e){var t=e.added,r=e.removed,n=e.sourceTarget;if(n===this.groupLayer&&(t&&Array.isArray(t)&&t.length>0&&(1===t.length?this.dispatchEvent(o.MapEventType.layerAdd,{type:o.MapEventType.layerAdd,layer:t[0]}):this.dispatchEvent(o.MapEventType.layerAddMany,{type:o.MapEventType.layerAddMany,layers:t})),Array.isArray(r))){var i=n.layers;i&&i.items&&0===i.items.length&&0===r.length?this.dispatchEvent(o.MapEventType.layerRemoveAll,{type:o.MapEventType.layerRemoveAll,layers:r}):1===r.length?this.dispatchEvent(o.MapEventType.layerRemove,{type:o.MapEventType.layerRemove,layer:r[0]}):r.length>1&&this.dispatchEvent(o.MapEventType.layerRemoveMany,{type:o.MapEventType.layerRemoveMany,layers:r})}}},{key:"_loadLayers",value:function(){return this._basemap&&this._basemap._baseGroupLayer.fire(o.MapEventType.layerChange,new l.LayerChangeEvent({added:this._basemap._baseGroupLayer.layers.items.map(function(e){return e}),path:[this._basemap._baseGroupLayer]})),this.groupLayer&&this.groupLayer.fire(o.MapEventType.layerChange,new l.LayerChangeEvent({added:this.groupLayer.layers.items.map(function(e){return e}),path:[this.groupLayer]})),this}},{key:"_setSpatialReference",value:function(e){this._spatialReference=e}},{key:"_getLayersExtent",value:function(e){var t=this,r=void 0;return e.forEach(function(e){if(e.extent){var n=void 0;n=u.TileInfoUtil.isSameSpatialReference(e.spatialReference,t._spatialReference)?e.extent:i.Projection.project(e.extent,t._spatialReference),e.spatialReference&&t._spatialReference&&e.loaded&&(r?(r.xmin>n.xmin&&(r.xmin=n.xmin),r.ymin>n.ymin&&(r.ymin=n.ymin),r.xmax<n.xmax&&(r.xmax=n.xmax),r.ymax<n.ymax&&(r.ymax=n.ymax)):r=c.Extent.fromJSON(n.toJSON()))}}),this._fullExtent=r,r}}],[{key:"fromJSON",value:function(e){e=(0,s.defaultValue)(e,{});for(var r=(0,s.defaultValue)(e.layers,[]),n=new t,i=0;i<r.length;i++)n.add(a.Layer.fromJSON(r[i]));return n}}]),t}();Object.defineProperties(h.prototype,{basemap:{get:function(){return this._basemap},set:function(e){this._basemap?e?this._basemap._setBasemap(e,this):(this._basemap._setBasemap(e),this._basemap=null):e?(this._basemap=e,this._basemap._map=this,this._initBasemap()):this._basemap=null}},spatialReference:{get:function(){return this._spatialReference},set:function(){}},fullExtent:{get:function(){return this._fullExtent},set:function(){}}}),t.default=h,i.Zondy.Map=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RendererUtil=t.GroupLayerView=t.BaseFeatureLayerView=t.BaseGraphicsLayerView=t.BaseRendererLayerView=t.LayerView=t.SceneView=t.MapView=t.BaseView=void 0;var n=h(r(72)),i=h(r(452)),o=h(r(453)),a=h(r(55)),s=h(r(173)),u=h(r(454)),l=h(r(455)),c=h(r(95)),f=h(r(174));function h(e){return e&&e.__esModule?e:{default:e}}t.BaseView=n.default,t.MapView=i.default,t.SceneView=o.default,t.LayerView=a.default,t.BaseRendererLayerView=s.default,t.BaseGraphicsLayerView=u.default,t.BaseFeatureLayerView=l.default,t.GroupLayerView=c.default,t.RendererUtil=f.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(55));var o=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r._initInstance(e),r._initHandlers(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_initInstance",value:function(e){}},{key:"_initHandlers",value:function(){this._layerChangeAction=this._layerChangeAction.bind(this),this.layer.on("set",this._layerChangeAction)}},{key:"_removeHandlers",value:function(){this.layer.off("set",this._layerChangeAction)}},{key:"_layerChangeAction",value:function(e){"renderer"===e.eventData.key&&this._rendererChangeAction(e)}},{key:"_rendererChangeAction",value:function(e){}},{key:"onRemove",value:function(e){(function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"onRemove",this).call(this,e),this._removeHandlers()}}]),t}();t.default=o},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _Zondy=__webpack_require__(2),_Zondy2=_interopRequireDefault(_Zondy),_index=__webpack_require__(57),_util=__webpack_require__(0),_symbol=__webpack_require__(11),_VisualVariableType=__webpack_require__(40),_VisualVariableType2=_interopRequireDefault(_VisualVariableType);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parseExpression(feature,expression){if(!expression)return"";var excuteStr=expression.replace(/\$feature/g,"feature.attributes");try{var v=eval(excuteStr);return v}catch(e){_index.Log.info("字段表达式输入值非法")}return""}function parseFieldAndExpression(e,t,r){var n=(e.attributes||{})[t];return n=(0,_util.defined)(n)?n:parseExpression(e,r)}function randomColor(){return"rgba("+Math.round(255*Math.random())+","+Math.round(255*Math.random())+","+Math.round(255*Math.random())+",1)"}function calcSpaceRatio(e,t,r){var n=r-t;return(Number.isNaN(n)||n<=0)&&_index.Log.error("传入的视觉变量不合法"),e<=t?0:e>r?1:(e-t)/n}function calcGradientInStops(e,t,r){if(Array.isArray(t)&&!(t.length<=0)){var n=t.sort(function(e,t){return e.value-t.value});if(1===n.length)return r(t[0],t[0],1);var i=n[0],o=n[n.length-1];if(e<i.value)return r(i,i,1);if(e>=o.value)return r(o,o,1);for(var a=1;a<n.length;a++){var s=n[a-1],u=n[a];if(e>=s.value&&e<=u.value)return r(s,u,calcSpaceRatio(e,s.value,u.value))}}}function updateFeatureSymbol(e,t,r,n){if(e&&e.symbol&&t){var i=!(0,_util.defined)(r)||r;e.visible!==i&&(e.visible=i);var o=e.symbol.toJSON(),a=t.toJSON();if(o!==a&&(e.symbol=a),n&&Array.isArray(n)&&!(n.length<=0))for(var s=e.symbol instanceof _symbol.Symbol?e.symbol.toJSON():JSON.stringify(e.symbol),u=0;u<n.length;u++){var l=n[u],c=l.field,f=l.type,h=parseFieldAndExpression(e,c,l.valueExpression);if(h=parseFloat(h),!Number.isNaN(h)){switch(f){case _VisualVariableType2.default.color:var p=calcGradientInStops(h,l.stops,function(e,t,r){var n=_index.Color.fromColor(e.color),i=_index.Color.fromColor(t.color),o=parseInt(n.red+(i.red-n.red)*r),a=parseInt(n.green+(i.green-n.green)*r),s=parseInt(n.blue+(i.blue-n.blue)*r),u=parseFloat(n.alpha+(i.alpha-n.alpha)*r);return new _index.Color(o,a,s,u)});(0,_util.defined)(p)&&(s.color=p);break;case _VisualVariableType2.default.size:var d=l.stops,y=l.maxDataValue,g=l.minDataValue,v=l.maxSize,m=l.minSize,_=d;(0,_util.isNumber)(y)&&(0,_util.isNumber)(g)&&(0,_util.isNumber)(v)&&(0,_util.isNumber)(m)&&(_=[{size:m,value:g},{size:v,value:y}]);var b=calcGradientInStops(h,_,function(e,t,r){var n=e.size,i=t.size;return parseInt(n+(i-n)*r)});(0,_util.defined)(b)&&(s.size=b);break;case _VisualVariableType2.default.opacity:var S=calcGradientInStops(h,l.stops,function(e,t,r){var n=e.opacity,i=t.opacity;return parseInt(100*(n+(i-n)*r))/100});if((0,_util.defined)(S)&&s.color){var x=_index.Color.fromColor(s.color);x.alpha=S,s.color=x}}e.symbol=s}}}}function updateRandomFeatureSymbol(e){if(e&&e.geometry)switch(e.geometry.type){case _index.GeometryType.multiPoint:case _index.GeometryType.point:e.symbol=new _symbol.SimpleMarkerSymbol({color:randomColor(),outline:new _symbol.SimpleLineSymbol({color:randomColor()})});break;case _index.GeometryType.multiLineString:case _index.GeometryType.lineString:e.symbol=new _symbol.SimpleLineSymbol({color:randomColor()});break;case _index.GeometryType.polygon:case _index.GeometryType.extent:case _index.GeometryType.circle:case _index.GeometryType.multiPolygon:e.symbol=new _symbol.SimpleFillSymbol({color:randomColor(),outline:new _symbol.SimpleLineSymbol({color:randomColor()})})}}function updateRenderer(e,t){var r=(t=t||{}).visualVariables||[];switch(t.type){case _index.RendererType.simple:var n=t.symbol;e.forEach(function(e){updateFeatureSymbol(e,n,!0,r)});break;case _index.RendererType.uniqueValue:for(var i=t.defaultSymbol||{},o=t.defaultVisible,a=t.uniqueValueInfos||[],s=t.valueExpression||"",u=0;u<e.length;u++){var l=e[u],c=parseFieldAndExpression(l,t.field||"",s);if((0,_util.defined)(c)){for(var f=null,h=null,p=0;p<a.length;p++){var d=a[p];if(d.value===c){f=d.symbol,h=d;break}}if(f){updateFeatureSymbol(l,f,h.visible,r);continue}}updateFeatureSymbol(l,i,o,r)}break;case _index.RendererType.classBreak:for(var y=t.defaultSymbol||{},g=t.classBreakInfos||[],v=t.valueExpression||"",m=t.defaultVisible,_=0;_<e.length;_++){var b=e[_],S=parseFieldAndExpression(b,t.field||"",v);if((0,_util.defined)(S)){for(var x=null,w=null,O=0;O<g.length;O++){var P=g[O],E=P.maxValue;if(S>=P.minValue&&S<E){x=P.symbol,w=P;break}}if(x){updateFeatureSymbol(b,x,w.visible,r);continue}}updateFeatureSymbol(b,y,m,r)}break;case _index.RendererType.random:e.forEach(function(e){updateRandomFeatureSymbol(e)});break;case _index.RendererType.rank:var k=t.symbol,T=t,M=T.minSize,I=T.maxSize,L=T.maxDataValue,C=T.minDataValue,N=T.field,R=T.valueExpression;(!k||M>I||!N&&!R)&&_index.Log.error("等级符号专题图参数异常!");var j=void 0,G=void 0;e.forEach(function(e){var t=parseFieldAndExpression(e,N,R);t=parseFloat(t),(0,_util.defined)(j)||(j=t),(0,_util.defined)(G)||(G=t),j=Math.max(j,t),G=Math.min(G,t)}),(0,_util.defined)(C)&&(0,_util.defined)(L)&&L>C&&(j=L,G=C),j-G==0&&(j+=1e-4),e.forEach(function(e){var t=k.clone(),n=parseFieldAndExpression(e,N,R),i=void 0;i=(n=parseFloat(n))<G?0:n>j?1:(n-G)/(j-G);var o=parseInt(i*(I-M)+M);if((0,_util.isNumber)(o))switch(t.type){case _index.SymbolType.simpleMarker:t.size=o;break;case _index.SymbolType.pictureMarker:t.width=o,t.height=o;break;case _index.SymbolType.text:var a=t.font||{};a.size=o,t.font=a}updateFeatureSymbol(e,t,!0,r)});break;default:var V=t.symbol;e.forEach(function(e){updateFeatureSymbol(e,V,!0,r)})}}var RendererUtil={updateRenderer:updateRenderer,parseExpression:parseExpression};_Zondy2.default.RendererUtil=RendererUtil,exports.default=RendererUtil},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(0),a=r(4),s=S(r(17)),u=S(r(22)),l=S(r(34)),c=S(r(459)),f=S(r(176)),h=S(r(177)),p=S(r(178)),d=S(r(460)),y=S(r(461)),g=S(r(462)),v=S(r(179)),m=S(r(180)),_=r(97),b=r(56);function S(e){return e&&e.__esModule?e:{default:e}}var x=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if((e=(0,o.defaultValue)(e,{})).view||o.Log.error("options.view is null!",e),r.view=e.view,r._spatialReference=r.view&&r.view._spatialReference?r.view._spatialReference:new a.SpatialReference("EPSG:4326"),r._sketchInnerLayer=new b.GraphicsLayer,r.layer=(0,o.defaultValue)(e.layer,void 0),r._layer=r.layer||r._sketchInnerLayer,r.sketchStyle=(0,o.defaultValue)(e.sketchStyle,new s.default),r._editable=(0,o.defaultValue)(e.editable,!0),r.isSimple=(0,o.defaultValue)(e.isSimple,!1),r.snapOption=(0,o.defaultValue)(e.snapOption,{}),r.snapAndReferGeometries=(0,o.defaultValue)(e.snapAndReferGeometries,[]),r.measureOption=(0,o.defaultValue)(e.measureOption,void 0),r._drawTool=null,r._sketchDataType=null,r._sketchSnappingTool={},r._sketchTopologyTool={},r._undoRedoManager=new y.default,r._editorState={editMode:0,undoRedoManager:r.undoRedoManager,_hitTestEvent:r._hitTestEvent},r._layer){var n=r.view._map.findLayerById(r._layer.id),i=r.view.getInnerLayer(r._layer);n&&i?r._hitTestSketchEvent(r._layer):r._layer.on("layerview-created",function(e){r._layerView=e.layerView,r.view._id===e.view._id&&r._hitTestSketchEvent(r._layer)})}return r._sketchInnerLayer?(r._sketchInnerLayer.on("layerview-created",function(e){r._layerView=e.layerView,r.view._id===e.view._id&&r._hitTestSketchEvent()}),r.view._graphicsLayers.add(r._sketchInnerLayer),r._sketchSnappingTool=new c.default(Object.assign(r.snapOption,{view:r.view})),r._sketchTopologyTool=new d.default):r._hitTestSketchEvent(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Evented),n(t,[{key:"start",value:function(e,t){var r=this._getDrawTool(e,t),n=r.drawTool,i=r.sketchType;r.isGeometry?this._startDrawTool(n,i,e):this._startDrawTool(n,i)}},{key:"startCustomDrawTool",value:function(e,t){var r=new e({view:this.view,sketchStyle:this.sketchStyle,layer:this._layer,sketchInnerLayer:this._sketchInnerLayer,undoRedoManager:this._undoRedoManager,elevationInfo:this.elevationInfo,_sketchEditor:this});this._startDrawTool(r,t)}},{key:"_getDrawTool",value:function(e,t){var r=void 0,n=void 0,o=!1;switch("number"==typeof e?r=e:e instanceof a.Point?(r=i.SketchDataType.POINT,o=!0):e instanceof a.LineString?(r=i.SketchDataType.POLYLINE,o=!0):e instanceof a.Polygon?(r=i.SketchDataType.POLYGON,o=!0):e instanceof a.Circle?(r=i.SketchDataType.CIRCLE,o=!0):e instanceof a.Extent&&(r=i.SketchDataType.RECTANGLE,o=!0),r){case i.SketchDataType.POINT:case i.SketchDataType.TEXT:n=new u.default({view:this.view,sketchStyle:this.sketchStyle,sketchDataType:r,layer:this._layer,sketchInnerLayer:this._sketchInnerLayer,undoRedoManager:this._undoRedoManager,elevationInfo:this.elevationInfo,_sketchEditor:this});break;case i.SketchDataType.POLYLINE:n=new f.default({view:this.view,sketchStyle:this.sketchStyle,layer:this._layer,sketchInnerLayer:this._sketchInnerLayer,extendOptions:t,undoRedoManager:this._undoRedoManager,elevationInfo:this.elevationInfo,_sketchEditor:this});break;case i.SketchDataType.POLYGON:n=new l.default({view:this.view,sketchStyle:this.sketchStyle,layer:this._layer,sketchInnerLayer:this._sketchInnerLayer,extendOptions:t,undoRedoManager:this._undoRedoManager,elevationInfo:this.elevationInfo,_sketchEditor:this});break;case i.SketchDataType.CIRCLE:n=new h.default({view:this.view,sketchStyle:this.sketchStyle,layer:this._layer,sketchInnerLayer:this._sketchInnerLayer,extendOptions:t,undoRedoManager:this._undoRedoManager,elevationInfo:this.elevationInfo,_sketchEditor:this});break;case i.SketchDataType.RECTANGLE:n=new p.default({view:this.view,sketchStyle:this.sketchStyle,layer:this._layer,sketchInnerLayer:this._sketchInnerLayer,extendOptions:t,undoRedoManager:this._undoRedoManager,elevationInfo:this.elevationInfo,_sketchEditor:this});break;case i.SketchDataType.FREEHANDPOLYLINE:n=new v.default({view:this.view,sketchStyle:this.sketchStyle,layer:this._layer,sketchInnerLayer:this._sketchInnerLayer,extendOptions:t,undoRedoManager:this._undoRedoManager,elevationInfo:this.elevationInfo,_sketchEditor:this});break;case i.SketchDataType.FREEHANDPOLYGON:n=new m.default({view:this.view,sketchStyle:this.sketchStyle,layer:this._layer,sketchInnerLayer:this._sketchInnerLayer,extendOptions:t,undoRedoManager:this._undoRedoManager,elevationInfo:this.elevationInfo,_sketchEditor:this})}return{drawTool:n,sketchType:r,isGeometry:o}}},{key:"_startDrawTool",value:function(e,t,r){if(this._drawTool&&(this._drawTool._removeEditGraphics(),this._drawTool._stopAll(),this._drawTools=[],this._undoRedoManager.reset()),this._drawTool=e,this._drawTool){if(this._drawTool._sketchDataType=t,this._sketchEvent(),r){if(this.isSimple)if(!a.GeometryEngine.isSimple(r)){var n=new _.SketchEditorEvent({type:i.SketchEditorEventType.create,toolEventInfo:{type:i.SketchEditorToolEventType.geometryUnsimple},state:i.SketchEditorState.complete});return this._drawTool.fire(i.SketchEditorEventType.create,n,self),o.Log.info("该坐标构成的几何不符合拓扑规范!")}this._addGeometry(r,this._layer),this._bindHit&&this._bindHit(this._drawTool,void 0,this._layer),this._drawTool.state="drawn"}else this._drawTool.start(this._sketchDataType);this._selectEvent(),this._drawEvent()}}},{key:"_addFeatureToSketchEditor",value:function(e,t){var r=e.geometry,n=this._getDrawTool(r),i=n.drawTool,o=n.sketchType;this._drawTool=i,this._drawTool&&(this._drawTool.sketchStage.entityGraphic=e,this._drawTool.state="drawn",this._drawTool._sketchDataType=o,this._selectEvent(),this._drawEvent(),this._sketchEvent(),t&&this._drawTool._addFeatureToLayer(e,this._layer))}},{key:"stop",value:function(){this._drawTool&&(this.view.cursor=this._drawTool.cursorStyle,this._drawTool.cursorStyle=null,this.view._mapActionControl("drag-pan",!0),this._drawTool.stop(),this._drawTool._editMode===i.SketchEditMode.DRAWING&&this._remove(),this._fireCancelDrawEvent())}},{key:"remove",value:function(){this._drawTool&&this._fireRemoveEvent(this._drawTool.sketchStage.entityGraphic),this._remove()}},{key:"_remove",value:function(){this._drawTool&&(this._drawTool.removeDrawTool(),this._drawTool=null)}},{key:"update",value:function(e,t){this._drawTool.updateFeature(e,t)}},{key:"_addGeometry",value:function(e,t){this._drawTool.addFeatureByGeometry(e,void 0,void 0,t)}},{key:"addVertex",value:function(e,t){return this._drawTool.addVertex(e,t)}},{key:"updateVertex",value:function(e,t){return this._drawTool.updateVertex(e,t)}},{key:"removeVertex",value:function(e){return this._drawTool.removeVertex(e)}},{key:"getSketchDataType",value:function(){return this._sketchDataType}},{key:"setSketchStyle",value:function(e){var t=this;if(this.sketchStyle=e.clone(),this._drawTool&&this._drawTool.sketchStage){this._drawTool.sketchStyle=e;var r=this._drawTool.sketchStage;(0,o.isNull)(r.entityGraphic)||("Point"===r.entityGraphic.geometry.type?this._drawTool._sketchDataType===i.SketchDataType.TEXT?r.entityGraphic.symbol=e._textStyle:r.entityGraphic.symbol=e._vertexStyle:"Polyline"===r.entityGraphic.geometry.type?r.entityGraphic.symbol=e._lineStyle:"Polygon"===r.entityGraphic.geometry.type&&(r.entityGraphic.symbol=e._fillStyle)),(0,o.isNull)(r.vertexGraphics)||r.vertexGraphics.forEach(function(t){t.symbol=e._vertexStyle}),(0,o.isNull)(r.midVertexGraphics)||r.midVertexGraphics.forEach(function(t){t.symbol=e._selectVertexStyle}),(0,o.isNull)(r.selectBoxGraphics)||r.selectBoxGraphics.forEach(function(r){t._drawTool._sketchDataType===i.SketchDataType.TEXT?r.symbol=e._selectTextStyle:r.symbol=e._selectBoxStyle}),(0,o.isNull)(r.selectBoxVertexGraphics)||r.selectBoxVertexGraphics.forEach(function(t){t.symbol=e._selectBoxVertexStyle})}}},{key:"getSketchStyle",value:function(){return this.sketchStyle}},{key:"union",value:function(e){for(var t=this,r=this,n=0;n<e.length;n++){if(!a.GeometryEngine.isSimple(e[n]))return o.Log.error("输入的几何不符合拓扑规范!")}var s=i.Projection.project(this._sketchTopologyTool.unionPolygons(e),this._spatialReference);if("Polygon"===s.type){var u=r.view.allLayerViews.items.filter(function(e){return e.id===r._layer.id});return this.start(s),u.length>0?(this._selectEvent(),this._drawEvent(),this._sketchEvent()):r._layer.once("layerview-created",function(){r._selectEvent(),r._drawEvent(),t._sketchEvent()}),s}o.Log.error("合并结果不符合规范,请检查输入的几何!")}},{key:"split",value:function(e,r){var n=null,s=this;if(e instanceof a.Polygon)n=e;else{if(!(e instanceof t&&e.drawTool._sketchDataType===i.SketchDataType.POLYGON))return void o.Log.error("传入对象不符合要求,请检查");n=e.sketchStage.entityGraphic}return function(e,t){for(var r=1;r<e.coordinates[0].length;r++)e.coordinates[0][r][0]===e.coordinates[0][r-1][0]&&e.coordinates[0][r][1]===e.coordinates[0][r-1][1]&&(e.coordinates[0].splice(r,1),r--);var n=s._sketchTopologyTool.splitPolygonByPolyline(e,t);n.length>0&&(s.view.allLayerViews.items.filter(function(e){return e.id===s._layer.id}).length>0?n.forEach(function(e){e=i.Projection.project(e,s._spatialReference),s.start(e)}):s._layer.once("layerview-created",function(){n.forEach(function(e){e=i.Projection.project(e,s._spatialReference),s.start(e)})}));return n}(n,r)}},{key:"drawPolylineToPolygon",value:function(e){var t=this,r=this;this._drawTool&&(this._drawTool._removeEditGraphics(),this._drawTool._stopAll(),this._drawTools=[],this._undoRedoManager.reset()),this._drawTool=new g.default({view:this.view,sketchStyle:this.sketchStyle,layer:this._sketchInnerLayer,undoRedoManager:this._undoRedoManager,elevationInfo:this.elevationInfo,_sketchEditor:this,snapAndReferGeometries:e}),this._drawTool.start(),this._drawTool.on("drawn",function(e){e.geometry&&(e.geometry instanceof a.Polygon?r.start(e.geometry):e.geometry.coordinates.forEach(function(e){var n=new a.Polygon({coordinates:e,spatialReference:t._spatialReference});r.start(n)}))})}},{key:"undo",value:function(){if(this._editable){var e=this._undoRedoManager.undo();return e?(this._updateByStage(e,"undo"),this._fireUndoEvent(e.entityGraphic),e.entityGraphic.geometry):null}}},{key:"redo",value:function(){if(this._editable){var e=this._undoRedoManager.redo();return e?(this._updateByStage(e,"redo"),this._fireRedoEvent(e.entityGraphic),e.entityGraphic.geometry):null}}},{key:"canUndo",value:function(){return this._undoRedoManager.canUndo()}},{key:"canRedo",value:function(){return this._undoRedoManager.canRedo()}},{key:"destroy",value:function(){this._removeSketchEvent(),this.stop(),this._remove(),this.view=null,this._spatialReference=null,this._sketchInnerLayer=null,this._layer=null,this.sketchStyle=new s.default,this._editable=!0,this.isSimple=!1,this.snapOption={},this.snapAndReferGeometries=[],this.measureOption=null,this._drawTool=null,this._drawTools=[],this._sketchDataType=null,this._sketchSnappingTool={},this._sketchTopologyTool={},this._undoRedoManager=new y.default,this._editorState=null,this._sketchSnappingTool=null}},{key:"_updateByStage",value:function(e,t){var r=this;this._drawTool.sketchStage.getAllFeatures().forEach(function(e){r._drawTool._removeFeatureFromLayer(e,r._sketchInnerLayer)}),this._drawTool._removeFeatureFromLayer(this._drawTool.sketchStage.entityGraphic,this._layer),this._drawTool._setSketchStage(e),e.getAllFeatures().forEach(function(n){var o=r._updateDrawToolByFeature(n);if(o)if(o._editMode===i.SketchEditMode.DRAWING)if(n.id===e.entityGraphic.id){var a=n.clone(),s=[],u=o._currentMovePoint;if(u){if(o.vertexNum&&("undo"===t?o.vertexNum--:"redo"===t&&o.vertexNum++),"Polygon"===a.geometry.type){s=a.geometry.coordinates[0];var l=o.vertexNum||0;1===l?(s[1]=u.coordinates,s[2]=u.coordinates):2===l||1===l?s[2]=u.coordinates:s.splice(s.length-1,0,u.coordinates)}else"LineString"===a.geometry.type&&(s=a.geometry.coordinates,1===o.vertexNum?s[1]=u.coordinates:s[s.length]=u.coordinates);o.sketchStage.entityGraphic=a,o._addFeatureToLayer(a,r._layer)}}else o._addFeatureToLayer(n,r._sketchInnerLayer);else n.id===e.entityGraphic.id?o._addFeatureToLayer(n,r._layer):o._addFeatureToLayer(n,r._sketchInnerLayer)})}},{key:"_updateDrawToolByFeature",value:function(e){for(var t=null,r=this._drawTool._drawTools,n=0;n<r.length;n++)if(r[n].sketchStage.entityGraphic.id===e.id){r[n].sketchStage.entityGraphic=e,t=r[n];break}return t}},{key:"_selectEvent",value:function(){var e=this;this._drawTool.on("selected",function(t){var r=t.isSelected?e:null;e.fire("selected",{selectedSketch:r,isSelected:t.isSelected},e)})}},{key:"_drawEvent",value:function(){var e=this;this._drawTool.on("drawn",function(t){e.fire("drawn",{geometry:t.geometry,feature:t.feature},e)}),this._drawTool.on("drawn-vertex",function(t){e.fire("drawn-vertex",{geometry:t.geometry,feature:t.feature},e)})}},{key:"_sketchEvent",value:function(){var e=this;this._drawTool&&(this._drawTool.on(i.SketchEditorEventType.create,function(t){e.fire(i.SketchEditorEventType.create,t,e),t.state===i.SketchEditorState.complete&&(e._drawTool&&(e._drawTool.state="drawn",e._bindHit(e._drawTool,void 0,e._layer),e._drawTool._stopAll(),e._drawTool=null),e._undoRedoManager.reset())}),this._drawTool.on(i.SketchEditorEventType.update,function(t){e.fire(i.SketchEditorEventType.update,t,e),t.state===i.SketchEditorState.complete&&e._undoRedoManager.reset()}))}},{key:"_addFeatureToCustomGraphicLayer",value:function(e){this._layer&&(this.view._map.findLayerById(this._layer.id)&&this._sketchInnerLayer.remove(e),this._layer.graphics.find(function(t){return e.id===t.id})?(this._layer.remove(e),this._layer.add(e)):this._layer.add(e))}},{key:"_removeFeatureToCustomGraphicLayer",value:function(e){this._layer&&(this.view._map.findLayerById(this._layer.id)&&this._layer.graphics.find(function(t){return e.id===t.id})&&(this._layer.remove(e),this._sketchInnerLayer.add(e)))}},{key:"_removeSketchEvent",value:function(){this.off(i.SketchEditorEventType.create),this.off(i.SketchEditorEventType.update),this.off(i.SketchEditorEventType.undo),this.off(i.SketchEditorEventType.redo),this.off(i.SketchEditorEventType.remove),this.off("drawn"),this.off("selected")}},{key:"_fireUndoEvent",value:function(e){var t=new _.SketchEditorEvent({type:i.SketchEditorEventType.undo,feature:e,geometry:e.geometry});this.fire(i.SketchEditorEventType.undo,t,this)}},{key:"_fireRedoEvent",value:function(e){var t=new _.SketchEditorEvent({type:i.SketchEditorEventType.redo,feature:e,geometry:e.geometry});this.fire(i.SketchEditorEventType.redo,t,this)}},{key:"_fireRemoveEvent",value:function(e){var t=new _.SketchEditorEvent({type:i.SketchEditorEventType.remove,feature:e,geometry:e.geometry});this.fire(i.SketchEditorEventType.remove,t,this)}},{key:"_fireCancelDrawEvent",value:function(){var e=new _.SketchEditorEvent({type:i.SketchEditorEventType.create,eventInfo:null,state:i.SketchEditorState.cancel});this.fire(i.SketchEditorEventType.create,e,self)}},{key:"getGeometry",value:function(){return this._drawTool?this._drawTool.sketchStage.entityGraphic.geometry:null}},{key:"setSnapOption",value:function(e){this.snapOption=Object.assign(this.snapOption,e),this._sketchSnappingTool.setSnapOption(e)}},{key:"getSnapOption",value:function(){return this.snapOption}},{key:"setSnapAndReferGeometries",value:function(e){this.snapAndReferGeometries=e,this._drawTool&&this._drawTool.setSnapAndReferGeometries()}},{key:"getSnapAndReferGeometries",value:function(){return this.snapAndReferGeometries}},{key:"_bindHit",value:function(){}}]),t}();Object.defineProperties(x.prototype,{editable:{get:function(){return this._editable},set:function(e){this._editable=e}},sketchDataType:{get:function(){return this._sketchDataType},set:function(e){this._sketchDataType=e}}}),i.Zondy.SketchEditor=x,t.default=x},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(4),a=f(r(23)),s=(f(r(19)),f(r(22))),u=f(r(34)),l=f(r(17)),c=(r(11),r(0));function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r._initEvent(),r.type="sketchPolylineDrawTool",r._drawTools=[r],r._otherDrawTools=[],r._currentMovePoint=void 0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),n(t,[{key:"_initEvent",value:function(){this._processEvent=this._processEvent.bind(this),this.on("pan",this._processEvent),this.on("vertexScale",this._processEvent),this.on("midVertexScale",this._processEvent),this.on("vertexMove",this._processEvent),this.on("midVertexAdd",this._processEvent)}},{key:"drawFeature",value:function(){var e=this;this._editMode=i.SketchEditMode.DRAWING,this.view._mapActionControl("double-click-zoom",!1),this.view._mapActionControl("video-map-active",!0);var t=!1,r=!1,n=!1,a=null,u=[],l=[];this.vertexNum=0;var f=[];this.cursorStyle=this.view.cursor,(0,c.isNull)(this.cursorStyle)&&(this.view.cursor="crosshair");var h=this._getInteractiveDom(),p=this.extendOptions&&this.extendOptions.vertexNumber?this.extendOptions.vertexNumber:null;this._setInitSnap(),this._fireStartDrawEvent();var d=function n(u){if(u&&u.x&&u.y){e._stopInitSnap(),clearTimeout(null);var h={x:u.x,y:u.y};h,(new Date).getTime(),e._editMode=i.SketchEditMode.DRAWING;var d=null;d=e._snapPoint?e._snapPoint:e.view.toMap({x:h.x,y:h.y});var y=e.vertexNum+1;if(1===y)l=[d.coordinates],(a=e._getFeature()).geometry.coordinates=[l[0],l[0]];else if(2===y){var g=a.geometry.coordinates[0];if(g&&g[0]===d.coordinates[0]&&g[1]===d.coordinates[1])return c.Log.info("相邻两顶点重复!");l=[a.geometry.coordinates[0],d.coordinates],a.geometry.coordinates=l,e._polylineGeometry=a}else{var v=(l=a.geometry.coordinates)[l.length-2];if(v&&v[0]===d.coordinates[0]&&v[1]===d.coordinates[1])return c.Log.info("相邻两顶点重复!");if(l[l.length-1]=d.coordinates,e._sketchEditor.isSimple){var m=new o.LineString({coordinates:l,spatialReference:e._spatialReference});if(!o.GeometryEngine.isSimple(m))return e._fireUnsimpleDraw(),c.Log.info("该坐标构成的几何不符合拓扑规范!")}a.geometry.coordinates=l}if(e.vertexNum=y,p&&y>=p)e.view.off(i.ViewEventType.immediateClick,n);else{var _=new s.default({view:e.view,layer:e.layer,_parent:e,sketchStyle:e.sketchStyle,elevationInfo:e.elevationInfo});_.addFeature(d,void 0,void 0,e.sketchInnerLayer),e._drawTools.push(_);var b=_.sketchStage.entityGraphic;e.sketchStage.entityGraphic=a,e.sketchStage.vertexGraphics.push(b),a&&(r=t=!0),l.length>1&&f.push(function(e,t){return(e[1]-t[1])/(e[0]-t[0])}(l[l.length-1],l[l.length-2])),"click",e.fire("drawn-vertex",{geometry:_.sketchStage.entityGraphic.geometry,feature:_.sketchStage.entityGraphic},self),e._fireDrawVertexEvent(a),e.undoRedoManager&&e.undoRedoManager.addProcess("add-vertex",e.sketchStage,e._editMode)}}},y=!0,g=function(i){if(i&&i.x&&i.y&&t&&!n){clearTimeout(null),n=!0,e.sketchStage.snapGraphics.length>0&&(e.sketchStage.snapGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.snapGraphics=[]);var o={x:i.x,y:i.y},s=e.view.toMap({x:o.x,y:o.y});a=e.sketchStage.entityGraphic;var c=p&&e.vertexNum===p?e.vertexNum-1:e.vertexNum;l=1===c?[a.geometry.coordinates[0]]:a.geometry.coordinates.slice(0,a.geometry.coordinates.length-1),c>=1&&(e._snapPoint=e.getSnapGraphics(s,l)),e._snapPoint&&(s=e._snapPoint),e._currentMovePoint=s,1===c?a.geometry.coordinates[1]=s.coordinates:c>1&&(r?(a.geometry.coordinates.push(s.coordinates),r=!1):a.geometry.coordinates[a.geometry.coordinates.length-1]=s.coordinates),a.geometry._pixelCoords=u,a.geometry.coordinates=JSON.parse(JSON.stringify(a.geometry.coordinates)),y&&(e._addFeatureToLayer(a,e.layer),y=!1),n=!1,"move";var f=e._getInteractiveDom();h=h.concat(f),e._removeInteractiveStyle(f),e._fireChangeCursorEvent(a)}},v=function(){if((clearTimeout(null),clearTimeout(null),(a=e.sketchStage.entityGraphic)&&e._sketchEditor.isSimple)&&!o.GeometryEngine.isSimple(a.geometry))return e._fireUnsimpleDraw(),c.Log.info("该坐标构成的几何不符合拓扑规范!");if(e.vertexNum<2&&e.sketchStage.entityGraphic)return c.Log.info("线几何顶点少于两个,不符合规范!");l=[],u=[],e.stop(),e.sketchStage.snapGraphics.length>0&&(e.sketchStage.snapGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.snapGraphics=[]),e._editMode=i.SketchEditMode.NONE,e.view.cursor=e.cursorStyle,e._addInteractiveStyle(h),e.fire("drawn",{geometry:a.geometry,feature:a},self),e._fireStopDrawEvent(a),e.sketchStage.vertexGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.vertexNum=0,e.sketchStage.vertexGraphics=[],e._currentMovePoint=void 0,e.undoRedoManager._initDrawProcess(),setTimeout(function(){e.view._mapActionControl("double-click-zoom",!0),e.view._mapActionControl("video-map-active",!1)},0),"double-click"};this._drawEventHandlers.push(d,g,v),this.view.on(i.ViewEventType.immediateClick,d),this.view.on(i.ViewEventType.pointerMove,g),this.view.on(i.ViewEventType.doubleClick,v)}},{key:"addFeature",value:function(e,t,r,n){var i=null;i=t&&t.lineStyle?t.lineStyle:this.sketchStyle.lineStyle;var o=this._getFeature(e,i);r&&(o.attributes=r),this.sketchStage.entityGraphic=o,this._addFeatureToLayer(o,n)}},{key:"addFeatureByGeometry",value:function(e,t,r,n){var o=null;o=t&&t.lineStyle?t.lineStyle:this.sketchStyle.lineStyle;var a=new i.Feature({geometry:e,symbol:o,elevationInfo:this.elevationInfo});r&&(a.attributes=r),this.sketchStage.entityGraphic=a,this._addFeatureToLayer(a,n)}},{key:"_getFeature",value:function(e){e||(e=[[0,0],[1,1]]);var t=new o.LineString({coordinates:e,spatialReference:this._spatialReference}),r=this.sketchStyle.lineStyle.clone();return new i.Feature({geometry:t,symbol:r,elevationInfo:this.elevationInfo})}},{key:"hitTestFeature",value:function(e,t){this.view._mapActionControl("video-map-active",!0),!this._parent&&this.editOption.showSelectBox&&(this._editMode===i.SketchEditMode.NONE?this._editMode=i.SketchEditMode.EDITGRAGIC:this._editMode===i.SketchEditMode.EDITVERTEX&&(this.view.off(i.ViewEventType.immediateClick,this._mapClickEvent),this._mapClickEvent=null,this._editMode=i.SketchEditMode.EDITGRAGIC),this.selectFeature(e)),this._parent&&this._parent._editMode===i.SketchEditMode.EDITGRAGIC&&this.startPanGraphics(e,t)}},{key:"selectFeature",value:function(e){var t=this;if(this.editOption.showSelectBox){this._clearEditGraphics(2);var r=e.geometry.extent,n=new u.default({view:this.view,layer:this.layer,sketchStyle:new l.default({fillStyle:this.sketchStyle._selectBoxStyle,isShowSegmentLength:!0,isShowArea:!0}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(n),n.addFeature([[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax]],void 0,void 0,this.sketchInnerLayer),this.sketchStage.selectBoxGraphics=[n.sketchStage.entityGraphic];var a=[];if(a=[{point:new o.Point({coordinates:[r.xmax,r.ymax],spatialReference:this._spatialReference}),direction:"ne"},{point:new o.Point({coordinates:[r.xmax,r.ymin],spatialReference:this._spatialReference}),direction:"se"},{point:new o.Point({coordinates:[r.xmin,r.ymin],spatialReference:this._spatialReference}),direction:"sw"},{point:new o.Point({coordinates:[r.xmin,r.ymax],spatialReference:this._spatialReference}),direction:"nw"}],this._sketchEditor&&this._sketchEditor._getCenterCoordinate){var c=[{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmax,r.ymax],[r.xmax,r.ymin]),spatialReference:this._spatialReference}),direction:"e",type:"midVertex"},{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmax,r.ymin],[r.xmin,r.ymin]),spatialReference:this._spatialReference}),direction:"s",type:"midVertex"},{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmin,r.ymin],[r.xmin,r.ymax]),spatialReference:this._spatialReference}),direction:"w",type:"midVertex"},{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmin,r.ymax],[r.xmax,r.ymax]),spatialReference:this._spatialReference}),direction:"n",type:"midVertex"}];a=a.concat(c)}var f=[],h=[];a.forEach(function(e){var r=new s.default({view:t.view,layer:t.layer,sketchStyle:new l.default({vertexStyle:t.sketchStyle._selectBoxVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:t.elevationInfo,_parent:t});t._drawTools.push(r),r.addFeature(e.point,t.sketchStage,{direction:e.direction,type:e.type},t.sketchInnerLayer),f.push(r),h.push(r.sketchStage.entityGraphic)}),this.sketchStage.selectBoxVertexGraphics=h,this._otherDrawTools?this._otherDrawTools.push(n):this._otherDrawTools=[n],this._otherDrawTools=this._otherDrawTools.concat(f),this.undoRedoManager&&this.undoRedoManager.addProcess("add",this.sketchStage,this._editMode),this._mapClickEvent||this._parent&&(!this._parent||this._parent._mapClickEvent)||(this._mapClickEvent=function(){t._preventFirstCall?t._preventFirstCall=void 0:(t.sketchStage.selectBoxGraphics.concat(t.sketchStage.selectBoxVertexGraphics).concat(t.sketchStage.vertexGraphics).concat(t.sketchStage.midVertexGraphics).forEach(function(e){t._removeFeatureFromLayer(e,t.sketchInnerLayer)}),t.view.off(i.ViewEventType.immediateClick,t._mapClickEvent),t.view._mapActionControl("drag-pan",!0),t._mapClickEvent=null,t.fire("selected",{isSelected:!1},self),t._fireRemoveSelectEvent(t.sketchStage.entityGraphic),t.sketchStage.selectBoxGraphics=[],t.sketchStage.selectBoxVertexGraphics=[],t.sketchStage.vertexGraphics=[],t.sketchStage.midVertexGraphics=[],t._editMode=i.SketchEditMode.NONE,t.view._mapActionControl("video-map-active",!1))},this._hitTestEventHandlers.push(this._mapClickEvent),this._preventFirstCall=!0,this.view.on(i.ViewEventType.immediateClick,this._mapClickEvent))}}},{key:"selectFeatureVertex",value:function(e){var t=this;this._clearEditGraphics(1);var r=[],n=[];e.geometry.coordinates.forEach(function(i,a){var u=new s.default({view:t.view,layer:t.layer,sketchStyle:new l.default({vertexStyle:t.sketchStyle._selectVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:t.elevationInfo,_parent:t}),c=new o.Point({coordinates:i,spatialReference:t._spatialReference});if(t._drawTools.push(u),u.addFeature(c,void 0,{vertexIndex:a},t.sketchInnerLayer),r.push(u),t.sketchStage.vertexGraphics.push(u.sketchStage.entityGraphic),a>0){var f=new s.default({view:t.view,layer:t.layer,sketchStyle:new l.default({vertexStyle:t.sketchStyle._selectMidVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:t.elevationInfo,_parent:t});n.push(f);var h=e.geometry.coordinates[a-1],p=null;p=i.length>2?new o.Point({coordinates:[(i[0]+h[0])/2,(i[1]+h[1])/2,(i[2]+h[2])/2],spatialReference:t._spatialReference}):new o.Point({coordinates:[(i[0]+h[0])/2,(i[1]+h[1])/2],spatialReference:t._spatialReference}),t._drawTools.push(f),f.addFeature(p,void 0,{vertexIndex:a-1,type:"midVertex"},t.sketchInnerLayer),t.sketchStage.midVertexGraphics.push(f.sketchStage.entityGraphic)}});var i=r.concat(n);this._otherDrawTools=this._otherDrawTools?this._otherDrawTools.concat(i):i,this.undoRedoManager&&this.undoRedoManager.addProcess("add",this.sketchStage,this.undoRedoManager.addProcess)}},{key:"_processEvent",value:function(e){"pan"===e.type?this._handlerPanEvent(e):"vertexScale"===e.type?this._handlerVertexScaleEvent(e):"midVertexScale"===e.type?this._handlerMidVertexScaleEvent(e):"vertexMove"===e.type?this._handlerVertexMoveEvent(e):"midVertexAdd"===e.type&&this._handlerMidVertexAddEvent(e)}},{key:"_handlerPanEvent",value:function(e){var t=this,r=[];this.sketchStage.entityGraphic.geometry.coordinates.forEach(function(n){r.push(t.getPanCoordinates(n,e.deltaPosition.x,e.deltaPosition.y))});var n=new o.LineString({coordinates:r,spatialReference:this._spatialReference});this.sketchStage.entityGraphic.geometry=n,this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)})}},{key:"_handlerVertexScaleEvent",value:function(e){if("scale"===e.action){var t;if(!this.sketchStage.entityGraphic.attributes.lastCoordinates){var r=JSON.parse(JSON.stringify(this.sketchStage.entityGraphic.geometry.coordinates));this.sketchStage.entityGraphic.attributes.lastCoordinates=r}var n=this.getScaleCoordinates(this.sketchStage.entityGraphic.geometry.coordinates,e.direction,e.extent,e.startPoint,e.movePoint,this.sketchStage.entityGraphic.attributes.lastCoordinates);t=new o.LineString({coordinates:n,spatialReference:this._spatialReference}),this.sketchStage.entityGraphic.geometry=t,this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)})}else"stop"===e.action&&(this.sketchStage.entityGraphic.attributes.lastCoordinates&&(this.sketchStage.entityGraphic.attributes.lastCoordinates=void 0),this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}),this._resetSelectBoxDirection())}},{key:"_handlerMidVertexScaleEvent",value:function(e){var t;if(!this.sketchStage.entityGraphic.attributes.lastCoordinates){var r=JSON.parse(JSON.stringify(this.sketchStage.entityGraphic.geometry.coordinates));this.sketchStage.entityGraphic.attributes.lastCoordinates=r}var n=this.getMidScaleCoordinates(this.sketchStage.entityGraphic.geometry.coordinates,e.direction,e.extent,e.startPoint,e.movePoint,this.sketchStage.entityGraphic.attributes.lastCoordinates);t=new o.LineString({coordinates:n,spatialReference:this._spatialReference}),this.sketchStage.entityGraphic.geometry=t,this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}),"stop"===e.action&&(this.sketchStage.entityGraphic.attributes.lastCoordinates&&(this.sketchStage.entityGraphic.attributes.lastCoordinates=void 0),this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}),this._resetSelectBoxDirection())}},{key:"_resetSelectBoxDirection",value:function(){var e=this,t=this.sketchStage.entityGraphic.geometry.extent;this.sketchStage.selectBoxVertexGraphics.forEach(function(r){r.attributes&&("ne"===r.attributes.direction?r.geometry.coordinates=[t.xmax,t.ymax]:"se"===r.attributes.direction?r.geometry.coordinates=[t.xmax,t.ymin]:"sw"===r.attributes.direction?r.geometry.coordinates=[t.xmin,t.ymin]:"nw"===r.attributes.direction?r.geometry.coordinates=[t.xmin,t.ymax]:"e"===r.attributes.direction?r.geometry.coordinates=e._sketchEditor._getCenterCoordinate([t.xmax,t.ymax],[t.xmax,t.ymin]):"s"===r.attributes.direction?r.geometry.coordinates=e._sketchEditor._getCenterCoordinate([t.xmax,t.ymin],[t.xmin,t.ymin]):"w"===r.attributes.direction?r.geometry.coordinates=e._sketchEditor._getCenterCoordinate([t.xmin,t.ymin],[t.xmin,t.ymax]):"n"===r.attributes.direction&&(r.geometry.coordinates=e._sketchEditor._getCenterCoordinate([t.xmin,t.ymax],[t.xmax,t.ymax])))})}},{key:"_handlerVertexMoveEvent",value:function(e){this.sketchStage.currentVertexIndex=e.vertexIndex;var t=this.sketchStage.entityGraphic,r=t.geometry.coordinates,n=JSON.parse(JSON.stringify(r));n[e.vertexIndex]=e.movePoint.coordinates;var i=new o.LineString({coordinates:n,spatialReference:this._spatialReference});if(this._sketchEditor.isSimple&&!o.GeometryEngine.isSimple(i))return this._fireUnsimpleUpdate(),c.Log.info("该坐标构成的几何不符合拓扑规范!");if(t.geometry=i,this._otherDrawTools){if(0===e.vertexIndex){var a=this.sketchStage.midVertexGraphics[e.vertexIndex],s=n[e.vertexIndex],u=n[e.vertexIndex+1];a.geometry.coordinates=[(u[0]+s[0])/2,(u[1]+s[1])/2],a.geometry=new o.Point({coordinates:a.geometry.coordinates,spatialReference:this._spatialReference})}else if(e.vertexIndex===n.length-1){var l=this.sketchStage.midVertexGraphics[e.vertexIndex-1],f=n[e.vertexIndex-1],h=n[e.vertexIndex];l.geometry.coordinates=[(f[0]+h[0])/2,(f[1]+h[1])/2],l.geometry=new o.Point({coordinates:l.geometry.coordinates,spatialReference:this._spatialReference})}else{var p=this.sketchStage.midVertexGraphics[e.vertexIndex],d=this.sketchStage.midVertexGraphics[e.vertexIndex-1],y=n[e.vertexIndex-1],g=n[e.vertexIndex],v=n[e.vertexIndex+1];p.geometry.coordinates=[(v[0]+g[0])/2,(v[1]+g[1])/2],d.geometry.coordinates=[(y[0]+g[0])/2,(y[1]+g[1])/2]}this.sketchStage.vertexGraphics[e.vertexIndex].geometry.coordinates=n[e.vertexIndex]}}},{key:"_handlerMidVertexAddEvent",value:function(e){var t=this;if("changeFeature"===e.action&&(this.sketchStage.entityGraphic.geometry.coordinates.splice(e.vertexIndex+1,0,e.point.coordinates),this.sketchStage.entityGraphic.geometry=new o.LineString({coordinates:this.sketchStage.entityGraphic.geometry.coordinates,spatialReference:this._spatialReference})),"moveMidVertex"===e.action){var r=JSON.parse(JSON.stringify(this.sketchStage.entityGraphic.geometry.coordinates));r[e.vertexIndex+1]=e.movePoint.coordinates;var n=new o.LineString({coordinates:r,spatialReference:this._spatialReference});if(this._sketchEditor.isSimple)if(!o.GeometryEngine.isSimple(n))return this._fireUnsimpleUpdate(),c.Log.info("该坐标构成的几何不符合拓扑规范!");this.sketchStage.currentVertexIndex=e.vertexIndex,this.sketchStage.entityGraphic.geometry.coordinates=r,this.sketchStage.midVertexGraphics[e.vertexIndex].geometry.coordinates=e.movePoint.coordinates}if("addVertex"===e.action){var i=this.sketchStage.midVertexGraphics[e.vertexIndex].id.toString(),a=new s.default({view:this.view,layer:this.layer,sketchStyle:new l.default({vertexStyle:this.sketchStyle._selectVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(a),a.addFeature(e.point,void 0,void 0,this.sketchInnerLayer),this.sketchStage.vertexGraphics.splice(e.vertexIndex+1,0,a.sketchStage.entityGraphic);var u=this.sketchStage.entityGraphic.geometry.coordinates[e.vertexIndex],f=null,h=null;this._getHight&&(h=0),f=h?new o.Point({coordinates:[(u[0]+e.point.coordinates[0])/2,(u[1]+e.point.coordinates[1])/2,h],spatialReference:this._spatialReference}):new o.Point({coordinates:[(u[0]+e.point.coordinates[0])/2,(u[1]+e.point.coordinates[1])/2],spatialReference:this._spatialReference});var p=new s.default({view:this.view,layer:this.layer,sketchStyle:new l.default({vertexStyle:this.sketchStyle._selectMidVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(p),p.addFeature(f,void 0,{type:"midVertex"},this.sketchInnerLayer),this.sketchStage.midVertexGraphics.splice(e.vertexIndex,1,p.sketchStage.entityGraphic);var d=this.sketchStage.entityGraphic.geometry.coordinates[e.vertexIndex+2],y=null,g=null;this._getHight&&(g=0),y=g?new o.Point({coordinates:[(d[0]+e.point.coordinates[0])/2,(d[1]+e.point.coordinates[1])/2,g],spatialReference:this._spatialReference}):new o.Point({coordinates:[(d[0]+e.point.coordinates[0])/2,(d[1]+e.point.coordinates[1])/2],spatialReference:this._spatialReference});var v=new s.default({view:this.view,layer:this.layer,sketchStyle:new l.default({vertexStyle:this.sketchStyle._selectMidVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(v),v.addFeature(y,void 0,{type:"midVertex"},this.sketchInnerLayer),this.sketchStage.midVertexGraphics.splice(e.vertexIndex+1,0,v.sketchStage.entityGraphic),this.sketchStage.vertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}}),this.sketchStage.midVertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}}),this._otherDrawTools.forEach(function(e){e.sketchStage.entityGraphic.id===i&&t._removeFeatureFromLayer(e.sketchStage.entityGraphic,t.sketchInnerLayer)}),this._otherDrawTools.push(a),this._otherDrawTools.push(p),this._otherDrawTools.push(v)}}},{key:"addMidVertex",value:function(e,t){var r=new s.default;r.addPoint(t),this.sketchStage.midVertexGraphics=r}},{key:"addVertex",value:function(e,t){var r=null;if(--t>-1&&t<=this.sketchStage.midVertexGraphics.length+1){var n=[];if(t<=this.sketchStage.entityGraphic.geometry.coordinates.length-1){if((n=JSON.parse(JSON.stringify(this.sketchStage.entityGraphic.geometry.coordinates))).splice(t,0,e.coordinates),r=new o.LineString({coordinates:n,spatialReference:this._spatialReference}),this._sketchEditor.isSimple)if(!o.GeometryEngine.isSimple(r))return this._fireUnsimpleUpdateByFun(),c.Log.info("该坐标构成的几何不符合拓扑规范!");this.sketchStage.entityGraphic.geometry=r;var i=void 0,a=void 0,u=this.sketchStage.entityGraphic.geometry.extent;if(this.sketchStage.selectBoxGraphics.length>0&&this.sketchStage.selectBoxGraphics.forEach(function(e){e.geometry.coordinates=[[[u.xmax,u.ymax],[u.xmax,u.ymin],[u.xmin,u.ymin],[u.xmin,u.ymax],[u.xmax,u.ymax]]]}),this.sketchStage.selectBoxVertexGraphics.length>0){var f=[[u.xmax,u.ymax],[u.xmax,u.ymin],[u.xmin,u.ymin],[u.xmin,u.ymax],[(u.xmax+u.xmin)/2,u.ymax],[(u.xmax+u.xmin)/2,u.ymin],[u.xmax,(u.ymax+u.ymin)/2],[u.xmin,(u.ymax+u.ymin)/2]];this.sketchStage.selectBoxVertexGraphics.forEach(function(e,t){e.geometry.coordinates=f[t]})}if(this.sketchStage.vertexGraphics.length>0&&(i=new s.default({view:this.view,layer:this.layer,sketchStyle:new l.default({vertexStyle:this.sketchStyle._selectVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this}),this._drawTools.push(i),i.addFeatureByGeometry(e,void 0,void 0,this.sketchInnerLayer),this.sketchStage.vertexGraphics.splice(t,0,i.sketchStage.entityGraphic),this.sketchStage.vertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}})),this.sketchStage.midVertexGraphics.length>0){var h=-1,p=-1,d=null,y=null;if(0===t?(p=0,y=this.sketchStage.entityGraphic.geometry.coordinates[1]):t===this.sketchStage.midVertexGraphics.length+1?(p=this.sketchStage.midVertexGraphics.length-2,y=this.sketchStage.entityGraphic.geometry.coordinates[p]):(h=t-1,p=t+1,d=this.sketchStage.entityGraphic.geometry.coordinates[h],y=this.sketchStage.entityGraphic.geometry.coordinates[p]),h>-1){var g=new o.Point({coordinates:[(d[0]+e.coordinates[0])/2,(d[1]+e.coordinates[1])/2],spatialReference:this._spatialReference});this.sketchStage.midVertexGraphics[h].geometry.coordinates=g.coordinates}if(p>-1){var v=new o.Point({coordinates:[(y[0]+e.coordinates[0])/2,(y[1]+e.coordinates[1])/2],spatialReference:this._spatialReference});a=new s.default({view:this.view,layer:this.layer,sketchStyle:new l.default({vertexStyle:this.sketchStyle._selectMidVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this}),this._drawTools.push(a),a.addFeatureByGeometry(v,void 0,{type:"midVertex"}),this.sketchStage.midVertexGraphics.splice(t,0,a.sketchStage.entityGraphic)}this.sketchStage.midVertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}})}i&&this._otherDrawTools.push(i),a&&this._otherDrawTools.push(a),this.undoRedoManager.addProcess("update",this.sketchStage,this._editMode),this._fireAddVertexEventByFun(i.sketchStage.entityGraphic,this._parent)}return r}}},{key:"updateVertex",value:function(e,t){var r=null;if(--t>-1){var n=this.sketchStage.entityGraphic.geometry.coordinates.length;if(t<n){var i=this.sketchStage.entityGraphic,a=JSON.parse(JSON.stringify(i.geometry.coordinates));if(this.currentVertexIndex=t,r=e.coordinates,i.geometry=new o.LineString({coordinates:i.geometry.coordinates,spatialReference:this._spatialReference}),this._sketchEditor.isSimple)if(!o.GeometryEngine.isSimple(r))return this._fireUnsimpleUpdateByFun(),c.Log.info("该坐标构成的几何不符合拓扑规范!");this.sketchStage.entityGraphic.geometry=r;var s=i.geometry.extent;if(this.sketchStage.selectBoxGraphics.length>0&&this.sketchStage.selectBoxGraphics.forEach(function(e){e.geometry.coordinates=[[[s.xmax,s.ymax],[s.xmax,s.ymin],[s.xmin,s.ymin],[s.xmin,s.ymax],[s.xmax,s.ymax]]]}),this.sketchStage.selectBoxVertexGraphics.length>0){var u=[[s.xmax,s.ymax],[s.xmax,s.ymin],[s.xmin,s.ymin],[s.xmin,s.ymax],[(s.xmax+s.xmin)/2,s.ymax],[(s.xmax+s.xmin)/2,s.ymin],[s.xmax,(s.ymax+s.ymin)/2],[s.xmin,(s.ymax+s.ymin)/2]];this.sketchStage.selectBoxVertexGraphics.forEach(function(e,t){e.geometry.coordinates=u[t]})}if(this.sketchStage.vertexGraphics.length>0&&(this.sketchStage.vertexGraphics[t].geometry.coordinates=e.coordinates),this.sketchStage.midVertexGraphics.length>0){var l=a[t-1],f=a[t],h=a[t+1],p=-1,d=-1;if(0===t?p=t:t===n-1?d=t-1:(p=t,d=t-1),p>-1){var y=this.sketchStage.midVertexGraphics[p];y.geometry.coordinates=[(h[0]+f[0])/2,(h[1]+f[1])/2],y.geometry=new o.Point({coordinates:y.geometry.coordinates,spatialReference:this._spatialReference})}if(d>-1){var g=this.sketchStage.midVertexGraphics[d];g.geometry.coordinates=[(l[0]+f[0])/2,(l[1]+f[1])/2],g.geometry=new o.Point({coordinates:g.geometry.coordinates,spatialReference:this._spatialReference})}}}this.undoRedoManager.addProcess("update",this.sketchStage,this._editMode),this._fireUpdateVertexByFun(this.sketchStage.entityGraphic,this._parent)}return r}},{key:"removeVertex",value:function(e){var t=null;if(--e>-1){var r=this.sketchStage.entityGraphic.geometry.coordinates.length;if(r>2&&e<r){var n=JSON.parse(JSON.stringify(this.sketchStage.entityGraphic.geometry.coordinates));if(n.splice(e,1),t=new o.LineString({coordinates:n,spatialReference:this._spatialReference}),this._sketchEditor.isSimple)if(!o.GeometryEngine.isSimple(t))return this._fireUnsimpleUpdateByFun(),c.Log.info("该坐标构成的几何不符合拓扑规范!");this.sketchStage.entityGraphic.geometry=t;var i=this.sketchStage.entityGraphic.geometry.extent;if(this.sketchStage.selectBoxGraphics.length>0&&this.sketchStage.selectBoxGraphics.forEach(function(e){e.geometry.coordinates=[[[i.xmax,i.ymax],[i.xmax,i.ymin],[i.xmin,i.ymin],[i.xmin,i.ymax],[i.xmax,i.ymax]]]}),this.sketchStage.selectBoxVertexGraphics.length>0){var a=[[i.xmax,i.ymax],[i.xmax,i.ymin],[i.xmin,i.ymin],[i.xmin,i.ymax],[(i.xmax+i.xmin)/2,i.ymax],[(i.xmax+i.xmin)/2,i.ymin],[i.xmax,(i.ymax+i.ymin)/2],[i.xmin,(i.ymax+i.ymin)/2]];this.sketchStage.selectBoxVertexGraphics.forEach(function(e,t){e.geometry.coordinates=a[t]})}if(this.sketchStage.vertexGraphics.length>0){var s=this.sketchStage.vertexGraphics[e].id.toString();this._removeFeatureFromLayer(this.sketchStage.vertexGraphics[e],this.sketchInnerLayer),this.sketchStage.vertexGraphics.splice(e,1),this.sketchStage.vertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}}),this._otherDrawTools=this._otherDrawTools.filter(function(e){if(e.sketchStage.entityGraphic.id!==s)return e})}if(this.sketchStage.midVertexGraphics.length>0){var u=[],l=-1,f=-1;0===e?f=0:e===r-1?f=e-1:(u=[(t.coordinates[e-1][0]+t.coordinates[e][0])/2,(t.coordinates[e-1][1]+t.coordinates[e][1])/2],l=e-1,f=e),l>-1&&(this.sketchStage.midVertexGraphics[l].geometry=new o.Point({coordinates:u,spatialReference:this._spatialReference}));var h=this.sketchStage.vertexGraphics[f].id.toString();this._removeFeatureFromLayer(this.sketchStage.midVertexGraphics[f],this.sketchInnerLayer),this.sketchStage.midVertexGraphics.splice(f,1),this.sketchStage.midVertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}}),this._otherDrawTools=this._otherDrawTools.filter(function(e){if(e.sketchStage.entityGraphic.id!==h)return e})}}this.undoRedoManager.addProcess("update",this.sketchStage,this._editMode),this._fireRemoveVertexByFun(this.sketchStage.entityGraphic,this._parent)}return t}}]),t}();t.default=h,i.Zondy.SketchPolylineDrawTool=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(4),a=h(r(23)),s=h(r(22)),u=h(r(34)),l=h(r(17)),c=h(r(38)),f=r(0);function h(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.type="sketchCircleDrawTool",r._drawTools=[r],r._otherDrawTools=[],r._initEvent(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),n(t,[{key:"_initEvent",value:function(){this._processEvent=this._processEvent.bind(this),this.on("pan",this._processEvent),this.on("circleVertexScale",this._processEvent)}},{key:"drawFeature",value:function(){var e=this;this._editMode=i.SketchEditMode.DRAWING,this.view._mapActionControl("drag-pan",!1),this.view._mapActionControl("video-map-active",!0);var t=null,r=0,n=null;this.cursorStyle=this.view.cursor,(0,f.isNull)(this.cursorStyle)&&(this.view.cursor="crosshair");var a=this._getInteractiveDom();this._setInitSnap(),this._fireStartDrawEvent();var s=function(s){if(clearTimeout(null),e._stopInitSnap(),e.sketchStage.snapGraphics.length>0&&(e.sketchStage.snapGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.snapGraphics=[]),0===s.button)if("start"===s.action)n=e._snapPoint?e._snapPoint:n||e.view.toMap(s.origin),e._fireDrawVertexEvent();else if("update"===s.action){var u=e.view.toMap({x:s.x,y:s.y});e._snapPoint=e.getSnapGraphics(u),e._snapPoint&&(u=e._snapPoint),r=c.default.planarLength(new o.LineString({coordinates:[n.coordinates,u.coordinates],spatialReference:e._spatialReference})),t?t.geometry.radius=r:(t=e._getFeature(n,r),e._addFeatureToLayer(t,e.layer),e.sketchStage.entityGraphic=t);var l=e._getInteractiveDom();a=a.concat(l),e._removeInteractiveStyle(l),e._fireChangeCursorEvent(t)}else"end"===s.action&&(e.stop(),e.sketchStage.snapGraphics.length>0&&(e.sketchStage.snapGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.snapGraphics=[]),n=null,e._editMode=i.SketchEditMode.NONE,e.view.cursor=e.cursorStyle,e._addInteractiveStyle(a),e.fire("drawn",{geometry:t.geometry,feature:t},self),e._fireDrawVertexEvent(t),e._fireStopDrawEvent(t),e.view._mapActionControl("drag-pan",!0),e.view._mapActionControl("video-map-active",!1))};this._drawEventHandlers.push(s),this.view.on(i.ViewEventType.drag,s)}},{key:"addFeature",value:function(e,t,r,n){var i=null;i=t&&t.lineStyle?t.lineStyle:this.sketchStyle.lineStyle;var o=this._getFeature(e,i);r&&(o.attributes=r),this.sketchStage.entityGraphic=o,this._addFeatureToLayer(o,n)}},{key:"addFeatureByGeometry",value:function(e,t,r,n){var o=null;o=t&&t.lineStyle?t.lineStyle:this.sketchStyle.lineStyle;var a=new i.Feature({geometry:e,symbol:o,elevationInfo:this.elevationInfo});r&&(a.attributes=r),this.sketchStage.entityGraphic=a,this._addFeatureToLayer(a,n)}},{key:"_getFeature",value:function(e,t){e?e instanceof Array?e=new o.Point({coordinates:e,spatialReference:this._spatialReference}):e instanceof o.Point||(e=new o.Point({coordinates:[0,0],spatialReference:this._spatialReference})):e=new o.Point({coordinates:[0,0],spatialReference:this._spatialReference}),t=void 0!==t?t:0;var r=this._spatialReference.isGeographic?i.RadiusUnit.degrees:i.RadiusUnit.meters,n=new o.Circle({center:e,radius:t,radiusUnit:r,spatialReference:this._spatialReference}),a=this.sketchStyle.fillStyle.clone();return new i.Feature({geometry:n,symbol:a,elevationInfo:this.elevationInfo})}},{key:"hitTestFeature",value:function(e){this.view._mapActionControl("video-map-active",!0),!this._parent&&this.editOption.showSelectBox&&(this._editMode===i.SketchEditMode.NONE&&(this._editMode=i.SketchEditMode.EDITGRAGIC),this.selectFeature(e))}},{key:"selectFeature",value:function(e){var t=this;if(this.editOption.showSelectBox){this._clearEditGraphics(2);var r=e.geometry.extent,n=new u.default({view:this.view,layer:this.layer,sketchStyle:new l.default({fillStyle:this.sketchStyle._selectBoxStyle,isShowSegmentLength:!0,isShowArea:!0}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(n),n.addFeature([[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax]],void 0,void 0,this.sketchInnerLayer),this.sketchStage.selectBoxGraphics=[n.sketchStage.entityGraphic];var a=[];if(this._sketchEditor&&this._sketchEditor._getCenterCoordinate){var c=[{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmax,r.ymax],[r.xmax,r.ymin]),spatialReference:this._spatialReference}),direction:"e",type:"circleVertex"}];a=a.concat(c)}var f=[],h=[];a.forEach(function(e){var r=new s.default({view:t.view,layer:t.layer,sketchStyle:new l.default({vertexStyle:t.sketchStyle._selectBoxVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:t.elevationInfo,_parent:t});t._drawTools.push(r),r.addFeature(e.point,t.sketchStage,{direction:e.direction,type:e.type},t.sketchInnerLayer),f.push(r),h.push(r.sketchStage.entityGraphic)}),this.sketchStage.selectBoxVertexGraphics=h,this._otherDrawTools?this._otherDrawTools.push(n):this._otherDrawTools=[n],this._otherDrawTools=this._otherDrawTools.concat(f),this.undoRedoManager&&this.undoRedoManager.addProcess("add",this.sketchStage),this._mapClickEvent||this._parent&&(!this._parent||this._parent._mapClickEvent)||(this._mapClickEvent=function(){t._preventFirstCall?t._preventFirstCall=void 0:(t.sketchStage.selectBoxGraphics.concat(t.sketchStage.selectBoxVertexGraphics).concat(t.sketchStage.vertexGraphics).concat(t.sketchStage.midVertexGraphics).forEach(function(e){t._removeFeatureFromLayer(e,t.sketchInnerLayer)}),t.view.off(i.ViewEventType.immediateClick,t._mapClickEvent),t.view._mapActionControl("drag-pan",!0),t._mapClickEvent=null,t.fire("selected",{isSelected:!1},self),t._fireRemoveSelectEvent(t.sketchStage.entityGraphic),t.sketchStage.selectBoxGraphics=[],t.sketchStage.selectBoxVertexGraphics=[],t.sketchStage.vertexGraphics=[],t.sketchStage.midVertexGraphics=[],t._editMode=i.SketchEditMode.NONE,t.view._mapActionControl("video-map-active",!1))},this._hitTestEventHandlers.push(this._mapClickEvent),this._preventFirstCall=!0,this.view.on(i.ViewEventType.immediateClick,this._mapClickEvent))}}},{key:"_processEvent",value:function(e){"pan"===e.type?this._handlerPanEvent(e):"circleVertexScale"===e.type&&this._handlerCircleVertexScaleEvent(e)}},{key:"_handlerPanEvent",value:function(e){var t=this.sketchStage.entityGraphic.geometry.center;this.sketchStage.entityGraphic.geometry.center=this.getPanCoordinates(t,e.deltaPosition.x,e.deltaPosition.y),this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)})}},{key:"_handlerCircleVertexScaleEvent",value:function(e){if("scale"===e.action){var t=c.default.planarLength(new o.LineString({coordinates:[this.sketchStage.entityGraphic.geometry.center,[e.movePoint.coordinates[0],this.sketchStage.entityGraphic.geometry.center[1]]],spatialReference:this._spatialReference})),r=this._spatialReference.isGeographic?i.RadiusUnit.degrees:i.RadiusUnit.meters,n=new o.Circle({center:this.sketchStage.entityGraphic.geometry.center,radius:t,radiusUnit:r,spatialReference:this._spatialReference});this.sketchStage.entityGraphic.geometry=n,this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)})}else"stop"===e.action&&(this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}),this._resetSelectBoxDirection())}},{key:"_resetSelectBoxDirection",value:function(){var e=this,t=this.sketchStage.entityGraphic.geometry.extent;this.sketchStage.selectBoxVertexGraphics.forEach(function(r){if(r.attributes)if("e"===r.attributes.direction){var n=e._sketchEditor._getCenterCoordinate([t.xmin,t.ymin],[t.xmin,t.ymax]);r.geometry.coordinates[0]===n[0]&&r.geometry.coordinates[1]===n[1]&&(r.attributes.direction="w")}else if("w"===r.attributes.direction){var i=e._sketchEditor._getCenterCoordinate([t.xmax,t.ymax],[t.xmax,t.ymin]);r.geometry.coordinates[0]===i[0]&&r.geometry.coordinates[1]===i[1]&&(r.attributes.direction="e")}})}}]),t}();t.default=p,i.Zondy.SketchCircleDrawTool=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(4),a=f(r(23)),s=f(r(22)),u=f(r(34)),l=f(r(17)),c=r(0);function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.type="sketchExtentDrawTool",r._initEvent(),r._drawTools=[r],r._otherDrawTools=[],r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),n(t,[{key:"_initEvent",value:function(){this._processEvent=this._processEvent.bind(this),this.on("pan",this._processEvent),this.on("vertexScale",this._processEvent),this.on("midVertexScale",this._processEvent),this.on("vertexMove",this._processEvent),this.on("midVertexAdd",this._processEvent)}},{key:"drawFeature",value:function(){var e=this;this._editMode=i.SketchEditMode.DRAWING,this.view._mapActionControl("drag-pan",!1),this.view._mapActionControl("video-map-active",!0);var t=null,r=null;this.cursorStyle=this.view.cursor,(0,c.isNull)(this.cursorStyle)&&(this.view.cursor="crosshair");var n=this._getInteractiveDom();this._setInitSnap(),this._fireStartDrawEvent();var o=function(o){if(clearTimeout(null),e.view.off(i.ViewEventType.pointerMove,e._handlerInitMouseMove),e.sketchStage.snapGraphics.length>0&&(e.sketchStage.snapGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.snapGraphics=[]),0===o.button)if("start"===o.action)r=e._snapPoint?e._snapPoint:r||e.view.toMap(o.origin),e._fireDrawVertexEvent();else if("update"===o.action){var a=e.view.toMap({x:o.x,y:o.y});e._snapPoint=e.getSnapGraphics(a),e._snapPoint&&(a=e._snapPoint);var s=Math.min(r.coordinates[0],a.coordinates[0]),u=Math.min(r.coordinates[1],a.coordinates[1]),l=Math.max(r.coordinates[0],a.coordinates[0]),c=Math.max(r.coordinates[1],a.coordinates[1]);t?(t.geometry.xmin=s,t.geometry.ymin=u,t.geometry.xmax=l,t.geometry.ymax=c):(t=e._getFeature(s,u,l,c),e._addFeatureToLayer(t,e.layer),e.sketchStage.entityGraphic=t);var f=e._getInteractiveDom();n=n.concat(f),e._removeInteractiveStyle(f),e._fireChangeCursorEvent(t)}else"end"===o.action&&(e.stop(),e.sketchStage.snapGraphics.length>0&&(e.sketchStage.snapGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.snapGraphics=[]),e._editMode=i.SketchEditMode.NONE,e.view.cursor=e.cursorStyle,e._addInteractiveStyle(n),e.fire("drawn",{geometry:t.geometry,feature:t},self),e._fireDrawVertexEvent(t),e._fireStopDrawEvent(t),e.view._mapActionControl("drag-pan",!0),e.view._mapActionControl("video-map-active",!1))};this._drawEventHandlers.push(o),this.view.on(i.ViewEventType.drag,o)}},{key:"addFeature",value:function(e,t,r,n){var i=null;i=t&&t.lineStyle?t.lineStyle:this.sketchStyle.lineStyle;var o=this._getFeature(e,i);r&&(o.attributes=r),this.sketchStage.entityGraphic=o,this._addFeatureToLayer(o,n)}},{key:"addFeatureByGeometry",value:function(e,t,r,n){var o=null;o=t&&t.lineStyle?t.lineStyle:this.sketchStyle.lineStyle;var a=new i.Feature({geometry:e,symbol:o,elevationInfo:this.elevationInfo});r&&(a.attributes=r),this.sketchStage.entityGraphic=a,this._addFeatureToLayer(a,n)}},{key:"_getFeature",value:function(e,t,r,n){e=void 0!==e?e:0,t=void 0!==t?t:0,r=void 0!==r?r:0,n=void 0!==n?n:0;var a=new o.Extent({xmin:e,ymin:t,xmax:r,ymax:n,spatialReference:this._spatialReference}),s=this.sketchStyle.fillStyle.clone();return new i.Feature({geometry:a,symbol:s,elevationInfo:this.elevationInfo})}},{key:"hitTestFeature",value:function(e){this.view._mapActionControl("video-map-active",!0),!this._parent&&this.editOption.showSelectBox&&(this._editMode===i.SketchEditMode.NONE?this._editMode=i.SketchEditMode.EDITGRAGIC:this._editMode===i.SketchEditMode.EDITVERTEX&&(this.view.off(i.ViewEventType.immediateClick,this._mapClickEvent),this._mapClickEvent=null,this._editMode=i.SketchEditMode.EDITGRAGIC),this.selectFeature(e))}},{key:"selectFeature",value:function(e){var t=this;if(this.editOption.showSelectBox){this._clearEditGraphics(2);var r=e.geometry,n=new u.default({view:this.view,layer:this.layer,sketchStyle:new l.default({fillStyle:this.sketchStyle._selectBoxStyle,isShowSegmentLength:!0,isShowArea:!0}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(n),n.addFeature([[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax]],void 0,void 0,this.sketchInnerLayer),this.sketchStage.selectBoxGraphics=[n.sketchStage.entityGraphic];var a=[];if(a=[{point:new o.Point({coordinates:[r.xmax,r.ymax],spatialReference:this._spatialReference}),direction:"ne"},{point:new o.Point({coordinates:[r.xmax,r.ymin],spatialReference:this._spatialReference}),direction:"se"},{point:new o.Point({coordinates:[r.xmin,r.ymin],spatialReference:this._spatialReference}),direction:"sw"},{point:new o.Point({coordinates:[r.xmin,r.ymax],spatialReference:this._spatialReference}),direction:"nw"}],this._sketchEditor&&this._sketchEditor._getCenterCoordinate){var c=[{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmax,r.ymax],[r.xmax,r.ymin]),spatialReference:this._spatialReference}),direction:"e",type:"midVertex"},{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmax,r.ymin],[r.xmin,r.ymin]),spatialReference:this._spatialReference}),direction:"s",type:"midVertex"},{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmin,r.ymin],[r.xmin,r.ymax]),spatialReference:this._spatialReference}),direction:"w",type:"midVertex"},{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmin,r.ymax],[r.xmax,r.ymax]),spatialReference:this._spatialReference}),direction:"n",type:"midVertex"}];a=a.concat(c)}var f=[],h=[];a.forEach(function(e){var r=new s.default({view:t.view,layer:t.layer,sketchStyle:new l.default({vertexStyle:t.sketchStyle._selectBoxVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:t.elevationInfo,_parent:t});t._drawTools.push(r),r.addFeature(e.point,t.sketchStage,{direction:e.direction,type:e.type},t.sketchInnerLayer),f.push(r),h.push(r.sketchStage.entityGraphic)}),this.sketchStage.selectBoxVertexGraphics=h,this._otherDrawTools?this._otherDrawTools.push(n):this._otherDrawTools=[n],this._otherDrawTools=this._otherDrawTools.concat(f),this.undoRedoManager&&this.undoRedoManager.addProcess("add",this.sketchStage),this._mapClickEvent||this._parent&&(!this._parent||this._parent._mapClickEvent)||(this._mapClickEvent=function(){t._preventFirstCall?t._preventFirstCall=void 0:(t.sketchStage.selectBoxGraphics.concat(t.sketchStage.selectBoxVertexGraphics).concat(t.sketchStage.vertexGraphics).concat(t.sketchStage.midVertexGraphics).forEach(function(e){t._removeFeatureFromLayer(e,t.sketchInnerLayer)}),t.view.off(i.ViewEventType.immediateClick,t._mapClickEvent),t.view._mapActionControl("drag-pan",!0),t._mapClickEvent=null,t.fire("selected",{isSelected:!1},self),t._fireRemoveSelectEvent(t.sketchStage.entityGraphic),t.sketchStage.selectBoxGraphics=[],t.sketchStage.selectBoxVertexGraphics=[],t.sketchStage.vertexGraphics=[],t.sketchStage.midVertexGraphics=[],t._editMode=i.SketchEditMode.NONE,t.view._mapActionControl("video-map-active",!1))},this._hitTestEventHandlers.push(this._mapClickEvent),this._preventFirstCall=!0,this.view.on(i.ViewEventType.immediateClick,this._mapClickEvent))}}},{key:"_processEvent",value:function(e){"pan"===e.type?this._handlerPanEvent(e):"vertexScale"===e.type?this._handlerVertexScaleEvent(e):"midVertexScale"===e.type&&this._handlerMidVertexScaleEvent(e)}},{key:"_handlerPanEvent",value:function(e){var t=this.sketchStage.entityGraphic.geometry;t.xmin+=e.deltaPosition.x,t.ymin+=e.deltaPosition.y,t.xmax+=e.deltaPosition.x,t.ymax+=e.deltaPosition.y,this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)})}},{key:"_handlerVertexScaleEvent",value:function(e){if("scale"===e.action){var t=this.sketchStage.entityGraphic.geometry;if(!this.sketchStage.entityGraphic.attributes.lastCoordinates){var r=[[t.xmin,t.ymin],[t.xmax,t.ymax]];this.sketchStage.entityGraphic.attributes.lastCoordinates=r}this.sketchStage.entityGraphic.attributes=this.sketchStage.entityGraphic.attributes?this.sketchStage.entityGraphic.attributes:{};var n=this.getScaleCoordinates([[t.xmin,t.ymin],[t.xmax,t.ymax]],e.direction,e.extent,e.startPoint,e.movePoint,this.sketchStage.entityGraphic.attributes.lastCoordinates);t.xmin=n[0][0],t.ymin=n[0][1],t.xmax=n[1][0],t.ymax=n[1][1],this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)})}else"stop"===e.action&&(this.sketchStage.entityGraphic.attributes.lastCoordinates&&(this.sketchStage.entityGraphic.attributes.lastCoordinates=void 0),this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}))}},{key:"_handlerMidVertexScaleEvent",value:function(e){if("scale"===e.action){var t=this.sketchStage.entityGraphic.geometry;if(!this.sketchStage.entityGraphic.attributes.lastCoordinates){var r=[[t.xmin,t.ymin],[t.xmax,t.ymax]];this.sketchStage.entityGraphic.attributes.lastCoordinates=r}var n=this.getMidScaleCoordinates([[t.xmin,t.ymin],[t.xmax,t.ymax]],e.direction,e.extent,e.startPoint,e.movePoint,this.sketchStage.entityGraphic.attributes.lastCoordinates);t.xmin=n[0][0],t.ymin=n[0][1],t.xmax=n[1][0],t.ymax=n[1][1],this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)})}else"stop"===e.action&&(this.sketchStage.entityGraphic.attributes.lastCoordinates&&(this.sketchStage.entityGraphic.attributes.lastCoordinates=void 0),this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}))}}]),t}();t.default=h,i.Zondy.SketchExtentDrawTool=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(4),a=f(r(23)),s=(f(r(19)),f(r(22))),u=f(r(34)),l=f(r(17)),c=(r(11),r(0));function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r._initEvent(),r.type="sketchFreehandPolylineDrawTool",r._drawTools=[r],r._otherDrawTools=[],r._currentMovePoint=void 0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),n(t,[{key:"_initEvent",value:function(){this._processEvent=this._processEvent.bind(this),this.on("pan",this._processEvent),this.on("vertexScale",this._processEvent),this.on("midVertexScale",this._processEvent),this.on("vertexMove",this._processEvent),this.on("midVertexAdd",this._processEvent)}},{key:"drawFeature",value:function(){var e=this;this._editMode=i.SketchEditMode.DRAWING,this.view._mapActionControl("double-click-zoom",!1),this.view._mapActionControl("video-map-active",!0);var t=!1,r=!1,n=null,o=[],a=[];this.vertexNum=0;var u=[],l="";this.cursorStyle=this.view.cursor,(0,c.isNull)(this.cursorStyle)&&(this.view.cursor="crosshair");var f=this._getInteractiveDom();this._setInitSnap(),this._fireStartDrawEvent();var h=function r(o){if(o&&o.x&&o.y){e._stopInitSnap(),clearTimeout(null),e._editMode=i.SketchEditMode.DRAWING;var c={x:o.x,y:o.y},f=null;f=e._snapPoint?e._snapPoint:e.view.toMap({x:c.x,y:c.y}),e.vertexNum++,1===e.vertexNum?(a=[f.coordinates],(n=e._getFeature()).geometry.coordinates=[a[0],a[0]]):2===e.vertexNum?(a=[n.geometry.coordinates[0],f.coordinates],n.geometry.coordinates=a):((a=n.geometry.coordinates)[a.length-1]=f.coordinates,n.geometry.coordinates=a),"move"===l&&a[a.length-1][0]===a[a.length-2][0]&&a[a.length-1][1]===a[a.length-2][1]&&a.splice(a.length-1);var h=new s.default({view:e.view,layer:e.layer,_parent:e,sketchStyle:e.sketchStyle,elevationInfo:e.elevationInfo});h.addFeature(f,void 0,void 0,e.sketchInnerLayer);var p=h.sketchStage.entityGraphic;e.sketchStage.entityGraphic=n,e.sketchStage.vertexGraphics.push(p),t=!0,n&&t,a.length>1&&u.push(function(e,t){return(e[1]-t[1])/(e[0]-t[0])}(a[a.length-1],a[a.length-2])),l="click",e.fire("drawn-vertex",{geometry:h.sketchStage.entityGraphic.geometry,feature:h.sketchStage.entityGraphic},self),e.view.off(i.ViewEventType.immediateClick,r)}},p=!0,d=function(i){if(i&&i.x&&i.y&&t&&!r){clearTimeout(null),r=!0,e.sketchStage.snapGraphics.length>0&&(e.sketchStage.snapGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.snapGraphics=[]);var s={x:i.x,y:i.y},u=e.view.toMap({x:s.x,y:s.y});e.vertexNum>0&&(e._snapPoint=e.getSnapGraphics(u,[n.geometry.coordinates[0]])),e._snapPoint&&(u=e._snapPoint),e.vertexNum,a.push(u.coordinates),n.geometry.coordinates=a,e.vertexNum++,e.sketchStage.entityGraphic=n,n.geometry._pixelCoords=o,n.geometry.coordinates=JSON.parse(JSON.stringify(a)),p&&(e._addFeatureToLayer(n,e.layer),p=!1),r=!1,l="move";var c=e._getInteractiveDom();f=f.concat(c),e._removeInteractiveStyle(c),e._fireDrawVertexEvent(n)}},y=function(){clearTimeout(null),clearTimeout(null),a=[],o=[],e.stop(),e.sketchStage.snapGraphics.length>0&&(e.sketchStage.snapGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.snapGraphics=[]),e._editMode=i.SketchEditMode.NONE,r=!1,t=!1,e.view.cursor=e.cursorStyle,e._addInteractiveStyle(f),e.fire("drawn",{geometry:n.geometry,feature:n},self),e._fireStopDrawEvent(n),e.sketchStage.vertexGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.vertexGraphics=[],setTimeout(function(){e.view._mapActionControl("double-click-zoom",!0),e.view._mapActionControl("video-map-active",!1)},0),l="double-click"};this._drawEventHandlers.push(h,d,y),this.view.on(i.ViewEventType.immediateClick,h),this.view.on(i.ViewEventType.pointerMove,this.debounce(d,5)),this.view.on(i.ViewEventType.doubleClick,y)}},{key:"addFeature",value:function(e,t,r,n){var i=null;i=t&&t.lineStyle?t.lineStyle:this.sketchStyle.lineStyle;var o=this._getFeature(e,i);r&&(o.attributes=r),this.sketchStage.entityGraphic=o,this._addFeatureToLayer(o,n)}},{key:"addFeatureByGeometry",value:function(e,t,r,n){var o=null;o=t&&t.lineStyle?t.lineStyle:this.sketchStyle.lineStyle;var a=new i.Feature({geometry:e,symbol:o,elevationInfo:this.elevationInfo});r&&(a.attributes=r),this.sketchStage.entityGraphic=a,this._addFeatureToLayer(a,n)}},{key:"_getFeature",value:function(e){e||(e=[[0,0],[1,1]]);var t=new o.LineString({coordinates:e,spatialReference:this._spatialReference}),r=this.sketchStyle.lineStyle.clone();return new i.Feature({geometry:t,symbol:r,elevationInfo:this.elevationInfo})}},{key:"hitTestFeature",value:function(e,t){this.view._mapActionControl("video-map-active",!0),!this._parent&&this.editOption.showSelectBox&&(this._editMode===i.SketchEditMode.NONE?this._editMode=i.SketchEditMode.EDITGRAGIC:this._editMode===i.SketchEditMode.EDITVERTEX&&(this.view.off(i.ViewEventType.immediateClick,this._mapClickEvent),this._mapClickEvent=null,this._editMode=i.SketchEditMode.EDITGRAGIC),this.selectFeature(e)),this._parent&&this._parent._editMode===i.SketchEditMode.EDITGRAGIC&&this.startPanGraphics(e,t)}},{key:"selectFeature",value:function(e){var t=this;if(this.editOption.showSelectBox){this._clearEditGraphics(2);var r=e.geometry.extent,n=new u.default({view:this.view,layer:this.layer,sketchStyle:new l.default({fillStyle:this.sketchStyle._selectBoxStyle,isShowSegmentLength:!0,isShowArea:!0}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(n),n.addFeature([[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax]],void 0,void 0,this.sketchInnerLayer),this.sketchStage.selectBoxGraphics=[n.sketchStage.entityGraphic];var a=[];if(a=[{point:new o.Point({coordinates:[r.xmax,r.ymax],spatialReference:this._spatialReference}),direction:"ne"},{point:new o.Point({coordinates:[r.xmax,r.ymin],spatialReference:this._spatialReference}),direction:"se"},{point:new o.Point({coordinates:[r.xmin,r.ymin],spatialReference:this._spatialReference}),direction:"sw"},{point:new o.Point({coordinates:[r.xmin,r.ymax],spatialReference:this._spatialReference}),direction:"nw"}],this._sketchEditor&&this._sketchEditor._getCenterCoordinate){var c=[{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmax,r.ymax],[r.xmax,r.ymin]),spatialReference:this._spatialReference}),direction:"e",type:"midVertex"},{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmax,r.ymin],[r.xmin,r.ymin]),spatialReference:this._spatialReference}),direction:"s",type:"midVertex"},{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmin,r.ymin],[r.xmin,r.ymax]),spatialReference:this._spatialReference}),direction:"w",type:"midVertex"},{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmin,r.ymax],[r.xmax,r.ymax]),spatialReference:this._spatialReference}),direction:"n",type:"midVertex"}];a=a.concat(c)}var f=[],h=[];a.forEach(function(e){var r=new s.default({view:t.view,layer:t.layer,sketchStyle:new l.default({vertexStyle:t.sketchStyle._selectBoxVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:t.elevationInfo,_parent:t});t._drawTools.push(r),r.addFeature(e.point,t.sketchStage,{direction:e.direction,type:e.type},t.sketchInnerLayer),f.push(r),h.push(r.sketchStage.entityGraphic)}),this.sketchStage.selectBoxVertexGraphics=h,this._otherDrawTools?this._otherDrawTools.push(n):this._otherDrawTools=[n],this._otherDrawTools=this._otherDrawTools.concat(f),this.undoRedoManager&&this.undoRedoManager.addProcess("add",this.sketchStage),this._mapClickEvent||this._parent&&(!this._parent||this._parent._mapClickEvent)||(this._mapClickEvent=function(){t._preventFirstCall?t._preventFirstCall=void 0:(t.sketchStage.selectBoxGraphics.concat(t.sketchStage.selectBoxVertexGraphics).concat(t.sketchStage.vertexGraphics).concat(t.sketchStage.midVertexGraphics).forEach(function(e){t._removeFeatureFromLayer(e,t.sketchInnerLayer)}),t.view.off(i.ViewEventType.immediateClick,t._mapClickEvent),t.view._mapActionControl("drag-pan",!0),t._mapClickEvent=null,t.fire("selected",{isSelected:!1},self),t.sketchStage.selectBoxGraphics=[],t.sketchStage.selectBoxVertexGraphics=[],t.sketchStage.vertexGraphics=[],t.sketchStage.midVertexGraphics=[],t._editMode=i.SketchEditMode.NONE,t.view._mapActionControl("video-map-active",!1))},this._hitTestEventHandlers.push(this._mapClickEvent),this._preventFirstCall=!0,this.view.on(i.ViewEventType.immediateClick,this._mapClickEvent))}}},{key:"selectFeatureVertex",value:function(e){var t=this;this._clearEditGraphics(1);var r=[],n=[];e.geometry.coordinates.forEach(function(i,a){var u=new s.default({view:t.view,layer:t.layer,sketchStyle:new l.default({vertexStyle:t.sketchStyle._selectVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:t.elevationInfo,_parent:t}),c=new o.Point({coordinates:i,spatialReference:t._spatialReference});if(t._drawTools.push(u),u.addFeature(c,void 0,{vertexIndex:a}),r.push(u),t.sketchStage.vertexGraphics.push(u.sketchStage.entityGraphic),a>0){var f=new s.default({view:t.view,layer:t.layer,sketchStyle:new l.default({vertexStyle:t.sketchStyle._selectMidVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:t.elevationInfo,_parent:t});n.push(f);var h=e.geometry.coordinates[a-1],p=null;p=i.length>2?new o.Point({coordinates:[(i[0]+h[0])/2,(i[1]+h[1])/2,(i[2]+h[2])/2],spatialReference:t._spatialReference}):new o.Point({coordinates:[(i[0]+h[0])/2,(i[1]+h[1])/2],spatialReference:t._spatialReference}),t._drawTools.push(f),f.addFeature(p,void 0,{vertexIndex:a-1,type:"midVertex"}),t.sketchStage.midVertexGraphics.push(f.sketchStage.entityGraphic)}});var i=r.concat(n);this._otherDrawTools=this._otherDrawTools?this._otherDrawTools.concat(i):i,this.undoRedoManager&&this.undoRedoManager.addProcess("add",this.sketchStage)}},{key:"startPanGraphics",value:function(e,t){var r=this;this.view._mapActionControl("drag-pan",!1);var n=!1;this._startPan=!0;var a=t.mapPoint.coordinates[0],s=t.mapPoint.coordinates[1],u=null;u=i.Projection.project(new o.Point({coordinates:[a,s]}),this._spatialReference);var l=!0,c=setTimeout(function(){l=!1},200);this._parent&&this._parent._mapClickEvent&&this.view.off(i.ViewEventType.immediateClick,this._parent._mapClickEvent);var f=function(t){if(t&&t.x&&t.y&&!n&&r._startPan&&!r._editMode!==i.SketchEditMode.EDITGRAGIC&&!l){clearTimeout(null),n=!0;var a={x:t.x,y:t.y},s=r.view.toMap({x:a.x,y:a.y}),c=s.coordinates[0]-u.coordinates[0],f=s.coordinates[1]-u.coordinates[1];if(0!==c||0!==f){var h=[];e.geometry.coordinates[0].forEach(function(e){h.push(r.getPanCoordinates(e,c,f))});var p=new o.Polygon({coordinates:[h],spatialReference:r._spatialReference});u=s,r._dispatchEvent("pan",{deltaPosition:{x:c,y:f}},r),r.updateFeature(p,e),n=!1}else n=!1}},h=function e(){if(!r._editMode!==i.SketchEditMode.EDITGRAGIC&&r._startPan){if(l&&r._parent&&r._parent._editMode===i.SketchEditMode.EDITGRAGIC)return r._parent._editMode=i.SketchEditMode.EDITVERTEX,clearTimeout(c),r._parent.selectFeatureVertex(r._parent.sketchStage.entityGraphic),r._parent&&r._parent._mapClickEvent&&r.view.on(i.ViewEventType.immediateClick,r._parent._mapClickEvent),r._startPan=!1,r.view.off(i.ViewEventType.pointerMove,f),void r.view.off(i.ViewEventType.pointerUp,e);r._editMode=i.SketchEditMode.NONE,r._startPan=!1,r._enableMapDrag&&r._enableMapDrag(),r.view.off(i.ViewEventType.pointerMove,f),r.view.off(i.ViewEventType.pointerUp,e),r._parent&&r._parent.undoRedoManager&&r._parent.undoRedoManager.addProcess("update",r._parent.sketchStage),r._parent&&r._parent._mapClickEvent&&(r._parent._preventFirstCall=!0,r.view.on(i.ViewEventType.immediateClick,r._parent._mapClickEvent))}};this._hitTestEventHandlers.push(f),this._hitTestEventHandlers.push(h),this.view.on(i.ViewEventType.pointerUp,h),this.view.on(i.ViewEventType.pointerMove,f)}},{key:"_processEvent",value:function(e){"pan"===e.type?this._handlerPanEvent(e):"vertexScale"===e.type?this._handlerVertexScaleEvent(e):"midVertexScale"===e.type?this._handlerMidVertexScaleEvent(e):"vertexMove"===e.type?this._handlerVertexMoveEvent(e):"midVertexAdd"===e.type&&this._handlerMidVertexAddEvent(e)}},{key:"_handlerPanEvent",value:function(e){var t=this,r=[];this.sketchStage.entityGraphic.geometry.coordinates.forEach(function(n){r.push(t.getPanCoordinates(n,e.deltaPosition.x,e.deltaPosition.y))});var n=new o.LineString({coordinates:r,spatialReference:this._spatialReference});this.sketchStage.entityGraphic.geometry=n,this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)})}},{key:"_handlerVertexScaleEvent",value:function(e){if("scale"===e.action){var t;if(!this.sketchStage.entityGraphic.attributes.lastCoordinates){var r=JSON.parse(JSON.stringify(this.sketchStage.entityGraphic.geometry.coordinates));this.sketchStage.entityGraphic.attributes.lastCoordinates=r}var n=this.getScaleCoordinates(this.sketchStage.entityGraphic.geometry.coordinates,e.direction,e.extent,e.startPoint,e.movePoint,this.sketchStage.entityGraphic.attributes.lastCoordinates);t=new o.LineString({coordinates:n,spatialReference:this._spatialReference}),this.sketchStage.entityGraphic.geometry=t,this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)})}else"stop"===e.action&&(this.sketchStage.entityGraphic.attributes.lastCoordinates&&(this.sketchStage.entityGraphic.attributes.lastCoordinates=void 0),this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}),this._resetSelectBoxDirection())}},{key:"_handlerMidVertexScaleEvent",value:function(e){var t;if(!this.sketchStage.entityGraphic.attributes.lastCoordinates){var r=JSON.parse(JSON.stringify(this.sketchStage.entityGraphic.geometry.coordinates));this.sketchStage.entityGraphic.attributes.lastCoordinates=r}var n=this.getMidScaleCoordinates(this.sketchStage.entityGraphic.geometry.coordinates,e.direction,e.extent,e.startPoint,e.movePoint,this.sketchStage.entityGraphic.attributes.lastCoordinates);t=new o.LineString({coordinates:n,spatialReference:this._spatialReference}),this.sketchStage.entityGraphic.geometry=t,this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}),"stop"===e.action&&(this.sketchStage.entityGraphic.attributes.lastCoordinates&&(this.sketchStage.entityGraphic.attributes.lastCoordinates=void 0),this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}),this._resetSelectBoxDirection())}},{key:"_resetSelectBoxDirection",value:function(){var e=this,t=this.sketchStage.entityGraphic.geometry.extent;this.sketchStage.selectBoxVertexGraphics.forEach(function(r){r.attributes&&("ne"===r.attributes.direction?r.geometry.coordinates=[t.xmax,t.ymax]:"se"===r.attributes.direction?r.geometry.coordinates=[t.xmax,t.ymin]:"sw"===r.attributes.direction?r.geometry.coordinates=[t.xmin,t.ymin]:"nw"===r.attributes.direction?r.geometry.coordinates=[t.xmin,t.ymax]:"e"===r.attributes.direction?r.geometry.coordinates=e._sketchEditor._getCenterCoordinate([t.xmax,t.ymax],[t.xmax,t.ymin]):"s"===r.attributes.direction?r.geometry.coordinates=e._sketchEditor._getCenterCoordinate([t.xmax,t.ymin],[t.xmin,t.ymin]):"w"===r.attributes.direction?r.geometry.coordinates=e._sketchEditor._getCenterCoordinate([t.xmin,t.ymin],[t.xmin,t.ymax]):"n"===r.attributes.direction&&(r.geometry.coordinates=e._sketchEditor._getCenterCoordinate([t.xmin,t.ymax],[t.xmax,t.ymax])))})}},{key:"_handlerVertexMoveEvent",value:function(e){this.sketchStage.currentVertexIndex=e.vertexIndex;var t=this.sketchStage.entityGraphic,r=t.geometry.coordinates;if(t.geometry.coordinates[e.vertexIndex]=e.movePoint.coordinates,t.geometry=new o.LineString({coordinates:t.geometry.coordinates,spatialReference:this._spatialReference}),this._otherDrawTools)if(0===e.vertexIndex){var n=this.sketchStage.midVertexGraphics[e.vertexIndex],i=r[e.vertexIndex],a=r[e.vertexIndex+1];n.geometry.coordinates=[(a[0]+i[0])/2,(a[1]+i[1])/2],n.geometry=new o.Point({coordinates:n.geometry.coordinates,spatialReference:this._spatialReference})}else if(e.vertexIndex===r.length-1){var s=this.sketchStage.midVertexGraphics[e.vertexIndex-1],u=r[e.vertexIndex-1],l=r[e.vertexIndex];s.geometry.coordinates=[(u[0]+l[0])/2,(u[1]+l[1])/2],s.geometry=new o.Point({coordinates:s.geometry.coordinates,spatialReference:this._spatialReference})}else{var c=this.sketchStage.midVertexGraphics[e.vertexIndex],f=this.sketchStage.midVertexGraphics[e.vertexIndex-1],h=r[e.vertexIndex-1],p=r[e.vertexIndex],d=r[e.vertexIndex+1];c.geometry.coordinates=[(d[0]+p[0])/2,(d[1]+p[1])/2],c.geometry=new o.Point({coordinates:c.geometry.coordinates,spatialReference:this._spatialReference}),f.geometry.coordinates=[(h[0]+p[0])/2,(h[1]+p[1])/2],f.geometry=new o.Point({coordinates:f.geometry.coordinates,spatialReference:this._spatialReference})}}},{key:"_handlerMidVertexAddEvent",value:function(e){var t=this;if("changeFeature"===e.action&&(this.sketchStage.entityGraphic.geometry.coordinates.splice(e.vertexIndex+1,0,e.point.coordinates),this.sketchStage.entityGraphic.geometry=new o.LineString({coordinates:this.sketchStage.entityGraphic.geometry.coordinates,spatialReference:this._spatialReference})),"moveMidVertex"===e.action&&(this.sketchStage.currentVertexIndex=e.vertexIndex,this.sketchStage.entityGraphic.geometry.coordinates[e.vertexIndex+1]=e.movePoint.coordinates,this.sketchStage.entityGraphic.geometry=new o.LineString({coordinates:this.sketchStage.entityGraphic.geometry.coordinates,spatialReference:this._spatialReference})),"addVertex"===e.action){var r=this.sketchStage.midVertexGraphics[e.vertexIndex].id.toString(),n=new s.default({view:this.view,layer:this.layer,sketchStyle:new l.default({vertexStyle:this.sketchStyle._selectVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(n),n.addFeature(e.point),this.sketchStage.vertexGraphics.splice(e.vertexIndex+1,0,n.sketchStage.entityGraphic);var i=this.sketchStage.entityGraphic.geometry.coordinates[e.vertexIndex],a=null,u=null;this._getHight&&(u=0),a=u?new o.Point({coordinates:[(i[0]+e.point.coordinates[0])/2,(i[1]+e.point.coordinates[1])/2,u],spatialReference:this._spatialReference}):new o.Point({coordinates:[(i[0]+e.point.coordinates[0])/2,(i[1]+e.point.coordinates[1])/2],spatialReference:this._spatialReference});var c=new s.default({view:this.view,layer:this.layer,sketchStyle:new l.default({vertexStyle:this.sketchStyle._selectMidVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(c),c.addFeature(a,void 0,{type:"midVertex"}),this.sketchStage.midVertexGraphics.splice(e.vertexIndex,1,c.sketchStage.entityGraphic);var f=this.sketchStage.entityGraphic.geometry.coordinates[e.vertexIndex+2],h=null,p=null;this._getHight&&(p=0),h=p?new o.Point({coordinates:[(f[0]+e.point.coordinates[0])/2,(f[1]+e.point.coordinates[1])/2,p],spatialReference:this._spatialReference}):new o.Point({coordinates:[(f[0]+e.point.coordinates[0])/2,(f[1]+e.point.coordinates[1])/2],spatialReference:this._spatialReference});var d=new s.default({view:this.view,layer:this.layer,sketchStyle:new l.default({vertexStyle:this.sketchStyle._selectMidVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(d),d.addFeature(h,void 0,{type:"midVertex"}),this.sketchStage.midVertexGraphics.splice(e.vertexIndex+1,0,d.sketchStage.entityGraphic),this.sketchStage.vertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}}),this.sketchStage.midVertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}}),this._otherDrawTools.forEach(function(e){e.sketchStage.entityGraphic.id===r&&t._removeFeatureFromMap(e.sketchStage.entityGraphic)}),this._otherDrawTools.push(n),this._otherDrawTools.push(c),this._otherDrawTools.push(d)}}},{key:"addMidVertex",value:function(e,t){var r=new s.default;r.addPoint(t),this.sketchStage.midVertexGraphics=r}},{key:"addVertex",value:function(e,t){if(--t>-1&&t<=this.sketchStage.midVertexGraphics.length+1){var r=[];if(t<=this.sketchStage.entityGraphic.geometry.coordinates.length-1){(r=this.sketchStage.entityGraphic.geometry.coordinates).splice(t,0,e.coordinates),this.sketchStage.entityGraphic.geometry=new o.LineString({coordinates:r,spatialReference:this._spatialReference});var n=void 0,i=void 0,a=this.sketchStage.entityGraphic.geometry.extent;if(this.sketchStage.selectBoxGraphics.length>0&&this.sketchStage.selectBoxGraphics.forEach(function(e){e.geometry.coordinates=[[[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax]]]}),this.sketchStage.selectBoxVertexGraphics.length>0){var u=[[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin],[a.xmin,a.ymax],[(a.xmax+a.xmin)/2,a.ymax],[(a.xmax+a.xmin)/2,a.ymin],[a.xmax,(a.ymax+a.ymin)/2],[a.xmin,(a.ymax+a.ymin)/2]];this.sketchStage.selectBoxVertexGraphics.forEach(function(e,t){e.geometry.coordinates=u[t]})}if(this.sketchStage.vertexGraphics.length>0&&(n=new s.default({view:this.view,layer:this.layer,sketchStyle:new l.default({vertexStyle:this.sketchStyle._selectVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this}),this._drawTools.push(n),n.addFeatureByGeometry(e),this.sketchStage.vertexGraphics.splice(t,0,n.sketchStage.entityGraphic),this.sketchStage.vertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}})),this.sketchStage.midVertexGraphics.length>0){var c=-1,f=-1,h=null,p=null;if(0===t?(f=0,p=this.sketchStage.entityGraphic.geometry.coordinates[1]):t===this.sketchStage.midVertexGraphics.length+1?(f=this.sketchStage.midVertexGraphics.length-2,p=this.sketchStage.entityGraphic.geometry.coordinates[f]):(c=t-1,f=t+1,h=this.sketchStage.entityGraphic.geometry.coordinates[c],p=this.sketchStage.entityGraphic.geometry.coordinates[f]),c>-1){var d=new o.Point({coordinates:[(h[0]+e.coordinates[0])/2,(h[1]+e.coordinates[1])/2],spatialReference:this._spatialReference});this.sketchStage.midVertexGraphics[c].geometry.coordinates=d.coordinates}if(f>-1){var y=new o.Point({coordinates:[(p[0]+e.coordinates[0])/2,(p[1]+e.coordinates[1])/2],spatialReference:this._spatialReference});i=new s.default({view:this.view,layer:this.layer,sketchStyle:new l.default({vertexStyle:this.sketchStyle._selectMidVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this}),this._drawTools.push(i),i.addFeatureByGeometry(y,void 0,{type:"midVertex"}),this.sketchStage.midVertexGraphics.splice(t,0,i.sketchStage.entityGraphic)}this.sketchStage.midVertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}})}n&&this._otherDrawTools.push(n),i&&this._otherDrawTools.push(i),this.undoRedoManager.addProcess("update",this.sketchStage)}return null}}},{key:"updateVertex",value:function(e,t){var r=null;if(--t>-1){var n=this.sketchStage.entityGraphic.geometry.coordinates.length;if(t<n){var i=this.sketchStage.entityGraphic,a=i.geometry.coordinates;i.geometry.coordinates=a,this.currentVertexIndex=t,a[t]=e.coordinates,i.geometry=new o.LineString({coordinates:i.geometry.coordinates,spatialReference:this._spatialReference}),r=i.geometry,this.sketchStage.entityGraphic.geometry=r;var s=i.geometry.extent;if(this.sketchStage.selectBoxGraphics.length>0&&this.sketchStage.selectBoxGraphics.forEach(function(e){e.geometry.coordinates=[[[s.xmax,s.ymax],[s.xmax,s.ymin],[s.xmin,s.ymin],[s.xmin,s.ymax],[s.xmax,s.ymax]]]}),this.sketchStage.selectBoxVertexGraphics.length>0){var u=[[s.xmax,s.ymax],[s.xmax,s.ymin],[s.xmin,s.ymin],[s.xmin,s.ymax],[(s.xmax+s.xmin)/2,s.ymax],[(s.xmax+s.xmin)/2,s.ymin],[s.xmax,(s.ymax+s.ymin)/2],[s.xmin,(s.ymax+s.ymin)/2]];this.sketchStage.selectBoxVertexGraphics.forEach(function(e,t){e.geometry.coordinates=u[t]})}if(this.sketchStage.vertexGraphics.length>0&&(this.sketchStage.vertexGraphics[t].geometry.coordinates=e.coordinates),this.sketchStage.midVertexGraphics.length>0){var l=a[t-1],c=a[t],f=a[t+1],h=-1,p=-1;if(0===t?h=t:t===n-1?p=t-1:(h=t,p=t-1),h>-1){var d=this.sketchStage.midVertexGraphics[h];d.geometry.coordinates=[(f[0]+c[0])/2,(f[1]+c[1])/2],d.geometry=new o.Point({coordinates:d.geometry.coordinates,spatialReference:this._spatialReference})}if(p>-1){var y=this.sketchStage.midVertexGraphics[p];y.geometry.coordinates=[(l[0]+c[0])/2,(l[1]+c[1])/2],y.geometry=new o.Point({coordinates:y.geometry.coordinates,spatialReference:this._spatialReference})}}}this.undoRedoManager.addProcess("update",this.sketchStage)}return r}},{key:"removeVertex",value:function(e){var t=null;if(--e>-1){var r=this.sketchStage.entityGraphic.geometry.coordinates.length;if(r>2&&e<r){var n=this.sketchStage.entityGraphic.geometry.coordinates;n.splice(e,1),t=new o.LineString({coordinates:n,spatialReference:this._spatialReference}),this.sketchStage.entityGraphic.geometry=t;var i=this.sketchStage.entityGraphic.geometry.extent;if(this.sketchStage.selectBoxGraphics.length>0&&this.sketchStage.selectBoxGraphics.forEach(function(e){e.geometry.coordinates=[[[i.xmax,i.ymax],[i.xmax,i.ymin],[i.xmin,i.ymin],[i.xmin,i.ymax],[i.xmax,i.ymax]]]}),this.sketchStage.selectBoxVertexGraphics.length>0){var a=[[i.xmax,i.ymax],[i.xmax,i.ymin],[i.xmin,i.ymin],[i.xmin,i.ymax],[(i.xmax+i.xmin)/2,i.ymax],[(i.xmax+i.xmin)/2,i.ymin],[i.xmax,(i.ymax+i.ymin)/2],[i.xmin,(i.ymax+i.ymin)/2]];this.sketchStage.selectBoxVertexGraphics.forEach(function(e,t){e.geometry.coordinates=a[t]})}if(this.sketchStage.vertexGraphics.length>0){var s=this.sketchStage.vertexGraphics[e].id.toString();this._removeFeatureFromMap(this.sketchStage.vertexGraphics[e]),this.sketchStage.vertexGraphics.splice(e,1),this.sketchStage.vertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}}),this._otherDrawTools=this._otherDrawTools.filter(function(e){if(e.sketchStage.entityGraphic.id!==s)return e})}if(this.sketchStage.midVertexGraphics.length>0){var u=[],l=-1,c=-1;0===e?c=0:e===r-1?c=e-1:(u=[(t.coordinates[e-1][0]+t.coordinates[e][0])/2,(t.coordinates[e-1][1]+t.coordinates[e][1])/2],l=e-1,c=e),l>-1&&(this.sketchStage.midVertexGraphics[l].geometry=new o.Point({coordinates:u,spatialReference:this._spatialReference}));var f=this.sketchStage.vertexGraphics[c].id.toString();this._removeFeatureFromMap(this.sketchStage.midVertexGraphics[c]),this.sketchStage.midVertexGraphics.splice(c,1),this.sketchStage.midVertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}}),this._otherDrawTools=this._otherDrawTools.filter(function(e){if(e.sketchStage.entityGraphic.id!==f)return e})}}this.undoRedoManager.addProcess("update",this.sketchStage)}return t}}]),t}();t.default=h,i.Zondy.SketchFreehandPolylineDrawTool=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(4),a=f(r(23)),s=f(r(22)),u=f(r(34)),l=f(r(17)),c=r(0);function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.type="sketchFreehandPolygonDrawTool",r._initEvent(),r._drawTools=[r],r._otherDrawTools=[],r._currentMovePoint=void 0,r.vertexNum=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),n(t,[{key:"_initEvent",value:function(){this._processEvent=this._processEvent.bind(this),this.on("pan",this._processEvent),this.on("vertexScale",this._processEvent),this.on("midVertexScale",this._processEvent),this.on("vertexMove",this._processEvent),this.on("midVertexAdd",this._processEvent)}},{key:"drawFeature",value:function(){var e=this;this._editMode=i.SketchEditMode.DRAWING,this.view._mapActionControl("double-click-zoom",!1),this.view._mapActionControl("video-map-active",!0);var t=!1,r=!1,n=null,o=[],a=null,u=[];this.vertexNum=0;var l=null;this.cursorStyle=this.view.cursor,(0,c.isNull)(this.cursorStyle)&&(this.view.cursor="crosshair");var f=this._getInteractiveDom();this._setInitSnap(),this._fireStartDrawEvent();var h=function r(o){if(o&&o.x&&o.y){e._stopInitSnap(),clearTimeout(null);var c={x:o.x,y:o.y};if(!(a&&l&&c.x===a.x&&c.y===a.y&&(new Date).getTime()-l<200)){a=c,l=(new Date).getTime(),e._editMode=i.SketchEditMode.DRAWING;var f=null;f=e._snapPoint?e._snapPoint:e.view.toMap({x:c.x,y:c.y}),e.vertexNum++,1===e.vertexNum?(u=[f.coordinates],(n=e._getFeature()).geometry.coordinates=[[u[0],u[0],u[0],u[0]]],t=!1):2===e.vertexNum?u=[n.geometry.coordinates[0][0],n.geometry.coordinates[0][1]]:(u=n.geometry.coordinates[0].slice(0,n.geometry.coordinates[0].length-2)).push(f.coordinates),e.sketchStage.entityGraphic=n;var h=new s.default({view:e.view,layer:e.layer,_parent:e,sketchStyle:e.sketchStyle,elevationInfo:e.elevationInfo});h.addFeature(f,void 0,void 0,e.sketchInnerLayer),e._drawTools.push(h);var p=h.sketchStage.entityGraphic;e.sketchStage.vertexGraphics.push(p),n&&(t=!0),"click",e.fire("drawn-vertex",{geometry:h.sketchStage.entityGraphic.geometry,feature:h.sketchStage.entityGraphic},self),e.undoRedoManager&&e.undoRedoManager.addProcess("add-vertex",e.sketchStage,e._editMode),e.view.off(i.ViewEventType.immediateClick,r)}}},p=!0,d=function(i){if(i&&i.x&&i.y&&t&&!r){clearTimeout(null),r=!0,n=e.sketchStage.entityGraphic,e.sketchStage.snapGraphics.length>0&&(e.sketchStage.snapGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.snapGraphics=[]);var a={x:i.x,y:i.y};o[o.length-1]=a;var s=e.view.toMap({x:a.x,y:a.y});1===e.vertexNum?u=[n.geometry.coordinates[0][0]]:2===e.vertexNum?(n.geometry.coordinates[0][2]=s.coordinates,u=n.geometry.coordinates[0].slice(0,n.geometry.coordinates[0].length-2)):u=n.geometry.coordinates[0].slice(0,n.geometry.coordinates[0].length-2),e.vertexNum>0&&(e._snapPoint=e.getSnapGraphics(s,[n.geometry.coordinates[0][0]])),e._snapPoint&&(s=e._snapPoint),e._currentMovePoint=s,1===e.vertexNum?(n.geometry.coordinates[0][1]=s.coordinates,n.geometry.coordinates[0][2]=s.coordinates,u=n.geometry.coordinates[0].slice(0,n.geometry.coordinates[0].length-2)):2===e.vertexNum?(n.geometry.coordinates[0][2]=s.coordinates,u=n.geometry.coordinates[0].slice(0,n.geometry.coordinates[0].length-1)):(n.geometry.coordinates[0].splice(n.geometry.coordinates[0].length-1,0,s.coordinates),u=n.geometry.coordinates[0].slice(0,n.geometry.coordinates[0].length-1)),e.vertexNum++,e.sketchStage.entityGraphic=n,n.geometry.coordinates=[JSON.parse(JSON.stringify(n.geometry.coordinates[0]))],p&&(e._addFeatureToLayer(n,e.layer),p=!1),r=!1,"move";var l=e._getInteractiveDom();f=f.concat(l),e._removeInteractiveStyle(l),e._fireDrawVertexEvent(n)}},y=function(){if(clearTimeout(null),clearTimeout(null),!t)return n=null,u=[],void(o=[]);n=e.sketchStage.entityGraphic,u=[],o=[],t=!1,e.vertexNum=0,e.stop(),e.sketchStage.snapGraphics.length>0&&(e.sketchStage.snapGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.snapGraphics=[]),e._editMode=i.SketchEditMode.NONE,"doubleClick",e.view.cursor=e.cursorStyle,e._addInteractiveStyle(f),e.fire("drawn",{geometry:n.geometry,feature:n},self),e._fireStopDrawEvent(n),e.sketchStage.vertexGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.vertexGraphics=[],e._currentMovePoint=void 0,e.undoRedoManager._initDrawProcess(),setTimeout(function(){e.view._mapActionControl("double-click-zoom",!0),e.view._mapActionControl("video-map-active",!1)},0)};this._drawEventHandlers.push(h,d,y),this.view.on(i.ViewEventType.immediateClick,h),this.view.on(i.ViewEventType.pointerMove,d),this.view.on(i.ViewEventType.doubleClick,y)}},{key:"addFeature",value:function(e,t,r,n){var i=null;i=t&&t.fillStyle?t.fillStyle:this.sketchStyle._fillStyle;var o=this._getFeature(e,i);r&&(o.attributes=r),this.sketchStage.entityGraphic=o,this._addFeatureToLayer(o,n)}},{key:"addFeatureByGeometry",value:function(e,t,r,n){var o=null;o=t&&t.fillStyle?t.fillStyle:this.sketchStyle._fillStyle;var a=new i.Feature({geometry:e,symbol:o,elevationInfo:this.elevationInfo});r&&(a.attributes=r),this.sketchStage.entityGraphic=a,this._addFeatureToLayer(a,n)}},{key:"_getFeature",value:function(e){e||(e=[[0,0],[0,0],[0,0],[0,0]]);var t=new o.Polygon({coordinates:[e],spatialReference:this._spatialReference}),r=this.sketchStyle.fillStyle.clone(),n=new i.Feature({geometry:t,symbol:r,elevationInfo:this.elevationInfo});return n.isShowArea=this.sketchStyle.isShowArea,n.isShowArea&&(n._textStyle=this.sketchStyle.textStyle),n}},{key:"hitTestFeature",value:function(e,t){this.view._mapActionControl("video-map-active",!0),!this._parent&&this.editOption.showSelectBox&&(this._editMode===i.SketchEditMode.NONE?this._editMode=i.SketchEditMode.EDITGRAGIC:this._editMode===i.SketchEditMode.EDITVERTEX&&(this.view.off(i.ViewEventType.immediateClick,this._mapClickEvent),this._mapClickEvent=null,this._editMode=i.SketchEditMode.EDITGRAGIC),this.selectFeature(e)),this._parent&&this._parent._editMode===i.SketchEditMode.EDITGRAGIC&&this.startPanGraphics(e,t)}},{key:"selectFeature",value:function(e){var t=this;if(this.editOption.showSelectBox){this._clearEditGraphics(2);var r=e.geometry.extent,n=new u.default({view:this.view,layer:this.layer,sketchStyle:new l.default({fillStyle:this.sketchStyle._selectBoxStyle,isShowSegmentLength:!0,isShowArea:!0}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(n),n.addFeature([[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax]],void 0,void 0,this.sketchInnerLayer),this.sketchStage.selectBoxGraphics=[n.sketchStage.entityGraphic];var a=[];if(a=[{point:new o.Point({coordinates:[r.xmax,r.ymax],spatialReference:this._spatialReference}),direction:"ne"},{point:new o.Point({coordinates:[r.xmax,r.ymin],spatialReference:this._spatialReference}),direction:"se"},{point:new o.Point({coordinates:[r.xmin,r.ymin],spatialReference:this._spatialReference}),direction:"sw"},{point:new o.Point({coordinates:[r.xmin,r.ymax],spatialReference:this._spatialReference}),direction:"nw"}],this._sketchEditor&&this._sketchEditor._getCenterCoordinate){var c=[{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmax,r.ymax],[r.xmax,r.ymin]),spatialReference:this._spatialReference}),direction:"e",type:"midVertex"},{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmax,r.ymin],[r.xmin,r.ymin]),spatialReference:this._spatialReference}),direction:"s",type:"midVertex"},{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmin,r.ymin],[r.xmin,r.ymax]),spatialReference:this._spatialReference}),direction:"w",type:"midVertex"},{point:new o.Point({coordinates:this._sketchEditor._getCenterCoordinate([r.xmin,r.ymax],[r.xmax,r.ymax]),spatialReference:this._spatialReference}),direction:"n",type:"midVertex"}];a=a.concat(c)}var f=[],h=[];a.forEach(function(e){var r=new s.default({view:t.view,layer:t.layer,sketchStyle:new l.default({vertexStyle:t.sketchStyle._selectBoxVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:t.elevationInfo,_parent:t});t._drawTools.push(r),r.addFeature(e.point,t.sketchStage,{direction:e.direction,type:e.type},t.sketchInnerLayer),f.push(r),h.push(r.sketchStage.entityGraphic)}),this.sketchStage.selectBoxVertexGraphics=h,this._otherDrawTools?this._otherDrawTools.push(n):this._otherDrawTools=[n],this._otherDrawTools=this._otherDrawTools.concat(f),this.undoRedoManager&&this.undoRedoManager.addProcess("add",this.sketchStage,this._editMode),this._mapClickEvent||this._parent&&(!this._parent||this._parent._mapClickEvent)||(this._mapClickEvent=function(){t._preventFirstCall?t._preventFirstCall=void 0:(t.sketchStage.selectBoxGraphics.concat(t.sketchStage.selectBoxVertexGraphics).concat(t.sketchStage.vertexGraphics).concat(t.sketchStage.midVertexGraphics).forEach(function(e){t._removeFeatureFromLayer(e,t.sketchInnerLayer)}),t.view.off(i.ViewEventType.immediateClick,t._mapClickEvent),t.view._mapActionControl("drag-pan",!0),t._mapClickEvent=null,t.fire("selected",{isSelected:!1},self),t.sketchStage.selectBoxGraphics=[],t.sketchStage.selectBoxVertexGraphics=[],t.sketchStage.vertexGraphics=[],t.sketchStage.midVertexGraphics=[],t._editMode=i.SketchEditMode.NONE,t.view._mapActionControl("video-map-active",!1))},this._hitTestEventHandlers.push(this._mapClickEvent),this._preventFirstCall=!0,this.view.on(i.ViewEventType.immediateClick,this._mapClickEvent))}}},{key:"startPanGraphics",value:function(e,t){var r=this;this.view._mapActionControl("drag-pan",!1);var n=!1;this._startPan=!0;var a=null;a=t.mapPoint;var s=!0;setTimeout(function(){s=!1},200);this._parent&&this._parent._mapClickEvent&&this.view.off(i.ViewEventType.immediateClick,this._parent._mapClickEvent);var u=function(t){if(t&&t.x&&t.y&&!n&&r._startPan&&!r._editMode!==i.SketchEditMode.EDITGRAGIC&&!s){clearTimeout(null),n=!0;var u={x:t.x,y:t.y},l=r.view.toMap({x:u.x,y:u.y}),c=l.coordinates[0]-a.coordinates[0],f=l.coordinates[1]-a.coordinates[1];if(0!==c||0!==f){var h=[];e.geometry.coordinates[0].forEach(function(e){h.push(r.getPanCoordinates(e,c,f))});var p=new o.Polygon({coordinates:[h],spatialReference:r._spatialReference});a=l,r._dispatchEvent("pan",{deltaPosition:{x:c,y:f}},r),r.updateFeature(p,e),n=!1}else n=!1}},l=function e(){!r._editMode!==i.SketchEditMode.EDITGRAGIC&&r._startPan&&(r._editMode=i.SketchEditMode.NONE,r._startPan=!1,r.view.off(i.ViewEventType.pointerMove,u),r.view.off(i.ViewEventType.pointerUp,e),r._parent&&r._parent.undoRedoManager&&r._parent.undoRedoManager.addProcess("update",r._parent.sketchStage,r._editMode),r._parent&&r._parent._mapClickEvent&&(r._parent._preventFirstCall=!0,r.view.on(i.ViewEventType.immediateClick,r._parent._mapClickEvent)),r.view._mapActionControl("drag-pan",!0))};this._hitTestEventHandlers.push(u),this._hitTestEventHandlers.push(l),this.view.on(i.ViewEventType.pointerUp,l),this.view.on(i.ViewEventType.pointerMove,u)}},{key:"_processEvent",value:function(e){"pan"===e.type?this._handlerPanEvent(e):"vertexScale"===e.type?this._handlerVertexScaleEvent(e):"midVertexScale"===e.type?this._handlerMidVertexScaleEvent(e):"circleVertexScale"===e.type?this._handlerCircleVertexScaleEvent(e):"vertexMove"===e.type?this._handlerVertexMoveEvent(e):"midVertexAdd"===e.type&&this._handlerMidVertexAddEvent(e)}},{key:"_handlerPanEvent",value:function(e){var t=this,r=[];this.sketchStage.entityGraphic.geometry.coordinates[0].forEach(function(n){r.push(t.getPanCoordinates(n,e.deltaPosition.x,e.deltaPosition.y))});var n=new o.Polygon({coordinates:[r],spatialReference:this._spatialReference});this.sketchStage.entityGraphic.geometry=n,this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)})}},{key:"_handlerVertexScaleEvent",value:function(e){if("scale"===e.action){var t;if(!this.sketchStage.entityGraphic.attributes.lastCoordinates){var r=JSON.parse(JSON.stringify(this.sketchStage.entityGraphic.geometry.coordinates[0]));this.sketchStage.entityGraphic.attributes.lastCoordinates=r}var n=this.getScaleCoordinates(this.sketchStage.entityGraphic.geometry.coordinates[0],e.direction,e.extent,e.startPoint,e.movePoint,this.sketchStage.entityGraphic.attributes.lastCoordinates);t=new o.Polygon({coordinates:[n],spatialReference:this._spatialReference}),this.sketchStage.entityGraphic.geometry=t,this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)})}"stop"===e.action&&(this.sketchStage.entityGraphic.attributes.lastCoordinates&&(this.sketchStage.entityGraphic.attributes.lastCoordinates=void 0),this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}),this._resetSelectBoxDirection())}},{key:"_handlerMidVertexScaleEvent",value:function(e){var t;if(!this.sketchStage.entityGraphic.attributes.lastCoordinates){var r=JSON.parse(JSON.stringify(this.sketchStage.entityGraphic.geometry.coordinates[0]));this.sketchStage.entityGraphic.attributes.lastCoordinates=r}var n=this.getMidScaleCoordinates(this.sketchStage.entityGraphic.geometry.coordinates[0],e.direction,e.extent,e.startPoint,e.movePoint,this.sketchStage.entityGraphic.attributes.lastCoordinates);t=new o.Polygon({coordinates:[n],spatialReference:this._spatialReference}),this.sketchStage.entityGraphic.geometry=t,this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}),"stop"===e.action&&(this.sketchStage.entityGraphic.attributes.lastCoordinates&&(this.sketchStage.entityGraphic.attributes.lastCoordinates=void 0),this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}),this._resetSelectBoxDirection())}},{key:"_resetSelectBoxDirection",value:function(){var e=this,t=this.sketchStage.entityGraphic.geometry.extent;this.sketchStage.selectBoxVertexGraphics.forEach(function(r){r.attributes&&("ne"===r.attributes.direction?r.geometry.coordinates=[t.xmax,t.ymax]:"se"===r.attributes.direction?r.geometry.coordinates=[t.xmax,t.ymin]:"sw"===r.attributes.direction?r.geometry.coordinates=[t.xmin,t.ymin]:"nw"===r.attributes.direction?r.geometry.coordinates=[t.xmin,t.ymax]:"e"===r.attributes.direction?r.geometry.coordinates=e._sketchEditor._getCenterCoordinate([t.xmax,t.ymax],[t.xmax,t.ymin]):"s"===r.attributes.direction?r.geometry.coordinates=e._sketchEditor._getCenterCoordinate([t.xmax,t.ymin],[t.xmin,t.ymin]):"w"===r.attributes.direction?r.geometry.coordinates=e._sketchEditor._getCenterCoordinate([t.xmin,t.ymin],[t.xmin,t.ymax]):"n"===r.attributes.direction&&(r.geometry.coordinates=e._sketchEditor._getCenterCoordinate([t.xmin,t.ymax],[t.xmax,t.ymax])))})}},{key:"_handlerCircleVertexScaleEvent",value:function(e){if(this._parent&&this._parent.sketchStage.entityGraphic){var t=null,r=this._parent.sketchStage.entityGraphic.geometry.extent,n=[[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax]];(t=new o.Polygon({coordinates:[[[0,0],[0,0],[0,0],[0,0]]],spatialReference:this._spatialReference})).coordinates=[n],this.sketchStage.entityGraphic.geometry=t,this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}),"stop"===e.action&&(this.sketchStage.entityGraphic.attributes.lastCoordinates&&(this.sketchStage.entityGraphic.attributes.lastCoordinates=void 0),this._otherDrawTools&&this._otherDrawTools.forEach(function(t){t._processEvent(e)}))}}},{key:"_handlerVertexMoveEvent",value:function(e){this.sketchStage.currentVertexIndex=e.vertexIndex;var t=this.sketchStage.entityGraphic,r=t.geometry.coordinates[0];if(t.geometry.coordinates[0][e.vertexIndex]=e.movePoint.coordinates,t.geometry.coordinates[0].length-1===e.vertexIndex?t.geometry.coordinates[0][0]=e.movePoint.coordinates:0===e.vertexIndex&&(t.geometry.coordinates[0][t.geometry.coordinates[0].length-1]=e.movePoint.coordinates),t.geometry=new o.Polygon({coordinates:t.geometry.coordinates,spatialReference:this._spatialReference}),this._otherDrawTools){var n=e.vertexIndex,i=0===n?n-1+this.sketchStage.midVertexGraphics.length:n-1,a=n===this.sketchStage.midVertexGraphics.length-1?0:n+1,s=this.sketchStage.midVertexGraphics[n],u=this.sketchStage.midVertexGraphics[i],l=r[i],c=r[n],f=r[a];s.geometry.coordinates=[(f[0]+c[0])/2,(f[1]+c[1])/2],s.geometry=new o.Point({coordinates:s.geometry.coordinates,spatialReference:this._spatialReference}),u.geometry.coordinates=[(l[0]+c[0])/2,(l[1]+c[1])/2],u.geometry=new o.Point({coordinates:u.geometry.coordinates,spatialReference:this._spatialReference})}}},{key:"_handlerMidVertexAddEvent",value:function(e){var t=this;if("changeFeature"===e.action&&(this.sketchStage.entityGraphic.geometry.coordinates[0].splice(e.vertexIndex+1,0,e.point.coordinates),this.sketchStage.entityGraphic.geometry=new o.Polygon({coordinates:[this.sketchStage.entityGraphic.geometry.coordinates[0]],spatialReference:this._spatialReference})),"moveMidVertex"===e.action&&(this.sketchStage.currentVertexIndex=e.vertexIndex,this.sketchStage.entityGraphic.geometry.coordinates[0][e.vertexIndex+1]=e.movePoint.coordinates,this.sketchStage.entityGraphic.geometry=new o.Polygon({coordinates:this.sketchStage.entityGraphic.geometry.coordinates,spatialReference:this._spatialReference})),"addVertex"===e.action){var r=this.sketchStage.midVertexGraphics[e.vertexIndex].id.toString(),n=new s.default({view:this.view,layer:this.layer,sketchStyle:new l.default({vertexStyle:this.sketchStyle._selectVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(n),n.addFeature(e.point),this.sketchStage.vertexGraphics.splice(e.vertexIndex+1,0,n.sketchStage.entityGraphic);var i=this.sketchStage.entityGraphic.geometry.coordinates[0][e.vertexIndex],a=null,u=null;this._getHight&&(u=0),a=u?new o.Point({coordinates:[(i[0]+e.point.coordinates[0])/2,(i[1]+e.point.coordinates[1])/2,u],spatialReference:this._spatialReference}):new o.Point({coordinates:[(i[0]+e.point.coordinates[0])/2,(i[1]+e.point.coordinates[1])/2],spatialReference:this._spatialReference});var c=new s.default({view:this.view,layer:this.layer,sketchStyle:new l.default({vertexStyle:this.sketchStyle._selectMidVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(c),c.addFeature(a,void 0,{type:"midVertex"}),this.sketchStage.midVertexGraphics.splice(e.vertexIndex,1,c.sketchStage.entityGraphic);var f=this.sketchStage.entityGraphic.geometry.coordinates[0][e.vertexIndex+2],h=null,p=null;this._getHight&&(p=0),h=p?new o.Point({coordinates:[(f[0]+e.point.coordinates[0])/2,(f[1]+e.point.coordinates[1])/2,p],spatialReference:this._spatialReference}):new o.Point({coordinates:[(f[0]+e.point.coordinates[0])/2,(f[1]+e.point.coordinates[1])/2],spatialReference:this._spatialReference});var d=new s.default({view:this.view,layer:this.layer,sketchStyle:new l.default({vertexStyle:this.sketchStyle._selectMidVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this});this._drawTools.push(d),d.addFeature(h,void 0,{type:"midVertex"}),this.sketchStage.midVertexGraphics.splice(e.vertexIndex+1,0,d.sketchStage.entityGraphic),this.sketchStage.vertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}}),this.sketchStage.midVertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}}),this._otherDrawTools.forEach(function(e){e.sketchStage.entityGraphic.id===r&&t._removeFeatureFromMap(e.sketchStage.entityGraphic)}),this._otherDrawTools.push(n),this._otherDrawTools.push(c),this._otherDrawTools.push(d)}}},{key:"addMidVertex",value:function(e,t){var r=new s.default;r.addPoint(t),this.sketchStage.midVertexGraphics=r}},{key:"addVertex",value:function(e,t){var r=null;if(--t>-1){var n=[];if(t<this.sketchStage.entityGraphic.geometry.coordinates[0].length-1){(n=this.sketchStage.entityGraphic.geometry.coordinates[0]).splice(t,0,e.coordinates),0===t?n[n.length-1]=e.coordinates:t===n.length-1&&n.splice(0,0,e.coordinates),this.sketchStage.entityGraphic.geometry.coordinates=[n],r=this.sketchStage.entityGraphic.geometry;var i=void 0,a=void 0,u=this.sketchStage.entityGraphic.geometry.extent;if(this.sketchStage.selectBoxGraphics.length>0&&this.sketchStage.selectBoxGraphics.forEach(function(e){e.geometry.coordinates=[[[u.xmax,u.ymax],[u.xmax,u.ymin],[u.xmin,u.ymin],[u.xmin,u.ymax],[u.xmax,u.ymax]]]}),this.sketchStage.selectBoxVertexGraphics.length>0){var c=[[u.xmax,u.ymax],[u.xmax,u.ymin],[u.xmin,u.ymin],[u.xmin,u.ymax],[(u.xmax+u.xmin)/2,u.ymax],[(u.xmax+u.xmin)/2,u.ymin],[u.xmax,(u.ymax+u.ymin)/2],[u.xmin,(u.ymax+u.ymin)/2]];this.sketchStage.selectBoxVertexGraphics.forEach(function(e,t){e.geometry.coordinates=c[t]})}if(this.sketchStage.vertexGraphics.length>0&&(i=new s.default({view:this.view,layer:this.layer,sketchStyle:new l.default({vertexStyle:this.sketchStyle._selectVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this}),this._drawTools.push(i),i.addFeatureByGeometry(e),this.sketchStage.vertexGraphics.splice(t,0,i.sketchStage.entityGraphic),this.sketchStage.vertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}})),this.sketchStage.midVertexGraphics.length>0){var f=-1,h=-1,p=null,d=null;0===t?(h=0,f=this.sketchStage.midVertexGraphics.length-1,p=this.sketchStage.entityGraphic.geometry.coordinates[0][this.sketchStage.entityGraphic.geometry.coordinates[0].length-2],d=this.sketchStage.entityGraphic.geometry.coordinates[0][1]):(f=t-1,h=t+1,p=this.sketchStage.entityGraphic.geometry.coordinates[0][f],d=this.sketchStage.entityGraphic.geometry.coordinates[0][h]);var y=new o.Point({coordinates:[(p[0]+e.coordinates[0])/2,(p[1]+e.coordinates[1])/2],spatialReference:this._spatialReference});this.sketchStage.midVertexGraphics[f].geometry.coordinates=y.coordinates;var g=new o.Point({coordinates:[(d[0]+e.coordinates[0])/2,(d[1]+e.coordinates[1])/2],spatialReference:this._spatialReference});a=new s.default({view:this.view,layer:this.layer,sketchStyle:new l.default({vertexStyle:this.sketchStyle._selectMidVertexStyle}),editOption:{showSelectBox:!1,_hitTestMode:1},elevationInfo:this.elevationInfo,_parent:this}),this._drawTools.push(a),a.addFeatureByGeometry(g,void 0,{type:"midVertex"}),this.sketchStage.midVertexGraphics.splice(t,0,a.sketchStage.entityGraphic),this.sketchStage.midVertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}})}i&&this._otherDrawTools.push(i),a&&this._otherDrawTools.push(a),this.undoRedoManager.addProcess("update",this.sketchStage,this._editMode)}return r}}},{key:"updateVertex",value:function(e,t){var r=null;if(--t>-1){if(t<this.sketchStage.entityGraphic.geometry.coordinates[0].length-1){var n=this.sketchStage.entityGraphic,i=n.geometry.coordinates[0];n.geometry.coordinates=[i],this.currentVertexIndex=t,i[t]=e.coordinates,i.length-1===t?i[0]=e.coordinates:0===t&&(i[i.length-1]=e.coordinates),n.geometry=new o.Polygon({coordinates:n.geometry.coordinates,spatialReference:this._spatialReference}),r=n.geometry;var a=n.geometry.extent;if(this.sketchStage.selectBoxGraphics.length>0&&this.sketchStage.selectBoxGraphics.forEach(function(e){e.geometry.coordinates=[[[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax]]]}),this.sketchStage.selectBoxVertexGraphics.length>0){var s=[[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin],[a.xmin,a.ymax],[(a.xmax+a.xmin)/2,a.ymax],[(a.xmax+a.xmin)/2,a.ymin],[a.xmax,(a.ymax+a.ymin)/2],[a.xmin,(a.ymax+a.ymin)/2]];this.sketchStage.selectBoxVertexGraphics.forEach(function(e,t){e.geometry.coordinates=s[t]})}if(this.sketchStage.vertexGraphics.length>0&&(this.sketchStage.vertexGraphics[t].geometry.coordinates=e.coordinates),this.sketchStage.midVertexGraphics.length>0){var u=t,l=0===u?u-1+this.sketchStage.midVertexGraphics.length:u-1,c=u===this.sketchStage.midVertexGraphics.length-1?0:u+1,f=this.sketchStage.midVertexGraphics[u],h=this.sketchStage.midVertexGraphics[l],p=i[l],d=i[u],y=i[c];f.geometry.coordinates=[(y[0]+d[0])/2,(y[1]+d[1])/2],f.geometry=new o.Point({coordinates:f.geometry.coordinates,spatialReference:this._spatialReference}),h.geometry.coordinates=[(p[0]+d[0])/2,(p[1]+d[1])/2],h.geometry=new o.Point({coordinates:h.geometry.coordinates,spatialReference:this._spatialReference})}}this.undoRedoManager.addProcess("update",this.sketchStage,this._editMode)}return r}},{key:"removeVertex",value:function(e){var t=null;if(--e>-1){var r=this.sketchStage.entityGraphic.geometry.coordinates[0].length-1;if(r>3&&e<r){var n=this.sketchStage.entityGraphic.geometry.coordinates[0];n.splice(e,1),0===e&&n.splice(n.length-1,1,n[0]),t=new o.Polygon({coordinates:[n],spatialReference:this._spatialReference}),this.sketchStage.entityGraphic.geometry=t;var i=this.sketchStage.entityGraphic.geometry.extent;if(this.sketchStage.selectBoxGraphics.length>0&&this.sketchStage.selectBoxGraphics.forEach(function(e){e.geometry.coordinates=[[[i.xmax,i.ymax],[i.xmax,i.ymin],[i.xmin,i.ymin],[i.xmin,i.ymax],[i.xmax,i.ymax]]]}),this.sketchStage.selectBoxVertexGraphics.length>0){var a=[[i.xmax,i.ymax],[i.xmax,i.ymin],[i.xmin,i.ymin],[i.xmin,i.ymax],[(i.xmax+i.xmin)/2,i.ymax],[(i.xmax+i.xmin)/2,i.ymin],[i.xmax,(i.ymax+i.ymin)/2],[i.xmin,(i.ymax+i.ymin)/2]];this.sketchStage.selectBoxVertexGraphics.forEach(function(e,t){e.geometry.coordinates=a[t]})}if(this.sketchStage.vertexGraphics.length>0){var s=this.sketchStage.vertexGraphics[e].id.toString();this._removeFeatureFromMap(this.sketchStage.vertexGraphics[e]),this.sketchStage.vertexGraphics.splice(e,1),this.sketchStage.vertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}}),this._otherDrawTools=this._otherDrawTools.filter(function(e){if(e.sketchStage.entityGraphic.id!==s)return e})}if(this.sketchStage.midVertexGraphics.length>0){var u=[],l=-1;0===e?(u=[(t.coordinates[0][t.coordinates[0].length-2][0]+t.coordinates[0][e][0])/2,(t.coordinates[0][t.coordinates[0].length-2][1]+t.coordinates[0][e][1])/2],l=this.sketchStage.midVertexGraphics.length-1):(u=[(t.coordinates[0][e-1][0]+t.coordinates[0][e][0])/2,(t.coordinates[0][e-1][1]+t.coordinates[0][e][1])/2],l=e-1),this.sketchStage.midVertexGraphics[l].geometry=new o.Point({coordinates:u,spatialReference:this._spatialReference});var c=this.sketchStage.vertexGraphics[e].id.toString();this._removeFeatureFromMap(this.sketchStage.midVertexGraphics[e]),this.sketchStage.midVertexGraphics.splice(e,1),this.sketchStage.midVertexGraphics.forEach(function(e,t){e.attributes?e.attributes.vertexIndex=t:e.attributes={vertexIndex:t}}),this._otherDrawTools=this._otherDrawTools.filter(function(e){if(e.sketchStage.entityGraphic.id!==c)return e})}}this.undoRedoManager.addProcess("update",this.sketchStage,this._editMode)}return t}}]),t}();t.default=h,i.Zondy.SketchFreehandPolygonDrawTool=h},function(e,t,r){"use strict";r.r(t);var n=r(73),i=r(103),o=Object(n.default)("WGS84");function a(e,t,r,n){var o,a,s;return Array.isArray(r)?(o=Object(i.default)(e,t,r,n)||{x:NaN,y:NaN},r.length>2?void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name?"number"==typeof o.z?[o.x,o.y,o.z].concat(r.splice(3)):[o.x,o.y,r[2]].concat(r.splice(3)):[o.x,o.y].concat(r.splice(2)):[o.x,o.y]):(a=Object(i.default)(e,t,r,n),2===(s=Object.keys(r)).length?a:(s.forEach(function(n){if(void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;a[n]=r[n]}),a))}function s(e){return e instanceof n.default?e:e.oProj?e.oProj:Object(n.default)(e)}t.default=function(e,t,r){e=s(e);var n,i=!1;return void 0===t?(t=e,e=o,i=!0):(void 0!==t.x||Array.isArray(t))&&(r=t,t=e,e=o,i=!0),t=s(t),r?a(e,t,r):(n={forward:function(r,n){return a(e,t,r,n)},inverse:function(r,n){return a(t,e,r,n)}},i&&(n.oProj=t),n)}},function(e,t,r){"use strict";r.r(t);var n=r(99),i=r(101),o=r(100),a=r(58);var s=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var u=["3857","900913","3785","102113"];t.default=function(e){if(!function(e){return"string"==typeof e}(e))return e;if(function(e){return e in n.default}(e))return n.default[e];if(function(e){return s.some(function(t){return e.indexOf(t)>-1})}(e)){var t=Object(i.default)(e);if(function(e){var t=Object(a.default)(e,"authority");if(t){var r=Object(a.default)(t,"epsg");return r&&u.indexOf(r)>-1}}(t))return n.default["EPSG:3857"];var r=function(e){var t=Object(a.default)(e,"extension");if(t)return Object(a.default)(t,"proj4")}(t);return r?Object(o.default)(r):t}return function(e){return"+"===e[0]}(e)?Object(o.default)(e):void 0}},function(e,t,r){"use strict";r.r(t),t.default=function(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",function(){return n});var n={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667}},function(e,t,r){"use strict";r.r(t),t.default={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}}},function(e,t,r){"use strict";r.r(t),t.default=function(e){return new l(e).output()};var n=1,i=/\s/,o=/[A-Za-z]/,a=/[A-Za-z84_]/,s=/[,\]]/,u=/[\d\.E\-\+]/;function l(e){if("string"!=typeof e)throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=n}l.prototype.readCharicter=function(){var e=this.text[this.place++];if(4!==this.state)for(;i.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case n:return this.neutral(e);case 2:return this.keyword(e);case 4:return this.quoted(e);case 5:return this.afterquote(e);case 3:return this.number(e);case-1:return}},l.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=4);if(s.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},l.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=n)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=n,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},l.prototype.number=function(e){if(!u.test(e)){if(s.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},l.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=5},l.prototype.keyword=function(e){if(a.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=n)}if(!s.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},l.prototype.neutral=function(e){if(o.test(e))return this.word=e,void(this.state=2);if('"'===e)return this.word="",void(this.state=4);if(u.test(e))return this.word=e,void(this.state=3);if(!s.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},l.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)}},function(e,t,r){"use strict";function n(e,t,r){Array.isArray(t)&&(r.unshift(t),t=null);var n=t?{}:e,o=r.reduce(function(e,t){return i(t,e),e},n);t&&(e[t]=o)}function i(e,t){if(Array.isArray(e)){var r=e.shift();if("PARAMETER"===r&&(r=e.shift()),1===e.length)return Array.isArray(e[0])?(t[r]={},void i(e[0],t[r])):void(t[r]=e[0]);if(e.length)if("TOWGS84"!==r){if("AXIS"===r)return r in t||(t[r]=[]),void t[r].push(e);var o;switch(Array.isArray(r)||(t[r]={}),r){case"UNIT":case"PRIMEM":case"VERT_DATUM":return t[r]={name:e[0].toLowerCase(),convert:e[1]},void(3===e.length&&i(e[2],t[r]));case"SPHEROID":case"ELLIPSOID":return t[r]={name:e[0],a:e[1],rf:e[2]},void(4===e.length&&i(e[3],t[r]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return e[0]=["name",e[0]],void n(t,r,e);default:for(o=-1;++o<e.length;)if(!Array.isArray(e[o]))return i(e,t[r]);return n(t,r,e)}}else t[r]=e;else t[r]=!0}else t[e]=!0}r.r(t),r.d(t,"sExpr",function(){return i})},function(e,t,r){"use strict";r.r(t),t.default=function(e,t){var r,n;if(e=e||{},!t)return e;for(n in t)void 0!==(r=t[n])&&(e[n]=r);return e}},function(e,t,r){"use strict";r.r(t),r.d(t,"add",function(){return u}),r.d(t,"get",function(){return l}),r.d(t,"start",function(){return c});var n=r(190),i=r(191),o=[n.default,i.default],a={},s=[];function u(e,t){var r=s.length;return e.names?(s[r]=e,e.names.forEach(function(e){a[e.toLowerCase()]=r}),this):(console.log(t),!0)}function l(e){if(!e)return!1;var t=e.toLowerCase();return void 0!==a[t]&&s[a[t]]?s[a[t]]:void 0}function c(){o.forEach(u)}t.default={start:c,add:u,get:l}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return u}),r.d(t,"forward",function(){return l}),r.d(t,"inverse",function(){return c}),r.d(t,"names",function(){return f});var n=r(35),i=r(7),o=r(59),a=r(60),s=r(5);function u(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Object(n.default)(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function l(e){var t,r,n=e.x,a=e.y;if(a*s.R2D>90&&a*s.R2D<-90&&n*s.R2D>180&&n*s.R2D<-180)return null;if(Math.abs(Math.abs(a)-s.HALF_PI)<=s.EPSLN)return null;if(this.sphere)t=this.x0+this.a*this.k0*Object(i.default)(n-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(s.FORTPI+.5*a));else{var u=Math.sin(a),l=Object(o.default)(this.e,a,u);t=this.x0+this.a*this.k0*Object(i.default)(n-this.long0),r=this.y0-this.a*this.k0*Math.log(l)}return e.x=t,e.y=r,e}function c(e){var t,r,n=e.x-this.x0,o=e.y-this.y0;if(this.sphere)r=s.HALF_PI-2*Math.atan(Math.exp(-o/(this.a*this.k0)));else{var u=Math.exp(-o/(this.a*this.k0));if(-9999===(r=Object(a.default)(this.e,u)))return null}return t=Object(i.default)(this.long0+n/(this.a*this.k0)),e.x=t,e.y=r,e}var f=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];t.default={init:u,forward:l,inverse:c,names:f}},function(e,t,r){"use strict";function n(){}function i(e){return e}r.r(t),r.d(t,"init",function(){return n}),r.d(t,"forward",function(){return i}),r.d(t,"inverse",function(){return i}),r.d(t,"names",function(){return o});var o=["longlat","identity"];t.default={init:n,forward:i,inverse:i,names:o}},function(e,t,r){"use strict";r.r(t),r.d(t,"eccentricity",function(){return a}),r.d(t,"sphere",function(){return s});var n=r(5),i=r(193),o=r(58);function a(e,t,r,i){var o=e*e,a=t*t,s=(o-a)/o,u=0;return i?(o=(e*=1-s*(n.SIXTH+s*(n.RA4+s*n.RA6)))*e,s=0):u=Math.sqrt(s),{es:s,e:u,ep2:(o-a)/a}}function s(e,t,r,a,s){if(!e){var u=Object(o.default)(i.default,a);u||(u=i.WGS84),e=u.a,t=u.b,r=u.rf}return r&&!t&&(t=(1-1/r)*e),(0===r||Math.abs(e-t)<n.EPSLN)&&(s=!0,t=e),{a:e,b:t,rf:r,sphere:s}}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",function(){return n}),r.d(t,"WGS84",function(){return i});var n={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},i=n.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};n.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",function(){return n});var n={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},militargeographische_institut:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}}},function(e,t,r){"use strict";r.r(t);var n=r(5);t.default=function(e,t,r,i,o,a,s){var u={};return u.datum_type=void 0===e||"none"===e?n.PJD_NODATUM:n.PJD_WGS84,t&&(u.datum_params=t.map(parseFloat),0===u.datum_params[0]&&0===u.datum_params[1]&&0===u.datum_params[2]||(u.datum_type=n.PJD_3PARAM),u.datum_params.length>3&&(0===u.datum_params[3]&&0===u.datum_params[4]&&0===u.datum_params[5]&&0===u.datum_params[6]||(u.datum_type=n.PJD_7PARAM,u.datum_params[3]*=n.SEC_TO_RAD,u.datum_params[4]*=n.SEC_TO_RAD,u.datum_params[5]*=n.SEC_TO_RAD,u.datum_params[6]=u.datum_params[6]/1e6+1))),s&&(u.datum_type=n.PJD_GRIDSHIFT,u.grids=s),u.a=r,u.b=i,u.es=o,u.ep2=a,u}},function(e,t,r){"use strict";r.r(t),r.d(t,"applyGridShift",function(){return s});var n=r(5),i=r(104),o=r(7);function a(e){return e===n.PJD_3PARAM||e===n.PJD_7PARAM}function s(e,t,r){if(null===e.grids||0===e.grids.length)return console.log("Grid shift grids not found"),-1;var i={x:-r.x,y:r.y},o={x:Number.NaN,y:Number.NaN},a=[];e:for(var s=0;s<e.grids.length;s++){var l=e.grids[s];if(a.push(l.name),l.isNull){o=i;break}if(l.mandatory,null!==l.grid)for(var c=l.grid.subgrids,f=0,h=c.length;f<h;f++){var p=c[f],d=(Math.abs(p.del[1])+Math.abs(p.del[0]))/1e4,y=p.ll[0]-d,g=p.ll[1]-d,v=p.ll[0]+(p.lim[0]-1)*p.del[0]+d,m=p.ll[1]+(p.lim[1]-1)*p.del[1]+d;if(!(g>i.y||y>i.x||m<i.y||v<i.x)&&(o=u(i,t,p),!isNaN(o.x)))break e}else if(l.mandatory)return console.log("Unable to find mandatory grid '"+l.name+"'"),-1}return isNaN(o.x)?(console.log("Failed to find a grid shift table for location '"+-i.x*n.R2D+" "+i.y*n.R2D+" tried: '"+a+"'"),-1):(r.x=-o.x,r.y=o.y,0)}function u(e,t,r){var n={x:Number.NaN,y:Number.NaN};if(isNaN(e.x))return n;var i={x:e.x,y:e.y};i.x-=r.ll[0],i.y-=r.ll[1],i.x=Object(o.default)(i.x-Math.PI)+Math.PI;var a=l(i,r);if(t){if(isNaN(a.x))return n;a.x=i.x-a.x,a.y=i.y-a.y;var s,u,c=9;do{if(u=l(a,r),isNaN(u.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}s={x:i.x-(u.x+a.x),y:i.y-(u.y+a.y)},a.x+=s.x,a.y+=s.y}while(c--&&Math.abs(s.x)>1e-12&&Math.abs(s.y)>1e-12);if(c<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=Object(o.default)(a.x+r.ll[0]),n.y=a.y+r.ll[1]}else isNaN(a.x)||(n.x=e.x+a.x,n.y=e.y+a.y);return n}function l(e,t){var r,n={x:e.x/t.del[0],y:e.y/t.del[1]},i=Math.floor(n.x),o=Math.floor(n.y),a=n.x-1*i,s=n.y-1*o,u={x:Number.NaN,y:Number.NaN};if(i<0||i>=t.lim[0])return u;if(o<0||o>=t.lim[1])return u;r=o*t.lim[0]+i;var l=t.cvs[r][0],c=t.cvs[r][1];r++;var f=t.cvs[r][0],h=t.cvs[r][1];r+=t.lim[0];var p=t.cvs[r][0],d=t.cvs[r][1];r--;var y=t.cvs[r][0],g=t.cvs[r][1],v=a*s,m=a*(1-s),_=(1-a)*(1-s),b=(1-a)*s;return u.x=_*l+m*f+b*y+v*p,u.y=_*c+m*h+b*g+v*d,u}t.default=function(e,t,r){if(Object(i.compareDatums)(e,t))return r;if(e.datum_type===n.PJD_NODATUM||t.datum_type===n.PJD_NODATUM)return r;var o=e.a,u=e.es;if(e.datum_type===n.PJD_GRIDSHIFT){if(0!==s(e,!1,r))return;o=n.SRS_WGS84_SEMIMAJOR,u=n.SRS_WGS84_ESQUARED}var l=t.a,c=t.b,f=t.es;if(t.datum_type===n.PJD_GRIDSHIFT&&(l=n.SRS_WGS84_SEMIMAJOR,c=n.SRS_WGS84_SEMIMINOR,f=n.SRS_WGS84_ESQUARED),u===f&&o===l&&!a(e.datum_type)&&!a(t.datum_type))return r;if((r=Object(i.geodeticToGeocentric)(r,u,o),a(e.datum_type)&&(r=Object(i.geocentricToWgs84)(r,e.datum_type,e.datum_params)),a(t.datum_type)&&(r=Object(i.geocentricFromWgs84)(r,t.datum_type,t.datum_params)),r=Object(i.geocentricToGeodetic)(r,f,l,c),t.datum_type===n.PJD_GRIDSHIFT)&&0!==s(t,!0,r))return;return r}},function(e,t,r){"use strict";r.r(t),t.default=function(e,t,r){var n,i,o,a=r.x,s=r.y,u=r.z||0,l={};for(o=0;o<3;o++)if(!t||2!==o||void 0!==r.z)switch(0===o?(n=a,i=-1!=="ew".indexOf(e.axis[o])?"x":"y"):1===o?(n=s,i=-1!=="ns".indexOf(e.axis[o])?"y":"x"):(n=u,i="z"),e.axis[o]){case"e":l[i]=n;break;case"w":l[i]=-n;break;case"n":l[i]=n;break;case"s":l[i]=-n;break;case"u":void 0!==r[i]&&(l.z=n);break;case"d":void 0!==r[i]&&(l.z=-n);break;default:return null}return l}},function(e,t,r){"use strict";function n(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}r.r(t),t.default=function(e){n(e.x),n(e.y)}},function(e,t,r){"use strict";r.r(t);var n=r(106);function i(e,t,r){if(!(this instanceof i))return new i(e,t,r);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"==typeof e)this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&void 0===t){var n=e.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=e,this.y=t,this.z=r||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}i.fromMGRS=function(e){return new i(Object(n.toPoint)(e))},i.prototype.toMGRS=function(e){return Object(n.forward)([this.x,this.y],e)},t.default=i},function(e,t,r){"use strict";r.r(t);var n=r(107),i=r(110),o=r(207),a=r(209),s=r(212),u=r(213),l=r(214),c=r(215),f=r(216),h=r(217),p=r(218),d=r(219),y=r(220),g=r(221),v=r(223),m=r(224),_=r(225),b=r(226),S=r(227),x=r(228),w=r(229),O=r(230),P=r(231),E=r(232),k=r(233),T=r(234),M=r(235),I=r(236),L=r(237),C=r(238);t.default=function(e){e.Proj.projections.add(n.default),e.Proj.projections.add(i.default),e.Proj.projections.add(o.default),e.Proj.projections.add(a.default),e.Proj.projections.add(s.default),e.Proj.projections.add(u.default),e.Proj.projections.add(l.default),e.Proj.projections.add(c.default),e.Proj.projections.add(f.default),e.Proj.projections.add(h.default),e.Proj.projections.add(p.default),e.Proj.projections.add(d.default),e.Proj.projections.add(y.default),e.Proj.projections.add(g.default),e.Proj.projections.add(v.default),e.Proj.projections.add(m.default),e.Proj.projections.add(_.default),e.Proj.projections.add(b.default),e.Proj.projections.add(S.default),e.Proj.projections.add(x.default),e.Proj.projections.add(w.default),e.Proj.projections.add(O.default),e.Proj.projections.add(P.default),e.Proj.projections.add(E.default),e.Proj.projections.add(k.default),e.Proj.projections.add(T.default),e.Proj.projections.add(M.default),e.Proj.projections.add(I.default),e.Proj.projections.add(L.default),e.Proj.projections.add(C.default)}},function(e,t,r){"use strict";r.r(t);var n=r(43),i=r(202);t.default=function(e){var t=Math.abs(e);return t=Object(i.default)(t*(1+t/(Object(n.default)(1,t)+1))),e<0?-t:t}},function(e,t,r){"use strict";r.r(t),t.default=function(e){var t=1+e,r=t-1;return 0===r?e:e*Math.log(t)/r}},function(e,t,r){"use strict";r.r(t),t.default=function(e,t){for(var r,n=2*Math.cos(2*t),i=e.length-1,o=e[i],a=0;--i>=0;)r=n*o-a+e[i],a=o,o=r;return t+r*Math.sin(2*t)}},function(e,t,r){"use strict";r.r(t),t.default=function(e,t){for(var r,n=2*Math.cos(t),i=e.length-1,o=e[i],a=0;--i>=0;)r=n*o-a+e[i],a=o,o=r;return Math.sin(t)*r}},function(e,t,r){"use strict";r.r(t);var n=r(111),i=r(206);t.default=function(e,t,r){for(var o,a,s=Math.sin(t),u=Math.cos(t),l=Object(n.default)(r),c=Object(i.default)(r),f=2*u*c,h=-2*s*l,p=e.length-1,d=e[p],y=0,g=0,v=0;--p>=0;)o=g,a=y,d=f*(g=d)-o-h*(y=v)+e[p],v=h*g-a+f*y;return[(f=s*c)*d-(h=u*l)*v,f*v+h*d]}},function(e,t,r){"use strict";r.r(t),t.default=function(e){var t=Math.exp(e);return t=(t+1/t)/2}},function(e,t,r){"use strict";r.r(t),r.d(t,"dependsOn",function(){return a}),r.d(t,"init",function(){return s}),r.d(t,"names",function(){return u});var n=r(208),i=r(110),o=r(5),a="etmerc";function s(){var e=Object(n.default)(this.zone,this.long0);if(void 0===e)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*o.D2R,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,i.default.init.apply(this),this.forward=i.default.forward,this.inverse=i.default.inverse}var u=["Universal Transverse Mercator System","utm"];t.default={init:s,names:u,dependsOn:a}},function(e,t,r){"use strict";r.r(t);var n=r(7);t.default=function(e,t){if(void 0===e){if((e=Math.floor(30*(Object(n.default)(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return e}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return a}),r.d(t,"forward",function(){return s}),r.d(t,"inverse",function(){return u}),r.d(t,"names",function(){return l});var n=r(210),i=r(7),o=r(43);function a(){n.default.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function s(e){var t,r,o,a;return e.x=Object(i.default)(e.x-this.long0),n.default.forward.apply(this,[e]),t=Math.sin(e.y),r=Math.cos(e.y),o=Math.cos(e.x),a=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*r*o),e.x=a*r*Math.sin(e.x),e.y=a*(this.cosc0*t-this.sinc0*r*o),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function u(e){var t,r,a,s,u;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,u=Object(o.default)(e.x,e.y)){var l=2*Math.atan2(u,this.R2);t=Math.sin(l),r=Math.cos(l),s=Math.asin(r*this.sinc0+e.y*t*this.cosc0/u),a=Math.atan2(e.x*t,u*this.cosc0*r-e.y*this.sinc0*t)}else s=this.phic0,a=0;return e.x=a,e.y=s,n.default.inverse.apply(this,[e]),e.x=Object(i.default)(e.x+this.long0),e}var l=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];t.default={init:a,forward:s,inverse:u,names:l}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return a}),r.d(t,"forward",function(){return s}),r.d(t,"inverse",function(){return u}),r.d(t,"names",function(){return l});var n=r(211),i=r(5),o=20;function a(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+i.FORTPI)/(Math.pow(Math.tan(.5*this.lat0+i.FORTPI),this.C)*Object(n.default)(this.e*e,this.ratexp))}function s(e){var t=e.x,r=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*r+i.FORTPI),this.C)*Object(n.default)(this.e*Math.sin(r),this.ratexp))-i.HALF_PI,e.x=this.C*t,e}function u(e){for(var t=e.x/this.C,r=e.y,a=Math.pow(Math.tan(.5*r+i.FORTPI)/this.K,1/this.C),s=o;s>0&&(r=2*Math.atan(a*Object(n.default)(this.e*Math.sin(e.y),-.5*this.e))-i.HALF_PI,!(Math.abs(r-e.y)<1e-14));--s)e.y=r;return s?(e.x=t,e.y=r,e):null}var l=["gauss"];t.default={init:a,forward:s,inverse:u,names:l}},function(e,t,r){"use strict";r.r(t),t.default=function(e,t){return Math.pow((1-e)/(1+e),t)}},function(e,t,r){"use strict";r.r(t),r.d(t,"ssfn_",function(){return l}),r.d(t,"init",function(){return c}),r.d(t,"forward",function(){return f}),r.d(t,"inverse",function(){return h}),r.d(t,"names",function(){return p});var n=r(5),i=r(42),o=r(35),a=r(59),s=r(60),u=r(7);function l(e,t,r){return t*=r,Math.tan(.5*(n.HALF_PI+e))*Math.pow((1-t)/(1+t),.5*r)}function c(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=n.EPSLN&&(this.k0=.5*(1+Object(i.default)(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=n.EPSLN&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=n.EPSLN&&Math.abs(Math.cos(this.lat_ts))>n.EPSLN&&(this.k0=.5*this.cons*Object(o.default)(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Object(a.default)(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Object(o.default)(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-n.HALF_PI,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function f(e){var t,r,i,o,s,l,c=e.x,f=e.y,h=Math.sin(f),p=Math.cos(f),d=Object(u.default)(c-this.long0);return Math.abs(Math.abs(c-this.long0)-Math.PI)<=n.EPSLN&&Math.abs(f+this.lat0)<=n.EPSLN?(e.x=NaN,e.y=NaN,e):this.sphere?(t=2*this.k0/(1+this.sinlat0*h+this.coslat0*p*Math.cos(d)),e.x=this.a*t*p*Math.sin(d)+this.x0,e.y=this.a*t*(this.coslat0*h-this.sinlat0*p*Math.cos(d))+this.y0,e):(r=2*Math.atan(this.ssfn_(f,h,this.e))-n.HALF_PI,o=Math.cos(r),i=Math.sin(r),Math.abs(this.coslat0)<=n.EPSLN?(s=Object(a.default)(this.e,f*this.con,this.con*h),l=2*this.a*this.k0*s/this.cons,e.x=this.x0+l*Math.sin(c-this.long0),e.y=this.y0-this.con*l*Math.cos(c-this.long0),e):(Math.abs(this.sinlat0)<n.EPSLN?(t=2*this.a*this.k0/(1+o*Math.cos(d)),e.y=t*i):(t=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*i+this.cosX0*o*Math.cos(d))),e.y=t*(this.cosX0*i-this.sinX0*o*Math.cos(d))+this.y0),e.x=t*o*Math.sin(d)+this.x0,e))}function h(e){var t,r,i,o,a;e.x-=this.x0,e.y-=this.y0;var l=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var c=2*Math.atan(l/(2*this.a*this.k0));return t=this.long0,r=this.lat0,l<=n.EPSLN?(e.x=t,e.y=r,e):(r=Math.asin(Math.cos(c)*this.sinlat0+e.y*Math.sin(c)*this.coslat0/l),t=Math.abs(this.coslat0)<n.EPSLN?this.lat0>0?Object(u.default)(this.long0+Math.atan2(e.x,-1*e.y)):Object(u.default)(this.long0+Math.atan2(e.x,e.y)):Object(u.default)(this.long0+Math.atan2(e.x*Math.sin(c),l*this.coslat0*Math.cos(c)-e.y*this.sinlat0*Math.sin(c))),e.x=t,e.y=r,e)}if(Math.abs(this.coslat0)<=n.EPSLN){if(l<=n.EPSLN)return r=this.lat0,t=this.long0,e.x=t,e.y=r,e;e.x*=this.con,e.y*=this.con,i=l*this.cons/(2*this.a*this.k0),r=this.con*Object(s.default)(this.e,i),t=this.con*Object(u.default)(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else o=2*Math.atan(l*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,l<=n.EPSLN?a=this.X0:(a=Math.asin(Math.cos(o)*this.sinX0+e.y*Math.sin(o)*this.cosX0/l),t=Object(u.default)(this.long0+Math.atan2(e.x*Math.sin(o),l*this.cosX0*Math.cos(o)-e.y*this.sinX0*Math.sin(o)))),r=-1*Object(s.default)(this.e,Math.tan(.5*(n.HALF_PI+a)));return e.x=t,e.y=r,e}var p=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"];t.default={init:c,forward:f,inverse:h,names:p,ssfn_:l}},function(e,t,r){"use strict";function n(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),r=this.a,n=1/this.rf,i=2*n-Math.pow(n,2),o=this.e=Math.sqrt(i);this.R=this.k0*r*Math.sqrt(1-i)/(1-i*Math.pow(t,2)),this.alpha=Math.sqrt(1+i/(1-i)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+e/2)),u=Math.log((1+o*t)/(1-o*t));this.K=a-this.alpha*s+this.alpha*o/2*u}function i(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),r=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),n=-this.alpha*(t+r)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(o))),s=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(o));return e.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,e.x=this.R*a+this.x0,e}function o(e){for(var t=e.x-this.x0,r=e.y-this.y0,n=t/this.R,i=2*(Math.atan(Math.exp(r/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),s=this.lambda0+a/this.alpha,u=0,l=o,c=-1e3,f=0;Math.abs(l-c)>1e-7;){if(++f>20)return;u=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),c=l,l=2*Math.atan(Math.exp(u))-Math.PI/2}return e.x=s,e.y=l,e}r.r(t),r.d(t,"init",function(){return n}),r.d(t,"forward",function(){return i}),r.d(t,"inverse",function(){return o}),r.d(t,"names",function(){return a});var a=["somerc"];t.default={init:n,forward:i,inverse:o,names:a}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return u}),r.d(t,"forward",function(){return l}),r.d(t,"inverse",function(){return c}),r.d(t,"names",function(){return f});var n=r(59),i=r(7),o=r(60),a=r(5),s=1e-7;function u(){var e,t,r,o,u,l,c,f,h,p,d,y=0,g=0,v=0,m=0,_=0,b=0,S=0;this.no_off=function(e){var t="object"==typeof e.PROJECTION?Object.keys(e.PROJECTION)[0]:e.PROJECTION;return"no_uoff"in e||"no_off"in e||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(t)}(this),this.no_rot="no_rot"in this;var x=!1;"alpha"in this&&(x=!0);var w=!1;if("rectified_grid_angle"in this&&(w=!0),x&&(S=this.alpha),w&&(y=this.rectified_grid_angle*a.D2R),x||w)g=this.longc;else if(v=this.long1,_=this.lat1,m=this.long2,b=this.lat2,Math.abs(_-b)<=s||(e=Math.abs(_))<=s||Math.abs(e-a.HALF_PI)<=s||Math.abs(Math.abs(this.lat0)-a.HALF_PI)<=s||Math.abs(Math.abs(b)-a.HALF_PI)<=s)throw new Error;var O=1-this.es;t=Math.sqrt(O),Math.abs(this.lat0)>a.EPSLN?(f=Math.sin(this.lat0),r=Math.cos(this.lat0),e=1-this.es*f*f,this.B=r*r,this.B=Math.sqrt(1+this.es*this.B*this.B/O),this.A=this.B*this.k0*t/e,(u=(o=this.B*t/(r*Math.sqrt(e)))*o-1)<=0?u=0:(u=Math.sqrt(u),this.lat0<0&&(u=-u)),this.E=u+=o,this.E*=Math.pow(Object(n.default)(this.e,this.lat0,f),this.B)):(this.B=1/t,this.A=this.k0,this.E=o=u=1),x||w?(x?(d=Math.asin(Math.sin(S)/o),w||(y=S)):(d=y,S=Math.asin(o*Math.sin(d))),this.lam0=g-Math.asin(.5*(u-1/u)*Math.tan(d))/this.B):(l=Math.pow(Object(n.default)(this.e,_,Math.sin(_)),this.B),c=Math.pow(Object(n.default)(this.e,b,Math.sin(b)),this.B),u=this.E/l,h=(c-l)/(c+l),p=((p=this.E*this.E)-c*l)/(p+c*l),(e=v-m)<-Math.pi?m-=a.TWO_PI:e>Math.pi&&(m+=a.TWO_PI),this.lam0=Object(i.default)(.5*(v+m)-Math.atan(p*Math.tan(.5*this.B*(v-m))/h)/this.B),d=Math.atan(2*Math.sin(this.B*Object(i.default)(v-this.lam0))/(u-1/u)),y=S=Math.asin(o*Math.sin(d))),this.singam=Math.sin(d),this.cosgam=Math.cos(d),this.sinrot=Math.sin(y),this.cosrot=Math.cos(y),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(o*o-1)/Math.cos(S))),this.lat0<0&&(this.u_0=-this.u_0)),u=.5*d,this.v_pole_n=this.ArB*Math.log(Math.tan(a.FORTPI-u)),this.v_pole_s=this.ArB*Math.log(Math.tan(a.FORTPI+u))}function l(e){var t,r,i,o,u,l,c,f,h={};if(e.x=e.x-this.lam0,Math.abs(Math.abs(e.y)-a.HALF_PI)>a.EPSLN){if(t=.5*((u=this.E/Math.pow(Object(n.default)(this.e,e.y,Math.sin(e.y)),this.B))-(l=1/u)),r=.5*(u+l),o=Math.sin(this.B*e.x),i=(t*this.singam-o*this.cosgam)/r,Math.abs(Math.abs(i)-1)<a.EPSLN)throw new Error;f=.5*this.ArB*Math.log((1-i)/(1+i)),l=Math.cos(this.B*e.x),c=Math.abs(l)<s?this.A*e.x:this.ArB*Math.atan2(t*this.cosgam+o*this.singam,l)}else f=e.y>0?this.v_pole_n:this.v_pole_s,c=this.ArB*e.y;return this.no_rot?(h.x=c,h.y=f):(c-=this.u_0,h.x=f*this.cosrot+c*this.sinrot,h.y=c*this.cosrot-f*this.sinrot),h.x=this.a*h.x+this.x0,h.y=this.a*h.y+this.y0,h}function c(e){var t,r,n,i,s,u,l,c={};if(e.x=(e.x-this.x0)*(1/this.a),e.y=(e.y-this.y0)*(1/this.a),this.no_rot?(r=e.y,t=e.x):(r=e.x*this.cosrot-e.y*this.sinrot,t=e.y*this.cosrot+e.x*this.sinrot+this.u_0),i=.5*((n=Math.exp(-this.BrA*r))-1/n),s=.5*(n+1/n),l=((u=Math.sin(this.BrA*t))*this.cosgam+i*this.singam)/s,Math.abs(Math.abs(l)-1)<a.EPSLN)c.x=0,c.y=l<0?-a.HALF_PI:a.HALF_PI;else{if(c.y=this.E/Math.sqrt((1+l)/(1-l)),c.y=Object(o.default)(this.e,Math.pow(c.y,1/this.B)),c.y===1/0)throw new Error;c.x=-this.rB*Math.atan2(i*this.cosgam-u*this.singam,Math.cos(this.BrA*t))}return c.x+=this.lam0,c}var f=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];t.default={init:u,forward:l,inverse:c,names:f}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return l}),r.d(t,"forward",function(){return c}),r.d(t,"inverse",function(){return f}),r.d(t,"names",function(){return h});var n=r(35),i=r(59),o=r(42),a=r(7),s=r(60),u=r(5);function l(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<u.EPSLN)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var t=Math.sin(this.lat1),r=Math.cos(this.lat1),o=Object(n.default)(this.e,t,r),a=Object(i.default)(this.e,this.lat1,t),s=Math.sin(this.lat2),l=Math.cos(this.lat2),c=Object(n.default)(this.e,s,l),f=Object(i.default)(this.e,this.lat2,s),h=Object(i.default)(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>u.EPSLN?this.ns=Math.log(o/c)/Math.log(a/f):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=o/(this.ns*Math.pow(a,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function c(e){var t=e.x,r=e.y;Math.abs(2*Math.abs(r)-Math.PI)<=u.EPSLN&&(r=Object(o.default)(r)*(u.HALF_PI-2*u.EPSLN));var n,s,l=Math.abs(Math.abs(r)-u.HALF_PI);if(l>u.EPSLN)n=Object(i.default)(this.e,r,Math.sin(r)),s=this.a*this.f0*Math.pow(n,this.ns);else{if((l=r*this.ns)<=0)return null;s=0}var c=this.ns*Object(a.default)(t-this.long0);return e.x=this.k0*(s*Math.sin(c))+this.x0,e.y=this.k0*(this.rh-s*Math.cos(c))+this.y0,e}function f(e){var t,r,n,i,o,l=(e.x-this.x0)/this.k0,c=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(l*l+c*c),r=1):(t=-Math.sqrt(l*l+c*c),r=-1);var f=0;if(0!==t&&(f=Math.atan2(r*l,r*c)),0!==t||this.ns>0){if(r=1/this.ns,n=Math.pow(t/(this.a*this.f0),r),-9999===(i=Object(s.default)(this.e,n)))return null}else i=-u.HALF_PI;return o=Object(a.default)(f/this.ns+this.long0),e.x=o,e.y=i,e}var h=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];t.default={init:l,forward:c,inverse:f,names:h}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return i}),r.d(t,"forward",function(){return o}),r.d(t,"inverse",function(){return a}),r.d(t,"names",function(){return s});var n=r(7);function i(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function o(e){var t,r,i,o,a,s,u,l=e.x,c=e.y,f=Object(n.default)(l-this.long0);return t=Math.pow((1+this.e*Math.sin(c))/(1-this.e*Math.sin(c)),this.alfa*this.e/2),r=2*(Math.atan(this.k*Math.pow(Math.tan(c/2+this.s45),this.alfa)/t)-this.s45),i=-f*this.alfa,o=Math.asin(Math.cos(this.ad)*Math.sin(r)+Math.sin(this.ad)*Math.cos(r)*Math.cos(i)),a=Math.asin(Math.cos(r)*Math.sin(i)/Math.cos(o)),s=this.n*a,u=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/2+this.s45),this.n),e.y=u*Math.cos(s)/1,e.x=u*Math.sin(s)/1,this.czech||(e.y*=-1,e.x*=-1),e}function a(e){var t,r,n,i,o,a,s,u=e.x;e.x=e.y,e.y=u,this.czech||(e.y*=-1,e.x*=-1),o=Math.sqrt(e.x*e.x+e.y*e.y),i=Math.atan2(e.y,e.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),r=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(t)),e.x=this.long0-r/this.alfa,a=t,s=0;var l=0;do{e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-e.y)<1e-10&&(s=1),a=e.y,l+=1}while(0===s&&l<15);return l>=15?null:e}var s=["Krovak","krovak"];t.default={init:i,forward:o,inverse:a,names:s}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return p}),r.d(t,"forward",function(){return d}),r.d(t,"inverse",function(){return y}),r.d(t,"names",function(){return g});var n=r(61),i=r(62),o=r(63),a=r(64),s=r(65),u=r(75),l=r(7),c=r(44),f=r(76),h=r(5);function p(){this.sphere||(this.e0=Object(i.default)(this.es),this.e1=Object(o.default)(this.es),this.e2=Object(a.default)(this.es),this.e3=Object(s.default)(this.es),this.ml0=this.a*Object(n.default)(this.e0,this.e1,this.e2,this.e3,this.lat0))}function d(e){var t,r,i=e.x,o=e.y;if(i=Object(l.default)(i-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(o)*Math.sin(i)),r=this.a*(Math.atan2(Math.tan(o),Math.cos(i))-this.lat0);else{var a=Math.sin(o),s=Math.cos(o),c=Object(u.default)(this.a,this.e,a),f=Math.tan(o)*Math.tan(o),h=i*Math.cos(o),p=h*h,d=this.es*s*s/(1-this.es);t=c*h*(1-p*f*(1/6-(8-f+8*d)*p/120)),r=this.a*Object(n.default)(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+c*a/s*p*(.5+(5-f+6*d)*p/24)}return e.x=t+this.x0,e.y=r+this.y0,e}function y(e){e.x-=this.x0,e.y-=this.y0;var t,r,n=e.x/this.a,i=e.y/this.a;if(this.sphere){var o=i+this.lat0;t=Math.asin(Math.sin(o)*Math.cos(n)),r=Math.atan2(Math.tan(n),Math.cos(o))}else{var a=this.ml0/this.a+i,s=Object(f.default)(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-h.HALF_PI)<=h.EPSLN)return e.x=this.long0,e.y=h.HALF_PI,i<0&&(e.y*=-1),e;var p=Object(u.default)(this.a,this.e,Math.sin(s)),d=p*p*p/this.a/this.a*(1-this.es),y=Math.pow(Math.tan(s),2),g=n*this.a/p,v=g*g;t=s-p*Math.tan(s)/d*g*g*(.5-(1+3*y)*g*g/24),r=g*(1-v*(y/3+(1+3*y)*y*v/15))/Math.cos(s)}return e.x=Object(l.default)(r+this.long0),e.y=Object(c.default)(t),e}var g=["Cassini","Cassini_Soldner","cass"];t.default={init:p,forward:d,inverse:y,names:g}},function(e,t,r){"use strict";r.r(t),r.d(t,"S_POLE",function(){return a}),r.d(t,"N_POLE",function(){return s}),r.d(t,"EQUIT",function(){return u}),r.d(t,"OBLIQ",function(){return l}),r.d(t,"init",function(){return c}),r.d(t,"forward",function(){return f}),r.d(t,"inverse",function(){return h}),r.d(t,"names",function(){return _});var n=r(5),i=r(77),o=r(7),a=1,s=2,u=3,l=4;function c(){var e,t=Math.abs(this.lat0);if(Math.abs(t-n.HALF_PI)<n.EPSLN?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(t)<n.EPSLN?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=Object(i.default)(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(e){var t,r=[];return r[0]=e*p,t=e*e,r[0]+=t*d,r[1]=t*g,t*=e,r[0]+=t*y,r[1]+=t*v,r[2]=t*m,r}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=Object(i.default)(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function f(e){var t,r,a,s,u,l,c,f,h,p,d=e.x,y=e.y;if(d=Object(o.default)(d-this.long0),this.sphere){if(u=Math.sin(y),p=Math.cos(y),a=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((r=this.mode===this.EQUIT?1+p*a:1+this.sinph0*u+this.cosph0*p*a)<=n.EPSLN)return null;t=(r=Math.sqrt(2/r))*p*Math.sin(d),r*=this.mode===this.EQUIT?u:this.cosph0*u-this.sinph0*p*a}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(a=-a),Math.abs(y+this.lat0)<n.EPSLN)return null;r=n.FORTPI-.5*y,t=(r=2*(this.mode===this.S_POLE?Math.cos(r):Math.sin(r)))*Math.sin(d),r*=a}}else{switch(c=0,f=0,h=0,a=Math.cos(d),s=Math.sin(d),u=Math.sin(y),l=Object(i.default)(this.e,u),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(c=l/this.qp,f=Math.sqrt(1-c*c)),this.mode){case this.OBLIQ:h=1+this.sinb1*c+this.cosb1*f*a;break;case this.EQUIT:h=1+f*a;break;case this.N_POLE:h=n.HALF_PI+y,l=this.qp-l;break;case this.S_POLE:h=y-n.HALF_PI,l=this.qp+l}if(Math.abs(h)<n.EPSLN)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:h=Math.sqrt(2/h),r=this.mode===this.OBLIQ?this.ymf*h*(this.cosb1*c-this.sinb1*f*a):(h=Math.sqrt(2/(1+f*a)))*c*this.ymf,t=this.xmf*h*f*s;break;case this.N_POLE:case this.S_POLE:l>=0?(t=(h=Math.sqrt(l))*s,r=a*(this.mode===this.S_POLE?h:-h)):t=r=0}}return e.x=this.a*t+this.x0,e.y=this.a*r+this.y0,e}function h(e){e.x-=this.x0,e.y-=this.y0;var t,r,i,a,s,u,l,c=e.x/this.a,f=e.y/this.a;if(this.sphere){var h,p=0,d=0;if((r=.5*(h=Math.sqrt(c*c+f*f)))>1)return null;switch(r=2*Math.asin(r),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(d=Math.sin(r),p=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(h)<=n.EPSLN?0:Math.asin(f*d/h),c*=d,f=p*h;break;case this.OBLIQ:r=Math.abs(h)<=n.EPSLN?this.lat0:Math.asin(p*this.sinph0+f*d*this.cosph0/h),c*=d*this.cosph0,f=(p-Math.sin(r)*this.sinph0)*h;break;case this.N_POLE:f=-f,r=n.HALF_PI-r;break;case this.S_POLE:r-=n.HALF_PI}t=0!==f||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(c,f):0}else{if(l=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(c/=this.dd,f*=this.dd,(u=Math.sqrt(c*c+f*f))<n.EPSLN)return e.x=this.long0,e.y=this.lat0,e;a=2*Math.asin(.5*u/this.rq),i=Math.cos(a),c*=a=Math.sin(a),this.mode===this.OBLIQ?(l=i*this.sinb1+f*a*this.cosb1/u,s=this.qp*l,f=u*this.cosb1*i-f*this.sinb1*a):(l=f*a/u,s=this.qp*l,f=u*i)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(f=-f),!(s=c*c+f*f))return e.x=this.long0,e.y=this.lat0,e;l=1-s/this.qp,this.mode===this.S_POLE&&(l=-l)}t=Math.atan2(c,f),r=function(e,t){var r=e+e;return e+t[0]*Math.sin(r)+t[1]*Math.sin(r+r)+t[2]*Math.sin(r+r+r)}(Math.asin(l),this.apa)}return e.x=Object(o.default)(this.long0+t),e.y=r,e}var p=.3333333333333333,d=.17222222222222222,y=.10257936507936508,g=.06388888888888888,v=.0664021164021164,m=.016415012942191543;var _=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];t.default={init:c,forward:f,inverse:h,names:_,S_POLE:a,N_POLE:s,EQUIT:u,OBLIQ:l}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return u}),r.d(t,"forward",function(){return l}),r.d(t,"inverse",function(){return c}),r.d(t,"phi1z",function(){return f}),r.d(t,"names",function(){return h});var n=r(35),i=r(77),o=r(7),a=r(36),s=r(5);function u(){Math.abs(this.lat1+this.lat2)<s.EPSLN||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=Object(n.default)(this.e3,this.sin_po,this.cos_po),this.qs1=Object(i.default)(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=Object(n.default)(this.e3,this.sin_po,this.cos_po),this.qs2=Object(i.default)(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Object(i.default)(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>s.EPSLN?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function l(e){var t=e.x,r=e.y;this.sin_phi=Math.sin(r),this.cos_phi=Math.cos(r);var n=Object(i.default)(this.e3,this.sin_phi),a=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,s=this.ns0*Object(o.default)(t-this.long0),u=a*Math.sin(s)+this.x0,l=this.rh-a*Math.cos(s)+this.y0;return e.x=u,e.y=l,e}function c(e){var t,r,n,i,a,s;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),n=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1),i=0,0!==t&&(i=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?s=Math.asin((this.c-n*n)/(2*this.ns0)):(r=(this.c-n*n)/this.ns0,s=this.phi1z(this.e3,r)),a=Object(o.default)(i/this.ns0+this.long0),e.x=a,e.y=s,e}function f(e,t){var r,n,i,o,u,l=Object(a.default)(.5*t);if(e<s.EPSLN)return l;for(var c=e*e,f=1;f<=25;f++)if(r=Math.sin(l),n=Math.cos(l),l+=u=.5*(o=1-(i=e*r)*i)*o/n*(t/(1-c)-r/o+.5/e*Math.log((1-i)/(1+i))),Math.abs(u)<=1e-7)return l;return null}var h=["Albers_Conic_Equal_Area","Albers","aea"];t.default={init:u,forward:l,inverse:c,names:h,phi1z:f}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return a}),r.d(t,"forward",function(){return s}),r.d(t,"inverse",function(){return u}),r.d(t,"names",function(){return l});var n=r(7),i=r(36),o=r(5);function a(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function s(e){var t,r,i,a,s,u,l,c=e.x,f=e.y;return i=Object(n.default)(c-this.long0),t=Math.sin(f),r=Math.cos(f),a=Math.cos(i),1,(s=this.sin_p14*t+this.cos_p14*r*a)>0||Math.abs(s)<=o.EPSLN?(u=this.x0+1*this.a*r*Math.sin(i)/s,l=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*r*a)/s):(u=this.x0+this.infinity_dist*r*Math.sin(i),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*r*a)),e.x=u,e.y=l,e}function u(e){var t,r,o,a,s,u;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(a=Math.atan2(t,this.rc),r=Math.sin(a),o=Math.cos(a),u=Object(i.default)(o*this.sin_p14+e.y*r*this.cos_p14/t),s=Math.atan2(e.x*r,t*this.cos_p14*o-e.y*this.sin_p14*r),s=Object(n.default)(this.long0+s)):(u=this.phic0,s=0),e.x=s,e.y=u,e}var l=["gnom"];t.default={init:a,forward:s,inverse:u,names:l}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return s}),r.d(t,"forward",function(){return u}),r.d(t,"inverse",function(){return l}),r.d(t,"names",function(){return c});var n=r(7),i=r(77),o=r(35),a=r(222);function s(){this.sphere||(this.k0=Object(o.default)(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function u(e){var t,r,o=e.x,a=e.y,s=Object(n.default)(o-this.long0);if(this.sphere)t=this.x0+this.a*s*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(a)/Math.cos(this.lat_ts);else{var u=Object(i.default)(this.e,Math.sin(a));t=this.x0+this.a*this.k0*s,r=this.y0+this.a*u*.5/this.k0}return e.x=t,e.y=r,e}function l(e){var t,r;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=Object(n.default)(this.long0+e.x/this.a/Math.cos(this.lat_ts)),r=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(r=Object(a.default)(this.e,2*e.y*this.k0/this.a),t=Object(n.default)(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=r,e}var c=["cea"];t.default={init:s,forward:u,inverse:l,names:c}},function(e,t,r){"use strict";r.r(t);var n=r(5);t.default=function(e,t){var r=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-r)<1e-6)return t<0?-1*n.HALF_PI:n.HALF_PI;for(var i,o,a,s,u=Math.asin(.5*t),l=0;l<30;l++)if(o=Math.sin(u),a=Math.cos(u),s=e*o,u+=i=Math.pow(1-s*s,2)/(2*a)*(t/(1-e*e)-o/(1-s*s)+.5/e*Math.log((1-s)/(1+s))),Math.abs(i)<=1e-10)return u;return NaN}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return o}),r.d(t,"forward",function(){return a}),r.d(t,"inverse",function(){return s}),r.d(t,"names",function(){return u});var n=r(7),i=r(44);function o(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function a(e){var t=e.x,r=e.y,o=Object(n.default)(t-this.long0),a=Object(i.default)(r-this.lat0);return e.x=this.x0+this.a*o*this.rc,e.y=this.y0+this.a*a,e}function s(e){var t=e.x,r=e.y;return e.x=Object(n.default)(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=Object(i.default)(this.lat0+(r-this.y0)/this.a),e}var u=["Equirectangular","Equidistant_Cylindrical","eqc"];t.default={init:o,forward:a,inverse:s,names:u}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return p}),r.d(t,"forward",function(){return d}),r.d(t,"inverse",function(){return y}),r.d(t,"names",function(){return g});var n=r(62),i=r(63),o=r(64),a=r(65),s=r(7),u=r(44),l=r(61),c=r(5),f=r(75),h=20;function p(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Object(n.default)(this.es),this.e1=Object(i.default)(this.es),this.e2=Object(o.default)(this.es),this.e3=Object(a.default)(this.es),this.ml0=this.a*Object(l.default)(this.e0,this.e1,this.e2,this.e3,this.lat0)}function d(e){var t,r,n,i=e.x,o=e.y,a=Object(s.default)(i-this.long0);if(n=a*Math.sin(o),this.sphere)Math.abs(o)<=c.EPSLN?(t=this.a*a,r=-1*this.a*this.lat0):(t=this.a*Math.sin(n)/Math.tan(o),r=this.a*(Object(u.default)(o-this.lat0)+(1-Math.cos(n))/Math.tan(o)));else if(Math.abs(o)<=c.EPSLN)t=this.a*a,r=-1*this.ml0;else{var h=Object(f.default)(this.a,this.e,Math.sin(o))/Math.tan(o);t=h*Math.sin(n),r=this.a*Object(l.default)(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+h*(1-Math.cos(n))}return e.x=t+this.x0,e.y=r+this.y0,e}function y(e){var t,r,n,i,o,a,u,f,p;if(n=e.x-this.x0,i=e.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=c.EPSLN)t=Object(s.default)(n/this.a+this.long0),r=0;else{var d;for(a=this.lat0+i/this.a,u=n*n/this.a/this.a+a*a,f=a,o=h;o;--o)if(f+=p=-1*(a*(f*(d=Math.tan(f))+1)-f-.5*(f*f+u)*d)/((f-a)/d-1),Math.abs(p)<=c.EPSLN){r=f;break}t=Object(s.default)(this.long0+Math.asin(n*Math.tan(f)/this.a)/Math.sin(r))}else if(Math.abs(i+this.ml0)<=c.EPSLN)r=0,t=Object(s.default)(this.long0+n/this.a);else{var y,g,v,m,_;for(a=(this.ml0+i)/this.a,u=n*n/this.a/this.a+a*a,f=a,o=h;o;--o)if(_=this.e*Math.sin(f),y=Math.sqrt(1-_*_)*Math.tan(f),g=this.a*Object(l.default)(this.e0,this.e1,this.e2,this.e3,f),v=this.e0-2*this.e1*Math.cos(2*f)+4*this.e2*Math.cos(4*f)-6*this.e3*Math.cos(6*f),f-=p=(a*(y*(m=g/this.a)+1)-m-.5*y*(m*m+u))/(this.es*Math.sin(2*f)*(m*m+u-2*a*m)/(4*y)+(a-m)*(y*v-2/Math.sin(2*f))-v),Math.abs(p)<=c.EPSLN){r=f;break}y=Math.sqrt(1-this.es*Math.pow(Math.sin(r),2))*Math.tan(r),t=Object(s.default)(this.long0+Math.asin(n*y/this.a)/Math.sin(r))}return e.x=t,e.y=r,e}var g=["Polyconic","poly"];t.default={init:p,forward:d,inverse:y,names:g}},function(e,t,r){"use strict";r.r(t),r.d(t,"iterations",function(){return i}),r.d(t,"init",function(){return o}),r.d(t,"forward",function(){return a}),r.d(t,"inverse",function(){return s}),r.d(t,"names",function(){return u});var n=r(5),i=1;function o(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function a(e){var t,r=e.x,i=e.y-this.lat0,o=r-this.long0,a=i/n.SEC_TO_RAD*1e-5,s=o,u=1,l=0;for(t=1;t<=10;t++)u*=a,l+=this.A[t]*u;var c,f=l,h=s,p=1,d=0,y=0,g=0;for(t=1;t<=6;t++)c=d*f+p*h,p=p*f-d*h,d=c,y=y+this.B_re[t]*p-this.B_im[t]*d,g=g+this.B_im[t]*p+this.B_re[t]*d;return e.x=g*this.a+this.x0,e.y=y*this.a+this.y0,e}function s(e){var t,r,i=e.x,o=e.y,a=i-this.x0,s=(o-this.y0)/this.a,u=a/this.a,l=1,c=0,f=0,h=0;for(t=1;t<=6;t++)r=c*s+l*u,l=l*s-c*u,c=r,f=f+this.C_re[t]*l-this.C_im[t]*c,h=h+this.C_im[t]*l+this.C_re[t]*c;for(var p=0;p<this.iterations;p++){var d,y=f,g=h,v=s,m=u;for(t=2;t<=6;t++)d=g*f+y*h,y=y*f-g*h,g=d,v+=(t-1)*(this.B_re[t]*y-this.B_im[t]*g),m+=(t-1)*(this.B_im[t]*y+this.B_re[t]*g);y=1,g=0;var _=this.B_re[1],b=this.B_im[1];for(t=2;t<=6;t++)d=g*f+y*h,y=y*f-g*h,g=d,_+=t*(this.B_re[t]*y-this.B_im[t]*g),b+=t*(this.B_im[t]*y+this.B_re[t]*g);var S=_*_+b*b;f=(v*_+m*b)/S,h=(m*_-v*b)/S}var x=f,w=h,O=1,P=0;for(t=1;t<=9;t++)O*=x,P+=this.D[t]*O;var E=this.lat0+P*n.SEC_TO_RAD*1e5,k=this.long0+w;return e.x=k,e.y=E,e}var u=["New_Zealand_Map_Grid","nzmg"];t.default={init:o,forward:a,inverse:s,names:u}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return i}),r.d(t,"forward",function(){return o}),r.d(t,"inverse",function(){return a}),r.d(t,"names",function(){return s});var n=r(7);function i(){}function o(e){var t=e.x,r=e.y,i=Object(n.default)(t-this.long0),o=this.x0+this.a*i,a=this.y0+this.a*Math.log(Math.tan(Math.PI/4+r/2.5))*1.25;return e.x=o,e.y=a,e}function a(e){e.x-=this.x0,e.y-=this.y0;var t=Object(n.default)(this.long0+e.x/this.a),r=2.5*(Math.atan(Math.exp(.8*e.y/this.a))-Math.PI/4);return e.x=t,e.y=r,e}var s=["Miller_Cylindrical","mill"];t.default={init:i,forward:o,inverse:a,names:s}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return f}),r.d(t,"forward",function(){return h}),r.d(t,"inverse",function(){return p}),r.d(t,"names",function(){return d});var n=r(7),i=r(44),o=r(108),a=r(74),s=r(109),u=r(5),l=r(36),c=20;function f(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Object(o.default)(this.es)}function h(e){var t,r,i=e.x,o=e.y;if(i=Object(n.default)(i-this.long0),this.sphere){if(this.m)for(var s=this.n*Math.sin(o),l=c;l;--l){var f=(this.m*o+Math.sin(o)-s)/(this.m+Math.cos(o));if(o-=f,Math.abs(f)<u.EPSLN)break}else o=1!==this.n?Math.asin(this.n*Math.sin(o)):o;t=this.a*this.C_x*i*(this.m+Math.cos(o)),r=this.a*this.C_y*o}else{var h=Math.sin(o),p=Math.cos(o);r=this.a*Object(a.default)(o,h,p,this.en),t=this.a*i*p/Math.sqrt(1-this.es*h*h)}return e.x=t,e.y=r,e}function p(e){var t,r,o,a;return e.x-=this.x0,o=e.x/this.a,e.y-=this.y0,t=e.y/this.a,this.sphere?(t/=this.C_y,o/=this.C_x*(this.m+Math.cos(t)),this.m?t=Object(l.default)((this.m*t+Math.sin(t))/this.n):1!==this.n&&(t=Object(l.default)(Math.sin(t)/this.n)),o=Object(n.default)(o+this.long0),t=Object(i.default)(t)):(t=Object(s.default)(e.y/this.a,this.es,this.en),(a=Math.abs(t))<u.HALF_PI?(a=Math.sin(t),r=this.long0+e.x*Math.sqrt(1-this.es*a*a)/(this.a*Math.cos(t)),o=Object(n.default)(r)):a-u.EPSLN<u.HALF_PI&&(o=this.long0)),e.x=o,e.y=t,e}var d=["Sinusoidal","sinu"];t.default={init:f,forward:h,inverse:p,names:d}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return o}),r.d(t,"forward",function(){return a}),r.d(t,"inverse",function(){return s}),r.d(t,"names",function(){return u});var n=r(7),i=r(5);function o(){}function a(e){for(var t=e.x,r=e.y,o=Object(n.default)(t-this.long0),a=r,s=Math.PI*Math.sin(r);;){var u=-(a+Math.sin(a)-s)/(1+Math.cos(a));if(a+=u,Math.abs(u)<i.EPSLN)break}a/=2,Math.PI/2-Math.abs(r)<i.EPSLN&&(o=0);var l=.900316316158*this.a*o*Math.cos(a)+this.x0,c=1.4142135623731*this.a*Math.sin(a)+this.y0;return e.x=l,e.y=c,e}function s(e){var t,r;e.x-=this.x0,e.y-=this.y0,r=e.y/(1.4142135623731*this.a),Math.abs(r)>.999999999999&&(r=.999999999999),t=Math.asin(r);var i=Object(n.default)(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));i<-Math.PI&&(i=-Math.PI),i>Math.PI&&(i=Math.PI),r=(2*t+Math.sin(2*t))/Math.PI,Math.abs(r)>1&&(r=1);var o=Math.asin(r);return e.x=i,e.y=o,e}var u=["Mollweide","moll"];t.default={init:o,forward:a,inverse:s,names:u}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return p}),r.d(t,"forward",function(){return d}),r.d(t,"inverse",function(){return y}),r.d(t,"names",function(){return g});var n=r(62),i=r(63),o=r(64),a=r(65),s=r(35),u=r(61),l=r(7),c=r(44),f=r(76),h=r(5);function p(){Math.abs(this.lat1+this.lat2)<h.EPSLN||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Object(n.default)(this.es),this.e1=Object(i.default)(this.es),this.e2=Object(o.default)(this.es),this.e3=Object(a.default)(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=Object(s.default)(this.e,this.sinphi,this.cosphi),this.ml1=Object(u.default)(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<h.EPSLN?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=Object(s.default)(this.e,this.sinphi,this.cosphi),this.ml2=Object(u.default)(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Object(u.default)(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function d(e){var t,r=e.x,n=e.y;if(this.sphere)t=this.a*(this.g-n);else{var i=Object(u.default)(this.e0,this.e1,this.e2,this.e3,n);t=this.a*(this.g-i)}var o=this.ns*Object(l.default)(r-this.long0),a=this.x0+t*Math.sin(o),s=this.y0+this.rh-t*Math.cos(o);return e.x=a,e.y=s,e}function y(e){var t,r,n,i;e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns>=0?(r=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(r=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var o=0;if(0!==r&&(o=Math.atan2(t*e.x,t*e.y)),this.sphere)return i=Object(l.default)(this.long0+o/this.ns),n=Object(c.default)(this.g-r/this.a),e.x=i,e.y=n,e;var a=this.g-r/this.a;return n=Object(f.default)(a,this.e0,this.e1,this.e2,this.e3),i=Object(l.default)(this.long0+o/this.ns),e.x=i,e.y=n,e}var g=["Equidistant_Conic","eqdc"];t.default={init:p,forward:d,inverse:y,names:g}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return a}),r.d(t,"forward",function(){return s}),r.d(t,"inverse",function(){return u}),r.d(t,"names",function(){return l});var n=r(7),i=r(5),o=r(36);function a(){this.R=this.a}function s(e){var t,r,a=e.x,s=e.y,u=Object(n.default)(a-this.long0);Math.abs(s)<=i.EPSLN&&(t=this.x0+this.R*u,r=this.y0);var l=Object(o.default)(2*Math.abs(s/Math.PI));(Math.abs(u)<=i.EPSLN||Math.abs(Math.abs(s)-i.HALF_PI)<=i.EPSLN)&&(t=this.x0,r=s>=0?this.y0+Math.PI*this.R*Math.tan(.5*l):this.y0+Math.PI*this.R*-Math.tan(.5*l));var c=.5*Math.abs(Math.PI/u-u/Math.PI),f=c*c,h=Math.sin(l),p=Math.cos(l),d=p/(h+p-1),y=d*d,g=d*(2/h-1),v=g*g,m=Math.PI*this.R*(c*(d-v)+Math.sqrt(f*(d-v)*(d-v)-(v+f)*(y-v)))/(v+f);u<0&&(m=-m),t=this.x0+m;var _=f+d;return m=Math.PI*this.R*(g*_-c*Math.sqrt((v+f)*(f+1)-_*_))/(v+f),r=s>=0?this.y0+m:this.y0-m,e.x=t,e.y=r,e}function u(e){var t,r,o,a,s,u,l,c,f,h,p,d;return e.x-=this.x0,e.y-=this.y0,p=Math.PI*this.R,s=(o=e.x/p)*o+(a=e.y/p)*a,p=3*(a*a/(c=-2*(u=-Math.abs(a)*(1+s))+1+2*a*a+s*s)+(2*(l=u-2*a*a+o*o)*l*l/c/c/c-9*u*l/c/c)/27)/(f=(u-l*l/3/c)/c)/(h=2*Math.sqrt(-f/3)),Math.abs(p)>1&&(p=p>=0?1:-1),d=Math.acos(p)/3,r=e.y>=0?(-h*Math.cos(d+Math.PI/3)-l/3/c)*Math.PI:-(-h*Math.cos(d+Math.PI/3)-l/3/c)*Math.PI,t=Math.abs(o)<i.EPSLN?this.long0:Object(n.default)(this.long0+Math.PI*(s-1+Math.sqrt(1+2*(o*o-a*a)+s*s))/2/o),e.x=t,e.y=r,e}var l=["Van_der_Grinten_I","VanDerGrinten","vandg"];t.default={init:a,forward:s,inverse:u,names:l}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return p}),r.d(t,"forward",function(){return d}),r.d(t,"inverse",function(){return y}),r.d(t,"names",function(){return g});var n=r(7),i=r(5),o=r(61),a=r(62),s=r(63),u=r(64),l=r(65),c=r(75),f=r(36),h=r(76);function p(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function d(e){var t,r,f,h,p,d,y,g,v,m,_,b,S,x,w,O,P,E,k,T,M,I,L=e.x,C=e.y,N=Math.sin(e.y),R=Math.cos(e.y),j=Object(n.default)(L-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=i.EPSLN?(e.x=this.x0+this.a*(i.HALF_PI-C)*Math.sin(j),e.y=this.y0-this.a*(i.HALF_PI-C)*Math.cos(j),e):Math.abs(this.sin_p12+1)<=i.EPSLN?(e.x=this.x0+this.a*(i.HALF_PI+C)*Math.sin(j),e.y=this.y0+this.a*(i.HALF_PI+C)*Math.cos(j),e):(E=this.sin_p12*N+this.cos_p12*R*Math.cos(j),P=(O=Math.acos(E))?O/Math.sin(O):1,e.x=this.x0+this.a*P*R*Math.sin(j),e.y=this.y0+this.a*P*(this.cos_p12*N-this.sin_p12*R*Math.cos(j)),e):(t=Object(a.default)(this.es),r=Object(s.default)(this.es),f=Object(u.default)(this.es),h=Object(l.default)(this.es),Math.abs(this.sin_p12-1)<=i.EPSLN?(p=this.a*Object(o.default)(t,r,f,h,i.HALF_PI),d=this.a*Object(o.default)(t,r,f,h,C),e.x=this.x0+(p-d)*Math.sin(j),e.y=this.y0-(p-d)*Math.cos(j),e):Math.abs(this.sin_p12+1)<=i.EPSLN?(p=this.a*Object(o.default)(t,r,f,h,i.HALF_PI),d=this.a*Object(o.default)(t,r,f,h,C),e.x=this.x0+(p+d)*Math.sin(j),e.y=this.y0+(p+d)*Math.cos(j),e):(y=N/R,g=Object(c.default)(this.a,this.e,this.sin_p12),v=Object(c.default)(this.a,this.e,N),m=Math.atan((1-this.es)*y+this.es*g*this.sin_p12/(v*R)),k=0===(_=Math.atan2(Math.sin(j),this.cos_p12*Math.tan(m)-this.sin_p12*Math.cos(j)))?Math.asin(this.cos_p12*Math.sin(m)-this.sin_p12*Math.cos(m)):Math.abs(Math.abs(_)-Math.PI)<=i.EPSLN?-Math.asin(this.cos_p12*Math.sin(m)-this.sin_p12*Math.cos(m)):Math.asin(Math.sin(j)*Math.cos(m)/Math.sin(_)),b=this.e*this.sin_p12/Math.sqrt(1-this.es),O=g*k*(1-(T=k*k)*(w=(S=this.e*this.cos_p12*Math.cos(_)/Math.sqrt(1-this.es))*S)*(1-w)/6+(M=T*k)/8*(x=b*S)*(1-2*w)+(I=M*k)/120*(w*(4-7*w)-3*b*b*(1-7*w))-I*k/48*x),e.x=this.x0+O*Math.sin(_),e.y=this.y0+O*Math.cos(_),e))}function y(e){var t,r,p,d,y,g,v,m,_,b,S,x,w,O,P,E,k,T,M,I,L,C,N,R;if(e.x-=this.x0,e.y-=this.y0,this.sphere){if((t=Math.sqrt(e.x*e.x+e.y*e.y))>2*i.HALF_PI*this.a)return;return r=t/this.a,p=Math.sin(r),d=Math.cos(r),y=this.long0,Math.abs(t)<=i.EPSLN?g=this.lat0:(g=Object(f.default)(d*this.sin_p12+e.y*p*this.cos_p12/t),v=Math.abs(this.lat0)-i.HALF_PI,y=Math.abs(v)<=i.EPSLN?this.lat0>=0?Object(n.default)(this.long0+Math.atan2(e.x,-e.y)):Object(n.default)(this.long0-Math.atan2(-e.x,e.y)):Object(n.default)(this.long0+Math.atan2(e.x*p,t*this.cos_p12*d-e.y*this.sin_p12*p))),e.x=y,e.y=g,e}return m=Object(a.default)(this.es),_=Object(s.default)(this.es),b=Object(u.default)(this.es),S=Object(l.default)(this.es),Math.abs(this.sin_p12-1)<=i.EPSLN?(w=(x=this.a*Object(o.default)(m,_,b,S,i.HALF_PI))-(t=Math.sqrt(e.x*e.x+e.y*e.y)),g=Object(h.default)(w/this.a,m,_,b,S),y=Object(n.default)(this.long0+Math.atan2(e.x,-1*e.y)),e.x=y,e.y=g,e):Math.abs(this.sin_p12+1)<=i.EPSLN?(x=this.a*Object(o.default)(m,_,b,S,i.HALF_PI),w=(t=Math.sqrt(e.x*e.x+e.y*e.y))-x,g=Object(h.default)(w/this.a,m,_,b,S),y=Object(n.default)(this.long0+Math.atan2(e.x,e.y)),e.x=y,e.y=g,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),E=Math.atan2(e.x,e.y),O=Object(c.default)(this.a,this.e,this.sin_p12),k=Math.cos(E),M=-(T=this.e*this.cos_p12*k)*T/(1-this.es),I=3*this.es*(1-M)*this.sin_p12*this.cos_p12*k/(1-this.es),N=1-M*(C=(L=t/O)-M*(1+M)*Math.pow(L,3)/6-I*(1+3*M)*Math.pow(L,4)/24)*C/2-L*C*C*C/6,P=Math.asin(this.sin_p12*Math.cos(C)+this.cos_p12*Math.sin(C)*k),y=Object(n.default)(this.long0+Math.asin(Math.sin(E)*Math.sin(C)/Math.cos(P))),R=Math.sin(P),g=Math.atan2((R-this.es*N*this.sin_p12)*Math.tan(P),R*(1-this.es)),e.x=y,e.y=g,e)}var g=["Azimuthal_Equidistant","aeqd"];t.default={init:p,forward:d,inverse:y,names:g}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return a}),r.d(t,"forward",function(){return s}),r.d(t,"inverse",function(){return u}),r.d(t,"names",function(){return l});var n=r(7),i=r(36),o=r(5);function a(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function s(e){var t,r,i,a,s,u,l,c=e.x,f=e.y;return i=Object(n.default)(c-this.long0),t=Math.sin(f),r=Math.cos(f),a=Math.cos(i),1,((s=this.sin_p14*t+this.cos_p14*r*a)>0||Math.abs(s)<=o.EPSLN)&&(u=1*this.a*r*Math.sin(i),l=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*r*a)),e.x=u,e.y=l,e}function u(e){var t,r,a,s,u,l,c;return e.x-=this.x0,e.y-=this.y0,t=Math.sqrt(e.x*e.x+e.y*e.y),r=Object(i.default)(t/this.a),a=Math.sin(r),s=Math.cos(r),l=this.long0,Math.abs(t)<=o.EPSLN?(c=this.lat0,e.x=l,e.y=c,e):(c=Object(i.default)(s*this.sin_p14+e.y*a*this.cos_p14/t),u=Math.abs(this.lat0)-o.HALF_PI,Math.abs(u)<=o.EPSLN?(l=this.lat0>=0?Object(n.default)(this.long0+Math.atan2(e.x,-e.y)):Object(n.default)(this.long0-Math.atan2(-e.x,e.y)),e.x=l,e.y=c,e):(l=Object(n.default)(this.long0+Math.atan2(e.x*a,t*this.cos_p14*s-e.y*this.sin_p14*a)),e.x=l,e.y=c,e))}var l=["ortho"];t.default={init:a,forward:s,inverse:u,names:l}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return a}),r.d(t,"forward",function(){return s}),r.d(t,"inverse",function(){return u}),r.d(t,"names",function(){return f});var n=r(5),i={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},o={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function a(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=n.HALF_PI-n.FORTPI/2?this.face=i.TOP:this.lat0<=-(n.HALF_PI-n.FORTPI/2)?this.face=i.BOTTOM:Math.abs(this.long0)<=n.FORTPI?this.face=i.FRONT:Math.abs(this.long0)<=n.HALF_PI+n.FORTPI?this.face=this.long0>0?i.RIGHT:i.LEFT:this.face=i.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function s(e){var t,r,a,s,u,f,h={x:0,y:0},p={value:0};if(e.x-=this.long0,t=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(e.y)):e.y,r=e.x,this.face===i.TOP)s=n.HALF_PI-t,r>=n.FORTPI&&r<=n.HALF_PI+n.FORTPI?(p.value=o.AREA_0,a=r-n.HALF_PI):r>n.HALF_PI+n.FORTPI||r<=-(n.HALF_PI+n.FORTPI)?(p.value=o.AREA_1,a=r>0?r-n.SPI:r+n.SPI):r>-(n.HALF_PI+n.FORTPI)&&r<=-n.FORTPI?(p.value=o.AREA_2,a=r+n.HALF_PI):(p.value=o.AREA_3,a=r);else if(this.face===i.BOTTOM)s=n.HALF_PI+t,r>=n.FORTPI&&r<=n.HALF_PI+n.FORTPI?(p.value=o.AREA_0,a=-r+n.HALF_PI):r<n.FORTPI&&r>=-n.FORTPI?(p.value=o.AREA_1,a=-r):r<-n.FORTPI&&r>=-(n.HALF_PI+n.FORTPI)?(p.value=o.AREA_2,a=-r-n.HALF_PI):(p.value=o.AREA_3,a=r>0?-r+n.SPI:-r-n.SPI);else{var d,y,g,v,m,_;this.face===i.RIGHT?r=c(r,+n.HALF_PI):this.face===i.BACK?r=c(r,+n.SPI):this.face===i.LEFT&&(r=c(r,-n.HALF_PI)),v=Math.sin(t),m=Math.cos(t),_=Math.sin(r),d=m*Math.cos(r),y=m*_,g=v,this.face===i.FRONT?a=l(s=Math.acos(d),g,y,p):this.face===i.RIGHT?a=l(s=Math.acos(y),g,-d,p):this.face===i.BACK?a=l(s=Math.acos(-d),g,-y,p):this.face===i.LEFT?a=l(s=Math.acos(-y),g,d,p):(s=a=0,p.value=o.AREA_0)}return f=Math.atan(12/n.SPI*(a+Math.acos(Math.sin(a)*Math.cos(n.FORTPI))-n.HALF_PI)),u=Math.sqrt((1-Math.cos(s))/(Math.cos(f)*Math.cos(f))/(1-Math.cos(Math.atan(1/Math.cos(a))))),p.value===o.AREA_1?f+=n.HALF_PI:p.value===o.AREA_2?f+=n.SPI:p.value===o.AREA_3&&(f+=1.5*n.SPI),h.x=u*Math.cos(f),h.y=u*Math.sin(f),h.x=h.x*this.a+this.x0,h.y=h.y*this.a+this.y0,e.x=h.x,e.y=h.y,e}function u(e){var t,r,a,s,u,l,f,h,p,d,y,g,v={lam:0,phi:0},m={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,r=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),t=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?m.value=o.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(m.value=o.AREA_1,t-=n.HALF_PI):e.x<0&&-e.x>=Math.abs(e.y)?(m.value=o.AREA_2,t=t<0?t+n.SPI:t-n.SPI):(m.value=o.AREA_3,t+=n.HALF_PI),p=n.SPI/12*Math.tan(t),u=Math.sin(p)/(Math.cos(p)-1/Math.sqrt(2)),l=Math.atan(u),(f=1-(a=Math.cos(t))*a*(s=Math.tan(r))*s*(1-Math.cos(Math.atan(1/Math.cos(l)))))<-1?f=-1:f>1&&(f=1),this.face===i.TOP)h=Math.acos(f),v.phi=n.HALF_PI-h,m.value===o.AREA_0?v.lam=l+n.HALF_PI:m.value===o.AREA_1?v.lam=l<0?l+n.SPI:l-n.SPI:m.value===o.AREA_2?v.lam=l-n.HALF_PI:v.lam=l;else if(this.face===i.BOTTOM)h=Math.acos(f),v.phi=h-n.HALF_PI,m.value===o.AREA_0?v.lam=-l+n.HALF_PI:m.value===o.AREA_1?v.lam=-l:m.value===o.AREA_2?v.lam=-l-n.HALF_PI:v.lam=l<0?-l-n.SPI:-l+n.SPI;else{var _,b,S;p=(_=f)*_,b=(p+=(S=p>=1?0:Math.sqrt(1-p)*Math.sin(l))*S)>=1?0:Math.sqrt(1-p),m.value===o.AREA_1?(p=b,b=-S,S=p):m.value===o.AREA_2?(b=-b,S=-S):m.value===o.AREA_3&&(p=b,b=S,S=-p),this.face===i.RIGHT?(p=_,_=-b,b=p):this.face===i.BACK?(_=-_,b=-b):this.face===i.LEFT&&(p=_,_=b,b=-p),v.phi=Math.acos(-S)-n.HALF_PI,v.lam=Math.atan2(b,_),this.face===i.RIGHT?v.lam=c(v.lam,-n.HALF_PI):this.face===i.BACK?v.lam=c(v.lam,-n.SPI):this.face===i.LEFT&&(v.lam=c(v.lam,+n.HALF_PI))}0!==this.es&&(d=v.phi<0?1:0,y=Math.tan(v.phi),g=this.b/Math.sqrt(y*y+this.one_minus_f_squared),v.phi=Math.atan(Math.sqrt(this.a*this.a-g*g)/(this.one_minus_f*g)),d&&(v.phi=-v.phi));return v.lam+=this.long0,e.x=v.lam,e.y=v.phi,e}function l(e,t,r,i){var a;return e<n.EPSLN?(i.value=o.AREA_0,a=0):(a=Math.atan2(t,r),Math.abs(a)<=n.FORTPI?i.value=o.AREA_0:a>n.FORTPI&&a<=n.HALF_PI+n.FORTPI?(i.value=o.AREA_1,a-=n.HALF_PI):a>n.HALF_PI+n.FORTPI||a<=-(n.HALF_PI+n.FORTPI)?(i.value=o.AREA_2,a=a>=0?a-n.SPI:a+n.SPI):(i.value=o.AREA_3,a+=n.HALF_PI)),a}function c(e,t){var r=e+t;return r<-n.SPI?r+=n.TWO_PI:r>+n.SPI&&(r-=n.TWO_PI),r}var f=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];t.default={init:a,forward:s,inverse:u,names:f}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return d}),r.d(t,"forward",function(){return y}),r.d(t,"inverse",function(){return g}),r.d(t,"names",function(){return v});var n=r(5),i=r(7),o=[[1,2.2199e-17,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],a=[[-5.20417e-18,.0124,1.21431e-18,-8.45284e-11],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],s=.8487,u=1.3523,l=n.R2D/5,c=1/l,f=18,h=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},p=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])};function d(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function y(e){var t=Object(i.default)(e.x-this.long0),r=Math.abs(e.y),p=Math.floor(r*l);p<0?p=0:p>=f&&(p=f-1),r=n.R2D*(r-c*p);var d={x:h(o[p],r)*t,y:h(a[p],r)};return e.y<0&&(d.y=-d.y),d.x=d.x*this.a*s+this.x0,d.y=d.y*this.a*u+this.y0,d}function g(e){var t={x:(e.x-this.x0)/(this.a*s),y:Math.abs(e.y-this.y0)/(this.a*u)};if(t.y>=1)t.x/=o[f][0],t.y=e.y<0?-n.HALF_PI:n.HALF_PI;else{var r=Math.floor(t.y*f);for(r<0?r=0:r>=f&&(r=f-1);;)if(a[r][0]>t.y)--r;else{if(!(a[r+1][0]<=t.y))break;++r}var l=a[r],c=5*(t.y-l[0])/(a[r+1][0]-l[0]);c=function(e,t,r,n){for(var i=t;n;--n){var o=e(i);if(i-=o,Math.abs(o)<r)break}return i}(function(e){return(h(l,e)-t.y)/p(l,e)},c,n.EPSLN,100),t.x/=h(o[r],c),t.y=(5*r+c)*n.D2R,e.y<0&&(t.y=-t.y)}return t.x=Object(i.default)(t.x+this.long0),t}var v=["Robinson","robin"];t.default={init:d,forward:y,inverse:g,names:v}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return i}),r.d(t,"forward",function(){return o}),r.d(t,"inverse",function(){return a}),r.d(t,"names",function(){return s});var n=r(104);function i(){this.name="geocent"}function o(e){return Object(n.geodeticToGeocentric)(e,this.es,this.a)}function a(e){return Object(n.geocentricToGeodetic)(e,this.es,this.a,this.b)}var s=["Geocentric","geocentric","geocent","Geocent"];t.default={init:i,forward:o,inverse:a,names:s}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return s}),r.d(t,"forward",function(){return u}),r.d(t,"inverse",function(){return l}),r.d(t,"names",function(){return c});var n=r(5),i=r(43),o={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},a={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function s(){if(Object.keys(a).forEach(function(e){if(void 0===this[e])this[e]=a[e].def;else{if(a[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);a[e].num&&(this[e]=parseFloat(this[e]))}a[e].degrees&&(this[e]=this[e]*n.D2R)}.bind(this)),Math.abs(Math.abs(this.lat0)-n.HALF_PI)<n.EPSLN?this.mode=this.lat0<0?o.S_POLE:o.N_POLE:Math.abs(this.lat0)<n.EPSLN?this.mode=o.EQUIT:(this.mode=o.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var e=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(e),this.sw=Math.sin(e)}function u(e){e.x-=this.long0;var t,r,n,i,a=Math.sin(e.y),s=Math.cos(e.y),u=Math.cos(e.x);switch(this.mode){case o.OBLIQ:r=this.sinph0*a+this.cosph0*s*u;break;case o.EQUIT:r=s*u;break;case o.S_POLE:r=-a;break;case o.N_POLE:r=a}switch(t=(r=this.pn1/(this.p-r))*s*Math.sin(e.x),this.mode){case o.OBLIQ:r*=this.cosph0*a-this.sinph0*s*u;break;case o.EQUIT:r*=a;break;case o.N_POLE:r*=-s*u;break;case o.S_POLE:r*=s*u}return i=1/((n=r*this.cg+t*this.sg)*this.sw*this.h1+this.cw),t=(t*this.cg-r*this.sg)*this.cw*i,r=n*i,e.x=t*this.a,e.y=r*this.a,e}function l(e){e.x/=this.a,e.y/=this.a;var t,r,a,s={x:e.x,y:e.y};a=1/(this.pn1-e.y*this.sw),t=this.pn1*e.x*a,r=this.pn1*e.y*this.cw*a,e.x=t*this.cg+r*this.sg,e.y=r*this.cg-t*this.sg;var u=Object(i.default)(e.x,e.y);if(Math.abs(u)<n.EPSLN)s.x=0,s.y=e.y;else{var l,c;switch(c=1-u*u*this.pfact,c=(this.p-Math.sqrt(c))/(this.pn1/u+u/this.pn1),l=Math.sqrt(1-c*c),this.mode){case o.OBLIQ:s.y=Math.asin(l*this.sinph0+e.y*c*this.cosph0/u),e.y=(l-this.sinph0*Math.sin(s.y))*u,e.x*=c*this.cosph0;break;case o.EQUIT:s.y=Math.asin(e.y*c/u),e.y=l*u,e.x*=c;break;case o.N_POLE:s.y=Math.asin(l),e.y=-e.y;break;case o.S_POLE:s.y=-Math.asin(l)}s.x=Math.atan2(e.x,e.y)}return e.x=s.x+this.long0,e.y=s.y,e}var c=["Tilted_Perspective","tpers"];t.default={init:s,forward:u,inverse:l,names:c}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return i}),r.d(t,"names",function(){return o});var n=r(43);function i(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var e=1-this.es,t=1/e;this.radius_p=Math.sqrt(e),this.radius_p2=e,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}var o=["Geostationary Satellite View","Geostationary_Satellite","geos"];t.default={init:i,forward:function(e){var t,r,i,o,a=e.x,s=e.y;if(a-=this.long0,"ellipse"===this.shape){s=Math.atan(this.radius_p2*Math.tan(s));var u=this.radius_p/Object(n.default)(this.radius_p*Math.cos(s),Math.sin(s));if(r=u*Math.cos(a)*Math.cos(s),i=u*Math.sin(a)*Math.cos(s),o=u*Math.sin(s),(this.radius_g-r)*r-i*i-o*o*this.radius_p_inv2<0)return e.x=Number.NaN,e.y=Number.NaN,e;t=this.radius_g-r,this.flip_axis?(e.x=this.radius_g_1*Math.atan(i/Object(n.default)(o,t)),e.y=this.radius_g_1*Math.atan(o/t)):(e.x=this.radius_g_1*Math.atan(i/t),e.y=this.radius_g_1*Math.atan(o/Object(n.default)(i,t)))}else"sphere"===this.shape&&(t=Math.cos(s),r=Math.cos(a)*t,i=Math.sin(a)*t,o=Math.sin(s),t=this.radius_g-r,this.flip_axis?(e.x=this.radius_g_1*Math.atan(i/Object(n.default)(o,t)),e.y=this.radius_g_1*Math.atan(o/t)):(e.x=this.radius_g_1*Math.atan(i/t),e.y=this.radius_g_1*Math.atan(o/Object(n.default)(i,t))));return e.x=e.x*this.a,e.y=e.y*this.a,e},inverse:function(e){var t,r,i,o,a=-1,s=0,u=0;if(e.x=e.x/this.a,e.y=e.y/this.a,"ellipse"===this.shape){this.flip_axis?(u=Math.tan(e.y/this.radius_g_1),s=Math.tan(e.x/this.radius_g_1)*Object(n.default)(1,u)):(s=Math.tan(e.x/this.radius_g_1),u=Math.tan(e.y/this.radius_g_1)*Object(n.default)(1,s));var l=u/this.radius_p;if(t=s*s+l*l+a*a,(i=(r=2*this.radius_g*a)*r-4*t*this.C)<0)return e.x=Number.NaN,e.y=Number.NaN,e;o=(-r-Math.sqrt(i))/(2*t),a=this.radius_g+o*a,s*=o,u*=o,e.x=Math.atan2(s,a),e.y=Math.atan(u*Math.cos(e.x)/a),e.y=Math.atan(this.radius_p_inv2*Math.tan(e.y))}else if("sphere"===this.shape){if(this.flip_axis?(u=Math.tan(e.y/this.radius_g_1),s=Math.tan(e.x/this.radius_g_1)*Math.sqrt(1+u*u)):(s=Math.tan(e.x/this.radius_g_1),u=Math.tan(e.y/this.radius_g_1)*Math.sqrt(1+s*s)),t=s*s+u*u+a*a,(i=(r=2*this.radius_g*a)*r-4*t*this.C)<0)return e.x=Number.NaN,e.y=Number.NaN,e;o=(-r-Math.sqrt(i))/(2*t),a=this.radius_g+o*a,s*=o,u*=o,e.x=Math.atan2(s,a),e.y=Math.atan(u*Math.cos(e.x)/a)}return e.x=e.x+this.long0,e},names:o}},function(e,t,r){"use strict";r.r(t),r.d(t,"init",function(){return l}),r.d(t,"forward",function(){return c}),r.d(t,"inverse",function(){return f}),r.d(t,"names",function(){return h});var n=r(7),i=1.340264,o=-.081106,a=893e-6,s=.003796,u=Math.sqrt(3)/2;function l(){this.es=0,this.long0=void 0!==this.long0?this.long0:0}function c(e){var t=Object(n.default)(e.x-this.long0),r=e.y,l=Math.asin(u*Math.sin(r)),c=l*l,f=c*c*c;return e.x=t*Math.cos(l)/(u*(i+3*o*c+f*(7*a+9*s*c))),e.y=l*(i+o*c+f*(a+s*c)),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function f(e){e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a;var t,r,l,c,f=e.y;for(c=0;c<12&&(f-=l=(f*(i+o*(t=f*f)+(r=t*t*t)*(a+s*t))-e.y)/(i+3*o*t+r*(7*a+9*s*t)),!(Math.abs(l)<1e-9));++c);return r=(t=f*f)*t*t,e.x=u*e.x*(i+3*o*t+r*(7*a+9*s*t))/Math.cos(f),e.y=Math.asin(Math.sin(f)/u),e.x=Object(n.default)(e.x+this.long0),e}var h=["eqearth","Equal Earth","Equal_Earth"];t.default={init:l,forward:c,inverse:f,names:h}},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,l=[],c=!1,f=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):f=-1,l.length&&p())}function p(){if(!c){var e=s(h);c=!0;for(var t=l.length;t;){for(u=l,l=[];++f<t;)u&&u[f].run();f=-1,t=l.length}u=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function y(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new d(e,t)),1!==l.length||c||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(25));var o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"initPropertys",value:function(e){var r=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"initPropertys",this).call(this,e);this.message=r.message}}]),t}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={HTML:"html",JSON:"json",png:"png",jpg:"jpg",gif:"gif"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.ReturnFormat=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={get:"GET",post:"POST",put:"PUT",delete:"DELETE"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.FetchMethod=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={layerViewCreated:"layerview-created",layerViewCreatedError:"layerview-created-error",layerViewRemove:"layerview-remove",layerViewUpdate:"layerview-update",layerLoaded:"layer-loaded",layerLoadError:"layer-load-error",featureAdd:"feature-add",layerUpdate:"layer-update",layerUpdateStyle:"update-style",layerUpdateOpacity:"layer-update-opacity",layerUpdateVisible:"layer-update-visible",layerSublayerVisible:"layer-sublayer-visible"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.LayerEventType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={layerAdd:"layer-add",layerAddMany:"layer-add-many",layerRemove:"layer-remove",layerRemoveMany:"layer-remove-many",layerRemoveAll:"layer-remove-all",layerChange:"map-layer-change",layerLoaded:"map-layer-loaded",loaded:"loaded",basemapChange:"basemap-change"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.MapEventType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={functionMax:"FUNCTION_MAX",functionMin:"FUNCTION_MIN",functionSum:"FUNCTION_SUM",functionAvg:"FUNCTION_AVG",functionCount:"FUNCTION_COUNT",functionMaxOID:"FUNCTION_MAX_OID"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.StatisticType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Intersects:"Intersects",EnvelopeIntersects:"EnvelopeIntersects",Contains:"Contains",Disjoint:"Disjoint"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.SpatialRelation=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={baseLayer:"baselayer",unknown:"unknown",tile:"tile",igsTile:"igs-tile",arcgisTile:"arcgis-tile",vectorTile:"vectorTile",vectorTileSubLayer:"vectorTileSubLayer",igsVectorTile:"igs-vectorTile",mapImage:"map-image",igsMapImage:"igs-map-image",arcgisMapImage:"arcgis-map-image",ogc:"ogc",wms:"wms",wmts:"wmts",wfs:"wfs",feature:"feature",igsFeature:"igs-feature",geojson:"geojson",overlay:"overlay",mapv:"mapv",echarts:"echarts",elevation:"elevation",m3d:"m3d",m3dCache:"m3d-cache",scene:"scene",cesium3DTiles:"cesium3DTiles",group:"group",tdt:"tdt",baidu:"baidu",gaode:"gaode",terrain:"terrain",graphics:"graphics",arcgisVectorTile:"arcgis-vectorTile",webTileLayer:"web-tile-layer",isTileLayer:function(e){return[n.igsTile,n.arcgisTile,n.wmts,n.arcgisTile,n.igsVectorTile,n.tdt,n.baidu,n.gaode,n.arcgisVectorTile,n.webTileLayer].some(function(t){return e===t})}};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.LayerType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={url:"url",header:"header",body:"body"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.TokenAttachType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={geometry:"geometry",point:"point",point3D:"point3d",lineString:"line",polygon:"polygon",multiPoint:"multiPoint",multiLineString:"multiLine",multiPolygon:"multiPolygon",circle:"circle",extent:"rect",extent3D:"rect3d"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.IGSGeometryType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={none:"none",info:"info",error:"error",warning:"warning",all:"all",infoAndError:"infoAndError",warningAndError:"warningAndError"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.LogType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={notLoaded:"not-loaded",loading:"loading",loaded:"loaded",failed:"failed"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.LoadStatus=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={click:"click",immediateClick:"immediate-click",doubleClick:"double-click",pointerDown:"mouse-down",pointerUp:"mouse-up",mouseOut:"mouse-out",pointerMove:"mouse-move",mouseDown:"mouse-down",mouseUp:"mouse-up",mouseMove:"mouse-move",mouseOver:"mouse-over",keyPress:"key-press",keyDown:"key-down",keyUp:"key-up",rightClickDown:"right-click-down",previewClick:"preview-click",zoom:"zoom",zoomEnd:"zoom-end",mapMove:"move",mapMoveEnd:"map-end",resize:"resize",loaded:"loaded",wheel:"wheel",viewChange:"view-change",drag:"drag",viewCreated:"view-created"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.ViewEventType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={kilometer:"kilometers",meter:"meters",mile:"miles"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.LengthUnit=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={degree:"degrees",radian:"radians"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.AngleUnit=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={classBreak:"class-breaks",uniqueValue:"unique-value",simple:"simple",cluster:"cluster",random:"random",rank:"rank",heatmap:"heatmap"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.RendererType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={fill:"fill",line:"line",circle:"circle",background:"background"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.VectorTileGeometryType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2));var i=Object.freeze({POINT:0,POLYLINE:1,POLYGON:2,CIRCLE:3,RECTANGLE:4,FREEHANDPOLYLINE:5,FREEHANDPOLYGON:6,TEXT:7});n.default.Enum.SketchDataType=i,t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2));var i=Object.freeze({NONE:0,EDITGRAGIC:1,EDITVERTEX:2,DRAWING:3});n.default.Enum.SketchEditMode=i,t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2));var i=Object.freeze({create:"create",remove:"remove",update:"update",redo:"redo",undo:"undo"});n.default.Enum.SketchEditorEventType=i,t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2));var i=Object.freeze({start:"start",active:"active",complete:"complete",cancel:"cancel"});n.default.Enum.SketchEditorState=i,t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2));var i=Object.freeze({cursorChange:"cursor-change",moveStart:"move-start",move:"move",moveStop:"move-stop",scaleStart:"scale-start",scale:"scale",scaleStop:"scale-stop",vertexAdd:"vertex-add",vertexRemove:"vertex-remove",vertexMoveStart:"vertex-move-start",vertexUpdate:"vertex-update",vertexMoveStop:"vertex-move-stop",geometryUnsimple:"geometry-unsimple",geometryAdd:"geometry-add"});n.default.Enum.SketchEditorToolEventType=i,t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={simpleRenderer:"1",uniqueValueRenderer:"2",classBreaksRenderer:"3",HeatmapRender:"4",PointClusterRenderer:"5",CartographicRenderer:"6",RuleBasedRenderer:"7",GridClusterRenderer:"8",DotDensityRenderer:"9"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.IGSRendererType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={simpleMark:"1",fontMark:"2",pictureMark:"3",pointInfo:"4",svgMark:"5",customizeMark:"6",simpleLine:"7",pictureLine:"8",markLine:"9",lineInfo:"10",harshLine:"11",decorationLine:"12",simpleFill:"13",regInfoFill:"14",pictureFill:"15",markFill:"16",lineFill:"17",gradientFill:"18",customizeMarkFill:"19",strokeFill:"20",pieChart:"21",barChart:"22",stackedChart:"23",randomMarkFill:"24"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.IGSSymbolType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={OnTheGround:"OnTheGround",RelativeToGround:"RelativeToGround",AbsoluteHeight:"AbsoluteHeight",RelativeToScene:"RelativeToScene",OnTheScene:"OnTheScene"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.ElevationMode=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={morphing:0,columbus:1,scene2d:2,scene3d:3};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.SceneMode=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={disabled:0,enable:1,cast:2,receive:3};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.ShadowMode=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={igs_1:"igs_1",igs_2:"igs_2",tdt:"tdt",arcgis:"arcgis"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.UrlServerType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={png:"png",jpeg:"jpeg",svg:"svg"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.PictureFormat=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={degrees:"degrees",miles:"miles",nauticalMiles:"nautical-miles",yards:"yards",meters:"meters",kilometers:"kilometers"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.RadiusUnit=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={corporationZD:1,corporationArcGIS:2,corporationSuperMap:3,corporationGeoServer:4,corporationTianDiTu:5,corporationOther:6,none:0};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.WMTSCorporation=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={icon:"icon",object:"object",line:"line",path:"path",fill:"fill",water:"water",extrude:"extrude",text:"text"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.Symbol3DLayerType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={begin:"begin",end:"end",beginAndEnd:"begin-end"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.LineMarkerPlacement=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={arrow:"arrow",circle:"circle",square:"square",diamond:"diamond",cross:"cross",x:"x"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.LineMarkerStyle=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={dash:"dash",dashDot:"dash-dot",dot:"dot",longDash:"long-dash",longDashDot:"long-dash-dot",longDashDotDot:"long-dash-dot-dot",none:"none",shortDash:"short-dash",shortDashDot:"short-dash-dot",shortDashDotDot:"short-dash-dot-dot",shortDot:"short-dot",solid:"solid"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.LinePatternStyle=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={center:"center",left:"left",right:"right",bottom:"bottom",top:"top",topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right",relative:"relative"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.AnchorType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={circle:"circle",quad:"quad"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.ProfileType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={color:"color"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.MaterialType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={meters:"meters",feet:"feet",kilometers:"kilometers",miles:"miles",nauticalMiles:"nautical-miles",yards:"yards"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.LinearUnits=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={acres:"acres",ares:"ares",hectares:"hectares",squareFeet:"square-feet",squareMeters:"square-meters",squareYards:"square-yards",squareKilometers:"square-kilometers",squareMiles:"square-miles"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.AreaUnits=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={terrain:"3",label:"4",g3d:"2",sceneServer:"10"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.SceneSubLayerType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={wmts:"wmts",tms:"tms"};(function(e){return e&&e.__esModule?e:{default:e}})(r(2)).default.Enum.TileSliceType=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=function(e){var t=e.clone(),r=function(e){return Math.sqrt(function(e){return e.hasZ?e.coordinates[0]*e.coordinates[0]+e.coordinates[1]*e.coordinates[1]+e.coordinates[2]*e.coordinates[2]:e.coordinates[0]*e.coordinates[0]+e.coordinates[1]*e.coordinates[1]}(e))}(t);return t.coordinates[0]/=r,t.coordinates[1]/=r,t.hasZ&&(t.coordinates[2]/=r),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGeometryCenter=t.createGeometry=void 0;var n=r(10),i=function(e){return e&&e.__esModule?e:{default:e}}(r(66)),o=r(57);t.createGeometry=function(e){switch((e=(0,n.defaultValue)(e,{})).type){case i.default.circle:return new o.Circle(e);case i.default.extent:return new o.Extent(e);case i.default.lineString:return new o.LineString(e);case i.default.multiPolygon:return new o.MultiPolygon(e);case i.default.point:return new o.Point(e);case i.default.polygon:default:return new o.Polygon(e)}},t.getGeometryCenter=function(e){e||o.Log.error("几何为空");var t=void 0;switch(e.type){case i.default.point:t=e;break;case i.default.multiPoint:case i.default.lineString:case i.default.multiLineString:case i.default.multiPolygon:t=e.extent.center;break;case i.default.polygon:t=e.centroid;break;case i.default.extent:case i.default.circle:t=e.center;break;default:t=e.extent.center}return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(57),a=function(e){return e&&e.__esModule?e:{default:e}}(r(37)),s=r(119);var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._videoRegistrationParam=null,this._gdalGCPsData=[],this._toGeoTransforms=new Float64Array(6),this._invToGeoTransforms=new Float64Array(6)}return n(e,[{key:"init",value:function(e){var t=this;if(this._videoRegistrationParam=new i.VideoRegistrationParam(e),this._videoRegistrationParam.calibrationParam&&this._videoRegistrationParam.calibrationParam.groundControlPointList){this._videoRegistrationParam.calibrationParam.groundControlPointList.forEach(function(e){var r={pszId:e.id,pszInfo:e.description,dfGCPPixel:e.pixelX,dfGCPLine:e.pixelY,dfGCPX:e.x,dfGCPY:e.y,dfGCPZ:e.z};t._gdalGCPsData.push(r)});(0,s.GDALGCPsToGeoTransform)(this._gdalGCPsData,this._toGeoTransforms,!0);(0,s.GDALInvGeoTransform)(this._toGeoTransforms,this._invToGeoTransforms)}else a.default.error("缺少标定配准转换数据")}},{key:"pixelCoordToGeoCoord",value:function(e){var t=(0,s.GDALApplyGeoTransform)(this._toGeoTransforms,e.coordinates[0],e.coordinates[1]),r=t.pdfGeoX,n=t.pdfGeoY;return new o.Point({coordinates:[r,n]})}},{key:"geoCoordToPixelCoord",value:function(e){var t=(0,s.GDALApplyGeoTransform)(this._invToGeoTransforms,e.coordinates[0],e.coordinates[1]),r=t.pdfGeoX,n=t.pdfGeoY;return new o.Point({coordinates:[r,n]})}}]),e}();t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(25));var o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"initPropertys",value:function(e){var t=e||{};return this.target=t.target,this.sourceTarget=t.sourceTarget,this.eventData=t.eventData,this.sourceEventData=t.sourceEventData,this.eventPath=t.eventPath||[],t}}]),t}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r(25));var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"initPropertys",value:function(e){var t=(0,i.defaultValue)(e,{});return this.added=(0,i.defaultValue)(t.added,[]),this.removed=(0,i.defaultValue)(t.removed,[]),this.moved=(0,i.defaultValue)(t.moved,[]),this.sourceTarget=t.sourceTarget,this.target=t.target,t}}]),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r(25));var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"initPropertys",value:function(e){var t=(0,i.defaultValue)(e,{});return this.added=(0,i.defaultValue)(t.added,[]),this.removed=(0,i.defaultValue)(t.removed,[]),this.moved=(0,i.defaultValue)(t.moved,[]),this.path=(0,i.defaultValue)(t.path,[]),this.sourceTarget=t.sourceTarget,this.target=t.target,t}}]),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r(25));var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"initPropertys",value:function(e){var t=(0,i.defaultValue)(e,{});return this.addDetail=(0,i.defaultValue)(t.addDetail,[]),t}}]),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r(25));var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"initPropertys",value:function(e){var t=(0,i.defaultValue)(e,{});return this.basemap=(0,i.defaultValue)(t.basemap,null),this.detail=(0,i.defaultValue)(t.detail,[]),t}}]),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extend=function(e){var t=void 0,r=void 0,n=void 0,i=void 0;for(r=1,n=arguments.length;r<n;r++)for(t in i=arguments[r])e[t]=i[t];return e},t.bind=i,t.stamp=function(e){return e._leaflet_id},t.throttle=function(e,t,r){var n=void 0,i=void 0,o=void 0,a=function(){n=!1,i&&(o.apply(r,i),i=!1)};return o=function(){n?i=arguments:(e.apply(r,arguments),setTimeout(a,t),n=!0)}},t.wrapNum=function(e,t,r){var n=t[1],i=t[0],o=n-i;return e===n&&r?e:((e-i)%o+o)%o+i},t.falseFn=function(){return!1},t.formatNum=function(e,t){var r=Math.pow(10,void 0===t?6:t);return Math.round(e*r)/r},t.trim=o,t.splitWords=function(e){return o(e).split(/\s+/)},t.setOptions=function(e,t){Object.prototype.hasOwnProperty.call(e,"options")||(e.options=e.options?n(e.options):{});for(var r in t)e.options[r]=t[r];return e.options},t.getParamString=function(e,t,r){var n=[];for(var i in e)n.push(encodeURIComponent(r?i.toUpperCase():i)+"="+encodeURIComponent(e[i]));return(t&&-1!==t.indexOf("?")?"&":"?")+n.join("&")},t.template=function(e,t){return e.replace(a,function(e,r){var n=t[r];if(void 0===n)throw new Error("No value provided for variable "+e);return"function"==typeof n&&(n=n(t)),n})},t.indexOf=function(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return r;return-1},t.requestAnimFrame=function(e,t,r){if(!r||c!==l)return c.call(window,i(e,t));e.call(t)},t.cancelAnimFrame=function(e){e&&f.call(window,e)};var n=t.create=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}();function i(e,t){var r=Array.prototype.slice;if(e.bind)return e.bind.apply(e,r.call(arguments,1));var n=r.call(arguments,2);return function(){return e.apply(t,n.length?n.concat(r.call(arguments)):arguments)}}t.lastId=0;function o(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}var a=/\{ *([\w_-]+) *\}/g;t.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};t.emptyImageUrl="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function s(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}var u=0;function l(e){var t=+new Date,r=Math.max(0,16-(t-u));return u=t+r,window.setTimeout(e,r)}var c=t.requestFn=window.requestAnimationFrame||s("RequestAnimationFrame")||l,f=t.cancelFn=window.cancelAnimationFrame||s("CancelAnimationFrame")||s("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r(83));var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.type="collection-flat",e=(0,i.defaultValue)(e,{}),r.getCollections=e.getCollections||function(){return[]},r._cacheCollections=r.getCollections(),r.getChildrenFunction=e.getChildrenFunction,r._refresh(),r._cacheCollections.forEach(function(e){r._addRefreshHandler(e)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"_refresh",value:function(e){var t=this,r=this._cacheCollections;if(r&&Array.isArray(r)){var n=0;r.forEach(function(e){n=t._processCollection(n,e)}),this._items.splice(n,this._items.length-n)}else this.removeAll()}},{key:"_processCollection",value:function(e,t){var r=this;return t?(t.forEach(function(n){if(n){var i=r._items.findIndex(function(e){return e===n});if(i>-1?i!==e&&r._reorder(n,e):r._add(n,e),e+=1,r.getChildrenFunction){var a=r.getChildrenFunction(n);a&&(Array.isArray(a)?a.forEach(function(n){n instanceof o.default&&(e=r._processCollection(e,n),n._addParentCollection(t))}):a instanceof o.default&&(e=r._processCollection(e,a),a._addParentCollection(t)))}}}),e):e}},{key:"_addCollection",value:function(e,t){var r=(0,i.defaultValue)(t,this._cacheCollections.length);r=Math.max(0,Math.min(this._cacheCollections.length,t)),this._cacheCollections.splice(r,0,e),this._addRefreshHandler(e),this._refresh()}},{key:"_removeCollection",value:function(e){var t=this._cacheCollections.indexOf(function(t){return t===e});t>-1&&(this._cacheCollections.splice(t,1),this._removeRreshHandler(e),this._refresh())}},{key:"_addRefreshHandler",value:function(e){e&&e.on("collection-refresh",this._refresh,this)}},{key:"_removeRreshHandler",value:function(e){e&&e.off("collection-refresh",this._refresh,this)}}]),t}();Object.defineProperties(a.prototype,{items:{get:function(){return this._items},set:function(e){}}}),t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),o=r(0);var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.statisticType=(0,o.defaultValue)(t.statisticType,void 0),this.onStatisticField=(0,o.defaultValue)(t.onStatisticField,void 0),this.outStatisticFieldName=(0,o.defaultValue)(t.outStatisticFieldName,void 0),(0,o.isNull)(this.statisticType)&&console.warn("statisticType不能为空!"),(0,o.isNull)(this.onStatisticField)&&console.warn("onStatisticField不能为空!")}return n(e,[{key:"toString",value:function(){var e="";return(0,o.isNull)(this.statisticType)||(0,o.isNull)(this.onStatisticField)||((0,o.isNull)(this.outStatisticFieldName)?e+='{"statisticType":"'+this.statisticType+'","onStatisticField":"'+this.onStatisticField+'"}':e+='{"statisticType":"'+this.statisticType+'","onStatisticField":"'+this.onStatisticField+'","outStatisticFieldName":"'+this.outStatisticFieldName+'"}'),e}}]),e}();i.default.OutStatistics=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),i=r(0);var o=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.ProjAngleUnit=(0,i.defaultValue)(4,t.ProjAngleUnit),this.ProjLat=(0,i.defaultValue)(0,t.ProjLat),this.ProjLat1=(0,i.defaultValue)(25e4,t.ProjLat1),this.ProjLat2=(0,i.defaultValue)(47e4,t.ProjLat2),this.ProjLon=(0,i.defaultValue)(105e4,t.ProjLon),this.ProjRate=(0,i.defaultValue)(14e6,t.ProjRate),this.ProjType=(0,i.defaultValue)(3,t.ProjType),this.ProjTypeID=(0,i.defaultValue)(2,t.ProjTypeID),this.ProjUnit=(0,i.defaultValue)(1,t.ProjUnit),this.ProjZoneNO=(0,i.defaultValue)(18,t.ProjZoneNO),this.ProjZoneType=(0,i.defaultValue)(0,t.ProjZoneType),this.SphereID=(0,i.defaultValue)(2,t.SphereID)};n.default.ProjectInfo=o,t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),i=r(0);var o=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.DesSrsID=(0,i.defaultValue)(610,t.DesSrsID),this.GdbInfo=(0,i.defaultValue)({GDBName:"示例数据",GDBSvrName:"MapGISLocal",Password:"",User:""},t.DesSrsID)};n.default.ProjectInfoBySrsID=o,t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),o=r(0);var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.description=(0,o.defaultValue)(t.description,void 0),this.id=(0,o.defaultValue)(t.id,(0,o.getGUID)()),this.isDefault=(0,o.defaultValue)(t.isDefault,!1),this.title=(0,o.defaultValue)(t.title,void 0)}return n(e,[{key:"fromJSON",value:function(e){e=(0,o.defaultValue)(e,{}),this.description=(0,o.defaultValue)(e.description,void 0),this.id=(0,o.defaultValue)(e.id,(0,o.getGUID)()),this.isDefault=(0,o.defaultValue)(e.isDefault,!1),this.title=(0,o.defaultValue)(e.title,void 0)}},{key:"toJSON",value:function(){return{description:this.description,id:this.id,isDefault:this.isDefault,title:this.title}}},{key:"clone",value:function(){return new e(this.toJSON())}}]),e}();i.default.WMTSStyle=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=u(r(297)),a=u(r(2)),s=r(3);function u(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,i.defaultValue)(t,{}),this.mode=(0,i.defaultValue)(t.mode,s.ElevationMode.AbsoluteHeight),this.offset=(0,i.defaultValue)(t.offset,0),this.featureExpressionInfo=new o.default(t.featureExpressionInfo),this.unit=(0,i.defaultValue)(t.unit,s.LengthUnit.meter)}return n(e,[{key:"clone",value:function(){return new e({unit:this.unit,mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo.clone()})}},{key:"toJSON",value:function(){return{unit:this.unit,mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo.toJSON()}}}]),e}();a.default.ElevationInfo=l,t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r(2));var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=(0,i.defaultValue)(t,{});this.expression=(0,i.defaultValue)(r.expression,"")}return n(e,[{key:"clone",value:function(){return new e({expression:this.expression})}},{key:"toJSON",value:function(){return{expression:this.expression}}}]),e}();o.default.FeatureExpressionInfo=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=f(r(2)),o=r(0),a=r(3),s=f(r(81)),u=f(r(82)),l=f(r(27)),c=r(14);function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=a.Symbol3DLayerType.path,r.anchor=(0,o.defaultValue)(e.anchor,a.AnchorType.center),r.cap=(0,o.defaultValue)(e.cap,s.default.butt),r.castShadows=(0,o.defaultValue)(e.castShadows,!0),r.height=(0,o.defaultValue)(e.height,void 0),r.width=(0,o.defaultValue)(e.width,void 0),r.join=(0,o.defaultValue)(e.join,u.default.miter),r.material=e.material?c.ColorMaterial.fromJSON(e.material):new c.ColorMaterial,r.profile=(0,o.defaultValue)(e.profile,a.ProfileType.circle),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,l.default),n(t,[{key:"toJSON",value:function(){return{type:this.type,anchor:this.anchor,cap:this.cap,castShadows:this.castShadows,height:this.height,width:this.width,join:this.join,material:this.material,profile:this.profile}}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();i.default.Symbol.PathSymbol3DLayer=h,t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=u(r(2)),o=r(0),a=r(1),s=u(r(123));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e=(0,o.defaultValue)(e,{}),r.type="line",r.border=(0,o.defaultValue)(e.border,void 0),r.border&&r.border.hasOwnProperty("color")&&(r.border.color=new a.Color(r.border.color)),r.color=(0,o.defaultValue)(e.color,new a.Color),r.size=(0,o.defaultValue)(e.size,1),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),n(t,[{key:"toJSON",value:function(){return{type:this.type,border:this.border?{color:this.border.color.toJSON()}:void 0,color:(0,o.toJSON)(this.color,a.Color),size:this.size}}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();i.default.Symbol.LineCallout3D=l,t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),o=r(0);var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.maxWorldLength=(0,o.defaultValue)(t.maxWorldLength,void 0),this.minWorldLength=(0,o.defaultValue)(t.minWorldLength,0),this.screenLength=(0,o.defaultValue)(t.screenLength,0)}return n(e,[{key:"toJSON",value:function(){return{maxWorldLength:this.maxWorldLength,minWorldLength:this.minWorldLength,screenLength:this.screenLength}}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t)}}]),e}();i.default.Symbol.Symbol3DVerticalOffset=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),o=r(0),a=r(3);var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.color=(0,o.defaultValue)(t.color,void 0),this.placement=(0,o.defaultValue)(t.placement,a.LineMarkerPlacement.beginAndEnd),this.style=(0,o.defaultValue)(t.style,a.LineMarkerStyle.arrow),this.type="style"}return n(e,[{key:"toJSON",value:function(){return{color:this.color.toJSON(),placement:this.placement,type:this.type,style:this.style}}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t)}}]),e}();i.default.Symbol.LineStyleMarker3D=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),o=r(0),a=r(3);var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.style=(0,o.defaultValue)(t.style,a.LinePatternStyle.solid),this.type="style"}return n(e,[{key:"toJSON",value:function(){return{style:this.style,type:this.type}}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t)}}]),e}();i.default.Symbol.LineStylePattern3D=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=u(r(2)),o=r(0),a=r(1),s=u(r(115));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.color=(0,o.defaultValue)(t.color,new a.Color),this.size=(0,o.defaultValue)(t.size,1),this.pattern=(0,o.defaultValue)(t.pattern,s.default.solid)}return n(e,[{key:"toJSON",value:function(){return{color:(0,o.toJSON)(this.color,a.Color),size:this.size,pattern:this.pattern}}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t)}}]),e}();i.default.Symbol.FillSymbol3DOutline=l,t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),o=r(0),a=r(1);var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.color=(0,o.defaultValue)(t.color,new a.Color),this.size=(0,o.defaultValue)(t.size,1)}return n(e,[{key:"toJSON",value:function(){return{color:(0,o.toJSON)(this.color,a.Color),size:this.size}}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t)}}]),e}();i.default.Symbol.PointSymbol3DOutline=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),o=r(0);var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.primitive=(0,o.defaultValue)(t.primitive,"circle"),this.href=(0,o.defaultValue)(t.href,void 0)}return n(e,[{key:"toJSON",value:function(){return{primitive:this.primitive,href:this.href}}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t)}}]),e}();i.default.Symbol.IconResource=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),o=r(0),a=r(1);var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.color=(0,o.defaultValue)(t.color,new a.Color),this.size=(0,o.defaultValue)(t.size,1),this.extensionLength=(0,o.defaultValue)(t.extensionLength,0)}return n(e,[{key:"toJSON",value:function(){return{color:this.color.toJSON(),size:this.size,extensionLength:this.extensionLength}}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t)}}]),e}();i.default.Symbol.Edges3D=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorMaterial=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(308));t.ColorMaterial=n.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),o=r(0),a=r(1),s=r(3);var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.type=s.MaterialType.color,this.color=(0,o.defaultValue)(t.color,new a.Color)}return n(e,[{key:"toJSON",value:function(){return{color:(0,o.toJSON)(this.color,a.Color),type:this.type}}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t)}}]),e}();i.default.Symbol.ColorMaterial=u,t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=f(r(2)),o=f(r(27)),a=r(3),s=r(0),u=f(r(81)),l=f(r(82)),c=r(14);function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,s.defaultValue)(e,{}),r.type=a.Symbol3DLayerType.line,r.cap=(0,s.defaultValue)(e.cap,u.default.butt),r.join=(0,s.defaultValue)(e.join,l.default.miter),r.marker=(0,s.defaultValue)(e.marker,void 0),r.material=e.material?c.ColorMaterial.fromJSON(e.material):new c.ColorMaterial,r.pattern=e.pattern?c.LineStylePattern3D.fromJSON(e.pattern):new c.LineStylePattern3D,r.size=(0,s.defaultValue)(e.size,1),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"toJSON",value:function(){return{type:this.type,cap:this.cap,join:this.join,marker:(0,s.toJSON)(this.marker,c.LineStyleMarker3D),material:(0,s.toJSON)(this.material,c.ColorMaterial),pattern:(0,s.toJSON)(this.pattern,c.LineStylePattern3D),size:this.size}}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();i.default.Symbol.LineSymbol3DLayer=h,t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=c(r(2)),o=r(0),a=r(3),s=c(r(311)),u=c(r(27)),l=r(14);function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=a.Symbol3DLayerType.fill,r.material=e.material?l.ColorMaterial.fromJSON(e.material):new l.ColorMaterial,r.castShadows=(0,o.defaultValue)(e.castShadows,!0),r.outline=e.outline?l.FillSymbol3DOutline.fromJSON(e.outline):new l.FillSymbol3DOutline,r.pattern=e.pattern?s.default.fromJSON(e.pattern):new s.default,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default),n(t,[{key:"toJSON",value:function(){return{type:this.type,material:(0,o.toJSON)(this.material,l.ColorMaterial),outline:(0,o.toJSON)(this.outline,l.FillSymbol3DOutline),pattern:(0,o.toJSON)(this.pattern,s.default)}}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();i.default.Symbol.FillSymbol3DLayer=f,t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),o=r(0),a=r(3);var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.style=(0,o.defaultValue)(t.style,a.LinePatternStyle.solid),this.type="style"}return n(e,[{key:"toJSON",value:function(){return{style:this.style,type:this.type}}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t)}}]),e}();i.default.Symbol.StylePattern3D=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),o=r(0),a=r(3),s=r(14),u=r(1),l=r(4);var c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.type=a.Symbol3DLayerType.icon,this.anchor=(0,o.defaultValue)(t.anchor,a.AnchorType.center),this.anchorPosition=t.anchorPosition?l.Point.fromJSON(t.anchorPosition):new l.Point({coordinates:[0,0]}),this.material=t.material?s.ColorMaterial.fromJSON(t.material):new s.ColorMaterial({color:new u.Color(255,255,255,1)}),this.outline=t.outline?s.PointSymbol3DOutline.fromJSON(t.outline):new s.PointSymbol3DOutline,this.resource=t.resource?s.IconResource.fromJSON(t.resource):new s.IconResource,this.size=(0,o.defaultValue)(t.size,12)}return n(e,[{key:"toJSON",value:function(){return{type:this.type,anchor:this.anchor,anchorPosition:JSON.parse(JSON.stringify(this.anchorPosition)),material:this.material,outline:this.outline.toJSON(),resource:this.resource.toJSON(),size:this.size}}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t)}}]),e}();i.default.Symbol.IconSymbol3DLayer=c,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=f(r(2)),o=r(0),a=r(3),s=r(14),u=f(r(27)),l=r(4),c=r(1);function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=a.Symbol3DLayerType.object,r.anchor=(0,o.defaultValue)(e.anchor,a.AnchorType.center),r.anchorPosition=e.anchorPosition?l.Point.fromJSON(e.anchorPosition):new l.Point({coordinates:[0,0]}),r.castShadows=(0,o.defaultValue)(e.castShadows,!0),r.depth=(0,o.defaultValue)(e.depth,10),r.heading=(0,o.defaultValue)(e.heading,0),r.height=(0,o.defaultValue)(e.height,10),r.material=e.material?s.ColorMaterial.fromJSON(e.material):new s.ColorMaterial({color:new c.Color(255,255,255,1)}),r.resource=e.resource?s.IconResource.fromJSON(e.resource):new s.IconResource,r.roll=(0,o.defaultValue)(e.roll,0),r.tilt=(0,o.defaultValue)(e.tilt,0),r.width=(0,o.defaultValue)(e.width,10),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default),n(t,[{key:"toJSON",value:function(){return{type:this.type,anchor:this.anchor,anchorPosition:(0,o.toJSON)(this.anchorPosition,l.Point),castShadows:this.castShadows,depth:this.depth,heading:this.heading,height:this.height,material:(0,o.toJSON)(this.material,s.ColorMaterial),resource:(0,o.toJSON)(this.resource,s.IconResource),roll:this.roll,tilt:this.tilt,width:this.width}}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();i.default.Symbol.ObjectSymbol3DLayer=h,t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=l(r(2)),o=r(0),a=r(3),s=r(14),u=l(r(27));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=a.Symbol3DLayerType.extrude,r.castShadows=(0,o.defaultValue)(e.castShadows,!0),r.material=e.material?s.ColorMaterial.fromJSON(e.material):new s.ColorMaterial,r.size=(0,o.defaultValue)(e.size,1),r.edges=e.edges?s.Edges3D.fromJSON(e.edges):new s.Edges3D,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default),n(t,[{key:"toJSON",value:function(){return{type:this.type,castShadows:this.castShadows,material:(0,o.toJSON)(this.material,s.ColorMaterial),size:this.size,pattern:(0,o.toJSON)(this.edges,s.Edges3D)}}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();i.default.Symbol.ExtrudeSymbol3DLayer=c,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=d(r(2)),o=r(0),a=r(3),s=r(1),u=d(r(84)),l=d(r(79)),c=d(r(80)),f=d(r(124)),h=d(r(27)),p=r(14);function d(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=a.Symbol3DLayerType.text,r.background=e.background?s.Color.fromJSON(e.background):new s.Color,r.font=e.font?u.default.fromJSON(e.font):new u.default,r.halo=e.halo?f.default.fromJSON(e.halo):new f.default,r.horizontalAlignment=(0,o.defaultValue)(e.horizontalAlignment,l.default.center),r.verticalAlignment=(0,o.defaultValue)(e.verticalAlignment,c.default.baseline),r.lineHeight=(0,o.defaultValue)(e.lineHeight,1),r.material=e.material?p.ColorMaterial.fromJSON(e.material):new p.ColorMaterial,r.size=(0,o.defaultValue)(e.size,9),r.text=(0,o.defaultValue)(e.text,void 0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,h.default),n(t,[{key:"toJSON",value:function(){return{type:this.type,background:(0,o.toJSON)(this.background,s.Color),font:(0,o.toJSON)(this.font,u.default),halo:(0,o.toJSON)(this.halo,f.default),horizontalAlignment:this.horizontalAlignment,verticalAlignment:this.verticalAlignment,lineHeight:this.lineHeight,material:(0,o.toJSON)(this.material,p.ColorMaterial),size:this.size,text:this.text}}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();i.default.Symbol.TextSymbol3DLayer=y,t.default=y},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=f(r(2)),o=r(0),a=r(3),s=r(1),u=f(r(116)),l=f(r(117)),c=f(r(27));function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=a.Symbol3DLayerType.water,r.color=(0,o.defaultValue)(e.color,new s.Color),r.waterbodySize=(0,o.defaultValue)(e.waterbodySize,u.default.medium),r.waveDirection=(0,o.defaultValue)(e.waveDirection,void 0),r.waveStrength=(0,o.defaultValue)(e.waveStrength,l.default.moderate),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,c.default),n(t,[{key:"toJSON",value:function(){return{type:this.type,color:this.color.toJSON(),waterbodySize:this.waterbodySize,waveDirection:this.waveDirection,waveStrength:this.waveStrength}}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();i.default.Symbol.WaterSymbol3DLayer=h,t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=l(r(2)),a=r(3),s=l(r(87)),u=l(r(126));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,i.defaultValue)(e,{}),r.type=a.SymbolType.simpleMarker,r.size=(0,i.defaultValue)(e.size,20),r.outline=r._decorate("outline",e.outline,s.default,s.default.fromJSON),r.style=(0,i.defaultValue)(e.style,"circle"),r.path=(0,i.defaultValue)(e.path,""),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default),n(t,[{key:"clone",value:function(){return new t(this.toJSON())}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.size=this.size,e.outline=this.outline.toJSON(),e.style=this.style,e.path=this.path,e}}],[{key:"fromJSON",value:function(e){return new t(e=(0,i.defaultValue)(e,{}))}}]),t}();o.default.Symbol.SimpleMarkerSymbol=c,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=u(r(31)),o=r(0),a=r(3),s=u(r(19));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.color=s.default.fromColor((0,o.defaultValue)(e.color,new s.default(0,0,0,1))),r.type=a.SymbolType.simpleLine,r.width=(0,o.defaultValue)(e.width,1),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.type=this.type,e.width=this.width,e}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r(19));var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,i.defaultValue)(t,{}),this.type="line-marker",this.color=o.default.fromColor((0,i.defaultValue)(t.color,{})),this.placement=(0,i.defaultValue)(t.placement,"begin-end"),this.style=(0,i.defaultValue)(t.style,"arrow")}return n(e,[{key:"toJSON",value:function(){return{type:this.type,color:o.default.fromColor(this.color).toJSON(),placement:this.placement,style:this.style}}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t=(0,i.defaultValue)(t,{}))}}]),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=u(r(2)),o=r(0),a=r(3),s=u(r(127));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=a.SymbolType.simpleFill,r.style=(0,o.defaultValue)(e.style,"solid"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),n(t,[{key:"clone",value:function(){return new t(this.toJSON())}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.style=this.style,e}}],[{key:"fromJSON",value:function(e){return new t(e=(0,o.defaultValue)(e,{}))}}]),t}();i.default.Symbol.SimpleFillSymbol=l,t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=u(r(2)),a=r(3),s=u(r(126));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,i.defaultValue)(e,{}),r.type=a.SymbolType.pictureMarker,r.width=(0,i.defaultValue)(e.width,20),r.height=(0,i.defaultValue)(e.height,20),r.url=r._decorate("url",(0,i.defaultValue)(e.url,""),null,i.convertImageSourceToBase64),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),n(t,[{key:"clone",value:function(){return new t(this.toJSON())}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.width=this.width,e.height=this.height,e.url=this.url,e}}],[{key:"fromJSON",value:function(e){return new t(e=(0,i.defaultValue)(e,{}))}}]),t}();o.default.Symbol.PictureMarkerSymbol=l,t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=u(r(127)),o=r(3),a=r(0),s=u(r(2));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r.type=o.SymbolType.pictureFill,r.height=(0,a.defaultValue)(e.height,12),r.url=r._decorate("url",(0,a.defaultValue)(e.url,""),null,a.convertImageSourceToBase64),r.width=(0,a.defaultValue)(e.width,12),r.xoffset=(0,a.defaultValue)(e.xoffset,0),r.xscale=(0,a.defaultValue)(e.xscale,1),r.yoffset=(0,a.defaultValue)(e.yoffset,0),r.yscale=(0,a.defaultValue)(e.yscale,1),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){return{type:this.type,height:this.height,outline:this.outline.toJSON(),url:this.url,width:this.width,xoffset:this.xoffset,xscale:this.xscale,yoffset:this.yoffset,yscale:this.yscale}}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e=(0,a.defaultValue)(e,{}))}}]),t}();s.default.Symbol.PictureFillSymbol=l,t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=l(r(2)),o=r(0),a=r(3),s=l(r(19)),u=l(r(125));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=a.SymbolType.mapgisText,r.backgroundPadding=(0,o.defaultValue)(e.backgroundPadding,[5,5]),r.backgroundImage=e.backgroundImage,r.textDecorationUnderlineColor=(0,o.defaultValue)(s.default.fromColor(e.textDecorationUnderlineColor),void 0),r.textDecorationUnderlineWidth=(0,o.defaultValue)(e.textDecorationUnderlineWidth,0),r.textDecorationThroughlineColor=(0,o.defaultValue)(s.default.fromColor(e.textDecorationThroughlineColor),void 0),r.textDecorationThroughlineWidth=(0,o.defaultValue)(e.textDecorationThroughlineWidth,0),r.textShadowOffsetX=(0,o.defaultValue)(e.textShadowOffsetX,0),r.textShadowOffsetY=(0,o.defaultValue)(e.textShadowOffsetY,0),r.textShadowBlur=(0,o.defaultValue)(e.textShadowBlur,1),r.textShadowColor=(0,o.defaultValue)(s.default.fromColor(e.textShadowColor),void 0),r.letterSpacing=(0,o.defaultValue)(e.letterSpacing,0),r.lineMaxNum=(0,o.defaultValue)(e.lineMaxNum,3),r.textWraps=(0,o.defaultValue)(e.textWraps,!1),r.textExtraIcon=e.textExtraIcon,r.textExtraIconAnchor=(0,o.defaultValue)(e.textExtraIconAnchor,"top"),r.textExtraIconSize=(0,o.defaultValue)(e.textExtraIconSize,14),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default),n(t,[{key:"clone",value:function(){return new t(this.toJSON())}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.backgroundPadding=this.backgroundPadding,e.textDecorationUnderlineColor=s.default.fromColor(this.textDecorationUnderlineColor).toJSON(),e.textDecorationUnderlineWidth=this.textDecorationUnderlineWidth,e.textDecorationThroughlineColor=s.default.fromColor(this.textDecorationThroughlineColor).toJSON(),e.textDecorationThroughlineWidth=this.textDecorationThroughlineWidth,e.textShadowOffsetX=this.textShadowOffsetX,e.textShadowOffsetY=this.textShadowOffsetY,e.textShadowBlur=this.textShadowBlur,e.textShadowColor=s.default.fromColor(this.textShadowColor).toJSON(),e.letterSpacing=this.letterSpacing,e.lineMaxNum=this.lineMaxNum,e.textWraps=this.textWraps,e.textExtraIcon=this.textExtraIcon,e.textExtraIconAnchor=this.textExtraIconAnchor,e.textExtraIconSize=this.textExtraIconSize,e}}],[{key:"fromJSON",value:function(e){return new t(e=(0,o.defaultValue)(e,{}))}}]),t}();i.default.Symbol.MapGISTextSymbol=c,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=l(r(48)),o=r(0),a=l(r(78)),s=l(r(2)),u=r(14);function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=a.default.label3D,r.callout=e.callout?u.LineCallout3D.fromJSON(e.callout):new u.LineCallout3D,r.verticalOffset=e.verticalOffset?u.Symbol3DVerticalOffset.fromJSON(e.verticalOffset):new u.Symbol3DVerticalOffset,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.callout=(0,o.toJSON)(this.callout,u.LineCallout3D),e.verticalOffset=(0,o.toJSON)(this.verticalOffset,u.Symbol3DVerticalOffset),e}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();s.default.Symbol.LabelSymbol3D=c,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=s(r(2)),o=r(3),a=s(r(48));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.type=o.SymbolType.line3D,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),n(t,[{key:"toJSON",value:function(){return function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this)}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();i.default.Symbol.LineSymbol3D=u,t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=l(r(78)),a=l(r(48)),s=l(r(2)),u=r(14);function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,i.defaultValue)(e,{}),r.type=o.default.point3D,r.callout=(0,i.defaultValue)(e.callout,void 0),r.verticalOffset=(0,i.defaultValue)(e.verticalOffset,void 0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.callout=(0,i.toJSON)(this.callout,u.LineCallout3D),e.verticalOffset=(0,i.toJSON)(this.verticalOffset,u.Symbol3DVerticalOffset),e}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();s.default.Symbol.PointSymbol3D=c,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=u(r(2)),o=r(0),a=r(3),s=u(r(48));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.type=a.SymbolType.polygon3D,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),n(t,[{key:"toJSON",value:function(){return function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this)}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e=(0,o.defaultValue)(e,{}))}}]),t}();i.default.Symbol.PolygonSymbol3D=l,t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=c(r(2)),o=r(0),a=c(r(121)),s=r(4),u=r(3),l=c(r(47));function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){return t&&e&&"4326"!==e.wkid?(t.spatialReference=e,l.default.project(t,new s.SpatialReference("EPSG:4326"))):t}function h(e){return e.length>2?[e[1],e[0],e[2]]:[e[1],e[0]]}function p(e,t,r){for(var n,i=[],o=0,a=e.length;o<a;o++)n=t?p(e[o],t-1,r):(r||h)(e[o]),i.push(n);return i}var d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,o.defaultValue)(t,{}),this.id=(0,o.defaultValue)(t.id,(0,o.getGUID)()),this.features=(0,o.defaultValue)(t.features,[]),this.spatialReference=(0,o.defaultValue)(t.spatialReference,new s.SpatialReference("EPSG:4326")),this.type="FeatureCollection"}return n(e,[{key:"findFeatureById",value:function(e){for(var t=void 0,r=0;r<this.features.length;r++)if(this.features[r].id===e||this.features[r].attributes.id===e){t=this.features[r];break}return t}},{key:"toJSON",value:function(){var e={};return e.id=this.id,e.features=this.features.map(function(e){return e.toJSON()}),e.spatialReference=this.spatialReference.toJSON(),e.type=this.type,e}},{key:"clone",value:function(){for(var t=new e,r=0;r<this.features.length;r++)t.features.push(this.features[r].clone());return t}},{key:"toGeoJSON",value:function(){for(var e={type:"FeatureCollection",features:[]},t=0;t<this.features.length;t++){var r=this.features[t].clone();if(r.geometry){var n=f(r.geometry.spatialReference,r.geometry);r.geometry=s.Geometry.fromGeoJSON(n)}e.features.push(r.toGeoJSON())}return e}}],[{key:"fromJSON",value:function(t){return new e(t=(0,o.defaultValue)(t,{}))}},{key:"fromGeoJSON",value:function(t){var r=(t=(0,o.defaultValue)(t,{})).type,n=[],i=new s.SpatialReference("EPSG:4326");if(t.crs&&t.crs.properties&&t.crs.properties.name&&(i=new s.SpatialReference({wkt:t.crs.properties.name})),"FeatureCollection"===r)for(var u=(0,o.defaultValue)(t.features,[]),l=0;l<u.length;l++){u[l].properties=(0,o.defaultValue)(u[l].properties,{});var c=u[l].id||u[l].properties.id,f=new a.default({id:c,attributes:JSON.parse(JSON.stringify(u[l].properties)),geometry:s.Geometry.fromGeoJSON(u[l].geometry)});f.geometry.spatialReference=i.clone(),n.push(f)}return new e({spatialReference:i,features:n})}},{key:"fromArray",value:function(t,r,n){var i=(n=(0,o.defaultValue)(n,{})).reverse,l=(0,o.defaultValue)(t,[]);t instanceof e&&(l=(0,o.defaultValue)(t.features,[])),r=(0,o.defaultValue)(r,new e);for(var c=0;c<l.length;c++)if(l[c]&&l[c]instanceof Object){var f=void 0;if(l[c].geometry&&l[c].geometry instanceof Object&&l[c].geometry.type&&l[c].geometry.coordinates)switch(l[c].geometry.type){case u.GeometryType.point:var d=l[c].geometry.coordinates;i&&(d=h(d)),f=new s.Point({coordinates:d});break;case u.GeometryType.multiPoint:var y=l[c].geometry.coordinates;i&&(y=p(y,0,h)),f=new s.MultiPoint({coordinates:y});break;case u.GeometryType.lineString:var g=l[c].geometry.coordinates;i&&(g=p(g,0,h)),f=new s.LineString({coordinates:g});break;case u.GeometryType.multiLineString:var v=l[c].geometry.coordinates;i&&(v=p(v,1,h)),f=new s.MultiLineString({coordinates:v});break;case u.GeometryType.polygon:var m=l[c].geometry.coordinates;i&&(m=p(m,1,h)),f=new s.Polygon({coordinates:m});break;case u.GeometryType.multiPolygon:var _=l[c].geometry.coordinates;i&&(_=p(_,2,h)),f=new s.MultiPolygon({coordinates:_});break;default:f={}}var b=s.SpatialReference.fromJSON(l[c].geometry.spatialReference||r.spatialReference),S=new a.default({attributes:t[c].attributes,geometry:f,symbol:t[c].symbol,additional:t[c].additional});S.geometry.spatialReference=b,r.features.push(S)}return r}}]),e}();i.default.FeatureSet=d,t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeaturesFromFeatureSet=void 0;var n=r(330);t.getFeaturesFromFeatureSet=n.getFeaturesFromFeatureSet},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeaturesFromFeatureSet=void 0;var n=r(86),i=r(0);t.getFeaturesFromFeatureSet=function(e){var t=[];e instanceof n.FeatureSet?t=e.features:Array.isArray(e)&&e.every(function(e){return e instanceof n.Feature})?t=e:i.Log.info("传入要素集错误");for(var r=[],o=0;o<t.length;o++)r[o]=n.Feature.fromJSON(t[o].toJSON());return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProjUnitWkidMap=t.getProjUnitByWkid=t.RadiusUnitToMeter=void 0;var n=r(128);t.RadiusUnitToMeter={degrees:111320,miles:1609.34,"nautical-miles":1852,yard:.9144,meters:1,kilometers:1e3},t.getProjUnitByWkid=function(e){return(0,n.ProjUnitWkidMap)(e)?n.ProjUnitWkidMap.values[(0,n.ProjUnitWkidMap)(e)]:1},t.ProjUnitWkidMap=n.ProjUnitWkidMap},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=u(r(2)),o=u(r(114)),a=r(0),s=u(r(134));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,a.defaultValue)(t,{}),this._videoID=(0,a.defaultValue)(t.videoID,null),this._videoName=(0,a.defaultValue)(t.videoName,null),this._videoSource=(0,a.defaultValue)(t.videoSource,null),this._videoSource){if(this._videoSource.videoUrl){switch(this._videoUrl=(0,a.defaultValue)(this._videoSource.videoUrl,null),this._videoProtocol=(0,a.defaultValue)(this._videoSource.protocol,null),this._videoProtocol){case o.default.mp4:this._videoProtocol=o.default.mp4;break;case o.default.hls:this._videoProtocol=o.default.hls;break;case o.default.rtmp:this._videoProtocol=o.default.rtmp}this._videoProtocol||(this._videoProtocol=(0,a.getVideoType)(this._videoSource.videoUrl))}}else this._videoProtocol=null,this._videoUrl=null;var r=t.videoRegistrationParam?t.videoRegistrationParam:t;this._videoRegistrationParam=new s.default(r),this._videoMetaDataVersion=(0,a.defaultValue)(t.version,null)}return n(e,[{key:"videoID",get:function(){return this._videoID}},{key:"videoName",get:function(){return this._videoName}},{key:"videoSource",get:function(){return this._videoSource}},{key:"videoRegistrationParam",get:function(){return this._videoRegistrationParam}}]),e}();i.default.VideoMetaData=l,t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeometryFilter=t.RequestConfig=void 0;var n=o(r(334)),i=o(r(335));function o(e){return e&&e.__esModule?e:{default:e}}t.RequestConfig=n.default,t.GeometryFilter=i.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(0);var o=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.interceptors=(0,i.defaultValue)(t.interceptors,[])};n.Zondy.Service.RequestConfig=o,t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(1);var o=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,n.defaultValue)(t,{}),this.geometry=(0,n.defaultValue)(t.geometry,void 0),this.spatialRelation=(0,n.defaultValue)(t.spatialRelation,i.SpatialRelation.Intersects)};i.Zondy.Service.GeometryFilter=o,t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1),a=r(3),s=r(0);var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.igsType="2.0",(r.url.indexOf("/igs/rest/mrcs/docs")>-1||r.url.indexOf("/igs/rest/mrms/docs")>-1)&&(r.igsType="1.0"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"queryLayerList",value:function(e){if("2.0"===this.igsType)return this._querySimpleInfo(e,function(e){return e+"/layers?f=json"});if("1.0"===this.igsType){return this._queryByParameters(e,{mapIndex:{type:"String"}},{guid:{type:"String"}},function(e,t){return(e=e.replace("mrms","mrcs"))+"/"+t.mapIndex+"/layers?f=json"})}}},{key:"addLayer",value:function(e){if(this.url.indexOf("/igs/rest/mrcs/docs/")>-1){var t={s:{type:"Array",required:!0,process:function(e){return"&s="+JSON.stringify(e)}}};return e.method=a.FetchMethod.post,this._queryByParameters(e,{mapIndex:{type:"String"}},t,function(e,t){return e+"/"+t.mapIndex+"/layers/add?f=json"})}var r={addInfo:{type:"Array",required:!0,process:function(e){return"&addInfo="+JSON.stringify(e)}},clientId:{type:"String"}};return e.method=a.FetchMethod.post,this._queryByParameters(e,{},r,function(e){return e+"/layers?addInfo"})}},{key:"queryLayerInfo",value:function(e){if("2.0"===this.igsType)return this._queryInfoByLayerId(e,function(e,t){return e+"/layers/"+t.layerId+"?f=json"});if("1.0"===this.igsType){return this._queryByParameters(e,{mapIndex:{type:"String"},layerId:{type:"String"}},{guid:{type:"String"},returnFullStyle:{type:"Boolean"}},function(e,t){return e+"/"+t.mapIndex+"/"+t.layerId+"?f=json"})}}},{key:"deleteLayer",value:function(e){return e.method=a.FetchMethod.delete,this._queryByParameters(e,{layerId:{type:"String"}},{clientId:{type:"String"}},function(e,t){return e+"/layers/"+t.layerId+"?f=json"})}},{key:"queryFeatures",value:function(e){return this._queryByParameters(e,{layerId:{type:"String"}},{where:{type:"String"},geometry:{type:"Geometry"},distance:{type:"Number"},geometryPrecision:{type:"Number"},spatialRel:{type:"String"},outFields:{type:"String"},objectIds:{type:"String"},orderByFields:{type:"String"},groupByFieldsForStatistics:{type:"String"},resultRecordCount:{type:"Number"},resultOffset:{type:"Number"},outStatistics:{type:"OutStatistics"},returnGeometry:{type:"Boolean"},returnAttribute:{type:"Boolean"},returnStyle:{type:"Boolean"},returnIdsOnly:{type:"Boolean"},returnCountOnly:{type:"Boolean"},returnExtentOnly:{type:"Boolean"},returnZ:{type:"Boolean"}},function(e,t){return e+"/layers/"+t.layerId+"/query?f=json"})}},{key:"setSystemLib",value:function(e){return e.method=a.FetchMethod.put,this._queryByParameters(e,{layerId:{type:"String"}},{systemLibId:{type:"String",required:!0},systemLibName:{type:"String",required:!0}},function(e,t){return e+"/layers/"+t.layerId+"/systemLib?f=json"})}},{key:"getLegend",value:function(e){return this._queryByParameters(e,{},{layers:{type:"String"},where:{type:"String"},bbox:{type:"Extent"},page:{type:"Number"},pageSize:{type:"Number"},maxQueryFeatureCount:{type:"Number"},clientId:{type:"String"},size:{type:"String"}},function(e){return e+"/legend?f=json"})}},{key:"queryFeaturesInLayers",value:function(e){var t={layerDefs:{type:"Array",process:function(e){return"&layerDefs="+JSON.stringify(e)}},geometry:{type:"Geometry"},distance:{type:"Number"},geometryPrecision:{type:"Number"},spatialRel:{type:"String"},resultRecordCount:{type:"Number"},returnGeometry:{type:"Boolean"},returnAttribute:{type:"Boolean"},returnStyle:{type:"Boolean"},returnIdsOnly:{type:"Boolean"},returnCountOnly:{type:"Boolean"},returnZ:{type:"Boolean"}};return this._queryByParameters(e,{},t,function(e){return e+"/query?f=json"})}},{key:"getImage",value:function(e){e=(0,s.defaultValue)(e,{});var t=this.url+"/image?f=image",r=(0,s.defaultValue)(e.extent,void 0);(0,s.isNull)(r)||(t+="&bbox="+r.toString());var n=(0,s.defaultValue)(e.width,256),i=(0,s.defaultValue)(e.height,256);return(0,s.isNull)(n)||(0,s.isNull)(i)||(t+="&size="+n+","+i),t}},{key:"exportImage",value:function(e){(e=(0,s.defaultValue)(e,{})).method=(0,s.defaultValue)(e.method,a.FetchMethod.post),e.method===a.FetchMethod.post&&(e.headers={"Content-Type":"application/x-www-form-urlencoded"},e.responseType="blob");return this._queryByParameters(e,{},{size:{type:"String"},clientId:{type:"String"},format:{type:"String"},layers:{type:"String"},dynamicLayers:{type:"String"},layerFilters:{type:"String"},imageTransparent:{type:"Boolean"},f:{type:"String"},bbox:{type:"String"},projectionSrs:{type:"String"},clipping:{type:"String"},isAntialiasing:{type:"Boolean"},layerStyles:{type:"String"},dpi:{type:"String"}},function(e){return e+"/image"})}}]),t}();o.Zondy.Service.MapServer=u,t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1),a=r(3),s=r(0);var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.igsType="2.0",r.url.indexOf("/igs/rest/mrfs")>-1&&(r.igsType="1.0"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"queryLayerInfo",value:function(e){if("1.0"===this.igsType){var t=this.url.replace("mrfs","mrcs");return this._queryInfoByLayerId(e,function(e,r){return t+"/0/"+r.layerId+"?f=json"})}return this._queryInfoByLayerId(e,function(e,t){return e+"/"+t.layerId+"?f=json"})}},{key:"queryFeatures",value:function(e){var t=this,r=void 0,n=void 0;return"1.0"===this.igsType?(r={layerId:{type:"String"}},n={where:{type:"String"},geometry:{type:"Geometry"},geometryType:{type:"String"},geometryPrecision:{type:"Number",alias:"coordPrecision"},outFields:{type:"String",alias:"fields"},objectIds:{type:"String"},orderByFields:{type:"String",alias:"orderField"},groupByFieldsForStatistics:{type:"Array",process:function(e){return"&groupByFieldsForStatistics="+encodeURIComponent(JSON.stringify(e))}},resultRecordCount:{type:"Number",alias:"pageCount"},resultOffset:{type:"Number",alias:"page"},outStatistics:{type:"OutStatistics",alias:"statistics"},rule:{type:"Object",process:function(e){return"&rule="+encodeURIComponent(JSON.stringify(e))}},isAsc:{type:"Boolean"},returnZ:{type:"Boolean",alias:"is3d"}}):(r={layerId:{type:"String"}},n={where:{type:"String"},geometry:{type:"Geometry"},geometryType:{type:"String"},distance:{type:"Number"},geometryPrecision:{type:"Number"},spatialRel:{type:"String"},outFields:{type:"String"},objectIds:{type:"String"},orderByFields:{type:"String"},groupByFieldsForStatistics:{type:"String"},resultRecordCount:{type:"Number"},resultOffset:{type:"Number"},outStatistics:{type:"OutStatistics"},returnGeometry:{type:"Boolean"},returnAttribute:{type:"Boolean"},returnStyle:{type:"Boolean"},returnIdsOnly:{type:"Boolean"},returnCountOnly:{type:"Boolean"},returnExtentOnly:{type:"Boolean"},returnZ:{type:"Boolean"},supportArc3:{type:"Boolean"},inSrs:{type:"String"},outSrs:{type:"String"}}),this._queryByParameters(e,r,n,function(e,r){if("1.0"===t.igsType){var n={IncludeAttribute:!0,IncludeGeometry:!0,IncludeWebGraphic:!1},i=r||{};return i&&((0,s.defined)(i.returnGeometry)&&(n.IncludeGeometry=i.returnGeometry),(0,s.defined)(i.returnAttribute)&&(n.IncludeAttribute=i.returnAttribute),(0,s.defined)(i.returnStyle)&&(n.IncludeWebGraphic=i.returnStyle)),e+"/0/"+r.layerId+"/query?f=json&structs="+encodeURIComponent(JSON.stringify(n))}return e+"/"+r.layerId+"/query?f=json"})}},{key:"queryFeaturesInLayers",value:function(e){var t=void 0,r=void 0;return this.url.indexOf("/igs/rest/mrfs/layer")>-1?(t={},r={gdbp:{type:"String",required:!0},geometry:{type:"Geometry",process:"igsGeometryOld"},distance:{type:"Number",process:function(){return""},default:0},where:{type:"String"},objectIds:{type:"String"},page:{type:"Number"},pageCount:{type:"Number"},rule:{type:"Object",process:function(e){return"&rule="+encodeURIComponent(JSON.stringify(e))}},structs:{type:"Object",process:function(e,t){return"&structs="+encodeURIComponent(JSON.stringify(e||t))},default:{IncludeAttribute:!0,IncludeGeometry:!0,IncludeWebGraphic:!0}},orderField:{type:"String"},isAsc:{type:"Boolean"}},this._queryByParameters(e,t,r,function(e){return e+"/query?f=json"})):this.url.indexOf("/igs/rest/mrfs/docs/")>-1?(t={mapIndex:{type:"Number"},layerIndexes:{type:"String"}},r={geometry:{type:"Geometry",process:"igsGeometryOld"},distance:{type:"Number",process:function(){return""},default:0},where:{type:"String"},objectIds:{type:"String"},page:{type:"Number"},pageCount:{type:"Number"},rule:{type:"Object",process:function(e){return"&rule="+encodeURIComponent(JSON.stringify(e))}},structs:{type:"Object",process:function(e,t){return"&structs="+encodeURIComponent(JSON.stringify(e||t))},default:{IncludeAttribute:!0,IncludeGeometry:!0,IncludeWebGraphic:!0}},orderField:{type:"String"},isAsc:{type:"Boolean"}},this._queryByParameters(e,t,r,function(e,t){return e+"/"+t.mapIndex+"/"+t.layerIndexes+"/query?f=json"})):(t={},r={layerDefs:{type:"Array"},geometry:{type:"Geometry"},distance:{type:"Number"},geometryPrecision:{type:"Number"},spatialRel:{type:"String"},resultRecordCount:{type:"Number"},returnGeometry:{type:"Boolean"},returnAttribute:{type:"Boolean"},returnStyle:{type:"Boolean"},returnIdsOnly:{type:"Boolean"},returnCountOnly:{type:"Boolean"},returnZ:{type:"Boolean"},inSrs:{type:"String"},outSrs:{type:"String"}},this._queryByParameters(e,t,r,function(e){return e+"/query?f=json"}))}},{key:"addFeature",value:function(e){var t=void 0,r=void 0;return this.url.indexOf("/igs/rest/mrfs/layer")>-1?(t={},r={gdbp:{type:"String",required:!0,process:function(){return""}},featureSet:{type:"Object",required:!0,process:function(e){return encodeURIComponent(JSON.stringify(e))}}},e.headers={"Content-Type":"text/plain;charset=UTF-8"},e.method=a.FetchMethod.post,this._queryByParameters(e,t,r,function(e,t){return e+"/addFeatures?f=json&gdbp="+t.gdbp})):this.url.indexOf("/igs/rest/mrfs/docs")>-1?(t={mapIndex:{type:"Number"},layerIndex:{type:"Number"}},r={featureSet:{type:"Object",required:!0,process:function(e){return encodeURIComponent(JSON.stringify(e))}}},e.headers={"Content-Type":"text/plain;charset=UTF-8"},e.method=a.FetchMethod.post,this._queryByParameters(e,t,r,function(e,t){return e+"/"+t.mapIndex+"/"+t.layerIndex+"/addFeatures?f=json"})):(t={layerId:{type:"String"}},r={features:{type:"Array",process:function(e){var t=e.map(function(e){return e.toIGSFeature()});return"&features="+encodeURIComponent(JSON.stringify(t))}}},this._queryByParameters(e,t,r,function(t){return t+"/"+e.layerId+"/add?f=json"}))}},{key:"deleteFeature",value:function(e){var t=void 0,r=void 0;return this.url.indexOf("/igs/rest/mrfs/layer")>-1?(t={},r={gdbp:{type:"String"},objectIds:{type:"String"}},this._queryByParameters(e,t,r,function(e){return e+"/deleteFeatures?f=json"})):this.url.indexOf("/igs/rest/mrfs/docs")>-1?(t={mapIndex:{type:"Number"},layerIndex:{type:"Number"}},r={objectIds:{type:"String",required:!0}},this._queryByParameters(e,t,r,function(e,t){return e+"/"+t.mapIndex+"/"+t.layerIndex+"/deleteFeatures?f=json"})):(t={layerId:{type:"String"}},r={objectIds:{type:"String"},where:{type:"String"},geometry:{type:"Geometry"},distance:{type:"Number"},returnDeleteResults:{type:"Boolean"}},this._queryByParameters(e,t,r,function(t){return t+"/"+e.layerId+"/delete?f=json"}))}},{key:"updateFeature",value:function(e){var t=void 0,r=void 0;return this.url.indexOf("/igs/rest/mrfs/layer")>-1?(t={},r={gdbp:{type:"String",required:!0,process:function(){return""}},featureSet:{type:"Object",required:!0,process:function(e){return encodeURIComponent(JSON.stringify(e))}}},e.headers={"Content-Type":"text/plain;charset=UTF-8"},e.method=a.FetchMethod.post,this._queryByParameters(e,t,r,function(e,t){return e+"/updateFeatures?f=json&gdbp="+t.gdbp})):this.url.indexOf("/igs/rest/mrfs/docs")>-1?(t={mapIndex:{type:"Number"},layerIndex:{type:"Number"}},r={featureSet:{type:"Object",required:!0,process:function(e){return encodeURIComponent(JSON.stringify(e))}}},e.headers={"Content-Type":"text/plain;charset=UTF-8"},e.method=a.FetchMethod.post,this._queryByParameters(e,t,r,function(e,t){return e+"/"+t.mapIndex+"/"+t.layerIndex+"/updateFeatures?f=json"})):(t={layerId:{type:"String"}},r={features:{type:"Array",process:function(e){var t=e.map(function(e){return e.toIGSFeature()});return"&features="+encodeURIComponent(JSON.stringify(t))}}},this._queryByParameters(e,t,r,function(t){return t+"/"+e.layerId+"/update?f=json"}))}},{key:"queryFeatureById",value:function(e){return e.method=a.FetchMethod.get,this._queryByParameters(e,{layerId:{type:"String"},featureId:{type:"String"}},{},function(t){return t+"/"+e.layerId+"/"+e.featureId+"?f=json"})}}]),t}();o.Zondy.Service.FeatureServer=u,t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1);var a=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"queryRootNodeInfo",value:function(e){return this._queryByParameters(e,{},{include:{type:"String"},maxDepth:{type:"Number"},maxCount:{type:"Number"}},function(e){return e+"/nodes/root?f=json"})}},{key:"queryNodeInfo",value:function(e){return this._queryByParameters(e,{nodeId:{type:"String"}},{include:{type:"String"},maxDepth:{type:"Number"},maxCount:{type:"Number"}},function(e,t){return e+"/nodes/"+t.nodeId+"?f=json"})}},{key:"getSharedResources",value:function(e){return this._queryByParameters(e,{},{},function(e){return e+"/sharedResources?f=json"})}}]),t}();o.Zondy.Service.M3DServer=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1);var a=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"queryImageInfo",value:function(e){return this._queryByParameters(e,{},{},function(e){return e+"/info?f=json"})}},{key:"getColorMap",value:function(e){return this._queryByParameters(e,{},{},function(e){return e+"/colorMap?f=json"})}},{key:"getHistograms",value:function(e){return this._queryByParameters(e,{},{},function(e){return e+"/histograms?f=json"})}},{key:"getLegend",value:function(e){return this._queryByParameters(e,{},{size:{type:"String"},bandIds:{type:"String"}},function(e){return e+"/legend?f=json"})}},{key:"getRasterValue",value:function(e){return this._queryByParameters(e,{},{x:{type:"Number",required:!0},y:{type:"Number",required:!0}},function(e){return e+"/rasterValue/?f=json"})}},{key:"getStatistics",value:function(e){return this._queryByParameters(e,{},{},function(e){return e+"/statistics?f=json"})}}]),t}();o.Zondy.Service.ImageServer=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1),a=r(3),s=r(0);var u=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"calculateAreasAndLengths",value:function(e){(e=(0,s.defaultValue)(e,{})).method=(0,s.defaultValue)(e.method,a.FetchMethod.post);return this._queryByParameters(e,{},{polygons:{type:"Polygon",required:!0,process:"igsGeometryServer"}},function(e){return e+"/areasAndLengths?f=json"})}},{key:"calculateArea",value:function(e){return e.headers={"Content-Type":"text/plain;charset=UTF-8"},e.method=a.FetchMethod.post,e.useObject=!0,this._queryByParameters(e,{},{polygon:{type:"Polygon",required:!0,alias:"Dots",process:"igsDots"},projectInfo:{type:"Object",alias:"ProjectInfo",required:!0,oneOf:["projectInfoBySrsID"]},projectInfoBySrsID:{type:"Object",alias:"ProjectInfoBySrsID",required:!0,oneOf:["projectInfo"]}},function(e){return e+"/calArea?f=json"})}},{key:"calculateLength",value:function(e){return e.headers={"Content-Type":"text/plain;charset=UTF-8"},e.method=a.FetchMethod.post,e.useObject=!0,this._queryByParameters(e,{},{lineString:{type:"LineString",required:!0,alias:"Dots",process:"igsDots"},projectInfo:{type:"Object",alias:"ProjectInfo",required:!0,oneOf:["projectInfoBySrsID"]},projectInfoBySrsID:{type:"Object",alias:"ProjectInfoBySrsID",required:!0,oneOf:["projectInfo"]}},function(e){return e+"/callength?f=json"})}},{key:"projectInExtent",value:function(e){return this._queryByParameters(e,{gdbsvrName:{type:"String"},gdbName:{type:"String"},srefID:{type:"String"},desfID:{type:"String"}},{extent:{type:"Extent",alias:"rang",required:!0,process:"igsRange$"},userName:{type:"String"},password:{type:"String"}},function(e,t){return e+"/"+t.gdbsvrName+"/"+t.gdbName+"/"+t.srefID+"/"+t.desfID+"?f=json"})}},{key:"bufferAnalyse",value:function(e){(e=(0,s.defaultValue)(e,{})).method=(0,s.defaultValue)(e.method,a.FetchMethod.post);return this._queryByParameters(e,{},{geometries:{type:"Geometry",required:!0,process:"igsGeometryServerNoSRS"},distance:{type:"Number",required:!0}},function(e){return e+"/buffer?f=json"})}},{key:"calculateDifference",value:function(e){(e=(0,s.defaultValue)(e,{})).method=(0,s.defaultValue)(e.method,a.FetchMethod.post);return this._queryByParameters(e,{},{geometry1:{type:"Geometry",required:!0,process:"igsGeometryServerNoSRS"},geometry2:{type:"Geometry",required:!0,process:"igsGeometryServerNoSRS"},tolerance:{type:"Number",required:!0}},function(e){return e+"/difference?f=json"})}},{key:"calculateDistance",value:function(e){(e=(0,s.defaultValue)(e,{})).method=(0,s.defaultValue)(e.method,a.FetchMethod.post);return this._queryByParameters(e,{},{geometry1:{type:"Geometry",required:!0,process:"igsGeometryServerNoSRS"},geometry2:{type:"Geometry",required:!0,process:"igsGeometryServerNoSRS"},srs:{type:"String",required:!0}},function(e){return e+"/distance?f=json"})}},{key:"calculateIntersect",value:function(e){(e=(0,s.defaultValue)(e,{})).method=(0,s.defaultValue)(e.method,a.FetchMethod.post);return this._queryByParameters(e,{},{geometry1:{type:"Geometry",required:!0,process:"igsGeometryServerNoSRS"},geometry2:{type:"Geometry",required:!0,process:"igsGeometryServerNoSRS"},tolerance:{type:"Number",required:!0}},function(e){return e+"/intersect?f=json"})}},{key:"calculateLabelPoints",value:function(e){(e=(0,s.defaultValue)(e,{})).method=(0,s.defaultValue)(e.method,a.FetchMethod.post);return this._queryByParameters(e,{},{polygons:{type:"Geometry",required:!0,process:"igsGeometryServerNoSRS"}},function(e){return e+"/labelPoints?f=json"})}},{key:"calculateLengths",value:function(e){(e=(0,s.defaultValue)(e,{})).method=(0,s.defaultValue)(e.method,a.FetchMethod.post);return this._queryByParameters(e,{},{polylines:{type:"LineString | MultiLineString",required:!0,process:"igsGeometryServer"}},function(e){return e+"/lengths?f=json"})}},{key:"geometryProject",value:function(e){(e=(0,s.defaultValue)(e,{})).method=(0,s.defaultValue)(e.method,a.FetchMethod.post);return this._queryByParameters(e,{},{geometries:{type:"Geometry",required:!0,process:"igsGeometryServerNoSRS"},inSrs:{type:"String",required:!0},outSrs:{type:"String",required:!0}},function(e){return e+"/project?f=json"})}},{key:"calculateTopologyRelation",value:function(e){(e=(0,s.defaultValue)(e,{})).method=(0,s.defaultValue)(e.method,a.FetchMethod.post);var t=void 0,r=void 0;return this.url.indexOf("/igs/rest/mrgs/geomservice")>-1?(t={},r={distance:{type:"Number",alias:"NearDis",default:.01},point:{type:"Point",alias:"Pnt",process:"toOldIGSGeometry"},lingString:{type:"LineString",alias:"Line",process:"toOldIGSGeometry"},polygon:{type:"Polygon",alias:"Reg",process:"toOldIGSGeometry"},topologyPolygon:{type:"Polygon",alias:"RelativeObj",process:"toOldIGSGeometry"}},e.headers={"Content-Type":"text/plain;charset=UTF-8"},e.method=a.FetchMethod.post,e.useObject=!0,this._queryByParameters(e,t,r,function(e){return e+"/topanalysis?f=json"})):(t={},r={geometry1:{type:"Geometry",required:!0,process:"igsGeometryServerNoSRS"},geometry2:{type:"Geometry",required:!0,process:"igsGeometryServerNoSRS"},tolerance:{type:"Number",required:!0}},this._queryByParameters(e,t,r,function(e){return e+"/relation?f=json"}))}},{key:"smoothLineString",value:function(e){if(e=(0,s.defaultValue)(e,{}),!(0,s.isNull)(e.type)&&!(0,s.isNull)(e.lineString))return e.step=(0,s.defaultValue)(e.step,1),e.headers={"Content-Type":"text/plain;charset=UTF-8"},e.method=a.FetchMethod.post,e.data=JSON.stringify(e.lineString.toDots()),this._postRequest(this.url+"/smooth?f=json&type="+e.type+"&step="+e.step,e)}},{key:"calculateUnion",value:function(e){return this._queryByParameters(e,{},{geometry1:{type:"Geometry",required:!0,process:"igsGeometryServerNoSRS"},geometry2:{type:"Geometry",required:!0,process:"igsGeometryServerNoSRS"},tolerance:{type:"Number",required:!0}},function(e){return e+"/union?f=json"})}}]),t}();o.Zondy.Service.GeometryServer=u,t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1);var a=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"getGeoCode",value:function(e){return this._queryByParameters(e,{},{address:{type:"String",required:!0},province:{type:"String"},city:{type:"String"},country:{type:"String"},geometry:{type:"Polygon | Extent"},where:{type:"String"},aggLevel:{type:"Number"},aggFormat:{type:"Number"},fuzzy:{type:"Boolean"},page:{type:"Number"},pageSize:{type:"Number"}},function(e){return e+"/geocode?f=json"})}},{key:"getReverseGeoCode",value:function(e){return this._queryByParameters(e,{},{location:{type:"String",required:!0},province:{type:"String"},city:{type:"String"},radius:{type:"Number"},geometry:{type:"Geometry"},where:{type:"String"},page:{type:"Number"},pageSize:{type:"Number"}},function(e){return e+"/reverseGeocode?f=json"})}}]),t}();o.Zondy.Service.AddressServer=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1);var a=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"getTileSetJSON",value:function(e){return this._queryByParameters(e,{},{},function(e){return e+"/tileset.json"})}},{key:"queryTileMetadata",value:function(e){return this._queryByParameters(e,{},{},function(e){return e+"?f=json"})}}]),t}();o.Zondy.Service.Cesium3DTilesServer=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1);var a=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"queryPoi",value:function(e){return this._queryByParameters(e,{},{keywords:{type:"String"},typeCode:{type:"String"},type:{type:"String"},geometry:{type:"Geometry"},city:{type:"String"},cityCode:{type:"String"},adCode:{type:"String"},cityLimit:{type:"Boolean"},page:{type:"Number"},pageSize:{type:"Number"}},function(e){return e+"/search?f=json"})}}]),t}();o.Zondy.Service.PoiServer=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1);var a=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"addToken",value:function(e){return this._queryByParameters(e,{userName:{type:"String"}},{password:{type:"String",required:!0},clientType:{type:"String"},clientInfo:{type:"String"},expirationTime:{type:"Number",required:!0}},function(e,t){return e+"/tokens?"+t.userName})}}]),t}();o.Zondy.Service.SecurityServer=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1);var a=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"queryRootServiceList",value:function(e){return this._queryByParameters(e,{},{name:{type:"String"},protocols:{type:"String"}},function(e){return e+"?f=json"})}},{key:"queryFolderServiceList",value:function(e){return this._queryByParameters(e,{folder:"String"},{name:{type:"String"},protocols:{type:"String"}},function(t){return t+"/"+e.folder+"?f=json"})}}]),t}();o.Zondy.Service.RootServer=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),i=r(1);var o=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n.default),t}();i.Zondy.Service.TileServer=o,t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1),a=r(0);var s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.igsType="2.0",r.url.indexOf("/igs/rest/mrcs/vtiles/")>-1&&(r.igsType="1.0"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"queryServerInfo",value:function(e){var t=this,r=this;return this._querySimpleInfo(e,function(e){return"1.0"===t.igsType?e.replace("/mrcs/vtiles/","/mrcs/tiles/")+"?f=json":e+"?f=json"+r._paramString})}},{key:"getFonts",value:function(e){return this._querySimpleInfo(e,function(e){return e+"/fonts?f=json"})}},{key:"getSprite",value:function(e){var t=this;return e=(0,a.defaultValue)(e,{}),this._querySimpleInfo(e,function(r){return"1.0"===t.igsType?r+"/sprite"+(0,a.defaultValue)(e.param,".json"):r+"/sprites/sprite"+(0,a.defaultValue)(e.param,".json")})}},{key:"getStyle",value:function(e){var t=this;return this._querySimpleInfo(e,function(e){return"1.0"===t.igsType?e.replace("mrcs/vtiles","mrcs/vtiles/0")+"?f=json":e+"/style?f=json"})}}]),t}();o.Zondy.Service.VectorTileServer=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1),a=r(3);var s=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"queryLayerList",value:function(e){return this._querySimpleInfo(e,function(e){return e+"/layers?f=json"})}},{key:"updateLayer",value:function(e){return e.method=a.FetchMethod.post,this._queryByParameters(e,{},{layerName:{type:"String",required:!0},content:{type:"FeatureCollection",required:!0},layerId:{type:"String"}},function(e){return e+"/layers?f=json"})}},{key:"getLayer",value:function(e){return this._queryByParameters(e,{},{layerId:{type:"String",required:!0}},function(e,t){return e+"/layers/"+t.layerId+"?f=json"})}},{key:"deleteLayer",value:function(e){return e.method=a.FetchMethod.delete,this._queryByParameters(e,{layerId:{type:"String"}},{},function(e,t){return e+"/layers/"+t.layerId+"?f=json"})}},{key:"queryAnimationScriptList",value:function(e){return this._querySimpleInfo(e,function(e){return e+"/scripts?f=json"})}},{key:"updateAnimationScript",value:function(e){return e.method=a.FetchMethod.post,this._queryByParameters(e,{},{scriptName:{type:"String",required:!0},content:{type:"String",required:!0},scriptId:{type:"String"}},function(e){return e+"/scripts?f=json"})}},{key:"getAnimationScript",value:function(e){return this._queryByParameters(e,{scriptId:{type:"String"}},{},function(e,t){return e+"/scripts/"+t.scriptId+"?f=json"})}},{key:"deleteAnimationScript",value:function(e){return e.method=a.FetchMethod.delete,this._queryByParameters(e,{scriptId:{type:"String"}},{},function(e,t){return e+"/scripts/"+t.scriptId+"?f=json"})}},{key:"getSymbolLibList",value:function(e){return this._querySimpleInfo(e,function(e){return e+"/symbolLibs?f=json"})}},{key:"getSymbolLib",value:function(e){return this._queryByParameters(e,{libId:{type:"String"}},{},function(e,t){return e+"/symbolLibs/"+t.libId+"?f=json"})}},{key:"getSymbol",value:function(e){return this._queryByParameters(e,{libId:{type:"String"},symbolId:{type:"String"}},{},function(e,t){return e+"/symbolLibs/"+t.libId+"/symbols/"+t.symbolId+"?f=xml"})}},{key:"deleteSymbol",value:function(e){return e.method=a.FetchMethod.delete,this._queryByParameters(e,{libId:{type:"String"},symbolId:{type:"String"}},{},function(e,t){return e+"/symbolLibs/"+t.libId+"/symbols/"+t.symbolId+"?f=json"})}}]),t}();o.Zondy.Service.PlotServer=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=u(r(6)),o=r(1),a=r(0),s=u(r(91));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.igsType="2.0",r.url.indexOf("/igs/rest/mrcs")>-1&&(r.igsType="1.0"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"queryDataSourceList",value:function(e){var t=this;return this._queryByParameters(e,{},{},function(e){var r="1.0"===t.igsType?"datasource":"datasources";return"1.0"===t.igsType?e+"/"+r:e+"/"+r+"?f=json"})}},{key:"queryDataSourceInfo",value:function(e){return this._queryByParameters(e,{datasource:{type:"String"}},{},function(t){return t+"/datasources/"+e.datasource+"?f=json"})}},{key:"queryGDBList",value:function(e){var t=this;return this._queryByParameters(e,{datasource:{type:"String"}},{userName:{type:"String"}},function(r){var n="1.0"===t.igsType?"datasource":"datasources";return"1.0"===t.igsType?r+"/"+n+"/"+e.datasource:r+"/"+n+"/"+e.datasource+"/gdbs?f=json"})}},{key:"addGDB",value:function(e){var t=this,r={},n={};return"2.0"===this.igsType?(r={datasource:{type:"String"}},n={gdbName:{type:"String"},userName:{type:"String"},path:{type:"String"}}):(r={gdbName:{type:"String"}},n={datasource:{type:"String",alias:"gdbSvrName"},userName:{type:"String",alias:"gdbUserName"},path:{type:"String"}}),this._queryByParameters(e,r,n,function(r){var n="1.0"===t.igsType?"datasource":"datasources";return"1.0"===t.igsType?r+"/gdb/creat/"+e.gdbName:r+"/"+n+"/"+e.datasource+"/gdbs"})}},{key:"attachGDB",value:function(e){var t=this,r={},n={};return"2.0"===this.igsType?(r={datasource:{type:"String"}},n={gdbName:{type:"String",required:!0},useName:{type:"String"},path:{type:"String",required:!0}}):(r={gdbName:{type:"String"}},n={datasource:{type:"String",alias:"gdbSvrName"},userName:{type:"String",alias:"gdbUserName"},path:{type:"String"}}),this._queryByParameters(e,r,n,function(r){var n="1.0"===t.igsType?"datasource":"datasources";return"1.0"===t.igsType?r+"/gdb/attach/"+e.gdbName:r+"/"+n+"/"+e.datasource+"/gdbs/attach"})}},{key:"deleteGDB",value:function(e){var t=this,r={},n={};return"2.0"===this.igsType?(r={datasource:{type:"String"},gdbName:{type:"String"}},n={useName:{type:"String"}}):(r={gdbName:{type:"String"}},n={datasource:{type:"String",alias:"gdbSvrName"},userName:{type:"String",alias:"gdbUserName"},path:{type:"String"}}),this._queryByParameters(e,r,n,function(r){var n="1.0"===t.igsType?"datasource":"datasources";return"1.0"===t.igsType?r+"/gdb/delete/"+e.gdbName:r+"/"+n+"/"+e.datasource+"/gdbs/"+e.gdbName})}},{key:"detachGDB",value:function(e){var t=this,r={},n={};return"2.0"===this.igsType?(r={datasource:{type:"String"},gdbName:{type:"String"}},n={useName:{type:"String"}}):(r={gdbName:{type:"String"}},n={datasource:{type:"String",alias:"gdbSvrName"},userName:{type:"String",alias:"gdbUserName"},path:{type:"String"}}),this._queryByParameters(e,r,n,function(r){var n="1.0"===t.igsType?"datasource":"datasources";return"1.0"===t.igsType?r+"/gdb/delete/"+e.gdbName:r+"/"+n+"/"+e.datasource+"/gdbs/"+e.gdbName+"/detach"})}},{key:"queryFeatureDataSourceList",value:function(e){var t=this,r={},n={};return"2.0"===this.igsType?(r={datasource:{type:"String"},gdbName:{type:"String"}},n={useName:{type:"String"}}):r={datasource:{type:"String"},gdbName:{type:"String"}},this._queryByParameters(e,r,n,function(r){var n="1.0"===t.igsType?"datasource":"datasources";return"1.0"===t.igsType?r+"/"+n+"/"+e.datasource+"/"+e.gdbName+"/fds":r+"/"+n+"/"+e.datasource+"/gdbs/"+e.gdbName+"/fds?f=json"})}},{key:"queryTileDataSourceList",value:function(e){var t=this,r={},n={};return"2.0"===this.igsType?(r={datasource:{type:"String"},gdbName:{type:"String"}},n={useName:{type:"String"}}):r={datasource:{type:"String"},gdbName:{type:"String"}},this._queryByParameters(e,r,n,function(r){var n="1.0"===t.igsType?"datasource":"datasources";return"1.0"===t.igsType?r+"/"+n+"/"+e.datasource+"/"+e.gdbName+"/rds":r+"/"+n+"/"+e.datasource+"/gdbs/"+e.gdbName+"/rds?f=json"})}},{key:"querySimpleFeatureList",value:function(e){var t=this,r={},n={};return"2.0"===this.igsType?(r={datasource:{type:"String"},gdbName:{type:"String"}},n={useName:{type:"String"},fdsName:{type:"String"},includeAll:{type:"Boolean"}}):r={datasource:{type:"String"},gdbName:{type:"String"}},this._queryByParameters(e,r,n,function(r){var n="1.0"===t.igsType?"datasource":"datasources";return"1.0"===t.igsType?r+"/"+n+"/"+e.datasource+"/"+e.gdbName+"/sfcls":r+"/"+n+"/"+e.datasource+"/gdbs/"+e.gdbName+"/sfcls?f=json"})}},{key:"addClass",value:function(e){var t,r;t={datasource:{type:"String"},gdbName:{type:"String"},featureType:{type:"String"}},r={userName:{type:"String"},layerName:{type:"String",required:!0},geomType:{type:"String",required:!0},srs:{type:"String"},fdsName:{type:"String"},fields:{type:"Array",process:function(e){return"&fields="+JSON.stringify(e)},required:!0}};var n=e||{};return n.featureType=(0,a.defaultValue)(n.featureType,"sfcls"),this._queryByParameters(n,t,r,function(t){return t+"/datasources/"+e.datasource+"/gdbs/"+e.gdbName+"/"+e.featureType})}},{key:"getSimpleFeature",value:function(e){return this._queryByParameters(e,{datasource:{type:"String"},gdbName:{type:"String"},featureSetName:{type:"String"}},{userName:{type:"String"}},function(t){return t+"/datasources/"+e.datasource+"/gdbs/"+e.gdbName+"/sfcls/"+e.featureSetName+"?f=json"})}},{key:"updateSimpleFeature",value:function(e){var t={userName:{type:"String"},updateInfo:{type:"Object",required:!0,process:function(e){return"&updateInfo="+JSON.stringify(e)}}};return this._queryByParameters(e,{datasource:{type:"String"},gdbName:{type:"String"},featureSetName:{type:"String"}},t,function(t){return t+"/datasources/"+e.datasource+"/gdbs/"+e.gdbName+"/sfcls/"+e.featureSetName})}},{key:"deleteSimpleFeature",value:function(e){return this._queryByParameters(e,{datasource:{type:"String"},gdbName:{type:"String"},featureSetName:{type:"String"}},{userName:{type:"String"}},function(t){return t+"/datasources/"+e.datasource+"/gdbs/"+e.gdbName+"/sfcls/"+e.featureSetName})}},{key:"querySrsList",value:function(e){var t=this,r={},n={};return"2.0"===this.igsType?(r={datasource:{type:"String"},gdbName:{type:"String"}},n={useName:{type:"String"}}):(r={datasource:{type:"String"},gdbName:{type:"String"}},n={useName:{type:"String",alias:"user"}}),this._queryByParameters(e,r,n,function(r){var n="1.0"===t.igsType?"datasource":"datasources";return"1.0"===t.igsType?r+"/"+n+"/"+e.datasource+"/"+e.gdbName+"?f=json":r+"/datasources/"+e.datasource+"/gdbs/"+e.gdbName+"/spatialRefs?f=json"})}},{key:"querySrsInfo",value:function(e){var t=this,r={},n={};return this.igsType,r={datasource:{type:"String"},gdbName:{type:"String"},srsName:{type:"String"}},n={useName:{type:"String"}},this._queryByParameters(e,r,n,function(r){var n="1.0"===t.igsType?"datasource":"datasources";return"1.0"===t.igsType?r+"/"+n+"/"+e.datasource+"/"+e.gdbName+"/"+e.srsName+"?f=json":r+"/datasources/"+e.datasource+"/gdbs/"+e.gdbName+"/spatialRefs/"+e.srsName+"?f=json"})}},{key:"querySystemLibList",value:function(e){var t=this;return this._queryByParameters(e,{},{},function(e){return"1.0"===t.igsType?e+"/systemlibraries?f=json":e+"/systemLibs?f=json"})}},{key:"querySystemColorList",value:function(e){var t=this,r={},n={};return"2.0"===this.igsType?(r={sysLib:{type:"String"}},n={page:{type:"Number"},pageSize:{type:"Number"}}):(r={},n={page:{type:"Number"},pageSize:{type:"Number",alias:"size"},sysLib:{type:"String",alias:"systemLib"}}),this._queryByParameters(e,r,n,function(r){return"1.0"===t.igsType?r+"/colors?f=json":r+"/systemLibs/"+e.sysLib+"/colors?f=json"})}},{key:"getColorIndex",value:function(e){var t=this,r={},n={};return"2.0"===this.igsType?(r={sysLib:{type:"String"}},n={color:{type:"Color",required:!0,process:function(e){return"&red="+e.red+"&green="+e.green+"&blue="+e.blue}},addIfNotExist:{type:"Boolean"}}):(r={},n={sysLib:{type:"String",alias:"libID"},color:{type:"Color",required:!0,process:function(e){return"&r="+e.red+"&g="+e.green+"&b="+e.blue}},addIfNotExist:{type:"Boolean",alias:"addNewColor"}}),this._queryByParameters(e,r,n,function(r){return"1.0"===t.igsType?r+"/ColorLib/getColorNO?f=json":r+"/systemLibs/"+e.sysLib+"/colors/findColorNo?f=json"})}},{key:"getColorByIndex",value:function(e){var t=this,r={},n={};return"2.0"===this.igsType?(r={sysLib:{type:"String"},colorIndex:{type:"String"}},n={}):(r={},n={sysLib:{type:"String",alias:"libID"},colorIndex:{type:"String",alias:"colorNO"}}),this._queryByParameters(e,r,n,function(r){return"1.0"===t.igsType?r+"/ColorLib/getColorRGB?f=json":r+"/systemLibs/"+e.sysLib+"/colors/"+e.colorIndex+"?f=json"})}},{key:"queryTempDataServerInfo",value:function(e){return this._queryByParameters(e,{},{},function(e){return e+"/tempData?f=json"})}},{key:"queryTempDataFeatures",value:function(e){var t={url:{type:"String"},mapResource:{type:"Object",process:function(e){return"&mapResource="+JSON.stringify(e)}},where:{type:"String"},geometry:{type:"Geometry"},distance:{type:"Number"},geometryPrecision:{type:"Number"},spatialRel:{type:"String"},outFields:{type:"String"},objectIds:{type:"String"},orderByFields:{type:"String"},groupByFieldsForStatistics:{type:"String"},resultRecordCount:{type:"Number"},resultOffset:{type:"Number"},outStatistics:{type:"OutStatistics"},returnGeometry:{type:"Boolean"},returnAttribute:{type:"Boolean"},returnStyle:{type:"Boolean"},returnIdsOnly:{type:"Boolean"},returnCountOnly:{type:"Boolean"},returnExtentOnly:{type:"Boolean"},returnZ:{type:"Boolean"},is6xAcls:{type:"Boolean"}};return this._queryByParameters(e,{},t,function(e){return e+"/tempData/features/query?f=json"})}},{key:"queryTempDataInfo",value:function(e){return this._queryByParameters(e,{},{url:{type:"String",required:!0}},function(e){return e+"/tempData/info?f=json"})}},{key:"editTempDataInfo",value:function(e){return this._queryByParameters(e,{},{urls:{type:"String",required:!0},systemLibId:{type:"String"},systemLibName:{type:"String"}},function(e){return e+"/tempData/systemLib?f=json"})}},{key:"createGdbLayer",value:function(e){var t={attStruct:{type:function(e){return e instanceof s.default},process:function(e){return JSON.stringify(e)},required:!0}};return this._queryByParameters(e,{gdbSvrName:{type:"String"},gdbName:{type:"String"},featureType:{type:"String"},layerName:{type:"String"}},t,function(t){var r=(0,a.defaultValue)(e,{}),n=(0,a.defaultValue)(r.srefName,""),i=(0,a.defaultValue)(r.dsName,"");return t+"/datasource/"+e.gdbSvrName+"/"+e.gdbName+"/"+e.featureType+"/"+e.layerName+"/create?f=json&geoType="+e.geoType+"&srefName="+n+"&dsName="+i})}},{key:"queryGdbpAllData",value:function(e){return this._queryByParameters(e,{gdbSvrName:{type:"String"},gdbName:{type:"String"},clsType:{type:"String"}},{useName:{type:"String",alias:"user"},password:{type:"String",alias:"pwd"}},function(t){return t+"/datasource/"+e.gdbSvrName+"/"+e.gdbName+"/"+e.clsType+"?f=json"})}},{key:"queryDsAllData",value:function(e){return this._queryByParameters(e,{gdbSvrName:{type:"String"},gdbName:{type:"String"},clsType:{type:"String"},dsName:{type:"String"}},{useName:{type:"String",alias:"user"},password:{type:"String",alias:"pwd"}},function(t){return t+"/datasource/"+e.gdbSvrName+"/"+e.gdbName+"/"+e.dsName+"/"+e.clsType+"?f=json"})}},{key:"createLayerInGdbp",value:function(e){var t={attStruct:{type:function(e){return e instanceof s.default},process:function(e){return JSON.stringify(e)},required:!0}};return this._queryByParameters(e,{gdbSvrName:{type:"String"},gdbName:{type:"String"},featureType:{type:"String"},layerName:{type:"String"}},t,function(t){var r=(0,a.defaultValue)(e.srefName,"");r||a.Log.error("geoType传入参数为空");var n=(0,a.defaultValue)(e.srefName,""),i=(0,a.defaultValue)(e.dsName,"");return t+"/datasource/"+e.gdbSvrName+"/"+e.gdbName+"/"+e.featureType+"/"+e.layerName+"/create?f=json&geoType="+r+"&srefName="+n+"&dsName="+i})}},{key:"deleteLayerInGdbp",value:function(e){return this._queryByParameters(e,{gdbSvrName:{type:"String"},gdbName:{type:"String"},featureType:{type:"String"},layerName:{type:"String"}},{},function(t){return t+"/datasource/"+e.gdbSvrName+"/"+e.gdbName+"/"+e.featureType+"/"+e.layerName+"/delete?f=json"})}},{key:"updateLayerInGdbp",value:function(e){var t={updateObject:{type:"Object",process:function(e){return JSON.stringify(e)}}};return this._queryByParameters(e,{gdbSvrName:{type:"String"},gdbName:{type:"String"},featureType:{type:"String"},layerName:{type:"String"}},t,function(t){return t+"/datasource/"+e.gdbSvrName+"/"+e.gdbName+"/"+e.featureType+"/"+e.layerName+"?f=json&userName="+(0,a.defaultValue)(e.userName,"")})}},{key:"editMapLayerSystemLib",value:function(e){return this._queryByParameters(e,{docName:{type:"String"},mapIndex:{type:"String"}},{systemLib:{type:"String"},layerIndexs:{type:"String"},guid:{type:"String"}},function(t){return t+"/doc/"+e.docName+"/"+e.mapIndex+"/setSystemLibrary?f=json"})}},{key:"queryMapDocList",value:function(e){return this._queryByParameters(e,{},{version:{type:"String",alias:"v"}},function(e){return e+"/docs?f=json"})}},{key:"addMapLayer",value:function(e){var t={updateObject:{type:"Object",process:function(e){return JSON.stringify(e)}}};return this._queryByParameters(e,{docName:{type:"String"},mapIndex:{type:"String"}},t,function(t){return t+"/docs/"+e.docName+"/"+e.mapIndex+"/layers/add?f=json"})}},{key:"removeMapLayer",value:function(e){return this._queryByParameters(e,{docName:{type:"String"},mapIndex:{type:"String"}},{layerIndexs:{type:"String",alias:"layerIDs"},guid:{type:"String"}},function(t){return t+"/docs/"+e.docName+"/"+e.mapIndex+"/layers/delete?f=json"})}},{key:"editMapLayerIndex",value:function(e){var t={updateObject:{type:"Object",process:function(e){return JSON.stringify(e)}}};return this._queryByParameters(e,{docName:{type:"String"},mapIndex:{type:"String"}},t,function(t){return t+"/docs/"+e.docName+"/"+e.mapIndex+"/layers/index?f=json&guid="+e.guid})}},{key:"queryMapInfo",value:function(e){var t={tree:{type:"Boolean"},include:{type:"Object",process:function(e){return JSON.stringify(e)}},returnFullStyle:{type:"String"},guid:{type:"String"}};return this._queryByParameters(e,{docName:{type:"String"}},t,function(t){return t+"/docs/"+e.docName+"?f=json"})}},{key:"queryMapInfoByIndex",value:function(e){var t={include:{type:"Object",process:function(e){return JSON.stringify(e)}},returnFullStyle:{type:"String"},guid:{type:"String"}};return this._queryByParameters(e,{docName:{type:"String"},mapIndex:{type:"String"}},t,function(t){return t+"/docs/"+e.docName+"/"+e.mapIndex+"?f=json"})}},{key:"queryMapLayerInfo",value:function(e){return this._queryByParameters(e,{docName:{type:"String"},mapIndex:{type:"String"}},{guid:{type:"String"}},function(t){return t+"/docs/"+e.docName+"/"+e.mapIndex+"/layers?f=json"})}},{key:"queryMapLayerInfoByIndex",value:function(e){return this._queryByParameters(e,{docName:{type:"String"},mapIndex:{type:"String"},layerIndex:{type:"String"}},{returnFullStyle:{type:"String"},guid:{type:"String"}},function(t){return t+"/docs/"+e.docName+"/"+e.mapIndex+"/"+e.layerIndex+"?f=json"})}},{key:"queryDataSourceFeatureClassList",value:function(e){return this._queryByParameters(e,{gdbServerName:{type:"String"},gdbName:{type:"String"},dsName:{type:"String"}},{useName:{type:"String",alias:"user"},password:{type:"String",alias:"pwd"}},function(t){return t+"/featurelist/"+e.gdbServerName+"/"+e.gdbName+"/"+e.dsName+"?f=json"})}},{key:"operaGdbp",value:function(e){return this._queryByParameters(e,{operType:{type:"String"},gdbName:{type:"String"}},{gdbServerName:{type:"String",alias:"gdbSvrName"},gdbUserName:{type:"String",alias:"gdbUserName"},password:{type:"String",alias:"gdbPwd"},path:{type:"String"}},function(t){return t+"/gdb/"+e.operType+"/"+e.gdbName+"?f=json"})}},{key:"editLayerSystemLib",value:function(e){return this._queryByParameters(e,{},{systemLib:{type:"String"},gdbps:{type:"String"}},function(e){return e+"/layer/setSystemLibrary?f=json"})}},{key:"queryGDBPInfo",value:function(e){return this._queryByParameters(e,{},{gdbpUrl:{type:"String"},proj:{type:"String"}},function(e){return e+"/layerinfo?f=json"})}},{key:"queryLegendInfo",value:function(e){return this._queryByParameters(e,{docName:{type:"String"}},{layerIndex:{type:"String"},size:{type:"String"},guid:{type:"String"},maxCount:{type:"String"},page:{type:"String"},pageSize:{type:"String"},where:{type:"String"},range:{type:"String"}},function(t){return t+"/legend/"+e.docName+"?f=json"})}},{key:"querySymbol",value:function(e){return this._queryByParameters(e,{},{systemLib:{type:"String"},type:{type:"String"},systemNo:{type:"String"},systemSubNo:{type:"String"}},function(e){return e+"/symbol?f=json"})}},{key:"querySymbolList",value:function(e){return this._queryByParameters(e,{},{systemLib:{type:"String"},type:{type:"String"},page:{type:"String"},size:{type:"String"}},function(e){return e+"/symbols?f=json"})}},{key:"queryTileList",value:function(e){return this._queryByParameters(e,{},{version:{type:"String",alias:"v"}},function(e){return e+"/tiles?f=json"})}},{key:"queryTileInfo",value:function(e){return this._queryByParameters(e,{name:{type:"String"}},{version:{type:"String",alias:"v"}},function(t){return t+"/tiles/"+e.name+"?f=json"})}},{key:"queryVectorTileFontList",value:function(e){return this._queryByParameters(e,{},{},function(e){return e+"/vtiles/fonts"})}},{key:"queryVectorTileFont",value:function(e){return this._queryByParameters(e,{fontstack:{type:"String"},range:{type:"String"}},{},function(t){return t+"/vtiles/fonts/"+e.fontstack+"/"+e.range+"?f=json"})}},{key:"queryVectorTileStyleList",value:function(e){return this._queryByParameters(e,{},{},function(e){return e+"/vtiles/styles?f=json"})}},{key:"queryVectorTileStyle",value:function(e){return this._queryByParameters(e,{fileName:{type:"String"}},{},function(t){return t+"/vtiles/styles/"+e.fileName+".json"})}},{key:"queryVectorTileServiceFont",value:function(e){return this._queryByParameters(e,{serviceName:{type:"String"}},{},function(t){return t+"/vtiles/"+e.serviceName+"/fonts"})}},{key:"queryVectorTileServiceSprite",value:function(e){return this._queryByParameters(e,{format:{type:"String"},serviceName:{type:"String"}},{},function(t){return t+"/vtiles/"+e.serviceName+"/sprite"+e.format})}},{key:"updateVectorTileServiceStyle",value:function(e){var t={updateObject:{type:"Object",process:function(e){return JSON.stringify(e)}}};return this._queryByParameters(e,{serviceName:{type:"String"}},t,function(t){return t+"/vtiles/"+e.serviceName+"/styles"})}},{key:"queryVectorTileServiceStyle",value:function(e){return this._queryByParameters(e,{serviceName:{type:"String"},tpl:{type:"String"}},{},function(t){return t+"/vtiles/"+e.tpl+"/"+e.serviceName})}}]),t}();o.Zondy.Service.ResourceServer=l,t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1),a=r(0),s=r(3),u=r(50);var l=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"queryLayerListInfo",value:function(e){return this._querySimpleInfo(e,function(e){return e+"/layers?f=json"})}},{key:"queryLayerInfo",value:function(e){return this._queryInfoByLayerId(e,function(e,t){return e+"/layers/"+t.layerId+"?f=json"})}},{key:"getCoverings",value:function(e){if(e=(0,a.defaultValue)(e,{}),this._checkPathParameters(e)){var t=this.url+"/layers/"+e.layerId+"/coverings?f=image";e.method=s.FetchMethod.get;return a.Log.info("SceneServer.getCoverings。"),this._checkAndRequest((0,u.checkParam)(e,{bbox:{type:"Extent"},size:{type:"String"},transparent:{type:"Boolean"},format:{type:"String"},isAntialiasing:{type:"Boolean"}}),t,e)}}},{key:"queryM3DInfo",value:function(e){return this._queryInfoByLayerId(e,function(e,t){return e+"/layers/"+t.layerId+"/m3d?f=json"})}},{key:"queryRootNodeInfo",value:function(e){return this._queryByParameters(e,{layerId:{type:"String"}},{include:{type:"String"},maxDepth:{type:"Number"},maxCount:{type:"Number"}},function(e,t){return e+"/layers/"+t.layerId+"/m3d/nodes/root?f=json"})}},{key:"queryNodeInfo",value:function(e){return this._queryByParameters(e,{layerId:{type:"String"},nodeId:{type:"String"}},{include:{type:"String"},maxDepth:{type:"Number"},maxCount:{type:"Number"}},function(e,t){return e+"/layers/"+t.layerId+"/m3d/nodes/"+t.nodeId+"?f=json"})}},{key:"getSharedResources",value:function(e){return this._queryInfoByLayerId(e,function(e,t){return e+"/layers/"+t.layerId+"/m3d/sharedResources"})}},{key:"queryFeatures",value:function(e){return this._queryByParameters(e,{layerId:{type:"String"}},{geometry:{type:"Geometry"},where:{type:"String"},outFields:{type:"String"},objectIds:{type:"String"},distance:{type:"Number"},geometryPrecision:{type:"Number"},spatialRel:{type:"String"},orderByFields:{type:"String"},groupByFieldsForStatistics:{type:"String"},resultRecordCount:{type:"Number"},resultOffset:{type:"Number"},outStatistics:{type:"OutStatistics"},returnGeometry:{type:"Boolean"},returnAttribute:{type:"Boolean"},returnStyle:{type:"Boolean"},returnIdsOnly:{type:"Boolean"},returnCountOnly:{type:"Boolean"},returnExtentOnly:{type:"Boolean"},returnZ:{type:"Boolean"}},function(e,t){return e+"/layers/"+t.layerId+"/query?f=json"})}},{key:"queryFeaturesInLayers",value:function(e){if(this.url.indexOf("/igs/rest/g3d/")>-1){var t={docName:{type:"String"},layerIndex:{type:"String"},gdbp:{type:"String"},where:{type:"String"},geometry:{type:"Geometry",process:"igsGeometryOld"},distance:{type:"Number",default:0},structs:{type:"Object",process:function(e,t){return"&structs="+JSON.stringify(e||t)},default:{IncludeAttribute:!0,IncludeGeometry:!0,IncludeWebGraphic:!0}},page:{type:"Number"},pageCount:{type:"Number"},objectIds:{type:"String"},orderField:{type:"String"},isAsc:{type:"Boolean"},rtnLabel:{type:"Boolean"}};return this._queryByParameters(e,{ip:{type:"String"},port:{type:"String"}},t,function(e,t){return"http://"+t.ip+":"+t.port+"/igs/rest/g3d/getFeature?f=json"})}var r={layerDefs:{type:"Array",process:function(e){return"&layerDefs="+JSON.stringify(e)}},geometry:{type:"Geometry"},distance:{type:"Number"},geometryPrecision:{type:"Number"},spatialRel:{type:"String"},resultRecordCount:{type:"Number"},returnGeometry:{type:"Boolean"},returnAttribute:{type:"Boolean"},returnStyle:{type:"Boolean"},returnIdsOnly:{type:"Boolean"},returnCountOnly:{type:"Boolean"},returnZ:{type:"Boolean"}};return this._queryByParameters(e,{},r,function(e){return e+"/query?f=json"})}},{key:"queryDocInfo",value:function(e){return this._querySimpleInfo(e,function(e){return e+"/GetDocInfo?f=json&format=json"})}},{key:"queryDocListInfo",value:function(e){return this._queryByParameters(e,{ip:{type:"String"},port:{type:"String"}},{},function(e,t){return"http://"+t.ip+":"+t.port+"/igs/rest/g3d/GetDocList?f=json"})}}]),t}();o.Zondy.Service.SceneServer=l,t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WPSServer=t.WMTSServer=t.WMSServer=t.WFSServer=t.WCSServer=void 0;var n=u(r(352)),i=u(r(353)),o=u(r(354)),a=u(r(355)),s=u(r(356));function u(e){return e&&e.__esModule?e:{default:e}}t.WCSServer=n.default,t.WFSServer=i.default,t.WMSServer=o.default,t.WMTSServer=a.default,t.WPSServer=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),i=r(1);var o=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n.default),t}();i.Zondy.Service.WCSServer=o,t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1),a=r(0);var s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.version=(0,a.defaultValue)(e.version,"2.0.0"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"getCapabitities",value:function(e){var t=this;return this._querySimpleInfo(e,function(e){return e+"?request=GetCapabilities&service=WFS&version="+t.version})}},{key:"queryFeatures",value:function(e){var t=this;return this._queryByParameters(e,{},{maxfeatures:{type:"Number",default:1e3},typename:{type:"String",required:!0}},function(e){return e+"?request=GetFeature&service=WFS&version="+t.version})}}]),t}();o.Zondy.Service.WFSServer=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1),a=r(0);var s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.version=(0,a.defaultValue)(e.version,"1.1.1"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"getCapabitities",value:function(e){var t=this;return this._querySimpleInfo(e,function(e){return t.url.indexOf("igs/rest/ogc/doc"),e+"?version="+t.version+"&service=WMS&request=GetCapabilities"})}}]),t}();o.Zondy.Service.WMSServer=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1);var a=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"getCapabitities",value:function(e){var t=this;return this._querySimpleInfo(e,function(e){return t.url.indexOf("igs/rest/ogc")>-1&&t.url.indexOf("WMTSServer")>-1?e+"/1.0.0/WMTSCapabilities.xml":e+"?request=GetCapabilities&service=WMTS&acceptversions=1.0.0"})}}]),t}();o.Zondy.Service.WMTSServer=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),i=r(1);var o=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n.default),t}();i.Zondy.Service.WPSServer=o,t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArcGISVectorTileServer=t.ArcGISFeatureServer=t.ArcGISGeometryServer=t.ArcGISMapServer=void 0;var n=s(r(358)),i=s(r(359)),o=s(r(360)),a=s(r(139));function s(e){return e&&e.__esModule?e:{default:e}}t.ArcGISMapServer=n.default,t.ArcGISGeometryServer=i.default,t.ArcGISFeatureServer=o.default,t.ArcGISVectorTileServer=a.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1);var a=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"find",value:function(e){return this._queryByParameters(e,{},{searchText:{type:"String",required:!0},contains:{type:"Boolean"},searchFields:{type:"String"},sr:{type:"String"},layers:{type:"String",required:!0},returnGeometry:{type:"Boolean"},geometryPrecision:{type:"Number"},callback:{type:"String"}},function(e){return e+"/find?f=json"})}},{key:"identify",value:function(e){return this._queryByParameters(e,{},{geometry:{type:"String"},geometryType:{type:"String"},sr:{type:"String"},layers:{type:"String"},layerDefs:{type:"Array"},tolerance:{type:"String"},mapExtent:{type:"String"},imageDisplay:{type:"String"},returnGeometry:{type:"String"},geometryPrecision:{type:"String"},spatialFilter:{type:"String"}},function(e){return e+"/identify?f=json"})}},{key:"getLayers",value:function(e){return this._queryByParameters(e,{},{callback:{type:"String"}},function(e){return e+"/layers?f=json"})}},{key:"getLegend",value:function(e){return this._queryByParameters(e,{},{dpi:{type:"Number"},size:{dpi:"String"},callback:{dpi:"String"}},function(e){return e+"/legend?f=json"})}},{key:"queryLayerInfo",value:function(e){return this._queryInfoByLayerId(e,function(e,t){return e+"/"+t.layerId+"?f=json"})}},{key:"queryFeatureInLayers",value:function(e){return this._queryByParameters(e,{layerId:{type:"String"}},{geometry:{type:"String"},geometryType:{type:"String"},geometryPrecision:{type:"Number"},inSR:{type:"String"},outSR:{type:"String"},spatialRel:{type:"String"},where:{type:"String"},objectIds:{type:"String"},distance:{type:"String"},units:{type:"String"},outFields:{type:"String"},returnGeometry:{type:"Boolean"},returnIdsOnly:{type:"Boolean"},returnCountOnly:{type:"Boolean"},orderByFields:{type:"String"},outStatistics:{type:"OutStatistics"},groupByFieldsForStatistics:{type:"String"},resultOffset:{type:"Number"},resultRecordCount:{type:"String"},returnZ:{type:"Boolean"}},function(e,t){return e+"/"+t.layerId+"/query?f=json"})}}]),t}();o.Zondy.Service.ArcGISMapServer=a,t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1),a=r(3);var s=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"bufferAnalyse",value:function(e){var t={geometries:{type:"Object",required:!0,process:function(e){return"&geometries="+JSON.stringify(e)}},inSR:{type:"String",required:!0},distances:{type:"Number",required:!0},outSR:{type:"String"},unit:{type:"String"},bufferSR:{type:"String"}};return e.method=a.FetchMethod.get,this._queryByParameters(e,{},t,function(e){return e+"/buffer?f=json"})}},{key:"cutGeometry",value:function(e){var t={cutter:{type:"Object",required:!0,process:function(e){return"&cutter="+JSON.stringify(e)}},target:{type:"Object",required:!0,process:function(e){return"&target="+JSON.stringify(e)}},sr:{type:"String",required:!0}};return e.method=a.FetchMethod.get,this._queryByParameters(e,{},t,function(e){return e+"/cut?f=json"})}},{key:"calculateDifference",value:function(e){var t={geometries:{type:"Object",required:!0,process:function(e){return"&geometries="+JSON.stringify(e)}},geometry:{type:"Object",required:!0,process:function(e){return"&geometry="+JSON.stringify(e)}},sr:{type:"String",required:!0}};return e.method=a.FetchMethod.get,this._queryByParameters(e,{},t,function(e){return e+"/difference?f=json"})}},{key:"calculateDistance",value:function(e){var t={geometry1:{type:"Object",required:!0,process:function(e){return"&geometry1="+JSON.stringify(e)}},geometry2:{type:"Object",required:!0,process:function(e){return"&geometry2="+JSON.stringify(e)}},sr:{type:"String",required:!0},distanceUnit:{type:"String"}};return e.method=a.FetchMethod.get,this._queryByParameters(e,{},t,function(e){return e+"/distance?f=json"})}},{key:"calculateIntersect",value:function(e){var t={geometries:{type:"Object",required:!0,process:function(e){return"&geometries="+JSON.stringify(e)}},geometry:{type:"Object",required:!0,process:function(e){return"&geometry="+JSON.stringify(e)}},sr:{type:"String",required:!0}};return e.method=a.FetchMethod.get,this._queryByParameters(e,{},t,function(e){return e+"/intersect?f=json"})}},{key:"calculateTopologyRelation",value:function(e){var t={geometries1:{type:"Object",required:!0,process:function(e){return"&geometries1="+JSON.stringify(e)}},geometries2:{type:"Object",required:!0,process:function(e){return"&geometries2="+JSON.stringify(e)}},sr:{type:"String",required:!0},relation:{type:"String",required:!0},relationParam:{type:"String",required:!0}};return e.method=a.FetchMethod.get,this._queryByParameters(e,{},t,function(e){return e+"/relation?f=json"})}},{key:"simplifyGeometry",value:function(e){var t={geometries:{type:"Object",required:!0,process:function(e){return"&geometries="+JSON.stringify(e)}},sr:{type:"String",required:!0}};return e.method=a.FetchMethod.get,this._queryByParameters(e,{},t,function(e){return e+"/simplify?f=json"})}},{key:"calculateUnion",value:function(e){var t={geometries:{type:"Object",required:!0,process:function(e){return"&geometries="+JSON.stringify(e)}},sr:{type:"String",required:!0}};return e.method=a.FetchMethod.get,this._queryByParameters(e,{},t,function(e){return e+"/union?f=json"})}}]),t}();o.Zondy.Service.ArcGISGeometryServer=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(6)),o=r(1),a=r(3);var s=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"queryFeatures",value:function(e){var t={layerDefs:{type:"Array"},geometries:{type:"Object",required:!0,process:function(e){return"&geometries="+JSON.stringify(e)}},geometryType:{type:"String"},inSR:{type:"String"},spatialRel:{type:"String"},time:{type:"Number"},outSR:{type:"Number"},gdbVersion:{type:"Number"},returnGeometry:{type:"Boolean"},maxAllowableOffset:{type:"Number"},returnIdsOnly:{type:"Boolean"},returnCountOnly:{type:"Boolean"},returnZ:{type:"Boolean"},returnM:{type:"Boolean"},geometryPrecision:{type:"Boolean"}};return e.method=a.FetchMethod.get,this._queryByParameters(e,{},t,function(e){return e+"/query?f=json"})}},{key:"queryLayerInfo",value:function(e){return e.method=a.FetchMethod.get,this._queryByParameters(e,{layerId:"String"},{},function(e,t){return e+"/"+t.layerId+"?f=json"})}},{key:"addFeatures",value:function(e){return e.method=a.FetchMethod.get,this._queryByParameters(e,{layerId:{type:"String"}},{features:{type:"Array",required:!0},gdbVersion:{type:"String"},rollbackOnFailure:{type:"Boolean"}},function(e,t){return e+"/"+t.layerId+"/addFeatures?f=json"})}},{key:"editFeatures",value:function(e){return e.method=a.FetchMethod.get,this._queryByParameters(e,{layerId:{type:"String"}},{adds:{type:"String"},updates:{type:"String"},deletes:{type:"String"},features:{type:"Array",required:!0},gdbVersion:{type:"String"},rollbackOnFailure:{type:"Boolean"}},function(e,t){return e+"/"+t.layerId+"/addFeatures?f=json"})}},{key:"deleteFeatures",value:function(e){return e.method=a.FetchMethod.get,this._queryByParameters(e,{layerId:{type:"String"}},{objectIds:{type:"String"},where:{type:"String"},geometry:{type:"Object"},geometryType:{type:"String"},inSR:{type:"String"},spatialRel:{type:"String"},gdbVersion:{type:"String"},rollbackOnFailure:{type:"String"}},function(e,t){return e+"/"+t.layerId+"/addFeatures?f=json"})}},{key:"queryFeaturesInLayer",value:function(e){return this._queryByParameters(e,{layerId:{type:"String"}},{where:{type:"String"},geometry:{type:"Geometry"},distance:{type:"Number"},geometryPrecision:{type:"Number"},spatialRel:{type:"String"},outFields:{type:"String"},objectIds:{type:"String"},orderByFields:{type:"String"},groupByFieldsForStatistics:{type:"String"},resultRecordCount:{type:"Number"},resultOffset:{type:"Number"},outStatistics:{type:"OutStatistics"},returnGeometry:{type:"Boolean"},returnAttribute:{type:"Boolean"},returnStyle:{type:"Boolean"},returnIdsOnly:{type:"Boolean"},returnCountOnly:{type:"Boolean"},returnExtentOnly:{type:"Boolean"},returnZ:{type:"Boolean"}},function(e,t){return e+"/"+t.layerId+"/query?f=json"})}},{key:"updateFeatures",value:function(e){return e.method=a.FetchMethod.get,this._queryByParameters(e,{layerId:{type:"String"}},{features:{type:"Array",required:!0},gdbVersion:{type:"String"},rollbackOnFailure:{type:"Boolean"}},function(e,t){return e+"/"+t.layerId+"/updateFeatures?f=json"})}},{key:"queryFeatureInfo",value:function(e){return e.method=a.FetchMethod.get,this._queryByParameters(e,{layerId:{type:"String"},featureId:{type:"String"}},{},function(e,t){return e+"/"+t.layerId+"/"+t.featureId+"?f=json"})}}]),t}();o.Zondy.Service.ArcGISFeatureServer=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ThemesInfo=t.ThemeServer=t.ItemValue=t.FolderInfoAttribute=t.FolderInfo=t.ExpInfo=t.CUniqueThemeInfo=t.CUniqueTheme=t.CThemeInfo=t.CTheme=t.CSimpleTheme=t.CRegInfo=t.CRangeThemeInfo=t.CRangeTheme=t.CRandomTheme=t.CPntInfo=t.CMultiClassTheme=t.CLinInfo=t.CGraduatedSymbolTheme=t.CFourColorTheme=t.CDotDensityTheme=t.CChartType=t.CChartThemeRepresentInfo=t.CChartThemeInfo=t.CChartTheme=t.CChartLabelFormat=t.CAnnInfo=t.CAllOtherDataItemInfoSource=void 0;var n=L(r(140)),i=L(r(141)),o=L(r(142)),a=L(r(143)),s=L(r(362)),u=L(r(363)),l=L(r(144)),c=L(r(145)),f=L(r(146)),h=L(r(147)),p=L(r(364)),d=L(r(149)),y=L(r(365)),g=L(r(150)),v=L(r(151)),m=L(r(366)),_=L(r(367)),b=L(r(152)),S=L(r(15)),x=L(r(51)),w=L(r(153)),O=L(r(368)),P=L(r(369)),E=L(r(154)),k=L(r(155)),T=L(r(370)),M=L(r(371)),I=L(r(156));function L(e){return e&&e.__esModule?e:{default:e}}t.CAllOtherDataItemInfoSource=n.default,t.CAnnInfo=i.default,t.CChartLabelFormat=o.default,t.CChartTheme=a.default,t.CChartThemeInfo=s.default,t.CChartThemeRepresentInfo=u.default,t.CChartType=l.default,t.CDotDensityTheme=c.default,t.CFourColorTheme=f.default,t.CGraduatedSymbolTheme=h.default,t.CLinInfo=p.default,t.CMultiClassTheme=d.default,t.CPntInfo=y.default,t.CRandomTheme=g.default,t.CRangeTheme=v.default,t.CRangeThemeInfo=m.default,t.CRegInfo=_.default,t.CSimpleTheme=b.default,t.CTheme=S.default,t.CThemeInfo=x.default,t.CUniqueTheme=w.default,t.CUniqueThemeInfo=O.default,t.ExpInfo=P.default,t.FolderInfo=E.default,t.FolderInfoAttribute=k.default,t.ItemValue=T.default,t.ThemeServer=M.default,t.ThemesInfo=I.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r(51)),o=r(0);var a=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r));return r=(0,o.defaultValue)(r,{}),n.Expression=void 0!==e?e:"",n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),t}();t.default=a,n.Zondy.Object.Theme.CChartThemeInfo=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(0),o=s(r(141)),a=s(r(142));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){e=(0,i.defaultValue)(e,{}),(0,i.extend)(this,e),this.AnnInfoLabel=void 0!==e.AnnInfoLabel?e.AnnInfoLabel:new o.default,this.DigitLabel=void 0!==e.DigitLabel?e.DigitLabel:0,this.FormatLabel=void 0!==e.FormatLabel?e.FormatLabel:a.default.Unknown,this.IsDrawLabel=void 0===e.IsDrawLabel||e.IsDrawLabel,this.LineColor=void 0!==e.LineColor?e.LineColor:-1,this.MaxLength=void 0!==e.MaxLength?e.MaxLength:30,this.MinRadius=void 0!==e.MinRadius?e.MinRadius:10,this.PieSizeFixFlag=void 0!==e.PieSizeFixFlag?e.PieSizeFixFlag:0,this.PieTiltedAngle=void 0!==e.PieTiltedAngle?e.PieTiltedAngle:30,this.PlotRadius=void 0!==e.PlotRadius?e.PlotRadius:1,this.ThickPersent=void 0!==e.ThickPersent?e.ThickPersent:10,this.Width=void 0!==e.Width?e.Width:3};t.default=u,n.Zondy.Object.Theme.CChartThemeRepresentInfo=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(0),o=r(148),a=function(e){e=(0,i.defaultValue)(e,{}),(0,i.extend)(this,e),this.LibID=void 0!==e.LibID?e.LibID:0,this.Ovprnt=void 0!==e.Ovprnt&&e.Ovprnt,this.AdjustFlg=void 0!==e.AdjustFlg?e.AdjustFlg:o.CLinAdjustType.Adjust,this.HeadType=void 0!==e.HeadType?e.HeadType:o.CLinHeadType.Round,this.JointType=void 0!==e.JointType?e.JointType:o.CLinJointType.Round,this.LinStyID=void 0!==e.LinStyID?e.LinStyID:0,this.MakeMethod=void 0!==e.MakeMethod?e.MakeMethod:o.CLinStyleMakeType.Byrule,this.OutClr=void 0!==e.OutClr?e.OutClr:[46,4,3],this.XScale=void 0!==e.XScale?e.XScale:10,this.YScale=void 0!==e.YScale?e.YScale:10,this.OutPenW=void 0!==e.OutPenW?e.OutPenW:[.05,.05,.05]};t.default=a,n.Zondy.Object.Theme.CLinInfo=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(0),o=function(e){e=(0,i.defaultValue)(e,{}),(0,i.extend)(this,e),this.LibID=void 0!==e.LibID?e.LibID:0,this.Ovprnt=void 0!==e.Ovprnt&&e.Ovprnt,this.Angle=void 0!==e.Angle?e.Angle:0,this.BackClr=void 0!==e.BackClr?e.BackClr:0,this.BackExp=void 0!==e.BackExp?e.BackExp:0,this.FillFlg=void 0!==e.FillFlg?e.FillFlg:0,this.Height=void 0!==e.Height?e.Height:0,this.Width=void 0!==e.Width?e.Width:0,this.OutClr=void 0!==e.OutClr?e.OutClr:[0,0,0],this.SymID=void 0!==e.SymID?e.SymID:0,this.OutPenW=void 0!==e.OutPenW?e.OutPenW:[.05,.05,.05]};t.default=o,n.Zondy.Object.Theme.CPntInfo=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r(51)),o=r(0);var a=function(e){function t(e,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=(0,o.defaultValue)(n,{});var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return i.StartValue=void 0!==e?e:"",i.EndValue=void 0!==r?r:"",i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),t}();t.default=a,n.Zondy.Object.Theme.CRangeThemeInfo=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(0),o=function(e){e=(0,i.defaultValue)(e,{}),(0,i.extend)(this,e),this.LibID=void 0!==e.LibID?e.LibID:0,this.Ovprnt=void 0!==e.Ovprnt&&e.Ovprnt,this.Angle=void 0!==e.Angle?e.Angle:0,this.EndClr=void 0!==e.EndClr?e.EndClr:0,this.FillClr=void 0!==e.FillClr?e.FillClr:46,this.FillMode=void 0!==e.FillMode?e.FillMode:0,this.FullPatFlg=void 0===e.FullPatFlg||e.FullPatFlg,this.PatClr=void 0!==e.PatClr?e.PatClr:3,this.PatHeight=void 0!==e.PatHeight?e.PatHeight:5,this.PatID=void 0!==e.PatID?e.PatID:0,this.PatWidth=void 0!==e.PatWidth?e.PatWidth:5,this.OutPenW=void 0!==e.OutPenW?e.OutPenW:1};t.default=o,n.Zondy.Object.Theme.CRegInfo=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r(51)),o=r(0);var a=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=(0,o.defaultValue)(r,{});var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r));return n.Value=void 0!==e?e:"",n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),t}();t.default=a,n.Zondy.Object.Theme.CUniqueThemeInfo=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(0),o=function(e,t,r){r=(0,i.defaultValue)(r,{}),(0,i.extend)(this,r),this.Expression=void 0!==e?e:"",this.ItemValueArr=void 0!==t?t:null};t.default=o,n.Zondy.Object.Theme.ExpInfo=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(0),o=r(148),a=function(e,t,r,n){n=(0,i.defaultValue)(n,{}),(0,i.extend)(this,n),this.StartValue=void 0!==e?e:"",this.EndValue=void 0!==t?t:"",this.ClassItemType=void 0!==r?r:o.CItemType.RangeTheme};t.default=a,n.Zondy.Object.Theme.ItemValue=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=_(r(6)),a=r(0),s=_(r(149)),u=_(r(152)),l=_(r(143)),c=_(r(147)),f=_(r(145)),h=_(r(150)),p=_(r(146)),d=_(r(153)),y=_(r(151)),g=_(r(155)),v=_(r(154)),m=_(r(156));function _(e){return e&&e.__esModule?e:{default:e}}var b=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=(0,a.defaultValue)(e,{});var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.guid=(0,a.defaultValue)(e.guid,(0,a.newGuid)()),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"formatThemInfo",value:function(e){var t=new v.default;if((0,a.extendDeep)(t,e.result||e),null!==t&&null!==t.attribute&&t.attribute.length>0)for(var r=[],n=null,i=0;i<t.attribute.length;i++){if(r[i]=new m.default,null!==t.attribute[i]&&(r[i].LayerName=t.attribute[i].name,null!==(n=JSON.parse(t.attribute[i].value))&&n.length>0)){r[i].ThemeArr=[];for(var o=0;o<n.length;o++){switch(n[o].name){case"CMultiClassTheme":r[i].ThemeArr[o]=new s.default;break;case"CSimpleTheme":r[i].ThemeArr[o]=new u.default;break;case"CChartTheme":r[i].ThemeArr[o]=new l.default;break;case"CGraduatedSymbolTheme":r[i].ThemeArr[o]=new c.default;break;case"CDotDensityTheme":r[i].ThemeArr[o]=new f.default;break;case"CRandomTheme":r[i].ThemeArr[o]=new h.default;break;case"CFourColorTheme":r[i].ThemeArr[o]=new p.default;break;case"CUniqueTheme":r[i].ThemeArr[o]=new d.default;break;case"CRangeTheme":r[i].ThemeArr[o]=new y.default;break;default:r[i].ThemeArr[o]=new u.default}(0,a.extendDeep)(r[i].ThemeArr[o],JSON.parse(n[o].value))}}return r}else;}},{key:"queryThemeInfo",value:function(e){e=(0,a.defaultValue)(e,{});var t=(0,a.defaultValue)(e.idxArr,void 0);if((0,a.isNull)(t))a.Log.error("idxArr不能为空!");else{if("string"==typeof t){var r=this.url+"/get?idxArr="+t+"&guid="+this.guid;return this._getRequest(r,e)}a.Log.error("idxArr类型错误!")}}},{key:"deleteTheme",value:function(e){e=(0,a.defaultValue)(e,{});var t=(0,a.defaultValue)(e.idxArr,void 0);if((0,a.isNull)(t))a.Log.error("idxArr不能为空!");else{if("string"==typeof t){var r=this.url+"/remove?idxArr="+t+"&guid="+this.guid;return this._getRequest(r,e)}a.Log.error("idxArr类型错误!")}}},{key:"updateThemesInfo",value:function(e){e=(0,a.defaultValue)(e,{});var t=(0,a.defaultValue)(e.idxArr,void 0);if((0,a.isNull)(t))a.Log.error("idxArr不能为空!");else if("string"==typeof t){var r=(0,a.defaultValue)(e.themeInfoArray,void 0);if((0,a.isNull)(r))a.Log.error("themeInfoArray不能为空!");else{if(r instanceof Array){var n=this.url+"/update?idxArr="+t+"&guid="+this.guid,i=new v.default;if(r.length>0){i.name="ThemeInfo",i.attribute=[];for(var o=0;o<r.length;o++)if(i.attribute[o]=new g.default,i.attribute[o].name=r[o].LayerName,null!==r[o].ThemeArr&&r[o].ThemeArr.length>0){for(var s=[],u=0;u<r[o].ThemeArr.length;u++)null!==r[o].ThemeArr[u]&&(s[u]=new g.default(r[o].ThemeArr[u].Type,JSON.stringify(r[o].ThemeArr[u])));i.attribute[o].value=JSON.stringify(s)}}return e.data=JSON.stringify(i),this._postRequest(n,e)}a.Log.error("themeInfoArray类型错误!")}}else a.Log.error("idxArr类型错误!")}},{key:"addTheme",value:function(e){e=(0,a.defaultValue)(e,{});var t=(0,a.defaultValue)(e.idxArr,void 0);if((0,a.isNull)(t))a.Log.error("idxArr不能为空!");else if("string"==typeof t){var r=(0,a.defaultValue)(e.themeInfoArray,void 0);if((0,a.isNull)(r))a.Log.error("themeInfoArray不能为空!");else{if(r instanceof Array){var n=this.url+"/add?idxArr="+t+"&guid="+this.guid,i=new v.default;if(r.length>0){i.name="ThemeInfo",i.attribute=[];for(var o=0;o<r.length;o++)if(i.attribute[o]=new g.default,i.attribute[o].name=r[o].LayerName,null!==r[o].ThemeArr&&r[o].ThemeArr.length>0){for(var s=[],u=0;u<r[o].ThemeArr.length;u++)null!==r[o].ThemeArr[u]&&(s[u]=new g.default(r[o].ThemeArr[u].Type,JSON.stringify(r[o].ThemeArr[u])));i.attribute[o].value=JSON.stringify(s)}}return e.data=JSON.stringify(i),this._postRequest(n,e)}a.Log.error("themeInfoArray类型错误!")}}else a.Log.error("idxArr类型错误!")}}]),t}();t.default=b,i.Zondy.Service.ThemeServer=b},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600227,r.description="图层叠加分析",r.groupName="叠加分析",r.srcInfo1=n.srcInfo1,r.srcInfo2=n.srcInfo2,r.src1AttFilter=(0,o.defaultValue)(n.src1AttFilter,""),r.src2AttFilter=(0,o.defaultValue)(n.src2AttFilter,""),r.desInfo=n.desInfo,r.attOptType=n.attOptType,r.infoOptType=n.infoOptType,r.overType=n.overType,r.radius=n.radius,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{srcInfo1:{required:!0,type:"String"},srcInfo2:{required:!0,type:"String"},src1AttFilter:{type:"String"},src2AttFilter:{type:"String"},desInfo:{required:!0,type:"String"},attOptType:{required:!0,type:"Number"},infoOptType:{required:!0,type:"Number"},overType:{required:!0,type:"Number"},radius:{required:!0,type:"Number"}}}}]),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9));var o=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600228,r.description="多边形裁剪(sfcls)",r.groupName="裁剪分析",r.srcInfo=n.srcInfo,r.desInfo=n.desInfo,r.geometry=n.geometry,r.attOptType=n.attOptType,r.infoOptType=n.infoOptType,r.overType=n.overType,r.tolerance=n.tolerance,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{srcInfo:{required:!0,type:"String"},desInfo:{required:!0,type:"String"},geometry:{required:!0,type:"Geometry",alias:"strPos",process:function(e){return e.toString()}},attOptType:{required:!0,type:"Number"},infoOptType:{required:!0,type:"Number"},overType:{required:!0,type:"Number"},tolerance:{required:!0,type:"Number"}}}}]),t}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9));var o=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600229,r.description="圆裁剪(sfcls)",r.groupName="裁剪分析",r.srcInfo=n.srcInfo,r.desInfo=n.desInfo,r.center=n.center,r.radius=n.radius,r.step=n.step,r.attOptType=n.attOptType,r.infoOptType=n.infoOptType,r.overType=n.overType,r.tolerance=n.tolerance,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{srcInfo:{required:!0,type:"String"},desInfo:{required:!0,type:"String"},center:{required:!0,type:"String"},radius:{required:!0,type:"Number"},step:{required:!0,type:"Number"},attOptType:{required:!0,type:"Number"},infoOptType:{required:!0,type:"Number"},overType:{required:!0,type:"Number"},tolerance:{required:!0,type:"Number"}}}}]),t}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600230,r.description="图层裁剪(sfcls/acls)",r.groupName="裁剪分析",r.srcInfo1=n.srcInfo1,r.srcInfo2=n.srcInfo2,r.src1AttFilter=(0,o.defaultValue)(n.src1AttFilter,""),r.src2AttFilter=(0,o.defaultValue)(n.src2AttFilter,""),r.desInfo=n.desInfo,r.attOptType=n.attOptType,r.infoOptType=n.infoOptType,r.overType=n.overType,r.tolerance=n.tolerance,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{srcInfo1:{required:!0,type:"String"},srcInfo2:{required:!0,type:"String"},src1AttFilter:{type:"String"},src2AttFilter:{type:"String"},desInfo:{required:!0,type:"String"},attOptType:{required:!0,type:"Number"},infoOptType:{required:!0,type:"Number"},overType:{required:!0,type:"Number"},tolerance:{required:!0,type:"Number"}}}}]),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600231,r.description="类缓冲分析(单圈)",r.groupName="缓冲分析",r.srcInfo=n.srcInfo,r.desInfo=n.desInfo,r.idstr=(0,o.defaultValue)(n.idstr,""),r.leftRad=(0,o.defaultValue)(n.leftRad,5),r.rightRad=(0,o.defaultValue)(n.rightRad,5),r.isByAtt=n.isByAtt,r.fldName=(0,o.defaultValue)(n.fldName,""),r.angleType=n.angleType,r.isDynPrj=n.isDynPrj,r.dynPrjRad=(0,o.defaultValue)(n.dynPrjRad,0),r.isDissolve=n.isDissolve,r.color=(0,o.defaultValue)(n.color,1),r.isMultiFeatureOpr=n.isMultiFeatureOpr,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{srcInfo:{required:!0,type:"String"},desInfo:{required:!0,type:"String"},idstr:{type:"String"},leftRad:{type:"Number"},rightRad:{type:"Number"},isByAtt:{required:!0,type:"Boolean"},fldName:{type:"String"},angleType:{required:!0,type:"Number"},isDynPrj:{required:!0,type:"Boolean"},dynPrjRad:{type:"Number"},isDissolve:{required:!0,type:"Boolean"},color:{type:"Number"},isMultiFeatureOpr:{required:!0,type:"Boolean"}}}}]),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600232,r.description="类缓冲分析(多圈)",r.groupName="缓冲分析",r.srcInfo=n.srcInfo,r.desInfo=n.desInfo,r.idstr=(0,o.defaultValue)(n.idstr,""),r.radiusStr=(0,o.defaultValue)(n.radiusStr,""),r.angleType=n.angleType,r.isDissolve=n.isDissolve,r.isDynPrj=n.isDynPrj,r.color=(0,o.defaultValue)(n.color,1),r.isMultiFeatureOpr=n.isMultiFeatureOpr,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{srcInfo:{required:!0,type:"String"},desInfo:{required:!0,type:"String"},idstr:{type:"String"},radiusStr:{type:"String"},angleType:{required:!0,type:"Number"},isDissolve:{required:!0,type:"Boolean"},isDynPrj:{required:!0,type:"Boolean"},color:{type:"Number"},isMultiFeatureOpr:{required:!0,type:"Boolean"}}}}]),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600233,r.description="路径分析",r.groupName="网络分析",r.netClsUrl=n.netClsUrl,r.flagGeometry=n.flagGeometry,r.elementType=n.elementType,r.barrierGeometry=n.barrierGeometry,r.nearDis=n.nearDis,r.analyTp=n.analyTp,r.weight=(0,o.defaultValue)(n.weight,",Weight1,Weight1"),r.outFormat=n.outFormat,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{netClsUrl:{required:!0,type:"String"},flagGeometry:{required:!0,type:"Geometry",alias:"flagPosStr",process:function(e){return e.toString()}},elementType:{required:!0,type:"Number"},barrierGeometry:{required:!0,type:"Geometry",alias:"barrierPosStr",process:function(e){return e.toString()}},nearDis:{required:!0,type:"Number"},analyTp:{required:!0,type:"String"},weight:{type:"String"},outFormat:{required:!0,type:"String"}}}}]),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9));var o=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600235,r.description="根据参照系名称进行投影转换",r.groupName="投影转换",r.clsName=n.clsName,r.desClsName=n.desClsName,r.crsName=n.crsName,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{clsName:{required:!0,type:"String"},desClsName:{required:!0,type:"String"},crsName:{required:!0,type:"String"}}}}]),t}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9));var o=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600237,r.description="多边形叠加分析",r.groupName="叠加分析",r.srcInfo1=n.srcInfo1,r.geometry=n.geometry,r.desInfo=n.desInfo,r.attOptType=n.attOptType,r.infoOptType=n.infoOptType,r.overType=n.overType,r.radius=n.radius,r.inFormat=n.inFormat,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{srcInfo1:{required:!0,type:"String"},geometry:{required:!0,type:"Geometry",alias:"strGRegionXML",process:function(e){var t=e.toOldIGSGeometry().RegGeom[0];return JSON.stringify(t)}},desInfo:{required:!0,type:"String"},attOptType:{required:!0,type:"Number"},infoOptType:{required:!0,type:"Number"},overType:{required:!0,type:"Number"},radius:{required:!0,type:"Number"},inFormat:{required:!0,type:"String"}}}}]),t}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=l(r(9)),o=r(0),a=l(r(158)),s=l(r(91)),u=r(4);function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600238,r.description="要素缓冲分析(单圈)",r.groupName="缓冲分析",r.geometrys=n.geometrys,r.attStrct=(0,o.defaultValue)(n.attStrct,{}),r.attRows=(0,o.defaultValue)(n.attRows,[]),r.leftRad=(0,o.defaultValue)(n.leftRad,.001),r.rightRad=(0,o.defaultValue)(n.rightRad,.001),r.traceRadius=n.traceRadius,r.color=(0,o.defaultValue)(n.color,1),r.isMultiFeatureOpr=n.isMultiFeatureOpr,r.inFormat=n.inFormat,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{geometrys:{required:!0,type:function(e){return!(!Array.isArray(e)||!e.every(function(e){return e instanceof u.Geometry}))},alias:"sfGeometryXML",process:function(e){var t=[];return e.forEach(function(e){var r=e.toOldIGSGeometry();t.push(r)}),JSON.stringify(t)}},attStrct:{type:function(e){return e instanceof s.default},alias:"attStrctXML",process:function(e){return JSON.stringify(e)}},attRows:{type:function(e){return!(!Array.isArray(e)||!e.every(function(e){return e instanceof a.default}))},alias:"attRowsXML",process:function(e){return JSON.stringify(e)}},leftRad:{type:"Number"},rightRad:{type:"Number"},traceRadius:{required:!0,type:"Number"},color:{type:"Number"},isMultiFeatureOpr:{required:!0,type:"Boolean"},inFormat:{required:!0,type:"String"}}}}]),t}();t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=l(r(9)),o=r(0),a=l(r(158)),s=l(r(91)),u=r(4);function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600239,r.description="要素缓冲分析(多圈)",r.groupName="缓冲分析",r.geometrys=n.geometrys,r.attStrct=(0,o.defaultValue)(n.attStrct,{}),r.attRows=(0,o.defaultValue)(n.attRows,[]),r.radiusStr=n.radiusStr,r.traceRadius=n.traceRadius,r.color=(0,o.defaultValue)(n.color,1),r.isMultiFeatureOpr=n.isMultiFeatureOpr,r.inFormat=n.inFormat,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{geometrys:{required:!0,type:function(e){return!(!Array.isArray(e)||!e.every(function(e){return e instanceof u.Geometry}))},alias:"sfGeometryXML",process:function(e){var t=[];return e.forEach(function(e){var r=e.toOldIGSGeometry();t.push(r)}),JSON.stringify(t)}},attStrct:{type:function(e){return e instanceof s.default},alias:"attStrctXML",process:function(e){return JSON.stringify(e)}},attRows:{type:function(e){return!(!Array.isArray(e)||!e.every(function(e){return e instanceof a.default}))},alias:"attRowsXML",process:function(e){return JSON.stringify(e)}},radiusStr:{required:!0,type:"String"},traceRadius:{required:!0,type:"Number"},color:{type:"Number"},isMultiFeatureOpr:{required:!0,type:"Boolean"},inFormat:{required:!0,type:"String"}}}}]),t}();t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9));var o=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600307,r.description="要素叠加分析",r.groupName="叠加分析",r.geometry1=n.geometry1,r.geometry2=n.geometry2,r.desInfo=n.desInfo,r.attOptType=n.attOptType,r.infoOptType=n.infoOptType,r.overType=n.overType,r.radius=n.radius,r.inFormat=n.inFormat,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{geometry1:{required:!0,type:"Geometry",alias:"strGeometry1XML",process:function(e){return JSON.stringify(e.toOldIGSGeometry())}},geometry2:{required:!0,type:"Geometry",alias:"strGeometry2XML",process:function(e){return JSON.stringify(e.toOldIGSGeometry())}},desInfo:{required:!0,type:"String"},attOptType:{required:!0,type:"Number"},infoOptType:{required:!0,type:"Number"},overType:{required:!0,type:"Number"},radius:{required:!0,type:"Number"},inFormat:{required:!0,type:"String"}}}}]),t}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9));var o=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600308,r.description="要素与图层叠加分析",r.groupName="叠加分析",r.srcInfo1=n.srcInfo1,r.geometry=n.geometry,r.desInfo=n.desInfo,r.attOptType=n.attOptType,r.infoOptType=n.infoOptType,r.overType=n.overType,r.radius=n.radius,r.inFormat=n.inFormat,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{srcInfo1:{required:!0,type:"String"},geometry:{required:!0,type:"Geometry",alias:"strGeometryXML",process:function(e){var t=e.toOldIGSGeometry();return JSON.stringify(t)}},desInfo:{required:!0,type:"String"},attOptType:{required:!0,type:"Number"},infoOptType:{required:!0,type:"Number"},overType:{required:!0,type:"Number"},radius:{required:!0,type:"Number"},inFormat:{required:!0,type:"String"}}}}]),t}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9));var o=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600309,r.description="根据FID进行要素叠加分析",r.groupName="叠加分析",r.srcInfo1=n.srcInfo1,r.srcInfo2=n.srcInfo2,r.FIDs1=n.FIDs1,r.FIDs2=n.FIDs2,r.desInfo=n.desInfo,r.attOptType=n.attOptType,r.infoOptType=n.infoOptType,r.overType=n.overType,r.radius=n.radius,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{srcInfo1:{required:!0,type:"String"},srcInfo2:{required:!0,type:"String"},FIDs1:{required:!0,type:"String"},FIDs2:{required:!0,type:"String"},desInfo:{required:!0,type:"String"},attOptType:{required:!0,type:"String"},infoOptType:{required:!0,type:"Number"},overType:{required:!0,type:"Number"},radius:{required:!0,type:"Number"}}}}]),t}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600314,r.description="地图打印",r.groupName="地图操作",r.layerURLStr=n.layerURLStr,r.imageFilePath=n.imageFilePath,r.dpi=(0,o.defaultValue)(n.dpi,72),r.colorMode=n.colorMode,r.mapRectStr=n.mapRectStr,r.layoutWidth=n.layoutWidth,r.layoutHeight=n.layoutHeight,r.pageWidth=n.pageWidth,r.pageHeight=n.pageHeight,r.sOrig=n.sOrig,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{layerURLStr:{required:!0,type:"String"},imageFilePath:{required:!0,type:"String"},dpi:{type:"Number"},colorMode:{required:!0,type:"Number"},mapRectStr:{required:!0,type:"String"},layoutWidth:{required:!0,type:"Number"},layoutHeight:{required:!0,type:"Number"},pageWidth:{required:!0,type:"Number"},pageHeight:{required:!0,type:"Number"},sOrig:{required:!0,type:"Boolean"}}}}]),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600334,r.description="高性能图层叠加分析(新)",r.groupName="高性能叠加分析",r.srcInfo1=n.srcInfo1,r.srcInfo2=n.srcInfo2,r.desInfo=n.desInfo,r.attOptType=n.attOptType,r.infoOptType=n.infoOptType,r.overType=n.overType,r.radius=n.radius,r.src1AttFilter=(0,o.defaultValue)(n.src1AttFilter,""),r.isCreateDesCls=n.isCreateDesCls,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{srcInfo1:{required:!0,type:"String"},srcInfo2:{required:!0,type:"String"},desInfo:{required:!0,type:"String"},attOptType:{required:!0,type:"Number"},infoOptType:{required:!0,type:"Number"},overType:{required:!0,type:"Number"},radius:{required:!0,type:"Number"},src1AttFilter:{type:"Boolean"},isCreateDesCls:{required:!0,type:"Boolean"}}}}]),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600336,r.description="连通与非连通分析",r.groupName="网络分析",r.netClsUrl=n.netClsUrl,r.flag=n.flag,r.flagPosStr=n.flagPosStr,r.elementType=n.elementType,r.nearDis=n.nearDis,r.weight=(0,o.defaultValue)(n.weight,",Weight1,Weight1"),r.analyTp=n.analyTp,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{netClsUrl:{required:!0,type:"String"},flag:{required:!0,type:"Boolean"},flagPosStr:{required:!0,type:"String"},elementType:{required:!0,type:"String"},nearDis:{required:!0,type:"Number"},weight:{type:"String"},analyTp:{required:!0,type:"String"}}}}]),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600340,r.description="根据空间参照信息投影(sfcls/acls)",r.groupName="投影转换",r.clsName=(0,o.defaultValue)(n.clsName,"GDBP://MapGISLocal/Sample/sfcls/wh_中心线new"),r.desClsName=(0,o.defaultValue)(n.desClsName,"GDBP://MapGISLocal/Sample/sfcls/wh_中心线Reult9"),r.projTypeID=(0,o.defaultValue)(n.projTypeID,5),r.sphereType=(0,o.defaultValue)(n.sphereType,2),r.projAngleUnit=(0,o.defaultValue)(n.projAngleUnit,0),r.projType=(0,o.defaultValue)(n.projType,3),r.projZoneType=(0,o.defaultValue)(n.projZoneType,0),r.projZoneNO=(0,o.defaultValue)(n.projZoneNO,0),r.projLon=(0,o.defaultValue)(n.projLon,117e4),r.projLat=(0,o.defaultValue)(n.projLat,0),r.projLat1=(0,o.defaultValue)(n.projLat1,0),r.projLat2=(0,o.defaultValue)(n.projLat2,0),r.projUnit=(0,o.defaultValue)(n.projUnit,2),r.projRate=(0,o.defaultValue)(n.projRate,1),r.x=(0,o.defaultValue)(n.x,0),r.y=(0,o.defaultValue)(n.y,0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{clsName:{type:"String"},desClsName:{type:"String"},projTypeID:{type:"Number"},sphereType:{type:"Number"},projAngleUnit:{type:"Number"},projType:{type:"Number"},projZoneType:{type:"Number"},projZoneNO:{type:"Number"},projLon:{type:"Number"},projLat:{type:"Number"},projLat1:{type:"Number"},projLat2:{type:"Number"},projUnit:{type:"Number"},projRate:{type:"Number"},x:{type:"Number"},y:{type:"Number"}}}}]),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600354,r.description="最近设施分析",r.groupName="网络分析",r.netClsUrl=n.netClsUrl,r.facilityPosStr=n.facilityPosStr,r.eventPosStr=n.eventPosStr,r.elementType=n.elementType,r.barrierPosStr=(0,o.defaultValue)(n.barrierPosStr,""),r.nearDis=n.nearDis,r.direction=(0,o.defaultValue)(n.direction,"从设施"),r.outFormat=n.outFormat,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{netClsUrl:{required:!0,type:"String"},facilityPosStr:{required:!0,type:"String"},eventPosStr:{required:!0,type:"String"},elementType:{required:!0,type:"Number"},barrierPosStr:{type:"String"},nearDis:{required:!0,type:"Number"},direction:{type:"String"},outFormat:{required:!0,type:"String"}}}}]),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9));var o=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600368,r.description="三维体对象空间关系判定",r.groupName="三维分析",r.srcInfo1=n.srcInfo1,r.srcInfo2=n.srcInfo2,r.FID1=n.FID1,r.FID2=n.FID2,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{srcInfo1:{required:!0,type:"String"},srcInfo2:{required:!0,type:"String"},FID1:{required:!0,type:"String"},FID2:{required:!0,type:"String"}}}}]),t}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600369,r.description="三维体对象空间运算",r.groupName="三维分析",r.srcInfo1=n.srcInfo1,r.srcInfo2=n.srcInfo2,r.desInfo=n.desInfo,r.FIDs1=(0,o.defaultValue)(n.FIDs1,""),r.FIDs2=(0,o.defaultValue)(n.FIDs2,""),r.spatialOperationType=n.spatialOperationType,r.radius=n.radius,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{srcInfo1:{required:!0,type:"String"},srcInfo2:{required:!0,type:"String"},desInfo:{required:!0,type:"String"},FIDs1:{type:"String"},FIDs2:{type:"String"},spatialOperationType:{required:!0,type:"String"},radius:{required:!0,type:"String"}}}}]),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(9)),o=r(0);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n=e||{};return r.url=n.url,r.flowId=600370,r.description="栅格代数运算",r.groupName="其它",r.srcInfos=n.srcInfos,r.desInfo=n.desInfo,r.expression=n.expression,r.pixelType=(0,o.defaultValue)(n.pixelType,-1),r.cellSizeX=(0,o.defaultValue)(n.cellSizeX,""),r.cellSizeY=(0,o.defaultValue)(n.cellSizeY,""),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_getCheckQueryOpts",value:function(){return{srcInfos:{required:!0,type:"String"},desInfo:{required:!0,type:"String"},expression:{required:!0,type:"String"},pixelType:{required:!0,type:"Number"},cellSizeX:{type:"String"},cellSizeY:{type:"String"}}}}]),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoMapView=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(395));t.VideoMapView=n.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(3),a=h(r(396)),s=r(4),u=r(16),l=r(0),c=h(r(72)),f=r(451);function h(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,l.defaultValue)(e,{}),(0,l.defined)(window.fabric)?("string"==typeof r._viewId?r._videoMapViewContainer=document.getElementById(r._viewId):r._videoMapViewContainer=r._viewId,r._videoPixelCoordTransforms=null,r._videoMetaData=null,r._fabricCanvas=null,r.graphics=new i.Collection,r.graphics=new Proxy(r.graphics,{get:function(e,t){return"add"===t?function(n){return r._drawGraphic(n),n.geometry=new Proxy(n.geometry,{set:function(e,t,i){return e[t]=i,"coordinates"===t&&r._updateGraphic(n),!0}}),e[t](n)}:"remove"===t?function(n){return r._deleteGraphic(n),e[t](n)}:e[t]}}),r._points=new Map,r._lines=new Map,r._polygons=new Map,r._texts=new Map,r._tempFabrics=[],r._videoPixelScale=0,r._fabricContainer=null,r._videoMapLayer=null,r):(l.Log.error("The fabric library is lost."),p(r))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,c.default),n(t,[{key:"init",value:function(e){var t=this,r=(0,l.defaultValue)(e,{});this._videoPixelCoordTransforms||(this._videoPixelCoordTransforms=new l.VideoPixelCoordTransforms),this._videoMetaData=new i.VideoMetaData(r),this._videoPixelCoordTransforms.init(this._videoMetaData.videoRegistrationParam);var n=this._videoMetaData.videoSource.videoUrl||this._videoMetaData.videoSource,o=new u.VideoLayer({source:n,container:this._videoMapViewContainer});this._map.add(o),o.on("layerview-created",function(){t._addLayer(o),t.fire(i.ViewEventType.loaded,{})})}},{key:"pixelCoordToGeoCoord",value:function(e){var t=new s.Point({coordinates:[e.coordinates[0]/this._videoPixelScale,e.coordinates[1]/this._videoPixelScale]});return this._videoPixelCoordTransforms.pixelCoordToGeoCoord(t)}},{key:"geoCoordToPixelCoord",value:function(e){var t=this._videoPixelCoordTransforms.geoCoordToPixelCoord(e);return new s.Point({coordinates:[t.coordinates[0]*this._videoPixelScale,t.coordinates[1]*this._videoPixelScale]})}},{key:"_bindMouseEventToVideoMapViewContainer",value:function(){}},{key:"_modifyVideoMapViewPosition",value:function(){}},{key:"_enabledMouseEvent",value:function(e){"string"==typeof e&&(this._fabricContainer.style.pointerEvents=e)}},{key:"setWidth",value:function(e){this._videoMapViewContainer.style.width=e+"px";var t=this._videoMapLayer.width,r=this._videoMapLayer.height,n=(0,f.adjustChildSizeToParent)(t,r,this._videoMapViewContainer),i=n.width,o=n.height,a=n.left,s=n.top,u=n.scale;this._videoPixelScale=u,this._fabricContainer.style.top=s+"px",this._fabricContainer.style.left=a+"px",this._fabricContainer.style.width=i+"px",this._fabricContainer.style.height=o+"px"}},{key:"setHeight",value:function(e){this._videoMapViewContainer.style.height=e+"px";var t=this._videoMapLayer.width,r=this._videoMapLayer.height,n=(0,f.adjustChildSizeToParent)(t,r,this._videoMapViewContainer),i=n.width,o=n.height,a=n.left,s=n.top,u=n.scale;this._videoPixelScale=u,this._fabricContainer.style.top=s+"px",this._fabricContainer.style.left=a+"px",this._fabricContainer.style.width=i+"px",this._fabricContainer.style.height=o+"px"}},{key:"_addLayer",value:function(e){this._videoMapLayer=e;var t=e.videoHtml,r=e.width,n=e.height,i=(0,f.adjustChildSizeToParent)(r,n,this._videoMapViewContainer),o=i.width,a=i.height,s=i.left,u=i.top,l=i.scale;if(this._videoPixelScale=l,t&&(t.style.left=s+"px",t.style.top=u+"px",t.style.width=o+"px",t.style.height=a+"px"),!this._fabricCanvas){this._fabricContainer=document.createElement("div"),this._fabricContainer.id="fabricContainer",this._fabricContainer.style.position="absolute",this._fabricContainer.style.top=u+"px",this._fabricContainer.style.left=s+"px",this._fabricContainer.style.width=o+"px",this._fabricContainer.style.height=a+"px",this._videoMapViewContainer.appendChild(this._fabricContainer),this._fabricContainer.style.pointerEvents="none";var c=document.createElement("canvas");c.id="fabricCanvas",c.style.width="100%",c.style.height="100%",this._fabricContainer.appendChild(c),this._fabricCanvas=new fabric.Canvas(c.id),this._fabricCanvas.setWidth(o),this._fabricCanvas.setHeight(a),this._initViewEvent()}}},{key:"_addPixelCoords",value:function(e){if(!e._pixelCoords)if(e.coordinates[0]instanceof Array){var t=[];this._traversalCoordinates(e.coordinates,t),e._pixelCoords=t}else{var r=new s.Point({coordinates:[e.coordinates[0],e.coordinates[1]]}),n=this.geoCoordToPixelCoord(r);e._pixelCoords={x:n.coordinates[0],y:n.coordinates[1]}}}},{key:"_traversalCoordinates",value:function(e,t){var r=this;if(e[0]instanceof Array)e.forEach(function(e){r._traversalCoordinates(e,t)});else{var n=new s.Point({coordinates:[e[0],e[1]]}),i=this.geoCoordToPixelCoord(n);t.push({x:i.coordinates[0],y:i.coordinates[1]})}}},{key:"_drawGraphic",value:function(e){if(this._addPixelCoords(e.geometry),e.geometry.type===o.GeometryType.point){var t=e.symbol,r=t.size,n=t.color.toCssRGBString(),i=t.color.alpha;0===i&&(n="transparent",i=t.outline.color.alpha);var a=e.geometry,s=new fabric.Circle({left:a._pixelCoords.x-r,top:a._pixelCoords.y-r,radius:r,fill:n,stroke:t.outline.color.toCssRGBString(),strokeWidth:t.outline.width,opacity:i,selectable:!1});this._fabricCanvas.add(s),this._points.set(e.id,s)}else if(e.geometry.type===o.GeometryType.lineString){var u=e.symbol,l=u.width,c=u.color.toCssRGBString(),f=e.geometry,h=new fabric.Polyline(f._pixelCoords,{fill:"transparent",opacity:u.color.alpha,stroke:c,strokeWidth:l,selectable:!1});this._fabricCanvas.add(h),this._lines.set(e.id,h)}else if(e.geometry.type===o.GeometryType.polygon){var p=e.symbol,d=p.color.toCssRGBString(),y=p.color.alpha;0===y&&(d="transparent",y=p.outline.color.alpha);var g=p.outline.width,v=e.geometry,m=v._pixelCoords[0].x,_=v._pixelCoords[0].y,b=v._pixelCoords.map(function(e){return{x:e.x-m,y:e.y-_}}),S=new fabric.Polygon([{x:0,y:0},{x:0,y:0},{x:0,y:0}],{left:m,top:_,fill:d,strokeWidth:g,stroke:p.outline.color.toCssRGBString(),opacity:y,cornerColor:"blue",objectCaching:!1,selectable:!1});this._fabricCanvas.add(S),S.set({points:b}),this._fabricCanvas.renderAll(),this._polygons.set(e.id,S)}}},{key:"_updateGraphic",value:function(e){var t=this;if(this._addPixelCoords(e.geometry),e.geometry.type===o.GeometryType.lineString){this._fabricCanvas.remove(this._lines.get(e.id)),this._lines.delete(e.id);var r=e.symbol,n=r.width,i=r.color.toCssRGBString(),a=e.geometry;if(a._pixelCoords.length<2)return;var u=new fabric.Polyline(a._pixelCoords,{fill:"transparent",opacity:r.color.alpha,stroke:i,strokeWidth:n,selectable:!1});if(this._tempFabrics.forEach(function(e){t._fabricCanvas.remove(e)}),this._tempFabrics=[],e.isShowSegmentLength)for(var l=1;l<a.coordinates.length;l++){var c=new s.LineString({coordinates:[a.coordinates[l-1],a.coordinates[l]]}),f=s.GeometryEngine.geodesicLength(c).toFixed(2)+"m",h=e._textStyle,p=h.color.toCssRGBString(),d={x:(a._pixelCoords[l].x+a._pixelCoords[l-1].x)/2,y:(a._pixelCoords[l].y+a._pixelCoords[l-1].y)/2},y=new fabric.Textbox(f,{left:d.x,top:d.y,fill:p,width:50,fontSize:h.font.size,selectable:!1});this._tempFabrics.push(y),this._fabricCanvas.add(y)}this._fabricCanvas.add(u),this._lines.set(e.id,u)}else if(e.geometry.type===o.GeometryType.polygon){var g=this._polygons.get(e.id);if(g){var v=e.geometry,m=v._pixelCoords[0].x,_=v._pixelCoords[0].y,b=v._pixelCoords.map(function(e){return{x:e.x-m,y:e.y-_}});if(g.set({points:b}),this._fabricCanvas.renderAll(),v._pixelCoords.length<4)return;if(this._tempFabrics.forEach(function(e){t._fabricCanvas.remove(e)}),this._tempFabrics=[],e.isShowArea){var S=v._pixelCoords.map(function(e){return[e.x,e.y]}),x=new s.Polygon({coordinates:[S]}),w=s.GeometryEngine.planarArea(x).toFixed(2)+"㎡",O=e._textStyle,P=O.color.toCssRGBString(),E=new fabric.Textbox(w,{left:x.centroid.coordinates[0]-15,top:x.centroid.coordinates[1]-7.5,fill:P,width:50,fontSize:O.font.size,selectable:!1});this._tempFabrics.push(E),this._fabricCanvas.add(E),this._fabricCanvas.bringToFront(E),this._fabricCanvas.renderAll()}}}}},{key:"_deleteGraphic",value:function(e){var t=this,r=void 0;this._points.has(e.id)?r=this._points.get(e.id):this._lines.has(e.id)?r=this._lines.get(e.id):this._polygons.has(e.id)&&(r=this._polygons.get(e.id)),this._tempFabrics.forEach(function(e){t._fabricCanvas.remove(e)}),this._tempFabrics=[],r&&this._fabricCanvas.remove(r)}},{key:"_initViewEvent",value:function(){var e=this;this._fabricCanvas&&(this._fabricCanvas.on(a.default.mouseUp,function(t){t.isClick&&(t.type=i.ViewEventType.click,e.fire(i.ViewEventType.click,t))}),this._fabricCanvas.on(a.default.mouseUp,function(t){t.type=i.ViewEventType.mouseUp,e.fire(i.ViewEventType.mouseUp,t)}),this._fabricCanvas.on(a.default.mouseDown,function(t){t.type=i.ViewEventType.mouseDown,e.fire(i.ViewEventType.mouseDown,t)}),this._fabricCanvas.on(a.default.mouseMove,function(t){t.type=i.ViewEventType.mouseMove,e.fire(i.ViewEventType.mouseMove,t)}),this._fabricCanvas.on(a.default.doubleClick,function(t){t.type=i.ViewEventType.doubleClick,e.fire(i.ViewEventType.doubleClick,t)}),this._fabricCanvas.on(a.default.mouseout,function(t){t.type=i.ViewEventType.mouseOut,e.fire(i.ViewEventType.mouseOut,t)}),this._fabricCanvas.on(a.default.mouseover,function(t){t.type=i.ViewEventType.mouseOver,e.fire(i.ViewEventType.mouseOver,t)}))}},{key:"videoPixelCoordTransforms",get:function(){return this._videoPixelCoordTransforms}}]),t}();t.default=d,i.Zondy.VideoMapView=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.freeze({mouseDown:"mouse:down",mouseUp:"mouse:up",mouseMove:"mouse:move",doubleClick:"mouse:dblclick",zoom:"mouse:wheel",mouseover:"mouse:over",mouseout:"mouse:out"});t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0},o=r(8),a=r(3),s=r(1),u=r(0),l=r(4),c=d(r(164)),f=d(r(54)),h=r(10),p=r(12);function d(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,u.defaultValue)(e,{}),r.type=a.LayerType.igsVectorTile,r.description="IGS矢量瓦片图层",r.sublayers=(0,u.defaultValue)(e.sublayers,new s.Collection),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.VectorTileLayer),n(t,[{key:"covertCustomStyleToMVTStyle",value:function(e){var t=this,r=(0,u.cloneObject)(e);return r.layers.forEach(function(e){"[object Object]"!==Object.prototype.toString.call(e.extendProperties)&&(e.extendProperties={}),"[object Object]"!==Object.prototype.toString.call(e._backupProperties)&&(e._backupProperties={}),e._backupProperties.visibility=t._getStyleLayerVisibility(e),e._backupProperties.opacities=t._getStyleLayerOpacitiesMap(e)}),r}},{key:"setPaintProperties",value:function(e,r){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setPaintProperties",this).call(this,e,r),this._setBackupProperties(e,"opacities",this._getStyleLayerOpacitiesMap(this.getStyleLayer(e)))}},{key:"setLayoutProperties",value:function(e,r){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setLayoutProperties",this).call(this,e,r),this._setBackupProperties(e,"visibility",this._getStyleLayerVisibility(this.getStyleLayer(e)))}},{key:"findSublayerById",value:function(e){return this.sublayers.find(function(t){return t.id===e})}},{key:"toJSON",value:function(){var e=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.type=this.type,e.description=this.description,e.sublayers=this.sublayers.map(function(e){return(0,u.toJSON)(e,c.default)}),e.labelsRenderMode=this.labelsRenderMode,e}},{key:"_load",value:function(){var e=this;{if(this.url&&"string"==typeof this.url)return this.url.indexOf(".json")>-1?p.FetchRequest.commit("get",this.url,{},{tokenKey:this.tokenKey,tokenValue:this.tokenValue}).then(function(t){return t.json().then(function(t){return u.Log.info("矢量瓦片样式查询成功:",t),e._style=e.covertCustomStyleToMVTStyle(t),e._initCurrentStyleInfo(),e._initSubLayers(),e._vectorTileServer=new p.VectorTileServer({url:e._getServerUrlFromStyle(),tokenKey:e.tokenKey,tokenValue:e.tokenValue}),e._vectorTileServer.queryServerInfo().then(function(t){u.Log.info("矢量瓦片信息查询成功:",t);var r=t.data;return e._initLayerInfo(r),e._style.sprite?e._requestSprite():new Promise(function(t){e.loadStatus=a.LoadStatus.loaded,e.loaded=!0,t(e)})})})}):this._vectorTileServer.queryServerInfo().then(function(t){u.Log.info("矢量瓦片信息查询成功:",t);var r=t.data;return e._initLayerInfo(r),e._vectorTileServer.getStyle().then(function(t){return u.Log.info("矢量瓦片样式查询成功:",t),e._style=e.covertCustomStyleToMVTStyle(t.data),e._initCurrentStyleInfo(),e._initSubLayers(),e._style.sprite?e._requestSprite():new Promise(function(t){e.loadStatus=a.LoadStatus.loaded,e.loaded=!0,t(e)})}).catch(function(e){u.Log.error("矢量瓦片样式查询失败:",e)})}).catch(function(e){u.Log.error("矢量瓦片信息查询失败:",e)});if(this.style&&this.style instanceof Object)return this._style=this.covertCustomStyleToMVTStyle(this.style),this._initCurrentStyleInfo(),this._initSubLayers(),this._vectorTileServer=new p.VectorTileServer({url:this._getServerUrlFromStyle(),tokenKey:this.tokenKey,tokenValue:this.tokenValue}),this._vectorTileServer.queryServerInfo().then(function(t){u.Log.info("矢量瓦片信息查询成功:",t);var r=t.data;return e._initLayerInfo(r),e._style.sprite?e._requestSprite():new Promise(function(t){e.loadStatus=a.LoadStatus.loaded,e.loaded=!0,t(e)})})}}},{key:"_getStyleLayerVisibility",value:function(e){if((0,u.isObject)(e)){var t=e.layout,r=void 0===t?{}:t;return r.visibility?r.visibility:"visible"}return!0}},{key:"_getStyleLayerOpacitiesMap",value:function(e){if((0,u.isObject)(e)){var t=e.paint,r=void 0===t?{}:t,n=e.type,i={};switch(n){case"symbol":i["text-opacity"]=void 0,i["icon-opacity"]=void 0;break;default:i[n+"-opacity"]=void 0}return Object.keys(i).forEach(function(e){i[e]=isNaN(Number(r[e]))?1:Number(r[e])}),i}return null}},{key:"_initCurrentStyleInfo",value:function(){this.currentStyleInfo.serviceUrl=this.url,this.currentStyleInfo.styleUrl=this.url+"/style?f=json",this.currentStyleInfo.spriteUrl=this._style.sprite,this.currentStyleInfo.glyphsUrl=this._style.glyphs,this.currentStyleInfo.style=this._style}},{key:"_initSubLayers",value:function(){var e=this._style.layers,t=[];this.sublayers.forEach(function(e){t.push(e)}),this.sublayers=new s.Collection;for(var r=0;r<e.length;r++){for(var n=e[r],i=!1,o=void 0,a=0;a<t.length;a++)if(n.id===t[a].id){i=!0,o=t[a];break}var u=void 0;u=i?new c.default(Object.assign({type:n.type,id:n.id,title:n.description,styleLayers:[n],layer:this},o)):new c.default({type:n.type,id:n.id,title:n.description,styleLayers:[n],layer:this}),this.sublayers.add(u)}}},{key:"_initLayerInfo",value:function(e){"1.0"===this._vectorTileServer.igsType?this._spatialReference||u.Log.error("该服务为IGS1.0版本的矢量瓦片服务,请手动设置坐标系参数"):this._spatialReference=l.SpatialReference.fromJSON(e.tileInfo.spatialReference),this.title=e.name,this.tileInfo=f.default.parseTileInfo2(e.tileInfo);var t=void 0;t="1.0"===this._vectorTileServer.igsType?e.fullExtent:e.extent,this.extent=new l.Extent({xmin:t.xmin,ymin:t.ymin,xmax:t.xmax,ymax:t.ymax,spatialReference:this._spatialReference}),e.capabilities&&(this.capabilities=Array.isArray(e.capabilities)?e.capabilities:[e.capabilities])}},{key:"_requestSprite",value:function(){var e=this;return this._vectorTileServer.getSprite().then(function(t){return u.Log.info("矢量瓦片样式查询成功:",t),e._style.spritedata=t.data,new Promise(function(t){e.loadStatus=a.LoadStatus.loaded,e.loaded=!0,t(e)})}).catch(function(e){u.Log.error("矢量瓦片样式查询失败:",e)})}},{key:"_getServerUrlFromStyle",value:function(){var e=this._style.sources,t=e[Object.keys(e)[0]].tiles[0];return t.indexOf("/igs/rest/services/VectorTile/")>-1?t.split("/tiles/{z}/{y}/{x}?type=pbf")[0]:t.split("/{z}/{y}/{x}?type=pbf")[0].replace("/mrms/tile/","/mrcs/vtiles/")}}],[{key:"fromJSON",value:function(e){var r=new t(e=(0,h.jsonClone)(e));return r.loadStatus=a.LoadStatus.loaded,r.loaded=!0,r}}]),t}();s.Zondy.Layer.IGSVectorTileLayer=y,t.default=y},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(28)),o=r(1),a=r(0),s=r(3),u=r(24),l=r(137),c=r(10);var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r.url=(0,a.defaultValue)(e.url,""),r.tileInfo=void 0,r.mvtExtent=(0,a.defaultValue)(e.mvtExtent,4096),r.capabilities=[],r.currentStyleInfo={},r._labelsRenderMode=(0,a.defaultValue)(e.labelsRenderMode,"off-screen"),r._clippingArea=(0,a.defaultValue)(e.clippingArea,null),r._style=(0,a.defaultValue)(e.style,null),r._vectorTileServer=new l.VectorTileServer({url:r.url,tokenKey:r.tokenKey,tokenValue:r.tokenValue}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"getStyleLayer",value:function(e){for(var t=this.style.layers,r=0;r<t.length;r++)if(t[r].id===e)return t[r];return null}},{key:"getStyleLayerIndex",value:function(e){return this.style.layers.findIndex(function(t){return t.id===e})}},{key:"getStyleLayerId",value:function(e){var t=this.style.layers;return e>t.length-1?null:t[e]}},{key:"setStyleLayer",value:function(e,t){var r=e||{},n=this.getStyleLayer(r.id);if(n){var i=this.getStyleLayerIndex(e.id),o=this.style.layers;void 0!==t&&null!==t&&"number"==typeof t&&t>=0?(o.splice(i,1),o.splice(t,0,n)):o[i]=e,this._fireLayerUpdateEvent([{params:arguments,dataChanged:!0,name:"setStyleLayer",operationType:"method"}])}}},{key:"deleteStyleLayer",value:function(e){if(this.getStyleLayer(e)){var t=this.style.layers,r=this.getStyleLayerIndex(e);t.splice(r,1),this._fireLayerUpdateEvent([{params:arguments,dataChanged:!0,name:"deleteStyleLayer",operationType:"method"}])}}},{key:"setStyleLayerVisibility",value:function(e,t){var r=t?"visible":"none";this.setLayoutProperties(e,{visibility:r})}},{key:"getStyleLayerVisibility",value:function(e){var t=this.getLayoutProperties(e);return!t||"visible"===t.visibility}},{key:"getPaintProperties",value:function(e){var t=this.getStyleLayer(e);return(0,a.isObject)(t)?t.paint||{}:null}},{key:"setPaintProperties",value:function(e,t){var r=this.getStyleLayer(e);(0,a.isObject)(r)&&(r.paint=Object.assign(r.paint||{},t||{}),this._fireLayerUpdateEvent([{params:arguments,dataChanged:!0,name:"setPaintProperties",operationType:"method"}]))}},{key:"getLayoutProperties",value:function(e){var t=this.getStyleLayer(e);return(0,a.isObject)(t)?t.layout||{}:null}},{key:"setLayoutProperties",value:function(e,t){var r=this.getStyleLayer(e);(0,a.isObject)(r)&&(r.layout=Object.assign(r.layout||{},t||{}),this._fireLayerUpdateEvent([{params:arguments,dataChanged:!0,name:"setLayoutProperties",operationType:"method"}]))}},{key:"setExtendProperties",value:function(e,t,r){var n=this.getStyleLayer(e);(0,a.isObject)(n)&&(n.extendProperties[t]=r)}},{key:"getExtendProperties",value:function(e,t){var r=this.getStyleLayer(e);return(0,a.isObject)(r)&&(0,a.isObject)(r.extendProperties)?r.extendProperties[t]:null}},{key:"_setBackupProperties",value:function(e,t,r){var n=this.getStyleLayer(e);(0,a.isObject)(n)&&(0,a.isObject)(n._backupProperties)&&(n._backupProperties[t]=r)}},{key:"_getBackupProperties",value:function(e,t){var r=this.getStyleLayer(e);return(0,a.isObject)(r)&&(0,a.isObject)(r._backupProperties)?r._backupProperties[t]:null}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e&&(e.minScale=this.minScale,e.maxScale=this.maxScale,e.capabilities=this.capabilities),e}},{key:"clone",value:function(){return new i.default(this.toJSON())}},{key:"_fireLayerUpdateEvent",value:function(e){this._map&&this._map.fire(s.LayerEventType.layerUpdate,new u.LayerViewUpdateEvent({type:s.LayerEventType.layerUpdate,target:this._map,layer:this,message:"",updateContent:e}))}}],[{key:"fromJSON",value:function(e){var r=new t(e=(0,c.jsonClone)(e));return r.loadStatus=s.LoadStatus.loaded,r.loaded=!0,r}}]),t}();Object.defineProperties(f.prototype,{clippingArea:{get:function(){return this._clippingArea},set:function(e){this._clippingArea=e,this._fireUpdateEvent("空间裁剪区域",[{name:"clippingArea",params:[this._clippingArea],dataChanged:!0,operationType:"property"}])}},style:{get:function(){return this._style},set:function(e){this._style=e}},labelsRenderMode:{get:function(){return this._labelsRenderMode},set:function(e){this._labelsRenderMode=e,this._fireLayerUpdateEvent([{params:[],dataChanged:!0,name:"refresh",operationType:"method"}])}}}),o.Zondy.Layer.VectorTileLayer=f,t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(400),o=r(10),a=r(161);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var u=" \nfill-color fill-opacity fill-outline-color fill-pattern fill-sort-key \nline-blur line-color line-dasharray line-gap-width line-gradient line-join line-offset line-opacity line-pattern line-sort-key line-width \nicon-anchor icon-color icon-halo-blur icon-halo-color icon-halo-width icon-image icon-offset icon-opacity icon-rotate icon-size symbol-sort-key text-anchor text-color text-field text-font text-halo-blur text-halo-color text-halo-width text-justify text-letter-spacing text-line-height text-max-width text-offset text-opacity text-radial-offset text-rotate text-size text-transform\ncircle-blur circle-color circle-opacity circle-radius circle-sort-key circle-stroke-opacity circle-stroke-width\n ",l=function(){function e(t,r){s(this,e),this.attrName=t,this.defValue=r,this.steps=[]}return n(e,[{key:"addStep",value:function(e,t){t===this.defValue||(0,a.isMapboxExpression)(t)||(this.steps.push(["==",["get",this.attrName],e]),this.steps.push(t))}},{key:"toExpress",value:function(){if(0===this.steps.length)return this.defValue;var e=this.steps.map(function(e){return e});return e.unshift("case"),e.push(this.defValue),e}}]),e}(),c=function(){function e(t,r){s(this,e),this.attrName=t,this.defValue=r,this.steps=[]}return n(e,[{key:"addStep",value:function(e,t,r){r===this.defValue||(0,a.isMapboxExpression)(r)||(this.steps.push(["all",[">=",["get",this.attrName],e],["<=",["get",this.attrName],t]]),this.steps.push(r))}},{key:"toExpress",value:function(){if(0===this.steps.length)return this.defValue;var e=this.steps.map(function(e){return e});return e.unshift("case"),e.push(this.defValue),e}}]),e}(),f=function(){function e(){s(this,e)}return n(e,null,[{key:"renderToStyle",value:function(t,r,n){var i={paint:{},layout:{}};if(!t)return i;switch(t.type){case"simple":i=e.tranSimpleRender(t,r,n);break;case"unique-value":i=e.tranUniqueValueRender(t,r,n);break;case"class-breaks":i=e.tranClassBreaksRender(t,r,n);break;default:i=e.tranSimpleRender(t,r,n)}return i}},{key:"tranSimpleRender",value:function(e,t,r){if(!e||!e.symbol)return{};var n=(0,i.convertSymbol)(e.symbol,t);e.visualVariables&&Array.isArray(e.visualVariables)&&e.visualVariables.forEach(function(e){switch(e.type){case"color":case"opacity":case"rotation":case"size":break;default:throw new Error("未识别视觉变量类型")}});return n}},{key:"tranUniqueValueRender",value:function(e,t,r){if(!e)return{};var n={};(0,o.defined)(e.defaultSymbol)&&(n=(0,i.convertSymbol)(e.defaultSymbol,t));var s=e.field,c=(0,o.defaultValue)(n.paint,{}),f=(0,o.defaultValue)(n.layout,{}),h={},p={};return Object.keys(c).forEach(function(e){u.indexOf(e)>-1&&!(0,a.isMapboxExpression)(c[e])&&(h[e]=new l(s,c[e]))}),Object.keys(f).forEach(function(e){u.indexOf(e)>-1&&!(0,a.isMapboxExpression)(c[e])&&(p[e]=new l(s,f[e]))}),(0,o.defaultValue)(e.uniqueValueInfos,[]).forEach(function(e){var r=(0,i.convertSymbol)(e.symbol,t),n=e.value,c=(0,o.defaultValue)(r.paint,{}),f=(0,o.defaultValue)(r.layout,{});Object.keys(c).forEach(function(e){u.indexOf(e)>-1&&!(0,a.isMapboxExpression)(c[e])&&(h[e]||(h[e]=new l(s,c[e])),h[e].addStep(n,c[e]))}),Object.keys(f).forEach(function(e){u.indexOf(e)>-1&&!(0,a.isMapboxExpression)(f[e])&&(p[e]||(p[e]=new l(s,f[e])),p[e].addStep(n,f[e]))})}),Object.keys(h).forEach(function(e){c[e]=h[e].toExpress()}),Object.keys(p).forEach(function(e){f[e]=p[e].toExpress()}),n.paint=c,n.layout=f,n}},{key:"tranClassBreaksRender",value:function(e,t,r){if(!e)return{};var n={};(0,o.defined)(e.defaultSymbol)&&(n=(0,i.convertSymbol)(e.defaultSymbol,t));var s=e.field,l=(0,o.defaultValue)(n.paint,{}),f=(0,o.defaultValue)(n.layout,{}),h={},p={};return Object.keys(l).forEach(function(e){u.indexOf(e)>-1&&!(0,a.isMapboxExpression)(l[e])&&(h[e]=new c(s,l[e]))}),Object.keys(f).forEach(function(e){u.indexOf(e)>-1&&!(0,a.isMapboxExpression)(l[e])&&(p[e]=new c(s,f[e]))}),(0,o.defaultValue)(e.classBreakInfos,[]).forEach(function(e){var r=(0,i.convertSymbol)(e.symbol,t),n=(0,o.defaultValue)(r.paint,{}),l=(0,o.defaultValue)(r.layout,{});Object.keys(n).forEach(function(t){u.indexOf(t)>-1&&!(0,a.isMapboxExpression)(n[t])&&(h[t]||(h[t]=new c(s,n[t])),h[t].addStep(e.minValue,e.maxValue,n[t]))}),Object.keys(l).forEach(function(t){u.indexOf(t)>-1&&!(0,a.isMapboxExpression)(l[t])&&(p[t]||(p[t]=new c(s,l[t])),p[t].addStep(e.minValue,e.maxValue,l[t]))})}),Object.keys(h).forEach(function(e){l[e]=h[e].toExpress()}),Object.keys(p).forEach(function(e){f[e]=p[e].toExpress()}),n.paint=l,n.layout=f,n}}]),e}();t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertSymbol=void 0;var n=r(10),i=r(161);function o(e,t,r,o){if((0,n.defined)(o.color)&&(t["line-color"]=(0,i.convertColorToRgb)(o.color)),(0,n.defined)(o.width)&&(t["line-width"]=o.width),(0,n.defined)(o.opacity)&&(t["line-opacity"]=o.opacity),(0,n.defined)(o.cap)&&(r["line-cap"]=o.cap),(0,n.defined)(o.join)&&(r["line-join"]=o.join),(0,n.defined)(o.miterLimit)&&(r["line-miter-limit"]=o.miterLimit),(0,n.defined)(o.style)){var a=(0,i.convertLineStyle)(o.style,"butt"===o.cap);a&&(t["line-dasharray"]=a)}}t.convertSymbol=function(e,t){var r={};(0,n.defined)(r)||(r={}),(0,n.defined)(r.paint)||(r.paint={}),(0,n.defined)(r.layout)||(r.layout={});var a=r.paint,s=r.layout;switch(e.type){case"simple-line":o(0,a,s,e);break;case"simple-fill":!function(e,t,r,o){switch(e){case"fill":(0,n.defined)(o.color)&&(t["fill-color"]=(0,i.convertColorToRgb)(o.color)),(0,n.defined)(o.opacity)&&(t["fill-opacity"]=o.opacity),(0,n.defined)(o.outline)&&(0,n.defined)(o.outline.color)&&(t["fill-outline-color"]=(0,i.convertColorToRgb)(o.outline.color));break;case"background":(0,n.defined)(o.color)&&(t["background-color"]=(0,i.convertColorToRgb)(o.color)),(0,n.defined)(o.opacity)&&(t["background-opacity"]=o.opacity)}}(t,a,0,e);break;case"simple-marker":!function(e,t,r,a){switch(e){case"symbol":(0,n.defined)(a.angle)&&(r["icon-rotate"]=a.angle),(0,n.defined)(a.color)&&(t["icon-color"]=(0,i.convertColorToRgb)(a.color)),(0,n.defined)(a.outline)&&((0,n.defined)(a.outline.color)&&(t["icon-halo-color"]=(0,i.convertColorToRgb)(a.outline.color)),(0,n.defined)(a.outline.width)&&(t["icon-halo-width"]=a.outline.width)),(0,n.defined)(a.size)&&(r["icon-size"]=parseInt(a.size));var s=(0,n.defined)(a.xoffset)?parseFloat((0,n.defaultValue)(a.xoffset,0)):0,u=(0,n.defined)(a.yoffset)?parseFloat((0,n.defaultValue)(a.yoffset,0)):0;r["icon-offset"]=[s,u];break;case"circle":var l=(0,n.defaultValue)(a.xoffset,0),c=(0,n.defaultValue)(a.yoffset,0);if(t["circle-translate"]=[parseFloat(l),parseFloat(c)],(0,n.defined)(a.opacity)&&(t["circle-opacity"]=a.opacity),(0,n.defined)(a.color)&&(t["circle-color"]=a.color),(0,n.defined)(a.outline)){var f={};o(0,{},a.outline),(0,n.defined)(f["line-color"])&&(t["circle-stroke-color"]=(0,i.convertColorToRgb)(f["line-color"])),(0,n.defined)(f["line-opacity"])&&(t["circle-stroke-opacity"]=f["line-opacity"]),(0,n.defined)(f["line-width"])&&(t["circle-stroke-width"]=f["line-width"])}t["circle-radius"]=parseFloat((0,n.defaultValue)(a.size,12))}}(t,a,s,e);break;case"text":!function(e,t,r,o){if((0,n.defined)(o.backgroundColor)&&(t["icon-color"]=(0,i.convertColorToRgb)(o.backgroundColor)),(0,n.defined)(o.borderLineColor)&&(t["icon-halo-color"]=(0,i.convertColorToRgb)(o.borderLineColor)),(0,n.defined)(o.borderLineSize)&&(t["icon-halo-width"]=parseFloat(o.borderLineSize)),(0,n.defined)(o.color)&&(t["text-color"]=(0,i.convertColorToRgb)(o.color)),(0,n.defined)(o.font)){var a=o.font;(0,n.defined)(a.family)&&(r["text-font"]=[a.family]),r["text-size"]=parseFloat((0,n.defaultValue)(a.size,9))}switch((0,n.defined)(o.haloColor)&&(t["text-halo-color"]=(0,i.convertColorToRgb)(o.haloColor)),(0,n.defined)(o.haloSize)&&(t["text-halo-width"]=parseFloat(o.haloSize)),(0,n.defined)(o.horizontalAlignment)&&(r["text-justify"]=o.horizontalAlignment),(0,n.defined)(o.kerning)&&(r["text-letter-spacing"]=o.kerning?1.2:0),(0,n.defined)(o.lineHeight)&&(r["text-line-height"]=o.lineHeight?1.2:0),r["text-max-width"]=(0,n.defaultValue)(o.lineWidth,192),o.rotated&&(0,n.defined)(o.angle)&&(t["text-rotate"]=o.angle,t["icon-rotate"]=o.angle),r["text-anchor"]="center",o.verticalAlignment){case"top":r["text-anchor"]="top";break;case"middle":r["text-anchor"]="center";break;case"bottom":r["text-anchor"]="bottom";break;default:r["text-anchor"]="center"}var s=(0,n.defined)(o.xoffset)?parseFloat((0,n.defaultValue)(o.xoffset,0)/r["text-font"]):0,u=(0,n.defined)(o.yoffset)?parseFloat((0,n.defaultValue)(o.yoffset,0)/r["text-font"]):0;r["text-offset"]=[s,u]}(0,a,s,e)}return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(28)),o=r(1),a=r(3),s=r(0),u=r(39);var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,s.defaultValue)(e,{}),r.type=a.LayerType.feature,r.elevationInfo=new o.ElevationInfo(e.elevationInfo),r.geometryType=a.GeometryType.geometry,r.renderer=r._decorate("renderer",e.renderer,u.BaseRenderer,u.BaseRenderer.fromJSON),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.renderer=(0,s.toJSON)(this.renderer,u.BaseRenderer),e.elevationInfo=(0,s.toJSON)(this.elevationInfo,o.ElevationInfo),e.geometryType=this.geometryType,e}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();o.Zondy.Layer.FeatureLayer=l,t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=f(r(30)),o=r(1),a=r(0),s=r(3),u=r(11),l=r(53),c=f(r(409));function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r.type=s.RendererType.uniqueValue,r.field=(0,a.defaultValue)(e.field,""),r.uniqueValueInfos=r._decorate("uniqueValueInfos",(0,a.defaultValue)(e.uniqueValueInfos,[]),null,function(e){return e.map(function(e){return c.default.fromJSON(e)})}),r.defaultSymbol=r._decorate("symbol",e.defaultSymbol,u.Symbol,u.Symbol.fromJSON),r.defaultVisible=(0,a.defaultValue)(e.defaultVisible,!0),r.visualVariables=r._decorate("visualVariables",(0,a.defaultValue)(e.visualVariables,[]),null,function(e){return e.map(function(e){return l.VisualVariable.fromJSON(e)})}),r.valueExpressionTitle=(0,a.defaultValue)(e.valueExpressionTitle,""),r.valueExpression=(0,a.defaultValue)(e.valueExpression,""),r.defaultLabel=(0,a.defaultValue)(e.defaultLabel,null),r.defaultDescription=(0,a.defaultValue)(e.defaultDescription,null),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.field=this.field,e.defaultSymbol=this.defaultSymbol.toJSON(),e.uniqueValueInfos=this.uniqueValueInfos.map(function(e){return e.toJSON()}),e.visualVariables=this.visualVariables.map(function(e){return e.toJSON()}),e.valueExpression=this.valueExpression,e.valueExpressionTitle=this.valueExpressionTitle,e.defaultLabel=this.defaultLabel,e.defaultDescription=this.defaultDescription,e.defaultVisible=this.defaultVisible,e}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();h.fromJSON=function(e){return e=(0,a.defaultValue)(e,{}),new h(e)},o.Zondy.Renderer.UniqueValueRenderer=h,t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=l(r(69)),o=r(1),a=r(0),s=l(r(40)),u=l(r(404));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r.type=s.default.color,r.stops=(0,a.defaultValue)(e.stops,[]),r.stops=r.stops.map(function(e){return u.default.fromJSON(e)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.type=this.type,e.normalizationField=this.normalizationField,e.stops=this.stops.map(function(e){return e.toJSON()}),e}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();o.Zondy.Renderer.VisualVariable.ColorVariable=c,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(1);var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,i.defaultValue)(t,{}),this.color=o.Color.fromColor((0,i.defaultValue)(t.color,{})),this.value=t.value,this.label=t.label}return n(e,[{key:"toJSON",value:function(){var e={};return e.color=this.color.toJSON(),e.value=this.value,e.label=this.label,e}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t)}}]),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=l(r(69)),o=r(0),a=l(r(40)),s=l(r(406)),u=r(1);function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=a.default.size,r.maxDataValue=e.maxDataValue,r.maxSize=e.maxSize,r.minDataValue=e.minDataValue,r.minSize=e.minSize,r.stops=(0,o.defaultValue)(e.stops,[]),r.stops=r.stops.map(function(e){return s.default.fromJSON(e)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.type=this.type,e.minSize=this.minSize,e.maxSize=this.maxSize,e.minDataValue=this.minDataValue,e.maxDataValue=this.maxDataValue,e.normalizationField=this.normalizationField,e.stops=this.stops.map(function(e){return e.toJSON()}),e}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();u.Zondy.Renderer.VisualVariable.SizeVariable=c,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0);var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,i.defaultValue)(t,{}),this.size=t.size,this.value=t.value,this.label=t.label}return n(e,[{key:"toJSON",value:function(){var e={};return e.size=this.size,e.value=this.value,e.label=this.label,e}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t)}}]),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=l(r(69)),o=r(0),a=l(r(40)),s=l(r(408)),u=r(1);function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=a.default.opacity,r.stops=(0,o.defaultValue)(e.stops,[]),r.stops=r.stops.map(function(e){return s.default.fromJSON(e)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.type=this.type,e.normalizationField=this.normalizationField,e.stops=this.stops.map(function(e){return e.toJSON()}),e}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();u.Zondy.Renderer.VisualVariable.OpacityVariable=c,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0);var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,i.defaultValue)(t,{}),this.opacity=t.opacity,this.value=t.value,this.label=t.label}return n(e,[{key:"toJSON",value:function(){var e={};return e.opacity=this.opacity,e.value=this.value,e.label=this.label,e}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t)}}]),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(11);var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,i.defaultValue)(t,{}),this.value=t.value,this.symbol=o.Symbol.fromJSON(t.symbol),this.label=(0,i.defaultValue)(t.label,null),this.description=(0,i.defaultValue)(t.description,null),this.visible=(0,i.defaultValue)(t.visible,!0)}return n(e,[{key:"toJSON",value:function(){return{value:this.value,symbol:this.symbol.toJSON(),label:this.label,description:this.description,visible:this.visible}}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t=(0,i.defaultValue)(t,{}))}}]),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=f(r(30)),o=r(1),a=r(0),s=r(3),u=r(11),l=r(53),c=f(r(411));function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r.type=s.RendererType.classBreak,r.field=(0,a.defaultValue)(e.field,""),r.classBreakInfos=r._decorate("classBreakInfos",(0,a.defaultValue)(e.classBreakInfos,[]),null,function(e){return e.map(function(e){return c.default.fromJSON(e)})}),r.defaultSymbol=r._decorate("symbol",e.defaultSymbol,u.Symbol,u.Symbol.fromJSON),r.defaultVisible=(0,a.defaultValue)(e.defaultVisible,!0),r.visualVariables=r._decorate("visualVariables",(0,a.defaultValue)(e.visualVariables,[]),null,function(e){return e.map(function(e){return l.VisualVariable.fromJSON(e)})}),r.valueExpressionTitle=(0,a.defaultValue)(e.valueExpressionTitle,""),r.valueExpression=(0,a.defaultValue)(e.valueExpression,""),r.defaultLabel=(0,a.defaultValue)(e.defaultLabel,null),r.defaultDescription=(0,a.defaultValue)(e.defaultDescription,null),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.field=this.field,e.classBreakInfos=this.classBreakInfos,e.defaultSymbol=this.defaultSymbol.toJSON(),e.classBreakInfos=this.classBreakInfos.map(function(e){return e.toJSON()}),e.visualVariables=this.visualVariables.map(function(e){return e.toJSON()}),e.valueExpression=this.valueExpression,e.valueExpressionTitle=this.valueExpressionTitle,e.defaultLabel=this.defaultLabel,e.defaultDescription=this.defaultDescription,e.defaultVisible=this.defaultVisible,e}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();h.fromJSON=function(e){return e=(0,a.defaultValue)(e,{}),new h(e)},o.Zondy.Renderer.ClassBreakRenderer=h,t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(11);var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,i.defaultValue)(t,{}),this.minValue=t.minValue,this.maxValue=t.maxValue,this.symbol=o.Symbol.fromJSON(t.symbol),this.label=(0,i.defaultValue)(t.label,null),this.description=(0,i.defaultValue)(t.description,null),this.visible=(0,i.defaultValue)(t.visible,!0)}return n(e,[{key:"toJSON",value:function(){return{minValue:this.minValue,maxValue:this.maxValue,symbol:this.symbol.toJSON(),label:this.label,description:this.description,visible:this.visible}}},{key:"clone",value:function(){return new e(this.toJSON())}}],[{key:"fromJSON",value:function(t){return new e(t=(0,i.defaultValue)(t,{}))}}]),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(30)),o=r(1),a=r(0),s=r(3),u=r(11),l=r(53);var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r.type=s.RendererType.simple,r.symbol=r._decorate("symbol",e.symbol,u.Symbol,u.Symbol.fromJSON),r.label=(0,a.defaultValue)(e.label,null),r.description=(0,a.defaultValue)(e.description,null),r.visualVariables=r._decorate("visualVariables",(0,a.defaultValue)(e.visualVariables,[]),null,function(e){return e.map(function(e){return l.VisualVariable.fromJSON(e)})}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.symbol=this.symbol.toJSON(),e.visualVariables=this.visualVariables.map(function(e){return e.toJSON()}),e.label=this.label,e.description=this.description,e}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();c.fromJSON=function(e){return e=(0,a.defaultValue)(e,{}),new c(e)},o.Zondy.Renderer.SimpleRenderer=c,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=c(r(30)),o=r(0),a=r(1),s=r(3),u=r(11),l=c(r(162));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=s.RendererType.cluster,r.radius=(0,o.defaultValue)(e.radius,80),r.clusterBoundSymbol=r._decorate("clusterBoundSymbol",e.clusterBoundSymbol,u.SimpleFillSymbol,u.SimpleFillSymbol.fromJSON),r.clusterInfos=r._decorate("clusterInfos",(0,o.defaultValue)(e.clusterInfos,[]),null,function(e){return e.map(function(e){return l.default.fromJSON(e)})}),r.defaultSymbol=r._decorate("defaultSymbol",(0,o.defaultValue)(e.defaultSymbol,new u.SimpleMarkerSymbol({color:"rgba(240, 194, 12, 0.6)",size:30,outline:{color:"rgba(241, 211, 87, 0.6)",width:5}})),u.Symbol,u.Symbol.fromJSON),r.maxScale=(0,o.defaultValue)(e.maxScale,20),r.isExpandOnClick=(0,o.defaultValue)(e.isExpandOnClick,!0),r.isHoverShowBound=(0,o.defaultValue)(e.isHoverShowBound,!1),r.defaultLabelSymbol=r._decorate("defaultLabelSymbol",(0,o.defaultValue)(e.defaultLabelSymbol,{}),u.TextSymbol,u.TextSymbol.fromJSON),r.defaultLabelExpressionInfo=(0,o.defaultValue)(e.defaultLabelExpressionInfo,null),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.type=this.type,e.radius=this.radius,e.clusterBoundSymbol=this.clusterBoundSymbol.toJSON(),e.clusterInfos=this.clusterInfos.map(function(e){return e.toJSON()}),e.defaultSymbol=this.defaultSymbol.toJSON(),e.maxScale=this.maxScale,e.isExpandOnClick=this.isExpandOnClick,e.isHoverShowBound=this.isHoverShowBound,e.defaultLabelSymbol=this.defaultLabelSymbol.toJSON(),e.defaultLabelExpressionInfo=this.defaultLabelExpressionInfo?JSON.parse(JSON.stringify(this.defaultLabelExpressionInfo)):null,e}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e=(0,o.defaultValue)(e,{}))}}]),t}();a.Zondy.Renderer.ClusterRenderer=f,t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(30)),o=r(0),a=r(1),s=r(3);var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=s.RendererType.random,r.field=(0,o.defaultValue)(e.field,void 0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.type=this.type,e}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e=(0,o.defaultValue)(e,{}))}}]),t}();a.Zondy.Renderer.RandomRenderer=u,t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(30)),o=r(0),a=r(1),s=r(3),u=r(11);var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=s.RendererType.rank,r.maxSize=(0,o.defaultValue)(e.maxSize,50),r.minSize=(0,o.defaultValue)(e.minSize,12),r.maxDataValue=e.maxDataValue,r.minDataValue=e.minDataValue,r.symbol=r._decorate("symbol",e.symbol,u.Symbol,u.Symbol.fromJSON),r.field=e.field,r.valueExpression=e.valueExpression,r.valueExpressionTitle=e.valueExpressionTitle,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.type=this.type,e.maxSize=this.maxSize,e.minSize=this.minSize,e.maxDataValue=this.maxDataValue,e.minDataValue=this.minDataValue,e.symbol=this.symbol.toJSON(),e.field=this.field,e.valueExpression=this.valueExpression,e.valueExpressionTitle=this.valueExpressionTitle,e}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e=(0,o.defaultValue)(e,{}))}}]),t}();a.Zondy.Renderer.RankRenderer=l,t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=l(r(30)),o=r(0),a=r(1),s=l(r(163)),u=r(3);function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=u.RendererType.heatmap,r.colorStops=(0,o.defaultValue)(e.colorStops,[]).map(function(e){return s.default.fromJSON(e)}),r.radius=e.radius,r.field=e.field,r.valueExpression=e.valueExpression,r.valueExpressionTitle=e.valueExpressionTitle,r.maxDataValue=e.maxDataValue,r.minDataValue=e.minDataValue,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.type=this.type,e.colorStops=this.colorStops.map(function(e){return e.toJSON()}),e.radius=this.radius,e.field=this.field,e.valueExpression=this.valueExpression,e.valueExpressionTitle=this.valueExpressionTitle,e.maxDataValue=this.maxDataValue,e.minDataValue=this.minDataValue,e}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e=(0,o.defaultValue)(e,{}))}}]),t}();a.Zondy.Renderer.HeatmapRenderer=c,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIGSDynamicLayer=void 0;var n=r(3),i=r(0),o=r(1),a=function(e){return e&&e.__esModule?e:{default:e}}(r(418));function s(e){var t=(0,i.defaultValue)(e,{}),r={};switch(t.type){case n.SymbolType.simpleMarker:r={color:[Math.trunc(t.color.red),Math.trunc(t.color.green),Math.trunc(t.color.blue),Math.trunc(255*t.color.alpha)],type:t.type,angle:t.angle,xoffset:t.xoffset,yoffset:t.yoffset,size:t.size,outline:null,style:t.style},t.outline&&(r.outline={type:t.outline.type,color:[Math.trunc(t.outline.color.red),Math.trunc(t.outline.color.green),Math.trunc(t.outline.color.blue),Math.trunc(255*t.outline.color.alpha)],width:t.outline.width,style:t.outline.style});break;case n.SymbolType.simpleFill:r={color:[Math.trunc(t.color.red),Math.trunc(t.color.green),Math.trunc(t.color.blue),Math.trunc(255*t.color.alpha)],type:t.type,outline:{color:[Math.trunc(t.outline.color.red),Math.trunc(t.outline.color.green),Math.trunc(t.outline.color.blue),Math.trunc(255*t.outline.color.alpha)],type:t.outline.type,width:t.outline.width,style:t.outline.style},style:t.style};break;case n.SymbolType.simpleLine:r={color:[Math.trunc(t.color.red),Math.trunc(t.color.green),Math.trunc(t.color.blue),Math.trunc(255*t.color.alpha)],type:t.type,width:t.width,style:t.style};break;case n.SymbolType.pictureMarker:r={color:[Math.trunc(t.color.red),Math.trunc(t.color.green),Math.trunc(t.color.blue),Math.trunc(255*t.color.alpha)],type:t.type,angle:t.angle,xoffset:t.xoffset,yoffset:t.yoffset,width:t.width,height:t.height,url:a.default.isBase64(t.url)?void 0:t.url,imageData:a.default.isBase64(t.url)?t.url:void 0,contentType:"image/png"};break;case n.SymbolType.pictureFill:r={type:t.type,outline:{color:[Math.trunc(t.outline.color.red),Math.trunc(t.outline.color.green),Math.trunc(t.outline.color.blue),Math.trunc(255*t.outline.color.alpha)],type:t.outline.type,width:t.outline.width,style:t.outline.style},url:a.default.isBase64(t.url)?void 0:t.url,imageData:a.default.isBase64(t.url)?t.url:void 0,contentType:"image/png",width:t.width,height:t.height,xoffset:t.xoffset,yoffset:t.yoffset};break;case n.SymbolType.text:r={type:t.type,color:[Math.trunc(t.color.red),Math.trunc(t.color.green),Math.trunc(t.color.blue),Math.trunc(255*t.color.alpha)],angle:t.angle,backgroundColor:[Math.trunc(t.backgroundColor.red),Math.trunc(t.backgroundColor.green),Math.trunc(t.backgroundColor.blue),Math.trunc(255*t.backgroundColor.alpha)],borderLineColor:[Math.trunc(t.borderLineColor.red),Math.trunc(t.borderLineColor.green),Math.trunc(t.borderLineColor.blue),Math.trunc(255*t.borderLineColor.alpha)],borderLineSize:t.borderLineSize,font:{family:t.font.family,size:t.font.size,style:t.font.style,weight:t.font.weight},haloColor:[Math.trunc(t.haloColor.red),Math.trunc(t.haloColor.green),Math.trunc(t.haloColor.blue),Math.trunc(255*t.haloColor.alpha)],haloSize:t.haloSize,horizontalAlignment:t.horizontalAlignment,kerning:t.kerning,verticalAlignment:t.verticalAlignment,xoffset:t.xoffset,yoffset:t.yoffset};break;default:r={}}return r}function u(e){for(var t=[],r=e.allSublayers.items.sort(function(e,t){return Number(e.index)-Number(t.index)}),i=!1,o=0;o<r.length;o++)r[o].renderer&&(i=!0),r[o].id!==e.allSublayers.items[o].id&&(i=!0);if(i)for(var a=0;a<r.length;a++){var u=r[a].renderer,l={layerId:r[a].id};if(u&&"Group"!==r[a].type){l.drawingInfo={renderer:{}};var c=u.toJSON(),f=void 0,h=void 0;switch(u.type){case n.RendererType.simple:f={type:c.type,symbol:s(c.symbol),label:c.label,description:c.description};break;case n.RendererType.uniqueValue:h=c.valueExpression.split("$feature.").join(""),f={type:c.type,field1:h||c.field,field2:null,field3:null,fieldDelimiter:null,defaultLabel:c.defaultLabel,defaultDescription:c.defaultDescription,uniqueValueInfos:[],defaultSymbol:s(c.defaultSymbol)};for(var p=0;p<c.uniqueValueInfos.length;p++)f.uniqueValueInfos.push({value:c.uniqueValueInfos[p].value,symbol:s(c.uniqueValueInfos[p].symbol),label:c.uniqueValueInfos[p].label,description:c.uniqueValueInfos[p].description,visible:c.uniqueValueInfos[p].visible});break;case n.RendererType.classBreak:h=c.valueExpression.split("$feature.").join(""),f={type:c.type,field:h||c.field,defaultLabel:c.defaultLabel,defaultDescription:c.defaultDescription,normalizationType:null,normalizationField:null,minValue:0,classBreakInfos:[],defaultSymbol:s(c.defaultSymbol)};for(var d=[],y=c.classBreakInfos,g=0;g<y.length;g++)d.push(Number(y[g].minValue));d=d.sort(function(e,t){return e-t}),f.minValue=d[0];var v=[].concat(c.classBreakInfos);v=v.sort(function(e,t){return e.maxValue-t.maxValue});for(var m=0;m<v.length;m++)f.classBreakInfos.push({classMaxValue:v[m].minValue,symbol:s(v[m].symbol),label:v[m].label,description:v[m].description,visible:v[m].visible}),f.classBreakInfos.push({classMaxValue:v[m].maxValue,symbol:s(v[m].symbol),label:v[m].label,description:v[m].description,visible:v[m].visible})}l.drawingInfo.renderer=f}"Group"!==r[a].type&&t.push(l)}return t}o.Zondy.getIGSDynamicLayer=u,t.getIGSDynamicLayer=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();var o=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,null,[{key:"getTag",value:function(e){return null===e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}},{key:"isBoolean",value:function(t){return!0===t||!1===t||e.isObjectLike(t)&&"[object Boolean]"===e.getTag(t)}},{key:"isObject",value:function(e){var t=void 0===e?"undefined":n(e);return null!==e&&("object"===t||"function"===t)}},{key:"isObjectLike",value:function(e){return"object"===(void 0===e?"undefined":n(e))&&null!==e}},{key:"isFunction",value:function(e){return"function"==typeof e}},{key:"isLength",value:function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},{key:"isString",value:function(t){var r=void 0===t?"undefined":n(t);return"string"===r||"object"===r&&null!==t&&!Array.isArray(t)&&"[object String]"===e.getTag(t)}},{key:"isSymbol",value:function(t){var r=void 0===t?"undefined":n(t);return"symbol"===r||"object"===r&&null!==t&&"[object Symbol]"===e.getTag(t)}},{key:"isUndefined",value:function(e){return void 0===e}},{key:"isNull",value:function(e){return null===e}},{key:"isArray",value:function(e){return Array.isArray(e)}},{key:"isArrayLike",value:function(t){return null!==t&&"function"!=typeof t&&e.isLength(t.length)}},{key:"isArrayLikeObject",value:function(t){return e.isObjectLike(t)&&e.isArrayLike(t)}},{key:"isNil",value:function(e){return null===e}},{key:"isNumber",value:function(t){return"number"==typeof t||e.isObjectLike(t)&&"[object Number]"===e.getTag(t)}},{key:"isPlainObject",value:function(t){if(!e.isObjectLike(t)||"[object Object]"!==e.getTag(t))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var r=t;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(t)===r}},{key:"isElement",value:function(t){return e.isObjectLike(t)&&1===t.nodeType&&!e.isPlainObject(t)}},{key:"isError",value:function(t){if(!e.isObjectLike(t))return!1;var r=e.getTag(t);return"[object Error]"===r||"[object DOMException]"===r||"string"==typeof t.message&&"string"==typeof t.name&&!e.isPlainObject(t)}},{key:"isArguments",value:function(t){return e.isObjectLike(t)&&"[object Arguments]"===e.getTag(t)}},{key:"isNative",value:function(t){return e.isObject(t)&&o.test(t)}},{key:"isBase64",value:function(e){return!!e.match(/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$/)}}]),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=c(r(28)),o=r(0),a=r(1),s=c(r(33)),u=c(r(52)),l=r(4);function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.url=(0,o.defaultValue)(e.url,""),r.mapName=(0,o.defaultValue)(e.mapName,void 0),r.documentInfo=(0,o.defaultValue)(e.documentInfo,void 0),r.capabilities=[],r.renderMode=(0,o.defaultValue)(e.renderMode,"tile"),r.imageWidth=(0,o.defaultValue)(e.imageWidth,256),r.imageHeight=(0,o.defaultValue)(e.imageHeight,256),r.imageFormat=(0,o.defaultValue)(e.imageFormat,"png"),r.imageTransparency=(0,o.defaultValue)(e.imageTransparency,!0),r.dynamicProjectionEnabled=(0,o.defaultValue)(e.dynamicProjectionEnabled,!1),r._extentSrc=e.extent?s.default.fromJSON(e.extent):void 0,r._spatialReferenceSrc=e.spatialReference?l.SpatialReference.fromJSON(e.spatialReference):void 0,r._sublayers=(0,o.defaultValue)(e.sublayers,void 0),r._allSublayers=void 0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);e.url=this.url,e.mapName=this.mapName,e.documentInfo=this.documentInfo,e.capabilities=this.capabilities,e.imageWidth=this.imageWidth,e.imageHeight=this.imageHeight,e.imageFormat=this.imageFormat,e.imageTransparency=this.imageTransparency,e.dynamicProjectionEnabled=this.dynamicProjectionEnabled,e.spatialReference=(0,o.toJSON)(this.spatialReference,l.SpatialReference),e.extent=(0,o.toJSON)(this.extent,s.default);var r=[];return this.sublayers.forEach(function(e){r.push(e instanceof u.default?e.toJSON():e)}),e.sublayers=r,e}},{key:"clone",value:function(){return new t(this.toJSON())}},{key:"_getSubLayers",value:function(e,t){var r=this;t.add(e),e.sublayers&&e.sublayers instanceof a.Collection&&e.sublayers.items.length>0&&e.sublayers.forEach(function(e){r._getSubLayers(e,t)})}}]),t}();Object.defineProperties(f.prototype,{allSublayers:{get:function(){var e=this;if(!this.loaded)return new a.Collection;if(!this._allSublayers){var t=new a.Collection;this._sublayers.forEach(function(r){e._getSubLayers(r,t)}),this._allSublayers=t}return this._allSublayers}},sublayers:{get:function(){return this.loaded?this._sublayers:new a.Collection},set:function(e){this._sublayers=e}},extent:{get:function(){return self.spatialReference?self.spatialReference.equals(self._spatialReferenceSrc)?this._extentSrc:a.Projection.project(this._extentSrc,self.spatialReference):this._extentSrc}},spatialReference:{get:function(){return this._spatialReferenceSrc},set:function(e){this._spatialReferenceSrc=e}}}),t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(28)),o=r(0),a=r(1);var s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.url=(0,o.defaultValue)(e.url,void 0),r.tokenKey=(0,o.defaultValue)(e.tokenKey,"token"),r.tokenValue=(0,o.defaultValue)(e.tokenValue,void 0),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.url=this.url,e.tokenKey=this.tokenKey,e.tokenValue=this.tokenValue,e}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();a.Zondy.Layer.SceneLayer=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=l(r(28)),o=r(0),a=r(1),s=r(3),u=l(r(41));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.type=s.LayerType.tile,r.url=(0,o.defaultValue)(e.url,void 0),r.tileInfo=void 0,r.tileSliceType=s.TileSliceType.wmts,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.url=this.url,e.tileInfo=(0,o.toJSON)(this.tileInfo,u.default),e.tileSliceType=this.tileSliceType,e}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();a.Zondy.Layer.TileLayer=c,t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(8),o=r(3),a=r(1),s=r(0);var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,s.defaultValue)(e,{}),r.type=o.LayerType.igsMapImage,r.description="IGS影像图层",r.url=(0,s.defaultValue)(e.url,""),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.MapImageLayer),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.url=this.url,e}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();a.Zondy.Layer.IGSImageLayer=u,t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0},o=r(8),a=r(1),s=r(3),u=r(0),l=r(12),c=r(4),f=function(e){return e&&e.__esModule?e:{default:e}}(r(166)),h=r(29),p=r(21);var d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(e=(0,u.defaultValue)(e,{}),r.type=s.LayerType.igsMapImage,r.renderMode=(0,u.defaultValue)(e.renderMode,"tile"),r.clientId=(0,u.defaultValue)(e.clientId,void 0),!r.clientId){var n=localStorage.getItem("MapGIS-MapServer-ClientId");n?r.clientId=n:(r.clientId=(0,u.getGUID)(),localStorage.setItem("MapGIS-MapServer-ClientId",r.clientId))}r._isAntialiasing=(0,u.defaultValue)(e.isAntialiasing,void 0),r.description="IGS地图服务图层",r._clippingArea=(0,u.defaultValue)(e.clippingArea,null),r._igsVersion="2.0";var i=r.url.split("MapServer/");if(1===i.length)r._url=i[0];else{r._url=i[0]+"MapServer";var o=i[1],a=r._sublayers.filter(function(e){return e.id===o});Array.isArray(a)&&a.length>0?r._subLayer=[a]:r._subLayer=[{id:o}]}return r._mapServer=new l.MapServer({url:r._url,tokenKey:r.tokenKey,tokenValue:r.tokenValue,enableGlobeFetch:!1,headers:r.headers}),r._flatServerSublayerInfosCache=[],r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.MapImageLayer),n(t,[{key:"load",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"load",this).call(this)}},{key:"_load",value:function(){var e=this,t=this;return this._mapServer.queryServerInfo().then(function(r){u.Log.info("MapServer信息查询成功:",r);var n=r.data,i={};if(t.url.indexOf("/igs/rest/services/")>-1){if(t._igsVersion="2.0",t.documentInfo=(0,u.defaultValue)(t.documentInfo,n.documentInfo),t.mapName=(0,u.defaultValue)(t.mapName,n.mapName),t.title||(t.title=n.mapName),0===t.capabilities.length&&(t.capabilities=n.childResources.split(",")),t.dynamicProjectionEnabled=(0,u.defaultValue)(t.dynamicProjectionEnabled,n.dynamicProjectionEnabled),!t._spatialReferenceSrc&&n.spatialReference&&(t._spatialReferenceSrc=new c.SpatialReference({wkid:n.spatialReference.wkid,wkt:n.spatialReference.wkt})),!t._extentSrc&&!(0,u.isNull)(n.extent)){var o=new c.SpatialReference(n.spatialReference);t._extentSrc=new c.Extent({xmin:n.extent.xmin,ymin:n.extent.ymin,xmax:n.extent.xmax,ymax:n.extent.ymax,spatialReference:o}),o.equals(t._spatialReferenceSrc)||(t._extentSrc=a.Projection.project(t._extentSrc,t._spatialReferenceSrc))}}else t._igsVersion="1.0",i.mapIndex="0",t._spatialReferenceSrc||u.Log.error("IGS1.0服务必须设置参考系"),t._extentSrc||(0,u.isNull)(n.xMin)||(0,u.isNull)(n.yMin)||(0,u.isNull)(n.xMax)||(0,u.isNull)(n.yMax)||(t._extentSrc=new c.Extent({xmin:n.xMin,ymin:n.yMin,xmax:n.xMax,ymax:n.yMax,spatialReference:t._spatialReferenceSrc})),t.mapName=n.name,t.title||(t.title=n.name);return t._mapServer.queryLayerList(i).then(function(r){u.Log.info("子图层信息查询成功:",r);var n=[];if("2.0"===t._igsVersion)n=r.data.layers;else{n=r.data;for(var i=0;i<n.length;i++)n[i].visible="Visible"===n[i].State,n[i].index=n[i].LayerIndex,n[i].type="Unknown"===n[i].GeomType?"Group":n[i].GeomType}e._flatServerSublayerInfosCache=[],(0,h.flatServerSublayerInfos)(n,e._flatServerSublayerInfosCache);for(var o=new a.Collection,l=function(r){var i=n[r],a=!0,s={},u=(0,h.toSublayerArr)(t._sublayers);u&&(a=!1,u.some(function(e){return String(i.index)===String(e.id)})&&(a=!0,s=u[u.findIndex(function(e){return String(i.index)===String(e.id)})]));if(a){var l=e._createIGSMapImageSubLayer(i,s);o.add(l)}},c=0;c<n.length;c++)l(c);return t._sublayers=o,t.loadStatus=s.LoadStatus.loaded,t.loaded=!0,new Promise(function(e){e(t)})})})}},{key:"toJSON",value:function(){var e=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.description=this.description,e.documentInfo=this.documentInfo,e.renderMode=this.renderMode,e}},{key:"_createIGSMapImageSubLayer",value:function(e,t){e=e||{},t=t||{};var r={};this._createSublayerOptions(r,e,t);var n=new f.default(r);return n.layer=this,n}},{key:"_createSublayerOptions",value:function(e,t,r){var n=this;e.url=t.url,e.name=t.name,e.type=t.type,e.fields=t.fields,e.geomType=t.geomType,e.maxScale=t.maxScale,e.minScale=t.minScale,e.range=t.range,e.systemLibGuid=t.systemLibGuid,e.systemLibName=t.systemLibName,e.index=t.index;var i=(t.filter||{}).where;(i||r.definitionExpression)&&(e.definitionExpression=i,r.definitionExpression&&r.definitionExpression!==i&&(e.definitionExpression=r.definitionExpression,e.definitionExpressionChanged=!0));var o=Array.isArray(t.children)?t.children:[],a=r.sublayers,s=[];return o.forEach(function(e){var t={},r=!0,i=void 0;a&&Array.isArray(a)?(r=!1,(i=a.find(function(t){return String(t.id)===String(e.index)}))&&(r=!0)):i={},r&&(n._createSublayerOptions(t,e,i),s.push(t))}),(e=Object.assign(e,r)).sublayers=s,e}},{key:"findSublayerById",value:function(e){if(this.loadStatus===s.LoadStatus.loaded&&this.allSublayers)for(var t=0;t<this.allSublayers.items.length;t++)if(String(this.allSublayers.items[t].id)===String(e))return this.allSublayers.items[t]}},{key:"fetchImage",value:function(e,t,r){t=(0,u.defaultValue)(t,256),r=(0,u.defaultValue)(r,256);var n=this.getImageUrl({extent:e,width:t,height:r});return new Promise(function(e){var i=new Image;i.src=n,i.width=t,i.height=r,e(i)})}},{key:"getImageUrl",value:function(e){return this._mapServer.getImage(e)}},{key:"setSubLayer",value:function(e){(0,h.setSublayer)(this,e,f.default),(0,h.fireEvent)(this,s.LayerEventType.layerUpdate,s.LayerEventType.layerSublayerVisible)}},{key:"getFilters",value:function(){var e={};return this.allSublayers.forEach(function(t){var r=t.definitionExpression,n=t.geometryFilter,i=(0,u.defaultValue)(e[t.id],{});if(r&&t._definitionExpressionChanged&&(i.where=r),n){var o=(0,p.getGeometryFilter)(n.geometry,n.spatialReference);o&&Object.assign(i,o)}"{}"!==JSON.stringify(i)&&(e[t.id]=i)}),"{}"===JSON.stringify(e)?void 0:e}}],[{key:"clone",value:function(e){return new t(e.toJSON())}},{key:"fromJSON",value:function(e){var r=this,n=new t(e=(0,u.defaultValue)(e,{}));n.loadStatus=s.LoadStatus.loaded,n.loaded=!0;var i=e.sublayers||[],o=new a.Collection;return i.forEach(function(e){var t=new f.default(e);t.layer=r,o.add(t)}),n._sublayers=o,n.loadStatus=s.LoadStatus.loaded,n.loaded=!0,n}}]),t}();Object.defineProperties(d.prototype,{clippingArea:{get:function(){return this._clippingArea},set:function(e){this._clippingArea=e,this._fireUpdateEvent("空间裁剪区域",[{name:"clippingArea",params:[this._clippingArea],dataChanged:!0,operationType:"property"}])}},layers:{get:function(){var e="show:";if(this.allSublayers.forEach(function(t){"Group"!==t.type&&t.visible&&(e+=t.id+",")}),5===e.length){var t=this._flatServerSublayerInfosCache,r="";Array.isArray(t)&&t.length>0?(t.forEach(function(e){"Group"!==e.type&&(r+=e.index+",")}),r=r.substring(0,r.length-1)):u.Log.info("服务器图层缓存为空,暂时不支持隐藏全部图层"),e="hide:"+r}else e=e.substring(0,e.length-1);return e}},isAntialiasing:{get:function(){return this._isAntialiasing},set:function(e){this._isAntialiasing=e,this._fireUpdateEvent("服务端抗锯齿",[{name:"refresh",params:[this._isAntialiasing],dataChanged:!0,operationType:"property"}])}}}),a.Zondy.Layer.IGSMapImageLayer=d,t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0},o=r(8),a=r(1),s=r(0),u=r(3),l=r(12),c=r(4),f=function(e){return e&&e.__esModule?e:{default:e}}(r(54));var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,s.defaultValue)(e,{}),r.type=u.LayerType.igsTile,r.description="IGS瓦片图层",r.url=(0,s.defaultValue)(e.url,""),r.mapName=(0,s.defaultValue)(e.mapName,""),r._clippingArea=(0,s.defaultValue)(e.clippingArea,null),r._igsVersion="2.0",r.url.indexOf("/igs/rest/mrms/tile/")>-1&&(r._igsVersion="1.0"),r._tileServer=new l.TileServer({url:r.url}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.TileLayer),n(t,[{key:"load",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"load",this).call(this)}},{key:"_load",value:function(){var e=this;return this._tileServer.queryServerInfo().then(function(t){s.Log.info("TileServer信息查询成功:",t);var r=t.data;return"1.0"===e._igsVersion?(e.tileSize=r.tileWidth,e.tileInfo=f.default.parseTileInfo1(r),e.tileInfo.origin.spatialReference=e._spatialReference,e.tileInfo.spatialReference=e._spatialReference,e._spatialReference||s.Log.error("IGS1.0服务必须设置参考系"),e.extent=new c.Extent({xmin:r.xMin,ymin:r.yMin,xmax:r.xMax,ymax:r.yMax,spatialReference:c.SpatialReference.fromJSON(e._spatialReference)})):(e.mapName=r.mapName,e.tileSize=r.tileInfo.cols,e.tileInfo=f.default.parseTileInfo2(r.tileInfo),e.spatialReference=new c.SpatialReference(e.tileInfo.spatialReference),e.extent=new c.Extent({xmin:r.extent.xmin,ymin:r.extent.ymin,xmax:r.extent.xmax,ymax:r.extent.ymax,spatialReference:c.SpatialReference.fromJSON(e.spatialReference)})),e.title||(e.title=r.mapName),new Promise(function(t){e.loadStatus=u.LoadStatus.loaded,e.loaded=!0,t(e)})}).catch(function(e){s.Log.error("TileServer信息查询失败:",e)})}},{key:"getTileUrl",value:function(e,t,r){return this.url+"/tileImage/"+e+"/"+t+"/"+r+"?f=image"}},{key:"toJSON",value:function(){var e=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);e.description=this.description,e.url=this.url,e.mapName=this.mapName,e.tileSize=this.tileSize;var r={size:this.tileInfo.size,dpi:this.tileInfo.dpi,format:this.tileInfo.format,spatialReference:(0,s.toJSON)(this.tileInfo.spatialReference,c.SpatialReference),origin:(0,s.toJSON)(this.tileInfo.origin,c.Point),lods:this.tileInfo.lods};return e.tileInfo=r,e}}],[{key:"fromJSON",value:function(e){var r=new t(e=(0,s.defaultValue)(e,{}));return r.tileSize=e.tileSize,r.tileInfo={dpi:e.tileInfo.dpi,format:e.tileInfo.format,size:e.tileInfo.size,spatialReference:c.SpatialReference.fromJSON(e.tileInfo.spatialReference),lods:e.tileInfo.lods,origin:c.Geometry.fromJSON(e.tileInfo.origin)},r.spatialReference=c.SpatialReference.fromJSON(e.spatialReference),r.extent=c.Geometry.fromJSON(e.extent),r.loadStatus=u.LoadStatus.loaded,r.loaded=!0,r}}]),t}();Object.defineProperties(h.prototype,{clippingArea:{get:function(){return this._clippingArea},set:function(e){this._clippingArea=e,this._fireUpdateEvent("空间裁剪区域",[{name:"clippingArea",params:[this._clippingArea],dataChanged:!0,operationType:"property"}])}}}),a.Zondy.Layer.IGSTileLayer=h,t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(12),a=r(0),s=r(3),u=r(8),l=h(r(167)),c=h(r(92)),f=r(10);function h(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r.url=(0,a.defaultValue)(e.url,""),r.type=s.LayerType.scene,r.version=void 0,r.boundingVolume=void 0,r.boundingSphere=void 0,r.sceneName=void 0,r.fieldInfo=void 0,r.position=void 0,r.spatialReference=void 0,r.description="场景图层",r.scenes=(0,a.defaultValue)(e.scenes,[]),r._sceneServer=new o.SceneServer({url:r.url}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.SceneLayer),n(t,[{key:"_load",value:function(){var e=this;function t(r,n){for(var i=0;i<r.length;i++)"9"===r[i].layerType&&Array.isArray(r[i].children)?t(r[i].children,n):(r[i].layer=e,n.push(new c.default(r[i])))}function r(e,t){for(var r=0;r<e.length;r++)for(var n=0;n<t.length;n++)e[r].id===t[n].id&&e[r].extendOptions&&(t[n].extendOptions=Object.assign(t[n].extendOptions,e[r].extendOptions),t[n]._renderer=e[r].renderer);return t}return this._sceneServer.queryServerInfo().then(function(n){a.Log.info("SceneServer信息查询成功:",n);var i=n.data;if(e.url.indexOf("/igs/rest/services/")>-1&&e.url.indexOf("/SceneServer")>-1){var o=JSON.parse(JSON.stringify(i));o.layer=e,e.title||(e.title=i.sceneName),e.sceneName=i.dataName,e.documentInfo=i;var u=i.sceneRange;e.boundingSphere={},e.boundingSphere.center=Cesium.Cartesian3.fromDegrees((u.xMin+u.xMax)/2,(u.yMin+u.yMax)/2);var c=Cesium.Cartesian3.fromDegrees(u.xMax-u.xMin,u.yMax-u.yMin);return e.boundingSphere.radius=Math.abs(Math.min(c.x,c.y)),e._sceneServer.queryLayerListInfo().then(function(n){var i=[];return t(n.data.layers,i),o.sublayers=i,e.scenes.length>=1&&r(e.scenes[0].sublayers,i),e.scenes=[new l.default(o)],e.activeScene=e.scenes[0],new Promise(function(t){e.loadStatus=s.LoadStatus.loaded,e.loaded=!0,t(e)})})}if(e.url.indexOf("/igs/rest/g3d/")>-1){e.title||(e.title=i.docName);var f=i.sceneInfos,h=e.scenes;e.scenes=[];for(var p=0;p<f.length;p++){var d=f[p],y=[];t(d.layers,y),p<h.length&&r(h[p].sublayers,y),d.sublayers=y,e.scenes.push(new l.default(d))}return e.activeScene=e.scenes[0],e.sceneName=e.activeScene.sceneName,e.documentInfo=i,new Promise(function(t){e.loadStatus=s.LoadStatus.loaded,e.loaded=!0,t(e)})}}).catch(function(e){a.Log.info("SceneServer信息查询失败:",e)})}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);e.url=this.url,e.version=this.version,e.boundingVolume=this.boundingVolume,e.sceneName=this.sceneName,e.fieldInfo=this.fieldInfo,e.position=this.position,e.documentInfo=this.documentInfo,e.activeScene=(0,a.toJSON)(this.activeScene,l.default),e.boundingSphere={radius:this.boundingSphere.radius,center:{x:this.boundingSphere.center.x,y:this.boundingSphere.center.y,z:this.boundingSphere.center.z}};for(var r=[],n=0;n<this.scenes.length;n++)r.push((0,a.toJSON)(this.scenes[n],l.default));return e.scenes=r,e}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){var r=new t(e=(0,f.jsonClone)(e));r.documentInfo=e.documentInfo,r.boundingSphere=e.boundingSphere,r.boundingSphere.center=new Cesium.Cartesian3(e.boundingSphere.center.x,e.boundingSphere.center.y,e.boundingSphere.center.z);for(var n=[],i=0;i<e.scenes.length;i++)n.push(new l.default(e.scenes[i]));r.scenes=n;for(var o=0;o<r.scenes.length;o++)for(var a=0;a<r.scenes[o].sublayers.length;a++)r.scenes[o].sublayers[a]=new c.default(r.scenes[o].sublayers[a]);return r.activeScene=n[0],r}}]),t}();i.Zondy.Layer.IGSSceneLayer=p,t.default=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0},o=r(8),a=r(1),s=r(3),u=r(0),l=r(12),c=r(4),f=d(r(85)),h=r(10),p=d(r(68));function d(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));e=(0,u.defaultValue)(e,{}),r.url=(0,u.defaultValue)(e.url,void 0),r.type=s.LayerType.igsFeature,r.gdbp=(0,u.defaultValue)(e.gdbp,""),r.outFields=[],r.capabilities=[],r.sublayerId=(0,u.defaultValue)(e.sublayerId,0),r.supportArc3=(0,u.defaultValue)(e.supportArc3,!0),r.labelsVisible=(0,u.defaultValue)(e.labelsVisible,!1);for(var n=[],i=(0,u.defaultValue)(e.labelingInfo,[]),o=0;o<i.length;o++)n.push(new p.default(i[o]));r.labelingInfo=n,r.renderMode=(0,u.defaultValue)(e.renderMode,"client"),r._definitionExpression=(0,u.defaultValue)(e.definitionExpression);var a=function(){var e=r.url.match(/^.*FeatureServer/),t=r.url.match(/^.*\/igs\/rest\/mrfs\/docs\//);if(e){var n=e[0];if(r.url.length!==n.length){var i=r.url.length-n.length,o=r.url.substr(n.length+1,i-1);r.sublayerId=o,r.url=n}}else if(t){var a=t[0],s=r.url.replace(a,"");if(s){var u=s.split("/");u.length>1&&(r.url=a+u[0],r.sublayerId=u[1])}}};r._igsVersion="2.0";var c={url:r.url,tokenKey:r.tokenKey,tokenValue:r.tokenValue,enableGlobeFetch:!1,headers:r.headers};if("client"===r.renderMode){var f=(0,h.getBaseUrl)(r.url);r.url.indexOf("/igs/rest/mrfs/layer")>-1?(r._igsVersion="1.0",r._resourceServer=new l.ResourceServer({url:f+"/igs/rest/mrcs"}),r._featureServer=new l.FeatureServer(c)):(r.url.indexOf("/igs/rest/mrfs/docs")>-1&&(r._igsVersion="1.0"),a(),c.url=r.url,r._featureServer=new l.FeatureServer(c))}else{var d=(0,h.getBaseUrl)(r.url);r.url.indexOf("/igs/rest/mrfs/layer")>-1?(r._igsVersion="1.0",r._resourceServer=new l.ResourceServer({url:d+"/igs/rest/mrcs"})):(a(),c.url=r.url,r._featureServer=new l.FeatureServer(c),r._igsVersion="2.0",r._resourceServer=new l.ResourceServer({url:d+"/igs/rest/services/system/ResourceServer"}))}return r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.FeatureLayer),n(t,[{key:"load",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"load",this).call(this)}},{key:"_load",value:function(){var e=this;return"client"===e.renderMode?e.url.indexOf("/igs/rest/mrfs/layer")>-1?this._resourceServer.queryGDBPInfo({gdbpUrl:this.gdbp}).then(function(t){return new Promise(function(t){e.loadStatus=s.LoadStatus.loaded,e.loaded=!0,t(e)})}):e._featureServer.queryLayerInfo({layerId:""+e.sublayerId}).then(function(t){var r=t.data;return e.title||(e.title=r.name),e._processDataInfo(e,r),new Promise(function(t){e.loadStatus=s.LoadStatus.loaded,e.loaded=!0,t(e)})}).catch(function(e){u.Log.error("要素服务图层信息获取失败:",e)}):"server"===e.renderMode?"1.0"===this._igsVersion?this._resourceServer.queryGDBPInfo({gdbpUrl:this.gdbp}).then(function(t){return new Promise(function(t){e.loadStatus=s.LoadStatus.loaded,e.loaded=!0,t(e)})}):this._resourceServer.queryTempDataInfo({method:a.Zondy.Enum.FetchMethod.get,url:e.gdbp}).then(function(t){var r=t.data;return e._processDataInfo(e,r),new Promise(function(t){e.loadStatus=s.LoadStatus.loaded,e.loaded=!0,t(e)})}).catch(function(e){u.Log.error("要素服务图层信息获取失败:",e)}):void u.Log.error("无法解析渲染模式")}},{key:"queryFeatures",value:function(e){var t=this,r=this._createQueryOption(e),n=void 0;return this.url.indexOf("/igs/rest/mrfs/layer")>-1?(r.gdbp=this.gdbp,n=this._featureServer.queryFeaturesInLayers(r)):n=this._featureServer.queryFeatures(r),n.then(function(e){var r=e.data;r||u.Log.error("添加图层视图失败,未获取到请求数据");var n=r.featureSet;return t._setFeatureSetSpatialReference(n),n||u.Log.error("添加图层视图失败,未获取到几何要素信息"),n})}},{key:"queryFeaturesCount",value:function(e){if(!this.gdbp){var t=this._createQueryOption(e);return t.returnCountOnly=!0,this._featureServer.queryFeatures(t).then(function(e){var t=e.data;return t||u.Log.error("添加图层视图失败,未获取到请求数据"),t.count})}u.Log.error("gdbp模式不支持查询要素条数,igs1.0不支持此操作")}},{key:"toJSON",value:function(){var e=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);e.url=this.url,e.gdbp=this.gdbp,e.outFields=this.outFields,e.capabilities=this.capabilities,e.sublayerId=this.sublayerId,e.labelsVisible=this.labelsVisible,e.renderMode=this.renderMode,e.definitionExpression=this.definitionExpression;for(var r=[],n=0;n<this.labelingInfo.length;n++)r.push((0,u.toJSON)(this.labelingInfo[n],p.default));return e.labelingInfo=r,e}},{key:"_createQueryOption",value:function(e){var t=(0,u.defaultValue)(e,{});return t=Object.assign({layerId:""+this.sublayerId,where:this.definitionExpression||"",supportArc3:this.supportArc3,outSrs:"EPSG:4326"},t)}},{key:"_processDataInfo",value:function(e,t){if(!t)throw new Error("要素服务源数据请求失败");if(!e._spatialReference){var r=t.srsName||t.SRSName;if(t.spatialReference)e._spatialReference=c.SpatialReference.fromJSON(t.spatialReference);else if(r&&f.default.find(function(e){return e.name===r})){var n=f.default.find(function(e){return e.name===r});e._spatialReference=new c.SpatialReference({wkid:n.id,wkt:n.strProject})}else e._spatialReference=new c.SpatialReference("EPSG:4326")}if((0,u.isNull)(e.extent)){var i=e.extent||t.extent||t.Range;i&&(e.extent=new c.Extent({xmin:i.xmin,ymin:i.ymin,xmax:i.xmax,ymax:i.ymax,spatialReference:e._spatialReference}))}t.capabilities&&(e.capabilities=Array.isArray(t.capabilities)?t.capabilities:[t.capabilities]),t.fields&&Array.isArray(t.fields)&&t.fields.forEach(function(t){e.outFields.push(t.name)}),t.geometryType?e.geometryType=t.geometryType:t.GeomType&&(e.geometryType=t.GeomType)}},{key:"_setFeatureSetSpatialReference",value:function(e){e||u.Log.error("服务器请求错误,未返回FeatureSet数据,请检查服务状态");var t=this;(!e.spatialReference||e.spatialReference&&0===e.spatialReference.wkid)&&(e.spatialReference=t._spatialReference,e.features.forEach(function(e){e&&e.geometry&&(e.geometry.spatialReference=t._spatialReference)}))}}],[{key:"fromJSON",value:function(e){for(var r=new t(e=(0,h.jsonClone)(e)),n=[],i=0;i<e.labelingInfo.length;i++)n.push(new p.default(e.labelingInfo[i]));return r.labelingInfo=n,r.loadStatus=s.LoadStatus.loaded,r.loaded=!0,r}}]),t}();Object.defineProperties(y.prototype,{definitionExpression:{get:function(){return this._definitionExpression},set:function(e){this._definitionExpression=e,this.loaded&&this.refresh()}}}),a.Zondy.Layer.IGSFeatureLayer=y,t.default=y},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArcGISVectorTileLayer=t.ArcGISTileLayer=t.ArcGISMapImageSubLayer=t.ArcGISMapImageLayer=void 0;var n=s(r(428)),i=s(r(168)),o=s(r(430)),a=s(r(431));function s(e){return e&&e.__esModule?e:{default:e}}t.ArcGISMapImageLayer=n.default,t.ArcGISMapImageSubLayer=i.default,t.ArcGISTileLayer=o.default,t.ArcGISVectorTileLayer=a.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=h(r(429)),o=r(1),a=r(3),s=r(0),u=r(12),l=r(4),c=h(r(168)),f=r(29);function h(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,s.defaultValue)(e,{}),r.type=a.LayerType.arcgisMapImage,r.description="ArcGIS地图图片图层",r._mapServer=new u.MapServer({url:r.url}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"_load",value:function(){var e=this;return this._mapServer.queryServerInfo().then(function(t){s.Log.info("MapServer信息查询成功:",t);var r=t.data;return e.documentInfo=r.documentInfo,e.mapName=r.mapName,e.capabilities=r.capabilities,e.tileInfo=(0,s.defaultValue)(r.tileInfo,{}),(0,s.isNull)(r.spatialReference)||(e._spatialReferenceSrc=new l.SpatialReference({wkid:r.spatialReference.latestWkid||r.spatialReference.wkid}),(0,s.isNull)(e.spatialReference)&&(e._spatialReference=l.SpatialReference.fromJSON(e._spatialReferenceSrc.toJSON()))),(0,s.isNull)(r.fullExtent)||(e._extentSrc=new l.Extent({xmin:r.fullExtent.xmin,ymin:r.fullExtent.ymin,xmax:r.fullExtent.xmax,ymax:r.fullExtent.ymax,spatialReference:e._spatialReferenceSrc})),e._mapServer.queryLayerList({}).then(function(t){s.Log.info("子图层信息查询成功:",t);var r=t.data.layers;e.serviceSublayers=r;for(var n=0;n<r.length;n++)r[n].layer=e,e.allSublayers.push(new c.default(r[n]));for(var i=0;i<e._sublayers.length;i++)for(var o=0;o<e.allSublayers.length;o++)if(String(e._sublayers[i].id)===String(e.allSublayers[o].id)||String(e._sublayers[i].name)===String(e.allSublayers[o].name)){if(!(e._sublayers[i]instanceof c.default)){var u=Object.assign(JSON.parse(JSON.stringify(e.allSublayers[o])),e._sublayers[i]);u.layer=e,u.id=String(u.id),e._sublayers[i]=new c.default(u),e.allSublayers[o]=new c.default(u)}break}return e._setLayers(),e.loadStatus=a.LoadStatus.loaded,e.loaded=!0,new Promise(function(t){t(e)})})})}},{key:"findSublayerById",value:function(e){if(this.loadStatus===a.LoadStatus.loaded&&this.allSublayers&&this.allSublayers instanceof Array)for(var t=0;t<this.allSublayers.length;t++)if(String(this.allSublayers[t].id)===String(e))return this.allSublayers[t]}},{key:"refresh",value:function(){this._fireUpdateEvent("刷新图层",[{params:arguments,dataChanged:!0,name:"refresh",operationType:"method"}])}},{key:"fetchImage",value:function(e,t,r){t=(0,s.defaultValue)(t,256),r=(0,s.defaultValue)(r,256);var n=this.getImageUrl({extent:e,width:t,height:r});return new Promise(function(e){var i=new Image;i.src=n,i.width=t,i.height=r,e(i)})}},{key:"createServiceSublayers",value:function(){return this.serviceSublayers}},{key:"getImageUrl",value:function(e){return this._mapServer.getImage(e)}},{key:"setSubLayer",value:function(e){(0,f.setSublayer)(this,e,e),this._setLayers(),(0,f.fireEvent)(this,a.LayerEventType.layerUpdate,a.LayerEventType.layerSublayerVisible)}},{key:"_setLayers",value:function(){for(var e="show:",t=0;t<this.allSublayers.length;t++)this.allSublayers[t].visible&&(e+=this.allSublayers[t].id+",");if("show:"===e){e="exclude:";for(var r=0;r<this.allSublayers.length;r++)e+=this.allSublayers[r].id+","}e=e.substring(0,e.length-1),this.layers=e}}],[{key:"fromJSON",value:function(e){var r=new t(e=(0,s.defaultValue)(e,{}));return r.loadStatus=a.LoadStatus.loaded,r.loaded=!0,r}}]),t}();Object.defineProperties(p.prototype,{sublayers:{get:function(){return this._sublayers},set:function(e){this._sublayers=e}}}),o.Zondy.Layer.ArcGISMapImageLayer=p,t.default=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=c(r(28)),o=r(0),a=r(1),s=c(r(33)),u=c(r(52)),l=r(4);function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.url=(0,o.defaultValue)(e.url,""),r.mapName=(0,o.defaultValue)(e.mapName,void 0),r.documentInfo=(0,o.defaultValue)(e.documentInfo,void 0),r.capabilities=[],r.renderMode=(0,o.defaultValue)(e.renderMode,"tile"),r.imageWidth=(0,o.defaultValue)(e.imageWidth,256),r.imageHeight=(0,o.defaultValue)(e.imageHeight,256),r.imageFormat=(0,o.defaultValue)(e.imageFormat,"png"),r.imageTransparency=(0,o.defaultValue)(e.imageTransparency,!0),r.allSublayers=new a.Collection,r.dynamicProjectionEnabled=(0,o.defaultValue)(e.dynamicProjectionEnabled,!1),r._extentSrc=e.extent?s.default.fromJSON(e.extent):void 0,r._spatialReferenceSrc=(0,o.defaultValue)(e.spatialReference,void 0),r._sublayers=(0,o.defaultValue)(e.sublayers,new a.Collection),r._opacity=(0,o.defaultValue)(e.opacity,1),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);e.url=this.url,e.mapName=this.mapName,e.documentInfo=this.documentInfo,e.capabilities=this.capabilities,e.imageWidth=this.imageWidth,e.imageHeight=this.imageHeight,e.imageFormat=this.imageFormat,e.imageTransparency=this.imageTransparency,e.dynamicProjectionEnabled=this.dynamicProjectionEnabled,e.spatialReference=(0,o.toJSON)(this.spatialReference,l.SpatialReference),e.extent=(0,o.toJSON)(this.extent,s.default);var r=[];this.sublayers.forEach(function(e){r.push(e instanceof u.default?e.toJSON():e)}),e.sublayers=r;var n=[];return this.allSublayers.forEach(function(e){n.push(e.toJSON())}),e.allSublayers=n,e}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();Object.defineProperties(f.prototype,{extent:{get:function(){return self.spatialReference?self.spatialReference.equals(self._spatialReferenceSrc)?this._extentSrc:a.Projection.project(this._extentSrc,self.spatialReference):this._extentSrc}},spatialReference:{get:function(){return this._spatialReferenceSrc},set:function(e){this._spatialReferenceSrc=e}}}),t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(8),o=r(1),a=r(0),s=r(3),u=r(12),l=r(4),c=function(e){return e&&e.__esModule?e:{default:e}}(r(54));var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r.type=s.LayerType.arcgisTile,r.description="ArcGIS瓦片图层",r.url=(0,a.defaultValue)(e.url,""),r.mapName=(0,a.defaultValue)(e.mapName,""),r._tileServer=new u.TileServer({url:r.url}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.TileLayer),n(t,[{key:"_load",value:function(){var e=this;return this._tileServer.queryServerInfo().then(function(t){a.Log.info("TileServer信息查询成功:",t);var r=t.data;return e.mapName=r.mapName,e.extent=new l.Extent({xmin:r.fullExtent.xmin,ymin:r.fullExtent.ymin,xmax:r.fullExtent.xmax,ymax:r.fullExtent.ymax}),e.tileSize=r.tileInfo.cols,e.tileInfo=c.default.parseArcgisTileInfo(r.tileInfo),e.spatialReference=new l.SpatialReference(e.tileInfo.spatialReference),new Promise(function(t){e.loadStatus=s.LoadStatus.loaded,e.loaded=!0,t(e)})}).catch(function(e){a.Log.error("TileServer信息查询失败:",e)})}},{key:"getTileUrl",value:function(e,t,r){return this.url+"/tileImage/"+e+"/"+t+"/"+r+"?f=image"}}],[{key:"fromJSON",value:function(e){var r=new t(e=(0,a.defaultValue)(e,{}));return r.loadStatus=s.LoadStatus.loaded,r.loaded=!0,r}}]),t}();o.Zondy.Layer.ArcGISTileLayer=f,t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(8),o=r(3),a=r(1),s=r(0),u=p(r(139)),l=r(4),c=p(r(54)),f=r(10),h=p(r(67));function p(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,s.defaultValue)(e,{}),r.type=o.LayerType.arcgisVectorTile,r.description="ArcGIS矢量瓦片图层",r._isInitAddStyle=!!r.style,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.VectorTileLayer),n(t,[{key:"covertCustomStyleToMVTStyle",value:function(e,t){var r=(0,s.cloneObject)(e);if(r.sprite.indexOf("http:")<0&&r.sprite.indexOf("https:")<0&&this.url.indexOf("root.json")<0){for(var n=r.sprite.split("/"),i="",o=0;o<n.length;o++)"."!==n[o]&&".."!==n[o]&&(i+="/"+n[o]);r.sprite=this.url+"/resources"+i}if(r.glyphs.indexOf("http:")<0&&r.glyphs.indexOf("https:")<0&&this.url.indexOf("root.json")<0){for(var a=r.glyphs.split("/"),u="",l=0;l<a.length;l++)"."!==a[l]&&".."!==a[l]&&(u+="/"+a[l]);r.glyphs=this.url+"/resources"+u}var c="";if(t[0].indexOf(".pbf")>-1)for(var f=t[0].split("/"),h=0;h<f.length;h++)"."!==f[h]&&".."!==f&&(c+="/"+f[h]);else c="/tile/{z}/{y}/{x}.pbf";return this.url.indexOf("root.json")>-1||this._isInitAddStyle?r.sources.esri.tiles=[""+r.sources.esri.url+c]:r.sources.esri.tiles=[""+this.url+c],delete r.sources.esri.url,r}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.type=this.type,e.description=this.description,e}},{key:"_load",value:function(){var e=this;return"string"==typeof this.url&&this.url?this.url.indexOf("root.json")>-1?h.default.commit("get",this.url,{},{tokenKey:this.tokenKey,tokenValue:this.tokenValue}).then(function(t){return t.json().then(function(t){return s.Log.info("矢量瓦片样式查询成功:",t),e._vectorTileServer=new u.default({url:t.sources.esri.url,tokenKey:e.tokenKey,tokenValue:e.tokenValue}),e._vectorTileServer.queryServerInfo().then(function(r){return s.Log.info("矢量瓦片信息查询成功:",r),e._initLayerInfo(r.data),e._style=e.covertCustomStyleToMVTStyle(t,r.data.tiles),e._initCurrentStyleInfo(),e._style.sprite?e._requestSprite():new Promise(function(t){e.loadStatus=o.LoadStatus.loaded,e.loaded=!0,t(e)})})})}):this._vectorTileServer.queryServerInfo().then(function(t){return s.Log.info("矢量瓦片信息查询成功:",t),e._initLayerInfo(t.data),h.default.commit("get",e.url+"/resources/styles/root.json",{}).then(function(r){return r.json().then(function(r){return e._style=e.covertCustomStyleToMVTStyle(r,t.data.tiles),e._initCurrentStyleInfo(),e._style.sprite?e._requestSprite():new Promise(function(t){e.loadStatus=o.LoadStatus.loaded,e.loaded=!0,t(e)})})})}):this._style&&this._style instanceof Object?(this._vectorTileServer=new u.default({url:this._style.sources.esri.url,tokenKey:this.tokenKey,tokenValue:this.tokenValue}),this._vectorTileServer.queryServerInfo().then(function(t){return s.Log.info("矢量瓦片信息查询成功:",t),e._initLayerInfo(t.data),e._style=e.covertCustomStyleToMVTStyle(e.style,t.data.tiles),e._initCurrentStyleInfo(),e._style.sprite?e._requestSprite():new Promise(function(t){e.loadStatus=o.LoadStatus.loaded,e.loaded=!0,t(e)})})):void 0}},{key:"_initLayerInfo",value:function(e){var t=e.tileInfo.spatialReference;t.latestWkid?this._spatialReference=new l.SpatialReference({wkid:parseInt(t.latestWkid)}):t.wkt?this._spatialReference=new l.SpatialReference({wkt:t.wkt}):s.Log.error("矢量瓦片服务坐标系信息不存在,请检查igs返回的矢量瓦片服务元信息!"),this.title=e.name,this.tileInfo=c.default.parseTileInfo2(e.tileInfo),this.extent=new l.Extent({xmin:e.fullExtent.xmin,ymin:e.fullExtent.ymin,xmax:e.fullExtent.xmax,ymax:e.fullExtent.ymax,spatialReference:this._spatialReference}),e.capabilities&&(this.capabilities=Array.isArray(e.capabilities)?e.capabilities:[e.capabilities])}},{key:"_initCurrentStyleInfo",value:function(){this.currentStyleInfo.serviceUrl=this.url,this.currentStyleInfo.styleUrl=this.url+"/resources/styles/root.json",this.currentStyleInfo.spriteUrl=this._style.sprite,this.currentStyleInfo.glyphsUrl=this._style.glyphs,this.currentStyleInfo.style=this._style}},{key:"_requestSprite",value:function(){var e=this;return h.default.commit("get",this._style.sprite+".json",{},{tokenKey:this.tokenKey,tokenValue:this.tokenValue}).then(function(t){return t.json().then(function(t){return e._style.spritedata=t,new Promise(function(t){e.loadStatus=o.LoadStatus.loaded,e.loaded=!0,t(e)})})})}}],[{key:"fromJSON",value:function(e){var r=new t(e=(0,f.jsonClone)(e));return r.loadStatus=o.LoadStatus.loaded,r.loaded=!0,r}}]),t}();a.Zondy.Layer.ArcGISVectorTileLayer=d,t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WMTSSubLayer=t.WFSLayer=t.WMSSubLayer=t.WMSLayer=t.WMTSLayer=t.OGCLayer=void 0;var n=l(r(71)),i=l(r(433)),o=l(r(434)),a=l(r(170)),s=l(r(435)),u=l(r(169));function l(e){return e&&e.__esModule?e:{default:e}}t.OGCLayer=n.default,t.WMTSLayer=i.default,t.WMSLayer=o.default,t.WMSSubLayer=a.default,t.WFSLayer=s.default,t.WMTSSubLayer=u.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0},o=r(1),a=r(3),s=r(0),u=r(12),l=g(r(169)),c=g(r(120)),f=r(4),h=r(21),p=g(r(71)),d=g(r(41)),y=g(r(70));function g(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,s.defaultValue)(e,{}),r.type=a.LayerType.wmts,r.sublayers=(0,s.defaultValue)(e.sublayers,new o.Collection),r.sublayers instanceof o.Collection||(r.sublayers=new o.Collection(r.sublayers)),r.url=(0,s.defaultValue)(e.url,void 0),r.spatialReference=f.SpatialReference.fromJSON(e.spatialReference),r.tileMatrixSets=(0,s.defaultValue)(e.tileMatrixSets,[]),r.corporationType=(0,h.initCorporationType)(r.url),r.minScale=(0,s.defaultValue)(e.minScale,0),r.maxScale=(0,s.defaultValue)(e.maxScale,0),r.extent=e.extent?f.Extent.fromJSON(e.extent):void 0,r._clippingArea=(0,s.defaultValue)(e.clippingArea,null),r._activeLayer=e.activeLayer?l.default.fromJSON(e.activeLayer):void 0,r._mapServer=new u.WMTSServer({url:r.url}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,p.default),n(t,[{key:"toJSON",value:function(){var e=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);e.type=this.type,e.activeLayer=(0,s.toJSON)(this.activeLayer,l.default),e.url=this.url,e.spatialReference=(0,s.toJSON)(this.spatialReference,f.SpatialReference),e.corporationType=this.corporationType,e.minScale=this.minScale,e.maxScale=this.maxScale;var r=[];this.sublayers.forEach(function(e){r.push((0,s.toJSON)(e,l.default))}),e.sublayers=r;for(var n=[],o=0;o<this.tileMatrixSets.length;o++)n.push((0,s.toJSON)(this.tileMatrixSets[o],c.default));return e.tileMatrixSets=n,e}},{key:"getCurrentTileInfo",value:function(){var e=this;(!Array.isArray(this.activeLayer.tileMatrixSets)||this.activeLayer.tileMatrixSets.length<=0)&&s.Log.error("获取wmts图层TileInfo失败");var t=this.activeLayer.tileMatrixSets.find(function(t){return t.id===e.activeLayer.tileMatrixSetId});return t&&t.tileInfo||s.Log.error("获取wmts图层tileMatrix失败"),t.tileInfo}},{key:"load",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"load",this).call(this)}},{key:"_load",value:function(){var e=this;return this._mapServer.getCapabitities().then(function(t){s.Log.info("MapServer信息查询成功:",t);var r=t.data;return e._setTileMatrixSets(r.tileMatrixSets),e._setActiveLayer(r.layers),e.title=r.XMLInfo["ows:ServiceIdentification"].children["ows:Title"].children["#text"]["#text"],e._initLayerByActiveLayer(),new Promise(function(t){e.loadStatus=a.LoadStatus.loaded,e.loaded=!0,t(e)})})}},{key:"findSublayerById",value:function(e){return this.sublayers.items[e]}},{key:"_getExtentFromBoundingBox",value:function(e,t,r){var n=void 0,i=r.wkid;"string"==typeof e.lowerCorner&&(e.lowerCorner=e.lowerCorner.split(" ")),"string"==typeof e.upperCorner&&(e.upperCorner=e.upperCorner.split(" "));var a=(0,h.initCorporationType)(this.url);if(r.isGeographic)switch(a){case o.WMTSCorporation.corporationGeoServer:case o.WMTSCorporation.corporationArcGIS:case o.WMTSCorporation.corporationZD:default:n=new f.Extent({xmin:Number(e.lowerCorner[1]),ymin:Number(e.lowerCorner[0]),xmax:Number(e.upperCorner[1]),ymax:Number(e.upperCorner[0]),spatialReference:f.SpatialReference.fromJSON(r)});break;case o.WMTSCorporation.corporationTianDiTu:case o.WMTSCorporation.corporationSuperMap:n=new f.Extent({xmin:Number(e.lowerCorner[0]),ymin:Number(e.lowerCorner[1]),xmax:Number(e.upperCorner[0]),ymax:Number(e.upperCorner[1]),spatialReference:f.SpatialReference.fromJSON(r)})}else if(i>=2327&&i<=2442||i>=4491&&i<=4554||i>=21413&&i<=21423||i>=21473&&i<=21483)switch(a){case o.WMTSCorporation.corporationGeoServer:case o.WMTSCorporation.corporationArcGIS:case o.WMTSCorporation.corporationZD:default:n=new f.Extent({xmin:Number(e.lowerCorner[1]),ymin:Number(e.lowerCorner[0]),xmax:Number(e.upperCorner[1]),ymax:Number(e.upperCorner[0]),spatialReference:f.SpatialReference.fromJSON(r)});break;case o.WMTSCorporation.corporationSuperMap:n=new f.Extent({xmin:Number(e.lowerCorner[0]),ymin:Number(e.lowerCorner[1]),xmax:Number(e.upperCorner[0]),ymax:Number(e.upperCorner[1]),spatialReference:f.SpatialReference.fromJSON(r)})}else n=new f.Extent({xmin:Number(e.lowerCorner[0]),ymin:Number(e.lowerCorner[1]),xmax:Number(e.upperCorner[0]),ymax:Number(e.upperCorner[1]),spatialReference:f.SpatialReference.fromJSON(r)});return n}},{key:"_createWMTSSubLayer",value:function(e,t){for(var r=e.tileMatrixSetLink,n=[],i=0;i<r.length;i++)for(var a=0;a<t.length;a++)if(r[i].tileMatrixSet===t[a].identifier){n.push(t[a]);break}var s=this._getExtentFromBoundingBox(e.boundingBox,this.url,t[0].tileInfo.spatialReference);return new l.default({identifier:e.identifier,title:e.title,description:"WMTS子图层",imageFormat:e.format,imageFormats:[e.format],styleId:Array.isArray(e.Style)?e.Style[0].identifier:e.Style.identifier,styles:[new o.WMTSStyle({id:e.Style.identifier,title:e.Style.title})],tileMatrixSets:t,tileMatrixSetId:t[0].identifier,extent:s,resourceURLTemplates:[]})}},{key:"_getTopLeftCorner",value:function(e,t){var r=(0,h.initCorporationType)(this.url),n=e.split(" "),i=void 0;if(t.isGeographic)i=[Number(n[1]),Number(n[0])];else if(t.wkid>=2327&&t.wkid<=2442||t.wkid>=4491&&t.wkid<=4554||t.wkid>=21413&&t.wkid<=21423||t.wkid>=21473&&t.wkid<=21483)switch(r){case o.WMTSCorporation.corporationSuperMap:i=[Number(n[0]),Number(n[1])];break;case o.WMTSCorporation.corporationZD:case o.WMTSCorporation.corporationArcGIS:case o.WMTSCorporation.corporationGeoServer:default:i=[Number(n[1]),Number(n[0])]}else switch(r){case o.WMTSCorporation.corporationTianDiTu:i=[-20037508.3427892,20037508.3427892];break;default:i=[Number(n[0]),Number(n[1])]}return i}},{key:"_setTileMatrixSets",value:function(e){var t=this;e.forEach(function(e){var r=(0,h.getEPSGCodeFromOGCSupportedCRSString)(e.supportedCRS),n=new f.SpatialReference({wkid:r}),i=t._getTopLeftCorner(e.tileMatrix[0].topLeftCorner,n),o=[];e.tileMatrix.forEach(function(r){var i=new y.default;if(i.level=r.identifier,i.scale=Number(r.scaleDenominator),r.identifier){var a=r.identifier.lastIndexOf(":");i.level=a>=0?parseInt(r.identifier.substring(a+1)):parseInt(r.identifier)}i.resolution=(0,h.getTileResolution)(e.identifier,t.corporationType,i.scale,n),o.push(i)});var a=new d.default({origin:new f.Point({coordinates:i,spatialReference:n}),size:[Number(e.tileMatrix[0].tileWidth),Number(e.tileMatrix[0].tileHeight)],lods:o,spatialReference:n});t.tileMatrixSets.push(new c.default({extent:"",id:e.identifier,tileInfo:a,layer:t,tileMatrix:e.tileMatrix,identifier:e.identifier,supportedCRS:e.supportedCRS}))})}},{key:"_setActiveLayer",value:function(e){var t=this;e.forEach(function(e){t.sublayers.add(t._createWMTSSubLayer(e,t.tileMatrixSets))}),this._activeLayer||(this._activeLayer=this.sublayers.getItemAt(0))}},{key:"_initLayerByActiveLayer",value:function(){this._spatialReference=f.SpatialReference.fromJSON(this.activeLayer.spatialReference),this.extent=f.Extent.fromJSON(this.activeLayer.extent)}}],[{key:"fromJSON",value:function(e){var r=new t(e=(0,s.defaultValue)(e,{}));return r.loadStatus=a.LoadStatus.loaded,r.loaded=!0,r}}]),t}();v.fromServerUrl=function(e){return new v({url:e})},Object.defineProperties(v.prototype,{clippingArea:{get:function(){return this._clippingArea},set:function(e){this._clippingArea=e,this._fireUpdateEvent("空间裁剪区域",[{name:"clippingArea",params:[this._clippingArea],dataChanged:!0,operationType:"property"}])}},activeLayer:{get:function(){return this._activeLayer},set:function(e){this._activeLayer=e,this._initLayerByActiveLayer()}}}),o.Zondy.Layer.WMTSLayer=v,t.default=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0},o=r(0),a=r(1),s=r(12),u=r(3),l=r(4),c=y(r(170)),f=r(29),h=y(r(71)),p=r(10),d=r(16);function y(e){return e&&e.__esModule?e:{default:e}}var g=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));e=(0,o.defaultValue)(e,{}),r._sublayers=(0,o.defaultValue)(e.sublayers,[]),r.url=(0,o.defaultValue)(e.url,""),r.sublayers=(0,o.defaultValue)(e.sublayers,[]),r.imageWidth=(0,o.defaultValue)(e.imageWidth,256),r.imageHeight=(0,o.defaultValue)(e.imageHeight,256),r.allSublayers=[],r.layers=(0,o.defaultValue)(e.layers,void 0),r.imageFormat=(0,o.defaultValue)(e.imageFormat,"image/png"),r.imageFormats=["image/png"],r.imageTransparency=(0,o.defaultValue)(e.imageTransparency,!0),r.version=(0,o.defaultValue)(e.version,"1.1.1"),r.type=u.LayerType.wms,r.spatialReferences=(0,o.defaultValue)(e.spatialReferences,[]),r._clippingArea=(0,o.defaultValue)(e.clippingArea,null),r._extentList=[];var n={url:r.url,version:r.version};return r.tokenKey&&r.tokenValue&&(n.tokenKey=r.tokenKey,n.tokenValue=r.tokenValue),r._WMSServer=new s.WMSServer(n),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,h.default),n(t,[{key:"load",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"load",this).call(this)}},{key:"_load",value:function(){var e=this,t=this;return this._WMSServer.getCapabitities().then(function(r){o.Log.info("WMS信息查询成功:",r),t.spatialReferences=[],t._extentList=[];var n=r.data;t.title||(t.title=n.title);for(var i=0;i<n.crs.length;i++)for(var a=0;a<n.boundingBox.length;a++)if(n.crs[i]===n.boundingBox[a].crs){var s=n.crs[i];"crs:84"===s.toLowerCase()&&(s="EPSG:4326");var f=new l.SpatialReference(s),h=n.boundingBox[a],p=t._getExtent(h,f);t.spatialReferences.push(f),t._extentList.push(p);break}if((0,o.isNull)(t.spatialReference))for(var y=0;y<t.spatialReferences.length;y++)if(t.spatialReferences[y].wkid){t._spatialReference=t.spatialReferences[y];break}t._extentSrc=t._getExtentBySP(t._spatialReference),(0,o.isNull)(t._extentSrc)&&t._extentList.length>0&&(t._extentSrc=d.Projection.project(t._extentList[0],t._spatialReference),t._extentList.push(t._extentSrc)),t.allSublayers=[];for(var g=0;g<n.layer.length;g++){n.layer[g].id=String(g),n.layer[g].visible=!0,n.layer[g].spatialReference=t.spatialReference,n.layer[g].spatialReferences=[];for(var v=n.layer[g].crs,m=0;m<v.length;m++)n.layer[g].spatialReferences.push(l.SpatialReference.fromJSON(v[g]));for(var _=n.layer[g].boundingBox,b=0;b<_.length;b++)"EPSG:"+t.spatialReference.wkid===_[b].crs&&(n.layer[g].extent=t._getExtent(_[b],t.spatialReference));t.allSublayers.push(new c.default(Object.assign(n.layer[g],{layer:e})))}if((0,o.isNull)(t._extentSrc)){for(var S=[],x=0;x<t.allSublayers.length;x++)S.push(t.allSublayers[x].extent);t._extentSrc=l.GeometryEngine.union(S),t._extentList.push(t._extentSrc)}if((0,o.isNull)(t._extentSrc)&&o.Log.warning("无法获取WMS图层范围,服务地址为:",t.url),t._sublayers.length>0){for(var w=0;w<n.layer.length;w++)for(var O=0;O<t._sublayers.length;O++)if(String(t._sublayers[O].id)===String(n.layer[w].id)||String(t._sublayers[O].name)===String(n.layer[w].name)){t._sublayers[O]=new c.default(Object.assign(n.layer[w],t._sublayers[O],{layer:e}));break}t._getLayersFromSubLayers()}else t._getLayersFromAllSubLayers();return new Promise(function(e){t.loadStatus=u.LoadStatus.loaded,t.loaded=!0,e(t)})}).catch(function(e){t.loadStatus=o.Log.error("WMS信息查询失败:",e)})}},{key:"_getExtent",value:function(e,t){return new l.Extent({xmin:Number(e.minx),ymin:Number(e.miny),ymax:Number(e.maxy),xmax:Number(e.maxx),spatialReference:l.SpatialReference.fromJSON(t)})}},{key:"setSubLayer",value:function(e){(0,f.setSublayer)(this,e,c.default),this._getLayersFromAllSubLayers(),this._fireUpdateEvent("更新子图层",[{name:"sublayerVisible",params:[this],dataChanged:!0,operationType:"method"}])}},{key:"_getLayersFromSubLayers",value:function(){for(var e="",t=0;t<this._sublayers.length;t++)this._sublayers[t].visible&&this._sublayers[t].name&&(e+=this._sublayers[t].name+",");return e=e.substring(0,e.length-1),this.layers=e,e}},{key:"_getLayersFromAllSubLayers",value:function(){for(var e="",t=0;t<this.allSublayers.length;t++)this.allSublayers[t].visible&&this.allSublayers[t].name&&(e+=this.allSublayers[t].name+",");return e=e.substring(0,e.length-1),this.layers=e,e}},{key:"_getExtentBySP",value:function(e){var t=null;if(!(0,o.isNull)(e))for(var r=0;r<this._extentList.length;r++)if(this._extentList[r].spatialReference.equals(e)){t=this._extentList[r];break}return t}},{key:"findSublayerById",value:function(e){for(var t=0;t<this.allSublayers.length;t++)if(this.allSublayers[t].id===e)return this.allSublayers[t];return null}},{key:"toJSON",value:function(){var e=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);e.url=this.url,e.imageWidth=this.imageWidth,e.imageHeight=this.imageHeight,e.imageFormat=this.imageFormat,e.imageFormats=this.imageFormats,e.imageTransparency=this.imageTransparency,e.version=this.version,e.type=this.type,e.layers=this.layers;for(var r=[],n=0;n<this._extentList.length;n++)r.push((0,o.toJSON)(this._extentList[n],l.Extent));e.extentList=r;var a=[];this.sublayers.forEach(function(e){a.push((0,o.toJSON)(e,c.default))}),e.sublayers=a;var s=[];return this.allSublayers.forEach(function(e){s.push((0,o.toJSON)(e,c.default))}),e.allSublayers=s,e}}],[{key:"fromJSON",value:function(e){for(var r=new t(e=(0,p.jsonClone)(e)),n=[],i=0;i<e.extentList.length;i++)n.push(l.Geometry.fromJSON(e.extentList[i]));function o(e){e.extent=l.Geometry.fromJSON(e.extent),e.spatialReference=l.SpatialReference.fromJSON(e.spatialReference);for(var t=0;t<e.spatialReferences.length;t++)e.spatialReferences[t]=l.SpatialReference.fromJSON(e.spatialReferences[t])}r._extentList=n;var s=e.sublayers;if(s&&s instanceof Array){r._sublayers=new a.Collection;for(var f=0;f<s.length;f++)o(s[f]),r._sublayers.add(new c.default(s[f]))}var h=e.allSublayers;if(h&&h instanceof Array){r.allSublayers=new a.Collection;for(var d=0;d<h.length;d++)o(h[d]),r.allSublayers.add(new c.default(h[d]))}return r.loadStatus=u.LoadStatus.loaded,r.loaded=!0,r}}]),t}();Object.defineProperties(g.prototype,{sublayers:{get:function(){return this._sublayers},set:function(e){this._sublayers=e}},spatialReference:{set:function(e){var t=0;if(e&&this.spatialReferences&&this.spatialReferences instanceof Array){for(;t<this.spatialReferences.length;t++)if(this.spatialReferences[t].equals(e)){this._spatialReference=e,this._fireUpdateEvent("修改图层坐标系",[{name:"spatialReference",params:[this._spatialReference],dataChanged:!0,operationType:"property"}]);break}if(t===this.spatialReferences.length)throw new Error("该图层不支持所指定的空间参考系,设置失败!")}},get:function(){return this._spatialReference}},extent:{get:function(){return this._getExtentBySP(this.spatialReference)}}}),g.fromServerUrl=function(e){return new g({url:e})},Object.defineProperties(g.prototype,{clippingArea:{get:function(){return this._clippingArea},set:function(e){this._clippingArea=e,this._fireUpdateEvent("空间裁剪区域",[{name:"clippingArea",params:[this._clippingArea],dataChanged:!0,operationType:"property"}])}}}),a.Zondy.Layer.WMSLayer=g,t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0},o=r(1),a=r(0),s=r(12),u=r(3),l=r(4),c=y(r(71)),f=r(39),h=y(r(68)),p=r(10),d=r(21);function y(e){return e&&e.__esModule?e:{default:e}}var g=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r.type=u.LayerType.wfs,r.url=(0,a.defaultValue)(e.url,""),r.id=(0,a.defaultValue)(e.id,(0,a.getGUID)()),r._spatialReference=void 0,r.renderer=r._decorate("renderer",e.renderer,f.BaseRenderer,f.BaseRenderer.fromJSON),r.outFields=[],r.elevationInfo=(0,a.defaultValue)(e.elevationInfo,new o.ElevationInfo),r.geometryType=u.GeometryType.geometry,r.sublayerId=(0,a.defaultValue)(e.sublayerId,""),r.wfsCapabilities=(0,a.defaultValue)(e.wfsCapabilities,""),r.labelsVisible=(0,a.defaultValue)(e.labelsVisible,!1),r.labelingInfo=(0,a.defaultValue)(e.labelingInfo,[]),r._wfsServer=new s.WFSServer({url:r.url}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,c.default),n(t,[{key:"load",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"load",this).call(this)}},{key:"_load",value:function(){var e=this;return this._wfsServer.queryServerInfo().then(function(t){a.Log.info("WFS信息查询成功:",t);for(var r=t.data,n=t.data.featureTypeList,i=0;i<n.length;i++)if(n[i].name===e.sublayerId){e.title||(e.title=n[i].title);break}if(r){e.version=(0,a.defaultValue)(r.version,"2.0.0"),e.wfsCapabilities=r;var o=r.featureTypeList;if(o.length>0){var s=o[0],c=(0,d.getEPSGCodeFromOGCSupportedCRSString)(s.defaultSRS);if(e._spatialReference=c?new l.SpatialReference({wkid:c}):new l.SpatialReference({wkid:4326}),!e.sublayerId&&s.name&&(e.sublayerId=s.name),!e.extent){var f=o.find(function(t){return t.name===e.sublayerId});if(f||a.Log.error("未查询到要素图层,请检查图层名称是否正确"),f.WGS84BoundingBox){var h=f.WGS84BoundingBox.UpperCorner,p=f.WGS84BoundingBox.lowerCorner,y=void 0,g=void 0,v=void 0,m=void 0;if(h){var _=h.split(" ").map(function(e){return parseFloat(e)});v=_[0],m=_[1]}if(p){var b=p.split(" ").map(function(e){return parseFloat(e)});y=b[0],g=b[1]}e.extent=new l.Extent({xmin:y,ymin:g,xmax:v,ymax:m,spatialReference:e._spatialReference})}}}return new Promise(function(t){e.loadStatus=u.LoadStatus.loaded,e.loaded=!0,t(e)})}a.Log.error("wfs请求数据为空")}).catch(function(t){e.loadStatus=a.Log.error("WMS信息查询失败:",t)})}},{key:"queryFeatures",value:function(e){var t=this,r=this._createQueryOption(e);return this._wfsServer.queryFeatures(r).then(function(e){var r=e.data;r||a.Log.error("添加图层视图失败,未获取到请求数据");var n=r.featureSet;return t.geometryType=(0,d.getGeometryTypeByFeatureSet)(n),n||a.Log.error("添加图层视图失败,未获取到几何要素信息"),n})}},{key:"queryFeaturesCount",value:function(e){var t=this._createQueryOption(e);return t.returnCountOnly=!0,this._wfsServer.queryFeatures(t).then(function(e){var t=e.data;return t||a.Log.error("添加图层视图失败,未获取到请求数据"),t.count})}},{key:"_createQueryOption",value:function(e){var t=(0,a.defaultValue)(e,{});return t=Object.assign({typename:this.sublayerId,version:this.version},t)}},{key:"toJSON",value:function(){var e=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);e.url=this.url,e.sublayerId=this.sublayerId,e.geometryType=this.geometryType,e.wfsCapabilities=this.wfsCapabilities,e.labelsVisible=this.labelsVisible,e.spatialReference=(0,a.toJSON)(this._spatialReference,l.SpatialReference),e.renderer=(0,a.toJSON)(this.renderer,f.BaseRenderer),e.outFields=this.outFields,e.elevationInfo=(0,a.toJSON)(this.elevationInfo,o.ElevationInfo);var r=[];if(this.labelingInfo&&this.labelingInfo instanceof Array)for(var n=0;n<this.labelingInfo.length;n++)r.push((0,a.toJSON)(this.labelingInfo[n],h.default));return e.labelingInfo=r,e}}],[{key:"fromJSON",value:function(e){var r=new t(e=(0,p.jsonClone)(e));if(r.spatialReference=l.SpatialReference.fromJSON(e.spatialReference),r.renderer=f.BaseRenderer.fromJSON(e.renderer),r.elevationInfo=new o.ElevationInfo(e.elevationInfo),e.labelingInfo&&e.labelingInfo instanceof Array)for(var n=0;n<e.labelingInfo.length;n++)r.labelingInfo[n]=new h.default(e.labelingInfo[n]);return r.loadStatus=u.LoadStatus.loaded,r.loaded=!0,r}}]),t}();o.Zondy.Layer.WFSLayer=g,t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0},a=r(8),s=r(1),u=r(0),l=r(3),c=r(10),f=r(12);var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,u.defaultValue)(e,{}),r.url=(0,u.defaultValue)(e.url,""),r.type=l.LayerType.cesium3DTiles,r.version=void 0,r.boundingVolume=void 0,r.sceneName=void 0,r.fieldInfo=void 0,r.position=void 0,r.spatialReference=void 0,r.description="3DTiles图层",r.extendOptions=(0,u.defaultValue)(e.extendOptions,{}),r.url.indexOf("/igs/rest/services/")>-1&&(r._3DTilesServer=new f.Cesium3DTilesServer({url:r.url})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.Layer),i(t,[{key:"load",value:function(){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"load",this).call(this)}},{key:"_load",value:function(){var e=this,t=this;return new Promise(function(r){e._3DTilesServer?e._3DTilesServer.queryTileMetadata({success:function(i){u.Log.warning(i);var o=i.data;"object"===(void 0===o?"undefined":n(o))&&"3DTiles"===o.type?(e.url=e.url+"/tileset.json",t.loadStatus=l.LoadStatus.loaded,t.loaded=!0,r(t)):u.Log.error("不是IGS3DTilesServer")},failure:function(e){u.Log.error("errorLoad",e)}}):(t.loadStatus=l.LoadStatus.loaded,t.loaded=!0,r(t))})}},{key:"toJSON",value:function(){var e=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.url=this.url,e.extendOptions=this.extendOptions,e}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e=(0,c.jsonClone)(e))}}]),t}();s.Zondy.Layer.Cesium3DTilesCacheLayer=h,t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0},o=r(8),a=r(1),s=r(0),u=function(e){return e&&e.__esModule?e:{default:e}}(r(138)),l=r(4),c=r(3),f=r(10);var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,s.defaultValue)(e,{}),r.url=(0,s.defaultValue)(e.url,void 0),r.type=c.LayerType.terrain,r.extendOptions=(0,s.defaultValue)(e.extendOptions,{}),r._terrainServer=new u.default({url:r.url}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.Layer),n(t,[{key:"load",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"load",this).call(this)}},{key:"_load",value:function(){var e=this;return new Promise(function(t){e.loadStatus=c.LoadStatus.loaded,e.loaded=!0,t(e)})}},{key:"toJSON",value:function(){var e=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.url=this.url,e.tokenKey=this.tokenKey,e.tokenValue=this.tokenValue,e.autoReset=this.autoReset,e.requestVertexNormals=this.requestVertexNormals,e.fullExtent=(0,s.toJSON)(this.fullExtent,l.Extent),e}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){var r=new t(e=(0,f.jsonClone)(e));return r.fullExtent=l.Geometry.fromJSON(e.fullExtent),r.loadStatus=c.LoadStatus.loaded,r.loaded=!0,r}}]),t}();h.fromServerUrl=function(e){return new h({url:e})},a.Zondy.Layer.TerrainCacheLayer=h,t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OverlayLayer=t.MapVLayer=t.EchartsLayer=void 0;var n=a(r(439)),i=a(r(440)),o=a(r(93));function a(e){return e&&e.__esModule?e:{default:e}}t.EchartsLayer=n.default,t.MapVLayer=i.default,t.OverlayLayer=o.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(1),a=r(3),s=function(e){return e&&e.__esModule?e:{default:e}}(r(93));var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,i.defaultValue)(e,{}),r.echartsOptions=(0,i.defaultValue)(e.echartsOptions,{}),r.type=a.LayerType.echarts,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),n(t,[{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.echartsOptions=this.echartsOptions,JSON.parse(JSON.stringify(e))}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();o.Zondy.Layer.EchartsLayer=u,t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(93)),o=r(0),a=r(1),s=r(3);var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.mapVOptions=(0,o.defaultValue)(e.mapVOptions,{}),r.type=s.LayerType.mapv,r.data=(0,o.defaultValue)(e.data,{}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default),n(t,[{key:"toJSON",value:function(){var e={mapVOptions:this.mapVOptions,data:this.data};return JSON.parse(JSON.stringify(e))}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();a.Zondy.Layer.MapVLayer=u,t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0},o=r(8),a=r(1),s=r(0),u=r(3),l=r(29),c=r(24),f=r(45);var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,s.defaultValue)(e,{}),r.type=u.LayerType.group,r.layers=(0,l.getLayersCollection)(e.layers),r._setItemParent(r.layers,r,r._map),r.allLayers=new a.CollectionFlattener({getCollections:function(){return[r.layers]},getChildrenFunction:function(e){return e.layers}}),r._initHandlers(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.Layer),n(t,[{key:"load",value:function(){var e=this,t=this;if(this.isLoaded())return Promise.resolve(this);var r=[];this.layers.items.filter(function(e){return e&&!e.isLoaded()}).forEach(function(t){var n=t.load();n.catch(function(){e._fireLoadErrorEvent(t)}),r.push(n.then(function(){return e._fireLoadEvent(t),t}))});var n=(0,f.allSettled)(r);return n.catch(function(){e._fireLoadErrorEvent(e)}),n.then(function(){return e.loadStatus=u.LoadStatus.loaded,e.loaded=!0,e._fireLoadEvent(e),t})}},{key:"isLoaded",value:function(){return this.loadStatus===u.LoadStatus.loaded&&this.layers.items.every(function(e){return e&&e.isLoaded()})}},{key:"add",value:function(e,t){e&&(this._map?this._map._isValidateLayers([e]):this._isValidateLayers([e]),this._setItemParent(e,this,this._map),this.layers.add(e,t))}},{key:"addMany",value:function(e,t){e&&(this._map?this._map._isValidateLayers(e):this._isValidateLayers(e),this._setItemParent(e,this,this._map),this.layers.addMany(e,t))}},{key:"remove",value:function(e){e&&(this.layers.remove(e),this._setItemParent(e,null,null))}},{key:"removeMany",value:function(e){this.layers.removeMany(e),this._setItemParent(e,null,null)}},{key:"removeAll",value:function(){var e=this.layers.items.map(function(e){return e});this.layers.removeAll(),this._setItemParent(e,null,null)}},{key:"reorder",value:function(e,t){this.layers.reorder(e,t)}},{key:"getFlatLayers",value:function(){return this.allLayers.items}},{key:"findLayerById",value:function(e){return this.layers.find(function(t){return t&&t.id===e})}},{key:"toJSON",value:function(){var e=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return this.layers=this.layers.items.map(function(e){return e.toJSON()}),e}},{key:"clone",value:function(){return new t(this.toJSON())}},{key:"setMap",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setMap",this).call(this,e),this._setItemParent(this.layers,this,e)}},{key:"destroy",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this),this.removeAll(),this._removeHandlers()}},{key:"_initHandlers",value:function(){var e=this;this._handlers=[];var t=function(t){for(var r=t.added,n=t.removed,i=t.moved,o=[],a=e;a;){o.push(a);var s=new c.LayerChangeEvent({added:r,removed:n,moved:i,sourceTarget:e,path:o});a.fire(u.MapEventType.layerChange,s),a=a.parent}};this.layers.on("change",t),this._handlers.push({key:"change",func:t})}},{key:"_removeHandlers",value:function(){var e=this;this._handlers.map(function(t){return e.off("change",t.func,e)})}},{key:"_setItemParent",value:function(e,t,r){(e instanceof a.Collection?e._items:Array.isArray(e)?e:[e]).forEach(function(e){e&&(e.parent=t,e.setMap&&e.setMap(r))})}},{key:"_fireLoadEvent",value:function(e){var t=new c.LayerEvent({type:u.LayerEventType.layerLoaded,target:e,message:"图层资源加载完毕",layer:e});e.fire(t)}},{key:"_fireLoadErrorEvent",value:function(e){var t=new c.LayerEvent({type:u.LayerEventType.layerLoadError,target:e,message:"图层资源加载失败",layer:e});e.fire(t)}},{key:"_isValidateLayers",value:function(e){var r=this,n=[];if(Array.isArray(e)&&e.length>0&&e.forEach(function(e){n.push(e),e instanceof t&&(n=n.concat(e.allLayers.items))}),n.some(function(e){return r.allLayers.items.some(function(t){return t.id===e.id})}))throw new Error("重复添加图层,请检查传入图层的id")}}],[{key:"fromJSON",value:function(e){return new t(e=e||{})}}]),t}();a.Zondy.Layer.GroupLayer=h,t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(3),a=r(0),s=r(8),u=function(e){return e&&e.__esModule?e:{default:e}}(r(94)),l=r(10),c=r(29);var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r.type=o.LayerType.graphics,r.minScale=(0,a.defaultValue)(e.minScale,0),r.maxScale=(0,a.defaultValue)(e.maxScale,0),r.tokenKey=(0,a.defaultValue)(e.tokenKey,"token"),r.tokenValue=(0,a.defaultValue)(e.tokenValue,void 0),r.elevationInfo=(0,a.defaultValue)(e.elevationInfo,new i.ElevationInfo),r.graphics=r._decorate("graphics",e.graphics,u.default,u.default.collect),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.Layer),n(t,[{key:"add",value:function(e){if(e){if(this._getFeatureIndexById(e.id)>-1)throw new Error("id为'"+e.id+"'的要素重复添加,请检查传入要素的id");(0,c.setElevationInfo)(e,this),this.graphics.add(e),this._fireUpdateEvent("添加要素",[{params:arguments,dataChanged:!0,name:"add",operationType:"method"}])}}},{key:"remove",value:function(e){if(e){var t=this._getFeatureIndexById(e.id);-1!==t&&(this._removeGraphicByIndex(t),this._fireUpdateEvent("移除要素",[{params:arguments,dataChanged:!0,name:"remove",operationType:"method"}]))}}},{key:"addMany",value:function(e){var t=this;(e instanceof i.FeatureSet?e.clone().features.map(function(e){return e.clone()}):e.map(function(e){return e.clone()})).forEach(function(e){t.graphics.add(e)}),this._fireUpdateEvent("添加要素组",[{params:arguments,dataChanged:!0,name:"addMany",operationType:"method"}])}},{key:"removeMany",value:function(e){var t=this,r=[];Array.isArray(e)&&(e.forEach(function(e){var n=t._getFeatureById(e.id);n&&(t._removeGraphic(n),r.push(n))}),this._fireUpdateEvent("删除要素组",[{params:r,dataChanged:!0,name:"removeMany",operationType:"method"}]))}},{key:"removeAll",value:function(){this.graphics=[],this._fireUpdateEvent("删除全部要素",[{params:arguments,dataChanged:!0,name:"removeAll",operationType:"method"}])}},{key:"_load",value:function(){var e=this;return new Promise(function(t,r){e.loadStatus=o.LoadStatus.loaded,e.loaded=!0,t(e),r("资源请求失败!")})}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);e.elevationInfo=(0,a.toJSON)(this.elevationInfo,i.ElevationInfo);var r=[];return this.graphics&&this.graphics.forEach(function(e){r.push((0,a.toJSON)(e,i.Feature))}),e.graphics=r,e}},{key:"_getFeatureIndexById",value:function(e){return this.graphics.findIndex(function(t){return t.id===e})}},{key:"_getFeatureById",value:function(e){var t=this._getFeatureIndexById(e);return t>-1?this.graphics[t]:null}},{key:"_removeGraphic",value:function(e){var t=this._getFeatureIndexById(e.id);this._removeGraphicByIndex(t)}},{key:"_removeGraphicByIndex",value:function(e){-1!==e&&this.graphics.items.splice(e,1)}}],[{key:"fromJSON",value:function(e){var r=new t(e=(0,l.jsonClone)(e));r.elevationInfo=new i.ElevationInfo(e.elevationInfo);for(var n=[],a=0;a<e.graphics.length;a++)n.push(new i.Feature(e.graphics[a]));return r.graphics=n,r.loadStatus=o.LoadStatus.loaded,r.loaded=!0,r}}]),t}();i.Zondy.Layer.GraphicsLayer=f,t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(18)),o=d(r(28)),a=r(1),s=r(3),u=r(0),l=r(4),c=d(r(67)),f=r(39),h=r(10),p=r(21);function d(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,u.defaultValue)(e,{}),r.type=s.LayerType.geojson,r._spatialReference=(0,u.defaultValue)(e.spatialReference,new l.SpatialReference("EPSG:4326")),r.minScale=(0,u.defaultValue)(e.minScale,0),r.maxScale=(0,u.defaultValue)(e.maxScale,0),r.tokenKey=(0,u.defaultValue)(e.tokenKey,"token"),r.tokenValue=(0,u.defaultValue)(e.tokenValue,void 0),r.renderer=r._decorate("renderer",e.renderer,f.BaseRenderer,f.BaseRenderer.fromJSON),r.url=(0,u.defaultValue)(e.url,""),r.elevationInfo=(0,u.defaultValue)(e.elevationInfo,new a.ElevationInfo),r.customParameters=(0,u.defaultValue)(e.customParameters,{}),r.geometryType=s.GeometryType.geometry,r.labelsVisible=(0,u.defaultValue)(e.labelsVisible,!1),r.labelingInfo=(0,u.defaultValue)(e.labelingInfo,[]),r._source=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),n(t,[{key:"_load",value:function(){var e=this;return this.queryFeatures().then(function(t){var r=t;if(r){e._source=r;var n=i.bbox(r),o=parseFloat(n[0]),a=parseFloat(n[1]),c=parseFloat(n[2]),f=parseFloat(n[3]);return e.extent=new l.Extent({xmin:o,xmax:c,ymin:a,ymax:f,spatialReference:e._spatialReference}),e.geometryType=(0,p.getGeometryTypeByFeatureSet)(e._source),new Promise(function(t){e.loadStatus=s.LoadStatus.loaded,e.loaded=!0,t(e)})}u.Log.error("几何信息为空",r)})}},{key:"destroy",value:function(){}},{key:"queryFeatures",value:function(){return this._parseGeoJSON().then(function(e){return a.FeatureSet.fromGeoJSON(e)})}},{key:"queryFeaturesCount",value:function(){return this._parseGeoJSON().then(function(e){return a.FeatureSet.fromGeoJSON(e).features.length})}},{key:"_parseGeoJSON",value:function(){var e=this;return new Promise(function(t){if("string"==typeof e.url){var r=e.url;if(e.customParameters){var n="?";Object.keys(e.customParameters).forEach(function(t){n+=t+"="+e.customParameters[t]+"&"}),"?"!==n&&(r+=n=n.substring(n.length-1,0))}c.default.commit("get",r,{}).then(function(e){e&&e.json?t(e.json()):u.Log.error("GeoJSON数据请求失败,请检查服务状态!")})}else t(e.url)}).catch(function(e){u.Log.error(e)})}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.url=this.url,e.elevationInfo=(0,u.toJSON)(this.elevationInfo,a.ElevationInfo),e.customParameters=this.customParameters,e.labelsVisible=this.labelsVisible,e.geometryType=this.geometryType,e.renderer=(0,u.toJSON)(this.renderer,f.BaseRenderer),e.extent=(0,u.toJSON)(this.extent,l.Extent),e.labelingInfo=this.labelingInfo,e}}],[{key:"fromJSON",value:function(e){var r=new t(e=(0,h.jsonClone)(e));return r.renderer=f.BaseRenderer.fromJSON(e.renderer),r.elevationInfo=new a.ElevationInfo(e.elevationInfo),r.extent=l.Geometry.fromJSON(e.extent),r.loadStatus=s.LoadStatus.loaded,r.loaded=!0,r}}]),t}();a.Zondy.Layer.GeoJSONLayer=y,t.default=y},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0},o=r(1),a=r(8),s=r(0),u=r(3),l=r(12),c=r(10);var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,s.defaultValue)(e,{}),r.url=(0,s.defaultValue)(e.url,""),r.type=u.LayerType.m3dCache,r.version=void 0,r.boundingVolume=void 0,r.sceneName=void 0,r.fieldInfo=void 0,r.position=void 0,r.spatialReference=void 0,r.description="M3D图层",r.extendOptions=(0,s.defaultValue)(e.extendOptions,{}),r._renderer=(0,s.defaultValue)(e.renderer,void 0),r._m3dServer=new l.M3DServer({url:r.url}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.Layer),n(t,[{key:"load",value:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"load",this).call(this)}},{key:"_load",value:function(){var e=this;return new Promise(function(t){e.loadStatus=u.LoadStatus.loaded,e.loaded=!0,t(e)})}},{key:"toJSON",value:function(){var e=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.url=this.url,e.type=this.type,e.version=this.version,e.boundingVolume=this.boundingVolume,e.sceneName=this.sceneName,e.fieldInfo=this.fieldInfo,e.position=this.position,e.spatialReference=this.spatialReference,e.description=this.description,e.extendOptions=this.extendOptions,e}},{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){var r=new t(e=(0,c.jsonClone)(e));return r.loadStatus=u.LoadStatus.loaded,r.loaded=!0,r}}]),t}();f.fromServerUrl=function(e){return new f({url:e})},Object.defineProperties(f.prototype,{renderer:{get:function(){return this._renderer},set:function(e){this._renderer=e,this._fireUpdateEvent("设置专题图",[{name:"renderer",params:[this._renderer],dataChanged:!0,operationType:"property"}])}}}),o.Zondy.Layer.M3DModelCacheLayer=f,t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(3),a=r(0),s=r(8);function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r._source=(0,a.defaultValue)(e.source,null),r._source?("string"==typeof e.container?r._container=document.getElementById(e.container):r._container=e.container,r._container?(0,a.defined)(window.videojs)?(r._videoHtml=null,r._hlsPlayer=null,r._rtmpPlayer=null,r._width=0,r._height=0,r):(a.Log.error("The video.js library is lost."),u(r)):(a.Log.error("The videoHTML container is lost."),u(r))):(a.Log.error("The video source is lost."),u(r))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.Layer),n(t,[{key:"_load",value:function(){var e=this,t=(0,a.getVideoType)(this._source);return new Promise(function(r,n){if(t!==o.VideoSourceType.videoPlayer){if(t===o.VideoSourceType.videoHTML)return e._width=e._source.videoWidth,e._height=e._source.videoHeight,e.fire("layerview-created",{}),void r(e);if(e._videoHtml=document.createElement("video"),e._videoHtml.id="video",e._videoHtml.style.position="absolute",e._videoHtml.style.zIndex="0",e._container.appendChild(e._videoHtml),e._videoHtml.style.width="100%",e._videoHtml.style.height="100%",t===o.VideoSourceType.mp4)e._videoHtml.crossOrigin="anonymous",e._videoHtml.autoplay=!0,e._videoHtml.loop=!0,e._videoHtml.src=e._source,e._videoHtml.play(),e._videoHtml.controls=!0;else if(t===o.VideoSourceType.hls){e._hlsPlayer=videojs(e._videoHtml),e._hlsPlayer.src({type:"application/x-mpegURL",src:e._source}),e._hlsPlayer.load(e._source),e._hlsPlayer.play(),e._hlsPlayer.loop(!0),e._hlsPlayer.el().querySelector("video").controls=!0}else t===o.VideoSourceType.rtmp&&(e._rtmpPlayer=videojs(e._videoHtml,{sources:[{src:e._source,type:"rtmp/flv"}]},function(){e._rtmpPlayer.play(),e._rtmpPlayer.loop(!0)}),e._rtmpPlayer.on("play",function(){e._rtmpPlayer.width(e._rtmpPlayer.videoWidth()),e._rtmpPlayer.height(e._rtmpPlayer.videoHeight()),e._videoHtml.oncanplay()}));e._videoHtml.oncanplay=function(){e.loadStatus=o.LoadStatus.loaded,e.loaded=!0,e._width=e._videoHtml.videoWidth?e._videoHtml.videoWidth:e._rtmpPlayer?e._rtmpPlayer.videoWidth():1,e._height=e._videoHtml.videoHeight?e._videoHtml.videoHeight:e._rtmpPlayer?e._rtmpPlayer.videoHeight():1,e.fire("layerview-created",{}),e._videoHtml.style.width=e._width,e._videoHtml.style.height=e._height,r(e)},e._videoHtml.onerror=function(){var t="未知错误";switch(e._videoHtml.error.code){case 1:t="视频加载中断";break;case 2:t="网络链接错误";break;case 3:t="视频解码失败";break;case 4:t="不支持的视频"}a.Log.error("出现错误:"+t+"错误代码:"+e._videoHtml.error.code),e.loadStatus=o.LoadStatus.failed,n(e._videoHtml.error)}}else e._source.on("play",function(){e._width=e._source.videoWidth(),e._height=e._source.videoHeight(),e.fire("layerview-created",{}),r(e)})})}},{key:"videoHtml",get:function(){return this._videoHtml}},{key:"rtmpPlayer",get:function(){return this._rtmpPlayer}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}}]),t}();i.Zondy.Layer.VideoMapLayer=l,t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(3),a=r(0),s=r(8);function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r.type="video",r.source=(0,a.defaultValue)(e.source,null),r.source?(0,a.defined)(window.videojs)?r:(a.Log.error("The video.js library is lost."),u(r)):(a.Log.error("The video source is lost."),u(r))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.Layer),n(t,[{key:"_load",value:function(){return new Promise(function(e){self.loadStatus=o.LoadStatus.loaded,self.loaded=!0,e(self)})}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.source=this.source,e}},{key:"clone",value:function(){return new t(this.toJSON())}}]),t}();i.Zondy.Layer.VideoLayer=l,t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(8),o=r(1),a=r(0),s=r(3);var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,a.defaultValue)(e,{}),r.type=s.LayerType.unknown,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Layer),n(t,[{key:"clone",value:function(){return new t(this.toJSON())}}],[{key:"fromJSON",value:function(e){return new t(e)}}]),t}();o.Zondy.Layer.UnknownLayer=u,t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(1),r(16);var n=function(e){return e&&e.__esModule?e:{default:e}}(r(95));t.default=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t.view,this.baseGroupLayer=t.baseGroupLayer,this.baseLayerViews=t.baseLayerViews,this.groupLayerView=new n.default({layer:this.baseGroupLayer,layerViews:this.baseLayerViews,view:this.view}),this.id=this.baseGroupLayer.id}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Basemap=t.Map=void 0;var n=o(r(171)),i=o(r(450));function o(e){return e&&e.__esModule?e:{default:e}}t.Map=n.default,t.Basemap=i.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(0),a=r(3),s=r(29),u=r(16),l=r(24);var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=(0,o.defaultValue)(e,{});var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._baseLayers=(0,s.getLayersCollection)(e.baseLayers),r._baseGroupLayer=new u.GroupLayer({layers:r._baseLayers}),r.id=(0,o.defaultValue)(e.id,(0,o.getGUID)()),r.title=(0,o.defaultValue)(e.title,""),r.thumbnailUrl=(0,o.defaultValue)(e.thumbnailUrl,""),r._spatialReference=null,r._referenceLayer=null,r._map=null,r._initEvent(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Evented),n(t,[{key:"toJSON",value:function(){var e={};return e.baseLayers=this._baseLayers.items.map(function(e){return e.toJSON()}),e.id=this.id,e.title=this.title,e.thumbnailUrl=this.thumbnailUrl,e.spatialReference=this.spatialReference?this.spatialReference.toJSON():void 0,e}},{key:"clone",value:function(){return new t(this.toJSON())}},{key:"destroy",value:function(){this._setBaseLayers(null),this.id=null,this.title=null,this.thumbnailUrl=null,this._spatialReference=null,this._referenceLayer=null,this._map=null}},{key:"removeEvent",value:function(){this._map&&this._map.fire(a.MapEventType.basemapChange,new l.BasemapChangeEvent({basemap:this._basemap,detail:[{action:"baseLayers-destroy"}]}))}},{key:"_initEvent",value:function(){var e=this;this._baseGroupLayer.on(a.LayerEventType.layerViewCreated+" "+a.LayerEventType.layerViewUpdate+" "+a.LayerEventType.layerViewRemove,function(t){e._map.basemap.dispatchEvent(t.type,t)})}},{key:"_setBaseLayers",value:function(e){if(!e||Array.isArray(e)&&e.length<1)this._baseLayers=Array.isArray(e)&&e.length<1?e:null,this._baseGroupLayer.removeAll(),this.removeEvent();else{var t=Array.isArray(e)?(0,s.getLayersCollection)(e):e;this._baseLayers=t,this._baseGroupLayer.layers.items=this._baseLayers.items}}},{key:"_setReferenceLayer",value:function(e){this._referenceLayer=e,this._spatialReference=e.spatialReference}},{key:"_setBasemap",value:function(e,t){t&&(this._map=t),e?(e._baseLayers&&this._setBaseLayers(e._baseLayers),this.id=e.id?e.id:this.id,this.title=e.title?e.title:this.title,this.thumbnailUrl=e.thumbnailUrl?e.id:this.thumbnailUrl,this._spatialReference=null):this.destroy()}},{key:"dispatchEvent",value:function(e,t,r){for(var n in a.LayerEventType)if(a.LayerEventType[n]===e){this.fire(e,t,r);break}return this}}],[{key:"fromJSON",value:function(e){return new t(e=(0,o.defaultValue)(e,{}))}}]),t}();Object.defineProperties(c.prototype,{baseLayers:{get:function(){return this._baseLayers},set:function(e){this._setBaseLayers(e)}},spatialReference:{get:function(){return this._spatialReference},set:function(){}}}),t.default=c,i.Zondy.Basemap=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.adjustChildSizeToParent=function(e,t,r){var n=r.clientWidth,i=r.clientHeight,o=Math.min(n/e,i/t),a=e*o,s=t*o;return{width:a,height:s,left:(n-a)/2,top:(i-s)/2,scale:o}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=f(r(2)),o=r(0),a=f(r(72)),s=r(1),u=r(3),l=r(16),c=r(4);function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e=(0,o.defaultValue)(e,{}),r.mergeLevelRatio=(0,o.defaultValue)(e.mergeLevelRatio,1.05),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),n(t,[{key:"_loadViewSpatialReference",value:function(){var e=this;return this._setSpatialReference(),new Promise(function(t,r){if(e._spatialReference){var n=!e.crs;e._setCrs(e._referenceLayer)?e._removeAllLayerViews().then(function(){e._reCreateView(n).then(function(){e._addAllLayerViews().then(function(){t(!0)})})}):t()}else o.Log.warning("视图参考系不存在!"),t(!1)})}},{key:"_setCrs",value:function(e){var t=this._getCrsByReferenceLayer(e),r=!this._isEqualCrs(this.crs,t);return r&&(this.crs=t),r}},{key:"_setSpatialReference",value:function(){var e=null,t=null;if(this._map&&this._map.allLayers&&(t=l.TileInfoUtil.getReferenceLayer(this._map.allLayers._items))&&(e=t.spatialReference),this._map.basemap){var r=l.TileInfoUtil.getReferenceLayer(this._map.basemap._baseGroupLayer.allLayers._items);r&&(this._map.basemap._spatialReference=r.spatialReference)}e&&(!this.spatialReferenceLocked||this.spatialReferenceLocked&&!this._spatialReference)&&(this._spatialReference=e,this._referenceLayer=t,this._map._setSpatialReference(e),this._map.getFullExtent(),this._spatialReference&&l.TileInfoUtil.setLayerSpatialReference(this._map.allLayers,this._spatialReference))}},{key:"_getCrsByReferenceLayer",value:function(e){var t=null;return e&&e.spatialReference&&e.loaded?t=this._getCrs(e):t}},{key:"_getCrs",value:function(e){var t=this,r=e.spatialReference,n=[];this._map.allLayers.forEach(function(e){t._isLayerViewValid(r,e)&&n.push(e)});var i=e.extent,o=this._map._getLayersExtent(n);o||(o=c.Extent.fromJSON(i.toJSON())),o.spatialReference.isGeographic||(o=s.Projection.project(o,new c.SpatialReference("EPSG:4326"))),this._layerViewsExtent=o;var a=this.fullExtent,f=e.tileInfo;if(e.type===u.LayerType.wmts)f=e.getCurrentTileInfo();else if(e.type===u.LayerType.wms)f=l.TileInfoUtil.parseWMSTileInfo(e,e.extent);else if(e.type===u.LayerType.igsMapImage||e.type===u.LayerType.arcgisMapImage||e.type===u.LayerType.igsFeature||e.type===u.LayerType.wfs||e.type===u.LayerType.geojson){var h=256;e.imageWidth&&e.imageHeight&&(h=Math.max(e.imageWidth,e.imageHeight)),f=l.TileInfoUtil.generateTileInfo(a,h,e.spatialReference)}var p=c.Point.toCoordinates(f.origin),d=[];n.forEach(function(e){var t=[];for(e.tileInfo?t=e.tileInfo.lods.map(function(e){return e.clone()}):e.type===u.LayerType.wmts&&(t=e.getCurrentTileInfo().lods.map(function(e){return e.clone()}));t.length>0&&0!==t[0].level;){var r=t[0];t.unshift(l.LOD.fromJSON({level:r.level-1,resolution:2*r.resolution,scale:2*r.scale}))}d=d.concat(t)}),0===d.length&&(d=f.lods),d.sort(function(e,t){return t.resolution-e.resolution});for(var y=[d[0]],g=1;g<d.length;g++){var v=d[g];y[y.length-1].resolution/v.resolution<=this.mergeLevelRatio||y.push(v)}y.forEach(function(e,t){e.level=t});var m=y.map(function(e){return e.resolution});return this._createCrsObject({spatialReference:r,resolutions:m,origin:p,extent:a,lods:y,tileSize:f.getTileSize()})}},{key:"_createLayerView",value:function(e){var t=this._createLayerViewObj(e)||null;if(t&&e&&e.spatialReference&&this._referenceLayer&&this._referenceLayer.spatialReference){var r=this._referenceLayer.spatialReference;if(!this._isLayerViewValid(r,e))return o.Log.warning("图层类型为"+e.type+"的图层空间参考系和索引图层不一致,请检查图层"),null}return t}},{key:"_isLayerViewValid",value:function(e,t){var r=!1;if(t&&t.spatialReference&&e){var n=e;if(n instanceof c.SpatialReference||(n=c.SpatialReference.fromJSON(n)),u.LayerType.isTileLayer(t.type))r=!!(n.equals(t.spatialReference)||n.isGeographic&&t.spatialReference.isGeographic||n.isWebMercator&&t.spatialReference.isWebMercator);else r=!0}return r}},{key:"_initViewEvent",value:function(){var e=this;this._map.groupLayer.on(u.LayerEventType.layerViewCreated+" "+u.LayerEventType.layerViewUpdate+" "+u.LayerEventType.layerViewRemove,function(t){e._map.basemap.dispatchEvent(t.type,t)})}},{key:"toJSON",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);return e.mergeLevelRatio=this.mergeLevelRatio,e}}]),t}();h.fromJSON=function(e){return e=(0,o.defaultValue)(e,{}),new h(e)},Object.defineProperties(h.prototype,{fullExtent:{get:function(){this._initFullExtent?this._fullExtent=this._initFullExtent:this._fullExtent=this._layerViewsExtent;var e=void 0;return this.spatialReference&&this._fullExtent&&(e=this.spatialReference.isGeographic?this._fullExtent:s.Projection.project(this._fullExtent,this.spatialReference)),e},set:function(e){var t=void 0;t=e.spatialReference.isGeographic?e:s.Projection.project(e,new c.SpatialReference("EPSG:4326")),this._fullExtent=t,this._initFullExtent=c.Extent.fromJSON(t.toJSON()),this.setCrs()}}}),i.default.MapView=h,t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(r(2)),i=r(0),o=a(r(72));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),t}();s.fromJSON=function(e){return e=(0,i.defaultValue)(e,{}),new s(e)},n.default.SceneView=s,t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=s(r(88)),o=r(0),a=s(r(55));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.render=(0,o.defaultValue)(e.render,new i.default),r._initHandlers(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),n(t,[{key:"_initHandlers",value:function(){this._layerChangeAction=this._layerChangeAction.bind(this),this.layer.on("set",this._layerChangeAction)}},{key:"_removeHandlers",value:function(){this.layer.off("set",this._layerChangeAction)}},{key:"_layerChangeAction",value:function(e){this._featureCollectionChangeAction(e)}},{key:"_featureCollectionChangeAction",value:function(e){var t=e.eventPath||[],r=e.eventData,n=r.key,i=r.value,o=e.sourceEventData;if("graphics"===n){var a=i;if(t.length<=0||!a)return;if(1===t.length){var s=i;this.render.clear(this.innerLayer),this.render.drawFeature(this.innerLayer,s.items)}else if(t.length>1){var u=t[1],l=a.getFeatureById(u);if(!l)return;if(t.length>2){var c=t[2],f={geometryUpdated:null,symbolUpdated:null};"symbol"===c?f.symbolUpdated=o:"geometry"===c&&(f.geometryUpdated=o),this.render.updateFeature(this.innerLayer,[l],[f])}}}}}]),t}();t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(n):void 0},o=p(r(88)),a=p(r(94)),s=r(0),u=p(r(173)),l=p(r(174)),c=r(1),f=r(3),h=r(56);function p(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default),n(t,[{key:"_initInstance",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_initInstance",this).call(this,e),this.render=(0,s.defaultValue)(e.render,new o.default),this._featureSetCache=new a.default}},{key:"_initHandlers",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_initHandlers",this).call(this),this._onFeatureChange=this._onFeatureChange.bind(this),this._onFeatureSetCacheChange=this._onFeatureSetCacheChange.bind(this),this._zoomChange=this._zoomChange.bind(this),this._featureSetCache.on("set",this._onFeatureChange),this._featureSetCache.on("change",this._onFeatureSetCacheChange),this.view.on("zoom",this._zoomChange)}},{key:"_removeHandlers",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_removeHandlers",this).call(this),this.off("set",this._onFeatureChange),this.off("change",this._onFeatureSetCacheChange),this.view.off("zoom",this._zoomChange)}},{key:"_rendererChangeAction",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_rendererChangeAction",this).call(this,e);var r=this._featureSetCache.items||[];l.default.updateRenderer(r,this.layer.renderer)}},{key:"_onFeatureChange",value:function(e){var t=e.eventPath||[],r=e.eventData.value,n=e.sourceEventData;if(!(t.length<=0)&&r&&t.length>1){var i=r;if(!i)return;var o=t[1],a={geometryUpdated:null,symbolUpdated:null};"symbol"===o?a.symbolUpdated=n:"geometry"===o&&(a.geometryUpdated=n),this.render.updateFeature(this.innerLayer,[i],[a])}}},{key:"_onFeatureSetCacheChange",value:function(e){e&&(e.added&&this.render.drawFeature(this.innerLayer,e.added),e.removed&&this.render.clearFeature(this.innerLayer,e.removed))}},{key:"_zoomChange",value:function(e){if(this.layer&&this.layer.renderer){var t=this.layer.renderer;if(t.type===f.RendererType.random){var r=this._featureSetCache.items||[];l.default.updateRenderer(r,t)}}}},{key:"_initFeatures",value:function(e,t){var r=[];e instanceof c.FeatureSet?r=e.features:Array.isArray(e)&&e.every(function(e){return e instanceof c.Feature})?r=e:s.Log.info("传入要素集错误");for(var n=0;n<r.length;n++)(0,h.setElevationInfo)(r[n],this.layer);l.default.updateRenderer(r,t),this._featureSetCache.addMany(r)}},{key:"onRemove",value:function(e){this._featureSetCache.removeAll(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"onRemove",this).call(this,e)}}]),t}();t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchFreehandPolygonDrawTool=t.SketchFreehandPolylineDrawTool=t.SketchExtentDrawTool=t.SketchCircleDrawTool=t.SketchPolygonDrawTool=t.SketchPolylineDrawTool=t.SketchPointDrawTool=t.SketchBaseDrawTool=t.SketchEditor3D=t.SketchEditor=t.SketchEditorVideo=t.SketchEditorVideoBase=t.SketchEditorEvent=t.SketchStyle=void 0;var n=r(96),i=function(e){return e&&e.__esModule?e:{default:e}}(r(464));t.SketchStyle=n.SketchStyle,t.SketchEditorEvent=n.SketchEditorEvent,t.SketchEditorVideoBase=n.SketchEditorVideoBase,t.SketchEditorVideo=i.default,t.SketchEditor=n.SketchEditor,t.SketchEditor3D=n.SketchEditor3D,t.SketchBaseDrawTool=n.SketchBaseDrawTool,t.SketchPointDrawTool=n.SketchPointDrawTool,t.SketchPolylineDrawTool=n.SketchPolylineDrawTool,t.SketchPolygonDrawTool=n.SketchPolygonDrawTool,t.SketchCircleDrawTool=n.SketchCircleDrawTool,t.SketchExtentDrawTool=n.SketchExtentDrawTool,t.SketchFreehandPolylineDrawTool=n.SketchFreehandPolylineDrawTool,t.SketchFreehandPolygonDrawTool=n.SketchFreehandPolygonDrawTool},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(4),a=r(0),s=function(e){return e&&e.__esModule?e:{default:e}}(r(17));function u(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return(e=(0,a.defaultValue)(e,{})).mapView||a.Log.error("options.mapView is null!",e),r._mapView=e.mapView,r._coordTransfomrs=(0,a.defaultValue)(r._mapView.videoPixelCoordTransforms,void 0),r._mouseEventHandlers=null,r.sketchStyle=(0,a.defaultValue)(e.sketchStyle,new s.default),r._sketchDataType=null,r._pointGeomtry=null,r._lineGeomtry=null,r._polygonGeomtry=null,r._textGeomtry=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Evented),n(t,[{key:"start",value:function(e){switch(this._stopCurrentGraphicDrawing(),this.clearGeometry(),this._mapView._enabledMouseEvent("auto"),e){case i.SketchDataType.POINT:this._sketchDataType=i.SketchDataType.POINT,this._drawPoint();break;case i.SketchDataType.POLYLINE:this._sketchDataType=i.SketchDataType.POLYLINE,this._drawLine();break;case i.SketchDataType.POLYGON:this._sketchDataType=i.SketchDataType.POLYGON,this._drawPolygon()}}},{key:"stop",value:function(){this._stopCurrentGraphicDrawing(),this.clearGeometry(),this._mapView._enabledMouseEvent("none")}},{key:"getSketchDataType",value:function(){return this._sketchDataType}},{key:"getGeometry",value:function(){if(this._sketchDataType===i.SketchDataType.POINT){if(this._pointGeomtry){var e=new o.Point({coordinates:this._pointGeomtry.geometry.coordinates});return e._pixelCoords=this._pointGeomtry.geometry._pixelCoords,e}}else if(this._sketchDataType===i.SketchDataType.POLYLINE){if(this._lineGeomtry){var t=new o.LineString({coordinates:this._lineGeomtry.geometry.coordinates});return t._pixelCoords=this._lineGeomtry.geometry._pixelCoords,t}}else if(this._sketchDataType===i.SketchDataType.POLYGON&&this._polygonGeomtry){var r=new o.Polygon({coordinates:this._polygonGeomtry.geometry.coordinates});return r._pixelCoords=this._polygonGeomtry.geometry._pixelCoords,r}}},{key:"clearGeometry",value:function(){this._pointGeomtry&&this._mapView.graphics.remove(this._pointGeomtry),this._lineGeomtry&&this._mapView.graphics.remove(this._lineGeomtry),this._polygonGeomtry&&this._mapView.graphics.remove(this._polygonGeomtry),this._textGeomtry&&this._mapView.graphics.remove(this._textGeomtry),this._pointGeomtry=null,this._lineGeomtry=null,this._polygonGeomtry=null,this._textGeomtry=null}},{key:"isSketchValid",value:function(){}},{key:"setSketchStyle",value:function(e){this.sketchStyle=e}},{key:"getSketchStyle",value:function(){return this.sketchStyle}},{key:"_stopCurrentGraphicDrawing",value:function(){var e=this;this._mouseEventHandlers&&(this._mouseEventHandlers.forEach(function(t){e._mapView.off(i.ViewEventType.mouseDown,t),e._mapView.off(i.ViewEventType.mouseUp,t),e._mapView.off(i.ViewEventType.mouseMove,t),e._mapView.off(i.ViewEventType.doubleClick,t)}),this._mouseEventHandlers=null)}},{key:"_getGraphic",value:function(){if(this._sketchDataType===i.SketchDataType.POINT){var e=new o.Point({coordinates:[0,0,0]}),t=this.sketchStyle.vertexStyle;return new i.Feature({geometry:e,symbol:t})}if(this._sketchDataType===i.SketchDataType.POLYLINE){var r=new o.LineString({coordinates:[[0,0],[1,1]]}),n=this.sketchStyle.lineStyle,a=new i.Feature({geometry:r,symbol:n});return a.isShowSegmentLength=this.sketchStyle.isShowSegmentLength,a.isShowSegmentLength&&(a._textStyle=this.sketchStyle.textStyle),a}if(this._sketchDataType===i.SketchDataType.POLYGON){var s=new o.Polygon({coordinates:[[[0,0],[0,0],[0,0],[0,0]]]}),u=this.sketchStyle.fillStyle,l=new i.Feature({geometry:s,symbol:u});return l.isShowArea=this.sketchStyle.isShowArea,l.isShowArea&&(l._textStyle=this.sketchStyle.textStyle),l}}},{key:"_drawPoint",value:function(){var e=this,t=function(t){if(!t.target||"circle"!==t.target.type){var r=t.pointer,n={x:r.x,y:r.y},i=e._getGraphic(),a=e._mapView.pixelCoordToGeoCoord(new o.Point({coordinates:[n.x,n.y]}));i.geometry.coordinates=a.coordinates,i.geometry._pixelCoords=n,e._mapView.graphics.add(i),e._pointGeomtry=i,e._stopCurrentGraphicDrawing()}};this._mouseEventHandlers=this._mouseEventHandlers?this._mouseEventHandlers:[],this._mouseEventHandlers.push(t),this._mapView.on(i.ViewEventType.mouseUp,t)}},{key:"_drawLine",value:function(){var e=this,t=void 0,r=null,n=!1,a=!1,s=null,u=[],l=[],c=function(t){clearTimeout(r);var i=t.pointer,a={x:i.x,y:i.y},c=e._mapView.pixelCoordToGeoCoord(new o.Point({coordinates:[a.x,a.y]}));s?(u.push(a),l.push(c.coordinates),s.geometry._pixelCoords=u,s.geometry.coordinates=l):(u.push(a,a),l.push(c.coordinates,c.coordinates),(s=e._getGraphic()).geometry.coordinates=l,s.geometry._pixelCoords=u,e._mapView.graphics.add(s),e._lineGeomtry=s),r=setTimeout(function(){n=!0},500)},f=function(r){if(t=r.pointer,n){a=!0;var i={x:t.x,y:t.y};u[u.length-1]=i;var c=e._mapView.pixelCoordToGeoCoord(new o.Point({coordinates:[i.x,i.y]}));l[l.length-1]=c.coordinates,s.geometry._pixelCoords=u,s.geometry.coordinates=l}},h=function(t){if(clearTimeout(r),l.pop(),u.pop(),l.pop(),u.pop(),l.pop(),u.pop(),s.geometry._pixelCoords=u,s.geometry.coordinates=l,!a)return s=null,l=[],void(u=[]);var i=t.pointer,c={x:i.x,y:i.y},f=e._mapView.pixelCoordToGeoCoord(new o.Point({coordinates:[c.x,c.y]}));u.push(c),l.push(f.coordinates),s.geometry._pixelCoords=u,s.geometry.coordinates=l,s=null,l=[],u=[],a=!1,n=!1,e._stopCurrentGraphicDrawing()};this._mouseEventHandlers=this._mouseEventHandlers?this._mouseEventHandlers:[],this._mouseEventHandlers.push(c,f,h),this._mapView.on(i.ViewEventType.mouseUp,c),this._mapView.on(i.ViewEventType.mouseMove,f),this._mapView.on(i.ViewEventType.doubleClick,h)}},{key:"_drawPolygon",value:function(){var e=this,t=void 0,r=null,n=!1,a=!1,s=null,l=[],c=[],f=function(t){clearTimeout(r);var i=t.pointer,a={x:i.x,y:i.y},f=e._mapView.pixelCoordToGeoCoord(new o.Point({coordinates:[a.x,a.y]}));s?(l.push(a),c.push(f.coordinates),s.geometry._pixelCoords=[].concat(u(l),[l[0]]),s.geometry.coordinates=[[].concat(u(c),[c[0]])]):(l.push(a,a),c.push(f.coordinates,f.coordinates),(s=e._getGraphic()).geometry._pixelCoords=[].concat(u(l),[l[0]]),s.geometry.coordinates=[[].concat(u(c),[c[0]])],e._mapView.graphics.add(s),e._polygonGeomtry=s),r=setTimeout(function(){n=!0},500)},h=function(r){if(n){a=!0;var i={x:(t=r.pointer).x,y:t.y};l[l.length-1]=i;var f=e._mapView.pixelCoordToGeoCoord(new o.Point({coordinates:[i.x,i.y]}));c[c.length-1]=f.coordinates,s.geometry._pixelCoords=[].concat(u(l),[l[0]]),s.geometry.coordinates=[[].concat(u(c),[c[0]])]}},p=function(t){if(clearTimeout(r),c.pop(),l.pop(),c.pop(),l.pop(),c.pop(),l.pop(),s.geometry._pixelCoords=[].concat(u(l),[l[0]]),s.geometry.coordinates=[[].concat(u(c),[c[0]])],!a)return s=null,c=[],void(l=[]);var i=t.pointer,f={x:i.x,y:i.y},h=e._mapView.pixelCoordToGeoCoord(new o.Point({coordinates:[f.x,f.y]}));l.push(f),c.push(h.coordinates),s.geometry._pixelCoords=[].concat(u(l),[l[0]]),s.geometry.coordinates=[[].concat(u(c),[c[0]])],s=null,c=[],l=[],a=!1,n=!1,e._stopCurrentGraphicDrawing()};this._mouseEventHandlers=this._mouseEventHandlers?this._mouseEventHandlers:[],this._mouseEventHandlers.push(f,h,p),this._mapView.on(i.ViewEventType.mouseUp,f),this._mapView.on(i.ViewEventType.mouseMove,h),this._mapView.on(i.ViewEventType.doubleClick,p)}},{key:"coorTransfomrs",get:function(){return this._coordTransfomrs}}]),t}();t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0);var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=(0,i.defaultValue)(t,{entityGraphic:null,vertexGraphics:[],midVertexGraphics:[],currentVertexIndex:-1,movingLineGraphics:[],selectBoxGraphics:[],selectBoxVertexGraphics:[]}),this.entityGraphic=(0,i.defaultValue)(t.entityGraphic,null),this.vertexGraphics=(0,i.defaultValue)(t.vertexGraphics,[]),this.midVertexGraphics=(0,i.defaultValue)(t.midVertexGraphics,[]),this.currentVertexIndex=(0,i.defaultValue)(t.currentVertexIndex,-1),this.movingLineGraphics=(0,i.defaultValue)(t.movingLineGraphics,[]),this.selectBoxGraphics=(0,i.defaultValue)(t.selectBoxGraphics,[]),this.selectBoxVertexGraphics=(0,i.defaultValue)(t.selectBoxVertexGraphics,[]),this.snapGraphics=(0,i.defaultValue)(t.snapGraphics,[]),this.editMode=(0,i.defaultValue)(t.editMode,0)}return n(e,[{key:"getFeatureById",value:function(e){for(var t=this.getAllFeatures(),r=null,n=0;n<t.length;n++)if(t[n].id===e){r=t[n];break}return r}},{key:"getAllFeatures",value:function(){var e=[];return this.entityGraphic&&(e.push(this.entityGraphic),e=e.concat(this.vertexGraphics).concat(this.midVertexGraphics).concat(this.selectBoxGraphics).concat(this.selectBoxVertexGraphics).concat(this.snapGraphics)),e}},{key:"updateGraphic",value:function(e){var t=this;this.entityGraphic.id===e.id&&(this.entityGraphic=e),this.vertexGraphics.forEach(function(r,n){e.id===r.id&&(t.vertexGraphics[n]=e)}),this.midVertexGraphics.forEach(function(r,n){e.id===r.id&&(t.midVertexGraphics[n]=e)}),this.selectBoxGraphics.forEach(function(r,n){e.id===r.id&&(t.selectBoxGraphics[n]=e)}),this.selectBoxVertexGraphics.forEach(function(r,n){e.id===r.id&&(t.selectBoxVertexGraphics[n]=e)})}},{key:"clone",value:function(){return new e(this.toJSON())}},{key:"toJSON",value:function(){var e={};return e.entityGraphic=this.entityGraphic?this.entityGraphic.clone():void 0,e.vertexGraphics=this.vertexGraphics.map(function(e){return e.clone()}),e.midVertexGraphics=this.midVertexGraphics.map(function(e){return e.clone()}),e.selectBoxGraphics=this.selectBoxGraphics.map(function(e){return e.clone()}),e.selectBoxVertexGraphics=this.selectBoxVertexGraphics.map(function(e){return e.clone()}),e.snapGraphics=this.snapGraphics.map(function(e){return e.clone()}),e.currentVertexIndex=this.currentVertexIndex,e.editMode=this.editMode,e}}]),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(18)),o=r(4),a=function(e){return e&&e.__esModule?e:{default:e}}(r(38)),s=r(1),u=r(0);function l(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}var c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pixelTolerance=(0,u.defaultValue)(t.pixelTolerance,10),this.tolerance=5,this.toleranceSlope=.02,this.isSnapVertex=!1,this.isSnapVertexCoincident=(0,u.defaultValue)(t.isSnapVertexCoincident,!1),this.isSnapVertexInLine=(0,u.defaultValue)(t.isSnapVertexInLine,!1),this.isSnapPerpendicular=(0,u.defaultValue)(t.isSnapPerpendicular,!1),this.isSnapParallel=(0,u.defaultValue)(t.isSnapParallel,!1),this.snapSketchGeometry=(0,u.defaultValue)(t.snapSketchGeometry,!1),this._view=(0,u.defaultValue)(t.view,null)}return n(e,[{key:"setSnapOption",value:function(e){this.pixelTolerance=void 0!==e.pixelTolerance?e.pixelTolerance:this.pixelTolerance,this.isSnapVertexCoincident=void 0!==e.isSnapVertexCoincident?e.isSnapVertexCoincident:this.isSnapVertexCoincident,this.isSnapVertexInLine=void 0!==e.isSnapVertexInLine?e.isSnapVertexInLine:this.isSnapVertexInLine,this.isSnapParallel=void 0!==e.isSnapParallel?e.isSnapParallel:this.isSnapParallel,this.isSnapPerpendicular=void 0!==e.isSnapPerpendicular?e.isSnapPerpendicular:this.isSnapPerpendicular,this.snapSketchGeometry=void 0!==e.snapSketchGeometry?e.snapSketchGeometry:this.snapSketchGeometry}},{key:"snapGeometries",value:function(e,t,r){var n=this,i=void 0,a={},s=[],u=[],c=[],f=[];if(r.forEach(function(r){if(r instanceof o.Polygon)i=r.coordinates[0];else if(r instanceof o.LineString)i=r.coordinates;else if(r instanceof o.Point)i=[r.coordinates];else if(r instanceof o.Extent){var a=r.toPolygon();i=a.coordinates[0]}else if(r instanceof o.Circle){var l=r.toPolygon();i=l.coordinates[0]}i=n._simplifyCoordinates(i);var h=n.drawingSnap(e,t,i);h.coincidentPoint&&s.push(h.coincidentPoint),h.pointInLines&&(u=u.concat(h.pointInLines)),h.parallelLines&&(c=c.concat(h.parallelLines)),h.perpendicularLines&&(f=f.concat(h.perpendicularLines))}),a.coincidentPoint=this._getBestResult(s,e),a.pointInLine=this._getBestResult(u,e),a.parallelLine=this._getBestResult(c,e),a.perpendicularLine=this._getBestResult(f,e),a.pointInLine&&a.parallelLine){var h=this.getLineCrossPoint(a.pointInLine.line,new o.LineString({coordinates:[t.coordinates[0],a.parallelLine.realPoint.coordinates],spatialReference:e.spatialReference}));if(h){if(3===e.coordinates.length){var p=this._getHight();h=new o.Point({coordinates:[].concat(l(h.coordinates),[p]),spatialReference:e.spatialReference})}a.inLineAndParallel={realPoint:h,lines:[a.pointInLine.line,a.parallelLine.line],symbolGeometry:a.parallelLine.symbolGeometry}}}if(a.pointInLine&&a.perpendicularLine){var d=this.getLineCrossPoint(a.pointInLine.line,new o.LineString({coordinates:[t.coordinates[0],a.perpendicularLine.realPoint.coordinates],spatialReference:e.spatialReference}));if(d){if(3===e.coordinates.length){var y=this._getHight();d=new o.Point({coordinates:[].concat(l(d.coordinates),[y]),spatialReference:e.spatialReference})}a.inLineAndPerpendicular={realPoint:d,lines:[a.pointInLine.line,a.perpendicularLine.line],symbolGeometry:a.perpendicularLine.symbolGeometry}}}return a}},{key:"getLineCrossPoint",value:function(e,t){var r=e.coordinates[0][0],n=e.coordinates[0][1],i=e.coordinates[1][0],a=e.coordinates[1][1],s={x:t.coordinates[0][0],y:t.coordinates[0][1]},u={x:t.coordinates[1][0],y:t.coordinates[1][1]},l=((s.x-u.x)*(i*n-r*a)-(r-i)*(u.x*s.y-s.x*u.y))/((s.x-u.x)*(n-a)-(r-i)*(s.y-u.y)),c=((s.y-u.y)*(a*r-n*i)-(n-a)*(u.y*s.x-s.y*u.x))/((s.y-u.y)*(r-i)-(n-a)*(s.x-u.x)),f=void 0;return!isNaN(l)&&!isNaN(c)&&l<=Math.max(s.x,u.x)&&l>=Math.min(s.x,u.x)&&c<=Math.max(s.y,u.y)&&c>=Math.min(s.y,u.y)&&(f=new o.Point({coordinates:[l,c],spatialReference:e.spatialReference})),f}},{key:"drawingSnap",value:function(e,t,r){var n=t.spatialReference,i=this.getSnapGeometryByPointArray(r,n),o={};return this.isSnapVertexCoincident&&i.points&&(o.coincidentPoint=this.pointCoincident(e,i.points,n)),this.isSnapVertexInLine&&i.lines&&(o.coincidentPoint||(o.pointInLines=this.getPointInLines(e,i.lines,n))),"LineString"===t.type&&i.lines&&(this.isSnapParallel&&(o.parallelLines=this.getParallelLine(e,t,i.lines,n)),this.isSnapPerpendicular&&(o.perpendicularLines=this.getPerpendicularLine(e,t,i.lines,n))),o}},{key:"_getBestResult",value:function(e,t){var r=void 0,n=0;return e.forEach(function(e,i){var o=a.default.distance(e.realPoint,t);0===i?(r=e,n=o):o<n&&(n=o,r=e)}),r}},{key:"getSnapGeometryByPointArray",value:function(e,t){var r=[],n=[];return e.forEach(function(i,a){var s=new o.Point({coordinates:i,spatialReference:t});if(r.push(s),a>0){var u=new o.LineString({coordinates:[e[a-1],e[a]],spatialReference:t});n.push(u)}}),{points:r,lines:n}}},{key:"_convertReference",value:function(e){if(e.isWSG48)return e;var t=e.clone();return t=s.Projection.project(t,new o.SpatialReference("EPSG:4326"))}},{key:"pointCoincident",value:function(e,t){for(var r=void 0,n=this._view.toScreen(e),i=0;i<t.length;i++){var a=this._view.toScreen(t[i]);if(Math.sqrt(Math.pow(n.x-a.x,2)+Math.pow(n.y-a.y,2))<=this.pixelTolerance){r=3===e.coordinates.length&&t[i].coordinates.length<3?new o.Point({coordinates:[].concat(l(t[i].coordinates),[this._getHight()]),spatialReference:e.spatialReference}):t[i];break}}return r?{realPoint:r}:void 0}},{key:"getPointInLines",value:function(e,t,r){var n=this,i=[];return t.forEach(function(t){var a=n.getPerpendicularPoint(e,new o.Point({coordinates:t.coordinates[0],spatialReference:r}),new o.Point({coordinates:t.coordinates[1],spatialReference:r}));a&&(t=s.Projection.project(t,r),i.push({line:t,realPoint:a.realPoint,deltaTolerance:a.deltaTolerance}))}),i}},{key:"getPerpendicularPoint",value:function(e,t,r){var n=e.coordinates[0],i=e.coordinates[1],a=t.coordinates[0],s=t.coordinates[1],u=r.coordinates[0],l=r.coordinates[1],c=void 0,f=void 0,h=void 0;if(u!==a){var p=(l-s)/(u-a);h=p*((f=(p*p*a+p*(i-s)+n)/(p*p+1))-a)+s}else f=(t.coordinates[0]+r.coordinates[0])/2,h=e.coordinates[1];if(3===e.coordinates.length){var d=this._getHight();c=new o.Point({coordinates:[f,h,d],spatialReference:e.spatialReference})}else c=new o.Point({coordinates:[f,h],spatialReference:e.spatialReference});var y=this._view.toScreen(c),g=this._view.toScreen(e),v=Math.sqrt(Math.pow(g.x-y.x,2)+Math.pow(g.y-y.y,2));return v<=this.pixelTolerance?{realPoint:c,deltaTolerance:v}:null}},{key:"getParallelLine",value:function(e,t,r,n){var i=this,a=[];return r&&r.length>0&&r.forEach(function(r){var s=new o.Point({coordinates:r.coordinates[0],spatialReference:n}),u=new o.Point({coordinates:r.coordinates[1],spatialReference:n}),l=i.getParallelPoint(e,new o.Point({coordinates:t.coordinates[0],spatialReference:n}),s,u,"parallel");if(l){var c=l.realPoint,f=i._getParallelSymbolGeometry(s,u);a.push({line:r,symbolGeometry:f,realPoint:c,deltaTolerance:l.deltaTolerance})}}),a.length>0?a:void 0}},{key:"getParallelPoint",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"parallel",a=e.spatialReference,s=e.coordinates[0],u=e.coordinates[1],l={x:t.coordinates[0],y:t.coordinates[1]},c=r.coordinates[0],f=r.coordinates[1],h=n.coordinates[0],p=n.coordinates[1],d=Math.sqrt(Math.pow(s-l.x,2)+Math.pow(u-l.y,2)),y=void 0,g=!0,v=void 0,m=void 0;if("parallel"===i?h===c?(g=!1,v=l.x,m=u>l.y?l.y+d:l.y-d):y=(p-f)/(h-c):"perpendicular"===i&&(p===f?(g=!1,m=l.y,v=s>l.x?l.x+d:l.x-d):y=-(h-c)/(p-f)),g){var _=l.y-y*l.x,b=Math.pow(y,2)+1,S=2*((_-l.y)*y-l.x),x=Math.pow(_-l.y,2)+Math.pow(l.x,2)-Math.pow(d,2),w=(-S+Math.sqrt(Math.pow(S,2)-4*b*x))/(2*b),O=(-S-Math.sqrt(Math.pow(S,2)-4*b*x))/(2*b);v=0,m=y*(v=(s-l.x)*(w-l.x)>0?w:O)+_}if(isNaN(v)||isNaN(m))return null;var P=void 0;if(3===e.coordinates.length){var E=this._getHight();P=new o.Point({coordinates:[v,m,E],spatialReference:a})}else P=new o.Point({coordinates:[v,m],spatialReference:a});var k=this._view.toScreen(P),T=this._view.toScreen(e),M=Math.sqrt(Math.pow(T.x-k.x,2)+Math.pow(T.y-k.y,2));return M<=this.pixelTolerance?{realPoint:P,deltaTolerance:M}:null}},{key:"_getHight",value:function(){return 0}},{key:"_getParallelSymbolGeometry",value:function(e,t){var r=this.pixelTolerance/2,n=this._view.toScreen(e),i=this._view.toScreen(t),a={x:.375*(i.x-n.x)+n.x,y:.375*(i.y-n.y)+n.y},s={x:.625*(i.x-n.x)+n.x,y:.625*(i.y-n.y)+n.y},u=void 0,l=void 0,c=void 0,f=void 0;if(s.x===a.x)u={x:a.x+r,y:a.y},l={x:s.x+r,y:s.y},c={x:a.x-r,y:a.y},f={x:s.x-r,y:s.y};else if(s.y===a.y)u={x:a.x,y:a.y+r},l={x:s.x,y:s.y+r},c={x:a.x,y:a.y-r},f={x:s.x,y:s.y-r};else{var h=-(s.x-a.x)/(s.y-a.y),p=Math.atan(h),d=function(e,t,r){return{x:Math.cos(t)*r+e.x,y:Math.sin(t)*r+e.y}};u=d(a,p,r),l=d(s,p,r),c=d(a,p,-r),f=d(s,p,-r)}var y=this._view.toMap(u),g=this._view.toMap(l),v=this._view.toMap(c),m=this._view.toMap(f);return new o.MultiLineString({coordinates:[[y.coordinates,g.coordinates],[v.coordinates,m.coordinates]]})}},{key:"getPerpendicularLine",value:function(e,t,r,n){var i=this,a=[];return r.forEach(function(r){var s=i.getParallelPoint(e,new o.Point({coordinates:t.coordinates[0],spatialReference:n}),new o.Point({coordinates:r.coordinates[0],spatialReference:n}),new o.Point({coordinates:r.coordinates[1],spatialReference:n}),"perpendicular");if(s){var u=s.realPoint;a.push({line:r,realPoint:u,symbolGeometry:void 0,deltaTolerance:s.deltaTolerance})}}),a.length?a:void 0}},{key:"_getPerpendicularPoint",value:function(e,t,r){var n=t.coordinates[0][1]-r*t.coordinates[0][0],i=e.coordinates[1]+1/r*e.coordinates[0],o=(i-n)*r/(r*r+1);return[o,-1/r*o+i]}},{key:"getPerpendicularSymbolGeometry",value:function(e,t,r){var n=[i.point(e.coordinates[0]),i.point(e.coordinates[1])],a=[i.point(t.coordinates[0]),i.point(t.coordinates[1])],s=i.distance(n[0],n[1]),u=i.distance(a[0],a[1]),l=Math.min(s,u)/8;r=i.point(r.coordinates);var c=0;c=a[0].geometry.coordinates[0]===r.geometry.coordinates[0]&&a[0].geometry.coordinates[1]===r.geometry.coordinates[1]?i.rhumbBearing(r,a[1]):i.rhumbBearing(r,a[0]);var f=0,h=((f=n[0].geometry.coordinates[0]===r.geometry.coordinates[0]&&n[0].geometry.coordinates[1]===r.geometry.coordinates[1]?i.rhumbBearing(r,n[1]):i.rhumbBearing(r,n[0]))+c)/2,p=i.rhumbDestination(r,l,f),d=i.rhumbDestination(r,l,c),y=i.rhumbDestination(r,l*Math.sqrt(2),h),g=p.geometry.coordinates,v=d.geometry.coordinates,m=y.geometry.coordinates;return new o.LineString({coordinates:[g,m,v]})}},{key:"getPerpendicularRealPosition",value:function(e,t,r){var n=a.default.distance(t,e),o=i.rhumbBearing(i.point(t.coordinates),i.point(r.currentPoint));return i.rhumbDestination(t,n,o).geometry.coordinates}},{key:"_simplifyCoordinates",value:function(e){for(var t=JSON.parse(JSON.stringify(e)),r=1;r<t.length;r++)t[r][0]===t[r-1][0]&&t[r][1]===t[r-1][1]&&(t.splice(r,1),r--);return t}},{key:"isPolylineCrossPolygon",value:function(){}},{key:"isPolygonCross",value:function(){}}]),e}();t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(r(38));var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,[{key:"unionPolygons",value:function(e){return i.default.union(e)}},{key:"splitPolygonByPolyline",value:function(e,t){return i.default.cut(e,t)}}]),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=r(1);var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._id=(0,i.getGUID)(),this._init()}return n(e,[{key:"_init",value:function(){this.processCollection=[],this._drawProcessCollection=[],this._editProcessCollection=[],this.currentStateIndex=-1,this._editMode=0}},{key:"_initDrawProcess",value:function(){this._drawProcessCollection=[],this.processCollection=[],this.currentStateIndex=-1,this._editMode=0}},{key:"undo",value:function(){return this.canUndo()?(this.currentStateIndex--,this.processCollection[this.currentStateIndex].sketchStage.clone()):null}},{key:"redo",value:function(){return this.canRedo()?(this.currentStateIndex++,this.processCollection[this.currentStateIndex].sketchStage.clone()):null}},{key:"canUndo",value:function(){var e=!1;return this.processCollection.length>1&&this.currentStateIndex>0&&(e=!0),e}},{key:"canRedo",value:function(){var e=!1;return this.processCollection.length>1&&this.currentStateIndex<this.processCollection.length-1&&(e=!0),e}},{key:"addProcess",value:function(e,t,r){t=t.clone(),(r=void 0===r?this._editMode:r)===o.SketchEditMode.DRAWING?this.processCollection=this._drawProcessCollection:this.processCollection=this._editProcessCollection;var n={id:(0,i.getGUID)(),action:e,sketchStage:t,index:this.processCollection.length,editMode:r};this.currentStateIndex===this.processCollection.length-1?this.processCollection.push(n):this.processCollection.splice(this.currentStateIndex+1,this.processCollection.length-(this.currentStateIndex+1),n),this.currentStateIndex=this.processCollection.length-1}},{key:"reset",value:function(){this._init()}},{key:"removeProcessById",value:function(e){var t=this.getProcessById(e);t&&this.processCollection.splice(t.index,1)}},{key:"getProcessById",value:function(e){var t=this.processCollection.filter(function(t){return t.id===e});return t.length>0?t[0]:null}},{key:"_getNextProcess",value:function(){}}]),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),o=r(4),a=r(0),s=f(r(23)),u=(f(r(19)),f(r(22))),l=(r(11),f(r(38))),c=r(56);function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.type="sketchPolylineDrawTool",r._drawTools=[r],r._otherDrawTools=[],r.snapAndReferGeometries=(0,a.defaultValue)(e.snapAndReferGeometries,[]),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),n(t,[{key:"drawFeature",value:function(){var e=this;this._editMode=i.SketchEditMode.DRAWING,this.view._mapActionControl("double-click-zoom",!1),this.view._mapActionControl("video-map-active",!0);var t=!1,r=!1,n=!1,s=null,c=[],f=[];this.vertexNum=0;var h=[],p="",d=null;this.cursorStyle=this.view.cursor,(0,a.isNull)(this.cursorStyle)&&(this.view.cursor="crosshair");var y=this._getInteractiveDom(),g=this.extendOptions&&this.extendOptions.vertexNumber?this.extendOptions.vertexNumber:null;this._setInitSnap(),this._fireStartDrawEvent();var v=function n(c){if(c&&c.x&&c.y)if(e._stopInitSnap(),g&&e.vertexNum===g-1)e.view.on(i.ViewEventType.immediateClick,n);else{clearTimeout(null),e._editMode=i.SketchEditMode.DRAWING;var y={x:c.x,y:c.y},v=null;if(v=d||e.view.toMap({x:y.x,y:y.y}),e.vertexNum++,1===e.vertexNum)f=[v.coordinates],(s=e._getFeature()).geometry.coordinates=[f[0],f[0]];else if(2===e.vertexNum)f=[s.geometry.coordinates[0],v.coordinates],s.geometry.coordinates=f,e._polylineGeometry=s;else{if((f=s.geometry.coordinates)[f.length-1]=v.coordinates,e._sketchEditor.isSimple){var m=new o.LineString({coordinates:f,spatialReference:e._spatialReference});if(!l.default.isSimple(m))return e._fireUnsimpleDraw(),a.Log.info("该坐标构成的几何不符合拓扑规范!")}s.geometry.coordinates=f}"move"===p&&f[f.length-1][0]===f[f.length-2][0]&&f[f.length-1][1]===f[f.length-2][1]&&f.splice(f.length-1);var _=new u.default({view:e.view,layer:e.layer,_parent:e,sketchStyle:e.sketchStyle,elevationInfo:e.elevationInfo});_.addFeature(v,void 0,void 0,e.sketchInnerLayer),e._drawTools.push(_);var b=_.sketchStage.entityGraphic;e.sketchStage.entityGraphic=s,e.sketchStage.vertexGraphics.push(b),s&&(r=t=!0),f.length>1&&h.push(function(e,t){return(e[1]-t[1])/(e[0]-t[0])}(f[f.length-1],f[f.length-2])),p="click",e.fire("drawn-vertex",{geometry:_.sketchStage.entityGraphic.geometry,feature:_.sketchStage.entityGraphic},self),e._fireDrawVertexEvent(s),e.undoRedoManager&&e.undoRedoManager.addProcess("add-vertex",e.sketchStage,e._editMode)}},m=!0,_=function(i){if(i&&i.x&&i.y&&t&&!n){clearTimeout(null),n=!0,e.sketchStage.snapGraphics.length>0&&(e.sketchStage.snapGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.snapGraphics=[]);var o={x:i.x,y:i.y},a=e.view.toMap({x:o.x,y:o.y});s=e.sketchStage.entityGraphic,f=1===e.vertexNum?[s.geometry.coordinates[0]]:s.geometry.coordinates.slice(0,s.geometry.coordinates.length-1),1===e.vertexNum?d=e.getSnapGraphics(a,f):e.vertexNum>1&&(d=e.getSnapGraphics(a,f)),d&&(a=d),e._currentMovePoint=a,1===e.vertexNum?s.geometry.coordinates[1]=a.coordinates:e.vertexNum>1&&(r?(s.geometry.coordinates.push(a.coordinates),r=!1):s.geometry.coordinates[s.geometry.coordinates.length-1]=a.coordinates),s.geometry._pixelCoords=c,s.geometry.coordinates=JSON.parse(JSON.stringify(s.geometry.coordinates)),m&&(e._addFeatureToLayer(s,e.layer),m=!1),n=!1,p="move";var u=e._getInteractiveDom();y=y.concat(u),e._removeInteractiveStyle(u),e._fireChangeCursorEvent(s)}},b=function(){clearTimeout(null),clearTimeout(null),f=[],c=[],e.stop(),e.sketchStage.snapGraphics.length>0&&(e.sketchStage.snapGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.snapGraphics=[]),e._editMode=i.SketchEditMode.NONE,e.view.cursor=e.cursorStyle,e._addInteractiveStyle(y),e.sketchStage.vertexGraphics.forEach(function(t){e._removeFeatureFromLayer(t,e.sketchInnerLayer)}),e.sketchStage.vertexGraphics=[],e._currentMovePoint=void 0,e.undoRedoManager._initDrawProcess(),setTimeout(function(){e.view._mapActionControl("double-click-zoom",!0),e.view._mapActionControl("video-map-active",!1)},0),p="double-click";var t=e._createPolygonFeatureByPolyline(e.sketchStage.entityGraphic.geometry);e._removeFeatureFromMap(e.sketchStage.entityGraphic),e.view.cursor=e.cursorStyle,e._addInteractiveStyle(y),e.fire("drawn",{geometry:t,feature:e.sketchStage.entityGraphic},self),e._fireStopDrawEvent(s)};this._drawEventHandlers.push(v,_,b),this.view.on(i.ViewEventType.immediateClick,v),this.view.on(i.ViewEventType.pointerMove,_),this.view.on(i.ViewEventType.doubleClick,b)}},{key:"_createPolygonFeatureByPolyline",value:function(e){var t=this,r=function(e){var t=JSON.parse(JSON.stringify(e.coordinates));return t.push(t[0]),new o.Polygon({coordinates:[t],spatialReference:e._spatialReference})}(e),n=function(){var r=[];return t.snapAndReferGeometries.forEach(function(n){(n instanceof o.Polygon||n instanceof o.Circle||n instanceof o.Extent)&&(c.TileInfoUtil.isSameSpatialReference(n,t._spatialReference)||(n.spatialReference=t._spatialReference,n=i.Projection.project(n,t._spatialReference)),l.default.intersects(e,n)&&r.push(n))}),r}(),a=l.default.union(n);return!a||a instanceof Array?r:l.default.difference(r,a)}},{key:"_getFeature",value:function(e){e||(e=[[0,0],[1,1]]);var t=new o.LineString({coordinates:e,spatialReference:this._spatialReference}),r=this.sketchStyle.lineStyle.clone();return new i.Feature({geometry:t,symbol:r,elevationInfo:this.elevationInfo})}}]),t}();t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r(175));var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.elevationInfo=(0,i.defaultValue)(e.elevationInfo,new n.ElevationInfo),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),t}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=(r(172),r(96));var o=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.SketchEditorVideoBase),t}();n.Zondy.SketchEditorVideo=o,t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSimpleFillSymbolCanvas=t.createSimpleMarkerSymbolCanvas=void 0;var n=s(r(31)),i=r(3),o=r(0),a=s(r(19));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){t=(0,o.defaultValue)(t,{});var r=(0,o.defaultValue)(t.layerOpacity,1),s=(0,o.defaultValue)(t.lineWidth,10),u=n.default.fromJSON(e),l=document.createElement("canvas"),c=(0,o.defaultValue)(t.size,300);l.width=c,l.height=c;var f=l.getContext("2d"),h=void 0,p=void 0;return e.type===i.SymbolType.simpleMarker?((h=a.default.fromColor(u.color)).alpha*=r,(p=a.default.fromColor(u.outline.color)).alpha*=r,f.fillStyle=h.toCssRGBAString(),f.lineWidth=u.outline.width,f.strokeStyle=p.toCssRGBAString()):((h=a.default.fromColor(u.color)).alpha*=r,f.lineWidth=s,f.strokeStyle=h.toCssRGBAString()),f.beginPath(),{canvas:l,canvasContext:f}}t.createSimpleMarkerSymbolCanvas=function(e){var t=n.default.fromJSON(e),r=u(e),i=r.canvas,o=r.canvasContext;switch(t.style){case"circle":o.arc(150,150,150-t.outline.width,0,2*Math.PI);break;case"cross":o.moveTo(150,0),o.lineTo(150,300),o.stroke(),o.moveTo(0,150),o.lineTo(300,150);break;case"diamond":o.moveTo(140,t.outline.width),o.lineTo(75,150),o.lineTo(140,300-t.outline.width),o.lineTo(160,300-t.outline.width),o.lineTo(225,150),o.lineTo(160,t.outline.width),o.lineTo(140,t.outline.width),o.closePath();break;case"square":o.moveTo(t.outline.width,t.outline.width),o.lineTo(300-t.outline.width,t.outline.width),o.lineTo(300-t.outline.width,300-t.outline.width),o.lineTo(t.outline.width,300-t.outline.width),o.lineTo(t.outline.width,t.outline.width),o.closePath();break;case"triangle":o.moveTo(t.outline.width,300-t.outline.width),o.lineTo(300-t.outline.width,300-t.outline.width),o.lineTo(150,300-Math.sqrt(3)/2*300),o.lineTo(t.outline.width,300-t.outline.width),o.closePath();break;case"x":o.moveTo(t.outline.width,t.outline.width),o.lineTo(300-t.outline.width,300-t.outline.width),o.moveTo(300-t.outline.width,300-t.outline.width),o.moveTo(300-t.outline.width,t.outline.width),o.lineTo(t.outline.width,300-t.outline.width)}return o.stroke(),o.fill(),i},t.createSimpleFillSymbolCanvas=function(e,t){t=(0,o.defaultValue)(t,{});var r=n.default.fromJSON(e),i=u(e,t),a=i.canvas,s=i.canvasContext,l=(0,o.defaultValue)(t.size,300),c=void 0,f=void 0;switch(r.style){case"backward-diagonal":f=l/(c=10);for(var h=0;h<f;h++)s.beginPath(),s.moveTo(c*(h+1)+2,-2),s.lineTo(-2,c*(h+1)+2),s.stroke();for(var p=0;p<f;p++)s.beginPath(),s.moveTo(l+2,c*(p+1)-2),s.lineTo(c*(p+1)-2,l+2),s.stroke();break;case"cross":f=l/(c=7);for(var d=0;d<f;d++)s.beginPath(),s.moveTo(0,d*c+3),s.lineTo(l,d*c+3),s.stroke();for(var y=0;y<f;y++)s.beginPath(),s.moveTo(1+y*c,0),s.lineTo(1+y*c,l),s.stroke();break;case"diagonal-cross":f=l/(c=10);for(var g=0;g<f;g++)s.beginPath(),s.moveTo(c*(g+1)+1,-1),s.lineTo(-1,c*(g+1)+1),s.stroke();for(var v=0;v<f;v++)s.beginPath(),s.moveTo(l+1,c*(v+1)-1),s.lineTo(c*(v+1)-1,301),s.stroke();for(var m=0;m<f;m++)s.beginPath(),s.moveTo(-1,m*c-1),s.lineTo(l+1-m*c,l+1),s.stroke();for(var _=0;_<f;_++)s.beginPath(),s.moveTo(c-1+_*c,-1),s.lineTo(l+1,l-c+1-_*c),s.stroke();break;case"forward-diagonal":f=l/(c=10);for(var b=0;b<f;b++)s.beginPath(),s.moveTo(-1,b*c-1),s.lineTo(l+1-b*c,l+1),s.stroke();for(var S=0;S<f;S++)s.beginPath(),s.moveTo(c-1+S*c,-1),s.lineTo(l+1,l-c+1-S*c),s.stroke();break;case"horizontal":f=l/(c=7);for(var x=0;x<f;x++)s.beginPath(),s.moveTo(0,x*c+5.3),s.lineTo(l,x*c+5.3),s.stroke();break;case"vertical":f=l/(c=7);for(var w=-1;w<f+1;w++)s.beginPath(),s.moveTo(w*c-1,0),s.lineTo(w*c-1,l),s.stroke()}return a}}]);
|