@arcgis/core 4.34.0-next.29 → 4.34.0-next.30

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.
Files changed (130) hide show
  1. package/Map.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0260b33daf48fc207880.js +1 -0
  4. package/assets/esri/core/workers/chunks/{f469224c6e4804fd835a.js → 140efe4735605258ecc9.js} +1 -1
  5. package/assets/esri/core/workers/chunks/173c5b8fa1ac7aa6e072.js +1 -0
  6. package/assets/esri/core/workers/chunks/1aa6719be3afbdc7c880.js +1 -0
  7. package/assets/esri/core/workers/chunks/{8552fdb3230f4dd082c6.js → 20a96c17d1a117dfdf77.js} +1 -1
  8. package/assets/esri/core/workers/chunks/28e04ef3575f164f611a.js +1 -0
  9. package/assets/esri/core/workers/chunks/{2173012af606ac4cdf87.js → 2a695b50a384c45ace9a.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{cf635f7ca998dd33d947.js → 439ce953a25b2776cb7f.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{ecdbbfebca1fcef567bb.js → 4e267a813e8b10d10b3b.js} +9 -9
  12. package/assets/esri/core/workers/chunks/7099ff8dc699fedea931.js +1 -0
  13. package/assets/esri/core/workers/chunks/{e89698fc404379627349.js → 949dc266ac6f3505d357.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{0aba41e0ee0a591b254b.js → 971b16677b66c16fb6b9.js} +1 -1
  15. package/assets/esri/core/workers/chunks/a809042fdce7ced2a415.js +1 -0
  16. package/assets/esri/core/workers/chunks/{16d82cbec34bc434efcd.js → a82d7e2eecfe654a65de.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{27e089acb1cc76758b0a.js → ac30cf2f9a94597f7665.js} +8 -8
  18. package/assets/esri/core/workers/chunks/{ec4428250dbd807df0bd.js → c50c2f014e8567870686.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{ce3a1ac43e8579db65cd.js → c854c3bb4440fd942c12.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{9cbed3b43d7aadc7e627.js → ca88859fc69fcb4568c0.js} +1 -1
  21. package/assets/esri/core/workers/chunks/e7209654ecdfde926272.js +1 -0
  22. package/assets/esri/core/workers/chunks/e82b1f91465d569012c4.js +1 -0
  23. package/assets/esri/core/workers/chunks/e9311386f58f3cb95c22.js +1 -0
  24. package/assets/esri/core/workers/chunks/{45485d8f0b0e0e0a6365.js → efec0f496491a0647051.js} +1 -1
  25. package/chunks/RealisticTree.glsl.js +6 -6
  26. package/colorUtils.js +1 -1
  27. package/config.js +1 -1
  28. package/core/Evented.js +1 -1
  29. package/interfaces.d.ts +2 -2
  30. package/kernel.js +1 -1
  31. package/layers/CatalogLayer.js +1 -1
  32. package/layers/FeatureLayer.js +1 -1
  33. package/layers/GeoJSONLayer.js +1 -1
  34. package/layers/GraphicsLayer.js +1 -1
  35. package/layers/OGCFeatureLayer.js +1 -1
  36. package/layers/SceneLayer.js +1 -1
  37. package/layers/SubtypeGroupLayer.js +1 -1
  38. package/layers/graphics/data/FeatureStore.js +1 -1
  39. package/layers/graphics/dehydratedPoint.js +1 -1
  40. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  41. package/layers/mixins/SublayersOwner.js +1 -1
  42. package/layers/support/LayerContingentValuesCache.js +1 -1
  43. package/networks/UtilityNetwork.js +1 -1
  44. package/package.json +1 -1
  45. package/portal/support/layersLoader.js +1 -1
  46. package/rest/networks/support/CircuitTraceResult.js +1 -1
  47. package/support/revision.js +1 -1
  48. package/views/2d/engine/ManagedCanvas.js +1 -1
  49. package/views/2d/engine/imagery/RasterTileContainer.js +1 -1
  50. package/views/2d/engine/webgl/Profiler.js +1 -1
  51. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  52. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ReprojectTechnique.js +1 -1
  53. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterColorizerShader.js +1 -1
  54. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
  55. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  56. package/views/2d/layers/features/FeatureSourceEventLog.js +1 -1
  57. package/views/2d/layers/features/processor/AAggregateStrategy.js +1 -1
  58. package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
  59. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  60. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  61. package/views/2d/support/hitTestUtils.js +1 -1
  62. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  63. package/views/3d/analysis/VolumeMeasurement/CutFillVolumeMeasurementController.js +1 -1
  64. package/views/3d/analysis/VolumeMeasurement/CutFillVolumeMeasurementVisualization.js +5 -0
  65. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementConfiguration.js +5 -0
  66. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  67. package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
  68. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  69. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  70. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  71. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  72. package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
  73. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  74. package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
  75. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  76. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  77. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  78. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  79. package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
  80. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  81. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  82. package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
  83. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  84. package/views/3d/layers/i3s/I3SQueryFeatureStore.js +1 -1
  85. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  86. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  87. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  88. package/views/3d/state/ViewState.js +1 -1
  89. package/views/3d/support/CombinedElevationProvider.js +1 -1
  90. package/views/3d/support/pointsOfInterest/ContentGeometryUpdates.js +1 -1
  91. package/views/3d/support/pointsOfInterest/SurfaceGeometryUpdates.js +1 -1
  92. package/views/3d/terrain/OverlayRenderer.js +1 -1
  93. package/views/3d/terrain/TerrainSurface.js +1 -1
  94. package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
  95. package/views/3d/webgl-engine/lib/ChangeSet.js +1 -1
  96. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  97. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  98. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  99. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  100. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  101. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  102. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  103. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  104. package/views/3d/webgl-engine/lib/rendererUtils.js +1 -1
  105. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  106. package/views/DOMContainer.js +1 -1
  107. package/views/Viewport2DMixin.js +1 -1
  108. package/views/draw/DrawManipulator.js +1 -1
  109. package/views/draw/DrawOperation.js +1 -1
  110. package/views/interactive/snapping/SnappingManager.js +1 -1
  111. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  112. package/views/layers/FeatureLayerView.js +1 -1
  113. package/views/layers/support/editableLayerViews.js +1 -1
  114. package/views/support/Scheduler.js +1 -1
  115. package/widgets/Editor/EditorViewModel.js +1 -1
  116. package/widgets/Editor/workflowUtils.js +1 -1
  117. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  118. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  119. package/widgets/Search/SearchViewModel.js +1 -1
  120. package/widgets/support/GeolocationPositioning.js +1 -1
  121. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  122. package/assets/esri/core/workers/chunks/230e7b817ae16505ccf0.js +0 -1
  123. package/assets/esri/core/workers/chunks/450a7ebe2535a55c5193.js +0 -1
  124. package/assets/esri/core/workers/chunks/4599f5cebbafddb6720e.js +0 -1
  125. package/assets/esri/core/workers/chunks/676fec273f2f660a614d.js +0 -1
  126. package/assets/esri/core/workers/chunks/6aced8e446beceefaf2c.js +0 -1
  127. package/assets/esri/core/workers/chunks/9f459805a6698708830a.js +0 -1
  128. package/assets/esri/core/workers/chunks/a4104b21f2b282dfb14f.js +0 -1
  129. package/assets/esri/core/workers/chunks/cab3199d37411c8ed074.js +0 -1
  130. package/assets/esri/core/workers/chunks/fbfe2195ba87d18bc37a.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../Graphic.js";import i from"../../core/Accessor.js";import o from"../../core/Error.js";import r from"../../core/Evented.js";import{throwIfAborted as a,isAbortError as n}from"../../core/promiseUtils.js";import{watch as s,initial as l}from"../../core/reactiveUtils.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as c}from"../../core/accessorSupport/decorators/subclass.js";import m from"../../symbols/CIMSymbol.js";import{supported as d,positionToPoint as y}from"./geolocationUtils.js";import g from"./GoTo.js";const h=2500,A={type:"CIMPictureMarker",primitiveName:"headingOverride",enable:!0,anchorPoint:{x:0,y:-.5},anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:36,billboardMode3D:"FaceNearPlane",invertBackfaceTexture:!0,scaleX:1,textureFilter:"Picture",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAkCAYAAACe0YppAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAYaSURBVHgBvVfNb1VFFD/nzP16xRYJKYREEiJoDLLShQkrSNzoHv8I2QgxwY8FJWHhxoVxISEu2AordWNiQjAxEBeEsKAmhCCwkPDRAn1t33v33jnH37n3Fam0pa8kTjOde+/MnN/5+J0z85jW08yYTpxgfzx0bS+fO0R0YHqyeb9w7YEtLTv+9rSdOH7ciNleJJJX/Do1JQ3AltdlT35fiN6gG8kD8akdmzO+6w/zM7wdw725rUY78DBXtmATA6PZntFgm9Kjm6o/HFJpdi5Xhp+16sDBC+H+gUmZfjIXHKC+35U42ZHZfpe30BZS7okNFnhu8wTRk2ek5LEV2q+N8nEj6yuNVRjHddftrt4ahyJbOxF+Uppi/Rf47NlA05Pp9vkyRNkkD8sqUJHwOGfSpYFQFXhTJryQBaZSeAxbFus+U1K0gJm2oy3QKwuZzqeuSK5kpW6BEsE6+nCsAHDXQWuaOljzU8uP/ToxUW4KcwKg8QzOSdFL6Swm0hurAC7N2qIW7ncwNgYKF4la3/w7RnzrUK29KseXWqmTKXGl45Zrd9CLrsSjr96fcw4kS46mTsJznSTrVBR6VQJQdDbpZTWexxgCYCFz30cquD8oYVQgtUAUzfo8wGtqGoNRFmFZ1KKulJMQu3Vpm/I8Pup3ekvES57GaabXo4lsszEA6zrkhcmAAkBNshi59O9wVsokBLZUCQAxllXVBkyCDRQuTlLLiLSEqw3gfUqU0kVdsKymsnzyPLm8fXZxDxVZgvUhg9QyaKDI7AhpSlRVEaA83JM+/V8pGO0PMTHyZwra9FQVk4i1e0D6dPK9v5agkmXAhc0Bw5MjlAQQE0lSDbUmbBX4kGfsiiQWuSZtdle1S4F73cUKJgviyw4mmmqlVSoR/FAK2d1noWQZ8N79MySw0tgNzhN00jRFaPM6y3IyLWBxXuOdvMfhaIy1MQctmvnEMGrMq2Y/ekC3dHF14I84gmZP2s0pgiJFHVwYhIIrMC1zgT4fQgsS0CG48LWtslAsgeKZK5U1c5Slj+nEvvJZqOWubr5ks8iE3bVqCMQCz4p5aiUqpMrOdHz2qLFTxAMSPLwY8WpmntNwrXIMCWvESGH+7n9hVi6ZJ6/sR5gnycFFQgsCQEEB8T9TbsCGy4PrZrEBjGyIt4EApoGRXWKP6Mt3fnvOvhWBjR4gdjtJEDmGQQkBSCS6Teys5qECABTPWOBwcPWgAPIU+E2+Rq3J8lsrQawMHNPbqAXvRqasWcMB/mK42N3twM6/FsbJTZK2Fru15K7niPVIp6RHn++9vRKErAg8ta+MFq4LBxAJKY1EajpxLj5KUzFzOMTni4btxoUzXPzIIOwLnEPxGVqlyWoTdO/WNRUXJhDmAgNAJVd0eABj8FTCvLbpEnxdOycJlFNXVq6MDvzthwOQ654LaMGGVofQWIWtXhM9xaCQp85QIZFMPXcpuUPH3uquJj6htVonvySD+KY6c2AulPAzHdVaZElvPCGBgvkIRUECr1J4qmV6LdGyJvAnu+94HZMla1Eg1AuGVyQWnNCwzqsUXK5+AIsUyPRc1Rbpi93X1xK9tsXtkj9U7INWSWvU0DaZ6OlVAmUDiqgbrwY2Z3ThRVKFXrgi/R0x9GMplxAyER6ynAtZin1DQoLVznLMU+/mywMf3dlDpbyMlbjLQDhLw/Sh24sm5dhTrlHKgS/T0X2zLw/sLeGr5OlEbg2uHwAFw5reKuKsJj8kcIj0zq9H5PqAj+z6E8y+YRIaUhnAEOrcWgv9m3shQ1H7mz5duVJtDLhZqZcNlrEDwXKwCzncdFg+PJeVf1m3uPUupLR7Hq6tHNyLhw1TCmdGbm0BmaUjr63LzaMBH943D9f+yO5uZ7HfcLktqdwqMU0jtPUDN6vDOfzgKFrXtta6q83vfHU4M5KoURbT4W3zsPIqrgQFO8GozV8ocZGOTN4dRdRowN6CnOLmKkk5t7H1i+HPNGJj2kj7buYajoRXh2+36eOt+2nENrrF3ozODEmFC0D4hjbQNgYc+DSYjd9qqGSJXqL/tZ16/DWdfvw9bbCt41hcpYn9RAEX9Q22fwC74ny5v9iplQAAAABJRU5ErkJggg=="},u=new m({data:{type:"CIMSymbolReference",symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:14,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:17,ymax:17},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[8.5,0],[7.02,.13],[5.59,.51],[4.25,1.14],[3.04,1.99],[1.99,3.04],[1.14,4.25],[.51,5.59],[.13,7.02],[0,8.5],[.13,9.98],[.51,11.41],[1.14,12.75],[1.99,13.96],[3.04,15.01],[4.25,15.86],[5.59,16.49],[7.02,16.87],[8.5,17],[9.98,16.87],[11.41,16.49],[12.75,15.86],[13.96,15.01],[15.01,13.96],[15.86,12.75],[16.49,11.41],[16.87,9.98],[17,8.5],[16.87,7.02],[16.49,5.59],[15.86,4.25],[15.01,3.04],[13.96,1.99],[12.75,1.14],[11.41,.51],[9.98,.13],[8.5,0]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:"Round",joinStyle:"Round",lineStyle3D:"Strip",miterLimit:10,width:2,color:[255,255,255,255]},{type:"CIMSolidFill",enable:!0,color:[0,122,194,255]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:16,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:17,ymax:17},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[8.5,0],[7.02,.13],[5.59,.51],[4.25,1.14],[3.04,1.99],[1.99,3.04],[1.14,4.25],[.51,5.59],[.13,7.02],[0,8.5],[.13,9.98],[.51,11.41],[1.14,12.75],[1.99,13.96],[3.04,15.01],[4.25,15.86],[5.59,16.49],[7.02,16.87],[8.5,17],[9.98,16.87],[11.41,16.49],[12.75,15.86],[13.96,15.01],[15.01,13.96],[15.86,12.75],[16.49,11.41],[16.87,9.98],[17,8.5],[16.87,7.02],[16.49,5.59],[15.86,4.25],[15.01,3.04],[13.96,1.99],[12.75,1.14],[11.41,.51],[9.98,.13],[8.5,0]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:"Round",joinStyle:"Round",lineStyle3D:"Strip",miterLimit:10,width:0,color:[255,255,255,255]},{type:"CIMSolidFill",enable:!0,color:[0,0,0,66]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0,offsetX:0,offsetY:-1},A],angleAlignment:"Map"},primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"headingOverride",propertyName:"Rotation",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Rotation override",expression:"360 - $feature.heading",returnType:"Default"}},{type:"CIMPrimitiveOverride",primitiveName:"headingOverride",propertyName:"TintColor",valueExpressionInfo:{type:"CIMExpressionInfo",title:"TintColor override",expression:"IIF(IsEmpty($feature.heading), [255, 255, 255, 0], [255, 255, 255, 1])",returnType:"Default"}}]}});let v=class extends(g(r.EventedMixin(i))){constructor(){super(...arguments),this._geolocationUsable=!0,this.geolocationOptions=null,this.goToLocationEnabled=!0,this.graphic=new t({symbol:u}),this.scale=null,this.rotationEnabled=!0,this.view=null}initialize(){d()||(this._geolocationUsable=!1),this.addHandles([s(()=>this.view?.type,()=>this._handleViewTypeChange(),l)])}destroy(){this._clearGraphic(),this.view=null}_clearGraphic(){const{view:e,graphic:t}=this;e&&t&&e.graphics.remove(t)}_addGraphic(){const{view:e,graphic:t}=this;e?.graphics&&t&&!e.graphics.includes(t)&&e.graphics.push(t)}_handleViewTypeChange(){A.enable="2d"===this.view?.type}_getScaleWithinConstraints(e,t){if(!t)return e;if("2d"===t.type){const{effectiveMaxScale:i,effectiveMinScale:o}=t.constraints;return Math.min(o,Math.max(i,e))}return e}_getScale(e){const{scale:t}=this,i="number"==typeof t?t:h;return this._getScaleWithinConstraints(i,e)}_getHeading(e,t){const i=t?.spatialReference,o=i?.isWebMercator||i?.isGeographic,r=e.coords?.heading;return!o||"number"!=typeof r||isNaN(r)||r<0||r>360?null:r}_addHeading(e){const{heading:t,target:i,view:o}=e;o&&null!==t&&("3d"!==o.type?"2d"===o.type&&(i.rotation=360-t):i.heading=t)}async _animatePoint(e,t,i,o){const{view:r}=this;if(!this.goToLocationEnabled||!r)return;const n={target:e,scale:t};this.rotationEnabled&&this._addHeading({heading:i,target:n,view:r});const s={signal:o.signal};a(s),await this.callGoTo({target:n,options:s})}async updatePosition(e,t){try{const i=this.view,o=await y({position:e,view:i},{signal:t.signal}),{graphic:r}=this,{timestamp:a,coords:n}=e,{accuracy:s,altitude:l,altitudeAccuracy:p,latitude:c,longitude:m,speed:d}=n,g=this._getHeading(e,i),h={timestamp:a,accuracy:s,altitude:l,altitudeAccuracy:p,heading:g,latitude:c,longitude:m,speed:d};r&&(r.geometry=o,r.attributes=h);const A=this._getScale(i);await this._animatePoint(o,A,g,t)}catch(i){if(!n(i))throw new o("geolocation-positioning:invalid-point","Cannot position invalid point",{error:i})}return e}};e([p()],v.prototype,"_geolocationUsable",void 0),e([p()],v.prototype,"geolocationOptions",void 0),e([p()],v.prototype,"goToLocationEnabled",void 0),e([p({type:t,nonNullable:!0})],v.prototype,"graphic",void 0),e([p()],v.prototype,"scale",void 0),e([p()],v.prototype,"rotationEnabled",void 0),e([p()],v.prototype,"view",void 0),v=e([c("esri.widgets.support.GeolocationPositioning")],v);const b=v;export{b as default};
