@arcgis/core 5.2.0-next.74 → 5.2.0-next.75

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 (196) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/0502641d9a214b37ff29.js +1 -0
  3. package/assets/esri/core/workers/chunks/0d3b2d9a19383bb63f0a.js +1 -0
  4. package/assets/esri/core/workers/chunks/0d9fe49812554e7d7ba7.js +1 -0
  5. package/assets/esri/core/workers/chunks/0daaa89de339e8ea4b81.js +1 -0
  6. package/assets/esri/core/workers/chunks/{1ca04ecf010e68863014.js → 0eb35e09765fd74eb698.js} +1 -1
  7. package/assets/esri/core/workers/chunks/12234a63d3fa4bc25e7e.js +1 -0
  8. package/assets/esri/core/workers/chunks/18e0e993c0c39c962e61.js +1 -0
  9. package/assets/esri/core/workers/chunks/{859dd86c921053bf03a1.js → 1c49c9472167a2e0c923.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{cf360767310fb45660a8.js → 1cf8fb704c48ac3d3b15.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{2e44978ee677aa23163d.js → 2435ef7d11f8dbb920b7.js} +1 -1
  12. package/assets/esri/core/workers/chunks/2501d9459f6d14c797e5.js +1 -0
  13. package/assets/esri/core/workers/chunks/2740f755c3a322cbd477.js +1 -0
  14. package/assets/esri/core/workers/chunks/27f574acf52f2c8bc2c9.js +1 -0
  15. package/assets/esri/core/workers/chunks/2b93888e61ca638490cf.js +1 -0
  16. package/assets/esri/core/workers/chunks/2f4ed8a63d57636a4ebe.js +1 -0
  17. package/assets/esri/core/workers/chunks/{31d19bb72a9e79b30070.js → 30818b5ff0ce51b25d6f.js} +1 -1
  18. package/assets/esri/core/workers/chunks/3235e14fedb19dd94807.js +1 -0
  19. package/assets/esri/core/workers/chunks/36ec5b84e551ab08b24a.js +1 -0
  20. package/assets/esri/core/workers/chunks/3c28e2040cb4fb716eaa.js +1 -0
  21. package/assets/esri/core/workers/chunks/3c32471785bc8570e41c.js +1 -0
  22. package/assets/esri/core/workers/chunks/4046bd65d7d0677f4600.js +1 -0
  23. package/assets/esri/core/workers/chunks/4295822fa6ef743c76f1.js +1 -0
  24. package/assets/esri/core/workers/chunks/{35fd2f765d2cb3f59a22.js → 42d5ed44111bea77ec71.js} +115 -115
  25. package/assets/esri/core/workers/chunks/43713bc6f7eea07259d0.js +1 -0
  26. package/assets/esri/core/workers/chunks/{a0a1f0bd3648738354a6.js → 43a65cab888d43954564.js} +1 -1
  27. package/assets/esri/core/workers/chunks/44a786aba84918f2b247.js +1 -0
  28. package/assets/esri/core/workers/chunks/46873badbd6ce8ff4e1e.js +1 -0
  29. package/assets/esri/core/workers/chunks/4d7a3b3aaf876da0891b.js +1 -0
  30. package/assets/esri/core/workers/chunks/{509aecafbc629bee1c15.js → 4fe2cca405180af23364.js} +1 -1
  31. package/assets/esri/core/workers/chunks/50b08415e072a49bc572.js +1 -0
  32. package/assets/esri/core/workers/chunks/519af918050b47f93516.js +1 -0
  33. package/assets/esri/core/workers/chunks/{bd311c85437743cf7d2f.js → 53d165b4f30fd64e5d8a.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{1a3afee3ecd806b4aa81.js → 552d6aecc7d88d16227b.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{bff75cc7413bf0d319db.js → 5627f562dea8bae2f346.js} +1 -1
  36. package/assets/esri/core/workers/chunks/5ba3a30b7cbfa9e3aa62.js +1 -0
  37. package/assets/esri/core/workers/chunks/{0e81c6d4f1c81f9b0a1b.js → 5e1d84e97de0e662aaa9.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{2baa16ec8559e77c226f.js → 64a1ffc221e5b63b43fb.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{9ca59077712e45ef4d56.js → 6743d726e45e7b660505.js} +1 -1
  40. package/assets/esri/core/workers/chunks/69b0dcd7bcd8ec42e2c3.js +1 -0
  41. package/assets/esri/core/workers/chunks/6b783f440c4a5d36e879.js +1 -0
  42. package/assets/esri/core/workers/chunks/6dddd3df31961b9fda12.js +1 -0
  43. package/assets/esri/core/workers/chunks/6fc3553c52af6ace926d.js +1 -0
  44. package/assets/esri/core/workers/chunks/702b2381acf4d1f90094.js +1 -0
  45. package/assets/esri/core/workers/chunks/{9e25f715cda59c686a4c.js → 792303e4090c0c70c4ff.js} +1 -1
  46. package/assets/esri/core/workers/chunks/7a24cc0f3b4eff2bdb8e.js +1 -0
  47. package/assets/esri/core/workers/chunks/7dc5aedc964eacd1be5a.js +1 -0
  48. package/assets/esri/core/workers/chunks/841c81c280114412c95b.js +1 -0
  49. package/assets/esri/core/workers/chunks/8a36b999cbd65dd2f16c.js +1 -0
  50. package/assets/esri/core/workers/chunks/8ae3a6ddc87bf8315583.js +1 -0
  51. package/assets/esri/core/workers/chunks/9cff18e6f751d1b3085e.js +1 -0
  52. package/assets/esri/core/workers/chunks/{b6d26d9738c0787acc38.js → a6a2a4a2bae0d327d7ed.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{c1a4d499a30f3d80567b.js → a7a7d3289d4ca95f545f.js} +1 -1
  54. package/assets/esri/core/workers/chunks/abb6c76d5dba3559a68e.js +1 -0
  55. package/assets/esri/core/workers/chunks/b14961a9f1f40028f141.js +1 -0
  56. package/assets/esri/core/workers/chunks/b6cd165d0e58598f28a5.js +1 -0
  57. package/assets/esri/core/workers/chunks/{f1727b4a32cb6f36a5e6.js → b78f509fd8e95f728178.js} +1 -1
  58. package/assets/esri/core/workers/chunks/b9d1bb106737a05290e1.js +1 -0
  59. package/assets/esri/core/workers/chunks/{faa55265020591fd2224.js → bc0395777c5c1adb1ddb.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{94368a097e6190ce3c7a.js → c37b28f200b704ae6002.js} +1 -1
  61. package/assets/esri/core/workers/chunks/cff6390b863361eaeeed.js +1 -0
  62. package/assets/esri/core/workers/chunks/d1c7c877edc6948f3801.js +1 -0
  63. package/assets/esri/core/workers/chunks/d2172583ee6e481a66aa.js +1 -0
  64. package/assets/esri/core/workers/chunks/{193aed69de2dec4f36b6.js → d633e98b0dfa0490e4de.js} +1 -1
  65. package/assets/esri/core/workers/chunks/d8eca13c127b443141b7.js +1 -0
  66. package/assets/esri/core/workers/chunks/ddd8f6154e265dbb6f9f.js +1 -0
  67. package/assets/esri/core/workers/chunks/de601f0d5a2a282d2efd.js +1 -0
  68. package/assets/esri/core/workers/chunks/{fdca9873914b9dbd9244.js → e59101f1d060d0a30a65.js} +1 -1
  69. package/assets/esri/core/workers/chunks/eb1a86159dbc098f06fe.js +1 -0
  70. package/assets/esri/core/workers/chunks/{b3b53cf0a3a30164d337.js → ee9eb381e675d2d01260.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{264fd750691d517ab1f3.js → f43a0edf58941e2ac78e.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{4abd54518e35050feb90.js → f78acff510ca615d42e4.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{01c92e68fb17cf2d0e08.js → f7a5c4d22a24e1ac433c.js} +1 -1
  74. package/chunks/GaussianSplat.glsl.js +8 -8
  75. package/chunks/GaussianSplatShadow.glsl.js +4 -5
  76. package/chunks/OccludedGeometryDepth.glsl.js +5 -0
  77. package/chunks/ShadowCastVisualize.glsl.js +2 -2
  78. package/config.js +1 -1
  79. package/core/importUtils.js +2 -0
  80. package/geometry/operators/importUtils.js +2 -0
  81. package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
  82. package/geometry/support/normalizeUtils.d.ts +17 -15
  83. package/geometry/support/normalizeUtils.js +1 -1
  84. package/kernel.js +1 -1
  85. package/layers/FeatureLayer.d.ts +1 -1
  86. package/layers/graphics/data/QueryEngine.js +1 -1
  87. package/layers/graphics/data/queryUtils.js +1 -1
  88. package/layers/graphics/hydratedFeatures.js +1 -1
  89. package/package.json +1 -1
  90. package/portal/schemas/definitions.js +1 -1
  91. package/rest/geoprocessor/utils.js +1 -1
  92. package/rest/identify.js +1 -1
  93. package/rest/imageService.js +1 -1
  94. package/rest/query/operations/query.js +1 -1
  95. package/rest/query/operations/queryAttributeBins.js +1 -1
  96. package/rest/query/operations/queryPivot.js +1 -1
  97. package/rest/query/operations/queryTopFeatures.js +1 -1
  98. package/support/revision.js +1 -1
  99. package/symbols/cim/CIMEffects.js +1 -1
  100. package/symbols/cim/utils.js +1 -1
  101. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  102. package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
  103. package/views/2d/viewpointUtils.js +1 -1
  104. package/views/3d/environment/EnvironmentManager.js +1 -1
  105. package/views/3d/interactive/Manipulator3D.js +1 -1
  106. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  107. package/views/3d/interactive/manipulatorUtils.js +1 -1
  108. package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
  109. package/views/3d/support/hitTest.js +1 -1
  110. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js +8 -3
  111. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js +8 -2
  112. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowAccumulator.js +2 -0
  113. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulate.glsl.js +2 -0
  114. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulateTechnique.js +2 -0
  115. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulateTechniqueConfiguration.js +2 -0
  116. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastClear.glsl.js +2 -0
  117. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastClearTechnique.js +2 -0
  118. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastMaskTechnique.js +2 -0
  119. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastRenderer.js +2 -0
  120. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualize.glsl.js +2 -0
  121. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualizeTechnique.js +2 -0
  122. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualizeTechniqueConfiguration.js +2 -0
  123. package/views/3d/webgl-engine/lib/CutFillVisualization.js +1 -1
  124. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  125. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  126. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  127. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  128. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +28 -21
  129. package/views/3d/webgl-engine/shaders/OccludedGeometryDepth.glsl.js +2 -0
  130. package/views/3d/webgl-engine/shaders/OccludedGeometryDepthTechnique.js +2 -0
  131. package/views/selection/SelectionOperation.js +1 -1
  132. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  133. package/widgets/support/SelectionList/GroupLayerItem.d.ts +8 -1
  134. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  135. package/widgets/support/SelectionList/LayerItem.d.ts +8 -1
  136. package/widgets/support/SelectionList/LayerItem.js +1 -1
  137. package/widgets/support/SelectionList/SelectionListViewModel.d.ts +29 -1
  138. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  139. package/widgets/support/SelectionList.js +1 -1
  140. package/widgets/support/SelectionToolbar.js +1 -1
  141. package/assets/esri/core/workers/chunks/0dbf31a663b5220a3136.js +0 -1
  142. package/assets/esri/core/workers/chunks/0df660dfd941cff3ea1d.js +0 -1
  143. package/assets/esri/core/workers/chunks/1418c03c4ab87f7ab5f4.js +0 -1
  144. package/assets/esri/core/workers/chunks/160b204cbf5bda2a29e9.js +0 -1
  145. package/assets/esri/core/workers/chunks/1cc063aa2ddf44bbd515.js +0 -1
  146. package/assets/esri/core/workers/chunks/2a2ed7bd44010f24c2dd.js +0 -1
  147. package/assets/esri/core/workers/chunks/2bdb9b5365869081c936.js +0 -1
  148. package/assets/esri/core/workers/chunks/3d6b2d5ae647e140abaf.js +0 -1
  149. package/assets/esri/core/workers/chunks/44e8cd4b3dad777ab0c9.js +0 -1
  150. package/assets/esri/core/workers/chunks/45ccca01db0027b9dc16.js +0 -1
  151. package/assets/esri/core/workers/chunks/4cf2b0558a4acc141429.js +0 -1
  152. package/assets/esri/core/workers/chunks/4e129b9f5772a06e580c.js +0 -1
  153. package/assets/esri/core/workers/chunks/5441f96cdd0660229efe.js +0 -1
  154. package/assets/esri/core/workers/chunks/553be2bd69bd311477ea.js +0 -1
  155. package/assets/esri/core/workers/chunks/56bbde1dff96b423fbb9.js +0 -1
  156. package/assets/esri/core/workers/chunks/613e799377bdb767c955.js +0 -1
  157. package/assets/esri/core/workers/chunks/623d5518bca227f643bd.js +0 -1
  158. package/assets/esri/core/workers/chunks/62811bca7ad2100c023c.js +0 -1
  159. package/assets/esri/core/workers/chunks/64176f7ae719289a2f79.js +0 -1
  160. package/assets/esri/core/workers/chunks/73f77f5a6907cb8d9a35.js +0 -1
  161. package/assets/esri/core/workers/chunks/76b573143d1a65fdbcb6.js +0 -1
  162. package/assets/esri/core/workers/chunks/7b5b66ae79e0287e3ade.js +0 -1
  163. package/assets/esri/core/workers/chunks/7e373d9c98ce910db9d2.js +0 -1
  164. package/assets/esri/core/workers/chunks/86a4057572755b403548.js +0 -1
  165. package/assets/esri/core/workers/chunks/877594b6db08da98acd7.js +0 -1
  166. package/assets/esri/core/workers/chunks/98e6c1d035755a074d24.js +0 -1
  167. package/assets/esri/core/workers/chunks/a27cdf4c29dd50a6dab1.js +0 -1
  168. package/assets/esri/core/workers/chunks/a294dd12b5c708ce04af.js +0 -1
  169. package/assets/esri/core/workers/chunks/a9053ad0f4e8c4705665.js +0 -1
  170. package/assets/esri/core/workers/chunks/b33d870cbfa238762c5e.js +0 -1
  171. package/assets/esri/core/workers/chunks/b599b7dadce8b8bc88f6.js +0 -1
  172. package/assets/esri/core/workers/chunks/b984b808d383974ca3d8.js +0 -1
  173. package/assets/esri/core/workers/chunks/c25dc9073e73d6b44d88.js +0 -1
  174. package/assets/esri/core/workers/chunks/c45a5bcf26659daf02a1.js +0 -1
  175. package/assets/esri/core/workers/chunks/c46f79d5b7712adbbd1c.js +0 -1
  176. package/assets/esri/core/workers/chunks/c866b66ba72d96453899.js +0 -1
  177. package/assets/esri/core/workers/chunks/c873383e7dae35dc1a61.js +0 -1
  178. package/assets/esri/core/workers/chunks/d08f81d545930a79fb2e.js +0 -1
  179. package/assets/esri/core/workers/chunks/d607cf154218d20e4114.js +0 -1
  180. package/assets/esri/core/workers/chunks/da6134c7883531f21afe.js +0 -1
  181. package/assets/esri/core/workers/chunks/e4a2eefffe16cd5bb20f.js +0 -1
  182. package/assets/esri/core/workers/chunks/e602b91d8fdc36a92530.js +0 -1
  183. package/assets/esri/core/workers/chunks/ebfb3cdc0df15eb05d75.js +0 -1
  184. package/assets/esri/core/workers/chunks/f721756a6c1593f96409.js +0 -1
  185. package/assets/esri/core/workers/chunks/fb51f823b25c827c6b29.js +0 -1
  186. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +0 -2
  187. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +0 -2
  188. package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +0 -2
  189. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +0 -2
  190. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechniqueConfiguration.js +0 -2
  191. package/views/3d/webgl-engine/shaders/ShadowCastClear.glsl.js +0 -2
  192. package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +0 -2
  193. package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +0 -2
  194. package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +0 -2
  195. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +0 -2
  196. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +0 -2
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3608,8846],{73354(t,e,r){r.d(e,{a:()=>a,b:()=>o,c:()=>s,d:()=>u,e:()=>p,f:()=>l,l:()=>c,n:()=>y,t:()=>i}),r(44208);var n=r(72727);function s(t,e,r){i(t.typedBuffer,e.typedBuffer,r,t.typedBufferStride,e.typedBufferStride)}function i(t,e,r,s=3,i=s){const u=(0,n.k)(t.length,s,3),o=(0,n.k)(e.length,i,3),f=Math.min(u,o),c=r[0],l=r[1],a=r[2],p=r[4],y=r[5],h=r[6],d=r[8],B=r[9],m=r[10],g=r[12],T=r[13],E=r[14];let S=0,A=0;for(let r=0;r<f;r++){const r=e[S],n=e[S+1],u=e[S+2];t[A]=c*r+p*n+d*u+g,t[A+1]=l*r+y*n+B*u+T,t[A+2]=a*r+h*n+m*u+E,S+=i,A+=s}return t}function u(t,e,r){o(t.typedBuffer,e.typedBuffer,r,t.typedBufferStride,e.typedBufferStride)}function o(t,e,r,s=3,i=s){const u=(0,n.k)(t.length,s,3),o=(0,n.k)(e.length,i,3),f=Math.min(u,o),c=r[0],l=r[1],a=r[2],p=r[3],y=r[4],h=r[5],d=r[6],B=r[7],m=r[8];let g=0,T=0;for(let r=0;r<f;r++){const r=e[g],n=e[g+1],u=e[g+2];t[T]=c*r+p*n+d*u,t[T+1]=l*r+y*n+B*u,t[T+2]=a*r+h*n+m*u,g+=i,T+=s}}function f(t,e,r,n=3,s=n){const i=Math.min(t.length/n,e.length/s);let u=0,o=0;for(let f=0;f<i;f++)t[o]=r*e[u],t[o+1]=r*e[u+1],t[o+2]=r*e[u+2],u+=s,o+=n;return t}function c(t,e,r,n){l(t.typedBuffer,e.typedBuffer,r,n,t.typedBufferStride,e.typedBufferStride)}function l(t,e,r,n,s=3,i=s){const u=Math.min(t.length/s,e.length/i);let o=0,f=0;const c=1/2.2;for(let l=0;l<u;l++)t[f]=n*(r*e[o])**c,t[f+1]=n*(r*e[o+1])**c,t[f+2]=n*(r*e[o+2])**c,o+=i,f+=s}function a(t,e,r,s=3,i=s){const u=(0,n.k)(t.length,s,3),o=(0,n.k)(e.length,i,3),f=Math.min(u,o);let c=0,l=0;for(let n=0;n<f;n++)t[l]=e[c]+r[0],t[l+1]=e[c+1]+r[1],t[l+2]=e[c+2]+r[2],c+=i,l+=s;return t}function p(t,e){y(t.typedBuffer,e.typedBuffer,t.typedBufferStride,e.typedBufferStride)}function y(t,e,r=3,n=r){const s=Math.min(t.length/r,e.length/n);let i=0,u=0;for(let o=0;o<s;o++){const s=e[i],o=e[i+1],f=e[i+2],c=s*s+o*o+f*f;if(c>0){const e=1/Math.sqrt(c);t[u]=e*s,t[u+1]=e*o,t[u+2]=e*f}i+=n,u+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:l,linearToSRGBView:c,normalize:y,normalizeView:p,scale:f,scaleView:function(t,e,r){f(t.typedBuffer,e.typedBuffer,r,t.typedBufferStride,e.typedBufferStride)},shiftRight:function(t,e,r){const n=Math.min(t.count,e.count),s=t.typedBuffer,i=t.typedBufferStride,u=e.typedBuffer,o=e.typedBufferStride;let f=0,c=0;for(let t=0;t<n;t++)s[c]=u[f]>>r,s[c+1]=u[f+1]>>r,s[c+2]=u[f+2]>>r,f+=o,c+=i},transformMat3:o,transformMat3View:u,transformMat4:i,transformMat4View:s,translate:a},Symbol.toStringTag,{value:"Module"}))},50867(t,e,r){r.d(e,{a:()=>s,b:()=>c,l:()=>f,n:()=>u,t:()=>i}),r(44208);var n=r(72727);function s(t,e,r){i(t.typedBuffer,e.typedBuffer,r,t.typedBufferStride,e.typedBufferStride)}function i(t,e,r,s=4,i=s){const u=(0,n.k)(t.length,s,4),o=(0,n.k)(e.length,i,4),f=Math.min(u,o),c=r[0],l=r[1],a=r[2],p=r[3],y=r[4],h=r[5],d=r[6],B=r[7],m=r[8];let g=0,T=0;for(let r=0;r<f;r++){const r=e[g],n=e[g+1],u=e[g+2],o=e[g+3];t[T]=c*r+p*n+d*u,t[T+1]=l*r+y*n+B*u,t[T+2]=a*r+h*n+m*u,t[T+3]=o,g+=i,T+=s}}function u(t,e){const r=Math.min(t.count,e.count),n=t.typedBuffer,s=t.typedBufferStride,i=e.typedBuffer,u=e.typedBufferStride;for(let t=0;t<r;t++){const e=t*s,r=t*u,o=i[r],f=i[r+1],c=i[r+2],l=o*o+f*f+c*c;if(l>0){const t=1/Math.sqrt(l);n[e]=t*o,n[e+1]=t*f,n[e+2]=t*c}}}function o(t,e,r,n=4){const s=Math.min(t.length/n,e.count),i=e.typedBuffer,u=e.typedBufferStride;let o=0,f=0;for(let e=0;e<s;e++)t[f]=r*i[o],t[f+1]=r*i[o+1],t[f+2]=r*i[o+2],t[f+3]=r*i[o+3],o+=u,f+=n}function f(t,e,r,n){c(t.typedBuffer,e,r,n,t.typedBufferStride)}function c(t,e,r,n,s=4){const i=Math.min(t.length/s,e.count),u=e.typedBuffer,o=e.typedBufferStride;let f=0,c=0;const l=1/2.2;for(let e=0;e<i;e++)t[c]=n*(r*u[f])**l,t[c+1]=n*(r*u[f+1])**l,t[c+2]=n*(r*u[f+2])**l,t[c+3]=n*r*u[f+3],f+=o,c+=s}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:f,normalize:u,scale:o,scaleView:function(t,e,r){o(t.typedBuffer,e,r,t.typedBufferStride)},transformMat3:i,transformMat3View:s,transformMat4:function(t,e,r,s=4,i=s){const u=(0,n.k)(t.length,s,4),o=(0,n.k)(e.length,i,4),f=Math.min(u,o),c=r[0],l=r[1],a=r[2],p=r[3],y=r[4],h=r[5],d=r[6],B=r[7],m=r[8],g=r[9],T=r[10],E=r[11],S=r[12],A=r[13],M=r[14],v=r[15];let x=0,b=0;for(let r=0;r<f;r++){const r=e[x],n=e[x+1],u=e[x+2],o=e[x+3];t[b]=c*r+y*n+m*u+S*o,t[b+1]=l*r+h*n+g*u+A*o,t[b+2]=a*r+d*n+T*u+M*o,t[b+3]=p*r+B*n+E*u+v*o,x+=i,b+=s}},transformMat4View:function(t,e,r){const s=t.typedBuffer,i=t.typedBufferStride,u=e.typedBuffer,o=e.typedBufferStride,f=(0,n.k)(s.length,i,4),c=(0,n.k)(u.length,o,4),l=Math.min(f,c),a=r[0],p=r[1],y=r[2],h=r[3],d=r[4],B=r[5],m=r[6],g=r[7],T=r[8],E=r[9],S=r[10],A=r[11],M=r[12],v=r[13],x=r[14],b=r[15];for(let t=0;t<l;t++){const e=t*i,r=t*o,n=u[r],f=u[r+1],c=u[r+2],l=u[r+3];s[e]=a*n+d*f+T*c+M*l,s[e+1]=p*n+B*f+E*c+v*l,s[e+2]=y*n+m*f+S*c+x*l,s[e+3]=h*n+g*f+A*c+b*l}}},Symbol.toStringTag,{value:"Module"}))},48163(t,e,r){function n(){return[0,0]}function s(t){return[t[0],t[1]]}function i(t,e){return[t,e]}function u(){return i(1,1)}function o(){return i(-1,-1)}function f(){return i(1,0)}function c(){return i(0,1)}r.d(e,{fA:()=>i,o8:()=>s,vt:()=>n});const l=u(),a=o(),p=f(),y=c();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:a,ONES:l,UNIT_X:p,UNIT_Y:y,ZEROS:[0,0],clone:s,create:n,freeze:function(t,e){return[t,e]},fromArray:function(t,e=[0,0]){const r=Math.min(2,t.length);for(let n=0;n<r;++n)e[n]=t[n];return e},fromValues:i,negativeOnes:o,ones:u,unitX:f,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"})),r.d(e,["IA",0,a,"Un",0,l])},91829(t,e,r){function n(){return[0,0,0,0]}function s(t,e,r,n){return[t,e,r,n]}function i(t,e,r,n){return[t,e,r,n]}function u(){return s(1,1,1,1)}function o(){return s(1,0,0,0)}function f(){return s(0,1,0,0)}function c(){return s(0,0,1,0)}function l(){return s(0,0,0,1)}r.d(e,{CN:()=>i,_Y:()=>l,fA:()=>s,vt:()=>n});const a=[0,0,0,0],p=u(),y=o(),h=f(),d=c(),B=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:p,UNIT_W:B,UNIT_X:y,UNIT_Y:h,UNIT_Z:d,ZEROS:a,clone:function(t){return[t[0],t[1],t[2],t[3]]},create:n,freeze:i,fromArray:function(t,e=[0,0,0,0]){const r=Math.min(4,t.length);for(let n=0;n<r;++n)e[n]=t[n];return e},fromValues:s,ones:u,unitW:l,unitX:o,unitY:f,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"})),r.d(e,["Un",0,p,"uY",0,a])},48353(t,e,r){r.d(e,{l:()=>c});var n=r(34727),s=r(58083),i=r(51850);function u(t,e,r){const n=Math.sin(t),s=Math.cos(t),i=Math.sin(e),u=Math.cos(e),o=r;return o[0]=-n,o[4]=-i*s,o[8]=u*s,o[12]=0,o[1]=s,o[5]=-i*n,o[9]=u*n,o[13]=0,o[2]=0,o[6]=u,o[10]=i,o[14]=0,o[3]=0,o[7]=0,o[11]=0,o[15]=1,o}var o=r(49208),f=r(21325);function c(t,e,r,n){const i=(0,o.Tp)(t,n);if(null==i)return!1;const c=i.source.spatialReferenceId,h=i.dest.spatialReferenceId;if(c===h&&!l(h)&&(0!==c||(0,f.aI)(t,n)))return(0,s.kN)(r,e),!0;if(l(h)){const t=o.w5[c][10],n=o.w5[10][h];return null!=t&&null!=n&&(t(e,0,p,0),n(p,0,y,0),u(a*p[0],a*p[1],r),r[12]=y[0],r[13]=y[1],r[14]=y[2],!0)}const d=l(c);if((3===h||11===h||2===h||5===h)&&(2===c||d||3===c||5===c)){const t=o.w5[c][10],n=o.w5[10][h];return null!=t&&null!=n&&(t(e,0,p,0),n(p,0,y,0),d?function(t,e,r){u(t,e,r),(0,s.mg)(r,r)}(a*p[0],a*p[1],r):(0,s.D_)(r),r[12]=y[0],r[13]=y[1],r[14]=y[2],!0)}return!1}function l(t){return 1===t||6===t||8===t||4===t}const a=(0,n.kU)(1),p=(0,i.vt)(),y=(0,i.vt)()},65806(t,e,r){r.d(e,{g:()=>u});var n=r(51850),s=r(91218),i=r(9762);function u(t,e,r,n){if((0,s.canProjectWithoutEngine)(t.spatialReference,r))return o[0]=t.x,o[1]=t.y,o[2]=t.z??0,(0,i.projectBuffer)(o,t.spatialReference,0,e,r,0);const u=(0,s.tryProject)(t,r,n);return!!u&&(e[0]=u.x,e[1]=u.y,e[2]=u.z??0,!0)}const o=(0,n.vt)()},1193(t,e,r){r.r(e),r.d(e,{default:()=>a});var n,s=r(5482),i=r(69540),u=r(25482),o=r(4718),f=r(53966),c=r(91429),l=r(31199);let a=n=class extends((0,i.OU)(u.o)){constructor(t){super(t),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(t){return(0,l.b)(t,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},f.A.getLogger(this))}castPosition(t){return t&&t instanceof Float32Array&&f.A.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),(0,l.b)(t,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},f.A.getLogger(this))}castUv(t){return(0,l.b)(t,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},f.A.getLogger(this))}castNormal(t){return(0,l.b)(t,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},f.A.getLogger(this))}castTangent(t){return(0,l.b)(t,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},f.A.getLogger(this))}clonePositional(){const t={position:(0,o.o8)(this.position),normal:(0,o.o8)(this.normal),tangent:(0,o.o8)(this.tangent),uv:this.uv,color:this.color};return new n(t)}get usedMemory(){return this.position.byteLength+(this.uv?.byteLength??0)+(this.normal?.byteLength??0)+(this.tangent?.byteLength??0)+(this.color?.byteLength??0)}};(0,s.Cg)([(0,c.MZ)({json:{write:l.B}})],a.prototype,"color",void 0),(0,s.Cg)([(0,c.wg)("color")],a.prototype,"castColor",null),(0,s.Cg)([(0,c.MZ)({nonNullable:!0,json:{write:l.B}})],a.prototype,"position",void 0),(0,s.Cg)([(0,c.wg)("position")],a.prototype,"castPosition",null),(0,s.Cg)([(0,c.MZ)({json:{write:l.B}})],a.prototype,"uv",void 0),(0,s.Cg)([(0,c.wg)("uv")],a.prototype,"castUv",null),(0,s.Cg)([(0,c.MZ)({json:{write:l.B}})],a.prototype,"normal",void 0),(0,s.Cg)([(0,c.wg)("normal")],a.prototype,"castNormal",null),(0,s.Cg)([(0,c.MZ)({json:{write:l.B}})],a.prototype,"tangent",void 0),(0,s.Cg)([(0,c.wg)("tangent")],a.prototype,"castTangent",null),a=n=(0,s.Cg)([(0,c.$K)("esri.geometry.support.MeshVertexAttributes")],a)},13030(t,e,r){r.d(e,{Y$:()=>g,XW:()=>m,qB:()=>C,Qt:()=>W,My:()=>J,bf:()=>$,jZ:()=>x,j0:()=>b,Sx:()=>w,E$:()=>_,Qy:()=>it,h:()=>Y,P:()=>I,SL:()=>R,dy:()=>nt,ES:()=>ut,gH:()=>E,ZD:()=>T,si:()=>L,mJ:()=>D,UL:()=>tt,D6:()=>q,Yi:()=>j,An:()=>k,LC:()=>V,xs:()=>A,EC:()=>S,Xm:()=>N,Vp:()=>H,zD:()=>et,m8:()=>G,nS:()=>O,H$:()=>z,eI:()=>P,td:()=>st,Eq:()=>v,jz:()=>M,Aj:()=>F,E7:()=>Q,Y4:()=>rt,TX:()=>K,Uz:()=>X,ml:()=>Z,XP:()=>U});var n=r(34727),s=r(37585),i=r(48163),u=r(78955),o=r(91829),f=r(20498);class c{static{this.ElementCount=9}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=9;const i=this.TypedArrayConstructor;void 0===n&&(n=9*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<9;t++)e[t]=this.typedBuffer[r++];return e}setMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<9;t++)this.typedBuffer[r++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;for(let t=0;t<9;++t)n[i++]=s[u++]}get buffer(){return this.typedBuffer.buffer}}class l{static{this.ElementCount=16}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=16;const i=this.TypedArrayConstructor;void 0===n&&(n=16*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<16;t++)e[t]=this.typedBuffer[r++];return e}setMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<16;t++)this.typedBuffer[r++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}copyFrom(t,e,r){this.copyFromTypedBuffer(t,e.typedBuffer,r*e.typedBufferStride)}copyFromTypedBuffer(t,e,r){const n=this.typedBuffer;let s=t*this.typedBufferStride;for(let t=0;t<16;++t)n[s++]=e[r++]}get buffer(){return this.typedBuffer.buffer}}class a{static{this.ElementCount=1}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=1;const i=this.TypedArrayConstructor;void 0===n&&(n=i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.stride=n,this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride)}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}get(t){return this.typedBuffer[t*this.typedBufferStride]}set(t,e){this.typedBuffer[t*this.typedBufferStride]=e}get buffer(){return this.typedBuffer.buffer}}class p{static{this.ElementCount=2}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.start=r,this.elementCount=2;const i=this.TypedArrayConstructor;void 0===n&&(n=2*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,s.hZ)(e,this.typedBuffer[t],this.typedBuffer[t+1])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t]=e[1]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t]=r}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}var y=r(35522);class h{static{this.ElementCount=3}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=3;const i=this.TypedArrayConstructor;void 0===n&&(n=3*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,y.hZ)(e,this.typedBuffer[t],this.typedBuffer[t+1],this.typedBuffer[t+2])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t]=e[2]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r,n){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=r,this.typedBuffer[t]=n}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}class d{static{this.ElementCount=4}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.start=r,this.elementCount=4;const i=this.TypedArrayConstructor;void 0===n&&(n=4*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,u.hZ)(e,this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t++]=e[2],this.typedBuffer[t]=e[3]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r,n,s){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=r,this.typedBuffer[t++]=n,this.typedBuffer[t]=s}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i++]=s[u++],n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}var B=r(620);class m extends a{constructor(t,e=0,r,n){(0,B.vA)(f.SX),super((0,f.pX)(),t,e,r,n),this.elementType="f16"}static{this.ElementType="f16"}}class g extends a{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}static{this.ElementType="f32"}}class T extends p{constructor(t,e=0,r,n){(0,B.vA)(f.SX),super((0,f.pX)(),t,e,r,n),this.elementType="f16"}slice(t,e){return this.sliceBuffer(T,t,e)}static{this.ElementType="f16"}}class E extends p{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(E,t,e)}static{this.ElementType="f32"}}class S extends h{constructor(t,e=0,r,n){(0,B.vA)(f.SX),super((0,f.pX)(),t,e,r,n),this.elementType="f16"}slice(t,e){return this.sliceBuffer(S,t,e)}static{this.ElementType="f16"}}class A extends h{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(A,t,e)}static fromTypedArray(t,e){return new A(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f32"}}class M extends d{constructor(t,e=0,r,n){(0,B.vA)(f.SX),super((0,f.pX)(),t,e,r,n),this.elementType="f16"}slice(t,e){return this.sliceBuffer(M,t,e)}static{this.ElementType="f16"}}class v extends d{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(v,t,e)}static{this.ElementType="f32"}}class x extends c{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(x,t,e)}static{this.ElementType="f32"}}class b extends c{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(b,t,e)}static{this.ElementType="f64"}}class w extends l{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(w,t,e)}static{this.ElementType="f32"}}class _ extends l{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(_,t,e)}static{this.ElementType="f64"}}class C extends a{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(C,t,e)}static{this.ElementType="f64"}}class L extends p{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(L,t,e)}static{this.ElementType="f64"}}class N extends h{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(N,t,e)}static fromTypedArray(t,e){return new N(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f64"}}class F extends d{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(F,t,e)}static{this.ElementType="f64"}}class R extends a{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(R,t,e)}static{this.ElementType="u8"}}class V extends p{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(V,t,e)}static{this.ElementType="u8"}}class P extends h{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(P,t,e)}static fromTypedArray(t,e){return new P(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="u8"}}class U extends d{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(U,t,e)}static{this.ElementType="u8"}}class Y extends a{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(Y,t,e)}static{this.ElementType="u16"}}class j extends p{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(j,t,e)}static{this.ElementType="u16"}}class O extends h{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(O,t,e)}static{this.ElementType="u16"}}class X extends d{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(X,t,e)}static{this.ElementType="u16"}}class I extends a{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(I,t,e)}static{this.ElementType="u32"}}class k extends p{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(k,t,e)}static{this.ElementType="u32"}}class z extends h{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(z,t,e)}static{this.ElementType="u32"}}class Z extends d{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(Z,t,e)}static{this.ElementType="u32"}}class $ extends a{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer($,t,e)}static{this.ElementType="i8"}}class q extends p{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(q,t,e)}static{this.ElementType="i8"}}class G extends h{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(G,t,e)}static{this.ElementType="i8"}}class K extends d{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(K,t,e)}static{this.ElementType="i8"}}class W extends a{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(W,t,e)}static{this.ElementType="i16"}}class D extends p{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(D,t,e)}static{this.ElementType="i16"}}class H extends h{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(H,t,e)}static{this.ElementType="i16"}}class Q extends d{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(Q,t,e)}static{this.ElementType="i16"}}class J extends a{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(J,t,e)}static{this.ElementType="i32"}}class tt extends p{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(tt,t,e)}static{this.ElementType="i32"}}class et extends h{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(et,t,e)}static{this.ElementType="i32"}}class rt extends d{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(rt,t,e)}static{this.ElementType="i32"}}class nt extends R{constructor(t,e=0,r,n){super(t,e,r,n)}get(t){return this.typedBuffer[t*this.typedBufferStride]/255}set(t,e){this.typedBuffer[t*this.typedBufferStride]=Math.round(255*(0,n.qE)(e,0,1))}slice(t,e){return this.sliceBuffer(nt,t,e)}}class st extends U{constructor(t,e=0,r,n){super(t,e,r,n)}getVec(t,e){return(0,u.hs)(e,super.getVec(t,e),1/255)}setVec(t,e){(0,u.jk)(ft,(0,u.T9)(ft,e,o.uY),o.Un),(0,u.hs)(ft,ft,255),(0,u.LI)(ft,ft),super.setVec(t,ft)}get(t,e){return super.get(t,e)/255}set(t,e,r){super.set(t,e,Math.round(255*(0,n.qE)(r,0,1)))}setValues(t,e,r,n,s){(0,u.hZ)(ft,e,r,n,s),this.setVec(t,ft)}slice(t,e){return this.sliceBuffer(st,t,e)}}class it extends W{constructor(t,e=0,r,n){super(t,e,r,n)}get(t){return Math.max(super.get(t)/32767,-1)}set(t,e){super.set(t,Math.round(32767*(0,n.qE)(e,-1,1)))}slice(t,e){return this.sliceBuffer(it,t,e)}}class ut extends D{constructor(t,e=0,r,n){super(t,e,r,n)}getVec(t,e){return(0,s.hZ)(ot,-1,-1),(0,s.T9)(e,(0,s.hs)(e,super.getVec(t,e),1/32767),ot)}setVec(t,e){(0,s.qE)(ot,e,i.IA,i.Un),(0,s.hs)(ot,ot,32767),(0,s.LI)(ot,ot),super.setVec(t,ot)}get(t,e){return Math.max(super.get(t,e)/32767,-1)}set(t,e,r){super.set(t,e,Math.round(32767*(0,n.qE)(r,-1,1)))}setValues(t,e,r){(0,s.hZ)(ot,e,r),this.setVec(t,ot)}slice(t,e){return this.sliceBuffer(ut,t,e)}}const ot=(0,i.vt)(),ft=(0,o.vt)()},72727(t,e,r){function n(t,e,r){if(e<=0)return 0;const n=t-r;return n<0?0:Math.floor(n/e)+1}r.d(e,{k:()=>n}),r(53966)},20498(t,e,r){r.d(e,{Bg:()=>s,SX:()=>u,pX:()=>i});let n=globalThis.Float16Array;function s(...t){return new(n??Float32Array)(...t)}function i(){return n}let u=!!n},31199(t,e,r){function n(t,e,r,n){const{loggerTag:s,stride:i}=e;return t.length%i!==0?(n.error(s,`Invalid array length, expected a multiple of ${i}`),new r([])):t}function s(t,e,r,s,i){if(!t)return t;if(t instanceof e)return n(t,s,e,i);for(const u of r)if(t instanceof u)return n(new e(t),s,e,i);if(Array.isArray(t))return n(new e(t),s,e,i);{const n=r.map(t=>`'${t.name}'`);return i.error(`Failed to set property, expected one of ${n}, but got ${t.constructor.name}`),new e([])}}function i(t,e,r){e[r]=function(t){const e=new Array(t.length);for(let r=0;r<t.length;r++)e[r]=t[r];return e}(t)}r.d(e,{B:()=>i,b:()=>s})},28846(t,e,r){r.d(e,{convertMeshVertexSpace:()=>c});var n=r(49186),s=r(4718),i=r(17676),u=r(1193),o=r(66895),f=r(72258);async function c(t,e,r){await Promise.resolve(),(0,i.Te)(r);const c=(0,f.UR)(t,e,{useEllipsoid:r?.useEllipsoid});if(!c)throw new n.A("meshUtils:convertVertexSpace()","Failed to convert to provided vertex space due to projection errors");return t.clone((0,o.Lz)(void 0,{vertexAttributes:new u.default({...c,uv:(0,s.o8)(t.vertexAttributes.uv),color:(0,s.o8)(t.vertexAttributes.color)}),vertexSpace:e,transform:null}))}},66895(t,e,r){r.d(e,{$N:()=>l,Lz:()=>i,QN:()=>a,WO:()=>f,hz:()=>o,o2:()=>s});const n=Symbol("meshContext");function s(t){return t&&"object"==typeof t&&n in t?t[n]:void 0}function i(t,e){const r=s(t);return{...t,[n]:{...r,...e}}}const u=Symbol("meshMaterialContext");function o(t){return t&&"object"==typeof t&&u in t?t[u]:void 0}function f(t){const e=o(t);if(e?.materialMap)return t;const r={materialMap:new Map};return{...t,[u]:r}}const c=Symbol("meshTextureContext");function l(t){return t&&"object"==typeof t&&c in t?t[c]:void 0}function a(t){const e=l(t);if(e?.textureMap)return t;const r={textureMap:new Map};return{...t,[c]:r}}},22141(t,e,r){r.d(e,{$5:()=>A,CN:()=>g,KM:()=>v,Mv:()=>b,X4:()=>T,gr:()=>S,qs:()=>M,si:()=>E,xA:()=>x});var n=r(34727),s=r(77690),i=r(29242),u=r(58083),o=r(9093),f=r(35522),c=r(51850),l=r(73941),a=r(48353),p=r(9762),y=(r(79258),r(21325)),h=r(28735),d=r(13030),B=r(73354),m=r(50867);function g(t,e,r,n){t.error(`Failed to project from (wkid:${e.wkid}) to (wkid:${r.wkid}).${n?" ":""}${n}`)}function T(t,e,r,n,s,i){return _(0,d.xs.fromTypedArray(t),0,d.Xm.fromTypedArray(e),r,d.Xm.fromTypedArray(n),s,d.xs.fromTypedArray(i))?i:null}function E(t,e,r,n,s,i){return _(1,d.xs.fromTypedArray(t),0,d.Xm.fromTypedArray(e),r,d.Xm.fromTypedArray(n),s,d.xs.fromTypedArray(i))?i:null}function S(t,e,r,n){return(0,p.projectBuffer)(t,e,0,r,n,0)?r:null}function A(t,e,r,n){return(0,p.projectBuffer)(t,e,0,r,n,0)?r:null}function M(t,e,r){return(0,s.Ge)(F,r),(0,B.b)(e,t,F),(0,n.or)(F)&&(0,B.n)(e,e),e}function v(t,e,r){return(0,s.z0)(F,r),(0,m.t)(e,t,F),(0,n.or)(F)&&(0,B.n)(e,e,4),e}function x(t,e,r,n,s,i){if(!_(0,d.xs.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),1,d.Xm.fromTypedArray(e),r,d.Xm.fromTypedArray(n),s,d.xs.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let e=3;e<t.length;e+=4)i[e]=t[e];return i}function b(t,e,r,n,s,i){if(!_(1,d.xs.fromTypedArray(t,16),1,d.Xm.fromTypedArray(e),r,d.Xm.fromTypedArray(n),s,d.xs.fromTypedArray(i,16)))return null;for(let e=3;e<t.length;e+=4)i[e]=t[e];return i}function w(t,e,r,n,i){switch((0,a.l)(n,r,N,n),1===t&&(0,u.B8)(N,N),e){case 0:return(0,s.Ge)(i,N);case 1:return(0,s.z0)(i,N)}}function _(t,e,r,n,s,i,u,o){if(!e)return;const c=n.count;if(function(t){return t.isWGS84||(0,y.x1)(t)||(0,l.q8)(t)||(0,l.KQ)(t)}(s))for(let n=0;n<c;n++)i.getVec(n,C),e.getVec(n,L),(0,f.ei)(L,L,w(t,r,C,u,F)),o.setVec(n,L);else for(let s=0;s<c;s++){i.getVec(s,C),e.getVec(s,L);const c=(0,h.jg)(n.get(s,1));let l=Math.cos(c);1===r!=(0===t)&&(l=1/l),w(t,r,C,u,F),0===t?(F[0]*=l,F[1]*=l,F[2]*=l,F[3]*=l,F[4]*=l,F[5]*=l):(F[0]*=l,F[3]*=l,F[6]*=l,F[1]*=l,F[4]*=l,F[7]*=l),(0,f.ei)(L,L,F),(0,f.S8)(L,L),o.setVec(s,L)}return o}const C=(0,c.vt)(),L=(0,c.vt)(),N=(0,o.vt)(),F=(0,i.vt)();r.d(e,["JP",0,"Projection may be possible after calling projection.load()."])},72258(t,e,r){r.d(e,{UR:()=>S,p5:()=>E,xK:()=>w});var n=r(53966),s=r(34727),i=r(86211),u=r(77690),o=r(29242),f=r(58083),c=r(9093),l=r(35522),a=r(51850),p=r(73941),y=r(98764),h=r(48353),d=r(65806),B=r(27615),m=r(73354),g=r(22141);const T=()=>n.A.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function E(t,e,{vertexSpace:r,spatialReference:n}){if("georeferenced"===r.type){const s=t;if(!(0,d.g)(e,s,n))return!1;const{origin:i}=r;return(0,l.Re)(t,s,i),!0}const s=(0,y.lO)(n),i=t;if(!(0,d.g)(e,i,s))return!1;const{origin:u}=r,o=F;if(!(0,h.l)(n,u,o,s))return!1;const c=(0,f.B8)(F,o);return null!=c&&((0,l.Z0)(t,i,c),!0)}function S(t,e,r){const{vertexSpace:n,transform:s,vertexAttributes:i}=t,o=(0,B.Hq)(n)?s:null,a=x(t.spatialReference,r,3);if((0,B.yJ)(n,e)&&(!o||(0,f.t2)(o.localMatrix,c.zK))&&b(a)){const{position:t,normal:e,tangent:n}=i,s=r?.allowBufferReuse;return{position:s?t:t.slice(),normal:s?e:e?.slice(),tangent:s?n:n?.slice()}}switch(t.vertexSpace.type){case"local":return"local"===e.type?function({vertexAttributes:t,spatialReference:e,transform:r},{origin:n},s,i){const u=A(e,i);if(!(0,h.l)(e,n,_,u))return(0,g.CN)(T(),e,u),null;if(r&&(0,f.lw)(_,_,r.localMatrix),!(0,h.l)(e,s,C,u))return(0,g.CN)(T(),u,e),null;(0,f.B8)(C,C);const o=(0,f.lw)(_,C,_);return v(o,e,i,3),M(t,o)}(t,t.vertexSpace,e.origin,r):function({spatialReference:t,vertexAttributes:e,transform:r},{origin:n},s,i){const u=A(t,i);if(!(0,h.l)(t,n,_,u))return(0,g.CN)(T(),t,u),null;r&&(0,f.lw)(_,_,r.localMatrix),v(_,t,i,1);const o=new Float64Array(e.position.length),c=function(t,e,r,n,s){(0,m.t)(n,t,e);const i=new Float64Array(t.length);return(0,g.$5)(n,s,i,r)?i:((0,g.CN)(T(),s,r),null)}(e.position,_,t,o,u);if(!c)return null;const a=function(t,e,r,n,s,i){if(null==s)return null;const u=new Float32Array(s.length);return(0,g.qs)(s,u,i),(0,g.si)(u,t,e,r,n,u)?u:((0,g.CN)(T(),n,e),null)}(c,t,o,u,e.normal,_);if(e.normal&&!a)return null;const p=function(t,e,r,n,s,i){if(null==s)return null;const u=new Float32Array(s.length);return(0,g.KM)(s,u,i),(0,g.Mv)(u,t,e,r,n,u)?u:((0,g.CN)(T(),n,e),null)}(c,t,o,u,e.tangent,_);if(e.tangent&&!p)return null;if(s){const t=(0,l.ze)(N,s);(0,m.a)(c,c,t)}return{position:c,normal:a,tangent:p}}(t,t.vertexSpace,e.origin,r);case"georeferenced":return"local"===e.type?function({vertexAttributes:t,spatialReference:e,transform:r},{origin:n},s,i){const o=A(e,i);if(!(0,h.l)(e,s,_,o))return(0,g.CN)(T(),e,o),null;const c=1/x(e,i,2);(0,f.hs)(_,_,[c,c,c]);const l=(0,f.B8)(C,_),{position:a,normal:p,tangent:y}=function(t,e,r){if(!e)return t;if(!r){const{position:r,normal:n,tangent:s}=t;return{position:(0,m.a)(new Float64Array(r.length),r,e),tangent:s,normal:n}}const n=M(t,r.localMatrix);return(0,m.a)(n.position,n.position,e),n}(t,n,r),d=new Float64Array(a.length),B=function(t,e,r,n,s){const i=(0,g.gr)(t,e,n,s);if(!i)return(0,g.CN)(T(),e,s),null;const u=new Float64Array(i.length);return(0,m.t)(u,i,r),u}(a,e,l,d,o);if(!B)return null;const E=(0,u.Ge)(L,l),S=function(t,e,r,n,s,i,u){if(null==t)return null;const o=u??new Float32Array(t.length);return(0,g.X4)(t,e,r,n,s,o)?((0,m.b)(o,o,i),o):((0,g.CN)(T(),r,s),null)}(p,a,e,d,o,E,p!==t.normal?p:void 0);if(!S&&p)return null;const v=function(t,e,r,n,s,i,u){if(null==t)return null;const o=u??new Float32Array(t.length);return(0,g.xA)(t,e,r,n,s,o)?((0,m.b)(o,o,i,4),o):((0,g.CN)(T(),r,s),null)}(y,a,e,d,o,E,y!==t.tangent?y:void 0);return!v&&y?null:{position:B,normal:S,tangent:v}}(t,t.vertexSpace,e.origin,r):function({vertexAttributes:t,transform:e,spatialReference:r},{origin:n},s,i){const u=x(r,i,3),o=n||!b(u)?(0,f.C)(_,e?.localMatrix??c.zK):null;o&&v(o,r,i,3);const{position:a,normal:p,tangent:y}=o?M(t,o):t,h=i?.allowBufferReuse,d=h?a:new Float64Array(a.length);let B=a;if(n&&(B=(0,m.a)(d,B,n)),s){const t=(0,l.ze)(N,s);B=(0,m.a)(d,B,t)}return{position:B!==t.position||h?B:B.slice(),normal:p!==t.normal||h?p:p?.slice(),tangent:y!==t.tangent||h?y:y?.slice()}}(t,t.vertexSpace,e.origin,r)}}function A(t,e){return e?.useEllipsoid&&(0,p.B3)(t)?y.Y0:(0,y.lO)(t)}function M(t,e){const r=new Float64Array(t.position.length);(0,m.t)(r,t.position,e);const n=t.normal?new Float32Array(t.normal.length):null,s=t.tangent?new Float32Array(t.tangent.length):null;return n&&t.normal&&(0,g.qs)(t.normal,n,e),s&&t.tangent&&(0,g.KM)(t.tangent,s,e),{position:r,normal:n,tangent:s}}function v(t,e,r,n){const s=x(e,r,n);b(s)||(0,f.hs)(t,t,[s,s,s])}function x(t,e,r){const n=!!(1&r),s=!!(2&r),i=e?.sourceUnit,u=e?.targetUnit;if(!i&&!u)return 1;let o=w(i,t);n||!i||b(o)||(T().warn("source unit conversion not supported"),o=1);let f=1/w(u,t);return s||!u||b(f)||(T().warn("target unit conversion not supported"),f=1),o*f}function b(t){return(0,s.Io)(t,1)}function w(t,e){if(null==t)return 1;const r=(0,i.KX)(e);return 1/(0,i.oU)(r,"meters",t)}const _=(0,c.vt)(),C=(0,c.vt)(),L=(0,o.vt)(),N=(0,a.vt)(),F=(0,c.vt)()},620(t,e,r){r.d(e,{L:()=>f,MX:()=>u,O_:()=>o,kL:()=>c,vA:()=>i,zH:()=>l});var n=r(48163);r(78955),(0,r(91829).vt)();class s{constructor(t){this.message=t}toString(){return`AssertException: ${this.message}`}}function i(t,e="Assertion"){if(!t){const t=new Error(e).stack;throw new s(`${e} at ${t}`)}}function u(t,e){t||(e=e||"",console.warn("Verify failed: "+e+"\n"+new Error("verify").stack))}function o(t,e,r,n){let s,i=(r[0]-t[0])/e[0],u=(n[0]-t[0])/e[0];i>u&&(s=i,i=u,u=s);let o=(r[1]-t[1])/e[1],f=(n[1]-t[1])/e[1];if(o>f&&(s=o,o=f,f=s),i>f||o>u)return!1;o>i&&(i=o),f<u&&(u=f);let c=(r[2]-t[2])/e[2],l=(n[2]-t[2])/e[2];return c>l&&(s=c,c=l,l=s),!(i>l||c>u||(l<u&&(u=l),u<0))}function f(t,e,r,s,i,u=(0,n.vt)()){const o=(s[i]-r[i])*(e[0]-t[0])-(s[0]-r[0])*(e[i]-t[i]),f=(s[0]-r[0])*(t[i]-r[i])-(s[i]-r[i])*(t[0]-r[0]);if(0===o)return!1;const c=f/o;return u[0]=t[0]+c*(e[0]-t[0]),u[1]=t[i]+c*(e[i]-t[i]),!0}function c(t,e){return Math.log(t)/Math.log(e)}function l(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[3]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[7]&&0===t[8]&&0===t[9]&&1===t[10]&&0===t[11]&&1===t[15]}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6465,8846],{73354(t,e,r){r.d(e,{a:()=>a,b:()=>o,c:()=>s,d:()=>u,e:()=>p,f:()=>l,l:()=>c,n:()=>y,t:()=>i}),r(44208);var n=r(72727);function s(t,e,r){i(t.typedBuffer,e.typedBuffer,r,t.typedBufferStride,e.typedBufferStride)}function i(t,e,r,s=3,i=s){const u=(0,n.k)(t.length,s,3),o=(0,n.k)(e.length,i,3),f=Math.min(u,o),c=r[0],l=r[1],a=r[2],p=r[4],y=r[5],h=r[6],d=r[8],B=r[9],m=r[10],g=r[12],T=r[13],E=r[14];let S=0,A=0;for(let r=0;r<f;r++){const r=e[S],n=e[S+1],u=e[S+2];t[A]=c*r+p*n+d*u+g,t[A+1]=l*r+y*n+B*u+T,t[A+2]=a*r+h*n+m*u+E,S+=i,A+=s}return t}function u(t,e,r){o(t.typedBuffer,e.typedBuffer,r,t.typedBufferStride,e.typedBufferStride)}function o(t,e,r,s=3,i=s){const u=(0,n.k)(t.length,s,3),o=(0,n.k)(e.length,i,3),f=Math.min(u,o),c=r[0],l=r[1],a=r[2],p=r[3],y=r[4],h=r[5],d=r[6],B=r[7],m=r[8];let g=0,T=0;for(let r=0;r<f;r++){const r=e[g],n=e[g+1],u=e[g+2];t[T]=c*r+p*n+d*u,t[T+1]=l*r+y*n+B*u,t[T+2]=a*r+h*n+m*u,g+=i,T+=s}}function f(t,e,r,n=3,s=n){const i=Math.min(t.length/n,e.length/s);let u=0,o=0;for(let f=0;f<i;f++)t[o]=r*e[u],t[o+1]=r*e[u+1],t[o+2]=r*e[u+2],u+=s,o+=n;return t}function c(t,e,r,n){l(t.typedBuffer,e.typedBuffer,r,n,t.typedBufferStride,e.typedBufferStride)}function l(t,e,r,n,s=3,i=s){const u=Math.min(t.length/s,e.length/i);let o=0,f=0;const c=1/2.2;for(let l=0;l<u;l++)t[f]=n*(r*e[o])**c,t[f+1]=n*(r*e[o+1])**c,t[f+2]=n*(r*e[o+2])**c,o+=i,f+=s}function a(t,e,r,s=3,i=s){const u=(0,n.k)(t.length,s,3),o=(0,n.k)(e.length,i,3),f=Math.min(u,o);let c=0,l=0;for(let n=0;n<f;n++)t[l]=e[c]+r[0],t[l+1]=e[c+1]+r[1],t[l+2]=e[c+2]+r[2],c+=i,l+=s;return t}function p(t,e){y(t.typedBuffer,e.typedBuffer,t.typedBufferStride,e.typedBufferStride)}function y(t,e,r=3,n=r){const s=Math.min(t.length/r,e.length/n);let i=0,u=0;for(let o=0;o<s;o++){const s=e[i],o=e[i+1],f=e[i+2],c=s*s+o*o+f*f;if(c>0){const e=1/Math.sqrt(c);t[u]=e*s,t[u+1]=e*o,t[u+2]=e*f}i+=n,u+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:l,linearToSRGBView:c,normalize:y,normalizeView:p,scale:f,scaleView:function(t,e,r){f(t.typedBuffer,e.typedBuffer,r,t.typedBufferStride,e.typedBufferStride)},shiftRight:function(t,e,r){const n=Math.min(t.count,e.count),s=t.typedBuffer,i=t.typedBufferStride,u=e.typedBuffer,o=e.typedBufferStride;let f=0,c=0;for(let t=0;t<n;t++)s[c]=u[f]>>r,s[c+1]=u[f+1]>>r,s[c+2]=u[f+2]>>r,f+=o,c+=i},transformMat3:o,transformMat3View:u,transformMat4:i,transformMat4View:s,translate:a},Symbol.toStringTag,{value:"Module"}))},50867(t,e,r){r.d(e,{a:()=>s,b:()=>c,l:()=>f,n:()=>u,t:()=>i}),r(44208);var n=r(72727);function s(t,e,r){i(t.typedBuffer,e.typedBuffer,r,t.typedBufferStride,e.typedBufferStride)}function i(t,e,r,s=4,i=s){const u=(0,n.k)(t.length,s,4),o=(0,n.k)(e.length,i,4),f=Math.min(u,o),c=r[0],l=r[1],a=r[2],p=r[3],y=r[4],h=r[5],d=r[6],B=r[7],m=r[8];let g=0,T=0;for(let r=0;r<f;r++){const r=e[g],n=e[g+1],u=e[g+2],o=e[g+3];t[T]=c*r+p*n+d*u,t[T+1]=l*r+y*n+B*u,t[T+2]=a*r+h*n+m*u,t[T+3]=o,g+=i,T+=s}}function u(t,e){const r=Math.min(t.count,e.count),n=t.typedBuffer,s=t.typedBufferStride,i=e.typedBuffer,u=e.typedBufferStride;for(let t=0;t<r;t++){const e=t*s,r=t*u,o=i[r],f=i[r+1],c=i[r+2],l=o*o+f*f+c*c;if(l>0){const t=1/Math.sqrt(l);n[e]=t*o,n[e+1]=t*f,n[e+2]=t*c}}}function o(t,e,r,n=4){const s=Math.min(t.length/n,e.count),i=e.typedBuffer,u=e.typedBufferStride;let o=0,f=0;for(let e=0;e<s;e++)t[f]=r*i[o],t[f+1]=r*i[o+1],t[f+2]=r*i[o+2],t[f+3]=r*i[o+3],o+=u,f+=n}function f(t,e,r,n){c(t.typedBuffer,e,r,n,t.typedBufferStride)}function c(t,e,r,n,s=4){const i=Math.min(t.length/s,e.count),u=e.typedBuffer,o=e.typedBufferStride;let f=0,c=0;const l=1/2.2;for(let e=0;e<i;e++)t[c]=n*(r*u[f])**l,t[c+1]=n*(r*u[f+1])**l,t[c+2]=n*(r*u[f+2])**l,t[c+3]=n*r*u[f+3],f+=o,c+=s}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:f,normalize:u,scale:o,scaleView:function(t,e,r){o(t.typedBuffer,e,r,t.typedBufferStride)},transformMat3:i,transformMat3View:s,transformMat4:function(t,e,r,s=4,i=s){const u=(0,n.k)(t.length,s,4),o=(0,n.k)(e.length,i,4),f=Math.min(u,o),c=r[0],l=r[1],a=r[2],p=r[3],y=r[4],h=r[5],d=r[6],B=r[7],m=r[8],g=r[9],T=r[10],E=r[11],S=r[12],A=r[13],M=r[14],v=r[15];let x=0,b=0;for(let r=0;r<f;r++){const r=e[x],n=e[x+1],u=e[x+2],o=e[x+3];t[b]=c*r+y*n+m*u+S*o,t[b+1]=l*r+h*n+g*u+A*o,t[b+2]=a*r+d*n+T*u+M*o,t[b+3]=p*r+B*n+E*u+v*o,x+=i,b+=s}},transformMat4View:function(t,e,r){const s=t.typedBuffer,i=t.typedBufferStride,u=e.typedBuffer,o=e.typedBufferStride,f=(0,n.k)(s.length,i,4),c=(0,n.k)(u.length,o,4),l=Math.min(f,c),a=r[0],p=r[1],y=r[2],h=r[3],d=r[4],B=r[5],m=r[6],g=r[7],T=r[8],E=r[9],S=r[10],A=r[11],M=r[12],v=r[13],x=r[14],b=r[15];for(let t=0;t<l;t++){const e=t*i,r=t*o,n=u[r],f=u[r+1],c=u[r+2],l=u[r+3];s[e]=a*n+d*f+T*c+M*l,s[e+1]=p*n+B*f+E*c+v*l,s[e+2]=y*n+m*f+S*c+x*l,s[e+3]=h*n+g*f+A*c+b*l}}},Symbol.toStringTag,{value:"Module"}))},48163(t,e,r){function n(){return[0,0]}function s(t){return[t[0],t[1]]}function i(t,e){return[t,e]}function u(){return i(1,1)}function o(){return i(-1,-1)}function f(){return i(1,0)}function c(){return i(0,1)}r.d(e,{fA:()=>i,o8:()=>s,vt:()=>n});const l=u(),a=o(),p=f(),y=c();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:a,ONES:l,UNIT_X:p,UNIT_Y:y,ZEROS:[0,0],clone:s,create:n,freeze:function(t,e){return[t,e]},fromArray:function(t,e=[0,0]){const r=Math.min(2,t.length);for(let n=0;n<r;++n)e[n]=t[n];return e},fromValues:i,negativeOnes:o,ones:u,unitX:f,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"})),r.d(e,["IA",0,a,"Un",0,l])},91829(t,e,r){function n(){return[0,0,0,0]}function s(t,e,r,n){return[t,e,r,n]}function i(t,e,r,n){return[t,e,r,n]}function u(){return s(1,1,1,1)}function o(){return s(1,0,0,0)}function f(){return s(0,1,0,0)}function c(){return s(0,0,1,0)}function l(){return s(0,0,0,1)}r.d(e,{CN:()=>i,_Y:()=>l,fA:()=>s,vt:()=>n});const a=[0,0,0,0],p=u(),y=o(),h=f(),d=c(),B=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:p,UNIT_W:B,UNIT_X:y,UNIT_Y:h,UNIT_Z:d,ZEROS:a,clone:function(t){return[t[0],t[1],t[2],t[3]]},create:n,freeze:i,fromArray:function(t,e=[0,0,0,0]){const r=Math.min(4,t.length);for(let n=0;n<r;++n)e[n]=t[n];return e},fromValues:s,ones:u,unitW:l,unitX:o,unitY:f,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"})),r.d(e,["Un",0,p,"uY",0,a])},48353(t,e,r){r.d(e,{l:()=>c});var n=r(34727),s=r(58083),i=r(51850);function u(t,e,r){const n=Math.sin(t),s=Math.cos(t),i=Math.sin(e),u=Math.cos(e),o=r;return o[0]=-n,o[4]=-i*s,o[8]=u*s,o[12]=0,o[1]=s,o[5]=-i*n,o[9]=u*n,o[13]=0,o[2]=0,o[6]=u,o[10]=i,o[14]=0,o[3]=0,o[7]=0,o[11]=0,o[15]=1,o}var o=r(49208),f=r(21325);function c(t,e,r,n){const i=(0,o.Tp)(t,n);if(null==i)return!1;const c=i.source.spatialReferenceId,h=i.dest.spatialReferenceId;if(c===h&&!l(h)&&(0!==c||(0,f.aI)(t,n)))return(0,s.kN)(r,e),!0;if(l(h)){const t=o.w5[c][10],n=o.w5[10][h];return null!=t&&null!=n&&(t(e,0,p,0),n(p,0,y,0),u(a*p[0],a*p[1],r),r[12]=y[0],r[13]=y[1],r[14]=y[2],!0)}const d=l(c);if((3===h||11===h||2===h||5===h)&&(2===c||d||3===c||5===c)){const t=o.w5[c][10],n=o.w5[10][h];return null!=t&&null!=n&&(t(e,0,p,0),n(p,0,y,0),d?function(t,e,r){u(t,e,r),(0,s.mg)(r,r)}(a*p[0],a*p[1],r):(0,s.D_)(r),r[12]=y[0],r[13]=y[1],r[14]=y[2],!0)}return!1}function l(t){return 1===t||6===t||8===t||4===t}const a=(0,n.kU)(1),p=(0,i.vt)(),y=(0,i.vt)()},65806(t,e,r){r.d(e,{g:()=>u});var n=r(51850),s=r(91218),i=r(9762);function u(t,e,r,n){if((0,s.canProjectWithoutEngine)(t.spatialReference,r))return o[0]=t.x,o[1]=t.y,o[2]=t.z??0,(0,i.projectBuffer)(o,t.spatialReference,0,e,r,0);const u=(0,s.tryProject)(t,r,n);return!!u&&(e[0]=u.x,e[1]=u.y,e[2]=u.z??0,!0)}const o=(0,n.vt)()},1193(t,e,r){r.r(e),r.d(e,{default:()=>a});var n,s=r(5482),i=r(69540),u=r(25482),o=r(4718),f=r(53966),c=r(91429),l=r(31199);let a=n=class extends((0,i.OU)(u.o)){constructor(t){super(t),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(t){return(0,l.b)(t,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},f.A.getLogger(this))}castPosition(t){return t&&t instanceof Float32Array&&f.A.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),(0,l.b)(t,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},f.A.getLogger(this))}castUv(t){return(0,l.b)(t,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},f.A.getLogger(this))}castNormal(t){return(0,l.b)(t,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},f.A.getLogger(this))}castTangent(t){return(0,l.b)(t,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},f.A.getLogger(this))}clonePositional(){const t={position:(0,o.o8)(this.position),normal:(0,o.o8)(this.normal),tangent:(0,o.o8)(this.tangent),uv:this.uv,color:this.color};return new n(t)}get usedMemory(){return this.position.byteLength+(this.uv?.byteLength??0)+(this.normal?.byteLength??0)+(this.tangent?.byteLength??0)+(this.color?.byteLength??0)}};(0,s.Cg)([(0,c.MZ)({json:{write:l.B}})],a.prototype,"color",void 0),(0,s.Cg)([(0,c.wg)("color")],a.prototype,"castColor",null),(0,s.Cg)([(0,c.MZ)({nonNullable:!0,json:{write:l.B}})],a.prototype,"position",void 0),(0,s.Cg)([(0,c.wg)("position")],a.prototype,"castPosition",null),(0,s.Cg)([(0,c.MZ)({json:{write:l.B}})],a.prototype,"uv",void 0),(0,s.Cg)([(0,c.wg)("uv")],a.prototype,"castUv",null),(0,s.Cg)([(0,c.MZ)({json:{write:l.B}})],a.prototype,"normal",void 0),(0,s.Cg)([(0,c.wg)("normal")],a.prototype,"castNormal",null),(0,s.Cg)([(0,c.MZ)({json:{write:l.B}})],a.prototype,"tangent",void 0),(0,s.Cg)([(0,c.wg)("tangent")],a.prototype,"castTangent",null),a=n=(0,s.Cg)([(0,c.$K)("esri.geometry.support.MeshVertexAttributes")],a)},13030(t,e,r){r.d(e,{Y$:()=>g,XW:()=>m,qB:()=>C,Qt:()=>W,My:()=>J,bf:()=>$,jZ:()=>x,j0:()=>b,Sx:()=>w,E$:()=>_,Qy:()=>it,h:()=>Y,P:()=>I,SL:()=>R,dy:()=>nt,ES:()=>ut,gH:()=>E,ZD:()=>T,si:()=>L,mJ:()=>D,UL:()=>tt,D6:()=>q,Yi:()=>j,An:()=>k,LC:()=>V,xs:()=>A,EC:()=>S,Xm:()=>N,Vp:()=>H,zD:()=>et,m8:()=>G,nS:()=>O,H$:()=>z,eI:()=>P,td:()=>st,Eq:()=>v,jz:()=>M,Aj:()=>F,E7:()=>Q,Y4:()=>rt,TX:()=>K,Uz:()=>X,ml:()=>Z,XP:()=>U});var n=r(34727),s=r(37585),i=r(48163),u=r(78955),o=r(91829),f=r(20498);class c{static{this.ElementCount=9}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=9;const i=this.TypedArrayConstructor;void 0===n&&(n=9*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<9;t++)e[t]=this.typedBuffer[r++];return e}setMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<9;t++)this.typedBuffer[r++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;for(let t=0;t<9;++t)n[i++]=s[u++]}get buffer(){return this.typedBuffer.buffer}}class l{static{this.ElementCount=16}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=16;const i=this.TypedArrayConstructor;void 0===n&&(n=16*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<16;t++)e[t]=this.typedBuffer[r++];return e}setMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<16;t++)this.typedBuffer[r++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}copyFrom(t,e,r){this.copyFromTypedBuffer(t,e.typedBuffer,r*e.typedBufferStride)}copyFromTypedBuffer(t,e,r){const n=this.typedBuffer;let s=t*this.typedBufferStride;for(let t=0;t<16;++t)n[s++]=e[r++]}get buffer(){return this.typedBuffer.buffer}}class a{static{this.ElementCount=1}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=1;const i=this.TypedArrayConstructor;void 0===n&&(n=i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.stride=n,this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride)}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}get(t){return this.typedBuffer[t*this.typedBufferStride]}set(t,e){this.typedBuffer[t*this.typedBufferStride]=e}get buffer(){return this.typedBuffer.buffer}}class p{static{this.ElementCount=2}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.start=r,this.elementCount=2;const i=this.TypedArrayConstructor;void 0===n&&(n=2*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,s.hZ)(e,this.typedBuffer[t],this.typedBuffer[t+1])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t]=e[1]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t]=r}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}var y=r(35522);class h{static{this.ElementCount=3}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=3;const i=this.TypedArrayConstructor;void 0===n&&(n=3*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,y.hZ)(e,this.typedBuffer[t],this.typedBuffer[t+1],this.typedBuffer[t+2])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t]=e[2]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r,n){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=r,this.typedBuffer[t]=n}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}class d{static{this.ElementCount=4}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.start=r,this.elementCount=4;const i=this.TypedArrayConstructor;void 0===n&&(n=4*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,u.hZ)(e,this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t++]=e[2],this.typedBuffer[t]=e[3]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r,n,s){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=r,this.typedBuffer[t++]=n,this.typedBuffer[t]=s}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i++]=s[u++],n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}var B=r(620);class m extends a{constructor(t,e=0,r,n){(0,B.vA)(f.SX),super((0,f.pX)(),t,e,r,n),this.elementType="f16"}static{this.ElementType="f16"}}class g extends a{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}static{this.ElementType="f32"}}class T extends p{constructor(t,e=0,r,n){(0,B.vA)(f.SX),super((0,f.pX)(),t,e,r,n),this.elementType="f16"}slice(t,e){return this.sliceBuffer(T,t,e)}static{this.ElementType="f16"}}class E extends p{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(E,t,e)}static{this.ElementType="f32"}}class S extends h{constructor(t,e=0,r,n){(0,B.vA)(f.SX),super((0,f.pX)(),t,e,r,n),this.elementType="f16"}slice(t,e){return this.sliceBuffer(S,t,e)}static{this.ElementType="f16"}}class A extends h{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(A,t,e)}static fromTypedArray(t,e){return new A(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f32"}}class M extends d{constructor(t,e=0,r,n){(0,B.vA)(f.SX),super((0,f.pX)(),t,e,r,n),this.elementType="f16"}slice(t,e){return this.sliceBuffer(M,t,e)}static{this.ElementType="f16"}}class v extends d{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(v,t,e)}static{this.ElementType="f32"}}class x extends c{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(x,t,e)}static{this.ElementType="f32"}}class b extends c{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(b,t,e)}static{this.ElementType="f64"}}class w extends l{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(w,t,e)}static{this.ElementType="f32"}}class _ extends l{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(_,t,e)}static{this.ElementType="f64"}}class C extends a{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(C,t,e)}static{this.ElementType="f64"}}class L extends p{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(L,t,e)}static{this.ElementType="f64"}}class N extends h{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(N,t,e)}static fromTypedArray(t,e){return new N(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f64"}}class F extends d{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(F,t,e)}static{this.ElementType="f64"}}class R extends a{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(R,t,e)}static{this.ElementType="u8"}}class V extends p{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(V,t,e)}static{this.ElementType="u8"}}class P extends h{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(P,t,e)}static fromTypedArray(t,e){return new P(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="u8"}}class U extends d{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(U,t,e)}static{this.ElementType="u8"}}class Y extends a{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(Y,t,e)}static{this.ElementType="u16"}}class j extends p{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(j,t,e)}static{this.ElementType="u16"}}class O extends h{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(O,t,e)}static{this.ElementType="u16"}}class X extends d{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(X,t,e)}static{this.ElementType="u16"}}class I extends a{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(I,t,e)}static{this.ElementType="u32"}}class k extends p{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(k,t,e)}static{this.ElementType="u32"}}class z extends h{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(z,t,e)}static{this.ElementType="u32"}}class Z extends d{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(Z,t,e)}static{this.ElementType="u32"}}class $ extends a{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer($,t,e)}static{this.ElementType="i8"}}class q extends p{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(q,t,e)}static{this.ElementType="i8"}}class G extends h{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(G,t,e)}static{this.ElementType="i8"}}class K extends d{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(K,t,e)}static{this.ElementType="i8"}}class W extends a{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(W,t,e)}static{this.ElementType="i16"}}class D extends p{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(D,t,e)}static{this.ElementType="i16"}}class H extends h{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(H,t,e)}static{this.ElementType="i16"}}class Q extends d{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(Q,t,e)}static{this.ElementType="i16"}}class J extends a{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(J,t,e)}static{this.ElementType="i32"}}class tt extends p{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(tt,t,e)}static{this.ElementType="i32"}}class et extends h{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(et,t,e)}static{this.ElementType="i32"}}class rt extends d{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(rt,t,e)}static{this.ElementType="i32"}}class nt extends R{constructor(t,e=0,r,n){super(t,e,r,n)}get(t){return this.typedBuffer[t*this.typedBufferStride]/255}set(t,e){this.typedBuffer[t*this.typedBufferStride]=Math.round(255*(0,n.qE)(e,0,1))}slice(t,e){return this.sliceBuffer(nt,t,e)}}class st extends U{constructor(t,e=0,r,n){super(t,e,r,n)}getVec(t,e){return(0,u.hs)(e,super.getVec(t,e),1/255)}setVec(t,e){(0,u.jk)(ft,(0,u.T9)(ft,e,o.uY),o.Un),(0,u.hs)(ft,ft,255),(0,u.LI)(ft,ft),super.setVec(t,ft)}get(t,e){return super.get(t,e)/255}set(t,e,r){super.set(t,e,Math.round(255*(0,n.qE)(r,0,1)))}setValues(t,e,r,n,s){(0,u.hZ)(ft,e,r,n,s),this.setVec(t,ft)}slice(t,e){return this.sliceBuffer(st,t,e)}}class it extends W{constructor(t,e=0,r,n){super(t,e,r,n)}get(t){return Math.max(super.get(t)/32767,-1)}set(t,e){super.set(t,Math.round(32767*(0,n.qE)(e,-1,1)))}slice(t,e){return this.sliceBuffer(it,t,e)}}class ut extends D{constructor(t,e=0,r,n){super(t,e,r,n)}getVec(t,e){return(0,s.hZ)(ot,-1,-1),(0,s.T9)(e,(0,s.hs)(e,super.getVec(t,e),1/32767),ot)}setVec(t,e){(0,s.qE)(ot,e,i.IA,i.Un),(0,s.hs)(ot,ot,32767),(0,s.LI)(ot,ot),super.setVec(t,ot)}get(t,e){return Math.max(super.get(t,e)/32767,-1)}set(t,e,r){super.set(t,e,Math.round(32767*(0,n.qE)(r,-1,1)))}setValues(t,e,r){(0,s.hZ)(ot,e,r),this.setVec(t,ot)}slice(t,e){return this.sliceBuffer(ut,t,e)}}const ot=(0,i.vt)(),ft=(0,o.vt)()},72727(t,e,r){function n(t,e,r){if(e<=0)return 0;const n=t-r;return n<0?0:Math.floor(n/e)+1}r.d(e,{k:()=>n}),r(53966)},20498(t,e,r){r.d(e,{Bg:()=>s,SX:()=>u,pX:()=>i});let n=globalThis.Float16Array;function s(...t){return new(n??Float32Array)(...t)}function i(){return n}let u=!!n},31199(t,e,r){function n(t,e,r,n){const{loggerTag:s,stride:i}=e;return t.length%i!==0?(n.error(s,`Invalid array length, expected a multiple of ${i}`),new r([])):t}function s(t,e,r,s,i){if(!t)return t;if(t instanceof e)return n(t,s,e,i);for(const u of r)if(t instanceof u)return n(new e(t),s,e,i);if(Array.isArray(t))return n(new e(t),s,e,i);{const n=r.map(t=>`'${t.name}'`);return i.error(`Failed to set property, expected one of ${n}, but got ${t.constructor.name}`),new e([])}}function i(t,e,r){e[r]=function(t){const e=new Array(t.length);for(let r=0;r<t.length;r++)e[r]=t[r];return e}(t)}r.d(e,{B:()=>i,b:()=>s})},28846(t,e,r){r.d(e,{convertMeshVertexSpace:()=>c});var n=r(49186),s=r(4718),i=r(17676),u=r(1193),o=r(66895),f=r(72258);async function c(t,e,r){await Promise.resolve(),(0,i.Te)(r);const c=(0,f.UR)(t,e,{useEllipsoid:r?.useEllipsoid});if(!c)throw new n.A("meshUtils:convertVertexSpace()","Failed to convert to provided vertex space due to projection errors");return t.clone((0,o.Lz)(void 0,{vertexAttributes:new u.default({...c,uv:(0,s.o8)(t.vertexAttributes.uv),color:(0,s.o8)(t.vertexAttributes.color)}),vertexSpace:e,transform:null}))}},66895(t,e,r){r.d(e,{$N:()=>l,Lz:()=>i,QN:()=>a,WO:()=>f,hz:()=>o,o2:()=>s});const n=Symbol("meshContext");function s(t){return t&&"object"==typeof t&&n in t?t[n]:void 0}function i(t,e){const r=s(t);return{...t,[n]:{...r,...e}}}const u=Symbol("meshMaterialContext");function o(t){return t&&"object"==typeof t&&u in t?t[u]:void 0}function f(t){const e=o(t);if(e?.materialMap)return t;const r={materialMap:new Map};return{...t,[u]:r}}const c=Symbol("meshTextureContext");function l(t){return t&&"object"==typeof t&&c in t?t[c]:void 0}function a(t){const e=l(t);if(e?.textureMap)return t;const r={textureMap:new Map};return{...t,[c]:r}}},22141(t,e,r){r.d(e,{$5:()=>A,CN:()=>g,KM:()=>v,Mv:()=>b,X4:()=>T,gr:()=>S,qs:()=>M,si:()=>E,xA:()=>x});var n=r(34727),s=r(77690),i=r(29242),u=r(58083),o=r(9093),f=r(35522),c=r(51850),l=r(73941),a=r(48353),p=r(9762),y=(r(79258),r(21325)),h=r(28735),d=r(13030),B=r(73354),m=r(50867);function g(t,e,r,n){t.error(`Failed to project from (wkid:${e.wkid}) to (wkid:${r.wkid}).${n?" ":""}${n}`)}function T(t,e,r,n,s,i){return _(0,d.xs.fromTypedArray(t),0,d.Xm.fromTypedArray(e),r,d.Xm.fromTypedArray(n),s,d.xs.fromTypedArray(i))?i:null}function E(t,e,r,n,s,i){return _(1,d.xs.fromTypedArray(t),0,d.Xm.fromTypedArray(e),r,d.Xm.fromTypedArray(n),s,d.xs.fromTypedArray(i))?i:null}function S(t,e,r,n){return(0,p.projectBuffer)(t,e,0,r,n,0)?r:null}function A(t,e,r,n){return(0,p.projectBuffer)(t,e,0,r,n,0)?r:null}function M(t,e,r){return(0,s.Ge)(F,r),(0,B.b)(e,t,F),(0,n.or)(F)&&(0,B.n)(e,e),e}function v(t,e,r){return(0,s.z0)(F,r),(0,m.t)(e,t,F),(0,n.or)(F)&&(0,B.n)(e,e,4),e}function x(t,e,r,n,s,i){if(!_(0,d.xs.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),1,d.Xm.fromTypedArray(e),r,d.Xm.fromTypedArray(n),s,d.xs.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let e=3;e<t.length;e+=4)i[e]=t[e];return i}function b(t,e,r,n,s,i){if(!_(1,d.xs.fromTypedArray(t,16),1,d.Xm.fromTypedArray(e),r,d.Xm.fromTypedArray(n),s,d.xs.fromTypedArray(i,16)))return null;for(let e=3;e<t.length;e+=4)i[e]=t[e];return i}function w(t,e,r,n,i){switch((0,a.l)(n,r,N,n),1===t&&(0,u.B8)(N,N),e){case 0:return(0,s.Ge)(i,N);case 1:return(0,s.z0)(i,N)}}function _(t,e,r,n,s,i,u,o){if(!e)return;const c=n.count;if(function(t){return t.isWGS84||(0,y.x1)(t)||(0,l.q8)(t)||(0,l.KQ)(t)}(s))for(let n=0;n<c;n++)i.getVec(n,C),e.getVec(n,L),(0,f.ei)(L,L,w(t,r,C,u,F)),o.setVec(n,L);else for(let s=0;s<c;s++){i.getVec(s,C),e.getVec(s,L);const c=(0,h.jg)(n.get(s,1));let l=Math.cos(c);1===r!=(0===t)&&(l=1/l),w(t,r,C,u,F),0===t?(F[0]*=l,F[1]*=l,F[2]*=l,F[3]*=l,F[4]*=l,F[5]*=l):(F[0]*=l,F[3]*=l,F[6]*=l,F[1]*=l,F[4]*=l,F[7]*=l),(0,f.ei)(L,L,F),(0,f.S8)(L,L),o.setVec(s,L)}return o}const C=(0,c.vt)(),L=(0,c.vt)(),N=(0,o.vt)(),F=(0,i.vt)();r.d(e,["JP",0,"Projection may be possible after calling projection.load()."])},72258(t,e,r){r.d(e,{UR:()=>S,p5:()=>E,xK:()=>w});var n=r(53966),s=r(34727),i=r(86211),u=r(77690),o=r(29242),f=r(58083),c=r(9093),l=r(35522),a=r(51850),p=r(73941),y=r(98764),h=r(48353),d=r(65806),B=r(27615),m=r(73354),g=r(22141);const T=()=>n.A.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function E(t,e,{vertexSpace:r,spatialReference:n}){if("georeferenced"===r.type){const s=t;if(!(0,d.g)(e,s,n))return!1;const{origin:i}=r;return(0,l.Re)(t,s,i),!0}const s=(0,y.lO)(n),i=t;if(!(0,d.g)(e,i,s))return!1;const{origin:u}=r,o=F;if(!(0,h.l)(n,u,o,s))return!1;const c=(0,f.B8)(F,o);return null!=c&&((0,l.Z0)(t,i,c),!0)}function S(t,e,r){const{vertexSpace:n,transform:s,vertexAttributes:i}=t,o=(0,B.Hq)(n)?s:null,a=x(t.spatialReference,r,3);if((0,B.yJ)(n,e)&&(!o||(0,f.t2)(o.localMatrix,c.zK))&&b(a)){const{position:t,normal:e,tangent:n}=i,s=r?.allowBufferReuse;return{position:s?t:t.slice(),normal:s?e:e?.slice(),tangent:s?n:n?.slice()}}switch(t.vertexSpace.type){case"local":return"local"===e.type?function({vertexAttributes:t,spatialReference:e,transform:r},{origin:n},s,i){const u=A(e,i);if(!(0,h.l)(e,n,_,u))return(0,g.CN)(T(),e,u),null;if(r&&(0,f.lw)(_,_,r.localMatrix),!(0,h.l)(e,s,C,u))return(0,g.CN)(T(),u,e),null;(0,f.B8)(C,C);const o=(0,f.lw)(_,C,_);return v(o,e,i,3),M(t,o)}(t,t.vertexSpace,e.origin,r):function({spatialReference:t,vertexAttributes:e,transform:r},{origin:n},s,i){const u=A(t,i);if(!(0,h.l)(t,n,_,u))return(0,g.CN)(T(),t,u),null;r&&(0,f.lw)(_,_,r.localMatrix),v(_,t,i,1);const o=new Float64Array(e.position.length),c=function(t,e,r,n,s){(0,m.t)(n,t,e);const i=new Float64Array(t.length);return(0,g.$5)(n,s,i,r)?i:((0,g.CN)(T(),s,r),null)}(e.position,_,t,o,u);if(!c)return null;const a=function(t,e,r,n,s,i){if(null==s)return null;const u=new Float32Array(s.length);return(0,g.qs)(s,u,i),(0,g.si)(u,t,e,r,n,u)?u:((0,g.CN)(T(),n,e),null)}(c,t,o,u,e.normal,_);if(e.normal&&!a)return null;const p=function(t,e,r,n,s,i){if(null==s)return null;const u=new Float32Array(s.length);return(0,g.KM)(s,u,i),(0,g.Mv)(u,t,e,r,n,u)?u:((0,g.CN)(T(),n,e),null)}(c,t,o,u,e.tangent,_);if(e.tangent&&!p)return null;if(s){const t=(0,l.ze)(N,s);(0,m.a)(c,c,t)}return{position:c,normal:a,tangent:p}}(t,t.vertexSpace,e.origin,r);case"georeferenced":return"local"===e.type?function({vertexAttributes:t,spatialReference:e,transform:r},{origin:n},s,i){const o=A(e,i);if(!(0,h.l)(e,s,_,o))return(0,g.CN)(T(),e,o),null;const c=1/x(e,i,2);(0,f.hs)(_,_,[c,c,c]);const l=(0,f.B8)(C,_),{position:a,normal:p,tangent:y}=function(t,e,r){if(!e)return t;if(!r){const{position:r,normal:n,tangent:s}=t;return{position:(0,m.a)(new Float64Array(r.length),r,e),tangent:s,normal:n}}const n=M(t,r.localMatrix);return(0,m.a)(n.position,n.position,e),n}(t,n,r),d=new Float64Array(a.length),B=function(t,e,r,n,s){const i=(0,g.gr)(t,e,n,s);if(!i)return(0,g.CN)(T(),e,s),null;const u=new Float64Array(i.length);return(0,m.t)(u,i,r),u}(a,e,l,d,o);if(!B)return null;const E=(0,u.Ge)(L,l),S=function(t,e,r,n,s,i,u){if(null==t)return null;const o=u??new Float32Array(t.length);return(0,g.X4)(t,e,r,n,s,o)?((0,m.b)(o,o,i),o):((0,g.CN)(T(),r,s),null)}(p,a,e,d,o,E,p!==t.normal?p:void 0);if(!S&&p)return null;const v=function(t,e,r,n,s,i,u){if(null==t)return null;const o=u??new Float32Array(t.length);return(0,g.xA)(t,e,r,n,s,o)?((0,m.b)(o,o,i,4),o):((0,g.CN)(T(),r,s),null)}(y,a,e,d,o,E,y!==t.tangent?y:void 0);return!v&&y?null:{position:B,normal:S,tangent:v}}(t,t.vertexSpace,e.origin,r):function({vertexAttributes:t,transform:e,spatialReference:r},{origin:n},s,i){const u=x(r,i,3),o=n||!b(u)?(0,f.C)(_,e?.localMatrix??c.zK):null;o&&v(o,r,i,3);const{position:a,normal:p,tangent:y}=o?M(t,o):t,h=i?.allowBufferReuse,d=h?a:new Float64Array(a.length);let B=a;if(n&&(B=(0,m.a)(d,B,n)),s){const t=(0,l.ze)(N,s);B=(0,m.a)(d,B,t)}return{position:B!==t.position||h?B:B.slice(),normal:p!==t.normal||h?p:p?.slice(),tangent:y!==t.tangent||h?y:y?.slice()}}(t,t.vertexSpace,e.origin,r)}}function A(t,e){return e?.useEllipsoid&&(0,p.B3)(t)?y.Y0:(0,y.lO)(t)}function M(t,e){const r=new Float64Array(t.position.length);(0,m.t)(r,t.position,e);const n=t.normal?new Float32Array(t.normal.length):null,s=t.tangent?new Float32Array(t.tangent.length):null;return n&&t.normal&&(0,g.qs)(t.normal,n,e),s&&t.tangent&&(0,g.KM)(t.tangent,s,e),{position:r,normal:n,tangent:s}}function v(t,e,r,n){const s=x(e,r,n);b(s)||(0,f.hs)(t,t,[s,s,s])}function x(t,e,r){const n=!!(1&r),s=!!(2&r),i=e?.sourceUnit,u=e?.targetUnit;if(!i&&!u)return 1;let o=w(i,t);n||!i||b(o)||(T().warn("source unit conversion not supported"),o=1);let f=1/w(u,t);return s||!u||b(f)||(T().warn("target unit conversion not supported"),f=1),o*f}function b(t){return(0,s.Io)(t,1)}function w(t,e){if(null==t)return 1;const r=(0,i.KX)(e);return 1/(0,i.oU)(r,"meters",t)}const _=(0,c.vt)(),C=(0,c.vt)(),L=(0,o.vt)(),N=(0,a.vt)(),F=(0,c.vt)()},620(t,e,r){r.d(e,{L:()=>f,MX:()=>u,O_:()=>o,kL:()=>c,vA:()=>i,zH:()=>l});var n=r(48163);r(78955),(0,r(91829).vt)();class s{constructor(t){this.message=t}toString(){return`AssertException: ${this.message}`}}function i(t,e="Assertion"){if(!t){const t=new Error(e).stack;throw new s(`${e} at ${t}`)}}function u(t,e){t||(e=e||"",console.warn("Verify failed: "+e+"\n"+new Error("verify").stack))}function o(t,e,r,n){let s,i=(r[0]-t[0])/e[0],u=(n[0]-t[0])/e[0];i>u&&(s=i,i=u,u=s);let o=(r[1]-t[1])/e[1],f=(n[1]-t[1])/e[1];if(o>f&&(s=o,o=f,f=s),i>f||o>u)return!1;o>i&&(i=o),f<u&&(u=f);let c=(r[2]-t[2])/e[2],l=(n[2]-t[2])/e[2];return c>l&&(s=c,c=l,l=s),!(i>l||c>u||(l<u&&(u=l),u<0))}function f(t,e,r,s,i,u=(0,n.vt)()){const o=(s[i]-r[i])*(e[0]-t[0])-(s[0]-r[0])*(e[i]-t[i]),f=(s[0]-r[0])*(t[i]-r[i])-(s[i]-r[i])*(t[0]-r[0]);if(0===o)return!1;const c=f/o;return u[0]=t[0]+c*(e[0]-t[0]),u[1]=t[i]+c*(e[i]-t[i]),!0}function c(t,e){return Math.log(t)/Math.log(e)}function l(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[3]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[7]&&0===t[8]&&0===t[9]&&1===t[10]&&0===t[11]&&1===t[15]}}}]);
@@ -253,4 +253,4 @@ return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScal
253
253
  calculateOcclusionAndOutputHighlight();
