@arcgis/core 5.0.0-next.60 → 5.0.0-next.61

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 (192) hide show
  1. package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{1e8ceed33a3657ac02b3.js → 153ff2ceefccd946498b.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{7147fc7502b385b302b2.js → 23b623637126f8411a30.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{a7aa87e2c4197ba595ef.js → 2abc205f81f26fc4852b.js} +2 -2
  6. package/assets/esri/core/workers/chunks/{492d575894c7905bb70c.js → 3d49c6427120edc8eac9.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{23a9dd9454d5249bbd59.js → 3da53c017f9c5d2d778a.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{60362c5651ef41fa7e5f.js → 4cf2bec636dd8ceecf0c.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{3d1a5a3467f3a6585b3e.js → 4f03d19a70dca6c507be.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{5d31fbabaa875f8627c0.js → 631a11a2b2001c708527.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{fa95c9248fbfab338f2e.js → 63b8cd7d5cafbaeed894.js} +1 -1
  12. package/assets/esri/core/workers/chunks/6b4a24248182245167ca.js +1 -0
  13. package/assets/esri/core/workers/chunks/{352c674730c7b7258ae3.js → 76086517591d0eb35156.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{436f206898306df019ac.js → 7c47fefbf4c93b63200f.js} +1 -1
  15. package/assets/esri/core/workers/chunks/7e8573749a02e1f54fb1.js +1 -0
  16. package/assets/esri/core/workers/chunks/{424daef7b5dec1b99aba.js → af3e93a4ac3ff2addc90.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{bf82bb1cdd8b31e7f2aa.js → bb08359610a41e304b55.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{495b11fdecc3ba90d454.js → bfc063d4431bfa162160.js} +1 -1
  19. package/assets/esri/core/workers/chunks/d13b2ce8a89938b0472b.js +1 -0
  20. package/assets/esri/core/workers/chunks/{0483a2cfdb8c7158e73a.js → e85da52d9cc7d9396872.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{1ced78750c61600b2d4e.js → f351007cdcd0938d3b6c.js} +1 -1
  22. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ar.json +1 -1
  23. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_bg.json +1 -1
  24. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_bs.json +1 -1
  25. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ca.json +1 -1
  26. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_cs.json +1 -1
  27. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_da.json +1 -1
  28. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_de.json +1 -1
  29. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_el.json +1 -1
  30. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_es.json +1 -1
  31. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_et.json +1 -1
  32. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_fi.json +1 -1
  33. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_fr.json +1 -1
  34. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_he.json +1 -1
  35. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_hr.json +1 -1
  36. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_hu.json +1 -1
  37. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_id.json +1 -1
  38. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_it.json +1 -1
  39. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ja.json +1 -1
  40. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ko.json +1 -1
  41. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_lt.json +1 -1
  42. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_lv.json +1 -1
  43. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_nl.json +1 -1
  44. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_no.json +1 -1
  45. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pl.json +1 -1
  46. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pt-BR.json +1 -1
  47. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pt-PT.json +1 -1
  48. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ro.json +1 -1
  49. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ru.json +1 -1
  50. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sk.json +1 -1
  51. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sl.json +1 -1
  52. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sr.json +1 -1
  53. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sv.json +1 -1
  54. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_th.json +1 -1
  55. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_tr.json +1 -1
  56. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_uk.json +1 -1
  57. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_vi.json +1 -1
  58. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-CN.json +1 -1
  59. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-HK.json +1 -1
  60. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-TW.json +1 -1
  61. package/chunks/CutFillDepth.glsl.js +13 -10
  62. package/chunks/CutFillReduction.glsl.js +14 -8
  63. package/chunks/GaussianSplat.glsl.js +1 -1
  64. package/chunks/Laserlines.glsl.js +2 -2
  65. package/chunks/boundedPlane.js +1 -1
  66. package/chunks/cameraUtilsSpherical.js +1 -1
  67. package/chunks/vec32.js +1 -1
  68. package/config.js +1 -1
  69. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  70. package/effects/FocusAreas.d.ts +1 -1
  71. package/geometry/support/lineSegment.js +1 -1
  72. package/geometry/support/meshUtils/merge.js +1 -1
  73. package/geometry/support/sphere.js +1 -1
  74. package/kernel.js +1 -1
  75. package/layers/VoxelWasmPerSceneView.js +1 -1
  76. package/layers/orientedImagery/transformations/worldToImage.js +1 -1
  77. package/layers/support/FieldsIndex.d.ts +2 -1
  78. package/layers/support/tiles3DUtils.js +1 -1
  79. package/layers/voxel/VoxelVolume.js +1 -1
  80. package/package.json +1 -1
  81. package/support/revision.js +1 -1
  82. package/views/2d/engine/flow/dataUtils.js +1 -1
  83. package/views/2d/engine/flow/utils.js +1 -1
  84. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  85. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  86. package/views/2d/interactive/SegmentLabels2D.js +1 -1
  87. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  88. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  89. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  90. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  91. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  92. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  93. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  94. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
  95. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  96. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  97. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  98. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  99. package/views/3d/camera/constraintUtils/distance.js +1 -1
  100. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  101. package/views/3d/environment/ChapmanApproximation.glsl.js +1 -1
  102. package/views/3d/environment/CloudsParameters.js +1 -1
  103. package/views/3d/environment/EnvironmentManager.js +1 -1
  104. package/views/3d/environment/MarsAtmosphere.js +1 -1
  105. package/views/3d/interactive/SegmentLabels3D.js +1 -1
  106. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  107. package/views/3d/interactive/editingTools/media/MediaElementManipulator3D.js +1 -1
  108. package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
  109. package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
  110. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  111. package/views/3d/layers/FlowSubView3D.js +1 -1
  112. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  113. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  114. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  115. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  116. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  117. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  118. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  119. package/views/3d/state/Frustum.js +1 -1
  120. package/views/3d/state/controllers/FovController.js +1 -1
  121. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  122. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  123. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  124. package/views/3d/support/cameraUtils.js +1 -1
  125. package/views/3d/support/engineContent/line.js +1 -1
  126. package/views/3d/support/flow/FlowWorker.js +1 -1
  127. package/views/3d/support/flow/StreamlineResources3D.js +1 -1
  128. package/views/3d/support/flow/constants.js +1 -1
  129. package/views/3d/support/flow/geometryUtils.js +1 -1
  130. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  131. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  132. package/views/3d/support/intersectionUtils.js +1 -1
  133. package/views/3d/support/orientedBoundingBox.js +1 -1
  134. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  135. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  136. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  137. package/views/3d/support/viewpointUtils.js +1 -1
  138. package/views/3d/terrain/OverlayManager.js +1 -1
  139. package/views/3d/terrain/OverlayRenderer.js +1 -1
  140. package/views/3d/terrain/PatchRenderData.js +1 -1
  141. package/views/3d/terrain/SphericalPatch.js +1 -1
  142. package/views/3d/terrain/Tile.js +1 -1
  143. package/views/3d/webgl/RenderCamera.js +1 -1
  144. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  145. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  146. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  147. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  148. package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
  149. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  150. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  151. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  152. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  153. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  154. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  155. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  156. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  157. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  158. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  159. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  160. package/views/3d/webgl-engine/lib/triangleIntersectionUtils.js +1 -1
  161. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  162. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  163. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  164. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  165. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  166. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +13 -12
  167. package/views/3d/webgl-engine/shaders/CutFillDepthTechniqueConfiguration.js +5 -0
  168. package/views/3d/webgl-engine/shaders/CutFillReductionTechniqueConfiguration.js +5 -0
  169. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  170. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
  171. package/views/interactive/GraphicManipulator.js +1 -1
  172. package/views/interactive/coordinateHelper.js +1 -1
  173. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  174. package/views/interactive/sketch/constraints.js +1 -1
  175. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  176. package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
  177. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  178. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  179. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  180. package/views/support/Scheduler.js +1 -1
  181. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  182. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  183. package/views/support/geometry3dUtils.js +1 -1
  184. package/webdoc/widgets/FloorFilter.js +1 -1
  185. package/widgets/Expand/ExpandViewModel.d.ts +1 -0
  186. package/widgets/Expand/ExpandViewModel.js +1 -1
  187. package/widgets/Expand.js +1 -1
  188. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  189. package/assets/esri/core/workers/chunks/1e17ad6cdffa5016a3db.js +0 -1
  190. package/assets/esri/core/workers/chunks/21ebd234cf32ae52b3ea.js +0 -1
  191. package/assets/esri/core/workers/chunks/262c5794650853457acc.js +0 -1
  192. /package/effects/{FocusAreaStyle.d.ts → types.d.ts} +0 -0
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{on as i,when as s,pausable as o}from"../../core/reactiveUtils.js";import{property as a,subclass as n}from"../../core/accessorSupport/decorators.js";let l=class extends t{constructor(e){super(e),this._viewpointHandle=null,this.group=null}initialize(){this.addHandles(i(()=>this.view?.ui,"expand",e=>{const{target:t}=e;t&&t!==this&&t.expanded&&t.group&&t.group===this.group&&this._collapse()}))}destroy(){this._viewpointHandle=null,this.view=null}set autoCollapse(e){this._set("autoCollapse",e),this._watchViewpoint()}set expanded(e){const t=!!e;this._set("expanded",t);const i=this.view?.ui;i&&i.emit("expand",{target:this}),this._viewpointHandleChange(t)}get state(){return this.view?.ready?"ready":"disabled"}set view(e){this._get("view")!==e&&(this._set("view",e),e&&s(()=>e.ready,()=>{this.view===e&&this._watchViewpoint()},{once:!0,initial:!0}))}_viewpointHandleChange(e){this._viewpointHandle&&(e?s(()=>this.view?.stationary,()=>this._viewpointHandle?.resume(),{once:!0,initial:!0}):this._viewpointHandle.pause())}_watchViewpoint(){const e="viewpoint";this.removeHandles(e),this._viewpointHandle=null;const{autoCollapse:t,view:i}=this;if(!i||!t)return;const s=o(()=>"3d"===i.type?i.camera:i.viewpoint,()=>this._collapse());this.addHandles(s,e),this._viewpointHandle=s}_collapse(){this.expanded=!1}};e([a({value:!1})],l.prototype,"autoCollapse",null),e([a({value:!1})],l.prototype,"expanded",null),e([a()],l.prototype,"group",void 0),e([a({readOnly:!0})],l.prototype,"state",null),e([a({value:null})],l.prototype,"view",null),l=e([n("esri.widgets.Expand.ExpandViewModel")],l);const p=l;export{p as default};
5
+ import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{deprecateUnnecessaryViewModel as i}from"../../core/deprecate.js";import s from"../../core/Logger.js";import{on as o,when as a,pausable as n}from"../../core/reactiveUtils.js";import{property as l,subclass as r}from"../../core/accessorSupport/decorators.js";let p=class extends t{constructor(e){super(e),this._viewpointHandle=null,this.group=null,e?.isDefaultViewModel||i(s.getLogger(this),"Expand","arcgis-expand",{version:"5.0"})}normalizeCtorArgs(e){const{isDefaultViewModel:t,...i}=e??{};return i}initialize(){this.addHandles(o(()=>this.view?.ui,"expand",e=>{const{target:t}=e;t&&t!==this&&t.expanded&&t.group&&t.group===this.group&&this._collapse()}))}destroy(){this._viewpointHandle=null,this.view=null}set autoCollapse(e){this._set("autoCollapse",e),this._watchViewpoint()}set expanded(e){const t=!!e;this._set("expanded",t);const i=this.view?.ui;i&&i.emit("expand",{target:this}),this._viewpointHandleChange(t)}get state(){return this.view?.ready?"ready":"disabled"}set view(e){this._get("view")!==e&&(this._set("view",e),e&&a(()=>e.ready,()=>{this.view===e&&this._watchViewpoint()},{once:!0,initial:!0}))}_viewpointHandleChange(e){this._viewpointHandle&&(e?a(()=>this.view?.stationary,()=>this._viewpointHandle?.resume(),{once:!0,initial:!0}):this._viewpointHandle.pause())}_watchViewpoint(){const e="viewpoint";this.removeHandles(e),this._viewpointHandle=null;const{autoCollapse:t,view:i}=this;if(!i||!t)return;const s=n(()=>"3d"===i.type?i.camera:i.viewpoint,()=>this._collapse());this.addHandles(s,e),this._viewpointHandle=s}_collapse(){this.expanded=!1}};e([l({value:!1})],p.prototype,"autoCollapse",null),e([l({value:!1})],p.prototype,"expanded",null),e([l()],p.prototype,"group",void 0),e([l({readOnly:!0})],p.prototype,"state",null),e([l({value:null})],p.prototype,"view",null),p=e([r("esri.widgets.Expand.ExpandViewModel")],p);const d=p;export{d as default};
package/widgets/Expand.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{deprecateWidget as t}from"../core/deprecate.js";import{makeHandle as o}from"../core/handleUtils.js";import n from"../core/Logger.js";import{watch as s,initial as i}from"../core/reactiveUtils.js";import{property as l,subclass as r}from"../core/accessorSupport/decorators.js";import a from"./Widget.js";import d from"./Expand/ExpandViewModel.js";import{loadCalciteComponents as c}from"./support/componentsUtils.js";import{globalCss as p}from"./support/globalCss.js";import{messageBundle as h,tsx as u,isWidget as m,hasDomNode as g}from"./support/widget.js";const v="esri-expand",_={base:v,toggle:`${v}__toggle`,popoverContent:`${v}__popover-content`,panel:`${v}__panel`,panelContent:`${v}__panel-content`,sheet:`${v}__sheet`,contentContainer:`${v}__content-container`,icon:"esri-collapse__icon",iconFlip:"esri-collapse__icon-flip",iconNumber:`${v}__icon-number`},w="chevrons-left",y="chevrons-right",x=Symbol("scheduleRender-override-handle");let C=class extends a{constructor(e,o){super(e,o),this._boundScheduledRender=this.scheduleRender.bind(this),this.closeOnEsc=!0,this.collapseTooltip="",this.content="",this.expandTooltip="",this.focusTrapDisabled=!1,this.iconNumber=0,this.messages=null,this.messagesCommon=null,this.mode="auto",this.placement=null,this.viewModel=new d,this.toggle=()=>{this.viewModel.expanded=!this.viewModel.expanded},this._handlePopoverClose=e=>{e.target===this._popoverEl&&(this.viewModel.expanded=e.currentTarget.open)},this._handleSheetClose=e=>{this.viewModel.expanded=e.currentTarget.open},this._handlePanelClose=e=>{this.viewModel.expanded=!e.currentTarget.closed},this._handleKeyDown=e=>{this.viewModel.expanded&&"Escape"===e.key&&!this._willCloseOnEsc(e)&&e.preventDefault()},this._storeToggleActionEl=e=>{this._toggleActionEl=e},this._storePopoverEl=e=>{this._popoverEl=e},t(n.getLogger(this),"Expand","arcgis-expand",{version:"4.34"})}initialize(){this.addHandles(s(()=>this.viewModel?.view?.size,()=>this._popoverEl?.reposition(),i))}loadDependencies(){return c({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),sheet:()=>import("@esri/calcite-components/dist/components/calcite-sheet")})}get expandTitle(){const{expanded:e,messagesCommon:t,collapseTooltip:o,expandTooltip:n}=this;return(e?o||t?.collapse:n||t?.expand)??""}get _displaySheet(){switch(this.mode){case"drawer":return!0;case"auto":return"xsmall"===this.viewModel.view?.widthBreakpoint;default:return!1}}get autoCollapse(){return this.viewModel.autoCollapse}set autoCollapse(e){this.viewModel.autoCollapse=e}get collapseIcon(){return y}set collapseIcon(e){this._overrideIfSome("collapseIcon",e)}get expanded(){return this.viewModel.expanded}set expanded(e){this.viewModel.expanded=e}get expandIcon(){return"object"==typeof this.content&&"icon"in this.content&&this.content.icon?this.content.icon:w}set expandIcon(e){this._overrideIfSome("expandIcon",e)}get group(){return this.viewModel.group}set group(e){this.viewModel.group=e}get icon(){return null}get label(){return"object"==typeof this.content&&"label"in this.content&&this.content.label?this.content.label:this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}expand(){this.viewModel.expanded=!0}collapse(){this.viewModel.expanded=!1}render(){const{_displaySheet:e,_toggleActionEl:t,viewModel:{expanded:o},label:n,placement:s}=this;return u("div",{class:this.classes(_.base,p.widget)},this._renderToggle(),e?u("calcite-sheet",{class:_.sheet,heightScale:"l",label:n,onkeydown:this._handleKeyDown,open:o,position:"block-end",onCalciteSheetClose:this._handleSheetClose},u("calcite-panel",{class:_.panel,closable:!0,closed:!o,heading:n,onkeydown:this._handleKeyDown,onCalcitePanelClose:this._handlePanelClose},u("div",{class:_.panelContent},this._renderContent()))):t?u("calcite-popover",{afterCreate:this._storePopoverEl,afterUpdate:this._storePopoverEl,focusTrapDisabled:this.focusTrapDisabled,label:n,onkeydown:this._handleKeyDown,open:o,overlayPositioning:"fixed",placement:s??this._getPlacement(),referenceElement:t,onCalcitePopoverClose:this._handlePopoverClose},u("div",{class:_.popoverContent},this._renderContent())):null)}_getPlacement(){const{container:e,view:t}=this,o=e&&t?t.ui.getPosition(e):null;if(!o||"manual"===o)return"auto";const[n,s]=o.split("-");return`${"right"===s?"left":"right"}-${"bottom"===n?"end":"start"}`}_willCloseOnEsc(e){const{closeOnEsc:t}=this;return"function"==typeof t?t(e):t}_renderBadgeNumber(){const{expanded:e,iconNumber:t}=this;return t&&!e?u("span",{class:_.iconNumber,key:"expand__icon-number"},t):null}_renderToggleButton(){const{expanded:e,expandTitle:t,expandIcon:o,collapseIcon:n}=this,s=e?n:o,i=s===w||s===y;return u("calcite-action",{afterCreate:this._storeToggleActionEl,afterUpdate:this._storeToggleActionEl,class:p.widgetButton,onclick:this.toggle,scale:"s",text:t,title:t},s?u("calcite-icon",{class:this.classes(_.icon,i&&_.iconFlip),icon:s,scale:"s"}):null)}_renderToggle(){return u("div",{class:_.toggle},this._renderToggleButton(),this._renderBadgeNumber())}_renderContent(){const{content:e}=this;return"string"==typeof e?u("div",{class:_.contentContainer,innerHTML:e,key:"content__string"}):m(e)?u("div",{afterCreate:()=>{this._overwriteChildScheduleRender(e)},afterRemoved:()=>this.removeHandles(x),afterUpdate:()=>{e.scheduleRender!==this._boundScheduledRender&&(this.removeHandles(x),this._overwriteChildScheduleRender(e))},class:_.contentContainer,key:"content__widget"},e.render()):e instanceof HTMLElement?u("div",{afterCreate:this._attachToNode,bind:e,class:_.contentContainer,key:"content__html-element"}):g(e)?u("div",{afterCreate:this._attachToNode,bind:e.domNode,class:_.contentContainer,key:"content__node"}):null}_overwriteChildScheduleRender(e){const t=e.scheduleRender;e.scheduleRender=this._boundScheduledRender,this.addHandles(o(()=>e.scheduleRender=t),x)}_attachToNode(e){const t=this;e.appendChild(t)}};e([l({readOnly:!0})],C.prototype,"expandTitle",null),e([l()],C.prototype,"_toggleActionEl",void 0),e([l()],C.prototype,"_displaySheet",null),e([l()],C.prototype,"autoCollapse",null),e([l()],C.prototype,"closeOnEsc",void 0),e([l()],C.prototype,"collapseIcon",null),e([l()],C.prototype,"collapseTooltip",void 0),e([l()],C.prototype,"content",void 0),e([l()],C.prototype,"expanded",null),e([l()],C.prototype,"expandIcon",null),e([l()],C.prototype,"expandTooltip",void 0),e([l()],C.prototype,"focusTrapDisabled",void 0),e([l()],C.prototype,"group",null),e([l()],C.prototype,"icon",null),e([l()],C.prototype,"iconNumber",void 0),e([l()],C.prototype,"label",null),e([l(),h("esri/widgets/Expand/t9n/Expand")],C.prototype,"messages",void 0),e([l(),h("esri/t9n/common")],C.prototype,"messagesCommon",void 0),e([l()],C.prototype,"mode",void 0),e([l()],C.prototype,"placement",void 0),e([l()],C.prototype,"view",null),e([l({type:d})],C.prototype,"viewModel",void 0),C=e([r("esri.widgets.Expand")],C);const f=C;export{f as default};
5
+ import{__decorate as e}from"tslib";import{deprecateWidget as t}from"../core/deprecate.js";import{makeHandle as o}from"../core/handleUtils.js";import n from"../core/Logger.js";import{watch as i,initial as s}from"../core/reactiveUtils.js";import{property as l,subclass as r}from"../core/accessorSupport/decorators.js";import a from"./Widget.js";import d from"./Expand/ExpandViewModel.js";import{loadCalciteComponents as c}from"./support/componentsUtils.js";import{globalCss as p}from"./support/globalCss.js";import{messageBundle as h,tsx as u,isWidget as m,hasDomNode as g}from"./support/widget.js";const v="esri-expand",_={base:v,toggle:`${v}__toggle`,popoverContent:`${v}__popover-content`,panel:`${v}__panel`,panelContent:`${v}__panel-content`,sheet:`${v}__sheet`,contentContainer:`${v}__content-container`,icon:"esri-collapse__icon",iconFlip:"esri-collapse__icon-flip",iconNumber:`${v}__icon-number`},w="chevrons-left",y="chevrons-right",x=Symbol("scheduleRender-override-handle");let C=class extends a{constructor(e,o){super(e,o),this._boundScheduledRender=this.scheduleRender.bind(this),this.closeOnEsc=!0,this.collapseTooltip="",this.content="",this.expandTooltip="",this.focusTrapDisabled=!1,this.iconNumber=0,this.messages=null,this.messagesCommon=null,this.mode="auto",this.placement=null,this.viewModel=new d({isDefaultViewModel:!0}),this.toggle=()=>{this.viewModel.expanded=!this.viewModel.expanded},this._handlePopoverClose=e=>{e.target===this._popoverEl&&(this.viewModel.expanded=e.currentTarget.open)},this._handleSheetClose=e=>{this.viewModel.expanded=e.currentTarget.open},this._handlePanelClose=e=>{this.viewModel.expanded=!e.currentTarget.closed},this._handleKeyDown=e=>{this.viewModel.expanded&&"Escape"===e.key&&!this._willCloseOnEsc(e)&&e.preventDefault()},this._storeToggleActionEl=e=>{this._toggleActionEl=e},this._storePopoverEl=e=>{this._popoverEl=e},t(n.getLogger(this),"Expand","arcgis-expand",{version:"4.34"})}initialize(){this.addHandles(i(()=>this.viewModel?.view?.size,()=>this._popoverEl?.reposition(),s))}loadDependencies(){return c({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),sheet:()=>import("@esri/calcite-components/dist/components/calcite-sheet")})}get expandTitle(){const{expanded:e,messagesCommon:t,collapseTooltip:o,expandTooltip:n}=this;return(e?o||t?.collapse:n||t?.expand)??""}get _displaySheet(){switch(this.mode){case"drawer":return!0;case"auto":return"xsmall"===this.viewModel.view?.widthBreakpoint;default:return!1}}get autoCollapse(){return this.viewModel.autoCollapse}set autoCollapse(e){this.viewModel.autoCollapse=e}get collapseIcon(){return y}set collapseIcon(e){this._overrideIfSome("collapseIcon",e)}get expanded(){return this.viewModel.expanded}set expanded(e){this.viewModel.expanded=e}get expandIcon(){return"object"==typeof this.content&&"icon"in this.content&&this.content.icon?this.content.icon:w}set expandIcon(e){this._overrideIfSome("expandIcon",e)}get group(){return this.viewModel.group}set group(e){this.viewModel.group=e}get icon(){return null}get label(){return"object"==typeof this.content&&"label"in this.content&&this.content.label?this.content.label:this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}expand(){this.viewModel.expanded=!0}collapse(){this.viewModel.expanded=!1}render(){const{_displaySheet:e,_toggleActionEl:t,viewModel:{expanded:o},label:n,placement:i}=this;return u("div",{class:this.classes(_.base,p.widget)},this._renderToggle(),e?u("calcite-sheet",{class:_.sheet,heightScale:"l",label:n,onkeydown:this._handleKeyDown,open:o,position:"block-end",onCalciteSheetClose:this._handleSheetClose},u("calcite-panel",{class:_.panel,closable:!0,closed:!o,heading:n,onkeydown:this._handleKeyDown,onCalcitePanelClose:this._handlePanelClose},u("div",{class:_.panelContent},this._renderContent()))):t?u("calcite-popover",{afterCreate:this._storePopoverEl,afterUpdate:this._storePopoverEl,focusTrapDisabled:this.focusTrapDisabled,label:n,onkeydown:this._handleKeyDown,open:o,overlayPositioning:"fixed",placement:i??this._getPlacement(),referenceElement:t,onCalcitePopoverClose:this._handlePopoverClose},u("div",{class:_.popoverContent},this._renderContent())):null)}_getPlacement(){const{container:e,view:t}=this,o=e&&t?t.ui.getPosition(e):null;if(!o||"manual"===o)return"auto";const[n,i]=o.split("-");return`${"right"===i?"left":"right"}-${"bottom"===n?"end":"start"}`}_willCloseOnEsc(e){const{closeOnEsc:t}=this;return"function"==typeof t?t(e):t}_renderBadgeNumber(){const{expanded:e,iconNumber:t}=this;return t&&!e?u("span",{class:_.iconNumber,key:"expand__icon-number"},t):null}_renderToggleButton(){const{expanded:e,expandTitle:t,expandIcon:o,collapseIcon:n}=this,i=e?n:o,s=i===w||i===y;return u("calcite-action",{afterCreate:this._storeToggleActionEl,afterUpdate:this._storeToggleActionEl,class:p.widgetButton,onclick:this.toggle,scale:"s",text:t,title:t},i?u("calcite-icon",{class:this.classes(_.icon,s&&_.iconFlip),icon:i,scale:"s"}):null)}_renderToggle(){return u("div",{class:_.toggle},this._renderToggleButton(),this._renderBadgeNumber())}_renderContent(){const{content:e}=this;return"string"==typeof e?u("div",{class:_.contentContainer,innerHTML:e,key:"content__string"}):m(e)?u("div",{afterCreate:()=>{this._overwriteChildScheduleRender(e)},afterRemoved:()=>this.removeHandles(x),afterUpdate:()=>{e.scheduleRender!==this._boundScheduledRender&&(this.removeHandles(x),this._overwriteChildScheduleRender(e))},class:_.contentContainer,key:"content__widget"},e.render()):e instanceof HTMLElement?u("div",{afterCreate:this._attachToNode,bind:e,class:_.contentContainer,key:"content__html-element"}):g(e)?u("div",{afterCreate:this._attachToNode,bind:e.domNode,class:_.contentContainer,key:"content__node"}):null}_overwriteChildScheduleRender(e){const t=e.scheduleRender;e.scheduleRender=this._boundScheduledRender,this.addHandles(o(()=>e.scheduleRender=t),x)}_attachToNode(e){const t=this;e.appendChild(t)}};e([l({readOnly:!0})],C.prototype,"expandTitle",null),e([l()],C.prototype,"_toggleActionEl",void 0),e([l()],C.prototype,"_displaySheet",null),e([l()],C.prototype,"autoCollapse",null),e([l()],C.prototype,"closeOnEsc",void 0),e([l()],C.prototype,"collapseIcon",null),e([l()],C.prototype,"collapseTooltip",void 0),e([l()],C.prototype,"content",void 0),e([l()],C.prototype,"expanded",null),e([l()],C.prototype,"expandIcon",null),e([l()],C.prototype,"expandTooltip",void 0),e([l()],C.prototype,"focusTrapDisabled",void 0),e([l()],C.prototype,"group",null),e([l()],C.prototype,"icon",null),e([l()],C.prototype,"iconNumber",void 0),e([l()],C.prototype,"label",null),e([l(),h("esri/widgets/Expand/t9n/Expand")],C.prototype,"messages",void 0),e([l(),h("esri/t9n/common")],C.prototype,"messagesCommon",void 0),e([l()],C.prototype,"mode",void 0),e([l()],C.prototype,"placement",void 0),e([l()],C.prototype,"view",null),e([l({type:d})],C.prototype,"viewModel",void 0),C=e([r("esri.widgets.Expand")],C);const f=C;export{f 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/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{createTask as i}from"../../core/asyncUtils.js";import l from"../../core/Collection.js";import s from"../../core/Error.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{watch as o,initial as a,syncAndInitial as n}from"../../core/reactiveUtils.js";import{Milliseconds as h}from"../../core/time.js";import{property as d,subclass as f}from"../../core/accessorSupport/decorators.js";import u from"../../webdoc/Widgets.js";import c from"../../webdoc/widgets/FloorFilter.js";import{isWebMap as y}from"../../webmap/utils.js";import{GoTo as v}from"../support/GoTo.js";function p(e){return"esri.WebScene"===e.declaredClass}let m=class extends(v(t)){constructor(e){super(e),this.filterMenuOpen=!1,this.filterMenuType="site",this.filterMode="base-floors",this.levelsExpanded=!0,this.searchTerm=null,this.view=null,this._updateFloorFilterTask=null,this._viewHeightBreakpoint=null,this._viewWidthBreakpoint=null}initialize(){this.addHandles([o(()=>this.view?.map,e=>{null!=this._updateFloorFilterTask&&(this._updateFloorFilterTask.abort(),this._updateFloorFilterTask=null),this._updateFloorFilterTask=i(async t=>{await this._updateFloorFilterFromMap(e),r(t),this._setInitialViewState(e)})},a),o(()=>this.view,(e,t)=>{this._unregisterWidget(t),this._registerWidget(e),this._watchSearchResults(e)},n),o(()=>this.view?.widthBreakpoint??null,e=>{this._viewWidthBreakpoint=e}),o(()=>this.view?.heightBreakpoint??null,e=>{this._viewHeightBreakpoint=e})])}destroy(){this._unregisterWidget(this.view),this.view=null,null!=this._updateFloorFilterTask&&(this._updateFloorFilterTask.abort(),this._updateFloorFilterTask=null)}set enabled(e){this._callOverride("enabled",e)}set facility(e){if(e&&this._isOverridden("facility")){const t=this.getFacility(e);this.hasMultipleSites&&(this.site=t?.siteId||null)}this._callOverride("facility",e)}set filterFeatures(e){this._callOverride("filterFeatures",e)}set filterLayers(e){this._callOverride("filterLayers",e)}get hasFacilities(){return null!=this.filterLayers?.facilityLayer&&this.filterFeatures?.facilities?.facilitiesInfo?.length>0}get hasLevels(){return null!=this.filterLayers?.levelLayer&&this.filterFeatures?.levels?.levelsInfo?.length>0}get hasMultipleSites(){return null!=this.filterLayers?.siteLayer&&this.filterFeatures?.sites?.sitesInfo?.length>1}get isNormalMode(){let e=!0;const t=this._viewWidthBreakpoint;return"xsmall"!==this._viewHeightBreakpoint&&"xsmall"!==t||(e=!1),e}set level(e){if(!e)return this._callOverride("level",e),this.facility=null,this.site=null,void this.setFloors(null);let t=null,i=null;const l=e?.split("--");if(l?.length>1&&"all"===l[0]?(i=l[1],t={id:e,facilityId:i,shortName:null,longName:null,levelNumber:null,verticalOrder:null}):(t=this.getLevel(e),i=t?.facilityId??null),this.level!==e||this.isNormalMode||this.levelsExpanded)t&&this.hasFacilities&&this.hasLevels?(this.facility=i,this.hasMultipleSites&&(this.site=this.getFacility(i)?.siteId||null),this.setFloors(t)):this._isOverridden("level")&&(this.facility=null,this.site=null,this.hasMultipleSites&&(this.filterMenuType="site"),this.setFloors(null)),this._callOverride("level",e);else{const e=this.getFacilityLevels(i);e?.length>1&&(this.levelsExpanded=!0)}}set longNames(e){this._callOverride("longNames",e)}set minimized(e){this._callOverride("minimized",e)}set pinnedLevels(e){this._callOverride("pinnedLevels",e)}set site(e){this._callOverride("site",e)}get state(){return this.view&&this.filterFeatures&&this.hasFacilities&&this.hasLevels?"ready":this.view&&!this.filterFeatures?"loading":"disabled"}filterFacilities(e){let t=e;this.searchTerm&&(this.searchTerm=this.searchTerm.trim(),t=e.filter(e=>{const{name:t}=e;return t.toLowerCase().includes(this.searchTerm?.toLowerCase())})),this.site&&(t=t.filter(e=>e.siteId===this.site));return t.sort((e,t)=>{const i=e.name,l=t.name;return i.localeCompare(l,void 0,{sensitivity:"base"})})}filterSites(e){let t=e;this.searchTerm&&(this.searchTerm=this.searchTerm.trim(),t=e.filter(e=>{const{name:t}=e;return t.toLowerCase().includes(this.searchTerm?.toLowerCase())}));return t.sort((e,t)=>{const i=e.name,l=t.name;return i.localeCompare(l,void 0,{sensitivity:"base"})})}getBaseLevel(e){const t=this.filterFeatures?.levels?.levelsInfo;let i=null;if(e){const{id:l}=e;if(t&&t.length>0&&(t.forEach(e=>{0===e.verticalOrder&&e.facilityId===l&&(i=e)}),!i)){let e=null;t.forEach(t=>{t.facilityId===l&&(e?(t.verticalOrder??0)>=0?null!=e.verticalOrder&&(e.verticalOrder<0||(t.verticalOrder??0)<e.verticalOrder)&&(e=t):null!=e.verticalOrder&&null!=t.verticalOrder&&e.verticalOrder<0&&t.verticalOrder>e.verticalOrder&&(e=t):e=t)}),e&&(i=e)}}return i}getFacility(e){return this.filterFeatures?.facilities?.facilitiesInfo?.find(t=>t.id===e)??null}getFacilityLevels(e){if(!e||!this.filterFeatures?.levels?.levelsInfo)return[];return this.filterFeatures.levels.levelsInfo.filter(t=>t.facilityId===e).sort((e,t)=>{const i=e.verticalOrder??0,l=t.verticalOrder??0;return i>l?-1:i===l?0:1})}getLevel(e){return this.filterFeatures?.levels?.levelsInfo?.find(t=>t.id===e)??null}getSite(e){return this.filterFeatures?.sites?.sitesInfo?.find(t=>t.id===e)??null}goTo(e){const{view:t}=this;if(!t||!e)return;const{geometry:i}=e;i&&i.extent&&this.callGoTo({target:i.extent,options:{duration:h(1e3),easing:"quad-in-out"}})}setFloors(e){const{view:t}=this;t&&(t?.map?.allLayers?.forEach(e=>{"feature"===e.type&&this._computeViewAllModeFloors(e)}),t.floors=new l(this._computeFloors(e)))}updateWebDocument(e){if(y(e)){const t=new c({enabled:this.enabled,longNames:this.longNames,minimized:this.minimized,pinnedLevels:this.pinnedLevels,site:this.site??null,facility:this.facility??null,level:this.level??null});e.widgets?e.widgets.floorFilter=t:e.widgets=new u({floorFilter:t})}}_computeFloors(e){if("single-floor"===this.filterMode)this._computeSingleFloor(e);else if("base-floors"===this.filterMode)return"3d"===this.view?.type?this._computeBaseFloors3D(e):this._computeBaseFloors(e);return this._computeEmptyFloors()}_computeSingleFloor(e){if(!e)return this._computeEmptyFloors();const t=[];if("all"===e?.id){this.getFacilityLevels(e.facilityId).forEach(e=>{e.id&&t.push(e.id)})}else e&&t.push(e.id);return t}_computeBaseFloors(e){const t=this.filterFeatures?.levels?.levelsInfo;if(!t?.length)return this._computeEmptyFloors();const i=[];if("all"===e?.id){this.getFacilityLevels(e.facilityId).forEach(e=>{e.id&&i.push(e.id)})}else e&&i.push(e.id);const l=e?.facilityId;return t.forEach(e=>{const{id:t,facilityId:s,verticalOrder:r}=e;(l||0!==r||i.includes(t))&&(s===l||0!==r||i.includes(t))||i.push(t)}),i}_computeBaseFloors3D(e){const t=this.filterFeatures?.levels?.levelsInfo;if(!t?.length)return this._computeEmptyFloors();const i=[],l=e?.id.split("--")??[];if(l?.length>1&&"all"===l[0]){this.getFacilityLevels(e?.facilityId).forEach(e=>{e.id&&i.push(e.id)})}else e&&i.push(e.id);const s=e?.facilityId;return t.forEach(e=>{const{id:t,facilityId:l}=e;(s||i.includes(t))&&(l===s||i.includes(t))||i.push(t)}),i}_computeEmptyFloors(){return[]}async _setFilterLayers(){const{view:e}=this;if(e&&!this._isOverridden("filterLayers")){if(!y(e.map)&&!p(e.map))throw new s("floorfilter:unsupported-map","Map must be a webmap or webscene");{const t=e.map,i=t?.allLayers;if(i?.items?.length>0){const e={siteLayer:null,facilityLayer:null,levelLayer:null},l=t.floorInfo?.siteLayer?.layerId,s=t.floorInfo?.facilityLayer?.layerId,r=t.floorInfo?.levelLayer?.layerId,o=t.floorInfo?.siteLayer?.sublayerId||t.floorInfo?.facilityLayer?.sublayerId||t.floorInfo?.levelLayer?.sublayerId;if(!s||!r)return;const a=i.items.filter(e=>"feature"===e.type||"scene"===e.type),n=i.items.filter(e=>"map-image"===e.type);if(n?.length>0&&o){await Promise.all(n.map(e=>e.load()));const i=t.floorInfo?.siteLayer?.sublayerId,o=t.floorInfo?.facilityLayer?.sublayerId,a=t.floorInfo?.levelLayer?.sublayerId;n.forEach(t=>{const n=t.id,h=t?.allSublayers,d=h?.items;(n===l||n===s||n===r)&&d?.length>0&&h.items.forEach(t=>{const s=t.id;n===l&&s===i?e.siteLayer=t:s===o?e.facilityLayer=t:s===a&&(e.levelLayer=t)})})}a?.length>0&&a.forEach(t=>{const i=t.id;i===l?e.siteLayer=t:i===s?e.facilityLayer=t:i===r&&(e.levelLayer=t)}),this.filterLayers=e}}}}async _getFilterFeatures(){if(this._isOverridden("filterFeatures"))return this.filterFeatures;const[e,t,i]=await Promise.all([this._getSites(),this._getFacilities(),this._getLevels()]);return{sites:e,facilities:t,levels:i}}async _getSites(){const e={sitesInfo:[]},{filterLayers:t,view:i}=this,l=i?.map,{siteLayer:s}=t;if(!s||!l?.floorInfo?.siteLayer)return e;const r=s.createQuery();r.returnGeometry=!0,r.outFields=["*"],r.returnZ=!0,"type"in s&&"scene"===s.type&&(r.multipatchOption="xyFootprint");const{siteIdField:o,nameField:a}=l.floorInfo.siteLayer,n=await s.queryFeatures(r);if(n?.features?.length>0){const t=n.features,i=s?.fieldsIndex.get(o)?.name||o,l=s?.fieldsIndex.get(a)?.name||a;null!=i&&null!=l&&t.forEach(t=>{const s=t.attributes,r=t.geometry,o=s[i],a=s[l];o&&a&&e.sitesInfo.push({id:o,name:a,geometry:r})})}return e}async _getFacilities(){const{filterLayers:e,view:t}=this,i=t?.map,{facilityLayer:l}=e,s={facilitiesInfo:[]};if(!l||!i?.floorInfo?.facilityLayer)return s;const r=l.createQuery();r.returnGeometry=!0,r.outFields=["*"],r.returnZ=!0,"type"in l&&"scene"===l.type&&(r.multipatchOption="xyFootprint");const{facilityIdField:o,siteIdField:a,nameField:n}=i.floorInfo.facilityLayer,h=await l.queryFeatures(r);if(h?.features?.length>0){const e=h.features,t=l?.fieldsIndex.get(o)?.name||o,i=l?.fieldsIndex.get(a)?.name||a,r=l?.fieldsIndex.get(n)?.name||n;t&&i&&r&&e.forEach(e=>{const l=e.attributes,o=e.geometry,a=l[t],n=l[i],h=l[r];a&&h&&s.facilitiesInfo.push({id:a,siteId:n,name:h,geometry:o})})}return s}async _getLevels(){const{filterLayers:e,view:t}=this,i=t?.map,{levelLayer:l}=e,s={levelsInfo:[]};if(!l||!i?.floorInfo?.levelLayer)return s;const r=l.createQuery();r.returnGeometry=!0,r.outFields=["*"],r.returnZ=!0;const{levelIdField:o,facilityIdField:a,longNameField:n,shortNameField:h,levelNumberField:d,verticalOrderField:f}=i.floorInfo.levelLayer,u=await l.queryFeatures(r);if(u?.features?.length>0){const e=u.features,t=l?.fieldsIndex.get(o)?.name||o,i=l?.fieldsIndex.get(a)?.name||a,r=l?.fieldsIndex.get(n)?.name||n,c=l?.fieldsIndex.get(h)?.name||h,y=l?.fieldsIndex.get(d)?.name||d,v=l?.fieldsIndex.get(f)?.name||f;t&&i&&r&&c&&y&&v&&e.forEach(e=>{const l=e.attributes,o=l[t],a=l[i],n=l[r],h=l[c],d=l[y],f=l[v];o&&a&&n&&h&&"number"==typeof d&&"number"==typeof f&&s.levelsInfo.push({id:o,facilityId:a,longName:n,shortName:h,levelNumber:d,verticalOrder:f})})}return s}_registerWidget(e){const t=e?.persistableViewModels.includes(this);t||e?.persistableViewModels.add(this)}_unregisterWidget(e){e?.persistableViewModels.remove(this)}_watchSearchResults(e){e?.on("select-result-floor",e=>{const t=this.getLevel(e);t&&this.level!==e&&(this.level=e,this.setFloors(t))})}async _setInitialViewState(e){if(this.view)try{await this.view.when(),await this._setFilterLayers();const t=await this._getFilterFeatures();if(!t)return;if(this.filterFeatures=t,!this.hasFacilities||!this.hasLevels)return void console.error("Facilities and Levels are required for the Floor Filter widget");if(this.hasMultipleSites||(this.filterMenuType="facility"),this.facility&&this.level){this.filterMenuType="facility";const e=this.getFacility(this.facility),t=this.getLevel(this.level);this.site||(this.site=e?.siteId||void 0),this.setFloors(t)}else if(this.facility&&!this.level){this.filterMenuType="facility";const e=this.getFacility(this.facility),t=this.getBaseLevel(e);this.site||(this.site=e?.siteId||void 0),this.level=t?.id||void 0,this.setFloors(t)}else if(!this.facility&&this.level){this.filterMenuType="facility";const e=this.getLevel(this.level),t=this.getFacility(e?.facilityId);this.facility=t?.id||void 0,this.site||(this.site=t?.siteId||void 0),this.setFloors(e)}else if(!this.site||this.facility||this.level){if(!e||!y(e))return void this.setFloors(null);const t=e?.widgets?.floorFilter;if(!t)return void this.setFloors(null);t.site&&!this.site&&(this.site=t.site,this.filterMenuType="facility"),this.setFloors(null)}else this.filterMenuType="site",this.setFloors(null)}catch(t){console.error("Couldn't retrieve sites, facilities, and levels",t)}}_callOverride(e,t){this._override(e,t)}async _updateFloorFilterFromMap(e){if(!e||!y(e))return;const t=e?.widgets?.floorFilter;t&&(this._isOverridden("enabled")||(this.enabled=t.enabled),this._isOverridden("longNames")||(this.longNames=t.longNames),this._isOverridden("minimized")||(this.minimized=t.minimized),this._isOverridden("pinnedLevels")||(this.pinnedLevels=t.pinnedLevels),this._isOverridden("site")||(this.site=t.site),this._isOverridden("facility")||(this.facility=t.facility),this._isOverridden("level")||(this.level=t.level))}_computeViewAllModeFloors(e){const{filterFeatures:t}=this;if(e.floorInfo?.viewAllMode&&this.hasLevels&&this.hasFacilities&&"base-floors"===this.filterMode){const{level:i,facility:s}=this,r=[];t.levels.levelsInfo.forEach(e=>{const{id:t,facilityId:l}=e;s&&l===s?i&&t===i&&r.push(t):r.push(t)}),e.floorInfo.viewAllLevelIds=new l(r)}}};e([d({value:!1})],m.prototype,"enabled",null),e([d({value:void 0})],m.prototype,"facility",null),e([d({value:null})],m.prototype,"filterFeatures",null),e([d({value:null})],m.prototype,"filterLayers",null),e([d()],m.prototype,"filterMenuOpen",void 0),e([d()],m.prototype,"filterMenuType",void 0),e([d()],m.prototype,"filterMode",void 0),e([d()],m.prototype,"hasFacilities",null),e([d()],m.prototype,"hasLevels",null),e([d()],m.prototype,"hasMultipleSites",null),e([d({readOnly:!0})],m.prototype,"isNormalMode",null),e([d({value:void 0})],m.prototype,"level",null),e([d({value:!1})],m.prototype,"longNames",null),e([d()],m.prototype,"levelsExpanded",void 0),e([d({value:!1})],m.prototype,"minimized",null),e([d({value:!1})],m.prototype,"pinnedLevels",null),e([d()],m.prototype,"searchTerm",void 0),e([d({value:void 0})],m.prototype,"site",null),e([d({readOnly:!0})],m.prototype,"state",null),e([d()],m.prototype,"view",void 0),e([d()],m.prototype,"_viewHeightBreakpoint",void 0),e([d()],m.prototype,"_viewWidthBreakpoint",void 0),e([d()],m.prototype,"updateWebDocument",null),m=e([f("esri.widgets.FloorFilter.FloorFilterViewModel")],m);const F=m;export{F as default};
5
+ import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{createTask as i}from"../../core/asyncUtils.js";import l from"../../core/Collection.js";import s from"../../core/Error.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{watch as o,initial as a,syncAndInitial as n}from"../../core/reactiveUtils.js";import{Milliseconds as h}from"../../core/time.js";import{property as d,subclass as c}from"../../core/accessorSupport/decorators.js";import u from"../../webdoc/Widgets.js";import f from"../../webdoc/widgets/FloorFilter.js";import{isWebMap as p}from"../../webmap/utils.js";import{GoTo as y}from"../support/GoTo.js";function v(e){return"esri.WebScene"===e.declaredClass}let m=class extends(y(t)){constructor(e){super(e),this.filterMenuOpen=!1,this.filterMenuType="site",this.filterMode="base-floors",this.levelsExpanded=!0,this.searchTerm=null,this.view=null,this._updateFloorFilterTask=null,this._viewHeightBreakpoint=null,this._viewWidthBreakpoint=null}initialize(){this.addHandles([o(()=>this.view?.map,e=>{null!=this._updateFloorFilterTask&&(this._updateFloorFilterTask.abort(),this._updateFloorFilterTask=null),this._updateFloorFilterTask=i(async t=>{await this._updateFloorFilterFromMap(e),r(t),this._setInitialViewState(e)})},a),o(()=>this.view,(e,t)=>{this._unregisterWidget(t),this._registerWidget(e),this._watchSearchResults(e)},n),o(()=>this.view?.widthBreakpoint??null,e=>{this._viewWidthBreakpoint=e}),o(()=>this.view?.heightBreakpoint??null,e=>{this._viewHeightBreakpoint=e})])}destroy(){this._unregisterWidget(this.view),this.view=null,null!=this._updateFloorFilterTask&&(this._updateFloorFilterTask.abort(),this._updateFloorFilterTask=null)}set enabled(e){this._callOverride("enabled",e)}set facility(e){if(e&&this._isOverridden("facility")){const t=this.getFacility(e);this.hasMultipleSites&&(this.site=t?.siteId||null)}this._callOverride("facility",e)}set filterFeatures(e){this._callOverride("filterFeatures",e)}set filterLayers(e){this._callOverride("filterLayers",e)}get hasFacilities(){return null!=this.filterLayers?.facilityLayer&&this.filterFeatures?.facilities?.facilitiesInfo?.length>0}get hasLevels(){return null!=this.filterLayers?.levelLayer&&this.filterFeatures?.levels?.levelsInfo?.length>0}get hasMultipleSites(){return null!=this.filterLayers?.siteLayer&&this.filterFeatures?.sites?.sitesInfo?.length>1}get isNormalMode(){let e=!0;const t=this._viewWidthBreakpoint;return"xsmall"!==this._viewHeightBreakpoint&&"xsmall"!==t||(e=!1),e}set level(e){if(!e)return this._callOverride("level",e),this.facility=null,this.site=null,void this.setFloors(null);let t=null,i=null;const l=e?.split("--");if(l?.length>1&&"all"===l[0]?(i=l[1],t={id:e,facilityId:i,shortName:null,longName:null,levelNumber:null,verticalOrder:null}):(t=this.getLevel(e),i=t?.facilityId??null),this.level!==e||this.isNormalMode||this.levelsExpanded)t&&this.hasFacilities&&this.hasLevels?(this.facility=i,this.hasMultipleSites&&(this.site=this.getFacility(i)?.siteId||null),this.setFloors(t)):this._isOverridden("level")&&(this.facility=null,this.site=null,this.hasMultipleSites&&(this.filterMenuType="site"),this.setFloors(null)),this._callOverride("level",e);else{const e=this.getFacilityLevels(i);e?.length>1&&(this.levelsExpanded=!0)}}set longNames(e){this._callOverride("longNames",e)}set minimized(e){this._callOverride("minimized",e)}set pinnedLevels(e){this._callOverride("pinnedLevels",e)}get selectedVerticalOrder(){if(p(this.view?.map)){const e=this.view.map.resourceInfo;return e?.widgets?.floorFilter?.selectedVerticalOrder??null}return null}set site(e){this._callOverride("site",e)}get state(){return this.view&&this.filterFeatures&&this.hasFacilities&&this.hasLevels?"ready":this.view&&!this.filterFeatures?"loading":"disabled"}get useVerticalOrder(){if(p(this.view?.map)){const e=this.view.map.resourceInfo;return e?.widgets?.floorFilter?.useVerticalOrder??!1}return!1}filterFacilities(e){let t=e;this.searchTerm&&(this.searchTerm=this.searchTerm.trim(),t=e.filter(e=>{const{name:t}=e;return t.toLowerCase().includes(this.searchTerm?.toLowerCase())})),this.site&&(t=t.filter(e=>e.siteId===this.site));return t.sort((e,t)=>{const i=e.name,l=t.name;return i.localeCompare(l,void 0,{sensitivity:"base"})})}filterSites(e){let t=e;this.searchTerm&&(this.searchTerm=this.searchTerm.trim(),t=e.filter(e=>{const{name:t}=e;return t.toLowerCase().includes(this.searchTerm?.toLowerCase())}));return t.sort((e,t)=>{const i=e.name,l=t.name;return i.localeCompare(l,void 0,{sensitivity:"base"})})}getBaseLevel(e){const t=this.filterFeatures?.levels?.levelsInfo;let i=null;if(e){const{id:l}=e;if(t&&t.length>0&&(t.forEach(e=>{0===e.verticalOrder&&e.facilityId===l&&(i=e)}),!i)){let e=null;t.forEach(t=>{t.facilityId===l&&(e?(t.verticalOrder??0)>=0?null!=e.verticalOrder&&(e.verticalOrder<0||(t.verticalOrder??0)<e.verticalOrder)&&(e=t):null!=e.verticalOrder&&null!=t.verticalOrder&&e.verticalOrder<0&&t.verticalOrder>e.verticalOrder&&(e=t):e=t)}),e&&(i=e)}}return i}getFacility(e){return this.filterFeatures?.facilities?.facilitiesInfo?.find(t=>t.id===e)??null}getFacilityLevels(e){if(!e||!this.filterFeatures?.levels?.levelsInfo)return[];return this.filterFeatures.levels.levelsInfo.filter(t=>t.facilityId===e).sort((e,t)=>{const i=e.verticalOrder??0,l=t.verticalOrder??0;return i>l?-1:i===l?0:1})}getLevel(e){return this.filterFeatures?.levels?.levelsInfo?.find(t=>t.id===e)??null}getSite(e){return this.filterFeatures?.sites?.sitesInfo?.find(t=>t.id===e)??null}goTo(e){const{view:t}=this;if(!t||!e)return;const{geometry:i}=e;i&&i.extent&&this.callGoTo({target:i.extent,options:{duration:h(1e3),easing:"quad-in-out"}})}setFloors(e){const{view:t}=this;t&&(t?.map?.allLayers?.forEach(e=>{"feature"===e.type&&this._computeViewAllModeFloors(e)}),t.floors=new l(this._computeFloors(e)))}updateWebDocument(e){if(p(e)){const t=new f({enabled:this.enabled,longNames:this.longNames,minimized:this.minimized,pinnedLevels:this.pinnedLevels,site:this.site??null,facility:this.facility??null,level:this.level??null,useVerticalOrder:this.useVerticalOrder,selectedVerticalOrder:this.selectedVerticalOrder});e.widgets?e.widgets.floorFilter=t:e.widgets=new u({floorFilter:t})}}_computeFloors(e){if("single-floor"===this.filterMode)this._computeSingleFloor(e);else if("base-floors"===this.filterMode)return"3d"===this.view?.type?this._computeBaseFloors3D(e):this._computeBaseFloors(e);return this._computeEmptyFloors()}_computeSingleFloor(e){if(!e)return this._computeEmptyFloors();const t=[];if("all"===e?.id){this.getFacilityLevels(e.facilityId).forEach(e=>{e.id&&t.push(e.id)})}else e&&t.push(e.id);return t}_computeBaseFloors(e){const t=this.filterFeatures?.levels?.levelsInfo;if(!t?.length)return this._computeEmptyFloors();const i=[];if("all"===e?.id){this.getFacilityLevels(e.facilityId).forEach(e=>{e.id&&i.push(e.id)})}else e&&i.push(e.id);const l=e?.facilityId,s=e?.verticalOrder,r=(e,t)=>{0===e&&i.push(t)};return t.forEach(e=>{const{id:t,facilityId:o,verticalOrder:a}=e;l||i.includes(t)?o===l||i.includes(t)||(this.useVerticalOrder?a===s&&i.push(t):r(a,t)):r(a,t)}),i}_computeBaseFloors3D(e){const t=this.filterFeatures?.levels?.levelsInfo;if(!t?.length)return this._computeEmptyFloors();const i=[],l=e?.id.split("--")??[];if(l?.length>1&&"all"===l[0]){this.getFacilityLevels(e?.facilityId).forEach(e=>{e.id&&i.push(e.id)})}else e&&i.push(e.id);const s=e?.facilityId;return t.forEach(e=>{const{id:t,facilityId:l}=e;(s||i.includes(t))&&(l===s||i.includes(t))||i.push(t)}),i}_computeEmptyFloors(){return[]}async _setFilterLayers(){const{view:e}=this;if(e&&!this._isOverridden("filterLayers")){if(!p(e.map)&&!v(e.map))throw new s("floorfilter:unsupported-map","Map must be a webmap or webscene");{const t=e.map,i=t?.allLayers;if(i?.items?.length>0){const e={siteLayer:null,facilityLayer:null,levelLayer:null},l=t.floorInfo?.siteLayer?.layerId,s=t.floorInfo?.facilityLayer?.layerId,r=t.floorInfo?.levelLayer?.layerId,o=t.floorInfo?.siteLayer?.sublayerId||t.floorInfo?.facilityLayer?.sublayerId||t.floorInfo?.levelLayer?.sublayerId;if(!s||!r)return;const a=i.items.filter(e=>"feature"===e.type||"scene"===e.type),n=i.items.filter(e=>"map-image"===e.type);if(n?.length>0&&o){await Promise.all(n.map(e=>e.load()));const i=t.floorInfo?.siteLayer?.sublayerId,o=t.floorInfo?.facilityLayer?.sublayerId,a=t.floorInfo?.levelLayer?.sublayerId;n.forEach(t=>{const n=t.id,h=t?.allSublayers,d=h?.items;(n===l||n===s||n===r)&&d?.length>0&&h.items.forEach(t=>{const s=t.id;n===l&&s===i?e.siteLayer=t:s===o?e.facilityLayer=t:s===a&&(e.levelLayer=t)})})}a?.length>0&&a.forEach(t=>{const i=t.id;i===l?e.siteLayer=t:i===s?e.facilityLayer=t:i===r&&(e.levelLayer=t)}),this.filterLayers=e}}}}async _getFilterFeatures(){if(this._isOverridden("filterFeatures"))return this.filterFeatures;const[e,t,i]=await Promise.all([this._getSites(),this._getFacilities(),this._getLevels()]);return{sites:e,facilities:t,levels:i}}async _getSites(){const e={sitesInfo:[]},{filterLayers:t,view:i}=this,l=i?.map,{siteLayer:s}=t;if(!s||!l?.floorInfo?.siteLayer)return e;const r=s.createQuery();r.returnGeometry=!0,r.outFields=["*"],r.returnZ=!0,"type"in s&&"scene"===s.type&&(r.multipatchOption="xyFootprint");const{siteIdField:o,nameField:a}=l.floorInfo.siteLayer,n=await s.queryFeatures(r);if(n?.features?.length>0){const t=n.features,i=s?.fieldsIndex.get(o)?.name||o,l=s?.fieldsIndex.get(a)?.name||a;null!=i&&null!=l&&t.forEach(t=>{const s=t.attributes,r=t.geometry,o=s[i],a=s[l];o&&a&&e.sitesInfo.push({id:o,name:a,geometry:r})})}return e}async _getFacilities(){const{filterLayers:e,view:t}=this,i=t?.map,{facilityLayer:l}=e,s={facilitiesInfo:[]};if(!l||!i?.floorInfo?.facilityLayer)return s;const r=l.createQuery();r.returnGeometry=!0,r.outFields=["*"],r.returnZ=!0,"type"in l&&"scene"===l.type&&(r.multipatchOption="xyFootprint");const{facilityIdField:o,siteIdField:a,nameField:n}=i.floorInfo.facilityLayer,h=await l.queryFeatures(r);if(h?.features?.length>0){const e=h.features,t=l?.fieldsIndex.get(o)?.name||o,i=l?.fieldsIndex.get(a)?.name||a,r=l?.fieldsIndex.get(n)?.name||n;t&&i&&r&&e.forEach(e=>{const l=e.attributes,o=e.geometry,a=l[t],n=l[i],h=l[r];a&&h&&s.facilitiesInfo.push({id:a,siteId:n,name:h,geometry:o})})}return s}async _getLevels(){const{filterLayers:e,view:t}=this,i=t?.map,{levelLayer:l}=e,s={levelsInfo:[]};if(!l||!i?.floorInfo?.levelLayer)return s;const r=l.createQuery();r.returnGeometry=!0,r.outFields=["*"],r.returnZ=!0;const{levelIdField:o,facilityIdField:a,longNameField:n,shortNameField:h,levelNumberField:d,verticalOrderField:c}=i.floorInfo.levelLayer,u=await l.queryFeatures(r);if(u?.features?.length>0){const e=u.features,t=l?.fieldsIndex.get(o)?.name||o,i=l?.fieldsIndex.get(a)?.name||a,r=l?.fieldsIndex.get(n)?.name||n,f=l?.fieldsIndex.get(h)?.name||h,p=l?.fieldsIndex.get(d)?.name||d,y=l?.fieldsIndex.get(c)?.name||c;t&&i&&r&&f&&p&&y&&e.forEach(e=>{const l=e.attributes,o=l[t],a=l[i],n=l[r],h=l[f],d=l[p],c=l[y];o&&a&&n&&h&&"number"==typeof d&&"number"==typeof c&&s.levelsInfo.push({id:o,facilityId:a,longName:n,shortName:h,levelNumber:d,verticalOrder:c})})}return s}_registerWidget(e){const t=e?.persistableViewModels.includes(this);t||e?.persistableViewModels.add(this)}_unregisterWidget(e){e?.persistableViewModels.remove(this)}_watchSearchResults(e){e?.on("select-result-floor",e=>{const t=this.getLevel(e);t&&this.level!==e&&(this.level=e,this.setFloors(t))})}async _setInitialViewState(e){if(this.view)try{await this.view.when(),await this._setFilterLayers();const t=await this._getFilterFeatures();if(!t)return;if(this.filterFeatures=t,!this.hasFacilities||!this.hasLevels)return void console.error("Facilities and Levels are required for the Floor Filter widget");if(this.hasMultipleSites||(this.filterMenuType="facility"),this.facility&&this.level){this.filterMenuType="facility";const e=this.getFacility(this.facility),t=this.getLevel(this.level);this.site||(this.site=e?.siteId||void 0),this.setFloors(t)}else if(this.facility&&!this.level){this.filterMenuType="facility";const e=this.getFacility(this.facility),t=this.getBaseLevel(e);this.site||(this.site=e?.siteId||void 0),this.level=t?.id||void 0,this.setFloors(t)}else if(!this.facility&&this.level){this.filterMenuType="facility";const e=this.getLevel(this.level),t=this.getFacility(e?.facilityId);this.facility=t?.id||void 0,this.site||(this.site=t?.siteId||void 0),this.setFloors(e)}else if(!this.site||this.facility||this.level){if(!e||!p(e))return void this.setFloors(null);const t=e?.widgets?.floorFilter;if(!t)return void this.setFloors(null);t.site&&!this.site&&(this.site=t.site,this.filterMenuType="facility"),this.setFloors(null)}else this.filterMenuType="site",this.setFloors(null)}catch(t){console.error("Couldn't retrieve sites, facilities, and levels",t)}}_callOverride(e,t){this._override(e,t)}async _updateFloorFilterFromMap(e){if(!e||!p(e))return;const t=e?.widgets?.floorFilter;t&&(this._isOverridden("enabled")||(this.enabled=t.enabled),this._isOverridden("longNames")||(this.longNames=t.longNames),this._isOverridden("minimized")||(this.minimized=t.minimized),this._isOverridden("pinnedLevels")||(this.pinnedLevels=t.pinnedLevels),this._isOverridden("site")||(this.site=t.site),this._isOverridden("facility")||(this.facility=t.facility),this._isOverridden("level")||(this.level=t.level))}_computeViewAllModeFloors(e){const{filterFeatures:t}=this;if(e.floorInfo?.viewAllMode&&this.hasLevels&&this.hasFacilities&&"base-floors"===this.filterMode){const{level:i,facility:s}=this,r=[];t.levels.levelsInfo.forEach(e=>{const{id:t,facilityId:l}=e;s&&l===s?i&&t===i&&r.push(t):r.push(t)}),e.floorInfo.viewAllLevelIds=new l(r)}}};e([d({value:!1})],m.prototype,"enabled",null),e([d({value:void 0})],m.prototype,"facility",null),e([d({value:null})],m.prototype,"filterFeatures",null),e([d({value:null})],m.prototype,"filterLayers",null),e([d()],m.prototype,"filterMenuOpen",void 0),e([d()],m.prototype,"filterMenuType",void 0),e([d()],m.prototype,"filterMode",void 0),e([d()],m.prototype,"hasFacilities",null),e([d()],m.prototype,"hasLevels",null),e([d()],m.prototype,"hasMultipleSites",null),e([d({readOnly:!0})],m.prototype,"isNormalMode",null),e([d({value:void 0})],m.prototype,"level",null),e([d({value:!1})],m.prototype,"longNames",null),e([d()],m.prototype,"levelsExpanded",void 0),e([d({value:!1})],m.prototype,"minimized",null),e([d({value:!1})],m.prototype,"pinnedLevels",null),e([d()],m.prototype,"searchTerm",void 0),e([d({readOnly:!0})],m.prototype,"selectedVerticalOrder",null),e([d({value:void 0})],m.prototype,"site",null),e([d({readOnly:!0})],m.prototype,"state",null),e([d({readOnly:!0,value:!1})],m.prototype,"useVerticalOrder",null),e([d()],m.prototype,"view",void 0),e([d()],m.prototype,"_viewHeightBreakpoint",void 0),e([d()],m.prototype,"_viewWidthBreakpoint",void 0),e([d()],m.prototype,"updateWebDocument",null),m=e([c("esri.widgets.FloorFilter.FloorFilterViewModel")],m);const F=m;export{F as default};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7005],{27921:(t,n,e)=>{e.d(n,{$Q:()=>z,C:()=>u,Cr:()=>d,LV:()=>c,O_:()=>l,Qj:()=>h,T7:()=>x,Tj:()=>A,Ui:()=>q,_I:()=>I,fA:()=>f,gv:()=>w,lU:()=>M,mN:()=>y,mP:()=>P,mR:()=>p,vE:()=>C,vt:()=>o});var r=e(34727),a=e(38954),s=e(51850),i=(e(87317),e(44280),e(32114));function o(t=N){return[t[0],t[1],t[2],t[3]]}function c(t=N[0],n=N[1],e=N[2],r=N[3]){return f(t,n,e,r,i.Km.get())}function u(t,n){return f(n[0],n[1],n[2],n[3],t)}function h(t){return t}function f(t,n,e,r,a=o()){return a[0]=t,a[1]=n,a[2]=e,a[3]=r,a}function l(t,n,e){const r=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],a=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return e[0]=n[0]*a,e[1]=n[1]*a,e[2]=n[2]*a,e[3]=-(e[0]*t[0]+e[1]*t[1]+e[2]*t[2]),e}function d(t,n,e,r=o()){const a=e[0]-n[0],s=e[1]-n[1],i=e[2]-n[2],c=t[0]-n[0],u=t[1]-n[1],h=t[2]-n[2],f=s*h-i*u,l=i*c-a*h,d=a*u-s*c,M=f*f+l*l+d*d,m=Math.abs(M-1)>1e-5&&M>1e-12?1/Math.sqrt(M):1;return r[0]=f*m,r[1]=l*m,r[2]=d*m,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function M(t,n,e,r=0,s=Math.floor(e*(1/3)),i=Math.floor(e*(2/3))){if(e<3)return!1;n(v,r);let o=s,c=!1;for(;o<e-1&&!c;)n(_,o),o++,c=!(0,a.m)(v,_);if(!c)return!1;for(o=Math.max(o,i),c=!1;o<e&&!c;)n(g,o),o++,(0,a.e)(b,v,_),(0,a.n)(b,b),(0,a.e)(j,_,g),(0,a.n)(j,j),c=!(0,a.m)(v,g)&&!(0,a.m)(_,g)&&Math.abs((0,a.g)(b,j))<m;return c?(d(v,_,g,t),!0):(0!==r||1!==s||2!==i)&&M(t,n,e,0,1,2)}e(32728);const m=.99619469809,v=(0,s.vt)(),_=(0,s.vt)(),g=(0,s.vt)(),b=(0,s.vt)(),j=(0,s.vt)();function P(t,n,e){return n!==t&&u(t,n),t[3]=-(0,a.g)(t,e),t}function p(t,n,e,r){return(0,a.f)(g,n,t),l(e,g,r)}function q(t,n,e){return null!=n&&S(C(t,n.origin,n.direction,V,e))}function x(t,n,e){return S(C(t,n.origin,n.vector,0,e))}function w(t,n,e){return S(C(t,n.origin,n.vector,1,e))}function A(t,n){return y(t,n)>=0}function z(t,n){const e=(0,a.g)(t,n.ray.direction),r=-y(t,n.ray.origin);if(r<0&&e>=0)return!1;if(e>-1e-6&&e<1e-6)return r>0;if((r<0||e<0)&&!(r<0&&e<0))return!0;const s=r/e;return e>0?s<n.c1&&(n.c1=s):s>n.c0&&(n.c0=s),n.c0<=n.c1}function I(t,n,e){const r=(0,a.j)(i.rq.get(),t,-t[3]),s=function(t,n,e){const r=(0,a.j)(i.rq.get(),t,(0,a.g)(t,n));return(0,a.e)(e,n,r),e}(t,(0,a.e)(i.rq.get(),n,r),i.rq.get());return(0,a.i)(e,s,r),e}function y(t,n){return(0,a.g)(t,n)+t[3]}function S(t){return 0===t||1===t}function C(t,n,e,s,i){const o=(0,a.g)(t,e),c=y(t,n);if(0===o)return c>=0?2:3;let u=-c/o;return 1&s&&(u=(0,r.qE)(u,0,1)),!(4&s)&&u<0||!(8&s)&&u>1?c>=0?2:3:((0,a.i)(i,n,(0,a.j)(i,e,u)),c>=0?0:1)}const N=[0,0,1,0],V=8},32114:(t,n,e)=>{e.d(n,{Rc:()=>d,J8:()=>M,rq:()=>f,Km:()=>l}),e(44208);var r=e(26390),a=e(29242),s=e(9093),i=e(82534),o=e(48163),c=e(51850),u=e(91829);class h{constructor(t){this._create=t,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new h(o.vt)}static createVec3f64(){return new h(c.vt)}static createVec4f64(){return new h(u.vt)}static createMat3f64(){return new h(a.vt)}static createMat4f64(){return new h(s.vt)}static createQuatf64(){return new h(i.vt)}get test(){}}h.createVec2f64();const f=h.createVec3f64(),l=h.createVec4f64(),d=(h.createMat3f64(),h.createMat4f64()),M=h.createQuatf64()},32728:(t,n,e)=>{e.d(n,{nu:()=>i,wp:()=>s}),e(34727);var r=e(38954),a=e(51850);function s(t,n){const e=Math.sqrt(n[0]*n[0]+n[4]*n[4]+n[8]*n[8]),a=Math.sqrt(n[1]*n[1]+n[5]*n[5]+n[9]*n[9]),s=Math.sqrt(n[2]*n[2]+n[6]*n[6]+n[10]*n[10]);return(0,r.h)(t,e,a,s),t}function i(t,n,e,s=(0,a.vt)()){const i=(0,r.b)(t),u=(0,r.b)(n),h=(0,r.g)(t,n)/(i*u);if(h<.9999999999999999){const a=Math.acos(h),f=((1-e)*i+e*u)/Math.sin(a),l=f/i*Math.sin((1-e)*a),d=f/u*Math.sin(e*a);return(0,r.j)(o,t,l),(0,r.j)(c,n,d),(0,r.i)(s,o,c)}return(0,r.l)(s,t,n,e)}(0,a.vt)(),(0,a.vt)(),(0,a.vt)();const o=(0,a.vt)(),c=(0,a.vt)()},38954:(t,n,e)=>{e.d(n,{A:()=>d,B:()=>h,C:()=>f,D:()=>g,E:()=>O,F:()=>j,G:()=>V,H:()=>E,a:()=>T,b:()=>s,c:()=>_,d:()=>i,e:()=>u,f:()=>w,g:()=>x,h:()=>o,i:()=>c,j:()=>v,l:()=>A,m:()=>N,n:()=>q,o:()=>p,p:()=>z,q:()=>P,r:()=>y,s:()=>b,t:()=>I,u:()=>k,v:()=>l,w:()=>X,x:()=>D,y:()=>m,z:()=>M});var r=e(51850),a=e(34304);function s(t){const n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function i(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function o(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,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 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 h(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 l(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 M(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 v(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}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}function g(t,n){const e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2];return Math.sqrt(e*e+r*r+a*a)}function b(t,n){const e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2];return e*e+r*r+a*a}function j(t){const n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function P(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function p(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function q(t,n){const e=n[0],r=n[1],a=n[2];let s=e*e+r*r+a*a;return s>0&&(s=1/Math.sqrt(s),t[0]=n[0]*s,t[1]=n[1]*s,t[2]=n[2]*s),t}function x(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function w(t,n,e){const r=n[0],a=n[1],s=n[2],i=e[0],o=e[1],c=e[2];return t[0]=a*c-s*o,t[1]=s*i-r*c,t[2]=r*o-a*i,t}function A(t,n,e,r){const a=n[0],s=n[1],i=n[2];return t[0]=a+r*(e[0]-a),t[1]=s+r*(e[1]-s),t[2]=i+r*(e[2]-i),t}function z(t,n,e){const r=n[0],a=n[1],s=n[2];return t[0]=e[0]*r+e[4]*a+e[8]*s+e[12],t[1]=e[1]*r+e[5]*a+e[9]*s+e[13],t[2]=e[2]*r+e[6]*a+e[10]*s+e[14],t}function I(t,n,e){const r=n[0],a=n[1],s=n[2];return t[0]=r*e[0]+a*e[3]+s*e[6],t[1]=r*e[1]+a*e[4]+s*e[7],t[2]=r*e[2]+a*e[5]+s*e[8],t}function y(t,n,e){const r=e[0],a=e[1],s=e[2],i=e[3],o=n[0],c=n[1],u=n[2],h=a*u-s*c,f=s*o-r*u,l=r*c-a*o,d=a*l-s*f,M=s*h-r*l,m=r*f-a*h,v=2*i;return t[0]=o+h*v+2*d,t[1]=c+f*v+2*M,t[2]=u+l*v+2*m,t}const S=(0,r.vt)(),C=(0,r.vt)();function N(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function V(t,n){if(t===n)return!0;const e=t[0],r=t[1],s=t[2],i=n[0],o=n[1],c=n[2],u=(0,a.FD)();return Math.abs(e-i)<=u*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(r-o)<=u*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(s-c)<=u*Math.max(1,Math.abs(s),Math.abs(c))}function O(t,n,e){const r=e[0]-n[0],a=e[1]-n[1],s=e[2]-n[2];let i=r*r+a*a+s*s;return i>0?(i=1/Math.sqrt(i),t[0]=r*i,t[1]=a*i,t[2]=s*i,t):(t[0]=0,t[1]=0,t[2]=0,t)}const T=u,F=h,Q=f,E=g,X=b,k=s,D=j;Object.freeze(Object.defineProperty({__proto__:null,abs:l,add:c,angle:function(t,n){q(S,t),q(C,n);const e=x(S,C);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(t,n,e,r,a,s){const i=1-s,o=i*i,c=s*s,u=o*i,h=3*s*o,f=3*c*i,l=c*s;return t[0]=n[0]*u+e[0]*h+r[0]*f+a[0]*l,t[1]=n[1]*u+e[1]*h+r[1]*f+a[1]*l,t[2]=n[2]*u+e[2]*h+r[2]*f+a[2]*l,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:i,cross:w,crossAndNormalize:function(t,n,e){const r=n[0],a=n[1],s=n[2],i=e[0],o=e[1],c=e[2],u=a*c-s*o,h=s*i-r*c,f=r*o-a*i,l=Math.sqrt(u*u+h*h+f*f);return t[0]=u/l,t[1]=h/l,t[2]=f/l,t},direction:O,dist:E,distance:g,div:Q,divide:f,dot:x,equals:V,exactEquals:N,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,a,s){const i=s*s,o=i*(2*s-3)+1,c=i*(s-2)+s,u=i*(s-1),h=i*(3-2*s);return t[0]=n[0]*o+e[0]*c+r[0]*u+a[0]*h,t[1]=n[1]*o+e[1]*c+r[1]*u+a[1]*h,t[2]=n[2]*o+e[2]*c+r[2]*u+a[2]*h,t},inverse:p,len:k,length:s,lerp:A,max:m,min:M,mul:F,multiply:h,negate:P,normalize:q,random:function(t,n=1){const e=a.Ov,r=2*e()*Math.PI,s=2*e()-1,i=Math.sqrt(1-s*s)*n;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=s*n,t},rotateX:function(t,n,e,r){const a=[],s=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],s[0]=a[0],s[1]=a[1]*Math.cos(r)-a[2]*Math.sin(r),s[2]=a[1]*Math.sin(r)+a[2]*Math.cos(r),t[0]=s[0]+e[0],t[1]=s[1]+e[1],t[2]=s[2]+e[2],t},rotateY:function(t,n,e,r){const a=[],s=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],s[0]=a[2]*Math.sin(r)+a[0]*Math.cos(r),s[1]=a[1],s[2]=a[2]*Math.cos(r)-a[0]*Math.sin(r),t[0]=s[0]+e[0],t[1]=s[1]+e[1],t[2]=s[2]+e[2],t},rotateZ:function(t,n,e,r){const a=[],s=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],s[0]=a[0]*Math.cos(r)-a[1]*Math.sin(r),s[1]=a[0]*Math.sin(r)+a[1]*Math.cos(r),s[2]=a[2],t[0]=s[0]+e[0],t[1]=s[1]+e[1],t[2]=s[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:v,scaleAndAdd:_,set:o,sign:d,sqrDist:X,sqrLen:D,squaredDistance:b,squaredLength:j,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:T,subtract:u,transformMat3:I,transformMat4:z,transformQuat:y},Symbol.toStringTag,{value:"Module"}))},44280:(t,n,e)=>{e.d(n,{EJ:()=>c,g7:()=>o,gr:()=>i});var r=e(34727),a=e(38954),s=e(51850);function i(t,n){return(0,a.g)(t,n)/(0,a.b)(t)}function o(t,n){const e=(0,a.g)(t,n)/((0,a.b)(t)*(0,a.b)(n));return-(0,r.XM)(e)}function c(t,n,e){(0,a.n)(u,t),(0,a.n)(h,n);const s=(0,a.g)(u,h),i=(0,r.XM)(s),o=(0,a.f)(u,u,h);return(0,a.g)(o,e)<0?2*Math.PI-i:i}const u=(0,s.vt)(),h=(0,s.vt)()},46610:(t,n,e)=>{e.d(n,{K:()=>r,n:()=>a});class r{constructor(t,n,e=n){this.data=t,this.size=n,this.stride=e}}class a extends r{constructor(t,n,e,r=!1,a=e){super(t,e,a),this.indices=n,this.exclusive=r}}},48163:(t,n,e)=>{function r(){return[0,0]}function a(t){return[t[0],t[1]]}function s(t,n){return[t,n]}function i(){return s(1,1)}function o(){return s(1,0)}function c(){return s(0,1)}e.d(n,{Un:()=>u,fA:()=>s,o8:()=>a,vt:()=>r});const u=i(),h=o(),f=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:h,UNIT_Y:f,ZEROS:[0,0],clone:a,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:s,ones:i,unitX:o,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},48353:(t,n,e)=>{e.d(n,{l:()=>u});var r=e(34727),a=e(58083),s=e(51850);function i(t,n,e){const r=Math.sin(t),a=Math.cos(t),s=Math.sin(n),i=Math.cos(n),o=e;return o[0]=-r,o[4]=-s*a,o[8]=i*a,o[12]=0,o[1]=a,o[5]=-s*r,o[9]=i*r,o[13]=0,o[2]=0,o[6]=i,o[10]=s,o[14]=0,o[3]=0,o[7]=0,o[11]=0,o[15]=1,o}var o=e(37539),c=e(21325);function u(t,n,e,r){const s=(0,o.Tp)(t,r);if(null==s)return!1;const u=s.source.spatialReferenceId,M=s.dest.spatialReferenceId;if(u===M&&!h(M)&&(0!==u||(0,c.aI)(t,r)))return(0,a.kN)(e,n),!0;if(h(M)){const t=o.w5[u][10],r=o.w5[10][M];return null!=t&&null!=r&&(t(n,0,l,0),r(l,0,d,0),i(f*l[0],f*l[1],e),e[12]=d[0],e[13]=d[1],e[14]=d[2],!0)}const m=h(u);if((3===M||11===M||2===M||5===M)&&(2===u||m||3===u||5===u)){const t=o.w5[u][10],r=o.w5[10][M];return null!=t&&null!=r&&(t(n,0,l,0),r(l,0,d,0),m?function(t,n,e){i(t,n,e),(0,a.mg)(e,e)}(f*l[0],f*l[1],e):(0,a.D_)(e),e[12]=d[0],e[13]=d[1],e[14]=d[2],!0)}return!1}function h(t){return 1===t||6===t||8===t||4===t}const f=(0,r.kU)(1),l=(0,s.vt)(),d=(0,s.vt)()},57005:(t,n,e)=>{e.d(n,{ab:()=>bt,gm:()=>yt});var r=e(77690),a=e(29242),s=e(9093),i=e(67026),o=e(82534),c=e(38954),u=e(51850),h=e(87317),f=e(91829),l=e(73941),d=e(98764),M=e(48353),m=e(9762),v=e(37539),_=e(27921),g=e(21325),b=e(32114),j=e(48163),P=e(46610);const p=1e-6,q=(0,u.vt)(),x=(0,u.vt)();function w(t,n,e,r,a,s,i,o,c,u){return function(t,n,e){let r=_t(t.maxVert[0],t.minVert[0]),a=0;for(let n=1;n<7;++n){const e=_t(t.maxVert[n],t.minVert[n]);e>r&&(r=e,a=n)}dt(n,t.minVert[a]),dt(e,t.maxVert[a])}(t,r,a),_t(r,a)<p?1:(ft(i,r,a),mt(i,i),function(t,n,e,r){const{data:a,size:s}=t;let i=Number.NEGATIVE_INFINITY,o=0;for(let t=0;t<a.length;t+=s){T[0]=a[t]-n[0],T[1]=a[t+1]-n[1],T[2]=a[t+2]-n[2];const r=e[0]*T[0]+e[1]*T[1]+e[2]*T[2],s=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],c=T[0]*T[0]+T[1]*T[1]+T[2]*T[2]-r*r/s;c>i&&(i=c,o=t)}return dt(r,a,o),i}(n,r,i,s)<p?2:(ft(o,a,s),mt(o,o),ft(c,s,r),mt(c,c),Mt(e,o,i),mt(e,e),Y(n,e,i,o,c,u),0))}const A=(0,u.vt)(),z=(0,u.vt)(),I=(0,u.vt)(),y=(0,u.vt)(),S=(0,u.vt)(),C=(0,u.vt)(),N=(0,u.vt)(),V=(0,u.vt)();function O(t,n,e,r,a,s,i,o,c){(function(t,n,e,r,a){!function(t,n,e,r,a){const{data:s,size:i}=t;dt(r,s),dt(a,r),e[0]=gt(Z,n),e[1]=e[0];for(let t=i;t<s.length;t+=i){const i=s[t]*n[0]+s[t+1]*n[1]+s[t+2]*n[2];i<e[0]&&(e[0]=i,dt(r,s,t)),i>e[1]&&(e[1]=i,dt(a,s,t))}}(t,n,F,a,r);const s=gt(e,n);F[1]-p<=s&&(r[0]=void 0),F[0]+p>=s&&(a[0]=void 0)})(t,n,e,A,z),void 0!==A[0]&&(ft(I,A,e),mt(I,I),ft(y,A,r),mt(y,y),ft(S,A,a),mt(S,S),Mt(C,y,s),mt(C,C),Mt(N,S,i),mt(N,N),Mt(V,I,o),mt(V,V),Y(t,C,s,y,I,c),Y(t,N,i,S,y,c),Y(t,V,o,I,S,c)),void 0!==z[0]&&(ft(I,z,e),mt(I,I),ft(y,z,r),mt(y,y),ft(S,z,a),mt(S,S),Mt(C,y,s),mt(C,C),Mt(N,S,i),mt(N,N),Mt(V,I,o),mt(V,V),Y(t,C,s,y,I,c),Y(t,N,i,S,y,c),Y(t,V,o,I,S,c))}const T=[0,0,0],F=(0,j.vt)(),Q=(0,u.vt)(),E=(0,u.vt)(),X=(0,u.vt)(),k=(0,u.vt)(),D=(0,u.vt)(),R=(0,u.vt)();function Y(t,n,e,r,a,s){if(vt(n)<p)return;Mt(Q,e,n),Mt(E,r,n),Mt(X,a,n),B(t,n,F),D[1]=F[0],k[1]=F[1],R[1]=k[1]-D[1];const i=[e,r,a],o=[Q,E,X];for(let e=0;e<3;++e){B(t,i[e],F),D[0]=F[0],k[0]=F[1],B(t,o[e],F),D[2]=F[0],k[2]=F[1],R[0]=k[0]-D[0],R[2]=k[2]-D[2];const r=ut(R);r<s.quality&&(dt(s.b0,i[e]),dt(s.b1,n),dt(s.b2,o[e]),s.quality=r)}}const Z=(0,u.vt)();function B(t,n,e){const{data:r,size:a}=t;e[0]=Number.POSITIVE_INFINITY,e[1]=Number.NEGATIVE_INFINITY;for(let t=0;t<r.length;t+=a){const a=r[t]*n[0]+r[t+1]*n[1]+r[t+2]*n[2];e[0]=Math.min(e[0],a),e[1]=Math.max(e[1],a)}}function U(t,n,e){e.center=t,e.halfSize=(0,c.j)(n,n,.5),e.quaternion=o.zK}const H=(0,u.vt)(),K=(0,u.vt)(),L=(0,u.vt)(),G=(0,u.vt)(),W=(0,u.vt)(),J=(0,u.vt)();function $(t,n,e){dt(H,n),Math.abs(n[0])>Math.abs(n[1])&&Math.abs(n[0])>Math.abs(n[2])?H[0]=0:Math.abs(n[1])>Math.abs(n[2])?H[1]=0:H[2]=0,vt(H)<p&&(H[0]=H[1]=H[2]=1),Mt(K,n,H),mt(K,K),Mt(L,n,K),mt(L,L),tt(t,n,K,L,G,W),ft(J,W,G),it(n,K,L,G,W,J,e)}function tt(t,n,e,r,a,s){B(t,n,F),a[0]=F[0],s[0]=F[1],B(t,e,F),a[1]=F[0],s[1]=F[1],B(t,r,F),a[2]=F[0],s[2]=F[1]}const nt=(0,u.vt)(),et=(0,u.vt)(),rt=(0,u.vt)(),at=(0,a.fA)(1,0,0,0,1,0,0,0,1),st=(0,o.vt)();function it(t,n,e,r,a,s,i){at[0]=t[0],at[1]=t[1],at[2]=t[2],at[3]=n[0],at[4]=n[1],at[5]=n[2],at[6]=e[0],at[7]=e[1],at[8]=e[2],i.quaternion=function(t,n){const e=n[0]+n[4]+n[8];if(e>0){let r=Math.sqrt(e+1);t[3]=.5*r,r=.5/r,t[0]=(n[5]-n[7])*r,t[1]=(n[6]-n[2])*r,t[2]=(n[1]-n[3])*r}else{let e=0;n[4]>n[0]&&(e=1),n[8]>n[3*e+e]&&(e=2);const r=(e+1)%3,a=(e+2)%3;let s=Math.sqrt(n[3*e+e]-n[3*r+r]-n[3*a+a]+1);t[e]=.5*s,s=.5/s,t[3]=(n[3*r+a]-n[3*a+r])*s,t[r]=(n[3*r+e]+n[3*e+r])*s,t[a]=(n[3*a+e]+n[3*e+a])*s}return t}(st,at),ht(nt,r,a),lt(nt,nt,.5),lt(et,t,nt[0]),lt(rt,n,nt[1]),ht(et,et,rt),lt(rt,e,nt[2]),i.center=(0,c.i)(et,et,rt),i.halfSize=(0,c.j)(nt,s,.5)}class ot{constructor(t){this.minVert=new Array(7),this.maxVert=new Array(7),this.buffer=new ArrayBuffer(448);let n=0;this.minProj=new Float64Array(this.buffer,n,7),n+=56,this.maxProj=new Float64Array(this.buffer,n,7),n+=56;for(let t=0;t<7;++t)this.minVert[t]=new Float64Array(this.buffer,n,3),n+=24;for(let t=0;t<7;++t)this.maxVert[t]=new Float64Array(this.buffer,n,3),n+=24;for(let t=0;t<7;++t)this.minProj[t]=Number.POSITIVE_INFINITY,this.maxProj[t]=Number.NEGATIVE_INFINITY;const e=new Array(7),r=new Array(7),{data:a,size:s}=t;for(let t=0;t<a.length;t+=s){let n=a[t];n<this.minProj[0]&&(this.minProj[0]=n,e[0]=t),n>this.maxProj[0]&&(this.maxProj[0]=n,r[0]=t),n=a[t+1],n<this.minProj[1]&&(this.minProj[1]=n,e[1]=t),n>this.maxProj[1]&&(this.maxProj[1]=n,r[1]=t),n=a[t+2],n<this.minProj[2]&&(this.minProj[2]=n,e[2]=t),n>this.maxProj[2]&&(this.maxProj[2]=n,r[2]=t),n=a[t]+a[t+1]+a[t+2],n<this.minProj[3]&&(this.minProj[3]=n,e[3]=t),n>this.maxProj[3]&&(this.maxProj[3]=n,r[3]=t),n=a[t]+a[t+1]-a[t+2],n<this.minProj[4]&&(this.minProj[4]=n,e[4]=t),n>this.maxProj[4]&&(this.maxProj[4]=n,r[4]=t),n=a[t]-a[t+1]+a[t+2],n<this.minProj[5]&&(this.minProj[5]=n,e[5]=t),n>this.maxProj[5]&&(this.maxProj[5]=n,r[5]=t),n=a[t]-a[t+1]-a[t+2],n<this.minProj[6]&&(this.minProj[6]=n,e[6]=t),n>this.maxProj[6]&&(this.maxProj[6]=n,r[6]=t)}for(let t=0;t<7;++t){let n=e[t];dt(this.minVert[t],a,n),n=r[t],dt(this.maxVert[t],a,n)}}}class ct{constructor(){this.b0=(0,u.fA)(1,0,0),this.b1=(0,u.fA)(0,1,0),this.b2=(0,u.fA)(0,0,1),this.quality=0}}function ut(t){return t[0]*t[1]+t[0]*t[2]+t[1]*t[2]}function ht(t,n,e){t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2]}function ft(t,n,e){t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2]}function lt(t,n,e){t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e}function dt(t,n,e=0){t[0]=n[e],t[1]=n[e+1],t[2]=n[e+2]}function Mt(t,n,e){const r=n[0],a=n[1],s=n[2],i=e[0],o=e[1],c=e[2];t[0]=a*c-s*o,t[1]=s*i-r*c,t[2]=r*o-a*i}function mt(t,n){const e=n[0]*n[0]+n[1]*n[1]+n[2]*n[2];if(e>0){const r=1/Math.sqrt(e);t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r}}function vt(t){return t[0]*t[0]+t[1]*t[1]+t[2]*t[2]}function _t(t,n){const e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2];return e*e+r*r+a*a}function gt(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}class bt{constructor(t=u.uY,n=Zt,e=o.zK){this._data=[t[0],t[1],t[2],n[0],n[1],n[2],e[0],e[1],e[2],e[3]]}clone(){return bt.fromData(this._data)}invalidate(){this._data[3]=-1}get isValid(){return this._data[3]>=0}static fromData(t){const n=new bt;return n._copyFromData(t),n}static fromJSON(t){return new bt(t.center,t.halfSize,t.quaternion)}copy(t){this._copyFromData(t.data)}_copyFromData(t){for(let n=0;n<10;++n)this._data[n]=t[n]}get center(){return(0,c.h)(b.rq.get(),this._data[0],this._data[1],this._data[2])}get centerX(){return this._data[0]}get centerY(){return this._data[1]}get centerZ(){return this._data[2]}getCenter(t){return t[0]=this._data[0],t[1]=this._data[1],t[2]=this._data[2],t}set center(t){this._data[0]=t[0],this._data[1]=t[1],this._data[2]=t[2]}setCenter(t,n,e){this._data[0]=t,this._data[1]=n,this._data[2]=e}get halfSize(){return(0,c.h)(b.rq.get(),this._data[3],this._data[4],this._data[5])}get halfSizeX(){return this._data[3]}get halfSizeY(){return this._data[4]}get halfSizeZ(){return this._data[5]}getHalfSize(t){return t[0]=this._data[3],t[1]=this._data[4],t[2]=this._data[5],t}set halfSize(t){this._data[3]=t[0],this._data[4]=t[1],this._data[5]=t[2]}get quaternion(){return(0,i.hZ)(b.J8.get(),this._data[6],this._data[7],this._data[8],this._data[9])}getQuaternion(t){return t[0]=this._data[6],t[1]=this._data[7],t[2]=this._data[8],t[3]=this._data[9],t}set quaternion(t){this._data[6]=t[0],this._data[7]=t[1],this._data[8]=t[2],this._data[9]=t[3]}get data(){return this._data}getCorners(t){const n=this._data,e=(0,i.hZ)(jt,n[6],n[7],n[8],n[9]);for(let r=0;r<8;++r){const a=t[r];a[0]=(1&r?-1:1)*n[3],a[1]=(2&r?-1:1)*n[4],a[2]=(4&r?-1:1)*n[5],(0,c.r)(a,a,e),a[0]+=n[0],a[1]+=n[1],a[2]+=n[2]}return t}getAxes(t){const n=this._data,e=(0,i.hZ)(jt,n[6],n[7],n[8],n[9]);return(0,c.r)(t[0],[1,0,0],e),(0,c.r)(t[1],[0,1,0],e),(0,c.r)(t[2],[0,0,1],e),t}intersectsFrustum(t){const n=this.center,e=t.planes;for(const t of e){const e=(0,_.Qj)(t),r=this.projectedRadius(e);if((0,c.g)(e,n)+t[3]-r>0)return!1}const r=this.getAxes(kt),a=t.points,s=this.halfSize;for(let t=0;t<3;++t){const e=r[t],i=-(0,c.g)(e,n),o=s[t];let u=!0,h=!0;for(const t of a){const n=(0,c.g)(t,e)+i;u&&=n>o,h&&=n<-o}if(u||h)return!1}if(this.getCorners(Xt).some(n=>t.intersectsPoint(n)))return!0;const i=Ut;for(let t=0;t<3;++t){const e=r[t];i[t]=(0,c.g)(e,n)}if(t.points.some(t=>(t=>{for(let n=0;n<3;++n){const e=r[n],a=s[n],o=(0,c.g)(e,t)-i[n];if(o>a||o<-a)return!1}return!0})(t)))return!0;const o=t.lines,u=Bt;for(let t=0;t<8;++t){const e=o[t].direction;for(const t of r){(0,c.f)(u,e,t);const r=(0,c.u)(u);if(!(r>0))continue;(0,c.j)(u,u,1/r);const s=this.projectedRadius(u),i=(0,c.g)(n,u),o=i-s,h=i+s;let f=!1,l=!1,d=!0;for(const t of a){const n=(0,c.g)(u,t);if(n>h){if(l){d=!1;break}f=!0}else{if(!(n<o)){d=!1;break}if(f){d=!1;break}l=!0}}if(d)return!1}}return!0}doesIntersectFrustumConservativeApproximation(t){return this.intersectPlane(t[0])<=0&&this.intersectPlane(t[1])<=0&&this.intersectPlane(t[2])<=0&&this.intersectPlane(t[3])<=0&&this.intersectPlane(t[4])<=0&&this.intersectPlane(t[5])<=0}get radius(){const t=this._data[3],n=this._data[4],e=this._data[5];return Math.sqrt(t*t+n*n+e*e)}intersectsPoint(t){const n=this.getAxes(kt),e=this.halfSize,{center:r}=this;for(let a=0;a<3;++a){const s=n[a],i=e[a],o=(0,c.g)(s,t)-(0,c.g)(s,r);if(o>i||o<-i)return!1}return!0}intersectSphere(t){const{center:n}=t,e=this._data;qt[0]=e[0]-n[0],qt[1]=e[1]-n[1],qt[2]=e[2]-n[2];const r=this.getQuaternion(Pt);return(0,i.Xr)(jt,r),(0,c.r)(qt,qt,jt),(0,c.v)(qt,qt),xt[0]=Math.min(qt[0],e[3]),xt[1]=Math.min(qt[1],e[4]),xt[2]=Math.min(qt[2],e[5]),(0,c.w)(xt,qt)<t.radius*t.radius}intersectSphereWithMBS(t,n=this.radius){const e=this._data,{center:r}=t;qt[0]=e[0]-r[0],qt[1]=e[1]-r[1],qt[2]=e[2]-r[2];const a=t.radius,s=a+n;return!((0,c.x)(qt)>s*s)&&(jt[0]=-e[6],jt[1]=-e[7],jt[2]=-e[8],jt[3]=e[9],(0,c.r)(qt,qt,jt),(0,c.v)(qt,qt),xt[0]=Math.min(qt[0],e[3]),xt[1]=Math.min(qt[1],e[4]),xt[2]=Math.min(qt[2],e[5]),(0,c.w)(xt,qt)<a*a)}intersectPlane(t){const n=t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3],e=this.projectedRadius((0,_.Qj)(t));return n>e?1:n<-e?-1:0}intersectRay(t,n,e=0){const r=this._data,a=jt;a[0]=-r[6],a[1]=-r[7],a[2]=-r[8],a[3]=r[9],qt[0]=t[0]-r[0],qt[1]=t[1]-r[1],qt[2]=t[2]-r[2];const s=(0,c.r)(qt,qt,jt),i=(0,c.r)(xt,n,jt);let o=-1/0,u=1/0;const h=this.getHalfSize(Ft);for(let t=0;t<3;t++){const n=s[t],r=i[t],a=h[t]+e;if(Math.abs(r)>1e-6){const t=(a-n)/r,e=(-a-n)/r;o=Math.max(o,Math.min(t,e)),u=Math.min(u,Math.max(t,e))}else if(n>a||n<-a)return!1}return o<=u}projectedArea(t,n,e,a){const s=this.getQuaternion(Pt);(0,i.Xr)(jt,s),qt[0]=t[0]-this._data[0],qt[1]=t[1]-this._data[1],qt[2]=t[2]-this._data[2],(0,c.r)(qt,qt,jt);const o=this.getHalfSize(Ft),u=qt[0]<-o[0]?-1:qt[0]>o[0]?1:0,f=qt[1]<-o[1]?-1:qt[1]>o[1]?1:0,l=qt[2]<-o[2]?-1:qt[2]>o[2]?1:0,d=Math.abs(u)+Math.abs(f)+Math.abs(l);if(0===d)return 1/0;const M=1===d?4:6,m=6*(u+3*f+9*l+13);(0,r.I0)(Qt,s),(0,r.hs)(Qt,Qt,o);const v=this.getCenter(Ot);for(let t=0;t<M;t++){const e=It[m+t];(0,c.h)(qt,((1&e)<<1)-1,(2&e)-1,((4&e)>>1)-1),(0,c.t)(qt,qt,Qt),(0,c.i)(wt,v,qt),wt[3]=1,(0,h.t)(wt,wt,n);const r=1/Math.max(1e-6,wt[3]);zt[2*t]=wt[0]*r,zt[2*t+1]=wt[1]*r}const _=2*M-2;let g=zt[0]*(zt[3]-zt[_+1])+zt[_]*(zt[1]-zt[_-1]);for(let t=2;t<_;t+=2)g+=zt[t]*(zt[t+3]-zt[t-1]);return Math.abs(g)*e*a*.125}projectedRadius(t){const n=this.getQuaternion(Pt);return(0,i.Xr)(jt,n),(0,c.r)(qt,t,jt),Math.abs(qt[0]*this._data[3])+Math.abs(qt[1]*this._data[4])+Math.abs(qt[2]*this._data[5])}minimumDistancePlane(t){return t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3]-this.projectedRadius((0,_.Qj)(t))}maximumDistancePlane(t){return t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3]+this.projectedRadius((0,_.Qj)(t))}toAaBoundingBox(t){const n=this.getQuaternion(Pt),e=(0,r.I0)(Qt,n),a=this._data[3]*Math.abs(e[0])+this._data[4]*Math.abs(e[3])+this._data[5]*Math.abs(e[6]),s=this._data[3]*Math.abs(e[1])+this._data[4]*Math.abs(e[4])+this._data[5]*Math.abs(e[7]),i=this._data[3]*Math.abs(e[2])+this._data[4]*Math.abs(e[5])+this._data[5]*Math.abs(e[8]);t[0]=this._data[0]-a,t[1]=this._data[1]-s,t[2]=this._data[2]-i,t[3]=this._data[0]+a,t[4]=this._data[1]+s,t[5]=this._data[2]+i}transform(t,n,e,r=0,a=(0,d.lO)(e),s=(0,d.lO)(n),o=(0,v.jd)(n,s)){if(e===a)n.isGeographic?function(t,n,e,r,a=(0,d.lO)(e)){const s=(0,l.tO)(e),o=1+Math.max(0,r)/(s.radius+t.centerZ);t.getCenter(Vt),Vt[2]+=r,(0,m.projectBuffer)(Vt,e,0,Vt,a,0),n.center=Vt;const u=t.getQuaternion(Pt);n.quaternion=u,(0,i.Xr)(jt,u),(0,c.h)(Dt,0,0,1),(0,c.r)(Dt,Dt,jt);const h=t.getHalfSize(Ft);(0,c.h)(Dt,h[0]*Math.abs(Dt[0]),h[1]*Math.abs(Dt[1]),h[2]*Math.abs(Dt[2])),(0,c.j)(Dt,Dt,s.inverseFlattening),(0,c.i)(Dt,h,Dt),n.halfSize=(0,c.j)(Dt,Dt,o)}(this,t,n,r,s):function(t,n,e,r,a=(0,d.lO)(e),s=(0,v.jd)(e,a)){t.getCorners(Xt),t.getCenter(Vt),Vt[2]+=r,(0,M.l)(e,Vt,Et,a),n.setCenter(Et[12],Et[13],Et[14]);const o=2*Math.sqrt(1+Et[0]+Et[5]+Et[10]);jt[0]=(Et[6]-Et[9])/o,jt[1]=(Et[8]-Et[2])/o,jt[2]=(Et[1]-Et[4])/o,jt[3]=.25*o;const u=t.getQuaternion(Pt);n.quaternion=(0,i.lw)(jt,jt,u),(0,i.Xr)(jt,jt),(0,c.h)(Rt,0,0,0);const h=n.getCenter(Tt);for(const t of Xt)t[2]+=r,s(t,0,t,0),(0,c.a)(Dt,t,h),(0,c.r)(Dt,Dt,jt),(0,c.v)(Dt,Dt),(0,c.y)(Rt,Rt,Dt);n.halfSize=Rt}(this,t,n,r,s,o);else if(n.isWGS84&&(e.isWebMercator||(0,g.r1)(e)))!function(t,n,e,r,a){n.getCenter(Ot),Ot[2]+=a;const s=(0,d.lO)(e);(0,m.projectBuffer)(Ot,t,0,Ot,s,0),St(s,n,Ot,e,r)}(n,this,e,t,r);else if(n.isWebMercator&&(0,g.r1)(e))!function(t,n,e,r,a){n.getCenter(Ot),Ot[2]+=a,St(t,n,Ot,e,r)}(n,this,e,t,r);else{const a=this.getCenter(Ot);a[2]+=r,(0,m.projectBuffer)(a,n,0,a,e,0),t.center=a,this!==t&&(t.quaternion=this.getQuaternion(Pt),t.halfSize=this.getHalfSize(Ft))}}}const jt=(0,o.vt)(),Pt=(0,o.vt)(),pt=(0,o.vt)(),qt=(0,u.vt)(),xt=(0,u.vt)(),wt=(0,f.vt)();function At(t,n=new bt){return function(t,n){const{data:e,size:r}=t,a=e.length/r;if(a<=0)return;const s=new ot(t);ht(q,s.minProj,s.maxProj),lt(q,q,.5),ft(x,s.maxProj,s.minProj);const i=ut(x),o=new ct;o.quality=i,a<14&&(t=new P.K(new Float64Array(s.buffer,112,42),3));const c=(0,u.vt)(),h=(0,u.vt)(),f=(0,u.vt)(),l=(0,u.vt)(),d=(0,u.vt)(),M=(0,u.vt)(),m=(0,u.vt)();switch(w(s,t,m,c,h,f,l,d,M,o)){case 1:return void U(q,x,n);case 2:return void $(t,l,n)}O(t,m,c,h,f,l,d,M,o),tt(t,o.b0,o.b1,o.b2,G,W);const v=(0,u.vt)();ft(v,W,G),o.quality=ut(v),o.quality<i?it(o.b0,o.b1,o.b2,G,W,v,n):U(q,x,n)}(t,n),n}const zt=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],It=(()=>{const t=new Int8Array(162);let n=0;const e=e=>{for(let r=0;r<e.length;r++)t[n+r]=e[r];n+=6};return e([6,2,3,1,5,4]),e([0,2,3,1,5,4]),e([0,2,3,7,5,4]),e([0,1,3,2,6,4]),e([0,1,3,2,0,0]),e([0,1,5,7,3,2]),e([0,1,3,7,6,4]),e([0,1,3,7,6,2]),e([0,1,5,7,6,2]),e([0,1,5,4,6,2]),e([0,1,5,4,0,0]),e([0,1,3,7,5,4]),e([0,2,6,4,0,0]),e([0,0,0,0,0,0]),e([1,3,7,5,0,0]),e([2,3,7,6,4,0]),e([2,3,7,6,0,0]),e([2,3,1,5,7,6]),e([0,1,5,7,6,2]),e([0,1,5,7,6,4]),e([0,1,3,7,6,4]),e([4,5,7,6,2,0]),e([4,5,7,6,0,0]),e([4,5,1,3,7,6]),e([0,2,3,7,5,4]),e([6,2,3,7,5,4]),e([6,2,3,1,5,4]),t})();function yt(t,n,e,r,a){const s=t.getQuaternion(Pt);a.quaternion=s,(0,i.Xr)(jt,s);const o=t.getCenter(Ot),h=t.getHalfSize(Ft);if(1===r){(0,c.r)(Dt,o,jt),(0,c.v)(Rt,Dt),(0,c.z)(Yt,Rt,h),(0,c.a)(Yt,Rt,Yt);const r=(0,c.b)(Yt);(0,c.i)(Yt,Rt,h);const s=(0,c.b)(Yt);if(r<e)a.center=o,(0,c.h)(Dt,e,e,e),a.halfSize=(0,c.i)(Dt,h,Dt);else{const i=s>0?1+n/s:1,o=r>0?1+e/r:1,u=(o+i)/2,f=(o-i)/2;(0,c.j)(Yt,Rt,f),a.halfSize=(0,c.c)(Yt,Yt,h,u),(0,c.j)(Yt,Rt,u),(0,c.c)(Yt,Yt,h,f),(0,c.A)(Dt,Dt),(0,c.B)(Dt,Yt,Dt);const l=t.getQuaternion(pt);a.center=(0,c.r)(Dt,Dt,l)}}else{a.center=(0,c.c)(Dt,o,u.Cb,(e+n)/2);const t=(0,c.r)(Dt,u.Cb,jt);(0,c.v)(t,t),a.halfSize=(0,c.c)(Rt,h,t,(e-n)/2)}return a}function St(t,n,e,a,s){const i=n.getQuaternion(Pt),o=(0,r.I0)(Qt,i),c=n.getHalfSize(Ft);for(let t=0;t<8;++t){for(let n=0;n<3;++n)Vt[n]=c[n]*(t&1<<n?-1:1);for(let n=0;n<3;++n){let r=e[n];for(let t=0;t<3;++t)r+=Vt[t]*o[3*t+n];Ct[3*t+n]=r}}(0,m.projectBuffer)(Ct,t,0,Ct,a,0,8),At(Nt,s)}const Ct=new Array(24),Nt=new P.K(Ct,3),Vt=(0,u.vt)(),Ot=(0,u.vt)(),Tt=(0,u.vt)(),Ft=(0,u.vt)(),Qt=(0,a.vt)(),Et=(0,s.vt)(),Xt=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],kt=[(0,u.vt)(),(0,u.vt)(),(0,u.vt)()],Dt=(0,u.vt)(),Rt=(0,u.vt)(),Yt=(0,u.vt)(),Zt=(0,u.CN)(-1,-1,-1),Bt=(0,u.vt)(),Ut=[0,0,0]},67026:(t,n,e)=>{e.d(n,{A6:()=>m,Xd:()=>h,Xr:()=>d,hZ:()=>_,lw:()=>f,t2:()=>I,x8:()=>u});var r=e(29242),a=e(82534),s=e(51850),i=e(34304),o=e(38954),c=e(87317);function u(t,n,e){e*=.5;const r=Math.sin(e);return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=Math.cos(e),t}function h(t,n){const e=2*Math.acos(n[3]),r=Math.sin(e/2);return r>(0,i.FD)()?(t[0]=n[0]/r,t[1]=n[1]/r,t[2]=n[2]/r):(t[0]=1,t[1]=0,t[2]=0),e}function f(t,n,e){const r=n[0],a=n[1],s=n[2],i=n[3],o=e[0],c=e[1],u=e[2],h=e[3];return t[0]=r*h+i*o+a*u-s*c,t[1]=a*h+i*c+s*o-r*u,t[2]=s*h+i*u+r*c-a*o,t[3]=i*h-r*o-a*c-s*u,t}function l(t,n,e,r){const a=n[0],s=n[1],o=n[2],c=n[3];let u,h,f,l,d,M=e[0],m=e[1],v=e[2],_=e[3];return h=a*M+s*m+o*v+c*_,h<0&&(h=-h,M=-M,m=-m,v=-v,_=-_),1-h>(0,i.FD)()?(u=Math.acos(h),f=Math.sin(u),l=Math.sin((1-r)*u)/f,d=Math.sin(r*u)/f):(l=1-r,d=r),t[0]=l*a+d*M,t[1]=l*s+d*m,t[2]=l*o+d*v,t[3]=l*c+d*_,t}function d(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function M(t,n){const e=n[0]+n[4]+n[8];let r;if(e>0)r=Math.sqrt(e+1),t[3]=.5*r,r=.5/r,t[0]=(n[5]-n[7])*r,t[1]=(n[6]-n[2])*r,t[2]=(n[1]-n[3])*r;else{let e=0;n[4]>n[0]&&(e=1),n[8]>n[3*e+e]&&(e=2);const a=(e+1)%3,s=(e+2)%3;r=Math.sqrt(n[3*e+e]-n[3*a+a]-n[3*s+s]+1),t[e]=.5*r,r=.5/r,t[3]=(n[3*a+s]-n[3*s+a])*r,t[a]=(n[3*a+e]+n[3*e+a])*r,t[s]=(n[3*s+e]+n[3*e+s])*r}return t}function m(t,n,e,r){const a=.5*Math.PI/180;n*=a,e*=a,r*=a;const s=Math.sin(n),i=Math.cos(n),o=Math.sin(e),c=Math.cos(e),u=Math.sin(r),h=Math.cos(r);return t[0]=s*c*h-i*o*u,t[1]=i*o*h+s*c*u,t[2]=i*c*u-s*o*h,t[3]=i*c*h+s*o*u,t}const v=c.f,_=c.c,g=c.i,b=f,j=c.s,P=c.h,p=c.l,q=c.j,x=q,w=c.d,A=w,z=c.n,I=c.a,y=c.e,S=(0,s.vt)(),C=(0,s.fA)(1,0,0),N=(0,s.fA)(0,1,0),V=(0,a.vt)(),O=(0,a.vt)(),T=(0,r.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:g,calculateW:function(t,n){const e=n[0],r=n[1],a=n[2];return t[0]=e,t[1]=r,t[2]=a,t[3]=Math.sqrt(Math.abs(1-e*e-r*r-a*a)),t},conjugate:d,copy:v,dot:P,equals:y,exactEquals:I,fromEuler:m,fromMat3:M,getAxisAngle:h,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,n){const e=n[0],r=n[1],a=n[2],s=n[3],i=e*e+r*r+a*a+s*s,o=i?1/i:0;return t[0]=-e*o,t[1]=-r*o,t[2]=-a*o,t[3]=s*o,t},len:x,length:q,lerp:p,mul:b,multiply:f,normalize:z,random:function(t){const n=i.Ov,e=n(),r=n(),a=n(),s=Math.sqrt(1-e),o=Math.sqrt(e);return t[0]=s*Math.sin(2*Math.PI*r),t[1]=s*Math.cos(2*Math.PI*r),t[2]=o*Math.sin(2*Math.PI*a),t[3]=o*Math.cos(2*Math.PI*a),t},rotateX:function(t,n,e){e*=.5;const r=n[0],a=n[1],s=n[2],i=n[3],o=Math.sin(e),c=Math.cos(e);return t[0]=r*c+i*o,t[1]=a*c+s*o,t[2]=s*c-a*o,t[3]=i*c-r*o,t},rotateY:function(t,n,e){e*=.5;const r=n[0],a=n[1],s=n[2],i=n[3],o=Math.sin(e),c=Math.cos(e);return t[0]=r*c-s*o,t[1]=a*c+i*o,t[2]=s*c+r*o,t[3]=i*c-a*o,t},rotateZ:function(t,n,e){e*=.5;const r=n[0],a=n[1],s=n[2],i=n[3],o=Math.sin(e),c=Math.cos(e);return t[0]=r*c+a*o,t[1]=a*c-r*o,t[2]=s*c+i*o,t[3]=i*c-s*o,t},rotationTo:function(t,n,e){const r=(0,o.g)(n,e);return r<-.999999?((0,o.f)(S,C,n),(0,o.u)(S)<1e-6&&(0,o.f)(S,N,n),(0,o.n)(S,S),u(t,S,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.f)(S,n,e),t[0]=S[0],t[1]=S[1],t[2]=S[2],t[3]=1+r,z(t,t))},scale:j,set:_,setAxes:function(t,n,e,r){const a=T;return a[0]=e[0],a[3]=e[1],a[6]=e[2],a[1]=r[0],a[4]=r[1],a[7]=r[2],a[2]=-n[0],a[5]=-n[1],a[8]=-n[2],z(t,M(t,a))},setAxisAngle:u,slerp:l,sqlerp:function(t,n,e,r,a,s){return l(V,n,a,s),l(O,e,r,s),l(t,V,O,2*s*(1-s)),t},sqrLen:A,squaredLength:w,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},82534:(t,n,e)=>{function r(){return[0,0,0,1]}function a(t){return[t[0],t[1],t[2],t[3]]}e.d(n,{o8:()=>a,vt:()=>r,zK:()=>s});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:a,create:r,fromValues:function(t,n,e,r){return[t,n,e,r]}},Symbol.toStringTag,{value:"Module"}))},98764:(t,n,e)=>{e.d(n,{Y0:()=>u,lO:()=>h});var r=e(73941),a=e(16930),s=e(21325);const i=new a.A(r.fv),o=new a.A(r.FY),c=new a.A(r.LJ),u=new a.A(r.Ro);function h(t){const n=f.get(t);if(n)return n;let e=i;if(t)if(t===o)e=o;else if(t===c)e=c;else{const n=t.wkid,r=t.latestWkid;if(null!=n||null!=r)(0,s.tl)(n)||(0,s.tl)(r)?e=o:((0,s.ZL)(n)||(0,s.ZL)(r))&&(e=c);else{const n=t.wkt2??t.wkt;if(n){const t=n.toUpperCase();t===l?e=o:t===d&&(e=c)}}}return f.set(t,e),e}const f=new Map,l=o.wkt.toUpperCase(),d=c.wkt.toUpperCase()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9616],{4095:(t,e,n)=>{n.d(e,{CW:()=>u,DE:()=>c,S1:()=>x});var i=n(44208),r=n(53966),s=n(34727),o=n(74887),a=n(87811);n(5443),n(21325);const l=()=>r.A.getLogger("esri.views.2d.engine.flow.dataUtils"),h=10;async function u(t,e,n,r){const s=performance.now(),u=c(e,n),m=performance.now(),f=x(e,u,n.width,n.height),p=performance.now(),y=function(t){const e=new a.A,n=t.reduce((t,e)=>t+e.vertices.length,0),i=new Float32Array(4*n),r=new Array(t.length);let s=0,o=0;for(const{vertices:n}of t){const t=s;for(const t of n)i[4*s]=t.x,i[4*s+1]=t.y,i[4*s+2]=t.t,i[4*s+3]=t.speed,s++;r[o++]={startVertex:t,numberOfVertices:n.length,totalTime:n[n.length-1].t,timeSeed:e.getFloat()}}return{lineVertices:i,lineDescriptors:r}}(f),d=performance.now(),g="Streamlines"===t?function(t,e){const{lineVertices:n,lineDescriptors:i}=t;let r=0,s=0;for(const t of i)r+=2*t.numberOfVertices,s+=6*(t.numberOfVertices-1);const o=new Float32Array(9*r),a=new Uint32Array(s);let l=0,h=0;function u(){a[h++]=l-2,a[h++]=l,a[h++]=l-1,a[h++]=l,a[h++]=l+1,a[h++]=l-1}function c(t,e,n,i,r,s,a,h){const u=9*l;let c=0;o[u+c++]=t,o[u+c++]=e,o[u+c++]=1,o[u+c++]=n,o[u+c++]=s,o[u+c++]=a,o[u+c++]=i/2,o[u+c++]=r/2,o[u+c++]=h,l++,o[u+c++]=t,o[u+c++]=e,o[u+c++]=-1,o[u+c++]=n,o[u+c++]=s,o[u+c++]=a,o[u+c++]=-i/2,o[u+c++]=-r/2,o[u+c++]=h,l++}for(const t of i){const{totalTime:i,timeSeed:r}=t;let s=null,o=null,a=null,l=null,h=null,m=null;for(let f=0;f<t.numberOfVertices;f++){const x=n[4*(t.startVertex+f)],p=n[4*(t.startVertex+f)+1],y=n[4*(t.startVertex+f)+2],d=n[4*(t.startVertex+f)+3];let g=null,M=null,w=null,v=null;if(f>0){g=x-s,M=p-o;const t=Math.sqrt(g*g+M*M);if(g/=t,M/=t,f>1){let t=g+h,n=M+m;const i=Math.sqrt(t*t+n*n);t/=i,n/=i;const r=Math.min(1/(t*g+n*M),e);t*=r,n*=r,w=-n,v=t}else w=-M,v=g;null!==w&&null!==v&&(c(s,o,a,w,v,i,r,d),u())}s=x,o=p,a=y,h=g,m=M,l=d}c(s,o,a,-m,h,i,r,l)}return{vertexData:o,indexData:a}}(y,h):function(t){const{lineVertices:e,lineDescriptors:n}=t;let i=0,r=0;for(const t of n){const e=t.numberOfVertices-1;i+=4*e*2,r+=6*e*2}const s=new Float32Array(16*i),o=new Uint32Array(r);let a,l,h,u,c,m,f,x,p,y,d,g,M,w,v=0,z=0;function b(){o[z++]=v-8,o[z++]=v-7,o[z++]=v-6,o[z++]=v-7,o[z++]=v-5,o[z++]=v-6,o[z++]=v-4,o[z++]=v-3,o[z++]=v-2,o[z++]=v-3,o[z++]=v-1,o[z++]=v-2}function C(t,e,n,i,r,o,a,l,h,u,c,m,f,x){const p=16*v;let y=0;for(const d of[1,2])for(const g of[1,2,3,4])s[p+y++]=t,s[p+y++]=e,s[p+y++]=n,s[p+y++]=i,s[p+y++]=a,s[p+y++]=l,s[p+y++]=h,s[p+y++]=u,s[p+y++]=d,s[p+y++]=g,s[p+y++]=f,s[p+y++]=x,s[p+y++]=r/2,s[p+y++]=o/2,s[p+y++]=c/2,s[p+y++]=m/2,v++}function A(t,e){let n=p+d,i=y+g;const r=Math.sqrt(n*n+i*i);n/=r,i/=r;const s=p*n+y*i;n/=s,i/=s;let o=d+M,v=g+w;const z=Math.sqrt(o*o+v*v);o/=z,v/=z;const A=d*o+g*v;o/=A,v/=A,C(a,l,h,u,-i,n,c,m,f,x,-v,o,t,e),b()}function R(t,e,n,i,r,s){if(p=d,y=g,d=M,g=w,null==p&&null==y&&(p=d,y=g),null!=c&&null!=m){M=t-c,w=e-m;const n=Math.sqrt(M*M+w*w);M/=n,w/=n}null!=p&&null!=y&&A(r,s),a=c,l=m,h=f,u=x,c=t,m=e,f=n,x=i}function Z(t,e){p=d,y=g,d=M,g=w,null==p&&null==y&&(p=d,y=g),null!=p&&null!=y&&A(t,e)}for(const t of n){a=null,l=null,h=null,u=null,c=null,m=null,f=null,x=null,p=null,y=null,d=null,g=null,M=null,w=null;const{totalTime:n,timeSeed:i}=t;for(let r=0;r<t.numberOfVertices;r++)R(e[4*(t.startVertex+r)],e[4*(t.startVertex+r)+1],e[4*(t.startVertex+r)+2],e[4*(t.startVertex+r)+3],n,i);Z(n,i)}return{vertexData:s,indexData:o}}(y),M=performance.now();return(0,i.A)("esri-2d-profiler")&&(l().info("I.1","_createFlowFieldFromData (ms)",Math.round(m-s)),l().info("I.2","_getStreamlines (ms)",Math.round(p-m)),l().info("I.3","createAnimatedLinesData (ms)",Math.round(d-p)),l().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(M-d)),l().info("I.5","createFlowMesh (ms)",Math.round(M-s)),l().info("I.6","Mesh size (bytes)",g.vertexData.buffer.byteLength+g.indexData.buffer.byteLength)),await Promise.resolve(),(0,o.Te)(r),g}function c(t,e){const n=function(t,e,n,i){if(0===i)return t;const r=Math.round(3*i),s=new Array(2*r+1);let o=0;for(let t=-r;t<=r;t++){const e=Math.exp(-t*t/(i*i));s[t+r]=e,o+=e}for(let t=-r;t<=r;t++)s[t+r]/=o;const a=new Float32Array(t.length);for(let i=0;i<n;i++)for(let n=0;n<e;n++){let o=0,l=0;for(let a=-r;a<=r;a++){if(n+a<0||n+a>=e)continue;const h=s[a+r];o+=h*t[2*(i*e+(n+a))],l+=h*t[2*(i*e+(n+a))+1]}a[2*(i*e+n)]=o,a[2*(i*e+n)+1]=l}const l=new Float32Array(t.length);for(let t=0;t<e;t++)for(let i=0;i<n;i++){let o=0,h=0;for(let l=-r;l<=r;l++){if(i+l<0||i+l>=n)continue;const u=s[l+r];o+=u*a[2*((i+l)*e+t)],h+=u*a[2*((i+l)*e+t)+1]}l[2*(i*e+t)]=o,l[2*(i*e+t)+1]=h}return l}(e.data,e.width,e.height,t.smoothing);return t.interpolate?(t,i)=>{const r=Math.floor(t),s=Math.floor(i);if(r<0||r>=e.width)return[0,0];if(s<0||s>=e.height)return[0,0];const o=t-r,a=i-s,l=r,h=s,u=r<e.width-1?r+1:r,c=s<e.height-1?s+1:s,m=n[2*(h*e.width+l)],f=n[2*(h*e.width+u)],x=n[2*(c*e.width+l)],p=n[2*(c*e.width+u)],y=n[2*(h*e.width+l)+1],d=n[2*(h*e.width+u)+1];return[(m*(1-a)+x*a)*(1-o)+(f*(1-a)+p*a)*o,(y*(1-a)+n[2*(c*e.width+l)+1]*a)*(1-o)+(d*(1-a)+n[2*(c*e.width+u)+1]*a)*o]}:(t,i)=>{const r=Math.round(t),s=Math.round(i);return r<0||r>=e.width||s<0||s>=e.height?[0,0]:[n[2*(s*e.width+r)],n[2*(s*e.width+r)+1]]}}function m(t,e,n,i,r,o,a,l){const h=[],{raster:u,width:c,height:m,resolutionFactor:f}=l;let x=i,p=r,y=0,[d,g]=n(x,p);d*=e.velocityScale,g*=e.velocityScale;const M=Math.sqrt(d*d+g*g);let w,v;h.push({x,y:p,t:y,speed:M});for(let i=0;i<e.verticesPerLine;i++){let[i,r]=n(x,p);i*=e.velocityScale,r*=e.velocityScale;const l=Math.sqrt(i*i+r*r);if(l<e.minSpeedThreshold)return h;const d=t*i/l,g=t*r/l;if(x+=d*e.segmentLength,p+=g*e.segmentLength,e.wrapAround&&(x=(0,s.OS)(x,o[0])),y+=t*e.segmentLength/l,Math.acos(d*w+g*v)>e.maxTurnAngle)return h;if(e.collisions){let t=Math.round(x*f);const n=Math.round(p*f);if(e.wrapAround&&(t=(0,s.OS)(t,c)),t<0||t>c-1||n<0||n>m-1)return h;const i=u[n*c+t];if(-1!==i&&i!==a)return h;u[n*c+t]=a}h.push({x,y:p,t:y,speed:l}),w=d,v=g}return h}function f(t,e,n,i,r,s,o,a){const l=Math.round((.2+.6*o.getFloat())*t.verticesPerLine),h=t.verticesPerLine-l,u=m(-1,{...t,verticesPerLine:h},e,n,i,r,s,a),c=m(1,{...t,verticesPerLine:l},e,n,i,r,s,a),f=u.reverse();return f.splice(-1,1),f.concat(c)}function x(t,e,n,i,r={positions:[]}){if(t.density<=0)return[];const{positions:s}=r,o=[],l=new a.A,h=1/Math.max(t.lineCollisionWidth,1),u=Math.round(n*h),c=Math.round(i*h),x=new Int32Array(u*c);for(let t=0;t<x.length;t++)x[t]=-1;const p={raster:x,width:u,height:c,resolutionFactor:h},y={},d=t.lineSpacing/Math.sqrt(t.density),g=Math.floor(i/d),M=Math.floor(n/d);for(let t=0;t<g;t++){const e=t*d;for(let n=0;n<M;n++){const i=n*d;y[`${n}-${t}`]={x:i,y:e,positions:[]}}}for(const{x:t,y:e}of s){const n=y[`${Math.floor(t/d)}-${Math.floor(e/d)}`];n&&n.positions.push([t,e])}const w=[];for(const t in y){const e=y[t];if(0===e.positions.length)w.push({x:e.x+d/2,y:e.y+d/2,sort:.66+.33*l.getFloat(),stage:0});else{const[t]=e.positions.splice(0,1);w.push({x:t[0],y:t[1],sort:.33*l.getFloat(),stage:1});for(const[t,n]of e.positions)w.push({x:t,y:n,sort:.33+.33*l.getFloat(),stage:2})}}w.sort((t,e)=>t.sort-e.sort);for(const{x:r,y:s,stage:a}of w){const h=t.onlyForwardTracing?m(1,t,e,r,s,[n,i],o.length,p):f(t,e,r,s,[n,i],o.length,l,p);h.length<2||o.push({stage:a,vertices:h})}return o}},5443:(t,e,n)=>{n.d(e,{A:()=>p});var i,r=n(31635),s=n(799),o=n(91429),a=n(91075),l=n(86738),h=n(16930),u=n(94078),c=n(12176),m=n(21325),f=n(28735);function x(t,e,n){return null==e?n:null==n?e:t(e,n)}let p=i=class extends a.A{constructor(...t){super(...t),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(t,e,n,i,r){return function(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}(t)?{spatialReference:t,xmin:0,ymin:0,xmax:0,ymax:0}:"object"==typeof t?(t.spatialReference=null==t.spatialReference?h.A.WGS84:t.spatialReference,t):{xmin:t,ymin:e,xmax:n,ymax:i,spatialReference:r??h.A.WGS84}}static fromPoint(t){return new i({xmin:t.x,ymin:t.y,zmin:t.z,xmax:t.x,ymax:t.y,zmax:t.z,spatialReference:t.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const t=new l.A({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(t.z=.5*(this.zmin+this.zmax)),this.hasM&&(t.m=.5*(this.mmin+this.mmax)),t}get extent(){return this.clone()}get hasM(){return null!=this.mmin&&null!=this.mmax}get hasZ(){return null!=this.zmin&&null!=this.zmax}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(t){const e=this.center;return null!=t.z&&this.hasZ?this.offset(t.x-e.x,t.y-e.y,t.z-e.z):this.offset(t.x-e.x,t.y-e.y)}clone(){const t=new i;return t.xmin=this.xmin,t.ymin=this.ymin,t.xmax=this.xmax,t.ymax=this.ymax,t.spatialReference=this.spatialReference,null!=this.zmin&&(t.zmin=this.zmin,t.zmax=this.zmax),null!=this.mmin&&(t.mmin=this.mmin,t.mmax=this.mmax),t}contains(t){if(!t)return!1;const e=this.spatialReference,n=t.spatialReference;return e&&n&&!e.equals(n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),"point"===t.type?(0,u.qz)(this,t):"extent"===t.type&&(0,u.gH)(this,t)}equals(t){if(this===t)return!0;if(null==t)return!1;const e=this.spatialReference,n=t.spatialReference;return e&&n&&!e.equals(n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),this.xmin===t.xmin&&this.ymin===t.ymin&&this.zmin===t.zmin&&this.mmin===t.mmin&&this.xmax===t.xmax&&this.ymax===t.ymax&&this.zmax===t.zmax&&this.mmax===t.mmax}expand(t){const e=.5*(1-t),n=this.width*e,i=this.height*e;if(this.xmin+=n,this.ymin+=i,this.xmax-=n,this.ymax-=i,this.hasZ){const t=(this.zmax-this.zmin)*e;this.zmin+=t,this.zmax-=t}if(this.hasM){const t=(this.mmax-this.mmin)*e;this.mmin+=t,this.mmax-=t}return this}intersects(t){if(null==t)return!1;"mesh"===t.type&&(t=t.extent);const e=this.spatialReference,n=t.spatialReference;return e&&n&&!(0,m.aI)(e,n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),(0,c.xK)(t.type)(this,t)}normalize(){const t=this._normalize(!1,!0);return Array.isArray(t)?t:[t]}offset(t,e,n){return this.xmin+=t,this.ymin+=e,this.xmax+=t,this.ymax+=e,null!=n&&(this.zmin+=n,this.zmax+=n),this}shiftCentralMeridian(){return this._normalize(!0)}union(t){return this===t||(this.xmin=Math.min(this.xmin,t.xmin),this.ymin=Math.min(this.ymin,t.ymin),this.xmax=Math.max(this.xmax,t.xmax),this.ymax=Math.max(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=x(Math.min,this.zmin,t.zmin),this.zmax=x(Math.max,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=x(Math.min,this.mmin,t.mmin),this.mmax=x(Math.max,this.mmax,t.mmax))),this}intersection(t){return this===t?this:null!=t&&this.intersects(t)?(this.xmin=Math.max(this.xmin,t.xmin),this.ymin=Math.max(this.ymin,t.ymin),this.xmax=Math.min(this.xmax,t.xmax),this.ymax=Math.min(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=x(Math.max,this.zmin,t.zmin),this.zmax=x(Math.min,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=x(Math.max,this.mmin,t.mmin),this.mmax=x(Math.min,this.mmax,t.mmax)),this):null}toJSON(t){return this.write({},t)}_shiftCM(t=(0,m.Vp)(this.spatialReference)){if(!t||!this.spatialReference)return this;const e=this.spatialReference,n=this._getCM(t);if(n){const i=e.isWebMercator?(0,f.ci)(n):n;this.xmin-=n.x,this.xmax-=n.x,e.isWebMercator||(i.x=y(i.x,t).x),this.spatialReference=new h.A((0,s.HC)((e.isWGS84?t.altTemplate:null)??t.wkTemplate,{Central_Meridian:i.x}))}return this}_getCM(t){let e=null;const[n,i]=t.valid,r=this.xmin,s=this.xmax;return r>=n&&r<=i&&s>=n&&s<=i||(e=this.center),e}_normalize(t,e,n){const i=this.spatialReference;if(!i)return this;const r=n??(0,m.Vp)(i);if(null==r)return this;const s=this._getParts(r).map(t=>t.extent);if(s.length<2)return s[0]||this;if(s.length>2)return t?this._shiftCM(r):this.set({xmin:r.valid[0],xmax:r.valid[1]});if(t)return this._shiftCM(r);if(e)return s;let o=!0,a=!0;return s.forEach(t=>{t.hasZ||(o=!1),t.hasM||(a=!1)}),{rings:s.map(t=>{const e=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(o){const n=(t.zmax-t.zmin)/2;for(let t=0;t<e.length;t++)e[t].push(n)}if(a){const n=(t.mmax-t.mmin)/2;for(let t=0;t<e.length;t++)e[t].push(n)}return e}),hasZ:o,hasM:a,spatialReference:i}}_getParts(t){let e=this.cache._parts;if(!e){e=[];const{ymin:n,ymax:r,spatialReference:s}=this,o=this.width,a=this.xmin,l=this.xmax;let h;t=t||(0,m.Vp)(s);const[u,c]=t.valid;h=y(this.xmin,t);const f=h.x,x=h.frameId;h=y(this.xmax,t);const p=h.x,d=h.frameId,g=f===p&&o>0;if(o>2*c){const t=new i(a<l?f:p,n,c,r,s),o=new i(u,n,a<l?p:f,r,s),h=new i(0,n,c,r,s),m=new i(u,n,0,r,s),y=[],g=[];t.contains(h)&&y.push(x),t.contains(m)&&g.push(x),o.contains(h)&&y.push(d),o.contains(m)&&g.push(d);for(let t=x+1;t<d;t++)y.push(t),g.push(t);e.push({extent:t,frameIds:[x]},{extent:o,frameIds:[d]},{extent:h,frameIds:y},{extent:m,frameIds:g})}else f>p||g?e.push({extent:new i(f,n,c,r,s),frameIds:[x]},{extent:new i(u,n,p,r,s),frameIds:[d]}):e.push({extent:new i(f,n,p,r,s),frameIds:[x]});this.cache._parts=e}const n=this.hasZ,r=this.hasM;if(n||r){const t={};n&&(t.zmin=this.zmin,t.zmax=this.zmax),r&&(t.mmin=this.mmin,t.mmax=this.mmax);for(let n=0;n<e.length;n++)e[n].extent.set(t)}return e}};function y(t,e){const[n,i]=e.valid,r=2*i;let s,o=0;return t>i?(s=Math.ceil(Math.abs(t-i)/r),t-=s*r,o=s):t<n&&(s=Math.ceil(Math.abs(t-n)/r),t+=s*r,o=-s),{x:t,frameId:o}}(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"center",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],p.prototype,"hasM",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],p.prototype,"hasZ",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"height",null),(0,r.Cg)([(0,o.MZ)({type:h.A,json:{write:!0},value:h.A.WGS84})],p.prototype,"spatialReference",void 0),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"width",null),(0,r.Cg)([(0,o.MZ)({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],p.prototype,"xmin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],p.prototype,"ymin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],p.prototype,"mmin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],p.prototype,"zmin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],p.prototype,"xmax",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],p.prototype,"ymax",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],p.prototype,"mmax",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],p.prototype,"zmax",void 0),p=i=(0,r.Cg)([(0,o.$K)("esri.geometry.Extent")],p),p.prototype.toJSON.isDefaultToJSON=!0},12176:(t,e,n)=>{n.d(e,{A3:()=>y,Ql:()=>g,fA:()=>f,xB:()=>s,xK:()=>M});var i=n(94078);function r(t,e){return(0,i.qz)(t,e)}function s(t,e){const n=t.hasZ&&e.hasZ;let i,r,s;if(t.xmin<=e.xmin){if(i=e.xmin,t.xmax<i)return!1}else if(i=t.xmin,e.xmax<i)return!1;if(t.ymin<=e.ymin){if(r=e.ymin,t.ymax<r)return!1}else if(r=t.ymin,e.ymax<r)return!1;if(n&&e.hasZ)if(t.zmin<=e.zmin){if(s=e.zmin,t.zmax<s)return!1}else if(s=t.zmin,e.zmax<s)return!1;return!0}function o(t,e){const{points:n,hasZ:r}=e,s=r?i.F8:i.CW;for(const e of n)if(s(t,e))return!0;return!1}const a=[0,0],l=[0,0],h=[0,0],u=[0,0],c=[a,l,h,u],m=[[h,a],[a,l],[l,u],[u,h]];function f(t,e){return function(t,e){a[0]=t.xmin,a[1]=t.ymax,l[0]=t.xmax,l[1]=t.ymax,h[0]=t.xmin,h[1]=t.ymin,u[0]=t.xmax,u[1]=t.ymin;for(const t of c)if((0,i.t1)(e,t))return!0;for(const n of e){if(!n.length)continue;let e=n[0];if((0,i.CW)(t,e))return!0;for(let r=1;r<n.length;r++){const s=n[r];if((0,i.CW)(t,s)||d(e,s,m))return!0;e=s}}return!1}(t,e.rings)}function x(t,e){a[0]=t.xmin,a[1]=t.ymax,l[0]=t.xmax,l[1]=t.ymax,h[0]=t.xmin,h[1]=t.ymin,u[0]=t.xmax,u[1]=t.ymin;const n=e.paths;for(const e of n){if(!n.length)continue;let r=e[0];if((0,i.CW)(t,r))return!0;for(let n=1;n<e.length;n++){const s=e[n];if((0,i.CW)(t,s)||d(r,s,m))return!0;r=s}}return!1}const p=[0,0];function y(t){for(let e=0;e<t.length;e++){const n=t[e];for(let i=0;i<n.length-1;i++){const r=n[i],s=n[i+1];for(let n=e+1;n<t.length;n++)for(let e=0;e<t[n].length-1;e++){const i=t[n][e],o=t[n][e+1];if(g(r,s,i,o,p)&&!(p[0]===r[0]&&p[1]===r[1]||p[0]===i[0]&&p[1]===i[1]||p[0]===s[0]&&p[1]===s[1]||p[0]===o[0]&&p[1]===o[1]))return!0}}const i=n.length;if(!(i<=4))for(let t=0;t<i-3;t++){let e=i-1;0===t&&(e=i-2);const r=n[t],s=n[t+1];for(let i=t+2;i<e;i++){const t=n[i],e=n[i+1];if(g(r,s,t,e,p)&&!(p[0]===r[0]&&p[1]===r[1]||p[0]===t[0]&&p[1]===t[1]||p[0]===s[0]&&p[1]===s[1]||p[0]===e[0]&&p[1]===e[1]))return!0}}}return!1}function d(t,e,n){for(let i=0;i<n.length;i++)if(g(t,e,n[i][0],n[i][1]))return!0;return!1}function g(t,e,n,i,r){const[s,o]=t,[a,l]=e,[h,u]=n,[c,m]=i,f=c-h,x=s-h,p=a-s,y=m-u,d=o-u,g=l-o,M=y*p-f*g;if(0===M)return!1;const w=(f*d-y*x)/M,v=(p*d-g*x)/M;return w>=0&&w<=1&&v>=0&&v<=1&&(r&&(r[0]=s+w*(a-s),r[1]=o+w*(l-o)),!0)}function M(t){switch(t){case"esriGeometryEnvelope":case"extent":return s;case"esriGeometryMultipoint":case"multipoint":return o;case"esriGeometryPoint":case"point":return r;case"esriGeometryMultiPatch":case"multipatch":case"esriGeometryPolygon":case"polygon":return f;case"esriGeometryPolyline":case"polyline":return x}}},19419:(t,e,n)=>{n.d(e,{$9:()=>v,HY:()=>w,IO:()=>c,Ie:()=>b,Rj:()=>M,VL:()=>x,VY:()=>a,Wc:()=>y,aI:()=>A,bx:()=>m,fA:()=>o,fT:()=>f,gR:()=>z,gX:()=>d,ib:()=>g,nw:()=>u,qv:()=>R,tK:()=>h,uJ:()=>p,vt:()=>r,w1:()=>l}),n(44208),n(34727);var i=n(5443);function r(t=Z){return[t[0],t[1],t[2],t[3]]}function s(t,e){return t!==e&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]),t}function o(t,e,n,i,s=r()){return s[0]=t,s[1]=e,s[2]=n,s[3]=i,s}function a(t,e=r()){return e[0]=t.xmin,e[1]=t.ymin,e[2]=t.xmax,e[3]=t.ymax,e}function l(t,e,n=new i.A){return n.xmin=t[0],n.ymin=t[1],n.xmax=t[2],n.ymax=t[3],n.spatialReference=e,n}function h(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function u(t,e){e<t[0]&&(t[0]=e),e>t[2]&&(t[2]=e)}function c(t,e){e<t[1]&&(t[1]=e),e>t[3]&&(t[3]=e)}function m(t,{xmin:e,ymin:n,xmax:i,ymax:r}){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],i),t[3]=Math.max(t[3],r)}function f(t,e,n){if(null!=e)if("length"in e)C(e)?(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[2]),n[3]=Math.max(t[3],e[3])):2!==e.length&&3!==e.length||(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[0]),n[3]=Math.max(t[3],e[1]));else switch(e.type){case"extent":n[0]=Math.min(t[0],e.xmin),n[1]=Math.min(t[1],e.ymin),n[2]=Math.max(t[2],e.xmax),n[3]=Math.max(t[3],e.ymax);break;case"point":n[0]=Math.min(t[0],e.x),n[1]=Math.min(t[1],e.y),n[2]=Math.max(t[2],e.x),n[3]=Math.max(t[3],e.y)}else s(n,t)}function x(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}function p(t){return null==t||t[1]>=t[3]?0:t[3]-t[1]}function y(t){return x(t)*p(t)}function d(t,e=[0,0]){return e[0]=(t[0]+t[2])/2,e[1]=(t[1]+t[3])/2,e}function g(t){const e=x(t),n=p(t);return Math.sqrt(e*e+n*n)}function M(t,e,n){return e>=t[0]&&n>=t[1]&&e<=t[2]&&n<=t[3]}function w(t,e){return Math.max(e[0],t[0])<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])<=Math.min(e[3],t[3])}function v(t,e,n){return Math.max(e[0],t[0])-n<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])-n<=Math.min(e[3],t[3])}function z(t,e){return e[0]>=t[0]&&e[2]<=t[2]&&e[1]>=t[1]&&e[3]<=t[3]}function b(t){return t?s(t,R):r(R)}function C(t){return null!=t&&4===t.length}function A(t,e){return C(t)&&C(e)?t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]:t===e}const R=[1/0,1/0,-1/0,-1/0],Z=[0,0,0,0]},21276:(t,e,n)=>{n.d(e,{H:()=>s,f:()=>r});var i=n(49186);function r(t){if(t&&"object"==typeof t&&"type"in t&&"mesh"===t.type)throw new i.A("internal:mesh","Mesh geometries are not supported for this operation")}function s(t){t.forEach(r)}},28735:(t,e,n)=>{n.d(e,{Cv:()=>d,Gh:()=>w,ci:()=>v,je:()=>g,jg:()=>m,tD:()=>M,y7:()=>y});var i=n(4718),r=n(21276),s=n(16930),o=n(79258),a=n(21325);const l=57.29577951308232,h=.017453292519943;function u(t){return t*l}function c(t){return t*h}function m(t){return Math.PI/2-2*Math.atan(Math.exp(-t/o.$O.radius))}function f(t){return null!=t.wkid||null!=t.wkt}const x=[0,0];function p(t,e,n,i,r){const s=t,o=r;if(o.spatialReference=n,"x"in s&&"x"in o)[o.x,o.y]=e(s.x,s.y,x,i);else if("xmin"in s&&"xmin"in o)[o.xmin,o.ymin]=e(s.xmin,s.ymin,x,i),[o.xmax,o.ymax]=e(s.xmax,s.ymax,x,i);else if("paths"in s&&"paths"in o||"rings"in s&&"rings"in o){const t="paths"in s?s.paths:s.rings,n=[];let r;for(let s=0;s<t.length;s++){const o=t[s];r=[],n.push(r);for(let t=0;t<o.length;t++)r.push(e(o[t][0],o[t][1],[0,0],i)),o[t].length>2&&r[t].push(o[t][2]),o[t].length>3&&r[t].push(o[t][3])}"paths"in o?o.paths=n:o.rings=n}else if("points"in s&&"points"in o){const t=s.points,n=[];for(let r=0;r<t.length;r++)n[r]=e(t[r][0],t[r][1],[0,0],i),t[r].length>2&&n[r].push(t[r][2]),t[r].length>3&&n[r].push(t[r][3]);o.points=n}return r}function y(t,e){const n=t&&(f(t)?t:t.spatialReference),i=e&&(f(e)?e:e.spatialReference);return!(t&&"type"in t&&"mesh"===t.type||e&&"type"in e&&"mesh"===e.type||!n||!i)&&(!!(0,a.aI)(i,n)||(0,a.K8)(i)&&(0,a.oT)(n)||(0,a.K8)(n)&&(0,a.oT)(i))}function d(t,e){if(null==t)return null;const n=t.spatialReference,r=e&&(f(e)?e:e.spatialReference);return y(n,r)?(0,a.aI)(n,r)?(0,i.o8)(t):(0,a.K8)(r)?p(t,g,s.A.WebMercator,!1,(0,i.o8)(t)):(0,a.oT)(r)?p(t,M,s.A.WGS84,!1,(0,i.o8)(t)):null:null}function g(t,e,n=[0,0]){e>89.99999?e=89.99999:e<-89.99999&&(e=-89.99999);const i=c(e);return n[0]=c(t)*o.$O.radius,n[1]=o.$O.halfSemiMajorAxis*Math.log((1+Math.sin(i))/(1-Math.sin(i))),n}function M(t,e,n=[0,0],i=!1){if(t===a.Mc[0])n[0]=-180;else if(t===a.Mc[1])n[0]=180;else{const e=u(t/o.$O.radius);n[0]=i?e:e-360*Math.floor((e+180)/360)}return n[1]=u(Math.PI/2-2*Math.atan(Math.exp(-e/o.$O.radius))),n}function w(t,e=!1,n=(0,i.o8)(t)){return(0,r.f)(t),(0,r.f)(n),p(t,g,s.A.WebMercator,e,n)}function v(t,e=!1,n=(0,i.o8)(t)){return(0,r.f)(t),(0,r.f)(n),p(t,M,s.A.WGS84,e,n)}},31635:(t,e,n)=>{function i(t,e,n,i){var r,s=arguments.length,o=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,n,o):r(e,n))||o);return s>3&&o&&Object.defineProperty(e,n,o),o}function r(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var i,r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=e[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=e[Symbol.dispose],n&&(r=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");r&&(i=function(){try{r.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:i,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>i,hk:()=>o,mS:()=>r}),Object.create,Object.create;var s="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var i=new Error(n);return i.name="SuppressedError",i.error=t,i.suppressed=e,i};function o(t){function e(e){t.error=t.hasError?new s(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,i=0;return function r(){for(;n=t.stack.pop();)try{if(!n.async&&1===i)return i=0,t.stack.push(n),Promise.resolve().then(r);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return i|=2,Promise.resolve(s).then(r,function(t){return e(t),r()})}else i|=1}catch(t){e(t)}if(1===i)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},49616:(t,e,n)=>{n.r(e),n.d(e,{default:()=>h});var i=n(31635),r=n(91429),s=n(4095),o=n(19419),a=n(69052);n(21325);let l=class{constructor(){this._tileData=new Map}async generateStreamlines(t){const{flowData:e,flowExtentInfo:n,needsMagnitude:i,simulationSettings:r,startPositions:o}=t,a=u((0,s.DE)(r,e),r,n.modelSize,i,o);return{result:{streamlines:a},transferList:a?.map(t=>t.vertices.buffer)}}async generateTiledStreamlines(t){const{flowDataTiles:e,flowExtentInfo:n,needsMagnitude:i,reset:r,simulationSettings:l,startPositions:h}=t;this._updateTileData(e,r);const c=u(function(t,e,n){const[i,r]=n.modelSize;let l=null;const h=new Map;e.forEach(e=>{h.set(e.lij,(0,s.DE)(t,e))});const u=(t,e,n)=>(0,o.Rj)(t.extent,e,n);return(s,c)=>{const m=Math.round(s),f=Math.round(c);if(!t.wrapAround&&(m<0||m>=i||f<0||f>=r))return[0,0];const[x,p]=function(t,e,n,i){const{extent:r,modelSize:s,valid:l}=t,[h,u,c]=r,m=function(t,e,n){if(null!=n&&t>e){const[i,r]=n;return r-t+(e-i)}return e-t}(h,c,l);let f=e/s[0]*m+h;return null!=l&&i&&(f=new a.hr(l[0],l[1]).normalize(f)),[f,(s[1]-n)/s[1]*(0,o.uJ)(r)+u]}(n,s,c,!0);if(!function(t,e,n){const{extent:i,valid:r}=t,[s,o,a,l]=i;return!(n<o||n>l)&&(null!=r&&s>a?e>=a||e<=s:e>=s&&e<=a)}(n,x,p))return[0,0];if(null==l||!u(l,x,p)){l=null;for(const[t,n]of e)if(u(n,x,p)){l=n;break}}if(null==l?.data)return[0,0];const y=h.get(l.lij);if(null==y)return[0,0];const{width:d,height:g,extent:M}=l;return y((x-M[0])/(0,o.VL)(M)*d,g-(p-M[1])/(0,o.uJ)(M)*g)}}(l,this._tileData,n),l,n.modelSize,i,h);return{result:{streamlines:c},transferList:c?.map(t=>t.vertices.buffer)??[]}}_updateTileData(t,e){if(e)for(const e of this._tileData.keys())t.has(e)||this._tileData.delete(e);t.forEach((t,e)=>{"delete"===t.type?this._tileData.delete(e):"on-worker"!==t.type&&"invalid"!==t.type&&this._tileData.set(e,t.data)})}};l=(0,i.Cg)([(0,r.$K)("esri.views.3d.support.flow.FlowWorker")],l);const h=l;function u(t,e,n,i,r){if(null==t)return;const o=(0,s.S1)(e,t,n[0],n[1],{positions:r}),a=[],l=function(t){return t?4:3}(i);for(const{vertices:t,stage:e}of o){const n=new Float32Array(t.length*l);for(let e=0;e<t.length;e++)n[e*l]=t[e].x,n[e*l+1]=t[e].y,n[e*l+2]=t[e].t,i&&(n[e*l+3]=t[e].speed);a.push({vertices:n,stage:e,hasMagnitude:i})}return a}},69052:(t,e,n)=>{n.d(e,{hr:()=>r,ie:()=>l,uC:()=>a});var i=n(34727);class r{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,n=!1){return s(this.range,this.min,this.max,t,e,n)}clamp(t,e=0){return(0,i.qE)(t-e,this.min,this.max)+e}monotonic(t,e,n){return t<e?e:e+o(this.range,t-e,n)}minimalMonotonic(t,e,n){return s(this.range,t,t+this.range,e,n)}center(t,e,n){return e=this.monotonic(t,e,n),this.normalize((t+e)/2,n)}diff(t,e,n){return this.monotonic(t,e,n)-t}shortestSignedDiff(t,e){t=this.normalize(t);const n=(e=this.normalize(e))-t,i=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(n)<Math.abs(i)?n:i}contains(t,e,n){return e=this.minimalMonotonic(t,e),(n=this.minimalMonotonic(t,n))>t&&n<e}}function s(t,e,n,i,r=0,s=!1){return(i-=r)<e?i+=o(t,e-i):i>n&&(i-=o(t,i-n)),s&&i===n&&(i=e),i+r}function o(t,e,n=0){return Math.ceil((e-n)/t)*t+n}const a=new r(0,2*Math.PI),l=(new r(-Math.PI,Math.PI),new r(0,360))},86738:(t,e,n)=>{n.d(e,{A:()=>M});var i=n(31635),r=n(69622),s=n(53966),o=n(91429),a=n(56507),l=n(91075),h=n(16930),u=n(21325),c=n(28735);function m({x:t,y:e,spatialReference:n},i=[0,0]){if(n){if((0,u.K8)(n))return(0,c.tD)(t,e,i);if((0,u.EA)(n))return i[0]=t,i[1]=e,i}return null}const f=[0,0];var x,p=n(43937),y=n(36005);const d=[0,0];function g(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}let M=x=class extends l.A{static copy(t,e){e._set("x",t._get("x")),e._set("y",t._get("y")),e._set("z",t._get("z")),e._set("m",t._get("m"));const n=t._get("spatialReference");e._set("spatialReference",r.A.isFrozen(n)?n:n.clone())}constructor(...t){super(...t),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(t,e,n,i,r){let o;if(Array.isArray(t))o=t,r=e,t=o[0],e=o[1],n=o[2],i=o[3];else if(t&&"object"==typeof t){if(o=t,t=null!=o.x?o.x:o.longitude,e=null!=o.y?o.y:o.latitude,n=o.z,i=o.m,(r=o.spatialReference)&&"esri.geometry.SpatialReference"!==r.declaredClass&&(r=new h.A(r)),null!=o.longitude||null!=o.latitude)if(null==o.longitude)s.A.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==o.latitude)s.A.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!o.declaredClass&&r?.isWebMercator){const n=(0,c.je)(o.longitude,o.latitude,d);t=n[0],e=n[1]}}else g(n)?(r=n,n=null):g(i)&&(r=i,i=null);const a={x:t,y:e};return null==a.x&&null!=a.y?s.A.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==a.y&&null!=a.x&&s.A.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=r&&(a.spatialReference=r),null!=n&&(a.z=n),null!=i&&(a.m=i),a}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(t){t!==(void 0!==this._get("m"))&&(this._set("m",t?0:void 0),this._set("hasM",t))}get hasZ(){return void 0!==this.z}set hasZ(t){t!==(void 0!==this._get("z"))&&(this._set("z",t?0:void 0),this._set("hasZ",t))}get latitude(){return t=this,m(t,f)?.[1]??null;var t}set latitude(t){const{spatialReference:e,x:n}=this;null!=t&&e&&(e.isWebMercator?this._set("y",(0,c.je)(n,t,d)[1]):e.isGeographic&&this._set("y",t),this._set("latitude",t))}get longitude(){return t=this,m(t,f)?.[0]??null;var t}set longitude(t){const{y:e,spatialReference:n}=this;null!=t&&n&&(n.isWebMercator?this._set("x",(0,c.je)(t,e,d)[0]):n.isGeographic&&this._set("x",t),this._set("longitude",t))}writeX(t,e,n){e[n]=isNaN(t)?"NaN":t}readX(t){return"string"==typeof t?NaN:t}clone(){const t=new x;return t.x=this.x,t.y=this.y,t.z=this.z,t.m=this.m,t.spatialReference=this.spatialReference,t}copy(t){return x.copy(t,this),this}equals(t){if(null==t)return!1;const{x:e,y:n,z:i,m:r,spatialReference:s}=this,{z:o,m:a}=t;let{x:l,y:h,spatialReference:u}=t;if(!s.equals(u))if(s.isWebMercator&&u.isWGS84)[l,h]=(0,c.je)(l,h),u=s;else{if(!s.isWGS84||!u.isWebMercator)return!1;[l,h]=(0,c.tD)(l,h),u=s}return e===l&&n===h&&i===o&&r===a&&s.wkid===u.wkid}offset(t,e,n){return this.x+=t,this.y+=e,null!=n&&(this.z=(this.z??0)+n),this}normalize(){if(!this.spatialReference)return this;const t=(0,u.Vp)(this.spatialReference);if(!t)return this;let e=this.x;const[n,i]=t.valid,r=2*i;let s;return e>i?(s=Math.ceil(Math.abs(e-i)/r),e-=s*r):e<n&&(s=Math.ceil(Math.abs(e-n)/r),e+=s*r),this._set("x",e),this}distance(t){return function(t,e){const n=t.x-e.x,i=t.y-e.y,r=null!=t.z&&null!=e.z?t.z-e.z:0;return Math.sqrt(n*n+i*i+r*r)}(this,t)}toArray(){const t=this.hasZ,e=this.hasM;return t&&e?[this.x,this.y,this.z,this.m]:t?[this.x,this.y,this.z]:e?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(t){return this.write({},t)}};(0,i.Cg)([(0,o.MZ)({readOnly:!0})],M.prototype,"cache",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],M.prototype,"hasM",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],M.prototype,"hasZ",null),(0,i.Cg)([(0,o.MZ)({type:Number})],M.prototype,"latitude",null),(0,i.Cg)([(0,o.MZ)({type:Number})],M.prototype,"longitude",null),(0,i.Cg)([(0,o.MZ)({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),(0,o.wg)(t=>isNaN(t)?t:(0,a.GB)(t))],M.prototype,"x",void 0),(0,i.Cg)([(0,p.K)("x")],M.prototype,"writeX",null),(0,i.Cg)([(0,y.w)("x")],M.prototype,"readX",null),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],M.prototype,"y",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],M.prototype,"z",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],M.prototype,"m",void 0),M=x=(0,i.Cg)([(0,o.$K)("esri.geometry.Point")],M),M.prototype.toJSON.isDefaultToJSON=!0},91075:(t,e,n)=>{n.d(e,{A:()=>l});var i=n(31635),r=n(25482),s=n(91429),o=n(16930),a=n(36005);let l=class extends r.o{constructor(...t){super(...t),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=o.A.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(t,e){if(t instanceof o.A)return t;if(null!=t){const n=new o.A;return n.read(t,e),n}return t}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(t){return this.cache[t]}setCacheValue(t,e){this.cache[t]=e}};(0,i.Cg)([(0,s.MZ)()],l.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],l.prototype,"cache",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],l.prototype,"extent",null),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],l.prototype,"hasM",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],l.prototype,"hasZ",void 0),(0,i.Cg)([(0,s.MZ)({type:o.A,json:{write:!0},value:o.A.WGS84})],l.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.w)("spatialReference")],l.prototype,"readSpatialReference",null),l=(0,i.Cg)([(0,s.$K)("esri.geometry.Geometry")],l)},94078:(t,e,n)=>{n.d(e,{CW:()=>a,F8:()=>l,gH:()=>o,m3:()=>u,qz:()=>r,rL:()=>s,t1:()=>c});const i=[0,0];function r(t,e){return null!=e&&h(t,e.x,e.y,e.z)}function s(t,e){if(!e.points?.length)return!1;for(const n of e.points)if(!a(t,n))return!1;return!0}function o(t,e){const{xmin:n,ymin:i,zmin:r,xmax:s,ymax:o,zmax:a}=e;return t.hasZ&&e.hasZ?h(t,n,i,r)&&h(t,n,o,r)&&h(t,s,o,r)&&h(t,s,i,r)&&h(t,n,i,a)&&h(t,n,o,a)&&h(t,s,o,a)&&h(t,s,i,a):h(t,n,i)&&h(t,n,o)&&h(t,s,o)&&h(t,s,i)}function a(t,e){return h(t,e[0],e[1])}function l(t,e){return h(t,e[0],e[1],e[2])}function h(t,e,n,i){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax&&(null==i||!t.hasZ||i>=t.zmin&&i<=t.zmax)}function u(t,e){return i[1]=e.y,i[0]=e.x,function(t,e){return c(t.rings,e)}(t,i)}function c(t,e){if(!t||t.length<1)return!1;if(function(t){return!Array.isArray(t[0][0])}(t))return m(!1,t,e);let n=!1;for(let i=0,r=t.length;i<r;i++)n=m(n,t[i],e);return n}function m(t,e,n){const[i,r]=n;let s=t,o=0;for(let t=0,n=e.length;t<n;t++){o++,o===n&&(o=0);const[a,l]=e[t],[h,u]=e[o];(l<r&&u>=r||u<r&&l>=r)&&a+(r-l)/(u-l)*(h-a)<i&&(s=!s)}return s}}}]);