@arcgis/core 4.32.0-next.20241021 → 4.32.0-next.20241023

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/applications/MapViewer/templateUtils.d.ts +4 -0
  2. package/applications/MapViewer/templateUtils.js +5 -0
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/0b7ee57bec7ffac312f2.js +1 -0
  5. package/assets/esri/core/workers/chunks/{1ba1d9c867ec6a492af9.js → 0f3912bca9fe25eea75c.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{842ebde78db9bfcaf07b.js → 1678d1d0ecb9b2af69a8.js} +1 -1
  7. package/assets/esri/core/workers/chunks/1d16ca7791f64dd7c7fb.js +1 -0
  8. package/assets/esri/core/workers/chunks/1d4be734ff961e313257.js +1 -0
  9. package/assets/esri/core/workers/chunks/{b292758308dfac4ba8ee.js → 2d8aa31dc96bbd014036.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{53f648321c5fde26bfe4.js → 319e06888467f9f460ab.js} +1 -1
  11. package/assets/esri/core/workers/chunks/33cae7ece52a77394b05.js +1 -0
  12. package/assets/esri/core/workers/chunks/{210a954f5299fe105e0b.js → 539060ffb7f230fb1bd0.js} +1 -1
  13. package/assets/esri/core/workers/chunks/545441dcc8e915e63ff1.js +1 -0
  14. package/assets/esri/core/workers/chunks/{303f39b9b7bd33109df8.js → 587df97288a83721d251.js} +1 -1
  15. package/assets/esri/core/workers/chunks/5caa02a7a85d05e253b4.js +1 -0
  16. package/assets/esri/core/workers/chunks/5cfecb320e1dcd258b2e.js +1 -0
  17. package/assets/esri/core/workers/chunks/67018ef25736f0722f6e.js +1 -0
  18. package/assets/esri/core/workers/chunks/89f74819ac1b5884c149.js +1 -0
  19. package/assets/esri/core/workers/chunks/92b2d81ef16877341f97.js +1 -0
  20. package/assets/esri/core/workers/chunks/{e6e77cbdeb99d90caad1.js → 97f62fad6d416a666319.js} +1 -1
  21. package/assets/esri/core/workers/chunks/98c1956b2e27058c8a51.js +1 -0
  22. package/assets/esri/core/workers/chunks/9c8a910b6261a4d5da77.js +1 -0
  23. package/assets/esri/core/workers/chunks/ab6eaa3ae2e233f91a5e.js +1 -0
  24. package/assets/esri/core/workers/chunks/{63719f892a7d1025c7d3.js → b42c1ab7579a3c464f72.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{03eba36affe6ed1f5a11.js → bc4ef18d0a02354186e3.js} +7 -7
  26. package/assets/esri/core/workers/chunks/{c71304c88fce556340ef.js → c859f73b57a764e99b02.js} +1 -1
  27. package/assets/esri/core/workers/chunks/cb3038ec3ef0d86bf2a0.js +1 -0
  28. package/assets/esri/core/workers/chunks/{ae20ca2008a2ea6a46b2.js → d8f4bd2b4366388f8a28.js} +1 -1
  29. package/assets/esri/core/workers/chunks/e71fa25ed45bae5a1adb.js +320 -0
  30. package/assets/esri/core/workers/chunks/{9c9a8a529494c6d1dfa3.js → ec9d5af8887854e821c8.js} +1 -1
  31. package/assets/esri/libs/parquet/pkg/arcgis_parquet_bg.wasm +0 -0
  32. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +14 -0
  33. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +1 -1
  34. package/assets/esri/themes/dark/main.css +1 -1
  35. package/assets/esri/themes/light/main.css +1 -1
  36. package/assets/esri/themes/light/view.css +1 -1
  37. package/chunks/Bufferer-BhkgvSV4.js +5 -0
  38. package/chunks/{Distance2DCalculator-DM4OojiI.js → Distance2DCalculator-BX0Ep7eP.js} +1 -1
  39. package/chunks/{GeodeticDistanceCalculator-DzvUOSaR.js → GeodeticDistanceCalculator-B5uO-Y_z.js} +1 -1
  40. package/chunks/OperatorCrosses.js +5 -0
  41. package/chunks/OperatorCut.js +1 -1
  42. package/chunks/OperatorGeodesicBuffer.js +1 -1
  43. package/chunks/OperatorGeodeticArea.js +1 -1
  44. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  45. package/chunks/OperatorGeodeticDistance.js +1 -1
  46. package/chunks/OperatorGeodeticLength.js +1 -1
  47. package/chunks/OperatorIntersects.js +5 -0
  48. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  49. package/chunks/OperatorOverlaps.js +5 -0
  50. package/chunks/OperatorProximity.js +1 -1
  51. package/chunks/OperatorProximityGeodesic.js +1 -1
  52. package/chunks/OperatorShapePreservingLength.js +1 -1
  53. package/chunks/OperatorTouches.js +5 -0
  54. package/chunks/OperatorWithin.js +5 -0
  55. package/chunks/QuadraticBezier.js +1 -1
  56. package/chunks/SSAOBlur.glsl.js +5 -5
  57. package/chunks/SideCalculator2D-CoWc8Oe3.js +1 -1
  58. package/chunks/Transformation2D.js +1 -1
  59. package/core/MemCache.js +1 -1
  60. package/core/MemCachePool.js +1 -1
  61. package/core/unitUtils.js +1 -1
  62. package/geometry/Mesh.js +1 -1
  63. package/geometry/operators/affineTransformOperator.js +1 -1
  64. package/geometry/operators/alphaShapeOperator.js +1 -1
  65. package/geometry/operators/areaOperator.js +1 -1
  66. package/geometry/operators/autoCompleteOperator.js +1 -1
  67. package/geometry/operators/boundaryOperator.js +1 -1
  68. package/geometry/operators/bufferOperator.js +1 -1
  69. package/geometry/operators/centroidOperator.js +1 -1
  70. package/geometry/operators/clipOperator.js +1 -1
  71. package/geometry/operators/containsOperator.js +1 -1
  72. package/geometry/operators/convexHullOperator.js +1 -1
  73. package/geometry/operators/crossesOperator.js +1 -1
  74. package/geometry/operators/cutOperator.js +1 -1
  75. package/geometry/operators/densifyOperator.js +1 -1
  76. package/geometry/operators/differenceOperator.js +1 -1
  77. package/geometry/operators/disjointOperator.js +1 -1
  78. package/geometry/operators/distanceOperator.js +1 -1
  79. package/geometry/operators/equalsOperator.js +1 -1
  80. package/geometry/operators/extendOperator.js +1 -1
  81. package/geometry/operators/generalizeOperator.js +1 -1
  82. package/geometry/operators/geodesicBufferOperator.js +1 -1
  83. package/geometry/operators/geodesicProximityOperator.js +1 -1
  84. package/geometry/operators/geodeticAreaOperator.js +1 -1
  85. package/geometry/operators/geodeticDensifyOperator.js +1 -1
  86. package/geometry/operators/geodeticDistanceOperator.js +1 -1
  87. package/geometry/operators/geodeticLengthOperator.js +1 -1
  88. package/geometry/operators/graphicBufferOperator.js +1 -1
  89. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  90. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  91. package/geometry/operators/gx/operatorBoundary.js +1 -1
  92. package/geometry/operators/gx/operatorBuffer.js +1 -1
  93. package/geometry/operators/gx/operatorConvexHull.js +1 -1
  94. package/geometry/operators/gx/operatorDifference.js +1 -1
  95. package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
  96. package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
  97. package/geometry/operators/gx/operatorGeodeticDensify.js +1 -1
  98. package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
  99. package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
  100. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  101. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  102. package/geometry/operators/gx/operatorIntersection.js +1 -1
  103. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  104. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  105. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  106. package/geometry/operators/gx/operatorOffset.js +1 -1
  107. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  108. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  109. package/geometry/operators/gx/operatorProject.js +1 -1
  110. package/geometry/operators/gx/operatorProximityGeodesic.js +1 -1
  111. package/geometry/operators/gx/operatorSimplify.js +1 -1
  112. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  113. package/geometry/operators/gx/operatorUnion.js +1 -1
  114. package/geometry/operators/integrateOperator.js +1 -1
  115. package/geometry/operators/intersectionOperator.js +1 -1
  116. package/geometry/operators/intersectsOperator.js +1 -1
  117. package/geometry/operators/isNearOperator.js +1 -1
  118. package/geometry/operators/json/containsOperator.js +5 -0
  119. package/geometry/operators/json/crossesOperator.js +5 -0
  120. package/geometry/operators/json/disjointOperator.js +5 -0
  121. package/geometry/operators/json/intersectsOperator.js +5 -0
  122. package/geometry/operators/json/offsetOperator.js +5 -0
  123. package/geometry/operators/json/overlapsOperator.js +5 -0
  124. package/geometry/operators/json/touchesOperator.js +5 -0
  125. package/geometry/operators/json/withinOperator.js +5 -0
  126. package/geometry/operators/labelPointOperator.js +1 -1
  127. package/geometry/operators/lengthOperator.js +1 -1
  128. package/geometry/operators/linesToPolygonsOperator.js +1 -1
  129. package/geometry/operators/locateBetweenOperator.js +1 -1
  130. package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
  131. package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
  132. package/geometry/operators/offsetOperator.js +1 -1
  133. package/geometry/operators/overlapsOperator.js +1 -1
  134. package/geometry/operators/polygonOverlayOperator.js +1 -1
  135. package/geometry/operators/polygonSlicerOperator.js +1 -1
  136. package/geometry/operators/projectOperator.js +1 -1
  137. package/geometry/operators/proximityOperator.js +1 -1
  138. package/geometry/operators/relateOperator.js +1 -1
  139. package/geometry/operators/reshapeOperator.js +1 -1
  140. package/geometry/operators/simplifyOperator.js +1 -1
  141. package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
  142. package/geometry/operators/support/apiConverter.js +5 -0
  143. package/geometry/operators/support/initNoPeFactory.js +5 -0
  144. package/geometry/operators/support/jsonConverter.js +5 -0
  145. package/geometry/operators/support/proximityResult.js +1 -1
  146. package/geometry/operators/symmetricDifferenceOperator.js +1 -1
  147. package/geometry/operators/touchesOperator.js +1 -1
  148. package/geometry/operators/unionOperator.js +1 -1
  149. package/geometry/operators/withinOperator.js +1 -1
  150. package/geometry/support/MeshVertexAttributes.js +1 -1
  151. package/interfaces.d.ts +134 -0
  152. package/layers/LinkChartLayer.js +1 -1
  153. package/layers/SceneLayer.js +1 -1
  154. package/layers/graphics/OptimizedGeometry.js +1 -1
  155. package/layers/graphics/sources/ParquetSource.js +1 -1
  156. package/layers/knowledgeGraph/supportUtils.js +1 -1
  157. package/layers/support/ElevationQueryTileCache.js +1 -1
  158. package/layers/support/ElevationTileData.js +1 -1
  159. package/layers/support/mediaUtils.js +1 -1
  160. package/layers/support/parquetLayerUtils.js +1 -1
  161. package/layers/support/rasterFunctions/ClipFunction.js +1 -1
  162. package/layers/support/rasterFunctions/clipUtils.js +1 -1
  163. package/layers/support/rasterFunctions/localUtils.js +1 -1
  164. package/libs/parquet/parquet.js +1 -1
  165. package/linkChart/LinkChartProperties.js +1 -1
  166. package/package.json +1 -1
  167. package/smartMapping/raster/renderers/classBreaks.js +1 -1
  168. package/smartMapping/raster/renderers/rgb.js +1 -1
  169. package/smartMapping/raster/renderers/stretch.js +1 -1
  170. package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
  171. package/smartMapping/raster/support/adapters/RasterLayerAdapter.js +1 -1
  172. package/smartMapping/renderers/support/rendererUtils.d.ts +4 -0
  173. package/support/revision.js +1 -1
  174. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  175. package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
  176. package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
  177. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  178. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  179. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  180. package/views/2d/grid/GridView2D.js +1 -1
  181. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  182. package/views/2d/layers/MediaLayerView2D.js +1 -1
  183. package/views/2d/layers/TileLayerView2D.js +1 -1
  184. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  185. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  186. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  187. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  188. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  189. package/views/3d/glTF/loader.js +1 -1
  190. package/views/3d/layers/I3SMeshView3D.js +1 -1
  191. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  192. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  193. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  194. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  195. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  196. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  197. package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
  198. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  199. package/views/3d/layers/i3s/CachedMeshData.js +5 -0
  200. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  201. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  202. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  203. package/views/3d/layers/support/FeatureTile.js +1 -1
  204. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  205. package/views/3d/state/ViewStateManager.js +1 -1
  206. package/views/3d/state/controllers/FovController.js +1 -1
  207. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  208. package/views/3d/terrain/Tile.js +1 -1
  209. package/views/3d/terrain/TileTexture.js +1 -1
  210. package/views/3d/webgl/ManagedFBO.js +1 -1
  211. package/views/3d/webgl/ManagedFBOAttachment.js +1 -1
  212. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  213. package/views/3d/webgl-engine/core/FBOPool.js +1 -1
  214. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +1 -1
  215. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  216. package/views/3d/webgl-engine/materials/ProceduralTextureRepository.js +1 -1
  217. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  218. package/views/3d/webgl-engine/shaders/SSAOBlur.glsl.js +1 -1
  219. package/views/input/BrowserEventSource.js +1 -1
  220. package/views/webgl/Texture.js +1 -1
  221. package/views/webgl/VertexArrayObject.js +1 -1
  222. package/webdoc/support/webdocSaveUtils.js +1 -1
  223. package/widgets/Attribution/AttributionViewModel.js +1 -1
  224. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  225. package/widgets/BatchAttributeForm/css.js +1 -1
  226. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  227. package/widgets/BatchAttributeForm.js +1 -1
  228. package/widgets/ElevationProfile/support/ElevationProfileView2D.js +1 -1
  229. package/widgets/ElevationProfile/support/ProfileLine2D.js +5 -0
  230. package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
  231. package/widgets/ElevationProfile/support/constants.js +1 -1
  232. package/widgets/ElevationProfile/support/visualizationUtils.js +5 -0
  233. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  234. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  235. package/widgets/FeatureTable/support/columnUtils.js +1 -1
  236. package/widgets/FeatureTable/support/tableUtils.js +1 -1
  237. package/widgets/FeatureTable/support/templateUtils.js +5 -0
  238. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  239. package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
  240. package/widgets/support/GridControls.js +1 -1
  241. package/assets/esri/core/workers/chunks/03d0394fff1463c224f9.js +0 -1
  242. package/assets/esri/core/workers/chunks/0c40cac18711f79f0a7d.js +0 -1
  243. package/assets/esri/core/workers/chunks/1a97f98facfc62a9fc69.js +0 -1
  244. package/assets/esri/core/workers/chunks/1e3ed3ee48c2977cff6f.js +0 -1
  245. package/assets/esri/core/workers/chunks/1fc064e37d030e449d5e.js +0 -1
  246. package/assets/esri/core/workers/chunks/4daab36de5efa03a8cbb.js +0 -1
  247. package/assets/esri/core/workers/chunks/77d129134c2a66cd86d8.js +0 -1
  248. package/assets/esri/core/workers/chunks/88bd9e023764da377aa7.js +0 -1
  249. package/assets/esri/core/workers/chunks/92ce57cb12d9a7a3699e.js +0 -1
  250. package/assets/esri/core/workers/chunks/a5675c989d00b7400f98.js +0 -1
  251. package/assets/esri/core/workers/chunks/c06c5c815b5e37717fa1.js +0 -1
  252. package/assets/esri/core/workers/chunks/ca1385e165aae8a32ca2.js +0 -1
  253. package/assets/esri/core/workers/chunks/ce8c1208916f54af7e68.js +0 -320
  254. package/assets/esri/core/workers/chunks/df51c93b2dbcc89efc23.js +0 -1
  255. package/assets/esri/core/workers/chunks/efa3c919261672871f2f.js +0 -1
  256. package/chunks/Bufferer-fr1_Nc47.js +0 -5
  257. package/geometry/operators/support/converterAPI.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[659],{3330:(e,t,r)=>{r.d(t,{GB:()=>n,Qo:()=>i,Y4:()=>s});var o=r(96285);class n{}function s(e){return e instanceof o.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function i(e){return s(e)?n.instance:e}n.instance=new o.oh("Etc/UTC")},4197:(e,t,r)=>{r.d(t,{jh:()=>n,l5:()=>i,xm:()=>s});var o=r(34275);function n(e,t=!1){return e<=o.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function s(e){return((0,o.cy)(e)?e.length:e.byteLength/8)<=o.y9?Array.from(e):new Float64Array(e)}function i(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}},70328:(e,t,r)=>{r.d(t,{BI:()=>I,Ej:()=>g,Ie:()=>M,Jt:()=>_,Ne:()=>w,RF:()=>p,_F:()=>y,aI:()=>x,fA:()=>i,gE:()=>a,gX:()=>m,hZ:()=>F,iT:()=>c,is:()=>T,qv:()=>b,vI:()=>v,vY:()=>l,v_:()=>S,vt:()=>s,w1:()=>u});var o=r(5443),n=(r(19419),r(4197));function s(e=S){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function i(e,t,r,o,n,i,l=s()){return l[0]=e,l[1]=t,l[2]=r,l[3]=o,l[4]=n,l[5]=i,l}function l(e,t=s()){return function(e,t,r,o=s()){return F(o,b),function(e,t,r=0,o=t.length/3){let n=e[0],s=e[1],i=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<o;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),i=Math.min(i,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=i,e[3]=l,e[4]=a,e[5]=u}(o,e,t,r),o}(e,0,e.length/3,t)}function a(e,t=(0,n.jh)(24)){const[r,o,s,i,l,a]=e;return t[0]=r,t[1]=o,t[2]=s,t[3]=r,t[4]=o,t[5]=a,t[6]=r,t[7]=l,t[8]=s,t[9]=r,t[10]=l,t[11]=a,t[12]=i,t[13]=o,t[14]=s,t[15]=i,t[16]=o,t[17]=a,t[18]=i,t[19]=l,t[20]=s,t[21]=i,t[22]=l,t[23]=a,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new o.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e){return e[0]>=e[3]?0:e[3]-e[0]}function h(e){return e[1]>=e[4]?0:e[4]-e[1]}function f(e){return e[2]>=e[5]?0:e[5]-e[2]}function y(e){const t=d(e),r=f(e),o=h(e);return Math.sqrt(t*t+r*r+o*o)}function m(e,t=[0,0,0]){return t[0]=e[0]+d(e)/2,t[1]=e[1]+h(e)/2,t[2]=e[2]+f(e)/2,t}function g(e,t=[0,0,0]){return t[0]=d(e),t[1]=h(e),t[2]=f(e),t}function w(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function v(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function F(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function M(e){return e?F(e,b):s(b)}function _(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function I(e,t,r,o,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=o,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function T(e){return 6===e.length}function x(e,t,r){if(null==e||null==t)return e===t;if(!T(e)||!T(t))return!1;if(r){for(let o=0;o<e.length;o++)if(!r(e[o],t[o]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const b=[1/0,1/0,1/0,-1/0,-1/0,-1/0],S=[0,0,0,0,0,0];s()},87152:(e,t,r)=>{r.r(t),r.d(t,{default:()=>B});var o=r(90237),n=(r(59456),r(13874)),s=(r(86162),r(94409),r(65345),r(42980),r(20917),r(92438),r(96576),r(93618),r(65494),r(15036)),i=r(92071),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608)),u=r(50498),p=r(4146),c=r(49186),d=r(92474),h=r(799),f=r(75321),y=r(4071),m=r(22671),g=r(16930);let w=class extends d.A{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:o},layer:{apiKey:n,customParameters:s,effectiveMaxRecordCount:i}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:i,queryParameters:{apiKey:n,customParameters:s},spatialReference:r,supportedCrs:o}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then((e=>m.A.fromJSON(e)))}queryFeaturesJSON(e,t={}){const r=this.getSource();return this.load(t).then((()=>(0,f.bW)(r,e,t)))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator&&!this.featureDefinition.supportedCrs[e.wkid])}_conformsToType(e,t){const r=new RegExp(`^${(0,h.Cj)(t)}$`,"i");return e.conformsTo.some((e=>r.test(e)))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:y.$,editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){const t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){const t=e.storageCrs??f.QE,r=(0,f.J0)(t);return null==r?g.A.WGS84:new g.A({wkid:r})}_getSupportedSpatialReferences(e,t){const r="#/crs",o=e.crs??[f.QE],n=o.includes(r)?o.filter((e=>e!==r)).concat(t.crs??[]):o,s=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return n.filter((e=>!s.test(e)))}async _loadOGCServices(e,t){const r=null!=t?t.signal:null,{apiKey:o,collectionId:n,customParameters:s,fields:i,geometryType:l,hasZ:a,objectIdField:p,timeInfo:d,url:y}=e,m={fields:i?.map((e=>e.toJSON())),geometryType:u.Y.toJSON(l),hasZ:a??!1,objectIdField:p,timeInfo:d?.toJSON()},g={apiKey:o,customParameters:s,signal:r},w=await(0,f.Ki)(y,g),[v,F]=await Promise.all([(0,f.Px)(w,g),(0,f.bV)(w,g)]);if(!this._conformsToType(v,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new c.A("ogc-feature-layer:no-geojson-support","Server does not support geojson");const M=F.collections.find((({id:e})=>e===n));if(!M)throw new c.A("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const _=this._conformsToType(v,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,f.GA)(w,g):null,I=await(0,f.GL)(M,m,g),T=this._getMaxRecordCount(_),x=this._getCapabilities(I.hasZ,T),b=this._getStorageSpatialReference(M).toJSON(),S=this._getSupportedSpatialReferences(M,F),Z=new RegExp(`^${(0,h.Cj)(f.vJ)}`,"i"),P={};for(const e of S){const t=(0,f.J0)(e);null!=t&&(P[t]||(P[t]=e.replace(Z,"")))}this.featureDefinition={capabilities:x,collection:M,layerDefinition:I,spatialReference:b,supportedCrs:P}}};(0,o._)([(0,l.MZ)()],w.prototype,"featureDefinition",void 0),(0,o._)([(0,l.MZ)({constructOnly:!0})],w.prototype,"layer",void 0),(0,o._)([(0,l.MZ)()],w.prototype,"type",void 0),w=(0,o._)([(0,a.$)("esri.layers.graphics.sources.OGCFeatureSource")],w);var v=r(52136),F=r(63074),M=r(69208),_=r(87718),I=r(76294),T=r(16131),x=r(32756),b=r(8303),S=r(54310),Z=r(25036),P=r(82935),A=r(10873),R=r(33143),N=r(20437),O=r(17036),E=r(30524),j=r(81457),G=r(39383),C=r(61956),q=r(30291),D=r(5443);const z=(0,O.p)();let L=class extends((0,v.p)((0,M.d)((0,I.J)((0,_.F)((0,F.dM)((0,x.f)((0,P.e)((0,Z.j)((0,T.q)((0,b.A)((0,S.J)((0,i.P)(p.A))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new w({layer:this}),this.spatialReference=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then((()=>this._fetchService(e)))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,E.yp)(e,this.fieldsIndex),this._set("renderer",e)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,q.tn)(this,e)}createQuery(){return new C.A}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,o=!1;const n=t?.feature?.attributes,s=this.typeIdField&&n?.[this.typeIdField];return null!=s&&this.types&&(o=this.types.some((t=>t.id==s&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0)))),o||r||(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(C.A.from(e)||this.createQuery(),t))).then((e=>(e?.features?.forEach((e=>{e.layer=e.sourceLayer=this})),e)))}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,E.yp)(this.renderer,this.fieldsIndex),(0,E.sv)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(const t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,o._)([(0,l.MZ)({readOnly:!0,json:{origins:{service:{read:!0}}}})],L.prototype,"capabilities",void 0),(0,o._)([(0,l.MZ)({type:String,json:{write:!0}})],L.prototype,"collectionId",void 0),(0,o._)([(0,l.MZ)({type:String})],L.prototype,"copyright",void 0),(0,o._)([(0,l.MZ)({readOnly:!0})],L.prototype,"defaultPopupTemplate",null),(0,o._)([(0,l.MZ)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],L.prototype,"description",void 0),(0,o._)([(0,l.MZ)({type:String})],L.prototype,"displayField",void 0),(0,o._)([(0,l.MZ)({type:Number})],L.prototype,"effectiveMaxRecordCount",null),(0,o._)([(0,l.MZ)(A.Yj)],L.prototype,"elevationInfo",void 0),(0,o._)([(0,l.MZ)({type:[N.A],json:{origins:{service:{name:"layerDefinition.fields"}}}})],L.prototype,"fields",void 0),(0,o._)([(0,l.MZ)(z.fieldsIndex)],L.prototype,"fieldsIndex",void 0),(0,o._)([(0,l.MZ)({readOnly:!0,type:D.A,json:{origins:{service:{name:"layerDefinition.extent"}}}})],L.prototype,"fullExtent",void 0),(0,o._)([(0,l.MZ)({type:u.g.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:u.g.read}}}}})],L.prototype,"geometryType",void 0),(0,o._)([(0,l.MZ)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],L.prototype,"hasZ",void 0),(0,o._)([(0,l.MZ)({type:Boolean,readOnly:!0})],L.prototype,"isTable",null),(0,o._)([(0,l.MZ)({type:[j.A],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:G.w},write:!0}}}})],L.prototype,"labelingInfo",void 0),(0,o._)([(0,l.MZ)(A.kF)],L.prototype,"labelsVisible",void 0),(0,o._)([(0,l.MZ)(A.fV)],L.prototype,"legendEnabled",void 0),(0,o._)([(0,l.MZ)({type:Number})],L.prototype,"maxRecordCount",void 0),(0,o._)([(0,l.MZ)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],L.prototype,"objectIdField",void 0),(0,o._)([(0,l.MZ)({type:["OGCFeatureLayer"]})],L.prototype,"operationalLayerType",void 0),(0,o._)([(0,l.MZ)(A.M6)],L.prototype,"popupEnabled",void 0),(0,o._)([(0,l.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],L.prototype,"popupTemplate",void 0),(0,o._)([(0,l.MZ)({types:s.H,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:s.X,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],L.prototype,"renderer",null),(0,o._)([(0,l.MZ)(A.PY)],L.prototype,"screenSizePerspectiveEnabled",void 0),(0,o._)([(0,l.MZ)({readOnly:!0})],L.prototype,"source",void 0),(0,o._)([(0,l.MZ)({readOnly:!0,type:g.A,json:{origins:{service:{read:!0}}}})],L.prototype,"spatialReference",void 0),(0,o._)([(0,l.MZ)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],L.prototype,"title",void 0),(0,o._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],L.prototype,"type",void 0),(0,o._)([(0,l.MZ)({type:String,readOnly:!0})],L.prototype,"typeIdField",void 0),(0,o._)([(0,l.MZ)({type:[R.A]})],L.prototype,"types",void 0),(0,o._)([(0,l.MZ)(A.OZ)],L.prototype,"url",void 0),L=(0,o._)([(0,a.$)("esri.layers.OGCFeatureLayer")],L);const B=L},43334:(e,t,r)=>{r.d(t,{N3:()=>s,Om:()=>n});var o=r(92722);class n{constructor(e=null,t={},r,o){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=o,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const r=e.geometry?o.A.fromJSON(e.geometry):null,s=e.centroid?o.A.fromJSON(e.centroid):null,i=e.attributes[t];return new n(r,e.attributes,s,i)}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new n(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function s(e){return!!e.geometry?.coords?.length}},58512:(e,t,r)=>{r.d(t,{A:()=>o});class o{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new o;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,r)=>{r.d(t,{A:()=>o});class o{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new o(e.lengths,e.coords)}static fromRect(e){const[t,r,n,s]=e,i=n-t,l=s-r;return new o([5],[t,r,i,0,0,l,-i,0,0,-l])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const o=this.lengths[r];for(let r=0;r<o;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=o}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let o=0;for(const e of r){for(let r=1;r<e;r++)t[2*(o+r)]+=t[2*(o+r)-2],t[2*(o+r)+1]+=t[2*(o+r)-1];o+=e}return e}clone(e){if(0===this.lengths.length)return new o([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),r=this.coords.slice(0,t);return e?(e.set(r),new o(this.lengths,e)):new o(Array.from(this.lengths),Array.from(r))}}},99352:(e,t,r)=>{r.d(t,{F:()=>o});const o={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},90708:(e,t,r)=>{r.d(t,{B2:()=>M,BW:()=>G,Ch:()=>oe,DF:()=>I,Di:()=>Q,E2:()=>B,IE:()=>F,Nl:()=>W,Q4:()=>ne,Rk:()=>ie,Ux:()=>U,Ye:()=>D,ZF:()=>H,eY:()=>K,jH:()=>V,jQ:()=>re,kz:()=>X,oN:()=>J,q3:()=>Y,qK:()=>E,qN:()=>O,z5:()=>q,zv:()=>$});var o=r(49186),n=r(53966),s=r(97768),i=r(70328),l=r(19419),a=r(65864),u=r(43334),p=r(58512),c=r(92722);function d(e,t){return e?t?4:3:t?3:2}const h=()=>n.A.getLogger("esri.layers.graphics.featureConversionUtils"),f={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0},y=(e,t,r,o,n,s)=>{e[r]=n,e[r+1]=s},m=(e,t,r,o,n,s)=>{e[r]=n,e[r+1]=s,e[r+2]=t[o+2]},g=(e,t,r,o,n,s)=>{e[r]=n,e[r+1]=s,e[r+2]=t[o+3]},w=(e,t,r,o,n,s)=>{e[r]=n,e[r+1]=s,e[r+2]=t[o+2],e[r+3]=t[o+3]};function v(e,t,r,o){if(e){if(r)return t&&o?w:m;if(t&&o)return g}else if(t&&o)return m;return y}function F({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function M({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function _({scale:e,translate:t},r,o){return r*e[o]+t[o]}function I(e,t,r){return e?t?r?A(e):b(e):r?Z(e):T(e):null}function T(e){const t=e.coords;return{x:t[0],y:t[1]}}function x(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function b(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function S(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function Z(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function P(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function A(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function R(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function N(e,t){return e&&t?R:e?S:t?P:x}function O(e,t,r=N(null!=t.z,null!=t.m)){return r(e,t)}function E(e,t,r){if(null==e)return null;const o=d(t,r),n=[];for(let t=0;t<e.coords.length;t+=o){const r=[];for(let n=0;n<o;n++)r.push(e.coords[t+n]);n.push(r)}return t?r?{points:n,hasZ:t,hasM:r}:{points:n,hasZ:t}:r?{points:n,hasM:r}:{points:n}}function j(e,t,r=d(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const o=e.coords;let n=0;for(const e of t.points)for(let t=0;t<r;t++)o[n++]=e[t];return e}function G(e,t,r){if(!e)return null;const o=d(t,r),{coords:n,lengths:s}=e,i=[];let l=0;for(const e of s){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<o;t++)e.push(n[l++]);t.push(e)}i.push(t)}return t?r?{paths:i,hasZ:t,hasM:r}:{paths:i,hasZ:t}:r?{paths:i,hasM:r}:{paths:i}}function C(e,t,r=d(t.hasZ,t.hasM)){const{lengths:o,coords:n}=e;let s=0;for(const e of t.paths){for(const t of e)for(let e=0;e<r;e++)n[s++]=t[e];o.push(e.length)}return e}function q(e,t,r){if(!e)return null;const o=d(t,r),{coords:n,lengths:s}=e,i=[];let l=0;for(const e of s){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<o;t++)e.push(n[l++]);t.push(e)}i.push(t)}return t?r?{rings:i,hasZ:t,hasM:r}:{rings:i,hasZ:t}:r?{rings:i,hasM:r}:{rings:i}}function D(e,t,r=t.hasZ,o=t.hasM){return function(e,t,r,o){const n=d(r,o),{lengths:s,coords:i}=e;let l=0;le(e);for(const e of t){for(const t of e)for(let e=0;e<n;e++)i[l++]=t[e];s.push(e.length)}return e}(e,t.rings,r,o)}const z=[],L=[];function B(e,t,r,o,n){z[0]=e;const[s]=Q(L,z,t,r,o,n);return ae(z),ae(L),s}function Q(e,t,r,n,s,i){if(ae(e),!r){for(const r of t){const t=i?r.attributes[i]:void 0;e.push(new u.Om(null,r.attributes,null,t))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,o,n){const s=N(r,o);for(const{geometry:r,attributes:o}of t){const t=null!=r?s(new c.A,r):null;e.push(new u.Om(t,o,null,n?o[n]:void 0))}return e}(e,t,n,s,i);case"esriGeometryMultipoint":return function(e,t,r,o,n){const s=d(r,o);for(const{geometry:r,attributes:o}of t){const t=null!=r?j(new c.A,r,s):null;e.push(new u.Om(t,o,null,n?o[n]:void 0))}return e}(e,t,n,s,i);case"esriGeometryPolyline":return function(e,t,r,o,n){const s=d(r,o);for(const{geometry:r,attributes:o,centroid:i}of t){const t=null!=r?C(new c.A,r,s):null,l=null!=i?O(new c.A,i):null;e.push(new u.Om(t,o,l,n?o[n]:void 0))}return e}(e,t,n,s,i);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(e,t,r,o,n){for(const{geometry:s,centroid:i,attributes:l}of t){const t=null!=s?D(new c.A,s,r,o):null,a=n?l[n]:void 0;null!=i?e.push(new u.Om(t,l,x(new c.A,i),a)):e.push(new u.Om(t,l,null,a))}return e}(e,t,n,s,i);default:h().error("convertToFeatureSet:unknown-geometry",new o.A(`Unable to parse unknown geometry type '${r}'`)),ae(e)}return e}function J(e,t,r,o){L[0]=e,k(z,L,t,r,o);const n=z[0];return ae(z),ae(L),n}function U(e,t,r){if(null==e)return null;const n=new c.A;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),(0,a.fT)(e)?N(null!=t?t:null!=e.z,null!=r?r:null!=e.m)(n,e):(0,a.Bi)(e)?D(n,e,t,r):(0,a.Rg)(e)?C(n,e,d(t,r)):(0,a.U9)(e)?j(n,e,d(t,r)):void h().error("convertFromGeometry:unknown-geometry",new o.A(`Unable to parse unknown geometry type '${e}'`))}function $(e,t,r,n){const s=e&&("coords"in e?e:e.geometry);if(null==s)return null;switch(t){case"esriGeometryPoint":{let e=T;return r&&n?e=A:r?e=b:n&&(e=Z),e(s)}case"esriGeometryMultipoint":return E(s,r,n);case"esriGeometryPolyline":return G(s,r,n);case"esriGeometryPolygon":return q(s,r,n);default:return h().error("convertToGeometry:unknown-geometry",new o.A(`Unable to parse unknown geometry type '${t}'`)),null}}function k(e,t,r,n,s){if(ae(e),null==r)return function(e,t){for(const r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,o){let n=T;r&&o?n=A:r?n=b:o&&(n=Z);for(const r of t){const{geometry:t,attributes:o}=r,s=null!=t?n(t):null;e.push({attributes:o,geometry:s})}return e}(e,t,n,s);case"esriGeometryMultipoint":return function(e,t,r,o){for(const{geometry:n,attributes:s}of t)e.push({attributes:s,geometry:null!=n?E(n,r,o):null});return e}(e,t,n,s);case"esriGeometryPolyline":return function(e,t,r,o){for(const{geometry:n,attributes:s}of t)e.push({attributes:s,geometry:null!=n?G(n,r,o):null});return e}(e,t,n,s);case"esriGeometryPolygon":return function(e,t,r,o){for(const{geometry:n,attributes:s,centroid:i}of t){const t=null!=n?q(n,r,o):null;if(null!=i){const r=T(i);e.push({attributes:s,centroid:r,geometry:t})}else e.push({attributes:s,geometry:t})}return e}(e,t,n,s);default:h().error("convertToFeatureSet:unknown-geometry",new o.A(`Unable to parse unknown geometry type '${r}'`))}return e}function H(e){const{objectIdFieldName:t,spatialReference:r,transform:o,fields:n,hasM:s,hasZ:i,features:l,geometryType:a,exceededTransferLimit:u,uniqueIdField:p,queryGeometry:c,queryGeometryType:d}=e,h={features:k([],l,a,i,s),fields:n,geometryType:a,objectIdFieldName:t,spatialReference:r,uniqueIdField:p,queryGeometry:$(c,d,!1,!1)};return o&&(h.transform=o),u&&(h.exceededTransferLimit=u),s&&(h.hasM=s),i&&(h.hasZ=i),h}function Y(e,t){const r=new p.A,{hasM:n,hasZ:s,features:i,objectIdFieldName:l,spatialReference:a,geometryType:u,exceededTransferLimit:c,transform:d,fields:f}=e;return f&&(r.fields=f),r.geometryType=u??null,r.objectIdFieldName=l??t??null,r.spatialReference=a??null,r.objectIdFieldName?(i&&Q(r.features,i,u,s,n,r.objectIdFieldName),c&&(r.exceededTransferLimit=c),n&&(r.hasM=n),s&&(r.hasZ=s),d&&(r.transform=d),r):(h().error(new o.A("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),r)}function K(e){const{transform:t,features:r,hasM:o,hasZ:n}=e;if(!t)return e;for(const e of r)null!=e.geometry&&oe(e.geometry,e.geometry,o,n,t),null!=e.centroid&&oe(e.centroid,e.centroid,o,n,t);return e.transform=null,e}function V(e,t){const{geometryType:r,features:o,hasM:n,hasZ:s}=t;if(!e)return t;for(let t=0;t<o.length;t++){const i=o[t],l=i.weakClone();l.geometry=new c.A,W(l.geometry,i.geometry,n,s,r,e),i.centroid&&(l.centroid=new c.A,W(l.centroid,i.centroid,n,s,"esriGeometryPoint",e)),o[t]=l}return t.transform=e,t}function W(e,t,r,o,n,s,i=r,l=o){if(le(e),!t?.coords.length)return null;const a=f[n],{coords:u,lengths:p}=t,c=d(r,o),h=d(r&&i,o&&l),y=v(r,o,i,l);if(!p.length)return y(e.coords,u,0,0,F(s,u[0]),M(s,u[1])),le(e,c,0),e;let m,g,w,_,I=0,T=0,x=T;for(const t of p){if(t<a)continue;let r=0;T=x,w=m=F(s,u[I]),_=g=M(s,u[I+1]),y(e.coords,u,T,I,w,_),r++,I+=c,T+=h;for(let o=1;o<t;o++,I+=c)w=F(s,u[I]),_=M(s,u[I+1]),w===m&&_===g||(y(e.coords,u,T,I,w-m,_-g),T+=h,r++,m=w,g=_);r>=a&&(e.lengths.push(r),x=T)}return ae(e.coords,x),e.coords.length?e:null}function X(e,t,r,o,n,s,i=r,l=o){if(le(e),!t?.coords.length)return null;const a=f[n],{coords:u,lengths:p}=t,c=d(r,o),h=d(r&&i,o&&l),y=v(r,o,i,l);if(!p.length)return y(e.coords,u,0,0,u[0],u[1]),le(e,c,0),e;let m=0;const g=s*s;for(const t of p){if(t<a){m+=t*c;continue}const r=e.coords.length/h,o=m,n=m+(t-1)*c;y(e.coords,u,e.coords.length,o,u[o],u[o+1]),te(e.coords,u,c,g,y,o,n),y(e.coords,u,e.coords.length,n,u[n],u[n+1]);const s=e.coords.length/h-r;s>=a?e.lengths.push(s):ae(e.coords,r*h),m+=t*c}return e.coords.length?e:null}function ee(e,t,r,o){const n=e[t],s=e[t+1],i=e[r],l=e[r+1],a=e[o],u=e[o+1];let p=i,c=l,d=a-p,h=u-c;if(0!==d||0!==h){const e=((n-p)*d+(s-c)*h)/(d*d+h*h);e>1?(p=a,c=u):e>0&&(p+=d*e,c+=h*e)}return d=n-p,h=s-c,d*d+h*h}function te(e,t,r,o,n,s,i){let l,a=o,u=0;for(let e=s+r;e<i;e+=r)l=ee(t,e,s,i),l>a&&(u=e,a=l);a>o&&(u-s>r&&te(e,t,r,o,n,s,u),n(e,t,e.length,u,t[u],t[u+1]),i-u>r&&te(e,t,r,o,n,u,i))}function re(e,t,r,o){if(!t?.coords?.length)return null;const n=d(r,o);let s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=n){const r=e[t],o=e[t+1];s=Math.min(s,r),u=Math.max(u,r),a=Math.min(a,o),p=Math.max(p,o)}}return(0,i.is)(e)?(0,i.BI)(e,s,a,u,p):(0,l.fA)(s,a,u,p,e),e}function oe(e,t,r,o,n){const{coords:i,lengths:l}=t,a=d(r,o);if(!i.length)return e!==t&&le(e),e;(0,s.Lw)(n);const{originPosition:u,scale:p,translate:c}=n,h=ue;h.originPosition=u;const f=h.scale;f[0]=p[0]??1,f[1]=-(p[1]??1),f[2]=p[2]??1,f[3]=p[3]??1;const y=h.translate;if(y[0]=c[0]??0,y[1]=c[1]??0,y[2]=c[2]??0,y[3]=c[3]??0,!l.length){for(let t=0;t<a;++t)e.coords[t]=_(h,i[t],t);return e!==t&&le(e,a,0),e}let m=0;for(let t=0;t<l.length;t++){const r=l[t];e.lengths[t]=r;for(let t=0;t<a;++t)e.coords[m+t]=_(h,i[m+t],t);let o=e.coords[m],n=e.coords[m+1];m+=a;for(let t=1;t<r;t++,m+=a){o+=i[m]*f[0],n+=i[m+1]*f[1],e.coords[m]=o,e.coords[m+1]=n;for(let t=2;t<a;++t)e.coords[m+t]=_(h,i[m+t],t)}}return e!==t&&le(e,i.length,l.length),e}function ne(e,t,r,o,n,s){if(le(e),e.lengths.push(...t.lengths),r===n&&o===s)for(let r=0;r<t.coords.length;r++)e.coords.push(t.coords[r]);else{const i=d(r,o),l=v(r,o,n,s),a=t.coords;for(let t=0;t<a.length;t+=i)l(e.coords,a,e.coords.length,t,a[t],a[t+1])}return e}function se(e,t,r,o){let n=0,s=e[o*t],i=e[o*(t+1)];for(let l=1;l<r;l++){const r=s+e[o*(t+l)],a=i+e[o*(t+l)+1],u=(r-s)*(a+i);s=r,i=a,n+=u}return.5*n}function ie(e,t){const{coords:r,lengths:o}=e;let n=0,s=0;for(let e=0;e<o.length;e++){const i=o[e];s+=se(r,n,i,t),n+=i}return Math.abs(s)}function le(e,t=0,r=0){ae(e.lengths,r),ae(e.coords,t)}function ae(e,t=0){e.length!==t&&(e.length=t)}const ue={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},52136:(e,t,r)=>{r.d(t,{p:()=>i});var o=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const i=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,o._)([(0,n.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,o._)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>i});var o=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const i=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,o._)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,o._)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},32756:(e,t,r)=>{r.d(t,{f:()=>u,n:()=>a});var o=r(90237),n=r(93637),s=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);const a={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:function(e,t,r){if(!e)return null;const o=e.find((e=>!!e.field));if(!o)return null;const n=new l.A;return n.read(o,r),[n]}},write:{writer:function(e,t,r,o){const s=e.find((e=>!!e.field));s&&(0,n.sM)(r,[s.toJSON()],t)}}}},u=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,o._)([(0,s.MZ)(a)],t.prototype,"orderBy",void 0),t=(0,o._)([(0,i.$)("esri.layers.mixins.OrderedLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>_});var o=r(90237),n=r(92602),s=r(70333),i=r(78888),l=r(60999),a=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),h=r(10107),f=(r(44208),r(87811),r(36005)),y=r(40608),m=r(43937),g=r(83531),w=r(20655),v=r(80812),F=r(41318),M=r(10407);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:o}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,c.Te)(t),await o({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:o},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",o),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const o=e===r.id;if(o&&r.portal.user)return(0,M.It)(r);let n,i;if(o)n=r.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!n||!(0,d.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;i=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const l=!0,a=!1,u=!1;if(!i)return{features:{edit:l,fullEdit:a},content:{updateItem:u}};try{if(o?await r.reload():(r=new v.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,M.It)(r)}catch(e){(0,c.QP)(e)}return{features:{edit:l,fullEdit:a},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const o=`${r.owningSystemUrl}/sharing/rest`,n=w.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(o))return n.user;const a=`${o}/community/self`,u=null!=e?e.signal:null,p=await(0,l.Ke)((0,i.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?F.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,o=this.portalItem?.id&&(this.portalItem.portal||w.A.getDefault());return r&&o&&!(0,d.ut)(o.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,o._)([(0,h.MZ)({type:v.default})],t.prototype,"portalItem",null),(0,o._)([(0,f.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,o._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,o._)([(0,h.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,o._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,o._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,o._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,o._)([(0,y.$)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},29005:(e,t,r)=>{r.d(t,{A:()=>c});var o=r(90237),n=r(69540),s=r(66552),i=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,n.O)(i.oY)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,o._)([(0,l.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,o._)([(0,l.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,o._)([(0,l.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,o._)([(0,l.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,o._)([(0,l.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,o._)([(0,a.$)("esri.layers.support.FeatureTemplate")],p);const c=p},33143:(e,t,r)=>{r.d(t,{A:()=>h});var o=r(90237),n=r(69540),s=r(25482),i=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),u=r(43937),p=r(80451),c=r(29005);let d=class extends((0,n.O)(s.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,o._)([(0,i.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,o._)([(0,i.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,o._)([(0,i.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,o._)([(0,l.w)("domains")],d.prototype,"readDomains",null),(0,o._)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,o._)([(0,i.MZ)({type:[c.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,o._)([(0,a.$)("esri.layers.support.FeatureType")],d);const h=d},95466:(e,t,r)=>{r.d(t,{A:()=>d});var o=r(49186),n=r(25482),s=r(53966),i=r(91869),l=r(3330),a=r(30524),u=r(56400),p=r(96285);const c=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],m(e))}static fromLayerJSON(e){return new d(e.fields??[],m(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,o=f(t);if(t&&o){const n=h(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(o,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(h(e))??this._normalizedFieldsMap.get(f(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new o.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):y.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?l.GB.instance:t===u.n$?p.mQ.utcInstance:(0,i.tE)(c,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function h(e){return e.trim().toLowerCase()}function f(e){return(0,a.rS)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function m(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:o,editFieldsInfo:n}=e,s=(o?"startField"in o?o.startField:o.startTimeField:"")??"",i=(o?"endField"in o?o.endField:o.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,a=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.dateFieldsTimeReference?(0,u.ZS)(n.dateFieldsTimeReference):l??u.n$:null,p=o?function(e){return"timeZone"in e}(o)?o.timeZone??l:o.timeReference?(0,u.ZS)(o.timeReference):l:null,c=new Map([[h(n?.creationDateField??""),a],[h(n?.editDateField??""),a],[h(s),p],[h(i),p]]);for(const{name:o,type:n}of e.fields)if(y.has(n))t.set(o,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(o,null);else if(r)t.set(o,u.L5);else{const e=c.get(h(o??""))??l;t.set(o,e)}return t}},91880:(e,t,r)=>{r.d(t,{A:()=>c});var o,n=r(90237),s=r(66552),i=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({asc:"ascending",desc:"descending"});let p=o=class extends i.oY{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new o({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,n._)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,n._)([(0,l.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=o=(0,n._)([(0,a.$)("esri.layers.support.OrderByInfo")],p);const c=p},22671:(e,t,r)=>{r.d(t,{A:()=>v});var o,n=r(90237),s=r(59456),i=r(52106),l=r(66552),a=r(25482),u=r(4718),p=r(10107),c=(r(44208),r(53966),r(36005)),d=r(40608),h=r(43937),f=r(16930),y=r(65864),m=r(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=o=class extends a.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=f.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const n=e[t],s=i.A.fromJSON(n),l=n.geometry?.spatialReference;null==s.geometry||l||(s.geometry.spatialReference=r);const a=n.aggregateGeometries,u=s.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],o=a[e],n=o?.spatialReference;null==t||n||(t.spatialReference=r)}o.push(s)}return o}writeGeometryType(e,t,r,o){if(e)return void g.write(e,t,r,o);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,o)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,o=(0,y.rS)(e);return o&&!r&&t.spatialReference&&(o.spatialReference=f.A.fromJSON(t.spatialReference)),o}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new o(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const o=t.features[r];if(o.geometry){const t=e?.[r];o.geometry=t?.toJSON()||o.geometry}}return t}quantize(e){const{scale:[t,r],translate:[o,n]}=e,s=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-o)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=s.length;e<t;e++)i?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[o,n],scale:[s,i]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*s+o),(e=>n-e*i),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let o,n;const s=[];for(let i=0,l=e.length;i<l;i++){const l=e[i];if(i>0){const e=t(l[0]),i=r(l[1]);e===o&&i===n||(s.push([e-o,i-n]),o=e,n=i)}else o=t(l[0]),n=r(l[1]),s.push([o,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const o=(0,y.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=o.length;e<s;e++){const s=o[e],i=this._quantizePoints(s,t,r);i&&n.push(i)}return n.length>0?((0,y.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const o=this._quantizePoints(e.points,t,r);return o&&o.length>0?(e.points=o,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,o,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),o&&(e.z=o(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,y.Bi)(e)?e.rings:e.paths;let i,l;for(let e=0,o=s.length;e<o;e++){const o=s[e];for(let e=0,n=o.length;e<n;e++){const n=o[e];e>0?(i+=n[0],l+=n[1]):(i=n[0],l=n[1]),n[0]=t(i),n[1]=r(l)}}if(o&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2]),r[3]=n(r[3])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),o&&null!=e.zmax&&null!=e.zmin&&(e.zmax=o(e.zmax),e.zmin=o(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let i,l;for(let e=0,o=s.length;e<o;e++){const o=s[e];e>0?(i+=o[0],l+=o[1]):(i=o[0],l=o[1]),o[0]=t(i),o[1]=r(l)}if(o&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2]),t[3]=n(t[3])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,p.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,p.MZ)({type:[i.A],json:{write:!0}})],w.prototype,"features",void 0),(0,n._)([(0,c.w)("features")],w.prototype,"readFeatures",null),(0,n._)([(0,p.MZ)({type:[m.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,n._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,n._)([(0,h.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,n._)([(0,p.MZ)({types:s.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,n._)([(0,c.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,n._)([(0,p.MZ)({type:f.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,n._)([(0,h.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,n._)([(0,p.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=o=(0,n._)([(0,d.$)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const v=w}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3359,5740],{46130:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(76553);function n(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:a,newOrigin:t})=>{(0,r.H)(e)&&t&&e.originOf(a)!==t&&e.updateOrigin(a,t)}))}},76553:(e,a,t)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}t.d(a,{H:()=>r})},33359:(e,a,t)=>{t.d(a,{save:()=>A,saveAs:()=>T});var r=t(4576),n=(t(49186),t(71530)),i=t(60694),s=t(23154),o=t(83531),l=t(4513),u=t(10407);const c="Feature Service",d="feature-layer-utils",y=`${d}-save`,f=`${d}-save-as`;function p(e){return{isValid:(0,o.W_)(e)&&(!("dynamicDataSource"in e)||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function m(e){const a=[],t=[];for(const{layer:r,layerJSON:n}of e)r.isTable?t.push(n):a.push(n);return{layers:a,tables:t}}function w(e){return m([e])}async function h(e,a){return/\/\d+\/?$/.test(e.url)?w(a[0]):async function(e,a){if(e.reverse(),!a)return m(e);const t=await async function(e,a){let t=await e.fetchData("json");if(function(e){return!!(e&&Array.isArray(e.layers)&&Array.isArray(e.tables))}(t))return t;t||={},function(e){e.layers||=[],e.tables||=[]}(t);const{layer:{url:r,customParameters:n,apiKey:i}}=a[0];return await async function(e,a,t){const{url:r,customParameters:n,apiKey:i}=a,{serviceJSON:o,layersJSON:u}=await(0,s.Q)(r,{customParameters:n,apiKey:i}),c=P(e.layers,o.layers,t),d=P(e.tables,o.tables,t);e.layers=c.itemResources,e.tables=d.itemResources;const y=[...c.added,...d.added],f=u?[...u.layers,...u.tables]:[];await async function(e,a,t,r){const n=await async function(e){const a=[];e.forEach((({type:e})=>{const t=(0,s.K)(e),r=l.S[t];a.push(r())}));const t=await Promise.all(a),r=new Map;return e.forEach((({type:e},a)=>{r.set(e,t[a])})),r}(a),i=a.map((({id:e,type:a})=>new(n.get(a))({url:t,layerId:e,sourceJSON:r.find((({id:a})=>a===e))})));await Promise.allSettled(i.map((e=>e.load()))),i.forEach((a=>{const{layerId:t,loaded:r,defaultPopupTemplate:n}=a;if(!r||null==n)return;const i={id:t,popupInfo:n.toJSON()};"ArcGISFeatureLayer"!==a.operationalLayerType&&(i.layerType=a.operationalLayerType),v(a,i,e)}))}(e,y,r,f)}(t,{url:r??"",customParameters:n,apiKey:i},a.map((e=>e.layer.layerId))),t}(a,e);for(const a of e)v(a.layer,a.layerJSON,t);return function(e,a){const t=[],r=[];for(const{layer:e}of a){const{isTable:a,layerId:n}=e;a?r.push(n):t.push(n)}b(e.layers,t),b(e.tables,r)}(t,e),t}(a,e)}function b(e,a){if(e.length<2)return;const t=[];for(const{id:a}of e)t.push(a);(0,r.aI)(t.sort(L),a.slice().sort(L))&&e.sort(((e,t)=>{const r=a.indexOf(e.id),n=a.indexOf(t.id);return r<n?-1:r>n?1:0}))}function L(e,a){return e<a?-1:e>a?1:0}function P(e,a,t){const n=(0,r.iv)(e,a,((e,a)=>e.id===a.id));e=e.filter((e=>!n.removed.some((a=>a.id===e.id))));const i=n.added;return i.forEach((({id:a})=>{e.push({id:a})})),{itemResources:e,added:i.filter((({id:e})=>!t.includes(e)))}}function v(e,a,t){e.isTable?S(t.tables,a):S(t.layers,a)}function S(e,a){const t=e.findIndex((({id:e})=>e===a.id));-1===t?e.push(a):e[t]=a}function g(e,a){const t=e.some((e=>"oriented-imagery"===e.type));(0,u.Sm)(a,u.mm.ORIENTED_IMAGERY_LAYER,t)}async function I(e,a){g([e],a)}async function O(e,a){const{url:t,layerId:r,title:n,fullExtent:s,isTable:o}=e,l=(0,i.qg)(t);a.url=("FeatureServer"===l?.serverType?t:`${t}/${r}`)??null,a.title||=n,a.extent=null,o||null==s||(a.extent=await(0,u.sQ)(s)),(0,u.OM)(a,u.mm.METADATA),(0,u.OM)(a,u.mm.MULTI_LAYER),(0,u.LG)(a,u.mm.SINGLE_LAYER),(0,u.Sm)(a,u.mm.TABLE,o),g([e],a)}async function A(e,a){return(0,n.UN)({layer:e,itemType:c,validateLayer:p,createItemData:(e,a)=>h(a,[e]),errorNamePrefix:y,setItemProperties:I},a)}async function T(e,a,t){return(0,n.Uh)({layer:e,itemType:c,validateLayer:p,createItemData:(e,a)=>Promise.resolve(w(e)),errorNamePrefix:f,newItem:a,setItemProperties:O},t)}},71530:(e,a,t)=>{t.d(a,{UN:()=>L,Uh:()=>P});var r=t(49186),n=t(46130),i=t(20655),s=t(80812),o=t(88788),l=t(10407),u=t(49864),c=t(26121);async function d(e){const{layer:a,errorNamePrefix:t,validateLayer:n}=e;await a.load(),function(e,a,t){const n=t(e);if(!n.isValid)throw new r.A(`${a}:invalid-parameters`,n.errorMessage,{layer:e})}(a,t,n)}function y(e,a){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${a}`}function f(e){const{item:a,errorNamePrefix:t,layer:n,validateItem:i}=e;if((0,u.X)(a),function(e){const{item:a,itemType:t,additionalItemType:n,errorNamePrefix:i,layer:s}=e,o=[t];if(n&&o.push(n),!o.includes(a.type)){const e=o.map((e=>`'${e}'`)).join(", ");throw new r.A(`${i}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:a,layer:s})}}(e),i){const e=i(a);if(!e.isValid)throw new r.A(`${t}:invalid-parameters`,e.errorMessage,{layer:n})}}function p(e){const{layer:a,errorNamePrefix:t}=e,{portalItem:n}=a;if(!n)throw new r.A(`${t}:portal-item-not-set`,y(a,"requires the portalItem property to be set"));if(!n.loaded)throw new r.A(`${t}:portal-item-not-loaded`,y(a,"cannot be saved to a portal item that does not exist or is inaccessible"));f({...e,item:n})}function m(e){const{newItem:a,itemType:t}=e;let r=s.default.from(a);return r.id&&(r=r.clone(),r.id=null),r.type??=t,r.portal??=i.A.getDefault(),f({...e,item:r}),r}function w(e){return(0,o.m)(e,"portal-item")}async function h(e,a,t){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const r=e.write({},a);return await Promise.all(a.resources?.pendingOperations??[]),(0,c.c)(a,{errorName:"layer-write:unsupported"},t),r}function b(e){(0,l.LG)(e,l.mm.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,a,t)=>t.indexOf(e)===a)))}async function L(e,a){const{layer:t,createItemData:r,createJSONContext:i,setItemProperties:s,saveResources:o,supplementalUnsupportedErrors:l}=e;await d(e),p(e);const u=t.portalItem,c=i?i(u):w(u),y=await h(t,c,{...a,supplementalUnsupportedErrors:l}),f=await r({layer:t,layerJSON:y},u);return await(s?.(t,u)),b(u),await u.update({data:f}),(0,n.v)(c),await(o?.(u,c)),u}async function P(e,a){const{layer:t,createItemData:r,createJSONContext:i,setItemProperties:s,saveResources:o,supplementalUnsupportedErrors:l}=e;await d(e);const u=m(e),c=i?i(u):w(u),y=await h(t,c,{...a,supplementalUnsupportedErrors:l}),f=await r({layer:t,layerJSON:y},u);return await s(t,u),b(u),await async function(e,a,t){const r=e.portal;await r.signIn(),await(r.user?.addItem({item:e,data:a,folder:t?.folder}))}(u,f,a),t.portalItem=u,(0,n.v)(c),await(o?.(u,c)),u}},23154:(e,a,t)=>{t.d(a,{K:()=>y,Q:()=>i});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function i(e,a){const{loadContext:t,...n}=a||{},i=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);d(i),l(i);const s={serviceJSON:i};if((i.currentVersion??0)<10.5)return s;const o=`${e}/layers`,u=t?await t.fetchServiceMetadata(o,n):await(0,r.V)(o,n);return d(u),l(u),s.layersJSON={layers:u.layers,tables:u.tables},s}function s(e){const{type:a}=e;return!!a&&n.has(a)}function o(e){return"Table"===e.type}function l(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(o)}function u(e){e.type||="Feature Layer"}function c(e){e.type||="Table"}function d(e){e.layers?.forEach(u),e.tables?.forEach(c)}function y(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(1892)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(690),t.e(1219),t.e(2944),t.e(8947),t.e(9287),t.e(4654),t.e(7110),t.e(2931)]).then(t.bind(t,88303))).default,CSVLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(1219),t.e(4174)]).then(t.bind(t,72256))).default,CatalogLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(4111),t.e(2780),t.e(893),t.e(8132),t.e(2593),t.e(6107)]).then(t.bind(t,79003))).default,DimensionLayer:async()=>(await Promise.all([t.e(6131),t.e(1493)]).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(6131),t.e(9186),t.e(8283)]).then(t.bind(t,5111))).default,FeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(1219),t.e(9377)]).then(t.bind(t,13600))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3839)]).then(t.bind(t,17625))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(1147),t.e(587),t.e(7249)]).then(t.bind(t,63201))).default,GroupLayer:async()=>(await Promise.all([t.e(6131),t.e(5989)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(893),t.e(984),t.e(435),t.e(6547)]).then(t.bind(t,5159))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(984),t.e(5915),t.e(435),t.e(6260)]).then(t.bind(t,97327))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([t.e(6131),t.e(1528)]).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(6131),t.e(8947),t.e(8003)]).then(t.bind(t,84453))).default,KMLLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(5494),t.e(3995)]).then(t.bind(t,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(8368),t.e(9492),t.e(1402),t.e(6493),t.e(8943),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(6131),t.e(690),t.e(1786),t.e(9695)]).then(t.bind(t,49695))).default,LinkChartLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(8368),t.e(9492),t.e(1402),t.e(6493),t.e(8943),t.e(1728)]).then(t.bind(t,71728))).default,MapImageLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(4111),t.e(893),t.e(8132),t.e(591),t.e(7656)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(1219),t.e(6493),t.e(2245)]).then(t.bind(t,96953))).default,MediaLayer:async()=>(await Promise.all([t.e(6131),t.e(7899)]).then(t.bind(t,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(821),t.e(659)]).then(t.bind(t,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9833),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(1219),t.e(7263)]).then(t.bind(t,97927))).default,PointCloudLayer:async()=>(await Promise.all([t.e(6131),t.e(3874),t.e(8947),t.e(7984),t.e(6528)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(6131),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(5494),t.e(3920)]).then(t.bind(t,97550))).default,SceneLayer:async()=>(await Promise.all([t.e(6131),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(690),t.e(3030),t.e(2944),t.e(8947),t.e(9287),t.e(4654),t.e(36),t.e(7110),t.e(1737)]).then(t.bind(t,13899))).default,StreamLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4761)]).then(t.bind(t,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(4111),t.e(2780),t.e(7e3)]).then(t.bind(t,70048))).default,TileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(4111),t.e(893),t.e(8132),t.e(9186),t.e(591),t.e(1756)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9186),t.e(9949),t.e(5013),t.e(735)]).then(t.bind(t,91603))).default,VideoLayer:async()=>(await t.e(6875).then(t.bind(t,86875))).default,ViewshedLayer:async()=>(await Promise.all([t.e(6131),t.e(690),t.e(1786),t.e(6650)]).then(t.bind(t,96650))).default,VoxelLayer:async()=>(await Promise.all([t.e(6131),t.e(3874),t.e(8947),t.e(1389)]).then(t.bind(t,16183))).default,WFSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4322),t.e(3186)]).then(t.bind(t,16350))).default,WMSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9833),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9833)]).then(t.bind(t,47314))).default}},88788:(e,a,t)=>{t.d(a,{m:()=>s,v:()=>i});var r=t(84952),n=t(20655);function i(e,a){return{...o(e,a),readResourcePaths:[]}}function s(e,a,t){const n=(0,r.An)(e.itemUrl);return{...o(e,a),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:t?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function o(e,a){return{origin:a,url:(0,r.An)(e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}},49864:(e,a,t)=>{t.d(a,{X:()=>s});var r=t(92602),n=t(49186),i=t(926);function s(e){if(r.A.apiKey&&(0,i.Q)(e.portal.url))throw new n.A("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}},26121:(e,a,t)=>{t.d(a,{c:()=>s,d:()=>n});var r=t(49186);async function n(e){const a=[];for(const t of e.allLayers)if("beforeSave"in t&&"function"==typeof t.beforeSave){const e=t.beforeSave();e&&a.push(e)}await Promise.allSettled(a)}const i=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function s(e,a,t){let n=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:a,details:t})=>new r.A(e,a,t)));if(e.blockedRelativeUrls&&(n=n.concat(e.blockedRelativeUrls.map((e=>new r.A("url:unsupported",`Relative url '${e}' is not supported`))))),t){const{ignoreUnsupported:e,supplementalUnsupportedErrors:a=[],requiredPropertyChecksDisabled:r}=t;e&&(n=n.filter((({name:e})=>!(i.has(e)||a.includes(e))))),r&&(n=n.filter((e=>"web-document-write:property-required"!==e.name)))}if(n.length>0)throw new r.A(a.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3359,5740],{46130:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(76553);function n(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:a,newOrigin:t})=>{(0,r.H)(e)&&t&&e.originOf(a)!==t&&e.updateOrigin(a,t)}))}},76553:(e,a,t)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}t.d(a,{H:()=>r})},33359:(e,a,t)=>{t.d(a,{save:()=>A,saveAs:()=>T});var r=t(4576),n=(t(49186),t(71530)),i=t(60694),s=t(23154),o=t(83531),l=t(4513),u=t(10407);const c="Feature Service",d="feature-layer-utils",y=`${d}-save`,f=`${d}-save-as`;function p(e){return{isValid:(0,o.W_)(e)&&(!("dynamicDataSource"in e)||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function m(e){const a=[],t=[];for(const{layer:r,layerJSON:n}of e)r.isTable?t.push(n):a.push(n);return{layers:a,tables:t}}function w(e){return m([e])}async function h(e,a){return/\/\d+\/?$/.test(e.url)?w(a[0]):async function(e,a){if(e.reverse(),!a)return m(e);const t=await async function(e,a){let t=await e.fetchData("json");if(function(e){return!!(e&&Array.isArray(e.layers)&&Array.isArray(e.tables))}(t))return t;t||={},function(e){e.layers||=[],e.tables||=[]}(t);const{layer:{url:r,customParameters:n,apiKey:i}}=a[0];return await async function(e,a,t){const{url:r,customParameters:n,apiKey:i}=a,{serviceJSON:o,layersJSON:u}=await(0,s.Q)(r,{customParameters:n,apiKey:i}),c=P(e.layers,o.layers,t),d=P(e.tables,o.tables,t);e.layers=c.itemResources,e.tables=d.itemResources;const y=[...c.added,...d.added],f=u?[...u.layers,...u.tables]:[];await async function(e,a,t,r){const n=await async function(e){const a=[];e.forEach((({type:e})=>{const t=(0,s.K)(e),r=l.S[t];a.push(r())}));const t=await Promise.all(a),r=new Map;return e.forEach((({type:e},a)=>{r.set(e,t[a])})),r}(a),i=a.map((({id:e,type:a})=>new(n.get(a))({url:t,layerId:e,sourceJSON:r.find((({id:a})=>a===e))})));await Promise.allSettled(i.map((e=>e.load()))),i.forEach((a=>{const{layerId:t,loaded:r,defaultPopupTemplate:n}=a;if(!r||null==n)return;const i={id:t,popupInfo:n.toJSON()};"ArcGISFeatureLayer"!==a.operationalLayerType&&(i.layerType=a.operationalLayerType),v(a,i,e)}))}(e,y,r,f)}(t,{url:r??"",customParameters:n,apiKey:i},a.map((e=>e.layer.layerId))),t}(a,e);for(const a of e)v(a.layer,a.layerJSON,t);return function(e,a){const t=[],r=[];for(const{layer:e}of a){const{isTable:a,layerId:n}=e;a?r.push(n):t.push(n)}b(e.layers,t),b(e.tables,r)}(t,e),t}(a,e)}function b(e,a){if(e.length<2)return;const t=[];for(const{id:a}of e)t.push(a);(0,r.aI)(t.sort(L),a.slice().sort(L))&&e.sort(((e,t)=>{const r=a.indexOf(e.id),n=a.indexOf(t.id);return r<n?-1:r>n?1:0}))}function L(e,a){return e<a?-1:e>a?1:0}function P(e,a,t){const n=(0,r.iv)(e,a,((e,a)=>e.id===a.id));e=e.filter((e=>!n.removed.some((a=>a.id===e.id))));const i=n.added;return i.forEach((({id:a})=>{e.push({id:a})})),{itemResources:e,added:i.filter((({id:e})=>!t.includes(e)))}}function v(e,a,t){e.isTable?S(t.tables,a):S(t.layers,a)}function S(e,a){const t=e.findIndex((({id:e})=>e===a.id));-1===t?e.push(a):e[t]=a}function g(e,a){const t=e.some((e=>"oriented-imagery"===e.type));(0,u.Sm)(a,u.mm.ORIENTED_IMAGERY_LAYER,t)}async function I(e,a){g([e],a)}async function O(e,a){const{url:t,layerId:r,title:n,fullExtent:s,isTable:o}=e,l=(0,i.qg)(t);a.url=("FeatureServer"===l?.serverType?t:`${t}/${r}`)??null,a.title||=n,a.extent=null,o||null==s||(a.extent=await(0,u.sQ)(s)),(0,u.OM)(a,u.mm.METADATA),(0,u.OM)(a,u.mm.MULTI_LAYER),(0,u.LG)(a,u.mm.SINGLE_LAYER),(0,u.Sm)(a,u.mm.TABLE,o),g([e],a)}async function A(e,a){return(0,n.UN)({layer:e,itemType:c,validateLayer:p,createItemData:(e,a)=>h(a,[e]),errorNamePrefix:y,setItemProperties:I},a)}async function T(e,a,t){return(0,n.Uh)({layer:e,itemType:c,validateLayer:p,createItemData:(e,a)=>Promise.resolve(w(e)),errorNamePrefix:f,newItem:a,setItemProperties:O},t)}},71530:(e,a,t)=>{t.d(a,{UN:()=>L,Uh:()=>P});var r=t(49186),n=t(46130),i=t(20655),s=t(80812),o=t(88788),l=t(10407),u=t(49864),c=t(26121);async function d(e){const{layer:a,errorNamePrefix:t,validateLayer:n}=e;await a.load(),function(e,a,t){const n=t(e);if(!n.isValid)throw new r.A(`${a}:invalid-parameters`,n.errorMessage,{layer:e})}(a,t,n)}function y(e,a){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${a}`}function f(e){const{item:a,errorNamePrefix:t,layer:n,validateItem:i}=e;if((0,u.X)(a),function(e){const{item:a,itemType:t,additionalItemType:n,errorNamePrefix:i,layer:s}=e,o=[t];if(n&&o.push(n),!o.includes(a.type)){const e=o.map((e=>`'${e}'`)).join(", ");throw new r.A(`${i}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:a,layer:s})}}(e),i){const e=i(a);if(!e.isValid)throw new r.A(`${t}:invalid-parameters`,e.errorMessage,{layer:n})}}function p(e){const{layer:a,errorNamePrefix:t}=e,{portalItem:n}=a;if(!n)throw new r.A(`${t}:portal-item-not-set`,y(a,"requires the portalItem property to be set"));if(!n.loaded)throw new r.A(`${t}:portal-item-not-loaded`,y(a,"cannot be saved to a portal item that does not exist or is inaccessible"));f({...e,item:n})}function m(e){const{newItem:a,itemType:t}=e;let r=s.default.from(a);return r.id&&(r=r.clone(),r.id=null),r.type??=t,r.portal??=i.A.getDefault(),f({...e,item:r}),r}function w(e){return(0,o.m)(e,"portal-item")}async function h(e,a,t){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const r=e.write({},a);return await Promise.all(a.resources?.pendingOperations??[]),(0,c.c)(a,{errorName:"layer-write:unsupported"},t),r}function b(e){(0,l.LG)(e,l.mm.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,a,t)=>t.indexOf(e)===a)))}async function L(e,a){const{layer:t,createItemData:r,createJSONContext:i,setItemProperties:s,saveResources:o,supplementalUnsupportedErrors:l}=e;await d(e),p(e);const u=t.portalItem,c=i?i(u):w(u),y=await h(t,c,{...a,supplementalUnsupportedErrors:l}),f=await r({layer:t,layerJSON:y},u);return await(s?.(t,u)),b(u),await u.update({data:f}),(0,n.v)(c),await(o?.(u,c)),u}async function P(e,a){const{layer:t,createItemData:r,createJSONContext:i,setItemProperties:s,saveResources:o,supplementalUnsupportedErrors:l}=e;await d(e);const u=m(e),c=i?i(u):w(u),y=await h(t,c,{...a,supplementalUnsupportedErrors:l}),f=await r({layer:t,layerJSON:y},u);return await s(t,u),b(u),await async function(e,a,t){const r=e.portal;await r.signIn(),await(r.user?.addItem({item:e,data:a,folder:t?.folder}))}(u,f,a),t.portalItem=u,(0,n.v)(c),await(o?.(u,c)),u}},23154:(e,a,t)=>{t.d(a,{K:()=>y,Q:()=>i});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function i(e,a){const{loadContext:t,...n}=a||{},i=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);d(i),l(i);const s={serviceJSON:i};if((i.currentVersion??0)<10.5)return s;const o=`${e}/layers`,u=t?await t.fetchServiceMetadata(o,n):await(0,r.V)(o,n);return d(u),l(u),s.layersJSON={layers:u.layers,tables:u.tables},s}function s(e){const{type:a}=e;return!!a&&n.has(a)}function o(e){return"Table"===e.type}function l(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(o)}function u(e){e.type||="Feature Layer"}function c(e){e.type||="Table"}function d(e){e.layers?.forEach(u),e.tables?.forEach(c)}function y(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(1892)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(690),t.e(1219),t.e(2944),t.e(8947),t.e(9287),t.e(4654),t.e(7110),t.e(2931)]).then(t.bind(t,88303))).default,CSVLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(1219),t.e(4174)]).then(t.bind(t,72256))).default,CatalogLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(4111),t.e(2780),t.e(893),t.e(8132),t.e(2593),t.e(6107)]).then(t.bind(t,79003))).default,DimensionLayer:async()=>(await Promise.all([t.e(6131),t.e(1493)]).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(6131),t.e(9186),t.e(8283)]).then(t.bind(t,5111))).default,FeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(1219),t.e(9377)]).then(t.bind(t,13600))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3839)]).then(t.bind(t,17625))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(1147),t.e(587),t.e(7249)]).then(t.bind(t,63201))).default,GroupLayer:async()=>(await Promise.all([t.e(6131),t.e(5989)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(893),t.e(984),t.e(435),t.e(6547)]).then(t.bind(t,5159))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(984),t.e(4932),t.e(435),t.e(4943)]).then(t.bind(t,38146))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([t.e(6131),t.e(1528)]).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(6131),t.e(8947),t.e(8003)]).then(t.bind(t,84453))).default,KMLLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(5494),t.e(3995)]).then(t.bind(t,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(8368),t.e(9492),t.e(1402),t.e(6493),t.e(8943),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(6131),t.e(690),t.e(1786),t.e(9695)]).then(t.bind(t,49695))).default,LinkChartLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(8368),t.e(9492),t.e(1402),t.e(6493),t.e(8943),t.e(3812)]).then(t.bind(t,73812))).default,MapImageLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(4111),t.e(893),t.e(8132),t.e(591),t.e(7656)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(1219),t.e(6493),t.e(2245)]).then(t.bind(t,96953))).default,MediaLayer:async()=>(await Promise.all([t.e(6131),t.e(7899)]).then(t.bind(t,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(821),t.e(659)]).then(t.bind(t,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9833),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(1219),t.e(7263)]).then(t.bind(t,97927))).default,PointCloudLayer:async()=>(await Promise.all([t.e(6131),t.e(3874),t.e(8947),t.e(7984),t.e(6528)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(6131),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(5494),t.e(3920)]).then(t.bind(t,97550))).default,SceneLayer:async()=>(await Promise.all([t.e(6131),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(690),t.e(3030),t.e(2944),t.e(8947),t.e(9287),t.e(4654),t.e(36),t.e(7110),t.e(1737)]).then(t.bind(t,13899))).default,StreamLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4761)]).then(t.bind(t,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(4111),t.e(2780),t.e(7e3)]).then(t.bind(t,70048))).default,TileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(4111),t.e(893),t.e(8132),t.e(9186),t.e(591),t.e(1756)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9186),t.e(9949),t.e(5013),t.e(735)]).then(t.bind(t,91603))).default,VideoLayer:async()=>(await t.e(6875).then(t.bind(t,86875))).default,ViewshedLayer:async()=>(await Promise.all([t.e(6131),t.e(690),t.e(1786),t.e(6650)]).then(t.bind(t,96650))).default,VoxelLayer:async()=>(await Promise.all([t.e(6131),t.e(3874),t.e(8947),t.e(1389)]).then(t.bind(t,16183))).default,WFSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4322),t.e(3186)]).then(t.bind(t,16350))).default,WMSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9833),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9833)]).then(t.bind(t,47314))).default}},88788:(e,a,t)=>{t.d(a,{m:()=>s,v:()=>i});var r=t(84952),n=t(20655);function i(e,a){return{...o(e,a),readResourcePaths:[]}}function s(e,a,t){const n=(0,r.An)(e.itemUrl);return{...o(e,a),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:t?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function o(e,a){return{origin:a,url:(0,r.An)(e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}},49864:(e,a,t)=>{t.d(a,{X:()=>s});var r=t(92602),n=t(49186),i=t(926);function s(e){if(r.A.apiKey&&(0,i.Q)(e.portal.url))throw new n.A("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}},26121:(e,a,t)=>{t.d(a,{c:()=>s,d:()=>n});var r=t(49186);async function n(e){const a=[];for(const t of e.allLayers)if("beforeSave"in t&&"function"==typeof t.beforeSave){const e=t.beforeSave();e&&a.push(e)}await Promise.allSettled(a)}const i=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function s(e,a,t){let n=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:a,details:t})=>new r.A(e,a,t)));if(e.blockedRelativeUrls&&(n=n.concat(e.blockedRelativeUrls.map((e=>new r.A("url:unsupported",`Relative url '${e}' is not supported`))))),t){const{ignoreUnsupported:e,supplementalUnsupportedErrors:a=[],requiredPropertyChecksDisabled:r}=t;e&&(n=n.filter((({name:e})=>!(i.has(e)||a.includes(e))))),r&&(n=n.filter((e=>"web-document-write:property-required"!==e.name)))}if(n.length>0)throw new r.A(a.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}}}]);
