@arcgis/core 5.1.0-next.74 → 5.1.0-next.76

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 (254) hide show
  1. package/arcade/ArcadePortal.js +1 -1
  2. package/arcade/functions/aiServices.js +1 -1
  3. package/arcade/functions/featuresetbase.js +1 -1
  4. package/arcade/functions/geomasync.js +1 -1
  5. package/arcade/functions/knowledgegraph.js +1 -1
  6. package/arcade/functions/string.js +1 -1
  7. package/arcade/languageUtils.js +1 -1
  8. package/arcade/portalUtils.js +1 -1
  9. package/assets/esri/core/workers/RemoteClient.js +1 -1
  10. package/assets/esri/core/workers/chunks/07aca5ecad659d55e795.js +2 -0
  11. package/assets/esri/core/workers/chunks/09630888267cde87654f.js +1 -0
  12. package/assets/esri/core/workers/chunks/0fa207c68dfd7ddee160.js +1 -0
  13. package/assets/esri/core/workers/chunks/146424b5717d0a645ee1.js +1 -0
  14. package/assets/esri/core/workers/chunks/{d00dafad202450e6ee2e.js → 14eb2cc8e2ad6d8d03fd.js} +1 -1
  15. package/assets/esri/core/workers/chunks/1765dfeac20e34ce25b7.js +1 -0
  16. package/assets/esri/core/workers/chunks/176dd195f77b98cb0b0f.js +1 -0
  17. package/assets/esri/core/workers/chunks/1906416c84bab369bbd6.js +1 -0
  18. package/assets/esri/core/workers/chunks/{b98c24229463029504e8.js → 1f6b7626f333809837ef.js} +1 -1
  19. package/assets/esri/core/workers/chunks/1ff3c15a51c4dc991806.js +1 -0
  20. package/assets/esri/core/workers/chunks/2a2e97918524e0f436d7.js +1 -0
  21. package/assets/esri/core/workers/chunks/2b0b398180ed98c2c84c.js +1 -0
  22. package/assets/esri/core/workers/chunks/{bab23b905678e42815e5.js → 312036c89a6a09bb06c2.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{37091cf498a16ccad7ff.js → 330b47ac0759c3c35cc5.js} +1 -1
  24. package/assets/esri/core/workers/chunks/34b6b5dd415c68f0b0d1.js +1 -0
  25. package/assets/esri/core/workers/chunks/{a270960d80d8344dd75f.js → 34ea3ed78041437a8fc8.js} +1 -1
  26. package/assets/esri/core/workers/chunks/384c235d36f32769e32b.js +1 -0
  27. package/assets/esri/core/workers/chunks/3a183259805638c25363.js +1 -0
  28. package/assets/esri/core/workers/chunks/{deaca3cd202851ecf9c2.js → 3cce9dad8ee0e4971d50.js} +1 -1
  29. package/assets/esri/core/workers/chunks/3efbb684c0409955186d.js +1 -0
  30. package/assets/esri/core/workers/chunks/40d251b6b42a41d68bd2.js +1 -0
  31. package/assets/esri/core/workers/chunks/42336e0d1ef88737b078.js +1 -0
  32. package/assets/esri/core/workers/chunks/47b3a5213539548ff3a6.js +1 -0
  33. package/assets/esri/core/workers/chunks/4a23b27bfbcfa08fd9a7.js +1 -0
  34. package/assets/esri/core/workers/chunks/52b3a11c962810bc6dbe.js +1 -0
  35. package/assets/esri/core/workers/chunks/53750e85f3128993a43a.js +1 -0
  36. package/assets/esri/core/workers/chunks/{4bbe684050b3b04681d0.js → 537fe2522dff1e6ce03b.js} +1 -1
  37. package/assets/esri/core/workers/chunks/55fd201ca5e10c6e4761.js +1 -0
  38. package/assets/esri/core/workers/chunks/56941e8bbd2d49bf2656.js +1 -0
  39. package/assets/esri/core/workers/chunks/5d8e944b192aad4cf986.js +1 -0
  40. package/assets/esri/core/workers/chunks/{5476c2f7b83f4ccd0335.js → 5e1b847b116d21908a54.js} +1 -1
  41. package/assets/esri/core/workers/chunks/5ed8d8b5336c81fbcda3.js +1 -0
  42. package/assets/esri/core/workers/chunks/60915a3708a34da1977e.js +1 -0
  43. package/assets/esri/core/workers/chunks/61c523dd9d8027922465.js +1 -0
  44. package/assets/esri/core/workers/chunks/65c61171e6c6be5c5c2f.js +1 -0
  45. package/assets/esri/core/workers/chunks/6a3d207308b29651f397.js +1 -0
  46. package/assets/esri/core/workers/chunks/6c35583707f5c339ee99.js +1 -0
  47. package/assets/esri/core/workers/chunks/702e8468836863abd81b.js +1 -0
  48. package/assets/esri/core/workers/chunks/7540f7df86620f067b5a.js +1 -0
  49. package/assets/esri/core/workers/chunks/76e34f81bb4a7b0e694c.js +1 -0
  50. package/assets/esri/core/workers/chunks/7b6c8be59ed87e386aa4.js +1 -0
  51. package/assets/esri/core/workers/chunks/7c820c5f6f05480d5050.js +1 -0
  52. package/assets/esri/core/workers/chunks/80f4f686ce403cb2693f.js +1 -0
  53. package/assets/esri/core/workers/chunks/852f4cd514008fee5a55.js +1 -0
  54. package/assets/esri/core/workers/chunks/8a3bff0f58483c1665f9.js +1 -0
  55. package/assets/esri/core/workers/chunks/8b046e28f879079caada.js +1 -0
  56. package/assets/esri/core/workers/chunks/8d738e9acc2f222235ea.js +1 -0
  57. package/assets/esri/core/workers/chunks/9103eb0b9078019d3a26.js +1 -0
  58. package/assets/esri/core/workers/chunks/915e2711d3a2cfa402b2.js +1 -0
  59. package/assets/esri/core/workers/chunks/91f9e0e3662d4bf9f163.js +1 -0
  60. package/assets/esri/core/workers/chunks/99c161fecae710b53b40.js +1 -0
  61. package/assets/esri/core/workers/chunks/99d298d0039c536fcf3e.js +1 -0
  62. package/assets/esri/core/workers/chunks/9a5ef33d99a8f89956ff.js +1 -0
  63. package/assets/esri/core/workers/chunks/9d10db72e342fe63c981.js +1 -0
  64. package/assets/esri/core/workers/chunks/{a36761e3122f70fbb3c9.js → 9d6491f996eeb0c646ed.js} +1 -1
  65. package/assets/esri/core/workers/chunks/a015c2f54eb91e43a1f4.js +1 -0
  66. package/assets/esri/core/workers/chunks/a242ec19a7508de436da.js +1 -0
  67. package/assets/esri/core/workers/chunks/a320998f18922a35899f.js +1 -0
  68. package/assets/esri/core/workers/chunks/a7f9f478bd1493fc3c76.js +1 -0
  69. package/assets/esri/core/workers/chunks/aac6a57edd7494125204.js +1 -0
  70. package/assets/esri/core/workers/chunks/b73c146d3e550eaf07eb.js +1 -0
  71. package/assets/esri/core/workers/chunks/b7af0e6b9aadbcaf6a0b.js +1 -0
  72. package/assets/esri/core/workers/chunks/b803e7b0d489bb628d72.js +1 -0
  73. package/assets/esri/core/workers/chunks/baeb96aef03d4c566af7.js +1 -0
  74. package/assets/esri/core/workers/chunks/bc75ab48f4c7609ef09d.js +1 -0
  75. package/assets/esri/core/workers/chunks/bc78937986854e500b8e.js +1 -0
  76. package/assets/esri/core/workers/chunks/bd10d21545bca9a49de0.js +1 -0
  77. package/assets/esri/core/workers/chunks/{b905e637a67fbb7af4ae.js → bf8f603848bad4a7deb4.js} +1 -1
  78. package/assets/esri/core/workers/chunks/bfe575da727ce7c8d331.js +2 -0
  79. package/assets/esri/core/workers/chunks/c31ee5617c61a933cb0e.js +1 -0
  80. package/assets/esri/core/workers/chunks/cb45e5d4a4ef82cda583.js +1 -0
  81. package/assets/esri/core/workers/chunks/ce7ef7c4ca14d66d96f6.js +1 -0
  82. package/assets/esri/core/workers/chunks/{5b324e572737a308500d.js → cf14b3a44705dacefac4.js} +1 -1
  83. package/assets/esri/core/workers/chunks/d3b086eb9aa8c7d09048.js +1 -0
  84. package/assets/esri/core/workers/chunks/d55cef8199b8246fea3f.js +1 -0
  85. package/assets/esri/core/workers/chunks/d8decaee2c780e1b5e35.js +1 -0
  86. package/assets/esri/core/workers/chunks/{41809c16544ec25120fa.js → d95ffd990b3a7df69e1e.js} +1 -1
  87. package/assets/esri/core/workers/chunks/dc54d4a9fe1691862356.js +1 -0
  88. package/assets/esri/core/workers/chunks/dda2cb5c073d1e65f14f.js +1 -0
  89. package/assets/esri/core/workers/chunks/e18badd11f360cc2912b.js +1 -0
  90. package/assets/esri/core/workers/chunks/{ad064583f8a836005098.js → e262c4864dc06c43b380.js} +1 -1
  91. package/assets/esri/core/workers/chunks/e610d24539a675fb054b.js +1 -0
  92. package/assets/esri/core/workers/chunks/e9c5c295b6bf10e942a4.js +1 -0
  93. package/assets/esri/core/workers/chunks/ea59b81299acaf0d85ee.js +1 -0
  94. package/assets/esri/core/workers/chunks/{873c1b705ac3d4e6c384.js → ea97619a4470f1540b99.js} +1 -1
  95. package/assets/esri/core/workers/chunks/eaab5ac049622986e3bc.js +1 -0
  96. package/assets/esri/core/workers/chunks/edee616b6f1b5be8fd39.js +1 -0
  97. package/assets/esri/core/workers/chunks/ef0085aa743b33cb549f.js +1 -0
  98. package/assets/esri/core/workers/chunks/f0250cecb243b32cdba7.js +1 -0
  99. package/assets/esri/core/workers/chunks/f518835b2dc89a48cfb1.js +1 -0
  100. package/assets/esri/core/workers/chunks/f6c8e93ca2987e83f925.js +1 -0
  101. package/assets/esri/themes/base/widgets/_Sketch.scss +32 -0
  102. package/assets/esri/themes/dark/main.css +1 -1
  103. package/assets/esri/themes/light/main.css +1 -1
  104. package/assets/esri/themes/light/view.css +1 -1
  105. package/assets/esri/widgets/Sketch/t9n/Sketch.json +1 -1
  106. package/assets/esri/widgets/Sketch/t9n/Sketch_en.json +1 -1
  107. package/chunks/MultiPathImpl.js +1 -1
  108. package/chunks/Point2D.js +1 -1
  109. package/chunks/SpatialReference.js +1 -1
  110. package/chunks/aiServices.js +1 -1
  111. package/chunks/languageUtils.js +1 -1
  112. package/config.js +1 -1
  113. package/core/workers/registry.js +1 -1
  114. package/form/elements/AttachmentElement.d.ts +15 -16
  115. package/form/elements/GroupElement.d.ts +3 -2
  116. package/form/elements/inputs/attachments/AttachmentInput.d.ts +7 -9
  117. package/form/elements/inputs/attachments/AudioInput.d.ts +6 -8
  118. package/form/elements/inputs/attachments/DocumentInput.d.ts +5 -7
  119. package/form/elements/inputs/attachments/ImageInput.d.ts +6 -8
  120. package/form/elements/inputs/attachments/Input.d.ts +2 -6
  121. package/form/elements/inputs/attachments/SignatureInput.d.ts +5 -7
  122. package/form/elements/inputs/attachments/VideoInput.d.ts +6 -8
  123. package/form/elements/inputs/attachments/types.d.ts +3 -3
  124. package/geometry/FlatGeometry.js +1 -1
  125. package/geometry/operators/projectOperator.js +1 -1
  126. package/graphic/ImageryGraphicOrigin.js +1 -1
  127. package/graphic/ImageryTileGraphicOrigin.js +1 -1
  128. package/graphic/WCSGraphicOrigin.js +1 -1
  129. package/kernel.js +1 -1
  130. package/layers/mixins/ArcGISImageService.js +1 -1
  131. package/package.json +4 -4
  132. package/popup/Features.js +1 -1
  133. package/support/revision.js +1 -1
  134. package/symbols/cim/CIMSymbolHelper.js +1 -1
  135. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  136. package/symbols/support/previewCIMSymbol.js +1 -1
  137. package/views/2d/analysis/AreaMeasurement/AreaMeasurementController.js +1 -1
  138. package/views/2d/engine/webgl/TextureManager.js +1 -1
  139. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  140. package/views/2d/layers/MediaLayerView2D.js +1 -1
  141. package/views/2d/layers/TileLayerView2D.js +1 -1
  142. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  143. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  144. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  145. package/views/3d/analysis/Dimension/DimensionController.js +1 -1
  146. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
  147. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  148. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  149. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  150. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentMove.js +1 -1
  151. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
  152. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  153. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  154. package/views/VideoView.js +1 -1
  155. package/views/draw/DrawGraphicTool.js +1 -1
  156. package/views/draw/DrawTool.js +1 -1
  157. package/views/draw/support/Box.js +1 -1
  158. package/views/draw/support/Reshape.js +1 -1
  159. package/views/draw/support/managers/MeasurementManager.js +1 -1
  160. package/views/interactive/SegmentLabels.js +1 -1
  161. package/views/interactive/snapping/SelfSnappingEngine.js +1 -1
  162. package/views/support/GeometryWorker.js +2 -0
  163. package/views/support/GeometryWorkerHandle.js +2 -0
  164. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +1 -3
  165. package/widgets/FeatureTable/Grid/GridViewModel.d.ts +2 -11
  166. package/widgets/FeatureTable/support/types.d.ts +2 -1
  167. package/widgets/OrientedImageryViewer/OrientedImageryViewerVisibleElements.d.ts +28 -0
  168. package/widgets/OrientedImageryViewer/OrientedImageryViewerVisibleElements.js +1 -1
  169. package/widgets/OrientedImageryViewer.d.ts +27 -0
  170. package/widgets/Sketch/SketchViewModel.d.ts +10 -2
  171. package/widgets/Sketch/SketchViewModel.js +1 -1
  172. package/widgets/Sketch/support/ResponsiveToolbar/MeasuredContentGroup.js +1 -1
  173. package/widgets/Sketch/support/ResponsiveToolbar/ResponsiveToolbar.js +1 -1
  174. package/widgets/Sketch.js +1 -1
  175. package/assets/esri/core/workers/chunks/00bae4b7e179336e0362.js +0 -1
  176. package/assets/esri/core/workers/chunks/041c372e98a6fba90b36.js +0 -1
  177. package/assets/esri/core/workers/chunks/0783890816bac45277b9.js +0 -1
  178. package/assets/esri/core/workers/chunks/07aac6245a0d1adbb2d4.js +0 -1
  179. package/assets/esri/core/workers/chunks/1286f41f245ef22b3a26.js +0 -1
  180. package/assets/esri/core/workers/chunks/12e575a6d2b008b8fc2b.js +0 -1
  181. package/assets/esri/core/workers/chunks/161d60fdac2013c15543.js +0 -1
  182. package/assets/esri/core/workers/chunks/168de44a789d1cecc1f8.js +0 -1
  183. package/assets/esri/core/workers/chunks/1d9d7915cf7449e5d468.js +0 -1
  184. package/assets/esri/core/workers/chunks/1db1656a033f3992f0d6.js +0 -1
  185. package/assets/esri/core/workers/chunks/235cb82952a18ff8d206.js +0 -1
  186. package/assets/esri/core/workers/chunks/27b80c386cebadcaca3c.js +0 -1
  187. package/assets/esri/core/workers/chunks/29d3890a5a43d934067a.js +0 -1
  188. package/assets/esri/core/workers/chunks/2f17438d215bea3ce70f.js +0 -1
  189. package/assets/esri/core/workers/chunks/356cb86606b8c674f947.js +0 -1
  190. package/assets/esri/core/workers/chunks/398e0dd2bc7e1ab84831.js +0 -1
  191. package/assets/esri/core/workers/chunks/3b1052aa30af3f6186cc.js +0 -1
  192. package/assets/esri/core/workers/chunks/3e87e3ad857d72f6ecbb.js +0 -1
  193. package/assets/esri/core/workers/chunks/42e483fde18f12da32a6.js +0 -1
  194. package/assets/esri/core/workers/chunks/43ab44d37bc0ea97ef98.js +0 -1
  195. package/assets/esri/core/workers/chunks/488ed9584b527ec47be3.js +0 -1
  196. package/assets/esri/core/workers/chunks/4ad32580e0c0699fde1f.js +0 -1
  197. package/assets/esri/core/workers/chunks/4c13869d260a902d3014.js +0 -1
  198. package/assets/esri/core/workers/chunks/54ed37ec9682ea739deb.js +0 -1
  199. package/assets/esri/core/workers/chunks/5511e640e171c294f52a.js +0 -2
  200. package/assets/esri/core/workers/chunks/55369c5bd65bcaf78da1.js +0 -1
  201. package/assets/esri/core/workers/chunks/56fd3da911c2c4511e5d.js +0 -1
  202. package/assets/esri/core/workers/chunks/59592bb25f226865e88a.js +0 -1
  203. package/assets/esri/core/workers/chunks/5d55b4449bcb24cd72b6.js +0 -1
  204. package/assets/esri/core/workers/chunks/5d8fe41a3c06ddb4094b.js +0 -1
  205. package/assets/esri/core/workers/chunks/608d707fd9d9f9088473.js +0 -1
  206. package/assets/esri/core/workers/chunks/6a21c9a4aeebe806ea39.js +0 -1
  207. package/assets/esri/core/workers/chunks/6c7ff968bd4fc816442d.js +0 -1
  208. package/assets/esri/core/workers/chunks/6d11ec355e5474b2968b.js +0 -1
  209. package/assets/esri/core/workers/chunks/6d25230dd85a4ba54c4f.js +0 -1
  210. package/assets/esri/core/workers/chunks/7027d93dc5a4595d70c6.js +0 -1
  211. package/assets/esri/core/workers/chunks/70b35b2446558d5280e3.js +0 -1
  212. package/assets/esri/core/workers/chunks/7349cb45a93e6916f115.js +0 -1
  213. package/assets/esri/core/workers/chunks/76edaeaf8fe344bb77a8.js +0 -1
  214. package/assets/esri/core/workers/chunks/76fe5b821d6b54db5721.js +0 -1
  215. package/assets/esri/core/workers/chunks/7951d93f5f15aa76f49c.js +0 -1
  216. package/assets/esri/core/workers/chunks/7a56c836c89a8b978800.js +0 -1
  217. package/assets/esri/core/workers/chunks/81d30c9062ad0120a863.js +0 -1
  218. package/assets/esri/core/workers/chunks/88c5f7c712c6b89b5109.js +0 -1
  219. package/assets/esri/core/workers/chunks/88e469b82d2594f23649.js +0 -1
  220. package/assets/esri/core/workers/chunks/8a8242e7cc7e6a9e7876.js +0 -1
  221. package/assets/esri/core/workers/chunks/9444ed8ea117861ae89b.js +0 -1
  222. package/assets/esri/core/workers/chunks/9a38fd68b02b617c45d3.js +0 -1
  223. package/assets/esri/core/workers/chunks/9be9ccce6369f67202bc.js +0 -1
  224. package/assets/esri/core/workers/chunks/a37c28e3c4a2be9fd1d5.js +0 -1
  225. package/assets/esri/core/workers/chunks/a8d7f59927bdad564141.js +0 -1
  226. package/assets/esri/core/workers/chunks/a94bd20551c1179c7ec5.js +0 -1
  227. package/assets/esri/core/workers/chunks/a9d2c83bb10b5ade0ca0.js +0 -1
  228. package/assets/esri/core/workers/chunks/abe22ae8ee0dcc9efbb7.js +0 -1
  229. package/assets/esri/core/workers/chunks/b702279c48f3009f6dd8.js +0 -1
  230. package/assets/esri/core/workers/chunks/bc887bd62579dba81e2b.js +0 -1
  231. package/assets/esri/core/workers/chunks/be0341567bb19e101a4f.js +0 -1
  232. package/assets/esri/core/workers/chunks/be1d6a571f76933dfbb0.js +0 -1
  233. package/assets/esri/core/workers/chunks/bfcdc5c315131aae34d8.js +0 -1
  234. package/assets/esri/core/workers/chunks/c0f624a2ca0d07ef8f8c.js +0 -1
  235. package/assets/esri/core/workers/chunks/c327fe276238af60fda4.js +0 -1
  236. package/assets/esri/core/workers/chunks/c5f155fe114a2a05aaf2.js +0 -2
  237. package/assets/esri/core/workers/chunks/c61002a117dc2218d6af.js +0 -1
  238. package/assets/esri/core/workers/chunks/c804a66ef7615aa8de89.js +0 -1
  239. package/assets/esri/core/workers/chunks/cb5e4b9b4a59c2622eb5.js +0 -1
  240. package/assets/esri/core/workers/chunks/d201a5dff18a5bb467ab.js +0 -1
  241. package/assets/esri/core/workers/chunks/d21fdd67477800101f3b.js +0 -1
  242. package/assets/esri/core/workers/chunks/db588bf3256e95c977b7.js +0 -1
  243. package/assets/esri/core/workers/chunks/dfdd474fddcd1d6091ce.js +0 -1
  244. package/assets/esri/core/workers/chunks/e235ea4293d5d463acfb.js +0 -1
  245. package/assets/esri/core/workers/chunks/e43486113aaf72ac4dc1.js +0 -1
  246. package/assets/esri/core/workers/chunks/ea4c3393c5757e309a71.js +0 -1
  247. package/assets/esri/core/workers/chunks/ed216ddeb7f59f510bd0.js +0 -1
  248. package/assets/esri/core/workers/chunks/ef8886dff54063928bcb.js +0 -1
  249. package/assets/esri/core/workers/chunks/f43a63094190d2074cd0.js +0 -1
  250. package/assets/esri/core/workers/chunks/f5223ffb3be548c9b0a1.js +0 -1
  251. package/views/support/MeasurementWorker.js +0 -2
  252. package/views/support/MeasurementWorkerHandle.js +0 -2
  253. /package/assets/esri/core/workers/chunks/{5511e640e171c294f52a.js.LICENSE.txt → 07aca5ecad659d55e795.js.LICENSE.txt} +0 -0
  254. /package/assets/esri/core/workers/chunks/{c5f155fe114a2a05aaf2.js.LICENSE.txt → bfe575da727ce7c8d331.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[926,2188],{69540(e,t,i){i.d(t,{OU:()=>c,Pw:()=>h});var n=i(5482),s=i(69622),r=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const u=Symbol("ClonableMixin"),c=e=>{var t;const i=e;let s=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,n=t.store,s={},l=new Map;for(const t in i){const o=i[t],a=n?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const c=this[t];let h=null;if("function"==typeof u)h=u(c,e);else if("reference"===u)h=c;else if(h=(0,r.TU)(c,e),null!=c&&null==h)continue;0===a?l.set(t,h):s[t]=h}const u=new(0,Object.getPrototypeOf(this).constructor)(s);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return u}};return s=(0,n.Cg)([(0,l.$)("esri.core.Clonable")],s),s},h=c(s.A)},66344(e,t,i){i.d(t,{q:()=>a});const n=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),s>this._maxSize)return void this._notifyRemove(t,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return n||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new r(i,s,l)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let n=i.entry.usedMemory;for(;n>this._maxSize;){const e=this._notifyRemove(t,i.entry,n,1);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}i.size=n,this._size+=n,e.size+=n,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,n)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._clients.forEach(i=>{const{id:s,name:r}=i;if(n.startsWith(s)){const i=t[r]||0;t[r]=i+e.size}})});const n={};this._clients.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,n[i]=Math.round(100*e.hitRate)+"%"}else n[i]="0%"});const s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+n[i]);for(let t=i.length-1;t>=0;--t){const n=i[t];n&&(e["Priority "+(t+-3-1)]=Math.round(n/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,n){const s=this._clients.get(e.split(o)[0])?.removeFunc,r=s?.(t,n,i);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const n=t?.id;let s=!0;for(;s;){s=!1;for(const[r,a]of this._db)if(0===a.lifetime&&(!n||r.startsWith(n))){const n=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,a,n),i.size<=.9*e)return;s||=this._db.has(r)}}for(const[s,r]of this._db)if(!n||s.startsWith(n)){const n=t??this._clients.get(s.split(o)[0]);if(this._purgeItem(s,r,n),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,1);null!=n&&n>0&&(this._size+=n,i&&(i.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new s(0);class r{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new s(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999(e,t,i){i.d(t,{DZ:()=>m,Ke:()=>f,Tj:()=>c,UT:()=>p,aD:()=>g,jJ:()=>u});var n=i(5482),s=i(69622),r=i(97768),o=i(17676),a=i(10107),l=i(64108);function u(e,t,i){return(0,o.Lx)(e.map((e,n)=>t.apply(i,[e,n])))}async function c(e,t,i){return(await(0,o.Lx)(e.map((e,n)=>t.apply(i,[e,n])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function m(e){try{return h(await e)}catch(e){return(0,o.QP)(e),d(e)}}function p(e,t){return new y(e,t)}let y=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.xt)(this._abortHandle),this._abortController=null}};(0,n.Cg)([(0,a.MZ)()],y.prototype,"value",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"error",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"finished",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"promise",void 0),(0,n.Cg)([(0,a.MZ)()],y.prototype,"_result",void 0),y=(0,n.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],y);class g{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,n.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,n.hk)(t)}}}},67482(e,t,i){function n(e){return null!=a(e)||null!=o(e)}function s(e){return l.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let i=!0;if(c&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,n=0;for(;!t&&n<=e.length;)t=!u.test(e[n]),n++;i=!t}}return i}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const i=t.groups,n=+i.year,s=+i.month-1,r=+i.day,o=+(i.hours??"0"),a=+(i.minutes??"0"),u=+(i.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const c=i.ms??"0",h=c?+c.padEnd(3,"0").slice(0,3):0;let d;if(i.isUTC||!i.offsetSign)d=Date.UTC(n,s,r,o,a,u,h);else{const e=+i.offsetHours,t=+i.offsetMinutes;d=6e4*("+"===i.offsetSign?-1:1)*(60*e+t)+Date.UTC(n,s,r,o,a,u,h)}return Number.isNaN(d)?null:d}i.d(t,{Br:()=>s,Cq:()=>n,_U:()=>r});const l=/^(?:(?<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})))?$/,u=/^((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,c=!Number.isNaN(new Date("technology 10").getTime())},75503(e,t,i){i.d(t,{wq:()=>a});var n=i(4576),s=i(21818),r=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),S.prune(),v.prune(),I.prune(),w.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const n=this._toBBox;if(x(e,i))for(S.clear();i;){for(let s=0,r=i.children.length;s<r;s++){const r=i.children[s],o=i.leaf?n(r):r;x(e,o)&&(i.leaf?t(r):_(e,o)?l(r,t):S.push(r))}i=S.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!x(e,t))return!1;for(S.clear();t;){for(let n=0,s=t.children.length;n<s;n++){const s=t.children[n],r=t.leaf?i(s):s;if(x(e,r)){if(t.leaf||_(e,r))return!0;S.push(s)}}t=S.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new z([]),this}remove(e){if(!e)return this;let t,i=this._data,r=null,o=0,a=!1;const l=this._toBBox(e);for(I.clear(),w.clear();i||I.length>0;){if(i||(i=I.pop(),r=I.data[I.length-1],o=w.pop()??0,a=!0),i.leaf&&(t=(0,n.qh)(i.children,(0,s.z)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),I.push(i),this._condense(I),this;a||i.leaf||!_(i,l)?r?(o++,i=r.children[o],a=!1):i=null:(I.push(i),w.push(o),o=0,r=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,n){const s=i-t+1;let r=this._maxEntries;if(s<=r){const n=new z(e.slice(t,i+1));return u(n,this._toBBox),n}n||(n=Math.ceil(Math.log(s)/Math.log(r)),r=Math.ceil(s/r**(n-1)));const o=new B([]);o.height=n;const a=Math.ceil(s/r),l=a*Math.ceil(Math.sqrt(r));b(e,t,i,l,this._compareMinX);for(let s=t;s<=i;s+=l){const t=Math.min(s+l-1,i);b(e,s,t,a,this._compareMinY);for(let i=s;i<=t;i+=a){const s=Math.min(i+a-1,t);o.children.push(this._build(e,i,s,n-1))}}return u(o,this._toBBox),o}_insert(e,t,i){const n=this._toBBox,s=i?e:n(e);I.clear();const r=function(e,t,i,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==i;){let i,n=1/0,s=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=m(o),l=y(e,o)-a;l<s?(s=l,n=a<n?a:n,i=o):l===s&&a<n&&(n=a,i=o)}t=i||t.children[0]}return t}(s,this._data,t,I);for(r.children.push(e),h(r,s);t>=0&&I.data[t].children.length>this._maxEntries;)this._split(I,t),t--;!function(e,t,i){for(let n=i;n>=0;n--)h(t.data[n],e)}(s,I,t)}_split(e,t){const i=e.data[t],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);const r=this._chooseSplitIndex(i,s,n);if(!r)return;const o=i.children.splice(r,i.children.length-r),a=i.leaf?new z(o):new B(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new B([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let n,s,r;n=s=1/0;for(let o=t;o<=i-t;o++){const t=c(e,0,o,this._toBBox),a=c(e,o,i,this._toBBox),l=g(t,a),u=m(t)+m(a);l<n?(n=l,r=o,s=u<s?u:s):l===n&&u<s&&(s=u,r=o)}return r}_chooseSplitAxis(e,t,i){const n=e.leaf?this._compareMinX:d,s=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,s)&&e.children.sort(n)}_allDistMargin(e,t,i,n){e.children.sort(n);const s=this._toBBox,r=c(e,0,t,s),o=c(e,i-t,i,s);let a=p(r)+p(o);for(let n=t;n<i-t;n++){const t=e.children[n];h(r,e.leaf?s(t):t),a+=p(r)}for(let n=i-t-1;n>=t;n--){const t=e.children[n];h(o,e.leaf?s(t):t),a+=p(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const s=e.data[t-1],r=s.children;r.splice((0,n.qh)(r,i,r.length,s.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(v.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,s.z)(e));else v.pushArray(i.children);i=v.pop()??null}}function u(e,t){c(e,0,e.children.length,t,e)}function c(e,t,i,n,s){s||(s=new z([])),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let r,o=t;o<i;o++)r=e.children[o],h(s,e.leaf?n(r):r);return s}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function m(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),s=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,s-i)*Math.max(0,r-n)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function x(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function b(e,t,i,n,s){const r=[t,i];for(;r.length;){const t=r.pop(),i=r.pop();if(t-i<=n)continue;const a=i+Math.ceil((t-i)/n/2)*n;(0,o.q)(e,a,i,t,s),r.push(i,a,a,t)}}const S=new r.A,v=new r.A,I=new r.A,w=new r.A({deallocator:void 0});class F{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class M extends F{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class z extends M{constructor(e){super(),this.children=e,this.leaf=!0}}class B extends M{constructor(e){super(),this.children=e,this.leaf=!1}}},14607(e,t,i){i.d(t,{B:()=>u,GP:()=>a,qg:()=>c});var n=i(799),s=i(73444);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],no:[","," "],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(e=(0,s.JK)()){let t=(e=e.toLowerCase())in r;if(!t){const i=e.split("-");i.length>1&&i[0]in r&&(e=i[0],t=!0),t||(e="en")}const[i,n,o="#,##0.###"]=r[e];return{decimal:i,group:n,pattern:o}}function a(e,t){const i=o((t={...t}).locale);t.customs=i;const n=t.pattern||i.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,i){const n=(i=i||{}).customs.group,s=i.customs.decimal,r=t.split(";"),o=r[0];if((t=r[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,u=o.match(a);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return!1===i.fractional&&(i.places=0),t.replace(a,function(e,t,i){!0===(i=i||{}).places&&(i.places=0),i.places===1/0&&(i.places=6);const n=t.split("."),s="string"==typeof i.places&&i.places.indexOf(",");let r=i.places;s?r=i.places.slice(s+1):+r>=0||(r=(n[1]||[]).length),i.round<0||(e=Number(e.toFixed(Number(r))));const o=String(Math.abs(e)).split("."),a=o[1]||"";if(n[1]||i.places){s&&(i.places=i.places.slice(0,Math.max(0,s)));const e=void 0!==i.places?i.places:n[1]&&n[1].lastIndexOf("0")+1;+e>a.length&&(o[1]=a.padEnd(Number(e),"0")),+r<a.length&&(o[1]=a.slice(0,Math.max(0,Number(r))))}else o[1]&&o.pop();const l=n[0].replace(",","");let u=l.indexOf("0");-1!==u&&(u=l.length-u,u>o[0].length&&(o[0]=o[0].padStart(u,"0")),l.includes("#")||(o[0]=o[0].slice(-u)));let c,h,d=n[0].lastIndexOf(",");if(-1!==d){c=n[0].length-d-1;const e=n[0].slice(0,d);d=e.lastIndexOf(","),-1!==d&&(h=e.length-d-1)}const f=[];for(let e=o[0];e;){const t=e.length-c;f.push(t>0?e.slice(Math.max(0,t)):e),e=t>0?e.slice(0,t):"",h&&(c=h,h=void 0)}return o[0]=f.reverse().join(i.group||","),o.join(i.decimal||".")}(e,u[0],{decimal:s,group:n,places:i.places,round:i.round}))}(e,n,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function u(e){const t=o((e=e||{}).locale),i=e.pattern||t.pattern,s=t.group,r=t.decimal;let a=1;if(i.includes("%"))a/=100;else if(i.includes("‰"))a/=1e3;else if(i.includes("¤"))throw new Error("currency notation not supported");const u=i.split(";");1===u.length&&u.push("-"+u[0]);const c=d(u,t=>(t="(?:"+(0,n.Cj)(t,".")+")").replace(l,t=>{const i={signed:!1,separator:e.strict?s:[s,""],fractional:e.fractional,decimal:r,exponent:!1},n=t.split(".");let o=e.places;1===n.length&&1!==a&&(n[1]="###"),1===n.length||0===o?i.fractional=!1:(void 0===o&&(o=e.pattern?n[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(i.fractional=!0),!e.places&&+o<n[1].length&&(o+=","+n[1].length),i.places=o);const l=n[0].split(",");return l.length>1&&(i.groupSize=l.pop().length,l.length>1&&(i.groupSize2=l.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=h(e),i=d(e.fractional,t=>{let i="";return t&&0!==e.places&&(i="\\"+e.decimal,e.places===1/0?i="(?:"+i+"\\d+)?":i+="\\d{"+e.places+"}"),i},!0);let n=t+i;return i&&(n="(?:(?:"+n+")|(?:"+i+"))"),n+d(e.exponent,t=>t?"([eE]"+h({signed:e.eSigned})+")":"")}(i)+")"}),!0);return{regexp:c.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:s,decimal:r,factor:a}}function c(e,t){const i=u(t),n=new RegExp("^"+i.regexp+"$").exec(e);if(!n)return NaN;let s=n[1];if(!n[1]){if(!n[2])return NaN;s=n[2],i.factor*=-1}return s=s.replaceAll(new RegExp("["+i.group+"\\s\\xa0]","g"),"").replace(i.decimal,"."),Number(s)*i.factor}function h(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,e=>e?"[-+]":"",!0)+d(e.separator,t=>{if(!t)return"(?:\\d+)";" "===(t=(0,n.Cj)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const i=e.groupSize,s=e.groupSize2;if(s){const e="(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+t+"]\\d{"+s+"})*["+t+"]\\d{"+i+"})";return i-s>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(i-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(i-1)+"}(?:["+t+"]\\d{"+i+"})*)"},!0)}const d=(e,t,i)=>{if(!Array.isArray(e))return t(e);const n=[];for(let i=0;i<e.length;i++)n.push(t(e[i]));return f(n.join("|"),Boolean(i))},f=(e,t)=>"("+(t?"?:":"")+e+")"},36708(e,t,i){i.d(t,{C_:()=>d,OH:()=>p,Vh:()=>y,on:()=>h,pc:()=>g,wB:()=>l,z7:()=>u});var n=i(37955),s=i(36563),r=i(97768),o=i(17676),a=i(14012);function l(e,t,i={}){return c(e,t,i,f)}function u(e,t,i={}){return c(e,t,i,m)}function c(e,t,i={},n){let s=null;const o=i.once?(e,i)=>{n(e)&&((0,r.xt)(s),t(e,i))}:(e,i)=>{n(e)&&t(e,i)};if(s=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return s}function h(e,t,i,o={}){let a=null,u=null,c=null;function h(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.xt)(c),i(e)}const f=l(e,(e,i)=>{h(),(0,n.wb)(e)&&(a=e,u=(0,n.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return c=(0,s.hA)(()=>{f.remove(),h()}),c}function d(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const n=e();if(t?.(n))return Promise.resolve(n);let a=null;function l(){a=(0,r.xt)(a)}return new Promise((n,r)=>{a=(0,s.vE)([(0,o.u7)(i,()=>{l(),r((0,o.NK)())}),c(e,e=>{l(),n(e)},{sync:!1,once:!0},t??f)])})}(e,m,t)}function f(e){return!0}function m(e){return!!e}i(80559);const p={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},60408(e,t,i){function n(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function s(e){return void 0!==e.points}function r(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?r(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":n(e)?"esriGeometryEnvelope":s(e)?"esriGeometryMultipoint":null:null}function c(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function h(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}i.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>c,Rg:()=>o,U9:()=>s,W0:()=>h,ZC:()=>n,fT:()=>r,uW:()=>l})},65864(e,t,i){i.d(t,{rS:()=>c,xD:()=>d});var n=i(5443),s=i(91075),r=i(48526),o=i(86738),a=i(39829),l=i(82799),u=i(60408);function c(e){return null==e?null:e instanceof s.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?r.A.fromJSON(e):(0,u.ZC)(e)?n.A.fromJSON(e):null}const h={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:n.A,esriGeometryMultipoint:r.A,esriGeometryMultiPatch:a.A};function d(e){return e&&h[e]||null}},6518(e,t,i){i.d(t,{F:()=>a});var n=i(44208),s=i(75503),r=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new s.wq(9,(0,n.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((i,n)=>{e[t++]=n}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(e,t,i){i.d(t,{A:()=>m});var n=i(4576),s=i(49186),r=i(65529),o=i(53966),a=i(70328),l=i(19419),u=i(90708),c=i(6518),h=i(51441),d=i(37730);const f=(0,a.vt)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new c.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=d.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,n,s]=this.fullBounds;return{xmin:t,ymin:i,xmax:n,ymax:s,spatialReference:(0,h.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(n.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,a.Jt)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let n;if(i?(e.displayId=i.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);n=(0,u.jQ)(null!=n?n:(0,l.vt)(),e.geometry),null!=n&&this._boundsStore.set(t,n),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:n,attributes:r}=e;for(const e in r)i.attributes[e]=r[e];return n&&(i.geometry=n,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),n)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},37730(e,t,i){i.d(t,{T:()=>s});var n=i(43334);const s={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,i)=>new n.Om(t,e.attributes,null,e.objectId,e.displayId,e.distance),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},25209(e,t,i){i.r(t),i.d(t,{default:()=>$});var n=i(11254),s=i(60999),r=i(67482),o=i(49186),a=i(53966),l=i(17676),u=i(84952),c=i(91218),h=i(16930),d=i(21325),f=i(28735),m=i(43334),p=i(92722),y=i(83221),g=i(31464),_=i(75752),x=i(14607),b=i(30524),S=i(54625);const v=/^\s*"([\S\s]*)"\s*$/,I=/""/g,w=[",",";","|","\t"];function*F(e,t,i){let n=0;for(;n<=e.length;){const s=e.indexOf(t,n),r=e.slice(n,s>-1?s:void 0);n+=r.length+t.length,i&&!r.trim()||(yield r)}}function M(e){const t=e.includes("\r\n")?"\r\n":"\n";return F(e,t,!0)}function z(e,t){return F(e,t,!1)}function B(e,t,i){e=e.trim(),t=t?.trim();const n=[],s=Array.from(new Set([i?.delimiter,...w])).filter(e=>null!=e);for(const i of s){const s=N(e,i).length,r=N(t,i).length??s;s>1&&n.push({weight:Math.min(s,r),delimiter:i})}const r=n.sort(({weight:e},{weight:t})=>t-e).map(({delimiter:e})=>e);for(const t of r){const n=T(e,t).names,s=(0,S.i_)(n,i?.longitudeField,i?.latitudeField);if(s.longitudeFieldName&&s.latitudeFieldName)return{delimiter:t,locationInfo:s}}return{delimiter:r[0],locationInfo:null}}function*A(e,t,i,n=()=>Object.create(null)){const s=M(e);s.next();let r="",o="",a=0,l=n(),u=0;e:for(const e of s){const s=z(e,i);for(const e of s)if(r+=o+e,o="",a+=C(e),a%2==0){if(a>0){const e=v.exec(r);if(!e){l=n(),u=0,r="",a=0;continue e}l[t[u]]=e[1].replaceAll(I,'"'),u++}else l[t[u]]=r,u++;r="",a=0}else o=i;0===a?(yield l,l=n(),u=0):o="\n"}}function T(e,t){const i=N(e,t).filter(e=>null!=e),n=i.map(e=>(0,b.rS)(e));for(let e=n.length-1;e>=0;e--)n[e]||(n.splice(e,1),i.splice(e,1));return{names:n,aliases:i}}function N(e,t){if(!e?.length)return[];const i=[];let n="",s="",r=0;const o=z(e,t);for(const e of o)if(n+=s+e,s="",r+=C(e),r%2==0){if(r>0){const e=v.exec(n);e&&i.push(e[1].replaceAll(I,'"'))}else i.push(n);n="",r=0}else s=t;return i}function C(e){let t=0,i=0;for(i=e.indexOf('"',i);i>=0;)t++,i=e.indexOf('"',i+1);return t}function E(e,t,i,n,s){const r=[],o=A(e,i,t),a=[];for(const e of o){if(10===a.length)break;a.push(e)}for(let e=0;e<i.length;e++){const t=i[e],o=n[e];if(t===s.longitudeFieldName||t===s.latitudeFieldName)r.push({name:t,type:"esriFieldTypeDouble",alias:o});else{let e;switch(O(a.map(e=>e[t]))){case"integer":e="esriFieldTypeInteger";break;case"double":e="esriFieldTypeDouble";break;case"date":e="esriFieldTypeDate";break;default:e="esriFieldTypeString"}r.push({name:t,type:e,alias:o,length:(0,b._b)(e)})}}return r}function O(e){if(!e.length)return"string";const t=/[^+\-.,0-9]/;return e.map(e=>{if(""!==e){if(!t.test(e)){let t=R(e);if(!isNaN(t))return/[.,]/.test(e)||!Number.isInteger(t)||t>214783647||t<-214783648?"double":"integer";if(e.includes("E")){if(t=Number(e),!Number.isNaN(t))return"double";if(e.includes(",")&&(e=e.replace(",","."),t=Number(e),!Number.isNaN(t)))return"double"}}return(0,r.Cq)(e)?"date":"string"}}).reduce((e,t)=>void 0===e?t:void 0===t?e:e===t?t:"string"===e||"string"===t?"string":"double"===e||"double"===t?"double":void 0)}const R=function(){const e=(0,x.B)(),t=new RegExp("^"+e.regexp+"$"),i=new RegExp("["+e.group+"\\s\\xa0]","g"),n=e.factor;return s=>{const r=t.exec(s);if(e.factor=n,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],e.factor*=-1}return o=o.replace(i,"").replace(e.decimal,"."),+o*e.factor}}();function k(e){return JSON.parse(JSON.stringify(e))}var q=i(64714),Y=i(60694),L=i(95466),j=i(54218),X=i(98623);const D=(0,q.F0)("esriGeometryPoint"),P=["csv"],G=[0,0];class U{constructor(e,t){this.x=e,this.y=t}}class ${constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[i]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),n=function(e,t){const i=t.parsingOptions||{},n={delimiter:i.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:i.latitudeField,longitudeFieldName:i.longitudeField}},s=n.layerDefinition={name:(0,Y.cr)((0,u.e7)(t.url,P)||"csv"),dateFieldsTimeReference:{timeZoneIANA:X.n$},drawingInfo:D,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:i.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:i.spatialReference||{wkid:4326}}},r=M(e),a=r.next().value?.trim(),l=r.next().value?.trim();if(!a)throw new o.A("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:c,locationInfo:h}=B(a,l,i);if(!c)throw new o.A("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:l,parsingOptions:i});if(!h)throw new o.A("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:l,parsingOptions:i});n.locationInfo=h,n.delimiter=c;const{names:d,aliases:f}=T(a,c),m=E(e,n.delimiter,d,f,n.locationInfo);if(i.fields?.length){const e=new L.A(i.fields);for(const t of m){const i=e.get(t.name);i&&Object.assign(t,i)}}if(!m.some(e=>"esriFieldTypeOID"===e.type&&(s.objectIdField=e.name,!0))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};s.objectIdField=e.name,m.unshift(e)}s.fields=m;const p=new L.A(s.fields);if(n.locationInfo&&(n.locationInfo.latitudeFieldName=p.get(n.locationInfo.latitudeFieldName).name,n.locationInfo.longitudeFieldName=p.get(n.locationInfo.longitudeFieldName).name),s.timeInfo){const e=s.timeInfo;if(e.startTimeField){const t=p.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=p.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=p.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(s.timeInfo=null)}return n}(i,e);this._locationInfo=n.locationInfo,this._delimiter=n.delimiter,this._queryEngine=this._createQueryEngine(n);const s=this._createFeatures(i);this._queryEngine.featureStore.addMany(s);const{fullExtent:r,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(n.layerDefinition.extent=r,a){const{start:e,end:t}=a;n.layerDefinition.timeInfo.timeExtent=[e,t]}return n}async applyEdits(){throw new o.A("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),(await this._queryEngine.executeQueryForIds(e,t.signal)).filter(j.Et)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),await this._queryEngine.executeQueryForSnapping(e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,s.UT)(this._snapshotFeatures),this._snapshotTask.promise.then(e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)},e=>{this._queryEngine.featureStore.clear(),(0,l.zf)(e)||a.A.getLogger("esri.layers.CSVLayer").error(new o.A("csv-layer:refresh","An error occurred during refresh",{error:e}))}),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:i}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:i}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:i}=this._loadOptions;if(!t)throw new o.A("csv-layer:invalid-source","url not defined");const s=(0,u.An)(t);return(await(0,n.A)(s.path,{query:{...s.query,...i},responseType:"text",signal:e})).data}_createQueryEngine(e){const{objectIdField:t,fields:i,extent:n,timeInfo:s}=e.layerDefinition,r=new y.A({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1}),o={type:"object-id",fieldName:t};return new _.do({fieldsIndex:L.A.fromLayerJSON({fields:i,dateFieldsTimeReference:{timeZoneIANA:X.n$}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:s,featureIdInfo:o,spatialReference:n.spatialReference||{wkid:4326},featureStore:r})}_createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:i}=this._locationInfo,{objectIdField:n,fieldsIndex:s,spatialReference:o}=this._queryEngine;let a=[];const l=[],u=s.fields.filter(e=>e.name!==n).map(e=>e.name);let y=0;const g={};for(const e of s.fields)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,b.lD)(e);void 0!==t&&(g[e.name]=t)}const _=A(e,u,this._delimiter,(0,q.Vx)(g,n));for(const e of _){const o=this._parseCoordinateValue(e[t]),u=this._parseCoordinateValue(e[i]);if(null!=u&&null!=o&&!isNaN(o)&&!isNaN(u)){e[t]=o,e[i]=u;for(const n in e)if(n!==t&&n!==i)if(s.isDateField(n))e[n]=(0,r._U)(e[n]);else if(s.isNumericField(n)){const t=R(e[n]);isNaN(t)?e[n]=null:e[n]=t}else null!=e[n]&&(e[n]=k(e[n]));e[n]=y,y++,a.push(new U(u,o)),l.push(e)}}if(!(0,d.aI)({wkid:4326},o))if((0,d.K8)(o))for(const e of a)[e.x,e.y]=(0,f.je)(e.x,e.y,G);else a=(0,c.projectMany)(a,h.A.WGS84,o);const x=[];for(let e=0;e<a.length;e++){const{x:t,y:i}=a[e],s=l[e];s[n]=e+1,x.push(new m.Om(new p.A([],[t,i]),s,null,s[n]))}return x}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=R(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await(0,g.Nk)(d.KK,e)}catch{throw new o.A("csv-layer:projection-not-supported","Projection not supported")}}}},64714(e,t,i){i.d(t,{F0:()=>a,Vx:()=>c,e2:()=>d,f:()=>f});var n=i(44208),s=i(4718),r=i(99352),o=i(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function c(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let i=`this${h(t)} = null;`;for(const t in e)i+=`this${h(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new n}catch(i){return()=>({[t]:null,...e})}}function h(e){return l.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},98453(e,t,i){i.d(t,{m:()=>n});const n=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},54625(e,t,i){i.d(t,{i_:()=>s});var n=i(30524);function s(e,t,i){t=(0,n.rS)(t)?.toLowerCase(),i=(0,n.rS)(i)?.toLowerCase();const s=e.map(e=>e.toLowerCase()),a=t?e[s.indexOf(t)]:null,l=i?e[s.indexOf(i)]:null;return{longitudeFieldName:a||e[s.indexOf(o.find(e=>s.includes(e)))],latitudeFieldName:l||e[s.indexOf(r.find(e=>s.includes(e)))]}}const r=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],o=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"]},2272(e,t,i){i.d(t,{Dl:()=>u,gf:()=>h,jV:()=>l,lF:()=>c});var n=i(92602),s=i(70333),r=i(4718),o=i(84952),a=i(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function c(e,t,i){const n={};for(const s in e){if("declaredClass"===s)continue;const r=e[s];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))n[s]=r.map(e=>c(e));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(i?.[s]);n[s]=t?e:JSON.stringify(e)}else n[s]=t?r:JSON.stringify(r);else n[s]=r}return n}async function h(e,t,r){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??s.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!s.id&&n.A.request.useIdentity&&await Promise.all([i.e(7632),i.e(4023),i.e(148)]).then(i.bind(i,50148));const l=await s.id.getCredential(e,r);return l?.token}},926(e,t,i){i.d(t,{Dd:()=>d,Jn:()=>f,Qc:()=>m,getApiKey:()=>c,getSessionToken:()=>h});var n=i(92602),s=i(11254),r=i(84952);const o=/^https?:\/\/(i?basemaps|basemapstyles)-api\.arcgis\.com\//i,a=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]),l=new Map;let u=null;function c(e){if(!m(e))return null;const t=t=>t instanceof RegExp?t.test(e):"string"==typeof t&&e.startsWith(t),i=n.A.apiKeys;if(Array.isArray(i.scopes))for(const e of i.scopes)if(Array.isArray(e.urls)){if(e.urls.some(t))return e.token}else if(t(e.urls))return e.token;return i.basemapStyles&&o.test(e)?i.basemapStyles:n.A.apiKey&&/^https?:\/\/.+\.arcgis\.com(\/|$)/i.test(e)?n.A.apiKey:null}async function h(e){if(!n.A.sessions?.basemap?.enabled||!o.test(e))return null;const t=c(e);if(!t)return null;u&&await u;const{styleFamily:i="arcgis",autoRefresh:r,duration:a=43200}=n.A.sessions.basemap,h=`${t}:${i}`,d=l.get(h);if(d&&(!r||d.endTime>Date.now()))return d.sessionToken;let f;u=(0,s.A)("https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/sessions/start",{cacheBust:!0,query:{durationSeconds:a,styleFamily:i,token:t}});try{f=(await u).data,f.endTime-=5e3,l.set(h,f)}finally{u=null}return f.sessionToken}function d(){return null!=n.A.apiKey||null!=n.A.apiKeys.basemapStyles}function f(e,t){return t?m(e):null!=c(e)}function m(e){const t=(0,r.$z)(e,!0);return!!t&&!a.has(t)&&!e.endsWith("/sharing/rest/generateToken")}},93470(e,t,i){i.d(t,{Cb:()=>r,HW:()=>c,JR:()=>s,JZ:()=>l,WR:()=>a,b6:()=>h,fT:()=>n,nC:()=>u,yM:()=>o});const n=[252,146,31,255],s=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[926,2188],{69540(e,t,i){i.d(t,{OU:()=>c,Pw:()=>h});var n=i(5482),s=i(69622),r=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const u=Symbol("ClonableMixin"),c=e=>{var t;const i=e;let s=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,n=t.store,s={},l=new Map;for(const t in i){const o=i[t],a=n?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const c=this[t];let h=null;if("function"==typeof u)h=u(c,e);else if("reference"===u)h=c;else if(h=(0,r.TU)(c,e),null!=c&&null==h)continue;0===a?l.set(t,h):s[t]=h}const u=new(0,Object.getPrototypeOf(this).constructor)(s);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return u}};return s=(0,n.Cg)([(0,l.$)("esri.core.Clonable")],s),s},h=c(s.A)},66344(e,t,i){i.d(t,{q:()=>a});const n=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),s>this._maxSize)return void this._notifyRemove(t,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return n||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new r(i,s,l)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let n=i.entry.usedMemory;for(;n>this._maxSize;){const e=this._notifyRemove(t,i.entry,n,1);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}i.size=n,this._size+=n,e.size+=n,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,n)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._clients.forEach(i=>{const{id:s,name:r}=i;if(n.startsWith(s)){const i=t[r]||0;t[r]=i+e.size}})});const n={};this._clients.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,n[i]=Math.round(100*e.hitRate)+"%"}else n[i]="0%"});const s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+n[i]);for(let t=i.length-1;t>=0;--t){const n=i[t];n&&(e["Priority "+(t+-3-1)]=Math.round(n/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,n){const s=this._clients.get(e.split(o)[0])?.removeFunc,r=s?.(t,n,i);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const n=t?.id;let s=!0;for(;s;){s=!1;for(const[r,a]of this._db)if(0===a.lifetime&&(!n||r.startsWith(n))){const n=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,a,n),i.size<=.9*e)return;s||=this._db.has(r)}}for(const[s,r]of this._db)if(!n||s.startsWith(n)){const n=t??this._clients.get(s.split(o)[0]);if(this._purgeItem(s,r,n),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,1);null!=n&&n>0&&(this._size+=n,i&&(i.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new s(0);class r{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new s(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999(e,t,i){i.d(t,{DZ:()=>m,Ke:()=>f,Tj:()=>c,UT:()=>p,aD:()=>g,jJ:()=>u});var n=i(5482),s=i(69622),r=i(97768),o=i(17676),a=i(10107),l=i(64108);function u(e,t,i){return(0,o.Lx)(e.map((e,n)=>t.apply(i,[e,n])))}async function c(e,t,i){return(await(0,o.Lx)(e.map((e,n)=>t.apply(i,[e,n])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function m(e){try{return h(await e)}catch(e){return(0,o.QP)(e),d(e)}}function p(e,t){return new y(e,t)}let y=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.xt)(this._abortHandle),this._abortController=null}};(0,n.Cg)([(0,a.MZ)()],y.prototype,"value",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"error",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"finished",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"promise",void 0),(0,n.Cg)([(0,a.MZ)()],y.prototype,"_result",void 0),y=(0,n.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],y);class g{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,n.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,n.hk)(t)}}}},67482(e,t,i){function n(e){return null!=a(e)||null!=o(e)}function s(e){return l.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let i=!0;if(c&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,n=0;for(;!t&&n<=e.length;)t=!u.test(e[n]),n++;i=!t}}return i}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const i=t.groups,n=+i.year,s=+i.month-1,r=+i.day,o=+(i.hours??"0"),a=+(i.minutes??"0"),u=+(i.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const c=i.ms??"0",h=c?+c.padEnd(3,"0").slice(0,3):0;let d;if(i.isUTC||!i.offsetSign)d=Date.UTC(n,s,r,o,a,u,h);else{const e=+i.offsetHours,t=+i.offsetMinutes;d=6e4*("+"===i.offsetSign?-1:1)*(60*e+t)+Date.UTC(n,s,r,o,a,u,h)}return Number.isNaN(d)?null:d}i.d(t,{Br:()=>s,Cq:()=>n,_U:()=>r});const l=/^(?:(?<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})))?$/,u=/^((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,c=!Number.isNaN(new Date("technology 10").getTime())},75503(e,t,i){i.d(t,{wq:()=>a});var n=i(4576),s=i(21818),r=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),S.prune(),v.prune(),I.prune(),w.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const n=this._toBBox;if(x(e,i))for(S.clear();i;){for(let s=0,r=i.children.length;s<r;s++){const r=i.children[s],o=i.leaf?n(r):r;x(e,o)&&(i.leaf?t(r):_(e,o)?l(r,t):S.push(r))}i=S.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!x(e,t))return!1;for(S.clear();t;){for(let n=0,s=t.children.length;n<s;n++){const s=t.children[n],r=t.leaf?i(s):s;if(x(e,r)){if(t.leaf||_(e,r))return!0;S.push(s)}}t=S.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new z([]),this}remove(e){if(!e)return this;let t,i=this._data,r=null,o=0,a=!1;const l=this._toBBox(e);for(I.clear(),w.clear();i||I.length>0;){if(i||(i=I.pop(),r=I.data[I.length-1],o=w.pop()??0,a=!0),i.leaf&&(t=(0,n.qh)(i.children,(0,s.z)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),I.push(i),this._condense(I),this;a||i.leaf||!_(i,l)?r?(o++,i=r.children[o],a=!1):i=null:(I.push(i),w.push(o),o=0,r=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,n){const s=i-t+1;let r=this._maxEntries;if(s<=r){const n=new z(e.slice(t,i+1));return u(n,this._toBBox),n}n||(n=Math.ceil(Math.log(s)/Math.log(r)),r=Math.ceil(s/r**(n-1)));const o=new B([]);o.height=n;const a=Math.ceil(s/r),l=a*Math.ceil(Math.sqrt(r));b(e,t,i,l,this._compareMinX);for(let s=t;s<=i;s+=l){const t=Math.min(s+l-1,i);b(e,s,t,a,this._compareMinY);for(let i=s;i<=t;i+=a){const s=Math.min(i+a-1,t);o.children.push(this._build(e,i,s,n-1))}}return u(o,this._toBBox),o}_insert(e,t,i){const n=this._toBBox,s=i?e:n(e);I.clear();const r=function(e,t,i,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==i;){let i,n=1/0,s=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=m(o),l=y(e,o)-a;l<s?(s=l,n=a<n?a:n,i=o):l===s&&a<n&&(n=a,i=o)}t=i||t.children[0]}return t}(s,this._data,t,I);for(r.children.push(e),h(r,s);t>=0&&I.data[t].children.length>this._maxEntries;)this._split(I,t),t--;!function(e,t,i){for(let n=i;n>=0;n--)h(t.data[n],e)}(s,I,t)}_split(e,t){const i=e.data[t],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);const r=this._chooseSplitIndex(i,s,n);if(!r)return;const o=i.children.splice(r,i.children.length-r),a=i.leaf?new z(o):new B(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new B([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let n,s,r;n=s=1/0;for(let o=t;o<=i-t;o++){const t=c(e,0,o,this._toBBox),a=c(e,o,i,this._toBBox),l=g(t,a),u=m(t)+m(a);l<n?(n=l,r=o,s=u<s?u:s):l===n&&u<s&&(s=u,r=o)}return r}_chooseSplitAxis(e,t,i){const n=e.leaf?this._compareMinX:d,s=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,s)&&e.children.sort(n)}_allDistMargin(e,t,i,n){e.children.sort(n);const s=this._toBBox,r=c(e,0,t,s),o=c(e,i-t,i,s);let a=p(r)+p(o);for(let n=t;n<i-t;n++){const t=e.children[n];h(r,e.leaf?s(t):t),a+=p(r)}for(let n=i-t-1;n>=t;n--){const t=e.children[n];h(o,e.leaf?s(t):t),a+=p(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const s=e.data[t-1],r=s.children;r.splice((0,n.qh)(r,i,r.length,s.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(v.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,s.z)(e));else v.pushArray(i.children);i=v.pop()??null}}function u(e,t){c(e,0,e.children.length,t,e)}function c(e,t,i,n,s){s||(s=new z([])),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let r,o=t;o<i;o++)r=e.children[o],h(s,e.leaf?n(r):r);return s}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function m(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),s=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,s-i)*Math.max(0,r-n)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function x(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function b(e,t,i,n,s){const r=[t,i];for(;r.length;){const t=r.pop(),i=r.pop();if(t-i<=n)continue;const a=i+Math.ceil((t-i)/n/2)*n;(0,o.q)(e,a,i,t,s),r.push(i,a,a,t)}}const S=new r.A,v=new r.A,I=new r.A,w=new r.A({deallocator:void 0});class F{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class M extends F{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class z extends M{constructor(e){super(),this.children=e,this.leaf=!0}}class B extends M{constructor(e){super(),this.children=e,this.leaf=!1}}},14607(e,t,i){i.d(t,{B:()=>u,GP:()=>a,qg:()=>c});var n=i(799),s=i(73444);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],no:[","," "],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(e=(0,s.JK)()){let t=(e=e.toLowerCase())in r;if(!t){const i=e.split("-");i.length>1&&i[0]in r&&(e=i[0],t=!0),t||(e="en")}const[i,n,o="#,##0.###"]=r[e];return{decimal:i,group:n,pattern:o}}function a(e,t){const i=o((t={...t}).locale);t.customs=i;const n=t.pattern||i.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,i){const n=(i=i||{}).customs.group,s=i.customs.decimal,r=t.split(";"),o=r[0];if((t=r[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,u=o.match(a);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return!1===i.fractional&&(i.places=0),t.replace(a,function(e,t,i){!0===(i=i||{}).places&&(i.places=0),i.places===1/0&&(i.places=6);const n=t.split("."),s="string"==typeof i.places&&i.places.indexOf(",");let r=i.places;s?r=i.places.slice(s+1):+r>=0||(r=(n[1]||[]).length),i.round<0||(e=Number(e.toFixed(Number(r))));const o=String(Math.abs(e)).split("."),a=o[1]||"";if(n[1]||i.places){s&&(i.places=i.places.slice(0,Math.max(0,s)));const e=void 0!==i.places?i.places:n[1]&&n[1].lastIndexOf("0")+1;+e>a.length&&(o[1]=a.padEnd(Number(e),"0")),+r<a.length&&(o[1]=a.slice(0,Math.max(0,Number(r))))}else o[1]&&o.pop();const l=n[0].replace(",","");let u=l.indexOf("0");-1!==u&&(u=l.length-u,u>o[0].length&&(o[0]=o[0].padStart(u,"0")),l.includes("#")||(o[0]=o[0].slice(-u)));let c,h,d=n[0].lastIndexOf(",");if(-1!==d){c=n[0].length-d-1;const e=n[0].slice(0,d);d=e.lastIndexOf(","),-1!==d&&(h=e.length-d-1)}const f=[];for(let e=o[0];e;){const t=e.length-c;f.push(t>0?e.slice(Math.max(0,t)):e),e=t>0?e.slice(0,t):"",h&&(c=h,h=void 0)}return o[0]=f.reverse().join(i.group||","),o.join(i.decimal||".")}(e,u[0],{decimal:s,group:n,places:i.places,round:i.round}))}(e,n,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function u(e){const t=o((e=e||{}).locale),i=e.pattern||t.pattern,s=t.group,r=t.decimal;let a=1;if(i.includes("%"))a/=100;else if(i.includes("‰"))a/=1e3;else if(i.includes("¤"))throw new Error("currency notation not supported");const u=i.split(";");1===u.length&&u.push("-"+u[0]);const c=d(u,t=>(t="(?:"+(0,n.Cj)(t,".")+")").replace(l,t=>{const i={signed:!1,separator:e.strict?s:[s,""],fractional:e.fractional,decimal:r,exponent:!1},n=t.split(".");let o=e.places;1===n.length&&1!==a&&(n[1]="###"),1===n.length||0===o?i.fractional=!1:(void 0===o&&(o=e.pattern?n[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(i.fractional=!0),!e.places&&+o<n[1].length&&(o+=","+n[1].length),i.places=o);const l=n[0].split(",");return l.length>1&&(i.groupSize=l.pop().length,l.length>1&&(i.groupSize2=l.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=h(e),i=d(e.fractional,t=>{let i="";return t&&0!==e.places&&(i="\\"+e.decimal,e.places===1/0?i="(?:"+i+"\\d+)?":i+="\\d{"+e.places+"}"),i},!0);let n=t+i;return i&&(n="(?:(?:"+n+")|(?:"+i+"))"),n+d(e.exponent,t=>t?"([eE]"+h({signed:e.eSigned})+")":"")}(i)+")"}),!0);return{regexp:c.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:s,decimal:r,factor:a}}function c(e,t){const i=u(t),n=new RegExp("^"+i.regexp+"$").exec(e);if(!n)return NaN;let s=n[1];if(!n[1]){if(!n[2])return NaN;s=n[2],i.factor*=-1}return s=s.replaceAll(new RegExp("["+i.group+"\\s\\xa0]","g"),"").replace(i.decimal,"."),Number(s)*i.factor}function h(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,e=>e?"[-+]":"",!0)+d(e.separator,t=>{if(!t)return"(?:\\d+)";" "===(t=(0,n.Cj)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const i=e.groupSize,s=e.groupSize2;if(s){const e="(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+t+"]\\d{"+s+"})*["+t+"]\\d{"+i+"})";return i-s>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(i-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(i-1)+"}(?:["+t+"]\\d{"+i+"})*)"},!0)}const d=(e,t,i)=>{if(!Array.isArray(e))return t(e);const n=[];for(let i=0;i<e.length;i++)n.push(t(e[i]));return f(n.join("|"),Boolean(i))},f=(e,t)=>"("+(t?"?:":"")+e+")"},36708(e,t,i){i.d(t,{C_:()=>d,OH:()=>p,Vh:()=>y,on:()=>h,pc:()=>g,wB:()=>l,z7:()=>u});var n=i(37955),s=i(36563),r=i(97768),o=i(17676),a=i(14012);function l(e,t,i={}){return c(e,t,i,f)}function u(e,t,i={}){return c(e,t,i,m)}function c(e,t,i={},n){let s=null;const o=i.once?(e,i)=>{n(e)&&((0,r.xt)(s),t(e,i))}:(e,i)=>{n(e)&&t(e,i)};if(s=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return s}function h(e,t,i,o={}){let a=null,u=null,c=null;function h(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.xt)(c),i(e)}const f=l(e,(e,i)=>{h(),(0,n.wb)(e)&&(a=e,u=(0,n.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return c=(0,s.hA)(()=>{f.remove(),h()}),c}function d(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const n=e();if(t?.(n))return Promise.resolve(n);let a=null;function l(){a=(0,r.xt)(a)}return new Promise((n,r)=>{a=(0,s.vE)([(0,o.u7)(i,()=>{l(),r((0,o.NK)())}),c(e,e=>{l(),n(e)},{sync:!1,once:!0},t??f)])})}(e,m,t)}function f(e){return!0}function m(e){return!!e}i(80559);const p={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},60408(e,t,i){function n(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function s(e){return void 0!==e.points}function r(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?r(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":n(e)?"esriGeometryEnvelope":s(e)?"esriGeometryMultipoint":null:null}function c(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function h(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}i.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>c,Rg:()=>o,U9:()=>s,W0:()=>h,ZC:()=>n,fT:()=>r,uW:()=>l})},65864(e,t,i){i.d(t,{rS:()=>c,xD:()=>d});var n=i(5443),s=i(91075),r=i(48526),o=i(86738),a=i(39829),l=i(82799),u=i(60408);function c(e){return null==e?null:e instanceof s.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?r.A.fromJSON(e):(0,u.ZC)(e)?n.A.fromJSON(e):null}const h={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:n.A,esriGeometryMultipoint:r.A,esriGeometryMultiPatch:a.A};function d(e){return e&&h[e]||null}},6518(e,t,i){i.d(t,{F:()=>a});var n=i(44208),s=i(75503),r=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new s.wq(9,(0,n.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((i,n)=>{e[t++]=n}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(e,t,i){i.d(t,{A:()=>m});var n=i(4576),s=i(49186),r=i(65529),o=i(53966),a=i(70328),l=i(19419),u=i(90708),c=i(6518),h=i(51441),d=i(37730);const f=(0,a.vt)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new c.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=d.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,n,s]=this.fullBounds;return{xmin:t,ymin:i,xmax:n,ymax:s,spatialReference:(0,h.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(n.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,a.Jt)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let n;if(i?(e.displayId=i.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);n=(0,u.jQ)(null!=n?n:(0,l.vt)(),e.geometry),null!=n&&this._boundsStore.set(t,n),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:n,attributes:r}=e;for(const e in r)i.attributes[e]=r[e];return n&&(i.geometry=n,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),n)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},37730(e,t,i){i.d(t,{T:()=>s});var n=i(43334);const s={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,i)=>new n.Om(t,e.attributes,null,e.objectId,e.displayId,e.distance),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},25209(e,t,i){i.r(t),i.d(t,{default:()=>$});var n=i(11254),s=i(60999),r=i(67482),o=i(49186),a=i(53966),l=i(17676),u=i(84952),c=i(91218),h=i(16930),d=i(21325),f=i(28735),m=i(43334),p=i(92722),y=i(83221),g=i(31464),_=i(75752),x=i(14607),b=i(30524),S=i(54625);const v=/^\s*"([\S\s]*)"\s*$/,I=/""/g,w=[",",";","|","\t"];function*F(e,t,i){let n=0;for(;n<=e.length;){const s=e.indexOf(t,n),r=e.slice(n,s>-1?s:void 0);n+=r.length+t.length,i&&!r.trim()||(yield r)}}function M(e){const t=e.includes("\r\n")?"\r\n":"\n";return F(e,t,!0)}function z(e,t){return F(e,t,!1)}function B(e,t,i){e=e.trim(),t=t?.trim();const n=[],s=Array.from(new Set([i?.delimiter,...w])).filter(e=>null!=e);for(const i of s){const s=N(e,i).length,r=N(t,i).length??s;s>1&&n.push({weight:Math.min(s,r),delimiter:i})}const r=n.sort(({weight:e},{weight:t})=>t-e).map(({delimiter:e})=>e);for(const t of r){const n=T(e,t).names,s=(0,S.i_)(n,i?.longitudeField,i?.latitudeField);if(s.longitudeFieldName&&s.latitudeFieldName)return{delimiter:t,locationInfo:s}}return{delimiter:r[0],locationInfo:null}}function*A(e,t,i,n=()=>Object.create(null)){const s=M(e);s.next();let r="",o="",a=0,l=n(),u=0;e:for(const e of s){const s=z(e,i);for(const e of s)if(r+=o+e,o="",a+=C(e),a%2==0){if(a>0){const e=v.exec(r);if(!e){l=n(),u=0,r="",a=0;continue e}l[t[u]]=e[1].replaceAll(I,'"'),u++}else l[t[u]]=r,u++;r="",a=0}else o=i;0===a?(yield l,l=n(),u=0):o="\n"}}function T(e,t){const i=N(e,t).filter(e=>null!=e),n=i.map(e=>(0,b.rS)(e));for(let e=n.length-1;e>=0;e--)n[e]||(n.splice(e,1),i.splice(e,1));return{names:n,aliases:i}}function N(e,t){if(!e?.length)return[];const i=[];let n="",s="",r=0;const o=z(e,t);for(const e of o)if(n+=s+e,s="",r+=C(e),r%2==0){if(r>0){const e=v.exec(n);e&&i.push(e[1].replaceAll(I,'"'))}else i.push(n);n="",r=0}else s=t;return i}function C(e){let t=0,i=0;for(i=e.indexOf('"',i);i>=0;)t++,i=e.indexOf('"',i+1);return t}function E(e,t,i,n,s){const r=[],o=A(e,i,t),a=[];for(const e of o){if(10===a.length)break;a.push(e)}for(let e=0;e<i.length;e++){const t=i[e],o=n[e];if(t===s.longitudeFieldName||t===s.latitudeFieldName)r.push({name:t,type:"esriFieldTypeDouble",alias:o});else{let e;switch(O(a.map(e=>e[t]))){case"integer":e="esriFieldTypeInteger";break;case"double":e="esriFieldTypeDouble";break;case"date":e="esriFieldTypeDate";break;default:e="esriFieldTypeString"}r.push({name:t,type:e,alias:o,length:(0,b._b)(e)})}}return r}function O(e){if(!e.length)return"string";const t=/[^+\-.,0-9]/;return e.map(e=>{if(""!==e){if(!t.test(e)){let t=R(e);if(!isNaN(t))return/[.,]/.test(e)||!Number.isInteger(t)||t>214783647||t<-214783648?"double":"integer";if(e.includes("E")){if(t=Number(e),!Number.isNaN(t))return"double";if(e.includes(",")&&(e=e.replace(",","."),t=Number(e),!Number.isNaN(t)))return"double"}}return(0,r.Cq)(e)?"date":"string"}}).reduce((e,t)=>void 0===e?t:void 0===t?e:e===t?t:"string"===e||"string"===t?"string":"double"===e||"double"===t?"double":void 0)}const R=function(){const e=(0,x.B)(),t=new RegExp("^"+e.regexp+"$"),i=new RegExp("["+e.group+"\\s\\xa0]","g"),n=e.factor;return s=>{const r=t.exec(s);if(e.factor=n,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],e.factor*=-1}return o=o.replace(i,"").replace(e.decimal,"."),+o*e.factor}}();function k(e){return JSON.parse(JSON.stringify(e))}var q=i(64714),Y=i(60694),L=i(95466),j=i(54218),X=i(98623);const D=(0,q.F0)("esriGeometryPoint"),P=["csv"],G=[0,0];class U{constructor(e,t){this.x=e,this.y=t}}class ${constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[i]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),n=function(e,t){const i=t.parsingOptions||{},n={delimiter:i.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:i.latitudeField,longitudeFieldName:i.longitudeField}},s=n.layerDefinition={name:(0,Y.cr)((0,u.e7)(t.url,P)||"csv"),dateFieldsTimeReference:{timeZoneIANA:X.n$},drawingInfo:D,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:i.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:i.spatialReference||{wkid:4326}}},r=M(e),a=r.next().value?.trim(),l=r.next().value?.trim();if(!a)throw new o.A("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:c,locationInfo:h}=B(a,l,i);if(!c)throw new o.A("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:l,parsingOptions:i});if(!h)throw new o.A("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:l,parsingOptions:i});n.locationInfo=h,n.delimiter=c;const{names:d,aliases:f}=T(a,c),m=E(e,n.delimiter,d,f,n.locationInfo);if(i.fields?.length){const e=new L.A(i.fields);for(const t of m){const i=e.get(t.name);i&&Object.assign(t,i)}}if(!m.some(e=>"esriFieldTypeOID"===e.type&&(s.objectIdField=e.name,!0))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};s.objectIdField=e.name,m.unshift(e)}s.fields=m;const p=new L.A(s.fields);if(n.locationInfo&&(n.locationInfo.latitudeFieldName=p.get(n.locationInfo.latitudeFieldName).name,n.locationInfo.longitudeFieldName=p.get(n.locationInfo.longitudeFieldName).name),s.timeInfo){const e=s.timeInfo;if(e.startTimeField){const t=p.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=p.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=p.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(s.timeInfo=null)}return n}(i,e);this._locationInfo=n.locationInfo,this._delimiter=n.delimiter,this._queryEngine=this._createQueryEngine(n);const s=this._createFeatures(i);this._queryEngine.featureStore.addMany(s);const{fullExtent:r,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(n.layerDefinition.extent=r,a){const{start:e,end:t}=a;n.layerDefinition.timeInfo.timeExtent=[e,t]}return n}async applyEdits(){throw new o.A("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),(await this._queryEngine.executeQueryForIds(e,t.signal)).filter(j.Et)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),await this._queryEngine.executeQueryForSnapping(e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,s.UT)(this._snapshotFeatures),this._snapshotTask.promise.then(e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)},e=>{this._queryEngine.featureStore.clear(),(0,l.zf)(e)||a.A.getLogger("esri.layers.CSVLayer").error(new o.A("csv-layer:refresh","An error occurred during refresh",{error:e}))}),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:i}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:i}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:i}=this._loadOptions;if(!t)throw new o.A("csv-layer:invalid-source","url not defined");const s=(0,u.An)(t);return(await(0,n.A)(s.path,{query:{...s.query,...i},responseType:"text",signal:e})).data}_createQueryEngine(e){const{objectIdField:t,fields:i,extent:n,timeInfo:s}=e.layerDefinition,r=new y.A({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1}),o={type:"object-id",fieldName:t};return new _.do({fieldsIndex:L.A.fromLayerJSON({fields:i,dateFieldsTimeReference:{timeZoneIANA:X.n$}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:s,featureIdInfo:o,spatialReference:n.spatialReference||{wkid:4326},featureStore:r})}_createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:i}=this._locationInfo,{objectIdField:n,fieldsIndex:s,spatialReference:o}=this._queryEngine;let a=[];const l=[],u=s.fields.filter(e=>e.name!==n).map(e=>e.name);let y=0;const g={};for(const e of s.fields)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,b.lD)(e);void 0!==t&&(g[e.name]=t)}const _=A(e,u,this._delimiter,(0,q.Vx)(g,n));for(const e of _){const o=this._parseCoordinateValue(e[t]),u=this._parseCoordinateValue(e[i]);if(null!=u&&null!=o&&!isNaN(o)&&!isNaN(u)){e[t]=o,e[i]=u;for(const n in e)if(n!==t&&n!==i)if(s.isDateField(n))e[n]=(0,r._U)(e[n]);else if(s.isNumericField(n)){const t=R(e[n]);isNaN(t)?e[n]=null:e[n]=t}else null!=e[n]&&(e[n]=k(e[n]));e[n]=y,y++,a.push(new U(u,o)),l.push(e)}}if(!(0,d.aI)({wkid:4326},o))if((0,d.K8)(o))for(const e of a)[e.x,e.y]=(0,f.je)(e.x,e.y,G);else a=(0,c.projectMany)(a,h.A.WGS84,o);const x=[];for(let e=0;e<a.length;e++){const{x:t,y:i}=a[e],s=l[e];s[n]=e+1,x.push(new m.Om(new p.A([],[t,i]),s,null,s[n]))}return x}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=R(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await(0,g.Nk)(d.KK,e)}catch{throw new o.A("csv-layer:projection-not-supported","Projection not supported")}}}},64714(e,t,i){i.d(t,{F0:()=>a,Vx:()=>c,e2:()=>d,f:()=>f});var n=i(44208),s=i(4718),r=i(99352),o=i(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function c(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let i=`this${h(t)} = null;`;for(const t in e)i+=`this${h(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new n}catch(i){return()=>({[t]:null,...e})}}function h(e){return l.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},98453(e,t,i){i.d(t,{m:()=>n});const n=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},54625(e,t,i){i.d(t,{i_:()=>s});var n=i(30524);function s(e,t,i){t=(0,n.rS)(t)?.toLowerCase(),i=(0,n.rS)(i)?.toLowerCase();const s=e.map(e=>e.toLowerCase()),a=t?e[s.indexOf(t)]:null,l=i?e[s.indexOf(i)]:null;return{longitudeFieldName:a||e[s.indexOf(o.find(e=>s.includes(e)))],latitudeFieldName:l||e[s.indexOf(r.find(e=>s.includes(e)))]}}const r=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],o=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"]},2272(e,t,i){i.d(t,{Dl:()=>u,gf:()=>h,jV:()=>l,lF:()=>c});var n=i(92602),s=i(70333),r=i(4718),o=i(84952),a=i(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function c(e,t,i){const n={};for(const s in e){if("declaredClass"===s)continue;const r=e[s];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))n[s]=r.map(e=>c(e));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(i?.[s]);n[s]=t?e:JSON.stringify(e)}else n[s]=t?r:JSON.stringify(r);else n[s]=r}return n}async function h(e,t,r){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??s.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!s.id&&n.A.request.useIdentity&&await Promise.all([i.e(7632),i.e(9776),i.e(148)]).then(i.bind(i,50148));const l=await s.id.getCredential(e,r);return l?.token}},926(e,t,i){i.d(t,{Dd:()=>d,Jn:()=>f,Qc:()=>m,getApiKey:()=>c,getSessionToken:()=>h});var n=i(92602),s=i(11254),r=i(84952);const o=/^https?:\/\/(i?basemaps|basemapstyles)-api\.arcgis\.com\//i,a=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]),l=new Map;let u=null;function c(e){if(!m(e))return null;const t=t=>t instanceof RegExp?t.test(e):"string"==typeof t&&e.startsWith(t),i=n.A.apiKeys;if(Array.isArray(i.scopes))for(const e of i.scopes)if(Array.isArray(e.urls)){if(e.urls.some(t))return e.token}else if(t(e.urls))return e.token;return i.basemapStyles&&o.test(e)?i.basemapStyles:n.A.apiKey&&/^https?:\/\/.+\.arcgis\.com(\/|$)/i.test(e)?n.A.apiKey:null}async function h(e){if(!n.A.sessions?.basemap?.enabled||!o.test(e))return null;const t=c(e);if(!t)return null;u&&await u;const{styleFamily:i="arcgis",autoRefresh:r,duration:a=43200}=n.A.sessions.basemap,h=`${t}:${i}`,d=l.get(h);if(d&&(!r||d.endTime>Date.now()))return d.sessionToken;let f;u=(0,s.A)("https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/sessions/start",{cacheBust:!0,query:{durationSeconds:a,styleFamily:i,token:t}});try{f=(await u).data,f.endTime-=5e3,l.set(h,f)}finally{u=null}return f.sessionToken}function d(){return null!=n.A.apiKey||null!=n.A.apiKeys.basemapStyles}function f(e,t){return t?m(e):null!=c(e)}function m(e){const t=(0,r.$z)(e,!0);return!!t&&!a.has(t)&&!e.endsWith("/sharing/rest/generateToken")}},93470(e,t,i){i.d(t,{Cb:()=>r,HW:()=>c,JR:()=>s,JZ:()=>l,WR:()=>a,b6:()=>h,fT:()=>n,nC:()=>u,yM:()=>o});const n=[252,146,31,255],s=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[91,895,1775,1948,3931,6061,8125],{61691(e,t,i){i.d(t,{G:()=>n});class n{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},76061(e,t,i){i.d(t,{S:()=>r});var n=i(61691);class r extends n.G{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},65708(e,t,i){i.d(t,{a:()=>o,e:()=>s});var n=i(86211),r=i(78125);function s(e,t={}){const{unit:i}=t;let s=(0,r.fromGeometry)(e).calculateArea2D();if(s&&i){const t=(0,r.getSpatialReference)(e);if(t.isGeographic)throw new Error("Unable to convert from an angular area unit to a linear area unit.");const o=(0,n.B5)(t);o!==i&&(o?s=(0,n.oU)(s,o,i):(s=Math.sqrt(s),s*=(0,n.GA)(t),s**=2,s=(0,n.oU)(s,"square-meters",i)))}return s}const o=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:!0},Symbol.toStringTag,{value:"Module"}))},49590(e,t,i){i.d(t,{e:()=>p,g:()=>f,l:()=>u});var n=i(86211),r=i(86742),s=i(5808);let o,a,l,c;function h(){return!!o&&(0,r.s1)()}async function u(){if(!h()){const[e]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(1550)]).then(i.bind(i,78125)),(0,r.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=(0,r.fz)()}}function p(e,t={}){const{curveType:i="geodesic",unit:c}=t,h=l(e);let u=(0,r.g7)(o(e),a(h),s.O[i]);return u&&c&&(u=(0,n.oU)(u,"square-meters",c)),u}const f=Object.freeze(Object.defineProperty({__proto__:null,execute:p,isLoaded:h,load:u,get supportsCurves(){return c}},Symbol.toStringTag,{value:"Module"}))},27749(e,t,i){i.d(t,{e:()=>f,g:()=>d,l:()=>p});var n=i(86211),r=i(77085),s=i(5808);let o,a,l,c,h;function u(){return!!o&&(0,r.s1)()}async function p(){if(!u()){const[e]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(1666)]).then(i.bind(i,78125)),(0,r.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=e.toGeometry,h=(0,r.fz)()}}function f(e,t,i={}){const{curveType:h="geodesic",unit:u}=i;u&&(t=(0,n.oU)(t,u,"meters"));const p=l(e);return c((0,r.g7)(o(e),t,a(p),s.O[h]),p)}const d=Object.freeze(Object.defineProperty({__proto__:null,execute:f,executeMany:function(e,t,i={}){const{curveType:h="geodesic",unit:u}=i;u&&(t=(0,n.oU)(t,u,"meters"));const p=e.map(o),f=l(e);return(0,r.zo)(p,t,a(f),s.O[h]).map(e=>c(e,f))},isLoaded:u,load:p,get supportsCurves(){return h}},Symbol.toStringTag,{value:"Module"}))},39663(e,t,i){i.d(t,{e:()=>p,g:()=>f,l:()=>u});var n=i(86211),r=i(35223),s=i(5808);let o,a,l,c;function h(){return!!o&&(0,r.s1)()}async function u(){if(!h()){const[e]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(1550)]).then(i.bind(i,78125)),(0,r.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=(0,r.fz)()}}function p(e,t={}){const{curveType:i="geodesic",unit:c}=t,h=l(e);let u=(0,r.g7)(o(e),a(h),s.O[i]);return u&&c&&(u=(0,n.oU)(u,"meters",c)),u}const f=Object.freeze(Object.defineProperty({__proto__:null,execute:p,isLoaded:h,load:u,get supportsCurves(){return c}},Symbol.toStringTag,{value:"Module"}))},7817(e,t,i){i.d(t,{e:()=>s,l:()=>a,s:()=>o});var n=i(86211),r=i(78125);function s(e,t={}){const{unit:i}=t;let s=(0,r.fromGeometry)(e).calculateLength2D();if(s&&i){const t=(0,r.getSpatialReference)(e);s=(0,n.PQ)(s,t,i)}return s}const o=!0,a=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:o},Symbol.toStringTag,{value:"Module"}))},10222(e,t,i){i.d(t,{e:()=>s,s:()=>a});var n=i(81150),r=i(78125);function s(e){const t=(0,r.getSpatialReference)(e);return(0,r.toGeometry)((0,n.g7)((0,r.fromGeometry)(e),(0,r.fromSpatialReference)(t),!1),t)}const o=(0,n.fz)(),a=Object.freeze(Object.defineProperty({__proto__:null,execute:s,executeMany:function(e){const t=e.map(r.fromGeometry),i=(0,r.getSpatialReference)(e);return(0,n.zo)(t,(0,r.fromSpatialReference)(i),!1).map(e=>(0,r.toGeometry)(e,i))},isSimple:function(e){return(0,n.Pg)((0,r.fromGeometry)(e),(0,r.fromSpatialReference)((0,r.getSpatialReference)(e)),!1)},supportsCurves:o},Symbol.toStringTag,{value:"Module"}))},73354(e,t,i){i.d(t,{a:()=>p,b:()=>l,c:()=>a,d:()=>s,e:()=>f,f:()=>u,l:()=>h,n:()=>d,t:()=>o});var n=i(40876),r=(i(44208),i(72727));function s(e,t,i){o(e.typedBuffer,t.typedBuffer,i,e.typedBufferStride,t.typedBufferStride)}function o(e,t,i,n=3,s=n){const o=(0,r.k)(e.length,n,3),a=(0,r.k)(t.length,s,3),l=Math.min(o,a),c=i[0],h=i[1],u=i[2],p=i[4],f=i[5],d=i[6],m=i[8],g=i[9],y=i[10],v=i[12],w=i[13],x=i[14];let _=0,C=0;for(let i=0;i<l;i++){const i=t[_],r=t[_+1],o=t[_+2];e[C]=c*i+p*r+m*o+v,e[C+1]=h*i+f*r+g*o+w,e[C+2]=u*i+d*r+y*o+x,_+=s,C+=n}return e}function a(e,t,i){l(e.typedBuffer,t.typedBuffer,i,e.typedBufferStride,t.typedBufferStride)}function l(e,t,i,n=3,s=n){const o=(0,r.k)(e.length,n,3),a=(0,r.k)(t.length,s,3),l=Math.min(o,a),c=i[0],h=i[1],u=i[2],p=i[3],f=i[4],d=i[5],m=i[6],g=i[7],y=i[8];let v=0,w=0;for(let i=0;i<l;i++){const i=t[v],r=t[v+1],o=t[v+2];e[w]=c*i+p*r+m*o,e[w+1]=h*i+f*r+g*o,e[w+2]=u*i+d*r+y*o,v+=s,w+=n}}function c(e,t,i,n=3,r=n){const s=Math.min(e.length/n,t.length/r);let o=0,a=0;for(let l=0;l<s;l++)e[a]=i*t[o],e[a+1]=i*t[o+1],e[a+2]=i*t[o+2],o+=r,a+=n;return e}function h(e,t,i,n){u(e.typedBuffer,t.typedBuffer,i,n,e.typedBufferStride,t.typedBufferStride)}function u(e,t,i,r,s=3,o=s){const a=Math.min(e.length/s,t.length/o);let l=0,c=0;const h=1/n.Tf;for(let n=0;n<a;n++)e[c]=r*(i*t[l])**h,e[c+1]=r*(i*t[l+1])**h,e[c+2]=r*(i*t[l+2])**h,l+=o,c+=s}function p(e,t,i,n=3,s=n){const o=(0,r.k)(e.length,n,3),a=(0,r.k)(t.length,s,3),l=Math.min(o,a);let c=0,h=0;for(let r=0;r<l;r++)e[h]=t[c]+i[0],e[h+1]=t[c+1]+i[1],e[h+2]=t[c+2]+i[2],c+=s,h+=n;return e}function f(e,t){d(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function d(e,t,i=3,n=i){const r=Math.min(e.length/i,t.length/n);let s=0,o=0;for(let a=0;a<r;a++){const r=t[s],a=t[s+1],l=t[s+2],c=r*r+a*a+l*l;if(c>0){const t=1/Math.sqrt(c);e[o]=t*r,e[o+1]=t*a,e[o+2]=t*l}s+=n,o+=i}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:h,normalize:d,normalizeView:f,scale:c,scaleView:function(e,t,i){c(e.typedBuffer,t.typedBuffer,i,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,i){const n=Math.min(e.count,t.count),r=e.typedBuffer,s=e.typedBufferStride,o=t.typedBuffer,a=t.typedBufferStride;let l=0,c=0;for(let e=0;e<n;e++)r[c]=o[l]>>i,r[c+1]=o[l+1]>>i,r[c+2]=o[l+2]>>i,l+=a,c+=s},transformMat3:l,transformMat3View:a,transformMat4:o,transformMat4View:s,translate:p},Symbol.toStringTag,{value:"Module"}))},69540(e,t,i){i.d(t,{OU:()=>h,Pw:()=>u});var n=i(5482),r=i(69622),s=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const c=Symbol("ClonableMixin"),h=e=>{var t;const i=e;let r=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=c}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,n=t.store,r={},l=new Map;for(const t in i){const o=i[t],a=n?.originOf(t),c=o.clonable;if(o.readOnly||!1===c||7!==a&&0!==a&&5!==a&&4!==a)continue;const h=this[t];let u=null;if("function"==typeof c)u=c(h,e);else if("reference"===c)u=h;else if(u=(0,s.TU)(h,e),null!=h&&null==u)continue;0===a?l.set(t,u):r[t]=u}const c=new(0,Object.getPrototypeOf(this).constructor)(r);if(l.size){const e=(0,a.oY)(c)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return c}};return r=(0,n.Cg)([(0,l.$)("esri.core.Clonable")],r),r},u=h(r.A)},7762(e,t,i){i.d(t,{A:()=>I});var n,r=i(5482),s=i(98291),o=i(4576),a=i(65529),l=i(36563),c=i(4718),h=i(53966),u=i(93687),p=i(76030),f=i(56507),d=i(62788),m=i(10107),g=i(7695),y=i(64108),v=i(95488),w=i(12195);class x{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class _{constructor(e,t,i,n,r){this.target=e,this.added=t,this.removed=i,this.start=n,this.deleteCount=r}}const C=new u.A(()=>new x,void 0,e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1});function M(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function b(e){return e?e instanceof Z?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function A(e){if(e?.length)return e[0]}function T(e,t,i,n){const r=Math.min(e.length-i,t.length-n);let s=0;for(;s<r&&e[i+s]===t[n+s];)s++;return s}function S(e,t,i,n){t&&t.forEach((t,r,s)=>{e.push(t),S(e,i.call(n,t,r,s),i,n)})}const R=new Set,z=new Set,O=new Set,P=new Map;let E=0,Z=n=class extends a.nJ{static ofType(e){if(!e)return n;if(P.has(e))return P.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const n=e.typeMap[i].prototype.declaredClass;t?t+=` | ${n}`:t=n}let i=class extends n{};return(0,r.Cg)([(0,g.u)({Type:e,ensureType:"function"==typeof e?(0,f.dp)(e):(0,f.aq)(e)})],i.prototype,"itemType",void 0),i=(0,r.Cg)([(0,y.$)(`esri.core.Collection<${t}>`)],i),P.set(e,i),i}static isCollection(e){return null!=e&&e instanceof n}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new v.I,this._length=0,this._items=[],Object.defineProperty(this,"uid",{value:E++})}normalizeCtorArgs(e){return e?(0,o.yc)(e)||e instanceof n?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),super.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get length(){return this._length}set length(e){e>this._length?h.A.getLogger(this).error("#length=","Cannot increase the length of the collection by assigning to the length property."):this.splice(e,Math.max(0,this._length-e))}get items(){return(0,d.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(1)||(this._splice(0,this.length,b(e)),this._emitAfterChanges(1))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:super.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,l.hA)();if("change"===e){const e=this._chgListeners,i={removed:!1,callback:t};return e.push(i),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,l.hA)(()=>{i.removed=!0,e.splice(e.indexOf(i),1)})}return super.on(e,t)}once(e,t){const i="deref"in t?()=>t.deref():()=>t,n=this.on(e,e=>{i()?.call(null,e),n.remove()});return n}add(e,t){if((0,d.gc)(this._observable),this._emitBeforeChanges(1))return this;const i=this.getNextIndex(t??null);return this._splice(i,0,[e]),this._emitAfterChanges(1),this}addMany(e,t=this._items.length){if((0,d.gc)(this._observable),!e?.length)return this;if(this._emitBeforeChanges(1))return this;const i=this.getNextIndex(t);return this._splice(i,0,b(e)),this._emitAfterChanges(1),this}at(e){if((0,d.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return[];const e=this._removeAllRaw();return this._emitAfterChanges(2),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,d.gc)(this._observable),this._createNewInstance({items:this._items.map(c.o8)})}concat(...e){(0,d.gc)(this._observable);const t=e.map(b);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const i=this._splice(0,this.length),n=i.length;for(let r=0;r<n;r++)e.call(t,i[r],r,i);this._emitAfterChanges(2)}destroyAll(){this.drain(M)}destroyMany(e){const t=this.removeMany(e);return t.forEach(M),t}every(e,t){return(0,d.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,d.gc)(this._observable);const i=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:i})}find(e,t){return(0,d.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,d.gc)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,d.gc)(this._observable);const i=[];return S(i,this,e,t),new n(i)}forEach(e,t){return(0,d.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,d.gc)(this._observable),this._items[e]}getNextIndex(e){(0,d.gc)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,d.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,d.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,d.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,d.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,d.gc)(this._observable);const i=this._items.map(e,t);return new n({items:i})}reorder(e,t=this.length-1){(0,d.gc)(this._observable);const i=this.indexOf(e);if(-1!==i){if(t<0?t=0:t>=this.length&&(t=this.length-1),i!==t){if(this._emitBeforeChanges(4))return e;this._splice(i,1),this._splice(t,0,[e]),this._emitAfterChanges(4)}return e}}pop(){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=A(this._splice(this.length-1,1));return this._emitAfterChanges(2),e}push(...e){return(0,d.gc)(this._observable),this._emitBeforeChanges(1)||(this._splice(this.length,0,e),this._emitAfterChanges(1)),this.length}reduce(e,t){(0,d.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduce(e,t):i.reduce(e)}reduceRight(e,t){(0,d.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduceRight(e,t):i.reduceRight(e)}remove(e){return(0,d.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,d.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(2))return;const t=A(this._splice(e,1));return this._emitAfterChanges(2),t}removeMany(e){if((0,d.gc)(this._observable),!e?.length||this._emitBeforeChanges(2))return[];const t=e instanceof n?e.toArray():e,i=this._items,r=[],s=t.length;for(let e=0;e<s;e++){const n=t[e],s=i.indexOf(n);if(s>-1){const n=1+T(t,i,e+1,s+1),o=this._splice(s,n);o&&o.length>0&&r.push.apply(r,o),e+=n-1}}return this._emitAfterChanges(2),r}reverse(){if((0,d.gc)(this._observable),this._emitBeforeChanges(4))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(4),this}shift(){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=A(this._splice(0,1));return this._emitAfterChanges(2),e}slice(e=0,t=this.length){return(0,d.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,d.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(4)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(4),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let i=0;i<t;i++)if(e(this.items[i],this.items[i+1])>0)return!0;return!1}splice(e,t,...i){(0,d.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;const n=(t?2:0)|(i.length?1:0);if(this._emitBeforeChanges(n))return[];const r=this._splice(e,t,i)||[];return this._emitAfterChanges(n),r}toArray(){return(0,d.gc)(this._observable),this._items.slice()}toJSON(e){return(0,d.gc)(this._observable),this.toArray().map(t=>(0,w.W)(t)?t.toJSON(e):t)}toLocaleString(){return(0,d.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,d.gc)(this._observable),this._items.toString()}unshift(...e){return(0,d.gc)(this._observable),!e.length||this._emitBeforeChanges(1)||(this._splice(0,0,e),this._emitAfterChanges(1)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,i){const n=this._items,r=this.itemType;let s,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,p._)(()=>this._dispatchChange())),e<0&&(e+=this.length),t){if(o=n.splice(e,t),this.hasEventListener("before-remove")){const t=C.acquire();t.target=this,t.cancellable=!0;for(let i=0,r=o.length;i<r;i++)s=o[i],t.reset(s),this.emit("before-remove",t),t.defaultPrevented&&(o.splice(i,1),n.splice(e,0,s),e+=1,i-=1,r-=1);C.release(t)}if(this._length=this._items.length,this.hasEventListener("after-remove")){const e=C.acquire();e.target=this,e.cancellable=!1;const t=o.length;for(let i=0;i<t;i++)e.reset(o[i]),this.emit("after-remove",e);C.release(e)}}if(i?.length){if(r){const e=[];for(const t of i){const i=r.ensureType(t);null==i&&null!=t||e.push(i)}i=e}const t=this.hasEventListener("before-add"),s=this.hasEventListener("after-add"),o=e===this.length;if(t||s){const r=C.acquire();r.target=this,r.cancellable=!0;const a=C.acquire();a.target=this,a.cancellable=!1;for(const l of i)t?(r.reset(l),this.emit("before-add",r),r.defaultPrevented||(o?n.push(l):n.splice(e++,0,l),this._length=n.length,s&&(a.reset(l),this.emit("after-add",a)))):(o?n.push(l):n.splice(e++,0,l),this._length=n.length,a.reset(l),this.emit("after-add",a));C.release(a),C.release(r)}else{if(o)for(const e of i)n.push(e);else n.splice(e,0,...i);this._length=n.length}}if((i?.length||o?.length)&&this._notifyChangeEvent(i,o),this.hasEventListener("after-splice")){const n=new _(this,i,o,e,t);this.emit("after-splice",n)}return o}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const i=C.acquire();i.target=this,i.cancellable=!0,i.type=e,this.emit("before-changes",i),t=i.defaultPrevented,C.release(i)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=C.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),C.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;R.clear(),z.clear(),O.clear();for(const{added:t,removed:i}of e){if(t)if(0===O.size&&0===z.size)for(const e of t)R.add(e);else for(const e of t)z.has(e)?(O.add(e),z.delete(e)):O.has(e)||R.add(e);if(i)if(0===O.size&&0===R.size)for(const e of i)z.add(e);else for(const e of i)R.has(e)?R.delete(e):(O.delete(e),z.add(e))}const i=s.A.acquire();R.forEach(e=>{i.push(e)});const n=s.A.acquire();z.forEach(e=>{n.push(e)});const r=this._items,o=t.items,a=s.A.acquire();if(O.forEach(e=>{o.indexOf(e)!==r.indexOf(e)&&a.push(e)}),t.listeners&&(i.length||n.length||a.length)){const e={target:this,added:i,removed:n,moved:a},r=t.listeners.length;for(let i=0;i<r;i++){const n=t.listeners[i];n.removed||n.callback.call(this,e)}}s.A.release(i),s.A.release(n),s.A.release(a)}R.clear(),z.clear(),O.clear()}};(0,r.Cg)([(0,m.MZ)()],Z.prototype,"_updating",void 0),(0,r.Cg)([(0,m.MZ)()],Z.prototype,"_length",void 0),(0,r.Cg)([(0,m.MZ)()],Z.prototype,"length",null),(0,r.Cg)([(0,m.MZ)()],Z.prototype,"items",null),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],Z.prototype,"updating",null),Z=n=(0,r.Cg)([(0,y.$)("esri.core.Collection")],Z);const I=Z},4902(e,t,i){i.d(t,{s:()=>o});var n=i(5482),r=i(64108);let s=0;const o=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return i=(0,n.Cg)([(0,r.$)("esri.core.Identifiable")],i),i};o(class{})},7695(e,t,i){function n(e){return(t,i)=>{t[i]=e}}i.d(t,{u:()=>n})},82534(e,t,i){function n(){return[0,0,0,1]}function r(e){return[e[0],e[1],e[2],e[3]]}i.d(t,{o8:()=>r,vt:()=>n,zK:()=>s});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:r,create:n,fromValues:function(e,t,i,n){return[e,t,i,n]}},Symbol.toStringTag,{value:"Module"}))},48163(e,t,i){function n(){return[0,0]}function r(e){return[e[0],e[1]]}function s(e,t){return[e,t]}function o(){return s(1,1)}function a(){return s(1,0)}function l(){return s(0,1)}i.d(t,{Un:()=>c,fA:()=>s,o8:()=>r,vt:()=>n});const c=o(),h=a(),u=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:h,UNIT_Y:u,ZEROS:[0,0],clone:r,create:n,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const i=Math.min(2,e.length);for(let n=0;n<i;++n)t[n]=e[n];return t},fromValues:s,ones:o,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},17799(e,t,i){i.d(t,{T9:()=>a,d_:()=>r,gT:()=>s});var n=i(86211);function r(e,t){return{type:(0,n.t$)(t),value:e,unit:t}}function s(e,t){return{type:(0,n.t$)(t),value:e,unit:t}}function o(e,t,i="arithmetic"){return{type:(0,n.t$)(t),value:e,unit:t,rotationType:i}}function a(e,t){return null==e?t:null==t||e.value>(0,n.oU)(t.value,t.unit,e.unit)?e:t}r(0,"meters"),s(0,"square-meters"),o(0,"radians"),o(0,"degrees"),o(0,"degrees","geographic")},36708(e,t,i){i.d(t,{C_:()=>p,OH:()=>m,Vh:()=>g,on:()=>u,pc:()=>y,wB:()=>l,z7:()=>c});var n=i(37955),r=i(36563),s=i(97768),o=i(17676),a=i(14012);function l(e,t,i={}){return h(e,t,i,f)}function c(e,t,i={}){return h(e,t,i,d)}function h(e,t,i={},n){let r=null;const o=i.once?(e,i)=>{n(e)&&((0,s.xt)(r),t(e,i))}:(e,i)=>{n(e)&&t(e,i)};if(r=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return r}function u(e,t,i,o={}){let a=null,c=null,h=null;function u(){a&&c&&(c.remove(),o.onListenerRemove?.(a),a=null,c=null)}function p(e){o.once&&o.once&&(0,s.xt)(h),i(e)}const f=l(e,(e,i)=>{u(),(0,n.wb)(e)&&(a=e,c=(0,n.on)(e,t,p),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,r.hA)(()=>{f.remove(),u()}),h}function p(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const n=e();if(t?.(n))return Promise.resolve(n);let a=null;function l(){a=(0,s.xt)(a)}return new Promise((n,s)=>{a=(0,r.vE)([(0,o.u7)(i,()=>{l(),s((0,o.NK)())}),h(e,e=>{l(),n(e)},{sync:!1,once:!0},t??f)])})}(e,d,t)}function f(e){return!0}function d(e){return!!e}i(80559);const m={sync:!0},g={initial:!0},y={sync:!0,initial:!0}},35982(e,t,i){i.d(t,{B:()=>h});var n=i(4576),r=i(71511),s=i(36563),o=i(53966),a=i(97768),l=i(17676),c=i(83027);class h{constructor(e,t,i,n,r={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,c.h)(e,{...r,schedule:n}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{r.hasInitialize&&e.invoke("initialize",{});for(const t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>o.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const i=new u(e,t);return this._listeners.push(i),this._connectListener(i),(0,s.hA)(()=>{(0,n.TF)(this._listeners,i),i.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,a.xt)(this._onClientConnectedHandle),this._thread&&(this._thread.close(),this._thread=null),this._promise=null;for(const e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,n){if(this._thread){const r=this._transferLists[e],s=r?r(t):[];return this._thread.invoke(e,t,{transferList:s,signal:i,jobPriority:n})}return this._promise?this._promise.then(()=>((0,l.Te)(i),this.invokeMethod(e,t,i))):Promise.reject((0,l.NK)())}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(p):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject((0,l.NK)())}get promise(){return this._promise}_onClientConnected(e){}_connectListener(e){this._thread&&e.add(this._thread.on(e.eventName,e.callback))}_connectListenerToClient(e,t){e.add(t.on(e.eventName,e.callback))}}class u{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new r.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function p(){}},87992(e,t,i){i.d(t,{JR:()=>A,ME:()=>C,MY:()=>T,NO:()=>_,Nh:()=>b,V2:()=>P,_s:()=>E,e6:()=>I,gh:()=>M,tr:()=>L,uX:()=>g});var n=i(5482),r=i(69397),s=i(16930),o=(i(70328),i(19419)),a=i(60408),l=i(21325),c=i(513),h=i(50954),u=i(79567),p=i(52006),f=i(49663),d=i(46068),m=i(92722);class g{constructor({type:e,spatialReference:t,vertexCount:i,vertexXY:n,vertexZ:r,vertexM:s,partCount:o,partOffsets:a,partFlags:l,segmentFlags:c,segmentIndices:h,segmentParams:u,segmentCountArc:p,segmentCountBezier:f}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=i,this.vertexXY=n,this.vertexZ=r,this.vertexM=s,this.partCount=o,this.partOffsets=a,this.partFlags=l,this.segmentFlags=c,this.segmentIndices=h,this.segmentParams=u,this.segmentCountArc=p,this.segmentCountBezier=f}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:e,segmentCountArc:t,segmentCountBezier:i}=this;return e&&e-t-i}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?r.Ul+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){const{type:e,vertexCount:t,partCount:i,hasZ:n,hasM:r,segmentCountArc:s,segmentCountBezier:o}=this,a=P(e,t,i,n,r,this.hasCurves(),s,o);a.spatialReference=this.spatialReference;const{vertexXY:l,vertexZ:c,vertexM:h}=this;if(a.vertexXY.set(l.subarray(0,2*t),0),a.vertexZ?.set(c.subarray(0,t),0),a.vertexM?.set(h.subarray(0,t),0),this.isMultipart()){const{partOffsets:e,partFlags:t}=this;a.partFlags.set(t.subarray(0,i+1)),a.partOffsets.set(e.subarray(0,i+1))}if(this.hasCurves()){const{segmentFlags:e,segmentIndices:i,segmentParams:n,segmentParamCount:r}=this;a.segmentFlags.set(e.subarray(0,t),0),a.segmentIndices.set(i.subarray(0,t),0),a.segmentParams.set(n.subarray(0,r),0)}return a}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,l.aI)(this.spatialReference,e.spatialReference))return!1;if(this.vertexCount!==e.vertexCount||this.partCount!==e.partCount)return!1;if(this.hasZ!==e.hasZ||this.hasM!==e.hasM)return!1;if(this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;const i=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,i)=>Math.abs(e-i)>t||isNaN(e)!==isNaN(i);for(let t=0;t<this.vertexCount;++t)if(i(this.vertexXY[2*t],e.vertexXY[2*t])||i(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(i(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(i(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(i(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return this.isMultipart()?new y(this):[][Symbol.iterator]()}}class y{constructor(e){this.geometry=e,this.value=new v(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class v{constructor(e){this.geometry=e,this.index=-1,this._readVertex=z(e),this._segments=new w(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class w{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===e.geometry.type,this.value=new x(e.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class x{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=z(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;const t=this.geometry.segmentParams;let i=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){const e=t[i++],n=t[i++],r=t[i++],s=t[i++];return{b:[this.end,[e,n],[r,s]]}}const n=t[i++],r=t[i++],s=t[i++],o=t[i++],a=t[i++],l=t[i++];i++,i++;const c=t[i++],h=t[i++];if(!Boolean(4&n)&&1===s)return{c:[this.end,[c,h]]};const u=2&n?0:1,p=1&n?0:1;return{a:[this.end,[a,l],u,p,o,r,s]}}}function _(e,t){const i={stack:[],error:void 0,hasError:!1};try{return t??=(0,o.Ie)(),(0,n.mS)(i,new S(e,["vertexZ","vertexM","spatialReference"]),!1),(0,o.bx)(t,function(e){let t;const{vertexCount:i,vertexXY:r,vertexZ:s,vertexM:a}=e,l=R(e);if(e.hasCurves()){const i={stack:[],error:void 0,hasError:!1};try{(0,n.mS)(i,new S(e,["vertexZ","vertexM"]),!1);const r=(0,o.Ie)();for(const t of e.parts){let e=t.startVertex;for(const{curve:i}of t.segments)(0,u.e)(r,e,i),e=(0,p.yP)(i)}const[s,a,c,h]=r;t={xmin:s,ymin:a,xmax:c,ymax:h,spatialReference:l}}catch(e){i.error=e,i.hasError=!0}finally{(0,n.hk)(i)}}else{let e,n,s,o;e=n=1/0,s=o=-1/0;for(let t=0;t<i;++t){const i=r[2*t],a=r[2*t+1];e=Math.min(e,i),s=Math.max(s,i),n=Math.min(n,a),o=Math.max(o,a)}t={xmin:e,ymin:n,xmax:s,ymax:o,spatialReference:l}}if(s){let e=1/0,i=-1/0;for(const t of s)e=Math.min(e,t),i=Math.max(i,t);t.zmin=e,t.zmax=i}if(a){let e=1/0,i=-1/0;for(const t of a)e=Math.min(e,t),i=Math.max(i,t);t.mmin=e,t.mmax=i}return t}(e)),t}catch(e){i.error=e,i.hasError=!0}finally{(0,n.hk)(i)}}function C(e){let t,i,n;if((0,a.fT)(e)){n="point";const{x:r,y:s,z:o,m:a}=e,l=[r,s];null!=o&&l.push(o),null!=a&&l.push(a),i=[[l]],t=1}else(0,a.U9)(e)?(n="multipoint",i=[e.points],t=e.points.length):(0,a.Rg)(e)?(n="polyline",i=e.curvePaths??e.paths,t=i.reduce((e,t)=>e+t.length,0)):(n="polygon",i=e.curveRings??e.rings,t=i.reduce((e,t)=>(0===t.length||(e+=t.length,O(t[0],(0,p.yP)(t.at(-1)))&&--e),e),0));const r=P(n,t,n.includes("point")?0:i.length,(0,a.Pv)(e),(0,a.W0)(e),(0,p.Ed)(e)),{hasZ:s,hasM:o,vertexXY:l,vertexZ:c,vertexM:h}=r;function u(e){l[2*d]=e[0],l[2*d+1]=e[1],s&&(c[d]=e[2]),o&&(h[d]=e[f]),++d}r.spatialReference=e.spatialReference??void 0;const f=r.hasZ?3:2;let d=0;if(!r.isMultipart()){if(!s&&!o){for(const[e,t]of i[0])l[2*d]=e,l[2*d+1]=t,++d;return r}for(const e of i[0])u(e);return r}const m="polygon"===n,{partOffsets:g}=r;let y=0;if(!(0,p.Ed)(e)){for(const e of i){if(g[y++]=d,0===e.length)continue;let t=e.length;if(m&&O(e[0],e.at(-1))&&--t,s||o)for(let i=0;i<t;++i)u(e[i]);else for(let i=0;i<t;++i){const[t,n]=e[i];l[2*d]=t,l[2*d+1]=n,++d}}return g[y]=d,r}function v(e){const t=w+e;if(t<=(r.segmentParams?.length??0))return;let i=t*j;i=20*Math.ceil(i/20);const n=r.segmentParams;r.segmentParams=new Float64Array(i),null!=n&&r.segmentParams.set(n)}let w=0;for(const e of i){if(r.partOffsets[y++]=d,0===e.length)continue;const t=e[0];let i=t;for(let t=1;t<e.length;++t){const n=e[t];u(i);const s=d-1;(0,p.wY)(n)?(v(10),++r.segmentCountArc,w=E(i,n,r,s,w),i=n.a[0]):(0,p.DA)(n)?(v(10),++r.segmentCountArc,w=Z(i,n,r,s,w),i=n.a[0]):(0,p.aO)(n)?(v(10),++r.segmentCountArc,w=I(i,n,r,s,w),i=n.c[0]):(0,p.n1)(n)?(v(4),++r.segmentCountBezier,w=L(0,n,r,s,w),i=n.b[0]):i=n}m&&O(t,i)||u(i)}return r.partOffsets[y]=d,r}function M(e){const t=z(e),{vertexCount:i,partCount:n,hasZ:r,hasM:s}=e,o=R(e);if("point"===e.type){const[t,i]=e.vertexXY,n=e.vertexZ?.[0],r=e.vertexM?.[0];return{x:t,y:i,z:n,m:r,spatialReference:o}}let a=0;if("multipoint"===e.type){const e=[];for(;a<i;)e.push(t(a++));return{points:e,spatialReference:o,hasZ:r,hasM:s}}const l="polygon"===e.type;if(!e.hasCurves()){const i=new Array;for(let r=0;r<n;++r){const n=e.partOffsets[r+1],s=new Array;for(;a<n;)s.push(t(a++));l&&s.length>0&&s.push(s[0]),i.push(s)}return l?{rings:i,hasZ:r,hasM:s,spatialReference:o}:{paths:i,hasZ:r,hasM:s,spatialReference:o}}const c=new Array;for(const{segments:t,startVertex:i}of e.parts){const e=[i];for(const{curve:i}of t)e.push(i);c.push(e)}return l?{rings:[],curveRings:c,hasZ:r,hasM:s,spatialReference:o}:{paths:[],curvePaths:c,hasZ:r,hasM:s,spatialReference:o}}function b(e,{lengths:t,coords:i,hasZ:n,hasM:r},s){const o=e.includes("point")?0:t.length,a="polygon"===e,l="point"===e?1:t.reduce((e,t)=>e+t,0)-(a?o:0);n??=!1,r??=!1;const c=P(e,l,o,n,r,!1,0,0);if(c.spatialReference=s??void 0,!c.isMultipart()){for(let e=0,t=0;e<l;++e)c.vertexXY[2*e]=i[t++],c.vertexXY[2*e+1]=i[t++],n&&(c.vertexZ[e]=i[t++]),r&&(c.vertexM[e]=i[t++]);return c}const h=2+Number(n)+Number(r);let u=0,p=0;c.partOffsets[0]=0;for(const e of t){const t=c.partOffsets[p],s=t+e-Number(a);c.partOffsets[++p]=s;for(let e=t;e<s;++e)c.vertexXY[2*e]=i[u++],c.vertexXY[2*e+1]=i[u++],n&&(c.vertexZ[e]=i[u++]),r&&(c.vertexM[e]=i[u++]);a&&(u+=h)}return c}function A({type:e,vertexCount:t,vertexXY:i,vertexZ:n,vertexM:r,partCount:s,partOffsets:o,hasZ:a,hasM:l}){const c=new m.A([],[],a,l);s=Math.max(s,1);const h="polygon"===e;let u=0;for(let e=0;e<s;++e){const s=o?.[e+1]??t,p=c.coords.length;for(let e=u;e<s;++e)c.coords.push(i[2*e],i[2*e+1]),a&&c.coords.push(n[e]),l&&c.coords.push(r[e]);if(h){const e=u;c.coords.push(i[2*e],i[2*e+1]),a&&c.coords.push(n[e]),l&&c.coords.push(r[e])}c.lengths.push((c.coords.length-p)/c.stride),u=s}return"point"===e&&(c.lengths.length=0),c}function T(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;const t=e.getText()||void 0,i=e.isCustomWkid()?0:e.getOldID();if(i<=0)return{wkt:t};let n=e.getLatestID();(n<=0||n===i)&&(n=void 0);const r=e.getVCS();if(null==r)return{wkid:i,latestWkid:n,wkt:t};const s=r.isCustomWkid()?0:r.getOldID();if(s<=0)return{wkt:t};let o=e.getLatestVerticalID();return(o<=0||o===s)&&(o=void 0),{wkid:i,wkt:t,latestWkid:n,vcsWkid:s,latestVcsWkid:o}}(e.getSpatialReference()),e=e.getGeometry()),new g({...e.toFlatGeometry(),spatialReference:t})}class S{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(const i of t)e[i]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function R({spatialReference:e}){return e instanceof s.A?e.toJSON():e}function z({vertexXY:e,vertexZ:t,vertexM:i}){return t?i?n=>[e[2*n],e[2*n+1],t[n],i[n]]:i=>[e[2*i],e[2*i+1],t[i]]:i?t=>[e[2*t],e[2*t+1],i[t]]:t=>[e[2*t],e[2*t+1]]}function O(e,t){return e.every((e,i)=>e===t[i])}function P(e,t,i,n,r,s,o,a){o??=0,a??=0;const l=new g({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:i,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:o,segmentCountBezier:a});let c=2*Float64Array.BYTES_PER_ELEMENT*t;n&&(c+=Float64Array.BYTES_PER_ELEMENT*t),r&&(c+=Float64Array.BYTES_PER_ELEMENT*t),l.isMultipart()&&(c+=(i+1)*Int32Array.BYTES_PER_ELEMENT,c+=(i+1)*Int8Array.BYTES_PER_ELEMENT),s&&(c+=t*Int8Array.BYTES_PER_ELEMENT,c+=t*Int32Array.BYTES_PER_ELEMENT,c+=l.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const h=new ArrayBuffer(c);let u=0;return l.vertexXY=new Float64Array(h,u,2*t),u+=l.vertexXY.byteLength,n&&(l.vertexZ=new Float64Array(h,u,t),u+=l.vertexZ.byteLength),r&&(l.vertexM=new Float64Array(h,u,t),u+=l.vertexM.byteLength),s&&(l.segmentParams=new Float64Array(h,u,l.segmentParamCount),u+=l.segmentParams.byteLength,l.segmentIndices=new Int32Array(h,u,t),l.segmentIndices.fill(V),u+=l.segmentIndices.byteLength),l.isMultipart()&&(l.partOffsets=new Int32Array(h,u,i+1),u+=l.partOffsets.byteLength,l.partFlags=new Int8Array(h,u,i+1),u+=l.partFlags.byteLength,"polygon"===l.type&&l.partFlags.subarray(0,i).fill(1)),s&&(l.segmentFlags=new Int8Array(h,u,t),l.segmentFlags.fill(1),u+=l.segmentFlags.byteLength),l}function E(e,t,{segmentFlags:i,segmentIndices:n,segmentParams:r},s,o){i[s]=4,n[s]=o;const[a,[l,c],h,u,p,f,m]=t.a;let g=4;u||(g|=1),h||(g|=2);const y=(0,d.SW)(e,t),[v,w]=(0,d.Uk)(y,.5);return r[o++]=g,r[o++]=f,r[o++]=m,r[o++]=p,r[o++]=l,r[o++]=c,r[o++]=y.u2-y.u1,r[o++]=y.u1,r[o++]=v,r[o++]=w,o}function Z(e,t,{segmentFlags:i,segmentIndices:n,segmentParams:r},s,o){i[s]=4,n[s]=o;const a=(0,f.io)(e,t);return D(a,4,...(0,c.mq)(a,.5),r,o)}function I(e,t,{segmentFlags:i,segmentIndices:n,segmentParams:r},s,o){return i[s]=4,n[s]=o,D((0,h.pM)(e,t),0,...t.c[1],r,o)}function D(e,t,i,n,r,s){const{cx:o,cy:a,thetaStart:l,thetaEnd:c,radius:h}=e;return l>c||(t|=1),Math.abs(c-l)<=Math.PI||(t|=2),r[s++]=t,r[s++]=h,r[s++]=1,r[s++]=0,r[s++]=o,r[s++]=a,r[s++]=c-l,r[s++]=l,r[s++]=i,r[s++]=n,s}function L(e,{b:[t,[i,n],[r,s]]},{segmentFlags:o,segmentIndices:a,segmentParams:l},c,h){return o[c]=2,a[c]=h,l[h++]=i,l[h++]=n,l[h++]=r,l[h++]=s,h}const j=1.61803,V=-1},54239(e,t,i){i.d(t,{A:()=>g});var n,r=i(5482),s=i(4576),o=i(66552),a=i(25482),l=i(86211),c=i(67076),h=i(91429),u=i(43937),p=i(36005);const f=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),d=f.jsonValues.slice();(0,s.Xy)(d,"orthometric");const m=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=n=class extends a.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return f.write(e,t,i)}readHeightModel(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(function(e,t){return new c.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return m.read(e)||(i?.messages&&i.messages.push(y(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.LA)(e)||m.read(e)||(i?.messages&&i.messages.push(y(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new n({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.k1)(t);return new n({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new n;return t.read(e,{origin:"web-scene"}),t}};function y(e,t){return new c.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,r.Cg)([(0,h.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:d,default:"ellipsoidal",write:{isRequired:!0}}}}})],g.prototype,"heightModel",void 0),(0,r.Cg)([(0,u.K)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,r.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,r.Cg)([(0,h.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:{writer:m.write,isRequired:!0}}}}})],g.prototype,"heightUnit",void 0),(0,r.Cg)([(0,p.w)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,r.Cg)([(0,p.w)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,r.Cg)([(0,h.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,r.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=n=(0,r.Cg)([(0,h.$K)("esri.geometry.HeightModelInfo")],g)},86742(e,t,i){i.d(t,{Hh:()=>o,fz:()=>l,g7:()=>a,s1:()=>s});var n=i(83290);let r;function s(){return!!r&&(0,n.i)()}async function o(){if(!s()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(6859),i.e(6558)]).then(i.bind(i,6558)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(6061)]).then(i.bind(i,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,n.l)()]);r=new e.OperatorGeodeticArea,t(n.p)}}function a(e,t,i){return r.execute(e,t,i,null)}function l(){return r.supportsCurves()}},77085(e,t,i){i.d(t,{Hh:()=>a,fz:()=>h,g7:()=>l,s1:()=>o,zo:()=>c});var n=i(76061),r=i(83290);let s;function o(){return!!s&&(0,r.i)()}async function a(){if(!o()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(1088)]).then(i.bind(i,31088)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756)]).then(i.bind(i,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);s=new e.OperatorGeodeticDensifyByLength,t(r.p)}}function l(e,t,i,n){return s.execute(e,t,i,n,null)}function c(e,t,i,r){const o=s.executeMany(new n.S(e),t,i,r,null);return Array.from(o)}function h(){return s.supportsCurves()}},35223(e,t,i){i.d(t,{Hh:()=>o,fz:()=>l,g7:()=>a,s1:()=>s});var n=i(83290);let r;function s(){return!!r&&(0,n.i)()}async function o(){if(!s()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(4167)]).then(i.bind(i,28879)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(6061)]).then(i.bind(i,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,n.l)()]);r=new e.OperatorGeodeticLength,t(n.p)}}function a(e,t,i){return r.execute(e,t,i,null)}function l(){return r.supportsCurves()}},4144(e,t,i){i.d(t,{Hh:()=>a,fz:()=>h,g7:()=>l,s1:()=>o,zo:()=>c});var n=i(76061),r=i(83290);let s;function o(){return!!s&&(0,r.i)()}async function a(){if(!o()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(9192)]).then(i.bind(i,9192)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756)]).then(i.bind(i,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);s=new e.OperatorProject,t(r.p)}}function l(e,t){return s.execute(e,t,null)}function c(e,t){const i=s.executeMany(new n.S(e),t,null);return Array.from(i)}function h(){return s.supportsCurves()}},81150(e,t,i){i.d(t,{Pg:()=>l,fz:()=>c,g7:()=>o,zo:()=>a});var n=i(76061),r=(i(55537),i(88885),i(15756));i(95213);const s=new r.f;function o(e,t,i){return s.execute(e,t,i,null)}function a(e,t,i){const r=s.executeMany(new n.S(e),t,i,null);return Array.from(r)}function l(e,t,i){return s.isSimpleAsFeature(e,t,i,null,null)}function c(){return s.supportsCurves()}},83276(e,t,i){i.r(t),i.d(t,{execute:()=>f,executeMany:()=>d,isLoaded:()=>u,load:()=>p,supportsCurves:()=>h});var n=i(4144),r=i(17499);let s,o,a,l,c,h;function u(){return!!s&&(0,n.s1)()}async function p(){if(!u()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(9285)]).then(i.bind(i,78125)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(6129)]).then(i.bind(i,86129)),(0,n.Hh)()]);s=e.fromGeometry,o=e.fromSpatialReference,a=e.getSpatialReference,l=e.toGeometry,c=t.createProjectionTransformation,h=(0,n.fz)()}}function f(e,t,i){const h=a(e),u=c(o(h),o(t),i),p=l((0,n.g7)(s(e),u),t);return!i?.zConversionDisabled&&p?.hasZ&&(0,r.gw)([p],h,t),p}function d(e,t,i){const h=e.map(s),u=a(e),p=c(o(u),o(t),i),f=(0,n.zo)(h,p).map(e=>l(e,t));return!i?.zConversionDisabled&&f&&(0,r.gw)(f,u,t),f}},78125(e,t,i){i.r(t),i.d(t,{fromExtent:()=>g,fromGeometry:()=>m,fromMultipoint:()=>y,fromPoint:()=>v,fromPolygon:()=>w,fromPolyline:()=>x,fromPolylineUsingImportOperator:()=>_,fromSpatialReference:()=>C,getSpatialReference:()=>d,toExtent:()=>b,toGeometry:()=>M,toMultipoint:()=>A,toPoint:()=>T,toPolygon:()=>S,toPolyline:()=>R});var n=i(83661),r=(i(79187),i(55537)),s=i(95213),o=i(88885),a=i(5443),l=i(48526),c=i(86738),h=i(39829),u=i(82799),p=(i(90293),i(83299));const f="_gxVersion";function d(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function m(e){switch(e.type){case"point":return v(e);case"multipoint":return y(e);case"polyline":return x(e);case"polygon":return w(e);case"extent":return g(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function g(e){if(!e.getCacheValue(f)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(2,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(1,0,e.zmin,e.zmax),e.setCacheValue(f,t)}return e.getCacheValue(f)}function y(e){if(!e.getCacheValue(f)){const t=new o.M,i=new s.P,n=e.points,r=e.hasM,a=e.hasZ,l=a?3:2;for(let e=0,s=n.length;e<s;e++){const s=n[e];i.setXYCoords(s[0],s[1]),a&&i.setZ(s[2]??0),r&&i.setM(s[l]??NaN),t.add(i)}e.setCacheValue(f,t)}return e.getCacheValue(f)}function v(e){if(!e.getCacheValue(f)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(f,t)}return e.getCacheValue(f)}function w(e){if(!e.getCacheValue(f)){const{curveRings:t,hasM:i,hasZ:n,rings:r}=e,s=(0,p.fromGeometryToGXGeometry)({curveRings:t,hasM:i,hasZ:n,rings:r});e.setCacheValue(f,s)}return e.getCacheValue(f)}function x(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:i,hasZ:n,paths:r}=e,s=(0,p.fromGeometryToGXGeometry)({curvePaths:t,hasM:i,hasZ:n,paths:r});e.setCacheValue(f,s)}return e.getCacheValue(f)}function _(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:i,hasZ:n,paths:r}=e,s=(0,p.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:t,hasM:i,hasZ:n,paths:r});e.setCacheValue(f,s)}return e.getCacheValue(f)}function C(e){return e.cache?(e.cache[f]??=(0,p.fromSpatialReference)(e),e.cache[f]):(0,p.fromSpatialReference)(e)}function M(e,t){if(e)switch(e.getGeometryType()){case r.G.enumPoint:return T(e,t);case r.G.enumEnvelope:return b(e,t);case r.G.enumMultiPoint:return A(e,t);case r.G.enumPolyline:return R(e,t);case r.G.enumPolygon:return S(e,t)}return null}function b(e,t){if(e.isEmpty())return null;const i=new a.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),n=e.getDescription();if(n.hasM()){const t=e.queryInterval(2,0);i.mmin=t.vmin,i.mmax=t.vmax}if(n.hasZ()){const t=e.queryInterval(1,0);i.zmin=t.vmin,i.zmax=t.vmax}return i.setCacheValue(f,e),i}function A(e,t){if(e.isEmpty())return null;const i=e.getDescription(),n=i.hasM(),r=i.hasZ(),o=[],a=new s.P;for(let t=0,i=e.getPointCount();t<i;t++){e.getPointByVal(t,a);const i=[a.getX(),a.getY()];r&&i.push(a.getZ()),n&&i.push(a.getM()),o.push(i)}const c=new l.A({hasM:n,hasZ:r,points:o,spatialReference:t});return c.setCacheValue(f,e),c}function T(e,t){if(e instanceof n.P)return new c.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const i=new c.A({x:e.getX(),y:e.getY(),spatialReference:t}),r=e.getDescription();return r.hasM()&&(i.m=e.getM()),r.hasZ()&&(i.z=e.getZ()),i.setCacheValue(f,e),i}function S(e,t){if(e.isEmpty())return null;const i=h.A.fromJSON({...(0,p.toGeometry)(e,null),spatialReference:t});return i.setCacheValue(f,e),i}function R(e,t){if(e.isEmpty())return null;const i=u.A.fromJSON({...(0,p.toGeometry)(e,null),spatialReference:t});return i.setCacheValue(f,e),i}},5808(e,t,i){i.d(t,{O:()=>n});const n={geodesic:0,loxodrome:1,"great-elliptic":2,"normal-section":3,"shape-preserving":4}},17499(e,t,i){i.d(t,{gw:()=>o});var n=i(49186),r=i(60408),s=i(62815);function o(e,t,i){let n;for(const o of e)if(o&&(0,r.Pv)(o)&&!("vertexAttributes"in o)){if(!n){null==t.vcsWkid&&null==i.vcsWkid||l(t,i);const e="type"in o?o.type:(0,r.$B)(o);if(n=(0,s.N)(e,t,i),!n)return}n(o)}}class a extends n.A{constructor(){super("projection:z-unsupported","projection of z values is unsupported between different vertical coordinate systems")}}function l({vcsWkid:e},{vcsWkid:t}){if((e??null)!==(t??null))throw new a}},72727(e,t,i){function n(e,t,i){if(t<=0)return 0;const n=e-i;return n<0?0:Math.floor(n/t)+1}i.d(t,{k:()=>n}),i(53966)},27921(e,t,i){i.d(t,{$Q:()=>x,C:()=>a,Cr:()=>h,O_:()=>c,Qj:()=>l,T7:()=>v,Tj:()=>w,lU:()=>u,mN:()=>_,vE:()=>C,vt:()=>o});var n=i(34727),r=i(35522),s=i(51850);function o(e=M){return[e[0],e[1],e[2],e[3]]}function a(e,t){return function(e,t,i,n,r=o()){return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,i){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=Math.abs(n-1)>1e-5&&n>1e-12?1/Math.sqrt(n):1;return i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*r,i[3]=-(i[0]*e[0]+i[1]*e[1]+i[2]*e[2]),i}function h(e,t,i,n=o()){const r=i[0]-t[0],s=i[1]-t[1],a=i[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],h=e[2]-t[2],u=s*h-a*c,p=a*l-r*h,f=r*c-s*l,d=u*u+p*p+f*f,m=Math.abs(d-1)>1e-5&&d>1e-12?1/Math.sqrt(d):1;return n[0]=u*m,n[1]=p*m,n[2]=f*m,n[3]=-(n[0]*e[0]+n[1]*e[1]+n[2]*e[2]),n}function u(e,t,i,n=0,s=Math.floor(i*(1/3)),o=Math.floor(i*(2/3))){if(i<3)return!1;t(f,n);let a=s,l=!1;for(;a<i-1&&!l;)t(d,a),a++,l=!(0,r.t2)(f,d);if(!l)return!1;for(a=Math.max(a,o),l=!1;a<i&&!l;)t(m,a),a++,(0,r.Re)(g,f,d),(0,r.S8)(g,g),(0,r.Re)(y,d,m),(0,r.S8)(y,y),l=!(0,r.t2)(f,m)&&!(0,r.t2)(d,m)&&Math.abs((0,r.Om)(g,y))<p;return l?(h(f,d,m,e),!0):(0!==n||1!==s||2!==o)&&u(e,t,i,0,1,2)}i(78955),i(44280),i(32114),i(32728);const p=.99619469809,f=(0,s.vt)(),d=(0,s.vt)(),m=(0,s.vt)(),g=(0,s.vt)(),y=(0,s.vt)();function v(e,t,i){return function(e){return 0===e||1===e}(C(e,t.origin,t.vector,0,i))}function w(e,t){return _(e,t)>=0}function x(e,t){const i=(0,r.Om)(e,t.ray.direction),n=-_(e,t.ray.origin);if(n<0&&i>=0)return!1;if(i>-1e-6&&i<1e-6)return n>0;if((n<0||i<0)&&!(n<0&&i<0))return!0;const s=n/i;return i>0?s<t.c1&&(t.c1=s):s>t.c0&&(t.c0=s),t.c0<=t.c1}function _(e,t){return(0,r.Om)(e,t)+e[3]}function C(e,t,i,s,o){const a=(0,r.Om)(e,i),l=_(e,t);if(0===a)return l>=0?2:3;let c=-l/a;return 1&s&&(c=(0,n.qE)(c,0,1)),!(4&s)&&c<0||!(8&s)&&c>1?l>=0?2:3:((0,r.WQ)(o,t,(0,r.hs)(o,i,c)),l>=0?0:1)}const M=[0,0,1,0]},44280(e,t,i){i.d(t,{g7:()=>a,gr:()=>o});var n=i(34727),r=i(35522),s=i(51850);function o(e,t){return(0,r.Om)(e,t)/(0,r.Bw)(e)}function a(e,t){const i=(0,r.Om)(e,t)/((0,r.Bw)(e)*(0,r.Bw)(t));return-(0,n.XM)(i)}(0,s.vt)(),(0,s.vt)()},32114(e,t,i){i.d(t,{Rc:()=>f,J8:()=>d,rq:()=>u,Km:()=>p}),i(44208);var n=i(26390),r=i(29242),s=i(9093),o=i(82534),a=i(48163),l=i(51850),c=i(91829);class h{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,n.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new h(a.vt)}static createVec3f64(){return new h(l.vt)}static createVec4f64(){return new h(c.vt)}static createMat3f64(){return new h(r.vt)}static createMat4f64(){return new h(s.vt)}static createQuatf64(){return new h(o.vt)}get test(){}}h.createVec2f64();const u=h.createVec3f64(),p=h.createVec4f64(),f=(h.createMat3f64(),h.createMat4f64()),d=h.createQuatf64()},62369(e,t,i){i.r(t),i.d(t,{default:()=>N});var n=i(5482),r=i(11254),s=i(49186),o=i(97768),a=i(25728),l=i(17676),c=i(84952),h=i(91429),u=i(54239),p=i(4146),f=i(89186),d=i(18768),m=i(34287),g=i(8303),y=i(10873),v=i(87378),w=i(35982);class x extends w.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(_.forEach((e,t)=>{e===this&&_.delete(t)}),this.destroy())}}const _=new Map;var C=i(34727),M=i(19419),b=(i(44208),i(86211)),A=i(5443),T=i(86738),S=i(16930),R=i(21325),z=i(28735),O=i(91806),P=i(87045);class E{constructor(e){const t=E.checkUnsupported(e);if(null!=t)throw t;const i=e;this.spatialReference=i.spatialReference,this._isWebMercator=this.spatialReference.isWebMercator,this._isGCS=(0,R.EA)(this.spatialReference),this.origin=[i.origin.x,i.origin.y],this.pixelSize=i.size[0],this.dpi=i.dpi;const n=i.lods.reduce((e,t)=>(t.level<e.minLod.level&&(e.minLod=t),e.max=Math.max(e.max,t.level),e),{minLod:i.lods[0],max:-1/0}),r=n.minLod,s=2**r.level;let o=r.resolution*s,a=r.scale*s;this.levels=new Array(n.max+1);for(let e=0;e<this.levels.length;e++)this.levels[e]={resolution:o,scale:a,tileSize:[o*i.size[0],o*i.size[1]]},o/=2,a/=2}clone(){return new E(this.toTileInfo())}toTileInfo(){return new P.A({dpi:this.dpi,origin:new T.A({x:this.origin[0],y:this.origin[1],spatialReference:this.spatialReference}),size:[this.pixelSize,this.pixelSize],spatialReference:this.spatialReference,lods:this.levels.map((e,t)=>new O.A({level:t,scale:e.scale,resolution:e.resolution}))})}getExtent(e,t,i,n){const r=this.levels[e],s=r.tileSize[0],o=r.tileSize[1];n[0]=this.origin[0]+i*s,n[2]=this.origin[0]+(i+1)*s,n[3]=this.origin[1]-t*o,n[1]=this.origin[1]-(t+1)*o}convertExtentToRadians(e,t){this._isWebMercator?(t[0]=(0,z.yw)(e[0]),t[1]=(0,z.jg)(e[1]),t[2]=(0,z.yw)(e[2]),t[3]=(0,z.jg)(e[3])):this._isGCS&&(t[0]=(0,C.kU)(e[0]),t[1]=(0,C.kU)(e[1]),t[2]=(0,C.kU)(e[2]),t[3]=(0,C.kU)(e[3]))}getExtentGeometry(e,t,i,n=new A.A){return this.getExtent(e,t,i,Z),n.spatialReference=this.spatialReference,n.xmin=Z[0],n.ymin=Z[1],n.xmax=Z[2],n.ymax=Z[3],n.zmin=void 0,n.zmax=void 0,n}ensureMaxLod(e){if(null==e)return!1;let t=!1;for(;this.levels.length<=e;){const{resolution:e,scale:i}=this.levels[this.levels.length-1],n=e/2*this.pixelSize;this.levels.push({resolution:e/2,scale:i/2,tileSize:[n,n]}),t=!0}return t}capMaxLod(e){this.levels.length>e+1&&(this.levels.length=e+1)}getMaxLod(){return this.levels.length-1}scaleAtLevel(e){return this.levels[0].scale/2**e}levelAtScale(e){const t=this.levels[0].scale;return e>=t?0:Math.log(t/e)*Math.LOG2E}resolutionAtLevel(e){return this.levels[0].resolution/2**e}compatibleWith(e,t=1/0){if(E.checkUnsupported(e))return!1;const i=new E(e);if(!i.spatialReference.equals(this.spatialReference))return!1;if(i.pixelSize!==this.pixelSize)return!1;const n=Math.min(this.levels.length-1,i.levels.length-1,t),r=this.levels[n].resolution;let s=.5*r;return!(!(0,C.Sp)(i.origin[0],this.origin[0],s)||!(0,C.Sp)(i.origin[1],this.origin[1],s))&&(s=.5*r/2**n/this.pixelSize*12,(0,C.Sp)(r,i.levels[n].resolution,s))}rootTilesInExtent(e,t=null,i=1/0){const n=new Array,r=this.levels[0].tileSize;if(null==e||0===r[0]||0===r[1])return n;E.computeRowColExtent(e,r,this.origin,Z);let s=Z[1],o=Z[3],a=Z[0],l=Z[2];const c=l-a,h=o-s;if(c*h>i){const e=Math.floor(Math.sqrt(i));h>e&&(s=s+Math.floor(.5*h)-Math.floor(.5*e),o=s+e),c>e&&(a=a+Math.floor(.5*c)-Math.floor(.5*e),l=a+e)}for(let e=s;e<o;e++)for(let t=a;t<l;t++)n.push([0,e,t]);return null!=t&&(t[0]=this.origin[0]+a*r[0],t[1]=this.origin[1]-o*r[1],t[2]=this.origin[0]+l*r[0],t[3]=this.origin[1]-s*r[1]),n}static computeRowColExtent(e,t,i,n){const r=.001*(e[2]-e[0]+(e[3]-e[1]));n[0]=Math.max(0,Math.floor((e[0]+r-i[0])/t[0])),n[2]=Math.max(0,Math.ceil((e[2]-r-i[0])/t[0])),n[1]=Math.max(0,Math.floor((i[1]-e[3]+r)/t[1])),n[3]=Math.max(0,Math.ceil((i[1]-e[1]-r)/t[1]))}static isPowerOfTwo(e){const t=e.lods,i=t[0].resolution*2**t[0].level;return!t.some(e=>!(0,C.b6)(e.resolution,i/2**e.level))}static hasGapInLevels(e){const t=e.lods.map(e=>e.level);t.sort((e,t)=>e-t);for(let e=1;e<t.length;e++)if(t[e]!==t[0]+e)return!0;return!1}static tileSizeSupported(e){const t=e.size[1];return t===e.size[0]&&!(t&t-1)&&t>=128&&t<=512}static hasOriginPerLODs(e){const t=e.origin;return e.lods.some(e=>null!=e.origin&&(e.origin[0]!==t.x||e.origin[1]!==t.y))}static getMissingTileInfoError(){return new s.A("tilingscheme:tile-info-missing","Tiling scheme must have tiling information")}static checkUnsupported(e){return null==e?new s.A("tilingscheme:tile-info-missing","Tiling scheme must have tiling information"):e.lods.length<1?new s.A("tilingscheme:generic","Tiling scheme must have at least one level"):E.isPowerOfTwo(e)?E.hasGapInLevels(e)?new s.A("tilingscheme:gaps","Tiling scheme levels must not have gaps between min and max level"):E.tileSizeSupported(e)?E.hasOriginPerLODs(e)?new s.A("tilingscheme:multiple-origin","Tiling scheme levels must not have their own origin"):null:new s.A("tilingscheme:tile-size","Tiles must be square and size must be one of [128, 256, 512]"):new s.A("tilingscheme:power-of-two","Tiling scheme must be power of two")}static fromExtent(e,t){const i=e[2]-e[0],n=e[3]-e[1],r=(0,b.GA)(t),s=1.2*Math.max(i,n),o=s/256,a=o*r*(96/.0254),l=new E(new P.A({size:[256,256],origin:new T.A({x:e[0]-.5*(s-i),y:e[3]+.5*(s-n)}),lods:[new O.A({level:0,resolution:o,scale:a})],spatialReference:t}));return l.ensureMaxLod(20),l}static makeWebMercatorAuxiliarySphere(e){const t=new E(E.WebMercatorAuxiliarySphereTileInfo);return t.ensureMaxLod(e),t}static makeGCSWithTileSize(e,t=256,i=16){const n=256/t,r=new E(new P.A({size:[t,t],origin:new T.A({x:-180,y:90,spatialReference:e}),spatialReference:e,lods:[new O.A({level:0,resolution:.703125*n,scale:295497598.570834*n})]}));return r.ensureMaxLod(i),r}static{this.WebMercatorAuxiliarySphereTileInfo=new P.A({size:[256,256],origin:new T.A({x:-20037508.342787,y:20037508.342787,spatialReference:S.A.WebMercator}),spatialReference:S.A.WebMercator,lods:[new O.A({level:0,resolution:156543.03392800014,scale:591657527.591555})]})}static{this.WebMercatorAuxiliarySphere=E.makeWebMercatorAuxiliarySphere(19)}get test(){}}const Z=(0,M.vt)(),I=(0,C.$8)(C.pq/10),D=(0,M.vt)();E.WebMercatorAuxiliarySphere.getExtent(0,0,0,D),(0,M.vt)([-180,-90,180,90]);var L=i(36005);let j=class extends((0,f.f)((0,d.b)((0,m.q)((0,g.A)((0,a.M)(p.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=_.get(e);return t||(null!=e?(t=new x(t=>e.immediate.schedule(t)),_.set(e,t)):(t=new x,_.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new s.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}fetchTile(e,t,i,n){const s=n?.signal,o={responseType:"array-buffer",signal:s},a={noDataValue:n?.noDataValue,returnFileInfo:!0};return this.load().then(()=>this._fetchTileAvailability(e,t,i,n)).then(()=>(0,r.A)(this.getTileUrl(e,t,i),o)).then(e=>this._lercDecoder.decode(e.data,a,s)).then(e=>new v.A(e?new v.A({values:e.pixelData,width:e.width,height:e.height,noDataValue:e.noDataValue}):{values:[],width:0,height:0,noDataValue:n?.noDataValue??I}))}getTileUrl(e,t,i){const n=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,r=(0,c.x0)({...this.parsedUrl.query,blankTile:!n&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${r?"?"+r:""}`}async queryElevation(e,t){const{query:n}=await i.e(91).then(i.bind(i,90091));return(0,l.Te)(t),n(this,e,t)}async createElevationSampler(e,t){const{createSampler:n}=await i.e(91).then(i.bind(i,90091));return(0,l.Te)(t),n(this,e,t)}_fetchTileAvailability(e,t,i,n){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,n):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,r.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[V]}};(0,n.Cg)([(0,h.MZ)({readOnly:!0})],j.prototype,"capabilities",void 0),(0,n.Cg)([(0,L.w)("service","capabilities",["capabilities"])],j.prototype,"readCapabilities",null),(0,n.Cg)([(0,h.MZ)({json:{read:{source:"copyrightText"}}})],j.prototype,"copyright",void 0),(0,n.Cg)([(0,h.MZ)({readOnly:!0,type:u.A})],j.prototype,"heightModelInfo",void 0),(0,n.Cg)([(0,h.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],j.prototype,"path",void 0),(0,n.Cg)([(0,h.MZ)({type:["show","hide"]})],j.prototype,"listMode",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],j.prototype,"minScale",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],j.prototype,"maxScale",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],j.prototype,"opacity",void 0),(0,n.Cg)([(0,h.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],j.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,h.MZ)()],j.prototype,"sourceJSON",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],j.prototype,"type",void 0),(0,n.Cg)([(0,h.MZ)(y.OZ)],j.prototype,"url",void 0),(0,n.Cg)([(0,h.MZ)()],j.prototype,"version",void 0),(0,n.Cg)([(0,L.w)("version",["currentVersion"])],j.prototype,"readVersion",null),j=(0,n.Cg)([(0,h.$K)("esri.layers.ElevationLayer")],j);const V=Symbol("default-fetch-tile");j.prototype.fetchTile[V]=!0;const N=j},4146(e,t,i){i.d(t,{A:()=>v});var n=i(5482),r=i(11254),s=i(49186),o=i(65529),a=i(4902),l=i(92474),c=i(53966),h=i(17676),u=i(84952),p=i(91429),f=i(5443),d=i(16930),m=i(92602),g=i(79677);let y=0,v=class extends((0,o.Zt)((0,a.s)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,d.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+y++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=d.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([i.e(812),i.e(7982)]).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:n}=await Promise.all([i.e(812),i.e(5613),i.e(909)]).then(i.bind(i,45613));try{return await n(t)}catch(e){const i=t?.portalItem,n=i?.id||"unset",r=i?.portal?.url||m.A.portalUrl;throw c.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+r+"', id: '"+n+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,h.zf)(e)||c.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,u.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,r.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,n.Cg)([(0,p.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,n.Cg)([(0,p.MZ)({type:f.A})],v.prototype,"fullExtent",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,n.Cg)([(0,p.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,n.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,n.Cg)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,n.Cg)([(0,p.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,n.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,n.Cg)([(0,p.MZ)({type:d.A})],v.prototype,"spatialReference",void 0),(0,n.Cg)([(0,p.MZ)({type:String})],v.prototype,"title",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,n.Cg)([(0,p.MZ)()],v.prototype,"url",void 0),(0,n.Cg)([(0,p.MZ)({type:g.A})],v.prototype,"visibilityTimeExtent",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,n.Cg)([(0,p.$K)("esri.layers.Layer")],v)},92722(e,t,i){i.d(t,{A:()=>r});var n=i(69397);class r{constructor(e=[],t=[],i=!1,n=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=i,this.hasM=n}static fromJSON({lengths:e,coords:t,hasZ:i,hasM:n}){return new r(e,t,i||!1,n||!1)}static fromRect([e,t,i,n]){const s=i-e,o=n-t;return new r([5],[e,t,s,0,0,o,-s,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const i of this.lengths){if(i<3)continue;const{stride:n}=this;let r=this.coords[n*t],s=this.coords[n*t+1];for(let o=1;o<i;o+=1){const i=n*(t+o),a=this.coords[i],l=this.coords[i+1];e+=-.5*(a-r)*(l+s),r=a,s=l}t+=i}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:i}=this;for(const n of this.lengths){for(let r=0;r<n;r++){const n=i*(t+r);e(this.coords[n],this.coords[n+1])}t+=n}}deltaDecode(){const e=this.clone(),{coords:t,lengths:i}=e;let n=0;const{stride:r}=this;for(const e of i){for(let i=1;i<e;i++){const e=r*(n+i);t[e]+=t[e-r],t[e+1]+=t[e+1-r]}n+=e}return e}clone(e){if(this.isPoint)return new r([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const t=Array.from(this.lengths),{stride:i,size:n}=this,s=this.coords.slice(0,n*i);return e?(e.set(s),new r(t,e,this.hasZ,this.hasM)):new r(t,Array.from(s),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const i=new Array(t*e);for(let t=0,n=0;t<i.length;t+=e)i[n++]=this.coords[t],i[n++]=this.coords[t+1];return new r(this.lengths,i,!1,!1)}}},89186(e,t,i){i.d(t,{f:()=>h});var n=i(5482),r=i(91429),s=i(16930),o=i(87045),a=i(65509),l=i(25943),c=i(36005);const h=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){const n=t.capabilities?.toLowerCase().includes("tilemap");let{minLOD:r,maxLOD:s,minScale:c,maxScale:h}=t;if(null==r&&null==s&&(0!==c||0!==h)){const e=e=>Math.round(1e4*e)/1e4;c=e(c||t.tileInfo.lods[0].scale),h=e(h||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);r=t>=c?i.level:r,s=t>=h?i.level:s}}if(n)return new l.d({layer:this,minLOD:r,maxLOD:s});if(t.tileInfo){const e=new o.A;return e.read(t.tileInfo,i),new a.A(e,r,s)}return null}};return(0,n.Cg)([(0,r.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,n.Cg)([(0,r.MZ)()],i.prototype,"minScale",void 0),(0,n.Cg)([(0,c.w)("service","minScale")],i.prototype,"readMinScale",null),(0,n.Cg)([(0,r.MZ)()],i.prototype,"maxScale",void 0),(0,n.Cg)([(0,c.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,n.Cg)([(0,r.MZ)({type:s.A})],i.prototype,"spatialReference",void 0),(0,n.Cg)([(0,r.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,n.Cg)([(0,r.MZ)({type:o.A})],i.prototype,"tileInfo",void 0),(0,n.Cg)([(0,r.MZ)()],i.prototype,"tilemapCache",void 0),(0,n.Cg)([(0,c.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,n.Cg)([(0,r.MZ)()],i.prototype,"version",void 0),i=(0,n.Cg)([(0,r.$K)("esri.layers.mixins.ArcGISCachedService")],i),i}},63490(e,t,i){i.d(t,{E1:()=>c,Mr:()=>l,TH:()=>a});var n=i(5482),r=i(69540),s=i(25482),o=i(91429);let a=class extends((0,r.OU)(s.o)){constructor(){super(...arguments),this.url=null}};(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],a.prototype,"lod",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"rasterFunction",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"url",void 0),a=(0,n.Cg)([(0,o.$K)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ElevationSource")],a);let l=class extends((0,r.OU)(s.o)){constructor(e){super(e),this.constantElevation=null}};(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"constantElevation",void 0),l=(0,n.Cg)([(0,o.$K)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ConstantElevation")],l);const c=e=>null!=e&&"number"==typeof e.constantElevation},23281(e,t,i){i.d(t,{eR:()=>C,Qv:()=>z,fs:()=>A,Yp:()=>O,o:()=>E,RR:()=>M,l6:()=>b});var n=i(66552),r=(i(86211),i(28735),i(5482)),s=i(69540),o=i(25482),a=i(91429),l=i(69622),c=i(21325);let h=class extends l.A{set horizontalWKID(e){e?(0,c.fn)({wkid:+e})?this._set("horizontalWKID",+e):this._set("horizontalWKID",e):this._set("horizontalWKID",null)}set verticalWKID(e){e?this._set("verticalWKID",isFinite(e)&&(0,c.fn)({wkid:+e})?+e:null):this._set("verticalWKID",null)}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:i,radialDistortionCoefficients:n,tangentialDistortionCoefficients:r}=this;return e?.length>1&&!Number.isNaN(t)&&i?.length>1&&n?.length>1&&r?.length>1}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"affineTransformations",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"focalLength",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"principalOffsetPoint",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"radialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"tangentialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"horizontalWKID",null),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"verticalWKID",null),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"x",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"y",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"z",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"type",void 0),h=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientation")],h);const u=h;let p=class extends((0,s.OU)((0,o.T)(u))){constructor(){super(...arguments),this.type=1}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,heading:o,pitch:a,roll:l,affineTransformations:c,focalLength:h,principalOffsetPoint:u,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,i,n,r,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(h),u?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>Number.isNaN(e)?"":e).join("|")}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"affineTransformations",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"focalLength",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"principalOffsetPoint",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"radialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"tangentialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"heading",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"pitch",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"roll",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"x",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"y",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"z",void 0),p=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationHPR")],p);const f=p;let d=class extends((0,s.OU)((0,o.T)(u))){constructor(){super(...arguments),this.type=4}toString(){const{type:e,latitude:t,longitude:i,ellipsoidRadius:n,squaredEccentricity:r,properties:s}=this,o=`${s}`.split("|");return o.splice(1,1),`${e}|${t}|${i}|${n}|${r}|${o.join("|")}`}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"latitude",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"longitude",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"ellipsoidRadius",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"squaredEccentricity",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"properties",void 0),d=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationLTP")],d);const m=d;let g=class extends((0,s.OU)((0,o.T)(u))){constructor(){super(...arguments),this.type=2}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,omega:o,phi:a,kappa:l,affineTransformations:c,focalLength:h,principalOffsetPoint:u,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,i,n,r,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(h),u?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>isNaN(e)?"":e).join("|")}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],g.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"affineTransformations",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"focalLength",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"principalOffsetPoint",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"radialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"tangentialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"omega",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"phi",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"kappa",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"x",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"y",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"z",void 0),g=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationOPK")],g);const y=g;let v=class extends((0,s.OU)((0,o.T)(u))){constructor(){super(...arguments),this.type=3}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:i,radialDistortionCoefficients:n,tangentialDistortionCoefficients:r}=this;return e?.length>1||!Number.isNaN(t)||i?.length>1||n?.length>1||r?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,yaw:o,pitch:a,roll:l,affineTransformations:c,focalLength:h,principalOffsetPoint:u,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,i,n,r,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(h),u?.forEach(e=>d.push(e)),u?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>Number.isNaN(e)?"":e).join("|")}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],v.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"affineTransformations",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"focalLength",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"principalOffsetPoint",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"radialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"tangentialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"yaw",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"pitch",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"roll",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"x",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"y",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"z",void 0),v=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationYPR")],v);const w=v,x=new Map;x.set("2",{desc:"Using Omega Phi Kappa",constructor:y}),x.set("1",{desc:"Using Heading, Pitch and Roll",constructor:f}),x.set("3",{desc:"Using Yaw, Pitch and Roll",constructor:w}),x.set("4",{desc:"Using Local Tangent Plane",constructor:m});var _=i(63490);function C(e,t,i){return e?(0,_.E1)(e)?new _.Mr(e):function(e,t,i){let{url:n}=e;return n?(n=function(e,t,i){return t&&(e=`${t}${e}`),i&&(e+=`${i}`),e}(n,t,i),new _.TH({...e,url:n})):null}(e,t,i):e}const M=new n.J({Minutes:"minutes",Hours:"hours",Days:"days",Weeks:"weeks",Months:"months",Years:"years"}),b=new n.J({Feet:"feet",Meter:"meter"}),A=new n.J({360:"360",Horizontal:"horizontal",Inspection:"inspection",Nadir:"nadir",Oblique:"oblique",Terrestrial360Video:"terrestrial-360-video",TerrestrialFrameVideo:"terrestrial-frame-video",Aerial360Video:"aerial-360-video",AerialFrameVideo:"aerial-frame-video","":null}),T=new Map;T.set("1",function(e){const[t,i,n,r,s,o,a,l,c,h,u,p,f,d,m,g,y,v,w,x,_,C]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,heading:o,pitch:a,roll:l,...R([c,h,u,p,f,d],[g,y],[v,w,x],[_,C],m)}}),T.set("3",function(e){const[t,i,n,r,s,o,a,l,c,h,u,p,f,d,m,g,y,v,w,x,_,C]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,yaw:o,pitch:a,roll:l,...R([c,h,u,p,f,d],[g,y],[v,w,x],[_,C],m)}}),T.set("2",function(e){const[t,i,n,r,s,o,a,l,c,h,u,p,f,d,m,g,y,v,w,x,_,C]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,omega:o,phi:a,kappa:l,...R([c,h,u,p,f,d],[g,y],[v,w,x],[_,C],m)}}),T.set("4",function(e){const[t,i,n,r,s,...o]=e.slice(1),a=T.get(s),l=x.get(s)?.constructor;return a&&l?{latitude:t,longitude:i,ellipsoidRadius:n,squaredEccentricity:r,properties:new l(a([s,"",...o]))}:null});const S=e=>{const t=e.map(e=>parseFloat(e)).filter(e=>!isNaN(e));if(t.length===e.length)return t};function R(e,t,i,n,r){const s=S(e),o=S(t),a=S(i),l=S(n);return{affineTransformations:6===s?.length?s:void 0,focalLength:6===s?.length?parseFloat(r):void 0,principalOffsetPoint:2!==o?.length?[0,0]:o,radialDistortionCoefficients:3!==a?.length?[0,0,0]:a,tangentialDistortionCoefficients:2!==l?.length?[0,0]:l}}function z(e){return Array.isArray(e)&&e?.length>5&&!e.some(isNaN)}function O(e){for(e=e.slice(0,8);e.length<8;)e.push(0);return e}const P="sequenceorder";function E(e,t){if(!e){const e=t.find(e=>e.name.toLocaleLowerCase()===P.toLocaleLowerCase());return e?[{fieldName:e.name,sortOrder:"asc"}]:null}return e.split(";").map(e=>{const[i,n]=e.split(/\s+/).map(e=>e.trim()),r=t.find(e=>e.name.toLowerCase()===i.toLowerCase());return r?{fieldName:r?r.name:P,sortOrder:"desc"===n?"desc":"asc"}:null}).filter(e=>null!=e)}},90091(e,t,i){i.d(t,{createSampler:()=>z,query:()=>R});var n=i(60999),r=i(49186),s=i(97768),o=i(17676),a=i(86211),l=i(91218),c=i(19419),h=i(4576),u=i(72802);class p{constructor(e,t){this.layer=e,this.parameters=t}}class f extends p{constructor(e,t,i){super(e,i),this.outSpatialReference=t,this.type="geometry"}selectTilesAtLOD(e){if(e<0)this.geometry.coordinates.forEach(e=>e.tile=null);else{const{tileInfo:t,tilemapCache:i}=this.layer,n=g(t,i)[e].level;this.geometry.coordinates.forEach(e=>e.tile=t.tileAt(n,e.x,e.y))}}allElevationTilesFetched(){return!this.geometry.coordinates.some(e=>!e.elevationTile)}clearElevationTiles(){for(const e of this.geometry.coordinates)e.elevationTile!==this.outsideExtentTile&&(e.elevationTile=null)}populateElevationTiles(e){for(const t of this.geometry.coordinates)!t.elevationTile&&t.tile?.id&&(t.elevationTile=e[t.tile.id])}remapTiles(e){for(const t of this.geometry.coordinates){const i=t.tile?.id;t.tile=i?e[i]:null}}getTilesToFetch(){return(0,h.Am)(this.geometry.coordinates.filter(({tile:e,elevationTile:t})=>e?.id&&!t),(e,t)=>e.tile?.id===t.tile?.id).map(({tile:e})=>e)}forEachTileToFetch(e){for(const t of this.geometry.coordinates)t.tile&&!t.elevationTile&&e(t.tile,()=>t.tile=null)}}class d extends p{constructor(e,t,i,n){super(e,i),this.maskExtents=n,this.type="extent",this.elevationTiles=[],this._candidateTiles=[],this._fetchedCandidates=new Set,this.extent=t.clone().intersection(e.fullExtent)}selectTilesAtLOD(e,t){const i=this._maximumLodForRequests(t),n=Math.min(i,e);n<0?this._candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(n)}_maximumLodForRequests(e){const{tileInfo:t,tilemapCache:i}=this.layer,n=g(t,i);if(!e)return n.length-1;const r=this.extent;if(null==r)return-1;for(let i=n.length-1;i>=0;i--){const s=n[i],o=s.resolution*t.size[0],a=s.resolution*t.size[1];if(Math.ceil(r.width/o)*Math.ceil(r.height/a)<=e)return i}return-1}allElevationTilesFetched(){return this._candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this._fetchedCandidates.clear()}populateElevationTiles(e){for(const t of this._candidateTiles){const i=t.id&&e[t.id];i&&(this._fetchedCandidates.add(t),this.elevationTiles.push(i))}}remapTiles(e){this._candidateTiles=y(this._candidateTiles.map(t=>e[t.id]))}getTilesToFetch(){return this._candidateTiles}forEachTileToFetch(e,t){const i=this._candidateTiles;this._candidateTiles=[],i.forEach(i=>{if(this._fetchedCandidates.has(i))return void t?.(i);let n=!1;e(i,()=>n=!0),n?t?.(i):this._candidateTiles.push(i)}),this._candidateTiles=y(this._candidateTiles,t)}_selectCandidateTilesCoveringExtentAt(e){this._candidateTiles.length=0;const t=this.extent;if(null==t)return;const{tileInfo:i,tilemapCache:n}=this.layer,r=g(i,n)[e],s=i.tileAt(r.level,t.xmin,t.ymin),o=s.extent,a=r.resolution*i.size[0],l=r.resolution*i.size[1],c=Math.ceil((t.xmax-o[0])/a),h=Math.ceil((t.ymax-o[1])/l);for(let e=0;e<h;e++)for(let t=0;t<c;t++){const n=new u.U(s.level,s.row-e,s.col+t);i.updateTileInfo(n),this._tileIsMasked(n)||this._candidateTiles.push(n)}}_tileIsMasked(e){return this.maskExtents?.some(t=>(0,c.gR)(t,e.extent))??!1}}function m(e){return null!=e?.tileInfo}function g(e,t){const i=e.lods;if(m(t)){const{effectiveMinLOD:e,effectiveMaxLOD:n}=t;return i.filter(t=>t.level>=e&&t.level<=n)}return i}function y(e,t){const i={},n=[];for(const r of e){const e=r.id;e&&!i[e]?(i[e]=r,n.push(r)):t?.(r)}const r=n.sort((e,t)=>e.level-t.level);return r.filter((e,i)=>{for(let n=0;n<i;n++){const i=r[n].extent;if(i&&(0,c.gR)(i,e.extent))return t?.(e),!1}return!0})}class v{constructor(e,t){this.data=e,this.safeWidth=.99999999*(e.width-1),this.dx=(e.width-1)/(t[2]-t[0]),this.dy=(e.width-1)/(t[3]-t[1]),this.x0=t[0],this.y1=t[3]}}class w{constructor(e,t=null){if(this.key=e,null!=t){const i=e.extent;this._samplerData=new v(t,i)}}get zmin(){return null!=this._samplerData?this._samplerData.data.minValue:0}get zmax(){return null!=this._samplerData?this._samplerData.data.maxValue:0}get hasNoDataValues(){return!!this._samplerData?.data.hasNoDataValues}sample(e,t){if(null==this._samplerData)return;const{safeWidth:i,data:n,dx:r,dy:s,y1:o,x0:a}=this._samplerData,{width:l,values:c,noDataValue:h}=n,u=x(s*(o-t),0,i),p=x(r*(e-a),0,i),f=Math.floor(u),d=Math.floor(p),m=f*l+d,g=m+l,y=c[m],v=c[g],w=c[m+1],_=c[g+1];if(y!==h&&v!==h&&w!==h&&_!==h){const e=p-d,t=y+(w-y)*e;return t+(v+(_-v)*e-t)*(u-f)}}}function x(e,t,i){return e<t?t:e>i?i:e}var _=i(87378),C=i(48526),M=i(86738),b=i(82799);class A{constructor(e){this.geometry=e,this.spatialReference=e.spatialReference}export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){const t=new A(this.geometry);return t.spatialReference=this.spatialReference,t.coordinates=e??this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await(0,l.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});const i=new C.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),n=(0,l.project)(i,e);if(!n)return null;const r=this.coordinates.map((e,t)=>{const i=e.clone(),r=n.points[t];return i.x=r[0],i.y=r[1],i}),s=this.clone(r);return s.spatialReference=e,s}projectSync(e){if(this.spatialReference.equals(e))return this.clone();const t=new C.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),i=(0,l.project)(t,e);if(!i)return null;const n=this.coordinates.map((e,t)=>{const n=e.clone(),r=i.points[t];return n.x=r[0],n.y=r[1],n}),r=this.clone(n);return r.spatialReference=e,r}static fromGeometry(e){const t=new A(e);if(e instanceof A)return t.coordinates=e.coordinates.map(e=>e.clone()),t._exporter=(t,i)=>{const n=e.clone(t);return n.spatialReference=i,n},t;switch(e.type){case"point":{const i=e,{hasZ:n,hasM:r}=i;return t.coordinates=n&&r?[new T(i.x,i.y,i.z,i.m)]:n?[new T(i.x,i.y,i.z)]:r?[new T(i.x,i.y,null,i.m)]:[new T(i.x,i.y)],t._exporter=(t,i)=>e.hasM?new M.A(t[0].x,t[0].y,t[0].z,t[0].m,i):new M.A(t[0].x,t[0].y,t[0].z,i),t}case"multipoint":{const i=e,{hasZ:n,hasM:r}=i;return t.coordinates=n&&r?i.points.map(e=>new T(e[0],e[1],e[2],e[3])):n?i.points.map(e=>new T(e[0],e[1],e[2])):r?i.points.map(e=>new T(e[0],e[1],null,e[2])):i.points.map(e=>new T(e[0],e[1])),t._exporter=(t,i)=>e.hasM?new C.A({points:t.map(e=>[e.x,e.y,e.z??0,e.m??0]),hasZ:!0,hasM:!0,spatialReference:i}):new C.A({points:t.map(e=>[e.x,e.y,e.z??0]),spatialReference:i}),t}case"polyline":{const i=e,n=[],r=[],{hasZ:s,hasM:o}=e;let a=0;for(const e of i.paths)if(r.push([a,a+e.length]),a+=e.length,s&&o)for(const t of e)n.push(new T(t[0],t[1],t[2],t[3]));else if(s)for(const t of e)n.push(new T(t[0],t[1],t[2]));else if(o)for(const t of e)n.push(new T(t[0],t[1],null,t[2]));else for(const t of e)n.push(new T(t[0],t[1]));return t.coordinates=n,t._exporter=(t,i)=>{const n=e.hasM?t.map(e=>[e.x,e.y,e.z??0,e.m??0]):t.map(e=>[e.x,e.y,e.z??0]),s=r.map(e=>n.slice(e[0],e[1]));return new b.A({paths:s,hasM:e.hasM,hasZ:!0,spatialReference:i})},t}}}}class T{constructor(e,t,i=null,n=null,r=null,s=null){this.x=e,this.y=t,this.z=i,this.m=n,this.tile=r,this.elevationTile=s}clone(){return new T(this.x,this.y,this.z,this.m)}}var S=i(1555);async function R(e,t,i){if(!e)throw new r.A(V,"Elevation queries require an elevation layer to fetch tiles from");if(!t||!(t instanceof A)&&"point"!==t.type&&"multipoint"!==t.type&&"polyline"!==t.type)throw new r.A("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const n={...L,...i},o=n.signal;if("integrated-mesh-3dtiles"===e.type){const r=A.fromGeometry(t);if(e.queryElevationCallback&&e.replacesTerrain){const s=12.9*(i?.minDemResolution||0)+.71,a=await e.queryElevationCallback(r,{signal:o,maxGeometricError:s}),l=r.coordinates.map(()=>({demResolution:1,source:e})),c=await a.project(t.spatialReference,o);if(c){if(void 0!==n.noDataValue&&n.noDataValue!==Number.MAX_VALUE)for(const e of c.coordinates)e.z===Number.MAX_VALUE&&(e.z=n.noDataValue);return{geometry:c.export(),noDataValue:n.noDataValue??Number.MAX_VALUE,sampleInfo:l}}}const s=r.coordinates.map(()=>({demResolution:-1,source:e}));return{geometry:r.export(),noDataValue:Number.MAX_VALUE,sampleInfo:s}}const c=new f(e,t.spatialReference,n);return await e.load({signal:o}),await async function(e,t,i){let n;const s=e.layer.tileInfo.spatialReference;if(t instanceof A?n=await t.project(s,i):(await(0,l.initializeProjection)([{source:t.spatialReference,dest:s}],{signal:i}),n=(0,l.project)(t,s)),!n)throw new r.A("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${t.spatialReference.wkid}' on an elevation service in '${s.wkid}'`);e.geometry=A.fromGeometry(n)}(c,t,o),await E(c,o),await j(c,o),function(e){e.geometry.coordinates.forEach(t=>{const i=t.elevationTile;let n=e.parameters.noDataValue;if(i){const e=i.sample(t.x,t.y);null==e?t.elevationTile=null:n=e}t.z=n})}(c),async function(e,t){const i=await e.geometry.project(e.outSpatialReference,t);(0,s.Lw)(i);const n={geometry:i.export(),noDataValue:e.parameters.noDataValue};return e.parameters.returnSampleInfo&&(n.sampleInfo=function(e){const t=e.layer.tileInfo,i=(0,a.GA)(t.spatialReference);return e.geometry.coordinates.map(n=>{let r=-1;return n.elevationTile&&n.elevationTile!==e.outsideExtentTile&&(r=t.lodAt(n.elevationTile.key.level).resolution*i),{demResolution:r,source:-1===r?void 0:e.layer}})}(e)),e.geometry.coordinates.forEach(e=>{e.tile=null,e.elevationTile=null}),n}(c,o)}async function z(e,t,i){if(e=Array.isArray(e)?e:[e],0===(e=i?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new r.A(V,"Elevation queries require at least one elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new r.A("elevation-query:invalid-extent","Invalid or undefined extent");const n={...L,...i,returnSampleInfo:!0},s=O(e[e.length-1],t,n);return 1===e.length?s:P(e,t,await s,n)}async function O(e,t,i,n){const r=i.signal;await e.load({signal:r});const s=t.spatialReference,o=e.tileInfo.spatialReference;s.equals(o)||(await(0,l.initializeProjection)([{source:s,dest:o}],{signal:r}),t=(0,l.project)(t,o));const a=new d(e,t,i,n);await E(a,r),await j(a,r);const c=a.elevationTiles,h=a.layer.tileInfo,u=a.parameters.noDataValue;return new S.C({noDataValue:u,tiles:c,tileInfo:h})}async function P(e,t,i,n){if(e.pop(),!e.length)return i;const r=i.samplers.filter(e=>!e.tile.hasNoDataValues).map(e=>(0,c.VY)(e.extent)),s=await O(e[e.length-1],t,n,r);if(0===s.samplers.length)return i;const o=i.samplers.concat(s.samplers),a=n.noDataValue;return P(e,t,new S.C({samplers:o,noDataValue:a}),n)}async function E(e,t){"geometry"===e.type&&function(e){if(null==e.layer.fullExtent)return;const t=new w(new u.U(-1,-1,-1));t.sample=()=>e.parameters.noDataValue,e.outsideExtentTile=t;const i=e.layer.fullExtent;e.geometry.coordinates.forEach(e=>{const n=e.x,r=e.y;(n<i.xmin||n>i.xmax||r<i.ymin||r>i.ymax)&&(e.elevationTile=t)})}(e);const i=e.parameters.demResolution;if("number"==typeof i)!function(e,t){const i=function(e,t){const{tileInfo:i,tilemapCache:n}=e.layer,r=t/(0,a.GA)(i.spatialReference),s=g(i,n);let o=s[0],l=0;for(let e=1;e<s.length;e++){const t=s[e];Math.abs(t.resolution-r)<Math.abs(o.resolution-r)&&(o=t,l=e)}return l}(e,t);e.selectTilesAtLOD(i)}(e,i);else if("finest-contiguous"===i)await async function(e,t){const{tileInfo:i,tilemapCache:n}=e.layer,r=D(i,n,e.parameters.minDemResolution);await Z(e,r,t)}(e,t);else{if("auto"!==i)throw new r.A("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${i}', expected a number, "finest-contiguous" or "auto"`);await async function(e,t){(function(e){const{tileInfo:t,tilemapCache:i}=e.layer,n=D(t,i,e.parameters.minDemResolution);e.selectTilesAtLOD(n,e.parameters.maximumAutoTileRequests)})(e),function(e){const t=e.layer.tileInfo;let i=0;const n={},r=e=>{null!=e.id&&(e.id in n?n[e.id]++:(n[e.id]=1,i++))},s=e=>{if(null==e.id)return;const t=n[e.id];1===t?(delete n[e.id],i--):n[e.id]=t-1};e.forEachTileToFetch(r,s);let o=!0;for(;o&&(o=!1,e.forEachTileToFetch(n=>{i<=e.parameters.maximumAutoTileRequests||(s(n),t.upsampleTile(n)&&(o=!0),r(n))},s),o););}(e);const i=e.layer.tilemapCache;if(!i||m(i))return I(e,t);const r=e.getTilesToFetch(),s={},a=r.map(async e=>{const r=new u.U(0,0,0),a=await(0,n.Ke)(i.fetchAvailabilityUpsample(e.level,e.row,e.col,r,{signal:t}));!1!==a.ok?null!=e.id&&(s[e.id]=r):(0,o.QP)(a.error)});await(0,o.qr)(Promise.all(a),t),e.remapTiles(s)}(e,t)}}async function Z(e,t,i){const n=e.layer;if(e.selectTilesAtLOD(t),t<0)return;const s=n.tilemapCache,a=e.getTilesToFetch();try{if(s&&!m(s))await(0,o.qr)(Promise.all(a.map(e=>s.fetchAvailability(e.level,e.row,e.col,{signal:i}))),i);else if(await j(e,i),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new r.A("elevation-query:has-unavailable-tiles","Some elevation tiles are unavailable")}catch(n){(0,o.QP)(n),await Z(e,t-1,i)}}async function I(e,t){const i=e.layer.tileInfo;await j(e,t);let n=!1;e.forEachTileToFetch((e,t)=>{i.upsampleTile(e)?n=!0:t()}),n&&await I(e,t)}function D(e,t,i=0){const n=g(e,t);let r=n.length-1;if(i>0){const t=i/(0,a.GA)(e.spatialReference),s=n.findIndex(e=>e.resolution<t);0===s?r=0:s>0&&(r=s-1)}return r}const L={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0,signal:null};async function j(e,t){const i=e.getTilesToFetch(),n={},r=e.parameters.cache,s=e.parameters.noDataValue,a={noDataValue:s,signal:t},l=i.map(async t=>{if(null==t.id)return;const i=`${e.layer.uid}:${t.id}:${s}`,o=r?.get(i),l=o??_.A.from(await e.layer.fetchTile(t.level,t.row,t.col,a));r?.put(i,l),n[t.id]=new w(t,l)});await(0,o.qr)(Promise.allSettled(l),t),e.populateElevationTiles(n)}const V="elevation-query:invalid-layer"},87378(e,t,i){i.d(t,{A:()=>a});var n,r=i(34275),s=i(56507);const o=Symbol("ElevationTileDataClass");class a{static{n=o}constructor({values:e,width:t,height:i,noDataValue:s}){this[n]=!0,this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,this.values=(0,r.vZ)(e)?e:new Float32Array(e),this.width=t,this.height=i,this.noDataValue=s}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,n=-1/0,r=!0;for(const s of t)s===e?this._hasNoDataValues=!0:(i=s<i?s:i,n=s>n?s:n,r=!1);r?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=n>-3e38?n:0)}static{this.from=(0,s.qf)(a)}}},91806(e,t,i){i.d(t,{A:()=>l});var n,r=i(5482),s=i(25482),o=i(91429),a=i(56507);let l=class extends s.o{static{n=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new n({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"cols",void 0),(0,r.Cg)([(0,o.MZ)({type:a.jz,json:{write:!0}})],l.prototype,"level",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],l.prototype,"levelValue",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"origin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"resolution",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"rows",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"scale",void 0),l=n=(0,r.Cg)([(0,o.$K)("esri.layers.support.LOD")],l)},1555(e,t,i){i.d(t,{C:()=>d});var n=i(5482),r=i(53966),s=i(86211),o=i(91429),a=i(16930),l=i(19419),c=i(65529),h=i(86738),u=i(28735);let p=class extends c.nJ{queryElevation(e){const t=this.projectIfRequired(e,this.spatialReference);if(!t)return null;switch(e.type){case"point":return function(e,t,i){return e.hasZ=!0,e.z=i.elevationAt(t.x,t.y),e}(e,t,this);case"polyline":return function(e,t,i){f.spatialReference=t.spatialReference;const n=e.hasM&&!e.hasZ;for(let r=0;r<e.paths.length;r++){const s=e.paths[r],o=t.paths[r];for(let e=0;e<s.length;e++){const t=s[e],r=o[e];f.x=r[0],f.y=r[1],n&&(t[3]=t[2]),t[2]=i.elevationAt(f.x,f.y)}}return e.hasZ=!0,e}(e,t,this);case"multipoint":return function(e,t,i){f.spatialReference=t.spatialReference;const n=e.hasM&&!e.hasZ;for(let r=0;r<e.points.length;r++){const s=e.points[r],o=t.points[r];f.x=o[0],f.y=o[1],n&&(s[3]=s[2]),s[2]=i.elevationAt(f.x,f.y)}return e.hasZ=!0,e}(e,t,this);default:return null}}projectIfRequired(e,t){if(null==e)return null;const i=e.spatialReference;if(i.equals(t))return e;const n=(0,u.Cv)(e,t);return n||r.A.getLogger(this).error(`Cannot project geometry spatial reference (wkid:${i.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),n}};p=(0,n.Cg)([(0,o.$K)("esri.layers.support.ElevationSampler")],p);const f=new h.A;let d=class extends p{get spatialReference(){return this.extent.spatialReference}constructor(e){const t=e.noDataValue,i="tiles"in e?e.tiles.map(i=>new m({tile:i,tileInfo:e.tileInfo,noDataValue:t})):e.samplers;super({noDataValue:t,samplers:i});const n=i[0];if(n){this.extent=n.extent.clone();const{min:e,max:t}=n.demResolution;this.demResolution={min:e,max:t};for(let e=1;e<i.length;e++){const t=i[e];this.extent.union(t.extent),this.demResolution.min=Math.min(this.demResolution.min,t.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,t.demResolution.max)}}else{const t="tileInfo"in e?e.tileInfo:null;this.extent=(0,l.w1)((0,l.vt)(),t?.spatialReference??a.A.WGS84),this.demResolution={min:0,max:0}}}elevationAt(e,t){let i;for(const n of this.samplers)if(n.containsAt(e,t)&&(i=n.elevationAt(e,t),i!==n.noDataValue))return i;return null!=i?i:(r.A.getLogger(this).warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler`),this.noDataValue)}};(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],d.prototype,"noDataValue",void 0),(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],d.prototype,"samplers",void 0),d=(0,n.Cg)([(0,o.$K)("esri.layers.support.TileElevationSampler")],d);let m=class extends p{get spatialReference(){return this.extent.spatialReference}constructor(e){super(e);const t=e.tile.key.extent;this.extent=(0,l.w1)(t,e.tileInfo.spatialReference),this.extent.zmin=e.tile.zmin,this.extent.zmax=e.tile.zmax;const i=(0,s.GA)(e.tileInfo.spatialReference),n=e.tileInfo.lodAt(e.tile.key.level).resolution*i;this.demResolution={min:n,max:n}}contains(e){const t=this.projectIfRequired(e,this.spatialReference);return null!=t&&this.containsAt(t.x,t.y)}containsAt(e,t){return(0,l.Rj)(this.tile.key.extent,e,t)}elevationAt(e,t){return this.containsAt(e,t)?this.tile.sample(e,t)??this.noDataValue:this.noDataValue}};(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"tile",void 0),(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"noDataValue",void 0),(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"tileInfo",void 0),m=(0,n.Cg)([(0,o.$K)("esri.layers.support.TileElevationSampler.SingleTileElevationSampler")],m)},87045(e,t,i){i.d(t,{A:()=>w});var n,r=i(5482),s=i(66552),o=i(25482),a=i(86211),l=i(91429),c=i(56507),h=i(86738),u=i(16930),p=i(21325),f=i(28735),d=i(91806),m=i(72802),g=i(36005),y=i(43937);const v=new s.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let w=class extends o.o{static{n=this}static create(e={}){const{resolutionFactor:t=1,scales:i,size:r=256,spatialReference:s=u.A.WebMercator,numLODs:o=24}=e;if(!(0,p.fn)(s)){const e=[];if(i)for(let t=0;t<i.length;t++){const n=i[t];e.push(new d.A({level:t,scale:n,resolution:n}))}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift(new d.A({level:i,scale:t,resolution:t})),t*=2}return new n({dpi:96,lods:e,origin:new h.A(0,0,s),size:[r,r],spatialReference:s})}const l=(0,p.Vp)(s),c=e.origin?new h.A({x:e.origin.x,y:e.origin.y,spatialReference:s}):new h.A(l?{x:l.origin[0],y:l.origin[1],spatialReference:s}:{x:0,y:0,spatialReference:s}),f=1/(39.37*(0,a.GA)(s)*96),m=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],n=t*f;m.push(new d.A({level:e,scale:t,resolution:n}))}else{let e=(0,p.EA)(s)?512/r*591657527.5917094:256/r*591657527.591555;const i=Math.ceil(o/t);m.push(new d.A({level:0,scale:e,resolution:e*f}));for(let n=1;n<i;n++){const i=e/2**t,r=i*f;m.push(new d.A({level:n,scale:i,resolution:r})),e=i}}return new n({dpi:96,lods:m,origin:c,size:[r,r],spatialReference:s})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,p.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return h.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const n=[],r=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{n.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,r[e.level]=e})),this._set("scales",n),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),n=i+1;return t[i]/(t[i]/t[n])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let n=0;for(;n<i;n++){const i=t[n],r=t[n+1];if(i<=e)return n;if(r===e)return n+1;if(i>e&&r<e)return n+Math.log(i/e)/Math.log(i/r)}return n}tileAt(e,t,i,n){const r=this.lodAt(e);if(!r)return null;let s,o;if("number"==typeof t)s=t,o=i;else if((0,p.aI)(t.spatialReference,this.spatialReference))s=t.x,o=t.y,n=i;else{const e=(0,f.Cv)(t,this.spatialReference);if(null==e)return null;s=e.x,o=e.y,n=i}const a=r.resolution*this.size[0],l=r.resolution*this.size[1];return n??=new m.U(0,0,0),n.level=e,n.row=Math.floor((this.origin.y-o)/l+.001),n.col=Math.floor((s-this.origin.x)/a+.001),this.updateTileInfo(n),n}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;const n=e.level-i.level,r=i.resolution*this.size[0]/2**n,s=i.resolution*this.size[1]/2**n;return e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*s,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+s,!0}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:n}=i,r=n*this.size[0],s=n*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*s,e[2]=e[0]+r,e[3]=e[1]+s,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return n.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const i=[],r=this.lods.length-t;for(let e=0;e<r;e++){const n=e+t,{scale:r,resolution:s}=n>=0?this.lods[n]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new d.A({level:e,scale:r,resolution:s}))}return new n({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const n=e[i];this._upsampleLevels[n.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/n.resolution:0},t=n}}};(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{read:v.read,write:v.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"isWrappable",null),(0,r.Cg)([(0,l.MZ)({type:h.A,json:{write:!0}})],w.prototype,"origin",void 0),(0,r.Cg)([(0,g.w)("origin")],w.prototype,"readOrigin",null),(0,r.Cg)([(0,l.MZ)({type:[d.A],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"scales",void 0),(0,r.Cg)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,r.Cg)([(0,g.w)("size",["rows","cols"])],w.prototype,"readSize",null),(0,r.Cg)([(0,y.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],w.prototype,"writeSize",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=n=(0,r.Cg)([(0,l.$K)("esri.layers.support.TileInfo")],w)},65509(e,t,i){i.d(t,{A:()=>s});var n=i(49186),r=i(17676);class s{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){const n=this.tileInfo?.lodAt(e);return!n||e<this.minLOD||e>this.maxLOD?"unavailable":n.cols&&n.rows?i>=n.cols[0]&&i<=n.cols[1]&&t>=n.rows[0]&&t<=n.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,s){await(0,r.NO)(s);const o=this.getAvailability(e,t,i);if("unavailable"===o)throw new n.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return o}async fetchAvailabilityUpsample(e,t,i,n,s){await(0,r.NO)(s),n.level=e,n.row=t,n.col=i;const o=this.tileInfo;return o.updateTileInfo(n),this.fetchAvailability(e,t,i,s).catch(e=>{if((0,r.zf)(e))throw e;if(o.upsampleTile(n))return this.fetchAvailabilityUpsample(n.level,n.row,n.col,n,s);throw e})}}},72802(e,t,i){i.d(t,{U:()=>r});var n=i(19419);class r{constructor(e,t,i,r=(0,n.vt)()){this._level=e,this._row=t,this._col=i,this.extent=r}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new r(e.level,e.row,e.col,e.extent)}}},25943(e,t,i){i.d(t,{d:()=>M});var n,r=i(5482),s=i(11254),o=i(69622),a=i(49186),l=i(36563),c=(i(44208),i(66344)),h=i(15142),u=i(17676),p=i(36708),f=i(76030),d=i(84952),m=i(91429),g=i(72802),y=i(4718),v=i(69397),w=i(34275);class x{constructor(e){!function(e){if(!e?.location)throw new a.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new a.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new a.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new a.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new a.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,y.o8)(t));const n=this.location.width,r=this.location.height;let s=!0,o=!0;const l=function(e,t=!1){return e<=w.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(n*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(o=!1,l[c]|=1<<t):s=!1,31===t&&++c}o?(this._availability="unavailable",this.byteSize=40):s?(this._availability="available",this.byteSize=40):(this._availability=l,this.byteSize=40+(0,v.Qf)(l))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),n=i%32,r=i>>5,s=this._availability;return r<0||r>s.length?"unknown":s[r]&1<<n?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||s.A,{row:n,col:r,width:o,height:l}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:n,left:r,width:o,height:l},valid:!0,data:new Array(o*l).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==n||e.location.left!==r||e.location.width!==o||e.location.height!==l))throw new a.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:n,left:r,width:o,height:l}});return x.fromJSON(e)})}static fromJSON(e){return Object.freeze(new x(e))}}function _(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function C(e,t,i){return new a.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let M=class extends o.A{static{n=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=s.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new c.q(2097152),this.addHandles((0,p.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),p.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const n=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return n?n.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,n){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(C(e,t,i)):this._fetchTilemap(e,t,i,n).catch(e=>e).then(n=>{if(n instanceof x){const r=n.getAvailability(t,i);if("unavailable"===r)throw C(e,t,i);return r}if((0,u.zf)(n))throw n;return"unknown"})}fetchAvailabilityUpsample(e,t,i,n,r){n.level=e,n.row=t,n.col=i;const s=this.layer.tileInfo;s.updateTileInfo(n);const o=this.fetchAvailability(e,t,i,r).catch(e=>{if((0,u.zf)(e))throw e;if(s.upsampleTile(n))return this.fetchAvailabilityUpsample(n.level,n.row,n.col,n,r);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,r,o),o}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,s){if(!this._prefetchingEnabled)return;const o=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(o))return;const a=new AbortController;s.then(()=>a.abort(),()=>a.abort());let c=!1;const h=(0,l.hA)(()=>{c||(c=!0,a.abort())});if(this.addHandles(h,o),await(0,f.md)(10,a.signal).catch(()=>{}),c||(c=!0,this.removeHandles(o)),(0,u.G4)(a))return;const p=new g.U(e,t,i),d={...r,signal:a.signal},m=this.layer.tileInfo;for(let e=0;n._prefetches.length<n._maxPrefetch&&m.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,d);n._prefetches.push(e);const t=()=>{n._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new h.A({initialSize:n._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,n){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new a.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,s=this._tilemapFromCache(e,t,i,r);if(s)return Promise.resolve(s);const o=n?.signal;return n={...n,signal:null},new Promise((e,t)=>{(0,u.u7)(o,()=>t((0,u.NK)()));const i=_(r);let s=this._pendingTilemapRequests[i];if(!s){s=x.fromDefinition(r,n).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=s,s.then(e,e)}s.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,d.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,n){n.level=e,n.row=t-t%this.size,n.col=i-i%this.size;const r=_(n);return this._tilemapCache.get(r)}get test(){}};(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],M.prototype,"layer",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],M.prototype,"minLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],M.prototype,"maxLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],M.prototype,"request",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],M.prototype,"size",void 0),M=n=(0,r.Cg)([(0,m.$K)("esri.layers.support.TilemapCache")],M)},77548(e,t,i){i.d(t,{Gh:()=>P,tk:()=>T,BR:()=>A,p2:()=>M,qd:()=>S,wI:()=>b,G$:()=>z,$x:()=>R,Ov:()=>w,cM:()=>p,UC:()=>f,W_:()=>x,Qz:()=>d,OP:()=>O,TU:()=>v,F2:()=>m,XX:()=>y,jy:()=>_});var n=i(70333),r=i(11254),s=i(7762),o=(i(84952),i(36563)),a=i(36708),l=i(4146);const c=new WeakMap;function h(e){return!e.destroyed&&(c.has(e)||e.addHandles([(0,a.wB)(()=>{const{parent:t}=e;return!!(t&&t instanceof l.A)&&("catalog-dynamic-group"===t.type||h(t))},t=>c.set(e,t),a.pc),(0,o.hA)(()=>c.delete(e))]),c.get(e))}function u(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function p(e){return u(e,"knowledge-graph")&&"layers"in e}function f(e){return u(e,"knowledge-graph-sublayer")}function d(e){return u(e,"link-chart")&&"layers"in e}function m(e){return u(e,"subtype-group")&&"sublayers"in e}function g(e){const t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}i(16215);const y={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function v(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function w(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function x(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function _(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"oriented-imagery"===e.type}(e)||function(e){return u(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}function C(e){const t=e?.type;return"binning"===t||"cluster"===t}function M(e,t){if(!_(e))return;const i=t?.graphic,n=e.featureReduction;if(i){if(i.isAggregate){const e=i.origin;return e&&"featureReductionProvider"in e&&n?C(n)?n:null:void 0}return e}return t?.checkFeatureReduction&&n?C(n)?n:null:e}async function b(e,t){const i=n.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,r.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function A(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function T(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function S(e){const t=new s.A;for(const i of e.allLayers.concat(e.allTables))h(i)||g(i)||("charts"in i&&t.push(i),"subtype-group"===i.type&&t.push(...i.sublayers));return t}function R(e,t){return null}function z(e){return null}function O(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function P(e,t){if(!t||!O(e))return;const i=(e.url,null);i&&(e.url=i)}},38969(e,t,i){i.d(t,{i:()=>r});var n=i(37955);function r(e,t){return new Promise((i,r)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?i():(t((0,n.Oo)(e,"canplay",i)),t((0,n.Oo)(e,"error",r)))})}},73133(e,t,i){i.d(t,{j:()=>n});const n=(0,i(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"})},7861(e,t,i){i.d(t,{L:()=>r});var n=i(11254);async function r(e,t){return(await(0,n.A)(e,{responseType:"json",query:{f:"json",...t?.customParameters,token:t?.apiKey}})).data}},16215(e,t,i){i.d(t,{S:()=>r,Y:()=>n});const n=Symbol("BasemapInstance");function r(e){return null!=e&&"object"==typeof e&&n in e}},79677(e,t,i){i.d(t,{A:()=>p});var n,r=i(5482),s=i(25482),o=i(88930),a=i(91429),l=i(98623),c=i(10184),h=i(36005),u=i(43937);let p=class extends s.o{static{n=this}static get allTime(){return f}static get empty(){return d}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,r=e.end?.getTime()??e.end;return t===n&&i===r}expandTo(e,t=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,new c.A({value:1,unit:e}),t));let r=this.end;if(r){const i=(0,o.lL)(r,new c.A({value:1,unit:e}),t);r=r.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new n({start:i,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let o,a;return r>=t&&r<=i?o=r:t>=r&&t<=s&&(o=t),i>=r&&i<=s?a=i:s>=t&&s<=i&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?n.empty:new n({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,i=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();const r=new n,{start:s,end:a}=this;return null!=s&&(r.start=(0,o.S1)(s,e,t,i)),null!=a&&(r.end=(0,o.S1)(a,e,t,i)),r}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return f.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:i})}};(0,r.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,r.Cg)([(0,h.w)("end")],p.prototype,"readEnd",null),(0,r.Cg)([(0,u.K)("end")],p.prototype,"writeEnd",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,r.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,r.Cg)([(0,h.w)("start")],p.prototype,"readStart",null),(0,r.Cg)([(0,u.K)("start")],p.prototype,"writeStart",null),p=n=(0,r.Cg)([(0,a.$K)("esri.time.TimeExtent")],p);const f=new p,d=new p({start:void 0,end:void 0})},10184(e,t,i){i.d(t,{A:()=>h});var n=i(5482),r=i(69540),s=i(25482),o=i(88930),a=i(91429),l=i(73133),c=i(93223);let h=class extends((0,r.OU)(s.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,n.Cg)([(0,c.e)(l.j,{nonNullable:!0})],h.prototype,"unit",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],h.prototype,"value",void 0),h=(0,n.Cg)([(0,a.$K)("esri.time.TimeInterval")],h)},32728(e,t,i){i.d(t,{YH:()=>a,hG:()=>s,nu:()=>l,wp:()=>o}),i(34727);var n=i(35522),r=i(51850);function s(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],i=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],n=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,i,n))}function o(e,t){const i=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),r=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),s=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,n.hZ)(e,i,r,s),e}function a(e,t,i){i=i||e;const r=(0,n.Om)(e,t);(0,n.hZ)(i,e[0]-r*t[0],e[1]-r*t[1],e[2]-r*t[2]),(0,n.S8)(i,i)}function l(e,t,i,s=(0,r.vt)()){const o=(0,n.Bw)(e),a=(0,n.Bw)(t),l=(0,n.Om)(e,t)/(o*a);if(l<.9999999999999999){const r=Math.acos(l),u=((1-i)*o+i*a)/Math.sin(r),p=u/o*Math.sin((1-i)*r),f=u/a*Math.sin(i*r);return(0,n.hs)(c,e,p),(0,n.hs)(h,t,f),(0,n.WQ)(s,c,h)}return(0,n.Cc)(s,e,t,i)}(0,r.vt)(),(0,r.vt)(),(0,r.vt)();const c=(0,r.vt)(),h=(0,r.vt)()},68747(e,t,i){i.r(t),i.d(t,{generateCombinationsPanoramicWorker:()=>b,generateCombinationsWorker:()=>M});var n=i(34727),r=i(17676);i(17799),i(69052),i(799),i(86211),i(18047),new Map,i(77690),i(29242),i(51850),i(37585),i(35522);var s=i(49186);i(56507),i(86738),i(39829),i(82799),i(16930),i(34403),i(21325),i(91218),i(65708),i(49590),i(27749),i(39663),i(7817),i(10222),i(4576),i(63490),i(6800),i(87811);var o=i(53966),a=(i(44208),i(27921),i(5443));i(83276),i(19419),i(62369),i(87772),i(23281),i(90091),i(87378),i(22796),i(1555),i(87045),i(72802),i(7861);const l=[1920,1080],c={xmin:-150,ymin:1,xmax:20,ymax:80,spatialReference:{wkid:4326}},h=.001;new a.A({xmin:c.xmin+h,ymin:c.ymin+h,xmax:c.xmax-h,ymax:c.ymax-h,spatialReference:c.spatialReference}),(0,n.KJ)(Math.acos(.05));var u=i(5482),p=i(97768),f=i(61893),d=i(10107),m=i(64108);let g=class extends f.Z{constructor(e){super(e),this.autoLoad=!1,this.customParameters=null,this.datasetFormat=null,this.url=null,this.rotation=null}destroy(){this._cache=(0,p.pR)(this._cache)}get layer(){return this._cache}get size(){if(!this._cache?.loaded||!this._cache.serviceRasterInfo)return;const{serviceRasterInfo:e}=this._cache;return[e.width,e.height]}async load(e){if(this._cache?.loaded)return await this._cache.load(e),{layer:this._cache,size:this.size};const{url:t,customParameters:n}=this;let s=this.datasetFormat;if(!t)throw new Error("URL is required to load NonPanoramicMedia.");const a=await i.e(7835).then(i.bind(i,97835));if((0,r.Te)(e),s||(s=a.guessExtensionFromURI(t)),!s){try{s=await a.getDatasetFormat(t)}catch(e){o.A.getLogger(this).warn("non-panoramic-media:dataset-format",e)}(0,r.Te)(e)}s??="UNKNOWN FORMAT",this.datasetFormat=s;const l=(await Promise.all([i.e(7373),i.e(9235),i.e(3500),i.e(1003),i.e(233),i.e(561)]).then(i.bind(i,90561))).default;(0,r.Te)(e),this._cache=new l({url:t,ioConfig:{skipExtensions:["aux.xml","jgw"],skipMapInfo:!0,datasetFormat:s},customParameters:n??void 0});const c=this._cache.load(e);return this.addResolvingPromise(c),await c,(0,r.Te)(e),{layer:this._cache,size:this.size}}};(0,u.Cg)([(0,d.MZ)()],g.prototype,"_cache",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"autoLoad",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"customParameters",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"datasetFormat",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"url",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"layer",null),(0,u.Cg)([(0,d.MZ)()],g.prototype,"rotation",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"size",null),g=(0,u.Cg)([(0,m.$)("esri.widgets.OrientedImageryViewer.support.NonPanoramicMedia")],g);var y=i(37955),v=i(38969);class w extends s.A{constructor(e,t,i){super(e,t,i),this.name="unknown",this.name=e}}const x=new Set(["JPG","JPEG","TIFF","TIF","MRF"]),_=new Set(["MRF","TIFF","TIF"]);let C=class extends f.Z{constructor(e){super(e),this._size=[0,0],this._cache=null,this.autoLoad=!1,this.cameraHeading=null,this.extension=null,this.imagePyramid=null,this.type="image",this.uiStrings={}}destroy(){this._cache=null}get horizonPitch(){const{matrix:e}=this;return e?(0,n.KJ)(Math.asin(-e[6])):0}get horizonRoll(){const{matrix:e}=this;return e?(0,n.KJ)(Math.atan(e[7]/e[8])):0}get horizonYaw(){const{matrix:e,cameraHeading:t}=this;return e?(0,n.KJ)(Math.atan2(e[3],e[0])):t?-t:0}get size(){return this._size}async load(e){const{guessExtensionFromURI:t}=await i.e(7835).then(i.bind(i,97835));if((0,r.Te)(e),"video"===this.type)return this.loadVideoMesh(e);let n=this.extension;if(n||(n=t(this.url)),!n||!x.has(n))throw new w("unsupported-format",this.uiStrings["unsupported-format"]??"Unsupported image format: {extension}",{datasetFormat:n??"UNKNOWN FORMAT"});return _.has(n)?this.loadOptimizedImageMesh(e):this.loadImageMesh(e)}async loadOptimizedImageMesh(e){const{loadMeshes:t,loadPyramid:n,loadRaster:s}=await Promise.all([i.e(6860),i.e(7005),i.e(6754),i.e(2761),i.e(7634),i.e(8449)]).then(i.bind(i,21060)),o=await s(this.url,e);(0,r.Te)(e),this.imagePyramid=await n(o,{pitch:this.horizonPitch,yaw:this.horizonYaw,roll:this.horizonRoll},e),(0,r.Te)(e);const a=this.imagePyramid.getLowResolutionTiles(),l=await t(a,e);return(0,r.Te)(e),this._size=this.imagePyramid.imageSize,{meshOrMeshes:l,size:this._size,tileKeys:a?.map(e=>e.key)}}async loadVideoMesh(e){const{createImageSphere:t}=await Promise.all([i.e(6860),i.e(7005),i.e(6754),i.e(2761),i.e(7634),i.e(8449)]).then(i.bind(i,21060));if((0,r.Te)(e),this._cache){const i=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,r.Te)(e),{meshOrMeshes:i,size:this._size}}const n=await this._resolveMedia(e);(0,r.Te)(e),this._cache=n.media,this._size=[...l];const s=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,r.Te)(e),{meshOrMeshes:s,size:this._size}}async loadImageMesh(e){const{createImageSphere:t}=await Promise.all([i.e(6860),i.e(7005),i.e(6754),i.e(2761),i.e(7634),i.e(8449)]).then(i.bind(i,21060));if((0,r.Te)(e),this._cache){const i=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,r.Te)(e),{meshOrMeshes:i,size:this._size}}const n=await this._resolveMedia(e);(0,r.Te)(e),this._cache=n.media;const s=n.mesh;return this._size=[n.media.width,n.media.height],{meshOrMeshes:s,size:this._size}}async _resolveMedia(e){const t=Promise.withResolvers(),n=(0,r.u7)(e?.signal,t.resolve),s="video"===this.type?document.createElement("video"):document.createElement("img");s.crossOrigin="anonymous",s.src=this.url;let o=null;const a="video"===this.type?(0,v.i)(s,this.addHandles):await new Promise((e,t)=>{o=[(0,y.on)(s,"error",e=>{t(e)}),(0,y.on)(s,"load",e)]}).finally(()=>{o?.forEach(e=>e.remove()),o=null}),l=Promise.race([a,t.promise]);this.addResolvingPromise(l);try{await l}finally{n?.remove()}(0,r.Te)(e);const c=s;if(!c)throw new w("unknown","Could not load media",{url:this.url});const{createImageSphere:h}=await Promise.all([i.e(6860),i.e(7005),i.e(6754),i.e(2761),i.e(7634),i.e(8449)]).then(i.bind(i,21060));(0,r.Te)(e);const u=await h({data:s,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,r.Te)(e),{media:c,mesh:u}}};function M(e){return function(e,t){const{cameraPitch:i,cameraRoll:n,cameraLocation:r}=e,{x:s,y:o,z:a,spatialReference:l}=r;if(t.every(e=>0===e)||!t||!t.length||!l)throw new Error("Invalid parameters");const[c,h,,u,p]=t,f=[-u,0,u],d=[-p,0,p],m=[-c,0,c],g=[-h,0,h],y=[];for(const t of f)for(const r of d)for(const c of m)for(const h of m)for(const u of g){const p={...e};p.cameraPitch=i+t,p.cameraRoll=n+r,p.cameraLocation={x:s+c,y:o+h,z:a?a+u:0,spatialReference:{wkid:l.wkid}},y.push(p)}return y}(e.imageToWorldProps,e.accuracyParameters)}function b(e){return function(e,t){const{cameraHeading:i,cameraLocation:n}=e,{x:r,y:s,z:o,spatialReference:a}=n;if(!t||t.every(e=>0===e)||!t.length||!a)throw new Error("Invalid parameters");const[l,c,h]=t,u=h>0?[-h,0,h]:[],p=l>0?[-l,0,l]:[],f=c>0?[-c,0,c]:[],d=[];for(const t of u)for(const n of p)for(const l of p)for(const c of f){const h={...e};h.cameraHeading=i+t,h.cameraLocation={x:r+n,y:s+l,z:o?o+c:0,spatialReference:{wkid:a.wkid}},d.push(h)}return d}(e.imageToWorldProps,e.accuracyParameters)}(0,u.Cg)([(0,d.MZ)()],C.prototype,"_size",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"autoLoad",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"cameraHeading",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"extension",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"horizonPitch",null),(0,u.Cg)([(0,d.MZ)()],C.prototype,"horizonRoll",null),(0,u.Cg)([(0,d.MZ)()],C.prototype,"horizonYaw",null),(0,u.Cg)([(0,d.MZ)()],C.prototype,"id",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"imagePyramid",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"matrix",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"size",null),(0,u.Cg)([(0,d.MZ)()],C.prototype,"type",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"uiStrings",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"url",void 0),C=(0,u.Cg)([(0,m.$)("esri.widgets.PanoramicViewer.support.PanoramicMedia")],C),i(9093),i(91829),i(58083),i(79258),i(73354),i(28208),i(28735)},28208(e,t,i){i.d(t,{NU:()=>a,ZH:()=>s,vK:()=>o});var n=i(86738),r=i(16930);const s=new n.A({x:0,y:0,z:0,spatialReference:r.A.WebMercator}),o=1e3,a=.3515625}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[895,6061],{61691(e,t,n){n.d(t,{G:()=>r});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},76061(e,t,n){n.d(t,{S:()=>o});var r=n(61691);class o extends r.G{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},4144(e,t,n){n.d(t,{Hh:()=>u,fz:()=>a,g7:()=>c,s1:()=>s,zo:()=>l});var r=n(76061),o=n(83290);let i;function s(){return!!i&&(0,o.i)()}async function u(){if(!s()){const[e,t]=await Promise.all([Promise.all([n.e(6042),n.e(1878),n.e(8885),n.e(5756),n.e(9192)]).then(n.bind(n,9192)),Promise.all([n.e(6042),n.e(1878),n.e(8885),n.e(5756)]).then(n.bind(n,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,o.l)()]);i=new e.OperatorProject,t(o.p)}}function c(e,t){return i.execute(e,t,null)}function l(e,t){const n=i.executeMany(new r.S(e),t,null);return Array.from(n)}function a(){return i.supportsCurves()}},83276(e,t,n){n.r(t),n.d(t,{execute:()=>d,executeMany:()=>h,isLoaded:()=>m,load:()=>f,supportsCurves:()=>a});var r=n(4144),o=n(17499);let i,s,u,c,l,a;function m(){return!!i&&(0,r.s1)()}async function f(){if(!m()){const[e,t]=await Promise.all([Promise.all([n.e(6042),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(9285)]).then(n.bind(n,78125)),Promise.all([n.e(6042),n.e(1878),n.e(8885),n.e(5756),n.e(6129)]).then(n.bind(n,86129)),(0,r.Hh)()]);i=e.fromGeometry,s=e.fromSpatialReference,u=e.getSpatialReference,c=e.toGeometry,l=t.createProjectionTransformation,a=(0,r.fz)()}}function d(e,t,n){const a=u(e),m=l(s(a),s(t),n),f=c((0,r.g7)(i(e),m),t);return!n?.zConversionDisabled&&f?.hasZ&&(0,o.gw)([f],a,t),f}function h(e,t,n){const a=e.map(i),m=u(e),f=l(s(m),s(t),n),d=(0,r.zo)(a,f).map(e=>c(e,t));return!n?.zConversionDisabled&&d&&(0,o.gw)(d,m,t),d}},17499(e,t,n){n.d(t,{gw:()=>s});var r=n(49186),o=n(60408),i=n(62815);function s(e,t,n){let r;for(const s of e)if(s&&(0,o.Pv)(s)&&!("vertexAttributes"in s)){if(!r){null==t.vcsWkid&&null==n.vcsWkid||c(t,n);const e="type"in s?s.type:(0,o.$B)(s);if(r=(0,i.N)(e,t,n),!r)return}r(s)}}class u extends r.A{constructor(){super("projection:z-unsupported","projection of z values is unsupported between different vertical coordinate systems")}}function c({vcsWkid:e},{vcsWkid:t}){if((e??null)!==(t??null))throw new u}}}]);