@arcgis/core 5.0.0-next.10 → 5.0.0-next.12

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 (414) hide show
  1. package/PopupTemplate.js +1 -1
  2. package/analysis/AreaMeasurementAnalysis.js +1 -1
  3. package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +1 -1
  4. package/applications/KnowledgeStudio/generalSdkInternalAccess.js +1 -1
  5. package/applications/KnowledgeStudio/resourceSerializationUtils.js +1 -1
  6. package/arcade/functions/geomasync.js +1 -1
  7. package/arcade/functions/geomsync.js +1 -1
  8. package/arcade/functions/knowledgegraph.js +1 -1
  9. package/arcade/geometry/nearestVertex.js +5 -0
  10. package/arcade/geometry/operators.js +1 -1
  11. package/arcade/geometry/operatorsWorker.js +1 -1
  12. package/assets/esri/core/workers/RemoteClient.js +1 -1
  13. package/assets/esri/core/workers/chunks/{af47272aaaef0ea57e71.js → 00ea3052170e831c6bc8.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{91dfd29e2dba200eab09.js → 0105d814fb51c366d1da.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{125e71b0e29d1d132777.js → 02a22dd6d208a925cc5a.js} +1 -1
  16. package/assets/esri/core/workers/chunks/02e7359162cf974b41b6.js +1 -0
  17. package/assets/esri/core/workers/chunks/{ead8d0cbcebd12dbfad7.js → 04211fba145d9f06b3ec.js} +1 -1
  18. package/assets/esri/core/workers/chunks/0441ea7c89266a68b6f0.js +1 -0
  19. package/assets/esri/core/workers/chunks/07f2a75431dd8fc502ef.js +1 -0
  20. package/assets/esri/core/workers/chunks/092d72caf3269e696d1c.js +1 -0
  21. package/assets/esri/core/workers/chunks/{d1e97cce5047f1791e22.js → 0ac13de43438f572f59c.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{629127877042ad784ad2.js → 0c8aeb6262e9ec7c87d0.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{d07f911d40bf05fc0306.js → 1008e3d64f5880e3dbf2.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{c29486c4eeb3e72effff.js → 110429583b28c28c36ee.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{61d970ed75c2c358b1e9.js → 14d601e0fe7a0538c7c1.js} +1 -1
  26. package/assets/esri/core/workers/chunks/18474c017ddacd1d3d2c.js +1 -0
  27. package/assets/esri/core/workers/chunks/{1257c37bf04d39c27b62.js → 1c3bee704bafb64bba70.js} +1 -1
  28. package/assets/esri/core/workers/chunks/1d07846bcaac47df0644.js +1 -0
  29. package/assets/esri/core/workers/chunks/{509392131ec473d6b988.js → 1dfca37f95f2b968aa54.js} +1 -1
  30. package/assets/esri/core/workers/chunks/2132ccc45da90f6208b2.js +1 -0
  31. package/assets/esri/core/workers/chunks/2166238a7ad63a2d43c7.js +1 -0
  32. package/assets/esri/core/workers/chunks/2214d3b1f11658a85d0f.js +1 -0
  33. package/assets/esri/core/workers/chunks/2266a8f2c2ec37c19bb4.js +1 -0
  34. package/assets/esri/core/workers/chunks/22ca80f491e070b2a5e7.js +1 -0
  35. package/assets/esri/core/workers/chunks/{f80f5dbf96c343ac4df6.js → 24d8922ac9cd48621357.js} +1 -1
  36. package/assets/esri/core/workers/chunks/257f17b3836a623a9dbe.js +1 -0
  37. package/assets/esri/core/workers/chunks/2b27499fa9de22970b7a.js +1 -0
  38. package/assets/esri/core/workers/chunks/2e76fbd3c874300fc4a7.js +1 -0
  39. package/assets/esri/core/workers/chunks/31b5900119dd7cd9e7d3.js +1 -0
  40. package/assets/esri/core/workers/chunks/34bb4852ebef0f529c96.js +1 -0
  41. package/assets/esri/core/workers/chunks/{9698f36c143953a975d4.js → 353d447f3745942c88a8.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{52282f767bd0e99ddca0.js → 3545dce74bb6b0354cb7.js} +1 -1
  43. package/assets/esri/core/workers/chunks/36b1f47d70b57d79df7b.js +1 -0
  44. package/assets/esri/core/workers/chunks/38810e3f298e8a0b64a6.js +1 -0
  45. package/assets/esri/core/workers/chunks/{7290e7a819eb291b1df2.js → 38fa50336983265c73a4.js} +3 -3
  46. package/assets/esri/core/workers/chunks/{fe49321dca22dc60d105.js → 3b1982bf7b44ff897a35.js} +1 -1
  47. package/assets/esri/core/workers/chunks/3bacd904cd93c8013f6a.js +1 -0
  48. package/assets/esri/core/workers/chunks/{588533c3abe876f20f62.js → 3d5b157bd9060b07670b.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{06e60fc7715d08ede59d.js → 3edffdb0e282ed562ac7.js} +1 -1
  50. package/assets/esri/core/workers/chunks/3fa15d4ee5fab8fff76e.js +1 -0
  51. package/assets/esri/core/workers/chunks/487e1c592f1b6fd03a7d.js +1 -0
  52. package/assets/esri/core/workers/chunks/{ee5aa11750c51b220f1e.js → 4bcb83119481453dbb90.js} +1 -1
  53. package/assets/esri/core/workers/chunks/4ca5d58117e7a5f73e1e.js +1 -0
  54. package/assets/esri/core/workers/chunks/{826fa0dfb63df77bfd95.js → 4f0016111fd84c612f41.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{24cd7b84cd0f3de4bff2.js → 4f14fed0ec885c3c33d5.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{4baf6f6e7ddedb25f806.js → 5299ec59c86022ca37e2.js} +1 -1
  57. package/assets/esri/core/workers/chunks/53a9c34cb3f6ac06cd50.js +1 -0
  58. package/assets/esri/core/workers/chunks/5415fbcc7ed203fc5575.js +1 -0
  59. package/assets/esri/core/workers/chunks/54c49a768147720c3c56.js +1 -0
  60. package/assets/esri/core/workers/chunks/558822b700e8bd844052.js +1 -0
  61. package/assets/esri/core/workers/chunks/{da24ad57747714ac5eda.js → 55adbd7481f8dfb1067e.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{7803495f8862d9025bcd.js → 56e06c9c1120bea2c641.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{dc66490520f97eef15bf.js → 57806a01f33074b601e7.js} +24 -24
  64. package/assets/esri/core/workers/chunks/{67f03d042455cd0f7009.js → 57b410198d83bf0ab708.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{0a5d74414dd02a2fb8e1.js → 5bc4140333d0db904949.js} +1 -1
  66. package/assets/esri/core/workers/chunks/5e08b19e6d7202ea38d7.js +1 -0
  67. package/assets/esri/core/workers/chunks/{0d5212f59e9b62c16164.js → 5f6df4a3376b52ead53f.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{15c7c10ff9ac63f0e792.js → 5fb2edf942b1cd8d7336.js} +1 -1
  69. package/assets/esri/core/workers/chunks/600e2e6b51e2fb9c598c.js +1 -0
  70. package/assets/esri/core/workers/chunks/{dc51438b832551924a9e.js → 6238ca7541800eb2566b.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{731f7b552dde0fb325cd.js → 62c2bd082a0c669bc857.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{b8a3f1e60e24a13749c1.js → 631fb2e62e48f8be4051.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{c8e686efe344a33a0258.js → 6490bc392a4b4f9e24f9.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{e767f83f9e2de6650f80.js → 6581b94e796781c0ad4a.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{53654edd766d9b4ef750.js → 658cd45b5fb304fd840a.js} +1 -1
  76. package/assets/esri/core/workers/chunks/67f305b0c72e77a6331a.js +1 -0
  77. package/assets/esri/core/workers/chunks/6922351c001fdb4cb757.js +1 -0
  78. package/assets/esri/core/workers/chunks/{6e22b02a9715c10578d0.js → 69cca5d3f715876c6b32.js} +1 -1
  79. package/assets/esri/core/workers/chunks/6c13c01c47abc1939f96.js +1 -0
  80. package/assets/esri/core/workers/chunks/{c37f7756d48ff9af2656.js → 736035c0069ccb03bee6.js} +1 -1
  81. package/assets/esri/core/workers/chunks/7c14f99e6cfff2a8ef4a.js +1 -0
  82. package/assets/esri/core/workers/chunks/812f2ccc01f44e3cfd41.js +1 -0
  83. package/assets/esri/core/workers/chunks/82338cdd56aa1de28db3.js +1 -0
  84. package/assets/esri/core/workers/chunks/{51ab2acac4ecc1ca9c34.js → 86830fcb5475502dac65.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{11e96a312f1294d34c50.js → 881df4fd1dc594576457.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{d1ca7c3a32ce00ed8b81.js → 8be16b03caa947ac7631.js} +1 -1
  87. package/assets/esri/core/workers/chunks/8cd03b54b2859b52fb81.js +1 -0
  88. package/assets/esri/core/workers/chunks/8d9ccc9a43a315cb6b04.js +1 -0
  89. package/assets/esri/core/workers/chunks/{042cd64e1f4eb326c30f.js → 8fc82fe1fcbcedf35400.js} +1 -1
  90. package/assets/esri/core/workers/chunks/91afee11072471e4eefe.js +1 -0
  91. package/assets/esri/core/workers/chunks/{fbd8d2f61f8a15bcf3db.js → 9595aabbaf411eceea1e.js} +1 -1
  92. package/assets/esri/core/workers/chunks/9978ec6c67e87dc08a1d.js +1 -0
  93. package/assets/esri/core/workers/chunks/9cdd087c43a601ec331d.js +1 -0
  94. package/assets/esri/core/workers/chunks/9e5e05d6430712b0b1bc.js +1 -0
  95. package/assets/esri/core/workers/chunks/{5e2ce34def5e053913b2.js → a10e533f336c035d8d40.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{311b564e44ae637c960d.js → a3ade7e8b9ddadb5f800.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{18c5d79d5ee1136e0a57.js → a57751f3d78524c876cd.js} +1 -1
  98. package/assets/esri/core/workers/chunks/{0030d68d9edf42b4af57.js → a6a87f92f453204e9bdb.js} +1 -1
  99. package/assets/esri/core/workers/chunks/a6ee40dfc471d6612f3c.js +1 -0
  100. package/assets/esri/core/workers/chunks/a8ea050090c351e3b6d6.js +1 -0
  101. package/assets/esri/core/workers/chunks/adf7ccf4ef629211c7ee.js +1 -0
  102. package/assets/esri/core/workers/chunks/ae6066ea6cb373dc6db3.js +1 -0
  103. package/assets/esri/core/workers/chunks/af5fc5d6c1d072a27df1.js +1 -0
  104. package/assets/esri/core/workers/chunks/b193de09e005b0976a6a.js +1 -0
  105. package/assets/esri/core/workers/chunks/b328635d191f5424c047.js +1 -0
  106. package/assets/esri/core/workers/chunks/b59f9c3f7a149214256f.js +1 -0
  107. package/assets/esri/core/workers/chunks/{664ae441617afe4b17ec.js → b87bc987983b31c13f64.js} +1 -1
  108. package/assets/esri/core/workers/chunks/bb56717c4e36f28d4c08.js +1 -0
  109. package/assets/esri/core/workers/chunks/bbdfa8ffcf084cbd9938.js +1 -0
  110. package/assets/esri/core/workers/chunks/bc19a232076d98825eef.js +1 -0
  111. package/assets/esri/core/workers/chunks/bc29c29bfa5be3ebafb1.js +1 -0
  112. package/assets/esri/core/workers/chunks/{ddfd01bb9ba8577c3ffc.js → c3dcfe26c2c3c829762d.js} +1 -1
  113. package/assets/esri/core/workers/chunks/c3ddcf9148dd2640c402.js +1 -0
  114. package/assets/esri/core/workers/chunks/{6d9f2b113d6bde936a04.js → c4dfd897bcab20dee43b.js} +1 -1
  115. package/assets/esri/core/workers/chunks/{0f30a9514571c7be9978.js → c5c02ace54fe4ab9214b.js} +1 -1
  116. package/assets/esri/core/workers/chunks/{87921f3fa9001f5801ed.js → c68935ed44eb0702a6ba.js} +1 -1
  117. package/assets/esri/core/workers/chunks/{4fb5f1c671892001a4fd.js → c9579d607e59bae214da.js} +1 -1
  118. package/assets/esri/core/workers/chunks/d39a10155317e6f7a21c.js +1 -0
  119. package/assets/esri/core/workers/chunks/{773f2c6c9d38db76dfed.js → d42f7e48d694b2427c0d.js} +1 -1
  120. package/assets/esri/core/workers/chunks/d466f3f0d3824c77da7c.js +1 -0
  121. package/assets/esri/core/workers/chunks/d4a91f2256e48316a8f0.js +1 -0
  122. package/assets/esri/core/workers/chunks/d69265ceabfa92b40bb7.js +1 -0
  123. package/assets/esri/core/workers/chunks/d7755c4c8d1d3059efca.js +1 -0
  124. package/assets/esri/core/workers/chunks/{eb9c166db0db6fa60e95.js → d7b0fcce847f563ea255.js} +1 -1
  125. package/assets/esri/core/workers/chunks/d87f0116ee53ec5f98e9.js +1 -0
  126. package/assets/esri/core/workers/chunks/d888ae5ac1810a486919.js +1 -0
  127. package/assets/esri/core/workers/chunks/db54552def7bc6cef9bd.js +1 -0
  128. package/assets/esri/core/workers/chunks/dc4d29cfce12ac599888.js +1 -0
  129. package/assets/esri/core/workers/chunks/dda6ca9af35518652d0f.js +1 -0
  130. package/assets/esri/core/workers/chunks/{7005d956c990a04ee8b2.js → dec336700cfb83abbbeb.js} +1 -1
  131. package/assets/esri/core/workers/chunks/{b3613a38178cad2ebc82.js → dee9867b3379e024ae96.js} +1 -1
  132. package/assets/esri/core/workers/chunks/df130abb76713a85b4f9.js +1 -0
  133. package/assets/esri/core/workers/chunks/e0aa036c56ecdfe01503.js +1 -0
  134. package/assets/esri/core/workers/chunks/e2e4f6b58763fae51ae5.js +1 -0
  135. package/assets/esri/core/workers/chunks/e8a9c56fd0e7fd2558ef.js +1 -0
  136. package/assets/esri/core/workers/chunks/{1d06fcae4c2f02fb1c95.js → eb7eb3b3b8800fd73f3e.js} +1 -1
  137. package/assets/esri/core/workers/chunks/{37c1f155da14de91565a.js → edf58513f789856cd1db.js} +1 -1
  138. package/assets/esri/core/workers/chunks/{f34e3fa0c5b28531e289.js → ef789e8487deab916fad.js} +1 -1
  139. package/assets/esri/core/workers/chunks/f28ffda9a95c6568503d.js +1 -0
  140. package/assets/esri/core/workers/chunks/f98689562017583f73ee.js +1 -0
  141. package/assets/esri/core/workers/chunks/{292daac70bb828e4923f.js → f9cd068d184cab66dc33.js} +1 -1
  142. package/assets/esri/core/workers/chunks/{dff2df259f140b7d97a9.js → fd88e07cba5964f80e9e.js} +1 -1
  143. package/assets/esri/core/workers/chunks/{c9b16fd41cd59d452522.js → fdbe16e3b23e01655c0c.js} +1 -1
  144. package/assets/esri/core/workers/chunks/{063905fbf9a0c6586949.js → ffdba51e7256ebf8ebd3.js} +1 -1
  145. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  146. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  147. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  148. package/assets/esri/themes/base/widgets/_Editor.scss +35 -2
  149. package/assets/esri/themes/base/widgets/_FeatureTable.scss +2 -0
  150. package/assets/esri/themes/dark/main.css +1 -1
  151. package/assets/esri/themes/light/main.css +1 -1
  152. package/assets/esri/themes/light/view.css +1 -1
  153. package/chunks/Envelope.js +1 -1
  154. package/chunks/Geometry.js +1 -1
  155. package/chunks/MultiPathImpl.js +1 -1
  156. package/chunks/Point2D.js +1 -1
  157. package/chunks/UnitFactory.js +1 -1
  158. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  159. package/chunks/arcgis-knowledge-client-core.js +1 -1
  160. package/chunks/containsOperator.js +1 -1
  161. package/chunks/densifyOperator.js +1 -1
  162. package/chunks/differenceOperator.js +1 -1
  163. package/chunks/intersectsOperator.js +1 -1
  164. package/chunks/persistableUrlUtils.js +1 -1
  165. package/config.js +1 -1
  166. package/core/XHRAdapter.js +1 -1
  167. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  168. package/core/quantityFormatUtils.js +1 -1
  169. package/core/unitFormatUtils.js +1 -1
  170. package/core/unitUtils.js +1 -1
  171. package/editing/fieldUtils.js +5 -0
  172. package/geometry/Extent.js +1 -1
  173. package/geometry/Geometry.js +1 -1
  174. package/geometry/Mesh.js +1 -1
  175. package/geometry/Point.js +1 -1
  176. package/geometry/SpatialReference.js +1 -1
  177. package/geometry/ellipsoidUtils.js +1 -1
  178. package/geometry/operators/support/jsonConverter.js +1 -1
  179. package/geometry/support/MeshTransform.js +1 -1
  180. package/geometry/support/axisAngleDegrees.js +1 -1
  181. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  182. package/geometry/support/meshUtils/rotate.js +1 -1
  183. package/geometry/support/meshUtils/scale.js +1 -1
  184. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  185. package/geometry/support/plane.js +1 -1
  186. package/geometry/support/polygonUtils.js +1 -1
  187. package/interfaces.d.ts +114 -11
  188. package/kernel.js +1 -1
  189. package/layers/KnowledgeGraphLayer.js +1 -1
  190. package/layers/Layer.js +1 -1
  191. package/layers/LinkChartLayer.js +1 -1
  192. package/layers/MapNotesLayer.js +1 -1
  193. package/layers/graphics/data/QueryEngine.js +1 -1
  194. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  195. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  196. package/layers/save/groupLayerUtils.js +1 -1
  197. package/layers/save/imageryUtils.js +1 -1
  198. package/layers/save/streamLayerUtils.js +1 -1
  199. package/layers/support/DateTimeFieldFormat.js +1 -1
  200. package/layers/support/FieldFormat.js +1 -1
  201. package/layers/support/LayerLoadContext.js +1 -1
  202. package/layers/support/NumberFieldFormat.js +1 -1
  203. package/layers/support/arcgisLayerUrl.js +1 -1
  204. package/layers/support/arcgisLayers.js +1 -1
  205. package/layers/support/fetchService.js +1 -1
  206. package/layers/support/fieldFormatUtils.js +1 -1
  207. package/layers/support/fieldUtils.js +1 -1
  208. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  209. package/layers/video/VideoCameraSensorModel.js +1 -1
  210. package/networks/support/UNTraceConfiguration.js +1 -1
  211. package/package.json +1 -1
  212. package/popup/ExpressionInfo.js +1 -1
  213. package/popup/FieldInfo.js +1 -1
  214. package/popup/content/AttachmentsContent.js +1 -1
  215. package/popup/content/BarChartMediaInfo.js +1 -1
  216. package/popup/content/ColumnChartMediaInfo.js +1 -1
  217. package/popup/content/Content.js +1 -1
  218. package/popup/content/CustomContent.js +1 -1
  219. package/popup/content/ExpressionContent.js +1 -1
  220. package/popup/content/FieldsContent.js +1 -1
  221. package/popup/content/ImageMediaInfo.js +1 -1
  222. package/popup/content/LineChartMediaInfo.js +1 -1
  223. package/popup/content/MediaContent.js +1 -1
  224. package/popup/content/PieChartMediaInfo.js +1 -1
  225. package/popup/content/RelationshipContent.js +1 -1
  226. package/popup/content/TextContent.js +1 -1
  227. package/popup/content/UtilityNetworkAssociationsContent.js +1 -1
  228. package/popup/content/mixins/ChartMediaInfo.js +1 -1
  229. package/popup/content/mixins/MediaInfo.js +1 -1
  230. package/popup/content.js +1 -1
  231. package/popup/support/FieldInfoFormat.js +1 -1
  232. package/portal/support/layersLoader.js +1 -1
  233. package/request/cors.js +5 -0
  234. package/request/loadImage.js +5 -0
  235. package/request/preferredHosts.js +5 -0
  236. package/request/process.js +5 -0
  237. package/request/queue.js +5 -0
  238. package/request/serviceJSON.js +5 -0
  239. package/request.js +1 -1
  240. package/rest/geometryService/utils.js +1 -1
  241. package/rest/knowledgeGraphService.d.ts +1 -0
  242. package/support/getDefaultUnitForView.js +1 -1
  243. package/support/popupUtils.js +1 -1
  244. package/support/revision.js +1 -1
  245. package/symbols/support/symbolUtils.js +1 -1
  246. package/time/TimeExtent.js +1 -1
  247. package/views/2d/analysis/AreaMeasurement/AreaMeasurementAreaVisualization.js +5 -0
  248. package/views/2d/analysis/AreaMeasurement/AreaMeasurementController.js +5 -0
  249. package/views/2d/analysis/AreaMeasurement/AreaMeasurementLabelVisualization.js +5 -0
  250. package/views/2d/analysis/AreaMeasurement/AreaMeasurementManipulatorVisualization.js +5 -0
  251. package/views/2d/analysis/AreaMeasurement/AreaMeasurementSketchVisualization.js +5 -0
  252. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +5 -0
  253. package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +5 -0
  254. package/views/2d/analysis/analysisViewModuleImportUtils.js +1 -1
  255. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  256. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  257. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  258. package/views/2d/layers/features/sources/strategies/FeatureDrillDownTileLoadStrategy.js +1 -1
  259. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
  260. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  261. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  262. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
  263. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  264. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  265. package/views/3d/environment/CloudsRenderer.js +1 -1
  266. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  267. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  268. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  269. package/views/3d/layers/FlowSubView3D.js +1 -1
  270. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  271. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  272. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  273. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
  274. package/views/3d/layers/i3s/I3SDataRequester.js +1 -1
  275. package/views/3d/layers/support/featureTileQuery3D.js +1 -1
  276. package/views/3d/support/StreamTextureCollection.js +1 -1
  277. package/views/3d/support/flow/geometryUtils.js +1 -1
  278. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  279. package/views/3d/terrain/TerrainSurface.js +1 -1
  280. package/views/3d/webgl-engine/collections/Component/ComponentData.js +1 -1
  281. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  282. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  283. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  284. package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
  285. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  286. package/views/3d/webgl-engine/lib/TextureBackedBuffer/BufferManager.js +1 -1
  287. package/views/3d/webgl-engine/lib/TextureBackedBuffer/ManagedTextureBackedBuffer.js +1 -1
  288. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
  289. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  290. package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
  291. package/views/View2D.js +1 -1
  292. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  293. package/views/analysis/ElevationProfile/constants.js +1 -1
  294. package/views/analysis/ElevationProfile/elevationProfileErrors.js +1 -1
  295. package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
  296. package/views/draw/DrawOperation.js +1 -1
  297. package/views/draw/support/tooltipUtils.js +1 -1
  298. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  299. package/views/interactive/tooltip/fields/TooltipField.js +1 -1
  300. package/views/interactive/tooltip/infos/TooltipInfoWithCoordinates.js +1 -1
  301. package/views/magnifier/resources.js +1 -1
  302. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  303. package/webdoc/support/webdocSaveUtils.js +1 -1
  304. package/widgets/BasemapLayerList.js +1 -1
  305. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  306. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  307. package/widgets/Editor/EditorViewModel.js +1 -1
  308. package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
  309. package/widgets/Editor/MergeFeaturesWorkflowData.js +1 -1
  310. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  311. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  312. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  313. package/widgets/Editor/UpdateWorkflow.js +1 -1
  314. package/widgets/Editor/Workflow.js +1 -1
  315. package/widgets/Editor/components/FeatureList.js +1 -1
  316. package/widgets/Editor/components/MergeFeaturesList.js +5 -0
  317. package/widgets/Editor/components/Notices.js +1 -1
  318. package/widgets/Editor/components/PanelContent.js +1 -1
  319. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  320. package/widgets/Editor/css.js +1 -1
  321. package/widgets/Editor/support/EditorItem.js +1 -1
  322. package/widgets/Editor/support/SketchController.js +1 -1
  323. package/widgets/Editor/support/errors.js +1 -1
  324. package/widgets/Editor/support/mergeFeaturesUtils.js +1 -1
  325. package/widgets/Editor/support/splitFeatureUtils.js +1 -1
  326. package/widgets/Editor/workflowUtils.js +1 -1
  327. package/widgets/Editor.js +1 -1
  328. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  329. package/widgets/FeatureForm/FieldInput.js +1 -1
  330. package/widgets/FeatureForm.js +1 -1
  331. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  332. package/widgets/FeatureTable/FieldColumn.js +1 -1
  333. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  334. package/widgets/LayerList.js +1 -1
  335. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  336. package/widgets/Legend/support/utils.js +1 -1
  337. package/widgets/PanoramicVideoViewer.js +1 -1
  338. package/widgets/TimeSlider.js +1 -1
  339. package/widgets/support/FilterCondition.js +1 -1
  340. package/assets/esri/core/workers/chunks/0200637e0503556a3b97.js +0 -1
  341. package/assets/esri/core/workers/chunks/022c854eff2c2c2aed6b.js +0 -1
  342. package/assets/esri/core/workers/chunks/066a0ea67688361e85a5.js +0 -1
  343. package/assets/esri/core/workers/chunks/06f75c5b6b50934d72a6.js +0 -1
  344. package/assets/esri/core/workers/chunks/15f969836d63c7fe2d9d.js +0 -1
  345. package/assets/esri/core/workers/chunks/2857bcb68df874e9aa62.js +0 -1
  346. package/assets/esri/core/workers/chunks/2a9fc0301268ff909246.js +0 -1
  347. package/assets/esri/core/workers/chunks/2ddcf3cea0efe4052618.js +0 -1
  348. package/assets/esri/core/workers/chunks/2e8a4df83c43f86d7361.js +0 -1
  349. package/assets/esri/core/workers/chunks/2f2e4f81f3daa3fb8527.js +0 -1
  350. package/assets/esri/core/workers/chunks/3109f0a6914e7be088ed.js +0 -1
  351. package/assets/esri/core/workers/chunks/31bb1ee9370c2753ce9d.js +0 -1
  352. package/assets/esri/core/workers/chunks/329fccd7f5cb8401e0c3.js +0 -1
  353. package/assets/esri/core/workers/chunks/38f6b9288c82dac9a800.js +0 -1
  354. package/assets/esri/core/workers/chunks/3b1848713ee25f750242.js +0 -1
  355. package/assets/esri/core/workers/chunks/42a1e71d09e8583a7327.js +0 -1
  356. package/assets/esri/core/workers/chunks/44f27eac92c5ccc57e12.js +0 -1
  357. package/assets/esri/core/workers/chunks/4941bfd3aae7f6bdac97.js +0 -1
  358. package/assets/esri/core/workers/chunks/4bd2cc65f7db0d261543.js +0 -1
  359. package/assets/esri/core/workers/chunks/4fa230dc6e5e87b0dec1.js +0 -1
  360. package/assets/esri/core/workers/chunks/4fbe2a8d742065cbaea3.js +0 -1
  361. package/assets/esri/core/workers/chunks/4fe4feeb251f2916a339.js +0 -1
  362. package/assets/esri/core/workers/chunks/55eb6a0f1e4569a65f2a.js +0 -1
  363. package/assets/esri/core/workers/chunks/57e04e2d8721bbdc029a.js +0 -1
  364. package/assets/esri/core/workers/chunks/591e459f9fce34f519ca.js +0 -1
  365. package/assets/esri/core/workers/chunks/59514624daf188a8030f.js +0 -1
  366. package/assets/esri/core/workers/chunks/5c09d98b41f71a036e2a.js +0 -1
  367. package/assets/esri/core/workers/chunks/605b9643b1baeff16149.js +0 -1
  368. package/assets/esri/core/workers/chunks/6293e33f304c4952f88c.js +0 -1
  369. package/assets/esri/core/workers/chunks/6e25ef5ad6d6b3f88343.js +0 -1
  370. package/assets/esri/core/workers/chunks/759321045c264bc6964e.js +0 -1
  371. package/assets/esri/core/workers/chunks/7e3f27ebf366d4266350.js +0 -1
  372. package/assets/esri/core/workers/chunks/826072cfc0ac8e36f03c.js +0 -1
  373. package/assets/esri/core/workers/chunks/8ce608013b353155ee5a.js +0 -1
  374. package/assets/esri/core/workers/chunks/8d9d3797c6d62fdfff9d.js +0 -1
  375. package/assets/esri/core/workers/chunks/9b0c2f4311fe9bca370a.js +0 -1
  376. package/assets/esri/core/workers/chunks/9c48d8d17831aa57f8a4.js +0 -1
  377. package/assets/esri/core/workers/chunks/9f21436016ff7a899e79.js +0 -1
  378. package/assets/esri/core/workers/chunks/9f28b2800945903bc165.js +0 -1
  379. package/assets/esri/core/workers/chunks/a27e74117c37f3efcbca.js +0 -1
  380. package/assets/esri/core/workers/chunks/a41ba05c09a59d1eb35f.js +0 -1
  381. package/assets/esri/core/workers/chunks/a5a67216e0d0cee95a55.js +0 -1
  382. package/assets/esri/core/workers/chunks/a93ebd076bc55aa6eab0.js +0 -1
  383. package/assets/esri/core/workers/chunks/aaed35a6414859233678.js +0 -1
  384. package/assets/esri/core/workers/chunks/acd0564ad1544f452f3f.js +0 -1
  385. package/assets/esri/core/workers/chunks/b0f43191a431c9de16e5.js +0 -1
  386. package/assets/esri/core/workers/chunks/b320bb76c7e9998fe53b.js +0 -1
  387. package/assets/esri/core/workers/chunks/ba4571d2637a74a59552.js +0 -1
  388. package/assets/esri/core/workers/chunks/c4090a60d149a5962179.js +0 -1
  389. package/assets/esri/core/workers/chunks/c61c61dac1e8d6188749.js +0 -1
  390. package/assets/esri/core/workers/chunks/c84caf81bfaa4a8b5aa1.js +0 -1
  391. package/assets/esri/core/workers/chunks/c8c8cf43fd640d2f5cb1.js +0 -1
  392. package/assets/esri/core/workers/chunks/d28670cb11164e318e45.js +0 -1
  393. package/assets/esri/core/workers/chunks/d48af7bc06b4bb176534.js +0 -1
  394. package/assets/esri/core/workers/chunks/d56ac52a5288e06365e7.js +0 -1
  395. package/assets/esri/core/workers/chunks/ddca92e18e96ea1c9d89.js +0 -1
  396. package/assets/esri/core/workers/chunks/ded9747ae04ab889d52a.js +0 -1
  397. package/assets/esri/core/workers/chunks/df5afa06c6deb6b40109.js +0 -1
  398. package/assets/esri/core/workers/chunks/df8279e1baf378faf85f.js +0 -1
  399. package/assets/esri/core/workers/chunks/e3434f91f47f551d9e02.js +0 -1
  400. package/assets/esri/core/workers/chunks/eb6c3dd440ede4adf603.js +0 -1
  401. package/assets/esri/core/workers/chunks/edc671b9b83c8e19cb42.js +0 -1
  402. package/assets/esri/core/workers/chunks/f141c9f7f0d9b2322bf6.js +0 -1
  403. package/assets/esri/core/workers/chunks/f7a1f48c53422c6e2028.js +0 -1
  404. package/assets/esri/core/workers/chunks/f7f002ea5ff5fe7f6249.js +0 -1
  405. package/assets/esri/core/workers/chunks/f8e889be4b45f6f0667e.js +0 -1
  406. package/assets/esri/core/workers/chunks/fbd796c88f07bb6755dc.js +0 -1
  407. package/assets/esri/core/workers/chunks/fec3897ed7e8691387ed.js +0 -1
  408. package/processRequest.js +0 -5
  409. package/requestQueue.js +0 -5
  410. package/support/requestPresets.js +0 -5
  411. package/support/requestUtils.js +0 -5
  412. /package/{rest/support → request}/ImageWithType.js +0 -0
  413. /package/{requestConfig.js → request/config.js} +0 -0
  414. /package/{support/requestImageUtils.js → request/image.js} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2568],{35448:(e,t,r)=>{r.d(t,{Eq:()=>n,bV:()=>a,nP:()=>s,r5:()=>o,ti:()=>d,vy:()=>l,wr:()=>i});const n={Regular:0,Provenance:1,Document:2},o={esriFieldTypeSmallInteger:0,esriFieldTypeInteger:1,esriFieldTypeSingle:2,esriFieldTypeDouble:3,esriFieldTypeString:4,esriFieldTypeDate:5,esriFieldTypeOID:6,esriFieldTypeGeometry:7,esriFieldTypeBlob:8,esriFieldTypeRaster:9,esriFieldTypeGUID:10,esriFieldTypeGlobalID:11,esriFieldTypeXML:12,esriFieldTypeBigInteger:13,esriFieldTypeDateOnly:14,esriFieldTypeTimeOnly:15,esriFieldTypeTimestampOffset:16},a={esriGeometryNull:0,esriGeometryPoint:1,esriGeometryMultipoint:2,esriGeometryPolyline:3,esriGeometryPolygon:4,esriGeometryEnvelope:5,esriGeometryAny:7,esriGeometryMultiPatch:9},i={esriMethodHintUNSPECIFIED:0,esriUUIDESRI:1,esriUUIDRFC4122:2},s={esriTypeUNSPECIFIED:0,esriTypeEntity:1,esriTypeRelationship:2,esriTypeBoth:4,esriTypeMetaEntityProvenance:8},d={esriGraphPropertyUNSPECIFIED:0,esriGraphPropertyRegular:1,esriGraphPropertyDocumentName:2,esriGraphPropertyDocumentTitle:3,esriGraphPropertyDocumentUrl:4,esriGraphPropertyDocumentText:5,esriGraphPropertyDocumentKeywords:6,esriGraphPropertyDocumentContentType:7,esriGraphPropertyDocumentMetadata:8,esriGraphPropertyDocumentFileExtension:9,esriGraphPropertyProvenanceInstanceId:10,esriGraphPropertyProvenanceSourceType:11,esriGraphPropertyProvenanceSourceName:12,esriGraphPropertyProvenanceSource:13,esriGraphPropertyProvenanceComment:14,esriGraphPropertyProvenanceTypeName:15,esriGraphPropertyProvenancePropertyName:16},l={esriIdentifierInfoTypeUNSPECIFIED:0,esriIdentifierInfoTypeDatabaseNative:1,esriIdentifierInfoTypeUniformProperty:2}},45724:(e,t,r)=>{r.d(t,{I:()=>d});var n=r(2741),o=r(44208);const a="esri/rest/knowledgeGraph/wasmInterface/";let i,s;async function d(){const e=i??s;if(e)return e;const t=!!(0,o.A)("wasm-simd");return s=l(t),s}async function l(e){if(e){const{default:e}=await r.e(5367).then(r.bind(r,15367)).then(e=>e.a);return e({locateFile:e=>(0,n.s)(a+e)})}const{default:t}=await r.e(9013).then(r.bind(r,29013)).then(e=>e.a);return t({locateFile:e=>(0,n.s)(a+e)})}},62568:(e,t,r)=>{r.r(t),r.d(t,{_checkAuthentication:()=>or,_esriRequestWrapper:()=>nr,_fetchWrapper:()=>tr,_getClientDataCacheCopy:()=>St,_setMaxQueryParsingDurationForTesting:()=>lr,_submitJobWrapper:()=>rr,clearClientDataCache:()=>er,clientDataCache:()=>kt,executeAddGraphFieldIndex:()=>qt,executeAddGraphProperties:()=>Et,executeAddNamedTypes:()=>It,executeApplyEdits:()=>jt,executeDeleteGraphFieldIndex:()=>$t,executeDeleteGraphProperty:()=>Ft,executeDeleteNamedType:()=>Dt,executeFindPaths:()=>Yt,executeFindPathsAsynchronous:()=>Wt,executeQuery:()=>Lt,executeQueryStreaming:()=>Ut,executeSearch:()=>zt,executeSearchStreaming:()=>Jt,executeUpdateGraphProperty:()=>Nt,executeUpdateNamedType:()=>Zt,executeUpdateSearchIndex:()=>Ot,fetchAllClientDataKeys:()=>Kt,fetchAsynchronousFindPathsResultData:()=>Xt,fetchClientDataAtKeys:()=>Vt,fetchKnowledgeGraph:()=>Qt,kgRestServices:()=>Rt,refreshDataModel:()=>Bt,refreshServiceDefinition:()=>Ht});var n,o=r(70333),a=r(43773),i=r(49186),s=r(53966),d=r(74887),l=r(91075),p=r(16930),u=r(31635),c=r(69622),h=r(10107),y=r(56507),g=(r(44208),r(87811),r(64108)),f=r(5443);let w=n=class extends c.A{constructor(e){super(e),this.outSpatialReference=null,this.processExtent=null,this.processSpatialReference=null,this.returnColumnName=!1,this.returnFeatureCollection=!1,this.returnM=!1,this.returnZ=!1}static from(e){return(0,y.PZ)(n,e)}};(0,u.Cg)([(0,h.MZ)({type:p.A})],w.prototype,"outSpatialReference",void 0),(0,u.Cg)([(0,h.MZ)({type:f.A})],w.prototype,"processExtent",void 0),(0,u.Cg)([(0,h.MZ)({type:p.A})],w.prototype,"processSpatialReference",void 0),(0,u.Cg)([(0,h.MZ)({nonNullable:!0})],w.prototype,"returnColumnName",void 0),(0,u.Cg)([(0,h.MZ)({nonNullable:!0})],w.prototype,"returnFeatureCollection",void 0),(0,u.Cg)([(0,h.MZ)({nonNullable:!0})],w.prototype,"returnM",void 0),(0,u.Cg)([(0,h.MZ)({nonNullable:!0})],w.prototype,"returnZ",void 0),w=n=(0,u.Cg)([(0,g.$)("esri.rest.geoprocessor.GPOptions")],w);var m=r(17136),_=r(20437),v=r(25482);let b=class extends v.o{constructor(e){super(e),this.extent=null,this.height=null,this.href=null,this.opacity=1,this.rotation=0,this.scale=null,this.visible=!0,this.width=null}};(0,u.Cg)([(0,h.MZ)({type:f.A})],b.prototype,"extent",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"height",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"href",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"opacity",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"rotation",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"scale",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"visible",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"width",void 0),b=(0,u.Cg)([(0,g.$)("esri.layers.support.MapImage")],b);var C=r(2272),A=r(93223),G=r(2073);let M=class extends v.o{constructor(e){super(e),this.area=0,this.units=null}};(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],M.prototype,"area",void 0),(0,u.Cg)([(0,A.e)(G.UO)],M.prototype,"units",void 0),M=(0,u.Cg)([(0,g.$)("esri.rest.support.ArealUnit")],M);let x=class extends v.o{constructor(e){super(e),this.itemId=null,this.url=null}};(0,u.Cg)([(0,h.MZ)({type:String,json:{read:{source:"itemID"},write:{target:"itemID"}}})],x.prototype,"itemId",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],x.prototype,"url",void 0),x=(0,u.Cg)([(0,g.$)("esri.rest.support.DataFile")],x);var T=r(22671);let P=class extends v.o{constructor(e){super(e),this.distance=0,this.units=null}};(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],P.prototype,"distance",void 0),(0,u.Cg)([(0,A.e)(G.Y8)],P.prototype,"units",void 0),P=(0,u.Cg)([(0,g.$)("esri.rest.support.LinearUnit")],P);var k=r(66552);const S="multi-value-",R=new k.J({GPArealUnit:"areal-unit",GPBoolean:"boolean",GPComposite:"composite",GPDataFile:"data-file",GPDate:"date",GPDouble:"double",GPFeatureRecordSetLayer:"feature-record-set-layer",Field:"field",GPLinearUnit:"linear-unit",GPLong:"long",GPRasterData:"raster-data",GPRasterDataLayer:"raster-data-layer",GPRecordSet:"record-set",GPString:"string",GPValueTable:"value-table","GPMultiValue:GPArealUnit":`${S}areal-unit`,"GPMultiValue:GPBoolean":`${S}boolean`,"GPMultiValue:GPComposite":`${S}composite`,"GPMultiValue:GPDataFile":`${S}data-file`,"GPMultiValue:GPDate":`${S}date`,"GPMultiValue:GPDouble":`${S}double`,"GPMultiValue:GPFeatureRecordSetLayer":`${S}feature-record-set-layer`,"GPMultiValue:Field":`${S}field`,"GPMultiValue:GPLinearUnit":`${S}linear-unit`,"GPMultiValue:GPLong":`${S}long`,"GPMultiValue:GPRasterData":`${S}raster-data`,"GPMultiValue:GPRasterDataLayer":`${S}raster-data-layer`,"GPMultiValue:GPRecordSet":`${S}record-set`,"GPMultiValue:GPString":`${S}string`});let j=class extends v.o{constructor(e){super(e),this.dataType=null,this.paramName=null,this.value=null}};(0,u.Cg)([(0,A.e)(R,{ignoreUnknown:!1})],j.prototype,"dataType",void 0),(0,u.Cg)([(0,h.MZ)()],j.prototype,"paramName",void 0),(0,u.Cg)([(0,h.MZ)()],j.prototype,"value",void 0),j=(0,u.Cg)([(0,g.$)("esri.rest.support.ParameterValue")],j);var I=r(36005);let D=class extends v.o{constructor(e){super(e),this.format=null,this.itemId=null,this.type=null,this.url=null}readType(e){return"ImageService"===e?"image-service":null}};async function Z(e,t){switch(e){case"areal-unit":return M.fromJSON(t);case"boolean":case"double":case"long":case"string":case"value-table":return t;case"date":return new Date(t);case"data-file":return x.fromJSON(t);case"linear-unit":return P.fromJSON(t);case"feature-record-set-layer":if("url"in t)return x.fromJSON(t);if("layerDefinition"in t){const e=new(0,(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(433)]).then(r.bind(r,68654))).default),{layerDefinition:n,featureSet:o}=t;return e.read({layerDefinition:n,featureSet:o},{origin:"portal-item"}),e.spatialReference=p.A.fromJSON(o.spatialReference??n.spatialReference??n.extent.spatialReference),e}return T.A.fromJSON(t);case"record-set":return"url"in t?x.fromJSON(t):T.A.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?b.fromJSON(t.mapImage):D.fromJSON(t);case"field":return _.A.fromJSON(t)}}async function E(e){const t=R.fromJSON(e.dataType),{paramName:r}=e,n=function(e){return e.startsWith(S)}(t)?await async function(e,t){const r=function(e){return e.replace(S,"")}(e),n="composite"===r?t.map(e=>Z(R.fromJSON(e.dataType),e.value)):t.map(e=>Z(r,e));return Promise.all(n)}(t,e.value):await Z(t,e.value);return new j({dataType:t,paramName:r,value:n})}function F(e,t,r){for(const t in e){const r=e[t];Array.isArray(r)?e[t]=JSON.stringify(r.map(e=>F({item:e},!0).item)):r instanceof Date&&(e[t]=r.getTime())}return(0,C.lF)(e,t,r)}(0,u.Cg)([(0,h.MZ)()],D.prototype,"format",void 0),(0,u.Cg)([(0,h.MZ)({json:{name:"itemID",write:!0}})],D.prototype,"itemId",void 0),(0,u.Cg)([(0,h.MZ)()],D.prototype,"type",void 0),(0,u.Cg)([(0,I.w)("type")],D.prototype,"readType",null),(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],D.prototype,"url",void 0),D=(0,u.Cg)([(0,g.$)("esri.rest.support.RasterData")],D);var N,q=r(37807);const $=(0,k.O)()({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"},{ignoreUnknown:!1}),O=1e3;let L=class extends v.o{static{N=this}constructor(e){super(e),this.jobId=null,this.jobStatus=null,this.messages=null,this.progress=null,this.requestOptions=null,this.sourceUrl=null,this._cancelJobTimer=void 0,this._jobCompletionTimer=void 0}async cancelJob(e){const{jobId:t,sourceUrl:r}=this,{path:n}=(0,C.Dl)(r),o={...this.requestOptions,...e,query:{f:"json"}},i=`${n}/jobs/${t}/cancel`,{data:s}=await(0,a.A)(i,o),{messages:l,jobStatus:p,progress:u}=N.fromJSON(s);return this.set({messages:l,jobStatus:p,progress:u}),"job-cancelled"===p?this:new Promise((t,r)=>{(0,d.u7)(o.signal,()=>{this.clearCancelJobTimer(),r((0,d.NK)())}),this.clearCancelJobTimer();const n=()=>{this._cancelJobTimer||r((0,d.NK)()),this.checkJobStatus(e).then(({jobStatus:e})=>{switch(e){case"job-cancelling":default:this._cancelJobTimer=setTimeout(n,O);break;case"job-deleted":case"job-deleting":case"job-executing":case"job-failed":case"job-new":case"job-submitted":case"job-succeeded":case"job-timed-out":case"job-waiting":r(this);break;case"job-cancelled":t(this)}}).catch(e=>{r(e)})};this._cancelJobTimer=setTimeout(n,O)})}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:t}=(0,C.Dl)(this.sourceUrl),r={...this.requestOptions,...e,query:{...e?.query,f:"json"}},n=`${t}/jobs/${this.jobId}`,{data:o}=await(0,a.A)(n,r),{messages:i,jobStatus:s,progress:d}=N.fromJSON(o);return this.set({messages:i,jobStatus:s,progress:d}),this}async fetchResultData(e,t,r){t=w.from(t||{});const{returnColumnName:n,returnFeatureCollection:o,returnM:i,returnZ:s,outSpatialReference:d}=t,{path:l}=(0,C.Dl)(this.sourceUrl),p=F({returnColumnName:n||null,returnFeatureCollection:o||null,returnM:i||null,returnZ:s||null,outSR:d,returnType:"data",f:"json",...r?.query},null),u={...this.requestOptions,...r,query:p},c=`${l}/jobs/${this.jobId}/results/${e}`,{data:h}=await(0,a.A)(c,u);return E(h)}async fetchResultImage(e,t,r){const{path:n}=(0,C.Dl)(this.sourceUrl),o=F({...t.toJSON(),f:"json"}),i={...this.requestOptions,...r,query:o},s=`${n}/jobs/${this.jobId}/results/${e}`,{data:d}=await(0,a.A)(s,i);return E(d)}async fetchResultMapImageLayer(){const{path:e}=(0,C.Dl)(this.sourceUrl),t=e.indexOf("/GPServer/"),n=`${e.slice(0,Math.max(0,t))}/MapServer/jobs/${this.jobId}`;return new(0,(await Promise.all([r.e(3508),r.e(6554),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(957),r.e(893),r.e(7048),r.e(7656)]).then(r.bind(r,7656))).default)({url:n})}async waitForJobCompletion(e={}){const{interval:t=O,signal:r,statusCallback:n,apiKey:o}=e;return new Promise((e,a)=>{(0,d.u7)(r,()=>{this.clearJobCompletionTimer(),a((0,d.NK)())}),this.clearJobCompletionTimer();const i=()=>{this._jobCompletionTimer||a((0,d.NK)()),this.checkJobStatus({query:{token:o}}).then(({jobStatus:r})=>{switch(r){case"job-succeeded":e(this);break;case"job-executing":case"job-new":case"job-submitted":case"job-waiting":n&&n(this),this._jobCompletionTimer=setTimeout(i,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":a(this);break;default:this._jobCompletionTimer=setTimeout(i,t)}}).catch(e=>{a(e)})};this._jobCompletionTimer=setTimeout(i,t)})}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};(0,u.Cg)([(0,h.MZ)()],L.prototype,"jobId",void 0),(0,u.Cg)([(0,A.e)($,{ignoreUnknown:!1})],L.prototype,"jobStatus",void 0),(0,u.Cg)([(0,h.MZ)({type:[q.A]})],L.prototype,"messages",void 0),(0,u.Cg)([(0,h.MZ)()],L.prototype,"progress",void 0),(0,u.Cg)([(0,h.MZ)()],L.prototype,"requestOptions",void 0),(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],L.prototype,"sourceUrl",void 0),L=N=(0,u.Cg)([(0,g.$)("esri.rest.support.JobInfo")],L);let U=class extends c.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1}};(0,u.Cg)([(0,h.MZ)()],U.prototype,"headerKeys",void 0),(0,u.Cg)([(0,h.MZ)()],U.prototype,"outSpatialReference",void 0),(0,u.Cg)([(0,h.MZ)()],U.prototype,"exceededTransferLimit",void 0),U=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],U);let z=class extends c.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new U}};(0,u.Cg)([(0,h.MZ)()],z.prototype,"resultRows",void 0),(0,u.Cg)([(0,h.MZ)()],z.prototype,"resultHeader",void 0),z=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphQueryResult")],z);let J=class extends c.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new U}};(0,u.Cg)([(0,h.MZ)()],J.prototype,"resultRowsStream",void 0),(0,u.Cg)([(0,h.MZ)()],J.prototype,"resultHeader",void 0),J=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],J);let K=class extends v.o{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=!0,this.description="",this.fieldNames=[]}};(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],K.prototype,"name",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],K.prototype,"unique",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],K.prototype,"ascending",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],K.prototype,"description",void 0),(0,u.Cg)([(0,h.MZ)({type:[String],json:{write:!0}})],K.prototype,"fieldNames",void 0),K=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.FieldIndex")],K);let V=class extends v.o{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=!0,this.required=!1,this.defaultVisibility=!0,this.systemMaintained=null,this.role="esriGraphPropertyUNSPECIFIED",this.defaultValue=null}};(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],V.prototype,"name",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],V.prototype,"alias",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],V.prototype,"fieldType",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],V.prototype,"geometryType",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"hasM",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"hasZ",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"nullable",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"editable",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"required",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"defaultVisibility",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"systemMaintained",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],V.prototype,"role",void 0),(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],V.prototype,"defaultValue",void 0),V=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphProperty")],V);let Q=class extends v.o{constructor(e){super(e),this.name=null,this.alias=null,this.role="Regular",this.strict=null,this.properties=[],this.fieldIndexes=[],this.type=null}};(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Q.prototype,"name",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Q.prototype,"alias",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Q.prototype,"role",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"strict",void 0),(0,u.Cg)([(0,h.MZ)({type:[V],json:{write:!0}})],Q.prototype,"properties",void 0),(0,u.Cg)([(0,h.MZ)({type:[K],json:{write:!0}})],Q.prototype,"fieldIndexes",void 0),Q=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphObjectType")],Q);let B=class extends Q{constructor(e){super(e),this.type="entity"}};B=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.EntityType")],B);let H=class extends Q{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],H.prototype,"endPoints",void 0),H=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.RelationshipType")],H);let W=class extends v.o{constructor(e){super(e),this.value=null,this.behavior=null}};(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],W.prototype,"value",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],W.prototype,"behavior",void 0),W=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.SourceTypeValueBehavior")],W);let Y=class extends v.o{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=[],this.entityTypes=[],this.relationshipTypes=[],this.metaEntityTypes=[],this.provenanceSourceTypeValues=[]}};(0,u.Cg)([(0,h.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],Y.prototype,"timestamp",void 0),(0,u.Cg)([(0,h.MZ)({type:p.A,json:{write:!0}})],Y.prototype,"spatialReference",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],Y.prototype,"strict",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Y.prototype,"objectIdField",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Y.prototype,"globalIdField",void 0),(0,u.Cg)([(0,h.MZ)()],Y.prototype,"arcgisManaged",void 0),(0,u.Cg)([(0,h.MZ)()],Y.prototype,"identifierInfo",void 0),(0,u.Cg)([(0,h.MZ)()],Y.prototype,"searchIndexes",void 0),(0,u.Cg)([(0,h.MZ)({type:[B],json:{write:!0}})],Y.prototype,"entityTypes",void 0),(0,u.Cg)([(0,h.MZ)({type:[H],json:{write:!0}})],Y.prototype,"relationshipTypes",void 0),(0,u.Cg)([(0,h.MZ)({type:[B],json:{write:!0}})],Y.prototype,"metaEntityTypes",void 0),(0,u.Cg)([(0,h.MZ)({type:[W],json:{write:!0}})],Y.prototype,"provenanceSourceTypeValues",void 0),Y=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.DataModel")],Y);let X=class extends v.o{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1,this.supportsProvenance=!1}};(0,u.Cg)([(0,h.MZ)({type:[String],json:{write:!0}})],X.prototype,"capabilities",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"supportsSearch",void 0),(0,u.Cg)([(0,h.MZ)({type:[String],json:{write:!0}})],X.prototype,"supportedQueryFormats",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"allowGeometryUpdates",void 0),(0,u.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],X.prototype,"searchMaxRecordCount",void 0),(0,u.Cg)([(0,h.MZ)({type:Object,json:{write:!0}})],X.prototype,"serviceCapabilities",void 0),(0,u.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],X.prototype,"maxRecordCount",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],X.prototype,"description",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],X.prototype,"copyrightText",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],X.prototype,"units",void 0),(0,u.Cg)([(0,h.MZ)({type:p.A,json:{write:!0}})],X.prototype,"spatialReference",void 0),(0,u.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],X.prototype,"currentVersion",void 0),(0,u.Cg)([(0,h.MZ)({type:Object,json:{write:!0}})],X.prototype,"dateFieldsTimeReference",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],X.prototype,"serviceItemId",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"supportsDocuments",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"dataEditingNotSupported",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"schemaEditingNotSupported",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"supportsProvenance",void 0),X=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.ServiceDefinition")],X);let ee=class extends v.o{constructor(e){super(e),this.url=null,this.dataModel=null,this.serviceDefinition=null}};function te(e,t,r){if(0!==e.error_code)throw new i.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function re(e){return e?.error_code?new i.A("knowledgeGraphService:server-or-decoding-error",e.error_message,{errorCode:e.error_code}):void 0}function ne(e,t,r,n=!1){const o=new r.ClientDataFetchRequestEncoder;o.deleteLater();for(const a of e){const e=oe(a,t,r,n);o.add_client_data_fetch_request_parameter(e)}o.encode();const a=o.get_encoding_result();return te(a.error,"knowledge-graph:fetchClientDataAtKeys-encoding-failed","Attempting to encode the fetchClientDataAtKeys failed"),structuredClone(a.get_byte_buffer())}function oe(e,t,r,n){const o=new r.ClientDataKey;o.deleteLater(),o.key_string=e;const a=new r.ClientDataFetchRequestParameter;a.deleteLater(),a.set_key(o);const i=t.get(e);return i&&!n&&(a.v_tag={v_tag:i.version}),a}(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],ee.prototype,"url",void 0),(0,u.Cg)([(0,h.MZ)({type:Y,json:{write:!0}})],ee.prototype,"dataModel",void 0),(0,u.Cg)([(0,h.MZ)({type:X,json:{write:!0}})],ee.prototype,"serviceDefinition",void 0),ee=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.KnowledgeGraph")],ee);var ae=r(45724),ie=r(48526),se=r(86738),de=r(39829),le=r(82799);const pe={exclude:0,include:1};function ue(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(ye(e,t))}),r}function ce(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[n,o]of Object.entries(e))r.set_key_value(n,ye(o,t));return r}function he(e,t){if(e instanceof ie.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];o[0]=e.points.length;let a=0;return e.points.forEach(e=>{e.forEach(e=>{n[a]=e,a++})}),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);if(e instanceof se.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];o[0]=1,n[0]=e.x,n[1]=e.y;let a=2;return e.hasZ&&(n[a]=e.z,a++),e.hasM&&(n[a]=e.m,a++),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);if(e instanceof le.A||e instanceof de.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];let a=[];e instanceof le.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,a=e.paths):e instanceof de.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,a=e.rings);let i=0,s=0;return a.forEach(e=>{let t=0;e.forEach(e=>{t++,e.forEach(e=>{n[s]=e,s++})}),o[i]=t,i++}),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);throw new i.A("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function ye(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof l.A)return he(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(ye(e,t))}),r}return ce(e,t)}var ge=r(35448);function fe(e,t){if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(!("originId"in e)){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))r.set_key_value(n,be(o,t));return e.id&&r.set_id(e.id),r}if("originId"in e&&"destinationId"in e){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))r.set_key_value(n,be(o,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new i.A("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function we(e,t){const r=new t.GraphProperty;return r.deleteLater(),r.name=e.name,r.alias=e.alias??"",r.field_type={value:ge.r5[e.fieldType]},r.geometry_type={value:e.geometryType?ge.bV[e.geometryType]:ge.bV.esriGeometryNull},r.has_m=e.hasM??!1,r.has_z=e.hasZ??!1,r.nullable=e.nullable??!1,r.editable=e.editable,r.required=e.required,r.default_visibility=e.defaultVisibility,r.system_maintained=e.systemMaintained??!1,r.role={value:ge.ti[e.role]},r.default_value=be(e.defaultValue,t),r}function me(e,t){const r=new t.SearchIndexProperties;r.deleteLater();for(const t of e.propertyNames)r.add_search_property_name(t);return r}function _e(e,t,r){r.name=e.name,r.alias=e.alias??"",r.role={value:ge.Eq[e.role]},r.strict=e.strict;for(const n of e.properties){const e=we(n,t);r.add_property(e)}return r}function ve(e,t){return e.hasOwnProperty("alias")&&(t.alias=e.alias),t}function be(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof l.A?he(e,t):null}let Ce=class extends c.A{constructor(e){super(e),this.decoderError=null,this.resultsCount=0,this.results=[],this.updatedKnowledgeGraph=null}};(0,u.Cg)([(0,h.MZ)()],Ce.prototype,"decoderError",void 0),(0,u.Cg)([(0,h.MZ)()],Ce.prototype,"resultsCount",void 0),(0,u.Cg)([(0,h.MZ)()],Ce.prototype,"results",void 0),(0,u.Cg)([(0,h.MZ)()],Ce.prototype,"updatedKnowledgeGraph",void 0),Ce=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphDataModelOperationResult")],Ce);const Ae=Ce;let Ge=class extends Ae{constructor(e){super(e)}};Ge=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphAddFieldIndexResult")],Ge);const Me=Ge;let xe=class extends Ae{constructor(e){super(e),this.entityAddResultsCount=0,this.relationshipAddResultsCount=0,this.entityAddResults=[],this.relationshipAddResults=[]}};(0,u.Cg)([(0,h.MZ)()],xe.prototype,"entityAddResultsCount",void 0),(0,u.Cg)([(0,h.MZ)()],xe.prototype,"relationshipAddResultsCount",void 0),(0,u.Cg)([(0,h.MZ)()],xe.prototype,"entityAddResults",void 0),(0,u.Cg)([(0,h.MZ)()],xe.prototype,"relationshipAddResults",void 0),xe=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphAddNamedTypesResult")],xe);const Te=xe;let Pe=class extends Ae{constructor(e){super(e)}};Pe=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphAddPropertyResult")],Pe);const ke=Pe;let Se=class extends Ae{constructor(e){super(e)}};Se=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphDeleteFieldIndexResult")],Se);const Re=Se;let je=class extends Ae{constructor(e){super(e)}};je=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphDeleteNamedTypeResult")],je);const Ie=je;let De=class extends Ae{constructor(e){super(e)}};De=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphDeletePropertyResult")],De);const Ze=De;let Ee=class extends Ae{constructor(e){super(e)}};Ee=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphUpdateNamedTypesResult")],Ee);const Fe=Ee;let Ne=class extends Ae{constructor(e){super(e)}};Ne=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphUpdatePropertyResult")],Ne);const qe=Ne;let $e=class extends Ae{constructor(e){super(e)}};$e=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphUpdateSearchIndexResult")],$e);const Oe=$e;function Le(e,t){const r=[];for(let n=0;n<t;n++){const t=e.get_result_at(n);r.push({name:t.get_name(),error:re(t.get_error())})}return r}function Ue(e){const t=e.get_results_count(),r=e.get_entity_type_add_results_count(),n=e.get_relationship_type_add_results_count(),o=new Te({resultsCount:t,results:Le(e,t),decoderError:re(e.error),entityAddResultsCount:r,relationshipAddResultsCount:n});for(let t=0;t<r;t++){const r=e.get_entity_type_add_results_at(t),n=r.get_name(),a=r.get_error();o.entityAddResults.push({name:n,error:re(a)})}for(let t=0;t<n;t++){const r=e.get_relationship_type_add_results_at(t),n=r.get_name(),a=r.get_error();o.relationshipAddResults.push({name:n,error:re(a)})}return o}function ze(e){const t=e.get_results_count();return new Fe({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function Je(e){const t=e.get_results_count();return new Ie({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function Ke(e){const t=e.get_results_count();return new ke({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function Ve(e){const t=e.get_results_count();return new Ze({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function Qe(e){const t=e.get_results_count();return new qe({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function Be(e){const t=e.get_results_count();return new Oe({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function He(e){const t=e.get_results_count();return new Me({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function We(e){const t=e.get_results_count();return new Re({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}var Ye=r(93637);let Xe=class extends c.A{constructor(e){super(e),this.name=null,this.supportedCategory="esriTypeUNSPECIFIED",this.analyzers=[],this.searchProperties=new Map}};(0,u.Cg)([(0,h.MZ)()],Xe.prototype,"name",void 0),(0,u.Cg)([(0,h.MZ)()],Xe.prototype,"supportedCategory",void 0),(0,u.Cg)([(0,h.MZ)()],Xe.prototype,"analyzers",void 0),(0,u.Cg)([(0,h.MZ)()],Xe.prototype,"searchProperties",void 0),Xe=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.SearchIndex")],Xe);let et=!1;function tt(e){return e.deleteLater(),new B(nt(e))}function rt(e){return e.deleteLater(),new K({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:dt(e.fields)})}function nt(e){return{name:e.name,alias:e.alias,role:(0,Ye.i7)(ge.Eq,e.role.value),strict:e.strict,properties:lt(e.properties),fieldIndexes:pt(e.field_indexes)}}function ot(e){return e.deleteLater(),new V({alias:e.alias,name:e.name,fieldType:(0,Ye.i7)(ge.r5,e.field_type.value)??void 0,geometryType:(0,Ye.i7)(ge.bV,e.geometry_type.value)??null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:(0,Ye.i7)(ge.ti,e.role.value),defaultValue:e.default_value})}function at(e){e.deleteLater();const t=nt(e),r=[];for(let t=0;t<e.end_points.size();t++){const n=e.end_points.get(t);r.push({originEntityType:n.origin_entity_type,destinationEntityType:n.dest_entity_type})}return e.end_points.delete(),new H(Object.assign({endPoints:r},t))}function it(e){return new W({behavior:e.behavior,value:e.value})}function st(e){const t=[];for(let r=0;r<e.size();r++)t.push(tt(e.get(r)));return e.delete(),t}function dt(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function lt(e){const t=[];for(let r=0;r<e.size();r++){const n=ot(e.get(r));"esriFieldTypeBigInteger"===n.fieldType&&(et=!0),t.push(n)}return e.delete(),t}function pt(e){const t=[];for(let r=0;r<e.size();r++)t.push(rt(e.get(r)));return e.delete(),t}function ut(e){const t=[];for(let r=0;r<e.size();r++)t.push(at(e.get(r)));return e.delete(),t}function ct(e){const t=[];for(let r=0;r<e.size();r++){const n=e.get(r);n.deleteLater(),t.push(it(n))}return e.delete(),t}function ht(e){const t=[];for(let r=0;r<e.size();r++){const n=new Xe,o=e.get(r);n.name=o.name,n.supportedCategory=(0,Ye.i7)(ge.nP,o.supported_category.value);const a=o.analyzers.size();for(let e=0;e<a;e++)n.analyzers.push({name:o.analyzers.get(e).name});o.analyzers.delete();for(let e=0;e<o.search_properties.keys().size();e++){const t=o.search_properties.keys().get(e),r=o.search_properties.get(t),a=[];for(let e=0;e<r.property_names.size();e++)a.push(r.property_names.get(e));n.searchProperties.set(t,{propertyNames:a})}t.push(n)}return e.delete(),t}var yt=r(25927),gt=(r(77901),r(40662)),ft=r(42095),wt=r(23150);function mt(e,t){const r={paths:[],hasM:!1,hasZ:!1},n=_t(e,r),{coords:o,geometry_type:a,lengths:s}=e;if(a.value!==t)throw new i.A("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");let d=0;return s.forEach(e=>{const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e[t]=o[d],d++;t.push(e)}r.paths.push(t)}),r}function _t(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}const vt=()=>s.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors");function bt(e,t,r){return((e,t,r)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case 1:return function(e,t){const r={spatialReference:t};let n=2;_t(e,r);const o=e.coords;return r.x=o[0],r.y=o[1],e.has_z&&(r.z=o[n],n++),e.has_m&&(r.m=o[n]),new se.A(r)}(e,r);case 2:return function(e,t){const r={spatialReference:t},n=_t(e,r),o=e.lengths,a=e.coords,i=o[0];r.points=[];let s=0;for(let e=0;e<i;e++){const e=[];for(let t=0;t<n;t++)e[t]=a[s],s++;r.points.push(e)}return new ie.A(r)}(e,r);case 3:return function(e,t){const{paths:r,hasM:n,hasZ:o}=mt(e,3);return new le.A({paths:r,hasM:n,hasZ:o,spatialReference:t})}(e,r);case 4:return function(e,t){const{paths:r,hasM:n,hasZ:o}=mt(e,4);return new de.A({rings:r,hasM:n,hasZ:o,spatialReference:t})}(e,r);case 5:case 7:return vt().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;default:return vt().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return vt().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case 0:return function(e,t,r){return new gt.A(At(e,t,r))}(e,t,r);case 1:return Ct(e,t,r);case 2:return Gt(e,t,r);case 3:return function(e,t,r){const n=e.entity_count(),o=e.relationship_count(),a=[];for(let i=0;i<n;i++)a.push(Ct(e.get_entity_at(i),t,r)),i<o&&a.push(Gt(e.get_relationship_at(i),t,r));return new ft.A({path:a})}(e,t,r);case 4:return function(e,t,r){const n=[],o=e.count();for(let a=0;a<o;a++){const o=e.get_value_at(a);n.push(bt(o,t,r))}return n}(e,t,r);default:return vt().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}})(e,t,r)}function Ct(e,t,r){const n=e.type_name,o=At(e,t,r),a=e.get_id();return new yt.A(Object.assign({typeName:n,id:a},o))}function At(e,t,r){const n={},o=e.key_count();for(let a=0;a<o;a++)n[e.get_key_at(a)]=bt(e.get_value_at(a),t,r);return{properties:n}}function Gt(e,t,r){const n=e.type_name,o=At(e,t,r);return new wt.A(Object.assign({typeName:n,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},o))}function Mt(e){const t=[];for(let r=0;r<e.get_header_keys().size();r++)t.push(e.get_header_keys().get(r));const r=new p.A(e.get_out_sr());return new U({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit()})}let xt=class extends c.A{constructor(e){super(e),this.hasError=!1,this.error=null,this.editResults=[],this.cascadeRelationshipDeleteResults=[],this.cascadeProvenanceDeleteResults=[]}};(0,u.Cg)([(0,h.MZ)()],xt.prototype,"hasError",void 0),(0,u.Cg)([(0,h.MZ)()],xt.prototype,"error",void 0),(0,u.Cg)([(0,h.MZ)()],xt.prototype,"editResults",void 0),(0,u.Cg)([(0,h.MZ)()],xt.prototype,"cascadeRelationshipDeleteResults",void 0),(0,u.Cg)([(0,h.MZ)()],xt.prototype,"cascadeProvenanceDeleteResults",void 0),xt=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],xt);const Tt=xt;function Pt(e){const t=e.has_error(),r=new Tt({hasError:t,error:t?re(e.error):null}),n=e.get_edit_results_count();for(let t=0;t<n;t++){const n=e.get_edit_results_at(t);n.deleteLater();const o=e.get_edit_results_type_name_at(t),a=[],i=[],s=[],d=n.get_add_results_count(),l=n.get_update_results_count(),p=n.get_delete_results_count();for(let e=0;e<d;e++){const t=n.get_add_result_at(e);t.deleteLater(),a.push({id:t.id,error:re(t.error)})}for(let e=0;e<l;e++){const t=n.get_update_result_at(e);t.deleteLater(),i.push({id:t.id,error:re(t.error)})}for(let e=0;e<p;e++){const t=n.get_delete_result_at(e);t.deleteLater(),s.push({id:t.id,error:re(t.error)})}r.editResults.push({typeName:o,adds:a,updates:i,deletes:s})}const o=e.get_cascaded_rel_deletes_count();for(let t=0;t<o;t++){const n=e.get_cascaded_rel_deletes_at(t);n.deleteLater();const o=e.get_cascaded_rel_deletes_type_name_at(t),a=[];for(let e=0;e<n.get_count();e++){const t=n.get_result_at(e);t.deleteLater(),a.push({id:t.id,originId:t.origin_id,destinationId:t.dest_id,error:re(t.error)})}r.cascadeRelationshipDeleteResults.push({typeName:o,cascadeRelationshipDeletes:a})}if(e.has_cascading_provenance_deletes()){const t=e.get_cascading_provenance_deletes();t.deleteLater();const n=t.get_count();for(let e=0;e<n;e++){const n=t.get_result_at(e);n.deleteLater(),r.cascadeProvenanceDeleteResults.push({id:n.id,error:re(n.error)})}}return r}const kt=new Map,St=()=>new Map(kt.entries()),Rt={fetchKnowledgeGraph:async e=>{const t=new ee({url:e}),r=[];return r.push(Bt(t)),r.push(Ht(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await cr(e)},refreshServiceDefinition:async e=>{const t=(await(0,a.A)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new X(t),e.serviceDefinition},executeFindPathsAsynchronous:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new i.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");const n=r[0],o=(await nr(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,a=`/rest/services/${o&&o<12?"System":"Utilities"}/KnowledgeGraphServerToolsAsync/GPServer/ServerFilteredFindPaths`;return await rr(`${n}${a}`,{in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:e.config.toJSON(),result_type:"STRING"},{},t)},executeFindPaths:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new i.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");const n=r[0],o=(await nr(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,a=`/rest/services/${o&&o<12?"System":"Utilities"}/KnowledgeGraphServerTools/GPServer/ServerFilteredFindPaths/execute`,s=await nr(`${n}${a}`,{method:"post",query:{f:"pjson",in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:JSON.stringify(e.config),result_type:"STRING"},...t});if(s.data.results.length<1)throw new i.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results returned",s);let d;for(const e of s.data.results)if("out_results_string"===e.paramName){d=e.value;break}if(!d)throw new i.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results were returned on the expected paramater out_results_string",s);return d},fetchAsynchronousFindPathsResultData:async(e,t)=>(await e.fetchResultData("out_results_string",null,t)).value,executeQueryStreaming:async(e,t,r)=>{const n=`${e.url}/graph/query`;await or(e);const o=await ir(n,r);if(!e.serviceDefinition?.supportsProvenance&&"include"===t.provenanceBehavior)throw new i.A("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");o.data.body=await async function(e,t){const r=await(0,ae.I)(),n=new r.GraphQueryRequestEncoder;if(n.deleteLater(),e.outputSpatialReference?n.output_spatial_reference={wkid:e.outputSpatialReference.wkid,latestWkid:e.outputSpatialReference.latestWkid,vcsWkid:e.outputSpatialReference.vcsWkid,latestVcsWkid:e.outputSpatialReference.latestVcsWkid,wkt:e.outputSpatialReference.wkt??""}:n.output_spatial_reference=r.SpatialReferenceUtil.WGS84(),n.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,o]of Object.entries(e.bindParameters))ar(t,o,n,r);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,n);else{if(t.dataModel||await Bt(t),4326!==t.dataModel?.spatialReference?.wkid)throw new i.A("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");n.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,n,r),e.provenanceBehavior&&function(e,t){t.provenance_behavior={value:pe[e]}}(e.provenanceBehavior,n);try{n.encode()}catch(e){throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const o=n.get_encoding_result();if(0!==o.error.error_code)throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:o.error.error_code,errorMessage:o.error.error_message});return structuredClone(o.get_byte_buffer())}(t,e);const a=await tr(o.data.url,o.data);if(e.dataModel){const t=await ur(a,e.dataModel);return new J({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new i.A("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const n=`${e.url}/graph/applyEdits`;await or(e);const o=await ir(n,r);return o.data.body=await async function(e,t){if(t.dataModel||await Bt(t),!t.dataModel)throw new i.A("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const r=await(0,ae.I)(),n=!!e.options?.cascadeDelete,o=!!e.options?.cascadeProvenanceDelete,a=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());a.deleteLater(),a.cascade_delete=n,a.cascade_delete_provenance=o;try{let t;e.entityAdds?.forEach(e=>{t=a.add_entity(fe(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")}),e.relationshipAdds?.forEach(e=>{if(!e.originId||!e.destinationId)throw new i.A("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=a.add_relationship(fe(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")}),e.entityUpdates?.forEach(e=>{if(!e.id)throw new i.A("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=a.update_entity(fe(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")}),e.relationshipUpdates?.forEach(e=>{if(!e.id)throw new i.A("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=a.update_relationship(fe(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")}),e.entityDeletes?.forEach(e=>{if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=a.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach(e=>{t.delete_by_id(e)})}),e.relationshipDeletes?.forEach(e=>{if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=a.make_delete_helper(e.typeName,!1);e.ids?.forEach(e=>{t.delete_by_id(e)})}),a.encode()}catch(e){throw new i.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const s=a.get_encoding_result();return te(s.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(s.get_byte_buffer())}(t,e),async function(e){return sr(e,(await(0,ae.I)()).GraphApplyEditsDecoder,Pt)}(await tr(o.data.url,o.data))},executeAddNamedTypes:async(e,t,r)=>{if(!t.newEntityTypes?.length&&!t.newRelationshipTypes?.length)throw new i.A("knowledge-graph:no-arguments","The operation to add types to the data model contained no values");const n=`${e.url}/dataModel/edit/namedTypes/add`;await or(e);const o=await ir(n,r);o.data.body=await async function(e){const t=await(0,ae.I)(),r=new t.GraphNamedObjectTypeAddsRequestEncoder;r.deleteLater(),e.newEntityTypes?.forEach(e=>{r.add_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),_e(e,t,r)}(e,t))}),e.newRelationshipTypes?.forEach(e=>{r.add_relationship_type(function(e,t){const r=new t.RelationshipType;r.deleteLater();for(const n of e.endPoints){const e=new t.EndPoint;e.deleteLater(),e.origin_entity_type=n.originEntityType,e.dest_entity_type=n.destinationEntityType,r.add_end_point(e)}return _e(e,t,r)}(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed",{error:e})}const n=r.get_encoding_result();return te(n.error,"knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed"),structuredClone(n.get_byte_buffer())}(t);const a=await tr(o.data.url,o.data),s=await async function(e){return sr(e,(await(0,ae.I)()).GraphNamedObjectTypeAddsResponseDecoder,Ue)}(a);return s.updatedKnowledgeGraph=await Qt(e.url),s},executeDeleteNamedType:async(e,t,r)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to delete a named type from the data model contained no value");const n=`${e.url}/dataModel/edit/namedTypes/${t}/delete`;await or(e);const o=await ir(n,r);o.data.body="";const a=await tr(o.data.url,o.data),s=await async function(e){return sr(e,(await(0,ae.I)()).GraphNamedObjectTypeDeleteResponseDecoder,Je)}(a);return s.updatedKnowledgeGraph=await Qt(e.url),s},executeUpdateNamedType:async(e,t,r,n)=>{if(!t&&!Object.keys(r).length)throw new i.A("knowledge-graph:no-arguments","The operation to update types in the data model contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/update`;await or(e);const a=await ir(o,n);a.data.body=await async function(e,t,r){const n=await(0,ae.I)(),o=new n.GraphNamedObjectTypeUpdateRequestEncoder;if(o.deleteLater(),r.entityTypes.some(e=>e.name===t))o.update_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),ve(e,r)}(e,n));else{if(!r.relationshipTypes.some(e=>e.name===t))throw new i.A("knowledge-graph:updateNamedType-encoding-failed","The named type you are trying to update does not exist in the data model");o.update_relationship_type(function(e,t){const r=new t.RelationshipType;return r.deleteLater(),ve(e,r)}(e,n))}o.update_alias=e.hasOwnProperty("alias");try{o.encode()}catch(e){throw new i.A("knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed",{error:e})}const a=o.get_encoding_result();return te(a.error,"knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed"),structuredClone(a.get_byte_buffer())}(r,t,e.dataModel);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphNamedObjectTypeUpdateResponseDecoder,ze)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeAddGraphProperties:async(e,t,r,n)=>{if(!t&&!r.length)throw new i.A("knowledge-graph:no-arguments","The operation to add properties to the data model contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/fields/add`;await or(e);const a=await ir(o,n);a.data.body=await async function(e){const t=await(0,ae.I)(),r=new t.GraphPropertyAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_graph_property(we(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed",{error:e})}const n=r.get_encoding_result();return te(n.error,"knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed"),structuredClone(n.get_byte_buffer())}(r);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphPropertyAddsResponseDecoder,Ke)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeDeleteGraphProperty:async(e,t,r,n)=>{if(!t&&!r)throw new i.A("knowledge-graph:no-arguments","The operation to delete property contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/fields/delete`;await or(e);const a=await ir(o,n);a.data.body=await async function(e){const t=new((await(0,ae.I)()).GraphPropertyDeleteRequestEncoder);t.deleteLater(),t.field_name=e;try{t.encode()}catch(e){throw new i.A("knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed",{error:e})}const r=t.get_encoding_result();return te(r.error,"knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed"),structuredClone(r.get_byte_buffer())}(r);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphPropertyDeleteResponseDecoder,Ve)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeUpdateGraphProperty:async(e,t,r,n,o)=>{if(!t&&!r&&!Object.keys(n).length)throw new i.A("knowledge-graph:no-arguments","The operation to update properties in the data model contained missing or empty values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/fields/update`;await or(e);const s=await ir(a,o);s.data.body=await async function(e,t){const r=await(0,ae.I)(),n=new r.GraphPropertyUpdateRequestEncoder;n.deleteLater(),n.update_graph_property(function(e,t){const r=new t.GraphProperty;return r.deleteLater(),e.hasOwnProperty("alias")&&(r.alias=e.alias),e.hasOwnProperty("editable")&&(r.editable=e.editable),e.hasOwnProperty("required")&&(r.required=e.required),e.hasOwnProperty("defaultVisibility")&&(r.default_visibility=e.defaultVisibility),e.hasOwnProperty("defaultValue")&&(r.default_value=be(e.defaultValue,t)),r}(t,r)),n.set_property_name(e),n.update_alias=t.hasOwnProperty("alias"),n.update_editable=t.hasOwnProperty("editable"),n.update_required=t.hasOwnProperty("required"),n.update_visible=t.hasOwnProperty("defaultVisibility"),n.update_default_value=t.hasOwnProperty("defaultValue");try{n.encode()}catch(e){throw new i.A("knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed",{error:e})}const o=n.get_encoding_result();return te(o.error,"knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed"),structuredClone(o.get_byte_buffer())}(r,n);const d=await tr(s.data.url,s.data),l=await async function(e){return sr(e,(await(0,ae.I)()).GraphPropertyUpdateResponseDecoder,Qe)}(d);return l.updatedKnowledgeGraph=await Qt(e.url),l},executeAddGraphFieldIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/add`;await or(e);const a=await ir(o,n);a.data.body=await async function(e){const t=await(0,ae.I)(),r=new t.GraphIndexAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_field_index(function(e,t){const r=new t.FieldIndex;r.deleteLater(),r.name=e.name,r.unique=e.unique,r.ascending=e.ascending,r.description=e.description??"";for(const t of e.fieldNames)r.add_field(t);return r}(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed",{error:e})}const n=r.get_encoding_result();return te(n.error,"knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed"),structuredClone(n.get_byte_buffer())}(r);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphIndexAddsResponseDecoder,He)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeDeleteGraphFieldIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/delete`;await or(e);const a=await ir(o,n);a.data.body=await async function(e){const t=new((await(0,ae.I)()).GraphIndexDeleteRequestEncoder);t.deleteLater(),e.forEach(e=>{t.add_index_name(e)});try{t.encode()}catch(e){throw new i.A("knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed",{error:e})}const r=t.get_encoding_result();return te(r.error,"knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed"),structuredClone(r.get_byte_buffer())}(r);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphIndexDeleteResponseDecoder,We)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeUpdateSearchIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!Object.keys(r.addSearchProperties??{}).length&&!Object.keys(r.removeSearchProperties??{}).length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty properties values");const o=`${e.url}/dataModel/searchIndex/update`;await or(e);const a=await ir(o,n);a.data.body=await async function(e,t){const r=await(0,ae.I)(),n=new r.GraphUpdateSearchIndexRequestEncoder;n.deleteLater(),t.hasOwnProperty("addSearchProperties")&&n.insert_add_search_property(e,me(t.addSearchProperties,r)),t.hasOwnProperty("removeSearchProperties")&&n.insert_delete_search_property(e,me(t.removeSearchProperties,r));try{n.encode()}catch(e){throw new i.A("knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed",{error:e})}const o=n.get_encoding_result();return te(o.error,"knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed"),structuredClone(o.get_byte_buffer())}(t,r);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphUpdateSearchIndexResponseDecoder,Be)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeQuery:async(e,t,r)=>{const n=`${e.url}/graph/query`,o=await(0,a.A)(n,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),s=o.getHeader?.("content-type"),d=o.data;if(s?.includes("application/x-protobuf")){const t=new((await(0,ae.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=pr({wasmQueryDecoder:t,newArrayBufferToParse:d,dataModel:e.dataModel});return new z({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:o.data})},executeSearch:async(e,t,r)=>{const n="provenance"===t.typeCategoryFilter?"metaEntityProvenance":t.typeCategoryFilter,o=`${e.url}/graph/search`,s=await(0,a.A)(o,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:n,...r?.query},signal:r?.signal,timeout:r?.timeout}),d=s.getHeader?.("content-type"),l=s.data;if(d?.includes("application/x-protobuf")){const t=new((await(0,ae.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=pr({wasmQueryDecoder:t,newArrayBufferToParse:l,dataModel:e.dataModel});return new z({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:d,data:s.data})},executeSearchStreaming:async(e,t,r)=>{const n=`${e.url}/graph/search`;await or(e);const o=await ir(n,r);o.data.body=await async function(e){const t=await(0,ae.I)(),r=new t.GraphSearchRequestEncoder;r.deleteLater(),r.search_query=e.searchQuery;const n="provenance"===e.typeCategoryFilter?"meta_entity_provenance":e.typeCategoryFilter;if(r.type_category_filter=t.esriNamedTypeCategory[n],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(ue(e.idsFilter,t))}catch(e){throw new i.A("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach(e=>{r.add_named_type_filter(e)});try{r.encode()}catch(e){throw new i.A("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const o=r.get_encoding_result();if(0!==o.error.error_code)throw new i.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:o.error.error_code,errorMessage:o.error.error_message});return structuredClone(o.get_byte_buffer())}(t);const a=await tr(o.data.url,o.data);if(e.dataModel){const t=await ur(a,e.dataModel);return new J({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},fetchClientDataAtKeys:async(e,t,r={ignoreCache:!1})=>{if(!t.length)return new Map;let n=kt.get(e.url||"");n||(n=new Map,kt.set(e.url||"",n));const o=new Map(n.entries()),a=`${e.url}/clientData/fetch`;t=Array.from(new Set(t));const s=await(0,ae.I)(),d=ne(t,n,s,r.ignoreCache),l=await ir(a,r.requestOptions);l.data.body=d;const p=await tr(l.data.url,l.data),u=p.headers.get("content-type");if(u?.includes("application/x-protobuf")){const e=new s.ClientDataFetchResponseDecoder;e.deleteLater();const t=await p.arrayBuffer();return e.decode(new Uint8Array(t)),e.has_error()&&te(e.error,"knowledge-graph:fetchClientDataAtKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e,t,r,n=!1){const o=new Map;for(let a=0;a<e.get_results_count();a++){const i=e.get_result_at(a);if(2!==i.get_fetch_result_case().value||0!==i.error().error_code){const e=i.get_key().key_string;r.has(e)&&t.delete(e);continue}const s=i.get_value(),d=i.get_key().key_string,l=r.get(d);let p;if(2===s.get_data_case().value&&l)p=l.value;else{if(1!==s.get_data_case().value)continue;{p=s.get_data().client_data_string;const e=i.get_value().get_v_tag().v_tag;n||t.set(d,{key:d,version:e,value:p})}}o.set(d,p)}return o}(e,n,o,r.ignoreCache)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching client data",{responseType:u,data:p})},fetchAllClientDataKeys:async(e,t)=>{const r=`${e.url}/clientData`,n=await(0,a.A)(r,{responseType:"array-buffer",query:{f:"pbf"},signal:t?.signal,timeout:t?.timeout}),o=n.getHeader?.("content-type"),s=n.data;if(o?.includes("application/x-protobuf")){const e=new((await(0,ae.I)()).ClientDataKeysResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(s)),e.has_error()&&te(e.error,"knowledge-graph:fetchAllClientDataKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e){const t=e.get_keys(),r=new Array;for(let e=0;e<t.get_keys_count();e++){const n=t.get_key_at(e);1===n.get_client_data_key_type().value&&r.push(n.key_string)}return r}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:o,data:n.data})},clearClientDataCache:()=>kt.clear(),_fetchWrapper:async(e,t)=>fetch(e,t),_submitJobWrapper:async(e,t,r,n)=>async function(e,t,r,n){return r=w.from(r||{}),async function(e,t,r,n,o){const i={},s={},d=[];return function(e,t,r){for(const n in e){const o=e[n];if(o&&"object"==typeof o&&o instanceof T.A){const{features:e}=o;r[n]=[t.length,t.length+e.length],e.forEach(e=>{t.push(e.geometry)})}}}(n,d,i),(0,m.el)(d).then(d=>{const{outSpatialReference:l,processExtent:p,processSpatialReference:u,returnColumnName:c,returnFeatureCollection:h,returnM:y,returnZ:g}=r,{path:f}=(0,C.Dl)(e);for(const e in i){const[t,r]=i[e];s[e]=d.slice(t,r)}const w=l?l.wkid||l:null,m=u?u.wkid||u:null,_="execute"===t?{returnColumnName:c||void 0,returnFeatureCollection:h||void 0,returnM:y||void 0,returnZ:g||void 0}:null,v=F({...p?{context:{extent:p,outSR:w,processSR:m}}:{"env:outSR":w,"env:processSR":m},...n,..._,f:"json"},null,s),b={...o,query:v};return(0,a.A)(`${f}/${t}`,b)})}(e,"submitJob",r,t??{},n).then(({data:t})=>{const r=L.fromJSON(t);return r.sourceUrl=e,r})}(e,t,r,n),_esriRequestWrapper:async(e,t)=>(0,a.A)(e,t)};async function jt(e,t,r){return Rt.executeApplyEdits(e,t,r)}async function It(e,t,r){return Rt.executeAddNamedTypes(e,t,r)}async function Dt(e,t,r){return Rt.executeDeleteNamedType(e,t,r)}async function Zt(e,t,r,n){return Rt.executeUpdateNamedType(e,t,r,n)}async function Et(e,t,r,n){return Rt.executeAddGraphProperties(e,t,r,n)}async function Ft(e,t,r,n){return Rt.executeDeleteGraphProperty(e,t,r,n)}async function Nt(e,t,r,n,o){return Rt.executeUpdateGraphProperty(e,t,r,n,o)}async function qt(e,t,r,n){return Rt.executeAddGraphFieldIndex(e,t,r,n)}async function $t(e,t,r,n){return Rt.executeDeleteGraphFieldIndex(e,t,r,n)}async function Ot(e,t,r,n){return Rt.executeUpdateSearchIndex(e,t,r,n)}async function Lt(e,t,r){return Rt.executeQuery(e,t,r)}async function Ut(e,t,r){return Rt.executeQueryStreaming(e,t,r)}async function zt(e,t,r){return Rt.executeSearch(e,t,r)}async function Jt(e,t,r){return Rt.executeSearchStreaming(e,t,r)}function Kt(e,t){return Rt.fetchAllClientDataKeys(e,t)}function Vt(e,t,r){return Rt.fetchClientDataAtKeys(e,t,r)}async function Qt(e){return Rt.fetchKnowledgeGraph(e)}async function Bt(e){return Rt.refreshDataModel(e)}async function Ht(e){return Rt.refreshServiceDefinition(e)}async function Wt(e,t){return Rt.executeFindPathsAsynchronous(e,t)}async function Yt(e,t){return Rt.executeFindPaths(e,t)}async function Xt(e,t){return Rt.fetchAsynchronousFindPathsResultData(e,t)}function er(){return Rt.clearClientDataCache()}async function tr(e,t){return Rt._fetchWrapper(e,t)}async function rr(e,t,r,n){return Rt._submitJobWrapper(e,t,r,n)}async function nr(e,t){return Rt._esriRequestWrapper(e,t)}async function or(e){const t=o.id?.findCredential(e.url);t||(e.dataModel?await cr(e):await Bt(e))}function ar(e,t,r,n){null==t?r.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?r.set_param_key_value(e,t):t instanceof l.A?r.set_param_key_value(e,he(t,n)):Array.isArray(t)?r.set_param_key_value(e,ue(t,n)):r.set_param_key_value(e,ce(t,n))}async function ir(e,t){return(0,a.A)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}async function sr(e,t,r){const n=e.headers.get("content-type");if(n?.includes("application/x-protobuf")){const n=await e.arrayBuffer(),o=new t;try{return o.decode(new Uint8Array(n)),r(o)}finally{o.deleteLater()}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:await e.text()})}let dr=50;function lr(e){dr=e}function pr({wasmQueryDecoder:e,newArrayBufferToParse:t,dataModel:r,decodedHeader:n,limitMaxProcessingTime:o=!1}){t&&e.push_buffer(new Uint8Array(t));const a=[];let s,d,l=0;const u=Date.now();let c=!0;for(;e.next_row();){s&&d||(s=n??Mt(e),d=s.outSpatialReference??new p.A({wkid:4326})),l||(l=e.get_header_keys().size());const t=new Array(l);for(let n=0;n<l;n++){const o=e.get_value(n);t[n]=bt(o,r,d)}if(a.push(t),o&&Date.now()-u>dr){c=!1;break}}if(e.has_error())throw new i.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - inner row decoding",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return{resultHeader:s,resultRows:a,parsedAllResultsFromBuffer:c}}async function ur(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),n=new((await(0,ae.I)()).GraphQueryDecoder);let o,a,l;n.deleteLater();const p=new Promise((e,t)=>{a=e,l=t});let u=!1,c=null;const h=new ReadableStream({pull:async function e(p){if(!r){const e=new i.A("knowledge-graph:stream-decoding-error","Error reading from stream - reader is undefined");throw l(e),e}const{done:h,value:y}=c?{done:!1,value:null}:await r.read().catch(e=>{throw l(e),r.releaseLock(),e});y&&(c=y);try{if(h){let e;if(n.has_error()?e=new i.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - query stream done",{errorCode:n.error.error_code,errorMessage:n.error.error_message}):u||a(new U),r.releaseLock(),e)throw p.error(e),l(e),e;return void p.close()}const{resultHeader:s,resultRows:d,parsedAllResultsFromBuffer:g}=pr({wasmQueryDecoder:n,newArrayBufferToParse:y,dataModel:t,decodedHeader:o,limitMaxProcessingTime:!0});return g&&(c=null),!o&&s&&(o=s,a(s),u=!0),d.length>0?void p.enqueue(d):await e(p)}catch(e){throw s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),l(e),r.releaseLock(),(0,d.zf)(e)?e:new i.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}});return{readableStream:h,resultHeader:await p}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function cr(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,a.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),n=r.getHeader?.("content-type"),o=r.data;if(n?.includes("application/x-protobuf")){const e=(await(0,ae.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(o));if(!e)throw new i.A("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){e.deleteLater(),et=!1;const t=new Y({timestamp:e.timestamp,spatialReference:new p.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:(0,Ye.i7)(ge.vy,e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value),databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:(0,Ye.i7)(ge.wr,e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value)}},searchIndexes:ht(e.search_indexes),entityTypes:st(e.entity_types),relationshipTypes:ut(e.relationship_types),metaEntityTypes:st(e.meta_entity_types),provenanceSourceTypeValues:ct(e.provenance_source_type_values.value_behavior_array)});return et&&s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("A big integer field was detected in the retrieved data model. The `big-integer` field type is not fully supported in web clients. Please see https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#type"),t}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:r.data})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1728],{71728:(e,t,a)=>{a.r(t),a.d(t,{default:()=>z});var i=a(31635),n=a(67996),o=a(7762),s=a(49186),r=a(53966),l=a(91869),h=a(25728),d=a(74887),c=a(36708),p=a(10107),u=(a(44208),a(87811),a(64108)),y=a(35666),g=a(5443),m=a(86738),f=a(82799),M=a(12359),w=a(4146),b=a(90708),C=a(15375);const L={MULTIPLIER:"multiplier",ABSOLUTE:"absolute-value"};var k=a(24137),T=a(62796),N=a(54898),D=a(69860),x=a(30504),v=a(63074),A=a(16131),E=a(25036),I=a(10873),_=a(8460),S=a(62568);let R=class extends((0,A.q)((0,v.dM)((0,E.j)((0,h.P)(w.A))))){constructor(e){if(super(e),this.url=null,this.dataPreloadedInLocalCache=!1,this.initializationLinkChartConfig=null,this.membershipModified=!0,this._currentLinkChartConfig={layoutMode:"organic-standard"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new(o.A.ofType(T.A)),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new g.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="LinkChartLayer",this.sublayerIdsCache=new Map,this.tables=new(o.A.ofType(T.A)),this.type="link-chart",this.chronologicalAuxiliaryGraphics=null,this._originalInclusionList=e?.initializationInclusionModeDefinition,e?.dataPreloadedInLocalCache&&!e?.initializationInclusionModeDefinition)throw new s.A("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it");this.addHandles((0,c.wB)(()=>this.layers.concat(this.tables),(e,t)=>this._handleSublayersChange(e,t),c.OH))}normalizeCtorArgs(e){if(!e)return{};const{url:t,title:a,dataPreloadedInLocalCache:i,initializationLinkChartConfig:n}=e;return{url:t,title:a,dataPreloadedInLocalCache:i,initializationLinkChartConfig:n}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let a=[],i=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new s.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.inclusionModeDefinition?.generateAllSublayers?(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach((n,o)=>{const s=this._graphTypeLookup.get(o);if(!s)return r.A.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(o);"relationship"===s.type?t.has(o)||(t.add(o),i.push(s)):"entity"===s.type?t.has(o)||(t.add(o),a.push(s)):(r.A.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(o))}):(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]);const n=new k.P({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=a,this.memberRelationshipTypes=i,this.dataManager=n}load(e){const t=async()=>{const e=[],t=[];this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await(0,N.qN)(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(e=>{e.useAllData=!1}),await this._initializeDiagram(),this.layers.forEach(a=>{t.push(a.refreshCachedQueryEngine()),e.push(new Promise(e=>{a.on("layerview-create",()=>{e(null)})}))}),this.tables.forEach(e=>{t.push(e.refreshCachedQueryEngine())}),await Promise.all(t)};return this.addResolvingPromise(new Promise(a=>{(0,S.fetchKnowledgeGraph)(this.url).then(async i=>{i.dataModel.entityTypes?.forEach(e=>{e.name&&this._graphTypeLookup.set(e.name,e)}),i.dataModel.relationshipTypes?.forEach(e=>{e.name&&this._graphTypeLookup.set(e.name,e)});const o=this.linkChart?.linkChartProperties;if(6===o?.originIdOf("entitiesUrl")&&(this.membershipModified=!1,this._originalInclusionList=await n.XW.fetchAndConvertSerializedLinkChart({entitiesUrl:o?.entitiesUrl,relationshipsUrl:o?.relationshipsUrl}),this._alignLayersDataModelAndInclusionDefinition(i.dataModel),this.initializationLinkChartConfig={layoutSettings:o?.layoutSettings??void 0,layoutMode:(0,x.k5)(o.layoutType)}),this._initializeLayerProperties({knowledgeGraph:i,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataPreloadedInLocalCache){const e=D.A.getInstance();for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions??[])for(const i of a.members?.values()??[]){const a=e.readFromStoreById(`${t}__${i.id}`);a&&(0,l.tE)(this.dataManager.sublayerCaches,t,()=>new Map).set(i.id,a)}await t()}else{const a="geographic-organic-standard"===this.initializationLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,a,!0).then(async()=>{(0,d.Te)(e),await t()}))}a(null)})})),Promise.resolve(this)}set initializationInclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("initializationInclusionModeDefinition",e):r.A.getLogger(this).error("#initializationInclusionModeDefinition","initializationInclusionModeDefinition cannot be changed after the layer is loaded.")}get linkChart(){return this.parent}get sublayerCapabilities(){return(0,N.hZ)(this.knowledgeGraph)}async addRecords(e,t){let a=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await(0,x.aq)(e,this.dataManager.knowledgeGraph));const i=e.concat(a).filter(e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id));i.length>0&&(this.membershipModified=!0),await this._handleNewRecords(i,t)}async createSublayerForNamedType(e){await this.load();const t=this._graphTypeLookup.get(e);if(!t)throw new s.A("knowledge-graph:missing-type","The specified type does not exist in the knowledge graph.");if(this.dataManager.sublayerCaches.has(e))throw new s.A("knowledge-graph:duplicate-type","The specified type already exists as a sublayer.");this.dataManager.sublayerCaches.set(e,new Map),(0,l.tE)(this.sublayerIdsCache,e,()=>new Set);const a=this._createSublayer(t);return"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.set(e,{useAllData:!1,members:new Map}),a.geometryType?this.layers.push(a):this.tables.push(a),await(0,N.qN)(this,[e]),this._refreshNamedTypes(),a}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:a=!1,overrideMembershipCheck:i=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1,overrideMembershipCheck:!1}){let n=[];for(const t of e)(i||!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id))&&n.push(t);if(t){const e=new Set,t=[];for(const t of n)if(this.dataManager.nodeConnectionsLookup.has(t.id))for(const a of this.dataManager.nodeConnectionsLookup.get(t.id))e.add(a);for(const a of e)if(this.dataManager.memberIdTypeLookup.has(a))for(const e of this.dataManager.memberIdTypeLookup.get(a))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:a,typeName:e});n=n.concat(t)}this.dataManager.removeFromLayer(n);for(const e of n)this.sublayerIdsCache.get(e.typeName)?.delete(e.id),this.dataManager.relationshipTypeNames.has(e.typeName)?this.relationshipLinkChartDiagramLookup.delete(e.id):this.entityLinkChartDiagramLookup.delete(e.id);const o=a?void 0:this.getCurrentNodeLocations();await this._calculateLayoutWithSublayerTimeInfo(this._currentLinkChartConfig.layoutMode,{layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedNodeLocations:o}),n.length>0&&(this.membershipModified=!0);const s=[];return this.layers.forEach(e=>{s.push(e.refreshCachedQueryEngine())}),await Promise.all(s),this._refreshNamedTypes(),n}async expand(e,t){let a=[];try{const i=await this.dataManager.getConnectedRecordIds(e,t?.relationshipTypeNames,t);a=i.filter(e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)),await this._handleNewRecords(a,t),i.length>0&&(this.membershipModified=!0),(0,d.Te)(t?.signal)}catch(e){throw(0,d.zf)(e)&&a.length>0&&await this.removeRecords(a,{overrideMembershipCheck:!0}),e}return{records:a}}loadLayerAssumingLocalCache(){const e=[...this.memberRelationshipTypes,...this.memberEntityTypes];this.layers.length||0===this.originIdOf("tables")?0===this.originIdOf("layers")?this._createSublayers(e,this.layers,e=>!!e.geometryType):this._updateSublayers(e,this.layers):this.layers=new o.A,this.tables.length||0===this.originIdOf("layers")?0===this.originIdOf("tables")?this._createSublayers(e,this.tables,e=>!e.geometryType):this._updateSublayers(e,this.tables):this.tables=new o.A,this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{const a=(0,l.tE)(this.sublayerIdsCache,t,()=>new Set);e.members?.forEach(({id:e,linkChartLocation:i})=>{if(a.add(e),i){const a="coords"in i&&"lengths"in i?i:(0,b.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e,a):this.entityLinkChartDiagramLookup.set(e,a)}})})}async calculateLinkChartLayout(e="organic-standard",t){const a=[],i=[],n=[];this.dataManager.sublayerCaches.forEach((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach(e=>{a.push({typeName:t,feature:e})}):this.dataManager.relationshipTypeNames.has(t)&&e.forEach(e=>{i.push({typeName:t,feature:e})})}),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const o=new Map,h=new Map,c=new Map,p=new Map,u=new Uint8Array(a.length),y=new Float64Array(a.length),w=new Float64Array(a.length),L=new Float64Array(a.length),k=new Float64Array(a.length),T=new Uint32Array(i.length),N=new Uint32Array(i.length),D=new Float64Array(i.length),x=new Float64Array(i.length),v=[];let A=!1;const E=new g.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let I,S="organic-standard",R=0,z=0;const G=_.i6.apply;switch(S="geographic-organic-standard"===e?"organic-standard":e,S){case"organic-standard":I=_.pM.apply;break;case"organic-community":I=_.Tu.apply;break;case"hierarchical-bottom-to-top":I=_.$C.apply;break;case"radial-root-centric":I=_.vJ.apply;break;case"tree-left-to-right":I=_.Xq.apply;break;default:I=_.Wg.apply}let O=!1;a.forEach(({typeName:a,feature:i})=>{if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e&&t?.lockedNodeLocations?.has(i.attributes[C.dr])){"geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)?u[R]=2:u[R]=0;const n=t.lockedNodeLocations.get(i.attributes[C.dr]);y[R]=n.x,w[R]=n.y}else if("geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)){u[R]=2;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(a).name],n=this.dataManager.geographicLookup.get(a)?.geometryType;switch(n){case"esriGeometryPoint":y[R]=t?.x,w[R]=t?.y;break;case"esriGeometryPolygon":{const a=(0,M.Ve)(t);e=a?m.A.fromJSON(a):null,null!=e?.x&&null!=e?.y?(y[R]=e.x,w[R]=e.y):u[R]=1;break}case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(y[R]=e.x,w[R]=e.y):u[R]=1;break;default:u[R]=1}(null==y[R]||null==w[R]||Number.isNaN(y[R])||Number.isNaN(w[R]))&&(u[R]=1,y[R]=0,w[R]=0)}else if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){!O&&t?.lockedNodeLocations?.has(i.attributes[C.dr])&&(O=!0);const e=t?.timeInfoByTypeName?.get(a),n=e?.startField,o=n&&e?.startField?i.attributes[n]:null;L[R]=o?new Date(o).getTime():NaN;const s=e?.endField,r=s&&e?.endField?i.attributes[s]:null;k[R]=r?new Date(r).getTime():NaN,y[R]=0,w[R]=0,u[R]=1}else u[R]=1,y[R]=0,w[R]=0;p.set(i.attributes[C.dr],R),v[R]={feature:i,typeName:a},R++}),O&&r.A.getLogger(this).warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");let P=!1;const Z=new Map;i.forEach(a=>{const i=a.feature.attributes[C.Cz],o=a.feature.attributes[C.KQ],s=p.get(i),r=p.get(o),l=t?.timeInfoByTypeName?.get(a.typeName),h=t?.timeInfoByTypeName?l?.startField:null,d=h?a.feature.attributes[h]:null,c=l?.endField,u=c?a.feature.attributes[c]:null;if(void 0!==s&&void 0!==r){let t=i+"-"+o;"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(t=t+"-"+d+"-"+u);const l=Z.get(t),h=l?.has(a.typeName);h||(T[z]=s,N[z]=r,"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(D[z]=d?new Date(d).getTime():NaN,x[z]=u?new Date(u).getTime():NaN),void 0===l?Z.set(t,new Map([[a.typeName,z]])):l.set(a.typeName,z),z++),n.push(a)}else P=!0,this.relationshipLinkChartDiagramLookup.set(i,null)}),P&&r.A.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null");const F=this._validateOrganicLayoutSettings(e,t?.layoutSettings?.organicLayoutSettings),B=this._convertValidatedOrganicSettingsToCalculationSettings(F);await(0,_.Hh)();let U=1,j=null;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){let a;({status:U,links:j,graphics:a}=G(()=>t?.signal?.aborted??!1,u,y,w,L,k,T.subarray(0,z),N.subarray(0,z),D.subarray(0,z),x.subarray(0,z),"chronological-multi-timeline"===e,t?.layoutSettings?.chronologicalLayoutSettings)),0===U&&(this.chronologicalAuxiliaryGraphics=a)}else({status:U,links:j}=I(()=>t?.signal?.aborted??!1,u,y,w,T.subarray(0,z),N.subarray(0,z),B.computationBudgetTime,B.idealEdgeLengthMultiplier,B.repulsionRadiusMultiplier));if((0,d.Te)(t?.signal),1===U)throw new s.A("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");if(2===U)throw(0,d.NK)();for(let e=0;e<v.length;e++){if(w[e]>84.9999?w[e]=84.9999:w[e]<-84.9999&&(w[e]=-84.9999),y[e]>179.9999?y[e]=179.9999:y[e]<-179.9999&&(y[e]=-179.9999),v[e].feature.attributes[C.T1]=new m.A(y[e],w[e]),o.has(v[e].typeName)){const t=o.get(v[e].typeName);t?.set(v[e].feature.attributes[C.dr],v[e].feature)}else{const t=new Map;t.set(v[e].feature.attributes[C.dr],v[e].feature),o.set(v[e].typeName,t)}c.set(v[e].feature.attributes[C.dr],v[e].feature);const t=(0,b.Ux)(v[e].feature.attributes[C.T1]);this.entityLinkChartDiagramLookup.set(v[e].feature.attributes[C.dr],v[e].feature.attributes[C.T1]?t:null);const a=(0,l.tE)(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,v[e].typeName,()=>({useAllData:!1,members:new Map}));(0,l.tE)(a.members,v[e].feature.attributes[C.dr],()=>({id:v[e].feature.attributes[C.dr],linkChartLocation:void 0})).linkChartLocation=v[e].feature.attributes[C.T1];const{x:i,y:n}=v[e].feature.attributes[C.T1];if(A)E.xmin=Math.min(E.xmin,i),E.xmax=Math.max(E.xmax,i),E.ymin=Math.min(E.ymin,n),E.ymax=Math.max(E.ymax,n);else{const e=1e-7;E.xmin=i-e,E.xmax=i+e,E.ymin=n-e,E.ymax=n+e,A=!0}}if(this.linkChartExtent.xmin=E.xmin,this.linkChartExtent.xmax=E.xmax,this.linkChartExtent.ymin=E.ymin,this.linkChartExtent.ymax=E.ymax,!j)throw new s.A("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const Q=new Map,q=new Map,W=new Map,$=new Set;for(let a=0;a<n.length;a++){const i=[],o=n[a],s=o.feature.attributes[C.Cz],d=o.feature.attributes[C.KQ];let u=s+"-"+d;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){const e=t?.timeInfoByTypeName?.get(o.typeName),a=t?.timeInfoByTypeName?e?.startField:null,i=a?o.feature.attributes[a]:null,n=e?.endField;u+="-"+i+"-"+(n?o.feature.attributes[n]:null)}const y=Z.get(u).get(o.typeName),g=0===y?0:j?.vertexEndIndex[y-1];if(!$.has(y)){if($.add(y),2===j.types[y]){const e=[j.vertices[2*g],j.vertices[2*g+1]],t=[j.vertices[2*(g+1)],j.vertices[2*(g+1)+1]],a=[.5*(e[0]+t[0]),.5*(e[1]+t[1])],n=[a[0]-e[0],a[1]-e[1]],o=[a[0]+n[1],a[1]-n[0]],s=[a[0]-n[1],a[1]+n[0]];i.push(e),i.push(o),i.push(t),i.push(s),i.push(e)}else{if(0!==j.types[y]){r.A.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=g;e<j.vertexEndIndex[y];e++)i.push([j.vertices[2*e],j.vertices[2*e+1]])}if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e){const e=v[p.get(s)]?.feature.attributes[C.T1],t=v[p.get(d)]?.feature.attributes[C.T1];i[0][0]===e.x&&i[0][1]===e.y||(i[0]=[e.x,e.y]),i[i.length-1][0]===t.x&&i[i.length-1][1]===t.y||(i[i.length-1]=[t.x,t.y])}for(let e=1;e<i.length-1;e++)i[e][1]>85.5?i[e][1]=85.5:i[e][1]<-85.5&&(i[e][1]=-85.5),i[e][0]>179.9999?i[e][0]=179.9999:i[e][0]<-179.9999&&(i[e][0]=-179.9999);Q.has(u)?Q.get(u).push(i):Q.set(u,[i])}const m=Q.get(u);q.has(u)||(q.set(u,new Map),W.set(u,new Map));const M=q.get(u),w=W.get(u);M.has(o.typeName)||(M.set(o.typeName,m.shift()),w.set(o.typeName,0));const L=M.get(o.typeName);w.set(o.typeName,w.get(o.typeName)+1);const k=new f.A({paths:[L]});if(o.feature.attributes[C.T1]=k,h.has(o.typeName)){const e=h.get(o.typeName);e?.set(o.feature.attributes[C.dr],o.feature)}else{const e=new Map;e.set(o.feature.attributes[C.dr],o.feature),h.set(o.typeName,e)}c.set(o.feature.attributes[C.dr],o.feature);const T=(0,b.Ux)(o.feature.attributes[C.T1]);this.relationshipLinkChartDiagramLookup.set(o.feature.attributes[C.dr],o.feature.attributes[C.T1]?T:null);const N=(0,l.tE)(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,o.typeName,()=>({useAllData:!1,members:new Map}));(0,l.tE)(N.members,o.feature.attributes[C.dr],()=>({id:o.feature.attributes[C.dr],linkChartLocation:void 0})).linkChartLocation=T}for(const e of n)e.feature.attributes[C.M1]=W.get(e.feature.attributes[C.Cz]+"-"+e.feature.attributes[C.KQ])?.get(e.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutSettings:t?.layoutSettings?.clone()},{nodes:o,links:h,idMap:c}}async applyNewLinkChartLayout(e="organic-standard",t){const a=[];await this._calculateLayoutWithSublayerTimeInfo(e,t),this.layers.forEach(e=>{a.push(e.refreshCachedQueryEngine())}),this.membershipModified=!0,await Promise.all(a),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.entries()??[])this.dataManager.relationshipTypeNames.has(t)||a?.members?.forEach(t=>{const a=t.linkChartLocation;let i;const n=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(n,new m.A({x:i.x,y:i.y})))});return e}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach(e=>{t.push(e.refreshCachedQueryEngine())}),await Promise.all(t),this._refreshNamedTypes()}async connectBetweenEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}a=await this.dataManager.getRelationshipsBetweenNodes(e,i,t),await this._handleNewRecords(a,t),(0,d.Te)(t)}catch(e){throw(0,d.zf)(e)&&this.removeRecords(a),e}return{records:a}}async connectFromEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}let n=[];for(const e of this.dataManager.entityTypeNames){const t=this.sublayerIdsCache.get(e);t&&(n=n.concat(Array.from(t)))}a=await this.dataManager.getRelationshipsFromNodes(e,n,i,t),await this._handleNewRecords(a,t),a.length>0&&(this.membershipModified=!0),(0,d.Te)(t)}catch(e){throw(0,d.zf)(e)&&this.removeRecords(a),e}return{records:a}}getCurrentLayout(){return this._currentLinkChartConfig.layoutMode}async _calculateLayoutWithSublayerTimeInfo(e="organic-standard",t){const a=new Map;this.layers.forEach(e=>{a.set(e.objectType.name,e.timeInfo)}),await this.calculateLinkChartLayout(e,{timeInfoByTypeName:a,...t}),this.linkChart?.handleChronologicalOverlay()}async _handleNewRecords(e,t){const a=new Set,i=[],n=this.layers.concat(this.tables);for(const t of e)this._graphTypeLookup.has(t.typeName)&&(!1===n.some(e=>e.objectType.name===t.typeName)&&(this.dataManager.sublayerCaches.set(t.typeName,new Map),a.add(t.typeName)),(0,l.tE)(this.sublayerIdsCache,t.typeName,()=>new Set).add(t.id),i.push(t));this.dataManager.addToLayer(i);for(const e of a){const t=this._graphTypeLookup.get(e);if(t){const a=this._createSublayer(t);"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),a.geometryType?this.layers.push(a):this.tables.push(a)}}await(0,N.qN)(this,Array.from(a),t),await this.dataManager.refreshCacheContent(e.map(e=>e.id),void 0,void 0,void 0,t);const o={layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedNodeLocations:new Map};for(const[e,t]of this.entityLinkChartDiagramLookup.entries())t&&o.lockedNodeLocations.set(e,new m.A(t.coords[0],t.coords[1]));await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,o)}_createSublayers(e,t,a){e.forEach(e=>{const i=this._createSublayer(e);a(i)&&t.push(i),this._updateSublayerCaches(e)})}_updateSublayers(e,t){t.forEach(t=>{t.parentCompositeLayer=this;const a=e.find(e=>e.type===t.graphType&&e.name===t.graphTypeName);a&&(t.objectType=a,t.read({title:a.name},{origin:"service"}),this._updateSublayerCaches(a))})}_updateSublayerCaches({name:e}){if(!e)return;const t=this.dataManager.sublayerCaches;t.has(e)||t.set(e,new Map)}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=3&&e<7}async _initializeDiagram(){this.initializationLinkChartConfig?this.initializationLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e?.members?.forEach(e=>{const a=e.linkChartLocation;let i;const n=e.id;if(!a)return;i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]};const o=(0,b.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n,o):this.entityLinkChartDiagramLookup.set(n,o),this.linkChartExtent.xmin>i.x&&(this.linkChartExtent.xmin=i.x),this.linkChartExtent.xmax<i.x&&(this.linkChartExtent.xmax=i.x),this.linkChartExtent.ymin>i.y&&(this.linkChartExtent.ymin=i.y),this.linkChartExtent.ymax<i.y&&(this.linkChartExtent.ymax=i.y)})}),this.memberRelationshipTypes.forEach(e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach(e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[C.Cz]),a=this.relationshipLinkChartDiagramLookup.get(e.attributes[C.KQ]);if(t&&a){const i=(0,b.Ux)(new f.A({paths:[[[t.coords[0],t.coords[1]],[a.coords[0],a.coords[1]]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[C.dr],i)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[C.dr],null)})})):await this._calculateLayoutWithSublayerTimeInfo(this.initializationLinkChartConfig.layoutMode,{lockedNodeLocations:this.getCurrentNodeLocations(),...this.initializationLinkChartConfig}):await this._calculateLayoutWithSublayerTimeInfo("organic-standard",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateOrganicLayoutSettings(e,t){const a=e=>"number"==typeof e&&!isNaN(e),i=e=>a(e)&&e>=0,n={};if(!new Set(["organic-standard","organic-community","geographic-organic-standard","chronological-multi-timeline","chronological-mono-timeline"]).has(e)||!t)return n;const{computationBudgetTime:o,autoRepulsionRadius:s,repulsionRadiusMultiplier:l,absoluteIdealEdgeLength:h,multiplicativeIdealEdgeLength:d,idealEdgeLengthType:c}=t;return(e=>a(e)&&e>=1)(o)?n.computationBudgetTime=o:o&&r.A.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),n.autoRepulsionRadius=s,!s&&(e=>a(e)&&e>=1)(l)?n.repulsionRadiusMultiplier=l:s||(n.autoRepulsionRadius=!0,r.A.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting")),"geographic-organic-standard"===e&&((e=>Object.values(L).includes(e))(c)?n.idealEdgeLengthType=c:void 0!==c&&r.A.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),"absolute-value"===c&&i(h)?n.absoluteIdealEdgeLength=h:"absolute-value"===c&&void 0!==h?r.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting"):"multiplier"===c&&i(d)?n.multiplicativeIdealEdgeLength=d:"multiplier"===c&&void 0!==d&&r.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),n}_convertValidatedOrganicSettingsToCalculationSettings(e){let t=e.idealEdgeLengthType===L.ABSOLUTE?e.absoluteIdealEdgeLength:e.multiplicativeIdealEdgeLength;return e.idealEdgeLengthType===L.ABSOLUTE&&(void 0===t?t=-1:t*=-1),{computationBudgetTime:e.computationBudgetTime??void 0,repulsionRadiusMultiplier:e.repulsionRadiusMultiplier&&!e.autoRepulsionRadius?e.repulsionRadiusMultiplier:void 0,idealEdgeLengthMultiplier:t}}_createSublayer(e){return new T.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner")),e&&(e.forEach(e=>{e.parent=this}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this}),e.on("after-remove",({item:e})=>{e.parent=null})],"sublayers-owner"))}_alignLayersDataModelAndInclusionDefinition(e){const t=new Set((e.entityTypes??[]).map(e=>e.name).concat((e.relationshipTypes??[]).map(e=>e.name))),a=new Set((e.entityTypes??[]).map(e=>e.name)),i=new Set((e.relationshipTypes??[]).map(e=>e.name));if(this.layers){for(const e of this.layers)!e.graphType&&t.has(e.graphTypeName)&&(e.graphType=a.has(e.graphTypeName)?"entity":"relationship");const e=this.layers.filter(e=>t.has(e.graphTypeName)&&("entity"===e.graphType?a.has(e.graphTypeName):i.has(e.graphTypeName)));this.setAtOrigin("layers",e,(0,y.OL)(this.originIdOf("layers")))}else this.layers=new o.A;if(this.layers&&this._originalInclusionList){const e=new Set(this._originalInclusionList.namedTypeDefinitions.keys()),t=this.tables?.map(e=>e.graphTypeName)??[],a=this.layers.map(e=>e.graphTypeName).concat(t);for(const t of a)e.has(t)||this._originalInclusionList.namedTypeDefinitions.set(t,{useAllData:!1,members:new Map});const i=[];for(const e of this._originalInclusionList.namedTypeDefinitions.keys())a.includes(e)||(r.A.getLogger(this).warn(`A named type, ${e}, was in the serialized feature collection but did not have a sublayer config in the item, so will be removed`),i.push(e));for(const e of i)this._originalInclusionList.namedTypeDefinitions.delete(e)}}};(0,i.Cg)([(0,p.MZ)(I.OZ)],R.prototype,"url",void 0),(0,i.Cg)([(0,p.MZ)()],R.prototype,"dataPreloadedInLocalCache",void 0),(0,i.Cg)([(0,p.MZ)()],R.prototype,"initializationLinkChartConfig",void 0),(0,i.Cg)([(0,p.MZ)()],R.prototype,"membershipModified",void 0),(0,i.Cg)([(0,p.MZ)()],R.prototype,"dataManager",void 0),(0,i.Cg)([(0,p.MZ)()],R.prototype,"initializationInclusionModeDefinition",null),(0,i.Cg)([(0,p.MZ)()],R.prototype,"knowledgeGraph",void 0),(0,i.Cg)([(0,p.MZ)({type:o.A.ofType(T.A),json:{write:{ignoreOrigin:!0}}})],R.prototype,"layers",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],R.prototype,"linkChart",null),(0,i.Cg)([(0,p.MZ)()],R.prototype,"entityLinkChartDiagramLookup",void 0),(0,i.Cg)([(0,p.MZ)()],R.prototype,"relationshipLinkChartDiagramLookup",void 0),(0,i.Cg)([(0,p.MZ)()],R.prototype,"linkChartExtent",void 0),(0,i.Cg)([(0,p.MZ)()],R.prototype,"memberEntityTypes",void 0),(0,i.Cg)([(0,p.MZ)()],R.prototype,"memberRelationshipTypes",void 0),(0,i.Cg)([(0,p.MZ)({type:["LinkChartLayer"]})],R.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,p.MZ)()],R.prototype,"sublayerCapabilities",null),(0,i.Cg)([(0,p.MZ)()],R.prototype,"sublayerIdsCache",void 0),(0,i.Cg)([(0,p.MZ)({type:o.A.ofType(T.A),json:{write:{ignoreOrigin:!0}}})],R.prototype,"tables",void 0),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],R.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],R.prototype,"chronologicalAuxiliaryGraphics",void 0),R=(0,i.Cg)([(0,u.$)("esri.layers.LinkChartLayer")],R);const z=R}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3359,5740],{23154:(e,t,r)=>{r.d(t,{K:()=>d,Q:()=>s});var a=r(77548),n=r(24183);const o=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,t){const{loadContext:r,...o}=t||{},s=r?await r.fetchServiceMetadata(e,o):await(0,n.V)(e,o),i=(0,a.G$)();p(s),u(s);const l={serviceJSON:s,preferredHost:i};if((s.currentVersion??0)<10.5)return l;const c=`${(0,a.$x)()??e}/layers`,y=r?await r.fetchServiceMetadata(c,o):await(0,n.V)(c,o);return p(y),u(y),l.layersJSON={layers:y.layers,tables:y.tables},l}function i(e){const{type:t}=e;return!!t&&o.has(t)}function l(e){return"Table"===e.type}function u(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(l)}function c(e){e.type||="Feature Layer"}function y(e){e.type||="Table"}function p(e){e.layers?.forEach(c),e.tables?.forEach(y)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},24183:(e,t,r)=>{r.d(t,{V:()=>n});var a=r(43773);async function n(e,t){const{data:r}=await(0,a.A)(e,{responseType:"json",query:{f:"json",...t?.customParameters,token:t?.apiKey}});return r}},26121:(e,t,r)=>{r.d(t,{ci:()=>s,dL:()=>n});var a=r(49186);async function n(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}r(77548);const o=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function s(e,t,r){let n=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new a.A(e,t,r));if(e.blockedRelativeUrls&&(n=n.concat(e.blockedRelativeUrls.map(e=>new a.A("url:unsupported",`Relative url '${e}' is not supported`)))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:a}=r;e&&(n=n.filter(({name:e})=>!(o.has(e)||t.includes(e)))),a&&(n=n.filter(e=>"web-document-write:property-required"!==e.name))}if(n.length>0)throw new a.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}},33359:(e,t,r)=>{r.d(t,{save:()=>N,saveAs:()=>R});var a=r(4576),n=(r(44208),r(49186),r(71530)),o=r(60694),s=r(23154),i=r(77548),l=r(88788),u=r(10407);const c="Feature Service",y="feature-layer-utils",p=`${y}-save`,d=`${y}-save-as`;function f(e){return{isValid:(0,i.W_)(e)&&(!("dynamicDataSource"in e)||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function m(e,t){const r=(0,l.m)(e,"portal-item");return t?.isTable&&(r.layerContainerType="tables"),r}function w(e){const t=[],r=[];for(const{layer:a,layerJSON:n}of e)h(a)?r.push(n):t.push(n);return{layers:t,tables:r}}function h(e,t){return e.isTable}function b(e){return w([e])}async function v(e,t){return/\/\d+\/?$/.test(e.url)?b(t[0]):async function(e,t){if(e.reverse(),!t)return w(e);const a=await async function(e,t){let a=await e.fetchData("json");if(function(e){return!!(e&&Array.isArray(e.layers)&&Array.isArray(e.tables))}(a)&&!(0,u.Y)(e,u.mm.HOSTED_SERVICE))return a;a||={},function(e){e.layers||=[],e.tables||=[]}(a);const{layer:{url:n,customParameters:o,apiKey:i}}=t[0];return await async function(e,t,a){const{url:n,customParameters:o,apiKey:i}=t,{serviceJSON:l,layersJSON:u}=await(0,s.Q)(n,{customParameters:o,apiKey:i}),c=I(e.layers,l.layers,a),y=I(e.tables,l.tables,a);e.layers=c.itemResources,e.tables=y.itemResources;const p=[...c.added,...y.added],d=u?[...u.layers,...u.tables]:[];await async function(e,t,a,n){const o=await async function(e){const t=[];e.forEach(({type:e})=>{switch((0,s.K)(e)){case"CatalogLayer":t.push(Promise.all([r.e(4800),r.e(1214),r.e(708),r.e(893),r.e(8628),r.e(2593),r.e(9279)]).then(r.bind(r,83508)).then(e=>e.default));break;case"FeatureLayer":t.push(Promise.all([r.e(4800),r.e(1214),r.e(9953),r.e(1017),r.e(8654),r.e(4342)]).then(r.bind(r,68654)).then(e=>e.default));break;case"OrientedImageryLayer":t.push(Promise.all([r.e(4800),r.e(1214),r.e(9953),r.e(1017),r.e(8654),r.e(9361)]).then(r.bind(r,9352)).then(e=>e.default))}});const a=await Promise.all(t),n=new Map;return e.forEach(({type:e},t)=>{n.set(e,a[t])}),n}(t),i=t.map(({id:e,type:t})=>new(o.get(t))({url:a,layerId:e,sourceJSON:n.find(({id:t})=>t===e)}));await Promise.allSettled(i.map(e=>e.load())),i.forEach(t=>{const{layerId:r,loaded:a,defaultPopupTemplate:n}=t;if(!a||null==n)return;const o={id:r,popupInfo:n.toJSON()};L(t,"ArcGISFeatureLayer"===t.operationalLayerType?o:{...o,layerType:t.operationalLayerType},e)})}(e,p,n,d)}(a,{url:n??"",customParameters:o,apiKey:i},t.map(e=>e.layer.layerId)),a}(t,e);for(const t of e)L(t.layer,t.layerJSON,a);return function(e,t){const r=[],a=[];for(const{layer:e}of t){const{isTable:t,layerId:n}=e;t?a.push(n):r.push(n)}S(e.layers,r),S(e.tables,a)}(a,e),a}(t,e)}function S(e,t){if(e.length<2)return;const r=[];for(const{id:t}of e)r.push(t);(0,a.aI)(r.sort(g),t.slice().sort(g))&&e.sort((e,r)=>{const a=t.indexOf(e.id),n=t.indexOf(r.id);return a<n?-1:a>n?1:0})}function g(e,t){return e<t?-1:e>t?1:0}function I(e,t,r){const n=(0,a.iv)(e,t,(e,t)=>e.id===t.id);e=e.filter(e=>!n.removed.some(t=>t.id===e.id));const o=n.added;return o.forEach(({id:t})=>{e.push({id:t})}),{itemResources:e,added:o.filter(({id:e})=>!r.includes(e))}}function L(e,t,r){e.isTable?P(r.tables,t):P(r.layers,t)}function P(e,t){const r=e.findIndex(({id:e})=>e===t.id);-1===r?e.push(t):e[r]=t}function T(e){if(!("layerType"in e))return!!e.charts?.length;switch(e.layerType){case"OrientedImageryLayer":return!!e.charts?.length;case"SubtypeGroupLayer":return!!e.layers.some(e=>!!e.charts?.length);case"SubtypeGroupTable":return!!e.tables.some(e=>!!e.charts?.length);case"CatalogLayer":return!!e.footprintLayer?.charts?.length}}function O(e,t){let r=0,a=0,n=0,o=0;for(const e of[...t.layers,...t.tables])if(T(e)&&o++,"layerType"in e)switch(e.layerType){case"OrientedImageryLayer":r++;break;case"SubtypeGroupLayer":a++;break;case"SubtypeGroupTable":n++}(0,u.Sm)(e,u.mm.ORIENTED_IMAGERY_LAYER,r>0),(0,u.Sm)(e,u.mm.SUBTYPE_GROUP_LAYER,a>0),(0,u.Sm)(e,u.mm.SUBTYPE_GROUP_TABLE,n>0),(0,u.Sm)(e,u.mm.CHARTS,o>0)}async function A(e,t,r){O(t,r)}async function E(e,t,r){const{url:a,layerId:n,title:s,fullExtent:i,isTable:l}=e,c=(0,o.qg)(a);t.url=("FeatureServer"===c?.serverType?a:`${a}/${n}`)??null,t.title||=s,t.extent=null,l||null==i||(t.extent=await(0,u.sQ)(i)),function(e,t,r){(0,u.OM)(t,u.mm.METADATA),(0,u.Sm)(t,u.mm.MULTI_LAYER,e.length>1),(0,u.Sm)(t,u.mm.SINGLE_LAYER,1===e.length),(0,u.Sm)(t,u.mm.TABLE,r.tables.length>0&&0===r.layers.length),O(t,r)}([e],t,r)}async function N(e,t){return(0,n.UN)({layer:e,itemType:c,validateLayer:f,createJSONContext:t=>m(t,e),createItemData:(e,t)=>v(t,[e]),errorNamePrefix:p,setItemProperties:A},t)}async function R(e,t,r){return(0,n.Uh)({layer:e,itemType:c,validateLayer:f,createJSONContext:t=>m(t,e),createItemData:(e,t)=>Promise.resolve(b(e)),errorNamePrefix:d,newItem:t,setItemProperties:E},r)}},46130:(e,t,r)=>{r.d(t,{v:()=>n});var a=r(76553);function n(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,a.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},71530:(e,t,r)=>{r.d(t,{UN:()=>b,Uh:()=>v});var a=r(49186),n=r(46130),o=r(20655),s=r(80812),i=r(88788),l=r(10407),u=r(26121);async function c(e){const{layer:t,errorNamePrefix:r,validateLayer:n}=e;await t.load(),function(e,t,r){const n=r(e);if(!n.isValid)throw new a.A(`${t}:invalid-parameters`,n.errorMessage,{layer:e})}(t,r,n)}function y(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function p(e){const{item:t,errorNamePrefix:r,layer:n,validateItem:o}=e;if(function(e){const{item:t,itemType:r,additionalItemType:n,errorNamePrefix:o,layer:s}=e,i=[r];if(n&&i.push(n),!i.includes(t.type)){const e=i.map(e=>`'${e}'`).join(", ");throw new a.A(`${o}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:t,layer:s})}}(e),o){const e=o(t);if(!e.isValid)throw new a.A(`${r}:invalid-parameters`,e.errorMessage,{layer:n})}}function d(e){const{layer:t,errorNamePrefix:r}=e,{portalItem:n}=t;if(!n)throw new a.A(`${r}:portal-item-not-set`,y(t,"requires the portalItem property to be set"));if(!n.loaded)throw new a.A(`${r}:portal-item-not-loaded`,y(t,"cannot be saved to a portal item that does not exist or is inaccessible"));p({...e,item:n})}function f(e){const{newItem:t,itemType:r}=e;let a=s.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=o.A.getDefault(),p({...e,item:a}),a}function m(e){return(0,i.m)(e,"portal-item")}async function w(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const a=e.write({},t);return await Promise.all(t.resources?.pendingOperations??[]),(0,u.ci)(t,{errorName:"layer-write:unsupported"},r),a}function h(e){(0,l.LG)(e,l.mm.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t))}async function b(e,t){const{layer:r,createItemData:a,createJSONContext:o,setItemProperties:s,saveResources:i,supplementalUnsupportedErrors:l}=e;await c(e),d(e);const u=r.portalItem,y=o?o(u):m(u),p=await w(r,y,{...t,supplementalUnsupportedErrors:l}),f=await a({layer:r,layerJSON:p},u);return await(s?.(r,u,f)),h(u),await u.update({data:f}),(0,n.v)(y),await(i?.(u,y)),u}async function v(e,t){const{layer:r,createItemData:a,createJSONContext:o,setItemProperties:s,saveResources:i,supplementalUnsupportedErrors:l}=e;await c(e);const u=f(e),y=o?o(u):m(u),p=await w(r,y,{...t,supplementalUnsupportedErrors:l}),d=await a({layer:r,layerJSON:p},u);return await s(r,u,d),h(u),await async function(e,t,r){const a=e.portal;await a.signIn(),await a.user.addItem({item:e,data:t,folder:r?.folder})}(u,d,t),r.portalItem=u,(0,n.v)(y),await(i?.(u,y)),u}},76553:(e,t,r)=>{function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>a})},88788:(e,t,r)=>{r.d(t,{m:()=>s,v:()=>o});var a=r(84952),n=r(20655);function o(e,t){return{...i(e,t),readResourcePaths:[]}}function s(e,t,r){const n=(0,a.An)(e.itemUrl);return{...i(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function i(e,t){return{origin:t,url:(0,a.An)(e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[588],{8303:(e,t,i)=>{i.d(t,{A:()=>S});var r=i(31635),s=i(92602),n=i(70333),a=i(43773),o=i(60999),l=i(49186),h=i(53966),c=i(97768),u=i(74887),d=i(84952),p=i(10107),f=(i(44208),i(87811),i(36005)),m=i(64108),g=i(43937),y=i(77548),v=i(20655),_=i(80812),w=i(41318),b=i(10407);const S=e=>{const t=e;let S=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new _.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(1204).then(i.bind(i,41204));return(0,u.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,u.zf)(e)||h.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,u.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,u.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!n.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,r);let a,o;if(s)a=i.portal.url;else try{a=await(0,y.wI)(this.url,t)}catch(e){(0,u.QP)(e)}if(!a||!(0,d.b8)(a,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${a}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,u.QP)(e)}const l=!0,h=!1,c=!1;if(!o)return{features:{edit:l,fullEdit:h},content:{updateItem:c}};try{if(s?await i.reload():(i=new _.default({id:e,portal:{url:a}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,r)}catch(e){(0,u.QP)(e)}return{features:{edit:l,fullEdit:h},content:{updateItem:c}}}_getUserPrivileges(e,t){const i=(0,b.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,u.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,d.S8)(s.restUrl)===(0,d.S8)(r))return s.user;const l=`${r}/community/self`,h=null!=e?e.signal:null,c=await(0,o.Ke)((0,a.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:h}));return c.ok?w.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return i&&r&&!(0,d.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r.Cg)([(0,p.MZ)({type:_.default})],S.prototype,"portalItem",null),(0,r.Cg)([(0,f.w)("web-document","portalItem",["itemId"])],S.prototype,"readPortalItem",null),(0,r.Cg)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],S.prototype,"writePortalItem",null),(0,r.Cg)([(0,p.MZ)({clonable:!1})],S.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasUpdateItemPrivileges",void 0),S=(0,r.Cg)([(0,m.$)("esri.layers.mixins.PortalLayer")],S),S},M={credential:null,user:null}},10407:(e,t,i)=>{i.d(t,{It:()=>p,LG:()=>a,OM:()=>h,Sm:()=>c,Y:()=>o,bK:()=>l,mm:()=>d,sQ:()=>u});var r=i(91218),s=i(16930),n=i(28735);function a(e,t){if(!o(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return o(e,d.HOSTED_SERVICE)}function h(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function c(e,t,i){i?a(e,t):h(e,t)}async function u(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.ci)(e);const i=s.A.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.project)(e,i)}(i)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function p(e){const{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),a=!!i&&!!s?.includes("features:user:fullEdit");const o="update"===r||"admin"===r;return o?a=n=!0:a&&(n=!0),{features:{edit:n,fullEdit:a},content:{updateItem:o}}}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var r=i(31635),s=i(53966),n=i(10107),a=(i(44208),i(87811),i(64108)),o=i(60694);const l=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,n.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,n.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,a.$)("esri.layers.mixins.ArcGISService")],i),i}},25943:(e,t,i)=>{i.d(t,{d:()=>C});var r,s=i(31635),n=i(43773),a=i(69622),o=i(49186),l=i(36563),h=(i(44208),i(66344)),c=i(15142),u=i(74887),d=i(36708),p=i(76030),f=i(84952),m=i(10107),g=(i(53966),i(87811),i(64108)),y=i(72802),v=i(4718),_=i(69397),w=i(34275);class b{constructor(e){!function(e){if(!e?.location)throw new o.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.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,v.o8)(t));const r=this.location.width,s=this.location.height;let n=!0,a=!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(r*s/32));let h=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(a=!1,l[h]|=1<<t):n=!1,31===t&&++h}a?(this._availability="unavailable",this.byteSize=40):n?(this._availability="available",this.byteSize=40):(this._availability=l,this.byteSize=40+(0,_.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),r=i%32,s=i>>5,n=this._availability;return s<0||s>n.length?"unknown":n[s]&1<<r?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||n.A,{row:r,col:s,width:a,height:l}=e,h={query:{f:"json"}};return t=t?{...h,...t}:h,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:r,left:s,width:a,height:l},valid:!0,data:new Array(a*l).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==r||e.location.left!==s||e.location.width!==a||e.location.height!==l))throw new o.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:s,width:a,height:l}});return b.fromJSON(e)})}static fromJSON(e){return Object.freeze(new b(e))}}function S(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function M(e,t,i){return new o.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let C=class extends a.A{static{r=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=n.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.q(2097152),this.addHandles((0,d.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),d.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 r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(M(e,t,i)):this._fetchTilemap(e,t,i,r).catch(e=>e).then(r=>{if(r instanceof b){const s=r.getAvailability(t,i);if("unavailable"===s)throw M(e,t,i);return s}if((0,u.zf)(r))throw r;return"unknown"})}fetchAvailabilityUpsample(e,t,i,r,s){r.level=e,r.row=t,r.col=i;const n=this.layer.tileInfo;n.updateTileInfo(r);const a=this.fetchAvailability(e,t,i,s).catch(e=>{if((0,u.zf)(e))throw e;if(n.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,s);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,s,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,n){if(!this._prefetchingEnabled)return;const a=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(a))return;const o=new AbortController;n.then(()=>o.abort(),()=>o.abort());let h=!1;const c=(0,l.hA)(()=>{h||(h=!0,o.abort())});if(this.addHandles(c,a),await(0,p.md)(10,o.signal).catch(()=>{}),h||(h=!0,this.removeHandles(a)),(0,u.G4)(o))return;const d=new y.U(e,t,i),f={...s,signal:o.signal},m=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&m.upsampleTile(d);++e){const e=this.fetchAvailability(d.level,d.row,d.col,f);r._prefetches.push(e);const t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new c.A({initialSize:r._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new o.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const s=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,i,s);if(n)return Promise.resolve(n);const a=r?.signal;return r={...r,signal:null},new Promise((e,t)=>{(0,u.u7)(a,()=>t((0,u.NK)()));const i=S(s);let n=this._pendingTilemapRequests[i];if(!n){n=b.fromDefinition(s,r).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=n,n.then(e,e)}n.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,f.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,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;const s=S(r);return this._tilemapCache.get(s)}get test(){}};(0,s.Cg)([(0,m.MZ)({constructOnly:!0})],C.prototype,"layer",void 0),(0,s.Cg)([(0,m.MZ)({constructOnly:!0})],C.prototype,"minLOD",void 0),(0,s.Cg)([(0,m.MZ)({constructOnly:!0})],C.prototype,"maxLOD",void 0),(0,s.Cg)([(0,m.MZ)({constructOnly:!0})],C.prototype,"request",void 0),(0,s.Cg)([(0,m.MZ)({constructOnly:!0})],C.prototype,"size",void 0),C=r=(0,s.Cg)([(0,g.$)("esri.layers.support.TilemapCache")],C)},35982:(e,t,i)=>{i.d(t,{B:()=>l});var r=i(4576),s=i(36563),n=i(53966),a=i(74887),o=i(29953);class l{constructor(e,t,i,r,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._promise=(0,o.ho)(e,{...s,schedule:r}).then(e=>{if(void 0===this._thread){this._thread=e,this._promise=null,s.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()}),this._promise.catch(t=>n.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const i={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(i),this._connectListener(i),(0,s.hA)(()=>{i.removed=!0,(0,r.TF)(this._listeners,i),this._thread&&null!=i.threadHandle&&i.threadHandle.remove()})}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,r){if(this._thread){const s=this._transferLists[e],n=s?s(t):[];return this._thread.invoke(e,t,{transferList:n,signal:i,jobPriority:r})}return this._promise?this._promise.then(()=>((0,a.Te)(i),this.invokeMethod(e,t,i))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(h):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then(t=>{e.removed||(e.threadHandle=t)})}}function h(){}},54239:(e,t,i)=>{i.d(t,{A:()=>y});var r,s=i(31635),n=i(4576),a=i(66552),o=i(25482),l=i(83047),h=i(67076),c=i(10107),u=(i(44208),i(53966),i(36005)),d=i(64108),p=i(43937);const f=(0,a.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=f.jsonValues.slice();(0,n.Xy)(m,"orthometric");const g=(0,a.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 y=r=class extends o.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 h.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return g.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.LA)(e)||g.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({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 r({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 r;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new h.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,c.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal",write:{isRequired:!0}}}}})],y.prototype,"heightModel",void 0),(0,s.Cg)([(0,p.K)("web-scene","heightModel")],y.prototype,"writeHeightModel",null),(0,s.Cg)([(0,u.w)(["web-scene","service"],"heightModel")],y.prototype,"readHeightModel",null),(0,s.Cg)([(0,c.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:{writer:g.write,isRequired:!0}}}}})],y.prototype,"heightUnit",void 0),(0,s.Cg)([(0,u.w)("web-scene","heightUnit")],y.prototype,"readHeightUnit",null),(0,s.Cg)([(0,u.w)("service","heightUnit")],y.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,c.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],y.prototype,"vertCRS",void 0),(0,s.Cg)([(0,u.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],y.prototype,"readVertCRS",null),y=r=(0,s.Cg)([(0,d.$)("esri.geometry.HeightModelInfo")],y)},60999:(e,t,i)=>{i.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>c,UT:()=>m,aD:()=>y,jJ:()=>h});var r=i(31635),s=i(69622),n=i(97768),a=i(74887),o=i(10107),l=i(64108);function h(e,t,i){return(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))}async function c(e,t,i){return(await(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))).map(e=>e.value)}function u(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return u(await e)}catch(e){return d(e)}}async function f(e){try{return u(await e)}catch(e){return(0,a.QP)(e),d(e)}}function m(e,t){return new g(e,t)}let g=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,n.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=u(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,a.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,o.MZ)()],g.prototype,"value",null),(0,r.Cg)([(0,o.MZ)()],g.prototype,"error",null),(0,r.Cg)([(0,o.MZ)()],g.prototype,"finished",null),(0,r.Cg)([(0,o.MZ)()],g.prototype,"promise",void 0),(0,r.Cg)([(0,o.MZ)()],g.prototype,"_result",void 0),g=(0,r.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],g);class y{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,r.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}}},66344:(e,t,i)=>{i.d(t,{q:()=>o});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db=null}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,a){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==i&&this._notifyRemove(t,o.entry,o.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 r||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(a,-4)- -3;this._db.set(t,new n(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 r=i.entry.usedMemory;for(;r>this._maxSize;){const e=this._notifyRemove(t,i.entry,r,1);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}i.size=r,this._size+=r,e.size+=r,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,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forEach(i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}})});const r={};this._users.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,r[i]=Math.round(100*e.hitRate)+"%"}else r[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 / "+r[i]);for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.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._users.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,r){const s=this._users.get(e.split(a)[0])?.removeFunc,n=s?.(t,r,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(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 r=t?.id;let s=!0;for(;s;){s=!1;for(const[n,o]of this._db)if(0===o.lifetime&&(!r||n.startsWith(r))){const r=t??this._users.get(n.split(a)[0]);if(this._purgeItem(n,o,r),i.size<=.9*e)return;s||=this._db.has(n)}}for(const[s,n]of this._db)if(!r||s.startsWith(r)){const r=t??this._users.get(s.split(a)[0]);if(this._purgeItem(s,n,r),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 r=this._notifyRemove(e,t.entry,t.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new s(0);class n{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const a=":";class o{constructor(e,t){this.removeFunc=t,this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}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(){}}},68611:(e,t,i)=>{i.r(t),i.d(t,{default:()=>A});var r=i(31635),s=i(43773),n=i(49186),a=i(97768),o=i(25728),l=i(74887),h=i(84952),c=i(10107),u=(i(44208),i(53966),i(87811),i(36005)),d=i(64108),p=i(54239),f=i(4146),m=i(89186),g=i(18768),y=i(16131),v=i(8303),_=i(10873);class w{constructor(e,t,i,r){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=i,this.noDataValue=r)}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,r=-1/0,s=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(i=n<i?n:i,r=n>r?n:r,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=r>-3e38?r:0)}}var b=i(35982);class S extends b.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&&(M.forEach((e,t)=>{e===this&&M.delete(t)}),this.destroy())}}const M=new Map;let C=class extends((0,m.f)((0,g.b)((0,y.q)((0,v.A)((0,o.P)(f.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=M.get(e);return t||(null!=e?(t=new S(t=>e.immediate.schedule(t)),M.set(e,t)):(t=new S,M.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,a.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 n.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,r){const n=r?.signal,a={responseType:"array-buffer",signal:n},o={noDataValue:r?.noDataValue,returnFileInfo:!0};return this.load().then(()=>this._fetchTileAvailability(e,t,i,r)).then(()=>(0,s.A)(this.getTileUrl(e,t,i),a)).then(e=>this._lercDecoder.decode(e.data,o,n)).then(e=>new w(e))}getTileUrl(e,t,i){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.x0)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${s?"?"+s:""}`}async queryElevation(e,t){const{query:r}=await i.e(4375).then(i.bind(i,94375));return(0,l.Te)(t),r(this,e,t)}async createElevationSampler(e,t){const{createSampler:r}=await i.e(4375).then(i.bind(i,94375));return(0,l.Te)(t),r(this,e,t)}_fetchTileAvailability(e,t,i,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,r):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,s.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[z]}};(0,r.Cg)([(0,c.MZ)({readOnly:!0})],C.prototype,"capabilities",void 0),(0,r.Cg)([(0,u.w)("service","capabilities",["capabilities"])],C.prototype,"readCapabilities",null),(0,r.Cg)([(0,c.MZ)({json:{read:{source:"copyrightText"}}})],C.prototype,"copyright",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0,type:p.A})],C.prototype,"heightModelInfo",void 0),(0,r.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],C.prototype,"path",void 0),(0,r.Cg)([(0,c.MZ)({type:["show","hide"]})],C.prototype,"listMode",void 0),(0,r.Cg)([(0,c.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})],C.prototype,"minScale",void 0),(0,r.Cg)([(0,c.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})],C.prototype,"maxScale",void 0),(0,r.Cg)([(0,c.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],C.prototype,"opacity",void 0),(0,r.Cg)([(0,c.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],C.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,c.MZ)()],C.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,c.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],C.prototype,"type",void 0),(0,r.Cg)([(0,c.MZ)(_.OZ)],C.prototype,"url",void 0),(0,r.Cg)([(0,c.MZ)()],C.prototype,"version",void 0),(0,r.Cg)([(0,u.w)("version",["currentVersion"])],C.prototype,"readVersion",null),C=(0,r.Cg)([(0,d.$)("esri.layers.ElevationLayer")],C);const z=Symbol("default-fetch-tile");C.prototype.fetchTile[z]=!0;const A=C},69397:(e,t,i)=>{i.d(t,{$B:()=>s,Qf:()=>h,Qh:()=>o,RS:()=>n,ez:()=>d,lM:()=>a,qK:()=>u});var r=i(34275);function s(e){return 32+e.length}const n=16;function a(e){if(!e)return 0;let t=u;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return h(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let i=d;for(let r=0;r<t;r++)i+=l(e[r]);return i}(e);let t=u;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?o(e):u;case"string":return s(e);case"number":return n;case"boolean":return 4;default:return 8}}function h(...e){return e.reduce((e,t)=>e+(t?(0,r.iu)(t)?t.byteLength+p:Array.isArray(t)?c(t,n):0:0),0)}function c(e,t){return d+e.length*t}const u=32,d=16,p=145},69540:(e,t,i)=>{i.d(t,{OU:()=>c,Pw:()=>u});var r=i(31635),s=i(69622),n=(i(44208),i(4718)),a=(i(53966),i(97768)),o=i(88620),l=i(64108);const h=Symbol("ClonableMixin"),c=e=>{var t;const i=e;let s=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=h}clone(e){const t=(0,o.oY)(this);(0,a.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,r=t.store,s={},l=new Map;for(const t in i){const a=i[t],o=r?.originOf(t),h=a.clonable;if(a.readOnly||!1===h||7!==o&&0!==o&&5!==o&&4!==o)continue;const c=this[t];let u=null;if("function"==typeof h)u=h(c,e);else if("reference"===h)u=c;else if(u=(0,n.TU)(c,e),null!=c&&null==u)continue;0===o?l.set(t,u):s[t]=u}const h=new(0,Object.getPrototypeOf(this).constructor)(s);if(l.size){const e=(0,o.oY)(h)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return h}};return s=(0,r.Cg)([(0,l.$)("esri.core.Clonable")],s),s},u=c(s.A)},78553:(e,t,i)=>{i.d(t,{D:()=>n,p:()=>s});var r=i(56507);function s(e){const t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function n(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},89186:(e,t,i)=>{i.d(t,{f:()=>u});var r=i(31635),s=i(10107),n=(i(44208),i(53966),i(87811),i(36005)),a=i(64108),o=i(16930),l=i(87045),h=i(65509),c=i(25943);const u=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 r=t.capabilities?.includes("Tilemap");let{minLOD:s,maxLOD:n,minScale:a,maxScale:o}=t;if(null==s&&null==n&&(0!==a||0!==o)){const e=e=>Math.round(1e4*e)/1e4;a=e(a||t.tileInfo.lods[0].scale),o=e(o||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);s=t>=a?i.level:s,n=t>=o?i.level:n}}if(r)return new c.d({layer:this,minLOD:s,maxLOD:n});if(t.tileInfo){const e=new l.A;return e.read(t.tileInfo,i),new h.A(e,s,n)}return null}};return(0,r.Cg)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"minScale",void 0),(0,r.Cg)([(0,n.w)("service","minScale")],i.prototype,"readMinScale",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"maxScale",void 0),(0,r.Cg)([(0,n.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,r.Cg)([(0,s.MZ)({type:o.A})],i.prototype,"spatialReference",void 0),(0,r.Cg)([(0,s.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,r.Cg)([(0,s.MZ)({type:l.A})],i.prototype,"tileInfo",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"tilemapCache",void 0),(0,r.Cg)([(0,n.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"version",void 0),i=(0,r.Cg)([(0,a.$)("esri.layers.mixins.ArcGISCachedService")],i),i}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8484],{6518:(e,t,s)=>{s.d(t,{F:()=>a});var i=s(44208),n=s(75503),r=s(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 n.wq(9,(0,i.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((s,i)=>{e[t++]=i}),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,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(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()))}}},29432:(e,t,s)=>{s.r(t),s.d(t,{default:()=>S});var i=s(49186),n=s(65864),r=s(21325),o=s(90708),a=s(33032),u=s(83221),l=s(31464),h=s(56390),d=s(64714),c=s(82832),f=s(95466),m=s(98453),p=s(30524),y=s(98623);const _=r.KK,g={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:r.KK},b={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryAttachmentOrderByFields:!1,supportsQueryAttachmentWithTypeWildcard:!1,supportsQueryBins:!0,supportsQueryPivot:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0,supportsQueryWithCacheHint:!0},queryBinsCapabilities:c.PC};function x(e){return(0,n.fT)(e)?null!=e.z:!!e.hasZ}function I(e){return(0,n.fT)(e)?null!=e.m:!!e.hasM}class S{constructor(){this._queryEngine=null,this._nextObjectId=null}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e){const t=[],{features:s}=e,n=this._inferLayerProperties(s,e.fields),r=e.fields||[],o=null!=e.hasM?e.hasM:!!n.hasM,c=null!=e.hasZ?e.hasZ:!!n.hasZ,x=!e.spatialReference&&!n.spatialReference,I=x?_:e.spatialReference||n.spatialReference,S=x?g:null,B=e.geometryType||n.geometryType,M=!B;let z=e.objectIdField||n.objectIdField,v=e.timeInfo;const F=new f.A(r);if(!M&&(x&&t.push({name:"feature-layer:spatial-reference-not-found",message:"Spatial reference not provided or found in features. Defaults to WGS84"}),!B))throw new i.A("feature-layer:missing-property","geometryType not set and couldn't be inferred from the provided features");if(!z)throw new i.A("feature-layer:missing-property","objectIdField not set and couldn't be found in the provided fields");if(n.objectIdField&&z!==n.objectIdField&&(t.push({name:"feature-layer:duplicated-oid-field",message:`Provided objectIdField "${z}" doesn't match the field name "${n.objectIdField}", found in the provided fields`}),z=n.objectIdField),z&&!n.objectIdField){const e=F.get(z);e?(z=e.name,e.type="esriFieldTypeOID",e.editable=!1,e.nullable=!1):r.unshift({alias:z,name:z,type:"esriFieldTypeOID",editable:!1,nullable:!1})}for(const e of r){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new i.A("feature-layer:invalid-field-name","field name is missing",{field:e});if(e.name===z&&(e.type="esriFieldTypeOID"),!m.m.jsonValues.includes(e.type))throw new i.A("feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});null==e.length&&(e.length=(0,p._b)(e))}const E={};for(const e of r)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,p.lD)(e);void 0!==t&&(E[e.name]=t)}if(v){if(v.startTimeField){const e=F.get(v.startTimeField);e?(v.startTimeField=e.name,e.type="esriFieldTypeDate"):v.startTimeField=null}if(v.endTimeField){const e=F.get(v.endTimeField);e?(v.endTimeField=e.name,e.type="esriFieldTypeDate"):v.endTimeField=null}if(v.trackIdField){const e=F.get(v.trackIdField);e?v.trackIdField=e.name:(v.trackIdField=null,t.push({name:"feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:v}}))}v.startTimeField||v.endTimeField||(t.push({name:"feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing or invalid",details:{timeInfo:v}}),v=null)}const w=F.dateFields.length?{timeZoneIANA:e.dateFieldsTimeZone??y.n$}:null;this._createDefaultAttributes=(0,d.Vx)(E,z);const T={warnings:t,featureErrors:[],layerDefinition:{...b,drawingInfo:(0,d.F0)(B),templates:(0,d.e2)(E),extent:S,geometryType:B,objectIdField:z,fields:r,hasZ:c,hasM:o,timeInfo:v,dateFieldsTimeReference:w},assignedObjectIds:{}},R={type:"object-id",fieldName:z};if(this._queryEngine=new h.do({fieldsIndex:f.A.fromLayerJSON({fields:r,timeInfo:v,dateFieldsTimeReference:w}),geometryType:B,hasM:o,hasZ:c,featureIdInfo:R,spatialReference:I,featureStore:new u.A({geometryType:B,hasM:o,hasZ:c}),timeInfo:v}),!s?.length)return this._nextObjectId=a.L,T;const A=(0,a.H)(z,s);return this._nextObjectId=A+1,await(0,l.Nk)(s,I),this._loadInitialFeatures(T,s)}async applyEdits(e){const{spatialReference:t,geometryType:s}=this._queryEngine;return await Promise.all([(0,c.$1)(t,s),(0,l.Nk)(e.adds,t),(0,l.Nk)(e.updates,t)]),this._applyEdits(e)}queryFeatures(e,t={}){return this._queryEngine.executeQuery(e,t.signal)}queryFeatureCount(e,t={}){return this._queryEngine.executeQueryForCount(e,t.signal)}queryObjectIds(e,t={}){return this._queryEngine.executeQueryForIds(e,t.signal)}queryExtent(e,t={}){return this._queryEngine.executeQueryForExtent(e,t.signal)}querySnapping(e,t={}){return this._queryEngine.executeQueryForSnapping(e,t.signal)}queryAttributeBins(e,t={}){return this._queryEngine.executeAttributeBinsQuery(e,t.signal)}_inferLayerProperties(e,t){let s,i,r=null,o=null,a=null;for(const t of e){const e=t.geometry;if(null!=e&&(r||(r=(0,n.$B)(e)),o||(o=e.spatialReference),null==s&&(s=x(e)),null==i&&(i=I(e)),r&&o&&null!=s&&null!=i))break}if(t&&t.length){let e=null;t.some(t=>{const s="esriFieldTypeOID"===t.type,i=!t.type&&t.name&&"objectid"===t.name.toLowerCase();return e=t,s||i})&&(a=e.name)}return{geometryType:r,spatialReference:o,objectIdField:a,hasM:i,hasZ:s}}async _loadInitialFeatures(e,t){const{geometryType:s,hasM:i,hasZ:r,objectIdField:a,spatialReference:u,featureStore:h,fieldsIndex:d}=this._queryEngine,f=[],m={type:"object-id",fieldName:a};for(const i of t){if(null!=i.uid&&(e.assignedObjectIds[i.uid]=-1),i.geometry&&s!==(0,n.$B)(i.geometry)){e.featureErrors.push((0,c.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=(0,c.MB)(d,t,i.attributes,!0);r?e.featureErrors.push(r):(this._assignObjectId(t,i.attributes,!0),i.attributes=t,null!=i.uid&&(e.assignedObjectIds[i.uid]=i.attributes[a]),null!=i.geometry&&(i.geometry=(0,l.Cv)(i.geometry,i.geometry.spatialReference,u)),f.push(i))}h.addMany((0,o.Di)([],f,s,r,i,m));const{fullExtent:p,timeExtent:y}=await this._queryEngine.fetchRecomputedExtents();if(e.layerDefinition.extent=p,y){const{start:t,end:s}=y;e.layerDefinition.timeInfo.timeExtent=[t,s]}return e}async _applyEdits(e){const{adds:t,updates:s,deletes:i}=e,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(n,t),s?.length&&this._applyUpdateEdits(n,s),i?.length){for(const e of i)n.deleteResults.push((0,c.bP)(e));this._queryEngine.featureStore.removeManyById(i)}const{fullExtent:r,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:r,timeExtent:o,featureEditResults:n}}_applyAddEdits(e,t){const{addResults:s}=e,{geometryType:i,hasM:r,hasZ:a,objectIdField:u,spatialReference:h,featureStore:d,featureIdInfo:f,fieldsIndex:m}=this._queryEngine,p=[];for(const r of t){if(r.geometry&&i!==(0,n.$B)(r.geometry)){s.push((0,c.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),o=(0,c.MB)(m,t,r.attributes);if(o)s.push(o);else{if(this._assignObjectId(t,r.attributes),r.attributes=t,null!=r.uid){const t=r.attributes[u];e.uidToObjectId[r.uid]=t}if(null!=r.geometry){const e=r.geometry.spatialReference??h;r.geometry=(0,l.Cv)((0,c.CR)(r.geometry,e),e,h)}p.push(r),s.push((0,c.bP)(r.attributes[u]))}}d.addMany((0,o.Di)([],p,i,a,r,f))}_applyUpdateEdits({updateResults:e},t){const{geometryType:s,hasM:i,hasZ:r,objectIdField:a,spatialReference:u,featureStore:h,fieldsIndex:d,featureIdInfo:f}=this._queryEngine;for(const m of t){const{attributes:t,geometry:p}=m,y=t?.[a];if(null==y){e.push((0,c.Yx)(`Identifier field ${a} missing`));continue}if(!h.has(y)){e.push((0,c.Yx)(`Feature with object id ${y} missing`));continue}const _=(0,o.oN)(h.getFeature(y),s,r,i);if(null!=p){if(s!==(0,n.$B)(p)){e.push((0,c.Yx)("Incorrect geometry type."));continue}const t=p.spatialReference??u;_.geometry=(0,l.Cv)((0,c.CR)(p,t),t,u)}if(t){const s=(0,c.MB)(d,_.attributes,t);if(s){e.push(s);continue}}h.add((0,o.E2)(_,s,r,i,f)),e.push((0,c.bP)(y))}}_assignObjectId(e,t,s=!1){const i=this._queryEngine.objectIdField;s&&t&&isFinite(t[i])?e[i]=t[i]:e[i]=this._nextObjectId++}}},33032:(e,t,s)=>{s.d(t,{H:()=>n,L:()=>i});const i=1;function n(e,t){let s=0;for(const i of t){const t=i.attributes?.[e];"number"==typeof t&&isFinite(t)&&(s=Math.max(s,t))}return s}},37730:(e,t,s)=>{s.d(t,{T:()=>n});var i=s(43334);const n={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new i.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},64714:(e,t,s)=>{s.d(t,{F0:()=>a,Vx:()=>h,e2:()=>c,f:()=>f});var i=s(44208),n=s(4718),r=s(99352),o=s(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function h(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this${d(t)} = null;`;for(const t in e)s+=`this${d(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[t]:null,...e})}}function d(e){return u.test(e)?`.${e}`:`["${e}"]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd: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,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},66344:(e,t,s)=>{s.d(t,{q:()=>a});const i=!!(0,s(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class n{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db=null}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,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!==s&&this._notifyRemove(t,a.entry,a.size,0)),n>this._maxSize)return void this._notifyRemove(t,s,n,0);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return i||console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,0);const u=1+Math.max(o,-4)- -3;this._db.set(t,new r(s,n,u)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t){t=e.id+t;const s=this._db.get(t);if(!s)return;this._size-=s.size,e.size-=s.size;let i=s.entry.usedMemory;for(;i>this._maxSize;){const e=this._notifyRemove(t,s.entry,i,1);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}s.size=i,this._size+=i,e.size+=i,this._checkSize()}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.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={},s=new Array;this._db.forEach((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forEach(s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}})});const i={};this._users.forEach(e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"});const n=Object.keys(t);n.sort((e,s)=>t[s]-t[e]),n.forEach(s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]);for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,s]of this._db)t.startsWith(e.id)&&(yield s.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){const n=this._users.get(e.split(o)[0])?.removeFunc,r=n?.(t,i,s);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const s=t??this;if(s.size<=e)return;const i=t?.id;let n=!0;for(;n;){n=!1;for(const[r,a]of this._db)if(0===a.lifetime&&(!i||r.startsWith(i))){const i=t??this._users.get(r.split(o)[0]);if(this._purgeItem(r,a,i),s.size<=.9*e)return;n||=this._db.has(r)}}for(const[n,r]of this._db)if(!i||n.startsWith(i)){const i=t??this._users.get(n.split(o)[0]);if(this._purgeItem(n,r,i),s.size<=.9*e)return}}_purgeItem(e,t,s){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,1);null!=i&&i>0&&(this._size+=i,s&&(s.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new n(0);class r{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}const o=":";class a{constructor(e,t){this.removeFunc=t,this._storage=new n,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,s=1){this._storage.put(this,e,t,s,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(){}}},67482:(e,t,s)=>{function i(e){return null!=a(e)||null!=o(e)}function n(e){return u.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 s=!0;if(h&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,i=0;for(;!t&&i<=e.length;)t=!l.test(e[i]),i++;s=!t}}return s}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=u.exec(e);if(!t?.groups)return null;const s=t.groups,i=+s.year,n=+s.month-1,r=+s.day,o=+(s.hours??"0"),a=+(s.minutes??"0"),l=+(s.seconds??"0");if(o>23)return null;if(a>59)return null;if(l>59)return null;const h=s.ms??"0",d=h?+h.padEnd(3,"0").slice(0,3):0;let c;if(s.isUTC||!s.offsetSign)c=Date.UTC(i,n,r,o,a,l,d);else{const e=+s.offsetHours,t=+s.offsetMinutes;c=6e4*("+"===s.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,n,r,o,a,l,d)}return Number.isNaN(c)?null:c}s.d(t,{Br:()=>n,Cq:()=>i,_U:()=>r});const u=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,l=/^((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,h=!Number.isNaN(new Date("technology 10").getTime())},69540:(e,t,s)=>{s.d(t,{OU:()=>h,Pw:()=>d});var i=s(31635),n=s(69622),r=(s(44208),s(4718)),o=(s(53966),s(97768)),a=s(88620),u=s(64108);const l=Symbol("ClonableMixin"),h=e=>{var t;const s=e;let n=class extends s{constructor(){super(...arguments),this[t]=!0}static{t=l}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const s=t.metadata,i=t.store,n={},u=new Map;for(const t in s){const o=s[t],a=i?.originOf(t),l=o.clonable;if(o.readOnly||!1===l||7!==a&&0!==a&&5!==a&&4!==a)continue;const h=this[t];let d=null;if("function"==typeof l)d=l(h,e);else if("reference"===l)d=h;else if(d=(0,r.TU)(h,e),null!=h&&null==d)continue;0===a?u.set(t,d):n[t]=d}const l=new(0,Object.getPrototypeOf(this).constructor)(n);if(u.size){const e=(0,a.oY)(l)?.store;if(e)for(const[t,s]of u)e.set(t,s,0)}return l}};return n=(0,i.Cg)([(0,u.$)("esri.core.Clonable")],n),n},d=h(n.A)},75503:(e,t,s)=>{s.d(t,{EC:()=>z,wq:()=>a});var i=s(4576),n=s(21818),r=(s(44208),s(15142)),o=s(11006);class a{constructor(e=9,t){this._compareMinX=c,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(),I.prune(),S.prune(),B.prune(),M.prune()}all(e){u(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(b(e,s))for(I.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;b(e,o)&&(s.leaf?t(r):g(e,o)?u(r,t):I.push(r))}s=I.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!b(e,t))return!1;for(I.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(b(e,r)){if(t.leaf||g(e,r))return!0;I.push(n)}}t=I.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;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 F([]),this}remove(e){if(!e)return this;let t,s=this._data,r=null,o=0,a=!1;const u=this._toBBox(e);for(B.clear(),M.clear();s||B.length>0;){if(s||(s=B.pop(),r=B.data[B.length-1],o=M.pop()??0,a=!0),s.leaf&&(t=(0,i.qh)(s.children,(0,n.zI)(e),s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),B.push(s),this._condense(B),this;a||s.leaf||!g(s,u)?r?(o++,s=r.children[o],a=!1):s=null:(B.push(s),M.push(o),o=0,r=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new F(e.slice(t,s+1));return l(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new E([]);o.height=i;const a=Math.ceil(n/r),u=a*Math.ceil(Math.sqrt(r));x(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);x(e,n,t,a,this._compareMinY);for(let s=n;s<=t;s+=a){const n=Math.min(s+a-1,t);o.children.push(this._build(e,s,n,i-1))}}return l(o,this._toBBox),o}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);B.clear();const r=function(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=m(o),u=y(e,o)-a;u<n?(n=u,i=a<i?a:i,s=o):u===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}(n,this._data,t,B);for(r.children.push(e),d(r,n);t>=0&&B.data[t].children.length>this._maxEntries;)this._split(B,t),t--;!function(e,t,s){for(let i=s;i>=0;i--)d(t.data[i],e)}(n,B,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return;const o=s.children.splice(r,s.children.length-r),a=s.leaf?new F(o):new E(o);a.height=s.height,l(s,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new E([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,s,this._toBBox),u=_(t,a),l=m(t)+m(a);u<i?(i=u,r=o,n=l<n?l:n):u===i&&l<n&&(n=l,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:c,n=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=h(e,0,t,n),o=h(e,s-t,s,n);let a=p(r)+p(o);for(let i=t;i<s-t;i++){const t=e.children[i];d(r,e.leaf?n(t):t),a+=p(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];d(o,e.leaf?n(t):t),a+=p(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.qh)(r,s,r.length,n.indexHint),1)}else this.clear();else l(s,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 u(e,t){let s=e;for(S.clear();s;){if(!0===s.leaf)for(const e of s.children)t((0,n.zI)(e));else S.pushArray(s.children);s=S.pop()??null}}function l(e,t){h(e,0,e.children.length,t,e)}function h(e,t,s,i,n){n||(n=new F([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],d(n,e.leaf?i(r):r);return n}function d(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 c(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 _(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,s,i,n){const r=[t,s];for(;r.length;){const t=r.pop(),s=r.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,o.q)(e,a,s,t,n),r.push(s,a,a,t)}}const I=new r.A,S=new r.A,B=new r.A,M=new r.A({deallocator:void 0});class z{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class v extends z{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class F extends v{constructor(e){super(),this.children=e,this.leaf=!0}}class E extends v{constructor(e){super(),this.children=e,this.leaf=!1}}},82832:(e,t,s)=>{s.d(t,{$1:()=>y,CR:()=>p,MB:()=>c,PC:()=>_,Yx:()=>u,bP:()=>h});var i=s(67482),n=s(21325),r=s(30524);class o{constructor(e){this.description=e,this.code=null}}class a{constructor(e){this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error=new o(e)}}function u(e){return new a(e)}class l{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function h(e){return new l(e)}const d=new Set;function c(e,t,s,i=!1){d.clear();for(const n in s){const o=e.get(n);if(!o)continue;const a=f(o,s[n]);if(d.add(o.name),o&&(i||o.editable)){const e=(0,r.CJ)(o,a);if(e)return u((0,r.uo)(e,o,a));t[o.name]=a}}for(const t of e.requiredFields??[])if(!d.has(t.name))return u(`missing required field "${t.name}"`);return null}function f(e,t){let s=t;return(0,r.WA)(e)&&"string"==typeof t?s=parseFloat(t):(0,r.yM)(e)&&null!=t&&"string"!=typeof t?s=String(t):(0,r.vE)(e)&&"string"==typeof t&&(s=(0,i._U)(t)),(0,r.WX)(s)}let m;function p(e,t){if(!e||!(0,n.fn)(t))return e;if("rings"in e||"paths"in e){if(null==m)throw new TypeError("geometry engine not loaded");return m.simplify(t,e)}return e}async function y(e,t){!(0,n.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==m&&(m=await Promise.all([s.e(3209),s.e(7559)]).then(s.bind(s,47559))),m}()}const _={supportsAutoIntervalBin:!0,supportsFixedIntervalBin:!0,supportsFixedBoundariesBin:!0,supportsDateBin:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsNormalization:!0,supportedStatisticTypes:["COUNT","SUM","AVG","VAR","STDDEV","MIN","MAX","PERCENTILE_CONT","PERCENTILE_DISC","CentroidAggregate","EnvelopeAggregate","ConvexHullAggregate"],supportedNormalizationTypes:["field","log","naturalLog","percentOfTotal","squareRoot"]}},83221:(e,t,s)=>{s.d(t,{A:()=>m});var i=s(4576),n=s(49186),r=s(65529),o=s(53966),a=s(70328),u=s(19419),l=s(90708),h=s(6518),d=s(51441),c=s(37730);const f=(0,a.vt)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=c.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,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,d.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(i.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 s of e){const e=this._boundsStore.get(s.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 n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(s)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,l.jQ)(null!=i?i:(0,u.vt)(),e.geometry),null!=i&&this._boundsStore.set(t,i),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 n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(s)??0;const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,l.jQ)((0,u.vt)(),i)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(s)??0,s}_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}}},93470:(e,t,s)=>{s.d(t,{Cb:()=>r,HW:()=>h,JR:()=>n,JZ:()=>u,WR:()=>a,b6:()=>d,fT:()=>i,nC:()=>l,yM:()=>o});const i=[252,146,31,255],n=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},u={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},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9013],{11053:(e,t,r)=>{r.d(t,{c:()=>a,g:()=>n});var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},29013:(e,t,r)=>{r.r(t),r.d(t,{a:()=>s});var a,n=r(11053),o={exports:{}};const i=(0,n.g)(function(){return a||(a=1,e=o,t="undefined"!=typeof document?document.currentScript?.src:void 0,r=function(e={}){var r,a,o,i=e,s=new Promise((e,t)=>{r=e,a=t}),u=Object.assign({},i),f="./this.program",l="";"undefined"!=typeof document&&document.currentScript&&(l=document.currentScript.src),t&&(l=t),l=l.startsWith("blob:")?"":l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1),o=async e=>{if((e=await fetch(e,{credentials:"same-origin"})).ok)return e.arrayBuffer();throw Error(e.status+" : "+e.url)};var c=i.print||console.log.bind(console),h=i.printErr||console.error.bind(console);Object.assign(i,u),u=null,i.thisProgram&&(f=i.thisProgram);var p,d,m,v,y,g,w,b,$,T,A,C,W=i.wasmBinary,j=!1;function P(){var e=p.buffer;i.HEAP8=m=new Int8Array(e),i.HEAP16=y=new Int16Array(e),i.HEAPU8=v=new Uint8Array(e),i.HEAPU16=g=new Uint16Array(e),i.HEAP32=w=new Int32Array(e),i.HEAPU32=b=new Uint32Array(e),i.HEAPF32=$=new Float32Array(e),i.HEAPF64=C=new Float64Array(e),i.HEAP64=T=new BigInt64Array(e),i.HEAPU64=A=new BigUint64Array(e)}var E=[],O=[],k=[];function S(){var e=i.preRun.shift();E.unshift(e)}var x=0,F=null;function R(e){throw i.onAbort?.(e),h(e="Aborted("+e+")"),j=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),a(e),e}var _,U=e=>e.startsWith("data:application/octet-stream;base64,");class I{name="ExitStatus";constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var M=e=>{for(;0<e.length;)e.shift()(i)},B=i.noExitRuntime||!0;class H{constructor(e){this.ga=e-24}}var D={},V=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function z(e){return this.fromWireType(b[e>>2])}var N,q,L,G={},J={},K={},Q=(e,t,r)=>{function a(t){if((t=r(t)).length!==e.length)throw new N("Mismatched type converter count");for(var a=0;a<e.length;++a)X(e[a],t[a])}e.forEach(e=>K[e]=t);var n=Array(t.length),o=[],i=0;t.forEach((e,t)=>{J.hasOwnProperty(e)?n[t]=J[e]:(o.push(e),G.hasOwnProperty(e)||(G[e]=[]),G[e].push(()=>{n[t]=J[e],++i===o.length&&a(n)}))}),0===o.length&&a(n)},Y=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},Z=e=>{for(var t="";v[e];)t+=q[v[e++]];return t};function X(e,t,r={}){return function(e,t,r={}){var a=t.name;if(!e)throw new L(`type "${a}" must have a positive integer typeid pointer`);if(J.hasOwnProperty(e)){if(r.La)return;throw new L(`Cannot register type '${a}' twice`)}J[e]=t,delete K[e],G.hasOwnProperty(e)&&(t=G[e],delete G[e],t.forEach(e=>e()))}(e,t,r)}var ee=(e,t,r)=>{switch(t){case 1:return r?e=>m[e]:e=>v[e];case 2:return r?e=>y[e>>1]:e=>g[e>>1];case 4:return r?e=>w[e>>2]:e=>b[e>>2];case 8:return r?e=>T[e>>3]:e=>A[e>>3];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},te=e=>{throw new L(e.ea.ha.fa.name+" instance already deleted")},re=!1,ae=()=>{},ne=(e,t,r)=>t===r?e:void 0===r.ka||null===(e=ne(e,t,r.ka))?null:r.Ea(e),oe={},ie={},se=(e,t)=>{if(!t.ha||!t.ga)throw new N("makeClassHandle requires ptr and ptrType");if(!!t.na!=!!t.ja)throw new N("Both smartPtrType and smartPtr must be specified");return t.count={value:1},ue(Object.create(e,{ea:{value:t,writable:!0}}))},ue=e=>"undefined"==typeof FinalizationRegistry?(ue=e=>e,e):(re=new FinalizationRegistry(e=>{--(e=e.ea).count.value,0===e.count.value&&(e.ja?e.na.oa(e.ja):e.ha.fa.oa(e.ga))}),ae=e=>{re.unregister(e)},(ue=e=>{var t=e.ea;return t.ja&&re.register(e,{ea:t},e),e})(e));function fe(){}var le=(e,t)=>Object.defineProperty(t,"name",{value:e}),ce=(e,t,r)=>{if(void 0===e[t].ia){var a=e[t];e[t]=function(...a){if(!e[t].ia.hasOwnProperty(a.length))throw new L(`Function '${r}' called with an invalid number of arguments (${a.length}) - expects one of (${e[t].ia})!`);return e[t].ia[a.length].apply(this,a)},e[t].ia=[],e[t].ia[a.qa]=a}},he=(e,t,r)=>{if(i.hasOwnProperty(e)){if(void 0===r||void 0!==i[e].ia&&void 0!==i[e].ia[r])throw new L(`Cannot register public name '${e}' twice`);if(ce(i,e,e),i[e].ia.hasOwnProperty(r))throw new L(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`);i[e].ia[r]=t}else i[e]=t,i[e].qa=r};function pe(e,t,r,a,n,o,i,s){this.name=e,this.constructor=t,this.pa=r,this.oa=a,this.ka=n,this.Ga=o,this.ua=i,this.Ea=s,this.Na=[]}var de=(e,t,r)=>{for(;t!==r;){if(!t.ua)throw new L(`Expected null or instance of ${r.name}, got an instance of ${t.name}`);e=t.ua(e),t=t.ka}return e};function me(e,t){if(null===t){if(this.ya)throw new L(`null is not a valid ${this.name}`);return 0}if(!t.ea)throw new L(`Cannot pass "${Y(t)}" as a ${this.name}`);if(!t.ea.ga)throw new L(`Cannot pass deleted object as a pointer of type ${this.name}`);return de(t.ea.ga,t.ea.ha.fa,this.fa)}function ve(e,t){if(null===t){if(this.ya)throw new L(`null is not a valid ${this.name}`);if(this.xa){var r=this.za();return null!==e&&e.push(this.oa,r),r}return 0}if(!t||!t.ea)throw new L(`Cannot pass "${Y(t)}" as a ${this.name}`);if(!t.ea.ga)throw new L(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.wa&&t.ea.ha.wa)throw new L(`Cannot convert argument of type ${t.ea.na?t.ea.na.name:t.ea.ha.name} to parameter type ${this.name}`);if(r=de(t.ea.ga,t.ea.ha.fa,this.fa),this.xa){if(void 0===t.ea.ja)throw new L("Passing raw pointer to smart pointer is illegal");switch(this.Sa){case 0:if(t.ea.na!==this)throw new L(`Cannot convert argument of type ${t.ea.na?t.ea.na.name:t.ea.ha.name} to parameter type ${this.name}`);r=t.ea.ja;break;case 1:r=t.ea.ja;break;case 2:if(t.ea.na===this)r=t.ea.ja;else{var a=t.clone();r=this.Oa(r,Ie(()=>a.delete())),null!==e&&e.push(this.oa,r)}break;default:throw new L("Unsupporting sharing policy")}}return r}function ye(e,t){if(null===t){if(this.ya)throw new L(`null is not a valid ${this.name}`);return 0}if(!t.ea)throw new L(`Cannot pass "${Y(t)}" as a ${this.name}`);if(!t.ea.ga)throw new L(`Cannot pass deleted object as a pointer of type ${this.name}`);if(t.ea.ha.wa)throw new L(`Cannot convert argument of type ${t.ea.ha.name} to parameter type ${this.name}`);return de(t.ea.ga,t.ea.ha.fa,this.fa)}function ge(e,t,r,a,n,o,i,s,u,f,l){this.name=e,this.fa=t,this.ya=r,this.wa=a,this.xa=n,this.Ma=o,this.Sa=i,this.Ca=s,this.za=u,this.Oa=f,this.oa=l,n||void 0!==t.ka?this.toWireType=ve:(this.toWireType=a?me:ye,this.ma=null)}var we,be,$e=(e,t,r)=>{if(!i.hasOwnProperty(e))throw new N("Replacing nonexistent public symbol");void 0!==i[e].ia&&void 0!==r?i[e].ia[r]=t:(i[e]=t,i[e].qa=r)},Te=[],Ae=(e,t)=>{e=Z(e);var r=Te[t];if(r||(t>=Te.length&&(Te.length=t+1),Te[t]=r=we.get(t)),"function"!=typeof r)throw new L(`unknown function pointer with signature ${e}: ${t}`);return r},Ce=e=>{e=yt(e);var t=Z(e);return wt(e),t},We=(e,t)=>{var r=[],a={};throw t.forEach(function e(t){a[t]||J[t]||(K[t]?K[t].forEach(e):(r.push(t),a[t]=!0))}),new be(`${e}: `+r.map(Ce).join([", "]))};function je(e,t,r,a,n){var o=t.length;if(2>o)throw new L("argTypes array size mismatch! Must at least get return value and 'this' types!");var i=null!==t[1]&&null!==r,s=function(e){for(var t=1;t<e.length;++t)if(null!==e[t]&&void 0===e[t].ma)return!0;return!1}(t),u="void"!==t[0].name,f=o-2,l=Array(f),c=[],h=[];return le(e,function(...e){if(h.length=0,c.length=i?2:1,c[0]=n,i){var r=t[1].toWireType(h,this);c[1]=r}for(var o=0;o<f;++o)l[o]=t[o+2].toWireType(h,e[o]),c.push(l[o]);if(e=a(...c),s)V(h);else for(o=i?1:2;o<t.length;o++){var p=1===o?r:l[o-2];null!==t[o].ma&&t[o].ma(p)}return u?t[0].fromWireType(e):void 0})}var Pe,Ee,Oe,ke=(e,t)=>{for(var r=[],a=0;a<e;a++)r.push(b[t+4*a>>2]);return r},Se=e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e},xe=(e,t,r)=>{if(!(e instanceof Object))throw new L(`${r} with invalid "this": ${e}`);if(!(e instanceof t.fa.constructor))throw new L(`${r} incompatible with "this" of type ${e.constructor.name}`);if(!e.ea.ga)throw new L(`cannot call emscripten binding method ${r} on deleted object`);return de(e.ea.ga,e.ea.ha.fa,t.fa)},Fe=[],Re=[],_e=e=>{9<e&&0===--Re[e+1]&&(Re[e]=void 0,Fe.push(e))},Ue=e=>{if(!e)throw new L("Cannot use deleted val. handle = "+e);return Re[e]},Ie=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:const t=Fe.pop()||Re.length;return Re[t]=e,Re[t+1]=1,t}},Me={name:"emscripten::val",fromWireType:e=>{var t=Ue(e);return _e(e),t},toWireType:(e,t)=>Ie(t),la:8,readValueFromPointer:z,ma:null},Be=(e,t,r)=>{switch(t){case 1:return r?function(e){return this.fromWireType(m[e])}:function(e){return this.fromWireType(v[e])};case 2:return r?function(e){return this.fromWireType(y[e>>1])}:function(e){return this.fromWireType(g[e>>1])};case 4:return r?function(e){return this.fromWireType(w[e>>2])}:function(e){return this.fromWireType(b[e>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},He=(e,t)=>{var r=J[e];if(void 0===r)throw e=`${t} has unknown type ${Ce(e)}`,new L(e);return r},De=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType($[e>>2])};case 8:return function(e){return this.fromWireType(C[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Ve=Object.assign({optional:!0},Me),ze=(e,t,r)=>{var a=v;if(0<r){r=t+r-1;for(var n=0;n<e.length;++n){var o=e.charCodeAt(n);if(55296<=o&&57343>=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++n)),127>=o){if(t>=r)break;a[t++]=o}else{if(2047>=o){if(t+1>=r)break;a[t++]=192|o>>6}else{if(65535>=o){if(t+2>=r)break;a[t++]=224|o>>12}else{if(t+3>=r)break;a[t++]=240|o>>18,a[t++]=128|o>>12&63}a[t++]=128|o>>6&63}a[t++]=128|63&o}}a[t]=0}},Ne="undefined"!=typeof TextDecoder?new TextDecoder:void 0,qe=(e,t=0,r=NaN)=>{var a=t+r;for(r=t;e[r]&&!(r>=a);)++r;if(16<r-t&&e.buffer&&Ne)return Ne.decode(e.subarray(t,r));for(a="";t<r;){var n=e[t++];if(128&n){var o=63&e[t++];if(192==(224&n))a+=String.fromCharCode((31&n)<<6|o);else{var i=63&e[t++];65536>(n=224==(240&n)?(15&n)<<12|o<<6|i:(7&n)<<18|o<<12|i<<6|63&e[t++])?a+=String.fromCharCode(n):(n-=65536,a+=String.fromCharCode(55296|n>>10,56320|1023&n))}}else a+=String.fromCharCode(n)}return a},Le="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Ge=(e,t)=>{for(var r=e>>1,a=r+t/2;!(r>=a)&&g[r];)++r;if(32<(r<<=1)-e&&Le)return Le.decode(v.subarray(e,r));for(r="",a=0;!(a>=t/2);++a){var n=y[e+2*a>>1];if(0==n)break;r+=String.fromCharCode(n)}return r},Je=(e,t,r)=>{if(r??=2147483647,2>r)return 0;var a=t;r=(r-=2)<2*e.length?r/2:e.length;for(var n=0;n<r;++n)y[t>>1]=e.charCodeAt(n),t+=2;return y[t>>1]=0,t-a},Ke=e=>2*e.length,Qe=(e,t)=>{for(var r=0,a="";!(r>=t/4);){var n=w[e+4*r>>2];if(0==n)break;++r,65536<=n?(n-=65536,a+=String.fromCharCode(55296|n>>10,56320|1023&n)):a+=String.fromCharCode(n)}return a},Ye=(e,t,r)=>{if(r??=2147483647,4>r)return 0;var a=t;r=a+r-4;for(var n=0;n<e.length;++n){var o=e.charCodeAt(n);if(55296<=o&&57343>=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++n)),w[t>>2]=o,(t+=4)+4>r)break}return w[t>>2]=0,t-a},Ze=e=>{for(var t=0,r=0;r<e.length;++r){var a=e.charCodeAt(r);55296<=a&&57343>=a&&++r,t+=4}return t},Xe=0,et=(e,t,r)=>{var a=[];return e=e.toWireType(a,r),a.length&&(b[t>>2]=Ie(a)),e},tt=[],rt={},at=e=>{var t=rt[e];return void 0===t?Z(e):t},nt=()=>{function e(e){e.$$$embind_global$$$=e;var t="object"==typeof $$$embind_global$$$&&e.$$$embind_global$$$==e;return t||delete e.$$$embind_global$$$,t}if("object"==typeof globalThis)return globalThis;if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof n.c&&e(n.c)?$$$embind_global$$$=n.c:"object"==typeof self&&e(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},ot=Reflect.construct,it={},st=e=>{if(!(e instanceof I||"unwind"==e))throw e},ut=e=>{throw d=e,B||0<Xe||(i.onExit?.(e),j=!0),new I(e)},ft={},lt=()=>{if(!Pe){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:f||"./this.program"};for(e in ft)void 0===ft[e]?delete t[e]:t[e]=ft[e];var r=[];for(e in t)r.push(`${e}=${t[e]}`);Pe=r}return Pe},ct=[null,[],[]];N=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}};for(var ht=Array(256),pt=0;256>pt;++pt)ht[pt]=String.fromCharCode(pt);q=ht,L=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Object.assign(fe.prototype,{isAliasOf:function(e){if(!(this instanceof fe&&e instanceof fe))return!1;var t=this.ea.ha.fa,r=this.ea.ga;e.ea=e.ea;var a=e.ea.ha.fa;for(e=e.ea.ga;t.ka;)r=t.ua(r),t=t.ka;for(;a.ka;)e=a.ua(e),a=a.ka;return t===a&&r===e},clone:function(){if(this.ea.ga||te(this),this.ea.ta)return this.ea.count.value+=1,this;var e=ue,t=Object,r=t.create,a=Object.getPrototypeOf(this),n=this.ea;return(e=e(r.call(t,a,{ea:{value:{count:n.count,sa:n.sa,ta:n.ta,ga:n.ga,ha:n.ha,ja:n.ja,na:n.na}}}))).ea.count.value+=1,e.ea.sa=!1,e},delete(){if(this.ea.ga||te(this),this.ea.sa&&!this.ea.ta)throw new L("Object already scheduled for deletion");ae(this);var e=this.ea;--e.count.value,0===e.count.value&&(e.ja?e.na.oa(e.ja):e.ha.fa.oa(e.ga)),this.ea.ta||(this.ea.ja=void 0,this.ea.ga=void 0)},isDeleted:function(){return!this.ea.ga},deleteLater:function(){if(this.ea.ga||te(this),this.ea.sa&&!this.ea.ta)throw new L("Object already scheduled for deletion");return this.ea.sa=!0,this}}),Object.assign(ge.prototype,{Ha(e){return this.Ca&&(e=this.Ca(e)),e},Aa(e){this.oa?.(e)},la:8,readValueFromPointer:z,fromWireType:function(e){function t(){return this.xa?se(this.fa.pa,{ha:this.Ma,ga:r,na:this,ja:e}):se(this.fa.pa,{ha:this,ga:e})}var r=this.Ha(e);if(!r)return this.Aa(e),null;var a=((e,t)=>{if(void 0===t)throw new L("ptr should not be undefined");for(;e.ka;)t=e.ua(t),e=e.ka;return ie[t]})(this.fa,r);if(void 0!==a)return 0===a.ea.count.value?(a.ea.ga=r,a.ea.ja=e,a.clone()):(a=a.clone(),this.Aa(e),a);if(a=this.fa.Ga(r),!(a=oe[a]))return t.call(this);a=this.wa?a.Da:a.pointerType;var n=ne(r,this.fa,a.fa);return null===n?t.call(this):this.xa?se(a.fa.pa,{ha:a,ga:n,na:this,ja:e}):se(a.fa.pa,{ha:a,ga:n})}}),be=i.UnboundTypeError=(Ee=Error,(Oe=le("UnboundTypeError",function(e){this.name="UnboundTypeError",this.message=e,void 0!==(e=Error(e).stack)&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))})).prototype=Object.create(Ee.prototype),Oe.prototype.constructor=Oe,Oe.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},Oe),Re.push(0,1,void 0,1,null,1,!0,1,!1,1),i.count_emval_handles=()=>Re.length/2-5-Fe.length;var dt,mt={m:(e,t,r)=>{var a=new H(e);throw b[a.ga+16>>2]=0,b[a.ga+4>>2]=t,b[a.ga+8>>2]=r,e},O:()=>R(""),r:e=>{var t=D[e];delete D[e];var r=t.za,a=t.oa,n=t.Ba,o=n.map(e=>e.Ka).concat(n.map(e=>e.Qa));Q([e],o,e=>{var o={};return n.forEach((t,r)=>{var a=e[r],i=t.Ia,s=t.Ja,u=e[r+n.length],f=t.Pa,l=t.Ra;o[t.Fa]={read:e=>a.fromWireType(i(s,e)),write:(e,t)=>{var r=[];f(l,e,u.toWireType(r,t)),V(r)}}}),[{name:t.name,fromWireType:e=>{var t,r={};for(t in o)r[t]=o[t].read(e);return a(e),r},toWireType:(e,t)=>{for(var n in o)if(!(n in t))throw new TypeError(`Missing field: "${n}"`);var i=r();for(n in o)o[n].write(i,t[n]);return null!==e&&e.push(a,i),i},la:8,readValueFromPointer:z,ma:a}]})},E:(e,t,r)=>{X(e,{name:t=Z(t),fromWireType:e=>e,toWireType:function(e,t){if("bigint"!=typeof t&&"number"!=typeof t)throw new TypeError(`Cannot convert "${Y(t)}" to ${this.name}`);return"number"==typeof t&&(t=BigInt(t)),t},la:8,readValueFromPointer:ee(t,r,-1==t.indexOf("u")),ma:null})},V:(e,t,r,a)=>{X(e,{name:t=Z(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:a},la:8,readValueFromPointer:function(e){return this.fromWireType(v[e])},ma:null})},f:(e,t,r,a,n,o,i,s,u,f,l,c,h)=>{l=Z(l),o=Ae(n,o),s&&=Ae(i,s),f&&=Ae(u,f),h=Ae(c,h);var p=(e=>{var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=t&&57>=t?`_${e}`:e})(l);he(p,function(){We(`Cannot construct ${l} due to unbound types`,[a])}),Q([e,t,r],a?[a]:[],t=>{if(t=t[0],a)var r=t.fa,n=r.pa;else n=fe.prototype;t=le(l,function(...e){if(Object.getPrototypeOf(this)!==i)throw new L("Use 'new' to construct "+l);if(void 0===c.ra)throw new L(l+" has no accessible constructor");var t=c.ra[e.length];if(void 0===t)throw new L(`Tried to invoke ctor of ${l} with invalid number of parameters (${e.length}) - expected (${Object.keys(c.ra).toString()}) parameters instead!`);return t.apply(this,e)});var i=Object.create(n,{constructor:{value:t}});t.prototype=i;var u,c=new pe(l,t,i,h,r,o,s,f);return c.ka&&((u=c.ka).va??(u.va=[]),c.ka.va.push(c)),r=new ge(l,c,!0,!1,!1),u=new ge(l+"*",c,!1,!1,!1),n=new ge(l+" const*",c,!1,!0,!1),oe[e]={pointerType:u,Da:n},$e(p,t),[r,u,n]})},v:(e,t,r,a,n,o,i)=>{var s=ke(r,a);t=Z(t),t=Se(t),o=Ae(n,o),Q([],[e],e=>{function a(){We(`Cannot call ${n} due to unbound types`,s)}var n=`${(e=e[0]).name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var u=e.fa.constructor;return void 0===u[t]?(a.qa=r-1,u[t]=a):(ce(u,t,n),u[t].ia[r-1]=a),Q([],s,a=>{if(a=je(n,[a[0],null].concat(a.slice(1)),null,o,i),void 0===u[t].ia?(a.qa=r-1,u[t]=a):u[t].ia[r-1]=a,e.fa.va)for(const r of e.fa.va)r.constructor.hasOwnProperty(t)||(r.constructor[t]=a);return[]}),[]})},g:(e,t,r,a,n,o)=>{var i=ke(t,r);n=Ae(a,n),Q([],[e],e=>{var r=`constructor ${(e=e[0]).name}`;if(void 0===e.fa.ra&&(e.fa.ra=[]),void 0!==e.fa.ra[t-1])throw new L(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.fa.ra[t-1]=()=>{We(`Cannot construct ${e.name} due to unbound types`,i)},Q([],i,a=>(a.splice(1,0,null),e.fa.ra[t-1]=je(r,a,null,n,o),[])),[]})},a:(e,t,r,a,n,o,i,s)=>{var u=ke(r,a);t=Z(t),t=Se(t),o=Ae(n,o),Q([],[e],e=>{function a(){We(`Cannot call ${n} due to unbound types`,u)}var n=`${(e=e[0]).name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.fa.Na.push(t);var f=e.fa.pa,l=f[t];return void 0===l||void 0===l.ia&&l.className!==e.name&&l.qa===r-2?(a.qa=r-2,a.className=e.name,f[t]=a):(ce(f,t,n),f[t].ia[r-2]=a),Q([],u,a=>(a=je(n,a,e,o,i),void 0===f[t].ia?(a.qa=r-2,f[t]=a):f[t].ia[r-2]=a,[])),[]})},c:(e,t,r,a,n,o,i,s,u,f)=>{t=Z(t),n=Ae(a,n),Q([],[e],e=>{var a=`${(e=e[0]).name}.${t}`,l={get(){We(`Cannot access ${a} due to unbound types`,[r,i])},enumerable:!0,configurable:!0};return l.set=u?()=>We(`Cannot access ${a} due to unbound types`,[r,i]):()=>{throw new L(a+" is a read-only property")},Object.defineProperty(e.fa.pa,t,l),Q([],u?[r,i]:[r],r=>{var i=r[0],l={get(){var t=xe(this,e,a+" getter");return i.fromWireType(n(o,t))},enumerable:!0};if(u){u=Ae(s,u);var c=r[1];l.set=function(t){var r=xe(this,e,a+" setter"),n=[];u(f,r,c.toWireType(n,t)),V(n)}}return Object.defineProperty(e.fa.pa,t,l),[]}),[]})},T:e=>X(e,Me),n:(e,t,r,a)=>{function n(){}t=Z(t),n.values={},X(e,{name:t,constructor:n,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,t)=>t.value,la:8,readValueFromPointer:Be(t,r,a),ma:null}),he(t,n)},e:(e,t,r)=>{var a=He(e,"enum");t=Z(t),e=a.constructor,a=Object.create(a.constructor.prototype,{value:{value:r},constructor:{value:le(`${a.name}_${t}`,function(){})}}),e.values[r]=a,e[t]=a},D:(e,t,r)=>{X(e,{name:t=Z(t),fromWireType:e=>e,toWireType:(e,t)=>t,la:8,readValueFromPointer:De(t,r),ma:null})},X:(e,t,r,a,n,o)=>{var i=ke(t,r);e=Z(e),e=Se(e),n=Ae(a,n),he(e,function(){We(`Cannot call ${e} due to unbound types`,i)},t-1),Q([],i,r=>($e(e,je(e,[r[0],null].concat(r.slice(1)),null,n,o),t-1),[]))},w:(e,t,r,a,n)=>{if(t=Z(t),-1===n&&(n=4294967295),n=e=>e,0===a){var o=32-8*r;n=e=>e<<o>>>o}var i=t.includes("unsigned")?function(e,t){return t>>>0}:function(e,t){return t};X(e,{name:t,fromWireType:n,toWireType:i,la:8,readValueFromPointer:ee(t,r,0!==a),ma:null})},o:(e,t,r)=>{function a(e){return new n(m.buffer,b[e+4>>2],b[e>>2])}var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];X(e,{name:r=Z(r),fromWireType:a,la:8,readValueFromPointer:a},{La:!0})},t:e=>{X(e,Ve)},i:(e,t,r,a,n,o,i,s,u,f,l,c)=>{r=Z(r),o=Ae(n,o),s=Ae(i,s),f=Ae(u,f),c=Ae(l,c),Q([e],[t],e=>(e=e[0],[new ge(r,e.fa,!1,!1,!0,e,a,o,s,f,c)]))},U:(e,t)=>{X(e,{name:t=Z(t),fromWireType:function(e){for(var t,r=b[e>>2],a=e+4,n=a,o=0;o<=r;++o){var i=a+o;o!=r&&0!=v[i]||(n=n?qe(v,n,i-n):"",void 0===t?t=n:(t+=String.fromCharCode(0),t+=n),n=i+1)}return wt(e),t},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r,a="string"==typeof t;if(!(a||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array))throw new L("Cannot pass non-string to std::string");if(a)for(var n=r=0;n<t.length;++n){var o=t.charCodeAt(n);127>=o?r++:2047>=o?r+=2:55296<=o&&57343>=o?(r+=4,++n):r+=3}else r=t.length;if(o=(n=gt(4+r+1))+4,b[n>>2]=r,a)ze(t,o,r+1);else if(a)for(a=0;a<r;++a){var i=t.charCodeAt(a);if(255<i)throw wt(o),new L("String has UTF-16 code units that do not fit in 8 bits");v[o+a]=i}else for(a=0;a<r;++a)v[o+a]=t[a];return null!==e&&e.push(wt,n),n},la:8,readValueFromPointer:z,ma(e){wt(e)}})},C:(e,t,r)=>{if(r=Z(r),2===t)var a=Ge,n=Je,o=Ke,i=e=>g[e>>1];else 4===t&&(a=Qe,n=Ye,o=Ze,i=e=>b[e>>2]);X(e,{name:r,fromWireType:e=>{for(var r,n=b[e>>2],o=e+4,s=0;s<=n;++s){var u=e+4+s*t;s!=n&&0!=i(u)||(o=a(o,u-o),void 0===r?r=o:(r+=String.fromCharCode(0),r+=o),o=u+t)}return wt(e),r},toWireType:(e,a)=>{if("string"!=typeof a)throw new L(`Cannot pass non-string to C++ string type ${r}`);var i=o(a),s=gt(4+i+t);return b[s>>2]=i/t,n(a,s+4,i+t),null!==e&&e.push(wt,s),s},la:8,readValueFromPointer:z,ma(e){wt(e)}})},s:(e,t,r,a,n,o)=>{D[e]={name:Z(t),za:Ae(r,a),oa:Ae(n,o),Ba:[]}},j:(e,t,r,a,n,o,i,s,u,f)=>{D[e].Ba.push({Fa:Z(t),Ka:r,Ia:Ae(a,n),Ja:o,Qa:i,Pa:Ae(s,u),Ra:f})},W:(e,t)=>{X(e,{Ta:!0,name:t=Z(t),la:0,fromWireType:()=>{},toWireType:()=>{}})},J:()=>{B=!1,Xe=0},l:(e,t,r)=>(e=Ue(e),t=He(t,"emval::as"),et(t,r,e)),y:(e,t)=>(e=Ue(e),(t=He(t,"emval::as")).toWireType(null,e)),Y:(e,t,r,a)=>(e=tt[e])(null,t=Ue(t),r,a),B:(e,t,r,a,n)=>(e=tt[e])(t=Ue(t),t[r=at(r)],a,n),b:_e,G:e=>0===e?Ie(nt()):(e=at(e),Ie(nt()[e])),A:(e,t,r)=>{var a=((e,t)=>{for(var r=Array(e),a=0;a<e;++a)r[a]=He(b[t+4*a>>2],"parameter "+a);return r})(e,t),n=a.shift();e--;var o=Array(e);return t=`methodCaller<(${a.map(e=>e.name).join(", ")}) => ${n.name}>`,(e=>{var t=tt.length;return tt.push(e),t})(le(t,(t,i,s,u)=>{for(var f=0,l=0;l<e;++l)o[l]=a[l].readValueFromPointer(u+f),f+=a[l].la;return t=1===r?ot(i,o):i.apply(t,o),et(n,s,t)}))},q:(e,t)=>(e=Ue(e),t=Ue(t),Ie(e[t])),h:e=>{9<e&&(Re[e+1]+=1)},I:(e,t)=>(e=Ue(e))instanceof Ue(t),u:e=>"number"==typeof(e=Ue(e)),x:e=>"string"==typeof(e=Ue(e)),F:()=>Ie([]),p:e=>Ie(at(e)),k:e=>{var t=Ue(e);V(t),_e(e)},d:(e,t)=>(e=(e=He(e,"_emval_take_value")).readValueFromPointer(t),Ie(e)),z:e=>(e=Ue(e),Ie(typeof e)),K:(e,t)=>{if(it[e]&&(clearTimeout(it[e].id),delete it[e]),!t)return 0;var r=setTimeout(()=>{delete it[e],(e=>{if(!j)try{if(e(),!(B||0<Xe))try{d=e=d,ut(e)}catch(e){st(e)}}catch(e){st(e)}})(()=>bt(e,performance.now()))},t);return it[e]={id:r,Ua:t},0},L:(e,t,r,a)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1).getTimezoneOffset();n=new Date(n,6,1).getTimezoneOffset(),b[e>>2]=60*Math.max(o,n),w[t>>2]=Number(o!=n),e=(t=e=>{var t=Math.abs(e);return`UTC${0<=e?"-":"+"}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`})(o),t=t(n),n<o?(ze(e,r,17),ze(t,a,17)):(ze(e,a,17),ze(t,r,17))},P:e=>{var t=v.length;if(2147483648<(e>>>=0))return!1;for(var r=1;4>=r;r*=2){var a=t*(1+.2/r);a=Math.min(a,e+100663296);e:{a=(Math.min(2147483648,65536*Math.ceil(Math.max(e,a)/65536))-p.buffer.byteLength+65535)/65536|0;try{p.grow(a),P();var n=1;break e}catch(e){}n=void 0}if(n)return!0}return!1},M:(e,t)=>{var r=0;return lt().forEach((a,n)=>{var o=t+r;for(n=b[e+4*n>>2]=o,o=0;o<a.length;++o)m[n++]=a.charCodeAt(o);m[n]=0,r+=a.length+1}),0},N:(e,t)=>{var r=lt();b[e>>2]=r.length;var a=0;return r.forEach(e=>a+=e.length+1),b[t>>2]=a,0},S:()=>52,R:function(){return 70},Q:(e,t,r,a)=>{for(var n=0,o=0;o<r;o++){var i=b[t>>2],s=b[t+4>>2];t+=8;for(var u=0;u<s;u++){var f=v[i+u],l=ct[e];0===f||10===f?((1===e?c:h)(qe(l)),l.length=0):l.push(f)}n+=s}return b[a>>2]=n,0},H:ut};!async function(){function e(e){return dt=e.exports,p=dt.Z,P(),we=dt.ca,O.unshift(dt._),x--,i.monitorRunDependencies?.(x),0==x&&F&&(e=F,F=null,e()),dt}x++,i.monitorRunDependencies?.(x);var t={a:mt};if(i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(e){h(`Module.instantiateWasm callback failed with error: ${e}`),a(e)}_??=U("arcgis-knowledge-client-core.wasm")?"arcgis-knowledge-client-core.wasm":i.locateFile?i.locateFile("arcgis-knowledge-client-core.wasm",l):l+"arcgis-knowledge-client-core.wasm";try{var r=await async function(e){var t=_;if(!W&&"function"==typeof WebAssembly.instantiateStreaming&&!U(t)&&"function"==typeof fetch)try{var r=fetch(t,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(r,e)}catch(e){h(`wasm streaming compile failed: ${e}`),h("falling back to ArrayBuffer instantiation")}return async function(e,t){try{var r=await async function(e){if(!W)try{var t=await o(e);return new Uint8Array(t)}catch{}if(e!=_||!W)throw"both async and sync fetching of the wasm failed";return new Uint8Array(W)}(e);return await WebAssembly.instantiate(r,t)}catch(e){h(`failed to asynchronously prepare wasm: ${e}`),R(e)}}(t,e)}(t);return e(r.instance),r}catch(e){a(e)}}();var vt,yt=e=>(yt=dt.$)(e),gt=e=>(gt=dt.aa)(e),wt=e=>(wt=dt.ba)(e),bt=(e,t)=>(bt=dt.da)(e,t);function $t(){function e(){if(!vt&&(vt=!0,i.calledRun=!0,!j)){if(M(O),r(i),i.onRuntimeInitialized?.(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;){var e=i.postRun.shift();k.unshift(e)}M(k)}}if(!(0<x)){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)S();M(E),0<x||(i.setStatus?(i.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>i.setStatus(""),1),e()},1)):e())}}if(F=function e(){vt||$t(),vt||(F=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);0<i.preInit.length;)i.preInit.pop()();return $t(),s},e.exports=r,e.exports.default=r),o.exports;var e,t,r}()),s=Object.freeze(Object.defineProperty({__proto__:null,default:i},Symbol.toStringTag,{value:"Module"}))}}]);