@@ -199,30 +199,30 @@ return fallOffFunction(vv, vn, 0.1);
199
199
  // Anti-tone map to reduce contrast and drag dark region farther: (x^0.2 + 1.2 * x^4) / 2.2
200
200
  A = (pow(A, 0.2) + 1.2 * A * A * A * A) / 2.2;
201
201
 
202
- fragOcclusion = A;`),e}function p(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const g=(0,o.vt)(),v=Object.freeze(Object.defineProperty({__proto__:null,build:f,getRadius:p},Symbol.toStringTag,{value:"Module"}))},95774:(e,t,r)=>{r.d(t,{S:()=>f,b:()=>m});var i=r(38954),o=r(82048),n=r(52540),a=r(68259),s=r(20304),c=r(2597),l=r(85977),d=r(15976),u=r(63761);const h=4;function m(){const e=new l.N5,t=e.fragment;e.include(o.c);const r=(h+1)/2,m=1/(2*r*r);return t.include(n.E),t.uniforms.add(new u.N("depthMap",(e=>e.depthTexture)),new d.o("tex",(e=>e.colorTexture)),new a.t("blurSize",(e=>e.blurSize)),new s.m("projScale",((e,t)=>{const r=(0,i.j)(t.camera.eye,t.camera.center);return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale}))),t.code.add(c.H`
202
+ fragOcclusion = A;`),e}function p(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const g=(0,o.vt)(),v=Object.freeze(Object.defineProperty({__proto__:null,build:f,getRadius:p},Symbol.toStringTag,{value:"Module"}))},95774:(e,t,r)=>{r.d(t,{S:()=>m,b:()=>h});var i=r(82048),o=r(52540),n=r(68259),a=r(20304),s=r(2597),c=r(85977),l=r(15976),d=r(63761);const u=4;function h(){const e=new c.N5,t=e.fragment;e.include(i.c);const r=(u+1)/2,h=1/(2*r*r);return t.include(o.E),t.uniforms.add(new d.N("depthMap",(e=>e.depthTexture)),new l.o("tex",(e=>e.colorTexture)),new n.t("blurSize",(e=>e.blurSize)),new a.m("projScale",((e,t)=>{const r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale}))),t.code.add(s.H`
203
203
  void blurFunction(vec2 uv, float r, float center_d, float sharpness, inout float wTotal, inout float bTotal) {
204
204
  float c = texture(tex, uv).r;
205
205
  float d = linearDepthFromTexture(depthMap, uv);
206
206
 
207
207
  float ddiff = d - center_d;
208
208
 
209
- float w = exp(-r * r * ${c.H.float(m)} - ddiff * ddiff * sharpness);
209
+ float w = exp(-r * r * ${s.H.float(h)} - ddiff * ddiff * sharpness);
210
210
  wTotal += w;
211
211
  bTotal += w * c;
212
212
  }
