@arcgis/core 4.34.0-next.17 → 4.34.0-next.19

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 (209) hide show
  1. package/EULA.pdf +0 -0
  2. package/applications/MapViewer/templateUtils.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{fa894be8cfb6ed485df9.js → 025891f445869e33252b.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{827919fe23e06e40a330.js → 1a82f903b442a3856bfa.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{400a4c9fa62964f8fa1d.js → 1f48d6c76f0014064eca.js} +1 -1
  7. package/assets/esri/core/workers/chunks/22206d13a75d61d77023.js +1 -0
  8. package/assets/esri/core/workers/chunks/227d25fcbb5f590c4581.js +1 -0
  9. package/assets/esri/core/workers/chunks/{2ad538440cfb3ab94787.js → 2c0c97acb7714b1e0e01.js} +1 -1
  10. package/assets/esri/core/workers/chunks/3cf31e51266f40072f71.js +1 -0
  11. package/assets/esri/core/workers/chunks/3e07de009d5febd62b19.js +1 -0
  12. package/assets/esri/core/workers/chunks/4072ab8378c235a268ca.js +1 -0
  13. package/assets/esri/core/workers/chunks/52410198c4b2eccfeadd.js +1 -0
  14. package/assets/esri/core/workers/chunks/{04e558a970c6a77f243e.js → 5cbaf4ff688aafa6643e.js} +1 -1
  15. package/assets/esri/core/workers/chunks/5e53c7e29bb6d43d08be.js +1 -0
  16. package/assets/esri/core/workers/chunks/606782a94adcce6975af.js +1 -0
  17. package/assets/esri/core/workers/chunks/6f8de923519bb16af8ba.js +1 -0
  18. package/assets/esri/core/workers/chunks/{53e43798d08ad2075c1f.js → 758776e841fd370e3353.js} +1 -1
  19. package/assets/esri/core/workers/chunks/764e505f2bafdf5afaf9.js +1 -0
  20. package/assets/esri/core/workers/chunks/8637b9cb30170ac4eae2.js +1 -0
  21. package/assets/esri/core/workers/chunks/8656c145ff0ca2e51ea6.js +1 -0
  22. package/assets/esri/core/workers/chunks/8b4a35e3ed39d8be3394.js +1 -0
  23. package/assets/esri/core/workers/chunks/903c7a0a47c14442d3c1.js +1 -0
  24. package/assets/esri/core/workers/chunks/933d4a3b0cee82cc80fe.js +1 -0
  25. package/assets/esri/core/workers/chunks/{d33a5d79f2163ad62b1d.js → 9965961bad09910f577b.js} +1 -1
  26. package/assets/esri/core/workers/chunks/9d499a37b960273c3f84.js +1 -0
  27. package/assets/esri/core/workers/chunks/a507192771e5f4f82973.js +1 -0
  28. package/assets/esri/core/workers/chunks/{66c8816e91e3f9e214d4.js → a92a344763fbc3cec71e.js} +1 -1
  29. package/assets/esri/core/workers/chunks/a9e1caf05c81055ae194.js +1 -0
  30. package/assets/esri/core/workers/chunks/{1415d4e2f5f3193be004.js → aa4ae0e54a0507e8dd0f.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{2d89e354eeadadca4f7f.js → b421986cb4e45c632f7c.js} +1 -1
  32. package/assets/esri/core/workers/chunks/c1822b03302c3db71b1f.js +1 -0
  33. package/assets/esri/core/workers/chunks/d3bfd0c382c2f39a787b.js +1 -0
  34. package/assets/esri/core/workers/chunks/d568070513f2b98fd9b5.js +1 -0
  35. package/assets/esri/core/workers/chunks/d6df12bed626d56cd6b2.js +1 -0
  36. package/assets/esri/core/workers/chunks/{5bfccd5dffda74740aa4.js → df811b31e0446de5d322.js} +1 -1
  37. package/assets/esri/core/workers/chunks/e0146db608959ead9c97.js +1 -0
  38. package/assets/esri/core/workers/chunks/ec339075bb4faeec1413.js +1 -0
  39. package/assets/esri/core/workers/chunks/f4442a2b40e44f90b461.js +1 -0
  40. package/assets/esri/core/workers/chunks/{fa5715ca3ce95d005b0a.js → faa892ad4cc8a90b6c79.js} +1 -1
  41. package/assets/esri/themes/base/widgets/_Legend.scss +3 -1
  42. package/assets/esri/themes/dark/main.css +1 -1
  43. package/assets/esri/themes/light/main.css +1 -1
  44. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  45. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  46. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  47. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  48. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  49. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  50. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  51. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  52. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  53. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  54. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  55. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  56. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  57. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  58. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  59. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  60. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  61. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  62. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  63. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  64. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  65. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  66. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  67. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  68. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  69. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  70. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  71. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  72. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  73. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  74. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  75. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  76. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  77. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  78. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  79. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  80. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  81. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  82. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  83. package/chunks/sphere.js +1 -1
  84. package/config.js +1 -1
  85. package/core/accessorSupport/trackingUtils.js +1 -1
  86. package/core/sql.js +1 -1
  87. package/geometry/spatialReferenceEllipsoidUtils.js +1 -1
  88. package/geometry/support/coordsUtils.js +1 -1
  89. package/geometry/support/sphere.js +1 -1
  90. package/interfaces.d.ts +101 -49
  91. package/kernel.js +1 -1
  92. package/layers/FeatureLayer.js +1 -1
  93. package/layers/OrientedImageryLayer.js +1 -1
  94. package/layers/SubtypeGroupLayer.js +1 -1
  95. package/layers/VectorTileLayer.js +1 -1
  96. package/layers/VideoLayer.js +1 -1
  97. package/layers/graphics/data/QueryEngineResult.js +1 -1
  98. package/layers/mixins/FeatureLayerBase.js +1 -1
  99. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  100. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  101. package/layers/orientedImagery/core/utils.js +1 -1
  102. package/layers/orientedImagery/transformations/updateElevation.js +1 -1
  103. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  104. package/layers/orientedImagery/transformations/utils.js +1 -1
  105. package/layers/support/SubtypeSublayer.js +1 -1
  106. package/layers/support/TitleCreator.js +1 -1
  107. package/layers/support/arcgisLayers.js +1 -1
  108. package/layers/support/fetchService.js +1 -1
  109. package/layers/support/fieldUtils.js +1 -1
  110. package/layers/support/layerUtils.js +1 -1
  111. package/layers/video/VideoCameraSensorModel.js +1 -1
  112. package/layers/video/VideoController.js +1 -1
  113. package/networks/UtilityNetwork.js +1 -1
  114. package/package.json +1 -1
  115. package/portal/support/layersLoader.js +1 -1
  116. package/portal/support/loadUtils.js +1 -1
  117. package/portal/support/portalLayers.js +1 -1
  118. package/request.js +1 -1
  119. package/rest/knowledgeGraphService.js +1 -1
  120. package/rest/support/DateBinParameters.js +1 -1
  121. package/smartMapping/renderers/size.js +1 -1
  122. package/smartMapping/renderers/support/spikeUtils.js +1 -1
  123. package/support/requestUtils.js +1 -1
  124. package/support/revision.js +1 -1
  125. package/symbols/cim/effects/EffectRadial.js +1 -1
  126. package/symbols/cim/utils.js +1 -1
  127. package/symbols/support/previewCIMSymbol.js +1 -1
  128. package/symbols/support/previewSymbol2D.js +1 -1
  129. package/symbols/support/svgUtils.js +1 -1
  130. package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
  131. package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
  132. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  133. package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
  134. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  135. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  136. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  137. package/views/3d/camera/intersectionUtils.js +1 -1
  138. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  139. package/views/3d/layers/I3SMeshView3D.js +1 -1
  140. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  141. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  142. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  143. package/views/3d/state/ViewState.js +1 -1
  144. package/views/3d/state/ViewStateManager.js +1 -1
  145. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  146. package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
  147. package/views/3d/state/utils/navigationUtils.js +1 -1
  148. package/views/3d/support/popupHitTest.js +1 -1
  149. package/views/3d/terrain/OverlayManager.js +1 -1
  150. package/views/3d/terrain/TerrainSurface.js +1 -1
  151. package/views/3d/terrain/TileRenderer.js +1 -1
  152. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  153. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  154. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  155. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  156. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  157. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  158. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  159. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  160. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  161. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  162. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  163. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  164. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  165. package/views/SceneView.js +1 -1
  166. package/views/analysis/analysisViewUtils.js +1 -1
  167. package/views/layers/DimensionLayerView.js +1 -1
  168. package/views/layers/LineOfSightLayerView.js +1 -1
  169. package/views/layers/ViewshedLayerView.js +1 -1
  170. package/views/support/drapedUtils.js +1 -1
  171. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  172. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  173. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  174. package/widgets/Expand.js +1 -1
  175. package/widgets/FeatureTable/support/templateUtils.js +1 -1
  176. package/widgets/Legend/styles/support/sizeRampUtils.js +1 -1
  177. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  178. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  179. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  180. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  181. package/widgets/OrientedImageryViewer.js +1 -1
  182. package/widgets/Print/PrintViewModel.js +1 -1
  183. package/widgets/Print.js +1 -1
  184. package/widgets/support/GridControls.js +1 -1
  185. package/assets/esri/core/workers/chunks/1443520c9fb23381f8d5.js +0 -1
  186. package/assets/esri/core/workers/chunks/254c4f7e277ae9915dce.js +0 -1
  187. package/assets/esri/core/workers/chunks/273beed633cc37416ad7.js +0 -1
  188. package/assets/esri/core/workers/chunks/3f8cc157b65a9d570921.js +0 -1
  189. package/assets/esri/core/workers/chunks/49a57dc1e6d1048fa949.js +0 -1
  190. package/assets/esri/core/workers/chunks/500fb5f615f0c1db1b66.js +0 -1
  191. package/assets/esri/core/workers/chunks/513dc2467e9b8b8c6df4.js +0 -1
  192. package/assets/esri/core/workers/chunks/52239e958a82ebcd2e7a.js +0 -1
  193. package/assets/esri/core/workers/chunks/5ef1095842e21090f1f4.js +0 -1
  194. package/assets/esri/core/workers/chunks/7716a9fb380d66ba7292.js +0 -1
  195. package/assets/esri/core/workers/chunks/78a57f5aeb277b84b3da.js +0 -1
  196. package/assets/esri/core/workers/chunks/7c56740cac444419e5b4.js +0 -1
  197. package/assets/esri/core/workers/chunks/802c6b1a6cb9264b8e4f.js +0 -1
  198. package/assets/esri/core/workers/chunks/8855f1a6224ffbd0bb66.js +0 -1
  199. package/assets/esri/core/workers/chunks/885e8e90dfe5dbd5053d.js +0 -1
  200. package/assets/esri/core/workers/chunks/88b1214c284c2ec7d51b.js +0 -1
  201. package/assets/esri/core/workers/chunks/932808e485f305b6a26a.js +0 -1
  202. package/assets/esri/core/workers/chunks/beb01d400f1aa089d2dc.js +0 -1
  203. package/assets/esri/core/workers/chunks/cc1328cacc4ac07eb548.js +0 -1
  204. package/assets/esri/core/workers/chunks/cfc5e0ec9b0290407383.js +0 -1
  205. package/assets/esri/core/workers/chunks/d2139307f62ea8bf999a.js +0 -1
  206. package/assets/esri/core/workers/chunks/ddb66fe6fcd0764daa7a.js +0 -1
  207. package/assets/esri/core/workers/chunks/eac7af86166c09c6a9be.js +0 -1
  208. package/assets/esri/core/workers/chunks/ec49e2849766402ad5c7.js +0 -1
  209. package/assets/esri/core/workers/chunks/f3e179b48bca50c94538.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{i as e,G as t,t as r}from"../../../../chunks/vec32.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{makeFloat16Array as a}from"../../../../geometry/support/float16.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{isColor as n,isDepth as o,isColorHighlightOrDepth as h,isColorOrColorEmission as c,ShaderOutput as p}from"../core/shaderLibrary/ShaderOutput.js";import l from"../lib/GLMaterial.js";import{Material as m,RenderOccludedFlag as u}from"../lib/Material.js";import{RenderSlot as T}from"../lib/RenderSlot.js";import{VertexAttribute as f}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as d}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as E}from"./internal/bufferWriterUtils.js";import{vertexAttributeLocations as A,LineMarkerTechnique as _}from"../shaders/LineMarkerTechnique.js";import{LineMarkerTechniqueConfiguration as v,LineMarkerSpace as g,LineMarkerAnchor as S}from"../shaders/LineMarkerTechniqueConfiguration.js";import{CapType as O}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as R}from"../../../../webscene/support/AlphaCutoff.js";class I extends m{constructor(e){super(e,C),this._configuration=new v,this.vertexAttributeLocations=A,this.produces=new Map([[T.OPAQUE_MATERIAL,e=>e===p.Highlight||n(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>o(e)],[T.OCCLUDER_MATERIAL,e=>h(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.TRANSPARENT_OCCLUDER_MATERIAL,e=>h(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.TRANSPARENT_MATERIAL,e=>n(e)&&this.parameters.writeDepth],[T.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>n(e)&&!this.parameters.writeDepth],[T.DRAPED_MATERIAL,e=>c(e)||e===p.Highlight]]),this.intersectDraped=void 0,this._layout=this.createLayout()}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.space=t.slot===T.DRAPED_MATERIAL?g.Draped:this.parameters.worldSpace?g.World:g.Screen,this._configuration.hideOnShortSegments=this.parameters.hideOnShortSegments,this._configuration.hasCap=this.parameters.cap!==O.BUTT,this._configuration.anchor=this.parameters.anchor,this._configuration.hasTip=this.parameters.hasTip,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasOccludees=t.hasOccludees,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.occluder=this.parameters.renderOccluded===u.OccludeAndTransparentStencil,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest&&c(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}get visible(){return this.parameters.color[3]>=R}intersect(){}createLayout(){const e=s().vec3f(f.POSITION).vec4f16(f.PREVIOUSDELTA).vec2f16(f.UV0);return this.parameters.worldSpace&&e.vec3f16(f.NORMAL),this.parameters.vvSize?e.f16(f.SIZEFEATUREATTRIBUTE):e.f16(f.SIZE),this.parameters.vvColor?e.f16(f.COLORFEATUREATTRIBUTE):e.vec4u8(f.COLOR,{glNormalized:!0}),this.parameters.vvOpacity&&e.f16(f.OPACITYFEATUREATTRIBUTE),e}createBufferWriter(){return new P(this._layout,this.parameters)}createGLMaterial(e){return new L(e)}}class L extends l{dispose(){super.dispose(),this._markerTextures.release(this._markerPrimitive),this._markerPrimitive=null}beginSlot(e){const t=this._material.parameters.markerPrimitive;return t!==this._markerPrimitive&&(this._material.setParameters({markerTexture:this._markerTextures.swap(t,this._markerPrimitive)}),this._markerPrimitive=t),this.getTechnique(_,e)}}class C extends d{constructor(){super(...arguments),this.width=0,this.color=[1,1,1,1],this.markerPrimitive="arrow",this.placement="end",this.cap=O.BUTT,this.anchor=S.Center,this.hasTip=!1,this.worldSpace=!1,this.hideOnShortSegments=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.markerTexture=null}}class P{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t}elementCount(){return"begin-end"===this._parameters.placement?12:6}write(i,s,n,o,h,c){const p=n.get(f.POSITION).data,l=p.length/3;let m=[1,0,0];const u=n.get(f.NORMAL);this._parameters.worldSpace&&null!=u&&(m=u.data);let T=1,d=0;this._parameters.vvSize?d=n.get(f.SIZEFEATUREATTRIBUTE).data[0]:n.has(f.SIZE)&&(T=n.get(f.SIZE).data[0]);let A=[1,1,1,1],_=0;this._parameters.vvColor?_=n.get(f.COLORFEATUREATTRIBUTE).data[0]:n.has(f.COLOR)&&(A=n.get(f.COLOR).data);let v=0;this._parameters.vvOpacity&&(v=n.get(f.OPACITYFEATUREATTRIBUTE).data[0]);const g=new Float32Array(h.buffer),S=a(h.buffer),O=new Uint8Array(h.buffer);let R=c*(this.vertexBufferLayout.stride/4);const I=g.BYTES_PER_ELEMENT/S.BYTES_PER_ELEMENT,L=4/I,C=(e,t,r,i)=>{g[R++]=e[0],g[R++]=e[1],g[R++]=e[2],E(t,e,S,R*I),R+=L;let a=R*I;if(S[a++]=r[0],S[a++]=r[1],this._parameters.worldSpace&&(S[a++]=m[0],S[a++]=m[1],S[a++]=m[2]),this._parameters.vvSize?S[a++]=d:S[a++]=T,this._parameters.vvColor)S[a++]=_;else{const e=Math.min(4*i,A.length-4),t=a/I*4;a+=I,O[t]=255*A[e],O[t+1]=255*A[e+1],O[t+2]=255*A[e+2],O[t+3]=255*A[e+3]}this._parameters.vvOpacity&&(S[a++]=v),R=Math.ceil(a/I)};let P;!function(e){e[e.ASCENDING=1]="ASCENDING",e[e.DESCENDING=-1]="DESCENDING"}(P||(P={}));const b=(a,s)=>{const n=e(D,p[3*a],p[3*a+1],p[3*a+2]),o=N;let h=a+s;do{e(o,p[3*h],p[3*h+1],p[3*h+2]),h+=s}while(t(n,o)&&h>=0&&h<l);i&&(r(n,n,i),r(o,o,i)),C(n,o,[-1,-1],a),C(n,o,[1,-1],a),C(n,o,[1,1],a),C(n,o,[-1,-1],a),C(n,o,[1,1],a),C(n,o,[-1,1],a)},U=this._parameters.placement;return"begin"!==U&&"begin-end"!==U||b(0,P.ASCENDING),"end"!==U&&"begin-end"!==U||b(l-1,P.DESCENDING),null}}const D=i(),N=i();export{I as LineMarkerMaterial,C as Parameters};
5
+ import{i as e,G as t,t as r}from"../../../../chunks/vec32.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{makeFloat16Array as a}from"../../../../geometry/support/float16.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{isColor as n,isDepth as o,isColorHighlightOrDepth as h,isColorOrColorEmission as c,ShaderOutput as p}from"../core/shaderLibrary/ShaderOutput.js";import l from"../lib/GLMaterial.js";import{Material as m,RenderOccludedFlag as u}from"../lib/Material.js";import{RenderSlot as T}from"../lib/RenderSlot.js";import{VertexAttribute as f}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as d}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as E}from"./internal/bufferWriterUtils.js";import{vertexAttributeLocations as A,LineMarkerTechnique as _}from"../shaders/LineMarkerTechnique.js";import{LineMarkerTechniqueConfiguration as v,LineMarkerSpace as g,LineMarkerAnchor as S}from"../shaders/LineMarkerTechniqueConfiguration.js";import{CapType as O}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as R}from"../../../../webscene/support/AlphaCutoff.js";class I extends m{constructor(e){super(e,C),this._configuration=new v,this.vertexAttributeLocations=A,this.produces=new Map([[T.OPAQUE_MATERIAL,e=>e===p.Highlight||n(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>o(e)],[T.OCCLUDER_MATERIAL,e=>h(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.TRANSPARENT_OCCLUDER_MATERIAL,e=>h(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.TRANSPARENT_MATERIAL,e=>n(e)&&this.parameters.writeDepth],[T.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>n(e)&&!this.parameters.writeDepth],[T.DRAPED_MATERIAL,e=>c(e)||e===p.Highlight]]),this.intersectDraped=void 0,this._layout=this.createLayout()}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.space=t.slot===T.DRAPED_MATERIAL?g.Draped:this.parameters.worldSpace?g.World:g.Screen,this._configuration.hideOnShortSegments=this.parameters.hideOnShortSegments,this._configuration.hasCap=this.parameters.cap!==O.BUTT,this._configuration.anchor=this.parameters.anchor,this._configuration.hasTip=this.parameters.hasTip,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasOccludees=t.hasOccludees,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.occluder=this.parameters.renderOccluded===u.OccludeAndTransparentStencil,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest&&c(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}get visible(){return this.parameters.color[3]>=R}intersect(){}createLayout(){const e=s().vec3f(f.POSITION).vec4f16(f.PREVIOUSDELTA).vec2f16(f.UV0);return this.parameters.vvColor?e.f32(f.COLORFEATUREATTRIBUTE):e.vec4u8(f.COLOR,{glNormalized:!0}),this.parameters.vvOpacity&&e.f32(f.OPACITYFEATUREATTRIBUTE),this.parameters.vvSize?e.f32(f.SIZEFEATUREATTRIBUTE):e.f16(f.SIZE),this.parameters.worldSpace&&e.vec3f16(f.NORMAL),e}createBufferWriter(){return new P(this._layout,this.parameters)}createGLMaterial(e){return new L(e)}}class L extends l{dispose(){super.dispose(),this._markerTextures.release(this._markerPrimitive),this._markerPrimitive=null}beginSlot(e){const t=this._material.parameters.markerPrimitive;return t!==this._markerPrimitive&&(this._material.setParameters({markerTexture:this._markerTextures.swap(t,this._markerPrimitive)}),this._markerPrimitive=t),this.getTechnique(_,e)}}class C extends d{constructor(){super(...arguments),this.width=0,this.color=[1,1,1,1],this.markerPrimitive="arrow",this.placement="end",this.cap=O.BUTT,this.anchor=S.Center,this.hasTip=!1,this.worldSpace=!1,this.hideOnShortSegments=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.markerTexture=null}}class P{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t}elementCount(){return"begin-end"===this._parameters.placement?12:6}write(i,s,n,o,h,c){const p=n.get(f.POSITION).data,l=p.length/3;let m=[1,0,0];const u=n.get(f.NORMAL);this._parameters.worldSpace&&null!=u&&(m=u.data);let T=1,d=0;this._parameters.vvSize?d=n.get(f.SIZEFEATUREATTRIBUTE).data[0]:n.has(f.SIZE)&&(T=n.get(f.SIZE).data[0]);let A=[1,1,1,1],_=0;this._parameters.vvColor?_=n.get(f.COLORFEATUREATTRIBUTE).data[0]:n.has(f.COLOR)&&(A=n.get(f.COLOR).data);let v=0;this._parameters.vvOpacity&&(v=n.get(f.OPACITYFEATUREATTRIBUTE).data[0]);const g=new Float32Array(h.buffer),S=a(h.buffer),O=new Uint8Array(h.buffer);let R=c*(this.vertexBufferLayout.stride/4);const I=g.BYTES_PER_ELEMENT/S.BYTES_PER_ELEMENT,L=4/I,C=(e,t,r,i)=>{g[R++]=e[0],g[R++]=e[1],g[R++]=e[2],E(t,e,S,R*I),R+=L;let a=R*I;if(S[a++]=r[0],S[a++]=r[1],R=a/2,this._parameters.vvColor)g[R++]=_;else{const e=Math.min(4*i,A.length-4),t=4*R++;O[t]=255*A[e],O[t+1]=255*A[e+1],O[t+2]=255*A[e+2],O[t+3]=255*A[e+3]}this._parameters.vvOpacity&&(g[R++]=v),a=R*I,this._parameters.vvSize?(g[R++]=d,a+=2):S[a++]=T,this._parameters.worldSpace&&(S[a++]=m[0],S[a++]=m[1],S[a++]=m[2]),R=Math.ceil(a/I)};let P;!function(e){e[e.ASCENDING=1]="ASCENDING",e[e.DESCENDING=-1]="DESCENDING"}(P||(P={}));const b=(a,s)=>{const n=e(D,p[3*a],p[3*a+1],p[3*a+2]),o=N;let h=a+s;do{e(o,p[3*h],p[3*h+1],p[3*h+2]),h+=s}while(t(n,o)&&h>=0&&h<l);i&&(r(n,n,i),r(o,o,i)),C(n,o,[-1,-1],a),C(n,o,[1,-1],a),C(n,o,[1,1],a),C(n,o,[-1,-1],a),C(n,o,[1,1],a),C(n,o,[-1,1],a)},U=this._parameters.placement;return"begin"!==U&&"begin-end"!==U||b(0,P.ASCENDING),"end"!==U&&"begin-end"!==U||b(l-1,P.DESCENDING),null}}const D=i(),N=i();export{I as LineMarkerMaterial,C as Parameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{clamp as t}from"../../../../core/mathUtils.js";import{clone as e}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as r}from"../../../../geometry/support/aaBoundingBox.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{isShadowRelatedOutput as o,is3DGeometryOutputMRT as a,isColorOrColorEmission as n,isColorEmission as h,ShaderOutput as c}from"../core/shaderLibrary/ShaderOutput.js";import{EmissionSource as p}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as u}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as m}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as l}from"../effects/geometry/olidUtils.js";import f from"../lib/GLMaterial.js";import{Material as d}from"../lib/Material.js";import{isPathGeometry as b}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as g,intersectAabbInvDir as v}from"../lib/RayIntersections.js";import{RenderSlot as S}from"../lib/RenderSlot.js";import{VertexAttribute as _}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as T}from"./DefaultBufferWriter.js";import{vertexAttributeLocations as A,PathPassParameters as O,PathTechnique as R}from"./PathTechnique.js";import{PathTechniqueConfiguration as y}from"./PathTechniqueConfiguration.js";import{alphaCutoff as E}from"../../../../webscene/support/AlphaCutoff.js";class P extends d{constructor(t,e){super(t,I),this.vertexAttributeLocations=A,this.supportsEdges=!0,this._pp0=i(0,0,1),this._pp1=i(0,0,0),this.produces=new Map([[S.OPAQUE_MATERIAL,t=>(this.parameters.castShadows&&o(t)||a(t))&&!this.transparent],[S.TRANSPARENT_MATERIAL,t=>(this.parameters.castShadows&&o(t)||a(t))&&this.transparent]]),this._configuration=new y(e.spherical)}get hasEmissions(){return this.parameters.emissiveStrength>0}getConfiguration(t,e){return super.getConfiguration(t,e,this._configuration),this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=e.hasOccludees,n(t)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?u.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?u.WindingOrder:u.None,this._configuration.receiveShadows=e.shadowMap.enabled,this._configuration.receiveAmbientOcclusion=null!=e.ssao):this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?m.Schematic:m.Disabled,this._configuration.emissionSource=this.parameters.usePBR?p.SymbolColor:p.None,this._configuration.hasBloom=h(t),this._configuration.oitPass=e.oitPass,this._configuration.terrainDepthTest=e.terrainDepthTest,this._configuration.cullAboveTerrain=e.cullAboveTerrain,this._configuration.snowCover=e.snowCover,this._configuration}isVisibleForOutput(t){return t!==c.Shadow&&t!==c.ShadowExcludeHighlight&&t!==c.ShadowHighlight||this.parameters.castShadows}get visible(){return this.parameters.opacity>=E}intersect(t,e,i,r,s,o){this._intersect(t,i,r,s,o)}intersectDraped(t,e,i,r){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this._intersect(t,e,this._pp0,this._pp1,r)}_intersect(i,s,o,a,n){const h=i;if(!b(h))return;const c=h.path,p=e(this.parameters.size);if(this.parameters.vvSize){const{offset:e,factor:i,minSize:r,maxSize:s,fallback:o}=this.parameters.vvSize,a=c.sizeAttributeValue;Number.isNaN(a)?(p[0]*=o[0],p[1]*=o[2]):(p[0]*=t(e[0]+a*i[0],r[0],s[0]),p[1]*=t(e[2]+a*i[2],r[2],s[2]))}const u=new g(!1,s.options.normalRequired),m=Math.max(p[0],p[1]),l=i.boundingInfo;if(null==l)return void w(c,p,o,a,u,n);const f=r(l.bbMin[0]-m,l.bbMin[1]-m,l.bbMin[2]-m,l.bbMax[0]+m,l.bbMax[1]+m,l.bbMax[2]+m),d=[a[0]-o[0],a[1]-o[1],a[2]-o[2]],S=Math.sqrt(d[0]*d[0]+d[1]*d[1]+d[2]*d[2]),_=[S/d[0],S/d[1],S/d[2]];v(f,o,_,s.tolerance)&&w(c,p,o,a,u,n)}createBufferWriter(){return new T(this._layout)}get _layout(){const t=s().vec3f(_.POSITION).vec4f16(_.PROFILEVERTEXANDNORMAL).vec2i16(_.PROFILERIGHT,{glNormalized:!0}).vec2i16(_.PROFILEUP,{glNormalized:!0});return this.parameters.vvSize&&t.f32(_.SIZEFEATUREATTRIBUTE),t.vec3f16(_.PROFILEAUXDATA),this.parameters.vvColor&&t.f16(_.COLORFEATUREATTRIBUTE),this.parameters.vvOpacity&&t.f16(_.OPACITYFEATUREATTRIBUTE),l()&&t.vec4u8(_.OLIDCOLOR),t}createGLMaterial(t){return new j(t)}get transparent(){const{parameters:t}=this;return t.drivenOpacity||t.opacity<1}}class j extends f{beginSlot(t){return this.getTechnique(R,t)}}function w(t,e,i,r,s,o){t.baked.size&&t.baked.size[0]===e[0]&&t.baked.size[1]===e[1]||t.baked.bake(e),t.baked.intersect(i,r,s,o)}class I extends O{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1}}export{I as Parameters,P as PathMaterial};
5
+ import{clamp as t}from"../../../../core/mathUtils.js";import{clone as e}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as r}from"../../../../geometry/support/aaBoundingBox.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{isShadowRelatedOutput as o,is3DGeometryOutputMRT as a,isColorOrColorEmission as n,isColorEmission as h,ShaderOutput as c}from"../core/shaderLibrary/ShaderOutput.js";import{EmissionSource as p}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as u}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as m}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as l}from"../effects/geometry/olidUtils.js";import f from"../lib/GLMaterial.js";import{Material as d}from"../lib/Material.js";import{isPathGeometry as b}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as g,intersectAabbInvDir as v}from"../lib/RayIntersections.js";import{RenderSlot as S}from"../lib/RenderSlot.js";import{VertexAttribute as _}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as T}from"./DefaultBufferWriter.js";import{vertexAttributeLocations as A,PathPassParameters as O,PathTechnique as R}from"./PathTechnique.js";import{PathTechniqueConfiguration as y}from"./PathTechniqueConfiguration.js";import{alphaCutoff as E}from"../../../../webscene/support/AlphaCutoff.js";class P extends d{constructor(t,e){super(t,I),this.vertexAttributeLocations=A,this.supportsEdges=!0,this._pp0=i(0,0,1),this._pp1=i(0,0,0),this.produces=new Map([[S.OPAQUE_MATERIAL,t=>(this.parameters.castShadows&&o(t)||a(t))&&!this.transparent],[S.TRANSPARENT_MATERIAL,t=>(this.parameters.castShadows&&o(t)||a(t))&&this.transparent]]),this._configuration=new y(e.spherical)}get hasEmissions(){return this.parameters.emissiveStrength>0}getConfiguration(t,e){return super.getConfiguration(t,e,this._configuration),this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=e.hasOccludees,n(t)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?u.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?u.WindingOrder:u.None,this._configuration.receiveShadows=e.shadowMap.enabled,this._configuration.receiveAmbientOcclusion=null!=e.ssao):this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?m.Schematic:m.Disabled,this._configuration.emissionSource=this.parameters.usePBR?p.SymbolColor:p.None,this._configuration.hasBloom=h(t),this._configuration.oitPass=e.oitPass,this._configuration.terrainDepthTest=e.terrainDepthTest,this._configuration.cullAboveTerrain=e.cullAboveTerrain,this._configuration.snowCover=e.snowCover,this._configuration}isVisibleForOutput(t){return t!==c.Shadow&&t!==c.ShadowExcludeHighlight&&t!==c.ShadowHighlight||this.parameters.castShadows}get visible(){return this.parameters.opacity>=E}intersect(t,e,i,r,s,o){this._intersect(t,i,r,s,o)}intersectDraped(t,e,i,r){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this._intersect(t,e,this._pp0,this._pp1,r)}_intersect(i,s,o,a,n){const h=i;if(!b(h))return;const c=h.path,p=e(this.parameters.size);if(this.parameters.vvSize){const{offset:e,factor:i,minSize:r,maxSize:s,fallback:o}=this.parameters.vvSize,a=c.sizeAttributeValue;Number.isNaN(a)?(p[0]*=o[0],p[1]*=o[2]):(p[0]*=t(e[0]+a*i[0],r[0],s[0]),p[1]*=t(e[2]+a*i[2],r[2],s[2]))}const u=new g(!1,s.options.normalRequired),m=Math.max(p[0],p[1]),l=i.boundingInfo;if(null==l)return void w(c,p,o,a,u,n);const f=r(l.bbMin[0]-m,l.bbMin[1]-m,l.bbMin[2]-m,l.bbMax[0]+m,l.bbMax[1]+m,l.bbMax[2]+m),d=[a[0]-o[0],a[1]-o[1],a[2]-o[2]],S=Math.sqrt(d[0]*d[0]+d[1]*d[1]+d[2]*d[2]),_=[S/d[0],S/d[1],S/d[2]];v(f,o,_,s.tolerance)&&w(c,p,o,a,u,n)}createBufferWriter(){return new T(this._layout)}get _layout(){const t=s().vec3f(_.POSITION).vec4f16(_.PROFILEVERTEXANDNORMAL).vec2i16(_.PROFILERIGHT,{glNormalized:!0}).vec2i16(_.PROFILEUP,{glNormalized:!0});return this.parameters.vvSize&&t.f32(_.SIZEFEATUREATTRIBUTE),this.parameters.vvColor&&t.f32(_.COLORFEATUREATTRIBUTE),this.parameters.vvOpacity&&t.f32(_.OPACITYFEATUREATTRIBUTE),l()&&t.vec4u8(_.OLIDCOLOR),t.vec3f16(_.PROFILEAUXDATA),t}createGLMaterial(t){return new j(t)}get transparent(){const{parameters:t}=this;return t.drivenOpacity||t.opacity<1}}class j extends f{beginSlot(t){return this.getTechnique(R,t)}}function w(t,e,i,r,s,o){t.baked.size&&t.baked.size[0]===e[0]&&t.baked.size[1]===e[1]||t.baked.bake(e),t.baked.intersect(i,r,s,o)}class I extends O{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1}}export{I as Parameters,P as PathMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{freeze as r,create as e,ZEROS as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{EmissiveSourceMode as t}from"../../../../symbols/support/materialUtils.js";import{isColorOrColorEmission as i}from"../core/shaderLibrary/ShaderOutput.js";import{PathVertexPositionPassParameters as o}from"../core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{NormalsDoubleSidedMode as l}from"../core/shaderLibrary/shading/Normals.glsl.js";import{ReloadableShaderModule as n}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as a,depthOnlyOutputBuffersOr as m}from"../core/shaderTechnique/ShaderTechnique.js";import{OITPass as c}from"../lib/OITPass.js";import{OITPolygonOffset as p,oitDepthTest as h,blending as u,getDrawBuffers as d}from"../lib/OrderIndependentTransparency.js";import{stencilBaseAllZerosParams as T,stencilWriteMaskOn as f}from"../lib/StencilUtils.js";import{VertexAttribute as O}from"../lib/VertexAttribute.js";import{advancedMRRFactors as b}from"./pbrUtils.js";import{P as E}from"../../../../chunks/Path.glsl.js";import{makePipelineState as P,defaultColorWrite as R,defaultDepthWrite as j,frontFaceCullingParams as I}from"../../../webgl/renderState.js";class A extends o{constructor(){super(...arguments),this.ambient=r(.2,.2,.2),this.diffuse=r(.8,.8,.8),this.opacity=1,this.origin=e(),this.modelTransformation=null,this.mrrFactors=b,this.emissiveStrength=0,this.emissiveSource=t.Color,this.emissiveBaseColor=s}}class g extends a{constructor(r,e){super(r,e,new n(E,(()=>import("../shaders/Path.glsl.js"))),L)}initializePipeline(r){const{output:e,transparent:s,hasSlicePlane:t,doubleSidedMode:o,hasOccludees:n,oitPass:a}=r,O=a===c.NONE,b=a===c.FrontFace;return P({blending:i(e)&&s?u(a):null,culling:t&&!s&&o!==l.None?I:null,depthTest:{func:h(a)},depthWrite:O||b?j:null,drawBuffers:m(e,d(a,e)),colorWrite:R,stencilWrite:n?f:null,stencilTest:n?T:null,polygonOffset:O||b?null:p})}}const L=new Map([[O.POSITION,0],[O.PROFILEVERTEXANDNORMAL,1],[O.PROFILEAUXDATA,2],[O.PROFILERIGHT,3],[O.PROFILEUP,4],[O.SIZEFEATUREATTRIBUTE,5],[O.COLORFEATUREATTRIBUTE,6],[O.OPACITYFEATUREATTRIBUTE,7],[O.OLIDCOLOR,8]]);export{A as PathPassParameters,g as PathTechnique,L as vertexAttributeLocations};
5
+ import{freeze as r,create as e,ZEROS as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{EmissiveSourceMode as t}from"../../../../symbols/support/materialUtils.js";import{isColorOrColorEmission as i}from"../core/shaderLibrary/ShaderOutput.js";import{PathVertexPositionPassParameters as o}from"../core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{NormalsDoubleSidedMode as l}from"../core/shaderLibrary/shading/Normals.glsl.js";import{ReloadableShaderModule as n}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as a,depthOnlyOutputBuffersOr as m}from"../core/shaderTechnique/ShaderTechnique.js";import{OITPass as c}from"../lib/OITPass.js";import{OITPolygonOffset as p,oitDepthTest as h,blending as u,getDrawBuffers as d}from"../lib/OrderIndependentTransparency.js";import{stencilBaseAllZerosParams as T,stencilWriteMaskOn as f}from"../lib/StencilUtils.js";import{VertexAttribute as O}from"../lib/VertexAttribute.js";import{advancedMRRFactors as b}from"./pbrUtils.js";import{P as E}from"../../../../chunks/Path.glsl.js";import{makePipelineState as P,defaultColorWrite as R,defaultDepthWrite as j,frontFaceCullingParams as I}from"../../../webgl/renderState.js";class A extends o{constructor(){super(...arguments),this.ambient=r(.2,.2,.2),this.diffuse=r(.8,.8,.8),this.opacity=1,this.origin=e(),this.modelTransformation=null,this.mrrFactors=b,this.emissiveStrength=0,this.emissiveSource=t.Color,this.emissiveBaseColor=s}}class g extends a{constructor(r,e){super(r,e,new n(E,(()=>import("../shaders/Path.glsl.js"))),L)}initializePipeline(r){const{output:e,transparent:s,hasSlicePlane:t,doubleSidedMode:o,hasOccludees:n,oitPass:a}=r,O=a===c.NONE,b=a===c.FrontFace;return P({blending:i(e)&&s?u(a):null,culling:t&&!s&&o!==l.None?I:null,depthTest:{func:h(a)},depthWrite:O||b?j:null,drawBuffers:m(e,d(a,e)),colorWrite:R,stencilWrite:n?f:null,stencilTest:n?T:null,polygonOffset:O||b?null:p})}}const L=new Map([[O.POSITION,0],[O.PROFILEVERTEXANDNORMAL,1],[O.PROFILERIGHT,2],[O.PROFILEUP,3],[O.SIZEFEATUREATTRIBUTE,4],[O.COLORFEATUREATTRIBUTE,5],[O.OPACITYFEATUREATTRIBUTE,6],[O.OLIDCOLOR,7],[O.PROFILEAUXDATA,8]]);export{A as PathPassParameters,g as PathTechnique,L as vertexAttributeLocations};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{fromValues as e}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{BufferViewMat3f as t,BufferViewVec4f as r}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as i,isColorOrColorEmission as o,isDepth as a,isColorEmissionHighlightOrOID as n}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as f}from"../effects/geometry/olidUtils.js";import{CullFaceOptions as c}from"../lib/basicInterfaces.js";import l from"../lib/GLMaterial.js";import{OITPolygonOffsetLimit as u}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as p}from"../lib/RenderSlot.js";import{assert as h}from"../lib/Util.js";import{VertexAttribute as m}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as d}from"./DefaultBufferWriter.js";import{Style as g}from"./PatternStyle.js";import{TriangleMaterial as A}from"./TriangleMaterial.js";import{VisualVariablePassParameters as T}from"./VisualVariablePassParameters.js";import{writeDefaultAttributes as b,writeBufferVec4 as v}from"./internal/bufferWriterUtils.js";import{vertexAttributeLocationsOID as O,vertexAttributeLocations as _,PatternTechnique as j}from"../shaders/PatternTechnique.js";import{PatternTechniqueConfiguration as C}from"../shaders/PatternTechniqueConfiguration.js";import{alphaCutoff as P}from"../../../../webscene/support/AlphaCutoff.js";class R extends A{constructor(e){super(e,I),this._configuration=new C,this.vertexAttributeLocations=f()?O:_,this.supportsEdges=!0,this.produces=new Map([[p.OPAQUE_MATERIAL,e=>i(e)],[p.TRANSPARENT_MATERIAL,e=>o(e)],[p.TRANSPARENT_MATERIAL_WITHOUT_NORMALS,e=>a(e)],[p.DRAPED_MATERIAL,e=>this.parameters.draped&&n(e)]])}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.style=this.parameters.style,this._configuration.draped=this.parameters.draped,this._configuration.oitPass=t.oitPass,this._configuration.enableOffset=t.camera.relativeElevation<u,this._configuration.terrainDepthTest=t.terrainDepthTest&&o(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration}get visible(){return this.parameters.color[3]>=P}createGLMaterial(e){return new y(e)}createBufferWriter(){const e=s().vec3f(m.POSITION).vec4f(m.UVMAPSPACE);return this.parameters.draped||e.mat3f(m.BOUNDINGRECT),this.parameters.vvColor?e.f16(m.COLORFEATUREATTRIBUTE):e.vec4u8(m.COLOR),f()&&e.vec4u8(m.OLIDCOLOR),new E(e)}}class y extends l{beginSlot(e){return this.getTechnique(j,e)}}class E extends d{write(e,s,i,o,a,n){const f=b(i,o,this.vertexBufferLayout,e,s,a,n);for(const c of this.vertexBufferLayout.fields.keys()){const s=i.get(c),o=s?.indices;if(s&&o)switch(c){case m.UVMAPSPACE:{h(4===s.size);const e=a.getField(c,r);e&&v(s,e,n);break}case m.BOUNDINGRECT:{h(9===s.size);const r=a.getField(c,t);r&&L(s,e,r,n);break}}}return f}}function L(e,t,r,s){const{data:i,indices:o}=e,a=t,n=r.typedBuffer,f=r.typedBufferStride,c=o.length;s*=f;for(let l=0;l<c;++l){const e=9*o[l],t=i[e],r=i[e+1],c=i[e+2];n[s]=a[0]*t+a[4]*r+a[8]*c+a[12],n[s+1]=a[1]*t+a[5]*r+a[9]*c+a[13],n[s+2]=a[2]*t+a[6]*r+a[10]*c+a[14];for(let o=3;o<9;++o)n[s+o]=i[e+o];s+=f}}class I extends T{constructor(){super(...arguments),this.color=e(1,1,1,1),this.hasVertexColors=!1,this.polygonOffset=!1,this.hasSlicePlane=!1,this.cullFace=c.None,this.hasOccludees=!1,this.style=g.Cross,this.draped=!0}}export{I as Parameters,R as PatternMaterial};
5
+ import{fromValues as e}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{BufferViewMat3f as t,BufferViewVec4f as r}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as i,isColorOrColorEmission as o,isDepth as a,isColorEmissionHighlightOrOID as n}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as f}from"../effects/geometry/olidUtils.js";import{CullFaceOptions as c}from"../lib/basicInterfaces.js";import l from"../lib/GLMaterial.js";import{OITPolygonOffsetLimit as u}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as p}from"../lib/RenderSlot.js";import{assert as h}from"../lib/Util.js";import{VertexAttribute as m}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as d}from"./DefaultBufferWriter.js";import{Style as g}from"./PatternStyle.js";import{TriangleMaterial as A}from"./TriangleMaterial.js";import{VisualVariablePassParameters as T}from"./VisualVariablePassParameters.js";import{writeDefaultAttributes as b,writeBufferVec4 as v}from"./internal/bufferWriterUtils.js";import{vertexAttributeLocationsOID as O,vertexAttributeLocations as _,PatternTechnique as j}from"../shaders/PatternTechnique.js";import{PatternTechniqueConfiguration as C}from"../shaders/PatternTechniqueConfiguration.js";import{alphaCutoff as P}from"../../../../webscene/support/AlphaCutoff.js";class R extends A{constructor(e){super(e,I),this._configuration=new C,this.vertexAttributeLocations=f()?O:_,this.supportsEdges=!0,this.produces=new Map([[p.OPAQUE_MATERIAL,e=>i(e)],[p.TRANSPARENT_MATERIAL,e=>o(e)],[p.TRANSPARENT_MATERIAL_WITHOUT_NORMALS,e=>a(e)],[p.DRAPED_MATERIAL,e=>this.parameters.draped&&n(e)]])}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.style=this.parameters.style,this._configuration.draped=this.parameters.draped,this._configuration.oitPass=t.oitPass,this._configuration.enableOffset=t.camera.relativeElevation<u,this._configuration.terrainDepthTest=t.terrainDepthTest&&o(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration}get visible(){return this.parameters.color[3]>=P}createGLMaterial(e){return new y(e)}createBufferWriter(){const e=s().vec3f(m.POSITION).vec4f(m.UVMAPSPACE);return this.parameters.draped||e.mat3f(m.BOUNDINGRECT),this.parameters.vvColor?e.f32(m.COLORFEATUREATTRIBUTE):e.vec4u8(m.COLOR),f()&&e.vec4u8(m.OLIDCOLOR),new E(e)}}class y extends l{beginSlot(e){return this.getTechnique(j,e)}}class E extends d{write(e,s,i,o,a,n){const f=b(i,o,this.vertexBufferLayout,e,s,a,n);for(const c of this.vertexBufferLayout.fields.keys()){const s=i.get(c),o=s?.indices;if(s&&o)switch(c){case m.UVMAPSPACE:{h(4===s.size);const e=a.getField(c,r);e&&v(s,e,n);break}case m.BOUNDINGRECT:{h(9===s.size);const r=a.getField(c,t);r&&L(s,e,r,n);break}}}return f}}function L(e,t,r,s){const{data:i,indices:o}=e,a=t,n=r.typedBuffer,f=r.typedBufferStride,c=o.length;s*=f;for(let l=0;l<c;++l){const e=9*o[l],t=i[e],r=i[e+1],c=i[e+2];n[s]=a[0]*t+a[4]*r+a[8]*c+a[12],n[s+1]=a[1]*t+a[5]*r+a[9]*c+a[13],n[s+2]=a[2]*t+a[6]*r+a[10]*c+a[14];for(let o=3;o<9;++o)n[s+o]=i[e+o];s+=f}}class I extends T{constructor(){super(...arguments),this.color=e(1,1,1,1),this.hasVertexColors=!1,this.polygonOffset=!1,this.hasSlicePlane=!1,this.cullFace=c.None,this.hasOccludees=!1,this.style=g.Cross,this.draped=!0}}export{I as Parameters,R as PatternMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as r}from"../../../../core/screenUtils.js";import{copy as i}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as s,d as a,e as n,g as o,f as l,c,l as p,j as h,t as f}from"../../../../chunks/vec32.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as u}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{makeFloat16Array as T}from"../../../../geometry/support/float16.js";import{PlaneIndex as d}from"../../../../geometry/support/frustum.js";import{distance2 as E,fromPoints as _,create as A,closestLineSegmentPoint as R}from"../../../../geometry/support/lineSegment.js";import{fromPoints as g,create as S,signedDistance as O,getNormal as I}from"../../../../geometry/support/plane.js";import{newLayout as v}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as P,isColorOrColorEmission as N,isDepth as L,isColorEmissionHighlightOIDOrDepth as b,is2DGeometryOutput as C,ShaderOutput as U}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as y}from"../effects/geometry/olidUtils.js";import j from"../lib/GLMaterial.js";import{Material as D,RenderOccludedFlag as F}from"../lib/Material.js";import{RenderSlot as w}from"../lib/RenderSlot.js";import{isTranslationMatrix as M}from"../lib/Util.js";import{VertexAttribute as B}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as x}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as J}from"./internal/bufferWriterUtils.js";import{LineMarkerAnchor as z}from"../shaders/LineMarkerTechniqueConfiguration.js";import{r as H}from"../../../../chunks/RibbonLine.glsl.js";import{vertexAttributeLocations as G,RibbonLineTechnique as k}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as Z,CapType as V}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as W}from"../../../../webscene/support/AlphaCutoff.js";var Y;!function(e){e[e.LEFT_JOIN_START=-2]="LEFT_JOIN_START",e[e.LEFT_JOIN_END=-1]="LEFT_JOIN_END",e[e.LEFT_CAP_START=-4]="LEFT_CAP_START",e[e.LEFT_CAP_END=-5]="LEFT_CAP_END",e[e.RIGHT_JOIN_START=2]="RIGHT_JOIN_START",e[e.RIGHT_JOIN_END=1]="RIGHT_JOIN_END",e[e.RIGHT_CAP_START=4]="RIGHT_CAP_START",e[e.RIGHT_CAP_END=5]="RIGHT_CAP_END"}(Y||(Y={}));class q extends D{constructor(e){super(e,Q),this._configuration=new Z,this.vertexAttributeLocations=G,this.produces=new Map([[w.OPAQUE_MATERIAL,e=>P(e)||N(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>L(e)],[w.OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.TRANSPARENT_OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.TRANSPARENT_MATERIAL,e=>N(e)&&this.parameters.writeDepth&&this.parameters.renderOccluded!==F.OccludeAndTransparentStencil],[w.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>N(e)&&!this.parameters.writeDepth&&this.parameters.renderOccluded!==F.OccludeAndTransparentStencil],[w.DRAPED_MATERIAL,e=>C(e)]])}getConfiguration(e,t){super.getConfiguration(e,t,this._configuration),this._configuration.oitPass=t.oitPass,this._configuration.draped=t.slot===w.DRAPED_MATERIAL;const r=null!=this.parameters.stipplePattern&&e!==U.Highlight;return this._configuration.stippleEnabled=r,this._configuration.stippleOffColorEnabled=r&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&te(this.parameters.markerParameters),this._configuration.hasPolygonOffset=this.parameters.hasPolygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=t.hasOccludees,this._configuration.occluder=this.parameters.renderOccluded===F.OccludeAndTransparentStencil,this._configuration.terrainDepthTest=t.terrainDepthTest&&N(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration}get visible(){return this.parameters.color[3]>=W||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>W}intersectDraped({attributes:e,screenToWorldRatio:r},i,s,a,n){if(!i.options.selectionMode)return;const o=e.get(B.SIZE);let l=this.parameters.width;if(this.parameters.vvSize){const r=e.get(B.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(r)?l*=this.parameters.vvSize.fallback[0]:l*=t(this.parameters.vvSize.offset[0]+r*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else o&&(l*=o.data[0]);const c=s[0],p=s[1],h=(l/2+4)*r;let f=Number.MAX_VALUE,m=0;const u=e.get(B.POSITION).data,T=ee(this.parameters,e)?u.length-2:u.length-5;for(let d=0;d<T;d+=3){const e=u[d],r=u[d+1],i=(d+3)%u.length,s=c-e,a=p-r,n=u[i]-e,o=u[i+1]-r,l=t((n*s+o*a)/(n*n+o*o),0,1),h=n*l-s,T=o*l-a,E=h*h+T*T;E<f&&(f=E,m=d/3)}f<h*h&&a(n.distance,n.normal,m)}intersect(r,f,m,u,T,A){const{options:S,camera:v,rayBegin:P,rayEnd:N}=m;if(!S.selectionMode||!r.visible||!v)return;if(!M(f))return void e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const L=r.attributes,b=L.get(B.POSITION).data;let C=this.parameters.width;if(this.parameters.vvSize){const e=L.get(B.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(e)||(C*=t(this.parameters.vvSize.offset[0]+e*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0]))}else L.has(B.SIZE)&&(C*=L.get(B.SIZE).data[0]);const U=ne;i(U,m.point);const y=C*v.pixelRatio/2+4*v.pixelRatio;s(de[0],U[0]-y,U[1]+y,0),s(de[1],U[0]+y,U[1]+y,0),s(de[2],U[0]+y,U[1]-y,0),s(de[3],U[0]-y,U[1]-y,0);for(let e=0;e<4;e++)if(!v.unprojectFromRenderScreen(de[e],Ee[e]))return;g(v.eye,Ee[0],Ee[1],_e),g(v.eye,Ee[1],Ee[2],Ae),g(v.eye,Ee[2],Ee[3],Re),g(v.eye,Ee[3],Ee[0],ge);let j=Number.MAX_VALUE,D=0;const F=ee(this.parameters,L)?b.length-2:b.length-5;for(let e=0;e<F;e+=3){re[0]=b[e]+f[12],re[1]=b[e+1]+f[13],re[2]=b[e+2]+f[14];const t=(e+3)%b.length;if(ie[0]=b[t]+f[12],ie[1]=b[t+1]+f[13],ie[2]=b[t+2]+f[14],O(_e,re)<0&&O(_e,ie)<0||O(Ae,re)<0&&O(Ae,ie)<0||O(Re,re)<0&&O(Re,ie)<0||O(ge,re)<0&&O(ge,ie)<0)continue;if(v.projectToRenderScreen(re,oe),v.projectToRenderScreen(ie,le),oe[2]<0&&le[2]>0){a(se,re,ie);const e=v.frustum,t=-O(e[d.NEAR],re)/n(se,I(e[d.NEAR]));o(se,se,t),l(re,re,se),v.projectToRenderScreen(re,oe)}else if(oe[2]>0&&le[2]<0){a(se,ie,re);const e=v.frustum,t=-O(e[d.NEAR],ie)/n(se,I(e[d.NEAR]));o(se,se,t),l(ie,ie,se),v.projectToRenderScreen(ie,le)}else if(oe[2]<0&&le[2]<0)continue;oe[2]=0,le[2]=0;const r=E(_(oe,le,he),U);r<j&&(j=r,c(ce,re),c(pe,ie),D=e/3)}if(j<y*y){let e=Number.MAX_VALUE;if(R(_(ce,pe,he),_(P,N,fe),ae)){a(ae,ae,P);const t=p(ae);o(ae,ae,1/t),e=t/h(P,N)}A(e,ae,D)}}get _layout(){const e=v().vec3f(B.POSITION).vec4f16(B.PREVIOUSDELTA).vec4f16(B.NEXTDELTA).f32(B.U0).vec2f16(B.LINEPARAMETERS);return this.parameters.vvSize&&e.f32(B.SIZEFEATUREATTRIBUTE),this.parameters.vvColor?e.f16(B.COLORFEATUREATTRIBUTE):e.vec4u8(B.COLOR,{glNormalized:!0}),this.parameters.vvSize||e.f16(B.SIZE),this.parameters.vvOpacity&&e.f16(B.OPACITYFEATUREATTRIBUTE),y()&&e.vec4u8(B.OLIDCOLOR),e}createBufferWriter(){return new K(this._layout,this.parameters)}createGLMaterial(e){return new X(e)}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),null!=e.markerParameters&&(e.markerScale=e.markerParameters.width/e.width)}}class X extends j{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){const t=this._material.parameters.stipplePattern;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(k,e)}}class Q extends x{constructor(){super(...arguments),this.width=0,this.color=u,this.join="miter",this.cap=V.BUTT,this.miterLimit=5,this.writeDepth=!0,this.hasPolygonOffset=!1,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1}get transparent(){return this.color[3]<1||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}}class K{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t;const r=t.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=H+r}}_isClosed(e){return ee(this._parameters,e)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.get(B.POSITION).indices.length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(e,t,r,i,a,n){const o=r.get(B.POSITION),l=o.indices,p=o.data.length/3,m=r.get(B.DISTANCETOSTART)?.data;l&&l.length!==2*(p-1)&&console.warn("RibbonLineMaterial does not support indices");const u=this.vertexBufferLayout.fields.has(B.SIZEFEATUREATTRIBUTE),d=(u?r.get(B.SIZEFEATUREATTRIBUTE)?.data[0]:r.get(B.SIZE)?.data[0])??1;let E=[1,1,1,1],_=0;const A=this.vertexBufferLayout.fields.has(B.COLORFEATUREATTRIBUTE);A?_=r.get(B.COLORFEATUREATTRIBUTE).data[0]:r.has(B.COLOR)&&(E=r.get(B.COLOR).data);const R=this.vertexBufferLayout.fields.has(B.OPACITYFEATUREATTRIBUTE),g=R?r.get(B.OPACITYFEATUREATTRIBUTE).data[0]:0,S=new Float32Array(a.buffer),O=T(a.buffer),I=new Uint8Array(a.buffer),v=this.vertexBufferLayout.stride/4;let P=n*v;const N=P;let L=0;const b=m?(e,t,r)=>L=m[r]:(e,t,r)=>L+=h(e,t),C=S.BYTES_PER_ELEMENT/O.BYTES_PER_ELEMENT,U=4/C,j=(e,t,r,s,a,n,o)=>{S[P++]=t[0],S[P++]=t[1],S[P++]=t[2],J(e,t,O,P*C),P+=U,J(r,t,O,P*C),P+=U,S[P++]=o;let l=P*C;if(O[l++]=s,O[l++]=a,u&&(P=Math.ceil(l/C),S[P]=d,l+=C),A)O[l++]=_;else{const e=Math.min(4*n,E.length-4),t=l/C*4;l+=C,I[t]=255*E[e],I[t+1]=255*E[e+1],I[t+2]=255*E[e+2],I[t+3]=255*E[e+3]}u||(O[l++]=d),R&&(O[l++]=g);let c=l/C*4;y()&&(i?(I[c++]=i[0],I[c++]=i[1],I[c++]=i[2],I[c++]=i[3]):(I[c++]=0,I[c++]=0,I[c++]=0,I[c++]=0)),P=Math.ceil(.25*c)};P+=v,s(ue,o.data[0],o.data[1],o.data[2]),e&&f(ue,ue,e);const D=this._isClosed(r);if(D){const t=o.data.length-3;s(me,o.data[t],o.data[t+1],o.data[t+2]),e&&f(me,me,e)}else s(Te,o.data[3],o.data[4],o.data[5]),e&&f(Te,Te,e),j(ue,ue,Te,1,Y.LEFT_CAP_START,0,0),j(ue,ue,Te,1,Y.RIGHT_CAP_START,0,0),c(me,ue),c(ue,Te);const F=D?0:1,w=D?p:p-1;for(let h=F;h<w;h++){const t=(h+1)%p*3;s(Te,o.data[t],o.data[t+1],o.data[t+2]),e&&f(Te,Te,e),b(me,ue,h),j(me,ue,Te,0,Y.LEFT_JOIN_END,h,L),j(me,ue,Te,0,Y.RIGHT_JOIN_END,h,L);const r=this.numJoinSubdivisions;for(let e=0;e<r;++e){const t=(e+1)/(r+1);j(me,ue,Te,t,Y.LEFT_JOIN_END,h,L),j(me,ue,Te,t,Y.RIGHT_JOIN_END,h,L)}j(me,ue,Te,1,Y.LEFT_JOIN_START,h,L),j(me,ue,Te,1,Y.RIGHT_JOIN_START,h,L),c(me,ue),c(ue,Te)}D?(s(Te,o.data[3],o.data[4],o.data[5]),e&&f(Te,Te,e),L=b(me,ue,w),j(me,ue,Te,0,Y.LEFT_JOIN_END,F,L),j(me,ue,Te,0,Y.RIGHT_JOIN_END,F,L)):(L=b(me,ue,w),j(me,ue,ue,0,Y.LEFT_CAP_END,w,L),j(me,ue,ue,0,Y.RIGHT_CAP_END,w,L)),$(S,N+v,S,N,v);return P=$(S,P-v,S,P,v),this._parameters.wireframe&&this._addWireframeVertices(a,N,P,v),null}_addWireframeVertices(e,t,r,i){const s=new Float32Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,r-t);let n=0;const o=e=>n=$(a,e,s,n,i);for(let l=0;l<a.length-1;l+=2*i)o(l),o(l+2*i),o(l+1*i),o(l+2*i),o(l+1*i),o(l+3*i)}}function $(e,t,r,i,s){for(let a=0;a<s;a++)r[i++]=e[t++];return i}function ee(e,t){if(!e.isClosed)return!1;return t.get(B.POSITION).indices.length>2}function te(e){return e.anchor===z.Tip&&e.hideOnShortSegments&&"begin-end"===e.placement&&e.worldSpace}const re=m(),ie=m(),se=m(),ae=m(),ne=m(),oe=r(),le=r(),ce=m(),pe=m(),he=A(),fe=A(),me=m(),ue=m(),Te=m(),de=[r(),r(),r(),r()],Ee=[m(),m(),m(),m()],_e=S(),Ae=S(),Re=S(),ge=S();export{Q as Parameters,q as RibbonLineMaterial};
5
+ import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as r}from"../../../../core/screenUtils.js";import{copy as i}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as s,d as a,e as n,g as o,f as l,c,l as p,j as h,t as f}from"../../../../chunks/vec32.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as u}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{makeFloat16Array as T}from"../../../../geometry/support/float16.js";import{PlaneIndex as d}from"../../../../geometry/support/frustum.js";import{distance2 as E,fromPoints as _,create as A,closestLineSegmentPoint as R}from"../../../../geometry/support/lineSegment.js";import{fromPoints as g,create as S,signedDistance as O,getNormal as I}from"../../../../geometry/support/plane.js";import{newLayout as v}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as P,isColorOrColorEmission as N,isDepth as L,isColorEmissionHighlightOIDOrDepth as b,is2DGeometryOutput as C,ShaderOutput as U}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as y}from"../effects/geometry/olidUtils.js";import j from"../lib/GLMaterial.js";import{Material as D,RenderOccludedFlag as F}from"../lib/Material.js";import{RenderSlot as w}from"../lib/RenderSlot.js";import{isTranslationMatrix as M}from"../lib/Util.js";import{VertexAttribute as B}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as x}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as J}from"./internal/bufferWriterUtils.js";import{LineMarkerAnchor as z}from"../shaders/LineMarkerTechniqueConfiguration.js";import{r as H}from"../../../../chunks/RibbonLine.glsl.js";import{vertexAttributeLocations as G,RibbonLineTechnique as k}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as Z,CapType as V}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as W}from"../../../../webscene/support/AlphaCutoff.js";var Y;!function(e){e[e.LEFT_JOIN_START=-2]="LEFT_JOIN_START",e[e.LEFT_JOIN_END=-1]="LEFT_JOIN_END",e[e.LEFT_CAP_START=-4]="LEFT_CAP_START",e[e.LEFT_CAP_END=-5]="LEFT_CAP_END",e[e.RIGHT_JOIN_START=2]="RIGHT_JOIN_START",e[e.RIGHT_JOIN_END=1]="RIGHT_JOIN_END",e[e.RIGHT_CAP_START=4]="RIGHT_CAP_START",e[e.RIGHT_CAP_END=5]="RIGHT_CAP_END"}(Y||(Y={}));class q extends D{constructor(e){super(e,Q),this._configuration=new Z,this.vertexAttributeLocations=G,this.produces=new Map([[w.OPAQUE_MATERIAL,e=>P(e)||N(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>L(e)],[w.OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.TRANSPARENT_OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.TRANSPARENT_MATERIAL,e=>N(e)&&this.parameters.writeDepth&&this.parameters.renderOccluded!==F.OccludeAndTransparentStencil],[w.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>N(e)&&!this.parameters.writeDepth&&this.parameters.renderOccluded!==F.OccludeAndTransparentStencil],[w.DRAPED_MATERIAL,e=>C(e)]])}getConfiguration(e,t){super.getConfiguration(e,t,this._configuration),this._configuration.oitPass=t.oitPass,this._configuration.draped=t.slot===w.DRAPED_MATERIAL;const r=null!=this.parameters.stipplePattern&&e!==U.Highlight;return this._configuration.stippleEnabled=r,this._configuration.stippleOffColorEnabled=r&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&te(this.parameters.markerParameters),this._configuration.hasPolygonOffset=this.parameters.hasPolygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=t.hasOccludees,this._configuration.occluder=this.parameters.renderOccluded===F.OccludeAndTransparentStencil,this._configuration.terrainDepthTest=t.terrainDepthTest&&N(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration}get visible(){return this.parameters.color[3]>=W||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>W}intersectDraped({attributes:e,screenToWorldRatio:r},i,s,a,n){if(!i.options.selectionMode)return;const o=e.get(B.SIZE);let l=this.parameters.width;if(this.parameters.vvSize){const r=e.get(B.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(r)?l*=this.parameters.vvSize.fallback[0]:l*=t(this.parameters.vvSize.offset[0]+r*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else o&&(l*=o.data[0]);const c=s[0],p=s[1],h=(l/2+4)*r;let f=Number.MAX_VALUE,m=0;const u=e.get(B.POSITION).data,T=ee(this.parameters,e)?u.length-2:u.length-5;for(let d=0;d<T;d+=3){const e=u[d],r=u[d+1],i=(d+3)%u.length,s=c-e,a=p-r,n=u[i]-e,o=u[i+1]-r,l=t((n*s+o*a)/(n*n+o*o),0,1),h=n*l-s,T=o*l-a,E=h*h+T*T;E<f&&(f=E,m=d/3)}f<h*h&&a(n.distance,n.normal,m)}intersect(r,f,m,u,T,A){const{options:S,camera:v,rayBegin:P,rayEnd:N}=m;if(!S.selectionMode||!r.visible||!v)return;if(!M(f))return void e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const L=r.attributes,b=L.get(B.POSITION).data;let C=this.parameters.width;if(this.parameters.vvSize){const e=L.get(B.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(e)||(C*=t(this.parameters.vvSize.offset[0]+e*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0]))}else L.has(B.SIZE)&&(C*=L.get(B.SIZE).data[0]);const U=ne;i(U,m.point);const y=C*v.pixelRatio/2+4*v.pixelRatio;s(de[0],U[0]-y,U[1]+y,0),s(de[1],U[0]+y,U[1]+y,0),s(de[2],U[0]+y,U[1]-y,0),s(de[3],U[0]-y,U[1]-y,0);for(let e=0;e<4;e++)if(!v.unprojectFromRenderScreen(de[e],Ee[e]))return;g(v.eye,Ee[0],Ee[1],_e),g(v.eye,Ee[1],Ee[2],Ae),g(v.eye,Ee[2],Ee[3],Re),g(v.eye,Ee[3],Ee[0],ge);let j=Number.MAX_VALUE,D=0;const F=ee(this.parameters,L)?b.length-2:b.length-5;for(let e=0;e<F;e+=3){re[0]=b[e]+f[12],re[1]=b[e+1]+f[13],re[2]=b[e+2]+f[14];const t=(e+3)%b.length;if(ie[0]=b[t]+f[12],ie[1]=b[t+1]+f[13],ie[2]=b[t+2]+f[14],O(_e,re)<0&&O(_e,ie)<0||O(Ae,re)<0&&O(Ae,ie)<0||O(Re,re)<0&&O(Re,ie)<0||O(ge,re)<0&&O(ge,ie)<0)continue;if(v.projectToRenderScreen(re,oe),v.projectToRenderScreen(ie,le),oe[2]<0&&le[2]>0){a(se,re,ie);const e=v.frustum,t=-O(e[d.NEAR],re)/n(se,I(e[d.NEAR]));o(se,se,t),l(re,re,se),v.projectToRenderScreen(re,oe)}else if(oe[2]>0&&le[2]<0){a(se,ie,re);const e=v.frustum,t=-O(e[d.NEAR],ie)/n(se,I(e[d.NEAR]));o(se,se,t),l(ie,ie,se),v.projectToRenderScreen(ie,le)}else if(oe[2]<0&&le[2]<0)continue;oe[2]=0,le[2]=0;const r=E(_(oe,le,he),U);r<j&&(j=r,c(ce,re),c(pe,ie),D=e/3)}if(j<y*y){let e=Number.MAX_VALUE;if(R(_(ce,pe,he),_(P,N,fe),ae)){a(ae,ae,P);const t=p(ae);o(ae,ae,1/t),e=t/h(P,N)}A(e,ae,D)}}get _layout(){const e=v().vec3f(B.POSITION).vec4f16(B.PREVIOUSDELTA).vec4f16(B.NEXTDELTA).f32(B.U0).vec2f16(B.LINEPARAMETERS);return this.parameters.vvColor?e.f32(B.COLORFEATUREATTRIBUTE):e.vec4u8(B.COLOR,{glNormalized:!0}),this.parameters.vvSize?e.f32(B.SIZEFEATUREATTRIBUTE):e.f32(B.SIZE),this.parameters.vvOpacity&&e.f32(B.OPACITYFEATUREATTRIBUTE),y()&&e.vec4u8(B.OLIDCOLOR),e}createBufferWriter(){return new K(this._layout,this.parameters)}createGLMaterial(e){return new X(e)}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),null!=e.markerParameters&&(e.markerScale=e.markerParameters.width/e.width)}}class X extends j{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){const t=this._material.parameters.stipplePattern;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(k,e)}}class Q extends x{constructor(){super(...arguments),this.width=0,this.color=u,this.join="miter",this.cap=V.BUTT,this.miterLimit=5,this.writeDepth=!0,this.hasPolygonOffset=!1,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1}get transparent(){return this.color[3]<1||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}}class K{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t;const r=t.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=H+r}}_isClosed(e){return ee(this._parameters,e)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.get(B.POSITION).indices.length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(e,t,r,i,a,n){const o=r.get(B.POSITION),l=o.indices,p=o.data.length/3,m=r.get(B.DISTANCETOSTART)?.data;l&&l.length!==2*(p-1)&&console.warn("RibbonLineMaterial does not support indices");const u=(this.vertexBufferLayout.fields.has(B.SIZEFEATUREATTRIBUTE)?r.get(B.SIZEFEATUREATTRIBUTE)?.data[0]:r.get(B.SIZE)?.data[0])??1;let d=[1,1,1,1],E=0;const _=this.vertexBufferLayout.fields.has(B.COLORFEATUREATTRIBUTE);_?E=r.get(B.COLORFEATUREATTRIBUTE).data[0]:r.has(B.COLOR)&&(d=r.get(B.COLOR).data);const A=this.vertexBufferLayout.fields.has(B.OPACITYFEATUREATTRIBUTE),R=A?r.get(B.OPACITYFEATUREATTRIBUTE).data[0]:0,g=new Float32Array(a.buffer),S=T(a.buffer),O=new Uint8Array(a.buffer),I=this.vertexBufferLayout.stride/4;let v=n*I;const P=v;let N=0;const L=m?(e,t,r)=>N=m[r]:(e,t,r)=>N+=h(e,t),b=g.BYTES_PER_ELEMENT/S.BYTES_PER_ELEMENT,C=4/b,U=(e,t,r,s,a,n,o)=>{g[v++]=t[0],g[v++]=t[1],g[v++]=t[2],J(e,t,S,v*b),v+=C,J(r,t,S,v*b),v+=C,g[v++]=o;let l=v*b;if(S[l++]=s,S[l++]=a,v++,_)g[v]=E;else{const e=Math.min(4*n,d.length-4),t=4*v;O[t]=255*d[e],O[t+1]=255*d[e+1],O[t+2]=255*d[e+2],O[t+3]=255*d[e+3]}if(v++,g[v++]=u,A&&(g[v++]=R),y()){let e=4*v;i?(O[e++]=i[0],O[e++]=i[1],O[e++]=i[2],O[e++]=i[3]):(O[e++]=0,O[e++]=0,O[e++]=0,O[e++]=0),v=Math.ceil(.25*e)}};v+=I,s(ue,o.data[0],o.data[1],o.data[2]),e&&f(ue,ue,e);const j=this._isClosed(r);if(j){const t=o.data.length-3;s(me,o.data[t],o.data[t+1],o.data[t+2]),e&&f(me,me,e)}else s(Te,o.data[3],o.data[4],o.data[5]),e&&f(Te,Te,e),U(ue,ue,Te,1,Y.LEFT_CAP_START,0,0),U(ue,ue,Te,1,Y.RIGHT_CAP_START,0,0),c(me,ue),c(ue,Te);const D=j?0:1,F=j?p:p-1;for(let h=D;h<F;h++){const t=(h+1)%p*3;s(Te,o.data[t],o.data[t+1],o.data[t+2]),e&&f(Te,Te,e),L(me,ue,h),U(me,ue,Te,0,Y.LEFT_JOIN_END,h,N),U(me,ue,Te,0,Y.RIGHT_JOIN_END,h,N);const r=this.numJoinSubdivisions;for(let e=0;e<r;++e){const t=(e+1)/(r+1);U(me,ue,Te,t,Y.LEFT_JOIN_END,h,N),U(me,ue,Te,t,Y.RIGHT_JOIN_END,h,N)}U(me,ue,Te,1,Y.LEFT_JOIN_START,h,N),U(me,ue,Te,1,Y.RIGHT_JOIN_START,h,N),c(me,ue),c(ue,Te)}j?(s(Te,o.data[3],o.data[4],o.data[5]),e&&f(Te,Te,e),N=L(me,ue,F),U(me,ue,Te,0,Y.LEFT_JOIN_END,D,N),U(me,ue,Te,0,Y.RIGHT_JOIN_END,D,N)):(N=L(me,ue,F),U(me,ue,ue,0,Y.LEFT_CAP_END,F,N),U(me,ue,ue,0,Y.RIGHT_CAP_END,F,N)),$(g,P+I,g,P,I);return v=$(g,v-I,g,v,I),this._parameters.wireframe&&this._addWireframeVertices(a,P,v,I),null}_addWireframeVertices(e,t,r,i){const s=new Float32Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,r-t);let n=0;const o=e=>n=$(a,e,s,n,i);for(let l=0;l<a.length-1;l+=2*i)o(l),o(l+2*i),o(l+1*i),o(l+2*i),o(l+1*i),o(l+3*i)}}function $(e,t,r,i,s){for(let a=0;a<s;a++)r[i++]=e[t++];return i}function ee(e,t){if(!e.isClosed)return!1;return t.get(B.POSITION).indices.length>2}function te(e){return e.anchor===z.Tip&&e.hideOnShortSegments&&"begin-end"===e.placement&&e.worldSpace}const re=m(),ie=m(),se=m(),ae=m(),ne=m(),oe=r(),le=r(),ce=m(),pe=m(),he=A(),fe=A(),me=m(),ue=m(),Te=m(),de=[r(),r(),r(),r()],Ee=[m(),m(),m(),m()],_e=S(),Ae=S(),Re=S(),ge=S();export{Q as Parameters,q as RibbonLineMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{d as e,l as t,g as f}from"../../../../../chunks/vec32.js";import{create as r}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{hasIdentityRotation as o,isOrthoNormal as i}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{BufferViewVec4u8 as s,BufferViewVec3f16 as n,BufferViewVec3f as c,BufferViewVec4f16 as l,BufferViewVec4f as d,BufferViewFloat16 as u,BufferViewFloat as a,BufferViewVec2i16 as g,BufferViewVec2f16 as p,BufferViewVec2f as B}from"../../../../../geometry/support/buffer/BufferView.js";import{assert as y}from"../../lib/Util.js";import{VertexAttribute as b}from"../../lib/VertexAttribute.js";function m(e,t,f,r=1){const{data:o,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===r)for(let l=0;l<c;++l)s[f]=o[i[l]],f+=n;else for(let l=0;l<c;++l){const e=o[i[l]];for(let t=0;t<r;t++)s[f]=e,f+=n}}function O(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length;f*=s;for(let c=0;c<n;++c){const e=2*o[c];i[f]=r[e],i[f+1]=r[e+1],f+=s}}function h(e,t,f,r=1){const{data:o,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===r)for(let l=0;l<c;++l){const e=3*i[l];s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],f+=n}else for(let l=0;l<c;++l){const e=3*i[l];for(let t=0;t<r;++t)s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],f+=n}}function F(e,t,f,r=1){const{data:o,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===r)for(let l=0;l<c;++l){const e=4*i[l];s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],s[f+3]=o[e+3],f+=n}else for(let l=0;l<c;++l){const e=4*i[l];for(let t=0;t<r;++t)s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],s[f+3]=o[e+3],f+=n}}function I(e,t,f){const r=e.typedBuffer,o=e.typedBufferStride;t*=o;for(let i=0;i<f;++i)r[t]=0,r[t+1]=0,r[t+2]=0,r[t+3]=0,t+=o}function T(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length;f*=s;for(let c=0;c<n;++c){const e=9*o[c];for(let t=0;t<9;++t)i[f+t]=r[e+t];f+=s}}function N(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length;f*=s;for(let c=0;c<n;++c){const e=16*o[c];for(let t=0;t<16;++t)i[f+t]=r[e+t];f+=s}}function R(e,t,f,r,i=1){if(!t)return void h(e,f,r,i);const{data:s,indices:n}=e,c=f.typedBuffer,l=f.typedBufferStride,d=n.length,u=t[0],a=t[1],g=t[2],p=t[4],B=t[5],y=t[6],b=t[8],m=t[9],O=t[10],F=t[12],I=t[13],T=t[14];r*=l;let N=0,R=0,S=0;const E=o(t)?e=>{N=s[e]+F,R=s[e+1]+I,S=s[e+2]+T}:e=>{const t=s[e],f=s[e+1],r=s[e+2];N=u*t+p*f+b*r+F,R=a*t+B*f+m*r+I,S=g*t+y*f+O*r+T};if(1===i)for(let o=0;o<d;++o)E(3*n[o]),c[r]=N,c[r+1]=R,c[r+2]=S,r+=l;else for(let o=0;o<d;++o){E(3*n[o]);for(let e=0;e<i;++e)c[r]=N,c[r+1]=R,c[r+2]=S,r+=l}}function S(e,t,f,r,s=1){if(!t)return void h(e,f,r,s);const{data:n,indices:c}=e,l=t,d=f.typedBuffer,u=f.typedBufferStride,a=c.length,g=l[0],p=l[1],B=l[2],y=l[4],b=l[5],m=l[6],O=l[8],F=l[9],I=l[10],T=!i(l),N=1e-6,R=1-N;r*=u;let S=0,E=0,A=0;const v=o(l)?e=>{S=n[e],E=n[e+1],A=n[e+2]}:e=>{const t=n[e],f=n[e+1],r=n[e+2];S=g*t+y*f+O*r,E=p*t+b*f+F*r,A=B*t+m*f+I*r};if(1===s)if(T)for(let o=0;o<a;++o){v(3*c[o]);const e=S*S+E*E+A*A;if(e<R&&e>N){const t=1/Math.sqrt(e);d[r]=S*t,d[r+1]=E*t,d[r+2]=A*t}else d[r]=S,d[r+1]=E,d[r+2]=A;r+=u}else for(let o=0;o<a;++o)v(3*c[o]),d[r]=S,d[r+1]=E,d[r+2]=A,r+=u;else for(let o=0;o<a;++o){if(v(3*c[o]),T){const e=S*S+E*E+A*A;if(e<R&&e>N){const t=1/Math.sqrt(e);S*=t,E*=t,A*=t}}for(let e=0;e<s;++e)d[r]=S,d[r+1]=E,d[r+2]=A,r+=u}}function E(e,t,f,r,o=1){if(!t)return void F(e,f,r,o);const{data:s,indices:n}=e,c=t,l=f.typedBuffer,d=f.typedBufferStride,u=n.length,a=c[0],g=c[1],p=c[2],B=c[4],y=c[5],b=c[6],m=c[8],O=c[9],h=c[10],I=!i(c),T=1e-6,N=1-T;if(r*=d,1===o)for(let i=0;i<u;++i){const e=4*n[i],t=s[e],f=s[e+1],o=s[e+2],c=s[e+3];let u=a*t+B*f+m*o,F=g*t+y*f+O*o,R=p*t+b*f+h*o;if(I){const e=u*u+F*F+R*R;if(e<N&&e>T){const t=1/Math.sqrt(e);u*=t,F*=t,R*=t}}l[r]=u,l[r+1]=F,l[r+2]=R,l[r+3]=c,r+=d}else for(let i=0;i<u;++i){const e=4*n[i],t=s[e],f=s[e+1],c=s[e+2],u=s[e+3];let F=a*t+B*f+m*c,R=g*t+y*f+O*c,S=p*t+b*f+h*c;if(I){const e=F*F+R*R+S*S;if(e<N&&e>T){const t=1/Math.sqrt(e);F*=t,R*=t,S*=t}}for(let i=0;i<o;++i)l[r]=F,l[r+1]=R,l[r+2]=S,l[r+3]=u,r+=d}}function A(e,t,f,r,o=1){const{data:i,indices:s}=e,n=f.typedBuffer,c=f.typedBufferStride,l=s.length;if(r*=c,t!==i.length||4!==t)if(1!==o)if(4!==t)for(let d=0;d<l;++d){const e=3*s[d];for(let t=0;t<o;++t)n[r]=i[e],n[r+1]=i[e+1],n[r+2]=i[e+2],n[r+3]=255,r+=c}else for(let d=0;d<l;++d){const e=4*s[d];for(let t=0;t<o;++t)n[r]=i[e],n[r+1]=i[e+1],n[r+2]=i[e+2],n[r+3]=i[e+3],r+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*s[e];n[r]=i[t],n[r+1]=i[t+1],n[r+2]=i[t+2],n[r+3]=i[t+3],r+=c}return}for(let e=0;e<l;++e){const t=3*s[e];n[r]=i[t],n[r+1]=i[t+1],n[r+2]=i[t+2],n[r+3]=255,r+=c}}else{n[r]=i[0],n[r+1]=i[1],n[r+2]=i[2],n[r+3]=i[3];const e=new Uint32Array(f.typedBuffer.buffer,f.start),t=c/4,s=e[r/=4];r+=t;const d=l*o;for(let f=1;f<d;++f)e[r]=s,r+=t}}function v(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length,c=r[0];f*=s;for(let l=0;l<n;++l)i[f]=c,f+=s}function w(r,o,i,s){e(k,r,o);const n=Math.max(Math.sqrt(t(k)),1e-4);f(k,k,1/n),i[s++]=k[0],i[s++]=k[1],i[s++]=k[2],i[s++]=n}const k=r();function z(e,t,f,r,o=1){const i=t.typedBuffer,s=t.typedBufferStride;if(r*=s,1===o)for(let n=0;n<f;++n)i[r]=e[0],i[r+1]=e[1],i[r+2]=e[2],i[r+3]=e[3],r+=s;else for(let n=0;n<f;++n)for(let t=0;t<o;++t)i[r]=e[0],i[r+1]=e[1],i[r+2]=e[2],i[r+3]=e[3],r+=s}function L(e,t,f,r,o,i,n){let c={numItems:0,numVerticesPerItem:0};for(const l of f.fields.keys()){const f=e.get(l),d=f?.indices;if(f&&d)l===b.POSITION&&(c={numItems:1,numVerticesPerItem:d.length}),P(l,f,r,o,i,n);else if(l===b.OLIDCOLOR&&null!=t){const f=e.get(b.POSITION)?.indices;if(f){const e=f.length;z(t,i.getField(l,s),e,n)}}}return c}function P(e,t,f,r,o,i){switch(e){case b.POSITION:{y(3===t.size);const r=o.getField(e,c);y(!!r,`No buffer view for ${e}`),R(t,f,r,i);break}case b.NORMAL:{y(3===t.size);const f=o.getField(e,c);y(!!f,`No buffer view for ${e}`),S(t,r,f,i);break}case b.NORMALCOMPRESSED:case b.PROFILERIGHT:case b.PROFILEUP:{y(2===t.size);const f=o.getField(e,g);y(!!f,`No buffer view for ${e}`),O(t,f,i);break}case b.UV0:{y(2===t.size);const f=o.getField(e,p)??o.getField(e,B);y(!!f,`No buffer view for ${e}`),O(t,f,i);break}case b.UVI:{y(2===t.size);const f=o.getField(e,g);y(!!f,`No buffer view for ${e}`),O(t,f,i);break}case b.COLOR:case b.SYMBOLCOLOR:{const f=o.getField(e,s);y(!!f,`No buffer view for ${e}`),y(3===t.size||4===t.size),A(t,t.size,f,i);break}case b.SIZEFEATUREATTRIBUTE:{const f=o.getField(e,a);y(!!f,`No buffer view for ${e}`),y(1===t.size),v(t,f,i);break}case b.COLORFEATUREATTRIBUTE:case b.OPACITYFEATUREATTRIBUTE:{const f=o.getField(e,u)??o.getField(e,a);y(!!f,`No buffer view for ${e}`),y(1===t.size),v(t,f,i);break}case b.TANGENT:{y(4===t.size);const r=o.getField(e,d);y(!!r,`No buffer view for ${e}`),E(t,f,r,i);break}case b.PROFILEVERTEXANDNORMAL:{y(4===t.size);const f=o.getField(e,l)??o.getField(e,d);y(!!f,`No buffer view for ${e}`),F(t,f,i);break}case b.PROFILEAUXDATA:{y(3===t.size);const f=o.getField(e,n)??o.getField(e,c);y(!!f,`No buffer view for ${e}`),h(t,f,i);break}}}export{m as writeBufferFloat,T as writeBufferMat3f,N as writeBufferMat4f,O as writeBufferVec2,h as writeBufferVec3,F as writeBufferVec4,I as writeBufferVec4Zeros,A as writeColor,v as writeColorFeatureAttribute,P as writeDefaultAttribute,L as writeDefaultAttributes,w as writeDeltaF16Vector,S as writeNormal,z as writeOlidColor,R as writePosition,E as writeTangent};
5
+ import{d as e,l as t,g as f}from"../../../../../chunks/vec32.js";import{create as r}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{hasIdentityRotation as o,isOrthoNormal as i}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{BufferViewVec4u8 as s,BufferViewVec3f16 as n,BufferViewVec3f as c,BufferViewVec4f16 as l,BufferViewVec4f as d,BufferViewFloat as u,BufferViewVec2i16 as a,BufferViewVec2f16 as p,BufferViewVec2f as g}from"../../../../../geometry/support/buffer/BufferView.js";import{assert as B}from"../../lib/Util.js";import{VertexAttribute as y}from"../../lib/VertexAttribute.js";function b(e,t,f,r=1){const{data:o,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===r)for(let l=0;l<c;++l)s[f]=o[i[l]],f+=n;else for(let l=0;l<c;++l){const e=o[i[l]];for(let t=0;t<r;t++)s[f]=e,f+=n}}function m(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length;f*=s;for(let c=0;c<n;++c){const e=2*o[c];i[f]=r[e],i[f+1]=r[e+1],f+=s}}function O(e,t,f,r=1){const{data:o,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===r)for(let l=0;l<c;++l){const e=3*i[l];s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],f+=n}else for(let l=0;l<c;++l){const e=3*i[l];for(let t=0;t<r;++t)s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],f+=n}}function h(e,t,f,r=1){const{data:o,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===r)for(let l=0;l<c;++l){const e=4*i[l];s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],s[f+3]=o[e+3],f+=n}else for(let l=0;l<c;++l){const e=4*i[l];for(let t=0;t<r;++t)s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],s[f+3]=o[e+3],f+=n}}function F(e,t,f){const r=e.typedBuffer,o=e.typedBufferStride;t*=o;for(let i=0;i<f;++i)r[t]=0,r[t+1]=0,r[t+2]=0,r[t+3]=0,t+=o}function I(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length;f*=s;for(let c=0;c<n;++c){const e=9*o[c];for(let t=0;t<9;++t)i[f+t]=r[e+t];f+=s}}function T(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length;f*=s;for(let c=0;c<n;++c){const e=16*o[c];for(let t=0;t<16;++t)i[f+t]=r[e+t];f+=s}}function R(e,t,f,r,i=1){if(!t)return void O(e,f,r,i);const{data:s,indices:n}=e,c=f.typedBuffer,l=f.typedBufferStride,d=n.length,u=t[0],a=t[1],p=t[2],g=t[4],B=t[5],y=t[6],b=t[8],m=t[9],h=t[10],F=t[12],I=t[13],T=t[14];r*=l;let R=0,S=0,E=0;const N=o(t)?e=>{R=s[e]+F,S=s[e+1]+I,E=s[e+2]+T}:e=>{const t=s[e],f=s[e+1],r=s[e+2];R=u*t+g*f+b*r+F,S=a*t+B*f+m*r+I,E=p*t+y*f+h*r+T};if(1===i)for(let o=0;o<d;++o)N(3*n[o]),c[r]=R,c[r+1]=S,c[r+2]=E,r+=l;else for(let o=0;o<d;++o){N(3*n[o]);for(let e=0;e<i;++e)c[r]=R,c[r+1]=S,c[r+2]=E,r+=l}}function S(e,t,f,r,s=1){if(!t)return void O(e,f,r,s);const{data:n,indices:c}=e,l=t,d=f.typedBuffer,u=f.typedBufferStride,a=c.length,p=l[0],g=l[1],B=l[2],y=l[4],b=l[5],m=l[6],h=l[8],F=l[9],I=l[10],T=!i(l),R=1e-6,S=1-R;r*=u;let E=0,N=0,A=0;const v=o(l)?e=>{E=n[e],N=n[e+1],A=n[e+2]}:e=>{const t=n[e],f=n[e+1],r=n[e+2];E=p*t+y*f+h*r,N=g*t+b*f+F*r,A=B*t+m*f+I*r};if(1===s)if(T)for(let o=0;o<a;++o){v(3*c[o]);const e=E*E+N*N+A*A;if(e<S&&e>R){const t=1/Math.sqrt(e);d[r]=E*t,d[r+1]=N*t,d[r+2]=A*t}else d[r]=E,d[r+1]=N,d[r+2]=A;r+=u}else for(let o=0;o<a;++o)v(3*c[o]),d[r]=E,d[r+1]=N,d[r+2]=A,r+=u;else for(let o=0;o<a;++o){if(v(3*c[o]),T){const e=E*E+N*N+A*A;if(e<S&&e>R){const t=1/Math.sqrt(e);E*=t,N*=t,A*=t}}for(let e=0;e<s;++e)d[r]=E,d[r+1]=N,d[r+2]=A,r+=u}}function E(e,t,f,r,o=1){if(!t)return void h(e,f,r,o);const{data:s,indices:n}=e,c=t,l=f.typedBuffer,d=f.typedBufferStride,u=n.length,a=c[0],p=c[1],g=c[2],B=c[4],y=c[5],b=c[6],m=c[8],O=c[9],F=c[10],I=!i(c),T=1e-6,R=1-T;if(r*=d,1===o)for(let i=0;i<u;++i){const e=4*n[i],t=s[e],f=s[e+1],o=s[e+2],c=s[e+3];let u=a*t+B*f+m*o,h=p*t+y*f+O*o,S=g*t+b*f+F*o;if(I){const e=u*u+h*h+S*S;if(e<R&&e>T){const t=1/Math.sqrt(e);u*=t,h*=t,S*=t}}l[r]=u,l[r+1]=h,l[r+2]=S,l[r+3]=c,r+=d}else for(let i=0;i<u;++i){const e=4*n[i],t=s[e],f=s[e+1],c=s[e+2],u=s[e+3];let h=a*t+B*f+m*c,S=p*t+y*f+O*c,E=g*t+b*f+F*c;if(I){const e=h*h+S*S+E*E;if(e<R&&e>T){const t=1/Math.sqrt(e);h*=t,S*=t,E*=t}}for(let i=0;i<o;++i)l[r]=h,l[r+1]=S,l[r+2]=E,l[r+3]=u,r+=d}}function N(e,t,f,r,o=1){const{data:i,indices:s}=e,n=f.typedBuffer,c=f.typedBufferStride,l=s.length;if(r*=c,t!==i.length||4!==t)if(1!==o)if(4!==t)for(let d=0;d<l;++d){const e=3*s[d];for(let t=0;t<o;++t)n[r]=i[e],n[r+1]=i[e+1],n[r+2]=i[e+2],n[r+3]=255,r+=c}else for(let d=0;d<l;++d){const e=4*s[d];for(let t=0;t<o;++t)n[r]=i[e],n[r+1]=i[e+1],n[r+2]=i[e+2],n[r+3]=i[e+3],r+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*s[e];n[r]=i[t],n[r+1]=i[t+1],n[r+2]=i[t+2],n[r+3]=i[t+3],r+=c}return}for(let e=0;e<l;++e){const t=3*s[e];n[r]=i[t],n[r+1]=i[t+1],n[r+2]=i[t+2],n[r+3]=255,r+=c}}else{n[r]=i[0],n[r+1]=i[1],n[r+2]=i[2],n[r+3]=i[3];const e=new Uint32Array(f.typedBuffer.buffer,f.start),t=c/4,s=e[r/=4];r+=t;const d=l*o;for(let f=1;f<d;++f)e[r]=s,r+=t}}function A(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length,c=r[0];f*=s;for(let l=0;l<n;++l)i[f]=c,f+=s}function v(r,o,i,s){e(w,r,o);const n=Math.max(Math.sqrt(t(w)),1e-4);f(w,w,1/n),i[s++]=w[0],i[s++]=w[1],i[s++]=w[2],i[s++]=n}const w=r();function L(e,t,f,r,o=1){const i=t.typedBuffer,s=t.typedBufferStride;if(r*=s,1===o)for(let n=0;n<f;++n)i[r]=e[0],i[r+1]=e[1],i[r+2]=e[2],i[r+3]=e[3],r+=s;else for(let n=0;n<f;++n)for(let t=0;t<o;++t)i[r]=e[0],i[r+1]=e[1],i[r+2]=e[2],i[r+3]=e[3],r+=s}function k(e,t,f,r,o,i,n){let c={numItems:0,numVerticesPerItem:0};for(const l of f.fields.keys()){const f=e.get(l),d=f?.indices;if(f&&d)l===y.POSITION&&(c={numItems:1,numVerticesPerItem:d.length}),z(l,f,r,o,i,n);else if(l===y.OLIDCOLOR&&null!=t){const f=e.get(y.POSITION)?.indices;if(f){const e=f.length;L(t,i.getField(l,s),e,n)}}}return c}function z(e,t,f,r,o,i){switch(e){case y.POSITION:{B(3===t.size);const r=o.getField(e,c);B(!!r,`No buffer view for ${e}`),R(t,f,r,i);break}case y.NORMAL:{B(3===t.size);const f=o.getField(e,c);B(!!f,`No buffer view for ${e}`),S(t,r,f,i);break}case y.NORMALCOMPRESSED:case y.PROFILERIGHT:case y.PROFILEUP:{B(2===t.size);const f=o.getField(e,a);B(!!f,`No buffer view for ${e}`),m(t,f,i);break}case y.UV0:{B(2===t.size);const f=o.getField(e,p)??o.getField(e,g);B(!!f,`No buffer view for ${e}`),m(t,f,i);break}case y.UVI:{B(2===t.size);const f=o.getField(e,a);B(!!f,`No buffer view for ${e}`),m(t,f,i);break}case y.COLOR:case y.SYMBOLCOLOR:{const f=o.getField(e,s);B(!!f,`No buffer view for ${e}`),B(3===t.size||4===t.size),N(t,t.size,f,i);break}case y.COLORFEATUREATTRIBUTE:case y.OPACITYFEATUREATTRIBUTE:case y.SIZEFEATUREATTRIBUTE:{const f=o.getField(e,u)??o.getField(e,u);B(!!f,`No buffer view for ${e}`),B(1===t.size),A(t,f,i);break}case y.TANGENT:{B(4===t.size);const r=o.getField(e,d);B(!!r,`No buffer view for ${e}`),E(t,f,r,i);break}case y.PROFILEVERTEXANDNORMAL:{B(4===t.size);const f=o.getField(e,l)??o.getField(e,d);B(!!f,`No buffer view for ${e}`),h(t,f,i);break}case y.PROFILEAUXDATA:{B(3===t.size);const f=o.getField(e,n)??o.getField(e,c);B(!!f,`No buffer view for ${e}`),O(t,f,i);break}}}export{b as writeBufferFloat,I as writeBufferMat3f,T as writeBufferMat4f,m as writeBufferVec2,O as writeBufferVec3,h as writeBufferVec4,F as writeBufferVec4Zeros,N as writeColor,z as writeDefaultAttribute,k as writeDefaultAttributes,v as writeDeltaF16Vector,S as writeNormal,L as writeOlidColor,R as writePosition,E as writeTangent,A as writeVVFeatureAttribute};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{isColorOrColorEmission as e}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShaderModule as i}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as t,depthOnlyOutputBuffersOr as r}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as l,oitDepthTest as n,blending as s,getDrawBuffers as o}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as p}from"../lib/RenderSlot.js";import{stencilToolMaskBaseParams as c,stencilBaseAllZerosParams as u,stencilWriteMaskOn as a,stencilToolTransparentOccluderParams as d,depthCompareAlways as T,stencilToolMaskOccluderParams as h,stencilWriteMaskOff as m,depthCompareLess as P}from"../lib/StencilUtils.js";import{VertexAttribute as E}from"../lib/VertexAttribute.js";import{L as O}from"../../../../chunks/LineMarker.glsl.js";import{LineMarkerSpace as R}from"./LineMarkerTechniqueConfiguration.js";import{makePipelineState as f,defaultColorWrite as _,unpremultipliedAlphaToPremultipliedAlpha as A}from"../../../webgl/renderState.js";class S extends t{constructor(e,t){super(e,t,new i(O,(()=>import("./LineMarker.glsl.js"))),W)}_makePipelineState(i,t){const{output:p,oitPass:d,space:T,hasOccludees:h}=i;return f({blending:e(p)?s(d):null,depthTest:T===R.Draped?null:{func:n(d)},depthWrite:l(i),drawBuffers:r(p,o(d,p)),colorWrite:_,stencilWrite:h?a:null,stencilTest:h?t?c:u:null,polygonOffset:{factor:0,units:-10}})}initializePipeline(e){return e.occluder?(this._occluderPipelineTransparent=f({blending:A,depthTest:T,depthWrite:null,colorWrite:_,stencilWrite:null,stencilTest:d}),this._occluderPipelineOpaque=f({blending:A,depthTest:T,depthWrite:null,colorWrite:_,stencilWrite:m,stencilTest:h}),this._occluderPipelineMaskWrite=f({blending:null,depthTest:P,depthWrite:null,colorWrite:null,stencilWrite:a,stencilTest:c})):this._occluderPipelineTransparent=this._occluderPipelineOpaque=this._occluderPipelineMaskWrite=null,this._occludeePipelineState=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,i){return e?this._occludeePipelineState:i===p.TRANSPARENT_OCCLUDER_MATERIAL?this._occluderPipelineTransparent??super.getPipeline():i===p.OCCLUDER_MATERIAL?this._occluderPipelineOpaque??super.getPipeline():this._occluderPipelineMaskWrite??super.getPipeline()}}const W=new Map([[E.POSITION,0],[E.PREVIOUSDELTA,1],[E.UV0,2],[E.NORMAL,3],[E.COLOR,4],[E.COLORFEATUREATTRIBUTE,4],[E.SIZE,5],[E.SIZEFEATUREATTRIBUTE,5],[E.OPACITYFEATUREATTRIBUTE,6]]);export{S as LineMarkerTechnique,W as vertexAttributeLocations};
5
+ import{isColorOrColorEmission as e}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShaderModule as i}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as t,depthOnlyOutputBuffersOr as r}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as l,oitDepthTest as n,blending as s,getDrawBuffers as o}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as p}from"../lib/RenderSlot.js";import{stencilToolMaskBaseParams as c,stencilBaseAllZerosParams as u,stencilWriteMaskOn as a,stencilToolTransparentOccluderParams as d,depthCompareAlways as T,stencilToolMaskOccluderParams as h,stencilWriteMaskOff as m,depthCompareLess as P}from"../lib/StencilUtils.js";import{VertexAttribute as E}from"../lib/VertexAttribute.js";import{L as O}from"../../../../chunks/LineMarker.glsl.js";import{LineMarkerSpace as R}from"./LineMarkerTechniqueConfiguration.js";import{makePipelineState as f,defaultColorWrite as _,unpremultipliedAlphaToPremultipliedAlpha as A}from"../../../webgl/renderState.js";class S extends t{constructor(e,t){super(e,t,new i(O,(()=>import("./LineMarker.glsl.js"))),W)}_makePipelineState(i,t){const{output:p,oitPass:d,space:T,hasOccludees:h}=i;return f({blending:e(p)?s(d):null,depthTest:T===R.Draped?null:{func:n(d)},depthWrite:l(i),drawBuffers:r(p,o(d,p)),colorWrite:_,stencilWrite:h?a:null,stencilTest:h?t?c:u:null,polygonOffset:{factor:0,units:-10}})}initializePipeline(e){return e.occluder?(this._occluderPipelineTransparent=f({blending:A,depthTest:T,depthWrite:null,colorWrite:_,stencilWrite:null,stencilTest:d}),this._occluderPipelineOpaque=f({blending:A,depthTest:T,depthWrite:null,colorWrite:_,stencilWrite:m,stencilTest:h}),this._occluderPipelineMaskWrite=f({blending:null,depthTest:P,depthWrite:null,colorWrite:null,stencilWrite:a,stencilTest:c})):this._occluderPipelineTransparent=this._occluderPipelineOpaque=this._occluderPipelineMaskWrite=null,this._occludeePipelineState=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,i){return e?this._occludeePipelineState:i===p.TRANSPARENT_OCCLUDER_MATERIAL?this._occluderPipelineTransparent??super.getPipeline():i===p.OCCLUDER_MATERIAL?this._occluderPipelineOpaque??super.getPipeline():this._occluderPipelineMaskWrite??super.getPipeline()}}const W=new Map([[E.POSITION,0],[E.PREVIOUSDELTA,1],[E.UV0,2],[E.COLOR,3],[E.COLORFEATUREATTRIBUTE,3],[E.OPACITYFEATUREATTRIBUTE,4],[E.SIZE,5],[E.SIZEFEATUREATTRIBUTE,5],[E.NORMAL,6]]);export{S as LineMarkerTechnique,W as vertexAttributeLocations};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../core/has.js";import{isColorOrColorEmission as e}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShaderModule as t}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as i,depthOnlyOutputBuffersOr as r}from"../core/shaderTechnique/ShaderTechnique.js";import{OITPass as l}from"../lib/OITPass.js";import{OITPolygonOffset as n,depthWrite as s,oitDepthTest as o,blending as u,getDrawBuffers as p}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as c}from"../lib/RenderSlot.js";import{stencilToolMaskBaseParams as a,stencilBaseAllZerosParams as d,stencilWriteMaskOn as T,stencilToolTransparentOccluderParams as f,depthCompareAlways as h,stencilToolMaskOccluderParams as m,stencilWriteMaskOff as O,depthCompareLess as E}from"../lib/StencilUtils.js";import{VertexAttribute as P}from"../lib/VertexAttribute.js";import{R}from"../../../../chunks/RibbonLine.glsl.js";import{PrimitiveType as A}from"../../../webgl/enums.js";import{makePipelineState as b,defaultColorWrite as g,unpremultipliedAlphaToPremultipliedAlpha as I}from"../../../webgl/renderState.js";class S extends i{constructor(e,i){super(e,i,new t(R,(()=>import("./RibbonLine.glsl.js"))),_),this.primitiveType=i.wireframe?A.LINES:A.TRIANGLE_STRIP}_makePipelineState(t,i){const{oitPass:c,output:f,hasOccludees:h,hasPolygonOffset:m}=t,O=c===l.NONE,E=c===l.FrontFace;return b({blending:e(f)?u(c):null,depthTest:{func:o(c)},depthWrite:s(t),drawBuffers:r(f,p(c,f)),colorWrite:g,stencilWrite:h?T:null,stencilTest:h?i?a:d:null,polygonOffset:O||E?m?L:null:n})}initializePipeline(e){if(e.occluder){const t=e.hasPolygonOffset?L:null,{output:i,hasOccludees:l}=e;this._occluderPipelineTransparent=b({blending:I,polygonOffset:t,depthTest:h,depthWrite:null,colorWrite:g,stencilWrite:null,stencilTest:l?f:null,drawBuffers:r(i)}),this._occluderPipelineOpaque=b({blending:I,polygonOffset:t,depthTest:l?h:E,depthWrite:null,colorWrite:g,stencilWrite:l?O:null,stencilTest:l?m:null,drawBuffers:r(i)}),this._occluderPipelineMaskWrite=b({blending:null,polygonOffset:t,depthTest:E,depthWrite:null,colorWrite:null,stencilWrite:l?T:null,stencilTest:l?a:null,drawBuffers:r(i)})}return this._occludeePipeline=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t){if(e)return this._occludeePipeline;switch(t){case c.TRANSPARENT_OCCLUDER_MATERIAL:return this._occluderPipelineTransparent??super.getPipeline();case c.OCCLUDER_MATERIAL:return this._occluderPipelineOpaque??super.getPipeline();default:return this._occluderPipelineMaskWrite??super.getPipeline()}}}const L={factor:0,units:-4},_=new Map([[P.POSITION,0],[P.PREVIOUSDELTA,1],[P.NEXTDELTA,2],[P.U0,3],[P.LINEPARAMETERS,4],[P.SIZE,5],[P.SIZEFEATUREATTRIBUTE,5],[P.COLOR,6],[P.COLORFEATUREATTRIBUTE,6],[P.OPACITYFEATUREATTRIBUTE,7],[P.OLIDCOLOR,8]]);export{S as RibbonLineTechnique,_ as vertexAttributeLocations};
5
+ import"../../../../core/has.js";import{isColorOrColorEmission as e}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShaderModule as t}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as i,depthOnlyOutputBuffersOr as r}from"../core/shaderTechnique/ShaderTechnique.js";import{OITPass as l}from"../lib/OITPass.js";import{OITPolygonOffset as n,depthWrite as s,oitDepthTest as o,blending as u,getDrawBuffers as p}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as c}from"../lib/RenderSlot.js";import{stencilToolMaskBaseParams as a,stencilBaseAllZerosParams as d,stencilWriteMaskOn as T,stencilToolTransparentOccluderParams as f,depthCompareAlways as h,stencilToolMaskOccluderParams as m,stencilWriteMaskOff as O,depthCompareLess as E}from"../lib/StencilUtils.js";import{VertexAttribute as P}from"../lib/VertexAttribute.js";import{R}from"../../../../chunks/RibbonLine.glsl.js";import{PrimitiveType as A}from"../../../webgl/enums.js";import{makePipelineState as b,defaultColorWrite as g,unpremultipliedAlphaToPremultipliedAlpha as I}from"../../../webgl/renderState.js";class S extends i{constructor(e,i){super(e,i,new t(R,(()=>import("./RibbonLine.glsl.js"))),_),this.primitiveType=i.wireframe?A.LINES:A.TRIANGLE_STRIP}_makePipelineState(t,i){const{oitPass:c,output:f,hasOccludees:h,hasPolygonOffset:m}=t,O=c===l.NONE,E=c===l.FrontFace;return b({blending:e(f)?u(c):null,depthTest:{func:o(c)},depthWrite:s(t),drawBuffers:r(f,p(c,f)),colorWrite:g,stencilWrite:h?T:null,stencilTest:h?i?a:d:null,polygonOffset:O||E?m?L:null:n})}initializePipeline(e){if(e.occluder){const t=e.hasPolygonOffset?L:null,{output:i,hasOccludees:l}=e;this._occluderPipelineTransparent=b({blending:I,polygonOffset:t,depthTest:h,depthWrite:null,colorWrite:g,stencilWrite:null,stencilTest:l?f:null,drawBuffers:r(i)}),this._occluderPipelineOpaque=b({blending:I,polygonOffset:t,depthTest:l?h:E,depthWrite:null,colorWrite:g,stencilWrite:l?O:null,stencilTest:l?m:null,drawBuffers:r(i)}),this._occluderPipelineMaskWrite=b({blending:null,polygonOffset:t,depthTest:E,depthWrite:null,colorWrite:null,stencilWrite:l?T:null,stencilTest:l?a:null,drawBuffers:r(i)})}return this._occludeePipeline=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t){if(e)return this._occludeePipeline;switch(t){case c.TRANSPARENT_OCCLUDER_MATERIAL:return this._occluderPipelineTransparent??super.getPipeline();case c.OCCLUDER_MATERIAL:return this._occluderPipelineOpaque??super.getPipeline();default:return this._occluderPipelineMaskWrite??super.getPipeline()}}}const L={factor:0,units:-4},_=new Map([[P.POSITION,0],[P.PREVIOUSDELTA,1],[P.NEXTDELTA,2],[P.U0,3],[P.LINEPARAMETERS,4],[P.COLOR,5],[P.COLORFEATUREATTRIBUTE,5],[P.SIZE,6],[P.SIZEFEATUREATTRIBUTE,6],[P.OPACITYFEATUREATTRIBUTE,7],[P.OLIDCOLOR,8]]);export{S as RibbonLineTechnique,_ as vertexAttributeLocations};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../Camera.js";import i from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as s}from"../core/domUtils.js";import n from"../core/Error.js";import{on as a}from"../core/events.js";import{makeHandle as o}from"../core/handleUtils.js";import has from"../core/has.js";import l from"../core/Logger.js";import{destroyMaybe as p,maybeProperty as h}from"../core/maybe.js";import{ObservableChangesType as d}from"../core/ObservableChangesType.js";import{throwIfAborted as u}from"../core/promiseUtils.js";import{on as c,watch as g,initial as m,sync as y,whenOnce as f,syncAndInitial as w}from"../core/reactiveUtils.js";import{setFrameDuration as v}from"../core/scheduling.js";import{createScreenPointArray as _,createScreenPoint as b}from"../core/screenUtils.js";import{getMetersPerUnitForSR as M}from"../core/unitUtils.js";import{initialize as S}from"../core/workers/workers.js";import{property as V}from"../core/accessorSupport/decorators/property.js";import{cast as j}from"../core/accessorSupport/decorators/cast.js";import"../core/RandomLCG.js";import{subclass as R}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as C,ensureClass as O}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as T}from"../core/accessorSupport/overrideDefaultsFrom.js";import{create as x}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{owningCollectionProperty as E}from"../core/support/OwningCollection.js";import A from"../geometry/Extent.js";import L from"../geometry/HeightModelInfo.js";import H from"../geometry/Point.js";import{project as I,canProjectWithoutEngine as D}from"../geometry/projectionUtils.js";import G from"../geometry/SpatialReference.js";import{projectBoundingRect as F}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as P}from"../geometry/projection/projectPointToVector.js";import{create as U,toExtent as W}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as q}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as z}from"../geometry/support/scaleUtils.js";import{isImageryTileLayer as k,isTiledLayer as B,isVoxelLayer as N,isIntegratedMeshLayer as Q}from"../layers/support/layerUtils.js";import{AnalysesCollection as Y}from"../support/AnalysesCollection.js";import{WebSceneTag as Z}from"../support/tagSymbols.js";import{BreakpointsOwner as $}from"./BreakpointsOwner.js";import{DOMContainer as J}from"./DOMContainer.js";import K from"./GroundView.js";import{PopupView as X}from"./PopupView.js";import ee from"./View.js";import te from"./ViewAnimation.js";import{ViewingMode as ie,stringFromViewingMode as re,viewingModeFromString as se}from"./ViewingMode.js";import{layerView3DImporter as ne}from"./3d/layerViewModuleImportUtils.js";import ae from"./3d/analysis/AnalysisViewManager3D.js";import{Constraints as oe}from"./3d/constraints/Constraints.js";import{EnvironmentManager as le}from"./3d/environment/EnvironmentManager.js";import pe from"./3d/environment/SceneViewEnvironment.js";import he from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as de}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as ue}from"./3d/layers/graphics/Labeler.js";import{FeatureTileTree3D as ce}from"./3d/layers/support/FeatureTileTree3D.js";import ge from"./3d/state/ViewState.js";import{ViewStateManager as me}from"./3d/state/ViewStateManager.js";import{SceneIntersectionHelper as ye}from"./3d/state/helpers/SceneIntersectionHelper.js";import{CombinedElevationProvider as fe}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as we}from"./3d/support/debugFlags.js";import ve from"./3d/support/DisplayQualityProfile.js";import{getElevationAtPoint as _e}from"./3d/support/ElevationProvider.js";import{toMap as be,hitTest as Me}from"./3d/support/hitTest.js";import{popupHitTest as Se}from"./3d/support/popupHitTest.js";import Ve from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as je}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Re}from"./3d/support/ResourceController.js";import Ce from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Oe}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as Te}from"./3d/support/ViewSlice.js";import{PointsOfInterest as xe}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Ee from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as Ae,getTiledLayerInfo as Le,checkIfTileInfoSupportedForView as He}from"./3d/terrain/terrainUtils.js";import{Stage as Ie}from"./3d/webgl-engine/Stage.js";import{olidEnabled as De}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{defaultTolerance as Ge}from"./3d/webgl-engine/lib/Intersector.js";import{terrainId as Fe}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{defaultHighlightName as Pe}from"./support/HighlightDefaults.js";import Ue from"./support/HighlightOptions.js";import{occludeesSupported as We}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as qe,createScreenPointFromSupportedEvent as ze}from"./support/screenUtils.js";import{isSpatialReferenceSupported as ke}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as Be,destroyTextureCompressionWorker as Ne}from"./support/TextureCompressionHelper.js";import{check as Qe}from"./support/WebGLRequirements.js";import Ye from"./ui/DefaultUI.js";import Ze from"./ui/3d/DefaultUI3D.js";import $e from"../webscene/Environment.js";let Je=class extends($(X(J(ee)))){constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=Re(this),this.deconflictor=new de({view:this}),this.labeler=new ue({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.analyses=new Y,this.basemapTerrain=null,this.elevationProvider=null,this.canvas=null,this.constraints=new oe,this.environment=new pe,this.environmentManager=new le,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new ae({view:this}),this.groundView=null,this.map=null,this.screenSizePerspectiveEnabled=!0,this.state=new ge({view:this}),this.slice=new Te,this.spatialReference=null,this.alphaCompositingEnabled=!1,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new Ze,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,S();const t=(e=null)=>{null!=e&&e.type===d.MOVE||(this._updatingChanged(),this.map?.allLayers.forEach((async e=>{try{await e.when()}catch{}this._updatingChanged()})))};this.addHandles([c((()=>this.map?.allLayers),"after-changes",(e=>t(e)),{onListenerAdd:()=>t(),onListenerRemove:()=>t(),sync:!0}),this.allLayerViews.on("after-changes",(e=>this._updateUpdatingMonitors(e))),g((()=>this.scene),(e=>e?.load().catch((()=>{}))))]),this.inputManager=new he({view:this}),this.stateManager=new me({view:this})}initialize(){if(has("enable-feature:esri-compress-textures")&&has("wasm-simd")){const e=Be(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new K({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add((()=>this.qualitySettings.memoryLimit),(e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)}),m),this.updatingHandles.add((()=>this.qualitySettings.additionalCacheMemory),(e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)}),m),this.updatingHandles.add((()=>this.qualitySettings.frameRate??0),(e=>v(e>0?1e3/Math.ceil(e):0)),m),this.addHandles([g((()=>this.spatialReference),(()=>this.notifyChange("clippingArea")),y),g((()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration})),(()=>this._updateSlice()),y)])}destroy(){this.destroyed||(Ne(this),this.updatingHandles.removeAll(),this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._set("analysisViewManager",p(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=p(this.sharedSymbolResources),this._set("labeler",p(this.labeler)),this._set("deconflictor",p(this.deconflictor)),this._resourceController=p(this._resourceController),this._set("stateManager",p(this.stateManager)),this._set("inputManager",p(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles("updatingMonitors"),this._set("environmentManager",p(this.environmentManager)),this._set("environment",p(this.environment)),this.groundView=p(this.groundView),this._exitBasemapTerrain(),this.stage?.destroy(),this.slice.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get basemapSpatialReference(){return this.basemapTerrain?.spatialReference}get animation(){return this.state?.animation}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=e)}get clippingArea(){if("global"===this.viewingMode)return null;const e=this.map;let t=this._userClippingArea||h(e,"clippingArea");return!this._userClippingArea&&!h(e,"clippingEnabled")||null==t?(this._clippingArea=null,null):t instanceof A?this.spatialReference&&(t=Ke(t,this.spatialReference),null==t)?(l.getLogger(this).error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(t=t.clone(),null==t.intersection(this._groundAndLayersExtent)&&(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(l.getLogger(this).error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&null!=e?l.getLogger(this).error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===ie.Global)return null;const e=this.renderSpatialReference,t=this.dataExtent;return null==t||null==e||t.spatialReference.equals(e)?t:Ke(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent;const t=this.spatialReference||G.WGS84,i=Ke(this.clippingArea,t);null!=i&&(e=null!=e?e.intersection(i):i);const r=this._get("dataExtent");return null!=e&&e.equals(r)?r:e}get _groundAndLayersExtent(){const e=this.spatialReference||G.WGS84;let t;const i=i=>{const r=Ke(i,e);null!=r&&(null!=t?t.union(r):t=r.clone())},r=this.basemapTerrain;if(r?.spatialReference){const e=r.groundExtent;i(new A({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:r.spatialReference}))}const s=e=>{null==e.fullExtent||"graphics"===e.type&&e.internal||i(e.fullExtent)};if(this.map?.allLayers.forEach((e=>s(e))),null==t)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);const n=this._get("_groundAndLayersExtent");return t.equals(n)?n:t}castEnvironment(e){return e?e instanceof pe?e:e instanceof $e?this.environment?.cloneWithWebsceneEnvironment(e)??pe.fromWebsceneEnvironment(e):C(pe,e):new pe}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&Z in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}set qualityProfile(e){ve.isValidProfile(e)&&(ve.apply(e,this.qualitySettings),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||ve.getDefaultProfile()}_updateSlice(){null!=this.stage&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return!!this.viewingMode&&!!this.stateManager?.preinit(this.spatialReference)}get resolution(){return null!=this.spatialReference?z(this.scale,this.spatialReference):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?L.deriveUnitFromSR(e,this.spatialReference):null}get updating(){if(this.destroying||this.destroyed)return!1;let e=0,t=this.layerViewManager.updating,i=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach((r=>{if(r.isFulfilled()){if(r.updating){if(t=!0,r.suspended||Ae(r))return;++i,e+=r.updatingProgress}}else++i}));for(const s of this._updatingObjects)if(null!=s&&s.updating){const t=.1;i+=t,e+=.5*t}for(const s of this._updatingObjectsWithProgress)null!=s&&s.updating&&(++i,e+=s.updatingProgress);const r=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||i>0||this.updatingHandles.updating||!this.ready||!this.stationary||r||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some((e=>!e.isFulfilled()))),t?(this._numUpdating=Math.max(i,this._numUpdating),e+=this._numUpdating-i):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=t?0:1,this._get("updatingProgress")!==e){const i=performance.now();if(e<1){const t=Math.min((i-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set("updatingProgress",e),this._lastUpdateTime=t&&e<1?i:0}return t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get viewingMode(){const e=this._predeterminedViewingMode;if(null!=e)return re(e);const t=this.spatialReference;return t?null!=this.defaultsFromMap?.viewingMode&&t.equals(this.defaultsFromMap.spatialReference)?re(this.defaultsFromMap.viewingMode):ke(t,ie.Global)?"global":"local":"global"}set viewingMode(e){this.ready?l.getLogger(this).error("#viewingMode","viewingMode cannot be set once view is ready"):this._overrideIfSome("viewingMode",e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get highlightOptions(){return this.highlights.find((({name:e})=>e===Pe))??new Ue}set highlightOptions(e){for(let t=0;t<this.highlights.length;++t){if(this.highlights.at(t).name===Pe)return void this.highlights.items[t].assignFrom(e)}}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new Ce(this)}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return l.getLogger(this).error("#toMap()","Scene view cannot be used before it is ready"),null;const i=qe(e)?ze(this,e):e;return be(this,i,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return l.getLogger(this).error("#toScreen()","Scene view cannot be used before it is ready"),null;const t=(null==e.z?_e(this.elevationProvider,e):null)??0;return P(e,Xe,this.renderSpatialReference,t),this.state.camera.projectToScreen(Xe,et),b(et[0],et[1])}pixelSizeAt(e,t){if(!this.ready)return l.getLogger(this).error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null;if(!e)return 0;const i=this.renderSpatialReference;P(e,Xe,i);const r=this.state.camera.computeScreenPixelSizeAt(Xe);return t&&i!==t?r*M(i)/M(t):r}overlayPixelSizeInMapUnits(e){const t=this.basemapTerrain.overlayManager;return t?t.overlayPixelSizeInMapUnits(e,(()=>this.pixelSizeAt(e))):1}hitTest(e,t){if(!this.ready)return l.getLogger(this).error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=qe(e)?ze(this,e):e;return Me(this,i,t,this._defaultHitTestOptions)}async popupHitTest(e){return Se(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(null==e.parent)throw new n("view:no-analysisview-for-analysis","The analysis has not been added to view.analyses",{analysis:e});switch(e.parent.type){case"line-of-sight":case"dimension":case"viewshed":return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t);return(await import("./support/screenshotUtils.js")).encode(i,t,this._pixelFormat())}async _takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t);return(await import("./support/screenshotUtils.js")).encodeData(i,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){const t=await this._completeSettings(e);await this.whenReady();const i=await this.stage.renderView.takeScreenshotWithOID(t),{encodeData:r}=await import("./support/screenshotUtils.js");return[r(i[0],this._pixelFormat()),r(i[1],this._pixelFormat())]}async _completeSettings(e){const{toRenderSettings:t,screenshotSuperSampleSettings:i}=await import("./support/screenshotUtils.js"),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,i(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!De())throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true");const{encode:t}=await import("./support/screenshotUtils.js"),i=await this._completeSettings(e);await this.whenReady();const r=await this.stage.renderView.takeScreenshotWithOID(i),s=t(r[0],i,this._pixelFormat()),a=await this._completeSettings(e);a.format="png";return[s,t(r[1],a,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){const e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true")}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}importLayerView(e){return ne.importLayerView(e)}hasLayerViewModule(e){return ne.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.scene?.initialViewProperties?.spatialReference||this.defaultsFromMap?.spatialReference||this.defaultsFromMap?.ready&&this._initialDefaultSpatialReference||null}async validate(){let e=Qe(this.type);const t=has("safari");if(t&&t<9&&(e=new n("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:t})),null!=e)throw l.getLogger(this).warn("#validate()",e.message),e}get _predeterminedViewingMode(){const e=this._isOverridden("viewingMode")?this._get("viewingMode"):this.scene?.initialViewProperties?.viewingMode;return null!=e?se(e):null}getSpatialReferenceSupport(e,t){const i=this._predeterminedViewingMode;if(null!=i)return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,ie.Local),s=this._validateSpatialReferenceForViewingMode(e,t,ie.Global);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,ie.Local)}:{constraints:this._makeSpatialReferenceConstraints(e,t,ie.Global)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!ke(e,i)&&(null==t||(!!k(t)||(!B(t)||null!=Le(t,e,i))&&(!N(t)||i!==ie.Global)))}_makeSpatialReferenceConstraints(e,t,i){if(null==t)return[{spatialReference:e,viewingMode:i}];const{isWebMercator:r,isWGS84:s}=e;if(k(t)&&(r||s)){return!s||i===ie.Local||null===He(t.tileInfo,t.fullExtent,e,ie.Global)?[{spatialReference:e,viewingMode:i},{spatialReference:G.WebMercator,viewingMode:i}]:[{spatialReference:r?G.WGS84:G.WebMercator,viewingMode:i}]}return B(t)||N(t)||!r&&!s?B(t)&&r&&i!==ie.Global?[{spatialReference:e,viewingMode:i},{spatialReference:G.WGS84,viewingMode:ie.Local}]:[{spatialReference:e,viewingMode:i}]:[{spatialReference:e,viewingMode:i},{spatialReference:r?G.WGS84:G.WebMercator,viewingMode:i}]}_validateSpatialReference(e){const t=null!=this.getSpatialReferenceSupport(e),i=this._predeterminedViewingMode;return t||(null!=i?l.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${re(i)} viewing mode.`):e.isGeographic&&l.getLogger(this).warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}trackGraphicState(e){if(!e.graphic)return l.getLogger(this).error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&null!=t&&"processor"in t&&"graphics-3d"===t.processor?.type&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return null!=t?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),o((()=>{r=!0,null!=i&&(i.remove(),i=null)}))}maskOccludee(e){if(!e)return l.getLogger(this).error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&null!=t&&We(t)&&(i=t.maskOccludee(e))};return null!=t?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),o((()=>{r=!0,null!=i&&(i.remove(),i=null)}))}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter((e=>"media-3d"!==e.type)).find((t=>t.layer===e.layer)):null}graphicChanged(e){null!=this.graphicsView&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await f((()=>this.graphicsView)),this.graphicsView):e.layer&&this.map?t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise(((t,i)=>{const r=this.map.allLayers.on("change",(s=>{s.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))}))})):this.whenLayerView(e.layer):null}async _importModule(e,t){const i=new AbortController;this._importControllers.set(e,i),this._updatingChanged();try{const r=await it[e]();return t&&(u(i.signal),await t(i.signal)),u(i.signal),this._importControllers.delete(e),r}catch{this._importControllers.delete(e)}return null}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set("basemapTerrain",new Ee({view:this})),this._set("elevationProvider",new fe({view:this})),this.elevationProvider.register("ground",this.basemapTerrain)}_exitBasemapTerrain(){const e=this.basemapTerrain,t=this.elevationProvider;e&&(this._set("basemapTerrain",null),this._set("elevationProvider",null),t.unregister(e),t.destroy(),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new xe({view:this})),this._set("featureTiles",new ce({renderCoordsHelper:this.renderCoordsHelper,cameraOnSurface:this.pointsOfInterest.cameraOnSurface,focus:this.pointsOfInterest.focus,tilingSchemeOwner:this.basemapTerrain,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}));const e=()=>{const e=this.basemapTerrain?.extent;if(this.clippingArea||e)if(e&&this.basemapTerrain.spatialReference){const e=null!=this.basemapTerrain.extent&&null!=this.basemapTerrain.spatialReference?I(W(this.basemapTerrain.extent,this.basemapTerrain.spatialReference),this.spatialReference):null;this.clippingArea?this.featureTiles.filterExtent=this.clippingArea.intersection(e):this.featureTiles.filterExtent=e}else this.featureTiles.filterExtent=this.clippingArea;else this.featureTiles.filterExtent=null};this.addHandles([this.updatingHandles.add((()=>we.FEATURE_TILE_TREE_SHOW_TILES),(e=>{e&&this.featureTiles&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then((({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&we.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))})):e||!this._featureTreeDebugger||we.FEATURE_TILE_TREE_SHOW_TILES||(this._featureTreeDebugger.destroy(),this._featureTreeDebugger=null)}),w),this.updatingHandles.add((()=>this.clippingArea),e,w),this.updatingHandles.add((()=>this.basemapTerrain.extent),e,w)],"feature-tiles"),this.stateManager.init()}_exitGlobe(){this.featureTiles&&(this.stateManager.exit(),this.removeHandles("render-coords-helper"),this.removeHandles("feature-tiles"),this._set("featureTiles",p(this.featureTiles)),this._set("pointsOfInterest",p(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem())}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference,t=this.state.isGlobal,i=q(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",je.create(this.state.viewingMode,i)),t||this.addHandles(g((()=>this.basemapTerrain?.extent),(e=>{const t=this.renderCoordsHelper.spatialReference;null==e||0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!F(e,this.basemapTerrain.spatialReference,tt,t)||(this.renderCoordsHelper.extent=tt)}),y),"render-coords-helper"),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(Ge/this.renderCoordsHelper.unitInMeters))}else this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.removeHandles("render-coords-helper"),this._set("renderCoordsHelper",null)}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){null!=e&&e.type===d.MOVE||(this.removeHandles("updatingMonitors"),this.allLayerViews.forEach((e=>{e.destroyed||(this.addHandles(g((()=>[e.updating,e.updatingProgress]),(()=>this._updatingChanged()),y),"updatingMonitors"),e.when((()=>this._updatingChanged()),(()=>this._updatingChanged())))})),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,i){if(!this.overlay||!this.overlay.hasVisibleItems)return i;const r=e.getContext("2d",{willReadFrequently:!0});return r.putImageData(i,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,i.width,i.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,i)=>this._renderScreenshotOverlay(e,t,i)}},t=new ye(this.state.viewingMode,(e=>this.stage.layers.forAll(e)),this);this._set("sceneIntersectionHelper",t);const i=s(this.surface);this._stage=new Ie({view:this,options:e,container:i}),this._updateSlice(),this.addHandles([this.updatingHandles.add((()=>this.qualitySettings.highQualityTransparency),(e=>this.stage.renderer.setParameters({highQualityTransparency:e})),m),this.on("pointer-move",(()=>this.stage?.renderer.resetAnimation())),a(this.stage.renderView.canvas,"webglcontextlost",(e=>{this.fatalError=new n("webgl-context-lost",e.statusMessage)}))],"stage"),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(Ge/this.renderCoordsHelper.unitInMeters),this._set("canvas",this.stage.renderView.canvas)}_exitStage(){this._set("sceneIntersectionHelper",null),this._stage=p(this.stage),this.removeHandles("stage"),this._set("canvas",null)}_initSurface(e){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Oe({view:this,viewingMode:e,resourceController:this._resourceController,pointsOfInterest:this.pointsOfInterest,viewState:this.state})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitGlobe(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has("GraphicsView3D")||0===this.graphics.length)return;this.removeHandles("GraphicsView3D");const e=(await this._importModule("GraphicsView3D",(e=>f((()=>this.basemapTerrain?.ready),e))))?.default;e&&this._set("graphicsView",new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport("GraphicsView3D"),this.removeHandles("GraphicsView3D"),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_disposeFocusAreasView(){this._abortImport("FocusAreasView"),this.removeHandles("FocusAreasView"),this.focusAreasView=p(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has("FocusAreasView")||0===e)return;this.removeHandles("FocusAreasView");const t=(await this._importModule("FocusAreasView"))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){const e=se(this.viewingMode);e===ie.Global&&(this._clippingArea=null),this._initSurface(e),this._set("ready",!0),this.addHandles(c((()=>this.graphics),"after-changes",(()=>this._ensureGraphicsView())),"GraphicsView3D"),this._ensureGraphicsView(),this.addHandles(g((()=>this.map?.focusAreas?.areas.length??0),(e=>this._ensureFocusAreasView(e)),{initial:!0}),"FocusAreasView");const t=this.scene?.initialViewProperties??null,i=t?.environment;i&&(this._overrideDefaultEnvironmentOnly?T(this.environment,i):this.environment=this.environment.cloneWithWebsceneEnvironment(i)),this.timeExtent=t?.timeExtent,t?.analyses.applyTo(this),this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const r=this._resolveWhenReady;this._resolveWhenReady=[],r.forEach((e=>e(this)))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set("ready",!1)}get _defaultToMapOptions(){const e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(Fe);for(const t of this.allLayerViews)Q(t.layer.type)&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){const e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(Fe);for(const t of this.allLayerViews)Q(t.layer.type)&&t.layer.opacity<1&&e.exclude.add(t.uid);return e}static{this.type="3d"}};function Ke(e,t){return null!=e&&D(e.spatialReference,t)?I(e,t):null}e([V()],Je.prototype,"_userClippingArea",void 0),e([V()],Je.prototype,"_resourceController",void 0),e([V()],Je.prototype,"_stage",void 0),e([V({readOnly:!0})],Je.prototype,"deconflictor",void 0),e([V({readOnly:!0})],Je.prototype,"labeler",void 0),e([V(E(Y,"analyses"))],Je.prototype,"analyses",void 0),e([V({type:te,readOnly:!0})],Je.prototype,"animation",null),e([V({readOnly:!0})],Je.prototype,"basemapTerrain",void 0),e([V({readOnly:!0})],Je.prototype,"elevationProvider",void 0),e([V()],Je.prototype,"camera",null),e([V({type:t})],Je.prototype,"contentCamera",null),e([V({readOnly:!0})],Je.prototype,"canvas",void 0),e([V({type:H})],Je.prototype,"center",null),e([V({type:A})],Je.prototype,"clippingArea",null),e([V({type:oe})],Je.prototype,"constraints",void 0),e([V({type:A,readOnly:!0})],Je.prototype,"renderDataExtent",null),e([V({readOnly:!0})],Je.prototype,"tileInfo",null),e([V({type:A,readOnly:!0})],Je.prototype,"dataExtent",null),e([V({type:A,readOnly:!0})],Je.prototype,"_groundAndLayersExtent",null),e([V({type:pe})],Je.prototype,"environment",void 0),e([j("environment")],Je.prototype,"castEnvironment",null),e([V({readOnly:!0})],Je.prototype,"environmentManager",void 0),e([V({type:A})],Je.prototype,"extent",null),e([V({type:r})],Je.prototype,"floors",void 0),e([V()],Je.prototype,"screenCenter",null),e([V()],Je.prototype,"frustum",null),e([V({type:Number,readOnly:!0})],Je.prototype,"fullOpacity",void 0),e([V({readOnly:!0})],Je.prototype,"graphicsView",void 0),e([V({readOnly:!0})],Je.prototype,"analysisViewManager",void 0),e([V()],Je.prototype,"groundView",void 0),e([V({type:Boolean})],Je.prototype,"initialExtentRequired",null),e([V()],Je.prototype,"defaultsFromMapSettings",null),e([V()],Je.prototype,"interacting",null),e([V()],Je.prototype,"stationary",null),e([V()],Je.prototype,"navigating",null),e([V()],Je.prototype,"map",void 0),e([V()],Je.prototype,"padding",null),e([V({type:xe,readOnly:!0})],Je.prototype,"pointsOfInterest",void 0),e([V({type:ce,readOnly:!0})],Je.prototype,"featureTiles",void 0),e([V()],Je.prototype,"_featureTreeDebugger",void 0),e([V({type:Boolean})],Je.prototype,"screenSizePerspectiveEnabled",void 0),e([V({constructOnly:!0})],Je.prototype,"deactivatedWebGLExtensions",void 0),e([V({constructOnly:!0})],Je.prototype,"debugWebGLExtensions",void 0),e([V({constructOnly:!0})],Je.prototype,"renderCanvas",void 0),e([V({constructOnly:!0})],Je.prototype,"state",void 0),e([V({readOnly:!0})],Je.prototype,"inputManager",void 0),e([V({readOnly:!0})],Je.prototype,"stateManager",void 0),e([V({type:["low","medium","high"]})],Je.prototype,"qualityProfile",null),e([V({type:Ve,get(){let e=this._get("qualitySettings");return e||(e=new Ve,ve.apply(this.qualityProfile,e)),e}})],Je.prototype,"qualitySettings",void 0),e([V()],Je.prototype,"slice",void 0),e([V({readOnly:!0})],Je.prototype,"typeSpecificPreconditionsReady",null),e([V({readOnly:!0})],Je.prototype,"renderCoordsHelper",void 0),e([V({readOnly:!0})],Je.prototype,"sceneIntersectionHelper",void 0),e([V({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],Je.prototype,"resolution",null),e([V({type:Number})],Je.prototype,"scale",null),e([V()],Je.prototype,"heightModelInfo",null),e([V()],Je.prototype,"spatialReference",void 0),e([V({type:Boolean,constructOnly:!0})],Je.prototype,"alphaCompositingEnabled",void 0),e([V({constructOnly:!0})],Je.prototype,"preserveDrawingBufferEnabled",void 0),e([V({type:Boolean})],Je.prototype,"supersampleScreenshotsEnabled",void 0),e([V({readOnly:!0})],Je.prototype,"type",void 0),e([V(),j((e=>e instanceof Ye?e:O(Ze,e)))],Je.prototype,"ui",void 0),e([V({type:Boolean,readOnly:!0,dependsOn:["graphicsView.updating","basemapView.updating","basemapTerrain.updating","layerViewManager.updating","layerViewManager.updatingRemaining","_resourceController.updating","stage.updating","featureTiles.updating","pointsOfInterest.updating","environmentManager.updating","overlay.updating","updatingHandles.updating","featureTreeDebugger.updating","labeler.updating","deconflictor.updating","ready","stationary","inputManager.updating","toolViewManager.updating","analysisViewManager.updating","state.updating","textures.updating"]})],Je.prototype,"updating",null),e([V()],Je.prototype,"_updatingObjects",null),e([V()],Je.prototype,"_updatingObjectsWithProgress",null),e([V({type:Number,readOnly:!0,dependsOn:["updating"]})],Je.prototype,"updatingProgress",void 0),e([V({type:["global","local"]})],Je.prototype,"viewingMode",null),e([V({type:i})],Je.prototype,"viewpoint",null),e([V({readOnly:!0})],Je.prototype,"visibleArea",null),e([V({type:Number})],Je.prototype,"zoom",null),e([V({type:Ue})],Je.prototype,"highlightOptions",null),e([V({readOnly:!0})],Je.prototype,"quality",null),e([V({readOnly:!0})],Je.prototype,"resolutionScale",null),e([V()],Je.prototype,"focusAreasView",void 0),e([V()],Je.prototype,"_defaultToMapOptions",null),e([V()],Je.prototype,"_defaultHitTestOptions",null),Je=e([R("esri.views.SceneView")],Je);const Xe=x(),et=_(),tt=U(),it={GraphicsView3D:()=>import("./3d/layers/GraphicsView3D.js"),FocusAreasView:()=>import("./3d/FocusAreasView.js")},rt=Je;export{rt as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../Camera.js";import i from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as s}from"../core/domUtils.js";import n from"../core/Error.js";import{on as a}from"../core/events.js";import{makeHandle as o}from"../core/handleUtils.js";import has from"../core/has.js";import l from"../core/Logger.js";import{destroyMaybe as p,maybeProperty as h}from"../core/maybe.js";import{ObservableChangesType as d}from"../core/ObservableChangesType.js";import{throwIfAborted as c}from"../core/promiseUtils.js";import{on as u,watch as g,initial as m,sync as y,whenOnce as f,syncAndInitial as w}from"../core/reactiveUtils.js";import{setFrameDuration as v}from"../core/scheduling.js";import{createScreenPointArray as _,createScreenPoint as b}from"../core/screenUtils.js";import{cleanupWhereClauseCache as M}from"../core/sql.js";import{getMetersPerUnitForSR as S}from"../core/unitUtils.js";import{initialize as V}from"../core/workers/workers.js";import{property as j}from"../core/accessorSupport/decorators/property.js";import{cast as R}from"../core/accessorSupport/decorators/cast.js";import"../core/RandomLCG.js";import{subclass as C}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as T,ensureClass as O}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as x}from"../core/accessorSupport/overrideDefaultsFrom.js";import{drainNotificationQueue as E}from"../core/accessorSupport/trackingUtils.js";import{create as A}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{owningCollectionProperty as L}from"../core/support/OwningCollection.js";import H from"../geometry/Extent.js";import I from"../geometry/HeightModelInfo.js";import D from"../geometry/Point.js";import{project as G,canProjectWithoutEngine as P}from"../geometry/projectionUtils.js";import F from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as U}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as W}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as q}from"../geometry/projection/projectPointToVector.js";import{create as k,toExtent as z}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as B}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as N}from"../geometry/support/scaleUtils.js";import{isImageryTileLayer as Q,isTiledLayer as Y,isVoxelLayer as Z,isIntegratedMeshLayer as $}from"../layers/support/layerUtils.js";import{clearDefaultPortalInstance as J}from"../portal/portalDefault.js";import{AnalysesCollection as K}from"../support/AnalysesCollection.js";import{WebSceneTag as X}from"../support/tagSymbols.js";import{BreakpointsOwner as ee}from"./BreakpointsOwner.js";import{DOMContainer as te}from"./DOMContainer.js";import ie from"./GroundView.js";import{PopupView as re}from"./PopupView.js";import se from"./View.js";import ne from"./ViewAnimation.js";import{ViewingMode as ae,stringFromViewingMode as oe,viewingModeFromString as le}from"./ViewingMode.js";import{layerView3DImporter as pe}from"./3d/layerViewModuleImportUtils.js";import he from"./3d/analysis/AnalysisViewManager3D.js";import{cleanupIntersectionUtils as de}from"./3d/camera/intersectionUtils.js";import{Constraints as ce}from"./3d/constraints/Constraints.js";import{EnvironmentManager as ue}from"./3d/environment/EnvironmentManager.js";import ge from"./3d/environment/SceneViewEnvironment.js";import me from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as ye}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as fe}from"./3d/layers/graphics/Labeler.js";import{FeatureTileTree3D as we}from"./3d/layers/support/FeatureTileTree3D.js";import{cleanupStageLayerElevationProvider as ve}from"./3d/layers/support/StageLayerElevationProvider.js";import _e from"./3d/state/ViewState.js";import{ViewStateManager as be,cleanupViewStateManager as Me}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as Se}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as Ve}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as je}from"./3d/state/utils/navigationUtils.js";import{CombinedElevationProvider as Re}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as Ce}from"./3d/support/debugFlags.js";import Te from"./3d/support/DisplayQualityProfile.js";import{getElevationAtPoint as Oe}from"./3d/support/ElevationProvider.js";import{toMap as xe,hitTest as Ee}from"./3d/support/hitTest.js";import{popupHitTest as Ae}from"./3d/support/popupHitTest.js";import Le from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as He}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Ie}from"./3d/support/ResourceController.js";import De from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Ge}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as Pe}from"./3d/support/ViewSlice.js";import{PointsOfInterest as Fe}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Ue from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as We,getTiledLayerInfo as qe,checkIfTileInfoSupportedForView as ke}from"./3d/terrain/terrainUtils.js";import{cleanupTileRenderer as ze}from"./3d/terrain/TileRenderer.js";import{Stage as Be}from"./3d/webgl-engine/Stage.js";import{olidEnabled as Ne}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{defaultTolerance as Qe}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as Ye}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as Ze}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as $e}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import{cleanupDrapedUtils as Je}from"./support/drapedUtils.js";import{defaultHighlightName as Ke}from"./support/HighlightDefaults.js";import Xe from"./support/HighlightOptions.js";import{occludeesSupported as et}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as tt,createScreenPointFromSupportedEvent as it}from"./support/screenUtils.js";import{isSpatialReferenceSupported as rt}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as st,destroyTextureCompressionWorker as nt}from"./support/TextureCompressionHelper.js";import{check as at}from"./support/WebGLRequirements.js";import ot from"./ui/DefaultUI.js";import lt from"./ui/3d/DefaultUI3D.js";import pt from"../webscene/Environment.js";import{clearVNodeCache as ht}from"../widgets/support/vnodeCache.js";let dt=class extends(ee(re(te(se)))){constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=Ie(this),this.deconflictor=new ye({view:this}),this.labeler=new fe({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.analyses=new K,this.basemapTerrain=null,this.elevationProvider=null,this.canvas=null,this.constraints=new ce,this.environment=new ge,this.environmentManager=new ue,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new he({view:this}),this.groundView=null,this.map=null,this.screenSizePerspectiveEnabled=!0,this.state=new _e({view:this}),this.slice=new Pe,this.spatialReference=null,this.alphaCompositingEnabled=!1,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new lt,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,V();const t=(e=null)=>{null!=e&&e.type===d.MOVE||(this._updatingChanged(),this.map?.allLayers.forEach((async e=>{try{await e.when()}catch(t){}this._updatingChanged()})))};this.addHandles([u((()=>this.map?.allLayers),"after-changes",(e=>t(e)),{onListenerAdd:()=>t(),onListenerRemove:()=>t(),sync:!0}),this.allLayerViews.on("after-changes",(e=>this._updateUpdatingMonitors(e))),g((()=>this.scene),(e=>e?.load().catch((()=>{}))))]),this.inputManager=new me({view:this}),this.stateManager=new be({view:this})}initialize(){if(has("enable-feature:esri-compress-textures")&&has("wasm-simd")){const e=st(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new ie({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add((()=>this.qualitySettings.memoryLimit),(e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)}),m),this.updatingHandles.add((()=>this.qualitySettings.additionalCacheMemory),(e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)}),m),this.updatingHandles.add((()=>this.qualitySettings.frameRate??0),(e=>v(e>0?1e3/Math.ceil(e):0)),m),this.addHandles([g((()=>this.spatialReference),(()=>this.notifyChange("clippingArea")),y),g((()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration})),(()=>this._updateSlice()),y)])}destroy(){this.destroyed||(nt(this),this.updatingHandles.removeAll(),this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._set("analysisViewManager",p(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=p(this.sharedSymbolResources),this._set("labeler",p(this.labeler)),this._set("deconflictor",p(this.deconflictor)),this._resourceController=p(this._resourceController),this._set("stateManager",p(this.stateManager)),this._set("inputManager",p(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles("updatingMonitors"),this._set("environmentManager",p(this.environmentManager)),this._set("environment",p(this.environment)),this.groundView=p(this.groundView),this._exitBasemapTerrain(),this.stage?.destroy(),this.slice.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get basemapSpatialReference(){return this.basemapTerrain?.spatialReference}get animation(){return this.state?.animation}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=e)}get clippingArea(){if("global"===this.viewingMode)return null;const e=this.map;let t=this._userClippingArea||h(e,"clippingArea");return!this._userClippingArea&&!h(e,"clippingEnabled")||null==t?(this._clippingArea=null,null):t instanceof H?this.spatialReference&&(t=ct(t,this.spatialReference),null==t)?(l.getLogger(this).error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(t=t.clone(),null==t.intersection(this._groundAndLayersExtent)&&(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(l.getLogger(this).error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&null!=e?l.getLogger(this).error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===ae.Global)return null;const e=this.renderSpatialReference,t=this.dataExtent;return null==t||null==e||t.spatialReference.equals(e)?t:ct(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent;const t=this.spatialReference||F.WGS84,i=ct(this.clippingArea,t);null!=i&&(e=null!=e?e.intersection(i):i);const r=this._get("dataExtent");return null!=e&&e.equals(r)?r:e}get _groundAndLayersExtent(){const e=this.spatialReference||F.WGS84;let t;const i=i=>{const r=ct(i,e);null!=r&&(null!=t?t.union(r):t=r.clone())},r=this.basemapTerrain;if(r?.spatialReference){const e=r.groundExtent;i(new H({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:r.spatialReference}))}const s=e=>{null==e.fullExtent||"graphics"===e.type&&e.internal||i(e.fullExtent)};if(this.map?.allLayers.forEach((e=>s(e))),null==t)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);const n=this._get("_groundAndLayersExtent");return t.equals(n)?n:t}castEnvironment(e){return e?e instanceof ge?e:e instanceof pt?this.environment?.cloneWithWebsceneEnvironment(e)??ge.fromWebsceneEnvironment(e):T(ge,e):new ge}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&X in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}set qualityProfile(e){Te.isValidProfile(e)&&(Te.apply(e,this.qualitySettings),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||Te.getDefaultProfile()}_updateSlice(){null!=this.stage&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return!!this.viewingMode&&!!this.stateManager?.preinit(this.spatialReference)}get resolution(){return null!=this.spatialReference?N(this.scale,this.spatialReference):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?I.deriveUnitFromSR(e,this.spatialReference):null}get updating(){if(this.destroying||this.destroyed)return!1;let e=0,t=this.layerViewManager.updating,i=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach((r=>{if(r.isFulfilled()){if(r.updating){if(t=!0,r.suspended||We(r))return;++i,e+=r.updatingProgress}}else++i}));for(const s of this._updatingObjects)if(null!=s&&s.updating){const t=.1;i+=t,e+=.5*t}for(const s of this._updatingObjectsWithProgress)null!=s&&s.updating&&(++i,e+=s.updatingProgress);const r=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||i>0||this.updatingHandles.updating||!this.ready||!this.stationary||r||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some((e=>!e.isFulfilled()))),t?(this._numUpdating=Math.max(i,this._numUpdating),e+=this._numUpdating-i):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=t?0:1,this._get("updatingProgress")!==e){const i=performance.now();if(e<1){const t=Math.min((i-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set("updatingProgress",e),this._lastUpdateTime=t&&e<1?i:0}return t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get viewingMode(){const e=this._predeterminedViewingMode;if(null!=e)return oe(e);const t=this.spatialReference;return t?null!=this.defaultsFromMap?.viewingMode&&t.equals(this.defaultsFromMap.spatialReference)?oe(this.defaultsFromMap.viewingMode):rt(t,ae.Global)?"global":"local":"global"}set viewingMode(e){this.ready?l.getLogger(this).error("#viewingMode","viewingMode cannot be set once view is ready"):this._overrideIfSome("viewingMode",e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get highlightOptions(){return this.highlights.find((({name:e})=>e===Ke))??new Xe}set highlightOptions(e){for(let t=0;t<this.highlights.length;++t){if(this.highlights.at(t).name===Ke)return void this.highlights.items[t].assignFrom(e)}}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new De(this)}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return l.getLogger(this).error("#toMap()","Scene view cannot be used before it is ready"),null;const i=tt(e)?it(this,e):e;return xe(this,i,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return l.getLogger(this).error("#toScreen()","Scene view cannot be used before it is ready"),null;const t=(null==e.z?Oe(this.elevationProvider,e):null)??0;return q(e,ut,this.renderSpatialReference,t),this.state.camera.projectToScreen(ut,gt),b(gt[0],gt[1])}pixelSizeAt(e,t){if(!this.ready)return l.getLogger(this).error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null;if(!e)return 0;const i=this.renderSpatialReference;q(e,ut,i);const r=this.state.camera.computeScreenPixelSizeAt(ut);return t&&i!==t?r*S(i)/S(t):r}overlayPixelSizeInMapUnits(e){const t=this.basemapTerrain.overlayManager;return t?t.overlayPixelSizeInMapUnits(e,(()=>this.pixelSizeAt(e))):1}hitTest(e,t){if(!this.ready)return l.getLogger(this).error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=tt(e)?it(this,e):e;return Ee(this,i,t,this._defaultHitTestOptions)}async popupHitTest(e){return Ae(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(null==e.parent)throw new n("view:no-analysisview-for-analysis","The analysis has not been added to view.analyses",{analysis:e});switch(e.parent.type){case"line-of-sight":case"dimension":case"viewshed":return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t);return(await import("./support/screenshotUtils.js")).encode(i,t,this._pixelFormat())}async _takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t);return(await import("./support/screenshotUtils.js")).encodeData(i,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){const t=await this._completeSettings(e);await this.whenReady();const i=await this.stage.renderView.takeScreenshotWithOID(t),{encodeData:r}=await import("./support/screenshotUtils.js");return[r(i[0],this._pixelFormat()),r(i[1],this._pixelFormat())]}async _completeSettings(e){const{toRenderSettings:t,screenshotSuperSampleSettings:i}=await import("./support/screenshotUtils.js"),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,i(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!Ne())throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true");const{encode:t}=await import("./support/screenshotUtils.js"),i=await this._completeSettings(e);await this.whenReady();const r=await this.stage.renderView.takeScreenshotWithOID(i),s=t(r[0],i,this._pixelFormat()),a=await this._completeSettings(e);a.format="png";return[s,t(r[1],a,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){const e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true")}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}importLayerView(e){return pe.importLayerView(e)}hasLayerViewModule(e){return pe.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.scene?.initialViewProperties?.spatialReference||this.defaultsFromMap?.spatialReference||this.defaultsFromMap?.ready&&this._initialDefaultSpatialReference||null}async validate(){let e=at(this.type);const t=has("safari");if(t&&t<9&&(e=new n("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:t})),null!=e)throw l.getLogger(this).warn("#validate()",e.message),e}get _predeterminedViewingMode(){const e=this._isOverridden("viewingMode")?this._get("viewingMode"):this.scene?.initialViewProperties?.viewingMode;return null!=e?le(e):null}getSpatialReferenceSupport(e,t){const i=this._predeterminedViewingMode;if(null!=i)return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,ae.Local),s=this._validateSpatialReferenceForViewingMode(e,t,ae.Global);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,ae.Local)}:{constraints:this._makeSpatialReferenceConstraints(e,t,ae.Global)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!rt(e,i)&&(null==t||(!!Q(t)||(!Y(t)||null!=qe(t,e,i))&&(!Z(t)||i!==ae.Global)))}_makeSpatialReferenceConstraints(e,t,i){if(null==t)return[{spatialReference:e,viewingMode:i}];const{isWebMercator:r,isWGS84:s}=e;if(Q(t)&&(r||s)){return!s||i===ae.Local||null===ke(t.tileInfo,t.fullExtent,e,ae.Global)?[{spatialReference:e,viewingMode:i},{spatialReference:F.WebMercator,viewingMode:i}]:[{spatialReference:r?F.WGS84:F.WebMercator,viewingMode:i}]}return Y(t)||Z(t)||!r&&!s?Y(t)&&r&&i!==ae.Global?[{spatialReference:e,viewingMode:i},{spatialReference:F.WGS84,viewingMode:ae.Local}]:[{spatialReference:e,viewingMode:i}]:[{spatialReference:e,viewingMode:i},{spatialReference:r?F.WGS84:F.WebMercator,viewingMode:i}]}_validateSpatialReference(e){const t=null!=this.getSpatialReferenceSupport(e),i=this._predeterminedViewingMode;return t||(null!=i?l.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${oe(i)} viewing mode.`):e.isGeographic&&l.getLogger(this).warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}trackGraphicState(e){if(!e.graphic)return l.getLogger(this).error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&null!=t&&"processor"in t&&"graphics-3d"===t.processor?.type&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return null!=t?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),o((()=>{r=!0,null!=i&&(i.remove(),i=null)}))}maskOccludee(e){if(!e)return l.getLogger(this).error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&null!=t&&et(t)&&(i=t.maskOccludee(e))};return null!=t?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),o((()=>{r=!0,null!=i&&(i.remove(),i=null)}))}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter((e=>"media-3d"!==e.type)).find((t=>t.layer===e.layer)):null}graphicChanged(e){null!=this.graphicsView&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await f((()=>this.graphicsView)),this.graphicsView):e.layer&&this.map?t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise(((t,i)=>{const r=this.map.allLayers.on("change",(s=>{s.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))}))})):this.whenLayerView(e.layer):null}async _importModule(e,t){const i=new AbortController;this._importControllers.set(e,i),this._updatingChanged();try{const r=await yt[e]();return t&&(c(i.signal),await t(i.signal)),c(i.signal),this._importControllers.delete(e),r}catch{this._importControllers.delete(e)}return null}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set("basemapTerrain",new Ue({view:this})),this._set("elevationProvider",new Re({view:this})),this.elevationProvider.register("ground",this.basemapTerrain)}_exitBasemapTerrain(){const e=this.basemapTerrain,t=this.elevationProvider;e&&(this._set("basemapTerrain",null),this._set("elevationProvider",null),t.unregister(e),t.destroy(),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Fe({view:this})),this._set("featureTiles",new we({renderCoordsHelper:this.renderCoordsHelper,cameraOnSurface:this.pointsOfInterest.cameraOnSurface,focus:this.pointsOfInterest.focus,tilingSchemeOwner:this.basemapTerrain,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}));const e=()=>{const e=this.basemapTerrain?.extent;if(this.clippingArea||e)if(e&&this.basemapTerrain.spatialReference){const e=null!=this.basemapTerrain.extent&&null!=this.basemapTerrain.spatialReference?G(z(this.basemapTerrain.extent,this.basemapTerrain.spatialReference),this.spatialReference):null;this.clippingArea?this.featureTiles.filterExtent=this.clippingArea.intersection(e):this.featureTiles.filterExtent=e}else this.featureTiles.filterExtent=this.clippingArea;else this.featureTiles.filterExtent=null};this.addHandles([this.updatingHandles.add((()=>Ce.FEATURE_TILE_TREE_SHOW_TILES),(e=>{e&&this.featureTiles&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then((({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&Ce.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))})):e||!this._featureTreeDebugger||Ce.FEATURE_TILE_TREE_SHOW_TILES||(this._featureTreeDebugger.destroy(),this._featureTreeDebugger=null)}),w),this.updatingHandles.add((()=>this.clippingArea),e,w),this.updatingHandles.add((()=>this.basemapTerrain.extent),e,w)],"feature-tiles"),this.stateManager.init()}_exitGlobe(){this.featureTiles&&(this.stateManager.exit(),this.removeHandles("render-coords-helper"),this.removeHandles("feature-tiles"),this._set("featureTiles",p(this.featureTiles)),this._set("pointsOfInterest",p(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem())}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference,t=this.state.isGlobal,i=B(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",He.create(this.state.viewingMode,i)),t||this.addHandles(g((()=>this.basemapTerrain?.extent),(e=>{const t=this.renderCoordsHelper.spatialReference;null==e||0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!W(e,this.basemapTerrain.spatialReference,mt,t)||(this.renderCoordsHelper.extent=mt)}),y),"render-coords-helper"),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(Qe/this.renderCoordsHelper.unitInMeters))}else this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.removeHandles("render-coords-helper"),this._set("renderCoordsHelper",null)}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){null!=e&&e.type===d.MOVE||(this.removeHandles("updatingMonitors"),this.allLayerViews.forEach((e=>{e.destroyed||(this.addHandles(g((()=>[e.updating,e.updatingProgress]),(()=>this._updatingChanged()),y),"updatingMonitors"),e.when((()=>this._updatingChanged()),(()=>this._updatingChanged())))})),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,i){if(!this.overlay||!this.overlay.hasVisibleItems)return i;const r=e.getContext("2d",{willReadFrequently:!0});return r.putImageData(i,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,i.width,i.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,i)=>this._renderScreenshotOverlay(e,t,i)}},t=new Ve(this.state.viewingMode,(e=>this.stage.layers.forAll(e)),this);this._set("sceneIntersectionHelper",t);const i=s(this.surface);this._stage=new Be({view:this,options:e,container:i}),this._updateSlice(),this.addHandles([this.updatingHandles.add((()=>this.qualitySettings.highQualityTransparency),(e=>this.stage.renderer.setParameters({highQualityTransparency:e})),m),this.on("pointer-move",(()=>this.stage?.renderer.resetAnimation())),a(this.stage.renderView.canvas,"webglcontextlost",(e=>{this.fatalError=new n("webgl-context-lost",e.statusMessage)}))],"stage"),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(Qe/this.renderCoordsHelper.unitInMeters),this._set("canvas",this.stage.renderView.canvas)}_exitStage(){this._set("sceneIntersectionHelper",null),this._stage=p(this.stage),this.removeHandles("stage"),this._set("canvas",null)}_initSurface(e){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Ge({view:this,viewingMode:e,resourceController:this._resourceController,pointsOfInterest:this.pointsOfInterest,viewState:this.state})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitGlobe(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has("GraphicsView3D")||0===this.graphics.length)return;this.removeHandles("GraphicsView3D");const e=(await this._importModule("GraphicsView3D",(e=>f((()=>this.basemapTerrain?.ready),e))))?.default;e&&this._set("graphicsView",new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport("GraphicsView3D"),this.removeHandles("GraphicsView3D"),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_disposeFocusAreasView(){this._abortImport("FocusAreasView"),this.removeHandles("FocusAreasView"),this.focusAreasView=p(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has("FocusAreasView")||0===e)return;this.removeHandles("FocusAreasView");const t=(await this._importModule("FocusAreasView"))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){const e=le(this.viewingMode);e===ae.Global&&(this._clippingArea=null),this._initSurface(e),this._set("ready",!0),this.addHandles(u((()=>this.graphics),"after-changes",(()=>this._ensureGraphicsView())),"GraphicsView3D"),this._ensureGraphicsView(),this.addHandles(g((()=>this.map?.focusAreas?.areas.length??0),(e=>this._ensureFocusAreasView(e)),{initial:!0}),"FocusAreasView");const t=this.scene?.initialViewProperties??null,i=t?.environment;i&&(this._overrideDefaultEnvironmentOnly?x(this.environment,i):this.environment=this.environment.cloneWithWebsceneEnvironment(i)),this.timeExtent=t?.timeExtent,t?.analyses.applyTo(this),this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const r=this._resolveWhenReady;this._resolveWhenReady=[],r.forEach((e=>e(this)))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set("ready",!1)}get _defaultToMapOptions(){const e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(Ze);for(const t of this.allLayerViews)$(t.layer.type)&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){const e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(Ze);for(const t of this.allLayerViews)$(t.layer.type)&&t.layer.opacity<1&&e.exclude.add(t.uid);return e}static{this.type="3d"}static clearStatics(){ht(),E(),M(),$e(),Me(),de(),ve(),U(),Je(),J(),ze(),Ye(),Se(),je(),_e.cleanupViewstate()}};function ct(e,t){return null!=e&&P(e.spatialReference,t)?G(e,t):null}e([j()],dt.prototype,"_userClippingArea",void 0),e([j()],dt.prototype,"_resourceController",void 0),e([j()],dt.prototype,"_stage",void 0),e([j({readOnly:!0})],dt.prototype,"deconflictor",void 0),e([j({readOnly:!0})],dt.prototype,"labeler",void 0),e([j(L(K,"analyses"))],dt.prototype,"analyses",void 0),e([j({type:ne,readOnly:!0})],dt.prototype,"animation",null),e([j({readOnly:!0})],dt.prototype,"basemapTerrain",void 0),e([j({readOnly:!0})],dt.prototype,"elevationProvider",void 0),e([j()],dt.prototype,"camera",null),e([j({type:t})],dt.prototype,"contentCamera",null),e([j({readOnly:!0})],dt.prototype,"canvas",void 0),e([j({type:D})],dt.prototype,"center",null),e([j({type:H})],dt.prototype,"clippingArea",null),e([j({type:ce})],dt.prototype,"constraints",void 0),e([j({type:H,readOnly:!0})],dt.prototype,"renderDataExtent",null),e([j({readOnly:!0})],dt.prototype,"tileInfo",null),e([j({type:H,readOnly:!0})],dt.prototype,"dataExtent",null),e([j({type:H,readOnly:!0})],dt.prototype,"_groundAndLayersExtent",null),e([j({type:ge})],dt.prototype,"environment",void 0),e([R("environment")],dt.prototype,"castEnvironment",null),e([j({readOnly:!0})],dt.prototype,"environmentManager",void 0),e([j({type:H})],dt.prototype,"extent",null),e([j({type:r})],dt.prototype,"floors",void 0),e([j()],dt.prototype,"screenCenter",null),e([j()],dt.prototype,"frustum",null),e([j({type:Number,readOnly:!0})],dt.prototype,"fullOpacity",void 0),e([j({readOnly:!0})],dt.prototype,"graphicsView",void 0),e([j({readOnly:!0})],dt.prototype,"analysisViewManager",void 0),e([j()],dt.prototype,"groundView",void 0),e([j({type:Boolean})],dt.prototype,"initialExtentRequired",null),e([j()],dt.prototype,"defaultsFromMapSettings",null),e([j()],dt.prototype,"interacting",null),e([j()],dt.prototype,"stationary",null),e([j()],dt.prototype,"navigating",null),e([j()],dt.prototype,"map",void 0),e([j()],dt.prototype,"padding",null),e([j({type:Fe,readOnly:!0})],dt.prototype,"pointsOfInterest",void 0),e([j({type:we,readOnly:!0})],dt.prototype,"featureTiles",void 0),e([j()],dt.prototype,"_featureTreeDebugger",void 0),e([j({type:Boolean})],dt.prototype,"screenSizePerspectiveEnabled",void 0),e([j({constructOnly:!0})],dt.prototype,"deactivatedWebGLExtensions",void 0),e([j({constructOnly:!0})],dt.prototype,"debugWebGLExtensions",void 0),e([j({constructOnly:!0})],dt.prototype,"renderCanvas",void 0),e([j({constructOnly:!0})],dt.prototype,"state",void 0),e([j({readOnly:!0})],dt.prototype,"inputManager",void 0),e([j({readOnly:!0})],dt.prototype,"stateManager",void 0),e([j({type:["low","medium","high"]})],dt.prototype,"qualityProfile",null),e([j({type:Le,get(){let e=this._get("qualitySettings");return e||(e=new Le,Te.apply(this.qualityProfile,e)),e}})],dt.prototype,"qualitySettings",void 0),e([j()],dt.prototype,"slice",void 0),e([j({readOnly:!0})],dt.prototype,"typeSpecificPreconditionsReady",null),e([j({readOnly:!0})],dt.prototype,"renderCoordsHelper",void 0),e([j({readOnly:!0})],dt.prototype,"sceneIntersectionHelper",void 0),e([j({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],dt.prototype,"resolution",null),e([j({type:Number})],dt.prototype,"scale",null),e([j()],dt.prototype,"heightModelInfo",null),e([j()],dt.prototype,"spatialReference",void 0),e([j({type:Boolean,constructOnly:!0})],dt.prototype,"alphaCompositingEnabled",void 0),e([j({constructOnly:!0})],dt.prototype,"preserveDrawingBufferEnabled",void 0),e([j({type:Boolean})],dt.prototype,"supersampleScreenshotsEnabled",void 0),e([j({readOnly:!0})],dt.prototype,"type",void 0),e([j(),R((e=>e instanceof ot?e:O(lt,e)))],dt.prototype,"ui",void 0),e([j({type:Boolean,readOnly:!0,dependsOn:["graphicsView.updating","basemapView.updating","basemapTerrain.updating","layerViewManager.updating","layerViewManager.updatingRemaining","_resourceController.updating","stage.updating","featureTiles.updating","pointsOfInterest.updating","environmentManager.updating","overlay.updating","updatingHandles.updating","featureTreeDebugger.updating","labeler.updating","deconflictor.updating","ready","stationary","inputManager.updating","toolViewManager.updating","analysisViewManager.updating","state.updating","textures.updating"]})],dt.prototype,"updating",null),e([j()],dt.prototype,"_updatingObjects",null),e([j()],dt.prototype,"_updatingObjectsWithProgress",null),e([j({type:Number,readOnly:!0,dependsOn:["updating"]})],dt.prototype,"updatingProgress",void 0),e([j({type:["global","local"]})],dt.prototype,"viewingMode",null),e([j({type:i})],dt.prototype,"viewpoint",null),e([j({readOnly:!0})],dt.prototype,"visibleArea",null),e([j({type:Number})],dt.prototype,"zoom",null),e([j({type:Xe})],dt.prototype,"highlightOptions",null),e([j({readOnly:!0})],dt.prototype,"quality",null),e([j({readOnly:!0})],dt.prototype,"resolutionScale",null),e([j()],dt.prototype,"focusAreasView",void 0),e([j()],dt.prototype,"_defaultToMapOptions",null),e([j()],dt.prototype,"_defaultHitTestOptions",null),dt=e([C("esri.views.SceneView")],dt);const ut=A(),gt=_(),mt=k(),yt={GraphicsView3D:()=>import("./3d/layers/GraphicsView3D.js"),FocusAreasView:()=>import("./3d/FocusAreasView.js")},ft=dt;export{ft as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{createTask as o}from"../../core/asyncUtils.js";import{handlesGroup as t}from"../../core/handleUtils.js";import{removeMaybe as e}from"../../core/maybe.js";import{throwIfAborted as n,isAbortError as i,onAbort as a}from"../../core/promiseUtils.js";import{watch as r,syncAndInitial as l,on as s,whenOnce as c}from"../../core/reactiveUtils.js";function u(t,n){t.interactive=!0;const{tool:i,view:r}=t;r.activeTool=i;let l=a(n,(()=>{r.activeTool===i&&(r.activeTool=null)}));return o((async o=>{await c((()=>!t.tool?.active),o),l=e(l)}),n)}function m(o,t){return r((()=>o.interactive),(()=>p(o,t)),l)}function p(o,t){o.interactive?v(o,t):f(o)}function v(o,t){f(o);const{view:e,analysis:n}=o,i=new t({view:e,analysis:n,analysisViewData:o});return o.tool=i,e.tools.add(i),i}function f(o){const{view:t,tool:e}=o;null!=e&&(t.tools.remove(e),o.tool=null)}function y(e,a){const r=e.userOperation,l=o((async o=>{if(r){const t=r.promise.catch((()=>{}));r?.abort(),await t,n(o)}const l=u(e,{signal:o}),c=a?.shouldRejectOnCancel??(()=>!0),m=t([s((()=>e.tool),"cancel",(()=>{c()&&l.abort()}))]),{tool:p}=e;try{p&&(p.resetCreated(),a?.onToolActivated?.(p)),await l.promise,n(o)}catch(v){if(o.aborted||!i(v)||c())throw v}finally{m?.remove()}}),{signal:a?.abortOptions?.signal});return e.userOperation=l,l.promise.finally((()=>{e.userOperation===l&&(e.userOperation=null)}))}function d(o,t){const e=o.analysis.clone();return y(o,{abortOptions:t?.placementOptions,onToolActivated:t?.onToolActivated,shouldRejectOnCancel:()=>{const{analysis:t}=o;return!t.valid||t.equals(e)}})}export{u as activateAnalysisViewTool,m as connectAnalysisViewToTool,f as removeAnalysisViewTool,y as startExclusiveInteractiveOperation,d as startPlaceOperation};
5
+ import{createTask as o}from"../../core/asyncUtils.js";import{handlesGroup as t}from"../../core/handleUtils.js";import{removeMaybe as e}from"../../core/maybe.js";import{throwIfAborted as n,isAbortError as i,onAbort as a}from"../../core/promiseUtils.js";import{watch as r,syncAndInitial as s,on as l,whenOnce as c}from"../../core/reactiveUtils.js";function u(t,n){t.interactive=!0;const{tool:i,view:r}=t;r.activeTool=i;let s=a(n,(()=>{r.activeTool===i&&(r.activeTool=null)}));return o((async o=>{await c((()=>!t.tool?.active),o),s=e(s)}),n)}function m(o,t){return r((()=>o.interactive),(()=>p(o,t)),s)}function p(o,t){o.interactive?v(o,t):f(o)}function v(o,t){f(o);const{view:e,analysis:n}=o,i=new t({view:e,analysis:n,analysisViewData:o});return o.tool=i,e.tools.add(i),i}function f(o){const{view:t,tool:e}=o;null!=e&&(t.tools.remove(e),o.tool=null)}function y(e,a){const r=e.userOperation,s=o((async o=>{if(r){const t=r.promise.catch((()=>{}));r?.abort(),await t,n(o)}const s=u(e,{signal:o}),c=a?.shouldRejectOnCancel??(()=>!0),m=t([l((()=>e.tool),"cancel",(()=>{c()&&s.abort()}))]),{tool:p}=e;try{p&&(p.resetCreated(),a?.onToolActivated?.(p)),await s.promise,n(o)}catch(v){if(o.aborted||!i(v)||c())throw v}finally{m?.remove()}}),{signal:a?.abortOptions?.signal});return e.userOperation=s,s.promise.finally((()=>{e.userOperation===s&&(e.userOperation=null)}))}async function d(o,t){const e=o.analysis.clone();return await y(o,{abortOptions:t?.placementOptions,onToolActivated:t?.onToolActivated,shouldRejectOnCancel:()=>{const{analysis:t}=o;return!t.valid||t.equals(e)}}),{}}export{u as activateAnalysisViewTool,m as connectAnalysisViewToTool,f as removeAnalysisViewTool,y as startExclusiveInteractiveOperation,d as startPlaceOperation};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import s from"../../core/Collection.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";const r=r=>{let n=class extends r{constructor(...e){super(...e),this.layer=null}get interactive(){return null!=this.analysisView&&this.analysisView.interactive}set interactive(e){null!=this.analysisView&&(this.analysisView.interactive=e)}get results(){return this.analysisView?.results??new s}get selectedDimension(){return null!=this.analysisView?this.analysisView.selectedDimension:null}set selectedDimension(e){null!=this.analysisView&&(this.analysisView.selectedDimension=e)}async createLengthDimensions(e){await(this.analysisView?.createLengthDimensions(e))}async place(e){await(this.analysisView?.place(e))}};return e([i()],n.prototype,"layer",void 0),e([i()],n.prototype,"interactive",null),e([i({readOnly:!0})],n.prototype,"results",null),e([i()],n.prototype,"selectedDimension",null),n=e([t("esri.views.layers.DimensionLayerView")],n),n};export{r as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import s from"../../core/Collection.js";import{createAbortError as i}from"../../core/promiseUtils.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";const n=n=>{let o=class extends n{constructor(...e){super(...e),this.layer=null}get interactive(){return null!=this.analysisView&&this.analysisView.interactive}set interactive(e){null!=this.analysisView&&(this.analysisView.interactive=e)}get results(){return this.analysisView?.results??new s}get selectedDimension(){return null!=this.analysisView?this.analysisView.selectedDimension:null}set selectedDimension(e){null!=this.analysisView&&(this.analysisView.selectedDimension=e)}async createLengthDimensions(e){await(this.analysisView?.createLengthDimensions(e))}place(e){if(null!=this.analysisView)return this.analysisView?.place(e);throw i()}};return e([t()],o.prototype,"layer",void 0),e([t()],o.prototype,"interactive",null),e([t({readOnly:!0})],o.prototype,"results",null),e([t()],o.prototype,"selectedDimension",null),o=e([r("esri.views.layers.DimensionLayerView")],o),o};export{n as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Collection.js";import{createAbortError as s}from"../../core/promiseUtils.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";const o=o=>{let a=class extends o{constructor(...e){super(...e),this.layer=null}get interactive(){return this.analysisView?.interactive??!1}set interactive(e){null!=this.analysisView&&(this.analysisView.interactive=e)}get results(){return this.analysisView?.results??new r}async place(e){if(null!=this.analysisView)return await this.analysisView.place(e);throw s()}};return e([t()],a.prototype,"layer",void 0),e([t()],a.prototype,"interactive",null),e([t({readOnly:!0})],a.prototype,"results",null),a=e([i("esri.views.layers.LineOfSightLayerView")],a),a};export{o as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Collection.js";import{createAbortError as s}from"../../core/promiseUtils.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";const o=o=>{let a=class extends o{constructor(...e){super(...e),this.layer=null}get interactive(){return this.analysisView?.interactive??!1}set interactive(e){null!=this.analysisView&&(this.analysisView.interactive=e)}get results(){return this.analysisView?.results??new r}place(e){if(null!=this.analysisView)return this.analysisView.place(e);throw s()}};return e([t()],a.prototype,"layer",void 0),e([t()],a.prototype,"interactive",null),e([t({readOnly:!0})],a.prototype,"results",null),a=e([i("esri.views.layers.LineOfSightLayerView")],a),a};export{o as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";const t=t=>{let a=class extends t{constructor(...e){super(...e),this.layer=null}get interactive(){return null!=this.analysisView&&this.analysisView.interactive}set interactive(e){null!=this.analysisView&&(this.analysisView.interactive=e)}get selectedViewshed(){return null!=this.analysisView?this.analysisView.selectedViewshed:null}set selectedViewshed(e){null!=this.analysisView&&(this.analysisView.selectedViewshed=e)}async createViewsheds(e){await(this.analysisView?.createViewsheds(e))}async place(e){await(this.analysisView?.place(e))}};return e([s()],a.prototype,"layer",void 0),e([s()],a.prototype,"interactive",null),e([s()],a.prototype,"selectedViewshed",null),a=e([i("esri.views.layers.ViewshedLayerView")],a),a};export{t as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{createAbortError as s}from"../../core/promiseUtils.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";const r=r=>{let a=class extends r{constructor(...e){super(...e),this.layer=null}get interactive(){return null!=this.analysisView&&this.analysisView.interactive}set interactive(e){null!=this.analysisView&&(this.analysisView.interactive=e)}get selectedViewshed(){return null!=this.analysisView?this.analysisView.selectedViewshed:null}set selectedViewshed(e){null!=this.analysisView&&(this.analysisView.selectedViewshed=e)}async createViewsheds(e){await(this.analysisView?.createViewsheds(e))}place(e){if(null!=this.analysisView)return this.analysisView.place(e);throw s()}};return e([i()],a.prototype,"layer",void 0),e([i()],a.prototype,"interactive",null),e([i()],a.prototype,"selectedViewshed",null),a=e([t("esri.views.layers.ViewshedLayerView")],a),a};export{r as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{getMetersPerUnitForSR as e}from"../../core/unitUtils.js";import t from"../../geometry/Extent.js";import{calculateTolerance as n}from"../../renderers/support/clickToleranceUtils.js";function r(n,r,i,a=new t){let s=0;if("2d"===i.type)s=r*(i.resolution??0);else if("3d"===i.type){const t=i.overlayPixelSizeInMapUnits(n),a=i.basemapSpatialReference;s=null==a||a.equals(i.spatialReference)?r*t:e(a)/e(i.spatialReference)}const o=n.x-s,l=n.y-s,c=n.x+s,m=n.y+s,{spatialReference:p}=i;return a.xmin=Math.min(o,c),a.ymin=Math.min(l,m),a.xmax=Math.max(o,c),a.ymax=Math.max(l,m),a.spatialReference=p,a}function i(e,t,i){const s=i.toMap(e);if(null==s)return!1;return r(s,n(),i,a).intersects(t)}const a=new t;export{r as createQueryGeometry,i as intersectsDrapedGeometry};
5
+ import{getMetersPerUnitForSR as e}from"../../core/unitUtils.js";import t from"../../geometry/Extent.js";import{calculateTolerance as n}from"../../renderers/support/clickToleranceUtils.js";function r(n,r,i,a=new t){let o=0;if("2d"===i.type)o=r*(i.resolution??0);else if("3d"===i.type){const t=i.overlayPixelSizeInMapUnits(n),a=i.basemapSpatialReference;o=null==a||a.equals(i.spatialReference)?r*t:e(a)/e(i.spatialReference)}const s=n.x-o,l=n.y-o,c=n.x+o,m=n.y+o,{spatialReference:p}=i;return a.xmin=Math.min(s,c),a.ymin=Math.min(l,m),a.xmax=Math.max(s,c),a.ymax=Math.max(l,m),a.spatialReference=p,a}function i(e,t,i){const o=i.toMap(e);if(null==o)return!1;return r(o,n(),i,a).intersects(t)}let a=new t;function o(){a=new t}export{o as cleanupDrapedUtils,r as createQueryGeometry,i as intersectsDrapedGeometry};