254
254
  ${(0,c.If)(y,"outputObjectAndLayerIdColor();")}
255
255
  }
256
- `)}},26934(t,e,i){i.d(e,{Q:()=>n});var r=i(49788);function n(t){t.constants.add("alphaCutoff","float",r.Q),t.constants.add("opacityCutoff","float",r.v)}},58243(t,e,i){function r(t,e){e.useFloatBlend?t.code.add("float ditherNoise(vec4 color) { return 0.0; }"):t.code.add("\n float ditherNoise(vec4 color) {\n vec2 seed = color.rg + color.ba + gl_FragCoord.xy + gl_FragCoord.z;\n return (fract(52.9829189 * fract(dot(seed, vec2(0.06711056, 0.00583715)))) - 0.5) / 255.0;\n }")}i.d(e,{t:()=>r})},63666(t,e,i){i.d(e,{OG:()=>Dt,gP:()=>Rt});var r=i(5482),n=i(69540),s=i(91429);let o=class extends n.Pw{constructor(t){super(t),this.row=0,this.column=0,this.rows=1,this.columns=1}equals(t){return null!=t&&this.row===t.row&&this.rows===t.rows&&this.column===t.column&&this.columns===t.columns}};(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],o.prototype,"row",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],o.prototype,"column",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],o.prototype,"rows",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],o.prototype,"columns",void 0),o=(0,r.Cg)([(0,s.$K)("esri.CameraLayout")],o);const a=o;var c=i(69052),h=i(25482),l=i(34727),u=i(56507),d=i(86738),f=i(43937),p=i(36005);let g=class extends((0,n.OU)(h.o)){constructor(...t){super(...t),this.position=new d.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new a}normalizeCtorArgs(t,e,i,r){if(t&&"object"==typeof t&&("x"in t||Array.isArray(t))){const n={position:t};return null!=e&&(n.heading=e),null!=i&&(n.tilt=i),null!=r&&(n.fov=r),n}return t}writePosition(t,e,i,r){const n=t.clone();n.x=(0,u.GB)(t.x||0),n.y=(0,u.GB)(t.y||0),n.z=t.hasZ?(0,u.GB)(t.z||0):t.z,e[i]=n.write({},r)}readPosition(t,e){const i=new d.A;return i.read(t,e),i.x=(0,u.GB)(i.x||0),i.y=(0,u.GB)(i.y||0),i.z=i.hasZ?(0,u.GB)(i.z||0):i.z,i}equals(t){return null!=t&&this.tilt===t.tilt&&this.heading===t.heading&&this.fov===t.fov&&this.position.equals(t.position)&&this.layout.equals(t.layout)}};(0,r.Cg)([(0,s.MZ)({type:d.A,json:{write:{isRequired:!0}}})],g.prototype,"position",void 0),(0,r.Cg)([(0,f.K)("position")],g.prototype,"writePosition",null),(0,r.Cg)([(0,p.w)("position")],g.prototype,"readPosition",null),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,s.wg)(t=>c.ie.normalize((0,u.GB)(t)))],g.prototype,"heading",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,s.wg)(t=>(0,l.qE)((0,u.GB)(t),-180,180))],g.prototype,"tilt",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,s.wg)(t=>(0,l.qE)((0,u.GB)(t,55),1,170))],g.prototype,"fov",void 0),(0,r.Cg)([(0,s.MZ)({type:a,nonNullable:!0,json:{read:!1,write:!1}})],g.prototype,"layout",void 0),g=(0,r.Cg)([(0,s.$K)("esri.Camera")],g);var m=i(9093),_=i(35522),v=i(51850),y=i(16930),b=(i(48353),i(9762),i(65806)),x=i(27993),w=i(73941),C=(i(19419),i(82919)),M=i(71351);i(91712),i(49718),i(6867),i(16396),(0,v.vt)(),(0,v.vt)(),(0,v.vt)();var T=i(58083),S=i(48163),A=i(5443),E=i(39829),O=i(95108),R=i(37585);function P(t,e,i,r){const n=function(t,e){const i=0===e||2===e?0:1,r=t[e],n=0===e||1===e?1:-1,s=0===i?1:0;return(t,e,o)=>{if(e[i]<r&&o[i]<r)return 1===n?0:1;if(e[i]>r&&o[i]>r)return 1===n?1:0;const a=(o[s]-e[s])/(o[i]-e[i]),c=e[s]+a*(r-e[i]);return t[i]=r,t[s]=c,(e[i]<r?1:-1)*n>0?2:3}}(i,r);if(t.length=0,e.length){1===n(I,e[0],e[0])&&D(t,e[0]);for(let i=0;i<e.length;i++){const r=e[i===e.length-1?0:i+1];switch(n(I,e[i],r)){case 1:D(t,r);break;case 3:D(t,(0,S.o8)(I));break;case 2:D(t,(0,S.o8)(I)),D(t,r)}}}}function D(t,e){0!==t.length&&(0,R.aI)(t.at(-1),e)||t.push(e)}const I=(0,S.vt)();var F=i(11964),N=i(27921);const L=(0,v.vt)(),B=(0,v.vt)();function U(){return{direction:(0,v.vt)(),up:(0,v.vt)()}}function H(t,e,i,r,n){let s=(0,_.S8)(L,t),o=(0,_.Om)(s,r);const a=o>0;o=Math.abs(o),o>.99&&(o=Math.abs((0,_.Om)(e,r)),o<.99?((0,_.C)(s,e),a&&(0,_.hs)(s,s,-1)):s=null);let c=0;if(s){(0,_.hs)(B,r,(0,_.Om)(r,s)),(0,_.Re)(s,s,B);const t=(0,_.Om)(s,n)/((0,_.Bw)(s)*(0,_.Bw)(n));(0,_.$A)(B,s,n),c=((0,_.Om)(B,r)>0?1:-1)*(0,l.KJ)((0,l.XM)(t))}const h=(0,l.KJ)((0,l.XM)(-(0,_.Om)(r,t)/(0,_.Bw)(t)));return i?(i.heading=c,i.tilt=h,i):{heading:c,tilt:h}}function V(t,e,i,r){(0,_.Re)(z,i,e),(0,N.T7)(r,(0,F.LV)(e,z),t)||t===i||(0,_.C)(t,i)}const z=(0,v.vt)(),k=(0,v.fA)(0,1,0),Z=(0,v.fA)(0,0,1),$=(0,m.vt)(),W=(0,v.vt)(),j=(0,v.vt)();function G(t,e,i,r=U()){const{direction:n,up:s}=r;return(0,T.N9)($,-(0,l.kU)(e)),(0,T.eL)($,$,(0,l.kU)(i)),(0,_.Z0)(n,Z,$),(0,_.hs)(n,n,-1),(0,_.Z0)(s,k,$),r}function q(t,e,i,r,n){const s=e.lines[11].direction,o=(n-i.getAltitude(r))/s[2];(0,_.Ln)(t,r,s,o)}const X=(0,v.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(t,e,i,r){return H(e,i,r,Z,k)},eyeForCenterWithHeadingTilt:function(t,e,i,r){const n=G(0,i,r),s=(0,v.vt)();return(0,_.hs)(s,n.direction,-e),(0,_.WQ)(s,s,t),{up:n.up,eye:s,heading:i,tilt:r}},eyeTiltToLookAtTilt:function(t){return(0,l.kU)(t)},headingTiltToDirectionUp:G,lookAtTiltToEyeTilt:function(t){return(0,l.KJ)(t)},toArea:function(t,e){const i=t.frustum,{renderCoordsHelper:r}=t,n=r.getAltitude(e),s=t.spatialReference,o=t.state.camera.eye,a=[],c=i.planes[5];for(let t=0;t<4;t++){const e=i.lines[t];r.intersectInfiniteManifold((0,M.LV)(e.origin,e.direction),n,X)||q(X,i,r,e.endpoint,n),V(X,o,X,c),a.push((0,S.fA)(X[0],X[1]))}return function(t,e,i){const r=t.map(t=>((0,_.hZ)(X,t[0],t[1],0),e.fromRenderCoords(X,X,i),[X[0],X[1]]));return r.length<=2?new E.A({spatialReference:i}):(r.push(r[0].slice()),(0,O.$3)(r)||r.reverse(),new E.A({rings:[r],spatialReference:i}))}(function(t,e){const i=[],r=[];return P(i,t,e,0),P(r,i,e,1),P(i,r,e,2),P(r,i,e,3),r}(a,r.extent),r,s)},toExtent:function(t,e,i,r,n){const s=t.renderSpatialReference,o=t.spatialReference??e.spatialReference;return(0,b.g)(e,W,s),(0,b.g)(e,j,s),W[0]-=i/2,j[0]+=i/2,W[1]-=r/2,j[1]+=r/2,(0,x.F)(W,s,W,o),(0,x.F)(j,s,j,o),n?(n.xmin=W[0],n.ymin=W[1],n.xmax=j[0],n.ymax=j[1],n.spatialReference=o):n=new A.A(W[0],W[1],j[0],j[1],o),n}},Symbol.toStringTag,{value:"Module"}));var Y=i(78955),Q=i(91829),K=i(34304),J=i(17136),tt=i(94008),et=i(28735);class it{get planes(){return this.frustum}get points(){return this._points}get mutablePoints(){return this._points}get direction(){return this._direction}get origin(){return this._origin}get boundingSphere(){return this._boundingSphereDirty&&this._updateBoundingSphere(),this._boundingSphere}constructor(t){this.renderCoordsHelper=t,this.frustum=(0,C.vt)(),this._points=(0,C.Qy)(),this.lines=new Array(12),this._origin=(0,v.vt)(),this._direction=(0,v.vt)(),this._boundingSphere=new tt.iy,this._altitude=null,this._boundingSphereDirty=!0;for(let t=0;t<12;t++)this.lines[t]={origin:null,direction:(0,v.vt)(),endpoint:null}}update(t){(0,C.ui)(t.viewMatrix,t.projectionMatrix,this.frustum,this._points),(0,_.C)(this._origin,t.eye),(0,_.C)(this._direction,t.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines(),this._boundingSphereDirty=!0}updatePoints(t){for(let e=0;e<this._points.length;e++)(0,_.C)(this._points[e],t[e]);(0,C.DV)(this.frustum,this._points),this._updateLines()}get altitude(){return this._altitude}intersectsSphere(t){return(0,C.m7)(this.frustum,t)}intersectsRay(t){return(0,C.pw)(this.frustum,t)}intersectsLineSegment(t,e){return(0,C.ST)(this.frustum,t,e)}intersectsPoint(t){return(0,C.bU)(this.frustum,t)}_updateLines(){const t=this._points;for(let e=0;e<4;e++){const i=e+4;rt(this.lines[e],t[e],t[i]),rt(this.lines[e+4],t[e],3===e?t[0]:t[e+1]),rt(this.lines[e+8],t[i],3===e?t[4]:t[i+1])}}_updateBoundingSphere(){const{origin:t}=this,e=st;(0,_.S8)(e,this.direction);const i=nt;(0,_.jb)(i,this.points[4],t);const r=.5*(0,_.Om)(i,i)/(0,_.Om)(e,i),n=this._boundingSphere,s=(0,_.Ln)(ot,t,e,r);n.center=s,n.radius=r}static{this.planePointIndices=C.c8}static{this.nearFarLineIndices=[[0,4],[1,5],[2,6],[3,7]]}}function rt(t,e,i){t.origin=e,t.endpoint=i,(0,_.oW)(t.direction,e,i)}const nt=(0,v.vt)(),st=(0,v.vt)(),ot=(0,v.vt)();i(86211);const at=(0,v.fA)(5802e-9,13558e-9,331e-7),ct=(0,v.fA)(65e-8*3,5643e-9,255e-9);(0,v.fA)(at[0]+ct[0],at[1]+ct[1],at[2]+ct[2]);class ht{constructor(t=1/0,e=-1/0){this.near=t,this.far=e}set(t,e){this.near=t,this.far=e}union(t){return null!=t&&(this.near=Math.min(this.near,t.near),this.far=Math.max(this.far,t.far)),this}within(t){return this.near<=t&&t<=this.far}equals(t){return this.near===t.near&&this.far===t.far}static{this.Zero=new ht(0,0)}static{this.Infinite=new ht}}(0,v.vt)(),(0,v.vt)(),new tt.iy,(0,M.vt)(),new A.A({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0});var lt=i(32728);const ut=(0,v.fA)(0,0,1),dt=(0,_.S8)((0,v.vt)(),(0,v.fA)(1,1,1)),ft=(0,m.vt)(),pt=(0,v.vt)(),gt=(0,v.vt)();function mt(t,e,i,r=U()){(0,_.$A)(pt,t,ut),0===(0,_.Om)(pt,pt)&&(0,_.$A)(pt,t,dt),(0,T.$0)(ft,-(0,l.kU)(e),t),(0,T.e$)(ft,ft,-(0,l.kU)(i),pt);const{up:n,direction:s}=r;return(0,_.$A)(n,pt,t),(0,_.S8)(n,n),(0,_.Z0)(n,n,ft),(0,_.S8)(s,t),(0,_.ze)(s,s),(0,_.Z0)(s,s,ft),r}function _t(t){const e=t[1];t[1]=-t[2],t[2]=e}function vt(t,e){const i=mt(e,t.heading,t.tilt);return t.up=i.up,t}function yt(t,e){const{renderCoordsHelper:i,state:r}=t;if(1!==r.viewingMode)return 1;const n=i.getAltitude(e),s=i.referenceEllipsoid.radius,o=1+(0,_.Io)(r.camera.eye,e)/(s+n),a=Math.sqrt(o*o-1),{minCurvature:c,maxCurvature:h,minSamples:u,maxSamples:d}=xt,f=(0,l.qE)((a-c)/(h-c),0,1);return Math.round((0,l.Cc)(u,d,f))}function bt(t,e){const i=[],r=[],n=(0,K.FD)();for(let s=0;s<t.length;s++){const o=t[s],a=s===t.length-1?t[0]:t[s+1],c=(0,F.Cr)(o,a,Et),h=(0,N.vE)(e,c.origin,c.vector,0,St);switch(h){case 2:i.push(o);break;case 3:r.push(o);break;case 0:case 1:{const[t,s,a]=0===h?[1,i,r]:[-1,r,i],c=(0,N.Qj)(e),l=(0,_.Ln)((0,v.vt)(),St,c,t*n),u=(0,_.Ln)((0,v.vt)(),St,c,t*-n);s.push(o),s.push(l),a.push(u)}}}const s=[];return i.length&&s.push(i),r.length&&s.push(r),s}const xt={minCurvature:(0,l.kU)(5),maxCurvature:(0,l.kU)(50),minSamples:1,maxSamples:6},wt=(0,v.fA)(1,0,0),Ct=(0,v.fA)(0,1,0),Mt=(0,v.vt)(),Tt=(0,v.vt)(),St=(0,v.vt)(),At=new tt.iy,Et=(0,F.vt)(),Ot=(0,Q.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(t,e,i,r){const n=pt,s=gt;return(0,_.S8)(n,t),(0,_.$A)(gt,n,ut),0===(0,_.Om)(gt,gt)&&(0,_.$A)(gt,n,dt),(0,_.$A)(s,gt,n),H(e,i,r,n,s)},eyeForCenterWithHeadingTilt:function(t,e,i,r){const n={eye:(0,v.vt)(),up:null,tilt:r,heading:i},s=pt;s[0]=t[0],s[1]=t[2],s[2]=-t[1];const o=e,a=(0,l.kU)(i),c=(0,l.kU)(r),h=Math.sin(a),u=Math.cos(a),d=Math.sin(c),f=Math.cos(c),p=(0,_.Bw)(s);let g;if(Math.abs(c)<1e-8)g=o+p;else{const t=p/d,e=(0,l.YN)(o/t),i=Math.PI-c-e;g=t*Math.sin(i)}const m=f*o,y=o*o*(d*d),b=u*u*y,x=g-m,w=x*x,C=b*(b+w-s[1]*s[1]);if(C<0)return(0,_.hs)(n.eye,s,g/p),n.tilt=0,vt(n,t);const M=Math.sqrt(C),T=s[1]*x,S=b+w;let A;if(A=u>0?-M+T:M+T,Math.abs(S)<1e-8)return p<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=o):(0,_.hs)(n.eye,s,g/p),n.tilt=0,_t(n.eye),vt(n,t);n.eye[1]=A/S;const E=h*h*y,O=d*o,R=u*O*n.eye[1],P=n.eye[1]*n.eye[1],D=1-P,I=Math.sqrt(D),F=b*P+E-2*R*I*x+D*w;return Math.abs(F)<1e-8?((0,_.hs)(n.eye,s,g/p),n.tilt=0,_t(n.eye),vt(n,t)):(n.eye[0]=(D*(g*s[0]-m*s[0])-O*I*(s[0]*n.eye[1]*u+s[2]*h))/F,n.eye[2]=(D*(g*s[2]-m*s[2])-O*I*(s[2]*n.eye[1]*u-s[0]*h))/F,(0,_.hs)(n.eye,n.eye,g),_t(n.eye),vt(n,t))},eyeTiltToLookAtTilt:function(t,e,i){const r=(0,l.kU)(t),n=(0,_.Bw)(e);return(0,l.YN)(i/(n/Math.sin(r)))+r},getCurvatureSamples:yt,headingTiltToDirectionUp:mt,lookAtTiltToEyeTilt:function(t,e,i){const r=(0,_.Bw)(e),n=Math.sqrt(i*i+r*r-2*i*r*Math.cos(Math.PI-t)),s=(0,l.YN)(i/(n/Math.sin(t)));return(0,l.KJ)(t-s)},toArea:function(t,e){const{renderCoordsHelper:i}=t,r=t.state.camera.clone(),n=new it(i);r.near=2,n.update(r);const s=i.getAltitude(e),o=t.spatialReference,a=r.eye,c=function(t){const{renderCoordsHelper:e,state:i}=t,r=Math.abs(e.getAltitude(i.camera.center));return At.radius=e.referenceEllipsoid.radius+r,i.camera.sphereFrustumCoverage(At,e)}(t),h=yt(t,e),u=r.aboveGround,d=n.planes[5],f=[],p=(0,N.O_)(v.uY,wt,(0,N.vt)()),g=(0,N.O_)(v.uY,Ct,(0,N.vt)());(0,Y.hZ)(Ot,0,0,0,0);const m=t=>{};for(let t=0;t<4;t++){const e=1===t&&!u||3===t&&u?1-c:0,r=1===t&&u||3===t&&!u?c:1,o=n.lines[t],y=n.lines[3===t?0:t+1];for(let n=0;n<h;n++){const c=n/h,u=0===n?0:(0,l.Cc)(e,r,1===t?1-(1-c)**2:3===t?c**2:c),b=(0,_.Cc)(Tt,o.origin,y.origin,u),x=(0,lt.nu)(o.direction,y.direction,u,Mt);i.intersectManifoldClosestSilhouette((0,M.LV)(b,x),s,St),V(St,a,St,d),f.push((0,v.o8)(St)),0!==f.length&&m((0,_.lo)(f.at(-1),St));const w=((0,N.Tj)(p,St)?1:0)|((0,N.Tj)(g,St)?2:0);Ot[w]=1}}f.length>2&&(0,_.lo)(f[0],f.at(-1));const y=function(t,e,i){const r=2*(0,K.FD)();return t.map(t=>{const n=[];let s=!1;for(const o of t)e.fromRenderCoords(o,St,i),Math.abs(o[0])<r&&Math.abs(o[1])<r?(n.push([null,St[1]]),n.push([null,St[1]]),s=!0):n.push([St[0],St[1]]);if(s)for(let t=0;t<n.length;t++){const e=n[t];if(null!=e[0])continue;const i=n[t+1],r=n.at(0===t?-1:t-1);e[0]=r[0],t++;const s=n.at(t===n.length-1?0:t+1);i[0]=s[0]}return n.push(n[0]),(0,O.$3)(n)||n.reverse(),n})}((0,Y.m3)(Ot)>1?function(t,e){const i=[];for(const r of t)i.push(...bt(r,e));return i}(bt(f,p),g):[f],i,o);return new E.A({rings:y,spatialReference:o})},toExtent:function(t,e,i,r,n){let s,o,a,h;const u=e.latitude,d=(0,w.tO)(t.spatialReference).radius,f=e.longitude,p=function(t,e,i){const r=e/i,n=(0,l.kU)(t),s=Math.sin(r/2),o=Math.cos(n),a=2*(0,l.YN)(Math.sqrt(s*s/(o*o)));return(0,l.KJ)(a)}(u,i,d)/2;s=f-p,o=f+p;const g=(0,l.kU)(u),m=(1+Math.sin(g))/(1-Math.sin(g)),_=(m+1)*Math.tan(r/d/2),v=_*_;function b(t){const e=Math.PI/2;return(t=c.uC.normalize(t,-e))>e&&(t=Math.PI-t),t}if(a=1.5*Math.PI-2*Math.atan(.5*(_+Math.sqrt(4*m+v))),h=a+r/d,a=b(a),h=b(h),h<a){const t=h;h=a,a=t}if(a=Math.max((0,l.KJ)(a),-90),h=Math.min((0,l.KJ)(h),90),o=J.Y_.monotonic(s,o),o-s>180){const t=(o-s-180)/2;s+=t,o-=t}const x=t.spatialReference&&t.spatialReference.isGeographic?t.spatialReference:y.A.WGS84;return n?(n.xmin=s,n.ymin=a,n.xmax=o,n.ymax=h,n.spatialReference=x):n=new A.A(s,a,o,h,x),t.spatialReference&&t.spatialReference.isWebMercator&&(0,et.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"}));const Rt={OPAQUE:"opaque-color",TRANSPARENT:"transparent-color",COMPOSITE:"composite-color",FINAL:"final-color"},Pt=[Rt.FINAL,Rt.COMPOSITE,Rt.OPAQUE,Rt.TRANSPARENT],Dt={ANTIALIASING:"aa-color",CUTFILL_COLOR:"cutfill-color",CUTFILL_COMPUTATION:"cutfill-computation",FOCUSAREA_COLOR:"focusarea-color",FOCUSAREA:"focusarea",GAUSSIAN_SPLAT:"gaussian",GAUSSIAN_SPLAT_DEPTH:"gaussian-depth",GROUND_DEPTH:"ground-depth",HIGHLIGHT_COLOR:"highlight-color",LASERLINES:"laserlines",TRANSPARENT_NO_DEPTH:"transparent-no-depth",MAGNIFIER:"magnifier",OCCLUDED:"occluded",OPAQUE_OCCLUSION_QUERY:"opaque-occlusion-query",OPAQUE_ENVIRONMENT:"opaque-environment",TRANSPARENT_ENVIRONMENT:"transparent-environment",AMBIENT_ILLUMINATION:"ambient-illumination",SHADOW_ACCUMULATION:"shadow-accumulation",SHADOWMAP:"shadowmap",SHADOW_HIGHLIGHT:"shadow-highlight",VOXEL:"voxel",VIEWSHED:"viewshed",OBJECT_AND_LAYER_ID_COLOR:"olid"};Array.from(Object.values(Dt)).concat(Pt),(0,v.vt)()},91712(t,e,i){i.d(e,{A:()=>T});var r=i(5482),n=i(69622),s=i(53966),o=i(34727),a=i(90629),c=i(91429),h=i(58083),l=i(9093),u=i(37585),d=i(48163),f=i(35522),p=i(51850),g=i(78955),m=i(91829),_=i(82919),v=i(71351),y=i(44280);function b(t,e,i){t.worldUpAtPosition(e,x),(0,f.Re)(w,i,e);const r=(0,f.Bw)(w);return 0===r?0:(0,o.XM)((0,f.Om)(w,x)/r)}const x=(0,p.vt)(),w=(0,p.vt)();var C;let M=C=class extends n.A{constructor(t){super(t),this._ray=(0,v.vt)(),this._viewport=(0,m.fA)(0,0,1,1),this._padding=(0,m.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,d.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,l.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,l.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,l.vt)(),this._frustumDirty=!0,this._frustum=(0,_.vt)(),this._fullViewport=(0,m.vt)(),this._fullViewportDirty=!0,this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,p.vt)(),this._up=(0,p.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(t){this._pixelRatio=t>0?t:1}get rows(){return this._rows}set rows(t){this._rows=Math.max(1,t)}get columns(){return this._columns}set columns(t){this._columns=Math.max(1,t)}get eye(){return this._ray.origin}set eye(t){this._compareAndSetView(t,this._ray.origin,"eye")}get center(){return this._center}set center(t){this._compareAndSetView(t,this._center,"_center")}get ray(){return(0,f.Re)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(t){this._compareAndSetView(t,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(t){(0,h.C)(this._viewMatrix,t),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get inverseViewMatrix(){return(0,h.Qw)((0,l.vt)(),this.viewMatrix)||this._get("inverseViewMatrix")||(0,l.vt)()}get viewForward(){return this._ensureViewClean(),(0,f.hZ)((0,p.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,f.hZ)((0,p.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,f.hZ)((0,p.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(t){this._nearFar[0]!==t&&(this._nearFar[0]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(t){this._nearFar[1]!==t&&(this._nearFar[1]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(t){this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const t=(0,g.hs)((0,m.vt)(),this._viewport,1/this.pixelRatio),e=this._get("screenViewport");return e&&(0,g.aI)(t,e)?e:t}get screenPadding(){if(1===this.pixelRatio)return this._padding;const t=(0,g.hs)((0,m.vt)(),this._padding,1/this.pixelRatio),e=this._get("screenPadding");return e&&(0,g.aI)(t,e)?e:t}get x(){return this._viewport[0]}set x(t){t+=this._padding[3],this._viewport[0]!==t&&(this._viewport[0]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(t){t+=this._padding[2],this._viewport[1]!==t&&(this._viewport[1]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(t){this._viewport[2]!==t&&(this._viewport[2]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(t){this._viewport[3]!==t&&(this._viewport[3]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(t){this.width=t-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(t){this.height=t-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewportDirty&&(this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this._viewport[2]+this._padding[1]+this._padding[3],this._fullViewport[3]=this._viewport[3]+this._padding[0]+this._padding[2],this._fullViewportDirty=!1),this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(t){(0,g.t2)(this._padding,t)||(this._viewport[0]+=t[3]-this._padding[3],this._viewport[1]+=t[2]-this._padding[2],this._viewport[2]-=t[1]+t[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=t[0]+t[2]-(this._padding[0]+this._padding[2]),(0,g.C)(this._padding,t),this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&((0,h.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,h.B8)((0,l.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,l.vt)()}get fov(){return this._fov}set fov(t){this._fov=t,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return t=this._fov,e=this.width,i=this.height,2*Math.atan(e*Math.tan(.5*t)/Math.sqrt(e*e+i*i));var t,e,i}set fovX(t){this._fov=function(t,e,i){return 2*Math.atan(Math.sqrt(e*e+i*i)*Math.tan(.5*t)/e)}(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return t=this._fov,e=this.width,i=this.height,2*Math.atan(i*Math.tan(.5*t)/Math.sqrt(e*e+i*i));var t,e,i}set fovY(t){this._fov=function(t,e,i){return 2*Math.atan(Math.sqrt(e*e+i*i)*Math.tan(.5*t)/i)}(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,f.Io)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,h.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,h.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(t){const{near:e,far:i}=this;return 2*e*i/(i+e-t*(i-e))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const t=this.width,e=this.height,i=this.near*Math.tan(this.fovY/2)*2,r=i*this._aspect,n=i/this.rows,s=r/this.columns,o=-r/2+this.column*s,a=o+s,c=-i/2+this.row*n,u=c+n,d=(0,h.$h)((0,l.vt)(),o*(1+2*this._padding[3]/t),a*(1+2*this._padding[1]/t),c*(1+2*this._padding[2]/e),u*(1+2*this._padding[0]/e),this.near,this.far),f=this._get("projectionMatrix");return f&&(0,h.t2)(f,d)?f:d}copyFrom(t){(0,f.C)(this._ray.origin,t.eye),this.center=t.center,this.up=t.up,(0,g.C)(this._viewport,t.viewport),this.notifyChange("_viewport"),(0,g.C)(this._padding,t.padding),this.notifyChange("_padding"),this._fullViewportDirty=!0,(0,u.C)(this._nearFar,t.nearFar),this.notifyChange("_nearFar"),this._fov=t.fov,this.row=t.row,this.column=t.column,this.rows=t.rows,this.columns=t.columns,this.relativeElevation=t.relativeElevation;const e=t;return this._viewDirty=e._viewDirty,this._viewDirty||((0,h.C)(this._viewMatrix,t.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=e._frustumDirty,this._frustumDirty||((0,_.C)(this._frustum,t.frustum),this._frustumDirty=!1),e._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,h.C)(this._viewInverseTransposeMatrix,t.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this.pixelRatio=t.pixelRatio,this}copyViewFrom(t){this.eye=t.eye,this.center=t.center,this.up=t.up,this.fov=t.fov}clone(){return(new C).copyFrom(this)}equals(t){return(0,f.t2)(this.eye,t.eye)&&(0,f.t2)(this.center,t.center)&&(0,f.t2)(this.up,t.up)&&(0,g.t2)(this._viewport,t.viewport)&&(0,g.t2)(this._padding,t.padding)&&(0,u.t2)(this.nearFar,t.nearFar)&&this._fov===t.fov&&this.pixelRatio===t.pixelRatio&&this.relativeElevation===t.relativeElevation&&this.row===t.row&&this.column===t.column&&this.rows===t.rows&&this.columns===t.columns}equalsView(t){return(0,f.t2)(this.eye,t.eye)&&(0,f.t2)(this.center,t.center)&&(0,f.t2)(this.up,t.up)&&this._fov===t.fov}almostEquals(t){const e=Math.max(1,1/this.pixelRatio,1/t.pixelRatio);if(Math.abs(t.fov-this._fov)>=.001||(0,g.hG)(t.screenPadding,this.screenPadding)>=e||(0,g.hG)(this.screenViewport,t.screenViewport)>=e||this.row!==t.row||this.column!==t.column||this.rows!==t.rows||this.columns!==t.columns)return!1;(0,f.jb)(E,t.eye,t.center),(0,f.jb)(O,this.eye,this.center);const i=(0,f.Om)(E,O),r=(0,f.uE)(E),n=(0,f.uE)(O),s=5e-4;return i*i>=(1-1e-10)*r*n&&(0,f.lo)(t.eye,this.eye)<Math.max(r,n)*s*s}computeRenderPixelSizeAt(t){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(t))}computeRenderPixelSizeAtDist(t){return t*this.perRenderPixelRatio}computeScreenPixelSizeAt(t){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(t))}_viewDirectionDistance(t){return Math.abs((0,y.gr)(this.viewForward,(0,f.Re)(E,t,this.eye)))}computeScreenPixelSizeAtDist(t){return t*this.perScreenPixelRatio}computeDistanceFromRadius(t,e){return t/Math.tan(Math.min(this.fovX,this.fovY)/(2*(e||1)))}getScreenCenter(t=(0,a.gs)()){return t[0]=(this.padding[3]+this.width/2)/this.pixelRatio,t[1]=(this.padding[0]+this.height/2)/this.pixelRatio,t}getRenderCenter(t,e=.5,i=.5){return t[0]=this.padding[3]+this.width*e,t[1]=this.padding[2]+this.height*i,t[2]=.5,t}setGLViewport(t){const e=this.viewport,i=this.padding;t.setViewport(e[0]-i[3],e[1]-i[2],e[2]+i[1]+i[3],e[3]+i[0]+i[2])}applyProjection(t,e){t!==S&&(0,f.C)(S,t),S[3]=1,(0,g.Z0)(S,S,this.projectionMatrix);const i=Math.abs(S[3]);(0,f.hs)(S,S,1/i);const r=this.fullViewport;e[0]=(0,o.Cc)(0,r[0]+r[2],.5+.5*S[0]),e[1]=(0,o.Cc)(0,r[1]+r[3],.5+.5*S[1]),e[2]=.5*(S[2]+1),e[3]=i}unapplyProjection(t,e){const i=this.fullViewport;S[0]=(t[0]/(i[0]+i[2])*2-1)*t[3],S[1]=(t[1]/(i[1]+i[3])*2-1)*t[3],S[2]=(2*t[2]-1)*t[3],S[3]=t[3],null!=this.inverseProjectionMatrix&&((0,g.Z0)(S,S,this.inverseProjectionMatrix),e[0]=S[0],e[1]=S[1],e[2]=S[2])}projectToScreen(t,e){return null==this.projectToRenderScreen(t,R)?null:(this.renderToScreen(R,e),e)}projectToRenderScreen(t,e){if(S[0]=t[0],S[1]=t[1],S[2]=t[2],S[3]=1,(0,g.Z0)(S,S,this.viewProjectionMatrix),0===S[3])return null;const i=S;(0,f.hs)(i,i,1/Math.abs(S[3]));const r=this.fullViewport,n=(0,o.Cc)(0,r[0]+r[2],.5+.5*i[0]),s=(0,o.Cc)(0,r[1]+r[3],.5+.5*i[1]);return"x"in e?(e.x=n,e.y=s):(e[0]=n,e[1]=s,e.length>2&&(e[2]=.5*(i[2]+1))),e}unprojectFromScreen(t,e){return this.unprojectFromRenderScreen(this.screenToRender(t,R),e)}unprojectFromRenderScreen(t,e){if((0,h.lw)(A,this.projectionMatrix,this.viewMatrix),!(0,h.B8)(A,A))return null;const i=this.fullViewport;return S[0]=2*(t[0]-i[0])/i[2]-1,S[1]=2*(t[1]-i[1])/i[3]-1,S[2]=2*t[2]-1,S[3]=1,(0,g.Z0)(S,S,A),0===S[3]?null:(e[0]=S[0]/S[3],e[1]=S[1]/S[3],e[2]=S[2]/S[3],e)}constrainWindowSize(t,e,i,r){const n=t*this.pixelRatio,s=e*this.pixelRatio,o=Math.max(n-i/2,0),a=Math.max(this.fullHeight-s-r/2,0),c=-Math.min(n-i/2,0),h=-Math.min(this.fullHeight-s-r/2,0),l=i-c- -Math.min(this.fullWidth-n-i/2,0),u=r-h- -Math.min(s-r/2,0);return[Math.round(o),Math.round(a),Math.round(l),Math.round(u)]}computeUp(t){1===t?this._computeUpGlobal():this._computeUpLocal()}screenToRender(t,e){const i=t[0]*this.pixelRatio,r=this.fullHeight-t[1]*this.pixelRatio;return e[0]=i,e[1]=r,e}renderToScreen(t,e){const i=t[0]/this.pixelRatio,r=(this.fullHeight-t[1])/this.pixelRatio;e[0]=i,e[1]=r}sphereFrustumCoverage(t,e){const{center:i,eye:r,distance:n,fovY:s}=this,o=Math.abs(Math.PI/2-b(e,i,r));return t.frustumCoverage(o,n,s)}_computeUpGlobal(){(0,f.Re)(E,this.center,this.eye);const t=(0,f.Bw)(this.center);t<1?(0,f.t2)(this._up,p.Cb)&&((0,f.C)(this._up,p.Cb),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,f.Om)(E,this.center))>.9999*(0,f.Bw)(E)*t||((0,f.$A)(O,E,this.center),(0,f.$A)(O,O,E),(0,f.S8)(O,O),(0,f.t2)(this._up,O)||((0,f.C)(this._up,O),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){(0,f.oW)(E,this.eye,this.center),Math.abs(E[2])<=.9999&&((0,f.hs)(E,E,E[2]),(0,f.hZ)(E,-E[0],-E[1],1-E[2]),(0,f.S8)(E,E),(0,f.t2)(this._up,E)||((0,f.C)(this._up,E),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(t,e,i){"number"==typeof t[0]&&isFinite(t[0])&&"number"==typeof t[1]&&isFinite(t[1])&&"number"==typeof t[2]&&isFinite(t[2])?(0,f.t2)(t,e)||((0,f.C)(e,t),this._markViewDirty(),this.notifyChange(i)):s.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&((0,_.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&((0,h.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,r.Cg)([(0,c.MZ)()],M.prototype,"_viewport",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_padding",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_fov",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_nearFar",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_viewDirty",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_viewMatrix",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_pixelRatio",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"pixelRatio",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"row",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"column",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_rows",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"rows",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_columns",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"columns",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"eye",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"center",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_center",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"up",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_up",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"viewMatrix",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"inverseViewMatrix",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"viewForward",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"viewUp",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"viewRight",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"nearFar",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"near",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"far",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"viewport",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"screenViewport",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"screenPadding",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"x",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"y",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"width",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"height",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fullWidth",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fullHeight",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"_aspect",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"padding",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"projectionMatrix",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"inverseProjectionMatrix",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fov",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fovX",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fovY",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"viewInverseTransposeMatrix",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"_projectionMatrixInternal",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"relativeElevation",void 0),M=C=(0,r.Cg)([(0,c.$K)("esri.views.3d.webgl.RenderCamera")],M);const T=M,S=(0,m.vt)(),A=(0,l.vt)(),E=(0,p.vt)(),O=(0,p.vt)(),R=(0,a.r_)()},78607(t,e,i){i.d(e,{A:()=>D});var r=i(5482),n=i(69622),s=i(49186),o=i(36708),a=i(10107),c=i(64108),h=i(63666),l=i(44208),u=i(53966),d=(i(17676),i(94656)),f=i(63907);i(93637),i(4576),new Set(["GL_OES_standard_derivatives","GL_EXT_frag_depth","GL_EXT_draw_buffers","GL_EXT_shader_texture_lod"]),new Map,(0,l.A)("esri-tests-disable-gpu-memory-measurements"),(0,d.en)();(0,d.en)();i(90644);var p=i(25530),g=i(97768),m=i(48852),_=i(42293);const v=!!(0,l.A)("esri-tests-disable-gpu-memory-measurements");class y{constructor(t,e){this._context=t,this._descriptor=e,this.type=2,this._context.instanceCounter.increment(f.vt.Renderbuffer,this);const i=this._context.gl;this.glName=i.createRenderbuffer(),this._context.bindRenderbuffer(this);const{width:r,height:n,internalFormat:s,multisampled:o}=e;o?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,s,r,n):i.renderbufferStorage(i.RENDERBUFFER,s,r,n),this._context.bindRenderbuffer(null)}get descriptor(){return this._descriptor}get samples(){const t=this._descriptor.samples,e=this._context.parameters.maxSamples;return t?Math.min(t,e):e}get usedMemory(){return v?0:(t=this._descriptor).width<=0||t.height<=0||null==t.internalFormat?0:t.width*t.height*(0,_.MW)(t.internalFormat);var t}resize(t,e){const i=this._descriptor;if(i.width===t&&i.height===e)return;i.width=t,i.height=e;const r=this._context.gl;this._context.bindRenderbuffer(this),i.multisampled?r.renderbufferStorageMultisample(r.RENDERBUFFER,this.samples,i.internalFormat,i.width,i.height):r.renderbufferStorage(r.RENDERBUFFER,i.internalFormat,i.width,i.height),this._context.bindRenderbuffer(null)}dispose(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(f.vt.Renderbuffer,this),this._context=null)}}class b{constructor(t,e,i){if(this._context=t,this._level=0,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,t.instanceCounter.increment(f.vt.FramebufferObject,this),null!=e){const i=function(t,e){return x(e)||w(e)?e:C(e)?new p.A(t,e):function(t){return 3===M(t)||null!=t&&"samples"in t}(e)?new y(t,e):null}(t,e);null!=i&&(this._colorAttachments.set(36064,i),x(i)?this._validateTextureDescriptor(i.descriptor):this._validateRenderbufferDescriptor(i.descriptor)),this._validateColorAttachmentPoint(36064)}if(null!=i)if(function(t){return x(t)||C(t)}(i))this._depthStencilTexture=x(i)?i:new p.A(t,i),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const e=w(i)?i:new y(t,i);this._depthStencilBuffer=e,this._validateRenderbufferDescriptor(e.descriptor)}}get glName(){return this._glName}get colorTexture(){const t=this._colorAttachments.get(36064);return x(t)?t:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const t=this._colorAttachments.get(36064)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.width??0}get height(){const t=this._colorAttachments.get(36064)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.height??0}get usedMemory(){return this._colorAttachments.values().reduce((t,e)=>t+e.usedMemory,this.depthStencil?.usedMemory??0)}get level(){return this._level}set level(t){this._level!==t&&(this._level=t,this._glName&&this._context.temporaryBindFramebuffer(this,()=>this._initializeAttachments()))}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(t){const e=this._colorAttachments.get(t);return e&&x(e)?e:null}get colorAttachments(){return Array.from(this._colorAttachments.keys())}attachColorTexture(t,e=36064){if(!t)return;this._validateColorAttachmentPoint(e);const{descriptor:i}=t;this._validateTextureDescriptor(i),this.detachColorTexture(e)?.dispose(),this._colorAttachments.set(e,t),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,e))}detachColorTexture(t=36064){const e=this._colorAttachments.get(t);if(!e)return;const i=x(e);return this._glName&&this._context.temporaryBindFramebuffer(this,()=>{if(i)this._framebufferTexture2D(null,t);else{const e=this._context.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,t,e.RENDERBUFFER,null)}}),this._colorAttachments.delete(t),i?e:void 0}detachColorTextures(...t){if(0!==t.length){if(this._glName){const e=this._context.gl;this._context.temporaryBindFramebuffer(this,()=>{t.forEach(t=>{x(this._colorAttachments.get(t))?this._framebufferTexture2D(null,t):e.framebufferRenderbuffer(e.FRAMEBUFFER,t,e.RENDERBUFFER,null)})})}t.forEach(t=>this._colorAttachments.delete(t))}}setColorTextureTarget(t,e=36064,i=0){const r=this._colorAttachments.get(e);r&&(35866===t?this._framebufferTextureLayer(r.glName,e,36160,i):this._framebufferTexture2D(r.glName,e,t,36160))}attachDepthStencil(t){if(t)switch(t.type){case 1:return this._attachDepthStencilTexture(t);case 2:return this._attachDepthStencilBuffer(t)}}_attachDepthStencilTexture(t){if(null==t)return;const{descriptor:e}=t,{pixelFormat:i,dataType:r}=e;34041===i||6402===i?34041!==i||r===f.ld.UNSIGNED_INT_24_8?6402!==i||r===f.ld.UNSIGNED_INT||r===f.ld.UNSIGNED_SHORT?(this._validateTextureDescriptor(e),this._disposeDepthStencilAttachments(),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,A(i))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=t):console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!")}detachDepthStencilTexture(){const t=this._depthStencilTexture;return t&&this._glName&&this._context.temporaryBindFramebuffer(this,()=>{this._framebufferTexture2D(null,A(t.descriptor.pixelFormat))}),this._depthStencilTexture=null,t}_attachDepthStencilBuffer(t){if(null==t)return;const e=t.descriptor;if(this._validateRenderbufferDescriptor(e),this._disposeDepthStencilAttachments(),this._glName){this._context.bindFramebuffer(this);const{gl:i}=this._context,r=this._getGLAttachmentPoint(e);i.framebufferRenderbuffer(36160,r,i.RENDERBUFFER,t.glName)}this._depthStencilBuffer=t}detachDepthStencilBuffer(){const t=this._depthStencilBuffer;if(t&&this._glName){const{_context:e}=this,i=e.boundFramebuffer;e.bindFramebuffer(this);const{gl:r}=e,n=this._getGLAttachmentPoint(t.descriptor);r.framebufferRenderbuffer(36160,n,r.RENDERBUFFER,null),e.bindFramebuffer(i)}return this._depthStencilBuffer=null,t}invalidateAttachments(t){const{_context:e}=this;e.temporaryBindFramebuffer(this,()=>e.gl.invalidateFramebuffer(36160,t),!0)}copyToTexture(t,e,i,r,n,s,o){(t<0||e<0||n<0||s<0)&&console.error("Offsets cannot be negative!"),(i<=0||r<=0)&&console.error("Copy width and height must be greater than zero!");const a=o.descriptor;3553!==o.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(null==a?.width||null==a?.height||t+i>this.width||e+r>this.height||n+i>a.width||s+r>a.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const c=this._context,h=c.bindTexture(o,p.A.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(p.A.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,n,s,t,e,i,r),c.bindTexture(h,p.A.TEXTURE_UNIT_FOR_UPDATES)}readPixels(t,e,i,r,n,s,o){(i<=0||r<=0)&&console.error("Copy width and height must be greater than zero!"),o||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(t,e,i,r,n,s,o)}async readPixelsAsync(t,e,i,r,n,s,o,a){const{gl:c}=this._context,h=m.g.createPixelPack(this._context,35041,o.byteLength);this._context.bindBuffer(h);const l=this._context.boundFramebuffer;this._context.bindFramebuffer(this),c.readPixels(t,e,i,r,n,s,0),this._context.unbindBuffer(35051),this._context.bindFramebuffer(l);try{await h.getSubDataAsync(o,void 0,void 0,void 0,a)}finally{h.dispose()}}resize(t,e){if(this.width===t&&this.height===e)return;const i={width:t,height:e};if(T(i,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(t=>t.resize(i.width,i.height)),this._depthStencilTexture?.resize(i.width,i.height),this._glName&&(T(i,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(i.width,i.height),(0,d.en)())){const{gl:t}=this._context;t.checkFramebufferStatus(36160)!==t.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}}initializeAndBind(t=36160){const{gl:e}=this._context;this._glName?e.bindFramebuffer(t,this._glName):(this._glName&&e.deleteFramebuffer(this._glName),this._glName=e.createFramebuffer(),e.bindFramebuffer(t,this._glName),this._initializeAttachments(t))}_initializeAttachments(t=36160){const{gl:e}=this._context;if(this._colorAttachments.forEach((e,i)=>{if(x(e)){const r=S(e);35866===r?this._framebufferTextureLayer(e.glName,i,t):this._framebufferTexture2D(e.glName,i,r,t)}else if(w(e)){const r=this._context.gl;r.framebufferRenderbuffer(t,i,r.RENDERBUFFER,e.glName)}}),this._depthStencilBuffer){const i=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(t,i,e.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){const e=A(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,e,S(this._depthStencilTexture),t)}(0,d.en)()&&e.checkFramebufferStatus(t)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}_framebufferTexture2D(t,e=36064,i=3553,r=36160){this._context.gl.framebufferTexture2D(r,e,i,t,this._level)}_framebufferTextureLayer(t,e=36064,i=36160,r=0){this._context.gl.framebufferTextureLayer(i,e,t,this._level,r)}_disposeDepthStencilAttachments(){const t=this._context.gl;if(this._depthStencilBuffer){if(this._glName){this._context.bindFramebuffer(this);const e=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(36160,e,t.RENDERBUFFER,null)}this._depthStencilBuffer=(0,g.WD)(this._depthStencilBuffer)}this._depthStencilTexture&&(this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,A(this._depthStencilTexture.descriptor.pixelFormat))),this._depthStencilTexture=(0,g.WD)(this._depthStencilTexture))}_validateTextureDescriptor(t){3553!==t.target&&34067!==t.target&&35866!==t.target&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),T(t,this._context.parameters.maxTextureSize),this._validateBufferDimensions(t)}_validateRenderbufferDescriptor(t){T(t,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(t)}_validateBufferDimensions(t){t.width<=0&&(t.width=this.width),t.height<=0&&(t.height=this.height),this.width>0&&this.height>0&&(this.width===t.width&&this.height===t.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(t){switch(t.internalFormat){case f.SB.DEPTH_COMPONENT16:case f.SB.DEPTH_COMPONENT24:case f.SB.DEPTH_COMPONENT32F:return 36096;case f.iE.DEPTH24_STENCIL8:case f.iE.DEPTH32F_STENCIL8:return 33306;case 36168:return 36128;default:return 36064}}_validateColorAttachmentPoint(t){if(-1===b._MAX_COLOR_ATTACHMENTS){const{gl:t}=this._context;b._MAX_COLOR_ATTACHMENTS=t.getParameter(t.MAX_COLOR_ATTACHMENTS)}const e=t-36064;e+1>b._MAX_COLOR_ATTACHMENTS&&u.A.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${e+1}. Implementation supports up to ${b._MAX_COLOR_ATTACHMENTS} color attachments`)}}function x(t){return 1===M(t)}function w(t){return 2===M(t)}function C(t){return 0===M(t)}function M(t){return null!=t&&"type"in t?t.type:null}function T(t,e){const i=Math.max(t.width,t.height);if(i>e){u.A.getLogger("esri.views.webgl.FramebufferObject").warnOnce(`Resizing FBO attachment size ${t.width}x${t.height} to device limit ${e}`);const r=e/i;return t.width=Math.round(t.width*r),t.height=Math.round(t.height*r),!1}return!0}function S(t){return 34067===t.descriptor.target?34069:35866===t.descriptor.target?35866:3553}function A(t){return 6402===t?36096:33306}i(67171),i(79785);var E=i(85079);const O=[new(i(74038)._)("position",2,f.pe.UNSIGNED_SHORT,0,4)];(0,E.Xk)(O),i(66289);const R=new Image;R.src="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='5' height='5' version='1.1' viewBox='0 0 5 5' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='5' height='5' fill='%23f00' fill-opacity='.5'/%3E%3C/svg%3E%0A",R.width=5,R.height=5,R.decode();let P=class extends n.A{constructor(t){super(t),this.view=null,this.consumes={required:[]},this.produces=h.gP.COMPOSITE,this._dirty=!0}initialize(){this.addHandles([(0,o.wB)(()=>this.view.ready,t=>{t&&this.view.stage?.renderer.addRenderNode(this)},o.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new s.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const t=this._frameBuffer?.getTexture()?.descriptor,e=this.view.stage.renderer.fboCache.acquire(t?.width??640,t?.height??480,this.produces);return this._bind(e),e}bindRenderTarget(){return this._bind(this._frameBuffer),this._frameBuffer}_bind({fbo:t}){var e;t.initializeAndBind(),this.gl.drawBuffers((e=t)?e.colorAttachments.length>0?e.colorAttachments:[0]:[1029])}requestRender(t){switch(t){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(t);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(t){return!!this._dirty&&(this._dirty=!1,!0)}doRender(t){this._frameBuffer=t.find(({name:t})=>t===this.produces);try{return this.render(t)}finally{this._frameBuffer=null}}get requireGeometryDepth(){return!1}queryDepthRange(t){return null}get input(){return this._frameBuffer}};(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],P.prototype,"view",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],P.prototype,"consumes",void 0),(0,r.Cg)([(0,a.MZ)()],P.prototype,"produces",void 0),(0,r.Cg)([(0,a.MZ)({readOnly:!0})],P.prototype,"techniques",null),P=(0,r.Cg)([(0,c.$)("esri.views.3d.webgl.RenderNode")],P);const D=P},37957(t,e,i){const r={create:()=>[0,0,0,0,0,0,0,0,0],copy(t,e){t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8]}};i.d(e,["P",0,r])},48852(t,e,i){i.d(e,{g:()=>f});var r=i(4576),n=i(44208),s=i(53966),o=i(17676),a=i(78659),c=i(34275),h=i(94656),l=i(63907);const u=()=>s.A.getLogger("esri.views.webgl.BufferObject"),d=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements");class f{static createIndex(t,e,i){return new f(t,34963,e,i)}static createUniform(t,e,i){return new f(t,35345,e,i)}static createPixelPack(t,e=35041,i){const r=new f(t,35051,e);return i&&r.setSize(i),r}static createPixelUnpack(t,e=35040,i){return new f(t,35052,e,i)}static createTransformFeedback(t,e=35044,i){const r=new f(t,35982,e);return r.setSize(i),r}constructor(t,e,i,r){this._context=t,this.bufferType=e,this.usage=i,this._glName=null,this._sizeBytes=-1,this._indexType=void 0,t.instanceCounter.increment(l.vt.BufferObject,this),this._glName=this._context.gl.createBuffer(),(0,h.Y2)(this._context.gl),r&&this.setData(r)}get glName(){return this._glName}get size(){if(34963===this.bufferType)switch(this._indexType){case l.pe.UNSIGNED_INT:return this._sizeBytes/4;case l.pe.UNSIGNED_SHORT:return this._sizeBytes/2;case l.pe.UNSIGNED_BYTE:case void 0:case null:break;default:this._indexType}return this._sizeBytes}get indexType(){return this._indexType}get sizeBytes(){return this._sizeBytes}get usedMemory(){return d?0:this.sizeBytes}get _isVAOAware(){return 34963===this.bufferType||34962===this.bufferType}dispose(){this._context?.gl?(this._glName&&(this._context.gl.deleteBuffer(this._glName),this._glName=null),this._context.instanceCounter.decrement(l.vt.BufferObject,this),this._context=null):this._glName&&u().warn("Leaked WebGL buffer object")}setSize(t,e=null){if(34963===this.bufferType&&null!=e)switch(this._indexType=e,e){case l.pe.UNSIGNED_SHORT:t*=2;break;case l.pe.UNSIGNED_INT:t*=4;case l.pe.UNSIGNED_BYTE:}this._setBufferData(t)}setData(t){if(!t)return;const e=t.byteLength;34963===this.bufferType&&((0,c.mg)(t)?this._indexType=l.pe.UNSIGNED_BYTE:(0,c.jq)(t)?this._indexType=l.pe.UNSIGNED_SHORT:(0,c.XJ)(t)&&(this._indexType=l.pe.UNSIGNED_INT)),this._setBufferData(e,t)}setIndexType(t){34963===this.bufferType&&(this._indexType=t)}_setBufferData(t,e=null){this._sizeBytes=t;const i=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const r=this._context.gl;null!=e?r.bufferData(this.bufferType,e,this.usage):r.bufferData(this.bufferType,t,this.usage),(0,h.Y2)(r),this._isVAOAware&&this._context.bindVAO(i)}setSubData(t,e,i,r){if(!t)return;const n=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const{gl:s}=this._context;s.bufferSubData(this.bufferType,e*t.BYTES_PER_ELEMENT,t,i,r-i),(0,h.Y2)(s),this._isVAOAware&&this._context.bindVAO(n)}getSubData(t,e=0,i,n){if(i<0||n<0)return;const s=function(t){return(0,r.Xj)(t)}(t)?t.BYTES_PER_ELEMENT:1;if(s*((i??0)+(n??0))>t.byteLength)return;e+s*(n??0)>this.usedMemory&&u().warn("Potential problem getting subdata: requested data exceeds buffer size!");const o=this._context.gl;35982===this.bufferType?(this._context.bindBuffer(this,35982),o.getBufferSubData(35982,e,t,i,n),this._context.unbindBuffer(35982)):(this._context.bindBuffer(this,36662),o.getBufferSubData(36662,e,t,i,n),this._context.unbindBuffer(36662))}async getSubDataAsync(t,e=0,i,r,n){if(await this._context.clientWaitAsync((0,a.l5)(10),n),!this._context||!this._glName)throw(0,o.NK)();this.getSubData(t,e,i,r)}}},14113(t,e,i){i.d(e,{Cy:()=>u,N5:()=>a});var r=i(49186),n=(i(44208),i(53966));const s=()=>n.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class o{constructor(){this._includedModules=new Map}include(t,e){this._includedModules.has(t)?this._includedModules.get(t):(this._includedModules.set(t,e),t(this.builder,e))}}class a extends o{constructor(){super(...arguments),this.vertex=new d,this.fragment=new d,this.attributes=new f,this.varyings=new p,this.outputs=new g}get attributeNames(){return this.attributes.names}get builder(){return this}generate(t,e=!1){const i=this.attributes.generateSource(t),r=this.varyings.generateSource(t),n="vertex"===t?this.vertex:this.fragment,s=n.uniforms.generateSource(),o=n.code.generateSource(),a=n.main.generateSource(e),c=this.debugName?`// ${this.debugName}\n`:"",h="vertex"===t?v:_,l=n.constants.generateSource(),u=this.outputs.generateSource(t);return`#version 300 es\n${c}\n${h}\n${l.join("\n")}\n${s.join("\n")}\n${i.join("\n")}\n${r.join("\n")}\n${u.join("\n")}\n${o.join("\n")}\n${a.join("\n")}`}generateBind(t){const e=new Map;this.vertex.uniforms.entries.forEach(t=>{const i=t.bind[0];i&&e.set(t.name,i)}),this.fragment.uniforms.entries.forEach(t=>{const i=t.bind[0];i&&e.set(t.name,i)});const i=Array.from(e.values()),r=i.length;return e=>{for(let n=0;n<r;++n)i[n](t,e)}}generateBindPass(t){const e=new Map;this.vertex.uniforms.entries.forEach(t=>{const i=t.bind[1];i&&e.set(t.name,i)}),this.fragment.uniforms.entries.forEach(t=>{const i=t.bind[1];i&&e.set(t.name,i)});const i=Array.from(e.values()),r=i.length;return(e,n)=>{for(let s=0;s<r;++s)i[s](t,n,e)}}generateBindDraw(t){const e=new Map;this.vertex.uniforms.entries.forEach(t=>{const i=t.bind[2];i&&e.set(t.name,i)}),this.fragment.uniforms.entries.forEach(t=>{const i=t.bind[2];i&&e.set(t.name,i)});const i=Array.from(e.values()),r=i.length;return(e,n,s)=>{for(let o=0;o<r;++o)i[o](t,s,e,n)}}}class c{constructor(t){this._stage=t,this._entries=new Map}add(...t){for(const e of t)this._add(e);return this._stage}get(t){return this._entries.get(t)}_add(t){if(null!=t){if(this._entries.has(t.name)&&!this._entries.get(t.name).equals(t))throw new r.A("shaderbuilder:duplicate-uniform",`Duplicate uniform name ${t.name} for different uniform type`);this._entries.set(t.name,t)}else s().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map(({name:t,arraySize:e,type:i})=>null!=e?`uniform ${i} ${t}[${e}];`:`uniform ${i} ${t};`)}get entries(){return Array.from(this._entries.values())}}class h{constructor(){this._entries=new Map}add(t,e){if(this._entries.has(t))throw new r.A("shaderbuilder:duplicate-input",`Duplicate input for ${t}`);this._entries.set(t,e)}get(t){const e=this._entries.get(t);if(null==e)throw new r.A("shaderbuilder:input-resolver-error",`No resolver for input ${t} found.`);return e()}}class l{constructor(t){this._stage=t,this._bodies=new Array}add(t){return this._bodies.push(t),this._stage}generateSource(t){if(this._bodies.length>0){const t=[];for(const e of this._bodies)"string"==typeof e?t.push(e):t.push(...e());return[`void main() {\n ${t.join("\n")||""} \n}`]}if(t)throw new r.A("shaderbuilder:missing-main","Shader does not contain main function body.");return[]}}class u{constructor(t){this._stage=t,this._entries=new Array}add(t){return this._entries.push(t),this._stage}generateSource(){const t=[];for(const e of this._entries)"string"==typeof e?t.push(e):t.push(...e());return t}}class d extends o{constructor(){super(...arguments),this.uniforms=new c(this),this.main=new l(this),this.code=new u(this),this.constants=new m(this),this.inputs=new h}get builder(){return this}}class f{constructor(){this._entries=new Array}add(t,e){this._entries.push([t,e])}generateSource(t){return"fragment"===t?[]:this._entries.map(t=>`in ${t[1]} ${t[0]};`)}get names(){return this._entries.map(([t])=>t)}}class p{constructor(){this._entries=new Map}add(t,e,i){this._entries.has(t)?s().warn(`Ignoring duplicate varying ${e} ${t}`):this._entries.set(t,{type:e,invariant:i?.invariant??!1})}generateSource(t){const e=new Array;return this._entries.forEach((i,r)=>e.push((i.invariant&&"vertex"===t?"invariant ":"")+("int"===i.type?"flat ":"")+("vertex"===t?"out":"in")+` ${i.type} ${r};`)),e}}class g{constructor(){this._entries=new Map}add(t,e,i=0){const r=this._entries.get(i);r?.name!==t||r?.type!==e?this._entries.set(i,{name:t,type:e}):s().warn(`Fragment shader output location ${i} occupied`)}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(t){if("vertex"===t)return[];0===this._entries.size&&this._entries.set(0,{name:g.DEFAULT_NAME,type:g.DEFAULT_TYPE});const e=new Array;return this._entries.forEach((t,i)=>e.push(`layout(location = ${i}) out ${t.type} ${t.name};`)),e}}class m{constructor(t){this._stage=t,this._entries=new Set}add(t,e,i){let r="ERROR_CONSTRUCTOR_STRING";switch(e){case"float":r=m._numberToFloatStr(i);break;case"int":r=m._numberToIntStr(i);break;case"uint":r=m._numberToUintStr(i);break;case"bool":r=i.toString();break;case"vec2":r=`vec2(${m._numberToFloatStr(i[0])}, ${m._numberToFloatStr(i[1])})`;break;case"vec3":r=`vec3(${m._numberToFloatStr(i[0])}, ${m._numberToFloatStr(i[1])}, ${m._numberToFloatStr(i[2])})`;break;case"vec4":r=`vec4(${m._numberToFloatStr(i[0])}, ${m._numberToFloatStr(i[1])}, ${m._numberToFloatStr(i[2])}, ${m._numberToFloatStr(i[3])})`;break;case"ivec2":r=`ivec2(${m._numberToIntStr(i[0])}, ${m._numberToIntStr(i[1])})`;break;case"ivec3":r=`ivec3(${m._numberToIntStr(i[0])}, ${m._numberToIntStr(i[1])}, ${m._numberToIntStr(i[2])})`;break;case"ivec4":r=`ivec4(${m._numberToIntStr(i[0])}, ${m._numberToIntStr(i[1])}, ${m._numberToIntStr(i[2])}, ${m._numberToIntStr(i[3])})`;break;case"uvec2":r=`uvec2(${m._numberToUintStr(i[0])}, ${m._numberToUintStr(i[1])})`;break;case"uvec3":r=`uvec3(${m._numberToUintStr(i[0])}, ${m._numberToUintStr(i[1])}, ${m._numberToUintStr(i[2])})`;break;case"uvec4":r=`uvec4(${m._numberToUintStr(i[0])}, ${m._numberToUintStr(i[1])}, ${m._numberToUintStr(i[2])}, ${m._numberToUintStr(i[3])})`;break;case"mat2":case"mat3":case"mat4":r=`${e}(${Array.prototype.map.call(i,t=>m._numberToFloatStr(t)).join(", ")})`}return this._entries.add(`const ${e} ${t} = ${r};`),this._stage}static _numberToIntStr(t){return t.toFixed(0)}static _numberToUintStr(t){return`${t.toFixed(0)}u`}static _numberToFloatStr(t){return Number.isInteger(t)?t.toFixed(1):t.toString()}generateSource(){return Array.from(this._entries)}}const _="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump usampler2D;\n precision mediump sampler2DArray;\n precision mediump sampler2DShadow;\n#endif",v="precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n\n\n invariant gl_Position;\n "},79785(t,e,i){i.d(e,{Z:()=>l});var r=i(21818),n=i(53966),s=i(97768),o=i(63907),a=i(42293),c=i(85079);const h=()=>n.A.getLogger("esri.views.webgl.VertexArrayObject");let l=class t{constructor(t,e,i,n,s){this._context=t,this._indexBuffer=i,this._buffers=e instanceof Map?e:new Map([["geometry",e]]),this._baseInstances=null==n?new Map:"number"==typeof n?new Map([["geometry",n]]):n,this.locations=s??(0,r.z)((0,c.Sk)(this._buffers))}get glName(){return this._glName}get context(){return this._context}get buffers(){return(0,r.z)(this._buffers)}buffer(t="geometry"){return this.buffers.get(t)}mutableBuffer(t="geometry"){return this._buffers.get(t)}get indexBuffer(){return this._indexBuffer}getByteLength(t){return this.buffer(t)?.sizeBytes??0}vertexCount(t){const e=this.buffer(t);return e?e.sizeBytes/e.layout[0].stride:0}get usedMemory(){return Array.from(this._buffers.values()).reduce((t,e)=>t+e.usedMemory,this._indexBuffer?.usedMemory??0+145*(this._buffers.size+(this._indexBuffer?1:0)))}dispose(){this._context?(this._buffers.forEach(t=>t.dispose()),this._buffers.clear(),this._indexBuffer=(0,s.WD)(this._indexBuffer),this.disposeVAOOnly()):(this._glName||this._buffers.size>0)&&h().warn("Leaked WebGL VAO")}disposeVAOOnly(){this._context?(this._context.getBoundVAO()===this&&this._context.bindVAO(null),this._glName&&(this._context.gl.deleteVertexArray(this._glName),this._glName=null,this._context.instanceCounter.decrement(o.vt.VertexArrayObject,this)),this._context=null):this._glName&&h().warn("Leaked WebGL VAO")}bind(t=this.locations){const e=this._context.gl;this._glName?e.bindVertexArray(this._glName):(this._context.instanceCounter.increment(o.vt.VertexArrayObject,this),this._glName=e.createVertexArray(),e.bindVertexArray(this._glName),this._bindLayout(t))}_bindLayout(t){const{_buffers:e,_indexBuffer:i}=this;if(e||h().error("Vertex buffer dictionary is empty!"),e.forEach((e,i)=>(0,a.yu)(this._context,t,e,this._baseInstances.get(i)??0)),null!=i){const t=this._context.gl;this._context.gl.bindBuffer(t.ELEMENT_ARRAY_BUFFER,i.glName)}}unbind(){this._context.gl.bindVertexArray(null)}shallowCloneWithBaseInstances(e){return new t(this._context,this._buffers,this._indexBuffer,e)}}},66289(t,e,i){i.d(e,{R:()=>n});var r=i(48852);class n extends r.g{constructor(t,e,i,r=35044){super(t,34962,r,i),this.layout=e}}},28449(t,e,i){function r(t,e){const i=t.length;for(let r=0;r<i;++r)s[0]=t[r],e[r]=s[0];return e}function n(t,e){const i=t.length;for(let r=0;r<i;++r)s[0]=t[r],s[1]=t[r]-s[0],e[r]=s[1];return e}i.d(e,{Zo:()=>r,jA:()=>n});const s=new Float32Array(2)},90644(t,e,i){function r(t,e,i=32774,r=[0,0,0,0]){return{srcRgb:t,srcAlpha:t,dstRgb:e,dstAlpha:e,opRgb:i,opAlpha:i,color:{r:r[0],g:r[1],b:r[2],a:r[3]}}}function n(t,e,i,r,n=32774,s=32774,o=[0,0,0,0]){return{srcRgb:t,srcAlpha:e,dstRgb:i,dstAlpha:r,opRgb:n,opAlpha:s,color:{r:o[0],g:o[1],b:o[2],a:o[3]}}}i.d(e,{Ey:()=>b,nk:()=>u,p3:()=>n}),i(4718);const s=r(0,771),o=(r(1,0),r(1,1),r(1,771)),a=n(770,1,771,771),c=n(0,0,768,0),h={face:1029,mode:2305},l={face:1028,mode:2305};function u(t,e,i){return{ref:t,readMask:e,stencilFront:i,stencilBack:i}}function d(t){return C.intern(t)}function f(t){return T.intern(t)}function p(t){return A.intern(t)}function g(t){return O.intern(t)}function m(t){return P.intern(t)}function _(t){return I.intern(t)}function v(t){return N.intern(t)}function y(t){return B.intern(t)}function b(t){return H.intern(t)}class x{constructor(t,e){this._makeKey=t,this._makeRef=e,this._interns=new Map}intern(t){if(!t)return null;const e=this._makeKey(t),i=this._interns;return i.has(e)||i.set(e,this._makeRef(t)),i.get(e)??null}}function w(t){return"["+t.join(",")+"]"}const C=new x(M,t=>({__tag:"Blending",...t}));function M(t){return t?w([t.srcRgb,t.srcAlpha,t.dstRgb,t.dstAlpha,t.opRgb,t.opAlpha,t.color.r,t.color.g,t.color.b,t.color.a]):null}const T=new x(S,t=>({__tag:"Culling",...t}));function S(t){return t?w([t.face,t.mode]):null}const A=new x(E,t=>({__tag:"PolygonOffset",...t}));function E(t){return t?w([t.factor,t.units]):null}const O=new x(R,t=>({__tag:"DepthTest",...t}));function R(t){return t?w([t.func]):null}const P=new x(D,t=>({__tag:"StencilTest",...t}));function D(t){return t?w([t.ref,t.readMask,t.stencilFront.compare,t.stencilFront.fail,t.stencilFront.zFail,t.stencilFront.zPass,t.stencilBack.compare,t.stencilBack.fail,t.stencilBack.zFail,t.stencilBack.zPass]):null}const I=new x(F,t=>({__tag:"DepthWrite",...t}));function F(t){return t?w([t.zNear,t.zFar]):null}const N=new x(L,t=>({__tag:"ColorWrite",...t}));function L(t){return t?w([t.r,t.g,t.b,t.a]):null}const B=new x(U,t=>({__tag:"StencilWrite",...t}));function U(t){return t?w([t.mask]):null}const H=new x(function(t){return t?w([M(t.blending),S(t.culling),E(t.polygonOffset),R(t.depthTest),D(t.stencilTest),F(t.depthWrite),L(t.colorWrite),U(t.stencilWrite)]):null},t=>({blending:d(t.blending),culling:f(t.culling),polygonOffset:p(t.polygonOffset),depthTest:g(t.depthTest),stencilTest:m(t.stencilTest),depthWrite:_(t.depthWrite),colorWrite:v(t.colorWrite),stencilWrite:y(t.stencilWrite)}));i.d(e,["RC",0,o,"T8",0,a,"Uy",0,{zNear:0,zFar:1},"Xt",0,t=>2===t?h:1===t?l:null,"iD",0,s,"kn",0,{r:!0,g:!0,b:!0,a:!0},"uR",0,c])},49788(t,e,i){const r=1/255.5,n=1-r;i.d(e,["Q",0,r,"v",0,n])}}]);
256
+ `)}},26934(t,e,i){i.d(e,{Q:()=>n});var r=i(49788);function n(t){t.constants.add("alphaCutoff","float",r.Q),t.constants.add("opacityCutoff","float",r.v)}},58243(t,e,i){function r(t,e){e.useFloatBlend?t.code.add("float ditherNoise(vec4 color) { return 0.0; }"):t.code.add("\n float ditherNoise(vec4 color) {\n vec2 seed = color.rg + color.ba + gl_FragCoord.xy + gl_FragCoord.z;\n return (fract(52.9829189 * fract(dot(seed, vec2(0.06711056, 0.00583715)))) - 0.5) / 255.0;\n }")}i.d(e,{t:()=>r})},63666(t,e,i){i.d(e,{OG:()=>Dt,gP:()=>Rt});var r=i(5482),n=i(69540),s=i(91429);let o=class extends n.Pw{constructor(t){super(t),this.row=0,this.column=0,this.rows=1,this.columns=1}equals(t){return null!=t&&this.row===t.row&&this.rows===t.rows&&this.column===t.column&&this.columns===t.columns}};(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],o.prototype,"row",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],o.prototype,"column",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],o.prototype,"rows",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],o.prototype,"columns",void 0),o=(0,r.Cg)([(0,s.$K)("esri.CameraLayout")],o);const a=o;var c=i(69052),h=i(25482),l=i(34727),u=i(56507),d=i(86738),f=i(43937),p=i(36005);let g=class extends((0,n.OU)(h.o)){constructor(...t){super(...t),this.position=new d.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new a}normalizeCtorArgs(t,e,i,r){if(t&&"object"==typeof t&&("x"in t||Array.isArray(t))){const n={position:t};return null!=e&&(n.heading=e),null!=i&&(n.tilt=i),null!=r&&(n.fov=r),n}return t}writePosition(t,e,i,r){const n=t.clone();n.x=(0,u.GB)(t.x||0),n.y=(0,u.GB)(t.y||0),n.z=t.hasZ?(0,u.GB)(t.z||0):t.z,e[i]=n.write({},r)}readPosition(t,e){const i=new d.A;return i.read(t,e),i.x=(0,u.GB)(i.x||0),i.y=(0,u.GB)(i.y||0),i.z=i.hasZ?(0,u.GB)(i.z||0):i.z,i}equals(t){return null!=t&&this.tilt===t.tilt&&this.heading===t.heading&&this.fov===t.fov&&this.position.equals(t.position)&&this.layout.equals(t.layout)}};(0,r.Cg)([(0,s.MZ)({type:d.A,json:{write:{isRequired:!0}}})],g.prototype,"position",void 0),(0,r.Cg)([(0,f.K)("position")],g.prototype,"writePosition",null),(0,r.Cg)([(0,p.w)("position")],g.prototype,"readPosition",null),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,s.wg)(t=>c.ie.normalize((0,u.GB)(t)))],g.prototype,"heading",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,s.wg)(t=>(0,l.qE)((0,u.GB)(t),-180,180))],g.prototype,"tilt",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,s.wg)(t=>(0,l.qE)((0,u.GB)(t,55),1,170))],g.prototype,"fov",void 0),(0,r.Cg)([(0,s.MZ)({type:a,nonNullable:!0,json:{read:!1,write:!1}})],g.prototype,"layout",void 0),g=(0,r.Cg)([(0,s.$K)("esri.Camera")],g);var m=i(9093),_=i(35522),v=i(51850),y=i(16930),b=(i(48353),i(9762),i(65806)),x=i(27993),w=i(73941),C=(i(19419),i(82919)),M=i(71351);i(91712),i(49718),i(6867),i(16396),(0,v.vt)(),(0,v.vt)(),(0,v.vt)();var T=i(58083),S=i(48163),A=i(5443),E=i(39829),O=i(95108),R=i(37585);function P(t,e,i,r){const n=function(t,e){const i=0===e||2===e?0:1,r=t[e],n=0===e||1===e?1:-1,s=0===i?1:0;return(t,e,o)=>{if(e[i]<r&&o[i]<r)return 1===n?0:1;if(e[i]>r&&o[i]>r)return 1===n?1:0;const a=(o[s]-e[s])/(o[i]-e[i]),c=e[s]+a*(r-e[i]);return t[i]=r,t[s]=c,(e[i]<r?1:-1)*n>0?2:3}}(i,r);if(t.length=0,e.length){1===n(I,e[0],e[0])&&D(t,e[0]);for(let i=0;i<e.length;i++){const r=e[i===e.length-1?0:i+1];switch(n(I,e[i],r)){case 1:D(t,r);break;case 3:D(t,(0,S.o8)(I));break;case 2:D(t,(0,S.o8)(I)),D(t,r)}}}}function D(t,e){0!==t.length&&(0,R.aI)(t.at(-1),e)||t.push(e)}const I=(0,S.vt)();var F=i(11964),N=i(27921);const L=(0,v.vt)(),B=(0,v.vt)();function U(){return{direction:(0,v.vt)(),up:(0,v.vt)()}}function H(t,e,i,r,n){let s=(0,_.S8)(L,t),o=(0,_.Om)(s,r);const a=o>0;o=Math.abs(o),o>.99&&(o=Math.abs((0,_.Om)(e,r)),o<.99?((0,_.C)(s,e),a&&(0,_.hs)(s,s,-1)):s=null);let c=0;if(s){(0,_.hs)(B,r,(0,_.Om)(r,s)),(0,_.Re)(s,s,B);const t=(0,_.Om)(s,n)/((0,_.Bw)(s)*(0,_.Bw)(n));(0,_.$A)(B,s,n),c=((0,_.Om)(B,r)>0?1:-1)*(0,l.KJ)((0,l.XM)(t))}const h=(0,l.KJ)((0,l.XM)(-(0,_.Om)(r,t)/(0,_.Bw)(t)));return i?(i.heading=c,i.tilt=h,i):{heading:c,tilt:h}}function V(t,e,i,r){(0,_.Re)(z,i,e),(0,N.T7)(r,(0,F.LV)(e,z),t)||t===i||(0,_.C)(t,i)}const z=(0,v.vt)(),k=(0,v.fA)(0,1,0),Z=(0,v.fA)(0,0,1),$=(0,m.vt)(),W=(0,v.vt)(),j=(0,v.vt)();function G(t,e,i,r=U()){const{direction:n,up:s}=r;return(0,T.N9)($,-(0,l.kU)(e)),(0,T.eL)($,$,(0,l.kU)(i)),(0,_.Z0)(n,Z,$),(0,_.hs)(n,n,-1),(0,_.Z0)(s,k,$),r}function q(t,e,i,r,n){const s=e.lines[11].direction,o=(n-i.getAltitude(r))/s[2];(0,_.Ln)(t,r,s,o)}const X=(0,v.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(t,e,i,r){return H(e,i,r,Z,k)},eyeForCenterWithHeadingTilt:function(t,e,i,r){const n=G(0,i,r),s=(0,v.vt)();return(0,_.hs)(s,n.direction,-e),(0,_.WQ)(s,s,t),{up:n.up,eye:s,heading:i,tilt:r}},eyeTiltToLookAtTilt:function(t){return(0,l.kU)(t)},headingTiltToDirectionUp:G,lookAtTiltToEyeTilt:function(t){return(0,l.KJ)(t)},toArea:function(t,e){const i=t.frustum,{renderCoordsHelper:r}=t,n=r.getAltitude(e),s=t.spatialReference,o=t.state.camera.eye,a=[],c=i.planes[5];for(let t=0;t<4;t++){const e=i.lines[t];r.intersectInfiniteManifold((0,M.LV)(e.origin,e.direction),n,X)||q(X,i,r,e.endpoint,n),V(X,o,X,c),a.push((0,S.fA)(X[0],X[1]))}return function(t,e,i){const r=t.map(t=>((0,_.hZ)(X,t[0],t[1],0),e.fromRenderCoords(X,X,i),[X[0],X[1]]));return r.length<=2?new E.A({spatialReference:i}):(r.push(r[0].slice()),(0,O.$3)(r)||r.reverse(),new E.A({rings:[r],spatialReference:i}))}(function(t,e){const i=[],r=[];return P(i,t,e,0),P(r,i,e,1),P(i,r,e,2),P(r,i,e,3),r}(a,r.extent),r,s)},toExtent:function(t,e,i,r,n){const s=t.renderSpatialReference,o=t.spatialReference??e.spatialReference;return(0,b.g)(e,W,s),(0,b.g)(e,j,s),W[0]-=i/2,j[0]+=i/2,W[1]-=r/2,j[1]+=r/2,(0,x.F)(W,s,W,o),(0,x.F)(j,s,j,o),n?(n.xmin=W[0],n.ymin=W[1],n.xmax=j[0],n.ymax=j[1],n.spatialReference=o):n=new A.A(W[0],W[1],j[0],j[1],o),n}},Symbol.toStringTag,{value:"Module"}));var Y=i(78955),Q=i(91829),K=i(34304),J=i(52039),tt=i(94008),et=i(28735);class it{get planes(){return this.frustum}get points(){return this._points}get mutablePoints(){return this._points}get direction(){return this._direction}get origin(){return this._origin}get boundingSphere(){return this._boundingSphereDirty&&this._updateBoundingSphere(),this._boundingSphere}constructor(t){this.renderCoordsHelper=t,this.frustum=(0,C.vt)(),this._points=(0,C.Qy)(),this.lines=new Array(12),this._origin=(0,v.vt)(),this._direction=(0,v.vt)(),this._boundingSphere=new tt.iy,this._altitude=null,this._boundingSphereDirty=!0;for(let t=0;t<12;t++)this.lines[t]={origin:null,direction:(0,v.vt)(),endpoint:null}}update(t){(0,C.ui)(t.viewMatrix,t.projectionMatrix,this.frustum,this._points),(0,_.C)(this._origin,t.eye),(0,_.C)(this._direction,t.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines(),this._boundingSphereDirty=!0}updatePoints(t){for(let e=0;e<this._points.length;e++)(0,_.C)(this._points[e],t[e]);(0,C.DV)(this.frustum,this._points),this._updateLines()}get altitude(){return this._altitude}intersectsSphere(t){return(0,C.m7)(this.frustum,t)}intersectsRay(t){return(0,C.pw)(this.frustum,t)}intersectsLineSegment(t,e){return(0,C.ST)(this.frustum,t,e)}intersectsPoint(t){return(0,C.bU)(this.frustum,t)}_updateLines(){const t=this._points;for(let e=0;e<4;e++){const i=e+4;rt(this.lines[e],t[e],t[i]),rt(this.lines[e+4],t[e],3===e?t[0]:t[e+1]),rt(this.lines[e+8],t[i],3===e?t[4]:t[i+1])}}_updateBoundingSphere(){const{origin:t}=this,e=st;(0,_.S8)(e,this.direction);const i=nt;(0,_.jb)(i,this.points[4],t);const r=.5*(0,_.Om)(i,i)/(0,_.Om)(e,i),n=this._boundingSphere,s=(0,_.Ln)(ot,t,e,r);n.center=s,n.radius=r}static{this.planePointIndices=C.c8}static{this.nearFarLineIndices=[[0,4],[1,5],[2,6],[3,7]]}}function rt(t,e,i){t.origin=e,t.endpoint=i,(0,_.oW)(t.direction,e,i)}const nt=(0,v.vt)(),st=(0,v.vt)(),ot=(0,v.vt)();i(86211);const at=(0,v.fA)(5802e-9,13558e-9,331e-7),ct=(0,v.fA)(65e-8*3,5643e-9,255e-9);(0,v.fA)(at[0]+ct[0],at[1]+ct[1],at[2]+ct[2]);class ht{constructor(t=1/0,e=-1/0){this.near=t,this.far=e}set(t,e){this.near=t,this.far=e}union(t){return null!=t&&(this.near=Math.min(this.near,t.near),this.far=Math.max(this.far,t.far)),this}within(t){return this.near<=t&&t<=this.far}equals(t){return this.near===t.near&&this.far===t.far}static{this.Zero=new ht(0,0)}static{this.Infinite=new ht}}(0,v.vt)(),(0,v.vt)(),new tt.iy,(0,M.vt)(),new A.A({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0});var lt=i(32728);const ut=(0,v.fA)(0,0,1),dt=(0,_.S8)((0,v.vt)(),(0,v.fA)(1,1,1)),ft=(0,m.vt)(),pt=(0,v.vt)(),gt=(0,v.vt)();function mt(t,e,i,r=U()){(0,_.$A)(pt,t,ut),0===(0,_.Om)(pt,pt)&&(0,_.$A)(pt,t,dt),(0,T.$0)(ft,-(0,l.kU)(e),t),(0,T.e$)(ft,ft,-(0,l.kU)(i),pt);const{up:n,direction:s}=r;return(0,_.$A)(n,pt,t),(0,_.S8)(n,n),(0,_.Z0)(n,n,ft),(0,_.S8)(s,t),(0,_.ze)(s,s),(0,_.Z0)(s,s,ft),r}function _t(t){const e=t[1];t[1]=-t[2],t[2]=e}function vt(t,e){const i=mt(e,t.heading,t.tilt);return t.up=i.up,t}function yt(t,e){const{renderCoordsHelper:i,state:r}=t;if(1!==r.viewingMode)return 1;const n=i.getAltitude(e),s=i.referenceEllipsoid.radius,o=1+(0,_.Io)(r.camera.eye,e)/(s+n),a=Math.sqrt(o*o-1),{minCurvature:c,maxCurvature:h,minSamples:u,maxSamples:d}=xt,f=(0,l.qE)((a-c)/(h-c),0,1);return Math.round((0,l.Cc)(u,d,f))}function bt(t,e){const i=[],r=[],n=(0,K.FD)();for(let s=0;s<t.length;s++){const o=t[s],a=s===t.length-1?t[0]:t[s+1],c=(0,F.Cr)(o,a,Et),h=(0,N.vE)(e,c.origin,c.vector,0,St);switch(h){case 2:i.push(o);break;case 3:r.push(o);break;case 0:case 1:{const[t,s,a]=0===h?[1,i,r]:[-1,r,i],c=(0,N.Qj)(e),l=(0,_.Ln)((0,v.vt)(),St,c,t*n),u=(0,_.Ln)((0,v.vt)(),St,c,t*-n);s.push(o),s.push(l),a.push(u)}}}const s=[];return i.length&&s.push(i),r.length&&s.push(r),s}const xt={minCurvature:(0,l.kU)(5),maxCurvature:(0,l.kU)(50),minSamples:1,maxSamples:6},wt=(0,v.fA)(1,0,0),Ct=(0,v.fA)(0,1,0),Mt=(0,v.vt)(),Tt=(0,v.vt)(),St=(0,v.vt)(),At=new tt.iy,Et=(0,F.vt)(),Ot=(0,Q.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(t,e,i,r){const n=pt,s=gt;return(0,_.S8)(n,t),(0,_.$A)(gt,n,ut),0===(0,_.Om)(gt,gt)&&(0,_.$A)(gt,n,dt),(0,_.$A)(s,gt,n),H(e,i,r,n,s)},eyeForCenterWithHeadingTilt:function(t,e,i,r){const n={eye:(0,v.vt)(),up:null,tilt:r,heading:i},s=pt;s[0]=t[0],s[1]=t[2],s[2]=-t[1];const o=e,a=(0,l.kU)(i),c=(0,l.kU)(r),h=Math.sin(a),u=Math.cos(a),d=Math.sin(c),f=Math.cos(c),p=(0,_.Bw)(s);let g;if(Math.abs(c)<1e-8)g=o+p;else{const t=p/d,e=(0,l.YN)(o/t),i=Math.PI-c-e;g=t*Math.sin(i)}const m=f*o,y=o*o*(d*d),b=u*u*y,x=g-m,w=x*x,C=b*(b+w-s[1]*s[1]);if(C<0)return(0,_.hs)(n.eye,s,g/p),n.tilt=0,vt(n,t);const M=Math.sqrt(C),T=s[1]*x,S=b+w;let A;if(A=u>0?-M+T:M+T,Math.abs(S)<1e-8)return p<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=o):(0,_.hs)(n.eye,s,g/p),n.tilt=0,_t(n.eye),vt(n,t);n.eye[1]=A/S;const E=h*h*y,O=d*o,R=u*O*n.eye[1],P=n.eye[1]*n.eye[1],D=1-P,I=Math.sqrt(D),F=b*P+E-2*R*I*x+D*w;return Math.abs(F)<1e-8?((0,_.hs)(n.eye,s,g/p),n.tilt=0,_t(n.eye),vt(n,t)):(n.eye[0]=(D*(g*s[0]-m*s[0])-O*I*(s[0]*n.eye[1]*u+s[2]*h))/F,n.eye[2]=(D*(g*s[2]-m*s[2])-O*I*(s[2]*n.eye[1]*u-s[0]*h))/F,(0,_.hs)(n.eye,n.eye,g),_t(n.eye),vt(n,t))},eyeTiltToLookAtTilt:function(t,e,i){const r=(0,l.kU)(t),n=(0,_.Bw)(e);return(0,l.YN)(i/(n/Math.sin(r)))+r},getCurvatureSamples:yt,headingTiltToDirectionUp:mt,lookAtTiltToEyeTilt:function(t,e,i){const r=(0,_.Bw)(e),n=Math.sqrt(i*i+r*r-2*i*r*Math.cos(Math.PI-t)),s=(0,l.YN)(i/(n/Math.sin(t)));return(0,l.KJ)(t-s)},toArea:function(t,e){const{renderCoordsHelper:i}=t,r=t.state.camera.clone(),n=new it(i);r.near=2,n.update(r);const s=i.getAltitude(e),o=t.spatialReference,a=r.eye,c=function(t){const{renderCoordsHelper:e,state:i}=t,r=Math.abs(e.getAltitude(i.camera.center));return At.radius=e.referenceEllipsoid.radius+r,i.camera.sphereFrustumCoverage(At,e)}(t),h=yt(t,e),u=r.aboveGround,d=n.planes[5],f=[],p=(0,N.O_)(v.uY,wt,(0,N.vt)()),g=(0,N.O_)(v.uY,Ct,(0,N.vt)());(0,Y.hZ)(Ot,0,0,0,0);const m=t=>{};for(let t=0;t<4;t++){const e=1===t&&!u||3===t&&u?1-c:0,r=1===t&&u||3===t&&!u?c:1,o=n.lines[t],y=n.lines[3===t?0:t+1];for(let n=0;n<h;n++){const c=n/h,u=0===n?0:(0,l.Cc)(e,r,1===t?1-(1-c)**2:3===t?c**2:c),b=(0,_.Cc)(Tt,o.origin,y.origin,u),x=(0,lt.nu)(o.direction,y.direction,u,Mt);i.intersectManifoldClosestSilhouette((0,M.LV)(b,x),s,St),V(St,a,St,d),f.push((0,v.o8)(St)),0!==f.length&&m((0,_.lo)(f.at(-1),St));const w=((0,N.Tj)(p,St)?1:0)|((0,N.Tj)(g,St)?2:0);Ot[w]=1}}f.length>2&&(0,_.lo)(f[0],f.at(-1));const y=function(t,e,i){const r=2*(0,K.FD)();return t.map(t=>{const n=[];let s=!1;for(const o of t)e.fromRenderCoords(o,St,i),Math.abs(o[0])<r&&Math.abs(o[1])<r?(n.push([null,St[1]]),n.push([null,St[1]]),s=!0):n.push([St[0],St[1]]);if(s)for(let t=0;t<n.length;t++){const e=n[t];if(null!=e[0])continue;const i=n[t+1],r=n.at(0===t?-1:t-1);e[0]=r[0],t++;const s=n.at(t===n.length-1?0:t+1);i[0]=s[0]}return n.push(n[0]),(0,O.$3)(n)||n.reverse(),n})}((0,Y.m3)(Ot)>1?function(t,e){const i=[];for(const r of t)i.push(...bt(r,e));return i}(bt(f,p),g):[f],i,o);return new E.A({rings:y,spatialReference:o})},toExtent:function(t,e,i,r,n){let s,o,a,h;const u=e.latitude,d=(0,w.tO)(t.spatialReference).radius,f=e.longitude,p=function(t,e,i){const r=e/i,n=(0,l.kU)(t),s=Math.sin(r/2),o=Math.cos(n),a=2*(0,l.YN)(Math.sqrt(s*s/(o*o)));return(0,l.KJ)(a)}(u,i,d)/2;s=f-p,o=f+p;const g=(0,l.kU)(u),m=(1+Math.sin(g))/(1-Math.sin(g)),_=(m+1)*Math.tan(r/d/2),v=_*_;function b(t){const e=Math.PI/2;return(t=c.uC.normalize(t,-e))>e&&(t=Math.PI-t),t}if(a=1.5*Math.PI-2*Math.atan(.5*(_+Math.sqrt(4*m+v))),h=a+r/d,a=b(a),h=b(h),h<a){const t=h;h=a,a=t}if(a=Math.max((0,l.KJ)(a),-90),h=Math.min((0,l.KJ)(h),90),o=J.Y_.monotonic(s,o),o-s>180){const t=(o-s-180)/2;s+=t,o-=t}const x=t.spatialReference&&t.spatialReference.isGeographic?t.spatialReference:y.A.WGS84;return n?(n.xmin=s,n.ymin=a,n.xmax=o,n.ymax=h,n.spatialReference=x):n=new A.A(s,a,o,h,x),t.spatialReference&&t.spatialReference.isWebMercator&&(0,et.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"}));const Rt={OPAQUE:"opaque-color",TRANSPARENT:"transparent-color",COMPOSITE:"composite-color",FINAL:"final-color"},Pt=[Rt.FINAL,Rt.COMPOSITE,Rt.OPAQUE,Rt.TRANSPARENT],Dt={ANTIALIASING:"aa-color",CUTFILL_COLOR:"cutfill-color",CUTFILL_COMPUTATION:"cutfill-computation",FOCUSAREA_COLOR:"focusarea-color",FOCUSAREA:"focusarea",GAUSSIAN_SPLAT:"gaussian",GAUSSIAN_SPLAT_DEPTH:"gaussian-depth",GROUND_DEPTH:"ground-depth",HIGHLIGHT_COLOR:"highlight-color",LASERLINES:"laserlines",TRANSPARENT_NO_DEPTH:"transparent-no-depth",MAGNIFIER:"magnifier",OCCLUDED:"occluded",OPAQUE_OCCLUSION_QUERY:"opaque-occlusion-query",OPAQUE_ENVIRONMENT:"opaque-environment",TRANSPARENT_ENVIRONMENT:"transparent-environment",AMBIENT_ILLUMINATION:"ambient-illumination",SHADOW_ACCUMULATION:"shadow-accumulation",SHADOWMAP:"shadowmap",SHADOW_HIGHLIGHT:"shadow-highlight",VOXEL:"voxel",VIEWSHED:"viewshed",OBJECT_AND_LAYER_ID_COLOR:"olid"};Array.from(Object.values(Dt)).concat(Pt),(0,v.vt)()},91712(t,e,i){i.d(e,{A:()=>T});var r=i(5482),n=i(69622),s=i(53966),o=i(34727),a=i(90629),c=i(91429),h=i(58083),l=i(9093),u=i(37585),d=i(48163),f=i(35522),p=i(51850),g=i(78955),m=i(91829),_=i(82919),v=i(71351),y=i(44280);function b(t,e,i){t.worldUpAtPosition(e,x),(0,f.Re)(w,i,e);const r=(0,f.Bw)(w);return 0===r?0:(0,o.XM)((0,f.Om)(w,x)/r)}const x=(0,p.vt)(),w=(0,p.vt)();var C;let M=C=class extends n.A{constructor(t){super(t),this._ray=(0,v.vt)(),this._viewport=(0,m.fA)(0,0,1,1),this._padding=(0,m.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,d.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,l.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,l.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,l.vt)(),this._frustumDirty=!0,this._frustum=(0,_.vt)(),this._fullViewport=(0,m.vt)(),this._fullViewportDirty=!0,this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,p.vt)(),this._up=(0,p.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(t){this._pixelRatio=t>0?t:1}get rows(){return this._rows}set rows(t){this._rows=Math.max(1,t)}get columns(){return this._columns}set columns(t){this._columns=Math.max(1,t)}get eye(){return this._ray.origin}set eye(t){this._compareAndSetView(t,this._ray.origin,"eye")}get center(){return this._center}set center(t){this._compareAndSetView(t,this._center,"_center")}get ray(){return(0,f.Re)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(t){this._compareAndSetView(t,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(t){(0,h.C)(this._viewMatrix,t),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get inverseViewMatrix(){return(0,h.Qw)((0,l.vt)(),this.viewMatrix)||this._get("inverseViewMatrix")||(0,l.vt)()}get viewForward(){return this._ensureViewClean(),(0,f.hZ)((0,p.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,f.hZ)((0,p.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,f.hZ)((0,p.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(t){this._nearFar[0]!==t&&(this._nearFar[0]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(t){this._nearFar[1]!==t&&(this._nearFar[1]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(t){this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const t=(0,g.hs)((0,m.vt)(),this._viewport,1/this.pixelRatio),e=this._get("screenViewport");return e&&(0,g.aI)(t,e)?e:t}get screenPadding(){if(1===this.pixelRatio)return this._padding;const t=(0,g.hs)((0,m.vt)(),this._padding,1/this.pixelRatio),e=this._get("screenPadding");return e&&(0,g.aI)(t,e)?e:t}get x(){return this._viewport[0]}set x(t){t+=this._padding[3],this._viewport[0]!==t&&(this._viewport[0]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(t){t+=this._padding[2],this._viewport[1]!==t&&(this._viewport[1]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(t){this._viewport[2]!==t&&(this._viewport[2]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(t){this._viewport[3]!==t&&(this._viewport[3]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(t){this.width=t-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(t){this.height=t-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewportDirty&&(this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this._viewport[2]+this._padding[1]+this._padding[3],this._fullViewport[3]=this._viewport[3]+this._padding[0]+this._padding[2],this._fullViewportDirty=!1),this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(t){(0,g.t2)(this._padding,t)||(this._viewport[0]+=t[3]-this._padding[3],this._viewport[1]+=t[2]-this._padding[2],this._viewport[2]-=t[1]+t[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=t[0]+t[2]-(this._padding[0]+this._padding[2]),(0,g.C)(this._padding,t),this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&((0,h.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,h.B8)((0,l.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,l.vt)()}get fov(){return this._fov}set fov(t){this._fov=t,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return t=this._fov,e=this.width,i=this.height,2*Math.atan(e*Math.tan(.5*t)/Math.sqrt(e*e+i*i));var t,e,i}set fovX(t){this._fov=function(t,e,i){return 2*Math.atan(Math.sqrt(e*e+i*i)*Math.tan(.5*t)/e)}(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return t=this._fov,e=this.width,i=this.height,2*Math.atan(i*Math.tan(.5*t)/Math.sqrt(e*e+i*i));var t,e,i}set fovY(t){this._fov=function(t,e,i){return 2*Math.atan(Math.sqrt(e*e+i*i)*Math.tan(.5*t)/i)}(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,f.Io)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,h.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,h.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(t){const{near:e,far:i}=this;return 2*e*i/(i+e-t*(i-e))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const t=this.width,e=this.height,i=this.near*Math.tan(this.fovY/2)*2,r=i*this._aspect,n=i/this.rows,s=r/this.columns,o=-r/2+this.column*s,a=o+s,c=-i/2+this.row*n,u=c+n,d=(0,h.$h)((0,l.vt)(),o*(1+2*this._padding[3]/t),a*(1+2*this._padding[1]/t),c*(1+2*this._padding[2]/e),u*(1+2*this._padding[0]/e),this.near,this.far),f=this._get("projectionMatrix");return f&&(0,h.t2)(f,d)?f:d}copyFrom(t){(0,f.C)(this._ray.origin,t.eye),this.center=t.center,this.up=t.up,(0,g.C)(this._viewport,t.viewport),this.notifyChange("_viewport"),(0,g.C)(this._padding,t.padding),this.notifyChange("_padding"),this._fullViewportDirty=!0,(0,u.C)(this._nearFar,t.nearFar),this.notifyChange("_nearFar"),this._fov=t.fov,this.row=t.row,this.column=t.column,this.rows=t.rows,this.columns=t.columns,this.relativeElevation=t.relativeElevation;const e=t;return this._viewDirty=e._viewDirty,this._viewDirty||((0,h.C)(this._viewMatrix,t.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=e._frustumDirty,this._frustumDirty||((0,_.C)(this._frustum,t.frustum),this._frustumDirty=!1),e._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,h.C)(this._viewInverseTransposeMatrix,t.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this.pixelRatio=t.pixelRatio,this}copyViewFrom(t){this.eye=t.eye,this.center=t.center,this.up=t.up,this.fov=t.fov}clone(){return(new C).copyFrom(this)}equals(t){return(0,f.t2)(this.eye,t.eye)&&(0,f.t2)(this.center,t.center)&&(0,f.t2)(this.up,t.up)&&(0,g.t2)(this._viewport,t.viewport)&&(0,g.t2)(this._padding,t.padding)&&(0,u.t2)(this.nearFar,t.nearFar)&&this._fov===t.fov&&this.pixelRatio===t.pixelRatio&&this.relativeElevation===t.relativeElevation&&this.row===t.row&&this.column===t.column&&this.rows===t.rows&&this.columns===t.columns}equalsView(t){return(0,f.t2)(this.eye,t.eye)&&(0,f.t2)(this.center,t.center)&&(0,f.t2)(this.up,t.up)&&this._fov===t.fov}almostEquals(t){const e=Math.max(1,1/this.pixelRatio,1/t.pixelRatio);if(Math.abs(t.fov-this._fov)>=.001||(0,g.hG)(t.screenPadding,this.screenPadding)>=e||(0,g.hG)(this.screenViewport,t.screenViewport)>=e||this.row!==t.row||this.column!==t.column||this.rows!==t.rows||this.columns!==t.columns)return!1;(0,f.jb)(E,t.eye,t.center),(0,f.jb)(O,this.eye,this.center);const i=(0,f.Om)(E,O),r=(0,f.uE)(E),n=(0,f.uE)(O),s=5e-4;return i*i>=(1-1e-10)*r*n&&(0,f.lo)(t.eye,this.eye)<Math.max(r,n)*s*s}computeRenderPixelSizeAt(t){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(t))}computeRenderPixelSizeAtDist(t){return t*this.perRenderPixelRatio}computeScreenPixelSizeAt(t){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(t))}_viewDirectionDistance(t){return Math.abs((0,y.gr)(this.viewForward,(0,f.Re)(E,t,this.eye)))}computeScreenPixelSizeAtDist(t){return t*this.perScreenPixelRatio}computeDistanceFromRadius(t,e){return t/Math.tan(Math.min(this.fovX,this.fovY)/(2*(e||1)))}getScreenCenter(t=(0,a.gs)()){return t[0]=(this.padding[3]+this.width/2)/this.pixelRatio,t[1]=(this.padding[0]+this.height/2)/this.pixelRatio,t}getRenderCenter(t,e=.5,i=.5){return t[0]=this.padding[3]+this.width*e,t[1]=this.padding[2]+this.height*i,t[2]=.5,t}setGLViewport(t){const e=this.viewport,i=this.padding;t.setViewport(e[0]-i[3],e[1]-i[2],e[2]+i[1]+i[3],e[3]+i[0]+i[2])}applyProjection(t,e){t!==S&&(0,f.C)(S,t),S[3]=1,(0,g.Z0)(S,S,this.projectionMatrix);const i=Math.abs(S[3]);(0,f.hs)(S,S,1/i);const r=this.fullViewport;e[0]=(0,o.Cc)(0,r[0]+r[2],.5+.5*S[0]),e[1]=(0,o.Cc)(0,r[1]+r[3],.5+.5*S[1]),e[2]=.5*(S[2]+1),e[3]=i}unapplyProjection(t,e){const i=this.fullViewport;S[0]=(t[0]/(i[0]+i[2])*2-1)*t[3],S[1]=(t[1]/(i[1]+i[3])*2-1)*t[3],S[2]=(2*t[2]-1)*t[3],S[3]=t[3],null!=this.inverseProjectionMatrix&&((0,g.Z0)(S,S,this.inverseProjectionMatrix),e[0]=S[0],e[1]=S[1],e[2]=S[2])}projectToScreen(t,e){return null==this.projectToRenderScreen(t,R)?null:(this.renderToScreen(R,e),e)}projectToRenderScreen(t,e){if(S[0]=t[0],S[1]=t[1],S[2]=t[2],S[3]=1,(0,g.Z0)(S,S,this.viewProjectionMatrix),0===S[3])return null;const i=S;(0,f.hs)(i,i,1/Math.abs(S[3]));const r=this.fullViewport,n=(0,o.Cc)(0,r[0]+r[2],.5+.5*i[0]),s=(0,o.Cc)(0,r[1]+r[3],.5+.5*i[1]);return"x"in e?(e.x=n,e.y=s):(e[0]=n,e[1]=s,e.length>2&&(e[2]=.5*(i[2]+1))),e}unprojectFromScreen(t,e){return this.unprojectFromRenderScreen(this.screenToRender(t,R),e)}unprojectFromRenderScreen(t,e){if((0,h.lw)(A,this.projectionMatrix,this.viewMatrix),!(0,h.B8)(A,A))return null;const i=this.fullViewport;return S[0]=2*(t[0]-i[0])/i[2]-1,S[1]=2*(t[1]-i[1])/i[3]-1,S[2]=2*t[2]-1,S[3]=1,(0,g.Z0)(S,S,A),0===S[3]?null:(e[0]=S[0]/S[3],e[1]=S[1]/S[3],e[2]=S[2]/S[3],e)}constrainWindowSize(t,e,i,r){const n=t*this.pixelRatio,s=e*this.pixelRatio,o=Math.max(n-i/2,0),a=Math.max(this.fullHeight-s-r/2,0),c=-Math.min(n-i/2,0),h=-Math.min(this.fullHeight-s-r/2,0),l=i-c- -Math.min(this.fullWidth-n-i/2,0),u=r-h- -Math.min(s-r/2,0);return[Math.round(o),Math.round(a),Math.round(l),Math.round(u)]}computeUp(t){1===t?this._computeUpGlobal():this._computeUpLocal()}screenToRender(t,e){const i=t[0]*this.pixelRatio,r=this.fullHeight-t[1]*this.pixelRatio;return e[0]=i,e[1]=r,e}renderToScreen(t,e){const i=t[0]/this.pixelRatio,r=(this.fullHeight-t[1])/this.pixelRatio;e[0]=i,e[1]=r}sphereFrustumCoverage(t,e){const{center:i,eye:r,distance:n,fovY:s}=this,o=Math.abs(Math.PI/2-b(e,i,r));return t.frustumCoverage(o,n,s)}_computeUpGlobal(){(0,f.Re)(E,this.center,this.eye);const t=(0,f.Bw)(this.center);t<1?(0,f.t2)(this._up,p.Cb)&&((0,f.C)(this._up,p.Cb),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,f.Om)(E,this.center))>.9999*(0,f.Bw)(E)*t||((0,f.$A)(O,E,this.center),(0,f.$A)(O,O,E),(0,f.S8)(O,O),(0,f.t2)(this._up,O)||((0,f.C)(this._up,O),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){(0,f.oW)(E,this.eye,this.center),Math.abs(E[2])<=.9999&&((0,f.hs)(E,E,E[2]),(0,f.hZ)(E,-E[0],-E[1],1-E[2]),(0,f.S8)(E,E),(0,f.t2)(this._up,E)||((0,f.C)(this._up,E),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(t,e,i){"number"==typeof t[0]&&isFinite(t[0])&&"number"==typeof t[1]&&isFinite(t[1])&&"number"==typeof t[2]&&isFinite(t[2])?(0,f.t2)(t,e)||((0,f.C)(e,t),this._markViewDirty(),this.notifyChange(i)):s.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&((0,_.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&((0,h.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,r.Cg)([(0,c.MZ)()],M.prototype,"_viewport",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_padding",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_fov",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_nearFar",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_viewDirty",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_viewMatrix",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_pixelRatio",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"pixelRatio",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"row",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"column",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_rows",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"rows",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_columns",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"columns",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"eye",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"center",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_center",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"up",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_up",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"viewMatrix",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"inverseViewMatrix",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"viewForward",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"viewUp",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"viewRight",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"nearFar",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"near",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"far",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"viewport",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"screenViewport",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"screenPadding",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"x",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"y",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"width",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"height",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fullWidth",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fullHeight",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"_aspect",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"padding",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"projectionMatrix",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"inverseProjectionMatrix",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fov",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fovX",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fovY",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"viewInverseTransposeMatrix",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"_projectionMatrixInternal",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"relativeElevation",void 0),M=C=(0,r.Cg)([(0,c.$K)("esri.views.3d.webgl.RenderCamera")],M);const T=M,S=(0,m.vt)(),A=(0,l.vt)(),E=(0,p.vt)(),O=(0,p.vt)(),R=(0,a.r_)()},78607(t,e,i){i.d(e,{A:()=>D});var r=i(5482),n=i(69622),s=i(49186),o=i(36708),a=i(10107),c=i(64108),h=i(63666),l=i(44208),u=i(53966),d=(i(17676),i(94656)),f=i(63907);i(93637),i(4576),new Set(["GL_OES_standard_derivatives","GL_EXT_frag_depth","GL_EXT_draw_buffers","GL_EXT_shader_texture_lod"]),new Map,(0,l.A)("esri-tests-disable-gpu-memory-measurements"),(0,d.en)();(0,d.en)();i(90644);var p=i(25530),g=i(97768),m=i(48852),_=i(42293);const v=!!(0,l.A)("esri-tests-disable-gpu-memory-measurements");class y{constructor(t,e){this._context=t,this._descriptor=e,this.type=2,this._context.instanceCounter.increment(f.vt.Renderbuffer,this);const i=this._context.gl;this.glName=i.createRenderbuffer(),this._context.bindRenderbuffer(this);const{width:r,height:n,internalFormat:s,multisampled:o}=e;o?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,s,r,n):i.renderbufferStorage(i.RENDERBUFFER,s,r,n),this._context.bindRenderbuffer(null)}get descriptor(){return this._descriptor}get samples(){const t=this._descriptor.samples,e=this._context.parameters.maxSamples;return t?Math.min(t,e):e}get usedMemory(){return v?0:(t=this._descriptor).width<=0||t.height<=0||null==t.internalFormat?0:t.width*t.height*(0,_.MW)(t.internalFormat);var t}resize(t,e){const i=this._descriptor;if(i.width===t&&i.height===e)return;i.width=t,i.height=e;const r=this._context.gl;this._context.bindRenderbuffer(this),i.multisampled?r.renderbufferStorageMultisample(r.RENDERBUFFER,this.samples,i.internalFormat,i.width,i.height):r.renderbufferStorage(r.RENDERBUFFER,i.internalFormat,i.width,i.height),this._context.bindRenderbuffer(null)}dispose(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(f.vt.Renderbuffer,this),this._context=null)}}class b{constructor(t,e,i){if(this._context=t,this._level=0,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,t.instanceCounter.increment(f.vt.FramebufferObject,this),null!=e){const i=function(t,e){return x(e)||w(e)?e:C(e)?new p.A(t,e):function(t){return 3===M(t)||null!=t&&"samples"in t}(e)?new y(t,e):null}(t,e);null!=i&&(this._colorAttachments.set(36064,i),x(i)?this._validateTextureDescriptor(i.descriptor):this._validateRenderbufferDescriptor(i.descriptor)),this._validateColorAttachmentPoint(36064)}if(null!=i)if(function(t){return x(t)||C(t)}(i))this._depthStencilTexture=x(i)?i:new p.A(t,i),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const e=w(i)?i:new y(t,i);this._depthStencilBuffer=e,this._validateRenderbufferDescriptor(e.descriptor)}}get glName(){return this._glName}get colorTexture(){const t=this._colorAttachments.get(36064);return x(t)?t:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const t=this._colorAttachments.get(36064)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.width??0}get height(){const t=this._colorAttachments.get(36064)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.height??0}get usedMemory(){return this._colorAttachments.values().reduce((t,e)=>t+e.usedMemory,this.depthStencil?.usedMemory??0)}get level(){return this._level}set level(t){this._level!==t&&(this._level=t,this._glName&&this._context.temporaryBindFramebuffer(this,()=>this._initializeAttachments()))}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(t){const e=this._colorAttachments.get(t);return e&&x(e)?e:null}get colorAttachments(){return Array.from(this._colorAttachments.keys())}attachColorTexture(t,e=36064){if(!t)return;this._validateColorAttachmentPoint(e);const{descriptor:i}=t;this._validateTextureDescriptor(i),this.detachColorTexture(e)?.dispose(),this._colorAttachments.set(e,t),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,e))}detachColorTexture(t=36064){const e=this._colorAttachments.get(t);if(!e)return;const i=x(e);return this._glName&&this._context.temporaryBindFramebuffer(this,()=>{if(i)this._framebufferTexture2D(null,t);else{const e=this._context.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,t,e.RENDERBUFFER,null)}}),this._colorAttachments.delete(t),i?e:void 0}detachColorTextures(...t){if(0!==t.length){if(this._glName){const e=this._context.gl;this._context.temporaryBindFramebuffer(this,()=>{t.forEach(t=>{x(this._colorAttachments.get(t))?this._framebufferTexture2D(null,t):e.framebufferRenderbuffer(e.FRAMEBUFFER,t,e.RENDERBUFFER,null)})})}t.forEach(t=>this._colorAttachments.delete(t))}}setColorTextureTarget(t,e=36064,i=0){const r=this._colorAttachments.get(e);r&&(35866===t?this._framebufferTextureLayer(r.glName,e,36160,i):this._framebufferTexture2D(r.glName,e,t,36160))}attachDepthStencil(t){if(t)switch(t.type){case 1:return this._attachDepthStencilTexture(t);case 2:return this._attachDepthStencilBuffer(t)}}_attachDepthStencilTexture(t){if(null==t)return;const{descriptor:e}=t,{pixelFormat:i,dataType:r}=e;34041===i||6402===i?34041!==i||r===f.ld.UNSIGNED_INT_24_8?6402!==i||r===f.ld.UNSIGNED_INT||r===f.ld.UNSIGNED_SHORT?(this._validateTextureDescriptor(e),this._disposeDepthStencilAttachments(),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,A(i))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=t):console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!")}detachDepthStencilTexture(){const t=this._depthStencilTexture;return t&&this._glName&&this._context.temporaryBindFramebuffer(this,()=>{this._framebufferTexture2D(null,A(t.descriptor.pixelFormat))}),this._depthStencilTexture=null,t}_attachDepthStencilBuffer(t){if(null==t)return;const e=t.descriptor;if(this._validateRenderbufferDescriptor(e),this._disposeDepthStencilAttachments(),this._glName){this._context.bindFramebuffer(this);const{gl:i}=this._context,r=this._getGLAttachmentPoint(e);i.framebufferRenderbuffer(36160,r,i.RENDERBUFFER,t.glName)}this._depthStencilBuffer=t}detachDepthStencilBuffer(){const t=this._depthStencilBuffer;if(t&&this._glName){const{_context:e}=this,i=e.boundFramebuffer;e.bindFramebuffer(this);const{gl:r}=e,n=this._getGLAttachmentPoint(t.descriptor);r.framebufferRenderbuffer(36160,n,r.RENDERBUFFER,null),e.bindFramebuffer(i)}return this._depthStencilBuffer=null,t}invalidateAttachments(t){const{_context:e}=this;e.temporaryBindFramebuffer(this,()=>e.gl.invalidateFramebuffer(36160,t),!0)}copyToTexture(t,e,i,r,n,s,o){(t<0||e<0||n<0||s<0)&&console.error("Offsets cannot be negative!"),(i<=0||r<=0)&&console.error("Copy width and height must be greater than zero!");const a=o.descriptor;3553!==o.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(null==a?.width||null==a?.height||t+i>this.width||e+r>this.height||n+i>a.width||s+r>a.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const c=this._context,h=c.bindTexture(o,p.A.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(p.A.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,n,s,t,e,i,r),c.bindTexture(h,p.A.TEXTURE_UNIT_FOR_UPDATES)}readPixels(t,e,i,r,n,s,o){(i<=0||r<=0)&&console.error("Copy width and height must be greater than zero!"),o||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(t,e,i,r,n,s,o)}async readPixelsAsync(t,e,i,r,n,s,o,a){const{gl:c}=this._context,h=m.g.createPixelPack(this._context,35041,o.byteLength);this._context.bindBuffer(h);const l=this._context.boundFramebuffer;this._context.bindFramebuffer(this),c.readPixels(t,e,i,r,n,s,0),this._context.unbindBuffer(35051),this._context.bindFramebuffer(l);try{await h.getSubDataAsync(o,void 0,void 0,void 0,a)}finally{h.dispose()}}resize(t,e){if(this.width===t&&this.height===e)return;const i={width:t,height:e};if(T(i,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(t=>t.resize(i.width,i.height)),this._depthStencilTexture?.resize(i.width,i.height),this._glName&&(T(i,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(i.width,i.height),(0,d.en)())){const{gl:t}=this._context;t.checkFramebufferStatus(36160)!==t.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}}initializeAndBind(t=36160){const{gl:e}=this._context;this._glName?e.bindFramebuffer(t,this._glName):(this._glName&&e.deleteFramebuffer(this._glName),this._glName=e.createFramebuffer(),e.bindFramebuffer(t,this._glName),this._initializeAttachments(t))}_initializeAttachments(t=36160){const{gl:e}=this._context;if(this._colorAttachments.forEach((e,i)=>{if(x(e)){const r=S(e);35866===r?this._framebufferTextureLayer(e.glName,i,t):this._framebufferTexture2D(e.glName,i,r,t)}else if(w(e)){const r=this._context.gl;r.framebufferRenderbuffer(t,i,r.RENDERBUFFER,e.glName)}}),this._depthStencilBuffer){const i=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(t,i,e.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){const e=A(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,e,S(this._depthStencilTexture),t)}(0,d.en)()&&e.checkFramebufferStatus(t)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}_framebufferTexture2D(t,e=36064,i=3553,r=36160){this._context.gl.framebufferTexture2D(r,e,i,t,this._level)}_framebufferTextureLayer(t,e=36064,i=36160,r=0){this._context.gl.framebufferTextureLayer(i,e,t,this._level,r)}_disposeDepthStencilAttachments(){const t=this._context.gl;if(this._depthStencilBuffer){if(this._glName){this._context.bindFramebuffer(this);const e=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(36160,e,t.RENDERBUFFER,null)}this._depthStencilBuffer=(0,g.WD)(this._depthStencilBuffer)}this._depthStencilTexture&&(this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,A(this._depthStencilTexture.descriptor.pixelFormat))),this._depthStencilTexture=(0,g.WD)(this._depthStencilTexture))}_validateTextureDescriptor(t){3553!==t.target&&34067!==t.target&&35866!==t.target&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),T(t,this._context.parameters.maxTextureSize),this._validateBufferDimensions(t)}_validateRenderbufferDescriptor(t){T(t,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(t)}_validateBufferDimensions(t){t.width<=0&&(t.width=this.width),t.height<=0&&(t.height=this.height),this.width>0&&this.height>0&&(this.width===t.width&&this.height===t.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(t){switch(t.internalFormat){case f.SB.DEPTH_COMPONENT16:case f.SB.DEPTH_COMPONENT24:case f.SB.DEPTH_COMPONENT32F:return 36096;case f.iE.DEPTH24_STENCIL8:case f.iE.DEPTH32F_STENCIL8:return 33306;case 36168:return 36128;default:return 36064}}_validateColorAttachmentPoint(t){if(-1===b._MAX_COLOR_ATTACHMENTS){const{gl:t}=this._context;b._MAX_COLOR_ATTACHMENTS=t.getParameter(t.MAX_COLOR_ATTACHMENTS)}const e=t-36064;e+1>b._MAX_COLOR_ATTACHMENTS&&u.A.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${e+1}. Implementation supports up to ${b._MAX_COLOR_ATTACHMENTS} color attachments`)}}function x(t){return 1===M(t)}function w(t){return 2===M(t)}function C(t){return 0===M(t)}function M(t){return null!=t&&"type"in t?t.type:null}function T(t,e){const i=Math.max(t.width,t.height);if(i>e){u.A.getLogger("esri.views.webgl.FramebufferObject").warnOnce(`Resizing FBO attachment size ${t.width}x${t.height} to device limit ${e}`);const r=e/i;return t.width=Math.round(t.width*r),t.height=Math.round(t.height*r),!1}return!0}function S(t){return 34067===t.descriptor.target?34069:35866===t.descriptor.target?35866:3553}function A(t){return 6402===t?36096:33306}i(67171),i(79785);var E=i(85079);const O=[new(i(74038)._)("position",2,f.pe.UNSIGNED_SHORT,0,4)];(0,E.Xk)(O),i(66289);const R=new Image;R.src="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='5' height='5' version='1.1' viewBox='0 0 5 5' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='5' height='5' fill='%23f00' fill-opacity='.5'/%3E%3C/svg%3E%0A",R.width=5,R.height=5,R.decode();let P=class extends n.A{constructor(t){super(t),this.view=null,this.consumes={required:[]},this.produces=h.gP.COMPOSITE,this._dirty=!0}initialize(){this.addHandles([(0,o.wB)(()=>this.view.ready,t=>{t&&this.view.stage?.renderer.addRenderNode(this)},o.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new s.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const t=this._frameBuffer?.getTexture()?.descriptor,e=this.view.stage.renderer.fboCache.acquire(t?.width??640,t?.height??480,this.produces);return this._bind(e),e}bindRenderTarget(){return this._bind(this._frameBuffer),this._frameBuffer}_bind({fbo:t}){var e;t.initializeAndBind(),this.gl.drawBuffers((e=t)?e.colorAttachments.length>0?e.colorAttachments:[0]:[1029])}requestRender(t){switch(t){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(t);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(t){return!!this._dirty&&(this._dirty=!1,!0)}doRender(t){this._frameBuffer=t.find(({name:t})=>t===this.produces);try{return this.render(t)}finally{this._frameBuffer=null}}get requireGeometryDepth(){return!1}queryDepthRange(t){return null}get input(){return this._frameBuffer}};(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],P.prototype,"view",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],P.prototype,"consumes",void 0),(0,r.Cg)([(0,a.MZ)()],P.prototype,"produces",void 0),(0,r.Cg)([(0,a.MZ)({readOnly:!0})],P.prototype,"techniques",null),P=(0,r.Cg)([(0,c.$)("esri.views.3d.webgl.RenderNode")],P);const D=P},37957(t,e,i){const r={create:()=>[0,0,0,0,0,0,0,0,0],copy(t,e){t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8]}};i.d(e,["P",0,r])},48852(t,e,i){i.d(e,{g:()=>f});var r=i(4576),n=i(44208),s=i(53966),o=i(17676),a=i(78659),c=i(34275),h=i(94656),l=i(63907);const u=()=>s.A.getLogger("esri.views.webgl.BufferObject"),d=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements");class f{static createIndex(t,e,i){return new f(t,34963,e,i)}static createUniform(t,e,i){return new f(t,35345,e,i)}static createPixelPack(t,e=35041,i){const r=new f(t,35051,e);return i&&r.setSize(i),r}static createPixelUnpack(t,e=35040,i){return new f(t,35052,e,i)}static createTransformFeedback(t,e=35044,i){const r=new f(t,35982,e);return r.setSize(i),r}constructor(t,e,i,r){this._context=t,this.bufferType=e,this.usage=i,this._glName=null,this._sizeBytes=-1,this._indexType=void 0,t.instanceCounter.increment(l.vt.BufferObject,this),this._glName=this._context.gl.createBuffer(),(0,h.Y2)(this._context.gl),r&&this.setData(r)}get glName(){return this._glName}get size(){if(34963===this.bufferType)switch(this._indexType){case l.pe.UNSIGNED_INT:return this._sizeBytes/4;case l.pe.UNSIGNED_SHORT:return this._sizeBytes/2;case l.pe.UNSIGNED_BYTE:case void 0:case null:break;default:this._indexType}return this._sizeBytes}get indexType(){return this._indexType}get sizeBytes(){return this._sizeBytes}get usedMemory(){return d?0:this.sizeBytes}get _isVAOAware(){return 34963===this.bufferType||34962===this.bufferType}dispose(){this._context?.gl?(this._glName&&(this._context.gl.deleteBuffer(this._glName),this._glName=null),this._context.instanceCounter.decrement(l.vt.BufferObject,this),this._context=null):this._glName&&u().warn("Leaked WebGL buffer object")}setSize(t,e=null){if(34963===this.bufferType&&null!=e)switch(this._indexType=e,e){case l.pe.UNSIGNED_SHORT:t*=2;break;case l.pe.UNSIGNED_INT:t*=4;case l.pe.UNSIGNED_BYTE:}this._setBufferData(t)}setData(t){if(!t)return;const e=t.byteLength;34963===this.bufferType&&((0,c.mg)(t)?this._indexType=l.pe.UNSIGNED_BYTE:(0,c.jq)(t)?this._indexType=l.pe.UNSIGNED_SHORT:(0,c.XJ)(t)&&(this._indexType=l.pe.UNSIGNED_INT)),this._setBufferData(e,t)}setIndexType(t){34963===this.bufferType&&(this._indexType=t)}_setBufferData(t,e=null){this._sizeBytes=t;const i=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const r=this._context.gl;null!=e?r.bufferData(this.bufferType,e,this.usage):r.bufferData(this.bufferType,t,this.usage),(0,h.Y2)(r),this._isVAOAware&&this._context.bindVAO(i)}setSubData(t,e,i,r){if(!t)return;const n=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const{gl:s}=this._context;s.bufferSubData(this.bufferType,e*t.BYTES_PER_ELEMENT,t,i,r-i),(0,h.Y2)(s),this._isVAOAware&&this._context.bindVAO(n)}getSubData(t,e=0,i,n){if(i<0||n<0)return;const s=function(t){return(0,r.Xj)(t)}(t)?t.BYTES_PER_ELEMENT:1;if(s*((i??0)+(n??0))>t.byteLength)return;e+s*(n??0)>this.usedMemory&&u().warn("Potential problem getting subdata: requested data exceeds buffer size!");const o=this._context.gl;35982===this.bufferType?(this._context.bindBuffer(this,35982),o.getBufferSubData(35982,e,t,i,n),this._context.unbindBuffer(35982)):(this._context.bindBuffer(this,36662),o.getBufferSubData(36662,e,t,i,n),this._context.unbindBuffer(36662))}async getSubDataAsync(t,e=0,i,r,n){if(await this._context.clientWaitAsync((0,a.l5)(10),n),!this._context||!this._glName)throw(0,o.NK)();this.getSubData(t,e,i,r)}}},14113(t,e,i){i.d(e,{Cy:()=>u,N5:()=>a});var r=i(49186),n=(i(44208),i(53966));const s=()=>n.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class o{constructor(){this._includedModules=new Map}include(t,e){this._includedModules.has(t)?this._includedModules.get(t):(this._includedModules.set(t,e),t(this.builder,e))}}class a extends o{constructor(){super(...arguments),this.vertex=new d,this.fragment=new d,this.attributes=new f,this.varyings=new p,this.outputs=new g}get attributeNames(){return this.attributes.names}get builder(){return this}generate(t,e=!1){const i=this.attributes.generateSource(t),r=this.varyings.generateSource(t),n="vertex"===t?this.vertex:this.fragment,s=n.uniforms.generateSource(),o=n.code.generateSource(),a=n.main.generateSource(e),c=this.debugName?`// ${this.debugName}\n`:"",h="vertex"===t?v:_,l=n.constants.generateSource(),u=this.outputs.generateSource(t);return`#version 300 es\n${c}\n${h}\n${l.join("\n")}\n${s.join("\n")}\n${i.join("\n")}\n${r.join("\n")}\n${u.join("\n")}\n${o.join("\n")}\n${a.join("\n")}`}generateBind(t){const e=new Map;this.vertex.uniforms.entries.forEach(t=>{const i=t.bind[0];i&&e.set(t.name,i)}),this.fragment.uniforms.entries.forEach(t=>{const i=t.bind[0];i&&e.set(t.name,i)});const i=Array.from(e.values()),r=i.length;return e=>{for(let n=0;n<r;++n)i[n](t,e)}}generateBindPass(t){const e=new Map;this.vertex.uniforms.entries.forEach(t=>{const i=t.bind[1];i&&e.set(t.name,i)}),this.fragment.uniforms.entries.forEach(t=>{const i=t.bind[1];i&&e.set(t.name,i)});const i=Array.from(e.values()),r=i.length;return(e,n)=>{for(let s=0;s<r;++s)i[s](t,n,e)}}generateBindDraw(t){const e=new Map;this.vertex.uniforms.entries.forEach(t=>{const i=t.bind[2];i&&e.set(t.name,i)}),this.fragment.uniforms.entries.forEach(t=>{const i=t.bind[2];i&&e.set(t.name,i)});const i=Array.from(e.values()),r=i.length;return(e,n,s)=>{for(let o=0;o<r;++o)i[o](t,s,e,n)}}}class c{constructor(t){this._stage=t,this._entries=new Map}add(...t){for(const e of t)this._add(e);return this._stage}get(t){return this._entries.get(t)}_add(t){if(null!=t){if(this._entries.has(t.name)&&!this._entries.get(t.name).equals(t))throw new r.A("shaderbuilder:duplicate-uniform",`Duplicate uniform name ${t.name} for different uniform type`);this._entries.set(t.name,t)}else s().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map(({name:t,arraySize:e,type:i})=>null!=e?`uniform ${i} ${t}[${e}];`:`uniform ${i} ${t};`)}get entries(){return Array.from(this._entries.values())}}class h{constructor(){this._entries=new Map}add(t,e){if(this._entries.has(t))throw new r.A("shaderbuilder:duplicate-input",`Duplicate input for ${t}`);this._entries.set(t,e)}get(t){const e=this._entries.get(t);if(null==e)throw new r.A("shaderbuilder:input-resolver-error",`No resolver for input ${t} found.`);return e()}}class l{constructor(t){this._stage=t,this._bodies=new Array}add(t){return this._bodies.push(t),this._stage}generateSource(t){if(this._bodies.length>0){const t=[];for(const e of this._bodies)"string"==typeof e?t.push(e):t.push(...e());return[`void main() {\n ${t.join("\n")||""} \n}`]}if(t)throw new r.A("shaderbuilder:missing-main","Shader does not contain main function body.");return[]}}class u{constructor(t){this._stage=t,this._entries=new Array}add(t){return this._entries.push(t),this._stage}generateSource(){const t=[];for(const e of this._entries)"string"==typeof e?t.push(e):t.push(...e());return t}}class d extends o{constructor(){super(...arguments),this.uniforms=new c(this),this.main=new l(this),this.code=new u(this),this.constants=new m(this),this.inputs=new h}get builder(){return this}}class f{constructor(){this._entries=new Array}add(t,e){this._entries.push([t,e])}generateSource(t){return"fragment"===t?[]:this._entries.map(t=>`in ${t[1]} ${t[0]};`)}get names(){return this._entries.map(([t])=>t)}}class p{constructor(){this._entries=new Map}add(t,e,i){this._entries.has(t)?s().warn(`Ignoring duplicate varying ${e} ${t}`):this._entries.set(t,{type:e,invariant:i?.invariant??!1})}generateSource(t){const e=new Array;return this._entries.forEach((i,r)=>e.push((i.invariant&&"vertex"===t?"invariant ":"")+("int"===i.type?"flat ":"")+("vertex"===t?"out":"in")+` ${i.type} ${r};`)),e}}class g{constructor(){this._entries=new Map}add(t,e,i=0){const r=this._entries.get(i);r?.name!==t||r?.type!==e?this._entries.set(i,{name:t,type:e}):s().warn(`Fragment shader output location ${i} occupied`)}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(t){if("vertex"===t)return[];0===this._entries.size&&this._entries.set(0,{name:g.DEFAULT_NAME,type:g.DEFAULT_TYPE});const e=new Array;return this._entries.forEach((t,i)=>e.push(`layout(location = ${i}) out ${t.type} ${t.name};`)),e}}class m{constructor(t){this._stage=t,this._entries=new Set}add(t,e,i){let r="ERROR_CONSTRUCTOR_STRING";switch(e){case"float":r=m._numberToFloatStr(i);break;case"int":r=m._numberToIntStr(i);break;case"uint":r=m._numberToUintStr(i);break;case"bool":r=i.toString();break;case"vec2":r=`vec2(${m._numberToFloatStr(i[0])}, ${m._numberToFloatStr(i[1])})`;break;case"vec3":r=`vec3(${m._numberToFloatStr(i[0])}, ${m._numberToFloatStr(i[1])}, ${m._numberToFloatStr(i[2])})`;break;case"vec4":r=`vec4(${m._numberToFloatStr(i[0])}, ${m._numberToFloatStr(i[1])}, ${m._numberToFloatStr(i[2])}, ${m._numberToFloatStr(i[3])})`;break;case"ivec2":r=`ivec2(${m._numberToIntStr(i[0])}, ${m._numberToIntStr(i[1])})`;break;case"ivec3":r=`ivec3(${m._numberToIntStr(i[0])}, ${m._numberToIntStr(i[1])}, ${m._numberToIntStr(i[2])})`;break;case"ivec4":r=`ivec4(${m._numberToIntStr(i[0])}, ${m._numberToIntStr(i[1])}, ${m._numberToIntStr(i[2])}, ${m._numberToIntStr(i[3])})`;break;case"uvec2":r=`uvec2(${m._numberToUintStr(i[0])}, ${m._numberToUintStr(i[1])})`;break;case"uvec3":r=`uvec3(${m._numberToUintStr(i[0])}, ${m._numberToUintStr(i[1])}, ${m._numberToUintStr(i[2])})`;break;case"uvec4":r=`uvec4(${m._numberToUintStr(i[0])}, ${m._numberToUintStr(i[1])}, ${m._numberToUintStr(i[2])}, ${m._numberToUintStr(i[3])})`;break;case"mat2":case"mat3":case"mat4":r=`${e}(${Array.prototype.map.call(i,t=>m._numberToFloatStr(t)).join(", ")})`}return this._entries.add(`const ${e} ${t} = ${r};`),this._stage}static _numberToIntStr(t){return t.toFixed(0)}static _numberToUintStr(t){return`${t.toFixed(0)}u`}static _numberToFloatStr(t){return Number.isInteger(t)?t.toFixed(1):t.toString()}generateSource(){return Array.from(this._entries)}}const _="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump usampler2D;\n precision mediump sampler2DArray;\n precision mediump sampler2DShadow;\n#endif",v="precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n\n\n invariant gl_Position;\n "},79785(t,e,i){i.d(e,{Z:()=>l});var r=i(21818),n=i(53966),s=i(97768),o=i(63907),a=i(42293),c=i(85079);const h=()=>n.A.getLogger("esri.views.webgl.VertexArrayObject");let l=class t{constructor(t,e,i,n,s){this._context=t,this._indexBuffer=i,this._buffers=e instanceof Map?e:new Map([["geometry",e]]),this._baseInstances=null==n?new Map:"number"==typeof n?new Map([["geometry",n]]):n,this.locations=s??(0,r.z)((0,c.Sk)(this._buffers))}get glName(){return this._glName}get context(){return this._context}get buffers(){return(0,r.z)(this._buffers)}buffer(t="geometry"){return this.buffers.get(t)}mutableBuffer(t="geometry"){return this._buffers.get(t)}get indexBuffer(){return this._indexBuffer}getByteLength(t){return this.buffer(t)?.sizeBytes??0}vertexCount(t){const e=this.buffer(t);return e?e.sizeBytes/e.layout[0].stride:0}get usedMemory(){return Array.from(this._buffers.values()).reduce((t,e)=>t+e.usedMemory,this._indexBuffer?.usedMemory??0+145*(this._buffers.size+(this._indexBuffer?1:0)))}dispose(){this._context?(this._buffers.forEach(t=>t.dispose()),this._buffers.clear(),this._indexBuffer=(0,s.WD)(this._indexBuffer),this.disposeVAOOnly()):(this._glName||this._buffers.size>0)&&h().warn("Leaked WebGL VAO")}disposeVAOOnly(){this._context?(this._context.getBoundVAO()===this&&this._context.bindVAO(null),this._glName&&(this._context.gl.deleteVertexArray(this._glName),this._glName=null,this._context.instanceCounter.decrement(o.vt.VertexArrayObject,this)),this._context=null):this._glName&&h().warn("Leaked WebGL VAO")}bind(t=this.locations){const e=this._context.gl;this._glName?e.bindVertexArray(this._glName):(this._context.instanceCounter.increment(o.vt.VertexArrayObject,this),this._glName=e.createVertexArray(),e.bindVertexArray(this._glName),this._bindLayout(t))}_bindLayout(t){const{_buffers:e,_indexBuffer:i}=this;if(e||h().error("Vertex buffer dictionary is empty!"),e.forEach((e,i)=>(0,a.yu)(this._context,t,e,this._baseInstances.get(i)??0)),null!=i){const t=this._context.gl;this._context.gl.bindBuffer(t.ELEMENT_ARRAY_BUFFER,i.glName)}}unbind(){this._context.gl.bindVertexArray(null)}shallowCloneWithBaseInstances(e){return new t(this._context,this._buffers,this._indexBuffer,e)}}},66289(t,e,i){i.d(e,{R:()=>n});var r=i(48852);class n extends r.g{constructor(t,e,i,r=35044){super(t,34962,r,i),this.layout=e}}},28449(t,e,i){function r(t,e){const i=t.length;for(let r=0;r<i;++r)s[0]=t[r],e[r]=s[0];return e}function n(t,e){const i=t.length;for(let r=0;r<i;++r)s[0]=t[r],s[1]=t[r]-s[0],e[r]=s[1];return e}i.d(e,{Zo:()=>r,jA:()=>n});const s=new Float32Array(2)},90644(t,e,i){function r(t,e,i=32774,r=[0,0,0,0]){return{srcRgb:t,srcAlpha:t,dstRgb:e,dstAlpha:e,opRgb:i,opAlpha:i,color:{r:r[0],g:r[1],b:r[2],a:r[3]}}}function n(t,e,i,r,n=32774,s=32774,o=[0,0,0,0]){return{srcRgb:t,srcAlpha:e,dstRgb:i,dstAlpha:r,opRgb:n,opAlpha:s,color:{r:o[0],g:o[1],b:o[2],a:o[3]}}}i.d(e,{Ey:()=>b,nk:()=>u,p3:()=>n}),i(4718);const s=r(0,771),o=(r(1,0),r(1,1),r(1,771)),a=n(770,1,771,771),c=n(0,0,768,0),h={face:1029,mode:2305},l={face:1028,mode:2305};function u(t,e,i){return{ref:t,readMask:e,stencilFront:i,stencilBack:i}}function d(t){return C.intern(t)}function f(t){return T.intern(t)}function p(t){return A.intern(t)}function g(t){return O.intern(t)}function m(t){return P.intern(t)}function _(t){return I.intern(t)}function v(t){return N.intern(t)}function y(t){return B.intern(t)}function b(t){return H.intern(t)}class x{constructor(t,e){this._makeKey=t,this._makeRef=e,this._interns=new Map}intern(t){if(!t)return null;const e=this._makeKey(t),i=this._interns;return i.has(e)||i.set(e,this._makeRef(t)),i.get(e)??null}}function w(t){return"["+t.join(",")+"]"}const C=new x(M,t=>({__tag:"Blending",...t}));function M(t){return t?w([t.srcRgb,t.srcAlpha,t.dstRgb,t.dstAlpha,t.opRgb,t.opAlpha,t.color.r,t.color.g,t.color.b,t.color.a]):null}const T=new x(S,t=>({__tag:"Culling",...t}));function S(t){return t?w([t.face,t.mode]):null}const A=new x(E,t=>({__tag:"PolygonOffset",...t}));function E(t){return t?w([t.factor,t.units]):null}const O=new x(R,t=>({__tag:"DepthTest",...t}));function R(t){return t?w([t.func]):null}const P=new x(D,t=>({__tag:"StencilTest",...t}));function D(t){return t?w([t.ref,t.readMask,t.stencilFront.compare,t.stencilFront.fail,t.stencilFront.zFail,t.stencilFront.zPass,t.stencilBack.compare,t.stencilBack.fail,t.stencilBack.zFail,t.stencilBack.zPass]):null}const I=new x(F,t=>({__tag:"DepthWrite",...t}));function F(t){return t?w([t.zNear,t.zFar]):null}const N=new x(L,t=>({__tag:"ColorWrite",...t}));function L(t){return t?w([t.r,t.g,t.b,t.a]):null}const B=new x(U,t=>({__tag:"StencilWrite",...t}));function U(t){return t?w([t.mask]):null}const H=new x(function(t){return t?w([M(t.blending),S(t.culling),E(t.polygonOffset),R(t.depthTest),D(t.stencilTest),F(t.depthWrite),L(t.colorWrite),U(t.stencilWrite)]):null},t=>({blending:d(t.blending),culling:f(t.culling),polygonOffset:p(t.polygonOffset),depthTest:g(t.depthTest),stencilTest:m(t.stencilTest),depthWrite:_(t.depthWrite),colorWrite:v(t.colorWrite),stencilWrite:y(t.stencilWrite)}));i.d(e,["RC",0,o,"T8",0,a,"Uy",0,{zNear:0,zFar:1},"Xt",0,t=>2===t?h:1===t?l:null,"iD",0,s,"kn",0,{r:!0,g:!0,b:!0,a:!0},"uR",0,c])},49788(t,e,i){const r=1/255.5,n=1-r;i.d(e,["Q",0,r,"v",0,n])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[926,3470],{92474(t,e,r){r.d(e,{Zm:()=>y});var s=r(5482),o=r(49186),i=r(97768),l=r(61893),a=r(17676),n=r(67076),u=r(10107),p=r(64108);const d="loaded",h=t=>{const e=t;let r=class extends e{constructor(...t){super(...t),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise(t=>{const e=this.load.bind(this);this.load=r=>{const s=new Promise((t,e)=>{const s=(0,a.NY)(r,e);this.destroyed&&e(new o.A("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(t,e).finally(()=>{s&&s.remove()})});if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const t=this._loadController=new AbortController;e({signal:t.signal}).catch(()=>{})}return t(),s}})),this.when(()=>{this._set("loadStatus",d),this._loadController=null},t=>{this.destroyed||(this._set("loadStatus","failed"),this._set("loadError",t),this._loadController=null)})}destroy(){this._loadController&&(this._loadController=(0,i.DC)(this._loadController),this._promiseProps.abort()),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===d}get loadWarnings(){return this._get("loadWarnings")}async load(t){return this}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new o.A("load:cancelled","Cancelled")),this._loadController?.abort(),this._promiseProps.abort()),this}};return(0,s.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"loaded",null),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"loadError",void 0),(0,s.Cg)([(0,u.MZ)({clonable:!1})],r.prototype,"loadStatus",void 0),(0,s.Cg)([(0,u.MZ)({type:[n.A],readOnly:!0})],r.prototype,"loadWarnings",null),r=(0,s.Cg)([(0,p.$)("esri.core.Loadable")],r),r},c=h(l.Z);function y(t){return!(!t||!t.load)}r.d(e,["WV",0,h,"x_",0,c])},61893(t,e,r){var s=r(5482),o=r(69622),i=r(36563),l=r(17676),a=r(64108);class n{constructor(){this._resolver=Promise.withResolvers(),this._status=0,this._resolvingPromises=[],this._resolver.promise.then(()=>{this._status=1,this._cleanUp()},()=>{this._status=2,this._cleanUp()}),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(t){this._resolvingPromises.push(t),this._tryResolve()}isResolved(){return 1===this._status}isRejected(){return 2===this._status}isFulfilled(){return 0!==this._status}abort(){this._resolver.reject((0,l.NK)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const t=Promise.withResolvers(),e=[...this._resolvingPromises,t.promise],r=this._allPromise=Promise.all(e);r.then(()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()},t=>{this.isFulfilled()||this._allPromise!==r||(0,l.zf)(t)||this._resolver.reject(t)}),t.resolve()}}const u=t=>{const e=t;let r=class extends e{constructor(...t){super(...t),this._promiseProps=new n,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(t,e){return this._promiseProps.promise.then(()=>this).then(t,e)}catch(t){return this.when(null,t)}addResolvingPromise(t){t&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in t?t.when():t)}addResolvingTask(t){t&&!this._promiseProps.isFulfilled()&&(this.addHandles((0,i.rE)(t)),this._promiseProps.addResolvingPromise(t.promise))}};return r=(0,s.Cg)([(0,a.$)("esri.core.Promise")],r),r},p=u(o.A);r.d(e,["Z",0,p,"g",0,u])},20655(t,e,r){r.d(e,{A:()=>b});var s=r(5482),o=r(92602),i=r(70333),l=r(11254),a=r(49186),n=r(44208),u=r(25482),p=r(92474),d=r(97768),h=r(17676),c=r(91429),y=r(56507),m=r(5443),g=r(73444);let C;var f=r(96360),v=r(16405),M=r(69622);let Z=class extends M.A{constructor(t){super(t),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,s.Cg)([(0,c.MZ)()],Z.prototype,"nextQueryParams",void 0),(0,s.Cg)([(0,c.MZ)()],Z.prototype,"queryParams",void 0),(0,s.Cg)([(0,c.MZ)()],Z.prototype,"results",void 0),(0,s.Cg)([(0,c.MZ)()],Z.prototype,"total",void 0),Z=(0,s.Cg)([(0,c.$K)("esri.portal.PortalQueryResult")],Z);var S,P=r(41318),w=r(926),_=r(36005);let O;const A={PortalGroup:()=>Promise.resolve({default:f.A}),PortalItem:()=>r.e(812).then(r.bind(r,80812)),PortalUser:()=>Promise.resolve({default:P.A})};let b=class extends((0,u.T)(p.x_)){static{S=this}static{this.AUTH_MODE_ANONYMOUS="anonymous"}static{this.AUTH_MODE_AUTO="auto"}static{this.AUTH_MODE_IMMEDIATE="immediate"}static{this.AUTH_MODE_NO_PROMPT="no-prompt"}constructor(t){super(t),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.g3DTilesGalleryGroupQuery=null,this.g3dTilesEnabled=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.default3DBasemapQuery=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.layoutGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.hasClassificationSchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.recycleBinEnabled=!1,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=o.A.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useDefault3dBasemap=!1,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(t){return"string"==typeof t?{url:t}:t}destroy(){G.unregister(this),this.defaultBasemap=(0,d.pR)(this.defaultBasemap),this.defaultDevBasemap=(0,d.pR)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,d.pR)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,d.xt)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(t){if(t)for(const e of t)o.A.request.trustedServers.includes(e)||o.A.request.trustedServers.push(e);return t}readDefaultBasemap(t){return this._readBasemap(t)}readDefaultDevBasemap(t){return this._readBasemap(t)}readDefaultVectorBasemap(t){return this._readBasemap(t)}get extraQuery(){const t=this.user?.orgId,e=!t||this.canSearchPublic;return this.id&&!e?`orgid:${this.id}`:null}get hasAPIKey(){return(0,w.Jn)(this.restUrl)}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get loaded(){return super.loaded}get restUrl(){let t=this.url;if(t){const e=t.indexOf("/sharing");t=e>0?t.slice(0,e):this.url.replace(/\/+$/,""),t+="/sharing/rest"}return t}get thumbnailUrl(){const t=this.restUrl,e=this.thumbnail;return t&&e?this._normalizeSSL(t+"/portals/self/resources/"+e):null}readUrlKey(t){return t?t.toLowerCase():t}readUser(t){let e=null;return t&&(e=P.A.fromJSON(t),e.portal=this),e}load(t){const e=Promise.all([r.e(812),r.e(3116)]).then(r.bind(r,83116)).then(({default:e})=>{(0,h.Te)(t),O=e}).then(()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,t)).then(t=>{if(!this.hasAPIKey&&i.id){const t=i.id;this.credential=t.findCredential(this.restUrl),this.credential||this.authMode!==S.AUTH_MODE_AUTO&&this.authMode!==S.AUTH_MODE_NO_PROMPT||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=t.on("credential-create",function(t){const e=i.id;return()=>{const r=t.deref();r&&e.findCredential(r.restUrl)&&r.signIn().catch(()=>{})}}(new WeakRef(this))),G.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=t,this.read(t)});return this.addResolvingPromise(e),Promise.resolve(this)}async createElevationLayers(){await this.load();const t=this._getHelperService("defaultElevationLayers"),e=(await Promise.all([r.e(8278),r.e(9953),r.e(812),r.e(2827),r.e(4198)]).then(r.bind(r,38732))).default;return t?t.map(t=>new e({id:t.id,url:t.url})):[]}async fetchBasemaps(t,e){const r=await this._fetchBasemaps(t,e);if(!0===e?.include3d&&!1!==this.use3dBasemaps){if(this.g3dTilesEnabled&&this.g3DTilesGalleryGroupQuery&&(0,n.A)("enable-feature:basemap-groundlayers")){const t=await this._fetchBasemaps3D(this.g3DTilesGalleryGroupQuery,e);r.unshift(...t)}const s=await this._fetchBasemaps3D(t,e);r.unshift(...s)}return r}async fetchDefault3DBasemap(t){if(!this.useDefault3dBasemap||!this.default3DBasemapQuery||"none"===this.default3DBasemapQuery)return null;const e=new v.A;e.query=this.default3DBasemapQuery,e.disableExtraQuery=!0;const r=(await this.queryItems(e,t)).results.find(t=>"Web Scene"===t.type);return r?new O({portalItem:r}):null}fetchCategorySchema(t){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",t).then(t=>t.categorySchema):(0,h.G4)(t)?Promise.reject((0,h.NK)()):Promise.resolve([])}async fetchClassificationSchema(t){return this.hasClassificationSchema?this.request(this.restUrl+"/portals/self/classification/classificationSchema",t).then(t=>t.classificationSchema):null}fetchFeaturedGroups(t){const e=this.featuredGroups,r=new v.A({num:100,sortField:"title"});if(e?.length){const s=[];for(const t of e)s.push(`(title:"${t.title}" AND owner:${t.owner})`);return r.query=s.join(" OR "),this.queryGroups(r,t).then(t=>t.results)}return(0,h.G4)(t)?Promise.reject((0,h.NK)()):Promise.resolve([])}fetchRegions(t){const e=this.user?.culture||this.culture||(0,g.JK)();return this.request(this.restUrl+"/portals/regions",{...t,query:{culture:e}})}fetchSettings(t){const e=this.user?.culture||this.culture||(0,g.JK)();return this.request(this.restUrl+"/portals/self/settings",{...t,query:{culture:e}})}static getDefault(){return C&&!C.destroyed||(C=new S),C}queryGroups(t,e){return this.queryPortal("/community/groups",t,"PortalGroup",e)}queryItems(t,e){return this.queryPortal("/search",t,"PortalItem",e)}queryUsers(t,e){return t.sortField||(t.sortField="username"),this.queryPortal("/community/users",t,"PortalUser",e)}fetchSelf(t=this.authMode,e=!1,r){const s=this.restUrl+"/portals/self",o={authMode:t,query:{culture:(0,g.JK)().toLowerCase()},withCredentials:!0,...r};return"auto"===o.authMode&&(o.authMode="no-prompt"),e&&(o.query.default=!0),this.request(s,o)}queryPortal(t,e,r,s){const o=(0,y.dp)(v.A,e),i=e=>this.request(this.restUrl+t,{...o.toRequestOptions(this),...s}).then(t=>{const r=o.clone();return r.start=t.nextStart,new Z({nextQueryParams:r,queryParams:o,total:t.total,results:S._resultsToTypedArray(e,{portal:this},t,s)})}).then(t=>Promise.all(t.results.map(e=>"function"==typeof e.when?e.when():t)).then(()=>t,e=>((0,h.QP)(e),t)));return r&&A[r]?A[r]().then(({default:t})=>((0,h.Te)(s),i(t))):i()}signIn(){if(this.hasAPIKey)return this.load().then(()=>{if(!this.user)throw new a.A("portal:not-authenticated","Unable to authenticate user. Portal.user is missing")});if(this.authMode===S.AUTH_MODE_ANONYMOUS||this.authMode===S.AUTH_MODE_NO_PROMPT&&!i.id)return Promise.reject(new a.A("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const t=t=>Promise.resolve().then(()=>"not-loaded"===this.loadStatus?(t||(this.authMode="immediate"),this.load().then(()=>null)):"loading"===this.loadStatus?this.load().then(()=>this.credential?null:(this.credential=t,this.fetchSelf("immediate"))):this.user&&this.credential===t?null:(this.credential=t,this.fetchSelf("immediate"))).then(t=>{t&&(this.sourceJSON=t,this.read(t))});return i.id?i.id.getCredential(this.restUrl,{prompt:this.authMode!==S.AUTH_MODE_NO_PROMPT}).then(e=>t(e)):t(this.credential)}normalizeUrl(t){const e=this.credential?.token;return this._normalizeSSL(e?t+(t.includes("?")?"&":"?")+"token="+e:t)}requestToTypedArray(t,e,r){return this.request(t,e).then(t=>{const e=S._resultsToTypedArray(r,{portal:this},t);return Promise.all(e.map(e=>"function"==typeof e.when?e.when():t)).then(()=>e,()=>e)})}request(t,e={}){const r={f:"json",...e.query},{authMode:s=(this.authMode===S.AUTH_MODE_ANONYMOUS||this.authMode===S.AUTH_MODE_NO_PROMPT?this.authMode:"auto"),body:o=null,cacheBust:i=!1,method:a="auto",responseType:n="json",signal:u}=e,p={authMode:s,body:o,cacheBust:i,method:a,query:r,responseType:n,timeout:0,signal:u};return e.withCredentials&&(p.withCredentials=!0),(0,l.A)(this._normalizeSSL(t),p).then(t=>t.data)}toJSON(){throw new a.A("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new S({sourceJSON:t})}_getHelperService(t){const e=this.helperServices?.[t];if(!e)throw new a.A("portal:service-not-found",`The \`helperServices\` do not include an entry named "${t}"`);return e}async _fetchBasemaps(t,e){const r=new v.A;r.query=t||((0,w.Dd)()?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const s=await this.queryGroups(r,e);if(!s.total)return[];const o=s.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=o.sortField||"name",r.sortOrder=o.sortOrder||"desc";const i=await o.queryItems(r,e);return i.total?i.results.filter(t=>"Web Map"===t.type).map(t=>new O({portalItem:t})):[]}async _fetchBasemaps3D(t,e){const r=t||this.basemapGalleryGroupQuery3D;if(!r)return[];if((0,w.Dd)())return[];const s=new v.A({query:r,disableExtraQuery:!0}),o=await this.queryGroups(s,e);if(!o.total)return[];const i=o.results[0];s.num=100,s.query='type:"Web Scene"',s.sortField=i.sortField||"name",s.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(s,e);return l.total?l.results.filter(t=>"Web Scene"===t.type).map(t=>new O({portalItem:t})):[]}_normalizeSSL(t){return t.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(t){if(t){const e=O.fromJSON(t);return e.portalItem={portal:this},e}return null}static _resultsToTypedArray(t,e,r,s){let o;if(r){const i=null!=s?s.signal:null;o=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(t||e)&&(o=o.map(r=>{const s=Object.assign(t?t.fromJSON(r):r,e);return"function"==typeof s.load&&s.load(i),s}))}else o=[];return o}};(0,s.Cg)([(0,c.MZ)()],b.prototype,"access",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"allSSL",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"authMode",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"authorizedCrossOriginDomains",void 0),(0,s.Cg)([(0,_.w)("authorizedCrossOriginDomains")],b.prototype,"readAuthorizedCrossOriginDomains",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"basemapGalleryGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"3DBasemapGalleryGroupQuery"}})],b.prototype,"basemapGalleryGroupQuery3D",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"g3DTilesGalleryGroupQuery"}})],b.prototype,"g3DTilesGalleryGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"g3dTilesEnabled"}})],b.prototype,"g3dTilesEnabled",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"bingKey",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canListApps",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canListData",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canListPreProvisionedItems",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canProvisionDirectPurchase",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canSearchPublic",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canShareBingPublic",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canSharePublic",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canSignInArcGIS",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canSignInIDP",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"colorSetsGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"commentsEnabled",void 0),(0,s.Cg)([(0,c.MZ)({type:Date})],b.prototype,"created",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"credential",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"culture",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"currentVersion",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"customBaseUrl",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"default3DBasemapQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"defaultBasemap",void 0),(0,s.Cg)([(0,_.w)("defaultBasemap")],b.prototype,"readDefaultBasemap",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"defaultDevBasemap",void 0),(0,s.Cg)([(0,_.w)("defaultDevBasemap")],b.prototype,"readDefaultDevBasemap",null),(0,s.Cg)([(0,c.MZ)({type:m.A})],b.prototype,"defaultExtent",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"defaultVectorBasemap",void 0),(0,s.Cg)([(0,_.w)("defaultVectorBasemap")],b.prototype,"readDefaultVectorBasemap",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"description",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"devBasemapGalleryGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"eueiEnabled",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"extraQuery",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"featuredGroups",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"featuredItemsGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"galleryTemplatesGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"layoutGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"livingAtlasGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"hasAPIKey",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"hasCategorySchema",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"hasClassificationSchema",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"helpBase",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"helperServices",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"helpMap",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"homePageFeaturedContent",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"homePageFeaturedContentCount",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"httpPort",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"httpsPort",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"id",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"ipCntryCode",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"isOrganization",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"isPortal",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"isReadOnly",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"itemPageUrl",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"layerTemplatesGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"maxTokenExpirationMinutes",void 0),(0,s.Cg)([(0,c.MZ)({type:Date})],b.prototype,"modified",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"name",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"portalHostname",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"portalMode",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"portalProperties",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"region",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"recycleBinEnabled",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"restUrl",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"rotatorPanels",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"showHomePageDescription",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"staticImagesUrl",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"2DStylesGroupQuery"}})],b.prototype,"stylesGroupQuery2d",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"stylesGroupQuery"}})],b.prototype,"stylesGroupQuery3d",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"supportsHostedServices",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"symbolSetsGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"templatesGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"thumbnail",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"thumbnailUrl",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"units",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"url",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"urlKey",void 0),(0,s.Cg)([(0,_.w)("urlKey")],b.prototype,"readUrlKey",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"user",void 0),(0,s.Cg)([(0,_.w)("user")],b.prototype,"readUser",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"use3dBasemaps",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"useDefault3dBasemap",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"useStandardizedQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"useVectorBasemaps",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"vectorBasemapGalleryGroupQuery",void 0),b=S=(0,s.Cg)([(0,c.$K)("esri.portal.Portal")],b);const G=new FinalizationRegistry(t=>{t.remove()})},96360(t,e,r){r.d(e,{A:()=>p});var s,o=r(5482),i=r(49186),l=r(25482),a=r(91429),n=r(56507),u=r(16405);let p=s=class extends l.o{constructor(t){super(t),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.sourceJSON=null,this.tags=null,this.title=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e&&this.portal?this.portal?.normalizeUrl(`${t}/info/${e}?f=json`):null}get url(){const t=this.portal?.restUrl;return t?t+"/community/groups/"+this.id:null}fetchCategorySchema(t){return this.portal.request(this.url+"/categorySchema",t).then(e=>{const r=e.categorySchema||[];return r.some(t=>"contentCategorySetsGroupQuery.LivingAtlas"===t.source)?this._fetchCategorySchemaSet("LivingAtlas",t):r})}fetchMembers(t){return this.portal.request(this.url+"/users",t)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}toJSON(){throw new i.A("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new s({sourceJSON:t});return e.read(t),e}queryItems(t,e){let r=(0,n.dp)(u.A,t);const s=this.portal;return parseFloat(s.currentVersion)>5?(r=r||new u.A,s.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",e)):(r=r?r.clone():new u.A,r.query="group:"+this.id+(r.query?" "+r.query:""),s.queryItems(r,e))}_fetchCategorySchemaSet(t,e){const r=this.portal;return r.fetchSelf(r.authMode,!0,e).then(t=>{const s=t.contentCategorySetsGroupQuery;if(s){const t=new u.A({disableExtraQuery:!0,num:1,query:s});return r.queryGroups(t,e)}throw new i.A("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")}).then(r=>{if(r.total){const s=r.results[0],o=new u.A({num:1,query:`typekeywords:"${t}"`});return s.queryItems(o,e)}throw new i.A("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")}).then(t=>t.total?t.results[0].fetchData("json",e).then(t=>{const e=t?.categorySchema;return e?.length?e:[]}):[])}};(0,o.Cg)([(0,a.MZ)()],p.prototype,"access",void 0),(0,o.Cg)([(0,a.MZ)({type:Date})],p.prototype,"created",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"description",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"id",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"isInvitationOnly",void 0),(0,o.Cg)([(0,a.MZ)({type:Date})],p.prototype,"modified",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"owner",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"portal",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"snippet",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"sortField",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"sortOrder",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"sourceJSON",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"tags",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"thumbnail",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],p.prototype,"thumbnailUrl",null),(0,o.Cg)([(0,a.MZ)()],p.prototype,"title",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],p.prototype,"url",null),p=s=(0,o.Cg)([(0,a.$K)("esri.portal.PortalGroup")],p)},16405(t,e,r){r.d(e,{A:()=>c});var s,o=r(5482),i=r(69622),l=r(66552),a=r(4718),n=r(91429),u=r(5443),p=r(16930),d=r(28735);const h=new l.J({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let c=s=class extends i.A{constructor(t){super(t),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(t){"asc"!==t&&"desc"!==t||this._set("sortOrder",t)}clone(){return new s({categories:this.categories?(0,a.o8)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(t,e){let r=[];this.categories&&(r=this.categories.map(t=>Array.isArray(t)?JSON.stringify(t):t));let s="";if(this.extent){const t=(0,d.Cv)(this.extent,p.A.WGS84);null!=t&&(s=`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`)}let o=this.query;const i=t.extraQuery;!this.disableExtraQuery&&i&&(o=o?"("+o+") AND "+i:i);const l={categories:r,bbox:s,q:o,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(l.sortField=this.sortField.split(",").map(t=>h.toJSON(t.trim())).join(","),l.sortOrder=this.sortOrder),{query:{...e,...l}}}};(0,o.Cg)([(0,n.MZ)()],c.prototype,"categories",void 0),(0,o.Cg)([(0,n.MZ)()],c.prototype,"disableExtraQuery",void 0),(0,o.Cg)([(0,n.MZ)({type:u.A})],c.prototype,"extent",void 0),(0,o.Cg)([(0,n.MZ)()],c.prototype,"filter",void 0),(0,o.Cg)([(0,n.MZ)()],c.prototype,"num",void 0),(0,o.Cg)([(0,n.MZ)()],c.prototype,"query",void 0),(0,o.Cg)([(0,n.MZ)()],c.prototype,"sortField",void 0),(0,o.Cg)([(0,n.MZ)()],c.prototype,"sortOrder",null),(0,o.Cg)([(0,n.MZ)()],c.prototype,"start",void 0),c=s=(0,o.Cg)([(0,n.$K)("esri.portal.PortalQueryParams")],c)},41318(t,e,r){r.d(e,{A:()=>p});var s=r(5482),o=r(49186),i=r(25482),l=r(91429);let a=class extends i.o{constructor(t){super(t),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const t=this.portal?.restUrl;return t?`${t}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new o.A("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,s.Cg)([(0,l.MZ)({type:Date})],a.prototype,"created",void 0),(0,s.Cg)([(0,l.MZ)()],a.prototype,"id",void 0),(0,s.Cg)([(0,l.MZ)()],a.prototype,"portal",void 0),(0,s.Cg)([(0,l.MZ)()],a.prototype,"title",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],a.prototype,"url",null),(0,s.Cg)([(0,l.MZ)()],a.prototype,"username",void 0),a=(0,s.Cg)([(0,l.$K)("esri.portal.PortalFolder")],a);var n,u=r(96360);let p=n=class extends i.o{constructor(t){super(t),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.id=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userLicenseTypeId=null,this.userType=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal.normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.portal?.restUrl;return t?`${t}/content/users/${this.id}`:null}get url(){const t=this.portal?.restUrl;return t?`${t}/community/users/${this.id}`:null}addItem(t){const e=t&&t.item,r=t?.data,s=t?.folder,o={method:"post"};e&&(o.query=e.createPostQuery(),null!=r&&("string"==typeof r?o.query.text=r:"object"==typeof r&&(o.query.text=JSON.stringify(r))));let i=this.userContentUrl;return s&&(i+="/"+("string"==typeof s?s:s.id)),this.portal.request(i+"/addItem",o).then(t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load()))}async deleteItem(t,e=!1){let r=this.userContentUrl;t.ownerFolder&&(r+="/"+t.ownerFolder);const s=e?{permanentDelete:!0}:{};await this.portal.request(r+`/items/${t.id}/delete`,{method:"post",query:s}),t.id=null,t.portal=null}async deleteItems(t,e=!1){t=t.slice();const r=this.userContentUrl+"/deleteItems",s=[],i=t.map(t=>t.id);if(i.length){const l={method:"post",query:{items:i.join(","),permanentDelete:e}},a=await this.portal.request(r,l);for(const e of a.results){const r=t.find(t=>e.itemId===t.id),i=e.success;let l=null;i?(r.id=null,r.portal=null):e.error&&(l=new o.A("portal:delete-item-failed",e.error.message,e.error)),s.push({item:r,success:i,error:l})}}return s}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then(t=>{let e;return e=t&&t.folders?t.folders.map(t=>{const e=a.fromJSON(t);return e.portal=this.portal,e}):[],e})}fetchGroups(){return this.portal.request(this.url??"").then(t=>{let e;return e=t&&t.groups?t.groups.map(t=>{const e=u.A.fromJSON(t);return e.portal=this.portal,e}):[],e})}async fetchItems(t){t??={};let e=this.userContentUrl??"";t.folder&&(e+="/"+t.folder.id);const{default:s}=await r.e(812).then(r.bind(r,80812)),o={folders:!1,inRecycleBin:!!t.inRecycleBin||null,foldersContent:!(t.folder||!t.includeSubfolderItems)||null,num:t.num||10,start:t.start||1,sortField:t.sortField||"created",sortOrder:t.sortOrder||"asc"},i=await this.portal.request(e,{query:o});let l;return i?.items?(l=i.items.map(t=>{const e=s.fromJSON(t);return e.portal=this.portal,e}),await Promise.all(l.map(t=>t.load())),{items:l,nextStart:i.nextStart,total:i.total}):{items:[],nextStart:-1,total:0}}fetchTags(){return this.portal.request(this.url+"/tags").then(t=>t.tags)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new u.A({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new o.A("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}async restoreItem(t,e){const r=this.userContentUrl,s=e?{folderID:"string"==typeof e?e:e.id}:null;await this.portal.request(r+`/items/${t.id}/restore`,{method:"post",query:s})}toJSON(){throw new o.A("internal:not-yet-implemented","PortalUser.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new n({sourceJSON:t});return e.read(t),e}};(0,s.Cg)([(0,l.MZ)()],p.prototype,"access",void 0),(0,s.Cg)([(0,l.MZ)({type:Date})],p.prototype,"created",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"culture",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"description",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"email",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"favGroupId",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"fullName",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"id",void 0),(0,s.Cg)([(0,l.MZ)({type:Date})],p.prototype,"modified",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"orgId",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"portal",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"preferredView",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"privileges",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"region",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"role",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"roleId",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"thumbnail",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"thumbnailUrl",null),(0,s.Cg)([(0,l.MZ)()],p.prototype,"units",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"userContentUrl",null),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"url",null),(0,s.Cg)([(0,l.MZ)()],p.prototype,"username",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"userLicenseTypeId",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"userType",void 0),p=n=(0,s.Cg)([(0,l.$K)("esri.portal.PortalUser")],p)},926(t,e,r){r.d(e,{Dd:()=>h,Jn:()=>c,Qc:()=>y,getApiKey:()=>p,getSessionToken:()=>d});var s=r(92602),o=r(11254),i=r(84952);const l=/^https?:\/\/(i?basemaps|basemapstyles)-api\.arcgis\.com\//i,a=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]),n=new Map;let u=null;function p(t){if(!y(t))return null;const e=e=>e instanceof RegExp?e.test(t):"string"==typeof e&&t.startsWith(e),r=s.A.apiKeys;if(Array.isArray(r.scopes))for(const t of r.scopes)if(Array.isArray(t.urls)){if(t.urls.some(e))return t.token}else if(e(t.urls))return t.token;return r.basemapStyles&&l.test(t)?r.basemapStyles:s.A.apiKey&&/^https?:\/\/.+\.arcgis\.com(\/|$)/i.test(t)?s.A.apiKey:null}async function d(t){if(!s.A.sessions?.basemap?.enabled||!l.test(t))return null;const e=p(t);if(!e)return null;u&&await u;const{styleFamily:r="arcgis",autoRefresh:i,duration:a=43200}=s.A.sessions.basemap,d=`${e}:${r}`,h=n.get(d);if(h&&(!i||h.endTime>Date.now()))return h.sessionToken;let c;u=(0,o.A)("https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/sessions/start",{cacheBust:!0,query:{durationSeconds:a,styleFamily:r,token:e}});try{c=(await u).data,c.endTime-=5e3,n.set(d,c)}finally{u=null}return c.sessionToken}function h(){return null!=s.A.apiKey||null!=s.A.apiKeys.basemapStyles}function c(t,e){return e?y(t):null!=p(t)}function y(t){const e=(0,i.$z)(t,!0);return!!e&&!a.has(e)&&!t.endsWith("/sharing/rest/generateToken")}},94128(t,e,r){r.d(e,{D:()=>o});const s=Symbol("GraphicInstance");function o(t){return null!=t&&"object"==typeof t&&s in t}r.d(e,["Z",0,s])}}]);