213
- `),e.outputs.add("fragBlur","float"),t.main.add(c.H`
213
+ `),e.outputs.add("fragBlur","float"),t.main.add(s.H`
214
214
  float b = 0.0;
215
215
  float w_total = 0.0;
216
216
 
217
217
  float center_d = linearDepthFromTexture(depthMap, uv);
218
218
 
219
219
  float sharpness = -0.05 * projScale / center_d;
220
- for (int r = -${c.H.int(h)}; r <= ${c.H.int(h)}; ++r) {
220
+ for (int r = -${s.H.int(u)}; r <= ${s.H.int(u)}; ++r) {
221
221
  float rf = float(r);
222
222
  vec2 uvOffset = uv + rf * blurSize;
223
223
  blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
224
224
  }
225
- fragBlur = b / w_total;`),e}const f=Object.freeze(Object.defineProperty({__proto__:null,build:m},Symbol.toStringTag,{value:"Module"}))},17352:(e,t,r)=>{r.d(t,{b:()=>j,f:()=>x}),r(44208);var i=r(53966),o=r(34727),n=r(4341),a=r(58083),s=r(9093),c=r(38954),l=r(51850),d=r(19419),u=r(88582),h=r(11964),m=r(27921),f=r(71351),p=r(44280),g=r(32114);const v=()=>i.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function _(e=D){return{plane:(0,m.vt)(e.plane),origin:(0,l.o8)(e.origin),basis1:(0,l.o8)(e.basis1),basis2:(0,l.o8)(e.basis2)}}function T(e,t=_()){return x(e.origin,e.basis1,e.basis2,t)}function x(e,t,r,i=_()){return(0,c.c)(i.origin,e),(0,c.c)(i.basis1,t),(0,c.c)(i.basis2,r),A(i),function(e,t){Math.abs((0,c.f)(e.basis1,e.basis2)/((0,c.l)(e.basis1)*(0,c.l)(e.basis2)))>1e-6&&v().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,c.f)(e.basis1,N(e)))>1e-6&&v().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,c.f)(N(e),e.origin)-e.plane[3])>1e-6&&v().warn(t,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function A(e){(0,m.mR)(e.basis2,e.basis1,e.origin,e.plane)}function E(e,t,r){e!==r&&T(e,r);const i=(0,c.h)(g.rq.get(),N(e),t);return(0,c.g)(r.origin,r.origin,i),r.plane[3]-=t,r}function b(e,t=_()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return(0,c.i)(t.origin,e[0]+r,e[1]+i,0),(0,c.i)(t.basis1,r,0,0),(0,c.i)(t.basis2,0,i,0),(0,m.fA)(0,0,1,0,t.plane),t}function S(e,t,r){return!!(0,m.Ui)(e.plane,t,r)&&y(e,r)}function M(e,t,r){const i=F.get();H(e,t,i,F.get());let n=Number.POSITIVE_INFINITY;for(const a of z){const s=L(e,a,G.get()),l=g.rq.get();if((0,m.T7)(i,s,l)){const e=(0,c.o)(g.rq.get(),t.origin,l),i=Math.abs((0,o.XM)((0,c.f)(t.direction,e)));i<n&&(n=i,(0,c.c)(r,l))}}return n===Number.POSITIVE_INFINITY?C(e,t,r):r}function C(e,t,r){if(S(e,t,r))return r;const i=F.get(),o=F.get();H(e,t,i,o);let n=Number.POSITIVE_INFINITY;for(const a of z){const s=L(e,a,G.get()),l=g.rq.get();if((0,m.gv)(i,s,l)){const e=(0,f.kb)(t,l);if(!(0,m.Tj)(o,l))continue;e<n&&(n=e,(0,c.c)(r,l))}}return w(e,t.origin)<n&&R(e,t.origin,r),r}function R(e,t,r){const i=(0,m._I)(e.plane,t,g.rq.get()),o=(0,h.H6)(P(e,e.basis1),i,-1,1,g.rq.get()),n=(0,h.H6)(P(e,e.basis2),i,-1,1,g.rq.get());return(0,c.d)(r,(0,c.g)(g.rq.get(),o,n),e.origin),r}function I(e,t,r){const{origin:i,basis1:o,basis2:n}=e,a=(0,c.d)(g.rq.get(),t,i),s=(0,p.gr)(o,a),l=(0,p.gr)(n,a),d=(0,p.gr)(N(e),a);return(0,c.i)(r,s,l,d)}function w(e,t){const r=I(e,t,g.rq.get()),{basis1:i,basis2:o}=e,n=(0,c.l)(i),a=(0,c.l)(o),s=Math.max(Math.abs(r[0])-n,0),l=Math.max(Math.abs(r[1])-a,0),d=r[2];return s*s+l*l+d*d}function O(e,t){const r=-e.plane[3];return(0,p.gr)(N(e),t)-r}function N(e){return(0,m.Qj)(e.plane)}function y(e,t){const r=(0,c.d)(g.rq.get(),t,e.origin),i=(0,c.k)(e.basis1),o=(0,c.k)(e.basis2),n=(0,c.f)(e.basis1,r),a=(0,c.f)(e.basis2,r);return-n-i<0&&n-i<0&&-a-o<0&&a-o<0}function P(e,t){const r=G.get();return(0,c.c)(r.origin,e.origin),(0,c.c)(r.vector,t),r}function L(e,t,r){const{basis1:i,basis2:o,origin:n}=e,a=(0,c.h)(g.rq.get(),i,t.origin[0]),s=(0,c.h)(g.rq.get(),o,t.origin[1]);(0,c.g)(r.origin,a,s),(0,c.g)(r.origin,r.origin,n);const l=(0,c.h)(g.rq.get(),i,t.direction[0]),d=(0,c.h)(g.rq.get(),o,t.direction[1]);return(0,c.h)(r.vector,(0,c.g)(l,l,d),2),r}function H(e,t,r,i){const o=N(e);(0,m.mR)(o,t.direction,t.origin,r),(0,m.mR)((0,m.Qj)(r),o,t.origin,i)}const D={plane:(0,m.vt)(),origin:(0,l.fA)(0,0,0),basis1:(0,l.fA)(1,0,0),basis2:(0,l.fA)(0,1,0)},F=new n.I(m.vt),G=new n.I(h.vt),B=(0,l.vt)(),U=new n.I((()=>_())),z=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],V=(0,s.vt)(),W=(0,s.vt)(),j=Object.freeze(Object.defineProperty({__proto__:null,BoundedPlaneClass:class{constructor(){this.plane=(0,m.vt)(),this.origin=(0,l.vt)(),this.basis1=(0,l.vt)(),this.basis2=(0,l.vt)()}},altitudeAt:O,axisAt:function(e,t,r,i){return function(e,t,r){switch(t){case u._.X:(0,c.c)(r,e.basis1),(0,c.n)(r,r);break;case u._.Y:(0,c.c)(r,e.basis2),(0,c.n)(r,r);break;case u._.Z:(0,c.c)(r,N(e))}return r}(e,r,i)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:C,closestPointOnSilhouette:M,copy:T,copyWithoutVerify:function(e,t){(0,c.c)(t.origin,e.origin),(0,c.c)(t.basis1,e.basis1),(0,c.c)(t.basis2,e.basis2),(0,m.C)(t.plane,e.plane)},create:_,distance:function(e,t){return Math.sqrt(w(e,t))},distance2:w,distanceToSilhouette:function(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of z){const o=L(e,i,G.get()),n=(0,h.kb)(o,t);n>r&&(r=n)}return Math.sqrt(r)},elevate:E,equals:function(e,t){return(0,c.p)(e.basis1,t.basis1)&&(0,c.p)(e.basis2,t.basis2)&&(0,c.p)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,m.Tj)(e.plane,t)&&y(e,t)},fromAABoundingRect:b,fromValues:x,getExtent:function(e,t){const r=e.basis1[0],i=e.basis2[1],[o,n]=e.origin;return(0,d.fA)(o-r,n-i,o+i,n+i,t)},intersectRay:S,intersectRayClosestSilhouette:function(e,t,r){if(S(e,t,r))return r;const i=M(e,t,g.rq.get());return(0,c.g)(r,t.origin,(0,c.h)(g.rq.get(),t.direction,(0,c.j)(t.origin,i)/(0,c.l)(t.direction))),r},normal:N,projectPoint:R,projectPointLocal:I,rotate:function(e,t,r,i){return e!==i&&T(e,i),(0,a.$0)(W,t,r),(0,c.t)(i.basis1,e.basis1,W),(0,c.t)(i.basis2,e.basis2,W),A(i),i},setAltitudeAt:function(e,t,r,i){const o=O(e,t),n=(0,c.h)(B,N(e),r-o);return(0,c.g)(i,t,n),i},setExtent:function(e,t,r){return b(t,r),E(r,O(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&T(e,r),(0,a.B8)(V,t),(0,a.mg)(V,V),(0,c.t)(r.basis1,e.basis1,V),(0,c.t)(r.basis2,e.basis2,V),(0,c.t)((0,m.Qj)(r.plane),(0,m.Qj)(e.plane),V),(0,c.t)(r.origin,e.origin,t),(0,m.mP)(r.plane,r.plane,r.origin),r},up:D,updateUnboundedPlane:A,wrap:function(e,t,r){const i=U.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=(0,m.LV)(0,0,0,0),A(i),i}},Symbol.toStringTag,{value:"Module"}))},81139:(e,t,r)=>{r.d(t,{O:()=>i});class i{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}forEach(e){this._outer.forEach(((t,r)=>e(t,r)))}forAll(e){for(const t of this._outer.values())for(const r of t.values())e(r)}}},11964:(e,t,r)=>{r.d(t,{Cr:()=>l,H6:()=>h,_I:()=>u,kb:()=>d,vt:()=>c});var i=r(34727),o=r(4341),n=r(38954),a=r(51850),s=r(32114);function c(e){return e?{origin:(0,a.o8)(e.origin),vector:(0,a.o8)(e.vector)}:{origin:(0,a.vt)(),vector:(0,a.vt)()}}function l(e,t,r=c()){return(0,n.c)(r.origin,e),(0,n.d)(r.vector,t,e),r}function d(e,t){const r=(0,n.d)(s.rq.get(),t,e.origin),o=(0,n.f)(e.vector,r),a=(0,n.f)(e.vector,e.vector),c=(0,i.qE)(o/a,0,1),l=(0,n.d)(s.rq.get(),(0,n.h)(s.rq.get(),e.vector,c),r);return(0,n.f)(l,l)}function u(e,t,r){return h(e,t,0,1,r)}function h(e,t,r,o,a){const{vector:c,origin:l}=e,d=(0,n.d)(s.rq.get(),t,l),u=(0,n.f)(c,d)/(0,n.k)(c);return(0,n.h)(a,c,(0,i.qE)(u,r,o)),(0,n.g)(a,a,e.origin)}(0,a.vt)(),(0,a.vt)(),new o.I((()=>c()))},99677:(e,t,r)=>{r.d(t,{D:()=>o});var i=r(78888);async function o(e,t){const{data:r}=await(0,i.A)(e,{responseType:"image",...t});return r}},78662:(e,t,r)=>{r.d(t,{Gd:()=>u,VC:()=>h}),r(44208);var i,o,n,a=r(34727),s=(r(77690),r(29242),r(58083),r(9093)),c=r(38954),l=r(51850),d=(r(31756),r(26857),r(2597));(n=i||(i={}))[n.Undefined=0]="Undefined",n[n.DefinedSize=1]="DefinedSize",n[n.DefinedScale=2]="DefinedScale",function(e){e[e.Undefined=0]="Undefined",e[e.DefinedAngle=1]="DefinedAngle"}(o||(o={}));class u extends d.Y{constructor(e){super(),this.vvSize=e?.size??null,this.vvColor=e?.color??null,this.vvOpacity=e?.opacity??null}}function h(e,t,r){if(!t.vvSize)return(0,c.i)(e,1,1,1),e;for(let i=0;i<3;++i){const o=t.vvSize.offset[i]+r[0]*t.vvSize.factor[i];e[i]=(0,a.qE)(o,t.vvSize.minSize[i],t.vvSize.maxSize[i])}return e}(0,s.vt)(),(0,l.vt)(),(0,s.vt)()},26857:(e,t,r)=>{r.d(t,{b:()=>c});var i=r(90237),o=r(69622),n=r(10107),a=(r(44208),r(53966),r(87811),r(40608));let s=class extends o.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.TESTS_DISABLE_OPTIMIZATIONS=!1,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1}};(0,i._)([(0,n.MZ)()],s.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"LABELS_SHOW_BORDER",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"TEXT_SHOW_BORDER",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"SHOW_POI",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"TESTS_DISABLE_OPTIMIZATIONS",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"LINE_WIREFRAMES",void 0),s=(0,i._)([(0,a.$)("esri.views.3d.support.debugFlags")],s);const c=new s},46686:(e,t,r)=>{r.d(t,{i$:()=>l,oD:()=>d,xJ:()=>c});var i=r(49255),o=r(33752),n=r(47286),a=r(2597);function s(e){e.varyings.add("linearDepth","float")}function c(e){e.vertex.uniforms.add(new n.G("nearFar",((e,t)=>t.camera.nearFar)))}function l(e){e.vertex.code.add(a.H`float calculateLinearDepth(vec2 nearFar,float z) {
225
+ fragBlur = b / w_total;`),e}const m=Object.freeze(Object.defineProperty({__proto__:null,build:h},Symbol.toStringTag,{value:"Module"}))},17352:(e,t,r)=>{r.d(t,{b:()=>j,f:()=>x}),r(44208);var i=r(53966),o=r(34727),n=r(4341),a=r(58083),s=r(9093),c=r(38954),l=r(51850),d=r(19419),u=r(88582),h=r(11964),m=r(27921),f=r(71351),p=r(44280),g=r(32114);const v=()=>i.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function _(e=D){return{plane:(0,m.vt)(e.plane),origin:(0,l.o8)(e.origin),basis1:(0,l.o8)(e.basis1),basis2:(0,l.o8)(e.basis2)}}function T(e,t=_()){return x(e.origin,e.basis1,e.basis2,t)}function x(e,t,r,i=_()){return(0,c.c)(i.origin,e),(0,c.c)(i.basis1,t),(0,c.c)(i.basis2,r),A(i),function(e,t){Math.abs((0,c.f)(e.basis1,e.basis2)/((0,c.l)(e.basis1)*(0,c.l)(e.basis2)))>1e-6&&v().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,c.f)(e.basis1,N(e)))>1e-6&&v().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,c.f)(N(e),e.origin)-e.plane[3])>1e-6&&v().warn(t,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function A(e){(0,m.mR)(e.basis2,e.basis1,e.origin,e.plane)}function E(e,t,r){e!==r&&T(e,r);const i=(0,c.h)(g.rq.get(),N(e),t);return(0,c.g)(r.origin,r.origin,i),r.plane[3]-=t,r}function b(e,t=_()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return(0,c.i)(t.origin,e[0]+r,e[1]+i,0),(0,c.i)(t.basis1,r,0,0),(0,c.i)(t.basis2,0,i,0),(0,m.fA)(0,0,1,0,t.plane),t}function S(e,t,r){return!!(0,m.Ui)(e.plane,t,r)&&y(e,r)}function M(e,t,r){const i=F.get();H(e,t,i,F.get());let n=Number.POSITIVE_INFINITY;for(const a of z){const s=L(e,a,G.get()),l=g.rq.get();if((0,m.T7)(i,s,l)){const e=(0,c.o)(g.rq.get(),t.origin,l),i=Math.abs((0,o.XM)((0,c.f)(t.direction,e)));i<n&&(n=i,(0,c.c)(r,l))}}return n===Number.POSITIVE_INFINITY?C(e,t,r):r}function C(e,t,r){if(S(e,t,r))return r;const i=F.get(),o=F.get();H(e,t,i,o);let n=Number.POSITIVE_INFINITY;for(const a of z){const s=L(e,a,G.get()),l=g.rq.get();if((0,m.gv)(i,s,l)){const e=(0,f.kb)(t,l);if(!(0,m.Tj)(o,l))continue;e<n&&(n=e,(0,c.c)(r,l))}}return w(e,t.origin)<n&&R(e,t.origin,r),r}function R(e,t,r){const i=(0,m._I)(e.plane,t,g.rq.get()),o=(0,h.H6)(P(e,e.basis1),i,-1,1,g.rq.get()),n=(0,h.H6)(P(e,e.basis2),i,-1,1,g.rq.get());return(0,c.d)(r,(0,c.g)(g.rq.get(),o,n),e.origin),r}function I(e,t,r){const{origin:i,basis1:o,basis2:n}=e,a=(0,c.d)(g.rq.get(),t,i),s=(0,p.gr)(o,a),l=(0,p.gr)(n,a),d=(0,p.gr)(N(e),a);return(0,c.i)(r,s,l,d)}function w(e,t){const r=I(e,t,g.rq.get()),{basis1:i,basis2:o}=e,n=(0,c.l)(i),a=(0,c.l)(o),s=Math.max(Math.abs(r[0])-n,0),l=Math.max(Math.abs(r[1])-a,0),d=r[2];return s*s+l*l+d*d}function O(e,t){const r=-e.plane[3];return(0,p.gr)(N(e),t)-r}function N(e){return(0,m.Qj)(e.plane)}function y(e,t){const r=(0,c.d)(g.rq.get(),t,e.origin),i=(0,c.k)(e.basis1),o=(0,c.k)(e.basis2),n=(0,c.f)(e.basis1,r),a=(0,c.f)(e.basis2,r);return-n-i<0&&n-i<0&&-a-o<0&&a-o<0}function P(e,t){const r=G.get();return(0,c.c)(r.origin,e.origin),(0,c.c)(r.vector,t),r}function L(e,t,r){const{basis1:i,basis2:o,origin:n}=e,a=(0,c.h)(g.rq.get(),i,t.origin[0]),s=(0,c.h)(g.rq.get(),o,t.origin[1]);(0,c.g)(r.origin,a,s),(0,c.g)(r.origin,r.origin,n);const l=(0,c.h)(g.rq.get(),i,t.direction[0]),d=(0,c.h)(g.rq.get(),o,t.direction[1]);return(0,c.h)(r.vector,(0,c.g)(l,l,d),2),r}function H(e,t,r,i){const o=N(e);(0,m.mR)(o,t.direction,t.origin,r),(0,m.mR)((0,m.Qj)(r),o,t.origin,i)}const D={plane:(0,m.vt)(),origin:(0,l.fA)(0,0,0),basis1:(0,l.fA)(1,0,0),basis2:(0,l.fA)(0,1,0)},F=new n.I(m.vt),G=new n.I(h.vt),B=(0,l.vt)(),U=new n.I((()=>_())),z=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],V=(0,s.vt)(),W=(0,s.vt)(),j=Object.freeze(Object.defineProperty({__proto__:null,BoundedPlaneClass:class{constructor(){this.plane=(0,m.vt)(),this.origin=(0,l.vt)(),this.basis1=(0,l.vt)(),this.basis2=(0,l.vt)()}},altitudeAt:O,axisAt:function(e,t,r,i){return function(e,t,r){switch(t){case u._.X:(0,c.c)(r,e.basis1),(0,c.n)(r,r);break;case u._.Y:(0,c.c)(r,e.basis2),(0,c.n)(r,r);break;case u._.Z:(0,c.c)(r,N(e))}return r}(e,r,i)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:C,closestPointOnSilhouette:M,copy:T,copyWithoutVerify:function(e,t){(0,c.c)(t.origin,e.origin),(0,c.c)(t.basis1,e.basis1),(0,c.c)(t.basis2,e.basis2),(0,m.C)(t.plane,e.plane)},create:_,distance:function(e,t){return Math.sqrt(w(e,t))},distance2:w,distanceToSilhouette:function(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of z){const o=L(e,i,G.get()),n=(0,h.kb)(o,t);n>r&&(r=n)}return Math.sqrt(r)},elevate:E,equals:function(e,t){return(0,c.p)(e.basis1,t.basis1)&&(0,c.p)(e.basis2,t.basis2)&&(0,c.p)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,m.Tj)(e.plane,t)&&y(e,t)},fromAABoundingRect:b,fromValues:x,getExtent:function(e,t){const r=e.basis1[0],i=e.basis2[1],[o,n]=e.origin;return(0,d.fA)(o-r,n-i,o+i,n+i,t)},intersectRay:S,intersectRayClosestSilhouette:function(e,t,r){if(S(e,t,r))return r;const i=M(e,t,g.rq.get());return(0,c.g)(r,t.origin,(0,c.h)(g.rq.get(),t.direction,(0,c.j)(t.origin,i)/(0,c.l)(t.direction))),r},normal:N,projectPoint:R,projectPointLocal:I,rotate:function(e,t,r,i){return e!==i&&T(e,i),(0,a.$0)(W,t,r),(0,c.t)(i.basis1,e.basis1,W),(0,c.t)(i.basis2,e.basis2,W),A(i),i},setAltitudeAt:function(e,t,r,i){const o=O(e,t),n=(0,c.h)(B,N(e),r-o);return(0,c.g)(i,t,n),i},setExtent:function(e,t,r){return b(t,r),E(r,O(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&T(e,r),(0,a.B8)(V,t),(0,a.mg)(V,V),(0,c.t)(r.basis1,e.basis1,V),(0,c.t)(r.basis2,e.basis2,V),(0,c.t)((0,m.Qj)(r.plane),(0,m.Qj)(e.plane),V),(0,c.t)(r.origin,e.origin,t),(0,m.mP)(r.plane,r.plane,r.origin),r},up:D,updateUnboundedPlane:A,wrap:function(e,t,r){const i=U.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=(0,m.LV)(0,0,0,0),A(i),i}},Symbol.toStringTag,{value:"Module"}))},81139:(e,t,r)=>{r.d(t,{O:()=>i});class i{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}forEach(e){this._outer.forEach(((t,r)=>e(t,r)))}forAll(e){for(const t of this._outer.values())for(const r of t.values())e(r)}}},11964:(e,t,r)=>{r.d(t,{Cr:()=>l,H6:()=>h,_I:()=>u,kb:()=>d,vt:()=>c});var i=r(34727),o=r(4341),n=r(38954),a=r(51850),s=r(32114);function c(e){return e?{origin:(0,a.o8)(e.origin),vector:(0,a.o8)(e.vector)}:{origin:(0,a.vt)(),vector:(0,a.vt)()}}function l(e,t,r=c()){return(0,n.c)(r.origin,e),(0,n.d)(r.vector,t,e),r}function d(e,t){const r=(0,n.d)(s.rq.get(),t,e.origin),o=(0,n.f)(e.vector,r),a=(0,n.f)(e.vector,e.vector),c=(0,i.qE)(o/a,0,1),l=(0,n.d)(s.rq.get(),(0,n.h)(s.rq.get(),e.vector,c),r);return(0,n.f)(l,l)}function u(e,t,r){return h(e,t,0,1,r)}function h(e,t,r,o,a){const{vector:c,origin:l}=e,d=(0,n.d)(s.rq.get(),t,l),u=(0,n.f)(c,d)/(0,n.k)(c);return(0,n.h)(a,c,(0,i.qE)(u,r,o)),(0,n.g)(a,a,e.origin)}(0,a.vt)(),(0,a.vt)(),new o.I((()=>c()))},99677:(e,t,r)=>{r.d(t,{D:()=>o});var i=r(78888);async function o(e,t){const{data:r}=await(0,i.A)(e,{responseType:"image",...t});return r}},78662:(e,t,r)=>{r.d(t,{Gd:()=>u,VC:()=>h}),r(44208);var i,o,n,a=r(34727),s=(r(77690),r(29242),r(58083),r(9093)),c=r(38954),l=r(51850),d=(r(31756),r(26857),r(2597));(n=i||(i={}))[n.Undefined=0]="Undefined",n[n.DefinedSize=1]="DefinedSize",n[n.DefinedScale=2]="DefinedScale",function(e){e[e.Undefined=0]="Undefined",e[e.DefinedAngle=1]="DefinedAngle"}(o||(o={}));class u extends d.Y{constructor(e){super(),this.vvSize=e?.size??null,this.vvColor=e?.color??null,this.vvOpacity=e?.opacity??null}}function h(e,t,r){if(!t.vvSize)return(0,c.i)(e,1,1,1),e;for(let i=0;i<3;++i){const o=t.vvSize.offset[i]+r[0]*t.vvSize.factor[i];e[i]=(0,a.qE)(o,t.vvSize.minSize[i],t.vvSize.maxSize[i])}return e}(0,s.vt)(),(0,l.vt)(),(0,s.vt)()},26857:(e,t,r)=>{r.d(t,{b:()=>c});var i=r(90237),o=r(69622),n=r(10107),a=(r(44208),r(53966),r(87811),r(40608));let s=class extends o.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.TESTS_DISABLE_OPTIMIZATIONS=!1,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1}};(0,i._)([(0,n.MZ)()],s.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"LABELS_SHOW_BORDER",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"TEXT_SHOW_BORDER",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"SHOW_POI",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"TESTS_DISABLE_OPTIMIZATIONS",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i._)([(0,n.MZ)()],s.prototype,"LINE_WIREFRAMES",void 0),s=(0,i._)([(0,a.$)("esri.views.3d.support.debugFlags")],s);const c=new s},46686:(e,t,r)=>{r.d(t,{i$:()=>l,oD:()=>d,xJ:()=>c});var i=r(49255),o=r(33752),n=r(47286),a=r(2597);function s(e){e.varyings.add("linearDepth","float")}function c(e){e.vertex.uniforms.add(new n.G("nearFar",((e,t)=>t.camera.nearFar)))}function l(e){e.vertex.code.add(a.H`float calculateLinearDepth(vec2 nearFar,float z) {
226
226
  return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
227
227
  }`)}function d(e,t){const{vertex:r}=e;switch(t.output){case i.V.Color:case i.V.ColorEmission:if(t.receiveShadows)return s(e),void r.code.add(a.H`void forwardLinearDepth() { linearDepth = gl_Position.w; }`);break;case i.V.Shadow:case i.V.ShadowHighlight:case i.V.ShadowExcludeHighlight:case i.V.ViewshedShadow:return e.include(o.em,t),s(e),c(e),l(e),void r.code.add(a.H`void forwardLinearDepth() {
228
228
  linearDepth = calculateLinearDepth(nearFar, vPosition_view.z);
@@ -479,7 +479,7 @@ fragHighlight = combinedHighlight;
479
479
  }
480
480
  bool isHighlightOccluded() {
481
481
  float sceneDepth = texelFetch(depthTexture, ivec2(gl_FragCoord.xy), 0).x;
482
- return gl_FragCoord.z > sceneDepth + 5e-5;
482
+ return gl_FragCoord.z > sceneDepth + 5e-7;
483
483
  }
484
484
  void calculateOcclusionAndOutputHighlight() {
485
485
  outputHighlight(isHighlightOccluded());
@@ -985,4 +985,4 @@ return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScal
985
985
  calculateOcclusionAndOutputHighlight();
986
986
  ${(0,c.If)(r,"outputObjectAndLayerIdColor();")}
987
987
  }
988
- `)}},36421:(e,t,r)=>{var i;r.d(t,{p:()=>i}),function(e){e[e.Texture=0]="Texture",e[e.RenderBuffer=1]="RenderBuffer"}(i||(i={}))},21231:(e,t,r)=>{r.d(t,{g:()=>l});var i=r(49186),o=(r(44208),r(94656)),n=r(63907),a=r(36421),s=r(67171);class c extends s.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case n.H0.R16F:case n.H0.R16I:case n.H0.R16UI:case n.H0.R32F:case n.H0.R32I:case n.H0.R32UI:case n.H0.R8_SNORM:case n.H0.R8:case n.H0.R8I:case n.H0.R8UI:this.pixelFormat=n.Ab.RED}}static validate(e,t){return new c(e,t)}}let l=class e{constructor(e,t=null,r=null){if(this.type=a.p.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{const r=c.validate(e,t);if(!r)throw new i.A("Texture descriptor invalid");this._descriptor=r}this._descriptor.target===n.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,s.e)(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}dispose(){this._glName&&this._descriptor.context.instanceCounter.decrement(n.vt.Texture,this),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===n.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}_setDataCubeMap(e=null){for(let t=n.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=n.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;t++)this._setData(e,t)}setData(e){this._setData(e)}_setData(t,r){const a=this._descriptor.context?.gl;if(!a)return;(0,o.Y2)(a),this._glName||(this._glName=a.createTexture(),this._glName&&this._descriptor.context.instanceCounter.increment(n.vt.Texture,this));const s=this._descriptor,c=r??s.target,l=p(c),v=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),d(s),this._configurePixelStorage(),(0,o.Y2)(a);const _=this._deriveInternalFormat();if(f(t)){let e="width"in t?t.width:t.codedWidth,r="height"in t?t.height:t.codedHeight;const i=1;t instanceof HTMLVideoElement&&(e=t.videoWidth,r=t.videoHeight),s.width&&s.height,l&&s.depth,s.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,_,s.hasMipmap,e,r,i),this._texImage(c,0,_,e,r,i,t),(0,o.Y2)(a),s.hasMipmap&&(this.generateMipmap(),(0,o.Y2)(a)),s.width||(s.width=e),s.height||(s.height=r),l&&!s.depth&&(s.depth=i)}else{const{width:e,height:r,depth:d}=s;if(null==e||null==r)throw new i.A("Width and height must be specified!");if(l&&null==d)throw new i.A("Depth must be specified!");if(s.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,_,s.hasMipmap,e,r,d),m(t)){const o=t.levels,l=g(c,e,r,d),u=Math.min(l-1,o.length-1);a.texParameteri(s.target,this._descriptor.context.gl.TEXTURE_MAX_LEVEL,u);const h=_;if(!(h in n.CQ))throw new i.A("Attempting to use compressed data with an uncompressed format!");this._forEachMipmapLevel(((e,t,r,i)=>{const n=o[Math.min(e,o.length-1)];this._compressedTexImage(c,e,h,t,r,i,n)}),u)}else this._texImage(c,0,_,e,r,d,t),(0,o.Y2)(a),s.hasMipmap&&this.generateMipmap()}u(a,this._descriptor),h(a,this._descriptor),function(e,t){const r=e.capabilities.textureFilterAnisotropic;r&&e.gl.texParameterf(t.target,r.TEXTURE_MAX_ANISOTROPY,t.maxAnisotropy??1)}(this._descriptor.context,this._descriptor),(0,o.Y2)(a),this._descriptor.context.bindTexture(v,e.TEXTURE_UNIT_FOR_UPDATES)}updateData(t,r,o,n,a,s,c=0){s||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const l=this._descriptor,d=this._deriveInternalFormat(),{context:u,pixelFormat:h,dataType:p,target:g,isImmutable:v}=l;if(v&&!this._wasImmutablyAllocated)throw new i.A("Cannot update immutable texture before allocation!");const _=u.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||o<0||r+n>l.width||o+a>l.height)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:T}=u;c&&T.pixelStorei(T.UNPACK_SKIP_ROWS,c),f(s)?T.texSubImage2D(g,t,r,o,n,a,h,p,s):m(s)?T.compressedTexSubImage2D(g,t,r,o,n,a,d,s.levels[t]):T.texSubImage2D(g,t,r,o,n,a,h,p,s),c&&T.pixelStorei(T.UNPACK_SKIP_ROWS,0),u.bindTexture(_,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,o,n,a,s,c,l){l||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const d=this._descriptor,u=this._deriveInternalFormat(),{context:h,pixelFormat:f,dataType:g,isImmutable:v,target:_}=d;if(v&&!this._wasImmutablyAllocated)throw new i.A("Cannot update immutable texture before allocation!");p(_)||console.warn("Attempting to set 3D texture data on a non-3D texture");const T=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);h.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||o<0||n<0||r+a>d.width||o+s>d.height||n+c>d.depth)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:x}=h;if(m(l))l=l.levels[t],x.compressedTexSubImage3D(_,t,r,o,n,a,s,c,u,l);else{const e=l;x.texSubImage3D(_,t,r,o,n,a,s,c,f,g,e)}h.bindTexture(T,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,d(t)}t.samplingMode===n.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=n.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===n.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=n.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,d(e)}e.samplingMode===n.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=n.Cj.LINEAR):e.samplingMode===n.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=n.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,d(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){const e=this._descriptor,t=e.context.gl;this._samplingModeDirty&&(u(t,e),this._samplingModeDirty=!1),this._wrapModeDirty&&(h(t,e),this._wrapModeDirty=!1)}_deriveInternalFormat(){if(null!=this._descriptor.internalFormat)return this._descriptor.internalFormat===n.Ab.DEPTH_STENCIL&&(this._descriptor.internalFormat=n.Ab.DEPTH24_STENCIL8),this._descriptor.internalFormat;switch(this._descriptor.dataType){case n.ld.FLOAT:switch(this._descriptor.pixelFormat){case n.Ab.RGBA:return this._descriptor.internalFormat=n.H0.RGBA32F;case n.Ab.RGB:return this._descriptor.internalFormat=n.H0.RGB32F;default:throw new i.A("Unable to derive format")}case n.ld.UNSIGNED_BYTE:switch(this._descriptor.pixelFormat){case n.Ab.RGBA:return this._descriptor.internalFormat=n.H0.RGBA8;case n.Ab.RGB:return this._descriptor.internalFormat=n.H0.RGB8}}return this._descriptor.internalFormat=this._descriptor.pixelFormat===n.Ab.DEPTH_STENCIL?n.Ab.DEPTH24_STENCIL8:this._descriptor.pixelFormat}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i?1:0)}_texStorage(e,t,r,o,a,s){const{gl:c}=this._descriptor.context;if(!(t in n.H0))throw new i.A("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const l=r?g(e,o,a,s):1;if(p(e)){if(null==s)throw new i.A("Missing depth dimension for 3D texture upload");c.texStorage3D(e,l,t,o,a,s)}else c.texStorage2D(e,l,t,o,a);this._wasImmutablyAllocated=!0}_texImage(e,t,r,o,n,a,s){const c=this._descriptor.context.gl,l=p(e),{isImmutable:d,pixelFormat:u,dataType:h}=this._descriptor;if(d){if(null!=s){const r=s;if(l){if(null==a)throw new i.A("Missing depth dimension for 3D texture upload");c.texSubImage3D(e,t,0,0,0,o,n,a,u,h,r)}else c.texSubImage2D(e,t,0,0,o,n,u,h,r)}}else{const d=s;if(l){if(null==a)throw new i.A("Missing depth dimension for 3D texture upload");c.texImage3D(e,t,r,o,n,a,0,u,h,d)}else c.texImage2D(e,t,r,o,n,0,u,h,d)}}_compressedTexImage(e,t,r,o,n,a,s){const c=this._descriptor.context.gl,l=p(e);if(this._descriptor.isImmutable){if(null!=s)if(l){if(null==a)throw new i.A("Missing depth dimension for 3D texture upload");c.compressedTexSubImage3D(e,t,0,0,0,o,n,a,r,s)}else c.compressedTexSubImage2D(e,t,0,0,o,n,r,s)}else if(l){if(null==a)throw new i.A("Missing depth dimension for 3D texture upload");c.compressedTexImage3D(e,t,r,o,n,a,0,s)}else c.compressedTexImage2D(e,t,r,o,n,0,s)}_forEachMipmapLevel(e,t=1/0){let{width:r,height:o,depth:a,hasMipmap:s,target:c}=this._descriptor;const l=c===n.Ap.TEXTURE_3D;if(null==r||null==o||l&&null==a)throw new i.A("Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,o,a),s&&(1!==r||1!==o||l&&1!==a)&&!(i>=t);++i)r=Math.max(1,r>>1),o=Math.max(1,o>>1),l&&(a=Math.max(1,a>>1))}};function d(e){(null!=e.width&&e.width<0||null!=e.height&&e.height<0||null!=e.depth&&e.depth<0)&&console.error("Negative dimension parameters are not allowed!")}function u(e,t){let r=t.samplingMode,i=t.samplingMode;r===n.Cj.LINEAR_MIPMAP_NEAREST||r===n.Cj.LINEAR_MIPMAP_LINEAR?(r=n.Cj.LINEAR,t.hasMipmap||(i=n.Cj.LINEAR)):r!==n.Cj.NEAREST_MIPMAP_NEAREST&&r!==n.Cj.NEAREST_MIPMAP_LINEAR||(r=n.Cj.NEAREST,t.hasMipmap||(i=n.Cj.NEAREST)),e.texParameteri(t.target,e.TEXTURE_MAG_FILTER,r),e.texParameteri(t.target,e.TEXTURE_MIN_FILTER,i)}function h(e,t){"number"==typeof t.wrapMode?(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode.t))}function m(e){return null!=e&&"type"in e&&"compressed"===e.type}function f(e){return null!=e&&!m(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function p(e){return e===n.Ap.TEXTURE_3D||e===n.Ap.TEXTURE_2D_ARRAY}function g(e,t,r,i=1){let o=Math.max(t,r);return e===n.Ap.TEXTURE_3D&&(o=Math.max(o,i)),Math.round(Math.log(o)/Math.LN2)+1}l.TEXTURE_UNIT_FOR_UPDATES=0},67171:(e,t,r)=>{r.d(t,{R:()=>n,e:()=>a});var i=r(63907),o=r(42293);class n{constructor(e=0,t=e){this.width=e,this.height=t,this.target=i.Ap.TEXTURE_2D,this.pixelFormat=i.Ab.RGBA,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=i.Cj.LINEAR,this.wrapMode=i.pF.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.depth=1,this.isImmutable=!1}}function a(e){return e.width<=0||e.height<=0?0:Math.round(e.width*e.height*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,o.IB)(e.internalFormat)))}},42293:(e,t,r)=>{r.d(t,{Hi:()=>c,IB:()=>l,yu:()=>s}),r(44208);var i=r(94656),o=r(63907),n=r(62298);function a(e){const t=e.gl;switch(t.getError()){case t.NO_ERROR:return null;case t.INVALID_ENUM:return"An unacceptable value has been specified for an enumerated argument";case t.INVALID_VALUE:return"An unacceptable value has been specified for an argument";case t.INVALID_OPERATION:return"The specified command is not allowed for the current state";case t.INVALID_FRAMEBUFFER_OPERATION:return"The currently bound framebuffer is not framebuffer complete";case t.OUT_OF_MEMORY:return"Not enough memory is left to execute the command";case t.CONTEXT_LOST_WEBGL:return"WebGL context is lost"}return"Unknown error"}function s(e,t,r,o,s=0){const c=e.gl;e.bindBuffer(r);for(const r of o){const o=t.get(r.name);if(null==o){console.warn(`There is no location for vertex attribute '${r.name}' defined.`);continue}const l=s*r.stride;if(r.count<=4)c.vertexAttribPointer(o,r.count,r.type,r.normalized,r.stride,r.offset+l),c.enableVertexAttribArray(o),r.divisor>0&&e.gl.vertexAttribDivisor(o,r.divisor);else if(9===r.count)for(let t=0;t<3;t++)c.vertexAttribPointer(o+t,3,r.type,r.normalized,r.stride,r.offset+12*t+l),c.enableVertexAttribArray(o+t),r.divisor>0&&e.gl.vertexAttribDivisor(o+t,r.divisor);else if(16===r.count)for(let t=0;t<4;t++)c.vertexAttribPointer(o+t,4,r.type,r.normalized,r.stride,r.offset+16*t+l),c.enableVertexAttribArray(o+t),r.divisor>0&&e.gl?.vertexAttribDivisor(o+t,r.divisor);else console.error("Unsupported vertex attribute element count: "+r.count);if((0,i.en)()){const t=a(e),i=(0,n._)(r.type),o=r.offset,s=Math.round(i/o)!==i/o?`. Offset not a multiple of stride. DataType requires ${i} bytes, but descriptor has an offset of ${o}`:"";t&&console.error(`Unable to bind vertex attribute "${r.name}" with baseInstanceOffset ${l}${s}:`,t,r)}}}function c(e,t,r,i){const n=e.gl;e.bindBuffer(r);for(const r of i){const i=t.get(r.name);if(r.count<=4)n.disableVertexAttribArray(i),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(i,0);else if(9===r.count)for(let t=0;t<3;t++)n.disableVertexAttribArray(i+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(i+t,0);else if(16===r.count)for(let t=0;t<4;t++)n.disableVertexAttribArray(i+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(i+t,0);else console.error("Unsupported vertex attribute element count: "+r.count)}e.unbindBuffer(o.NZ.ARRAY_BUFFER)}function l(e){switch(e){case o.Ab.ALPHA:case o.Ab.LUMINANCE:case o.Ab.RED:case o.Ab.RED_INTEGER:case o.H0.R8:case o.H0.R8I:case o.H0.R8UI:case o.H0.R8_SNORM:case o.yQ.STENCIL_INDEX8:return 1;case o.Ab.LUMINANCE_ALPHA:case o.Ab.RG:case o.Ab.RG_INTEGER:case o.H0.RGBA4:case o.H0.R16F:case o.H0.R16I:case o.H0.R16UI:case o.H0.RG8:case o.H0.RG8I:case o.H0.RG8UI:case o.H0.RG8_SNORM:case o.H0.RGB565:case o.H0.RGB5_A1:case o.yQ.DEPTH_COMPONENT16:return 2;case o.Ab.DEPTH_COMPONENT:case o.Ab.RGB:case o.Ab.RGB_INTEGER:case o.H0.RGB8:case o.H0.RGB8I:case o.H0.RGB8UI:case o.H0.RGB8_SNORM:case o.H0.SRGB8:case o.yQ.DEPTH_COMPONENT24:return 3;case o.Ab.DEPTH_STENCIL:case o.Ab.DEPTH24_STENCIL8:case o.Ab.RGBA:case o.Ab.RGBA_INTEGER:case o.H0.RGBA8:case o.H0.R32F:case o.H0.R11F_G11F_B10F:case o.H0.RG16F:case o.H0.R32I:case o.H0.R32UI:case o.H0.RG16I:case o.H0.RG16UI:case o.H0.RGBA8I:case o.H0.RGBA8UI:case o.H0.RGBA8_SNORM:case o.H0.SRGB8_ALPHA8:case o.H0.RGB9_E5:case o.H0.RGB10_A2UI:case o.H0.RGB10_A2:case o.yQ.DEPTH_STENCIL:case o.yQ.DEPTH_COMPONENT32F:case o.yQ.DEPTH24_STENCIL8:return 4;case o.yQ.DEPTH32F_STENCIL8:return 5;case o.H0.RGB16F:case o.H0.RGB16I:case o.H0.RGB16UI:return 6;case o.H0.RG32F:case o.H0.RG32I:case o.H0.RG32UI:case o.H0.RGBA16F:case o.H0.RGBA16I:case o.H0.RGBA16UI:return 8;case o.H0.RGB32F:case o.H0.RGB32I:case o.H0.RGB32UI:return 12;case o.H0.RGBA32F:case o.H0.RGBA32I:case o.H0.RGBA32UI:return 16;case o.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case o.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case o.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case o.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case o.CQ.COMPRESSED_R11_EAC:case o.CQ.COMPRESSED_SIGNED_R11_EAC:case o.CQ.COMPRESSED_RGB8_ETC2:case o.CQ.COMPRESSED_SRGB8_ETC2:case o.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case o.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case o.CQ.COMPRESSED_RG11_EAC:case o.CQ.COMPRESSED_SIGNED_RG11_EAC:case o.CQ.COMPRESSED_RGBA8_ETC2_EAC:case o.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},94656:(e,t,r)=>{r.d(t,{Xc:()=>l,Y2:()=>d,en:()=>c});var i=r(49186),o=r(44208),n=r(53966);const a=()=>n.A.getLogger("esri.views.webgl.checkWebGLError"),s=!!(0,o.A)("enable-feature:webgl-debug");function c(){return s}function l(){return s}function d(e){if(c()){const t=e.getError();if(t){const r=function(e,t){switch(t){case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(e,t),o=(new Error).stack;a().error(new i.A("webgl-error","WebGL error occurred",{message:r,stack:o}))}}}},28449:(e,t,r)=>{function i(e,t,r){for(let i=0;i<r;++i)t[2*i]=e[i],t[2*i+1]=e[i]-t[2*i]}function o(e,t){const r=e.length;for(let i=0;i<r;++i)a[0]=e[i],t[i]=a[0];return t}function n(e,t){const r=e.length;for(let i=0;i<r;++i)a[0]=e[i],a[1]=e[i]-a[0],t[i]=a[1];return t}r.d(t,{Zo:()=>o,jA:()=>n,jS:()=>i});const a=new Float32Array(2)},62298:(e,t,r)=>{r.d(t,{_:()=>o});var i=r(63907);function o(e){switch(e){case i.pe.BYTE:case i.pe.UNSIGNED_BYTE:return 1;case i.pe.SHORT:case i.pe.UNSIGNED_SHORT:case i.pe.HALF_FLOAT:return 2;case i.pe.FLOAT:case i.pe.INT:case i.pe.UNSIGNED_INT:return 4}}},90644:(e,t,r)=>{r.d(t,{Ey:()=>b,Ky:()=>c,Os:()=>s,Uy:()=>h,Xt:()=>u,kn:()=>m,p3:()=>a});var i=r(89192),o=r(63907);function n(e,t,r=o.Tb.ADD,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function a(e,t,r,i,n=o.Tb.ADD,a=o.Tb.ADD,s=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:n,opAlpha:a,color:{r:s[0],g:s[1],b:s[2],a:s[3]}}}n(o.dn.ZERO,o.dn.ONE_MINUS_SRC_ALPHA),n(o.dn.ONE,o.dn.ZERO),n(o.dn.ONE,o.dn.ONE);const s=n(o.dn.ONE,o.dn.ONE_MINUS_SRC_ALPHA),c=a(o.dn.SRC_ALPHA,o.dn.ONE,o.dn.ONE_MINUS_SRC_ALPHA,o.dn.ONE_MINUS_SRC_ALPHA),l={face:o.Y7.BACK,mode:o.Ac.CCW},d={face:o.Y7.FRONT,mode:o.Ac.CCW},u=e=>e===i.s2.Back?l:e===i.s2.Front?d:null,h={zNear:0,zFar:1},m={r:!0,g:!0,b:!0,a:!0};function f(e){return C.intern(e)}function p(e){return I.intern(e)}function g(e){return O.intern(e)}function v(e){return y.intern(e)}function _(e){return L.intern(e)}function T(e){return D.intern(e)}function x(e){return G.intern(e)}function A(e){return U.intern(e)}function E(e){return V.intern(e)}function b(e){return j.intern(e)}class S{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;const t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function M(e){return"["+e.join(",")+"]"}const C=new S(R,(e=>({__tag:"Blending",...e})));function R(e){return e?M([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const I=new S(w,(e=>({__tag:"Culling",...e})));function w(e){return e?M([e.face,e.mode]):null}const O=new S(N,(e=>({__tag:"PolygonOffset",...e})));function N(e){return e?M([e.factor,e.units]):null}const y=new S(P,(e=>({__tag:"DepthTest",...e})));function P(e){return e?M([e.func]):null}const L=new S(H,(e=>({__tag:"StencilTest",...e})));function H(e){return e?M([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const D=new S(F,(e=>({__tag:"DepthWrite",...e})));function F(e){return e?M([e.zNear,e.zFar]):null}const G=new S(B,(e=>({__tag:"ColorWrite",...e})));function B(e){return e?M([e.r,e.g,e.b,e.a]):null}const U=new S(z,(e=>({__tag:"StencilWrite",...e})));function z(e){return e?M([e.mask]):null}const V=new S(W,(e=>({__tag:"DrawBuffers",...e})));function W(e){return e?M(e.buffers):null}const j=new S((function(e){return e?M([R(e.blending),w(e.culling),N(e.polygonOffset),P(e.depthTest),H(e.stencilTest),F(e.depthWrite),B(e.colorWrite),z(e.stencilWrite),W(e.drawBuffers)]):null}),(e=>({blending:f(e.blending),culling:p(e.culling),polygonOffset:g(e.polygonOffset),depthTest:v(e.depthTest),stencilTest:_(e.stencilTest),depthWrite:T(e.depthWrite),colorWrite:x(e.colorWrite),stencilWrite:A(e.stencilWrite),drawBuffers:E(e.drawBuffers)})))}}]);
988
+ `)}},36421:(e,t,r)=>{var i;r.d(t,{p:()=>i}),function(e){e[e.Texture=0]="Texture",e[e.RenderBuffer=1]="RenderBuffer"}(i||(i={}))},21231:(e,t,r)=>{r.d(t,{g:()=>l});var i=r(49186),o=(r(44208),r(94656)),n=r(63907),a=r(36421),s=r(67171);class c extends s.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case n.H0.R16F:case n.H0.R16I:case n.H0.R16UI:case n.H0.R32F:case n.H0.R32I:case n.H0.R32UI:case n.H0.R8_SNORM:case n.H0.R8:case n.H0.R8I:case n.H0.R8UI:this.pixelFormat=n.Ab.RED}}static validate(e,t){return new c(e,t)}}let l=class e{constructor(e,t=null,r=null){if(this.type=a.p.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{const r=c.validate(e,t);if(!r)throw new i.A("Texture descriptor invalid");this._descriptor=r}this._descriptor.target===n.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,s.e)(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}dispose(){this._glName&&this._descriptor.context.instanceCounter.decrement(n.vt.Texture,this),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===n.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}_setDataCubeMap(e=null){for(let t=n.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=n.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;t++)this._setData(e,t)}setData(e){this._setData(e)}_setData(t,r){const a=this._descriptor.context?.gl;if(!a)return;(0,o.Y2)(a),this._glName||(this._glName=a.createTexture(),this._glName&&this._descriptor.context.instanceCounter.increment(n.vt.Texture,this));const s=this._descriptor,c=r??s.target,l=p(c),v=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),d(s),this._configurePixelStorage(),(0,o.Y2)(a);const _=this._deriveInternalFormat();if(f(t)){let e="width"in t?t.width:t.codedWidth,r="height"in t?t.height:t.codedHeight;const i=1;t instanceof HTMLVideoElement&&(e=t.videoWidth,r=t.videoHeight),s.width&&s.height,l&&s.depth,s.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,_,s.hasMipmap,e,r,i),this._texImage(c,0,_,e,r,i,t),(0,o.Y2)(a),s.hasMipmap&&(this.generateMipmap(),(0,o.Y2)(a)),s.width||(s.width=e),s.height||(s.height=r),l&&!s.depth&&(s.depth=i)}else{const{width:e,height:r,depth:d}=s;if(null==e||null==r)throw new i.A("Width and height must be specified!");if(l&&null==d)throw new i.A("Depth must be specified!");if(s.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,_,s.hasMipmap,e,r,d),m(t)){const o=t.levels,l=g(c,e,r,d),u=Math.min(l-1,o.length-1);a.texParameteri(s.target,this._descriptor.context.gl.TEXTURE_MAX_LEVEL,u);const h=_;if(!(h in n.CQ))throw new i.A("Attempting to use compressed data with an uncompressed format!");this._forEachMipmapLevel(((e,t,r,i)=>{const n=o[Math.min(e,o.length-1)];this._compressedTexImage(c,e,h,t,r,i,n)}),u)}else this._texImage(c,0,_,e,r,d,t),(0,o.Y2)(a),s.hasMipmap&&this.generateMipmap()}u(a,this._descriptor),h(a,this._descriptor),function(e,t){const r=e.capabilities.textureFilterAnisotropic;r&&e.gl.texParameterf(t.target,r.TEXTURE_MAX_ANISOTROPY,t.maxAnisotropy??1)}(this._descriptor.context,this._descriptor),(0,o.Y2)(a),this._descriptor.context.bindTexture(v,e.TEXTURE_UNIT_FOR_UPDATES)}updateData(t,r,o,n,a,s,c=0){s||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const l=this._descriptor,d=this._deriveInternalFormat(),{context:u,pixelFormat:h,dataType:p,target:g,isImmutable:v}=l;if(v&&!this._wasImmutablyAllocated)throw new i.A("Cannot update immutable texture before allocation!");const _=u.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||o<0||r+n>l.width||o+a>l.height)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:T}=u;c&&T.pixelStorei(T.UNPACK_SKIP_ROWS,c),f(s)?T.texSubImage2D(g,t,r,o,n,a,h,p,s):m(s)?T.compressedTexSubImage2D(g,t,r,o,n,a,d,s.levels[t]):T.texSubImage2D(g,t,r,o,n,a,h,p,s),c&&T.pixelStorei(T.UNPACK_SKIP_ROWS,0),u.bindTexture(_,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,o,n,a,s,c,l){l||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const d=this._descriptor,u=this._deriveInternalFormat(),{context:h,pixelFormat:f,dataType:g,isImmutable:v,target:_}=d;if(v&&!this._wasImmutablyAllocated)throw new i.A("Cannot update immutable texture before allocation!");p(_)||console.warn("Attempting to set 3D texture data on a non-3D texture");const T=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);h.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||o<0||n<0||r+a>d.width||o+s>d.height||n+c>d.depth)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:x}=h;if(m(l))l=l.levels[t],x.compressedTexSubImage3D(_,t,r,o,n,a,s,c,u,l);else{const e=l;x.texSubImage3D(_,t,r,o,n,a,s,c,f,g,e)}h.bindTexture(T,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,d(t)}t.samplingMode===n.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=n.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===n.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=n.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,d(e)}e.samplingMode===n.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=n.Cj.LINEAR):e.samplingMode===n.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=n.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,d(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){const e=this._descriptor,t=e.context.gl;this._samplingModeDirty&&(u(t,e),this._samplingModeDirty=!1),this._wrapModeDirty&&(h(t,e),this._wrapModeDirty=!1)}_deriveInternalFormat(){if(null!=this._descriptor.internalFormat)return this._descriptor.internalFormat===n.Ab.DEPTH_STENCIL&&(this._descriptor.internalFormat=n.Ab.DEPTH24_STENCIL8),this._descriptor.internalFormat;switch(this._descriptor.dataType){case n.ld.FLOAT:switch(this._descriptor.pixelFormat){case n.Ab.RGBA:return this._descriptor.internalFormat=n.H0.RGBA32F;case n.Ab.RGB:return this._descriptor.internalFormat=n.H0.RGB32F;default:throw new i.A("Unable to derive format")}case n.ld.UNSIGNED_BYTE:switch(this._descriptor.pixelFormat){case n.Ab.RGBA:return this._descriptor.internalFormat=n.H0.RGBA8;case n.Ab.RGB:return this._descriptor.internalFormat=n.H0.RGB8}}return this._descriptor.internalFormat=this._descriptor.pixelFormat===n.Ab.DEPTH_STENCIL?n.Ab.DEPTH24_STENCIL8:this._descriptor.pixelFormat}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i?1:0)}_texStorage(e,t,r,o,a,s){const{gl:c}=this._descriptor.context;if(!(t in n.H0))throw new i.A("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const l=r?g(e,o,a,s):1;if(p(e)){if(null==s)throw new i.A("Missing depth dimension for 3D texture upload");c.texStorage3D(e,l,t,o,a,s)}else c.texStorage2D(e,l,t,o,a);this._wasImmutablyAllocated=!0}_texImage(e,t,r,o,n,a,s){const c=this._descriptor.context.gl,l=p(e),{isImmutable:d,pixelFormat:u,dataType:h}=this._descriptor;if(d){if(null!=s){const r=s;if(l){if(null==a)throw new i.A("Missing depth dimension for 3D texture upload");c.texSubImage3D(e,t,0,0,0,o,n,a,u,h,r)}else c.texSubImage2D(e,t,0,0,o,n,u,h,r)}}else{const d=s;if(l){if(null==a)throw new i.A("Missing depth dimension for 3D texture upload");c.texImage3D(e,t,r,o,n,a,0,u,h,d)}else c.texImage2D(e,t,r,o,n,0,u,h,d)}}_compressedTexImage(e,t,r,o,n,a,s){const c=this._descriptor.context.gl,l=p(e);if(this._descriptor.isImmutable){if(null!=s)if(l){if(null==a)throw new i.A("Missing depth dimension for 3D texture upload");c.compressedTexSubImage3D(e,t,0,0,0,o,n,a,r,s)}else c.compressedTexSubImage2D(e,t,0,0,o,n,r,s)}else if(l){if(null==a)throw new i.A("Missing depth dimension for 3D texture upload");c.compressedTexImage3D(e,t,r,o,n,a,0,s)}else c.compressedTexImage2D(e,t,r,o,n,0,s)}_forEachMipmapLevel(e,t=1/0){let{width:r,height:o,depth:a,hasMipmap:s,target:c}=this._descriptor;const l=c===n.Ap.TEXTURE_3D;if(null==r||null==o||l&&null==a)throw new i.A("Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,o,a),s&&(1!==r||1!==o||l&&1!==a)&&!(i>=t);++i)r=Math.max(1,r>>1),o=Math.max(1,o>>1),l&&(a=Math.max(1,a>>1))}};function d(e){(null!=e.width&&e.width<0||null!=e.height&&e.height<0||null!=e.depth&&e.depth<0)&&console.error("Negative dimension parameters are not allowed!")}function u(e,t){let r=t.samplingMode,i=t.samplingMode;r===n.Cj.LINEAR_MIPMAP_NEAREST||r===n.Cj.LINEAR_MIPMAP_LINEAR?(r=n.Cj.LINEAR,t.hasMipmap||(i=n.Cj.LINEAR)):r!==n.Cj.NEAREST_MIPMAP_NEAREST&&r!==n.Cj.NEAREST_MIPMAP_LINEAR||(r=n.Cj.NEAREST,t.hasMipmap||(i=n.Cj.NEAREST)),e.texParameteri(t.target,e.TEXTURE_MAG_FILTER,r),e.texParameteri(t.target,e.TEXTURE_MIN_FILTER,i)}function h(e,t){"number"==typeof t.wrapMode?(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode.t))}function m(e){return null!=e&&"type"in e&&"compressed"===e.type}function f(e){return null!=e&&!m(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function p(e){return e===n.Ap.TEXTURE_3D||e===n.Ap.TEXTURE_2D_ARRAY}function g(e,t,r,i=1){let o=Math.max(t,r);return e===n.Ap.TEXTURE_3D&&(o=Math.max(o,i)),Math.round(Math.log(o)/Math.LN2)+1}l.TEXTURE_UNIT_FOR_UPDATES=0},67171:(e,t,r)=>{r.d(t,{R:()=>n,e:()=>a});var i=r(63907),o=r(42293);class n{constructor(e=0,t=e){this.width=e,this.height=t,this.target=i.Ap.TEXTURE_2D,this.pixelFormat=i.Ab.RGBA,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=i.Cj.LINEAR,this.wrapMode=i.pF.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.depth=1,this.isImmutable=!1}}function a(e){return e.width<=0||e.height<=0?0:Math.round(e.width*e.height*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,o.IB)(e.internalFormat)))}},42293:(e,t,r)=>{r.d(t,{Hi:()=>c,IB:()=>l,yu:()=>s}),r(44208);var i=r(94656),o=r(63907),n=r(62298);function a(e){const t=e.gl;switch(t.getError()){case t.NO_ERROR:return null;case t.INVALID_ENUM:return"An unacceptable value has been specified for an enumerated argument";case t.INVALID_VALUE:return"An unacceptable value has been specified for an argument";case t.INVALID_OPERATION:return"The specified command is not allowed for the current state";case t.INVALID_FRAMEBUFFER_OPERATION:return"The currently bound framebuffer is not framebuffer complete";case t.OUT_OF_MEMORY:return"Not enough memory is left to execute the command";case t.CONTEXT_LOST_WEBGL:return"WebGL context is lost"}return"Unknown error"}function s(e,t,r,o,s=0){const c=e.gl;e.bindBuffer(r);for(const r of o){const o=t.get(r.name);if(null==o){console.warn(`There is no location for vertex attribute '${r.name}' defined.`);continue}const l=s*r.stride;if(r.count<=4)c.vertexAttribPointer(o,r.count,r.type,r.normalized,r.stride,r.offset+l),c.enableVertexAttribArray(o),r.divisor>0&&e.gl.vertexAttribDivisor(o,r.divisor);else if(9===r.count)for(let t=0;t<3;t++)c.vertexAttribPointer(o+t,3,r.type,r.normalized,r.stride,r.offset+12*t+l),c.enableVertexAttribArray(o+t),r.divisor>0&&e.gl.vertexAttribDivisor(o+t,r.divisor);else if(16===r.count)for(let t=0;t<4;t++)c.vertexAttribPointer(o+t,4,r.type,r.normalized,r.stride,r.offset+16*t+l),c.enableVertexAttribArray(o+t),r.divisor>0&&e.gl?.vertexAttribDivisor(o+t,r.divisor);else console.error("Unsupported vertex attribute element count: "+r.count);if((0,i.en)()){const t=a(e),i=(0,n._)(r.type),o=r.offset,s=Math.round(i/o)!==i/o?`. Offset not a multiple of stride. DataType requires ${i} bytes, but descriptor has an offset of ${o}`:"";t&&console.error(`Unable to bind vertex attribute "${r.name}" with baseInstanceOffset ${l}${s}:`,t,r)}}}function c(e,t,r,i){const n=e.gl;e.bindBuffer(r);for(const r of i){const i=t.get(r.name);if(r.count<=4)n.disableVertexAttribArray(i),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(i,0);else if(9===r.count)for(let t=0;t<3;t++)n.disableVertexAttribArray(i+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(i+t,0);else if(16===r.count)for(let t=0;t<4;t++)n.disableVertexAttribArray(i+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(i+t,0);else console.error("Unsupported vertex attribute element count: "+r.count)}e.unbindBuffer(o.NZ.ARRAY_BUFFER)}function l(e){switch(e){case o.Ab.ALPHA:case o.Ab.LUMINANCE:case o.Ab.RED:case o.Ab.RED_INTEGER:case o.H0.R8:case o.H0.R8I:case o.H0.R8UI:case o.H0.R8_SNORM:case o.yQ.STENCIL_INDEX8:return 1;case o.Ab.LUMINANCE_ALPHA:case o.Ab.RG:case o.Ab.RG_INTEGER:case o.H0.RGBA4:case o.H0.R16F:case o.H0.R16I:case o.H0.R16UI:case o.H0.RG8:case o.H0.RG8I:case o.H0.RG8UI:case o.H0.RG8_SNORM:case o.H0.RGB565:case o.H0.RGB5_A1:case o.yQ.DEPTH_COMPONENT16:return 2;case o.Ab.DEPTH_COMPONENT:case o.Ab.RGB:case o.Ab.RGB_INTEGER:case o.H0.RGB8:case o.H0.RGB8I:case o.H0.RGB8UI:case o.H0.RGB8_SNORM:case o.H0.SRGB8:case o.yQ.DEPTH_COMPONENT24:return 3;case o.Ab.DEPTH_STENCIL:case o.Ab.DEPTH24_STENCIL8:case o.Ab.RGBA:case o.Ab.RGBA_INTEGER:case o.H0.RGBA8:case o.H0.R32F:case o.H0.R11F_G11F_B10F:case o.H0.RG16F:case o.H0.R32I:case o.H0.R32UI:case o.H0.RG16I:case o.H0.RG16UI:case o.H0.RGBA8I:case o.H0.RGBA8UI:case o.H0.RGBA8_SNORM:case o.H0.SRGB8_ALPHA8:case o.H0.RGB9_E5:case o.H0.RGB10_A2UI:case o.H0.RGB10_A2:case o.yQ.DEPTH_STENCIL:case o.yQ.DEPTH_COMPONENT32F:case o.yQ.DEPTH24_STENCIL8:return 4;case o.yQ.DEPTH32F_STENCIL8:return 5;case o.H0.RGB16F:case o.H0.RGB16I:case o.H0.RGB16UI:return 6;case o.H0.RG32F:case o.H0.RG32I:case o.H0.RG32UI:case o.H0.RGBA16F:case o.H0.RGBA16I:case o.H0.RGBA16UI:return 8;case o.H0.RGB32F:case o.H0.RGB32I:case o.H0.RGB32UI:return 12;case o.H0.RGBA32F:case o.H0.RGBA32I:case o.H0.RGBA32UI:return 16;case o.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case o.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case o.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case o.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case o.CQ.COMPRESSED_R11_EAC:case o.CQ.COMPRESSED_SIGNED_R11_EAC:case o.CQ.COMPRESSED_RGB8_ETC2:case o.CQ.COMPRESSED_SRGB8_ETC2:case o.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case o.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case o.CQ.COMPRESSED_RG11_EAC:case o.CQ.COMPRESSED_SIGNED_RG11_EAC:case o.CQ.COMPRESSED_RGBA8_ETC2_EAC:case o.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},94656:(e,t,r)=>{r.d(t,{Xc:()=>l,Y2:()=>d,en:()=>c});var i=r(49186),o=r(44208),n=r(53966);const a=()=>n.A.getLogger("esri.views.webgl.checkWebGLError"),s=!!(0,o.A)("enable-feature:webgl-debug");function c(){return s}function l(){return s}function d(e){if(c()){const t=e.getError();if(t){const r=function(e,t){switch(t){case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(e,t),o=(new Error).stack;a().error(new i.A("webgl-error","WebGL error occurred",{message:r,stack:o}))}}}},28449:(e,t,r)=>{function i(e,t,r){for(let i=0;i<r;++i)t[2*i]=e[i],t[2*i+1]=e[i]-t[2*i]}function o(e,t){const r=e.length;for(let i=0;i<r;++i)a[0]=e[i],t[i]=a[0];return t}function n(e,t){const r=e.length;for(let i=0;i<r;++i)a[0]=e[i],a[1]=e[i]-a[0],t[i]=a[1];return t}r.d(t,{Zo:()=>o,jA:()=>n,jS:()=>i});const a=new Float32Array(2)},62298:(e,t,r)=>{r.d(t,{_:()=>o});var i=r(63907);function o(e){switch(e){case i.pe.BYTE:case i.pe.UNSIGNED_BYTE:return 1;case i.pe.SHORT:case i.pe.UNSIGNED_SHORT:case i.pe.HALF_FLOAT:return 2;case i.pe.FLOAT:case i.pe.INT:case i.pe.UNSIGNED_INT:return 4}}},90644:(e,t,r)=>{r.d(t,{Ey:()=>b,Ky:()=>c,Os:()=>s,Uy:()=>h,Xt:()=>u,kn:()=>m,p3:()=>a});var i=r(89192),o=r(63907);function n(e,t,r=o.Tb.ADD,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function a(e,t,r,i,n=o.Tb.ADD,a=o.Tb.ADD,s=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:n,opAlpha:a,color:{r:s[0],g:s[1],b:s[2],a:s[3]}}}n(o.dn.ZERO,o.dn.ONE_MINUS_SRC_ALPHA),n(o.dn.ONE,o.dn.ZERO),n(o.dn.ONE,o.dn.ONE);const s=n(o.dn.ONE,o.dn.ONE_MINUS_SRC_ALPHA),c=a(o.dn.SRC_ALPHA,o.dn.ONE,o.dn.ONE_MINUS_SRC_ALPHA,o.dn.ONE_MINUS_SRC_ALPHA),l={face:o.Y7.BACK,mode:o.Ac.CCW},d={face:o.Y7.FRONT,mode:o.Ac.CCW},u=e=>e===i.s2.Back?l:e===i.s2.Front?d:null,h={zNear:0,zFar:1},m={r:!0,g:!0,b:!0,a:!0};function f(e){return C.intern(e)}function p(e){return I.intern(e)}function g(e){return O.intern(e)}function v(e){return y.intern(e)}function _(e){return L.intern(e)}function T(e){return D.intern(e)}function x(e){return G.intern(e)}function A(e){return U.intern(e)}function E(e){return V.intern(e)}function b(e){return j.intern(e)}class S{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;const t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function M(e){return"["+e.join(",")+"]"}const C=new S(R,(e=>({__tag:"Blending",...e})));function R(e){return e?M([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const I=new S(w,(e=>({__tag:"Culling",...e})));function w(e){return e?M([e.face,e.mode]):null}const O=new S(N,(e=>({__tag:"PolygonOffset",...e})));function N(e){return e?M([e.factor,e.units]):null}const y=new S(P,(e=>({__tag:"DepthTest",...e})));function P(e){return e?M([e.func]):null}const L=new S(H,(e=>({__tag:"StencilTest",...e})));function H(e){return e?M([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const D=new S(F,(e=>({__tag:"DepthWrite",...e})));function F(e){return e?M([e.zNear,e.zFar]):null}const G=new S(B,(e=>({__tag:"ColorWrite",...e})));function B(e){return e?M([e.r,e.g,e.b,e.a]):null}const U=new S(z,(e=>({__tag:"StencilWrite",...e})));function z(e){return e?M([e.mask]):null}const V=new S(W,(e=>({__tag:"DrawBuffers",...e})));function W(e){return e?M(e.buffers):null}const j=new S((function(e){return e?M([R(e.blending),w(e.culling),N(e.polygonOffset),P(e.depthTest),H(e.stencilTest),F(e.depthWrite),B(e.colorWrite),z(e.stencilWrite),W(e.drawBuffers)]):null}),(e=>({blending:f(e.blending),culling:p(e.culling),polygonOffset:g(e.polygonOffset),depthTest:v(e.depthTest),stencilTest:_(e.stencilTest),depthWrite:T(e.depthWrite),colorWrite:x(e.colorWrite),stencilWrite:A(e.stencilWrite),drawBuffers:E(e.drawBuffers)})))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5613],{22429:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(24183);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const t=this._serviceMetadatas.get(e);if(t)return t;const n=await(0,r.V)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:t}=this;if(t.has(a))return t.get(a);const r=await e.fetchData();return t.set(a,r),r}async fetchCustomParameters(e,a){const t=await this.fetchItemData(e);return t&&"object"==typeof t&&(a?a(t):t.customParameters)||null}}},92009:(e,a,t)=>{t.d(a,{L:()=>u});var r=t(70333),n=t(78888),s=t(49186),i=t(74887),l=t(60694),c=t(20655),o=t(80812);async function u(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const t=new o.default({id:a,apiKey:e.apiKey}),s=await async function(e){const a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,i.QP)(e)}return null}(e);null!=s&&(t.portal=new c.A({url:s}));try{return await t.load({signal:e.signal})}catch(e){return(0,i.QP)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!t)return null;const r=new o.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,i.QP)(e),null}}(u);if(!f?.url)throw new s.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=f;const m=await d(f.url,u);return m.portalItem=f,m}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-feature-service-url","Invalid feature service url");const r=t.url.path,i=a.layerId;if(null==i)return{serverUrl:r};const c=y(a),o=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(o?.layers?.[0]||o?.tables?.[0])?.customParameters,d=e=>{const t={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(r,t)},f=d("anonymous").catch((()=>d("no-prompt"))),[m,w]=await Promise.all([f,c]),h=w?.layers,p=m.data&&m.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===i)return{serverUrl:r,layerId:p[e].id}}else if(null!=i&&i<p.length)return{serverUrl:r,layerId:p[i].id};throw new Error("could not find matching associated sublayer")}},23154:(e,a,t)=>{t.d(a,{K:()=>d,Q:()=>s});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){const{loadContext:t,...n}=a||{},s=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);y(s),c(s);const i={serviceJSON:s};if((s.currentVersion??0)<10.5)return i;const l=`${e}/layers`,o=t?await t.fetchServiceMetadata(l,n):await(0,r.V)(l,n);return y(o),c(o),i.layersJSON={layers:o.layers,tables:o.tables},i}function i(e){const{type:a}=e;return!!a&&n.has(a)}function l(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(l)}function o(e){e.type||="Feature Layer"}function u(e){e.type||="Table"}function y(e){e.layers?.forEach(o),e.tables?.forEach(u)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(1892)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(690),t.e(1219),t.e(2944),t.e(8947),t.e(9287),t.e(4654),t.e(7110),t.e(2931)]).then(t.bind(t,88303))).default,CSVLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(1219),t.e(4174)]).then(t.bind(t,72256))).default,CatalogLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(4111),t.e(2780),t.e(893),t.e(8132),t.e(2593),t.e(6107)]).then(t.bind(t,79003))).default,DimensionLayer:async()=>(await Promise.all([t.e(6131),t.e(1493)]).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(6131),t.e(9186),t.e(8283)]).then(t.bind(t,5111))).default,FeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(1219),t.e(9377)]).then(t.bind(t,13600))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3839)]).then(t.bind(t,17625))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(1147),t.e(587),t.e(7249)]).then(t.bind(t,63201))).default,GroupLayer:async()=>(await Promise.all([t.e(6131),t.e(5989)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(893),t.e(984),t.e(435),t.e(6547)]).then(t.bind(t,5159))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(984),t.e(5915),t.e(435),t.e(6260)]).then(t.bind(t,97327))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([t.e(6131),t.e(1528)]).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(6131),t.e(8947),t.e(8003)]).then(t.bind(t,84453))).default,KMLLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(5494),t.e(3995)]).then(t.bind(t,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(8368),t.e(9492),t.e(1402),t.e(6493),t.e(8943),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(6131),t.e(690),t.e(1786),t.e(9695)]).then(t.bind(t,49695))).default,LinkChartLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(8368),t.e(9492),t.e(1402),t.e(6493),t.e(8943),t.e(1728)]).then(t.bind(t,71728))).default,MapImageLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(4111),t.e(893),t.e(8132),t.e(591),t.e(7656)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(1219),t.e(6493),t.e(2245)]).then(t.bind(t,96953))).default,MediaLayer:async()=>(await Promise.all([t.e(6131),t.e(7899)]).then(t.bind(t,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(821),t.e(659)]).then(t.bind(t,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9833),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(1219),t.e(7263)]).then(t.bind(t,97927))).default,PointCloudLayer:async()=>(await Promise.all([t.e(6131),t.e(3874),t.e(8947),t.e(7984),t.e(6528)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(6131),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(5494),t.e(3920)]).then(t.bind(t,97550))).default,SceneLayer:async()=>(await Promise.all([t.e(6131),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(690),t.e(3030),t.e(2944),t.e(8947),t.e(9287),t.e(4654),t.e(36),t.e(7110),t.e(1737)]).then(t.bind(t,13899))).default,StreamLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4761)]).then(t.bind(t,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(4111),t.e(2780),t.e(7e3)]).then(t.bind(t,70048))).default,TileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(4111),t.e(893),t.e(8132),t.e(9186),t.e(591),t.e(1756)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9186),t.e(9949),t.e(5013),t.e(735)]).then(t.bind(t,91603))).default,VideoLayer:async()=>(await t.e(6875).then(t.bind(t,86875))).default,ViewshedLayer:async()=>(await Promise.all([t.e(6131),t.e(690),t.e(1786),t.e(6650)]).then(t.bind(t,96650))).default,VoxelLayer:async()=>(await Promise.all([t.e(6131),t.e(3874),t.e(8947),t.e(1389)]).then(t.bind(t,16183))).default,WFSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4322),t.e(3186)]).then(t.bind(t,16350))).default,WMSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9833),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9833)]).then(t.bind(t,47314))).default}},66964:(e,a,t)=>{t.d(a,{Ju:()=>o,K8:()=>d,XH:()=>u,_r:()=>s,bO:()=>i,iK:()=>y,nu:()=>f,pJ:()=>l,rc:()=>c});var r=t(92009),n=t(23154);function s(e){const a={id:e.id,name:e.name},t=(0,n.K)(e.type);return"FeatureLayer"!==t&&(a.layerType=t),a}async function i(e,a,t){if(null==e?.layers||null==e?.tables){const r=await t.fetchServiceMetadata(a,{customParameters:l(e)?.customParameters});(e=e||{}).layers=e.layers||r?.layers?.map(s),e.tables=e.tables||r?.tables?.map(s)}return e}function l(e){if(!e)return null;const{layers:a,tables:t}=e;return a?.length?a[0]:t?.length?t[0]:null}function c(e,a){return null==a?null:[...e.layers||[],...e.tables||[]].find((e=>e.id===a))}function o(e,a){return[...e.layers||[],...e.tables||[]].filter((({layerType:e})=>e?e===a:"ArcGISFeatureLayer"===a))}function u(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function y(e){switch(e){case"catalog":return"CatalogLayer";case"feature":return"ArcGISFeatureLayer";case"oriented-imagery":return"OrientedImageryLayer";case"subtype-group":return"SubtypeGroupLayer"}return null}function d(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":return"SubtypeGroupLayer"}return"FeatureLayer"}async function f(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){const r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(s)}const{serverUrl:n,portalItem:i}=await(0,r.L)(e.url,{sceneLayerItem:e,customParameters:l(a)?.customParameters}).catch((()=>({serverUrl:null,portalItem:null})));if(null==n)return a.tables=[],a;if(!a.tables&&i){const e=await i.fetchData();if(e?.tables)a.tables=e.tables.map(s);else{const r=await t.fetchServiceMetadata(n,{customParameters:l(e)?.customParameters});a.tables=r?.tables?.map(s)}}if(a.tables)for(const e of a.tables)e.url=`${n}/${e.id}`;return a}},45613:(e,a,t)=>{t.d(a,{fromItem:()=>d,n:()=>f});var r=t(49186),n=t(92009),s=t(23154),i=t(22429),l=t(83531),c=t(4513),o=t(80812),u=t(66964),y=t(10407);async function d(e){let{portalItem:a}=e;!a||a instanceof o.default||(a=new o.default(a));const t=await async function(e){await e.load();const a=new i.v;return async function(e){const a=e.className,t=c.S[a];return{constructor:await t(),properties:e.properties}}(await f(e,a))}(a);return new(0,t.constructor)({portalItem:a,...t.properties})}async function f(e,a){switch(e.type){case"3DTiles Service":return{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,y.Y)(e,"Map Notes"),t=(0,y.Y)(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if((0,y.Y)(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return 1===(0,u.XH)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const t=await m(e,a);if("object"==typeof t){const{sourceJSON:e,className:a}=t,r={sourceJSON:e};return null!=t.id&&(r.layerId=t.id),{className:a||"FeatureLayer",properties:r}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const t=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};const r=await a.fetchItemData(e),n=r?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const s=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),i=s.cacheType?.toLowerCase(),l=s.capabilities?.toLowerCase().includes("tilesonly"),c=s.tileInfo?.format?.toLowerCase()??"",o=null==i&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(c);return"map"===i||o||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const t=await m(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:t}=await(0,n.L)(e.url,{sceneLayerItem:e}),r=await a.fetchServiceMetadata(t);return r?.tables??[]}catch{return[]}}));if("object"==typeof t){const r={};let n;if(null!=t.id?(r.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.XX))if(e.typeKeywords.includes(a))return{className:l.XX[a]};const s=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,(e=>(0,u.pJ)(e)?.customParameters))});return{className:l.XX[s?.layerType]||"SceneLayer",properties:r}}if(!1===t){const t=await a.fetchServiceMetadata(e.url);if("Voxel"===t?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new r.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function m(e,a,t){const{url:r,type:n}=e,i="Feature Service"===n;if(!r)return{};if(/\/\d+$/.test(r)){if(i){const t=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,(e=>(0,u.pJ)(e)?.customParameters))});return{id:t.id,className:(0,s.K)(t.type),sourceJSON:t}}return{}}await e.load();let l=await a.fetchItemData(e);if(i){const e=await(0,u.bO)(l,r,a),t=w(e);if("object"==typeof t){const a=(0,u.rc)(e,t.id);t.className=(0,u.K8)(a?.layerType)}return t}if("Scene Service"===n&&(l=await(0,u.nu)(e,l,a)),(0,u.XH)(l)>0)return w(l);const c=await a.fetchServiceMetadata(r);return t&&(c.tables=await t()),w(c)}function w(e){return 1===(0,u.XH)(e)&&{id:(0,u.pJ)(e)?.id}}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5613],{22429:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(24183);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const t=this._serviceMetadatas.get(e);if(t)return t;const n=await(0,r.V)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:t}=this;if(t.has(a))return t.get(a);const r=await e.fetchData();return t.set(a,r),r}async fetchCustomParameters(e,a){const t=await this.fetchItemData(e);return t&&"object"==typeof t&&(a?a(t):t.customParameters)||null}}},92009:(e,a,t)=>{t.d(a,{L:()=>u});var r=t(70333),n=t(78888),s=t(49186),i=t(74887),l=t(60694),c=t(20655),o=t(80812);async function u(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const t=new o.default({id:a,apiKey:e.apiKey}),s=await async function(e){const a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,i.QP)(e)}return null}(e);null!=s&&(t.portal=new c.A({url:s}));try{return await t.load({signal:e.signal})}catch(e){return(0,i.QP)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!t)return null;const r=new o.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,i.QP)(e),null}}(u);if(!f?.url)throw new s.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=f;const m=await d(f.url,u);return m.portalItem=f,m}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-feature-service-url","Invalid feature service url");const r=t.url.path,i=a.layerId;if(null==i)return{serverUrl:r};const c=y(a),o=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(o?.layers?.[0]||o?.tables?.[0])?.customParameters,d=e=>{const t={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(r,t)},f=d("anonymous").catch((()=>d("no-prompt"))),[m,w]=await Promise.all([f,c]),h=w?.layers,p=m.data&&m.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===i)return{serverUrl:r,layerId:p[e].id}}else if(null!=i&&i<p.length)return{serverUrl:r,layerId:p[i].id};throw new Error("could not find matching associated sublayer")}},23154:(e,a,t)=>{t.d(a,{K:()=>d,Q:()=>s});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){const{loadContext:t,...n}=a||{},s=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);y(s),c(s);const i={serviceJSON:s};if((s.currentVersion??0)<10.5)return i;const l=`${e}/layers`,o=t?await t.fetchServiceMetadata(l,n):await(0,r.V)(l,n);return y(o),c(o),i.layersJSON={layers:o.layers,tables:o.tables},i}function i(e){const{type:a}=e;return!!a&&n.has(a)}function l(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(l)}function o(e){e.type||="Feature Layer"}function u(e){e.type||="Table"}function y(e){e.layers?.forEach(o),e.tables?.forEach(u)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(1892)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(690),t.e(1219),t.e(2944),t.e(8947),t.e(9287),t.e(4654),t.e(7110),t.e(2931)]).then(t.bind(t,88303))).default,CSVLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(1219),t.e(4174)]).then(t.bind(t,72256))).default,CatalogLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(4111),t.e(2780),t.e(893),t.e(8132),t.e(2593),t.e(6107)]).then(t.bind(t,79003))).default,DimensionLayer:async()=>(await Promise.all([t.e(6131),t.e(1493)]).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(6131),t.e(9186),t.e(8283)]).then(t.bind(t,5111))).default,FeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(1219),t.e(9377)]).then(t.bind(t,13600))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3839)]).then(t.bind(t,17625))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(1147),t.e(587),t.e(7249)]).then(t.bind(t,63201))).default,GroupLayer:async()=>(await Promise.all([t.e(6131),t.e(5989)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(893),t.e(984),t.e(435),t.e(6547)]).then(t.bind(t,5159))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(984),t.e(4932),t.e(435),t.e(4943)]).then(t.bind(t,38146))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([t.e(6131),t.e(1528)]).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(6131),t.e(8947),t.e(8003)]).then(t.bind(t,84453))).default,KMLLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(5494),t.e(3995)]).then(t.bind(t,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(8368),t.e(9492),t.e(1402),t.e(6493),t.e(8943),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(6131),t.e(690),t.e(1786),t.e(9695)]).then(t.bind(t,49695))).default,LinkChartLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(8368),t.e(9492),t.e(1402),t.e(6493),t.e(8943),t.e(3812)]).then(t.bind(t,73812))).default,MapImageLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(4111),t.e(893),t.e(8132),t.e(591),t.e(7656)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(1219),t.e(6493),t.e(2245)]).then(t.bind(t,96953))).default,MediaLayer:async()=>(await Promise.all([t.e(6131),t.e(7899)]).then(t.bind(t,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(821),t.e(659)]).then(t.bind(t,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9833),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4111),t.e(2780),t.e(1219),t.e(7263)]).then(t.bind(t,97927))).default,PointCloudLayer:async()=>(await Promise.all([t.e(6131),t.e(3874),t.e(8947),t.e(7984),t.e(6528)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(6131),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(5494),t.e(3920)]).then(t.bind(t,97550))).default,SceneLayer:async()=>(await Promise.all([t.e(6131),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(690),t.e(3030),t.e(2944),t.e(8947),t.e(9287),t.e(4654),t.e(36),t.e(7110),t.e(1737)]).then(t.bind(t,13899))).default,StreamLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4761)]).then(t.bind(t,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(4111),t.e(2780),t.e(7e3)]).then(t.bind(t,70048))).default,TileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(4111),t.e(893),t.e(8132),t.e(9186),t.e(591),t.e(1756)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9186),t.e(9949),t.e(5013),t.e(735)]).then(t.bind(t,91603))).default,VideoLayer:async()=>(await t.e(6875).then(t.bind(t,86875))).default,ViewshedLayer:async()=>(await Promise.all([t.e(6131),t.e(690),t.e(1786),t.e(6650)]).then(t.bind(t,96650))).default,VoxelLayer:async()=>(await Promise.all([t.e(6131),t.e(3874),t.e(8947),t.e(1389)]).then(t.bind(t,16183))).default,WFSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(1132),t.e(6311),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4322),t.e(3186)]).then(t.bind(t,16350))).default,WMSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3874),t.e(1147),t.e(587),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9833),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9833)]).then(t.bind(t,47314))).default}},66964:(e,a,t)=>{t.d(a,{Ju:()=>o,K8:()=>d,XH:()=>u,_r:()=>s,bO:()=>i,iK:()=>y,nu:()=>f,pJ:()=>l,rc:()=>c});var r=t(92009),n=t(23154);function s(e){const a={id:e.id,name:e.name},t=(0,n.K)(e.type);return"FeatureLayer"!==t&&(a.layerType=t),a}async function i(e,a,t){if(null==e?.layers||null==e?.tables){const r=await t.fetchServiceMetadata(a,{customParameters:l(e)?.customParameters});(e=e||{}).layers=e.layers||r?.layers?.map(s),e.tables=e.tables||r?.tables?.map(s)}return e}function l(e){if(!e)return null;const{layers:a,tables:t}=e;return a?.length?a[0]:t?.length?t[0]:null}function c(e,a){return null==a?null:[...e.layers||[],...e.tables||[]].find((e=>e.id===a))}function o(e,a){return[...e.layers||[],...e.tables||[]].filter((({layerType:e})=>e?e===a:"ArcGISFeatureLayer"===a))}function u(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function y(e){switch(e){case"catalog":return"CatalogLayer";case"feature":return"ArcGISFeatureLayer";case"oriented-imagery":return"OrientedImageryLayer";case"subtype-group":return"SubtypeGroupLayer"}return null}function d(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":return"SubtypeGroupLayer"}return"FeatureLayer"}async function f(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){const r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(s)}const{serverUrl:n,portalItem:i}=await(0,r.L)(e.url,{sceneLayerItem:e,customParameters:l(a)?.customParameters}).catch((()=>({serverUrl:null,portalItem:null})));if(null==n)return a.tables=[],a;if(!a.tables&&i){const e=await i.fetchData();if(e?.tables)a.tables=e.tables.map(s);else{const r=await t.fetchServiceMetadata(n,{customParameters:l(e)?.customParameters});a.tables=r?.tables?.map(s)}}if(a.tables)for(const e of a.tables)e.url=`${n}/${e.id}`;return a}},45613:(e,a,t)=>{t.d(a,{fromItem:()=>d,n:()=>f});var r=t(49186),n=t(92009),s=t(23154),i=t(22429),l=t(83531),c=t(4513),o=t(80812),u=t(66964),y=t(10407);async function d(e){let{portalItem:a}=e;!a||a instanceof o.default||(a=new o.default(a));const t=await async function(e){await e.load();const a=new i.v;return async function(e){const a=e.className,t=c.S[a];return{constructor:await t(),properties:e.properties}}(await f(e,a))}(a);return new(0,t.constructor)({portalItem:a,...t.properties})}async function f(e,a){switch(e.type){case"3DTiles Service":return{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,y.Y)(e,"Map Notes"),t=(0,y.Y)(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if((0,y.Y)(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return 1===(0,u.XH)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const t=await m(e,a);if("object"==typeof t){const{sourceJSON:e,className:a}=t,r={sourceJSON:e};return null!=t.id&&(r.layerId=t.id),{className:a||"FeatureLayer",properties:r}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const t=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};const r=await a.fetchItemData(e),n=r?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const s=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),i=s.cacheType?.toLowerCase(),l=s.capabilities?.toLowerCase().includes("tilesonly"),c=s.tileInfo?.format?.toLowerCase()??"",o=null==i&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(c);return"map"===i||o||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const t=await m(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:t}=await(0,n.L)(e.url,{sceneLayerItem:e}),r=await a.fetchServiceMetadata(t);return r?.tables??[]}catch{return[]}}));if("object"==typeof t){const r={};let n;if(null!=t.id?(r.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.XX))if(e.typeKeywords.includes(a))return{className:l.XX[a]};const s=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,(e=>(0,u.pJ)(e)?.customParameters))});return{className:l.XX[s?.layerType]||"SceneLayer",properties:r}}if(!1===t){const t=await a.fetchServiceMetadata(e.url);if("Voxel"===t?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new r.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function m(e,a,t){const{url:r,type:n}=e,i="Feature Service"===n;if(!r)return{};if(/\/\d+$/.test(r)){if(i){const t=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,(e=>(0,u.pJ)(e)?.customParameters))});return{id:t.id,className:(0,s.K)(t.type),sourceJSON:t}}return{}}await e.load();let l=await a.fetchItemData(e);if(i){const e=await(0,u.bO)(l,r,a),t=w(e);if("object"==typeof t){const a=(0,u.rc)(e,t.id);t.className=(0,u.K8)(a?.layerType)}return t}if("Scene Service"===n&&(l=await(0,u.nu)(e,l,a)),(0,u.XH)(l)>0)return w(l);const c=await a.fetchServiceMetadata(r);return t&&(c.tables=await t()),w(c)}function w(e){return 1===(0,u.XH)(e)&&{id:(0,u.pJ)(e)?.id}}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4322],{67482:(e,t,n)=>{function r(e){return null!=a(e)||null!=i(e)}function o(e){return u.test(e)}function s(e){return a(e)??i(e)}function i(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let n=!0;if(l&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,r=0;for(;!t&&r<=e.length;)t=!c.test(e[r]),r++;n=!t}}return n}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=u.exec(e);if(!t?.groups)return null;const n=t.groups,r=+n.year,o=+n.month-1,s=+n.day,i=+(n.hours??"0"),a=+(n.minutes??"0"),c=+(n.seconds??"0");if(i>23)return null;if(a>59)return null;if(c>59)return null;const l=n.ms??"0",p=l?+l.padEnd(3,"0").slice(0,3):0;let f;if(n.isUTC||!n.offsetSign)f=Date.UTC(r,o,s,i,a,c,p);else{const e=+n.offsetHours,t=+n.offsetMinutes;f=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(r,o,s,i,a,c,p)}return Number.isNaN(f)?null:f}n.d(t,{Br:()=>o,Cq:()=>r,_U:()=>s});const u=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,c=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,l=!Number.isNaN(new Date("technology 10").getTime())},43334:(e,t,n)=>{n.d(t,{N3:()=>s,Om:()=>o});var r=n(92722);class o{constructor(e=null,t={},n,r){this.geometry=e,this.attributes=t,this.centroid=n,this.objectId=r,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const n=e.geometry?r.A.fromJSON(e.geometry):null,s=e.centroid?r.A.fromJSON(e.centroid):null,i=e.attributes[t];return new o(n,e.attributes,s,i)}weakClone(){const e=new o(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new o(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function s(e){return!!e.geometry?.coords?.length}},92722:(e,t,n)=>{n.d(t,{A:()=>r});class r{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new r(e.lengths,e.coords)}static fromRect(e){const[t,n,o,s]=e,i=o-t,a=s-n;return new r([5],[t,n,i,0,0,a,-i,0,0,-a])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let n=0;n<this.lengths.length;n++){const r=this.lengths[n];for(let n=0;n<r;n++)e(this.coords[2*(n+t)],this.coords[2*(n+t)+1]);t+=r}}deltaDecode(){const e=this.clone(),{coords:t,lengths:n}=e;let r=0;for(const e of n){for(let n=1;n<e;n++)t[2*(r+n)]+=t[2*(r+n)-2],t[2*(r+n)+1]+=t[2*(r+n)-1];r+=e}return e}clone(e){if(0===this.lengths.length)return new r([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),n=this.coords.slice(0,t);return e?(e.set(n),new r(this.lengths,e)):new r(Array.from(this.lengths),Array.from(n))}}},85113:(e,t,n)=>{n.d(t,{BM:()=>x,bd:()=>P,sO:()=>A,xD:()=>l});var r=n(67482),o=n(49186),s=n(21325),i=n(43334),a=n(92722),u=n(30524);const c={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function l(e){return c[e]}function*p(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*f(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function d(e){for(const t of e)if(t.length>2)return!0;return!1}function y(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n],o=e[(n+1)%e.length];t+=r[0]*o[1]-o[0]*r[1]}return t<=0}function m(e){const t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]||e.push(t),e}function g(e,t,n){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,n){return b(e,t.coordinates,n),e}(e,t,n);case"MultiLineString":return function(e,t,n){for(const r of t.coordinates)b(e,r,n);return e}(e,t,n);case"MultiPolygon":return function(e,t,n){for(const r of t.coordinates){h(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n)}return e}(e,t,n);case"Point":return function(e,t,n){return S(e,t.coordinates,n),e}(e,t,n);case"Polygon":return function(e,t,n){const r=t.coordinates;h(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n);return e}(e,t,n)}}function h(e,t,n){const r=m(t);!function(e){return!y(e)}(r)?b(e,r,n):T(e,r,n)}function w(e,t,n){const r=m(t);!function(e){return y(e)}(r)?b(e,r,n):T(e,r,n)}function b(e,t,n){for(const r of t)S(e,r,n);e.lengths.push(t.length)}function T(e,t,n){for(let r=t.length-1;r>=0;r--)S(e,t[r],n);e.lengths.push(t.length)}function S(e,t,n){const[r,o,s]=t;e.coords.push(r,o),n.hasZ&&e.coords.push(s||0)}function F(e){switch(typeof e){case"string":return(0,r.Br)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function A(e,t=4326){if(!e)throw new o.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new o.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:n}=e;if(!n)return;const r="string"==typeof n?n:"name"===n.type?n.properties.name:"EPSG"===n.type?n.properties.code:null,i=(0,s.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!r||!i.test(r))throw new o.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:n})}function x(e,t={}){const n=[],r=new Set,o=new Set;let s,i=!1,a=null,c=!1,{geometryType:y=null}=t;for(const t of p(e)){const{geometry:e,properties:p,id:m}=t;if((!e||(y||(y=l(e.type)),l(e.type)===y))&&(i||(i=d(f(e))),c||(c=null!=m,c&&(s=typeof m,p&&(a=Object.keys(p).filter((e=>p[e]===m))))),p&&a&&c&&null!=m&&(a.length>1?a=a.filter((e=>p[e]===m)):1===a.length&&(a=p[a[0]]===m?a:[])),p))for(const e in p){if(r.has(e))continue;const t=F(p[e]);if("unknown"===t){o.add(e);continue}o.delete(e),r.add(e);const s=(0,u.rS)(e);s&&n.push({name:s,alias:e,type:t})}}const m=(0,u.rS)(1===a?.length&&a[0]||null)??void 0;if(m)for(const e of n)if(e.name===m&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:n,geometryType:y,hasZ:i,objectIdFieldName:m,objectIdFieldType:s,unknownFields:Array.from(o)}}function P(e,t){return Array.from(function*(e,t={}){const{geometryType:n,objectIdField:r}=t;for(const o of e){const{geometry:e,properties:s,id:u}=o;if(e&&l(e.type)!==n)continue;const c=s||{};let p;r&&(p=c[r],null==u||p||(c[r]=p=u));const f=new i.Om(e?g(new a.A,e,t):null,c,null,p??void 0);yield f}}(p(e),t))}},34322:(e,t,n)=>{n.d(t,{E:()=>Y,Fu:()=>R,O8:()=>O,UH:()=>_,YW:()=>D,i5:()=>b,mG:()=>v,x$:()=>V}),n(59456);var r=n(78888),o=n(49186),s=n(5479),i=n(84952),a=n(57251),u=n(21325),c=n(50498),l=n(85113),p=n(13043),f=n(60694),d=n(20437),y=n(30524),m=n(5443),g=n(16930);const h="xlink:href",w="2.0.0",b="__esri_wfs_id__",T="wfs-layer:getWFSLayerTypeInfo-error",S="wfs-layer:empty-service",F="wfs-layer:feature-type-not-found",A="wfs-layer:geojson-not-supported",x="wfs-layer:kvp-encoding-not-supported",P="wfs-layer:malformed-json",C="wfs-layer:unknown-geometry-type",k="wfs-layer:unknown-field-type",N="wfs-layer:unsupported-spatial-reference",E="wfs-layer:unsupported-wfs-version";async function R(e,t){const n=function(e){const t=W(e);(function(e){const t=e.firstElementChild?.getAttribute("version");if(t&&t!==w)throw new o.A(E,`Unsupported WFS version ${t}. Supported version: ${w}`)})(t),J(t);const n=t.firstElementChild,r=(0,s.PP)(function(e){return(0,p.i)(e,{FeatureTypeList:{FeatureType:e=>{const t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",defaultSpatialReference:4326,supportedSpatialReferences:[]},n=new Set;return(0,p.p)(e,{Name:e=>{const{name:n,prefix:r}=z(e.textContent);t.typeName=`${r}:${n}`,t.name=n,t.namespacePrefix=r,t.namespaceUri=e.lookupNamespaceURI(r)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=m.A.fromJSON(function(e){let t,n,r,o;for(const s of e.children)switch(s.localName){case"LowerCorner":[t,n]=s.textContent.split(" ").map((e=>Number.parseFloat(e)));break;case"UpperCorner":[r,o]=s.textContent.split(" ").map((e=>Number.parseFloat(e)))}return{xmin:t,ymin:n,xmax:r,ymax:o,spatialReference:u.KK}}(e))},DefaultCRS:e=>{const r=M(e);r&&(t.defaultSpatialReference=r,n.add(r))},OtherCRS:e=>{const t=M(e);t&&n.add(t)}}),t.title||(t.title=t.name),n.add(4326),t.supportedSpatialReferences.push(...n),t}}})}(n));return{operations:j(n),get featureTypes(){return Array.from(r())},readFeatureTypes:r}}((await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:w,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,i.m3)(e)&&((0,i.FX)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,i.lM)(t.operations.DescribeFeatureType.url)),(0,i.FX)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,i.lM)(t.operations.GetFeature.url)))}(e,n),n}const G=["json","application/json","geojson","application/json; subtype=geojson","application/geo+json"];function I(e){for(const t of G){const n=e.findIndex((e=>e.toLowerCase()===t));if(n>=0)return e[n]}return null}function j(e){let t=!1;const n={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}},r=[],s=[];if((0,p.p)(e,{OperationsMetadata:{Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:({textContent:e})=>{e&&r.push(e)}}}},Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{n.GetCapabilities.url=e.getAttribute(h)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{n.DescribeFeatureType.url=e.getAttribute(h)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{n.GetFeature.url=e.getAttribute(h)}}},Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:({textContent:e})=>{e&&s.push(e)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{n.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),n.GetFeature.outputFormat=I(s)??I(r),!t)throw new o.A(x,"WFS service doesn't support key/value pair (KVP) encoding");if(null==n.GetFeature.outputFormat)throw new o.A(A,"WFS service doesn't support GeoJSON output format");return n}function M(e){const t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);if(!Number.isNaN(t))return t}function v(e,t,n){return(0,s.I6)(e,(e=>n?e.name===t&&e.namespaceUri===n:e.typeName===t||e.name===t))}async function O(e,t,n,r={}){const{featureType:s,extent:i}=await async function(e,t,n,r={}){const s=e.readFeatureTypes(),i=t?v(s,t,n):s.next().value,{spatialReference:c=new g.A({wkid:i?.defaultSpatialReference})}=r;if(null==i)throw t?new o.A(F,`The type '${t}' could not be found in the service`):new o.A(S,"The service is empty");let l=i.extent;if(l&&!(0,u.aI)(l.spatialReference,c))try{await(0,a.initializeProjection)(l.spatialReference,c,void 0,r),l=(0,a.project)(l,c)}catch{throw new o.A(N,"Projection not supported")}return{extent:l,spatialReference:c,featureType:i}}(e,t,n,r),{spatialReference:c}=_(e.operations.GetFeature.url,s,r.spatialReference),{fields:l,geometryType:p,swapXY:f,objectIdField:d,geometryField:y}=await async function(e,t,n,r={}){const{typeName:s}=t,[i,a]=await Promise.allSettled([L(e.operations.DescribeFeatureType.url,s,r),U(e,s,n,r)]),u=e=>new o.A(T,`An error occurred while getting info about the feature type '${s}'`,{error:e});if("rejected"===i.status)throw u(i.reason);if("rejected"===a.status)throw u(a.reason);const{fields:c,errors:l}=i.value??{},p=i.value?.geometryType||a.value?.geometryType,f=a.value?.swapXY??!1;if(null==p)throw new o.A(C,`The geometry type could not be determined for type '${s}`,{typeName:s,geometryType:p,fields:c,errors:l});return{...D(c??[]),geometryType:p,swapXY:f}}(e,s,c,r);return{url:e.operations.GetCapabilities.url,name:s.name,namespaceUri:s.namespaceUri,fields:l,geometryField:y,geometryType:p,objectIdField:d,spatialReference:r.spatialReference??new g.A({wkid:s.defaultSpatialReference}),extent:i,swapXY:f,wfsCapabilities:e,customParameters:r.customParameters}}function D(e){const t=e.find((e=>"geometry"===e.type));let n=e.find((e=>"oid"===e.type));return e=e.filter((e=>"geometry"!==e.type)),n||(n=new d.A({name:b,type:"oid",alias:b}),e.unshift(n)),{geometryField:t?.name??null,objectIdField:n.name,fields:e}}async function U(e,t,n,o={}){let s,i=!1;const[a,u]=await Promise.all([V(e.operations.GetFeature.url,t,n,e.operations.GetFeature.outputFormat,{...o,count:1}),(0,r.A)(e.operations.GetFeature.url,{responseType:"text",query:X(t,n,void 0,{...o,count:1}),signal:o?.signal})]),p="FeatureCollection"===a.type&&a.features[0]?.geometry;if(p){let e;switch(s=c.g.fromJSON((0,l.xD)(p.type)),p.type){case"Point":e=p.coordinates;break;case"LineString":case"MultiPoint":e=p.coordinates[0];break;case"MultiLineString":case"Polygon":e=p.coordinates[0][0];break;case"MultiPolygon":e=p.coordinates[0][0][0]}const t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(u.data);if(t){const n=e[0].toFixed(3),r=e[1].toFixed(3),o=parseFloat(t[1]).toFixed(3);n===parseFloat(t[2]).toFixed(3)&&r===o&&(i=!0)}}return{geometryType:s,swapXY:i}}async function L(e,t,n){return function(e,t){const{name:n}=z(e),r=W(t);J(r);const i=(0,s.I6)((0,p.i)(r.firstElementChild,{element:e=>e}),(e=>e.getAttribute("name")===n));if(null!=i){const e=i.getAttribute("type"),t=e?(0,s.I6)((0,p.i)(r.firstElementChild,{complexType:e=>e}),(t=>t.getAttribute("name")===z(e).name)):(0,s.I6)((0,p.i)(i,{complexType:e=>e}),(()=>!0));if(t)return function(e){const t=[],n=[];let r;const s=(0,p.i)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(const i of s){const s=i.getAttribute("name");if(!s)continue;let a,u;if(i.hasAttribute("type")?a=z(i.getAttribute("type")).name:(0,p.p)(i,{simpleType:{restriction:e=>(a=z(e.getAttribute("base")).name,{maxLength:e=>{u=+e.getAttribute("value")}})}}),!a)continue;const c="true"===i.getAttribute("nillable");let l=!1;switch(a.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":n.push(new d.A({name:s,alias:s,type:"integer",nullable:c,length:(0,y._b)("integer")}));break;case"float":case"double":case"decimal":n.push(new d.A({name:s,alias:s,type:"double",nullable:c,length:(0,y._b)("double")}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":n.push(new d.A({name:s,alias:s,type:"string",nullable:c,length:u??(0,y._b)("string")}));break;case"datetime":case"date":n.push(new d.A({name:s,alias:s,type:"date",nullable:c,length:u??(0,y._b)("date")}));break;case"pointpropertytype":r="point",l=!0;break;case"multipointpropertytype":r="multipoint",l=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":r="polyline",l=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":r="polygon",l=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":l=!0,t.push(new o.A(C,`geometry type '${a}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:t.push(new o.A(k,`Unknown field type '${a}'`,{type:(new XMLSerializer).serializeToString(e)}))}l&&n.push(new d.A({name:s,alias:s,type:"geometry",nullable:c}))}for(const e of n)if("integer"===e.type&&!e.nullable&&$.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:r,fields:n,errors:t}}(t)}throw new o.A(F,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(r)})}(t,(await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:w,TYPENAME:t,TYPENAMES:t,...n?.customParameters},signal:n?.signal})).data)}const $=new Set(["objectid","fid"]);async function V(e,t,n,s,i){let{data:a}=await(0,r.A)(e,{responseType:"text",query:X(t,n,s,i),signal:i?.signal});a=a.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{return JSON.parse(a)}catch(e){throw new o.A(P,"Error while parsing the response",{response:a,error:e})}}function X(e,t,n,r){const o="number"==typeof t?t:t.wkid;return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:w,TYPENAMES:e,OUTPUTFORMAT:n,SRSNAME:"EPSG:"+o,STARTINDEX:r?.startIndex,COUNT:r?.count,...r?.customParameters}}async function Y(e,t,n){const o=await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:w,TYPENAMES:t,RESULTTYPE:"hits",...n?.customParameters},signal:n?.signal}),s=/numberMatched=["'](?<numberMatched>\d+)["']/gi.exec(o.data);if(s?.groups)return+s.groups.numberMatched}function W(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function z(e){const[t,n]=e.split(":");return{prefix:n?t:"",name:n??t}}function J(e){let t="",n="";if((0,p.p)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{n=e.textContent}})}),t)throw new o.A(`wfs-layer:${t}`,n)}function _(e,t,n){const r={wkid:t.defaultSpatialReference},o=null!=n?.wkid?{wkid:n.wkid}:r;return{spatialReference:o,getFeatureSpatialReference:(0,f.Fi)(e)||o.wkid&&t.supportedSpatialReferences.includes(o.wkid)?{wkid:o.wkid}:{wkid:t.defaultSpatialReference}}}},13043:(e,t,n)=>{function r(e,t){if(e&&t)for(const n of e.children)if(n.localName in t){const e=t[n.localName];if("function"==typeof e){const t=e(n);t&&r(n,t)}else r(n,e)}}function*o(e,t){for(const n of e.children)if(n.localName in t){const e=t[n.localName];"function"==typeof e?yield e(n):yield*o(n,e)}}n.d(t,{i:()=>o,p:()=>r})}}]);