@arcgis/core 4.32.0-next.20241021 → 4.32.0-next.20241023
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/applications/MapViewer/templateUtils.d.ts +4 -0
- package/applications/MapViewer/templateUtils.js +5 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0b7ee57bec7ffac312f2.js +1 -0
- package/assets/esri/core/workers/chunks/{1ba1d9c867ec6a492af9.js → 0f3912bca9fe25eea75c.js} +1 -1
- package/assets/esri/core/workers/chunks/{842ebde78db9bfcaf07b.js → 1678d1d0ecb9b2af69a8.js} +1 -1
- package/assets/esri/core/workers/chunks/1d16ca7791f64dd7c7fb.js +1 -0
- package/assets/esri/core/workers/chunks/1d4be734ff961e313257.js +1 -0
- package/assets/esri/core/workers/chunks/{b292758308dfac4ba8ee.js → 2d8aa31dc96bbd014036.js} +1 -1
- package/assets/esri/core/workers/chunks/{53f648321c5fde26bfe4.js → 319e06888467f9f460ab.js} +1 -1
- package/assets/esri/core/workers/chunks/33cae7ece52a77394b05.js +1 -0
- package/assets/esri/core/workers/chunks/{210a954f5299fe105e0b.js → 539060ffb7f230fb1bd0.js} +1 -1
- package/assets/esri/core/workers/chunks/545441dcc8e915e63ff1.js +1 -0
- package/assets/esri/core/workers/chunks/{303f39b9b7bd33109df8.js → 587df97288a83721d251.js} +1 -1
- package/assets/esri/core/workers/chunks/5caa02a7a85d05e253b4.js +1 -0
- package/assets/esri/core/workers/chunks/5cfecb320e1dcd258b2e.js +1 -0
- package/assets/esri/core/workers/chunks/67018ef25736f0722f6e.js +1 -0
- package/assets/esri/core/workers/chunks/89f74819ac1b5884c149.js +1 -0
- package/assets/esri/core/workers/chunks/92b2d81ef16877341f97.js +1 -0
- package/assets/esri/core/workers/chunks/{e6e77cbdeb99d90caad1.js → 97f62fad6d416a666319.js} +1 -1
- package/assets/esri/core/workers/chunks/98c1956b2e27058c8a51.js +1 -0
- package/assets/esri/core/workers/chunks/9c8a910b6261a4d5da77.js +1 -0
- package/assets/esri/core/workers/chunks/ab6eaa3ae2e233f91a5e.js +1 -0
- package/assets/esri/core/workers/chunks/{63719f892a7d1025c7d3.js → b42c1ab7579a3c464f72.js} +1 -1
- package/assets/esri/core/workers/chunks/{03eba36affe6ed1f5a11.js → bc4ef18d0a02354186e3.js} +7 -7
- package/assets/esri/core/workers/chunks/{c71304c88fce556340ef.js → c859f73b57a764e99b02.js} +1 -1
- package/assets/esri/core/workers/chunks/cb3038ec3ef0d86bf2a0.js +1 -0
- package/assets/esri/core/workers/chunks/{ae20ca2008a2ea6a46b2.js → d8f4bd2b4366388f8a28.js} +1 -1
- package/assets/esri/core/workers/chunks/e71fa25ed45bae5a1adb.js +320 -0
- package/assets/esri/core/workers/chunks/{9c9a8a529494c6d1dfa3.js → ec9d5af8887854e821c8.js} +1 -1
- package/assets/esri/libs/parquet/pkg/arcgis_parquet_bg.wasm +0 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +14 -0
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +1 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/Bufferer-BhkgvSV4.js +5 -0
- package/chunks/{Distance2DCalculator-DM4OojiI.js → Distance2DCalculator-BX0Ep7eP.js} +1 -1
- package/chunks/{GeodeticDistanceCalculator-DzvUOSaR.js → GeodeticDistanceCalculator-B5uO-Y_z.js} +1 -1
- package/chunks/OperatorCrosses.js +5 -0
- package/chunks/OperatorCut.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
- package/chunks/OperatorGeodeticDistance.js +1 -1
- package/chunks/OperatorGeodeticLength.js +1 -1
- package/chunks/OperatorIntersects.js +5 -0
- package/chunks/OperatorMultiPartToSinglePart.js +1 -1
- package/chunks/OperatorOverlaps.js +5 -0
- package/chunks/OperatorProximity.js +1 -1
- package/chunks/OperatorProximityGeodesic.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +1 -1
- package/chunks/OperatorTouches.js +5 -0
- package/chunks/OperatorWithin.js +5 -0
- package/chunks/QuadraticBezier.js +1 -1
- package/chunks/SSAOBlur.glsl.js +5 -5
- package/chunks/SideCalculator2D-CoWc8Oe3.js +1 -1
- package/chunks/Transformation2D.js +1 -1
- package/core/MemCache.js +1 -1
- package/core/MemCachePool.js +1 -1
- package/core/unitUtils.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/operators/affineTransformOperator.js +1 -1
- package/geometry/operators/alphaShapeOperator.js +1 -1
- package/geometry/operators/areaOperator.js +1 -1
- package/geometry/operators/autoCompleteOperator.js +1 -1
- package/geometry/operators/boundaryOperator.js +1 -1
- package/geometry/operators/bufferOperator.js +1 -1
- package/geometry/operators/centroidOperator.js +1 -1
- package/geometry/operators/clipOperator.js +1 -1
- package/geometry/operators/containsOperator.js +1 -1
- package/geometry/operators/convexHullOperator.js +1 -1
- package/geometry/operators/crossesOperator.js +1 -1
- package/geometry/operators/cutOperator.js +1 -1
- package/geometry/operators/densifyOperator.js +1 -1
- package/geometry/operators/differenceOperator.js +1 -1
- package/geometry/operators/disjointOperator.js +1 -1
- package/geometry/operators/distanceOperator.js +1 -1
- package/geometry/operators/equalsOperator.js +1 -1
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/generalizeOperator.js +1 -1
- package/geometry/operators/geodesicBufferOperator.js +1 -1
- package/geometry/operators/geodesicProximityOperator.js +1 -1
- package/geometry/operators/geodeticAreaOperator.js +1 -1
- package/geometry/operators/geodeticDensifyOperator.js +1 -1
- package/geometry/operators/geodeticDistanceOperator.js +1 -1
- package/geometry/operators/geodeticLengthOperator.js +1 -1
- package/geometry/operators/graphicBufferOperator.js +1 -1
- package/geometry/operators/gx/operatorAlphaShape.js +1 -1
- package/geometry/operators/gx/operatorAutoComplete.js +1 -1
- package/geometry/operators/gx/operatorBoundary.js +1 -1
- package/geometry/operators/gx/operatorBuffer.js +1 -1
- package/geometry/operators/gx/operatorConvexHull.js +1 -1
- package/geometry/operators/gx/operatorDifference.js +1 -1
- package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
- package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
- package/geometry/operators/gx/operatorGeodeticDensify.js +1 -1
- package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
- package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
- package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
- package/geometry/operators/gx/operatorIntegrate.js +1 -1
- package/geometry/operators/gx/operatorIntersection.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +1 -1
- package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
- package/geometry/operators/gx/operatorLocateBetween.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
- package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
- package/geometry/operators/gx/operatorProject.js +1 -1
- package/geometry/operators/gx/operatorProximityGeodesic.js +1 -1
- package/geometry/operators/gx/operatorSimplify.js +1 -1
- package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
- package/geometry/operators/gx/operatorUnion.js +1 -1
- package/geometry/operators/integrateOperator.js +1 -1
- package/geometry/operators/intersectionOperator.js +1 -1
- package/geometry/operators/intersectsOperator.js +1 -1
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/json/containsOperator.js +5 -0
- package/geometry/operators/json/crossesOperator.js +5 -0
- package/geometry/operators/json/disjointOperator.js +5 -0
- package/geometry/operators/json/intersectsOperator.js +5 -0
- package/geometry/operators/json/offsetOperator.js +5 -0
- package/geometry/operators/json/overlapsOperator.js +5 -0
- package/geometry/operators/json/touchesOperator.js +5 -0
- package/geometry/operators/json/withinOperator.js +5 -0
- package/geometry/operators/labelPointOperator.js +1 -1
- package/geometry/operators/lengthOperator.js +1 -1
- package/geometry/operators/linesToPolygonsOperator.js +1 -1
- package/geometry/operators/locateBetweenOperator.js +1 -1
- package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
- package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
- package/geometry/operators/offsetOperator.js +1 -1
- package/geometry/operators/overlapsOperator.js +1 -1
- package/geometry/operators/polygonOverlayOperator.js +1 -1
- package/geometry/operators/polygonSlicerOperator.js +1 -1
- package/geometry/operators/projectOperator.js +1 -1
- package/geometry/operators/proximityOperator.js +1 -1
- package/geometry/operators/relateOperator.js +1 -1
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/simplifyOperator.js +1 -1
- package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
- package/geometry/operators/support/apiConverter.js +5 -0
- package/geometry/operators/support/initNoPeFactory.js +5 -0
- package/geometry/operators/support/jsonConverter.js +5 -0
- package/geometry/operators/support/proximityResult.js +1 -1
- package/geometry/operators/symmetricDifferenceOperator.js +1 -1
- package/geometry/operators/touchesOperator.js +1 -1
- package/geometry/operators/unionOperator.js +1 -1
- package/geometry/operators/withinOperator.js +1 -1
- package/geometry/support/MeshVertexAttributes.js +1 -1
- package/interfaces.d.ts +134 -0
- package/layers/LinkChartLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/OptimizedGeometry.js +1 -1
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/knowledgeGraph/supportUtils.js +1 -1
- package/layers/support/ElevationQueryTileCache.js +1 -1
- package/layers/support/ElevationTileData.js +1 -1
- package/layers/support/mediaUtils.js +1 -1
- package/layers/support/parquetLayerUtils.js +1 -1
- package/layers/support/rasterFunctions/ClipFunction.js +1 -1
- package/layers/support/rasterFunctions/clipUtils.js +1 -1
- package/layers/support/rasterFunctions/localUtils.js +1 -1
- package/libs/parquet/parquet.js +1 -1
- package/linkChart/LinkChartProperties.js +1 -1
- package/package.json +1 -1
- package/smartMapping/raster/renderers/classBreaks.js +1 -1
- package/smartMapping/raster/renderers/rgb.js +1 -1
- package/smartMapping/raster/renderers/stretch.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
- package/smartMapping/raster/support/adapters/RasterLayerAdapter.js +1 -1
- package/smartMapping/renderers/support/rendererUtils.d.ts +4 -0
- package/support/revision.js +1 -1
- package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
- package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
- package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
- package/views/2d/grid/GridView2D.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/glTF/loader.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
- package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/CachedMeshData.js +5 -0
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/FovController.js +1 -1
- package/views/3d/support/buffer/InterleavedLayout.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileTexture.js +1 -1
- package/views/3d/webgl/ManagedFBO.js +1 -1
- package/views/3d/webgl/ManagedFBOAttachment.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOPool.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/materials/ProceduralTextureRepository.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/SSAOBlur.glsl.js +1 -1
- package/views/input/BrowserEventSource.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/VertexArrayObject.js +1 -1
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/widgets/Attribution/AttributionViewModel.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/ElevationProfile/support/ElevationProfileView2D.js +1 -1
- package/widgets/ElevationProfile/support/ProfileLine2D.js +5 -0
- package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
- package/widgets/ElevationProfile/support/constants.js +1 -1
- package/widgets/ElevationProfile/support/visualizationUtils.js +5 -0
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/support/columnUtils.js +1 -1
- package/widgets/FeatureTable/support/tableUtils.js +1 -1
- package/widgets/FeatureTable/support/templateUtils.js +5 -0
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
- package/widgets/support/GridControls.js +1 -1
- package/assets/esri/core/workers/chunks/03d0394fff1463c224f9.js +0 -1
- package/assets/esri/core/workers/chunks/0c40cac18711f79f0a7d.js +0 -1
- package/assets/esri/core/workers/chunks/1a97f98facfc62a9fc69.js +0 -1
- package/assets/esri/core/workers/chunks/1e3ed3ee48c2977cff6f.js +0 -1
- package/assets/esri/core/workers/chunks/1fc064e37d030e449d5e.js +0 -1
- package/assets/esri/core/workers/chunks/4daab36de5efa03a8cbb.js +0 -1
- package/assets/esri/core/workers/chunks/77d129134c2a66cd86d8.js +0 -1
- package/assets/esri/core/workers/chunks/88bd9e023764da377aa7.js +0 -1
- package/assets/esri/core/workers/chunks/92ce57cb12d9a7a3699e.js +0 -1
- package/assets/esri/core/workers/chunks/a5675c989d00b7400f98.js +0 -1
- package/assets/esri/core/workers/chunks/c06c5c815b5e37717fa1.js +0 -1
- package/assets/esri/core/workers/chunks/ca1385e165aae8a32ca2.js +0 -1
- package/assets/esri/core/workers/chunks/ce8c1208916f54af7e68.js +0 -320
- package/assets/esri/core/workers/chunks/df51c93b2dbcc89efc23.js +0 -1
- package/assets/esri/core/workers/chunks/efa3c919261672871f2f.js +0 -1
- package/chunks/Bufferer-fr1_Nc47.js +0 -5
- package/geometry/operators/support/converterAPI.js +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6126,7136],{66344:(e,t,s)=>{s.d(t,{q:()=>u});var i,n,r=s(3694);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.A,this._users=new r.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,i.ALL);const u=1+Math.max(r,-4)- -3;this._db.set(t,new a(s,n,u)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,n,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i,s);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class a{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}class u{constructor(e,t){this._storage=new o,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},67482:(e,t,s)=>{function i(e){return null!=a(e)||null!=o(e)}function n(e){return u.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let s=!0;if(h&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,i=0;for(;!t&&i<=e.length;)t=!l.test(e[i]),i++;s=!t}}return s}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=u.exec(e);if(!t?.groups)return null;const s=t.groups,i=+s.year,n=+s.month-1,r=+s.day,o=+(s.hours??"0"),a=+(s.minutes??"0"),l=+(s.seconds??"0");if(o>23)return null;if(a>59)return null;if(l>59)return null;const h=s.ms??"0",d=h?+h.padEnd(3,"0").slice(0,3):0;let c;if(s.isUTC||!s.offsetSign)c=Date.UTC(i,n,r,o,a,l,d);else{const e=+s.offsetHours,t=+s.offsetMinutes;c=6e4*("+"===s.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,n,r,o,a,l,d)}return Number.isNaN(c)?null:c}s.d(t,{Br:()=>n,Cq:()=>i,_U:()=>r});const u=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,l=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,h=!Number.isNaN(new Date("technology 10").getTime())},75503:(e,t,s)=>{s.d(t,{E:()=>B,w:()=>o});var i=s(4576),n=(s(44208),s(3694)),r=s(11006);class o{constructor(e=9,t){this._compareMinX=d,this._compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),I.prune(),S.prune(),F.prune()}all(e){a(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(_(e,s))for(b.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;_(e,o)&&(s.leaf?t(r):g(e,o)?a(r,t):b.push(r))}s=b.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!_(e,t))return!1;for(b.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(_(e,r)){if(t.leaf||g(e,r))return!0;b.push(n)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new M([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(S.clear(),F.clear();s||S.length>0;){if(s||(s=S.pop(),n=S.data[S.length-1],r=F.pop()??0,o=!0),s.leaf&&(t=(0,i.qh)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),S.push(s),this._condense(S),this;o||s.leaf||!g(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(S.push(s),F.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new M(e.slice(t,s+1));return u(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new v([]);o.height=i;const a=Math.ceil(n/r),l=a*Math.ceil(Math.sqrt(r));x(e,t,s,l,this._compareMinX);for(let n=t;n<=s;n+=l){const t=Math.min(n+l-1,s);x(e,n,t,a,this._compareMinY);for(let s=n;s<=t;s+=a){const n=Math.min(s+a-1,t);o.children.push(this._build(e,s,n,i-1))}}return u(o,this._toBBox),o}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);S.clear();const r=function(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=p(o),u=m(e,o)-a;u<n?(n=u,i=a<i?a:i,s=o):u===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}(n,this._data,t,S);for(r.children.push(e),h(r,n);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;!function(e,t,s){for(let i=s;i>=0;i--)h(t.data[i],e)}(n,S,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return;const o=s.children.splice(r,s.children.length-r),a=s.leaf?new M(o):new v(o);a.height=s.height,u(s,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new v([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=l(e,0,o,this._toBBox),a=l(e,o,s,this._toBBox),u=y(t,a),h=p(t)+p(a);u<i?(i=u,r=o,n=h<n?h:n):u===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:d,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=l(e,0,t,n),o=l(e,s-t,s,n);let a=f(r)+f(o);for(let i=t;i<s-t;i++){const t=e.children[i];h(r,e.leaf?n(t):t),a+=f(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];h(o,e.leaf?n(t):t),a+=f(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.qh)(r,s,r.length,n.indexHint),1)}else this.clear();else u(s,this._toBBox)}}_initFormat(e){const 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]+"};")}}function a(e,t){let s=e;for(I.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else I.pushArray(s.children);s=I.pop()??null}}function u(e,t){l(e,0,e.children.length,t,e)}function l(e,t,s,i,n){n||(n=new M([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],h(n,e.leaf?i(r):r);return n}function h(e,t){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)}function d(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const b=new n.A,I=new n.A,S=new n.A,F=new n.A({deallocator:void 0});class B{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends B{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class M extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class v extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},36708:(e,t,s)=>{s.d(t,{C_:()=>c,OH:()=>m,Vh:()=>y,on:()=>d,pc:()=>g,wB:()=>u,z7:()=>l}),s(60999),s(5503);var i=s(37955),n=s(36563),r=s(97768),o=s(74887),a=s(14012);function u(e,t,s={}){return h(e,t,s,p)}function l(e,t,s={}){return h(e,t,s,f)}function h(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.xt)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function d(e,t,s,o={}){let a=null,l=null,h=null;function d(){a&&l&&(l.remove(),o.onListenerRemove?.(a),a=null,l=null)}function c(e){o.once&&o.once&&(0,r.xt)(h),s(e)}const p=u(e,((e,s)=>{d(),(0,i.wb)(e)&&(a=e,l=(0,i.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,n.hA)((()=>{p.remove(),d()})),h}function c(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function u(){a=(0,r.xt)(a)}return new Promise(((i,r)=>{a=(0,n.vE)([(0,o.u7)(s,(()=>{u(),r((0,o.NK)())})),h(e,(e=>{u(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,f,t)}function p(e){return!0}function f(e){return!!e}s(80559);const m={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},17136:(e,t,s)=>{s.d(t,{el:()=>S});var i=s(92602),n=s(49186),r=s(53966),o=s(39829),a=s(82799),u=s(80754),l=s(21325),h=s(28735),d=(s(59456),s(78888)),c=s(65864),p=s(2272),f=s(84952),m=s(92300);const y=()=>r.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new n.A(e)}const s=(0,u.r8)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],u=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),l=(a-r)/u,h=(o-n)/u,d=u/t;if(d>1){for(let e=1;e<=d-1;e++){const i=e*t,o=h*i+n,a=l*i+r;s.push([o,a])}const e=(u+Math.floor(d-1)*t)/2,i=h*e+n,o=l*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,h.ci)(t,!0)}return s&&(e=(0,u.kS)(e,s)),e}function b(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,u.kd)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,u.kd)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,u.kd)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,u.kd)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function I(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=(0,u.r8)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,u.kd)(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(g(e))for(const t of(0,u.r8)(r))e[n]=e[n].addRing(t);else if(_(e))for(const t of(0,u.r8)(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function S(e,t,s){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let r,g,_,F,B,A,M,v,T=0;const w=[],R=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,g=(0,l.Vp)(r),_=r.isWebMercator,A=_?102100:4326,F=u.j7[A].maxX,B=u.j7[A].minX,M=u.j7[A].plus180Line,v=u.j7[A].minus180Line),g)if("mesh"===t.type)R.push(t);else if("point"===t.type)R.push(b(t.clone(),F,B));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,F,B))),R.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);R.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,s=(0,u.kd)(e.xmin,B)*(2*F);let i=0===s?t.clone():(0,u.kS)(t.clone(),s);e.offset(s,0);let{xmin:n,xmax:r}=e;n=Number(n.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(M)&&r!==F?(T=r>T?r:T,i=x(i,_),w.push(i),R.push("cut")):e.intersects(v)&&n!==B?(T=r*(2*F)>T?r*(2*F):T,i=x(i,_,360),w.push(i),R.push("cut")):R.push(i)}else R.push(t.clone());else R.push(t);else R.push(t);let z=(0,u.kd)(T,F),E=-90;const C=z,j=new a.A;for(;z>0;){const e=360*z-180;j.addPath([[e,E],[e,-1*E]]),E*=-1,z--}if(w.length>0&&C>0){const t=I(w,await async function(e,t,s,i){const n=(0,p.Dl)(e),r=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,l.YX)(r),target:JSON.stringify({geometryType:(0,c.$B)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,d.A)(n.path+"/cut",o),{cutIndexes:u,geometries:h=[]}=a.data;return{cutIndexes:u,geometries:h.map((e=>{const t=(0,c.rS)(e);return t.spatialReference=r,t}))}}(n,w,j,s)),i=[],r=[];for(let s=0;s<R.length;s++){const n=R[s];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(_?(0,h.Gh)(n):n)}}if(!i.length)return r;const o=await async function(e,t,s){const i="string"==typeof e?(0,f.An)(e):e,n=t[0].spatialReference,r=(0,c.$B)(t[0]),o={...s,query:{...i.query,f:"json",sr:(0,l.YX)(n),geometries:JSON.stringify((0,m.X)(t))}},{data:a}=await(0,d.A)(i.path+"/simplify",o);return(0,m.V)(a.geometries,r,n)}(n,i,s),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(_?(0,h.Gh)(o.shift()):o.shift())}return a}const q=[];for(let e=0;e<R.length;e++){const t=R[e];if("cut"!==t)q.push(t);else{const e=w.shift();q.push(!0===_?(0,h.Gh)(e):e)}}return q}},80754:(e,t,s)=>{s.d(t,{j7:()=>o,kS:()=>u,kd:()=>a,r8:()=>l});var i=s(82799),n=s(16930),r=s(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){const s=l(e);for(const e of s)for(const s of e)s[0]+=t;return e}function l(e){return(0,r.Bi)(e)?e.rings:e.paths}},43334:(e,t,s)=>{s.d(t,{N3:()=>r,Om:()=>n});var i=s(92722);class n{constructor(e=null,t={},s,i){this.geometry=e,this.attributes=t,this.centroid=s,this.objectId=i,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const s=e.geometry?i.A.fromJSON(e.geometry):null,r=e.centroid?i.A.fromJSON(e.centroid):null,o=e.attributes[t];return new n(s,e.attributes,r,o)}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new n(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function r(e){return!!e.geometry?.coords?.length}},58512:(e,t,s)=>{s.d(t,{A:()=>i});class i{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new i;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,s)=>{s.d(t,{A:()=>i});class i{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new i(e.lengths,e.coords)}static fromRect(e){const[t,s,n,r]=e,o=n-t,a=r-s;return new i([5],[t,s,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let s=0;s<this.lengths.length;s++){const i=this.lengths[s];for(let s=0;s<i;s++)e(this.coords[2*(s+t)],this.coords[2*(s+t)+1]);t+=i}}deltaDecode(){const e=this.clone(),{coords:t,lengths:s}=e;let i=0;for(const e of s){for(let s=1;s<e;s++)t[2*(i+s)]+=t[2*(i+s)-2],t[2*(i+s)+1]+=t[2*(i+s)-1];i+=e}return e}clone(e){if(0===this.lengths.length)return new i([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),s=this.coords.slice(0,t);return e?(e.set(s),new i(this.lengths,e)):new i(Array.from(this.lengths),Array.from(s))}}},6518:(e,t,s)=>{s.d(t,{F:()=>a});var i=s(44208),n=s(75503),r=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,s)=>{s.d(t,{A:()=>f});var i=s(4576),n=s(49186),r=s(65529),o=s(53966),a=s(70328),u=s(19419),l=s(90708),h=s(6518),d=s(51441),c=s(37730);const p=(0,a.vt)();class f{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this.events=new r.A,this.featureAdapter=c.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,d.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Jt)(p,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,l.jQ)(null!=i?i:(0,u.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,l.jQ)((0,u.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),e}}},37730:(e,t,s)=>{s.d(t,{T:()=>o});var i=s(27647),n=s(43334),r=s(92722);const o={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new n.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,i.Q)(new r.A,e.geometry,t.hasZ,t.hasM)),e.centroid)}},33032:(e,t,s)=>{s.d(t,{H:()=>n,L:()=>i});const i=1;function n(e,t){let s=0;for(const i of t){const t=i.attributes?.[e];"number"==typeof t&&isFinite(t)&&(s=Math.max(s,t))}return s}},29432:(e,t,s)=>{s.r(t),s.d(t,{default:()=>S});var i=s(49186),n=s(65864),r=s(21325),o=s(90708),a=s(33032),u=s(83221),l=s(31464),h=s(88856),d=s(64714),c=s(82832),p=s(95466),f=s(98453),m=s(30524),y=s(56400);const g=r.KK,_={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:r.KK},x={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0,supportsQueryWithCacheHint:!0}};function b(e){return(0,n.fT)(e)?null!=e.z:!!e.hasZ}function I(e){return(0,n.fT)(e)?null!=e.m:!!e.hasM}class S{constructor(){this._queryEngine=null,this._nextObjectId=null}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e){const t=[],{features:s}=e,n=this._inferLayerProperties(s,e.fields),r=e.fields||[],o=null!=e.hasM?e.hasM:!!n.hasM,c=null!=e.hasZ?e.hasZ:!!n.hasZ,b=!e.spatialReference&&!n.spatialReference,I=b?g:e.spatialReference||n.spatialReference,S=b?_:null,F=e.geometryType||n.geometryType,B=!F;let A=e.objectIdField||n.objectIdField,M=e.timeInfo;const v=new p.A(r);if(!B&&(b&&t.push({name:"feature-layer:spatial-reference-not-found",message:"Spatial reference not provided or found in features. Defaults to WGS84"}),!F))throw new i.A("feature-layer:missing-property","geometryType not set and couldn't be inferred from the provided features");if(!A)throw new i.A("feature-layer:missing-property","objectIdField not set and couldn't be found in the provided fields");if(n.objectIdField&&A!==n.objectIdField&&(t.push({name:"feature-layer:duplicated-oid-field",message:`Provided objectIdField "${A}" doesn't match the field name "${n.objectIdField}", found in the provided fields`}),A=n.objectIdField),A&&!n.objectIdField){const e=v.get(A);e?(A=e.name,e.type="esriFieldTypeOID",e.editable=!1,e.nullable=!1):r.unshift({alias:A,name:A,type:"esriFieldTypeOID",editable:!1,nullable:!1})}for(const e of r){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new i.A("feature-layer:invalid-field-name","field name is missing",{field:e});if(e.name===A&&(e.type="esriFieldTypeOID"),!f.m.jsonValues.includes(e.type))throw new i.A("feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});null==e.length&&(e.length=(0,m._b)(e))}const T={};for(const e of r)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,m.lD)(e);void 0!==t&&(T[e.name]=t)}if(M){if(M.startTimeField){const e=v.get(M.startTimeField);e?(M.startTimeField=e.name,e.type="esriFieldTypeDate"):M.startTimeField=null}if(M.endTimeField){const e=v.get(M.endTimeField);e?(M.endTimeField=e.name,e.type="esriFieldTypeDate"):M.endTimeField=null}if(M.trackIdField){const e=v.get(M.trackIdField);e?M.trackIdField=e.name:(M.trackIdField=null,t.push({name:"feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:M}}))}M.startTimeField||M.endTimeField||(t.push({name:"feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing or invalid",details:{timeInfo:M}}),M=null)}const w=v.dateFields.length?{timeZoneIANA:e.dateFieldsTimeZone??y.n$}:null;this._createDefaultAttributes=(0,d.Vx)(T,A);const R={warnings:t,featureErrors:[],layerDefinition:{...x,drawingInfo:(0,d.F0)(F),templates:(0,d.e2)(T),extent:S,geometryType:F,objectIdField:A,fields:r,hasZ:c,hasM:o,timeInfo:M,dateFieldsTimeReference:w},assignedObjectIds:{}};if(this._queryEngine=new h.d({fieldsIndex:p.A.fromLayerJSON({fields:r,timeInfo:M,dateFieldsTimeReference:w}),geometryType:F,hasM:o,hasZ:c,objectIdField:A,spatialReference:I,featureStore:new u.A({geometryType:F,hasM:o,hasZ:c}),timeInfo:M}),!s?.length)return this._nextObjectId=a.L,R;const z=(0,a.H)(A,s);return this._nextObjectId=z+1,await(0,l.Nk)(s,I),this._loadInitialFeatures(R,s)}async applyEdits(e){const{spatialReference:t,geometryType:s}=this._queryEngine;return await Promise.all([(0,c.$1)(t,s),(0,l.Nk)(e.adds,t),(0,l.Nk)(e.updates,t)]),this._applyEdits(e)}queryFeatures(e,t={}){return this._queryEngine.executeQuery(e,t.signal)}queryFeatureCount(e,t={}){return this._queryEngine.executeQueryForCount(e,t.signal)}queryObjectIds(e,t={}){return this._queryEngine.executeQueryForIds(e,t.signal)}queryExtent(e,t={}){return this._queryEngine.executeQueryForExtent(e,t.signal)}querySnapping(e,t={}){return this._queryEngine.executeQueryForSnapping(e,t.signal)}_inferLayerProperties(e,t){let s,i,r=null,o=null,a=null;for(const t of e){const e=t.geometry;if(null!=e&&(r||(r=(0,n.$B)(e)),o||(o=e.spatialReference),null==s&&(s=b(e)),null==i&&(i=I(e)),r&&o&&null!=s&&null!=i))break}if(t&&t.length){let e=null;t.some((t=>{const s="esriFieldTypeOID"===t.type,i=!t.type&&t.name&&"objectid"===t.name.toLowerCase();return e=t,s||i}))&&(a=e.name)}return{geometryType:r,spatialReference:o,objectIdField:a,hasM:i,hasZ:s}}async _loadInitialFeatures(e,t){const{geometryType:s,hasM:i,hasZ:r,objectIdField:a,spatialReference:u,featureStore:h,fieldsIndex:d}=this._queryEngine,p=[];for(const i of t){if(null!=i.uid&&(e.assignedObjectIds[i.uid]=-1),i.geometry&&s!==(0,n.$B)(i.geometry)){e.featureErrors.push((0,c.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=(0,c.MB)(d,t,i.attributes,!0);r?e.featureErrors.push(r):(this._assignObjectId(t,i.attributes,!0),i.attributes=t,null!=i.uid&&(e.assignedObjectIds[i.uid]=i.attributes[a]),null!=i.geometry&&(i.geometry=(0,l.Cv)(i.geometry,i.geometry.spatialReference,u)),p.push(i))}h.addMany((0,o.Di)([],p,s,r,i,a));const{fullExtent:f,timeExtent:m}=await this._queryEngine.fetchRecomputedExtents();if(e.layerDefinition.extent=f,m){const{start:t,end:s}=m;e.layerDefinition.timeInfo.timeExtent=[t,s]}return e}async _applyEdits(e){const{adds:t,updates:s,deletes:i}=e,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(n,t),s?.length&&this._applyUpdateEdits(n,s),i?.length){for(const e of i)n.deleteResults.push((0,c.bP)(e));this._queryEngine.featureStore.removeManyById(i)}const{fullExtent:r,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:r,timeExtent:o,featureEditResults:n}}_applyAddEdits(e,t){const{addResults:s}=e,{geometryType:i,hasM:r,hasZ:a,objectIdField:u,spatialReference:h,featureStore:d,fieldsIndex:p}=this._queryEngine,f=[];for(const r of t){if(r.geometry&&i!==(0,n.$B)(r.geometry)){s.push((0,c.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),o=(0,c.MB)(p,t,r.attributes);if(o)s.push(o);else{if(this._assignObjectId(t,r.attributes),r.attributes=t,null!=r.uid){const t=r.attributes[u];e.uidToObjectId[r.uid]=t}if(null!=r.geometry){const e=r.geometry.spatialReference??h;r.geometry=(0,l.Cv)((0,c.CR)(r.geometry,e),e,h)}f.push(r),s.push((0,c.bP)(r.attributes[u]))}}d.addMany((0,o.Di)([],f,i,a,r,u))}_applyUpdateEdits({updateResults:e},t){const{geometryType:s,hasM:i,hasZ:r,objectIdField:a,spatialReference:u,featureStore:h,fieldsIndex:d}=this._queryEngine;for(const p of t){const{attributes:t,geometry:f}=p,m=t?.[a];if(null==m){e.push((0,c.Yx)(`Identifier field ${a} missing`));continue}if(!h.has(m)){e.push((0,c.Yx)(`Feature with object id ${m} missing`));continue}const y=(0,o.oN)(h.getFeature(m),s,r,i);if(null!=f){if(s!==(0,n.$B)(f)){e.push((0,c.Yx)("Incorrect geometry type."));continue}const t=f.spatialReference??u;y.geometry=(0,l.Cv)((0,c.CR)(f,t),t,u)}if(t){const s=(0,c.MB)(d,y.attributes,t);if(s){e.push(s);continue}}h.add((0,o.E2)(y,s,r,i,a)),e.push((0,c.bP)(m))}}_assignObjectId(e,t,s=!1){const i=this._queryEngine.objectIdField;s&&t&&isFinite(t[i])?e[i]=t[i]:e[i]=this._nextObjectId++}}},64714:(e,t,s)=>{s.d(t,{F0:()=>u,Vx:()=>d,e2:()=>p,f:()=>f});var i=s(44208),n=s(4718),r=s(99352),o=s(4071),a=s(93470);function u(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function d(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this${c(t)} = null;`;for(const t in e)s+=`this${c(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[t]:null,...e})}}function c(e){return l.test(e)?`.${e}`:`["${e}"]`}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832:(e,t,s)=>{s.d(t,{$1:()=>y,CR:()=>m,MB:()=>c,Yx:()=>u,bP:()=>h});var i=s(67482),n=s(21325),r=s(30524);class o{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function u(e){return new a(e)}class l{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function h(e){return new l(e)}const d=new Set;function c(e,t,s,i=!1){d.clear();for(const n in s){const o=e.get(n);if(!o)continue;const a=p(o,s[n]);if(d.add(o.name),o&&(i||o.editable)){const e=(0,r.CJ)(o,a);if(e)return u((0,r.uo)(e,o,a));t[o.name]=a}}for(const t of e.requiredFields??[])if(!d.has(t.name))return u(`missing required field "${t.name}"`);return null}function p(e,t){let s=t;return(0,r.WA)(e)&&"string"==typeof t?s=parseFloat(t):(0,r.yM)(e)&&null!=t&&"string"!=typeof t?s=String(t):(0,r.vE)(e)&&"string"==typeof t&&(s=(0,i._U)(t)),(0,r.WX)(s)}let f;function m(e,t){if(!e||!(0,n.fn)(t))return e;if("rings"in e||"paths"in e){if(null==f)throw new TypeError("geometry engine not loaded");return f.simplify(t,e)}return e}async function y(e,t){!(0,n.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==f&&(f=await Promise.all([s.e(9930),s.e(1275)]).then(s.bind(s,47559))),f}()}},4071:(e,t,s)=>{s.d(t,{$:()=>i,P:()=>n});const i={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},n={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:i,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},98453:(e,t,s)=>{s.d(t,{m:()=>i});const i=new(s(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},92300:(e,t,s)=>{s.d(t,{V:()=>r,X:()=>n});var i=s(65864);function n(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function r(e,t,s){const n=(0,i.xD)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=s,t}))}},2272:(e,t,s)=>{s.d(t,{Dl:()=>o,jV:()=>r,lF:()=>a}),s(92602),s(70333);var i=s(4718),n=s(84952);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.An)(e):(0,i.o8)(e)}function a(e,t,s){const i={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))i[n]=r.map((e=>a(e)));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(s?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?r:JSON.stringify(r);else i[n]=r}return i}s(926)},93470:(e,t,s)=>{s.d(t,{Cb:()=>r,HW:()=>h,JR:()=>n,JZ:()=>u,WR:()=>a,b6:()=>d,fT:()=>i,nC:()=>l,yM:()=>o});const i=[252,146,31,255],n=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},u={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4399],{24045:(e,t,r)=>{function o(e,t){const r=e.count;t||(t=new e.TypedArrayConstructor(r));for(let o=0;o<r;o++)t[o]=e.get(o);return t}r.d(t,{m:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,makeDense:o},Symbol.toStringTag,{value:"Module"}))},4399:(e,t,r)=>{r.d(t,{loadGLTF:()=>P});var o,n,s=r(53966),a=r(9093),i=r(63907),u=r(49186),l=r(91869),c=r(74887),f=r(84952),d=r(46140),p=r(58083),h=r(67026),m=r(82534),T=r(13030),w=r(24045);r(44208);class g{constructor(e){this._data=e,this._offset4=0,this._dataUint32=new Uint32Array(this._data,0,Math.floor(this._data.byteLength/4))}readUint32(){const e=this._offset4;return this._offset4+=1,this._dataUint32[e]}readUint8Array(e){const t=4*this._offset4;return this._offset4+=e/4,new Uint8Array(this._data,t,e)}remainingBytes(){return this._data.byteLength-4*this._offset4}}!function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(o||(o={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(n||(n={}));var x=r(21818);const b={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1},y={pbrMetallicRoughness:b,emissiveFactor:[0,0,0],alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1},_={ESRI_externalColorMixMode:"tint",ESRI_receiveShadows:!0,ESRI_receiveAmbientOcclusion:!0},A=(e={})=>{const t={...b,...e.pbrMetallicRoughness},r=function(e){switch(e.ESRI_externalColorMixMode){case"multiply":case"tint":case"ignore":case"replace":break;default:(0,x.Xb)(e.ESRI_externalColorMixMode),e.ESRI_externalColorMixMode="tint"}return e}({..._,...e.extras});return{...y,...e,pbrMetallicRoughness:t,extras:r}},S={magFilter:i.Cj.LINEAR,minFilter:i.Cj.LINEAR_MIPMAP_LINEAR,wrapS:i.pF.REPEAT,wrapT:i.pF.REPEAT};var R=r(51530);const E=1179937895;class O{constructor(e,t,r,o){if(this._context=e,this.uri=t,this.json=r,this._glbBuffer=o,this._bufferLoaders=new Map,this._textureLoaders=new Map,this._textureCache=new Map,this._materialCache=new Map,this._nodeParentMap=new Map,this._nodeTransformCache=new Map,this._supportedExtensions=["KHR_texture_basisu","KHR_texture_transform"],this._baseUri=function(e){let t,r;return e.replace(/^(.*\/)?([^/]*)$/,((e,o,n)=>(t=o||"",r=n||"",""))),{dirPart:t,filePart:r}}(this.uri).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),null==r.scenes)throw new u.A("gltf-loader-unsupported-feature","Scenes must be defined.");if(null==r.meshes)throw new u.A("gltf-loader-unsupported-feature","Meshes must be defined");if(null==r.nodes)throw new u.A("gltf-loader-unsupported-feature","Nodes must be defined.");this._computeNodeParents()}static async load(e,t,r){if((0,f.DB)(t)){const r=(0,f.r$)(t);if(r&&"model/gltf-binary"!==r.mediaType)try{const o=JSON.parse(r.isBase64?atob(r.data):r.data);return new O(e,t,o)}catch{}const o=(0,f.lJ)(t);if(O._isGLBData(o))return this._fromGLBData(e,t,o)}if(U.test(t)||"gltf"===r?.expectedType){const o=await e.loadJSON(t,r);return new O(e,t,o)}const o=await e.loadBinary(t,r);if(O._isGLBData(o))return this._fromGLBData(e,t,o);if(D.test(t)||"glb"===r?.expectedType)throw new u.A("gltf-loader-invalid-glb","This is not a valid glb file.");const n=await e.loadJSON(t,r);return new O(e,t,n)}static _isGLBData(e){if(null==e)return!1;const t=new g(e);return t.remainingBytes()>=4&&t.readUint32()===E}static async _fromGLBData(e,t,r){const o=await O._parseGLBData(r);return new O(e,t,o.json,o.binaryData)}static async _parseGLBData(e){const t=new g(e);if(t.remainingBytes()<12)throw new u.A("gltf-loader-error","glb binary data is insufficiently large.");const r=t.readUint32(),o=t.readUint32(),n=t.readUint32();if(r!==E)throw new u.A("gltf-loader-error","Magic first 4 bytes do not fit to expected glb value.");if(e.byteLength<n)throw new u.A("gltf-loader-error","glb binary data is smaller than header specifies.");if(2!==o)throw new u.A("gltf-loader-unsupported-feature","An unsupported glb container version was detected. Only version 2 is supported.");let a,i,l=0;for(;t.remainingBytes()>=8;){const e=t.readUint32(),r=t.readUint32();if(0===l){if(1313821514!==r)throw new u.A("gltf-loader-error","First glb chunk must be JSON.");if(e<0)throw new u.A("gltf-loader-error","No JSON data found.");a=await(0,R.KB)(t.readUint8Array(e))}else if(1===l){if(5130562!==r)throw new u.A("gltf-loader-unsupported-feature","Second glb chunk expected to be BIN.");i=t.readUint8Array(e)}else s.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] More than 2 glb chunks detected. Skipping.");l+=1}if(!a)throw new u.A("gltf-loader-error","No glb JSON chunk detected.");return{json:a,binaryData:i}}async getBuffer(e,t){const r=this.json.buffers[e];if(null==r.uri){if(null==this._glbBuffer)throw new u.A("gltf-loader-error","glb buffer not present");return this._glbBuffer}const o=await this._getBufferLoader(e,t);if(o.byteLength!==r.byteLength)throw new u.A("gltf-loader-error","Buffer byte lengths should match.");return o}async _getBufferLoader(e,t){const r=this._bufferLoaders.get(e);if(r)return r;const o=this.json.buffers[e].uri,n=this._context.loadBinary(this._resolveUri(o),t).then((e=>new Uint8Array(e)));return this._bufferLoaders.set(e,n),n}async getAccessor(e,t){if(!this.json.accessors)throw new u.A("gltf-loader-unsupported-feature","Accessors missing.");const r=this.json.accessors[e];if(null==r?.bufferView)throw new u.A("gltf-loader-unsupported-feature","Some accessor does not specify a bufferView.");if(r.type in[o.MAT2,o.MAT3,o.MAT4])throw new u.A("gltf-loader-unsupported-feature",`AttributeType ${r.type} is not supported`);const n=this.json.bufferViews[r.bufferView],s=await this.getBuffer(n.buffer,t),a=M[r.type],i=I[r.componentType],l=a*i,c=n.byteStride||l;return{raw:s.buffer,byteStride:c,byteOffset:s.byteOffset+(n.byteOffset||0)+(r.byteOffset||0),entryCount:r.count,isDenselyPacked:c===l,componentCount:a,componentByteSize:i,componentType:r.componentType,min:r.min,max:r.max,normalized:!!r.normalized}}async getIndexData(e,t){if(null==e.indices)return;const r=await this.getAccessor(e.indices,t);if(r.isDenselyPacked)switch(r.componentType){case i.pe.UNSIGNED_BYTE:return new Uint8Array(r.raw,r.byteOffset,r.entryCount);case i.pe.UNSIGNED_SHORT:return new Uint16Array(r.raw,r.byteOffset,r.entryCount);case i.pe.UNSIGNED_INT:return new Uint32Array(r.raw,r.byteOffset,r.entryCount)}else switch(r.componentType){case i.pe.UNSIGNED_BYTE:return(0,w.m)(L(T.SL,r));case i.pe.UNSIGNED_SHORT:return(0,w.m)(L(T.h,r));case i.pe.UNSIGNED_INT:return(0,w.m)(L(T.P,r))}}async getPositionData(e,t){if(null==e.attributes.POSITION)throw new u.A("gltf-loader-unsupported-feature","No POSITION vertex data found.");const r=await this.getAccessor(e.attributes.POSITION,t);if(r.componentType!==i.pe.FLOAT)throw new u.A("gltf-loader-unsupported-feature","Expected type FLOAT for POSITION vertex attribute, but found "+i.pe[r.componentType]);if(3!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","POSITION vertex attribute must have 3 components, but found "+r.componentCount.toFixed());return L(T.xs,r)}async getNormalData(e,t){if(null==e.attributes.NORMAL)throw new u.A("gltf-loader-error","No NORMAL vertex data found.");const r=await this.getAccessor(e.attributes.NORMAL,t);if(r.componentType!==i.pe.FLOAT)throw new u.A("gltf-loader-unsupported-feature","Expected type FLOAT for NORMAL vertex attribute, but found "+i.pe[r.componentType]);if(3!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","NORMAL vertex attribute must have 3 components, but found "+r.componentCount.toFixed());return L(T.xs,r)}async getTangentData(e,t){if(null==e.attributes.TANGENT)throw new u.A("gltf-loader-error","No TANGENT vertex data found.");const r=await this.getAccessor(e.attributes.TANGENT,t);if(r.componentType!==i.pe.FLOAT)throw new u.A("gltf-loader-unsupported-feature","Expected type FLOAT for TANGENT vertex attribute, but found "+i.pe[r.componentType]);if(4!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","TANGENT vertex attribute must have 4 components, but found "+r.componentCount.toFixed());return L(T.Eq,r)}async getTextureCoordinates(e,t){if(null==e.attributes.TEXCOORD_0)throw new u.A("gltf-loader-error","No TEXCOORD_0 vertex data found.");const r=await this.getAccessor(e.attributes.TEXCOORD_0,t);if(2!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","TEXCOORD_0 vertex attribute must have 2 components, but found "+r.componentCount.toFixed());if(r.componentType===i.pe.FLOAT)return L(T.gH,r);if(!r.normalized)throw new u.A("gltf-loader-unsupported-feature","Integer component types are only supported for a normalized accessor for TEXCOORD_0.");return function(e){switch(e.componentType){case i.pe.BYTE:return new T.D6(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.UNSIGNED_BYTE:return new T.LC(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.SHORT:return new T.mJ(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.UNSIGNED_SHORT:return new T.Yi(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.UNSIGNED_INT:return new T.An(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.FLOAT:return new T.gH(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount)}}(r)}async getVertexColors(e,t){if(null==e.attributes.COLOR_0)throw new u.A("gltf-loader-error","No COLOR_0 vertex data found.");const r=await this.getAccessor(e.attributes.COLOR_0,t);if(4!==r.componentCount&&3!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","COLOR_0 attribute must have 3 or 4 components, but found "+r.componentCount.toFixed());if(4===r.componentCount){if(r.componentType===i.pe.FLOAT)return L(T.Eq,r);if(r.componentType===i.pe.UNSIGNED_BYTE)return L(T.XP,r);if(r.componentType===i.pe.UNSIGNED_SHORT)return L(T.Uz,r)}else if(3===r.componentCount){if(r.componentType===i.pe.FLOAT)return L(T.xs,r);if(r.componentType===i.pe.UNSIGNED_BYTE)return L(T.eI,r);if(r.componentType===i.pe.UNSIGNED_SHORT)return L(T.nS,r)}throw new u.A("gltf-loader-unsupported-feature","Unsupported component type for COLOR_0 attribute: "+i.pe[r.componentType])}hasPositions(e){return void 0!==e.attributes.POSITION}hasNormals(e){return void 0!==e.attributes.NORMAL}hasVertexColors(e){return void 0!==e.attributes.COLOR_0}hasTextureCoordinates(e){return void 0!==e.attributes.TEXCOORD_0}hasTangents(e){return void 0!==e.attributes.TANGENT}async getMaterial(e,t,r){let o=e.material?this._materialCache.get(e.material):void 0;if(!o){const n=null!=e.material?A(this.json.materials[e.material]):A(),s=n.pbrMetallicRoughness,a=this.hasVertexColors(e),i=this.getTexture(s.baseColorTexture,t),u=this.getTexture(n.normalTexture,t),l=r?this.getTexture(n.occlusionTexture,t):void 0,c=r?this.getTexture(n.emissiveTexture,t):void 0,f=r?this.getTexture(s.metallicRoughnessTexture,t):void 0,d=null!=e.material?e.material:-1;o={alphaMode:n.alphaMode,alphaCutoff:n.alphaCutoff,color:s.baseColorFactor,doubleSided:!!n.doubleSided,colorTexture:await i,normalTexture:await u,name:n.name,id:d,occlusionTexture:await l,emissiveTexture:await c,emissiveFactor:n.emissiveFactor,metallicFactor:s.metallicFactor,roughnessFactor:s.roughnessFactor,metallicRoughnessTexture:await f,hasVertexColors:a,ESRI_externalColorMixMode:n.extras.ESRI_externalColorMixMode,colorTextureTransform:s?.baseColorTexture?.extensions?.KHR_texture_transform,normalTextureTransform:n.normalTexture?.extensions?.KHR_texture_transform,occlusionTextureTransform:n.occlusionTexture?.extensions?.KHR_texture_transform,emissiveTextureTransform:n.emissiveTexture?.extensions?.KHR_texture_transform,metallicRoughnessTextureTransform:s?.metallicRoughnessTexture?.extensions?.KHR_texture_transform,receiveAmbientOcclusion:n.extras.ESRI_receiveAmbientOcclusion,receiveShadows:n.extras.ESRI_receiveShadows}}return o}async getTexture(e,t){if(!e)return;if(0!==(e.texCoord||0))throw new u.A("gltf-loader-unsupported-feature","Only TEXCOORD with index 0 is supported.");const r=e.index,o=this.json.textures[r],n=(c=null!=o.sampler?this.json.samplers[o.sampler]:{},{...S,...c}),s=F(o),a=this.json.images[s],i=await this._loadTextureImageData(r,o,t);var c;return(0,l.tE)(this._textureCache,r,(()=>{const e=e=>33071===e||33648===e||10497===e,t=e=>{throw new u.A("gltf-loader-error",`Unexpected TextureSampler WrapMode: ${e}`)};return{data:i,wrapS:e(n.wrapS)?n.wrapS:t(n.wrapS),wrapT:e(n.wrapT)?n.wrapT:t(n.wrapT),minFilter:n.minFilter,name:a.name,id:r}}))}getNodeTransform(e){if(void 0===e)return N;let t=this._nodeTransformCache.get(e);if(!t){const r=this.getNodeTransform(this._getNodeParent(e)),o=this.json.nodes[e];o.matrix?t=(0,p.lw)((0,a.vt)(),r,o.matrix):o.translation||o.rotation||o.scale?(t=(0,a.o8)(r),o.translation&&(0,p.Tl)(t,t,o.translation),o.rotation&&(C[3]=(0,h.Xd)(C,o.rotation),(0,p.e$)(t,t,C[3],C)),o.scale&&(0,p.hs)(t,t,o.scale)):t=(0,a.o8)(r),this._nodeTransformCache.set(e,t)}return t}_resolveUri(e){return(0,f.s2)(e,this._baseUri)}_getNodeParent(e){return this._nodeParentMap.get(e)}_checkVersionSupported(){const e=d.R.parse(this.json.asset.version,"glTF");v.validate(e)}_checkRequiredExtensionsSupported(){const e=this.json;if(e.extensionsRequired&&!e.extensionsRequired.every((e=>this._supportedExtensions.includes(e))))throw new u.A("gltf-loader-unsupported-feature","gltf loader was not able to load unsupported feature. Required extensions: "+e.extensionsRequired.join(", "))}_computeNodeParents(){this.json.nodes.forEach(((e,t)=>{e.children&&e.children.forEach((e=>{this._nodeParentMap.set(e,t)}))}))}async _loadTextureImageData(e,t,r){const o=this._textureLoaders.get(e);if(o)return o;const n=this._createTextureLoader(t,r);return this._textureLoaders.set(e,n),n}async _createTextureLoader(e,t){const r=F(e),o=this.json.images[r];if(o.uri){if(o.uri.endsWith(".ktx2")){const e=await this._context.loadBinary(this._resolveUri(o.uri),t);return new R.Xi(new Uint8Array(e))}return this._context.loadImage(this._resolveUri(o.uri),t)}if(null==o.bufferView)throw new u.A("gltf-loader-unsupported-feature","Image bufferView must be defined.");if(null==o.mimeType)throw new u.A("gltf-loader-unsupported-feature","Image mimeType must be defined.");const n=this.json.bufferViews[o.bufferView],s=await this.getBuffer(n.buffer,t);if(null!=n.byteStride)throw new u.A("gltf-loader-unsupported-feature","byteStride not supported for image buffer");const a=s.byteOffset+(n.byteOffset||0);return(0,R.pn)(new Uint8Array(s.buffer,a,n.byteLength),o.mimeType)}async getLoadedBuffersSize(){if(this._glbBuffer)return this._glbBuffer.byteLength;const e=await(0,c.nA)(Array.from(this._bufferLoaders.values())),t=await(0,c.nA)(Array.from(this._textureLoaders.values()));return e.reduce(((e,t)=>e+(t?.byteLength??0)),0)+t.reduce(((e,t)=>e+(t?(0,R.x3)(t)?t.data.byteLength:t.width*t.height*4:0)),0)}}const N=(0,p.hM)((0,a.vt)(),Math.PI/2),v=new d.R(2,0,"glTF"),C=(0,m.vt)(),M={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},I={[i.pe.BYTE]:1,[i.pe.UNSIGNED_BYTE]:1,[i.pe.SHORT]:2,[i.pe.UNSIGNED_SHORT]:2,[i.pe.HALF_FLOAT]:2,[i.pe.FLOAT]:4,[i.pe.INT]:4,[i.pe.UNSIGNED_INT]:4};function L(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}function F(e){if(null!=e.extensions?.KHR_texture_basisu)return e.extensions.KHR_texture_basisu.source;if(null!==e.source)return e.source;throw new u.A("gltf-loader-unsupported-feature","Source is expected to be defined for a texture. It can also be omitted in favour of an KHR_texture_basisu extension tag.")}const U=/\.gltf$/i,D=/\.glb$/i;let B=0;async function P(e,t,r={},o=!0){const n=await O.load(e,t,r),u="gltf_"+B++,l={lods:[],materials:new Map,textures:new Map,meta:G(n)},c=!(!n.json.asset.extras||"symbolResource"!==n.json.asset.extras.ESRI_type),f=n.json.asset.extras?.ESRI_webstyleSymbol?.webstyle,d=new Map;await j(n,(async(e,t,c,f)=>{const p=d.get(c)??0;d.set(c,p+1);const h=void 0!==e.mode?e.mode:i.WR.TRIANGLES,m=h===i.WR.TRIANGLES||h===i.WR.TRIANGLE_STRIP||h===i.WR.TRIANGLE_FAN?h:null;if(null==m)return void s.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Unsupported primitive mode ("+i.WR[h]+"). Skipping primitive.");if(!n.hasPositions(e))return void s.A.getLogger("esri.views.3d.glTF").warn("Skipping primitive without POSITION vertex attribute.");const T=n.getPositionData(e,r),w=n.getMaterial(e,r,o),g=n.hasNormals(e)?n.getNormalData(e,r):null,x=n.hasTangents(e)?n.getTangentData(e,r):null,b=n.hasTextureCoordinates(e)?n.getTextureCoordinates(e,r):null,y=n.hasVertexColors(e)?n.getVertexColors(e,r):null,_=n.getIndexData(e,r),A={name:f,transform:(0,a.o8)(t),attributes:{position:await T,normal:g?await g:null,texCoord0:b?await b:null,color:y?await y:null,tangent:x?await x:null},indices:await _,primitiveType:m,material:k(l,await w,u)};let S=null;null!=l.meta?.ESRI_lod&&"screenSpaceRadius"===l.meta.ESRI_lod.metric&&(S=l.meta.ESRI_lod.thresholds[c]),l.lods[c]=l.lods[c]||{parts:[],name:f,lodThreshold:S},l.lods[c].parts[p]=A}));for(const e of l.lods)e.parts=e.parts.filter((e=>!!e));const p=await n.getLoadedBuffersSize();return{model:l,meta:{isEsriSymbolResource:c,uri:n.uri,ESRI_webstyle:f},customMeta:{},size:p}}function G(e){const t=e.json;let r=null;return t.nodes.forEach((e=>{const t=e.extras;null!=t&&(t.ESRI_proxyEllipsoid||t.ESRI_lod)&&(r=t)})),r}async function j(e,t){const r=e.json,o=r.scenes[r.scene||0].nodes,n=o.length>1,a=[];for(const e of o){const t=r.nodes[e];a.push(i(e,0)),V(t)&&!n&&t.extensions.MSFT_lod.ids.forEach(((e,t)=>i(e,t+1)))}async function i(o,n){const u=r.nodes[o],l=e.getNodeTransform(o);if(null!=u.weights&&s.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Morph targets are not supported."),null!=u.mesh){const e=r.meshes[u.mesh];for(const r of e.primitives)a.push(t(r,l,n,e.name))}for(const e of u.children||[])a.push(i(e,n))}await Promise.all(a)}function V(e){return e.extensions?.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function k(e,t,r){const o=t=>{const o=`${r}_tex_${t&&t.id}${t?.name?"_"+t.name:""}`;if(t&&!e.textures.has(o)){const r=function(e,t={}){return{data:e,parameters:{wrap:{s:i.pF.REPEAT,t:i.pF.REPEAT,...t.wrap},noUnpackFlip:!0,mipmap:!1,...t}}}(t.data,{wrap:{s:t.wrapS,t:t.wrapT},mipmap:H.has(t.minFilter),noUnpackFlip:!0});e.textures.set(o,r)}return o},n=`${r}_mat_${t.id}_${t.name}`;if(!e.materials.has(n)){const r=function(e={}){return{color:[1,1,1],opacity:1,alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1,castShadows:!0,receiveShadows:!0,receiveAmbientOcclustion:!0,textureColor:null,textureNormal:null,textureOcclusion:null,textureEmissive:null,textureMetallicRoughness:null,colorTextureTransform:null,normalTextureTransform:null,occlusionTextureTransform:null,emissiveTextureTransform:null,metallicRoughnessTextureTransform:null,emissiveFactor:[0,0,0],metallicFactor:1,roughnessFactor:1,colorMixMode:"multiply",...e}}({color:[t.color[0],t.color[1],t.color[2]],opacity:t.color[3],alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,colorMixMode:t.ESRI_externalColorMixMode,textureColor:t.colorTexture?o(t.colorTexture):void 0,textureNormal:t.normalTexture?o(t.normalTexture):void 0,textureOcclusion:t.occlusionTexture?o(t.occlusionTexture):void 0,textureEmissive:t.emissiveTexture?o(t.emissiveTexture):void 0,textureMetallicRoughness:t.metallicRoughnessTexture?o(t.metallicRoughnessTexture):void 0,emissiveFactor:[t.emissiveFactor[0],t.emissiveFactor[1],t.emissiveFactor[2]],colorTextureTransform:t.colorTextureTransform,normalTextureTransform:t.normalTextureTransform,occlusionTextureTransform:t.occlusionTextureTransform,emissiveTextureTransform:t.emissiveTextureTransform,metallicRoughnessTextureTransform:t.metallicRoughnessTextureTransform,metallicFactor:t.metallicFactor,roughnessFactor:t.roughnessFactor,receiveShadows:t.receiveShadows,receiveAmbientOcclustion:t.receiveAmbientOcclusion});e.materials.set(n,r)}return n}const H=new Set([i.Cj.LINEAR_MIPMAP_LINEAR,i.Cj.LINEAR_MIPMAP_NEAREST])}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4399],{24045:(e,t,r)=>{function o(e,t){const r=e.count;t||(t=new e.TypedArrayConstructor(r));for(let o=0;o<r;o++)t[o]=e.get(o);return t}r.d(t,{m:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,makeDense:o},Symbol.toStringTag,{value:"Module"}))},4399:(e,t,r)=>{r.d(t,{loadGLTF:()=>P});var o,n,s=r(53966),a=r(9093),i=r(63907),u=r(49186),l=r(91869),c=r(74887),f=r(84952),d=r(46140),p=r(58083),h=r(67026),m=r(82534),T=r(13030),w=r(24045);r(44208);class g{constructor(e){this._data=e,this._offset4=0,this._dataUint32=new Uint32Array(this._data,0,Math.floor(this._data.byteLength/4))}readUint32(){const e=this._offset4;return this._offset4+=1,this._dataUint32[e]}readUint8Array(e){const t=4*this._offset4;return this._offset4+=e/4,new Uint8Array(this._data,t,e)}remainingBytes(){return this._data.byteLength-4*this._offset4}}!function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(o||(o={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(n||(n={}));var x=r(21818);const b={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1},y={pbrMetallicRoughness:b,emissiveFactor:[0,0,0],alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1},_={ESRI_externalColorMixMode:"tint",ESRI_receiveShadows:!0,ESRI_receiveAmbientOcclusion:!0},A=(e={})=>{const t={...b,...e.pbrMetallicRoughness},r=function(e){switch(e.ESRI_externalColorMixMode){case"multiply":case"tint":case"ignore":case"replace":break;default:(0,x.Xb)(e.ESRI_externalColorMixMode),e.ESRI_externalColorMixMode="tint"}return e}({..._,...e.extras});return{...y,...e,pbrMetallicRoughness:t,extras:r}},S={magFilter:i.Cj.LINEAR,minFilter:i.Cj.LINEAR_MIPMAP_LINEAR,wrapS:i.pF.REPEAT,wrapT:i.pF.REPEAT};var R=r(51530);const E=1179937895;class O{constructor(e,t,r,o){if(this._context=e,this.uri=t,this.json=r,this._glbBuffer=o,this._bufferLoaders=new Map,this._textureLoaders=new Map,this._textureCache=new Map,this._materialCache=new Map,this._nodeParentMap=new Map,this._nodeTransformCache=new Map,this._supportedExtensions=["KHR_texture_basisu","KHR_texture_transform"],this._baseUri=function(e){let t,r;return e.replace(/^(.*\/)?([^/]*)$/,((e,o,n)=>(t=o||"",r=n||"",""))),{dirPart:t,filePart:r}}(this.uri).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),null==r.scenes)throw new u.A("gltf-loader-unsupported-feature","Scenes must be defined.");if(null==r.meshes)throw new u.A("gltf-loader-unsupported-feature","Meshes must be defined");if(null==r.nodes)throw new u.A("gltf-loader-unsupported-feature","Nodes must be defined.");this._computeNodeParents()}static async load(e,t,r){if((0,f.DB)(t)){const r=(0,f.r$)(t);if(r&&"model/gltf-binary"!==r.mediaType)try{const o=JSON.parse(r.isBase64?atob(r.data):r.data);return new O(e,t,o)}catch{}const o=(0,f.lJ)(t);if(O._isGLBData(o))return this._fromGLBData(e,t,o)}if(U.test(t)||"gltf"===r?.expectedType){const o=await e.loadJSON(t,r);return new O(e,t,o)}const o=await e.loadBinary(t,r);if(O._isGLBData(o))return this._fromGLBData(e,t,o);if(D.test(t)||"glb"===r?.expectedType)throw new u.A("gltf-loader-invalid-glb","This is not a valid glb file.");const n=await e.loadJSON(t,r);return new O(e,t,n)}static _isGLBData(e){if(null==e)return!1;const t=new g(e);return t.remainingBytes()>=4&&t.readUint32()===E}static async _fromGLBData(e,t,r){const o=await O._parseGLBData(r);return new O(e,t,o.json,o.binaryData)}static async _parseGLBData(e){const t=new g(e);if(t.remainingBytes()<12)throw new u.A("gltf-loader-error","glb binary data is insufficiently large.");const r=t.readUint32(),o=t.readUint32(),n=t.readUint32();if(r!==E)throw new u.A("gltf-loader-error","Magic first 4 bytes do not fit to expected glb value.");if(e.byteLength<n)throw new u.A("gltf-loader-error","glb binary data is smaller than header specifies.");if(2!==o)throw new u.A("gltf-loader-unsupported-feature","An unsupported glb container version was detected. Only version 2 is supported.");let a,i,l=0;for(;t.remainingBytes()>=8;){const e=t.readUint32(),r=t.readUint32();if(0===l){if(1313821514!==r)throw new u.A("gltf-loader-error","First glb chunk must be JSON.");if(e<0)throw new u.A("gltf-loader-error","No JSON data found.");a=await(0,R.KB)(t.readUint8Array(e))}else if(1===l){if(5130562!==r)throw new u.A("gltf-loader-unsupported-feature","Second glb chunk expected to be BIN.");i=t.readUint8Array(e)}else s.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] More than 2 glb chunks detected. Skipping.");l+=1}if(!a)throw new u.A("gltf-loader-error","No glb JSON chunk detected.");return{json:a,binaryData:i}}async getBuffer(e,t){const r=this.json.buffers[e];if(null==r.uri){if(null==this._glbBuffer)throw new u.A("gltf-loader-error","glb buffer not present");return this._glbBuffer}const o=await this._getBufferLoader(e,t);if(o.byteLength!==r.byteLength)throw new u.A("gltf-loader-error","Buffer byte lengths should match.");return o}async _getBufferLoader(e,t){const r=this._bufferLoaders.get(e);if(r)return r;const o=this.json.buffers[e].uri,n=this._context.loadBinary(this._resolveUri(o),t).then((e=>new Uint8Array(e)));return this._bufferLoaders.set(e,n),n}async getAccessor(e,t){if(!this.json.accessors)throw new u.A("gltf-loader-unsupported-feature","Accessors missing.");const r=this.json.accessors[e];if(null==r?.bufferView)throw new u.A("gltf-loader-unsupported-feature","Some accessor does not specify a bufferView.");if(r.type in[o.MAT2,o.MAT3,o.MAT4])throw new u.A("gltf-loader-unsupported-feature",`AttributeType ${r.type} is not supported`);const n=this.json.bufferViews[r.bufferView],s=await this.getBuffer(n.buffer,t),a=M[r.type],i=I[r.componentType],l=a*i,c=n.byteStride||l;return{raw:s.buffer,byteStride:c,byteOffset:s.byteOffset+(n.byteOffset||0)+(r.byteOffset||0),entryCount:r.count,isDenselyPacked:c===l,componentCount:a,componentByteSize:i,componentType:r.componentType,min:r.min,max:r.max,normalized:!!r.normalized}}async getIndexData(e,t){if(null==e.indices)return;const r=await this.getAccessor(e.indices,t);if(r.isDenselyPacked)switch(r.componentType){case i.pe.UNSIGNED_BYTE:return new Uint8Array(r.raw,r.byteOffset,r.entryCount);case i.pe.UNSIGNED_SHORT:return new Uint16Array(r.raw,r.byteOffset,r.entryCount);case i.pe.UNSIGNED_INT:return new Uint32Array(r.raw,r.byteOffset,r.entryCount)}else switch(r.componentType){case i.pe.UNSIGNED_BYTE:return(0,w.m)(L(T.SL,r));case i.pe.UNSIGNED_SHORT:return(0,w.m)(L(T.h,r));case i.pe.UNSIGNED_INT:return(0,w.m)(L(T.P,r))}}async getPositionData(e,t){if(null==e.attributes.POSITION)throw new u.A("gltf-loader-unsupported-feature","No POSITION vertex data found.");const r=await this.getAccessor(e.attributes.POSITION,t);if(r.componentType!==i.pe.FLOAT)throw new u.A("gltf-loader-unsupported-feature","Expected type FLOAT for POSITION vertex attribute, but found "+i.pe[r.componentType]);if(3!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","POSITION vertex attribute must have 3 components, but found "+r.componentCount.toFixed());return L(T.xs,r)}async getNormalData(e,t){if(null==e.attributes.NORMAL)throw new u.A("gltf-loader-error","No NORMAL vertex data found.");const r=await this.getAccessor(e.attributes.NORMAL,t);if(r.componentType!==i.pe.FLOAT)throw new u.A("gltf-loader-unsupported-feature","Expected type FLOAT for NORMAL vertex attribute, but found "+i.pe[r.componentType]);if(3!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","NORMAL vertex attribute must have 3 components, but found "+r.componentCount.toFixed());return L(T.xs,r)}async getTangentData(e,t){if(null==e.attributes.TANGENT)throw new u.A("gltf-loader-error","No TANGENT vertex data found.");const r=await this.getAccessor(e.attributes.TANGENT,t);if(r.componentType!==i.pe.FLOAT)throw new u.A("gltf-loader-unsupported-feature","Expected type FLOAT for TANGENT vertex attribute, but found "+i.pe[r.componentType]);if(4!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","TANGENT vertex attribute must have 4 components, but found "+r.componentCount.toFixed());return L(T.Eq,r)}async getTextureCoordinates(e,t){if(null==e.attributes.TEXCOORD_0)throw new u.A("gltf-loader-error","No TEXCOORD_0 vertex data found.");const r=await this.getAccessor(e.attributes.TEXCOORD_0,t);if(2!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","TEXCOORD_0 vertex attribute must have 2 components, but found "+r.componentCount.toFixed());if(r.componentType===i.pe.FLOAT)return L(T.gH,r);if(!r.normalized)throw new u.A("gltf-loader-unsupported-feature","Integer component types are only supported for a normalized accessor for TEXCOORD_0.");return function(e){switch(e.componentType){case i.pe.BYTE:return new T.D6(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.UNSIGNED_BYTE:return new T.LC(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.SHORT:return new T.mJ(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.UNSIGNED_SHORT:return new T.Yi(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.UNSIGNED_INT:return new T.An(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.FLOAT:return new T.gH(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount)}}(r)}async getVertexColors(e,t){if(null==e.attributes.COLOR_0)throw new u.A("gltf-loader-error","No COLOR_0 vertex data found.");const r=await this.getAccessor(e.attributes.COLOR_0,t);if(4!==r.componentCount&&3!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","COLOR_0 attribute must have 3 or 4 components, but found "+r.componentCount.toFixed());if(4===r.componentCount){if(r.componentType===i.pe.FLOAT)return L(T.Eq,r);if(r.componentType===i.pe.UNSIGNED_BYTE)return L(T.XP,r);if(r.componentType===i.pe.UNSIGNED_SHORT)return L(T.Uz,r)}else if(3===r.componentCount){if(r.componentType===i.pe.FLOAT)return L(T.xs,r);if(r.componentType===i.pe.UNSIGNED_BYTE)return L(T.eI,r);if(r.componentType===i.pe.UNSIGNED_SHORT)return L(T.nS,r)}throw new u.A("gltf-loader-unsupported-feature","Unsupported component type for COLOR_0 attribute: "+i.pe[r.componentType])}hasPositions(e){return void 0!==e.attributes.POSITION}hasNormals(e){return void 0!==e.attributes.NORMAL}hasVertexColors(e){return void 0!==e.attributes.COLOR_0}hasTextureCoordinates(e){return void 0!==e.attributes.TEXCOORD_0}hasTangents(e){return void 0!==e.attributes.TANGENT}async getMaterial(e,t,r){let o=e.material?this._materialCache.get(e.material):void 0;if(!o){const n=null!=e.material?A(this.json.materials[e.material]):A(),s=n.pbrMetallicRoughness,a=this.hasVertexColors(e),i=this.getTexture(s.baseColorTexture,t),u=this.getTexture(n.normalTexture,t),l=r?this.getTexture(n.occlusionTexture,t):void 0,c=r?this.getTexture(n.emissiveTexture,t):void 0,f=r?this.getTexture(s.metallicRoughnessTexture,t):void 0,d=null!=e.material?e.material:-1;o={alphaMode:n.alphaMode,alphaCutoff:n.alphaCutoff,color:s.baseColorFactor,doubleSided:!!n.doubleSided,colorTexture:await i,normalTexture:await u,name:n.name,id:d,occlusionTexture:await l,emissiveTexture:await c,emissiveFactor:n.emissiveFactor,metallicFactor:s.metallicFactor,roughnessFactor:s.roughnessFactor,metallicRoughnessTexture:await f,hasVertexColors:a,ESRI_externalColorMixMode:n.extras.ESRI_externalColorMixMode,colorTextureTransform:s?.baseColorTexture?.extensions?.KHR_texture_transform,normalTextureTransform:n.normalTexture?.extensions?.KHR_texture_transform,occlusionTextureTransform:n.occlusionTexture?.extensions?.KHR_texture_transform,emissiveTextureTransform:n.emissiveTexture?.extensions?.KHR_texture_transform,metallicRoughnessTextureTransform:s?.metallicRoughnessTexture?.extensions?.KHR_texture_transform,receiveAmbientOcclusion:n.extras.ESRI_receiveAmbientOcclusion,receiveShadows:n.extras.ESRI_receiveShadows}}return o}async getTexture(e,t){if(!e)return;if(0!==(e.texCoord||0))throw new u.A("gltf-loader-unsupported-feature","Only TEXCOORD with index 0 is supported.");const r=e.index,o=this.json.textures[r],n=(c=null!=o.sampler?this.json.samplers[o.sampler]:{},{...S,...c}),s=F(o),a=this.json.images[s],i=await this._loadTextureImageData(r,o,t);var c;return(0,l.tE)(this._textureCache,r,(()=>{const e=e=>33071===e||33648===e||10497===e,t=e=>{throw new u.A("gltf-loader-error",`Unexpected TextureSampler WrapMode: ${e}`)};return{data:i,wrapS:e(n.wrapS)?n.wrapS:t(n.wrapS),wrapT:e(n.wrapT)?n.wrapT:t(n.wrapT),minFilter:n.minFilter,name:a.name,id:r}}))}getNodeTransform(e){if(void 0===e)return N;let t=this._nodeTransformCache.get(e);if(!t){const r=this.getNodeTransform(this._getNodeParent(e)),o=this.json.nodes[e];o.matrix?t=(0,p.lw)((0,a.vt)(),r,o.matrix):o.translation||o.rotation||o.scale?(t=(0,a.o8)(r),o.translation&&(0,p.Tl)(t,t,o.translation),o.rotation&&(C[3]=(0,h.Xd)(C,o.rotation),(0,p.e$)(t,t,C[3],C)),o.scale&&(0,p.hs)(t,t,o.scale)):t=(0,a.o8)(r),this._nodeTransformCache.set(e,t)}return t}_resolveUri(e){return(0,f.s2)(e,this._baseUri)}_getNodeParent(e){return this._nodeParentMap.get(e)}_checkVersionSupported(){const e=d.R.parse(this.json.asset.version,"glTF");v.validate(e)}_checkRequiredExtensionsSupported(){const e=this.json;if(e.extensionsRequired&&!e.extensionsRequired.every((e=>this._supportedExtensions.includes(e))))throw new u.A("gltf-loader-unsupported-feature","gltf loader was not able to load unsupported feature. Required extensions: "+e.extensionsRequired.join(", "))}_computeNodeParents(){this.json.nodes.forEach(((e,t)=>{e.children&&e.children.forEach((e=>{this._nodeParentMap.set(e,t)}))}))}async _loadTextureImageData(e,t,r){const o=this._textureLoaders.get(e);if(o)return o;const n=this._createTextureLoader(t,r);return this._textureLoaders.set(e,n),n}async _createTextureLoader(e,t){const r=F(e),o=this.json.images[r];if(o.uri){if(o.uri.endsWith(".ktx2")){const e=await this._context.loadBinary(this._resolveUri(o.uri),t);return new R.Xi(new Uint8Array(e))}return this._context.loadImage(this._resolveUri(o.uri),t)}if(null==o.bufferView)throw new u.A("gltf-loader-unsupported-feature","Image bufferView must be defined.");if(null==o.mimeType)throw new u.A("gltf-loader-unsupported-feature","Image mimeType must be defined.");const n=this.json.bufferViews[o.bufferView],s=await this.getBuffer(n.buffer,t);if(null!=n.byteStride)throw new u.A("gltf-loader-unsupported-feature","byteStride not supported for image buffer");const a=s.byteOffset+(n.byteOffset||0);return(0,R.pn)(new Uint8Array(s.buffer,a,n.byteLength),o.mimeType)}async getLoadedBuffersSize(){if(this._glbBuffer)return this._glbBuffer.byteLength;const e=await(0,c.nA)(Array.from(this._bufferLoaders.values())),t=await(0,c.nA)(Array.from(this._textureLoaders.values()));return e.reduce(((e,t)=>e+(t?.byteLength??0)),0)+t.reduce(((e,t)=>e+(t?(0,R.x3)(t)?t.data.byteLength:t.width*t.height*4:0)),0)}}const N=(0,p.hM)((0,a.vt)(),Math.PI/2),v=new d.R(2,0,"glTF"),C=(0,m.vt)(),M={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},I={[i.pe.BYTE]:1,[i.pe.UNSIGNED_BYTE]:1,[i.pe.SHORT]:2,[i.pe.UNSIGNED_SHORT]:2,[i.pe.HALF_FLOAT]:2,[i.pe.FLOAT]:4,[i.pe.INT]:4,[i.pe.UNSIGNED_INT]:4};function L(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}function F(e){if(null!=e.extensions?.KHR_texture_basisu)return e.extensions.KHR_texture_basisu.source;if(null!==e.source)return e.source;throw new u.A("gltf-loader-unsupported-feature","Source is expected to be defined for a texture. It can also be omitted in favour of an KHR_texture_basisu extension tag.")}const U=/\.gltf$/i,D=/\.glb$/i;let B=0;async function P(e,t,r={},o=!0){const n=await O.load(e,t,r),u="gltf_"+B++,l={lods:[],materials:new Map,textures:new Map,meta:G(n)},c=!(!n.json.asset.extras||"symbolResource"!==n.json.asset.extras.ESRI_type),f=n.json.asset.extras?.ESRI_webstyleSymbol?.webstyle,d=new Map;await j(n,(async(e,t,c,f)=>{const p=d.get(c)??0;d.set(c,p+1);const h=void 0!==e.mode?e.mode:i.WR.TRIANGLES,m=h===i.WR.TRIANGLES||h===i.WR.TRIANGLE_STRIP||h===i.WR.TRIANGLE_FAN?h:null;if(null==m)return void s.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Unsupported primitive mode ("+i.WR[h]+"). Skipping primitive.");if(!n.hasPositions(e))return void s.A.getLogger("esri.views.3d.glTF").warn("Skipping primitive without POSITION vertex attribute.");const T=n.getPositionData(e,r),w=n.getMaterial(e,r,o),g=n.hasNormals(e)?n.getNormalData(e,r):null,x=n.hasTangents(e)?n.getTangentData(e,r):null,b=n.hasTextureCoordinates(e)?n.getTextureCoordinates(e,r):null,y=n.hasVertexColors(e)?n.getVertexColors(e,r):null,_=n.getIndexData(e,r),A={name:f,transform:(0,a.o8)(t),attributes:{position:await T,normal:g?await g:null,texCoord0:b?await b:null,color:y?await y:null,tangent:x?await x:null},indices:await _,primitiveType:m,material:k(l,await w,u)};let S=null;null!=l.meta?.ESRI_lod&&"screenSpaceRadius"===l.meta.ESRI_lod.metric&&(S=l.meta.ESRI_lod.thresholds[c]),l.lods[c]=l.lods[c]||{parts:[],name:f,lodThreshold:S},l.lods[c].parts[p]=A}));for(const e of l.lods)e.parts=e.parts.filter((e=>!!e));const p=await n.getLoadedBuffersSize();return{model:l,meta:{isEsriSymbolResource:c,uri:n.uri,ESRI_webstyle:f},customMeta:{},cachedMemory:p}}function G(e){const t=e.json;let r=null;return t.nodes.forEach((e=>{const t=e.extras;null!=t&&(t.ESRI_proxyEllipsoid||t.ESRI_lod)&&(r=t)})),r}async function j(e,t){const r=e.json,o=r.scenes[r.scene||0].nodes,n=o.length>1,a=[];for(const e of o){const t=r.nodes[e];a.push(i(e,0)),V(t)&&!n&&t.extensions.MSFT_lod.ids.forEach(((e,t)=>i(e,t+1)))}async function i(o,n){const u=r.nodes[o],l=e.getNodeTransform(o);if(null!=u.weights&&s.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Morph targets are not supported."),null!=u.mesh){const e=r.meshes[u.mesh];for(const r of e.primitives)a.push(t(r,l,n,e.name))}for(const e of u.children||[])a.push(i(e,n))}await Promise.all(a)}function V(e){return e.extensions?.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function k(e,t,r){const o=t=>{const o=`${r}_tex_${t&&t.id}${t?.name?"_"+t.name:""}`;if(t&&!e.textures.has(o)){const r=function(e,t={}){return{data:e,parameters:{wrap:{s:i.pF.REPEAT,t:i.pF.REPEAT,...t.wrap},noUnpackFlip:!0,mipmap:!1,...t}}}(t.data,{wrap:{s:t.wrapS,t:t.wrapT},mipmap:H.has(t.minFilter),noUnpackFlip:!0});e.textures.set(o,r)}return o},n=`${r}_mat_${t.id}_${t.name}`;if(!e.materials.has(n)){const r=function(e={}){return{color:[1,1,1],opacity:1,alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1,castShadows:!0,receiveShadows:!0,receiveAmbientOcclustion:!0,textureColor:null,textureNormal:null,textureOcclusion:null,textureEmissive:null,textureMetallicRoughness:null,colorTextureTransform:null,normalTextureTransform:null,occlusionTextureTransform:null,emissiveTextureTransform:null,metallicRoughnessTextureTransform:null,emissiveFactor:[0,0,0],metallicFactor:1,roughnessFactor:1,colorMixMode:"multiply",...e}}({color:[t.color[0],t.color[1],t.color[2]],opacity:t.color[3],alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,colorMixMode:t.ESRI_externalColorMixMode,textureColor:t.colorTexture?o(t.colorTexture):void 0,textureNormal:t.normalTexture?o(t.normalTexture):void 0,textureOcclusion:t.occlusionTexture?o(t.occlusionTexture):void 0,textureEmissive:t.emissiveTexture?o(t.emissiveTexture):void 0,textureMetallicRoughness:t.metallicRoughnessTexture?o(t.metallicRoughnessTexture):void 0,emissiveFactor:[t.emissiveFactor[0],t.emissiveFactor[1],t.emissiveFactor[2]],colorTextureTransform:t.colorTextureTransform,normalTextureTransform:t.normalTextureTransform,occlusionTextureTransform:t.occlusionTextureTransform,emissiveTextureTransform:t.emissiveTextureTransform,metallicRoughnessTextureTransform:t.metallicRoughnessTextureTransform,metallicFactor:t.metallicFactor,roughnessFactor:t.roughnessFactor,receiveShadows:t.receiveShadows,receiveAmbientOcclustion:t.receiveAmbientOcclusion});e.materials.set(n,r)}return n}const H=new Set([i.Cj.LINEAR_MIPMAP_LINEAR,i.Cj.LINEAR_MIPMAP_NEAREST])}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8283],{4902:(e,t,r)=>{r.d(t,{PH:()=>a,sA:()=>o});var s=r(90237),i=r(40608);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,s._)([(0,i.$)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,s._)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(o(class{})){};l=(0,s._)([(0,i.$)("esri.core.Identifiable")],l)},66344:(e,t,r)=>{r.d(t,{q:()=>l});var s,i,n=r(3694);(i=s||(s={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class o{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new n.A,this._users=new n.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const r=this._db.get(e.id+t);return r?.size??0}put(e,t,r,i,n){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==r&&this._notifyRemove(t,o.entry,o.size,s.ALL)),i>this._maxSize)return void this._notifyRemove(t,r,i,s.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return console.warn(`Refusing to cache entry with size ${i} for key ${t}`),void this._notifyRemove(t,r,0,s.ALL);const l=1+Math.max(n,-4)- -3;this._db.set(t,new a(r,i,l)),this._size+=i,e.size+=i,this._checkSize()}updateSize(e,t,r,i){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===r){for(this._size-=n.size,e.size-=n.size;i>this._maxSize;){const e=this._notifyRemove(t,r,i,s.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}n.size=i,this._size+=i,e.size+=i,this._checkSize()}}pop(e,t){t=e.id+t;const r=this._db.get(t);if(r)return this._size-=r.size,e.size-=r.size,this._db.delete(t),++this._hit,r.entry;++this._miss}get(e,t){t=e.id+t;const r=this._db.get(t);if(void 0!==r)return this._db.delete(t),r.lives=r.lifetime,this._db.set(t,r),++this._hit,r.entry;++this._miss}peek(e,t){const r=this._db.get(e.id+t);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},r=new Array;this._db.forEach(((e,s)=>{const i=e.lifetime;r[i]=(r[i]||0)+e.size,this._users.forAll((r=>{const{id:i,name:n}=r;if(s.startsWith(i)){const r=t[n]||0;t[n]=r+e.size}}))}));const s={};this._users.forAll((e=>{const r=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const i=t[r]||0;t[r]=i,s[r]=Math.round(100*e.hitRate)+"%"}else s[r]="0%"}));const i=Object.keys(t);i.sort(((e,r)=>t[r]-t[e])),i.forEach((r=>e[r]=Math.round(t[r]/2**20)+"MB / "+s[r]));for(let t=r.length-1;t>=0;--t){const s=r[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,r)=>{r.startsWith(t)&&(this._size-=e.size,this._db.delete(r),this._notifyRemove(r,e.entry,e.size,s.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,s.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,r,s){let i;return this._removeFuncs.some((n=>{if(e.startsWith(n[0])){const e=n[1](t,s,r);return"number"==typeof e&&(i=e),!0}return!1})),i}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const r=e?.id;let s=!0;for(;s;){s=!1;for(const[i,n]of this._db)if(0===n.lifetime&&(!r||i.startsWith(r))){if(this._purgeItem(i,n,e),t.size<=.9*t.maxSize)return;s||=this._db.has(i)}}for(const[s,i]of this._db)if((!r||s.startsWith(r))&&(this._purgeItem(s,i,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,r=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,r&&(r.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,s.SOME);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class a{constructor(e,t,r){this.entry=e,this.size=t,this.lifetime=r,this.lives=r}}class l{constructor(e,t){this._storage=new o,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,r=1){this._storage.put(this,e,t,r,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},92071:(e,t,r)=>{r.d(t,{P:()=>v,L:()=>b});var s=r(90237),i=r(69622),n=r(76953),o=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[a.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,o.o8)(e),a.Gr.DEFAULTS)}));for(let r=a.Gr.SERVICE;r<a.AU;r++){const s=this._originStores[r];s&&s.forEach(((s,i)=>{e&&e.has(i)||t.set(i,(0,o.o8)(s),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.Gr.USER){let s=this._originStores[r];if(s||(s=new Map,this._originStores[r]=s),s.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const s=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),s!==t}return!1}delete(e,t=a.Gr.USER){const r=this._originStores[t];if(!r)return;const s=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return s}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],s=r?.get(e),i=this._values.get(e);return this._values.set(e,s),this._propertyOriginMap.set(e,t),i!==s}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var h=r(45917),u=r(88620),c=r(40608);const d=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,u.oY)(this),r=t.store,s=new l;t.store=s,(0,n.k)(t,r,s)}read(e,t){(0,h.L)(this,e,t)}getAtOrigin(e,t){const r=p(this),s=(0,a.aB)(t);if("string"==typeof e)return r.get(e,s);const i={};return e.forEach((e=>{i[e]=r.get(e,s)})),i}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return p(this).originOf(e)}revert(e,t){const r=p(this),s=(0,a.aB)(t),i=(0,u.oY)(this);let n;n="string"==typeof e?"*"===e?r.keys(s):[e]:e,n.forEach((e=>{i.invalidate(e),r.revert(e,s),i.commit(e)}))}};return t=(0,s._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function p(e){return(0,u.oY)(e).store}let g=class extends(d(i.A)){};g=(0,s._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],g);var f=r(16649),m=r(49422);const y=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return _(this).delete(e,(0,a.aB)(t))}write(e,t){return(0,m.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,u.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=_(this),r=(0,a.aB)(e),s=t.keys(r);for(const e of s)t.originOf(e)===r&&t.set(e,t.get(e,r),a.Gr.USER)}updateOrigin(e,t){const r=_(this),s=(0,a.aB)(t),i=(0,f.Jt)(this,e);for(let t=s+1;t<a.AU;++t)r.delete(e,t);r.set(e,i,s)}toJSON(e){return this.write({},e)}};return t=(0,s._)([(0,c.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function _(e){return(0,u.oY)(e).store}const v=e=>{let t=class extends(y(d(e))){constructor(...e){super(...e)}};return t=(0,s._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],t),t};let b=class extends(v(i.A)){};b=(0,s._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],b)},9775:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(62788),i=r(95488);class n{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new i.I,this._items=new Set}get length(){return(0,s.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.gc)(this._observable),yield*this._items}}},36708:(e,t,r)=>{r.d(t,{C_:()=>d,OH:()=>f,Vh:()=>m,on:()=>c,pc:()=>y,wB:()=>l,z7:()=>h}),r(60999),r(5503);var s=r(37955),i=r(36563),n=r(97768),o=r(74887),a=r(14012);function l(e,t,r={}){return u(e,t,r,p)}function h(e,t,r={}){return u(e,t,r,g)}function u(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,n.xt)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.Cn)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function c(e,t,r,o={}){let a=null,h=null,u=null;function c(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(e){o.once&&o.once&&(0,n.xt)(u),r(e)}const p=l(e,((e,r)=>{c(),(0,s.wb)(e)&&(a=e,h=(0,s.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,i.hA)((()=>{p.remove(),c()})),u}function d(e,t){return function(e,t,r){if((0,o.G4)(r))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.xt)(a)}return new Promise(((s,n)=>{a=(0,i.vE)([(0,o.u7)(r,(()=>{l(),n((0,o.NK)())})),u(e,(e=>{l(),s(e)}),{sync:!1,once:!0},t??p)])}))}(e,g,t)}function p(e){return!0}function g(e){return!!e}r(80559);const f={sync:!0},m={initial:!0},y={sync:!0,initial:!0}},10382:(e,t,r)=>{r.d(t,{A:()=>h});var s=r(36563),i=(r(44208),r(74887)),n=r(9775),o=r(72457),a=r(52268),l=r(61322);class h{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new n.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,s)=>{let n=!0;const o=e=>{(0,i.Te)(t.signal),n&&(n=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let n=0;n<e.length;++n){const a=e[n];(0,i.$X)(a)?this._clientPromises[n]=a.then((e=>(this._clients[n]=new l.default(e,t,this._ongoingJobsQueue),o(r),this._clients[n])),(()=>(o(s),null))):(this._clients[n]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[n]=Promise.resolve(this._clients[n]),o(r))}}))}broadcast(e,t,r){const s=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const n=this._clientPromises[i];s[i]=n.then((s=>s?.invoke(e,t,r)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,i.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.h)(this)}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const s=(0,i.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:s});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return s.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,s.vE)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let s=0;s<this._clientPromises.length;++s)this._clientPromises[s].then((i=>{i&&(t[s]=i.openPort()),0==--r&&e(t)}))}))}get test(){}}},72457:(e,t,r)=>{r.d(t,{h:()=>n,k:()=>i});const s=new FinalizationRegistry((e=>{e.close()}));function i(e,t){s.register(e,t,t)}function n(e){s.unregister(e)}},29953:(e,t,r)=>{r.d(t,{ho:()=>J});var s=r(49186),i=r(44208),n=r(74887),o=r(10382),a=r(72457),l=r(61322),h=r(53966),u=r(97768),c=r(78888),d=r(84952);const p={async request(e,t){const r=e.options,s=r.responseType;r.signal=t?.signal,r.responseType="native"===s||"native-request-init"===s?"native-request-init":s&&["blob","json","text"].includes(s)&&(0,d.sC)(e.url)?.after?s:"array-buffer";const i=await(0,c.A)(e.url,r),n={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete n.data.signal,n;case"blob":n.data=await n.data.arrayBuffer();break;case"json":n.data=(new TextEncoder).encode(JSON.stringify(n.data)).buffer;break;case"text":n.data=(new TextEncoder).encode(n.data).buffer}return{result:n,transferList:[n.data]}}};var g=r(8341),f=r(2741),m=r(92602),y=(r(47566),r(70333));const _={};var v=r(26390);class b{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class w{constructor(){this._dispatcher=new b,this._workerPostMessage({type:g.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,v.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,v.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,g.VI)(e);if(t&&t.type===g.Go.OPEN){const{modulePath:e,jobId:r}=t;let s=await l.default.loadWorker(e);s||(s=await import(e));const i=l.default.connect(s);this._workerPostMessage({type:g.Go.OPENED,jobId:r,data:i})}}}var A=r(73444),S=r(18357);const k=()=>h.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:M}=g.Go;let E,P;const I="Failed to create Worker. Fallback to execute module in main thread";async function O(e){return new Promise((t=>{function r(i){const n=(0,g.VI)(i);n&&n.type===M&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),k().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new w).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let L=0;const{ABORT:z,INVOKE:T,OPEN:x,OPENED:U,RESPONSE:R}=g.Go;class N{static async create(e){const t=await async function(){if(!(0,i.A)("esri-workers"))return O(new w);if(!E&&!P)try{const e='let globalId=0;const outgoing=new Map,configuration={CONFIGURATION};self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;let s=null;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})})).finally((()=>{t&&t.removeEventListener("abort",s)}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\nModules version: ${r}\nAssets version: ${n??s}\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let n;function t(e){const o=n.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split("{CONFIGURATION}").join(function(){let e;if(null!=m.A.default){const t={...m.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(m.A));e.assetsPath=(0,d.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,d.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,A.JK)(),e.has={"esri-csp-restrictions":(0,i.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,i.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,i.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,i.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,i.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,i.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,i.A)("esri-atomics"),"esri-shared-array-buffer":(0,i.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,d.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,d.s2)(e.workers.workerPath):e.workers.workerPath=(0,d.s2)((0,f.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=m.A.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.slice()||[],paths:{..._.paths,...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=_.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,A.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:S.$,fullVersion:y.ol,revision:S.u};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}());E=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){P=e||{}}let e;if(E)try{e=new Worker(E,{name:"esri-worker-"+L++})}catch(t){k().warn(I,P),e=new w}else k().warn(I,P),e=new w;return O(e)}();return new N(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),h.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,g.Jc)();return new Promise(((t,i)=>{const o={resolve:t,reject:i,abortHandle:(0,n.NY)(r,(()=>{this._outJobs.delete(s),this._post({type:z,jobId:s})}))};this._outJobs.set(s,o),this._post({type:x,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,g.VI)(e);if(t)switch(t.type){case U:this._onOpenedMessage(t);break;case R:this._onResponseMessage(t);break;case z:this._onAbortMessage(t);break;case T:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:i}=e,o=i?new AbortController:null,a=this._inJobs,l=p[t];let h;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);h=l.call(null,s,{signal:o?o.signal:null})}catch(e){return void this._post({type:R,jobId:r,error:(0,g.mF)(e)})}(0,n.$X)(h)?(a.set(r,{controller:o,promise:h}),h.then((e=>{a.has(r)&&(a.delete(r),this._post({type:R,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.zf)(e)||this._post({type:R,jobId:r,error:(0,g.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:R,jobId:r},h)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,u.xt)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:i}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,u.xt)(n.abortHandle),r?n.reject(s.A.fromJSON(JSON.parse(r))):n.resolve(i))}_post(e,t,r){return(0,g.u1)(this.worker,e,t,r)}}const D=(0,i.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.A)("workers-pool-size")??8):0;let C=(0,i.A)("esri-mobile")?Math.min(D,3):D;C||(C=(0,i.A)("safari")&&(0,i.A)("mac")?7:2);let H=0;const j=[];async function V(e,t){const r=new o.A,{registryTarget:s,...i}=t;return await r.open(e,i),s&&(0,a.k)(s,r),r}async function J(e,t={}){if("string"!=typeof e)throw new s.A("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.A)("host-webworker")&&!(0,i.A)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,n.Te)(t.signal);const s=t.client||r;return V([l.default.connect(r,t.schedule)],{...t,client:s})}if(await async function(){if($)return $;Z=new AbortController;const e=[];for(let t=0;t<C;t++){const r=N.create(t).then((e=>(j[t]=e,e)));e.push(r)}return $=Promise.all(e),$}(),(0,n.Te)(t.signal),"dedicated"===r){const r=H++%C;return V([await j[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,C);if(r<C){const s=new Array(r);for(let i=0;i<r;++i){const r=H++%C;s[i]=j[r].open(e,t)}return V(s,t)}}return V(j.map((r=>r.open(e,t))),t)}let Z,$=null},54239:(e,t,r)=>{r.d(t,{A:()=>v});var s,i=r(90237),n=r(4576),o=r(66552),a=r(25482),l=r(83047),h=r(67076),u=r(10107),c=(r(44208),r(53966),r(36005)),d=r(40608),p=r(43937);const g=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=g.jsonValues.slice();(0,n.Xy)(f,"orthometric");const m=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let y=s=class extends a.oY{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return g.write(e,t,r)}readHeightModel(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(function(e,t){return new h.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r?.messages&&r.messages.push(_(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||m.read(e)||(r?.messages&&r.messages.push(_(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new s({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.k1)(t);return new s({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new s;return t.read(e,{origin:"web-scene"}),t}};function _(e,t){return new h.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,i._)([(0,u.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal"}}}})],y.prototype,"heightModel",void 0),(0,i._)([(0,p.K)("web-scene","heightModel")],y.prototype,"writeHeightModel",null),(0,i._)([(0,c.w)(["web-scene","service"],"heightModel")],y.prototype,"readHeightModel",null),(0,i._)([(0,u.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],y.prototype,"heightUnit",void 0),(0,i._)([(0,c.w)("web-scene","heightUnit")],y.prototype,"readHeightUnit",null),(0,i._)([(0,c.w)("service","heightUnit")],y.prototype,"readHeightUnitService",null),(0,i._)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],y.prototype,"vertCRS",void 0),(0,i._)([(0,c.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],y.prototype,"readVertCRS",null),y=s=(0,i._)([(0,d.$)("esri.geometry.HeightModelInfo")],y);const v=y},5111:(e,t,r)=>{r.r(t),r.d(t,{default:()=>L});var s=r(90237),i=r(78888),n=r(49186),o=r(97768),a=r(92071),l=r(74887),h=r(84952),u=r(10107),c=(r(44208),r(53966)),d=(r(87811),r(36005)),p=r(40608),g=r(54239),f=r(4146),m=r(89186),y=r(18768),_=r(16131),v=r(8303),b=r(10873);class w{constructor(e,t,r,s){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=r,this.noDataValue=s)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let r=1/0,s=-1/0,i=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(r=n<r?n:r,s=n>s?n:s,i=!1);i?(this._minValue=0,this._maxValue=0):(this._minValue=r,this._maxValue=s>-3e38?s:0)}}var A=r(4576),S=r(36563),k=r(29953);class M{constructor(e,t,r,s,i={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._promise=(0,k.ho)(e,{...i,schedule:s}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,i.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>c.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,S.hA)((()=>{r.removed=!0,(0,A.TF)(this._listeners,r),this._thread&&null!=r.threadHandle&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const s=this._transferLists[e],i=s?s(t):[];return this._thread.invoke(e,t,{transferList:i,signal:r})}return this._promise?this._promise.then((()=>((0,l.Te)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}class E extends M{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,r){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},r):Promise.resolve(null)}release(){--this.ref<=0&&(P.forEach(((e,t)=>{e===this&&P.delete(t)})),this.destroy())}}const P=new Map;let I=class extends((0,m.f)((0,y.b)((0,_.q)((0,v.A)((0,a.P)(f.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=P.get(e);return t||(null!=e?(t=new E((t=>e.immediate.schedule(t))),P.set(e,t)):(t=new E,P.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));return r?{operations:{supportsTileMap:r.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let r=t.currentVersion;return r||(r=9.3),r}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.QP).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,r,s){const n=null!=(s=s||{signal:null}).signal?s.signal:s.signal=(new AbortController).signal,o={responseType:"array-buffer",signal:n},a={noDataValue:s.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,r,s))).then((()=>(0,i.A)(this.getTileUrl(e,t,r),o))).then((e=>this._lercDecoder.decode(e.data,a,n))).then((e=>new w(e)))}getTileUrl(e,t,r){const s=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,i=(0,h.x0)({...this.parsedUrl.query,blankTile:!s&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${r}${i?"?"+i:""}`}async queryElevation(e,t){const{ElevationQuery:s}=await r.e(3492).then(r.bind(r,63492));return(0,l.Te)(t),(new s).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:s}=await r.e(3492).then(r.bind(r,63492));return(0,l.Te)(t),(new s).createSampler(this,e,t)}_fetchTileAvailability(e,t,r,s){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,r,s):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},r=await(0,i.A)(this.parsedUrl.path,t);r.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=r.data,this.read(r.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[O]}};(0,s._)([(0,u.MZ)({readOnly:!0})],I.prototype,"capabilities",void 0),(0,s._)([(0,d.w)("service","capabilities",["capabilities"])],I.prototype,"readCapabilities",null),(0,s._)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],I.prototype,"copyright",void 0),(0,s._)([(0,u.MZ)({readOnly:!0,type:g.A})],I.prototype,"heightModelInfo",void 0),(0,s._)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],I.prototype,"path",void 0),(0,s._)([(0,u.MZ)({type:["show","hide"]})],I.prototype,"listMode",void 0),(0,s._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],I.prototype,"minScale",void 0),(0,s._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],I.prototype,"maxScale",void 0),(0,s._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],I.prototype,"opacity",void 0),(0,s._)([(0,u.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],I.prototype,"operationalLayerType",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"sourceJSON",void 0),(0,s._)([(0,u.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],I.prototype,"type",void 0),(0,s._)([(0,u.MZ)(b.OZ)],I.prototype,"url",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"version",void 0),(0,s._)([(0,d.w)("version",["currentVersion"])],I.prototype,"readVersion",null),I=(0,s._)([(0,p.$)("esri.layers.ElevationLayer")],I);const O=Symbol("default-fetch-tile");I.prototype.fetchTile[O]=!0;const L=I},4146:(e,t,r)=>{r.d(t,{A:()=>b});var s=r(90237),i=(r(59456),r(78888)),n=r(49186),o=r(65529),a=r(4902),l=r(92474),h=r(53966),u=r(74887),c=r(84952),d=r(10107),p=(r(44208),r(87811),r(40608)),g=r(92602),f=r(79677),m=r(5443),y=r(16930);let _=0,v=class extends(o.A.EventedMixin((0,a.sA)(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.A(-180,-90,180,90,y.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:s}=await r.e(5613).then(r.bind(r,45613));try{return await s(t)}catch(e){const r=t?.portalItem,s=r?.id||"unset",i=r?.portal?.url||g.A.portalUrl;throw h.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+s+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,u.zf)(e)||h.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,s._)([(0,d.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,s._)([(0,d.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,s._)([(0,d.MZ)({type:m.A})],v.prototype,"fullExtent",void 0),(0,s._)([(0,d.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,s._)([(0,d.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,s._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,s._)([(0,d.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,s._)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,s._)([(0,d.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,s._)([(0,d.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,s._)([(0,d.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,s._)([(0,d.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,s._)([(0,d.MZ)({type:y.A})],v.prototype,"spatialReference",void 0),(0,s._)([(0,d.MZ)({type:String})],v.prototype,"title",void 0),(0,s._)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,s._)([(0,d.MZ)()],v.prototype,"url",void 0),(0,s._)([(0,d.MZ)({type:f.A})],v.prototype,"visibilityTimeExtent",void 0),(0,s._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,s._)([(0,p.$)("esri.layers.Layer")],v);const b=v},18768:(e,t,r)=>{r.d(t,{b:()=>l});var s=r(90237),i=r(53966),n=r(10107),o=(r(44208),r(87811),r(40608)),a=r(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,i.A.getLogger(this)))}};return(0,s._)([(0,n.MZ)()],t.prototype,"title",null),(0,s._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>A});var s=r(90237),i=r(92602),n=r(70333),o=r(78888),a=r(60999),l=r(49186),h=r(53966),u=r(97768),c=r(74887),d=r(84952),p=r(10107),g=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),y=r(83531),_=r(20655),v=r(80812),b=r(41318),w=r(10407);const A=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:s}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,c.Te)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.zf)(e)||h.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=e===r.id;if(s&&r.portal.user)return(0,w.It)(r);let i,o;if(s)i=r.portal.url;else try{i=await(0,y.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!i||!(0,d.b8)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,l=!1,h=!1;if(!o)return{features:{edit:a,fullEdit:l},content:{updateItem:h}};try{if(s?await r.reload():(r=new v.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return(0,w.It)(r)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:h}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=_.A.getDefault();if(i&&i.loaded&&(0,d.S8)(i.restUrl)===(0,d.S8)(s))return i.user;const l=`${s}/community/self`,h=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?b.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,s=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return r&&s&&!(0,d.ut)(s.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,p.MZ)({type:v.default})],t.prototype,"portalItem",null),(0,s._)([(0,g.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,p.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},79677:(e,t,r)=>{r.d(t,{A:()=>p});var s,i=r(90237),n=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),h=r(40608),u=r(43937),c=r(56400);let d=s=class extends n.oY{static get allTime(){return g}static get empty(){return f}static fromArray(e){return new s({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,s=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===s&&r===i}expandTo(e,t=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let i=this.end;if(i){const r=(0,o.lL)(i,e,t);i=i.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new s({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;return i>=t&&i<=r?o=i:t>=i&&t<=n&&(o=t),r>=i&&r<=n?a=r:n>=t&&n<=r&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?s.empty:new s({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,r=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:n,end:a}=this;return null!=n&&(i.start=(0,o.S1)(n,e,t,r)),null!=a&&(i.end=(0,o.S1)(a,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return g.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:r})}};(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,i._)([(0,l.w)("end")],d.prototype,"readEnd",null),(0,i._)([(0,u.K)("end")],d.prototype,"writeEnd",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,i._)([(0,l.w)("start")],d.prototype,"readStart",null),(0,i._)([(0,u.K)("start")],d.prototype,"writeStart",null),d=s=(0,i._)([(0,h.$)("esri.time.TimeExtent")],d);const p=d,g=new d,f=new d({start:void 0,end:void 0})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8283],{4902:(e,t,r)=>{r.d(t,{PH:()=>a,sA:()=>o});var s=r(90237),i=r(40608);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,s._)([(0,i.$)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,s._)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(o(class{})){};l=(0,s._)([(0,i.$)("esri.core.Identifiable")],l)},66344:(e,t,r)=>{r.d(t,{q:()=>l});var s,i,n=r(3694);(i=s||(s={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class o{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new n.A,this._users=new n.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const r=this._db.get(e.id+t);return r?.size??0}put(e,t,r,i,n){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==r&&this._notifyRemove(t,o.entry,o.size,s.ALL)),i>this._maxSize)return void this._notifyRemove(t,r,i,s.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return console.warn(`Refusing to cache entry with size ${i} for key ${t}`),void this._notifyRemove(t,r,0,s.ALL);const l=1+Math.max(n,-4)- -3;this._db.set(t,new a(r,i,l)),this._size+=i,e.size+=i,this._checkSize()}updateSize(e,t,r,i){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===r){for(this._size-=n.size,e.size-=n.size;i>this._maxSize;){const e=this._notifyRemove(t,r,i,s.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}n.size=i,this._size+=i,e.size+=i,this._checkSize()}}pop(e,t){t=e.id+t;const r=this._db.get(t);if(r)return this._size-=r.size,e.size-=r.size,this._db.delete(t),++this._hit,r.entry;++this._miss}get(e,t){t=e.id+t;const r=this._db.get(t);if(void 0!==r)return this._db.delete(t),r.lives=r.lifetime,this._db.set(t,r),++this._hit,r.entry;++this._miss}peek(e,t){const r=this._db.get(e.id+t);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},r=new Array;this._db.forEach(((e,s)=>{const i=e.lifetime;r[i]=(r[i]||0)+e.size,this._users.forAll((r=>{const{id:i,name:n}=r;if(s.startsWith(i)){const r=t[n]||0;t[n]=r+e.size}}))}));const s={};this._users.forAll((e=>{const r=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const i=t[r]||0;t[r]=i,s[r]=Math.round(100*e.hitRate)+"%"}else s[r]="0%"}));const i=Object.keys(t);i.sort(((e,r)=>t[r]-t[e])),i.forEach((r=>e[r]=Math.round(t[r]/2**20)+"MB / "+s[r]));for(let t=r.length-1;t>=0;--t){const s=r[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,r)=>{r.startsWith(t)&&(this._size-=e.size,this._db.delete(r),this._notifyRemove(r,e.entry,e.size,s.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,s.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,r,s){let i;return this._removeFuncs.some((n=>{if(e.startsWith(n[0])){const e=n[1](t,s,r);return"number"==typeof e&&(i=e),!0}return!1})),i}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const r=e?.id;let s=!0;for(;s;){s=!1;for(const[i,n]of this._db)if(0===n.lifetime&&(!r||i.startsWith(r))){if(this._purgeItem(i,n,e),t.size<=.9*t.maxSize)return;s||=this._db.has(i)}}for(const[s,i]of this._db)if((!r||s.startsWith(r))&&(this._purgeItem(s,i,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,r=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,r&&(r.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,s.SOME);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class a{constructor(e,t,r){this.entry=e,this.size=t,this.lifetime=r,this.lives=r}}class l{constructor(e,t){this._storage=new o,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,r=1){this._storage.put(this,e,t,r,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},92071:(e,t,r)=>{r.d(t,{P:()=>v,L:()=>b});var s=r(90237),i=r(69622),n=r(76953),o=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[a.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,o.o8)(e),a.Gr.DEFAULTS)}));for(let r=a.Gr.SERVICE;r<a.AU;r++){const s=this._originStores[r];s&&s.forEach(((s,i)=>{e&&e.has(i)||t.set(i,(0,o.o8)(s),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.Gr.USER){let s=this._originStores[r];if(s||(s=new Map,this._originStores[r]=s),s.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const s=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),s!==t}return!1}delete(e,t=a.Gr.USER){const r=this._originStores[t];if(!r)return;const s=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return s}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],s=r?.get(e),i=this._values.get(e);return this._values.set(e,s),this._propertyOriginMap.set(e,t),i!==s}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var h=r(45917),u=r(88620),c=r(40608);const d=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,u.oY)(this),r=t.store,s=new l;t.store=s,(0,n.k)(t,r,s)}read(e,t){(0,h.L)(this,e,t)}getAtOrigin(e,t){const r=p(this),s=(0,a.aB)(t);if("string"==typeof e)return r.get(e,s);const i={};return e.forEach((e=>{i[e]=r.get(e,s)})),i}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return p(this).originOf(e)}revert(e,t){const r=p(this),s=(0,a.aB)(t),i=(0,u.oY)(this);let n;n="string"==typeof e?"*"===e?r.keys(s):[e]:e,n.forEach((e=>{i.invalidate(e),r.revert(e,s),i.commit(e)}))}};return t=(0,s._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function p(e){return(0,u.oY)(e).store}let g=class extends(d(i.A)){};g=(0,s._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],g);var f=r(16649),m=r(49422);const y=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return _(this).delete(e,(0,a.aB)(t))}write(e,t){return(0,m.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,u.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=_(this),r=(0,a.aB)(e),s=t.keys(r);for(const e of s)t.originOf(e)===r&&t.set(e,t.get(e,r),a.Gr.USER)}updateOrigin(e,t){const r=_(this),s=(0,a.aB)(t),i=(0,f.Jt)(this,e);for(let t=s+1;t<a.AU;++t)r.delete(e,t);r.set(e,i,s)}toJSON(e){return this.write({},e)}};return t=(0,s._)([(0,c.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function _(e){return(0,u.oY)(e).store}const v=e=>{let t=class extends(y(d(e))){constructor(...e){super(...e)}};return t=(0,s._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],t),t};let b=class extends(v(i.A)){};b=(0,s._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],b)},9775:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(62788),i=r(95488);class n{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new i.I,this._items=new Set}get length(){return(0,s.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.gc)(this._observable),yield*this._items}}},36708:(e,t,r)=>{r.d(t,{C_:()=>d,OH:()=>f,Vh:()=>m,on:()=>c,pc:()=>y,wB:()=>l,z7:()=>h}),r(60999),r(5503);var s=r(37955),i=r(36563),n=r(97768),o=r(74887),a=r(14012);function l(e,t,r={}){return u(e,t,r,p)}function h(e,t,r={}){return u(e,t,r,g)}function u(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,n.xt)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.Cn)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function c(e,t,r,o={}){let a=null,h=null,u=null;function c(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(e){o.once&&o.once&&(0,n.xt)(u),r(e)}const p=l(e,((e,r)=>{c(),(0,s.wb)(e)&&(a=e,h=(0,s.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,i.hA)((()=>{p.remove(),c()})),u}function d(e,t){return function(e,t,r){if((0,o.G4)(r))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.xt)(a)}return new Promise(((s,n)=>{a=(0,i.vE)([(0,o.u7)(r,(()=>{l(),n((0,o.NK)())})),u(e,(e=>{l(),s(e)}),{sync:!1,once:!0},t??p)])}))}(e,g,t)}function p(e){return!0}function g(e){return!!e}r(80559);const f={sync:!0},m={initial:!0},y={sync:!0,initial:!0}},10382:(e,t,r)=>{r.d(t,{A:()=>h});var s=r(36563),i=(r(44208),r(74887)),n=r(9775),o=r(72457),a=r(52268),l=r(61322);class h{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new n.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,s)=>{let n=!0;const o=e=>{(0,i.Te)(t.signal),n&&(n=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let n=0;n<e.length;++n){const a=e[n];(0,i.$X)(a)?this._clientPromises[n]=a.then((e=>(this._clients[n]=new l.default(e,t,this._ongoingJobsQueue),o(r),this._clients[n])),(()=>(o(s),null))):(this._clients[n]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[n]=Promise.resolve(this._clients[n]),o(r))}}))}broadcast(e,t,r){const s=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const n=this._clientPromises[i];s[i]=n.then((s=>s?.invoke(e,t,r)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,i.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.h)(this)}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const s=(0,i.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:s});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return s.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,s.vE)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let s=0;s<this._clientPromises.length;++s)this._clientPromises[s].then((i=>{i&&(t[s]=i.openPort()),0==--r&&e(t)}))}))}get test(){}}},72457:(e,t,r)=>{r.d(t,{h:()=>n,k:()=>i});const s=new FinalizationRegistry((e=>{e.close()}));function i(e,t){s.register(e,t,t)}function n(e){s.unregister(e)}},29953:(e,t,r)=>{r.d(t,{ho:()=>J});var s=r(49186),i=r(44208),n=r(74887),o=r(10382),a=r(72457),l=r(61322),h=r(53966),u=r(97768),c=r(78888),d=r(84952);const p={async request(e,t){const r=e.options,s=r.responseType;r.signal=t?.signal,r.responseType="native"===s||"native-request-init"===s?"native-request-init":s&&["blob","json","text"].includes(s)&&(0,d.sC)(e.url)?.after?s:"array-buffer";const i=await(0,c.A)(e.url,r),n={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete n.data.signal,n;case"blob":n.data=await n.data.arrayBuffer();break;case"json":n.data=(new TextEncoder).encode(JSON.stringify(n.data)).buffer;break;case"text":n.data=(new TextEncoder).encode(n.data).buffer}return{result:n,transferList:[n.data]}}};var g=r(8341),f=r(2741),m=r(92602),y=(r(47566),r(70333));const _={};var v=r(26390);class b{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class w{constructor(){this._dispatcher=new b,this._workerPostMessage({type:g.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,v.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,v.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,g.VI)(e);if(t&&t.type===g.Go.OPEN){const{modulePath:e,jobId:r}=t;let s=await l.default.loadWorker(e);s||(s=await import(e));const i=l.default.connect(s);this._workerPostMessage({type:g.Go.OPENED,jobId:r,data:i})}}}var A=r(73444),S=r(18357);const k=()=>h.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:M}=g.Go;let E,P;const I="Failed to create Worker. Fallback to execute module in main thread";async function O(e){return new Promise((t=>{function r(i){const n=(0,g.VI)(i);n&&n.type===M&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),k().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new w).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let L=0;const{ABORT:z,INVOKE:T,OPEN:x,OPENED:U,RESPONSE:R}=g.Go;class N{static async create(e){const t=await async function(){if(!(0,i.A)("esri-workers"))return O(new w);if(!E&&!P)try{const e='let globalId=0;const outgoing=new Map,configuration={CONFIGURATION};self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;let s=null;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})})).finally((()=>{t&&t.removeEventListener("abort",s)}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\nModules version: ${r}\nAssets version: ${n??s}\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let n;function t(e){const o=n.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split("{CONFIGURATION}").join(function(){let e;if(null!=m.A.default){const t={...m.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(m.A));e.assetsPath=(0,d.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,d.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,A.JK)(),e.has={"esri-csp-restrictions":(0,i.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,i.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,i.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,i.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,i.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,i.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,i.A)("esri-atomics"),"esri-shared-array-buffer":(0,i.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,d.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,d.s2)(e.workers.workerPath):e.workers.workerPath=(0,d.s2)((0,f.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=m.A.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.slice()||[],paths:{..._.paths,...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=_.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,A.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:S.$,fullVersion:y.ol,revision:S.u};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}());E=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){P=e||{}}let e;if(E)try{e=new Worker(E,{name:"esri-worker-"+L++})}catch(t){k().warn(I,P),e=new w}else k().warn(I,P),e=new w;return O(e)}();return new N(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),h.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,g.Jc)();return new Promise(((t,i)=>{const o={resolve:t,reject:i,abortHandle:(0,n.NY)(r,(()=>{this._outJobs.delete(s),this._post({type:z,jobId:s})}))};this._outJobs.set(s,o),this._post({type:x,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,g.VI)(e);if(t)switch(t.type){case U:this._onOpenedMessage(t);break;case R:this._onResponseMessage(t);break;case z:this._onAbortMessage(t);break;case T:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:i}=e,o=i?new AbortController:null,a=this._inJobs,l=p[t];let h;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);h=l.call(null,s,{signal:o?o.signal:null})}catch(e){return void this._post({type:R,jobId:r,error:(0,g.mF)(e)})}(0,n.$X)(h)?(a.set(r,{controller:o,promise:h}),h.then((e=>{a.has(r)&&(a.delete(r),this._post({type:R,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.zf)(e)||this._post({type:R,jobId:r,error:(0,g.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:R,jobId:r},h)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,u.xt)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:i}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,u.xt)(n.abortHandle),r?n.reject(s.A.fromJSON(JSON.parse(r))):n.resolve(i))}_post(e,t,r){return(0,g.u1)(this.worker,e,t,r)}}const D=(0,i.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.A)("workers-pool-size")??8):0;let C=(0,i.A)("esri-mobile")?Math.min(D,3):D;C||(C=(0,i.A)("safari")&&(0,i.A)("mac")?7:2);let H=0;const j=[];async function V(e,t){const r=new o.A,{registryTarget:s,...i}=t;return await r.open(e,i),s&&(0,a.k)(s,r),r}async function J(e,t={}){if("string"!=typeof e)throw new s.A("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.A)("host-webworker")&&!(0,i.A)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,n.Te)(t.signal);const s=t.client||r;return V([l.default.connect(r,t.schedule)],{...t,client:s})}if(await async function(){if($)return $;Z=new AbortController;const e=[];for(let t=0;t<C;t++){const r=N.create(t).then((e=>(j[t]=e,e)));e.push(r)}return $=Promise.all(e),$}(),(0,n.Te)(t.signal),"dedicated"===r){const r=H++%C;return V([await j[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,C);if(r<C){const s=new Array(r);for(let i=0;i<r;++i){const r=H++%C;s[i]=j[r].open(e,t)}return V(s,t)}}return V(j.map((r=>r.open(e,t))),t)}let Z,$=null},54239:(e,t,r)=>{r.d(t,{A:()=>v});var s,i=r(90237),n=r(4576),o=r(66552),a=r(25482),l=r(83047),h=r(67076),u=r(10107),c=(r(44208),r(53966),r(36005)),d=r(40608),p=r(43937);const g=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=g.jsonValues.slice();(0,n.Xy)(f,"orthometric");const m=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let y=s=class extends a.oY{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return g.write(e,t,r)}readHeightModel(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(function(e,t){return new h.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r?.messages&&r.messages.push(_(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||m.read(e)||(r?.messages&&r.messages.push(_(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new s({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.k1)(t);return new s({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new s;return t.read(e,{origin:"web-scene"}),t}};function _(e,t){return new h.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,i._)([(0,u.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal"}}}})],y.prototype,"heightModel",void 0),(0,i._)([(0,p.K)("web-scene","heightModel")],y.prototype,"writeHeightModel",null),(0,i._)([(0,c.w)(["web-scene","service"],"heightModel")],y.prototype,"readHeightModel",null),(0,i._)([(0,u.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],y.prototype,"heightUnit",void 0),(0,i._)([(0,c.w)("web-scene","heightUnit")],y.prototype,"readHeightUnit",null),(0,i._)([(0,c.w)("service","heightUnit")],y.prototype,"readHeightUnitService",null),(0,i._)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],y.prototype,"vertCRS",void 0),(0,i._)([(0,c.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],y.prototype,"readVertCRS",null),y=s=(0,i._)([(0,d.$)("esri.geometry.HeightModelInfo")],y);const v=y},5111:(e,t,r)=>{r.r(t),r.d(t,{default:()=>L});var s=r(90237),i=r(78888),n=r(49186),o=r(97768),a=r(92071),l=r(74887),h=r(84952),u=r(10107),c=(r(44208),r(53966)),d=(r(87811),r(36005)),p=r(40608),g=r(54239),f=r(4146),m=r(89186),y=r(18768),_=r(16131),v=r(8303),b=r(10873);class w{constructor(e,t,r,s){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=r,this.noDataValue=s)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get cachedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let r=1/0,s=-1/0,i=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(r=n<r?n:r,s=n>s?n:s,i=!1);i?(this._minValue=0,this._maxValue=0):(this._minValue=r,this._maxValue=s>-3e38?s:0)}}var A=r(4576),S=r(36563),k=r(29953);class M{constructor(e,t,r,s,i={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._promise=(0,k.ho)(e,{...i,schedule:s}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,i.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>c.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,S.hA)((()=>{r.removed=!0,(0,A.TF)(this._listeners,r),this._thread&&null!=r.threadHandle&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const s=this._transferLists[e],i=s?s(t):[];return this._thread.invoke(e,t,{transferList:i,signal:r})}return this._promise?this._promise.then((()=>((0,l.Te)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}class E extends M{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,r){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},r):Promise.resolve(null)}release(){--this.ref<=0&&(P.forEach(((e,t)=>{e===this&&P.delete(t)})),this.destroy())}}const P=new Map;let I=class extends((0,m.f)((0,y.b)((0,_.q)((0,v.A)((0,a.P)(f.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=P.get(e);return t||(null!=e?(t=new E((t=>e.immediate.schedule(t))),P.set(e,t)):(t=new E,P.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));return r?{operations:{supportsTileMap:r.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let r=t.currentVersion;return r||(r=9.3),r}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.QP).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,r,s){const n=null!=(s=s||{signal:null}).signal?s.signal:s.signal=(new AbortController).signal,o={responseType:"array-buffer",signal:n},a={noDataValue:s.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,r,s))).then((()=>(0,i.A)(this.getTileUrl(e,t,r),o))).then((e=>this._lercDecoder.decode(e.data,a,n))).then((e=>new w(e)))}getTileUrl(e,t,r){const s=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,i=(0,h.x0)({...this.parsedUrl.query,blankTile:!s&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${r}${i?"?"+i:""}`}async queryElevation(e,t){const{ElevationQuery:s}=await r.e(3492).then(r.bind(r,63492));return(0,l.Te)(t),(new s).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:s}=await r.e(3492).then(r.bind(r,63492));return(0,l.Te)(t),(new s).createSampler(this,e,t)}_fetchTileAvailability(e,t,r,s){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,r,s):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},r=await(0,i.A)(this.parsedUrl.path,t);r.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=r.data,this.read(r.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[O]}};(0,s._)([(0,u.MZ)({readOnly:!0})],I.prototype,"capabilities",void 0),(0,s._)([(0,d.w)("service","capabilities",["capabilities"])],I.prototype,"readCapabilities",null),(0,s._)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],I.prototype,"copyright",void 0),(0,s._)([(0,u.MZ)({readOnly:!0,type:g.A})],I.prototype,"heightModelInfo",void 0),(0,s._)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],I.prototype,"path",void 0),(0,s._)([(0,u.MZ)({type:["show","hide"]})],I.prototype,"listMode",void 0),(0,s._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],I.prototype,"minScale",void 0),(0,s._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],I.prototype,"maxScale",void 0),(0,s._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],I.prototype,"opacity",void 0),(0,s._)([(0,u.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],I.prototype,"operationalLayerType",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"sourceJSON",void 0),(0,s._)([(0,u.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],I.prototype,"type",void 0),(0,s._)([(0,u.MZ)(b.OZ)],I.prototype,"url",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"version",void 0),(0,s._)([(0,d.w)("version",["currentVersion"])],I.prototype,"readVersion",null),I=(0,s._)([(0,p.$)("esri.layers.ElevationLayer")],I);const O=Symbol("default-fetch-tile");I.prototype.fetchTile[O]=!0;const L=I},4146:(e,t,r)=>{r.d(t,{A:()=>b});var s=r(90237),i=(r(59456),r(78888)),n=r(49186),o=r(65529),a=r(4902),l=r(92474),h=r(53966),u=r(74887),c=r(84952),d=r(10107),p=(r(44208),r(87811),r(40608)),g=r(92602),f=r(79677),m=r(5443),y=r(16930);let _=0,v=class extends(o.A.EventedMixin((0,a.sA)(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.A(-180,-90,180,90,y.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:s}=await r.e(5613).then(r.bind(r,45613));try{return await s(t)}catch(e){const r=t?.portalItem,s=r?.id||"unset",i=r?.portal?.url||g.A.portalUrl;throw h.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+s+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,u.zf)(e)||h.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,s._)([(0,d.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,s._)([(0,d.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,s._)([(0,d.MZ)({type:m.A})],v.prototype,"fullExtent",void 0),(0,s._)([(0,d.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,s._)([(0,d.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,s._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,s._)([(0,d.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,s._)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,s._)([(0,d.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,s._)([(0,d.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,s._)([(0,d.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,s._)([(0,d.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,s._)([(0,d.MZ)({type:y.A})],v.prototype,"spatialReference",void 0),(0,s._)([(0,d.MZ)({type:String})],v.prototype,"title",void 0),(0,s._)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,s._)([(0,d.MZ)()],v.prototype,"url",void 0),(0,s._)([(0,d.MZ)({type:f.A})],v.prototype,"visibilityTimeExtent",void 0),(0,s._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,s._)([(0,p.$)("esri.layers.Layer")],v);const b=v},18768:(e,t,r)=>{r.d(t,{b:()=>l});var s=r(90237),i=r(53966),n=r(10107),o=(r(44208),r(87811),r(40608)),a=r(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,i.A.getLogger(this)))}};return(0,s._)([(0,n.MZ)()],t.prototype,"title",null),(0,s._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>A});var s=r(90237),i=r(92602),n=r(70333),o=r(78888),a=r(60999),l=r(49186),h=r(53966),u=r(97768),c=r(74887),d=r(84952),p=r(10107),g=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),y=r(83531),_=r(20655),v=r(80812),b=r(41318),w=r(10407);const A=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:s}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,c.Te)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.zf)(e)||h.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=e===r.id;if(s&&r.portal.user)return(0,w.It)(r);let i,o;if(s)i=r.portal.url;else try{i=await(0,y.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!i||!(0,d.b8)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,l=!1,h=!1;if(!o)return{features:{edit:a,fullEdit:l},content:{updateItem:h}};try{if(s?await r.reload():(r=new v.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return(0,w.It)(r)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:h}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=_.A.getDefault();if(i&&i.loaded&&(0,d.S8)(i.restUrl)===(0,d.S8)(s))return i.user;const l=`${s}/community/self`,h=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?b.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,s=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return r&&s&&!(0,d.ut)(s.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,p.MZ)({type:v.default})],t.prototype,"portalItem",null),(0,s._)([(0,g.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,p.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},79677:(e,t,r)=>{r.d(t,{A:()=>p});var s,i=r(90237),n=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),h=r(40608),u=r(43937),c=r(56400);let d=s=class extends n.oY{static get allTime(){return g}static get empty(){return f}static fromArray(e){return new s({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,s=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===s&&r===i}expandTo(e,t=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let i=this.end;if(i){const r=(0,o.lL)(i,e,t);i=i.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new s({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;return i>=t&&i<=r?o=i:t>=i&&t<=n&&(o=t),r>=i&&r<=n?a=r:n>=t&&n<=r&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?s.empty:new s({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,r=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:n,end:a}=this;return null!=n&&(i.start=(0,o.S1)(n,e,t,r)),null!=a&&(i.end=(0,o.S1)(a,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return g.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:r})}};(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,i._)([(0,l.w)("end")],d.prototype,"readEnd",null),(0,i._)([(0,u.K)("end")],d.prototype,"writeEnd",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,i._)([(0,l.w)("start")],d.prototype,"readStart",null),(0,i._)([(0,u.K)("start")],d.prototype,"writeStart",null),d=s=(0,i._)([(0,h.$)("esri.time.TimeExtent")],d);const p=d,g=new d,f=new d({start:void 0,end:void 0})}}]);
|