5
+ import{__decorate as e}from"tslib";import t from"../../Graphic.js";import i from"../../core/Error.js";import o from"../../core/Evented.js";import{throwIfAborted as r,isAbortError as a}from"../../core/promiseUtils.js";import{watch as n,initial as s}from"../../core/reactiveUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import c from"../../symbols/CIMSymbol.js";import{supported as d,positionToPoint as m}from"./geolocationUtils.js";import y from"./GoTo.js";const g=2500,h={type:"CIMPictureMarker",primitiveName:"headingOverride",enable:!0,anchorPoint:{x:0,y:-.5},anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:36,billboardMode3D:"FaceNearPlane",invertBackfaceTexture:!0,scaleX:1,textureFilter:"Picture",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAkCAYAAACe0YppAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAYaSURBVHgBvVfNb1VFFD/nzP16xRYJKYREEiJoDLLShQkrSNzoHv8I2QgxwY8FJWHhxoVxISEu2AordWNiQjAxEBeEsKAmhCCwkPDRAn1t33v33jnH37n3Fam0pa8kTjOde+/MnN/5+J0z85jW08yYTpxgfzx0bS+fO0R0YHqyeb9w7YEtLTv+9rSdOH7ciNleJJJX/Do1JQ3AltdlT35fiN6gG8kD8akdmzO+6w/zM7wdw725rUY78DBXtmATA6PZntFgm9Kjm6o/HFJpdi5Xhp+16sDBC+H+gUmZfjIXHKC+35U42ZHZfpe30BZS7okNFnhu8wTRk2ek5LEV2q+N8nEj6yuNVRjHddftrt4ahyJbOxF+Uppi/Rf47NlA05Pp9vkyRNkkD8sqUJHwOGfSpYFQFXhTJryQBaZSeAxbFus+U1K0gJm2oy3QKwuZzqeuSK5kpW6BEsE6+nCsAHDXQWuaOljzU8uP/ToxUW4KcwKg8QzOSdFL6Swm0hurAC7N2qIW7ncwNgYKF4la3/w7RnzrUK29KseXWqmTKXGl45Zrd9CLrsSjr96fcw4kS46mTsJznSTrVBR6VQJQdDbpZTWexxgCYCFz30cquD8oYVQgtUAUzfo8wGtqGoNRFmFZ1KKulJMQu3Vpm/I8Pup3ekvES57GaabXo4lsszEA6zrkhcmAAkBNshi59O9wVsokBLZUCQAxllXVBkyCDRQuTlLLiLSEqw3gfUqU0kVdsKymsnzyPLm8fXZxDxVZgvUhg9QyaKDI7AhpSlRVEaA83JM+/V8pGO0PMTHyZwra9FQVk4i1e0D6dPK9v5agkmXAhc0Bw5MjlAQQE0lSDbUmbBX4kGfsiiQWuSZtdle1S4F73cUKJgviyw4mmmqlVSoR/FAK2d1noWQZ8N79MySw0tgNzhN00jRFaPM6y3IyLWBxXuOdvMfhaIy1MQctmvnEMGrMq2Y/ekC3dHF14I84gmZP2s0pgiJFHVwYhIIrMC1zgT4fQgsS0CG48LWtslAsgeKZK5U1c5Slj+nEvvJZqOWubr5ks8iE3bVqCMQCz4p5aiUqpMrOdHz2qLFTxAMSPLwY8WpmntNwrXIMCWvESGH+7n9hVi6ZJ6/sR5gnycFFQgsCQEEB8T9TbsCGy4PrZrEBjGyIt4EApoGRXWKP6Mt3fnvOvhWBjR4gdjtJEDmGQQkBSCS6Teys5qECABTPWOBwcPWgAPIU+E2+Rq3J8lsrQawMHNPbqAXvRqasWcMB/mK42N3twM6/FsbJTZK2Fru15K7niPVIp6RHn++9vRKErAg8ta+MFq4LBxAJKY1EajpxLj5KUzFzOMTni4btxoUzXPzIIOwLnEPxGVqlyWoTdO/WNRUXJhDmAgNAJVd0eABj8FTCvLbpEnxdOycJlFNXVq6MDvzthwOQ654LaMGGVofQWIWtXhM9xaCQp85QIZFMPXcpuUPH3uquJj6htVonvySD+KY6c2AulPAzHdVaZElvPCGBgvkIRUECr1J4qmV6LdGyJvAnu+94HZMla1Eg1AuGVyQWnNCwzqsUXK5+AIsUyPRc1Rbpi93X1xK9tsXtkj9U7INWSWvU0DaZ6OlVAmUDiqgbrwY2Z3ThRVKFXrgi/R0x9GMplxAyER6ynAtZin1DQoLVznLMU+/mywMf3dlDpbyMlbjLQDhLw/Sh24sm5dhTrlHKgS/T0X2zLw/sLeGr5OlEbg2uHwAFw5reKuKsJj8kcIj0zq9H5PqAj+z6E8y+YRIaUhnAEOrcWgv9m3shQ1H7mz5duVJtDLhZqZcNlrEDwXKwCzncdFg+PJeVf1m3uPUupLR7Hq6tHNyLhw1TCmdGbm0BmaUjr63LzaMBH943D9f+yO5uZ7HfcLktqdwqMU0jtPUDN6vDOfzgKFrXtta6q83vfHU4M5KoURbT4W3zsPIqrgQFO8GozV8ocZGOTN4dRdRowN6CnOLmKkk5t7H1i+HPNGJj2kj7buYajoRXh2+36eOt+2nENrrF3ozODEmFC0D4hjbQNgYc+DSYjd9qqGSJXqL/tZ16/DWdfvw9bbCt41hcpYn9RAEX9Q22fwC74ny5v9iplQAAAABJRU5ErkJggg=="},A=new c({data:{type:"CIMSymbolReference",symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:14,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:17,ymax:17},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[8.5,0],[7.02,.13],[5.59,.51],[4.25,1.14],[3.04,1.99],[1.99,3.04],[1.14,4.25],[.51,5.59],[.13,7.02],[0,8.5],[.13,9.98],[.51,11.41],[1.14,12.75],[1.99,13.96],[3.04,15.01],[4.25,15.86],[5.59,16.49],[7.02,16.87],[8.5,17],[9.98,16.87],[11.41,16.49],[12.75,15.86],[13.96,15.01],[15.01,13.96],[15.86,12.75],[16.49,11.41],[16.87,9.98],[17,8.5],[16.87,7.02],[16.49,5.59],[15.86,4.25],[15.01,3.04],[13.96,1.99],[12.75,1.14],[11.41,.51],[9.98,.13],[8.5,0]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:"Round",joinStyle:"Round",lineStyle3D:"Strip",miterLimit:10,width:2,color:[255,255,255,255]},{type:"CIMSolidFill",enable:!0,color:[0,122,194,255]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:16,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:17,ymax:17},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[8.5,0],[7.02,.13],[5.59,.51],[4.25,1.14],[3.04,1.99],[1.99,3.04],[1.14,4.25],[.51,5.59],[.13,7.02],[0,8.5],[.13,9.98],[.51,11.41],[1.14,12.75],[1.99,13.96],[3.04,15.01],[4.25,15.86],[5.59,16.49],[7.02,16.87],[8.5,17],[9.98,16.87],[11.41,16.49],[12.75,15.86],[13.96,15.01],[15.01,13.96],[15.86,12.75],[16.49,11.41],[16.87,9.98],[17,8.5],[16.87,7.02],[16.49,5.59],[15.86,4.25],[15.01,3.04],[13.96,1.99],[12.75,1.14],[11.41,.51],[9.98,.13],[8.5,0]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:"Round",joinStyle:"Round",lineStyle3D:"Strip",miterLimit:10,width:0,color:[255,255,255,255]},{type:"CIMSolidFill",enable:!0,color:[0,0,0,66]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0,offsetX:0,offsetY:-1},h],angleAlignment:"Map"},primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"headingOverride",propertyName:"Rotation",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Rotation override",expression:"360 - $feature.heading",returnType:"Default"}},{type:"CIMPrimitiveOverride",primitiveName:"headingOverride",propertyName:"TintColor",valueExpressionInfo:{type:"CIMExpressionInfo",title:"TintColor override",expression:"IIF(IsEmpty($feature.heading), [255, 255, 255, 0], [255, 255, 255, 1])",returnType:"Default"}}]}});let u=class extends(y(o.EventedAccessor)){constructor(){super(...arguments),this._geolocationUsable=!0,this.geolocationOptions=null,this.goToLocationEnabled=!0,this.graphic=new t({symbol:A}),this.scale=null,this.rotationEnabled=!0,this.view=null}initialize(){d()||(this._geolocationUsable=!1),this.addHandles([n(()=>this.view?.type,()=>this._handleViewTypeChange(),s)])}destroy(){this._clearGraphic(),this.view=null}_clearGraphic(){const{view:e,graphic:t}=this;e&&t&&e.graphics.remove(t)}_addGraphic(){const{view:e,graphic:t}=this;e?.graphics&&t&&!e.graphics.includes(t)&&e.graphics.push(t)}_handleViewTypeChange(){h.enable="2d"===this.view?.type}_getScaleWithinConstraints(e,t){if(!t)return e;if("2d"===t.type){const{effectiveMaxScale:i,effectiveMinScale:o}=t.constraints;return Math.min(o,Math.max(i,e))}return e}_getScale(e){const{scale:t}=this,i="number"==typeof t?t:g;return this._getScaleWithinConstraints(i,e)}_getHeading(e,t){const i=t?.spatialReference,o=i?.isWebMercator||i?.isGeographic,r=e.coords?.heading;return!o||"number"!=typeof r||isNaN(r)||r<0||r>360?null:r}_addHeading(e){const{heading:t,target:i,view:o}=e;o&&null!==t&&("3d"!==o.type?"2d"===o.type&&(i.rotation=360-t):i.heading=t)}async _animatePoint(e,t,i,o){const{view:a}=this;if(!this.goToLocationEnabled||!a)return;const n={target:e,scale:t};this.rotationEnabled&&this._addHeading({heading:i,target:n,view:a});const s={signal:o.signal};r(s),await this.callGoTo({target:n,options:s})}async updatePosition(e,t){try{const i=this.view,o=await m({position:e,view:i},{signal:t.signal}),{graphic:r}=this,{timestamp:a,coords:n}=e,{accuracy:s,altitude:l,altitudeAccuracy:p,latitude:c,longitude:d,speed:y}=n,g=this._getHeading(e,i),h={timestamp:a,accuracy:s,altitude:l,altitudeAccuracy:p,heading:g,latitude:c,longitude:d,speed:y};r&&(r.geometry=o,r.attributes=h);const A=this._getScale(i);await this._animatePoint(o,A,g,t)}catch(o){if(!a(o))throw new i("geolocation-positioning:invalid-point","Cannot position invalid point",{error:o})}return e}};e([l()],u.prototype,"_geolocationUsable",void 0),e([l()],u.prototype,"geolocationOptions",void 0),e([l()],u.prototype,"goToLocationEnabled",void 0),e([l({type:t,nonNullable:!0})],u.prototype,"graphic",void 0),e([l()],u.prototype,"scale",void 0),e([l()],u.prototype,"rotationEnabled",void 0),e([l()],u.prototype,"view",void 0),u=e([p("esri.widgets.support.GeolocationPositioning")],u);const v=u;export{v as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import e from"../../../Graphic.js";import o from"../../../core/Accessor.js";import r from"../../../core/Clonable.js";import s from"../../../core/Collection.js";import i from"../../../core/Identifiable.js";import{getOrCreateMapValue as a}from"../../../core/MapUtils.js";import{ignoreAbortErrors as n,debounce as c}from"../../../core/promiseUtils.js";import l from"../../../core/ReactiveMap.js";import{watch as u,initial as y}from"../../../core/reactiveUtils.js";import{sqlIn as d}from"../../../core/sql.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{queryAllJSON as m}from"../../../layers/support/featureQueryAll.js";import{isSubtypeSublayer as g,isSubtypeGroupLayer as b}from"../../../layers/support/layerUtils.js";import _ from"../../../rest/networks/support/NetworkElement.js";import w from"../../../rest/support/FeatureSet.js";import A from"../../../rest/support/Query.js";import{featureUtilityNetworkFields as F}from"../../Feature/FeatureUtilityNetworkAssociations/resources.js";import{findUtilityNetwork as f}from"../../Feature/support/featureUtils.js";import{getFeatureTitle as C}from"./utils/getFeatureTitle.js";const I=100;let v=class extends(r.ClonableMixin(i.IdentifiableMixin(o))){constructor(t){super(t),this._loaded=!1,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.networkSourceIdsInUse=new Set,this.source="popup",this.description=null,this.graphic=null,this.layer=null,this.map=null,this.featureCount=0,this.associationTypes=null,this.showAllEnabled=!1,this.title=null,this.attachmentsFeatureCount=0,this.structureFeatureCount=0,this.contentFeatureCount=0,this.containerFeatureCount=0,this.connectivityFeatureCount=0,this._queryOpenAssociationType=async()=>{this.activeAssociationType&&await this._queryDebounced(this.activeAssociationType)},this._cancelQuery=()=>{const{_queryAbortController:t}=this;t&&t.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{const{_queryFeatureCountAbortController:t}=this;t&&t.abort(),this._queryFeatureCountAbortController=null},this._queryController=async t=>{this._cancelQuery();const e=new AbortController;this._queryAbortController=e,await n(this._query(t)),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();const t=new AbortController;this._queryFeatureCountAbortController=t,await n(this._queryFeatureCount()),this._queryFeatureCountAbortController===t&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryDebounced=c(this._queryController,I),this._queryFeatureCountDebounced=c(this._queryFeatureCountController,I)}initialize(){this.addHandles([u(()=>[this.graphic,this.layer,this.map,this.associationTypes,this.objectId,this.globalId,this.canQuery],()=>this.refresh(),y),u(()=>this.activeAssociationType,t=>this._queryDebounced(t),y)])}destroy(){this._cancelQuery(),this._cancelQueryFeatureCount(),this._destroyAssociatedFeatureViewModels()}get supportsCacheHint(){return!!this.layer?.capabilities?.query?.supportsCacheHint}get canLoad(){return!!this.map&&!!this.associationTypes&&"string"==typeof this.globalId}get canQuery(){const t=this.layer?.capabilities?.query;return!!this.associationTypes&&"string"==typeof this.globalId&&!!t?.supportsPagination}set displayCount(t){const e=0,o=3;this._set("displayCount",Math.max(t??o,e))}get displayCount(){return this._get("displayCount")}get objectId(){return(this.objectIdField&&this.graphic?.attributes?.[this.objectIdField])??null}get objectIdField(){return this.layer?.objectIdField||null}get globalId(){return(this.globalIdField&&this.graphic?.attributes?.[this.globalIdField])??null}get globalIdField(){const{layer:t}=this;return t?.globalIdField}get activeAssociationType(){return this._get("activeAssociationType")}set activeAssociationType(t){t&&!this.associationTypes.includes(t)||this._set("activeAssociationType",t)}get state(){const{_queryAbortController:t,_queryFeatureCountAbortController:e,_queryPageAbortController:o,canQuery:r,_loaded:s,canLoad:i,source:a}=this;return e||i&&!s?"loading":t||o?"querying":!r||"popup"===a&&0===this.featureCount?"disabled":"ready"}get utilityNetwork(){const{layer:t,map:e}=this;if(!t?.loaded||!e)return null;const o=g(t)?t.parent:t;return f(e,o)}get attachmentsAssociations(){return this._get("attachmentsAssociations")||new s}get structureAssociations(){return this._get("structureAssociations")||new s}get contentAssociations(){return this._get("contentAssociations")||new s}get containerAssociations(){return this._get("containerAssociations")||new s}get connectivityAssociations(){return this._get("connectivityAssociations")||new s}get associationFeatures(){return this._get("associationFeatures")||new l}get associationViewModels(){return this._get("associationViewModels")||new Map}async refresh(){await this._queryFeatureCountDebounced(),await this._queryOpenAssociationType()}getFeatureCountForAssociationType(t){switch(t){case"attachment":return this.attachmentsFeatureCount;case"structure":return this.structureFeatureCount;case"content":return this.contentFeatureCount;case"container":return this.containerFeatureCount;case"connectivity":return this.connectivityFeatureCount}}_destroyAssociatedFeatureViewModels(){this.associationViewModels.forEach(t=>t.destroyAll())}async _loadUtiltyNetworks(){const t=this.map;if(!t)return;await Promise.allSettled(t.utilityNetworks?.map(async t=>{await t.load()})??[]);const e=this.utilityNetwork;if(e){const o=t=>{if("layerId"in t&&e.isUtilityLayer(t)){const o=e.getSourceIdByLayerId(t.layerId);null!==o&&this.networkSourceIdsInUse.add(o)}};this._set("networkSourceIdsInUse",new Set),t.allLayers.forEach(o),t.allTables.forEach(o)}}async _findLayersBySourceId(t){const{utilityNetwork:e,map:o}=this,r=t=>{const o=t;if(!t.url)return!1;if(o.layerId===s){return t.url.replace(/\/\d+$/,"")===e?.featureServiceUrl}return!1};await(e?.load());const s=e.getLayerIdBySourceId(t),i=o.allLayers.filter(r),a=o.allTables.filter(r),n=i.concat(a).toArray();return await Promise.allSettled(n.map(t=>t.load())),n}_clearAssociations(){this.attachmentsAssociations.removeAll(),this.structureAssociations.removeAll(),this.contentAssociations.removeAll(),this.containerAssociations.removeAll(),this.connectivityAssociations.removeAll()}_clearFeatures(){this.associationFeatures.forEach(t=>t.removeAll()),this.associationFeatures.clear()}_getAssociationsByType(t){switch(t){case"attachment":return this.attachmentsAssociations;case"structure":return this.structureAssociations;case"connectivity":return this.connectivityAssociations;case"container":return this.containerAssociations;case"content":return this.contentAssociations}}async _queryLayer(t,e,o,r,s){const i=this._getFeatureQueryWhereClause(t,e,o,r),a=new A({where:i,outFields:["*"],cacheHint:this.supportsCacheHint}),n=w.fromJSON(await m(t,a,s));return n.features.forEach(e=>{e.layer=e.sourceLayer=b(t)?t.findSublayerForFeature(e):t}),n.features}async _createAssociationFeatureObjects(t,e,o,r,s,i){if(0===t.length)return[];const a=new Map;for(const[c,l]of e){const t=await this._findLayersBySourceId(c);for(const e of t){(await this._queryLayer(e,l,r,s,i)).forEach(t=>{if("popup"===this.source?t.sourceLayer&&t.getEffectivePopupTemplate():!!t.sourceLayer){const o=a.get(t.attributes[e.globalIdField])??[];o.push(t),a.set(t.attributes[e.globalIdField],o)}})}}const n=[];return await Promise.all(t.toArray().map(async t=>{const{fromNetworkElement:e,toNetworkElement:r}=t,s=e.globalId===o?r:e,i=a.get(s.globalId)??[];await Promise.all(i.map(async e=>{const o=this.utilityNetwork?.getTerminalById(s?.terminalId)?.name,r=e.sourceLayer&&"getFeatureTitle"in e.sourceLayer?await e.sourceLayer.getFeatureTitle(e):C(e);n.push({title:r,feature:e,association:t,terminalName:o})}))})),n}_parseFeatureObjects(t,e){const o=new Map;t.forEach(t=>{const e=t?.feature,r=e.sourceLayer;a(o,r,()=>new s).add(t)});for(const[r,s]of o)this._sortFeatureObjectsByTitle(s),e.set(r,s)}_sortFeatureObjectsByTitle(t){t.sort(this._compareByFeatureTitle)}_compareByFeatureTitle(t,e){return t.title.localeCompare(e.title,void 0,{numeric:!0})}async _queryAssociations(t){const{layer:e,globalId:o,associationTypes:r,utilityNetwork:s,canQuery:i}=this;if(await Promise.allSettled([e?.load(),s?.load()]),this._clearAssociations(),!(i&&e&&r&&s&&o))return;const a=g(e)?e.parent:e,n=new _({globalId:o,networkSourceId:s.getSourceIdByLayerId(a.layerId)}),c=new Set;r.forEach(t=>{switch(t.type){case"attachment":case"structure":c.add("attachment");break;case"container":case"content":c.add("containment");break;case"connectivity":c.add("connectivity"),c.add("junction-junction-connectivity"),c.add("junction-edge-from-connectivity"),c.add("junction-edge-midspan-connectivity"),c.add("junction-edge-to-connectivity")}});const l=await(s?.queryAssociations({elements:[n],types:Array.from(c)},{signal:t?.signal})),u=new Map,y=new Map;r.forEach(t=>{y.set(t.type,t),u.set(t.type,[])}),l.forEach(t=>{const{toNetworkElement:e,fromNetworkElement:r}=t;switch(t.associationType){case"connectivity":case"junction-junction-connectivity":case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"connectivity",y))break;u.get("connectivity")?.push(e.globalId)}else{if(this._shouldDiscardNetworkElement(r,"connectivity",y))break;u.get("connectivity")?.push(r.globalId)}this.connectivityAssociations.add(t);break;case"containment":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"content",y))break;u.get("content")?.push(e.globalId),this.contentAssociations.add(t)}else{if(this._shouldDiscardNetworkElement(r,"container",y))break;u.get("container")?.push(r.globalId),this.containerAssociations.add(t)}break;case"attachment":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"attachment",y))break;u.get("attachment")?.push(e.globalId),this.attachmentsAssociations.add(t)}else{if(this._shouldDiscardNetworkElement(r,"structure",y))break;u.get("structure")?.push(r.globalId),this.structureAssociations.add(t)}}});const d=r.map(async e=>{const{associatedNetworkSourceId:o,associatedAssetGroup:r,associatedAssetType:s}=e,i=u.get(e.type),a=null!=r?await this._countAssociatedFeatures(o,i,r,s,t):i.length;switch(e.type){case"attachment":this._set("attachmentsFeatureCount",a);break;case"structure":this._set("structureFeatureCount",a);break;case"content":this._set("contentFeatureCount",a);break;case"container":this._set("containerFeatureCount",a);break;case"connectivity":this._set("connectivityFeatureCount",a)}});await Promise.allSettled(d)}async _countAssociatedFeatureCount(t,e,o,r,s){const i=this._getFeatureQueryWhereClause(t,e,o,r);return t.queryFeatureCount({where:i,outFields:["*"],returnGeometry:!1},{signal:s?.signal})}async _countAssociatedFeatures(t,e,o,r,s){if(0===e.length)return 0;const i=(await this._findLayersBySourceId(t)).map(async t=>this._countAssociatedFeatureCount(t,e,o,r,s));return(await Promise.all(i)).reduce((t,e)=>t+e,0)}async _queryAssociatedFeatures(t,e){const{layer:o,globalId:r,associationTypes:s,utilityNetwork:i,canQuery:a,associationFeatures:n}=this;if(await Promise.allSettled([o?.load(),i?.load()]),!(a&&o&&s&&i))return;const c=this._getAssociationsByType(t.type),{associatedAssetGroup:l,associatedAssetType:u}=t,y=new Map;c.forEach(t=>{const{fromNetworkElement:e,toNetworkElement:o}=t,{networkSourceId:s,elementGlobalId:i}=e.globalId===r?{networkSourceId:o.networkSourceId,elementGlobalId:o.globalId}:{networkSourceId:e.networkSourceId,elementGlobalId:e.globalId},a=y.get(s)||[];a.push(i),y.set(s,a)});const d=await this._createAssociationFeatureObjects(c,y,r,l,u,e);this._parseFeatureObjects(d,n)}async _queryFeatureCount(){await this._loadUtiltyNetworks();const{_queryFeatureCountAbortController:t,canQuery:e}=this;e?(await this._queryAssociations(t),this._set("featureCount",this.attachmentsFeatureCount+this.structureFeatureCount+this.contentFeatureCount+this.containerFeatureCount+this.connectivityFeatureCount)):this._set("featureCount",0)}async _query(t){if(!t)return;await this._loadUtiltyNetworks();const{_queryAbortController:e}=this;this._destroyAssociatedFeatureViewModels(),this._clearFeatures(),0!==this.featureCount&&(this.destroyed||await this._queryAssociatedFeatures(t,{signal:e?.signal}))}_shouldDiscardNetworkElement(t,e,o){if(!t)return!1;const{networkSourceIdsInUse:r}=this,{networkSourceId:s}=t,i=o.get(e)?.associatedNetworkSourceId,a=r.has(s);return null!=i&&i!==s||!a}_getFeatureQueryWhereClause(t,e,o,r){const s=t.globalIdField,i=t.fieldsIndex.get(F.assetGroup),a=t.fieldsIndex.get(F.assetType),n=null!=o,c=null!=r;return[s?d(s,e):null,n?`(${i?.name} = ${o})`:null,n&&c?`(${a?.name} = ${r})`:null].filter(Boolean).join(" AND ")}};t([h()],v.prototype,"_loaded",void 0),t([h()],v.prototype,"_queryAbortController",void 0),t([h()],v.prototype,"_queryPageAbortController",void 0),t([h()],v.prototype,"_queryFeatureCountAbortController",void 0),t([h({readOnly:!0})],v.prototype,"supportsCacheHint",null),t([h({readOnly:!0})],v.prototype,"canLoad",null),t([h({readOnly:!0})],v.prototype,"canQuery",null),t([h()],v.prototype,"networkSourceIdsInUse",void 0),t([h({constructOnly:!0})],v.prototype,"source",void 0),t([h()],v.prototype,"description",void 0),t([h({value:3})],v.prototype,"displayCount",null),t([h({type:e})],v.prototype,"graphic",void 0),t([h()],v.prototype,"layer",void 0),t([h()],v.prototype,"map",void 0),t([h({readOnly:!0})],v.prototype,"objectId",null),t([h({readOnly:!0})],v.prototype,"objectIdField",null),t([h({readOnly:!0})],v.prototype,"globalId",null),t([h({readOnly:!0})],v.prototype,"globalIdField",null),t([h()],v.prototype,"featureCount",void 0),t([h()],v.prototype,"associationTypes",void 0),t([h()],v.prototype,"activeAssociationType",null),t([h()],v.prototype,"showAllEnabled",void 0),t([h()],v.prototype,"state",null),t([h()],v.prototype,"title",void 0),t([h({readOnly:!0})],v.prototype,"utilityNetwork",null),t([h({readOnly:!0})],v.prototype,"attachmentsFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"structureFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"attachmentsAssociations",null),t([h({readOnly:!0})],v.prototype,"structureAssociations",null),t([h({readOnly:!0})],v.prototype,"contentFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"containerFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"contentAssociations",null),t([h({readOnly:!0})],v.prototype,"containerAssociations",null),t([h({readOnly:!0})],v.prototype,"connectivityFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"connectivityAssociations",null),t([h({readOnly:!0})],v.prototype,"associationFeatures",null),t([h({readOnly:!0})],v.prototype,"associationViewModels",null),v=t([p("esri.widgets.support.UtilityNetworkAssociations.FeatureUtilityNetworkAssociationsViewModel")],v);export{v as default};
5
+ import{__decorate as t}from"tslib";import e from"../../../Graphic.js";import o from"../../../core/Accessor.js";import r from"../../../core/Clonable.js";import s from"../../../core/Collection.js";import i from"../../../core/Identifiable.js";import{getOrCreateMapValue as a}from"../../../core/MapUtils.js";import{ignoreAbortErrors as n,debounce as c}from"../../../core/promiseUtils.js";import l from"../../../core/ReactiveMap.js";import{watch as u,initial as y}from"../../../core/reactiveUtils.js";import{sqlIn as d}from"../../../core/sql.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{queryAllJSON as m}from"../../../layers/support/featureQueryAll.js";import{isSubtypeSublayer as g,isSubtypeGroupLayer as b}from"../../../layers/support/layerUtils.js";import _ from"../../../rest/networks/support/NetworkElement.js";import w from"../../../rest/support/FeatureSet.js";import A from"../../../rest/support/Query.js";import{featureUtilityNetworkFields as F}from"../../Feature/FeatureUtilityNetworkAssociations/resources.js";import{findUtilityNetwork as f}from"../../Feature/support/featureUtils.js";import{getFeatureTitle as C}from"./utils/getFeatureTitle.js";const I=100;let v=class extends(r.ClonableMixin(i.IdentifiableMixin(o))){constructor(t){super(t),this._loaded=!1,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.networkSourceIdsInUse=new Set,this.source="popup",this.description=null,this.graphic=null,this.layer=null,this.map=null,this.featureCount=0,this.associationTypes=null,this.showAllEnabled=!1,this.title=null,this.attachmentsFeatureCount=0,this.structureFeatureCount=0,this.contentFeatureCount=0,this.containerFeatureCount=0,this.connectivityFeatureCount=0,this._queryOpenAssociationType=async()=>{this.activeAssociationType&&await this._queryDebounced(this.activeAssociationType)},this._cancelQuery=()=>{const{_queryAbortController:t}=this;t&&t.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{const{_queryFeatureCountAbortController:t}=this;t&&t.abort(),this._queryFeatureCountAbortController=null},this._queryController=async t=>{this._cancelQuery();const e=new AbortController;this._queryAbortController=e,await n(this._query(t)),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();const t=new AbortController;this._queryFeatureCountAbortController=t,await n(this._queryFeatureCount()),this._queryFeatureCountAbortController===t&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryDebounced=c(this._queryController,I),this._queryFeatureCountDebounced=c(this._queryFeatureCountController,I)}initialize(){this.addHandles([u(()=>[this.graphic,this.layer,this.map,this.associationTypes,this.objectId,this.globalId,this.canQuery],()=>this.refresh(),y),u(()=>this.activeAssociationType,t=>this._queryDebounced(t),y)])}destroy(){this._cancelQuery(),this._cancelQueryFeatureCount(),this._destroyAssociatedFeatureViewModels()}get supportsCacheHint(){return!!this.layer?.capabilities?.query?.supportsCacheHint}get canLoad(){return!!this.map&&!!this.associationTypes&&"string"==typeof this.globalId}get canQuery(){const t=this.layer?.capabilities?.query;return!!this.associationTypes&&"string"==typeof this.globalId&&!!t?.supportsPagination}set displayCount(t){const e=0,o=3;this._set("displayCount",Math.max(t??o,e))}get displayCount(){return this._get("displayCount")}get objectId(){return(this.objectIdField&&this.graphic?.attributes?.[this.objectIdField])??null}get objectIdField(){return this.layer?.objectIdField||null}get globalId(){return(this.globalIdField&&this.graphic?.attributes?.[this.globalIdField])??null}get globalIdField(){const{layer:t}=this;return t?.globalIdField}get activeAssociationType(){return this._get("activeAssociationType")}set activeAssociationType(t){t&&!this.associationTypes.includes(t)||this._set("activeAssociationType",t)}get state(){const{_queryAbortController:t,_queryFeatureCountAbortController:e,_queryPageAbortController:o,canQuery:r,_loaded:s,canLoad:i,source:a}=this;return e||i&&!s?"loading":t||o?"querying":!r||"popup"===a&&0===this.featureCount?"disabled":"ready"}get utilityNetwork(){const{layer:t,map:e}=this;if(!t?.loaded||!e)return null;const o=g(t)?t.parent:t;return f(e,o)}get attachmentsAssociations(){return this._get("attachmentsAssociations")||new s}get structureAssociations(){return this._get("structureAssociations")||new s}get contentAssociations(){return this._get("contentAssociations")||new s}get containerAssociations(){return this._get("containerAssociations")||new s}get connectivityAssociations(){return this._get("connectivityAssociations")||new s}get associationFeatures(){return this._get("associationFeatures")||new l}get associationViewModels(){return this._get("associationViewModels")||new Map}async refresh(){await this._queryFeatureCountDebounced(),await this._queryOpenAssociationType()}getFeatureCountForAssociationType(t){switch(t){case"attachment":return this.attachmentsFeatureCount;case"structure":return this.structureFeatureCount;case"content":return this.contentFeatureCount;case"container":return this.containerFeatureCount;case"connectivity":return this.connectivityFeatureCount}}_destroyAssociatedFeatureViewModels(){this.associationViewModels.forEach(t=>t.destroyAll())}async _loadUtiltyNetworks(){const t=this.map;if(!t)return;await Promise.allSettled(t.utilityNetworks?.map(async t=>{await t.load()})??[]);const e=this.utilityNetwork;if(e){const o=t=>{if("layerId"in t&&e.isUtilityLayer(t)){const o=null!=t.layerId?e.getSourceIdByLayerId(t.layerId):null;null!=o&&this.networkSourceIdsInUse.add(o)}};this._set("networkSourceIdsInUse",new Set),t.allLayers.forEach(o),t.allTables.forEach(o)}}async _findLayersBySourceId(t){const{utilityNetwork:e,map:o}=this,r=t=>{const o=t;if(!t.url)return!1;if(o.layerId===s){return t.url.replace(/\/\d+$/,"")===e?.featureServiceUrl}return!1};await(e?.load());const s=e.getLayerIdBySourceId(t),i=o.allLayers.filter(r),a=o.allTables.filter(r),n=i.concat(a).toArray();return await Promise.allSettled(n.map(t=>t.load())),n}_clearAssociations(){this.attachmentsAssociations.removeAll(),this.structureAssociations.removeAll(),this.contentAssociations.removeAll(),this.containerAssociations.removeAll(),this.connectivityAssociations.removeAll()}_clearFeatures(){this.associationFeatures.forEach(t=>t.removeAll()),this.associationFeatures.clear()}_getAssociationsByType(t){switch(t){case"attachment":return this.attachmentsAssociations;case"structure":return this.structureAssociations;case"connectivity":return this.connectivityAssociations;case"container":return this.containerAssociations;case"content":return this.contentAssociations}}async _queryLayer(t,e,o,r,s){const i=this._getFeatureQueryWhereClause(t,e,o,r),a=new A({where:i,outFields:["*"],cacheHint:this.supportsCacheHint}),n=w.fromJSON(await m(t,a,s));return n.features.forEach(e=>{e.layer=e.sourceLayer=b(t)?t.findSublayerForFeature(e):t}),n.features}async _createAssociationFeatureObjects(t,e,o,r,s,i){if(0===t.length)return[];const a=new Map;for(const[c,l]of e){const t=await this._findLayersBySourceId(c);for(const e of t){(await this._queryLayer(e,l,r,s,i)).forEach(t=>{if("popup"===this.source?t.sourceLayer&&t.getEffectivePopupTemplate():!!t.sourceLayer){const o=a.get(t.attributes[e.globalIdField])??[];o.push(t),a.set(t.attributes[e.globalIdField],o)}})}}const n=[];return await Promise.all(t.toArray().map(async t=>{const{fromNetworkElement:e,toNetworkElement:r}=t,s=e.globalId===o?r:e,i=a.get(s.globalId)??[];await Promise.all(i.map(async e=>{const o=this.utilityNetwork?.getTerminalById(s?.terminalId)?.name,r=e.sourceLayer&&"getFeatureTitle"in e.sourceLayer?await e.sourceLayer.getFeatureTitle(e):C(e);n.push({title:r,feature:e,association:t,terminalName:o})}))})),n}_parseFeatureObjects(t,e){const o=new Map;t.forEach(t=>{const e=t?.feature,r=e.sourceLayer;a(o,r,()=>new s).add(t)});for(const[r,s]of o)this._sortFeatureObjectsByTitle(s),e.set(r,s)}_sortFeatureObjectsByTitle(t){t.sort(this._compareByFeatureTitle)}_compareByFeatureTitle(t,e){return t.title.localeCompare(e.title,void 0,{numeric:!0})}async _queryAssociations(t){const{layer:e,globalId:o,associationTypes:r,utilityNetwork:s,canQuery:i}=this;if(await Promise.allSettled([e?.load(),s?.load()]),this._clearAssociations(),!(i&&e&&r&&s&&o))return;const a=g(e)?e.parent:e,n=new _({globalId:o,networkSourceId:s.getSourceIdByLayerId(a.layerId)}),c=new Set;r.forEach(t=>{switch(t.type){case"attachment":case"structure":c.add("attachment");break;case"container":case"content":c.add("containment");break;case"connectivity":c.add("connectivity"),c.add("junction-junction-connectivity"),c.add("junction-edge-from-connectivity"),c.add("junction-edge-midspan-connectivity"),c.add("junction-edge-to-connectivity")}});const l=await(s?.queryAssociations({elements:[n],types:Array.from(c)},{signal:t?.signal})),u=new Map,y=new Map;r.forEach(t=>{y.set(t.type,t),u.set(t.type,[])}),l.forEach(t=>{const{toNetworkElement:e,fromNetworkElement:r}=t;switch(t.associationType){case"connectivity":case"junction-junction-connectivity":case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"connectivity",y))break;u.get("connectivity")?.push(e.globalId)}else{if(this._shouldDiscardNetworkElement(r,"connectivity",y))break;u.get("connectivity")?.push(r.globalId)}this.connectivityAssociations.add(t);break;case"containment":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"content",y))break;u.get("content")?.push(e.globalId),this.contentAssociations.add(t)}else{if(this._shouldDiscardNetworkElement(r,"container",y))break;u.get("container")?.push(r.globalId),this.containerAssociations.add(t)}break;case"attachment":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"attachment",y))break;u.get("attachment")?.push(e.globalId),this.attachmentsAssociations.add(t)}else{if(this._shouldDiscardNetworkElement(r,"structure",y))break;u.get("structure")?.push(r.globalId),this.structureAssociations.add(t)}}});const d=r.map(async e=>{const{associatedNetworkSourceId:o,associatedAssetGroup:r,associatedAssetType:s}=e,i=u.get(e.type),a=null!=r?await this._countAssociatedFeatures(o,i,r,s,t):i.length;switch(e.type){case"attachment":this._set("attachmentsFeatureCount",a);break;case"structure":this._set("structureFeatureCount",a);break;case"content":this._set("contentFeatureCount",a);break;case"container":this._set("containerFeatureCount",a);break;case"connectivity":this._set("connectivityFeatureCount",a)}});await Promise.allSettled(d)}async _countAssociatedFeatureCount(t,e,o,r,s){const i=this._getFeatureQueryWhereClause(t,e,o,r);return t.queryFeatureCount({where:i,outFields:["*"],returnGeometry:!1},{signal:s?.signal})}async _countAssociatedFeatures(t,e,o,r,s){if(0===e.length)return 0;const i=(await this._findLayersBySourceId(t)).map(async t=>this._countAssociatedFeatureCount(t,e,o,r,s));return(await Promise.all(i)).reduce((t,e)=>t+e,0)}async _queryAssociatedFeatures(t,e){const{layer:o,globalId:r,associationTypes:s,utilityNetwork:i,canQuery:a,associationFeatures:n}=this;if(await Promise.allSettled([o?.load(),i?.load()]),!(a&&o&&s&&i))return;const c=this._getAssociationsByType(t.type),{associatedAssetGroup:l,associatedAssetType:u}=t,y=new Map;c.forEach(t=>{const{fromNetworkElement:e,toNetworkElement:o}=t,{networkSourceId:s,elementGlobalId:i}=e.globalId===r?{networkSourceId:o.networkSourceId,elementGlobalId:o.globalId}:{networkSourceId:e.networkSourceId,elementGlobalId:e.globalId},a=y.get(s)||[];a.push(i),y.set(s,a)});const d=await this._createAssociationFeatureObjects(c,y,r,l,u,e);this._parseFeatureObjects(d,n)}async _queryFeatureCount(){await this._loadUtiltyNetworks();const{_queryFeatureCountAbortController:t,canQuery:e}=this;e?(await this._queryAssociations(t),this._set("featureCount",this.attachmentsFeatureCount+this.structureFeatureCount+this.contentFeatureCount+this.containerFeatureCount+this.connectivityFeatureCount)):this._set("featureCount",0)}async _query(t){if(!t)return;await this._loadUtiltyNetworks();const{_queryAbortController:e}=this;this._destroyAssociatedFeatureViewModels(),this._clearFeatures(),0!==this.featureCount&&(this.destroyed||await this._queryAssociatedFeatures(t,{signal:e?.signal}))}_shouldDiscardNetworkElement(t,e,o){if(!t)return!1;const{networkSourceIdsInUse:r}=this,{networkSourceId:s}=t,i=o.get(e)?.associatedNetworkSourceId,a=r.has(s);return null!=i&&i!==s||!a}_getFeatureQueryWhereClause(t,e,o,r){const s=t.globalIdField,i=t.fieldsIndex.get(F.assetGroup),a=t.fieldsIndex.get(F.assetType),n=null!=o,c=null!=r;return[s?d(s,e):null,n?`(${i?.name} = ${o})`:null,n&&c?`(${a?.name} = ${r})`:null].filter(Boolean).join(" AND ")}};t([h()],v.prototype,"_loaded",void 0),t([h()],v.prototype,"_queryAbortController",void 0),t([h()],v.prototype,"_queryPageAbortController",void 0),t([h()],v.prototype,"_queryFeatureCountAbortController",void 0),t([h({readOnly:!0})],v.prototype,"supportsCacheHint",null),t([h({readOnly:!0})],v.prototype,"canLoad",null),t([h({readOnly:!0})],v.prototype,"canQuery",null),t([h()],v.prototype,"networkSourceIdsInUse",void 0),t([h({constructOnly:!0})],v.prototype,"source",void 0),t([h()],v.prototype,"description",void 0),t([h({value:3})],v.prototype,"displayCount",null),t([h({type:e})],v.prototype,"graphic",void 0),t([h()],v.prototype,"layer",void 0),t([h()],v.prototype,"map",void 0),t([h({readOnly:!0})],v.prototype,"objectId",null),t([h({readOnly:!0})],v.prototype,"objectIdField",null),t([h({readOnly:!0})],v.prototype,"globalId",null),t([h({readOnly:!0})],v.prototype,"globalIdField",null),t([h()],v.prototype,"featureCount",void 0),t([h()],v.prototype,"associationTypes",void 0),t([h()],v.prototype,"activeAssociationType",null),t([h()],v.prototype,"showAllEnabled",void 0),t([h()],v.prototype,"state",null),t([h()],v.prototype,"title",void 0),t([h({readOnly:!0})],v.prototype,"utilityNetwork",null),t([h({readOnly:!0})],v.prototype,"attachmentsFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"structureFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"attachmentsAssociations",null),t([h({readOnly:!0})],v.prototype,"structureAssociations",null),t([h({readOnly:!0})],v.prototype,"contentFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"containerFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"contentAssociations",null),t([h({readOnly:!0})],v.prototype,"containerAssociations",null),t([h({readOnly:!0})],v.prototype,"connectivityFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"connectivityAssociations",null),t([h({readOnly:!0})],v.prototype,"associationFeatures",null),t([h({readOnly:!0})],v.prototype,"associationViewModels",null),v=t([p("esri.widgets.support.UtilityNetworkAssociations.FeatureUtilityNetworkAssociationsViewModel")],v);export{v as default};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5845],{9093:(t,n,e)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}e.d(n,{o8:()=>o,vt:()=>r,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,fromValues:function(t,n,e,r,o,i,l,a,s,u,c,f,h,d,p,m){return[t,n,e,r,o,i,l,a,s,u,c,f,h,d,p,m]}},Symbol.toStringTag,{value:"Module"}))},9762:(t,n,e)=>{e.r(n),e.d(n,{projectBuffer:()=>o});var r=e(37539);function o(t,n,e,o,i,l,a=Math.floor(t.length/3)){const s=(0,r.jd)(n,i);if(null==s)return!1;if(s===r.pO){if(t===o&&e===l)return!0;const n=e+3*a;for(let r=e,i=l;r<n;r++,i++)o[i]=t[r];return!0}const u=e+3*a;for(let n=e,r=l;n<u;n+=3,r+=3)s(t,n,o,r);return!0}},11006:(t,n,e)=>{function r(t,n,e,r,i){o(t,n,e||0,r||t.length-1,i||l)}function o(t,n,e,r,l){for(;r>e;){if(r-e>600){var a=r-e+1,s=n-e+1,u=Math.log(a),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(a-c)/a)*(s-a/2<0?-1:1);o(t,n,Math.max(e,Math.floor(n-s*c/a+f)),Math.min(r,Math.floor(n+(a-s)*c/a+f)),l)}var h=t[n],d=e,p=r;for(i(t,e,n),l(t[r],h)>0&&i(t,e,r);d<p;){for(i(t,d,p),d++,p--;l(t[d],h)<0;)d++;for(;l(t[p],h)>0;)p--}0===l(t[e],h)?i(t,e,p):i(t,++p,r),p<=n&&(e=p+1),n<=p&&(r=p-1)}}function i(t,n,e){var r=t[n];t[n]=t[e],t[e]=r}function l(t,n){return t<n?-1:t>n?1:0}e.d(n,{q:()=>r})},18251:(t,n,e)=>{e.d(n,{A:()=>c});var r=e(31635),o=e(69540),i=e(25482),l=e(10107),a=(e(44208),e(53966),e(87811),e(93223)),s=e(40608),u=e(51850);let c=class extends(o.A.ClonableMixin(i.A)){constructor(t){super(t),this.type="local",this.origin=(0,u.vt)()}};(0,r.Cg)([(0,a.e)({local:"local"},{readOnly:!0})],c.prototype,"type",void 0),(0,r.Cg)([(0,l.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,r.Cg)([(0,s.$)("esri.geometry.support.MeshLocalVertexSpace")],c)},22141:(t,n,e)=>{e.d(n,{$5:()=>v,CN:()=>M,JP:()=>y,KM:()=>S,Mv:()=>B,X4:()=>w,gr:()=>b,qs:()=>_,si:()=>x,xA:()=>A});var r=e(34727),o=e(77690),i=e(29242),l=e(58083),a=e(9093),s=e(38954),u=e(51850),c=e(48353),f=e(9762),h=(e(79258),e(21325)),d=e(28735),p=e(13030),m=e(73354),g=e(65686);const y="Projection may be possible after calling projection.load().";function M(t,n,e,r){t.error(`Failed to project from (wkid:${n.wkid}) to (wkid:${e.wkid}).${r?" ":""}${r}`)}function w(t,n,e,r,o,i){return j(0,p.xs.fromTypedArray(t),0,p.Xm.fromTypedArray(n),e,p.Xm.fromTypedArray(r),o,p.xs.fromTypedArray(i))?i:null}function x(t,n,e,r,o,i){return j(1,p.xs.fromTypedArray(t),0,p.Xm.fromTypedArray(n),e,p.Xm.fromTypedArray(r),o,p.xs.fromTypedArray(i))?i:null}function b(t,n,e,r){return(0,f.projectBuffer)(t,n,0,e,r,0)?e:null}function v(t,n,e,r){return(0,f.projectBuffer)(t,n,0,e,r,0)?e:null}function _(t,n,e){return(0,o.Ge)(O,e),(0,m.b)(n,t,O),(0,r.or)(O)&&(0,m.n)(n,n),n}function S(t,n,e){return(0,o.z0)(O,e),(0,g.t)(n,t,O),(0,r.or)(O)&&(0,m.n)(n,n,4),n}function A(t,n,e,r,o,i){if(!j(0,p.xs.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),1,p.Xm.fromTypedArray(n),e,p.Xm.fromTypedArray(r),o,p.xs.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let n=3;n<t.length;n+=4)i[n]=t[n];return i}function B(t,n,e,r,o,i){if(!j(1,p.xs.fromTypedArray(t,16),1,p.Xm.fromTypedArray(n),e,p.Xm.fromTypedArray(r),o,p.xs.fromTypedArray(i,16)))return null;for(let n=3;n<t.length;n+=4)i[n]=t[n];return i}function k(t,n,e,r,i){switch((0,c.l)(r,e,T,r),1===t&&(0,l.B8)(T,T),n){case 0:return(0,o.Ge)(i,T);case 1:return(0,o.z0)(i,T)}}function j(t,n,e,r,o,i,l,a){if(!n)return;const u=r.count;if(function(t){return t.isWGS84||(0,h.x1)(t)||(0,h.q8)(t)||(0,h.KQ)(t)}(o))for(let r=0;r<u;r++)i.getVec(r,R),n.getVec(r,I),(0,s.o)(I,I,k(t,e,R,l,O)),a.setVec(r,I);else for(let o=0;o<u;o++){i.getVec(o,R),n.getVec(o,I);const u=(0,d.jg)(r.get(o,1));let c=Math.cos(u);1===e!=(0===t)&&(c=1/c),k(t,e,R,l,O),0===t?(O[0]*=c,O[1]*=c,O[2]*=c,O[3]*=c,O[4]*=c,O[5]*=c):(O[0]*=c,O[3]*=c,O[6]*=c,O[1]*=c,O[4]*=c,O[7]*=c),(0,s.o)(I,I,O),(0,s.n)(I,I),a.setVec(o,I)}return a}const R=(0,u.vt)(),I=(0,u.vt)(),T=(0,a.vt)(),O=(0,i.vt)()},27615:(t,n,e)=>{e.d(n,{CK:()=>s,Hq:()=>a,MW:()=>u,TE:()=>c,yJ:()=>f});var r=e(38954),o=e(86738),i=e(95696),l=e(18251);function a(t){return null!=t.origin}function s(t){return a(t.vertexSpace)}function u(t,n){if(!a(t))return null;const[e,r,i]=t.origin;return new o.A({x:e,y:r,z:i,spatialReference:n})}function c(t,n){const{x:e,y:r,z:o,spatialReference:a}=t,s=[e,r,o??0];return"local"===(n?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(a))?new l.A({origin:s}):new i.A({origin:s})}function f(t,n){return t.type===n.type&&(t.origin===n.origin||null!=t.origin&&null!=n.origin&&(0,r.q)(t.origin,n.origin))}},29242:(t,n,e)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function o(t,n,e,r,o,i,l,a,s){return[t,n,e,r,o,i,l,a,s]}e.d(n,{fA:()=>o,vt:()=>r,zK:()=>i});const i=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,fromValues:o},Symbol.toStringTag,{value:"Module"}))},31635:(t,n,e)=>{function r(t,n,e,r){var o,i=arguments.length,l=i<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,n,e,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(l=(i<3?o(l):i>3?o(n,e,l):o(n,e))||l);return i>3&&l&&Object.defineProperty(n,e,l),l}function o(t,n,e){if(null!=n){if("object"!=typeof n&&"function"!=typeof n)throw new TypeError("Object expected.");var r,o;if(e){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=n[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=n[Symbol.dispose],e&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:n,dispose:r,async:e})}else e&&t.stack.push({async:!0});return n}e.d(n,{Cg:()=>r,hk:()=>l,mS:()=>o}),Object.create,Object.create;var i="function"==typeof SuppressedError?SuppressedError:function(t,n,e){var r=new Error(e);return r.name="SuppressedError",r.error=t,r.suppressed=n,r};function l(t){function n(n){t.error=t.hasError?new i(n,t.error,"An error was suppressed during disposal."):n,t.hasError=!0}var e,r=0;return function o(){for(;e=t.stack.pop();)try{if(!e.async&&1===r)return r=0,t.stack.push(e),Promise.resolve().then(o);if(e.dispose){var i=e.dispose.call(e.value);if(e.async)return r|=2,Promise.resolve(i).then(o,function(t){return n(t),o()})}else r|=1}catch(t){n(t)}if(1===r)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},37539:(t,n,e)=>{e.d(n,{pO:()=>m,jd:()=>h,Tp:()=>d,w5:()=>f});var r=e(34727),o=e(83047),i=e(73941),l=e(79258);Math.PI;const a=l.$O.radius,s=l.$O.eccentricitySquared,u={a1:a*s,a2:a*s*a*s,a3:a*s*s/2,a4:a*s*a*s*2.5,a5:a*s+a*s*s/2,a6:1-s};l.$O.radius,l.$O.flattening,l.Sw.radius,l.Sw.flattening,l.sH.radius,l.sH.flattening,l.sH.radius;var c=e(21325);const f={2:{5:m,7:null,9:null,10:m,1:_,6:null,8:null,0:null,3:y,11:M,2:m,4:j},5:{5:m,7:null,9:null,10:m,1:_,6:null,8:null,0:null,3:y,11:M,2:m,4:j},7:{5:null,7:m,9:null,10:m,1:null,6:v,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:m,10:m,1:null,6:null,8:b,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:function(t,n,e,r){const o=t[n]/q,i=P-2*Math.atan(Math.exp(-t[n+1]/q)),l=q+t[n+2],a=Math.cos(i)*l;e[r]=Math.cos(o)*a,e[r+1]=Math.sin(o)*a,e[r+2]=Math.sin(i)*l},6:null,8:null,0:null,3:m,11:function(t,n,e,r){g(t,n,e,r),M(e,r,e,r)},2:g,4:function(t,n,e,r){g(t,n,e,r),j(e,r,e,r)}},4:{5:R,7:null,9:null,10:R,1:function(t,n,e,r){R(t,n,e,r),_(e,r,e,r)},6:null,8:null,0:null,3:function(t,n,e,r){R(t,n,e,r),y(e,r,e,r)},11:function(t,n,e,r){R(t,n,e,r),M(e,r,e,r)},2:R,4:m},1:{5:k,7:null,9:null,10:k,1:m,6:null,8:null,0:null,3:function(t,n,e,r){k(t,n,e,r),y(e,r,e,r)},11:function(t,n,e,r){k(t,n,e,r),M(e,r,e,r)},2:k,4:function(t,n,e,r){k(t,n,e,r),j(e,r,e,r)}},6:{5:null,7:B,9:null,10:B,1:null,6:m,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:A,10:A,1:null,6:null,8:m,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:m,3:null,11:null,2:null,4:null},10:{5:m,7:m,9:m,10:m,1:_,6:v,8:b,0:null,3:y,11:M,2:m,4:j},11:{5:w,7:null,9:null,10:w,1:function(t,n,e,r){w(t,n,e,r),_(e,r,e,r)},6:null,8:null,0:null,3:function(t,n,e,r){w(t,n,e,r),y(e,r,e,r)},11:m,2:w,4:function(t,n,e,r){w(t,n,e,r),j(e,r,e,r)}}};function h(t,n){return d(t,n)?.projector}function d(t,n){if(null==t||null==n)return null;if(I.source.spatialReference===t&&I.dest.spatialReference===n)return I;const e=p(t,I.source),r=p(n,I.dest);return 0===e&&0===r?(0,c.aI)(t,n)?I.projector=m:I.projector=null:I.projector=f[e][r],I}function p(t,n){return t?n.spatialReference===t?n.spatialReferenceId:(n.spatialReference=t,"metersPerUnit"in n&&(n.metersPerUnit=(0,o.GA)(t,1)),(0,i.jA)(t)?n.spatialReferenceId=1:(0,c.oT)(t)?n.spatialReferenceId=2:(0,c.K8)(t)?n.spatialReferenceId=3:(0,c.r1)(t)?n.spatialReferenceId=11:t.wkt===i.Ro.wkt?n.spatialReferenceId=4:4490===t.wkid?n.spatialReferenceId=5:t.wkt===i.FY.wkt?n.spatialReferenceId=6:t.wkt===i.LJ.wkt?n.spatialReferenceId=8:(0,c.q8)(t)?n.spatialReferenceId=7:(0,c.KQ)(t)?n.spatialReferenceId=9:n.spatialReferenceId=0):0}function m(t,n,e,r){t!==e&&(e[r++]=t[n++],e[r++]=t[n++],e[r]=t[n])}function g(t,n,e,r){e[r]=O*(t[n]/q),e[r+1]=O*(P-2*Math.atan(Math.exp(-t[n+1]/q))),e[r+2]=t[n+2]}function y(t,n,e,o){!function(t,n,e,o,i){const l=.4999999*Math.PI,a=(0,r.qE)(T*t[n+1],-l,l),s=Math.sin(a);e[o++]=T*t[n]*i.radius,e[o++]=i.halfSemiMajorAxis*Math.log((1+s)/(1-s)),e[o]=t[n+2]}(t,n,e,o,l.$O)}function M(t,n,e,r){e[r]=t[n]*Y,e[r+1]=t[n+1]*Y,e[r+2]=t[n+2]}function w(t,n,e,r){e[r]=t[n]*X,e[r+1]=t[n+1]*X,e[r+2]=t[n+2]}function x(t,n,e,r,o){const i=o+t[n+2],l=T*t[n+1],a=T*t[n],s=Math.cos(l)*i;e[r]=Math.cos(a)*s,e[r+1]=Math.sin(a)*s,e[r+2]=Math.sin(l)*i}function b(t,n,e,r){x(t,n,e,r,l.Sw.radius)}function v(t,n,e,r){x(t,n,e,r,l.sH.radius)}function _(t,n,e,r){x(t,n,e,r,l.$O.radius)}function S(t,n,e,o,i){const l=t[n],a=t[n+1],s=t[n+2],u=Math.sqrt(l*l+a*a+s*s),c=(0,r.YN)(s/(0===u?1:u)),f=Math.atan2(a,l);e[o++]=O*f,e[o++]=O*c,e[o]=u-i}function A(t,n,e,r){S(t,n,e,r,l.Sw.radius)}function B(t,n,e,r){S(t,n,e,r,l.sH.radius)}function k(t,n,e,r){S(t,n,e,r,l.$O.radius)}function j(t,n,e,r){!function(t,n,e,r,o){const i=T*t[n],l=T*t[n+1],a=t[n+2],s=Math.sin(l),u=Math.cos(l),c=o.radius/Math.sqrt(1-o.eccentricitySquared*s*s);e[r++]=(c+a)*u*Math.cos(i),e[r++]=(c+a)*u*Math.sin(i),e[r++]=(c*(1-o.eccentricitySquared)+a)*s}(t,n,e,r,l.$O)}function R(t,n,e,r){const o=u,i=t[n],a=t[n+1],s=t[n+2];let c,f,h,d,p,m,g,y,M,w,x,b,v,_,S,A,B,k,j,R,I;c=Math.abs(s),f=i*i+a*a,h=Math.sqrt(f),d=f+s*s,p=Math.sqrt(d),R=Math.atan2(a,i),m=s*s/d,g=f/d,_=o.a2/p,S=o.a3-o.a4/p,g>.3?(y=c/p*(1+g*(o.a1+_+m*S)/p),j=Math.asin(y),w=y*y,M=Math.sqrt(1-w)):(M=h/p*(1-m*(o.a5-_-g*S)/p),j=Math.acos(M),w=1-M*M,y=Math.sqrt(w)),x=1-l.$O.eccentricitySquared*w,b=l.$O.radius/Math.sqrt(x),v=o.a6*b,_=h-b*M,S=c-v*y,B=M*_+y*S,A=M*S-y*_,k=A/(v/x+B),j+=k,I=B+A*k/2,s<0&&(j=-j),e[r++]=O*R,e[r++]=O*j,e[r]=I}const I={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:m},T=(0,r.kU)(1),O=(0,r.KJ)(1),P=.5*Math.PI,q=l.$O.radius,Y=q*Math.PI/180,X=180/(q*Math.PI)},38419:(t,n,e)=>{e.r(n),e.d(n,{default:()=>a});var r=e(44208),o=e(75503),i=e(95696),l=e(72258);class a{async createIndex(t,n){const e=new Array;if(!t.vertexAttributes?.position)return new o.wq;const r=function(t){const{vertexAttributes:{position:n},vertexSpace:e,spatialReference:r,transform:o}=t,a=(0,l.UR)({vertexAttributes:{position:n},vertexSpace:e,spatialReference:r,transform:o},i.A.absolute,{allowBufferReuse:!0})?.position;return a?!t.components||t.components.some(t=>!t.faces)?{position:a.buffer}:{position:a.buffer,components:t.components.map(t=>t.faces)}:null}(t),a=null!=n?await n.invoke("createIndexThread",r,{transferList:e}):this.createIndexThread(r).result;return s().fromJSON(a)}createIndexThread(t){const n=s();if(!t)return{result:n.toJSON()};const e=new Float64Array(t.position);return t.components?function(t,n,e){let r=0;for(const t of e)r+=t.length/3;const o=new Array(r);let i=0;for(const t of e)for(let e=0;e<t.length;e+=3)o[i++]=u(n,3*t[e],3*t[e+1],3*t[e+2]);return t.load(o),{result:t.toJSON()}}(n,e,t.components.map(t=>new Uint32Array(t))):function(t,n){const e=new Array(n.length/9);let r=0;for(let t=0;t<n.length;t+=9)e[r++]=u(n,t,t+3,t+6);return t.load(e),{result:t.toJSON()}}(n,e)}}function s(){return new o.wq(9,(0,r.A)("esri-csp-restrictions")?t=>t:[".minX",".minY",".maxX",".maxY"])}function u(t,n,e,r){return{minX:Math.min(t[n],t[e],t[r]),maxX:Math.max(t[n],t[e],t[r]),minY:Math.min(t[n+1],t[e+1],t[r+1]),maxY:Math.max(t[n+1],t[e+1],t[r+1]),p0:[t[n],t[n+1],t[n+2]],p1:[t[e],t[e+1],t[e+2]],p2:[t[r],t[r+1],t[r+2]]}}},38954:(t,n,e)=>{e.d(n,{A:()=>p,B:()=>d,C:()=>c,D:()=>f,E:()=>P,F:()=>E,H:()=>N,a:()=>q,b:()=>y,c:()=>l,d:()=>u,e:()=>S,f:()=>s,g:()=>g,h:()=>A,i:()=>a,j:()=>M,k:()=>x,l:()=>i,m:()=>B,n:()=>_,o:()=>j,q:()=>O,r:()=>v,s:()=>w,t:()=>k,u:()=>b,v:()=>R,w:()=>h,x:()=>z,y:()=>C,z:()=>m});var r=e(51850),o=e(34304);function i(t){const n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function l(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function a(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function s(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function u(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function c(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function f(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function h(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function d(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function p(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function m(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function g(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function y(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function M(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(e*e+r*r+o*o)}function w(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return e*e+r*r+o*o}function x(t){const n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function b(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function v(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function _(t,n){const e=n[0],r=n[1],o=n[2];let i=e*e+r*r+o*o;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i),t}function S(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function A(t,n,e){const r=n[0],o=n[1],i=n[2],l=e[0],a=e[1],s=e[2];return t[0]=o*s-i*a,t[1]=i*l-r*s,t[2]=r*a-o*l,t}function B(t,n,e,r){const o=n[0],i=n[1],l=n[2];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t[2]=l+r*(e[2]-l),t}function k(t,n,e){const r=n[0],o=n[1],i=n[2];return t[0]=e[0]*r+e[4]*o+e[8]*i+e[12],t[1]=e[1]*r+e[5]*o+e[9]*i+e[13],t[2]=e[2]*r+e[6]*o+e[10]*i+e[14],t}function j(t,n,e){const r=n[0],o=n[1],i=n[2];return t[0]=r*e[0]+o*e[3]+i*e[6],t[1]=r*e[1]+o*e[4]+i*e[7],t[2]=r*e[2]+o*e[5]+i*e[8],t}function R(t,n,e){const r=e[0],o=e[1],i=e[2],l=e[3],a=n[0],s=n[1],u=n[2],c=o*u-i*s,f=i*a-r*u,h=r*s-o*a,d=o*h-i*f,p=i*c-r*h,m=r*f-o*c,g=2*l;return t[0]=a+c*g+2*d,t[1]=s+f*g+2*p,t[2]=u+h*g+2*m,t}const I=(0,r.vt)(),T=(0,r.vt)();function O(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function P(t,n,e){const r=e[0]-n[0],o=e[1]-n[1],i=e[2]-n[2];let l=r*r+o*o+i*i;return l>0?(l=1/Math.sqrt(l),t[0]=r*l,t[1]=o*l,t[2]=i*l,t):(t[0]=0,t[1]=0,t[2]=0,t)}const q=u,Y=c,X=f,E=M,z=w,N=i,C=x;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:s,angle:function(t,n){_(I,t),_(T,n);const e=S(I,T);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(t,n,e,r,o,i){const l=1-i,a=l*l,s=i*i,u=a*l,c=3*i*a,f=3*s*l,h=s*i;return t[0]=n[0]*u+e[0]*c+r[0]*f+o[0]*h,t[1]=n[1]*u+e[1]*c+r[1]*f+o[1]*h,t[2]=n[2]*u+e[2]*c+r[2]*f+o[2]*h,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},clamp:function(t,n=0,e=1){return t[0]=Math.min(Math.max(t[0],n),e),t[1]=Math.min(Math.max(t[1],n),e),t[2]=Math.min(Math.max(t[2],n),e),t},copy:l,cross:A,crossAndNormalize:function(t,n,e){const r=n[0],o=n[1],i=n[2],l=e[0],a=e[1],s=e[2],u=o*s-i*a,c=i*l-r*s,f=r*a-o*l,h=Math.sqrt(u*u+c*c+f*f);return t[0]=u/h,t[1]=c/h,t[2]=f/h,t},direction:P,dist:E,distance:M,div:X,divide:f,dot:S,equals:function(t,n){if(t===n)return!0;const e=t[0],r=t[1],i=t[2],l=n[0],a=n[1],s=n[2],u=(0,o.FD)();return Math.abs(e-l)<=u*Math.max(1,Math.abs(e),Math.abs(l))&&Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=u*Math.max(1,Math.abs(i),Math.abs(s))},exactEquals:O,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,e,r,o,i){const l=i*i,a=l*(2*i-3)+1,s=l*(i-2)+i,u=l*(i-1),c=l*(3-2*i);return t[0]=n[0]*a+e[0]*s+r[0]*u+o[0]*c,t[1]=n[1]*a+e[1]*s+r[1]*u+o[1]*c,t[2]=n[2]*a+e[2]*s+r[2]*u+o[2]*c,t},inverse:v,len:N,length:i,lerp:B,max:m,min:p,mul:Y,multiply:c,negate:b,normalize:_,random:function(t,n=1){const e=o.Ov,r=2*e()*Math.PI,i=2*e()-1,l=Math.sqrt(1-i*i)*n;return t[0]=Math.cos(r)*l,t[1]=Math.sin(r)*l,t[2]=i*n,t},rotateX:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0],i[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),i[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateY:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),i[1]=o[1],i[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateZ:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),i[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),i[2]=o[2],t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:g,scaleAndAdd:y,set:a,sign:d,sqrDist:z,sqrLen:C,squaredDistance:w,squaredLength:x,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:q,subtract:u,transformMat3:j,transformMat4:k,transformQuat:R},Symbol.toStringTag,{value:"Module"}))},40876:(t,n,e)=>{e.d(n,{Eq:()=>d,G1:()=>m,TS:()=>i,Tf:()=>M,V6:()=>o,Vm:()=>p,ay:()=>s,c1:()=>g,c4:()=>l,j5:()=>u,lT:()=>f,oW:()=>c});const r={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function o(t){return!!r[t]||!!r[t.toLowerCase()]}function i(t){return r[t]??r[t.toLowerCase()]}function l(t){return[...i(t)]}function a(t,n,e){e<0&&++e,e>1&&--e;const r=6*e;return r<1?t+(n-t)*r:2*e<1?n:3*e<2?t+(n-t)*(2/3-e)*6:t}function s(t,n,e,r=1){const o=(t%360+360)%360/360,i=e<=.5?e*(n+1):e+n-e*n,l=2*e-i;return[Math.round(255*a(l,i,o+1/3)),Math.round(255*a(l,i,o)),Math.round(255*a(l,i,o-1/3)),r]}function u(t){const n=t.length>5,e=n?8:4,r=(1<<e)-1,o=n?1:17,i=n?9===t.length:5===t.length;let l=Number("0x"+t.slice(1));if(isNaN(l))return null;const a=[0,0,0,1];let s;return i&&(s=l&r,l>>=e,a[3]=o*s/255),s=l&r,l>>=e,a[2]=o*s,s=l&r,l>>=e,a[1]=o*s,s=l&r,l>>=e,a[0]=o*s,a}function c(t){if("#"!==t[0]||isNaN(Number(`0x${t.slice(1)}`)))return null;switch(t.length){case 4:case 5:{const n=parseInt(t.slice(1,2),16),e=parseInt(t.slice(2,3),16),r=parseInt(t.slice(3,4),16),o=5===t.length?15:parseInt(t.slice(4),16);return[n+16*n,e+16*e,r+16*r,(o+16*o)/255]}case 7:case 9:return[parseInt(t.slice(1,3),16),parseInt(t.slice(3,5),16),parseInt(t.slice(5,7),16),(7===t.length?255:parseInt(t.slice(7),16))/255];default:return null}}function f(t){const n=t.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(n){const t=n[2].split(/\s*,\s*/),e=n[1];if("rgb"===e&&3===t.length||"rgba"===e&&4===t.length){const n=t[0];if("%"===n.charAt(n.length-1)){const n=t.map(t=>2.56*parseFloat(t));return 4===t.length&&(n[3]=parseFloat(t[3])),h(n)}return h(t.map(t=>parseFloat(t)))}if("hsl"===e&&3===t.length||"hsla"===e&&4===t.length)return s(parseFloat(t[0]),parseFloat(t[1])/100,parseFloat(t[2])/100,parseFloat(t[3]))}return null}function h(t){return t[0]=g(t[0]),t[1]=g(t[1]),t[2]=g(t[2]),t[3]=4===t.length?m(t[3]):1,t}function d(t){let n=o(t)?i(t):null;return n??=f(t),n??=c(t),n}function p(t){const n=d(t);return null!=n?[n[0]/255,n[1]/255,n[2]/255,n[3]]:null}function m(t){return y(t,0,1)}function g(t){return Math.round(y(t,0,255))}function y(t,n,e){return t=Number(t),isNaN(t)?e:t<n?n:t>e?e:t}const M=2.2},48163:(t,n,e)=>{function r(){return[0,0]}function o(t){return[t[0],t[1]]}function i(t,n){return[t,n]}function l(){return i(1,1)}function a(){return i(1,0)}function s(){return i(0,1)}e.d(n,{Un:()=>u,fA:()=>i,o8:()=>o,vt:()=>r});const u=l(),c=a(),f=s();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:c,UNIT_Y:f,ZEROS:[0,0],clone:o,create:r,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){const e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:i,ones:l,unitX:a,unitY:s,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},48353:(t,n,e)=>{e.d(n,{l:()=>u});var r=e(34727),o=e(58083),i=e(51850);function l(t,n,e){const r=Math.sin(t),o=Math.cos(t),i=Math.sin(n),l=Math.cos(n),a=e;return a[0]=-r,a[4]=-i*o,a[8]=l*o,a[12]=0,a[1]=o,a[5]=-i*r,a[9]=l*r,a[13]=0,a[2]=0,a[6]=l,a[10]=i,a[14]=0,a[3]=0,a[7]=0,a[11]=0,a[15]=1,a}var a=e(37539),s=e(21325);function u(t,n,e,r){const i=(0,a.Tp)(t,r);if(null==i)return!1;const u=i.source.spatialReferenceId,p=i.dest.spatialReferenceId;if(u===p&&!c(p)&&(0!==u||(0,s.aI)(t,r)))return(0,o.kN)(e,n),!0;if(c(p)){const t=a.w5[u][10],r=a.w5[10][p];return null!=t&&null!=r&&(t(n,0,h,0),r(h,0,d,0),l(f*h[0],f*h[1],e),e[12]=d[0],e[13]=d[1],e[14]=d[2],!0)}const m=c(u);if((3===p||11===p||2===p||5===p)&&(2===u||m||3===u||5===u)){const t=a.w5[u][10],r=a.w5[10][p];return null!=t&&null!=r&&(t(n,0,h,0),r(h,0,d,0),m?function(t,n,e){l(t,n,e),(0,o.mg)(e,e)}(f*h[0],f*h[1],e):(0,o.D_)(e),e[12]=d[0],e[13]=d[1],e[14]=d[2],!0)}return!1}function c(t){return 1===t||6===t||8===t||4===t}const f=(0,r.kU)(1),h=(0,i.vt)(),d=(0,i.vt)()},51850:(t,n,e)=>{function r(){return[0,0,0]}function o(t){return[t[0],t[1],t[2]]}function i(t,n,e){return[t,n,e]}function l(t,n,e){return[t,n,e]}function a(t,n=[0,0,0]){const e=Math.min(3,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function s(){return i(1,1,1)}function u(){return i(1,0,0)}function c(){return i(0,1,0)}function f(){return i(0,0,1)}e.d(n,{CN:()=>l,Cb:()=>g,Cw:()=>p,JP:()=>m,Un:()=>d,ci:()=>a,fA:()=>i,o8:()=>o,uY:()=>h,vt:()=>r});const h=[0,0,0],d=s(),p=u(),m=c(),g=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:p,UNIT_Y:m,UNIT_Z:g,ZEROS:h,clone:o,create:r,freeze:l,fromArray:a,fromValues:i,ones:s,unitX:u,unitY:c,unitZ:f,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},62815:(t,n,e)=>{e.d(n,{N:()=>l});var r=e(83047),o=e(73941),i=e(21325);function l(t,n,e){if(null==n||null==e||e.vcsWkid||(0,i.aI)(n,e)||(0,o.xP)(n)||(0,o.xP)(e))return null;const l=(0,r.G9)(n)/(0,r.G9)(e);if(1===l)return null;switch(t){case"point":case"esriGeometryPoint":return t=>function(t,n){null!=t?.z&&(t.z*=n)}(t,l);case"polyline":case"esriGeometryPolyline":return t=>function(t,n){if(t)for(const e of t.paths)for(const t of e)t.length>2&&(t[2]*=n)}(t,l);case"polygon":case"esriGeometryPolygon":return t=>function(t,n){if(t)for(const e of t.rings)for(const t of e)t.length>2&&(t[2]*=n)}(t,l);case"multipoint":case"esriGeometryMultipoint":return t=>function(t,n){if(t)for(const e of t.points)e.length>2&&(e[2]*=n)}(t,l);case"extent":case"esriGeometryEnvelope":return t=>function(t,n){t&&null!=t.zmin&&null!=t.zmax&&(t.zmin*=n,t.zmax*=n)}(t,l);default:return null}}},65686:(t,n,e)=>{e.d(n,{a:()=>i,b:()=>c,l:()=>u,n:()=>a,t:()=>l});var r=e(40876),o=(e(44208),e(53966));function i(t,n,e){l(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)}function l(t,n,e,r=4,o=r){if(t.length/r!==n.length/o)return;const i=t.length/r,l=e[0],a=e[1],s=e[2],u=e[3],c=e[4],f=e[5],h=e[6],d=e[7],p=e[8];let m=0,g=0;for(let e=0;e<i;e++){const e=n[m],i=n[m+1],y=n[m+2],M=n[m+3];t[g]=l*e+u*i+h*y,t[g+1]=a*e+c*i+d*y,t[g+2]=s*e+f*i+p*y,t[g+3]=M,m+=o,g+=r}}function a(t,n){const e=Math.min(t.count,n.count),r=t.typedBuffer,o=t.typedBufferStride,i=n.typedBuffer,l=n.typedBufferStride;for(let t=0;t<e;t++){const n=t*o,e=t*l,a=i[e],s=i[e+1],u=i[e+2],c=a*a+s*s+u*u;if(c>0){const t=1/Math.sqrt(c);r[n]=t*a,r[n+1]=t*s,r[n+2]=t*u}}}function s(t,n,e,r=4){const o=Math.min(t.length/r,n.count),i=n.typedBuffer,l=n.typedBufferStride;let a=0,s=0;for(let n=0;n<o;n++)t[s]=e*i[a],t[s+1]=e*i[a+1],t[s+2]=e*i[a+2],t[s+3]=e*i[a+3],a+=l,s+=r}function u(t,n,e,r){c(t.typedBuffer,n,e,r,t.typedBufferStride)}function c(t,n,e,o,i=4){const l=Math.min(t.length/i,n.count),a=n.typedBuffer,s=n.typedBufferStride;let u=0,c=0;const f=1/r.Tf;for(let n=0;n<l;n++)t[c]=o*(e*a[u])**f,t[c+1]=o*(e*a[u+1])**f,t[c+2]=o*(e*a[u+2])**f,t[c+3]=o*e*a[u+3],u+=s,c+=i}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:u,normalize:a,scale:s,scaleView:function(t,n,e){s(t.typedBuffer,n,e,t.typedBufferStride)},transformMat3:l,transformMat3View:i,transformMat4:function(t,n,e,r=4,i=r){if(t.length/r!==n.length/i)return void o.A.getLogger("esri.views.3d.support.buffer.math").error("source and destination buffers need to have the same number of elements");const l=t.length/r,a=e[0],s=e[1],u=e[2],c=e[3],f=e[4],h=e[5],d=e[6],p=e[7],m=e[8],g=e[9],y=e[10],M=e[11],w=e[12],x=e[13],b=e[14],v=e[15];let _=0,S=0;for(let e=0;e<l;e++){const e=n[_],o=n[_+1],l=n[_+2],A=n[_+3];t[S]=a*e+f*o+m*l+w*A,t[S+1]=s*e+h*o+g*l+x*A,t[S+2]=u*e+d*o+y*l+b*A,t[S+3]=c*e+p*o+M*l+v*A,_+=i,S+=r}},transformMat4View:function(t,n,e){if(t.count!==n.count)return;const r=t.count,o=e[0],i=e[1],l=e[2],a=e[3],s=e[4],u=e[5],c=e[6],f=e[7],h=e[8],d=e[9],p=e[10],m=e[11],g=e[12],y=e[13],M=e[14],w=e[15],x=t.typedBuffer,b=t.typedBufferStride,v=n.typedBuffer,_=n.typedBufferStride;for(let t=0;t<r;t++){const n=t*b,e=t*_,r=v[e],S=v[e+1],A=v[e+2],B=v[e+3];x[n]=o*r+s*S+h*A+g*B,x[n+1]=i*r+u*S+d*A+y*B,x[n+2]=l*r+c*S+p*A+M*B,x[n+3]=a*r+f*S+m*A+w*B}}},Symbol.toStringTag,{value:"Module"}))},65806:(t,n,e)=>{e.d(n,{g:()=>l});var r=e(51850),o=e(98988),i=e(9762);function l(t,n,e,r){if((0,o.canProjectWithoutEngine)(t.spatialReference,e)){a[0]=t.x,a[1]=t.y;const o=t.z;return a[2]=o??r??0,(0,i.projectBuffer)(a,t.spatialReference,0,n,e,0)}const l=(0,o.tryProjectWithZConversion)(t,e);return!!l&&(n[0]=l?.x,n[1]=l?.y,n[2]=l?.z??r??0,!0)}const a=(0,r.vt)()},69540:(t,n,e)=>{e.d(n,{A:()=>f});var r=e(31635),o=e(69622),i=(e(44208),e(4718)),l=(e(53966),e(97768)),a=e(88620),s=e(40608);const u=t=>{const n=t;let e=class extends n{clone(t){const n=(0,a.oY)(this);(0,l.Lw)(n,"unable to clone instance of non-accessor class");const e=n.metadata,r=n.store,o={},s=new Map;for(const n in e){const l=e[n],a=r?.originOf(n),u=l.clonable;if(l.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const c=this[n];let f=null;f="function"==typeof u?u(c,t):"reference"===u?c:(0,i.TU)(c,t),null!=c&&null==f||(0===a?s.set(n,f):o[n]=f)}const u=new(0,Object.getPrototypeOf(this).constructor)(o);if(s.size){const t=(0,a.oY)(u)?.store;if(t)for(const[n,e]of s)t.set(n,e,0)}return u}};return e=(0,r.Cg)([(0,s.$)("esri.core.Clonable")],e),e};let c=class extends(u(o.A)){};c=(0,r.Cg)([(0,s.$)("esri.core.Clonable")],c),(c||(c={})).ClonableMixin=u;const f=c},72258:(t,n,e)=>{e.d(n,{UR:()=>b,p5:()=>x,xK:()=>k});var r=e(53966),o=e(34727),i=e(83047),l=e(77690),a=e(29242),s=e(58083),u=e(9093),c=e(38954),f=e(51850),h=e(98764),d=e(48353),p=e(65806),m=e(27615),g=e(21325),y=e(73354),M=e(22141);const w=()=>r.A.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function x(t,n,{vertexSpace:e,spatialReference:r}){if("georeferenced"===e.type){const o=t;if(!(0,p.g)(n,o,r))return!1;const{origin:i}=e;return(0,c.d)(t,o,i),!0}const o=(0,h.lO)(r),i=t;if(!(0,p.g)(n,i,o))return!1;const{origin:l}=e,a=O;if(!(0,d.l)(r,l,a,o))return!1;const u=(0,s.B8)(O,a);return null!=u&&((0,c.t)(t,i,u),!0)}function b(t,n,e){const{vertexSpace:r,transform:o,vertexAttributes:i}=t,a=(0,m.Hq)(r)?o:null,f=A(t.spatialReference,e,3);if((0,m.yJ)(r,n)&&(!a||(0,s.t2)(a.localMatrix,u.zK))&&B(f)){const{position:t,normal:n,tangent:r}=i,o=e?.allowBufferReuse;return{position:o?t:t.slice(),normal:o?n:n?.slice(),tangent:o?r:r?.slice()}}switch(t.vertexSpace.type){case"local":return"local"===n.type?function({vertexAttributes:t,spatialReference:n,transform:e},{origin:r},o,i){const l=v(n,i);if(!(0,d.l)(n,r,j,l))return(0,M.CN)(w(),n,l),null;if(e&&(0,s.lw)(j,j,e.localMatrix),!(0,d.l)(n,o,R,l))return(0,M.CN)(w(),l,n),null;(0,s.B8)(R,R);const a=(0,s.lw)(j,R,j);return S(a,n,i,3),_(t,a)}(t,t.vertexSpace,n.origin,e):function({spatialReference:t,vertexAttributes:n,transform:e},{origin:r},o,i){const l=v(t,i);if(!(0,d.l)(t,r,j,l))return(0,M.CN)(w(),t,l),null;e&&(0,s.lw)(j,j,e.localMatrix),S(j,t,i,1);const a=new Float64Array(n.position.length),u=function(t,n,e,r,o){(0,y.t)(r,t,n);const i=new Float64Array(t.length);return(0,M.$5)(r,o,i,e)?i:((0,M.CN)(w(),o,e),null)}(n.position,j,t,a,l);if(!u)return null;const f=function(t,n,e,r,o,i){if(null==o)return null;const l=new Float32Array(o.length);return(0,M.qs)(o,l,i),(0,M.si)(l,t,n,e,r,l)?l:((0,M.CN)(w(),r,n),null)}(u,t,a,l,n.normal,j);if(n.normal&&!f)return null;const h=function(t,n,e,r,o,i){if(null==o)return null;const l=new Float32Array(o.length);return(0,M.KM)(o,l,i),(0,M.Mv)(l,t,n,e,r,l)?l:((0,M.CN)(w(),r,n),null)}(u,t,a,l,n.tangent,j);if(n.tangent&&!h)return null;if(o){const t=(0,c.u)(T,o);(0,y.a)(u,u,t)}return{position:u,normal:f,tangent:h}}(t,t.vertexSpace,n.origin,e);case"georeferenced":return"local"===n.type?function({vertexAttributes:t,spatialReference:n,transform:e},{origin:r},o,i){const a=v(n,i);if(!(0,d.l)(n,o,j,a))return(0,M.CN)(w(),n,a),null;const u=1/A(n,i,2);(0,s.hs)(j,j,[u,u,u]);const c=(0,s.B8)(R,j),{position:f,normal:h,tangent:p}=function(t,n,e){if(!n)return t;if(!e){const{position:e,normal:r,tangent:o}=t;return{position:(0,y.a)(new Float64Array(e.length),e,n),tangent:o,normal:r}}const r=_(t,e.localMatrix);return(0,y.a)(r.position,r.position,n),r}(t,r,e),m=new Float64Array(f.length),g=function(t,n,e,r,o){const i=(0,M.gr)(t,n,r,o);if(!i)return(0,M.CN)(w(),n,o),null;const l=new Float64Array(i.length);return(0,y.t)(l,i,e),l}(f,n,c,m,a);if(!g)return null;const x=(0,l.Ge)(I,c),b=function(t,n,e,r,o,i,l){if(null==t)return null;const a=l??new Float32Array(t.length);return(0,M.X4)(t,n,e,r,o,a)?((0,y.b)(a,a,i),a):((0,M.CN)(w(),e,o),null)}(h,f,n,m,a,x,h!==t.normal?h:void 0);if(!b&&h)return null;const S=function(t,n,e,r,o,i,l){if(null==t)return null;const a=l??new Float32Array(t.length);return(0,M.xA)(t,n,e,r,o,a)?((0,y.b)(a,a,i,4),a):((0,M.CN)(w(),e,o),null)}(p,f,n,m,a,x,p!==t.tangent?p:void 0);return!S&&p?null:{position:g,normal:b,tangent:S}}(t,t.vertexSpace,n.origin,e):function({vertexAttributes:t,transform:n,spatialReference:e},{origin:r},o,i){const l=A(e,i,3),a=r||!B(l)?(0,s.C)(j,n?.localMatrix??u.zK):null;a&&S(a,e,i,3);const{position:f,normal:h,tangent:d}=a?_(t,a):t,p=i?.allowBufferReuse,m=p?f:new Float64Array(f.length);let g=f;if(r&&(g=(0,y.a)(m,g,r)),o){const t=(0,c.u)(T,o);g=(0,y.a)(m,g,t)}return{position:g!==t.position||p?g:g.slice(),normal:h!==t.normal||p?h:h?.slice(),tangent:d!==t.tangent||p?d:d?.slice()}}(t,t.vertexSpace,n.origin,e)}}function v(t,n){return n?.useEllipsoid&&(0,g.B3)(t)?h.Y0:(0,h.lO)(t)}function _(t,n){const e=new Float64Array(t.position.length);(0,y.t)(e,t.position,n);const r=t.normal?new Float32Array(t.normal.length):null,o=t.tangent?new Float32Array(t.tangent.length):null;return r&&t.normal&&(0,M.qs)(t.normal,r,n),o&&t.tangent&&(0,M.KM)(t.tangent,o,n),{position:e,normal:r,tangent:o}}function S(t,n,e,r){const o=A(n,e,r);B(o)||(0,s.hs)(t,t,[o,o,o])}function A(t,n,e){const r=!!(1&e),o=!!(2&e),i=n?.sourceUnit,l=n?.targetUnit;if(!i&&!l)return 1;let a=k(i,t);r||!i||B(a)||(w().warn("source unit conversion not supported"),a=1);let s=1/k(l,t);return o||!l||B(s)||(w().warn("target unit conversion not supported"),s=1),a*s}function B(t){return(0,o.Io)(t,1)}function k(t,n){if(null==t)return 1;const e=(0,i.KX)(n);return 1/(0,i.oU)(e,"meters",t)}const j=(0,u.vt)(),R=(0,u.vt)(),I=(0,a.vt)(),T=(0,f.vt)(),O=(0,u.vt)()},73354:(t,n,e)=>{e.d(n,{a:()=>f,b:()=>a,c:()=>l,d:()=>o,e:()=>h,f:()=>c,l:()=>u,n:()=>d,t:()=>i});var r=e(40876);function o(t,n,e){i(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)}function i(t,n,e,r=3,o=r){if(t.length/r!==Math.ceil(n.length/o))return t;const i=t.length/r,l=e[0],a=e[1],s=e[2],u=e[4],c=e[5],f=e[6],h=e[8],d=e[9],p=e[10],m=e[12],g=e[13],y=e[14];let M=0,w=0;for(let e=0;e<i;e++){const e=n[M],i=n[M+1],x=n[M+2];t[w]=l*e+u*i+h*x+m,t[w+1]=a*e+c*i+d*x+g,t[w+2]=s*e+f*i+p*x+y,M+=o,w+=r}return t}function l(t,n,e){a(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)}function a(t,n,e,r=3,o=r){if(t.length/r!==Math.ceil(n.length/o))return;const i=t.length/r,l=e[0],a=e[1],s=e[2],u=e[3],c=e[4],f=e[5],h=e[6],d=e[7],p=e[8];let m=0,g=0;for(let e=0;e<i;e++){const e=n[m],i=n[m+1],y=n[m+2];t[g]=l*e+u*i+h*y,t[g+1]=a*e+c*i+d*y,t[g+2]=s*e+f*i+p*y,m+=o,g+=r}}function s(t,n,e,r=3,o=r){const i=Math.min(t.length/r,n.length/o);let l=0,a=0;for(let s=0;s<i;s++)t[a]=e*n[l],t[a+1]=e*n[l+1],t[a+2]=e*n[l+2],l+=o,a+=r;return t}function u(t,n,e,r){c(t.typedBuffer,n.typedBuffer,e,r,t.typedBufferStride,n.typedBufferStride)}function c(t,n,e,o,i=3,l=i){const a=Math.min(t.length/i,n.length/l);let s=0,u=0;const c=1/r.Tf;for(let r=0;r<a;r++)t[u]=o*(e*n[s])**c,t[u+1]=o*(e*n[s+1])**c,t[u+2]=o*(e*n[s+2])**c,s+=l,u+=i}function f(t,n,e,r=3,o=r){const i=t.length/r;if(i!==Math.ceil(n.length/o))return t;let l=0,a=0;for(let s=0;s<i;s++)t[a]=n[l]+e[0],t[a+1]=n[l+1]+e[1],t[a+2]=n[l+2]+e[2],l+=o,a+=r;return t}function h(t,n){d(t.typedBuffer,n.typedBuffer,t.typedBufferStride,n.typedBufferStride)}function d(t,n,e=3,r=e){const o=Math.min(t.length/e,n.length/r);let i=0,l=0;for(let a=0;a<o;a++){const o=n[i],a=n[i+1],s=n[i+2],u=o*o+a*a+s*s;if(u>0){const n=1/Math.sqrt(u);t[l]=n*o,t[l+1]=n*a,t[l+2]=n*s}i+=r,l+=e}}e(44208),e(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:u,normalize:d,normalizeView:h,scale:s,scaleView:function(t,n,e){s(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)},shiftRight:function(t,n,e){const r=Math.min(t.count,n.count),o=t.typedBuffer,i=t.typedBufferStride,l=n.typedBuffer,a=n.typedBufferStride;let s=0,u=0;for(let t=0;t<r;t++)o[u]=l[s]>>e,o[u+1]=l[s+1]>>e,o[u+2]=l[s+2]>>e,s+=a,u+=i},transformMat3:a,transformMat3View:l,transformMat4:i,transformMat4View:o,translate:f},Symbol.toStringTag,{value:"Module"}))},75503:(t,n,e)=>{e.d(n,{EC:()=>A,wq:()=>a});var r=e(4576),o=e(21818),i=(e(44208),e(15142)),l=e(11006);class a{constructor(t=9,n){this._compareMinX=h,this._compareMinY=d,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),n&&("function"==typeof n?this._toBBox=n:this._initFormat(n)),this.clear()}destroy(){this.clear(),b.prune(),v.prune(),_.prune(),S.prune()}all(t){s(this._data,t)}search(t,n){let e=this._data;const r=this._toBBox;if(w(t,e))for(b.clear();e;){for(let o=0,i=e.children.length;o<i;o++){const i=e.children[o],l=e.leaf?r(i):i;w(t,l)&&(e.leaf?n(i):M(t,l)?s(i,n):b.push(i))}e=b.pop()}}collides(t){let n=this._data;const e=this._toBBox;if(!w(t,n))return!1;for(b.clear();n;){for(let r=0,o=n.children.length;r<o;r++){const o=n.children[r],i=n.leaf?e(o):o;if(w(t,i)){if(n.leaf||M(t,i))return!0;b.push(o)}}n=b.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let n=0,e=t.length;n<e;n++)this.insert(t[n]);return this}let n=this._build(t.slice(),0,t.length-1,0);if(this._data.children.length)if(this._data.height===n.height)this._splitRoot(this._data,n);else{if(this._data.height<n.height){const t=this._data;this._data=n,n=t}this._insert(n,this._data.height-n.height-1,!0)}else this._data=n;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new k([]),this}remove(t){if(!t)return this;let n,e=this._data,i=null,l=0,a=!1;const s=this._toBBox(t);for(_.clear(),S.clear();e||_.length>0;){if(e||(e=_.pop(),i=_.data[_.length-1],l=S.pop()??0,a=!0),e.leaf&&(n=(0,r.qh)(e.children,(0,o.zI)(t),e.children.length,e.indexHint),-1!==n))return e.children.splice(n,1),_.push(e),this._condense(_),this;a||e.leaf||!M(e,s)?i?(l++,e=i.children[l],a=!1):e=null:(_.push(e),S.push(l),l=0,i=e,e=e.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,n,e,r){const o=e-n+1;let i=this._maxEntries;if(o<=i){const r=new k(t.slice(n,e+1));return u(r,this._toBBox),r}r||(r=Math.ceil(Math.log(o)/Math.log(i)),i=Math.ceil(o/i**(r-1)));const l=new j([]);l.height=r;const a=Math.ceil(o/i),s=a*Math.ceil(Math.sqrt(i));x(t,n,e,s,this._compareMinX);for(let o=n;o<=e;o+=s){const n=Math.min(o+s-1,e);x(t,o,n,a,this._compareMinY);for(let e=o;e<=n;e+=a){const o=Math.min(e+a-1,n);l.children.push(this._build(t,e,o,r-1))}}return u(l,this._toBBox),l}_insert(t,n,e){const r=this._toBBox,o=e?t:r(t);_.clear();const i=function(t,n,e,r){for(;r.push(n),!0!==n.leaf&&r.length-1!==e;){let e,r=1/0,o=1/0;for(let i=0,l=n.children.length;i<l;i++){const l=n.children[i],a=p(l),s=g(t,l)-a;s<o?(o=s,r=a<r?a:r,e=l):s===o&&a<r&&(r=a,e=l)}n=e||n.children[0]}return n}(o,this._data,n,_);for(i.children.push(t),f(i,o);n>=0&&_.data[n].children.length>this._maxEntries;)this._split(_,n),n--;!function(t,n,e){for(let r=e;r>=0;r--)f(n.data[r],t)}(o,_,n)}_split(t,n){const e=t.data[n],r=e.children.length,o=this._minEntries;this._chooseSplitAxis(e,o,r);const i=this._chooseSplitIndex(e,o,r);if(!i)return;const l=e.children.splice(i,e.children.length-i),a=e.leaf?new k(l):new j(l);a.height=e.height,u(e,this._toBBox),u(a,this._toBBox),n?t.data[n-1].children.push(a):this._splitRoot(e,a)}_splitRoot(t,n){this._data=new j([t,n]),this._data.height=t.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(t,n,e){let r,o,i;r=o=1/0;for(let l=n;l<=e-n;l++){const n=c(t,0,l,this._toBBox),a=c(t,l,e,this._toBBox),s=y(n,a),u=p(n)+p(a);s<r?(r=s,i=l,o=u<o?u:o):s===r&&u<o&&(o=u,i=l)}return i}_chooseSplitAxis(t,n,e){const r=t.leaf?this._compareMinX:h,o=t.leaf?this._compareMinY:d;this._allDistMargin(t,n,e,r)<this._allDistMargin(t,n,e,o)&&t.children.sort(r)}_allDistMargin(t,n,e,r){t.children.sort(r);const o=this._toBBox,i=c(t,0,n,o),l=c(t,e-n,e,o);let a=m(i)+m(l);for(let r=n;r<e-n;r++){const n=t.children[r];f(i,t.leaf?o(n):n),a+=m(i)}for(let r=e-n-1;r>=n;r--){const n=t.children[r];f(l,t.leaf?o(n):n),a+=m(l)}return a}_condense(t){for(let n=t.length-1;n>=0;n--){const e=t.data[n];if(0===e.children.length)if(n>0){const o=t.data[n-1],i=o.children;i.splice((0,r.qh)(i,e,i.length,o.indexHint),1)}else this.clear();else u(e,this._toBBox)}}_initFormat(t){const n=["return a"," - b",";"];this._compareMinX=new Function("a","b",n.join(t[0])),this._compareMinY=new Function("a","b",n.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function s(t,n){let e=t;for(v.clear();e;){if(!0===e.leaf)for(const t of e.children)n((0,o.zI)(t));else v.pushArray(e.children);e=v.pop()??null}}function u(t,n){c(t,0,t.children.length,n,t)}function c(t,n,e,r,o){o||(o=new k([])),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let i,l=n;l<e;l++)i=t.children[l],f(o,t.leaf?r(i):i);return o}function f(t,n){t.minX=Math.min(t.minX,n.minX),t.minY=Math.min(t.minY,n.minY),t.maxX=Math.max(t.maxX,n.maxX),t.maxY=Math.max(t.maxY,n.maxY)}function h(t,n){return t.minX-n.minX}function d(t,n){return t.minY-n.minY}function p(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function m(t){return t.maxX-t.minX+(t.maxY-t.minY)}function g(t,n){return(Math.max(n.maxX,t.maxX)-Math.min(n.minX,t.minX))*(Math.max(n.maxY,t.maxY)-Math.min(n.minY,t.minY))}function y(t,n){const e=Math.max(t.minX,n.minX),r=Math.max(t.minY,n.minY),o=Math.min(t.maxX,n.maxX),i=Math.min(t.maxY,n.maxY);return Math.max(0,o-e)*Math.max(0,i-r)}function M(t,n){return t.minX<=n.minX&&t.minY<=n.minY&&n.maxX<=t.maxX&&n.maxY<=t.maxY}function w(t,n){return n.minX<=t.maxX&&n.minY<=t.maxY&&n.maxX>=t.minX&&n.maxY>=t.minY}function x(t,n,e,r,o){const i=[n,e];for(;i.length;){const n=i.pop(),e=i.pop();if(n-e<=r)continue;const a=e+Math.ceil((n-e)/r/2)*r;(0,l.q)(t,a,e,n,o),i.push(e,a,a,n)}}const b=new i.A,v=new i.A,_=new i.A,S=new i.A({deallocator:void 0});class A{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class B extends A{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class k extends B{constructor(t){super(),this.children=t,this.leaf=!0}}class j extends B{constructor(t){super(),this.children=t,this.leaf=!1}}},77690:(t,n,e)=>{e.d(n,{B8:()=>a,Ge:()=>h,I0:()=>f,KC:()=>s,hZ:()=>i,hs:()=>c,lw:()=>u,mg:()=>l,z0:()=>o});var r=e(34304);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function i(t,n,e,r,o,i,l,a,s,u){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t[4]=i,t[5]=l,t[6]=a,t[7]=s,t[8]=u,t}function l(t,n){if(t===n){const e=n[1],r=n[2],o=n[5];t[1]=n[3],t[2]=n[6],t[3]=e,t[5]=n[7],t[6]=r,t[7]=o}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function a(t,n){const e=n[0],r=n[1],o=n[2],i=n[3],l=n[4],a=n[5],s=n[6],u=n[7],c=n[8],f=c*l-a*u,h=-c*i+a*s,d=u*i-l*s;let p=e*f+r*h+o*d;return p?(p=1/p,t[0]=f*p,t[1]=(-c*r+o*u)*p,t[2]=(a*r-o*l)*p,t[3]=h*p,t[4]=(c*e-o*s)*p,t[5]=(-a*e+o*i)*p,t[6]=d*p,t[7]=(-u*e+r*s)*p,t[8]=(l*e-r*i)*p,t):null}function s(t,n){const e=n[0],r=n[1],o=n[2],i=n[3],l=n[4],a=n[5],s=n[6],u=n[7],c=n[8];return t[0]=l*c-a*u,t[1]=o*u-r*c,t[2]=r*a-o*l,t[3]=a*s-i*c,t[4]=e*c-o*s,t[5]=o*i-e*a,t[6]=i*u-l*s,t[7]=r*s-e*u,t[8]=e*l-r*i,t}function u(t,n,e){const r=n[0],o=n[1],i=n[2],l=n[3],a=n[4],s=n[5],u=n[6],c=n[7],f=n[8],h=e[0],d=e[1],p=e[2],m=e[3],g=e[4],y=e[5],M=e[6],w=e[7],x=e[8];return t[0]=h*r+d*l+p*u,t[1]=h*o+d*a+p*c,t[2]=h*i+d*s+p*f,t[3]=m*r+g*l+y*u,t[4]=m*o+g*a+y*c,t[5]=m*i+g*s+y*f,t[6]=M*r+w*l+x*u,t[7]=M*o+w*a+x*c,t[8]=M*i+w*s+x*f,t}function c(t,n,e){const r=e[0],o=e[1],i=e[2];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t[6]=i*n[6],t[7]=i*n[7],t[8]=i*n[8],t}function f(t,n){const e=n[0],r=n[1],o=n[2],i=n[3],l=e+e,a=r+r,s=o+o,u=e*l,c=r*l,f=r*a,h=o*l,d=o*a,p=o*s,m=i*l,g=i*a,y=i*s;return t[0]=1-f-p,t[3]=c-y,t[6]=h+g,t[1]=c+y,t[4]=1-u-p,t[7]=d-m,t[2]=h-g,t[5]=d+m,t[8]=1-u-f,t}function h(t,n){const e=n[0],r=n[1],o=n[2],i=n[3],l=n[4],a=n[5],s=n[6],u=n[7],c=n[8],f=n[9],h=n[10],d=n[11],p=n[12],m=n[13],g=n[14],y=n[15],M=e*a-r*l,w=e*s-o*l,x=e*u-i*l,b=r*s-o*a,v=r*u-i*a,_=o*u-i*s,S=c*m-f*p,A=c*g-h*p,B=c*y-d*p,k=f*g-h*m,j=f*y-d*m,R=h*y-d*g;let I=M*R-w*j+x*k+b*B-v*A+_*S;return I?(I=1/I,t[0]=(a*R-s*j+u*k)*I,t[1]=(s*B-l*R-u*A)*I,t[2]=(l*j-a*B+u*S)*I,t[3]=(o*j-r*R-i*k)*I,t[4]=(e*R-o*B+i*A)*I,t[5]=(r*B-e*j-i*S)*I,t[6]=(m*_-g*v+y*b)*I,t[7]=(g*x-p*_-y*w)*I,t[8]=(p*v-m*x+y*M)*I,t):null}function d(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t}const p=u,m=d;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t},adjoint:s,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:function(t){const n=t[0],e=t[1],r=t[2],o=t[3],i=t[4],l=t[5],a=t[6],s=t[7],u=t[8];return n*(u*i-l*s)+e*(-u*o+l*a)+r*(s*o-i*a)},equals:function(t,n){const e=t[0],o=t[1],i=t[2],l=t[3],a=t[4],s=t[5],u=t[6],c=t[7],f=t[8],h=n[0],d=n[1],p=n[2],m=n[3],g=n[4],y=n[5],M=n[6],w=n[7],x=n[8],b=(0,r.FD)();return Math.abs(e-h)<=b*Math.max(1,Math.abs(e),Math.abs(h))&&Math.abs(o-d)<=b*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(i-p)<=b*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(l-m)<=b*Math.max(1,Math.abs(l),Math.abs(m))&&Math.abs(a-g)<=b*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(s-y)<=b*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(u-M)<=b*Math.max(1,Math.abs(u),Math.abs(M))&&Math.abs(c-w)<=b*Math.max(1,Math.abs(c),Math.abs(w))&&Math.abs(f-x)<=b*Math.max(1,Math.abs(f),Math.abs(x))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:o,fromQuat:f,fromRotation:function(t,n){const e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=-e,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:function(t){const n=(0,r.FD)(),e=t[0],o=t[1],i=t[2],l=t[3],a=t[4],s=t[5],u=t[6],c=t[7],f=t[8];return Math.abs(1-(e*e+l*l+u*u))<=n&&Math.abs(1-(o*o+a*a+c*c))<=n&&Math.abs(1-(i*i+s*s+f*f))<=n},mul:p,multiply:u,multiplyScalar:function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t},multiplyScalarAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t},normalFromMat4:h,normalFromMat4Legacy:function(t,n){const e=n[0],r=n[1],o=n[2],i=n[4],l=n[5],a=n[6],s=n[8],u=n[9],c=n[10],f=c*l-a*u,h=-c*i+a*s,d=u*i-l*s,p=e*f+r*h+o*d;if(!p)return null;const m=1/p;return t[0]=f*m,t[1]=(-c*r+o*u)*m,t[2]=(a*r-o*l)*m,t[3]=h*m,t[4]=(c*e-o*s)*m,t[5]=(-a*e+o*i)*m,t[6]=d*m,t[7]=(-u*e+r*s)*m,t[8]=(l*e-r*i)*m,t},projection:function(t,n,e){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/e,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,e){const r=n[0],o=n[1],i=n[2],l=n[3],a=n[4],s=n[5],u=n[6],c=n[7],f=n[8],h=Math.sin(e),d=Math.cos(e);return t[0]=d*r+h*l,t[1]=d*o+h*a,t[2]=d*i+h*s,t[3]=d*l-h*r,t[4]=d*a-h*o,t[5]=d*s-h*i,t[6]=u,t[7]=c,t[8]=f,t},scale:c,scaleByVec2:function(t,n,e){const r=e[0],o=e[1];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t},set:i,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:m,subtract:d,translate:function(t,n,e){const r=n[0],o=n[1],i=n[2],l=n[3],a=n[4],s=n[5],u=n[6],c=n[7],f=n[8],h=e[0],d=e[1];return t[0]=r,t[1]=o,t[2]=i,t[3]=l,t[4]=a,t[5]=s,t[6]=h*r+d*l+u,t[7]=h*o+d*a+c,t[8]=h*i+d*s+f,t},transpose:l},Symbol.toStringTag,{value:"Module"}))},93223:(t,n,e)=>{e.d(n,{e:()=>i});var r=e(66552),o=e(10107);function i(t,n={}){const e=t instanceof r.J?t:new r.J(t,n),{alwaysWriteDefaults:i,default:l,ignoreUnknown:a=!0,name:s,nonNullable:u,readOnly:c=!1}=n;return(0,o.MZ)({type:a?e.apiValues:String,json:{type:e.jsonValues,default:l,name:s,read:!c&&{reader:e.read},write:{writer:e.write,alwaysWriteDefaults:i}},nonNullable:u,readOnly:c})}},95488:(t,n,e)=>{e.d(n,{I:()=>o});var r=e(11406);class o extends r.T{notify(){const t=this._observers;if(t&&t.length>0){const n=t.slice();for(const t of n)t.onInvalidated(),t.onCommitted()}}}},95696:(t,n,e)=>{e.d(n,{A:()=>c});var r,o=e(31635),i=e(69540),l=e(25482),a=e(10107),s=(e(44208),e(53966),e(87811),e(93223)),u=e(40608);let c=class extends(i.A.ClonableMixin(l.A)){static{r=this}constructor(t){super(t),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,o.Cg)([(0,s.e)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,o.Cg)([(0,a.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=r=(0,o.Cg)([(0,u.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c)},98764:(t,n,e)=>{e.d(n,{Y0:()=>u,lO:()=>c});var r=e(73941),o=e(16930),i=e(21325);const l=new o.A(r.fv),a=new o.A(r.FY),s=new o.A(r.LJ),u=new o.A(r.Ro);function c(t){const n=f.get(t);if(n)return n;let e=l;if(t)if(t===a)e=a;else if(t===s)e=s;else{const n=t.wkid,r=t.latestWkid;if(null!=n||null!=r)(0,i.tl)(n)||(0,i.tl)(r)?e=a:((0,i.ZL)(n)||(0,i.ZL)(r))&&(e=s);else{const n=t.wkt2??t.wkt;if(n){const t=n.toUpperCase();t===h?e=a:t===d&&(e=s)}}}return f.set(t,e),e}const f=new Map,h=a.wkt.toUpperCase(),d=s.wkt.toUpperCase()},98988:(t,n,e)=>{e.r(n),e.d(n,{canProjectWithoutEngine:()=>$,getTransformation:()=>C,getTransformations:()=>F,initializeProjection:()=>D,isEqualBaseGCS:()=>K,isLoaded:()=>T,isLoadedOrLoad:()=>O,isLoadedOrLoadFor:()=>P,load:()=>Y,project:()=>X,projectExtent:()=>it,projectMany:()=>E,projectMultipoint:()=>Q,projectOrLoad:()=>z,projectOrLoadMany:()=>N,projectPoint:()=>J,projectPolygon:()=>rt,projectPolyline:()=>nt,projectWithZConversion:()=>Z,projectWithoutEngine:()=>W,requiresLoad:()=>q,test:()=>V,tryProjectWithZConversion:()=>U,unload:()=>L});var r=e(49186),o=e(74887),i=e(62788),l=e(95488),a=e(51850),s=e(21276),u=e(73941),c=e(5443),f=e(48526),h=e(83290),d=e(86738),p=e(39829),m=e(82799),g=e(16930),y=e(9762),M=e(37539);function w(t,n,e,r,o,i){return x[0]=t,x[1]=n,x[2]=e,(0,y.projectBuffer)(x,r,0,o,i,0)}const x=(0,a.vt)();let b=0;class v{static fromGE(t){const n=new v;return n._wkt=t.wkt,n._wkid=t.wkid,n._isInverse=t.isInverse,n}constructor(t){this.uid=b++,t?(this._wkt=null!=t.wkt?t.wkt:null,this._wkid=null!=t.wkid?t.wkid:-1,this._isInverse=null!=t.isInverse&&!0===t.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(t){this._wkt=t,this.uid=b++}get wkid(){return this._wkid}set wkid(t){this._wkid=t,this.uid=b++}get isInverse(){return this._isInverse}set isInverse(t){this._isInverse=t,this.uid=b++}getInverse(){const t=new v;return t._wkt=this.wkt,t._wkid=this._wkid,t._isInverse=!this.isInverse,t}}class _{static cacheKey(t,n){return[t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??"",n.wkid?.toString()??"-1",n.wkt?.toString()??"",n.wkt2?.toString()??""].join()}static fromGE(t){const n=new _;let e="";for(const r of t.steps){const t=v.fromGE(r);n.steps.push(t),e+=t.uid.toString()+","}return n._cachedProjection={},n._gtlistentry=null,n._chain=e,n}constructor(t){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,t?.steps)for(const n of t.steps)n instanceof v?this.steps.push(n):this.steps.push(new v({wkid:n.wkid,wkt:n.wkt,isInverse:n.isInverse}))}getInverse(){const t=new _;t.steps=[];for(let n=this.steps.length-1;n>=0;n--){const e=this.steps[n];t.steps.push(e.getInverse())}return t}getGTListEntry(){let t="";for(const n of this.steps)t+=n.uid.toString()+",";return t!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=t),this._gtlistentry}assignCachedGe(t,n,e){this._cachedProjection[_.cacheKey(t,n)]=e}getCachedGeTransformation(t,n){let e="";for(const t of this.steps)e+=t.uid.toString()+",";e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e);const r=this._cachedProjection[_.cacheKey(t,n)];return void 0===r?null:r}}var S=e(21325),A=e(62815);let B=null,k=null,j=null,R={};const I=new l.I;function T(){return!!B&&(0,h.i)()}function O(){return!!T()||((0,i.gc)(I),Y(),!1)}function P(t,n){return!t||!n||$(t,n)||O()}function q(t,n){return!$(t,n)&&!T()}function Y(t){return null==j&&(j=Promise.all([(0,h.l)(),e.e(9930).then(e.bind(e,49930)).then(t=>t.g),e.e(2731).then(e.bind(e,12731))])),j.then(([,n,{hydratedAdapter:e}])=>{(0,o.Te)(t),k=e,B=n.default,B._enableProjection(h.p),I.notify()})}function X(t,n,e=null,r=null){return Array.isArray(t)?0===t.length?[]:((0,s.H)(t),E(k,t,t[0].spatialReference,n,e,r)):((0,s.f)(t),E(k,[t],t.spatialReference,n,e,r)[0])}function E(t,n,e,r,o=null,i=null){if(null==e||null==r)return n;if($(e,r,o))return n.map(t=>W(t,e,r));if(null==o&&(0,u.jA)(e))return n.map(t=>W(t,e,g.A.WGS84)).map(t=>U(t,r));if(null==o&&(0,u.jA)(r))return n.map(t=>U(t,g.A.WGS84)).map(t=>W(t,g.A.WGS84,r));if(null==o){const t=_.cacheKey(e,r);void 0!==R[t]?o=R[t]:(null==(o=C(e,r,void 0))&&(o=new _),R[t]=o)}if(null==B||null==t)throw new G;return null!=i?B._project(t,n,e,r,o,i):B._project(t,n,e,r,o)}function z(t,n){const e=N([t],n);return null!=e.pending?{pending:e.pending,geometry:null}:null!=e.geometries?{pending:null,geometry:e.geometries[0]}:{pending:null,geometry:null}}function N(t,n){if(!T())for(const e of t)if(null!=e&&!(0,S.aI)(e.spatialReference,n)&&(0,S.fn)(e.spatialReference)&&(0,S.fn)(n)&&!$(e.spatialReference,n))return(0,i.gc)(I),{pending:Y(),geometries:null};return{pending:null,geometries:t.map(t=>null==t?null:(0,S.aI)(t.spatialReference,n)?t:(0,S.fn)(t.spatialReference)&&(0,S.fn)(n)?U(t,n):null)}}function C(t,n,e=null){if(null==t||null==n)return null;if(null==B||null==k)throw new G;const r=B._getTransformation(k,t,n,e,e?.spatialReference);return null!==r?_.fromGE(r):null}function F(t,n,e=null){if(null==B||null==k)throw new G;const r=B._getTransformationBySuitability(k,t,n,e,e?.spatialReference);if(null!==r){const t=[];for(const n of r)t.push(_.fromGE(n));return t}return[]}class G extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function L(){B=null,k=null,j=null,R={}}const V={get loadPromise(){return j}};function U(t,n){try{const e=X(t,n);if(null==e)return null;"xmin"in t&&"xmin"in e&&(e.zmin=t.zmin,e.zmax=t.zmax);const r=(0,A.N)(e.type,t.spatialReference,n);return null!=r&&r(e),e}catch(t){if(!(t instanceof G))throw t;return null}}async function Z(t,n,e){const r=t.spatialReference;return null!=r&&null!=n&&await D(r,n,null,e),U(t,n)}function $(t,n,e){return!e&&(!!(0,S.aI)(t,n)||(0,S.fn)(t)&&(0,S.fn)(n)&&!!(0,M.jd)(t,n))}function K(t,n){if((0,S.aI)(t,n))return!0;if(!(0,S.fn)(t)||!(0,S.fn)(n))return!1;const e=(0,S.oT)(t)||(0,S.K8)(t)||(0,S.x1)(t),r=(0,S.oT)(n)||(0,S.K8)(n)||(0,S.x1)(n);return e&&r}async function D(t,n,e,r){if(T())return(0,o.NO)(r);if(Array.isArray(t)){for(const{source:n,dest:e,geographicTransformation:o}of t)if(n&&e&&!$(n,e,o))return Y(r)}else if(t&&n&&!$(t,n,e))return Y(r);return(0,o.NO)(r)}function W(t,n,e){return t?"x"in t?H(t,n,new d.A,e,0):"xmin"in t?lt(t,n,new c.A,e,0):"rings"in t?ot(t,n,new p.A,e,0):"paths"in t?et(t,n,new m.A,e,0):"points"in t?tt(t,n,new f.A,e,0):null:null}function J(t,n,e=n.spatialReference,r=0){return null!=e&&null!=t.spatialReference&&null!=H(t,t.spatialReference,n,e,r)}function H(t,n,e,r,o){st[0]=t.x,st[1]=t.y;const i=t.z;return st[2]=void 0!==i?i:o,(0,y.projectBuffer)(st,n,0,st,r,0)?(e.x=st[0],e.y=st[1],e.spatialReference=r,void 0!==i||(0,u.xP)(r)?(e.z=st[2],e.hasZ=!0):(e.z=void 0,e.hasZ=!1),void 0===t.m?(e.m=void 0,e.hasM=!1):(e.m=t.m,e.hasM=!0),e):null}function Q(t,n,e=n.spatialReference,r=0){return null!=t.spatialReference&&null!=e&&null!=tt(t,t.spatialReference,n,e,r)}function tt(t,n,e,r,o){const{points:i,hasZ:l,hasM:a}=t,s=[],c=i.length,f=[];for(const t of i)f.push(t[0],t[1],l?t[2]:o);if(!(0,y.projectBuffer)(f,n,0,f,r,0,c))return null;const h=l||(0,u.xP)(r);for(let t=0;t<c;++t){const n=3*t,e=f[n],r=f[n+1];h&&a?s.push([e,r,f[n+2],i[t][3]]):h?s.push([e,r,f[n+2]]):a?s.push([e,r,i[t][2]]):s.push([e,r])}return e.points=s,e.spatialReference=r,e.hasZ=l,e.hasM=a,e}function nt(t,n,e=n.spatialReference,r=0){return null!=t.spatialReference&&null!=e&&null!=et(t,t.spatialReference,n,e,r)}function et(t,n,e,r,o){const{paths:i,hasZ:l,hasM:a}=t,s=[];if(!at(i,l??!1,a??!1,n,s,r,o))return null;const c=l||(0,u.xP)(r);return e.paths=s,e.spatialReference=r,e.hasZ=c,e.hasM=a,e}function rt(t,n,e=n.spatialReference,r=0){return null!=t.spatialReference&&null!=e&&null!=ot(t,t.spatialReference,n,e,r)}function ot(t,n,e,r,o){const{rings:i,hasZ:l,hasM:a}=t,s=[];if(!at(i,l??!1,a??!1,n,s,r,o))return null;const c=l||(0,u.xP)(r);return e.rings=s,e.spatialReference=r,e.hasZ=c,e.hasM=a,e}function it(t,n,e=n.spatialReference,r=0){return null!=t.spatialReference&&null!=e&&null!=lt(t,t.spatialReference,n,e,r)}function lt(t,n,e,r,o){const{xmin:i,ymin:l,xmax:a,ymax:s,hasZ:c,hasM:f}=t;if(!w(i,l,c?t.zmin:o,n,st,r))return null;const h=c||(0,u.xP)(r);return e.xmin=st[0],e.ymin=st[1],h&&(e.zmin=st[2]),w(a,s,c?t.zmax:o,n,st,r)?(e.xmax=st[0],e.ymax=st[1],h&&(e.zmax=st[2]),f&&(e.mmin=t.mmin,e.mmax=t.mmax),e.spatialReference=r,e):null}function at(t,n,e,r,o,i,l=0){const a=new Array;for(const e of t)for(const t of e)a.push(t[0],t[1],n?t[2]:l);if(!(0,y.projectBuffer)(a,r,0,a,i,0))return!1;let s=0;o.length=0;const c=n||(0,u.xP)(i);for(const n of t){const t=new Array;for(const r of n)c&&e?t.push([a[s++],a[s++],a[s++],r[3]]):c?t.push([a[s++],a[s++],a[s++]]):e?(t.push([a[s++],a[s++],r[2]]),s++):(t.push([a[s++],a[s++]]),s++);o.push(t)}return!0}const st=(0,a.vt)()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1395,3513],{4146:(e,t,r)=>{r.d(t,{A:()=>w});var i=r(31635),s=r(78888),n=r(49186),o=r(65529),a=r(4902),l=r(92474),d=r(53966),u=r(74887),p=r(84952),c=r(10107),h=(r(44208),r(87811),r(40608)),y=r(5443),g=r(16930),f=r(92602),m=r(64272);let v=0,w=class extends(o.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.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:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",s=r?.portal?.url||f.A.portalUrl;throw d.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||d.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,p.An)(this.url)}createLayerView(e,t){return Promise.reject(new n.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,c.MZ)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],w.prototype,"effectiveVisible",null),(0,i.Cg)([(0,c.MZ)({type:y.A})],w.prototype,"fullExtent",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,i.Cg)([(0,c.MZ)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,i.Cg)([(0,c.MZ)({clonable:!1})],w.prototype,"parent",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i.Cg)([(0,c.MZ)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,c.MZ)({type:g.A})],w.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.MZ)({type:String})],w.prototype,"title",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)()],w.prototype,"url",void 0),(0,i.Cg)([(0,c.MZ)({type:m.T})],w.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,i.Cg)([(0,h.$)("esri.layers.Layer")],w)},8303:(e,t,r)=>{r.d(t,{A:()=>A});var i=r(31635),s=r(92602),n=r(70333),o=r(78888),a=r(60999),l=r(49186),d=r(53966),u=r(97768),p=r(74887),c=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),g=r(40608),f=r(43937),m=r(77548),v=r(20655),w=r(80812),b=r(41318),I=r(10407);const A=e=>{const t=e;let A=class extends t{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 w.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:i}=await r.e(1204).then(r.bind(r,41204));return(0,p.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||d.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,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!n.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let o,a;if(s)o=r.portal.url;else try{o=await(0,m.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!o||!(0,c.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,d=!1,u=!1;if(!a)return{features:{edit:l,fullEdit:d},content:{updateItem:u}};try{if(s?await r.reload():(r=new w.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:d},content:{updateItem:u}}}_getUserPrivileges(e,t){const r=(0,I.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.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=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.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 i=`${r.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(i))return s.user;const l=`${i}/community/self`,d=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));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,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,c.ut)(i.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,i.Cg)([(0,h.MZ)({type:w.default})],A.prototype,"portalItem",null),(0,i.Cg)([(0,y.w)("web-document","portalItem",["itemId"])],A.prototype,"readPortalItem",null),(0,i.Cg)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],A.prototype,"writePortalItem",null),(0,i.Cg)([(0,h.MZ)({clonable:!1})],A.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasUpdateItemPrivileges",void 0),A=(0,i.Cg)([(0,g.$)("esri.layers.mixins.PortalLayer")],A),A},C={credential:null,user:null}},8947:(e,t,r)=>{r.d(t,{L:()=>o});var i=r(60999),s=r(74887),n=r(67076);async function o(e,t,r){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const a=await(0,i.Ke)(o.populateFromStyle());if((0,s.Te)(r),!1===a.ok){const r=a.error;t?.messages&&t.messages.push(new n.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},13899:(e,t,r)=>{r.r(t),r.d(t,{default:()=>_e});var i=r(31635),s=r(52106),n=r(13874),o=r(69540),a=r(7762),l=r(49186),d=r(36563),u=r(53966),p=r(97768),c=r(92071),h=r(74887),y=r(36708),g=r(10107),f=(r(44208),r(87811),r(88620)),m=r(36005),v=r(40608),w=r(86738),b=r(4146),I=r(55726),A=r(52136),C=r(18768),S=r(69208),M=r(47685),F=r(16131),x=r(8303),L=r(25036),O=r(58947),j=r(82935),_=r(25482),T=r(30524);function Z({associatedLayer:e,serviceUpdateTimeStamp:t}){const r=e?.editingInfo?.lastEditDate,i=e?.serverGens,s=null!=r,n=null!=t,o=s&&n&&t.lastUpdate!==r.getTime();return s&&(o||!n&&i?.minServerGen!==i?.serverGen)}var E=r(96184),U=r(64272),P=r(26253);const R=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.serviceTimeInfo=null}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return(0,T.sv)(t,this.fieldsIndex),t}set timeInfo(e){(0,T.sv)(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:r,endTimeField:i}=t;if(null==r&&null==i)return;if(Z({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let i=null;try{const r=await(this.fetchStatistics?.(t,e));i=r?.stats}catch{}if(null==i)return null;const{minTimeStr:s,min:n,maxTimeStr:o,max:a}=i,l=t===r?s??n:o??a;return null!=l?new Date(l):null},[n,o]=await Promise.all([s(r),s(i)]);if(null!=r&&null==n||null!=i&&null==o)return;const a=new U.T({start:n,end:o});this.setAtOrigin("timeInfo",new E.A({endField:i,startField:r,fullTimeExtent:a}),"service")}};return(0,i.Cg)([(0,g.MZ)({type:E.A,json:{read:!1,write:!1}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,g.MZ)({type:U.T,json:{read:!1,write:!1}})],r.prototype,"timeExtent",null),(0,i.Cg)([(0,g.MZ)({type:P.T,json:{read:!1,write:!1}})],r.prototype,"timeOffset",null),(0,i.Cg)([(0,g.MZ)({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],r.prototype,"datesInUnknownTimezone",null),(0,i.Cg)([(0,g.MZ)({type:N,readOnly:!0,json:{read:{source:"timeInfo"}}})],r.prototype,"serviceTimeInfo",void 0),r=(0,i.Cg)([(0,v.$)("esri.layers.mixins.TemporalSceneLayer")],r),r};let N=class extends _.A{constructor(){super(...arguments),this.endTimeField=null,this.startTimeField=null}};(0,i.Cg)([(0,g.MZ)({type:String})],N.prototype,"endTimeField",void 0),(0,i.Cg)([(0,g.MZ)({type:String})],N.prototype,"startTimeField",void 0),N=(0,i.Cg)([(0,v.$)("esri.layers.mixins.TemporalSceneLayer.SceneServiceTimeInfo")],N);var $=r(60694),D=r(92009),k=r(4071),q=r(10873),H=r(15426),V=r(40530),J=r(67202),G=r(17036),B=r(95466),K=r(50805),Q=r(20557),z=r(46499),W=r(39383),Y=r(37352),X=r(4513),ee=r(86390);let te=class extends _.A{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,i.Cg)([(0,g.MZ)({type:String,json:{read:!0,write:{isRequired:!0}}})],te.prototype,"name",void 0),(0,i.Cg)([(0,g.MZ)({type:String,json:{read:!0,write:{isRequired:!0}}})],te.prototype,"field",void 0),(0,i.Cg)([(0,g.MZ)({type:[Number],json:{read:!0,write:!0}})],te.prototype,"currentRangeExtent",void 0),(0,i.Cg)([(0,g.MZ)({type:[Number],json:{read:!0,write:!0}})],te.prototype,"fullRangeExtent",void 0),(0,i.Cg)([(0,g.MZ)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],te.prototype,"type",void 0),te=(0,i.Cg)([(0,v.$)("esri.layers.support.RangeInfo")],te);var re,ie=r(78888),se=r(4718),ne=r(87024),oe=r(67076),ae=r(39829),le=r(98988);let de=re=class extends(_.A.JSONSupportMixin(a.A.ofType(ae.A))){constructor(e){super(e)}clone(){return new re(this.items.map(e=>e.clone()))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map(r=>{if(!t.equals(r.spatialReference)){if(!(0,le.canProjectWithoutEngine)(r.spatialReference,t))return e?.messages?.push(new oe.A("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const i=new ae.A;(0,le.projectPolygon)(r,i,t),r=i}const i=r.toJSON(e);return delete i.spatialReference,i}).filter(e=>null!=e):this.toArray().map(t=>t.toJSON(e))}static fromJSON(e,t){const r=new re;return e.forEach(e=>r.add(ae.A.fromJSON(e,t))),r}};de=re=(0,i.Cg)([(0,v.$)("esri.layers.support.PolygonCollection")],de);const ue=de;var pe,ce=r(97159);let he=pe=class extends _.A{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new ue,this._geometriesSource=null}initialize(){this.addHandles((0,y.on)(()=>this.geometries,"after-changes",()=>this.geometries=this.geometries,y.OH))}readGeometries(e,t,r){Array.isArray(e)?this.geometries=ue.fromJSON(e,r):this._geometriesSource={url:(0,ce.f)(e,r),context:r}}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:r,context:i}=this._geometriesSource,s=await(0,ie.A)(r,{responseType:"json",signal:t?.signal}),n=e.toJSON(),o=s.data.map(e=>({...e,spatialReference:n}));this.geometries=ue.fromJSON(o,i),this._geometriesSource=null}clone(){const e=new pe({geometries:(0,se.o8)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,i.Cg)([(0,g.MZ)({type:["disjoint","contains"],nonNullable:!0,json:{write:{isRequired:!0}}})],he.prototype,"spatialRelationship",void 0),(0,i.Cg)([(0,g.MZ)({type:ue,nonNullable:!0,json:{write:!0,origins:{"web-scene":{write:{isRequired:!0}}}}}),(0,ne.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],he.prototype,"geometries",void 0),(0,i.Cg)([(0,m.w)(["web-scene","portal-item"],"geometries")],he.prototype,"readGeometries",null),he=pe=(0,i.Cg)([(0,v.$)("esri.layers.support.SceneFilter")],he);const ye=he;var ge=r(84952),fe=r(8947),me=r(41214),ve=r(61956),we=r(24212),be=r(30291);async function Ie(e){const t=[];for(const r of e)r.name.toLowerCase().endsWith(".zip")?t.push(Ae(r)):t.push(Promise.resolve(r));return(await Promise.all(t)).flat()}async function Ae(e){const{BlobReader:t,ZipReader:i,BlobWriter:s}=await Promise.all([r.e(8392),r.e(9588)]).then(r.bind(r,9588)),n=[],o=new i(new t(e));return(await o.getEntries()).forEach(e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new s,r=e.getData?.(t).then(t=>new File([t],e.filename));r&&n.push(r)}),Promise.all(n)}var Ce=r(5682),Se=r(45671),Me=r(78553);const Fe=new Set(["3DObject","Point"]),xe=(0,G.p)();let Le=class extends(R((0,M.w6)((0,O.w)((0,C.b)((0,F.q)((0,x.A)((0,L.j)((0,c.P)((0,S.d)((0,A.p)(o.A.ClonableMixin(b.A)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new a.A,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=(0,p.pR)(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?(0,H.Vq)(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new B.A(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:K.W4.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&(0,H.C$)(this.associatedLayer)}get geometryType(){return je[this.profile]||"mesh"}set renderer(e){(0,T.yp)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:k.P;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:n,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:l,supportsM:d,isVersioned:u,supportsAttachment:p},operations:{supportsEditing:c,supportsAdd:h,supportsUpdate:y,supportsDelete:g,supportsQuery:f,supportsQueryAttachments:m,supportsAsyncConvert3D:v}}=e,w=e.operations.supportsChangeTracking,b=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:b&&o,supportsUploadWithItemId:n},data:{supportsAttachment:p,supportsZ:l,supportsM:d,isVersioned:u},operations:{supportsQuery:f,supportsQueryAttachments:m,supportsEditing:c&&w,supportsAdd:b&&h&&w,supportsDelete:b&&g&&w,supportsUpdate:y&&w,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Oe[r]?Oe[r]:(u.A.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(h.QP),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await(0,fe.L)(this,{origin:"service"},t),(0,T.yp)(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){u.A.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ve.A;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e})}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=(0,T.hL)(this.fieldsIndex,await(0,Se.TO)(this,(0,Se.D8)(this)));return(0,Ce.s1)(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new l.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new s.A;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(u.A.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,be.tn)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new l.A("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:i}=await r.e(8628).then(r.bind(r,78628));let s=t;await this.load();const n=this.associatedLayer;if(!n)throw new l.A(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();const{globalIdField:o}=n,a=!!n.infoFor3D,d=s?.globalIdUsed??!0;if(a&&null==o)throw new l.A(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(a&&!d)throw new l.A(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return(0,$.Wo)(n.url)&&a&&null!=e.deleteFeatures&&null!=o&&(s={...s,globalIdToObjectId:await(0,H.GA)(n,e.deleteFeatures,o)}),i(this,n.source,e,s)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new l.A(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}async convertMesh(e,t){t??={};const i=e=>{throw u.A.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||i(new l.A("invalid:layer","SceneLayer has no capability for mesh conversion"));const s=await this.extractAndFilterFiles(e),n=s.reduce((e,t)=>(0,Q.oF)(this.infoFor3D,t)?e+1:e,0);0===n&&i(new I.VP),n>1&&i(new I.XQ);const o=this.spatialReference,a=t.location??new w.A({x:0,y:0,z:0,spatialReference:o}),d=a.spatialReference.isGeographic?"local":"georeferenced",{default:p}=await Promise.all([r.e(3030),r.e(36)]).then(r.bind(r,40036)),c=p.createWithExternalSource(a,{type:"client",files:s},{vertexSpace:d,transform:(0,ee.Z)(a.spatialReference),unitConversionDisabled:!0}),[h]=await this.uploadAssets([c],{...t,useAssetOrigin:!t.location});return h}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;return t?(await Ie(e)).filter(e=>(0,Q.fu)(t,e)):e}validateLayer(e){if(e.layerType&&!Fe.has(e.layerType))throw new l.A("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new l.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new l.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new l.A("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new l.A("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new l.A("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=(0,f.oY)(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),n=this.associatedLayer.originIdOf(i);s<n&&(2===n||3===n)&&t.setAtOrigin(i,this.associatedLayer[i],n)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");null!=this.associatedLayer?.infoFor3D&&e&&(0,$.Wo)(this.associatedLayer?.url)&&Z(this)&&(0,f.oY)(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await(0,D.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await X.S.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(e){(0,h.zf)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles((0,d.rE)(e));try{await(0,y.C_)(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(e){return void(0,h.jH)(e)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?u.A.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):u.A.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&(0,we.XF)(u.A.getLogger(this),(0,we.$7)("Mesh scene layers","relative-to-scene",e)),(0,we.XF)(u.A.getLogger(this),(0,we.tW)("Scene layers",e))}async fetchStatistics(e,t){return await async function({fieldName:e,statisticsInfo:t,errorContext:r,fieldsIndex:i,path:s,customParameters:n,apiKey:o,signal:a}){if(null==t)throw new l.A(`${r}:no-cached-statistics`,"Cached statistics are not available for this layer");const d=i.get(e);if(null==d)throw new l.A(`${r}:field-unexisting`,`Field '${e}' does not exist on the layer`);const u=t.find(e=>e.name===d.name);if(null==u)throw new l.A(`${r}:no-cached-statistics`,"Cached statistics for this attribute are not available");const p=(0,ge.fj)(s,u.href),{data:c}=await(0,ie.A)(p,{query:{f:"json",...n,token:o},responseType:"json",signal:a});return c}({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};(0,i.Cg)([(0,g.MZ)({types:{key:"type",base:V.c,typeMap:{selection:J.A}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],Le.prototype,"featureReduction",void 0),(0,i.Cg)([(0,g.MZ)({type:[te],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],Le.prototype,"rangeInfos",void 0),(0,i.Cg)([(0,g.MZ)({json:{read:!1}})],Le.prototype,"associatedLayer",void 0),(0,i.Cg)([(0,g.MZ)({type:["show","hide"]})],Le.prototype,"listMode",void 0),(0,i.Cg)([(0,g.MZ)({type:["ArcGISSceneServiceLayer"]})],Le.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,g.MZ)({json:{read:!1},readOnly:!0})],Le.prototype,"type",void 0),(0,i.Cg)([(0,g.MZ)({...xe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"fields",void 0),(0,i.Cg)([(0,g.MZ)()],Le.prototype,"types",null),(0,i.Cg)([(0,g.MZ)()],Le.prototype,"typeIdField",null),(0,i.Cg)([(0,g.MZ)()],Le.prototype,"templates",null),(0,i.Cg)([(0,g.MZ)()],Le.prototype,"formTemplate",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,clonable:!1})],Le.prototype,"fieldsIndex",null),(0,i.Cg)([(0,g.MZ)({type:Y.A,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Le.prototype,"floorInfo",void 0),(0,i.Cg)([(0,g.MZ)(xe.outFields)],Le.prototype,"outFields",void 0),(0,i.Cg)([(0,g.MZ)({type:K.W4,readOnly:!0,json:{read:!1}})],Le.prototype,"nodePages",void 0),(0,i.Cg)([(0,m.w)("service","nodePages",["nodePages","pointNodePages"])],Le.prototype,"readNodePages",null),(0,i.Cg)([(0,g.MZ)({type:[K.uV],readOnly:!0})],Le.prototype,"materialDefinitions",void 0),(0,i.Cg)([(0,g.MZ)({type:[K.Ot],readOnly:!0})],Le.prototype,"textureSetDefinitions",void 0),(0,i.Cg)([(0,g.MZ)({type:[K.L0],readOnly:!0})],Le.prototype,"geometryDefinitions",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],Le.prototype,"serviceUpdateTimeStamp",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],Le.prototype,"attributeStorageInfo",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],Le.prototype,"statisticsInfo",void 0),(0,i.Cg)([(0,g.MZ)({type:a.A.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Le.prototype,"excludeObjectIds",void 0),(0,i.Cg)([(0,g.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Le.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,g.MZ)({type:ye,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Le.prototype,"filter",void 0),(0,i.Cg)([(0,g.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Le.prototype,"path",void 0),(0,i.Cg)([(0,g.MZ)(q.Yj)],Le.prototype,"elevationInfo",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{read:!1}})],Le.prototype,"effectiveCapabilities",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],Le.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,g.MZ)({type:String})],Le.prototype,"geometryType",null),(0,i.Cg)([(0,g.MZ)(q.kF)],Le.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,g.MZ)({type:[z.A],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:W.w},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:W.w},write:!0}})],Le.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,g.MZ)(q.fV)],Le.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,g.MZ)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?(0,Me.D)(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Le.prototype,"opacity",void 0),(0,i.Cg)([(0,g.MZ)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"priority",void 0),(0,i.Cg)([(0,g.MZ)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"semantic",void 0),(0,i.Cg)([(0,g.MZ)({types:me.XJ,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Le.prototype,"renderer",null),(0,i.Cg)([(0,g.MZ)({json:{read:!1}})],Le.prototype,"cachedDrawingInfo",void 0),(0,i.Cg)([(0,m.w)("service","cachedDrawingInfo")],Le.prototype,"readCachedDrawingInfo",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{read:!1}})],Le.prototype,"capabilities",null),(0,i.Cg)([(0,g.MZ)({type:Boolean,json:{read:!1}})],Le.prototype,"editingEnabled",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{write:!1,read:!1}})],Le.prototype,"infoFor3D",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{write:!1,read:!1}})],Le.prototype,"relationships",null),(0,i.Cg)([(0,g.MZ)(q.M6)],Le.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,g.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],Le.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{read:!1}})],Le.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,g.MZ)(q.zQ)],Le.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,g.MZ)({type:String,json:{read:!1}})],Le.prototype,"objectIdField",void 0),(0,i.Cg)([(0,m.w)("service","objectIdField",["objectIdField","fields"])],Le.prototype,"readObjectIdField",null),(0,i.Cg)([(0,g.MZ)({type:String,json:{read:!1}})],Le.prototype,"globalIdField",void 0),(0,i.Cg)([(0,m.w)("service","globalIdField",["globalIdField","fields"])],Le.prototype,"readGlobalIdField",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:String,json:{read:!1}})],Le.prototype,"displayField",null),(0,i.Cg)([(0,g.MZ)({type:String,json:{read:!1}})],Le.prototype,"profile",void 0),(0,i.Cg)([(0,m.w)("service","profile",["store.profile"])],Le.prototype,"readProfile",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Le.prototype,"normalReferenceFrame",void 0),(0,i.Cg)([(0,g.MZ)(q.PY)],Le.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,g.MZ)({json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"serviceItemId",void 0),(0,i.Cg)([(0,g.MZ)(j.B)],Le.prototype,"useViewTime",null),Le=(0,i.Cg)([(0,v.$)("esri.layers.SceneLayer")],Le);const Oe={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},je={"mesh-pyramids":"mesh",points:"point"},_e=Le},17036:(e,t,r)=>{r.d(t,{p:()=>l});var i=r(44208),s=r(53966),n=r(20437),o=r(95466),a=r(30524);function l(){return{fields:{type:[n.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(31635),s=r(53966),n=r(10107),o=(r(44208),r(87811),r(40608)),a=r(60694);const l=e=>{const t=e;let r=class extends t{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(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,s.A.getLogger(this)))}};return(0,i.Cg)([(0,n.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.ArcGISService")],r),r}},20557:(e,t,r)=>{r.d(t,{Fm:()=>l,Hz:()=>h,JQ:()=>c,JZ:()=>b,ND:()=>g,R_:()=>o,U9:()=>p,fu:()=>s,nr:()=>y,oF:()=>n,rq:()=>d,z$:()=>u});const i=[["binary","application/octet-stream","bin",""]];function s(e,t){return null!=m(t.name,e?.supportedFormats??[])}function n(e,t){if(!e)return!1;const r=d(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function o(e,t){return v(function(e,t){const r=e.toLowerCase();return f(t).find(e=>w(e)===r)}(e,t))}function a(e,t){return v(m(e,t))}function l(e,t){return w(function(e,t){return f(t).find(t=>v(t)===e)}(e,t))}function d(e,t){return a(e.name,t)??o(e.type,t)}function u(e,t,r){return o(e,r)??a(t,r)}function p({supportedFormats:e}){return u("model/gltf-binary","glb",e)}function c(e){const t=p(e);return null!=t&&e.editFormats.includes(t)}function h(e){if(!e)return null;const t=p(e),r=function({supportedFormats:e}){return u("model/gltf+json","gltf",e)}(e);let i=null;for(const s of e.queryFormats){if(s===t)return s;s===r&&(i=s)}return i}function y({supportedFormats:e}){return u("application/esri3do-SR_world","wld",e)}function g({supportedFormats:e}){return u("application/esri3do-SR_prj","prj",e)}function f(e){return[...i,...e]}function m(e,t){const r=e.toLowerCase();return f(t).find(e=>function(e){return e?.[2].split(",").map(e=>e.toLowerCase())??[]}(e).some(e=>r.endsWith(e)))}function v(e){return e?.[0]}function w(e){return e?.[1].toLowerCase()}function b(e){return e.tables?.find(e=>"assetMaps"===e.role)}},20816:(e,t,r)=>{r.d(t,{TA:()=>s,We:()=>a,Z3:()=>n,ZJ:()=>l,w5:()=>d});var i=r(78888);const s=(0,r(13069).vD)(),n=new Map,o=new Map;async function a(e,t,r){if(!e||!r)return!1;if(!t)return!0;const s=new URL(e).host;let o=n.get(s);if(!o){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,i.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function l(e,t,i=!1){if(!e||!t)return!0;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(n)?.entries();if(a)for(const[e,o]of a)if(o.name===t){const t=!o.stack?.hasForwardEdits();if(!t&&i){const[{deleteForwardEdits:t},{default:i}]=await Promise.all([r.e(2186).then(r.bind(r,32186)),r.e(2558).then(r.bind(r,32558))]),a=await t(n,e,new i({sessionId:s,moment:o.moment}));return a.success&&o.stack?.clearForwardEdits(),a.success}return t}return!0}function d(e,t){if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=o.get(r)?.entries();if(i)for(const[e,r]of i)if(r.name===t)return"edit"===r.lockType;return!1}new Map},24770:(e,t,r)=>{r.d(t,{$I:()=>f,AU:()=>h,g7:()=>g,i4:()=>u,ui:()=>p,up:()=>v,vt:()=>d,yo:()=>y});var i=r(34727),s=r(58083),n=r(67026),o=r(82534),a=r(38954),l=r(51850);function d(e=v){return[e[0],e[1],e[2],e[3]]}function u(e,t,r=d()){return(0,a.c)(r,e),r[3]=t,r}function p(e,t=d()){const r=(0,s.l)(w,e);return m(t,(0,i.KJ)((0,n.Xd)(t,r))),t}function c(e,t,r=d()){return(0,n.x8)(w,e,f(e)),(0,n.x8)(b,t,f(t)),(0,n.lw)(w,b,w),m(r,(0,i.KJ)((0,n.Xd)(r,w)))}function h(e,t,r,i=d()){return u(l.Cw,e,I),u(l.JP,t,A),u(l.Cb,r,C),c(I,A,I),c(I,C,i),i}function y(e){return e}function g(e){return e[3]}function f(e){return(0,i.kU)(e[3])}function m(e,t){return e[3]=t,e}const v=[0,0,1,0],w=(0,o.vt)(),b=(0,o.vt)(),I=(d(),d()),A=d(),C=d()},25036:(e,t,r)=>{r.d(t,{j:()=>o});var i=r(31635),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,n.$)("esri.layers.mixins.ScaleRangeLayer")],r),r}},26253:(e,t,r)=>{r.d(t,{T:()=>p});var i=r(31635),s=r(69540),n=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),d=r(40608),u=r(73133);let p=class extends(s.A.ClonableMixin(n.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,i.Cg)([(0,l.e)(u.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,i.Cg)([(0,d.$)("esri.time.TimeInterval")],p)},37352:(e,t,r)=>{r.d(t,{A:()=>d});var i,s=r(31635),n=r(7762),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));let d=i=class extends o.A{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],d.prototype,"floorField",void 0),(0,s.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],d.prototype,"viewAllMode",void 0),(0,s.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],d.prototype,"viewAllLevelIds",void 0),d=i=(0,s.Cg)([(0,l.$)("esri.layers.support.LayerFloorInfo")],d)},40530:(e,t,r)=>{r.d(t,{c:()=>a});var i=r(31635),s=r(25482),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends s.A{constructor(){super(...arguments),this.type=null}};(0,i.Cg)([(0,n.MZ)({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,i.Cg)([(0,o.$)("esri.layers.support.FeatureReduction")],a)},47685:(e,t,r)=>{r.d(t,{Mk:()=>g,Zk:()=>h,w6:()=>v});var i=r(31635),s=r(65529),n=r(4718),o=r(74887),a=r(10107),l=(r(44208),r(53966),r(40608)),d=r(20816);const u=new s.A.EventEmitter;function p(e){return u.on("apply-edits",new WeakRef(e))}function c(e){return u.on("update-moment",new WeakRef(e))}function h(e,t,r=null,i=!1){const s=(0,o.Tw)();return i=null==t||i,u.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:i,result:s.promise}),s}const y=Symbol();function g(e){return null!=e&&"object"==typeof e&&y in e}function f(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function m(e,t,r){const i=new URL(e).host,s=d.Z3.get(i),n=e=>!e||e===s;return n(t)&&n(r)||t===r}const v=e=>{var t;const r=e;let s=class extends r{static{t=y}constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:i,mayReceiveServiceEdits:s,result:o}=e,a=t===this.url,l=null!=r&&null!=this.layerId&&r===this.layerId,d=f(this),u=f(this)&&m(t,i,this.gdbVersion);if(!a||d&&!u||!l&&!s)return;const p=o.then(e=>{if(this.lastEditsEventDate=new Date,l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.o8)(e)),e;const r=e.editedFeatures?.find(({layerId:e})=>e===this.layerId);if(r){const{adds:t,updates:i,deletes:s}=r.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],deletedFeatures:s?s.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],updatedFeatures:i?i.map(({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return this.emit("edits",o),o}const s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,s.historicMoment)&&this.emit("edits",s),s}).then(e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,e.historicMoment)&&(this.historicMoment=e.historicMoment),e));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:i}=e,s=t===this.url,n=f(this),o=f(this)&&m(t,r,this.gdbVersion),a=f(this)&&!m(t,this.gdbVersion,null);s&&n&&o&&a&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then(()=>{this.addHandles(p(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(c(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(e,t,r){return"historicMoment"in this&&this.historicMoment!==r&&(0,d.w5)(e,t)}};return(0,i.Cg)([(0,a.MZ)()],s.prototype,"lastEditsEventDate",void 0),s=(0,i.Cg)([(0,l.$)("esri.layers.mixins.EditBusLayer")],s),s}},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(31635),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,s.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,n.$)("esri.layers.mixins.APIKeyMixin")],r),r}},54239:(e,t,r)=>{r.d(t,{A:()=>m});var i,s=r(31635),n=r(4576),o=r(66552),a=r(25482),l=r(83047),d=r(67076),u=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),h=r(43937);const y=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=y.jsonValues.slice();(0,n.Xy)(g,"orthometric");const f=(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 m=i=class extends a.A{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(function(e,t){return new d.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return f.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||f.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({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 i({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 i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new d.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,u.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0}}}}})],m.prototype,"heightModel",void 0),(0,s.Cg)([(0,h.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s.Cg)([(0,u.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:{writer:f.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,s.Cg)([(0,p.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s.Cg)([(0,p.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=i=(0,s.Cg)([(0,c.$)("esri.geometry.HeightModelInfo")],m)},55726:(e,t,r)=>{r.d(t,{$1:()=>d,H2:()=>h,MT:()=>y,VP:()=>g,WF:()=>u,Wt:()=>o,XQ:()=>f,hK:()=>c,nS:()=>p,uh:()=>a,xY:()=>l});var i=r(49186);const s="upload-assets",n=()=>new Error;class o extends i.A{constructor(){super(`${s}:unsupported`,"Layer does not support asset uploads.",n())}}class a extends i.A{constructor(){super(`${s}:no-glb-support`,"Layer does not support glb.",n())}}class l extends i.A{constructor(){super(`${s}:no-supported-source`,"No supported external source found",n())}}class d extends i.A{constructor(){super(`${s}:not-base-64`,"Expected gltf data in base64 format after conversion.",n())}}class u extends i.A{constructor(){super(`${s}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",n())}}class p extends i.A{constructor(e,t){super(`${s}:bad-response`,`Bad response. Uploaded ${e} items and received ${t} results.`,n())}}class c extends i.A{constructor(e,t){super(`${s}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${t?.code??"-1"}. Error message: ${t?.messages??"unknown"}`,n())}}class h extends i.A{constructor(e){super(`${s}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,n())}}class y extends i.A{constructor(){super(`${s}:convert3D-failed`,"convert3D failed.")}}class g extends i.A{constructor(){super("invalid-input:no-model","No supported model found")}}class f extends i.A{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}},67202:(e,t,r)=>{r.d(t,{A:()=>l});var i,s=r(31635),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(40530);let l=i=class extends a.c{constructor(e){super(e),this.type="selection"}clone(){return new i}};(0,s.Cg)([(0,n.MZ)({type:["selection"]})],l.prototype,"type",void 0),l=i=(0,s.Cg)([(0,o.$)("esri.layers.support.FeatureReductionSelection")],l)},69208:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(31635),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,n.$)("esri.layers.mixins.CustomParametersMixin")],r),r}},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},73179:(e,t,r)=>{r.d(t,{b:()=>l,h:()=>d});var i=r(4718),s=r(53966),n=r(84952),o=r(60694),a=r(10873);function l(e){const{nonStandardUrlAllowed:t=!1,separator:r}=e??{},n=(0,i.o8)(a.OZ),l=n.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,i,s){(0,o.LS)(this,e,r,t,s)}),{...n,set:function(e){if(null==e)return void this._set("url",e);const r=(0,o.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:s.A.getLogger(this)});this._set("url",r.url),null!=r.layerId&&this._set("layerId",r.layerId)}}}function d(e,t){const{separator:r}=t??{},i=(0,n.An)(e.url);return null!=i&&(null!=e.dynamicDataSource?i.path=(0,n.fj)(i.path,"dynamicLayer"):null!=e.layerId&&(i.path=(0,n.fj)(i.path,r??"",e.layerId.toString()))),i}},73836:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(31635),s=r(69540),n=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(40608)),l=r(58083),d=r(9093),u=r(67026),p=r(82534),c=r(51850),h=r(24770);let y=class extends(s.A.ClonableMixin(n.A)){constructor(e){super(e),this.translation=(0,c.vt)(),this.rotationAxis=(0,c.ci)(h.up),this.rotationAngle=0,this.scale=(0,c.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(e){this.rotationAxis=(0,c.o8)((0,h.yo)(e)),this.rotationAngle=(0,h.g7)(e)}get localMatrix(){const e=(0,d.vt)();return(0,u.x8)(g,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,l.o1)(e,g,this.translation,this.scale),e}get localMatrixInverse(){return(0,l.B8)((0,d.vt)(),this.localMatrix)}equals(e){return this===e||null!=e&&(0,l.t2)(this.localMatrix,e.localMatrix)}};(0,i.Cg)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"translation",void 0),(0,i.Cg)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAxis",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAngle",void 0),(0,i.Cg)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"scale",void 0),(0,i.Cg)([(0,o.MZ)()],y.prototype,"rotation",null),(0,i.Cg)([(0,o.MZ)()],y.prototype,"localMatrix",null),(0,i.Cg)([(0,o.MZ)()],y.prototype,"localMatrixInverse",null),y=(0,i.Cg)([(0,a.$)("esri.geometry.support.MeshTransform")],y);const g=(0,p.vt)()},80200:(e,t,r)=>{r.d(t,{T:()=>i,d:()=>g});const i={Base64:0,Hex:1,String:2,Raw:3},s=8,n=(1<<s)-1;function o(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,i=e.length*s;r<i;r+=s)t[r>>5]|=(e.charCodeAt(r/s)&n)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=s)t.push(String.fromCharCode(e[r>>5]>>>r%32&n));return t.join("")}function d(e,t,r,i,s,n){return o(function(e,t){return e<<t|e>>>32-t}(o(o(t,e),o(i,n)),s),r)}function u(e,t,r,i,s,n,o){return d(t&r|~t&i,e,t,s,n,o)}function p(e,t,r,i,s,n,o){return d(t&i|r&~i,e,t,s,n,o)}function c(e,t,r,i,s,n,o){return d(t^r^i,e,t,s,n,o)}function h(e,t,r,i,s,n,o){return d(r^(t|~i),e,t,s,n,o)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,s=-1732584194,n=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,d=s,y=n;r=u(r,i,s,n,e[t],7,-680876936),n=u(n,r,i,s,e[t+1],12,-389564586),s=u(s,n,r,i,e[t+2],17,606105819),i=u(i,s,n,r,e[t+3],22,-1044525330),r=u(r,i,s,n,e[t+4],7,-176418897),n=u(n,r,i,s,e[t+5],12,1200080426),s=u(s,n,r,i,e[t+6],17,-1473231341),i=u(i,s,n,r,e[t+7],22,-45705983),r=u(r,i,s,n,e[t+8],7,1770035416),n=u(n,r,i,s,e[t+9],12,-1958414417),s=u(s,n,r,i,e[t+10],17,-42063),i=u(i,s,n,r,e[t+11],22,-1990404162),r=u(r,i,s,n,e[t+12],7,1804603682),n=u(n,r,i,s,e[t+13],12,-40341101),s=u(s,n,r,i,e[t+14],17,-1502002290),i=u(i,s,n,r,e[t+15],22,1236535329),r=p(r,i,s,n,e[t+1],5,-165796510),n=p(n,r,i,s,e[t+6],9,-1069501632),s=p(s,n,r,i,e[t+11],14,643717713),i=p(i,s,n,r,e[t],20,-373897302),r=p(r,i,s,n,e[t+5],5,-701558691),n=p(n,r,i,s,e[t+10],9,38016083),s=p(s,n,r,i,e[t+15],14,-660478335),i=p(i,s,n,r,e[t+4],20,-405537848),r=p(r,i,s,n,e[t+9],5,568446438),n=p(n,r,i,s,e[t+14],9,-1019803690),s=p(s,n,r,i,e[t+3],14,-187363961),i=p(i,s,n,r,e[t+8],20,1163531501),r=p(r,i,s,n,e[t+13],5,-1444681467),n=p(n,r,i,s,e[t+2],9,-51403784),s=p(s,n,r,i,e[t+7],14,1735328473),i=p(i,s,n,r,e[t+12],20,-1926607734),r=c(r,i,s,n,e[t+5],4,-378558),n=c(n,r,i,s,e[t+8],11,-2022574463),s=c(s,n,r,i,e[t+11],16,1839030562),i=c(i,s,n,r,e[t+14],23,-35309556),r=c(r,i,s,n,e[t+1],4,-1530992060),n=c(n,r,i,s,e[t+4],11,1272893353),s=c(s,n,r,i,e[t+7],16,-155497632),i=c(i,s,n,r,e[t+10],23,-1094730640),r=c(r,i,s,n,e[t+13],4,681279174),n=c(n,r,i,s,e[t],11,-358537222),s=c(s,n,r,i,e[t+3],16,-722521979),i=c(i,s,n,r,e[t+6],23,76029189),r=c(r,i,s,n,e[t+9],4,-640364487),n=c(n,r,i,s,e[t+12],11,-421815835),s=c(s,n,r,i,e[t+15],16,530742520),i=c(i,s,n,r,e[t+2],23,-995338651),r=h(r,i,s,n,e[t],6,-198630844),n=h(n,r,i,s,e[t+7],10,1126891415),s=h(s,n,r,i,e[t+14],15,-1416354905),i=h(i,s,n,r,e[t+5],21,-57434055),r=h(r,i,s,n,e[t+12],6,1700485571),n=h(n,r,i,s,e[t+3],10,-1894986606),s=h(s,n,r,i,e[t+10],15,-1051523),i=h(i,s,n,r,e[t+1],21,-2054922799),r=h(r,i,s,n,e[t+8],6,1873313359),n=h(n,r,i,s,e[t+15],10,-30611744),s=h(s,n,r,i,e[t+6],15,-1560198380),i=h(i,s,n,r,e[t+13],21,1309151649),r=h(r,i,s,n,e[t+4],6,-145523070),n=h(n,r,i,s,e[t+11],10,-1120210379),s=h(s,n,r,i,e[t+2],15,718787259),i=h(i,s,n,r,e[t+9],21,-343485551),r=o(r,a),i=o(i,l),s=o(s,d),n=o(n,y)}return[r,i,s,n]}function g(e,t=i.Hex){const r=t||i.Base64,n=y(a(e),e.length*s);switch(r){case i.Raw:return n;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,s=4*e.length;i<s;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(n);case i.String:return l(n);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-s)&63))}return t.join("")}(n)}}},82935:(e,t,r)=>{r.d(t,{B:()=>h,e:()=>y});var i=r(31635),s=r(10107),n=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),a=r(89317),l=r(30524),d=r(96184),u=r(73133),p=r(64272),c=r(26253);const h={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:a.K}}},y=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,s=u.j.fromJSON(r.timeOffsetUnits);return i&&s?new c.T({value:i,unit:s}):null}set timeInfo(e){(0,l.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,s.MZ)({type:p.T,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,s.MZ)({type:c.T})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,n.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,s.MZ)({value:null,type:d.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,s.MZ)(h)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.TemporalLayer")],r),r}},85648:(e,t,r)=>{r.d(t,{n:()=>s});var i=r(84952);function s(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Zo)(e);return l[t]||o}(e.url)}(e)]||a}const n={},o="text/plain",a=n[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},86390:(e,t,r)=>{r.d(t,{Z:()=>n});var i=r(83047),s=r(73836);function n(e){const t=1/(0,i.GA)(e,1);return 1!==t?new s.A({scale:[t,t,t]}):void 0}},87024:(e,t,r)=>{r.d(t,{P:()=>h});var i=r(49186),s=r(80200),n=r(76553),o=r(84952),a=r(13069),l=r(96156),d=r(35666),u=r(10107),p=r(85648),c=r(97159);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const s=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.z4)(t,r);return{type:String,read:(e,t,r)=>{const s=(0,c.r)(e,t,r);return i.type===String?s:"function"==typeof i.type?new i.type({url:s}):void 0},write:{isRequired:i.json?.write?.isRequired,writer(t,s,a,l){if(!l?.resources)return"string"==typeof t?void(s[a]=(0,c.t)(t,l)):void(s[a]=t.write({},l));const u=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,c.t)(u,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1),m=i.type!==String&&(!(0,n.H)(this)||l?.origin&&this.originIdOf(r)>(0,d.aB)(l.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:s,targetPropertyName:a,context:l,params:e};l?.portalItem&&h&&!(0,o.oP)(h)?m&&e?.contentAddressed?y(v):m?function(e){const{context:t,targetUrl:r,params:i,value:s,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),d=f(s,r,t),u=(0,p.n)(d),c=(0,o.Zo)(l.path),h=i?.compress??!1;u===c?(t.resources&&g({...e,resource:l,content:d,compress:h,updates:t.resources.toUpdate}),n[a]=r):y(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(v):l?.portalItem&&(null==h||null!=(0,c.i)(h)||(0,o.w8)(h)||m)?y(v):s[a]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=c.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,u.rM)(r,e,i);for(const e in s)t[e]=s[e]}}}function y(e){const{targetUrl:t,params:r,value:n,context:l,dest:d,targetPropertyName:u}=e;if(!l.portalItem)return;const h=(0,c.p)(t),y=f(n,t,l);if(r?.contentAddressed&&"json"!==y.type)return void l.messages?.push(new i.A("persistable:contentAddressingUnsupported",`Property "${u}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const m=r?.contentAddressed&&"json"===y.type?(0,s.d)(y.jsonString):h?.filename??(0,a.lk)(),v=(0,o.fj)(r?.prefix??h?.prefix,m),w=`${v}.${(0,p.n)(y)}`;if(r?.contentAddressed&&l.resources&&"json"===y.type){const e=l.resources.toKeep.find(({resource:e})=>e.path===w)??l.resources.toAdd.find(({resource:e})=>e.path===w);if(e)return void(d[u]=e.resource.itemRelativeUrl)}const b=l.portalItem.resourceFromPath(w);(0,o.w8)(t)&&l.resources&&l.resources.pendingOperations.push((0,o.tk)(t).then(e=>{b.path=`${v}.${(0,p.n)({type:"blob",blob:e})}`,d[u]=b.itemRelativeUrl}).catch(()=>{}));const I=r?.compress??!1;l.resources&&g({...e,resource:b,content:y,compress:I,updates:l.resources.toAdd}),d[u]=b.itemRelativeUrl}function g({object:e,propertyName:t,updates:r,resource:i,content:s,compress:n}){r.push({resource:i,content:s,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function f(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},92071:(e,t,r)=>{r.d(t,{P:()=>w,L:()=>b});var i=r(31635),s=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[0];r&&r.forEach((e,r)=>{t.set(r,(0,o.o8)(e),0)});for(let r=2;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach((i,s)=>{e&&e.has(s)||t.set(s,(0,o.o8)(i),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=7){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=7){const r=this._originStores[t];if(!r)return;const i=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 i}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],i=r?.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||0}isAtOrigin(e,t){return this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(e)}}var d=r(45917),u=r(88620),p=r(40608);const c=e=>{const t=e;let r=class extends t{constructor(...e){super(...e);const t=(0,u.oY)(this),r=t.store,i=new l;t.store=i,(0,n.k)(t,r,i)}read(e,t){(0,d.L)(this,e,t)}getAtOrigin(e,t){const r=h(this),i=(0,a.aB)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach(e=>{s[e]=r.get(e,i)}),s}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return h(this).originOf(e)}revert(e,t){const r=h(this),i=(0,a.aB)(t),s=(0,u.oY)(this);let n;n="string"==typeof e?"*"===e?r.keys(i):[e]:e,n.forEach(e=>{s.invalidate(e),r.revert(e,i),s.commit(e)})}};return r=(0,i.Cg)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],r),r};function h(e){return(0,u.oY)(e).store}let y=class extends(c(s.A)){};y=(0,i.Cg)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var g=r(16649),f=r(49422);const m=e=>{const t=e;let r=class extends t{constructor(...e){super(...e)}clear(e,t="user"){(0,u.oY)(this).clearOrigin(e,(0,a.aB)(t))}write(e,t){return(0,f.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=v(this),r=(0,a.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),7)}updateOrigin(e,t){const r=v(this),i=(0,a.aB)(t),s=(0,g.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return r=(0,i.Cg)([(0,p.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],r),r.prototype.toJSON.isDefaultToJSON=!0,r};function v(e){return(0,u.oY)(e).store}const w=e=>{const t=m(c(e));let r=class extends t{constructor(...e){super(...e)}};return r=(0,i.Cg)([(0,p.$)("esri.core.MultiOriginJSONSupport")],r),r};let b=class extends(w(s.A)){};b=(0,i.Cg)([(0,p.$)("esri.core.MultiOriginJSONSupport")],b)},96184:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(31635),s=r(69540),n=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),d=r(43937),u=r(64272),p=r(26253),c=r(56400);function h(e,t){return p.T.fromJSON({value:e,unit:t})}let y=class extends(s.A.ClonableMixin(n.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?u.T.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,i.Cg)([(0,o.MZ)({type:u.T,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,i.Cg)([(0,a.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,i.Cg)([(0,d.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,i.Cg)([(0,o.MZ)({type:p.T,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,i.Cg)([(0,a.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,i.Cg)([(0,d.K)("interval")],y.prototype,"writeInterval",null),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,i.Cg)([(0,o.MZ)((0,c.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,i.Cg)([(0,o.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,i.Cg)([(0,l.$)("esri.layers.support.TimeInfo")],y)}}]);