@arcgis/core 4.33.0-next.20250514 → 4.33.0-next.20250516

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 (474) hide show
  1. package/Basemap.js +1 -1
  2. package/Graphic.js +1 -1
  3. package/Map.js +1 -1
  4. package/WebScene.js +1 -1
  5. package/applications/Components/SelectionOperation.js +1 -1
  6. package/applications/Components/baUtils.js +1 -1
  7. package/arcade/functions/featuresetbase.js +1 -1
  8. package/assets/esri/core/workers/RemoteClient.js +1 -1
  9. package/assets/esri/core/workers/chunks/009730713ed9bc7c7388.js +1 -0
  10. package/assets/esri/core/workers/chunks/02853ab923245459b32e.js +1 -0
  11. package/assets/esri/core/workers/chunks/0624ae07d3af8d5f1ac8.js +1 -0
  12. package/assets/esri/core/workers/chunks/{6e8c6c9112ecb867b7be.js → 0817ddd885ce8b2459cb.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{69e8aabe5a1eb2d1e414.js → 0832bd5195b5791dd803.js} +1 -1
  14. package/assets/esri/core/workers/chunks/0c50ee1f3cdd30d96479.js +1 -0
  15. package/assets/esri/core/workers/chunks/0d23610475c85385fbff.js +1 -0
  16. package/assets/esri/core/workers/chunks/{b4f38fe9cc948a39ad87.js → 0fd6d80393722132e044.js} +2 -2
  17. package/assets/esri/core/workers/chunks/{b4f38fe9cc948a39ad87.js.LICENSE.txt → 0fd6d80393722132e044.js.LICENSE.txt} +1 -1
  18. package/assets/esri/core/workers/chunks/1051a5a57b2fb843a555.js +1 -0
  19. package/assets/esri/core/workers/chunks/133e4bde346828d4510b.js +1 -0
  20. package/assets/esri/core/workers/chunks/19a58adc75a34f84b0ef.js +1 -0
  21. package/assets/esri/core/workers/chunks/{7e8f78b96d43c224c7b6.js → 19c50f052eba0553bf4d.js} +1 -1
  22. package/assets/esri/core/workers/chunks/1d7f2abfccc54659d6f2.js +1 -0
  23. package/assets/esri/core/workers/chunks/{339e7a900e2bba9d3647.js → 1f19bd3ef795c6765384.js} +1 -1
  24. package/assets/esri/core/workers/chunks/1f9c6fbcd4d0eae1e574.js +1 -0
  25. package/assets/esri/core/workers/chunks/234117cc5cb7c6863313.js +1 -0
  26. package/assets/esri/core/workers/chunks/{1c025beaaac5ec7c04fb.js → 2adf558cd8d8155d07d7.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{837f886f759fc6f0489d.js → 2b1486a466760d2152f5.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{47f64a340b5d56bf9e59.js → 2cf82d3645c75d311e99.js} +1 -1
  29. package/assets/esri/core/workers/chunks/320e821af81138fe12ac.js +1 -0
  30. package/assets/esri/core/workers/chunks/{f7ab3511f6627f467796.js → 377a7f0f7d304ff9fe5b.js} +1 -1
  31. package/assets/esri/core/workers/chunks/3bf1cf6c3cba172e2f6d.js +1 -0
  32. package/assets/esri/core/workers/chunks/{b3ca65d6112079fb1d00.js → 3ce5d7ad16e41eea05be.js} +1 -1
  33. package/assets/esri/core/workers/chunks/465f2db4ab8aa9c9f907.js +1 -0
  34. package/assets/esri/core/workers/chunks/{1e13e03aad422f9e871e.js → 47fe2379f2214bf50036.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{b8b5dfd2d73a8410fba2.js → 4954e0cf4a40e45d237f.js} +1 -1
  36. package/assets/esri/core/workers/chunks/4a362a35bcdb8405a53a.js +1 -0
  37. package/assets/esri/core/workers/chunks/4f8ebd9f0758b801835c.js +1 -0
  38. package/assets/esri/core/workers/chunks/5228d39c05d660a135b6.js +1 -0
  39. package/assets/esri/core/workers/chunks/523046e04679e301797d.js +1 -0
  40. package/assets/esri/core/workers/chunks/{736cb9f74bf050b70f4c.js → 52a3d0e041717da7697e.js} +1 -1
  41. package/assets/esri/core/workers/chunks/54ea93f416ab52b413c1.js +1 -0
  42. package/assets/esri/core/workers/chunks/554a8bf4626336e68798.js +1 -0
  43. package/assets/esri/core/workers/chunks/55f087bca75c3f2a4515.js +1 -0
  44. package/assets/esri/core/workers/chunks/{bbaadce582df7e20397b.js → 56d2a20c1b143697aa19.js} +1 -1
  45. package/assets/esri/core/workers/chunks/57211c35a9646f088d86.js +1 -0
  46. package/assets/esri/core/workers/chunks/58526def64536b6581ab.js +1 -0
  47. package/assets/esri/core/workers/chunks/5890740d5a761b038560.js +1 -0
  48. package/assets/esri/core/workers/chunks/{9a641fb94819574e48f6.js → 5a73d8b7b01758ed4fdd.js} +1 -1
  49. package/assets/esri/core/workers/chunks/5dbd8d81d94cfda5bb32.js +1 -0
  50. package/assets/esri/core/workers/chunks/{a0d2bd5d4ed3c90f6b1c.js → 5f766bcb751d66fbf1c8.js} +1 -1
  51. package/assets/esri/core/workers/chunks/609c7c9b7046b3a7acde.js +1 -0
  52. package/assets/esri/core/workers/chunks/{d21d9e8b8c8a2e0485d5.js → 612f6739c9399fbae4d0.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{30f3014c0ac6e2bc14bf.js → 622c0552ca3cd674d46c.js} +1 -1
  54. package/assets/esri/core/workers/chunks/6409160d226a0bea5ac6.js +1 -0
  55. package/assets/esri/core/workers/chunks/65fd971d0574d69cbc26.js +1 -0
  56. package/assets/esri/core/workers/chunks/6993a59cbb78bc26f029.js +1 -0
  57. package/assets/esri/core/workers/chunks/6b23ca6570357f9fb724.js +1 -0
  58. package/assets/esri/core/workers/chunks/6c37a5bd00d255d1337a.js +1 -0
  59. package/assets/esri/core/workers/chunks/6ce4327f63e6eb92bba8.js +1 -0
  60. package/assets/esri/core/workers/chunks/6f9b8df290b0ce09beae.js +1 -0
  61. package/assets/esri/core/workers/chunks/{e0247252c6a0f3340e33.js → 6fa1a5b7276a037dbd6a.js} +84 -106
  62. package/assets/esri/core/workers/chunks/7a9a0383f27f4967bcfa.js +1 -0
  63. package/assets/esri/core/workers/chunks/7c819b3e6d69c526f4b2.js +1 -0
  64. package/assets/esri/core/workers/chunks/7df147da40474b028705.js +1 -0
  65. package/assets/esri/core/workers/chunks/{0766ecb677d667e5fb83.js → 7e1dc8e5e18f18dd21e2.js} +2 -2
  66. package/assets/esri/core/workers/chunks/{0766ecb677d667e5fb83.js.LICENSE.txt → 7e1dc8e5e18f18dd21e2.js.LICENSE.txt} +1 -1
  67. package/assets/esri/core/workers/chunks/{e662c86b8bafc5512d3d.js → 847e88e1d6da1e74cdc8.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{6f5ec9bf7cf8a36d8e8b.js → 87eca6de502d18d8b7eb.js} +1 -1
  69. package/assets/esri/core/workers/chunks/87fc7b6c3e2d4f7775e2.js +1 -0
  70. package/assets/esri/core/workers/chunks/{10e6dffa57aa1a626708.js → 8a6aac37b3133de74cce.js} +1 -1
  71. package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
  72. package/assets/esri/core/workers/chunks/91cd29f53f07bc38fe75.js +1 -0
  73. package/assets/esri/core/workers/chunks/{5583d18032ed8bc17c74.js → 938f1eebc48871be64e9.js} +1 -1
  74. package/assets/esri/core/workers/chunks/97c148adf0347c69a79c.js +1 -0
  75. package/assets/esri/core/workers/chunks/9839309d0cd804fe52c2.js +1 -0
  76. package/assets/esri/core/workers/chunks/{029a118e6dfb3f544a5c.js → 98ef17d15517368d2383.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{c10885b3a0739708e9e0.js → 9a06476b834584d00d5c.js} +1 -1
  78. package/assets/esri/core/workers/chunks/9c8224ca29475556e5ea.js +1 -0
  79. package/assets/esri/core/workers/chunks/{fd24dd602a3fed88d90e.js → 9d5eac3bd1526e2b33e3.js} +1 -1
  80. package/assets/esri/core/workers/chunks/{38f5e6a202ce292edd9f.js → 9eb9c8db2510154c09cc.js} +1 -1
  81. package/assets/esri/core/workers/chunks/a036503087baa1f9fd00.js +1 -0
  82. package/assets/esri/core/workers/chunks/{6e64ce0958c3432004b6.js → a70a86ba4e487f62f683.js} +2 -2
  83. package/assets/esri/core/workers/chunks/a937076d2f8c2b6a5d8a.js +1 -0
  84. package/assets/esri/core/workers/chunks/{90ae15ce22a49bd84876.js → ab9614555a15f04396f6.js} +2 -2
  85. package/assets/esri/core/workers/chunks/{90ae15ce22a49bd84876.js.LICENSE.txt → ab9614555a15f04396f6.js.LICENSE.txt} +1 -1
  86. package/assets/esri/core/workers/chunks/ae733c963d61065faa54.js +1 -0
  87. package/assets/esri/core/workers/chunks/{8e82acd1f730571680f4.js → aeb5bbe861f65544d504.js} +1 -1
  88. package/assets/esri/core/workers/chunks/b0522dffa5600345c07e.js +1 -0
  89. package/assets/esri/core/workers/chunks/{d1f7bfb8daf11ecada9f.js → b4273381dc069f4e1fa2.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{fb2e28e6a87956267d1c.js → b92a34f88569c481ed10.js} +1 -1
  91. package/assets/esri/core/workers/chunks/{352b7dcd1633e0c98194.js → ba940ebdae84b174a7be.js} +1 -1
  92. package/assets/esri/core/workers/chunks/be2c8c0a8b2bce7979b6.js +1 -0
  93. package/assets/esri/core/workers/chunks/bf9b6b74654d303a6dae.js +1 -0
  94. package/assets/esri/core/workers/chunks/c07c1bb7ae09136dc1f6.js +1 -0
  95. package/assets/esri/core/workers/chunks/c938f5d269ba202d10ef.js +1 -0
  96. package/assets/esri/core/workers/chunks/cbbca011f8b176d4b5db.js +1 -0
  97. package/assets/esri/core/workers/chunks/{c604fefedccfd4db9953.js → ce321fd8fc5551e190ec.js} +1 -1
  98. package/assets/esri/core/workers/chunks/ce53ddda04e09ba2f860.js +1 -0
  99. package/assets/esri/core/workers/chunks/d9a23fb0c6c936d5e8ec.js +1 -0
  100. package/assets/esri/core/workers/chunks/db3f710d770adf631b28.js +2 -0
  101. package/assets/esri/core/workers/chunks/{6394ab6f629aa90292e6.js.LICENSE.txt → db3f710d770adf631b28.js.LICENSE.txt} +1 -1
  102. package/assets/esri/core/workers/chunks/{6805e7b43d6ecf3ea93c.js → dcf5719f38ad40b92941.js} +1 -1
  103. package/assets/esri/core/workers/chunks/e2cada6644c49b1b6e79.js +1 -0
  104. package/assets/esri/core/workers/chunks/e2fb4bebce3aee406efa.js +1 -0
  105. package/assets/esri/core/workers/chunks/e3638f9d4c0fda238f4b.js +1 -0
  106. package/assets/esri/core/workers/chunks/e85f892ea44d67d53ff0.js +2 -0
  107. package/assets/esri/core/workers/chunks/{3596540ef49e5330ceb2.js.LICENSE.txt → e85f892ea44d67d53ff0.js.LICENSE.txt} +1 -1
  108. package/assets/esri/core/workers/chunks/e89345c7af9d3d4d8452.js +1 -0
  109. package/assets/esri/core/workers/chunks/{a31658f544ac6e1801d6.js → ead5d4e271effc04def3.js} +1 -1
  110. package/assets/esri/core/workers/chunks/ece68a25651ef03fc95d.js +1 -0
  111. package/assets/esri/core/workers/chunks/f218a190015de1444018.js +1 -0
  112. package/assets/esri/core/workers/chunks/f229044615af3142bcb0.js +1 -0
  113. package/assets/esri/core/workers/chunks/f2692f25ef693cf12ce0.js +1 -0
  114. package/assets/esri/core/workers/chunks/f4c6ea630cecf0f260d7.js +2 -0
  115. package/assets/esri/core/workers/chunks/{e0dc8794343c2a949ffb.js.LICENSE.txt → f4c6ea630cecf0f260d7.js.LICENSE.txt} +1 -1
  116. package/assets/esri/core/workers/chunks/f718cb847c4eb1e43ad9.js +1 -0
  117. package/assets/esri/core/workers/chunks/faa40ef04604c7cce706.js +1 -0
  118. package/assets/esri/core/workers/chunks/{218a66d53f7cf4f285aa.js → fbd2f45d5adce4ca323f.js} +2 -2
  119. package/assets/esri/core/workers/chunks/{218a66d53f7cf4f285aa.js.LICENSE.txt → fbd2f45d5adce4ca323f.js.LICENSE.txt} +1 -1
  120. package/assets/esri/core/workers/chunks/{498886c321a2501658bc.js → ffaa977cd97a2b7190c5.js} +1 -1
  121. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  122. package/assets/esri/themes/base/widgets/_Editor.scss +2 -1
  123. package/assets/esri/themes/base/widgets/_SearchResultRenderer.scss +5 -30
  124. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +5 -0
  125. package/assets/esri/themes/dark/main.css +1 -1
  126. package/assets/esri/themes/light/main.css +1 -1
  127. package/assets/esri/themes/light/view.css +1 -1
  128. package/assets/esri/widgets/Search/t9n/Search.json +1 -1
  129. package/assets/esri/widgets/Search/t9n/Search_en.json +1 -1
  130. package/chunks/Envelope.js +1 -1
  131. package/chunks/Jpg.js +1 -1
  132. package/chunks/LineSeries.js +1 -1
  133. package/chunks/ProjectionTransformation.js +1 -1
  134. package/chunks/QuadraticBezier.js +1 -1
  135. package/chunks/ShadowCastAccumulate.glsl.js +7 -5
  136. package/chunks/ShadowCastClear.glsl.js +5 -0
  137. package/chunks/ShadowCastVisualize.glsl.js +1 -1
  138. package/chunks/ShadowHighlight.glsl.js +8 -7
  139. package/chunks/Transformation2D.js +1 -1
  140. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  141. package/chunks/arcgis-knowledge-client-core.js +1 -1
  142. package/chunks/basis_encoder.js +1 -1
  143. package/chunks/basis_transcoder.js +1 -1
  144. package/chunks/bundle.js +1 -1
  145. package/chunks/chartUtilsAm5.js +1 -1
  146. package/chunks/dxt_encoder.js +1 -1
  147. package/chunks/geometryEngineBase.js +1 -1
  148. package/chunks/i3s.js +1 -1
  149. package/chunks/lclayout.js +1 -1
  150. package/chunks/libtess-asm.js +1 -1
  151. package/chunks/lyr3DMain.js +1 -1
  152. package/chunks/lyr3DWorker.js +1 -1
  153. package/chunks/vec4.js +1 -1
  154. package/chunks/vxlLayer.js +1 -1
  155. package/config.js +1 -1
  156. package/core/arrayUtils.js +1 -1
  157. package/core/image/apng.js +1 -1
  158. package/core/image/gif.js +1 -1
  159. package/core/mathUtils.js +1 -1
  160. package/core/workers/Connection.js +1 -1
  161. package/geometry/operators/densifyOperator.d.ts +0 -1
  162. package/geometry/operators/gx/operatorOffset.js +1 -1
  163. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  164. package/geometry/support/aaBoundingBox.js +1 -1
  165. package/geometry/support/meshProperties.js +1 -1
  166. package/geometry/support/normalizeUtilsSync.js +1 -1
  167. package/interfaces.d.ts +313 -163
  168. package/intl/date.js +1 -1
  169. package/intl/number.js +1 -1
  170. package/layers/BingMapsLayer.js +1 -1
  171. package/layers/graphics/OptimizedFeatureSet.js +1 -1
  172. package/layers/graphics/controllers/StreamController.js +1 -1
  173. package/layers/graphics/data/FeatureIdInfo.js +5 -0
  174. package/layers/graphics/data/QueryEngine.js +1 -1
  175. package/layers/graphics/data/StreamFeatureManager.js +1 -1
  176. package/layers/graphics/data/createFeatureId.js +5 -0
  177. package/layers/graphics/featureConversionUtils.js +1 -1
  178. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  179. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  180. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  181. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  182. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  183. package/layers/ogc/ogcFeatureUtils.js +1 -1
  184. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  185. package/layers/orientedImagery/core/utils.js +1 -1
  186. package/layers/orientedImagery/queries.js +1 -1
  187. package/layers/orientedImagery/transformations/utils.js +1 -1
  188. package/layers/support/LercWorker.js +1 -1
  189. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  190. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  191. package/layers/support/rasterFunctions/stretchUtils.js +1 -1
  192. package/layers/support/wmsUtils.js +1 -1
  193. package/layers/video/VideoController.js +1 -1
  194. package/package.json +2 -2
  195. package/portal/Portal.js +1 -1
  196. package/request.js +1 -1
  197. package/rest/knowledgeGraph/GraphAddNamedTypesResult.js +1 -1
  198. package/rest/knowledgeGraph/GraphAddPropertyResult.js +5 -0
  199. package/rest/knowledgeGraph/GraphApplyEditsResult.js +1 -1
  200. package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.js +1 -1
  201. package/rest/knowledgeGraph/GraphDeletePropertyResult.js +5 -0
  202. package/rest/knowledgeGraph/GraphUpdateNamedTypesResult.js +5 -0
  203. package/rest/knowledgeGraph/GraphUpdatePropertyResult.js +5 -0
  204. package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
  205. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +1 -1
  206. package/rest/knowledgeGraphService.js +1 -1
  207. package/rest/networks/support/Association.js +1 -1
  208. package/rest/networks/support/NetworkElement.js +1 -1
  209. package/rest/networks/support/QueryAssociationsParameters.js +1 -1
  210. package/rest/networks/support/TelecomNetworkElement.js +1 -1
  211. package/rest/networks/support/TraceResult.js +1 -1
  212. package/rest/networks/unitIdentifiers/insertGap.js +5 -0
  213. package/rest/networks/unitIdentifiers/queryUnitIdentifiers.js +5 -0
  214. package/rest/networks/unitIdentifiers/reset.js +5 -0
  215. package/rest/networks/unitIdentifiers/resize.js +5 -0
  216. package/rest/networks/unitIdentifiers/support/InsertGapParameters.js +5 -0
  217. package/rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParamters.js +5 -0
  218. package/rest/networks/unitIdentifiers/support/ResetParameters.js +5 -0
  219. package/rest/networks/unitIdentifiers/support/ResizeParameters.js +5 -0
  220. package/rest/networks/unitIdentifiers/support/UnitQueryResult.js +5 -0
  221. package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
  222. package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
  223. package/rest/query/operations/queryRelatedRecords.js +1 -1
  224. package/rest/utils.js +1 -1
  225. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  226. package/support/apiKeyUtils.js +1 -1
  227. package/support/basemapEnsureType.js +1 -1
  228. package/support/revision.js +1 -1
  229. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  230. package/unionTypes.d.ts +2 -0
  231. package/views/2d/engine/ManagedCanvas.js +1 -1
  232. package/views/2d/engine/Stage.js +1 -1
  233. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  234. package/views/2d/engine/webgl/TileContainer.js +1 -1
  235. package/views/2d/engine/webgl/grouping.js +1 -1
  236. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  237. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  238. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  239. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  240. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  241. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  242. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  243. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  244. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  245. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  246. package/views/2d/layers/features/layerAdapters/featureServiceUtils.js +1 -1
  247. package/views/2d/layers/features/processor/AAggregateStrategy.js +1 -1
  248. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  249. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  250. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  251. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  252. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  253. package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
  254. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  255. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  256. package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
  257. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  258. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  259. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  260. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  261. package/views/3d/FocusAreasView.js +1 -1
  262. package/views/3d/analysis/AnalysisViewManager3D.js +1 -1
  263. package/views/3d/analysis/DimensionAnalysisView3D.d.ts +4 -0
  264. package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
  265. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  266. package/views/3d/camera/constraintUtils/common.js +1 -1
  267. package/views/3d/interactive/Manipulator3D.js +1 -1
  268. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  269. package/views/3d/layers/ContentGeometryLayerView.js +5 -0
  270. package/views/3d/layers/DimensionLayerView3D.js +1 -1
  271. package/views/3d/layers/FlowSubView3D.js +1 -1
  272. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  273. package/views/3d/layers/I3SMeshView3D.js +1 -1
  274. package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
  275. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  276. package/views/3d/layers/RouteLayerView3D.js +1 -1
  277. package/views/3d/layers/ViewshedLayerView3D.js +1 -1
  278. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  279. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  280. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  281. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  282. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  283. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  284. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  285. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  286. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  287. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  288. package/views/3d/layers/graphics/Labeler.js +1 -1
  289. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  290. package/views/3d/layers/graphics/focusAreaStyle.js +5 -0
  291. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  292. package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
  293. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  294. package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
  295. package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
  296. package/views/3d/layers/i3s/PagedNodeIndex.js +1 -1
  297. package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
  298. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  299. package/views/3d/layers/support/LayerViewAnalysisViewManager.js +5 -0
  300. package/views/3d/support/pointsOfInterest/ContentGeometryUpdates.js +1 -1
  301. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  302. package/views/3d/terrain/PatchRenderData.js +1 -1
  303. package/views/3d/terrain/TerrainRenderer.js +1 -1
  304. package/views/3d/terrain/TerrainSurface.js +1 -1
  305. package/views/3d/terrain/TileAgent.js +1 -1
  306. package/views/3d/webgl-engine/collections/Component/IndexRange/ComponentRange.js +1 -1
  307. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  308. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +3 -3
  309. package/views/3d/webgl-engine/core/shaderLibrary/shading/ShadowmapFiltering.glsl.js +3 -25
  310. package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js +1 -1
  311. package/views/3d/webgl-engine/core/shaderModules/Texture2DShadowBindUniform.js +5 -0
  312. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  313. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +3 -3
  314. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  315. package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
  316. package/views/3d/webgl-engine/lib/DepthRange.js +1 -1
  317. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  318. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  319. package/views/3d/webgl-engine/lib/Material.js +1 -1
  320. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  321. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  322. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  323. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  324. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  325. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  326. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  327. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  328. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  329. package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
  330. package/views/3d/webgl-engine/shaders/ShadowCastClear.glsl.js +5 -0
  331. package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +5 -0
  332. package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
  333. package/views/3d/webgl.js +1 -1
  334. package/views/FocusArea.js +1 -1
  335. package/views/FocusAreas.js +1 -1
  336. package/views/GroundView.js +1 -1
  337. package/views/SceneView.js +1 -1
  338. package/views/View.js +1 -1
  339. package/views/draw/support/Box.js +1 -1
  340. package/views/draw/support/GraphicMover.js +1 -1
  341. package/views/draw/support/Reshape.js +1 -1
  342. package/views/input/InputManager.js +1 -1
  343. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  344. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  345. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  346. package/views/layers/FeatureLayerView.js +1 -1
  347. package/views/support/LayerViewManager.js +1 -1
  348. package/views/webgl/RenderingContext.js +1 -1
  349. package/views/webgl/ShaderBuilder.js +1 -1
  350. package/views/webgl/Texture.js +1 -1
  351. package/views/webgl/TextureDescriptor.js +1 -1
  352. package/views/webgl/textureUtils.js +1 -1
  353. package/webscene/Slide.js +1 -1
  354. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  355. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
  356. package/widgets/BatchAttributeForm/VisibleElements.js +1 -1
  357. package/widgets/BatchAttributeForm.js +1 -1
  358. package/widgets/CoordinateConversion.js +1 -1
  359. package/widgets/Directions.js +1 -1
  360. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  361. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
  362. package/widgets/Editor/EditorViewModel.js +1 -1
  363. package/widgets/Editor/UpdateFeaturesWorkflow.d.ts +4 -0
  364. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  365. package/widgets/Editor/UpdateFeaturesWorkflowData.d.ts +4 -0
  366. package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
  367. package/widgets/Editor/UpdateWorkflow.js +1 -1
  368. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  369. package/widgets/Editor/support/SketchController.js +1 -1
  370. package/widgets/Editor/workflowUtils.js +1 -1
  371. package/widgets/Editor.js +1 -1
  372. package/widgets/ElevationProfile/support/profileUtils.js +1 -1
  373. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  374. package/widgets/FeatureForm.js +1 -1
  375. package/widgets/LayerList/LayerListItem.js +1 -1
  376. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  377. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  378. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  379. package/widgets/OrientedImageryViewer/components/NavigationUI.js +1 -1
  380. package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +5 -0
  381. package/widgets/OrientedImageryViewer/components/NavigationUIViewModel.js +1 -1
  382. package/widgets/OrientedImageryViewer/components/imageNavigationUtils.js +1 -1
  383. package/widgets/OrientedImageryViewer/constants.js +1 -1
  384. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +5 -0
  385. package/widgets/OrientedImageryViewer/navigation/NavigationManagerPanoramic.js +5 -0
  386. package/widgets/OrientedImageryViewer/navigation/errors.js +5 -0
  387. package/widgets/OrientedImageryViewer/navigation/queries.js +5 -0
  388. package/widgets/OrientedImageryViewer/navigation/utils.js +5 -0
  389. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  390. package/widgets/PanoramicViewer.js +1 -1
  391. package/widgets/Search/SearchResultRenderer.js +1 -1
  392. package/widgets/Search/SearchViewModel.js +1 -1
  393. package/widgets/Search/searchResultRendererCSS.js +1 -1
  394. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  395. package/widgets/Sketch/SketchViewModel.js +1 -1
  396. package/widgets/Sketch.js +1 -1
  397. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  398. package/widgets/support/SelectionList/selectionListUtils.js +1 -1
  399. package/widgets/support/SelectionList.js +1 -1
  400. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  401. package/widgets/support/SelectionToolbar.js +1 -1
  402. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  403. package/widgets/support/SnappingControls.js +1 -1
  404. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  405. package/widgets/support/UtilityNetworkAssociations/utils/createAssociation.js +1 -1
  406. package/assets/esri/core/workers/chunks/0516bd18334d3af6c555.js +0 -1
  407. package/assets/esri/core/workers/chunks/0d8a635c1f9aeaf7564c.js +0 -1
  408. package/assets/esri/core/workers/chunks/191a45a594ecaf7f1abb.js +0 -1
  409. package/assets/esri/core/workers/chunks/1abd026ed12c863e1d94.js +0 -1
  410. package/assets/esri/core/workers/chunks/1c6542315390037053a6.js +0 -1
  411. package/assets/esri/core/workers/chunks/201db423e3c6f947b77c.js +0 -1
  412. package/assets/esri/core/workers/chunks/23de8aeed5b82c682cbe.js +0 -1
  413. package/assets/esri/core/workers/chunks/297d2c0a9d3f1e978318.js +0 -1
  414. package/assets/esri/core/workers/chunks/2e0af748eba93f3ea6cb.js +0 -1
  415. package/assets/esri/core/workers/chunks/3596540ef49e5330ceb2.js +0 -2
  416. package/assets/esri/core/workers/chunks/3604a77c93cf2927787b.js +0 -1
  417. package/assets/esri/core/workers/chunks/391b1c3e736a62befbaf.js +0 -1
  418. package/assets/esri/core/workers/chunks/40e556a0645af8658658.js +0 -1
  419. package/assets/esri/core/workers/chunks/4402336db7210cd583e0.js +0 -1
  420. package/assets/esri/core/workers/chunks/4899cdc8bb5085c356f9.js +0 -1
  421. package/assets/esri/core/workers/chunks/4bd5cbf6e0be2fc7e84d.js +0 -1
  422. package/assets/esri/core/workers/chunks/4c8052e81916579841f4.js +0 -1
  423. package/assets/esri/core/workers/chunks/4c9aa1dafdc0d9537231.js +0 -1
  424. package/assets/esri/core/workers/chunks/4feb774f123da26e9f2a.js +0 -1
  425. package/assets/esri/core/workers/chunks/51b5dfc7085272d26b89.js +0 -1
  426. package/assets/esri/core/workers/chunks/566c2ce50af225e556ac.js +0 -1
  427. package/assets/esri/core/workers/chunks/5ddf463c85c33428e807.js +0 -1
  428. package/assets/esri/core/workers/chunks/61032b5050464cb48056.js +0 -1
  429. package/assets/esri/core/workers/chunks/6394ab6f629aa90292e6.js +0 -2
  430. package/assets/esri/core/workers/chunks/63dade3e1cc7f5b76846.js +0 -1
  431. package/assets/esri/core/workers/chunks/64af433e88d4dd21a2ff.js +0 -1
  432. package/assets/esri/core/workers/chunks/6b42bcfbb60432e3ed1f.js +0 -1
  433. package/assets/esri/core/workers/chunks/6e12900a9f4c3c9941ec.js +0 -1
  434. package/assets/esri/core/workers/chunks/6e5d8a6b29c06a27998c.js +0 -1
  435. package/assets/esri/core/workers/chunks/6f506303017903b9a06f.js +0 -1
  436. package/assets/esri/core/workers/chunks/71e46e866c23372b0b58.js +0 -1
  437. package/assets/esri/core/workers/chunks/75fa861b5757551f8fdc.js +0 -1
  438. package/assets/esri/core/workers/chunks/7c49a8877bd744daa3d5.js +0 -1
  439. package/assets/esri/core/workers/chunks/7ea5bbb52e84be9a608e.js +0 -1
  440. package/assets/esri/core/workers/chunks/82c395d8649096609a8a.js +0 -1
  441. package/assets/esri/core/workers/chunks/86138c297095af1ac604.js +0 -1
  442. package/assets/esri/core/workers/chunks/8c21cc9af4ce9652cc5c.js +0 -1
  443. package/assets/esri/core/workers/chunks/8e6301006abdf47cc88d.js +0 -1
  444. package/assets/esri/core/workers/chunks/90f93091fe088875f80f.js +0 -1
  445. package/assets/esri/core/workers/chunks/91a02ee91f61cf841111.js +0 -1
  446. package/assets/esri/core/workers/chunks/9baeb3b5733acdda4e7c.js +0 -1
  447. package/assets/esri/core/workers/chunks/a1d697e2be1e892a666a.js +0 -1
  448. package/assets/esri/core/workers/chunks/a1f27c4f4b5ef3e359f7.js +0 -1
  449. package/assets/esri/core/workers/chunks/a348ff2dd936c6bf9399.js +0 -1
  450. package/assets/esri/core/workers/chunks/a9b1f4bf5eaa937943be.js +0 -1
  451. package/assets/esri/core/workers/chunks/b64f708f821dd2bb51cd.js +0 -1
  452. package/assets/esri/core/workers/chunks/bf453744067267e84d1b.js +0 -1
  453. package/assets/esri/core/workers/chunks/c1175477dfcdee90a453.js +0 -1
  454. package/assets/esri/core/workers/chunks/c4e2b75b9135920babc3.js +0 -1
  455. package/assets/esri/core/workers/chunks/cb80b7ddc9acf625d754.js +0 -1
  456. package/assets/esri/core/workers/chunks/d22f91bc16a7641bcbef.js +0 -1
  457. package/assets/esri/core/workers/chunks/d52cf7b795ee52034f9e.js +0 -1
  458. package/assets/esri/core/workers/chunks/d971571a957de70d5a8d.js +0 -1
  459. package/assets/esri/core/workers/chunks/d9d9d4f99140e579eabb.js +0 -1
  460. package/assets/esri/core/workers/chunks/dc3a6beb3028009b3c23.js +0 -1
  461. package/assets/esri/core/workers/chunks/e0dc8794343c2a949ffb.js +0 -2
  462. package/assets/esri/core/workers/chunks/e483d2f169e51a361742.js +0 -1
  463. package/assets/esri/core/workers/chunks/e5608e5232e983531f72.js +0 -1
  464. package/assets/esri/core/workers/chunks/e613df03ceb39e29befa.js +0 -1
  465. package/assets/esri/core/workers/chunks/e697dd4508f02dcfe329.js +0 -1
  466. package/assets/esri/core/workers/chunks/eabfab23246d4a052ea3.js +0 -1
  467. package/assets/esri/core/workers/chunks/ec8e8048b3df2c92008d.js +0 -1
  468. package/assets/esri/core/workers/chunks/ed6d0fea159dea638c2f.js +0 -1
  469. package/assets/esri/core/workers/chunks/f5fcba6ca6f43bf1d65d.js +0 -1
  470. package/assets/esri/core/workers/chunks/f92d76b694ff0cdb212c.js +0 -1
  471. package/chunks/NetworkElement.js +0 -5
  472. package/views/FocusAreasUtils.js +0 -5
  473. package/views/analysis/DimensionAnalysisView.d.ts +0 -4
  474. package/views/analysis/DimensionAnalysisView.js +0 -5
@@ -0,0 +1 @@
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"}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8692],{8303:(e,t,i)=>{i.d(t,{A:()=>T});var a=i(90237),s=i(92602),r=i(70333),n=i(78888),o=i(60999),l=i(49186),d=i(53966),h=i(97768),p=i(74887),u=i(84952),y=i(10107),c=(i(44208),i(87811),i(36005)),f=i(40608),g=i(43937),m=i(77548),w=i(20655),M=i(80812),b=i(41318),_=i(10407);const T=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.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 M.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:a}=await i.e(1204).then(i.bind(i,41204));return(0,p.Te)(t),await a({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||d.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,p.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:a},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",a),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const a=!r.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,a);let n,o;if(s)n=i.portal.url;else try{n=await(0,m.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!n||!(0,u.b8)(n,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(r.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,d=!1,h=!1;if(!o)return{features:{edit:l,fullEdit:d},content:{updateItem:h}};try{if(s?await i.reload():(i=new M.default({id:e,portal:{url:n}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,a)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:d},content:{updateItem:h}}}_getUserPrivileges(e,t){const i=(0,_.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?r.id?.findCredential(this.url):null;if(!t)return!0;const i=v.credential===t?v.user:await this._fetchEditingUser(e);return v.credential=t,v.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=r.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const a=`${i.owningSystemUrl}/sharing/rest`,s=w.A.getDefault();if(s&&s.loaded&&(0,u.S8)(s.restUrl)===(0,u.S8)(a))return s.user;const l=`${a}/community/self`,d=null!=e?e.signal:null,h=await(0,o.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return h.ok?b.A.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,a=this.portalItem?.id&&(this.portalItem.portal||w.A.getDefault());return i&&a&&!(0,u.ut)(a.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,a._)([(0,y.MZ)({type:M.default})],t.prototype,"portalItem",null),(0,a._)([(0,c.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,a._)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,a._)([(0,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,a._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,a._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,a._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,a._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},v={credential:null,user:null}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var a=i(90237),s=i(53966),r=i(10107),n=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{let t=class extends e{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,a._)([(0,r.MZ)()],t.prototype,"title",null),(0,a._)([(0,r.MZ)({type:String})],t.prototype,"url",null),t=(0,a._)([(0,n.$)("esri.layers.mixins.ArcGISService")],t),t}},28692:(e,t,i)=>{i.r(t),i.d(t,{default:()=>G});var a=i(90237),s=i(67996),r=i(5503),n=i(49186),o=i(53966),l=i(91869),d=i(92071),h=i(74887),p=i(36708),u=i(84952),y=i(13069),c=i(10107),f=(i(44208),i(87811),i(36005)),g=i(40608),m=i(43937),w=i(35666),M=i(4146),b=i(80340),_=i(70643),T=i(85342),v=i(18768),D=i(63074),A=i(69208),I=i(16131),S=i(8303),L=i(54310),P=i(25036),E=i(10873),k=i(51806),C=i(97159);let N=class extends((0,D.dM)((0,P.j)((0,L.J)((0,v.b)((0,I.q)((0,S.A)((0,d.P)((0,A.d)(M.A))))))))){constructor(e){super(e),this._graphTypeLookup=new Map,this._namedTypesModified=!1,this.dataManager=null,this.definitionSetMap=null,this.knowledgeGraph=null,this.layers=new(r.A.ofType(_.A)),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="KnowledgeGraphLayer",this.sublayerIdsCache=new Map,this.tables=new(r.A.ofType(_.A)),this.type="knowledge-graph",this.url=null,this.addHandles((0,p.wB)((()=>this.layers.concat(this.tables)),((e,t)=>this._handleSublayersChange(e,t)),p.OH))}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){try{await this.loadFromPortal({supportedTypes:["Knowledge Graph Layer"]},e)}catch(e){(0,h.QP)(e)}await this._fetchMetadata(),await this._initializeLayerProperties(),this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await(0,T.qN)(this)}async _fetchMetadata(){if(!this.url)throw new n.A("knowledge-graph:missing-url","KnowledgeGraphLayer must be created with a url");const e=await(0,k.fetchKnowledgeGraph)(this.url);this.knowledgeGraph=e,this._forEachGraphType((e=>{e.name&&this._graphTypeLookup.set(e.name,e)}))}async _initializeLayerProperties(){this.originIdOf("inclusionModeDefinition")===w.Gr.USER?this._validateInclusionModeDefinition():await this._initializeInclusionModeDefinition(),this._setMemberTypes(),this.dataManager=new b.P({knowledgeGraph:this.knowledgeGraph,inclusionModeDefinition:this.inclusionModeDefinition})}async _initializeInclusionModeDefinition(){const e=this.definitionSetMap?await(0,s.cZ)(this.definitionSetMap,!0):{generateAllSublayers:!0,namedTypeDefinitions:new Map};[...this.layers.toArray(),...this.tables.toArray()].forEach((t=>{const i=this._graphTypeLookup.get(t.graphTypeName);i&&!e.namedTypeDefinitions.has(i.name)&&e.namedTypeDefinitions.set(i.name,{useAllData:!0})})),this.setAtOrigin("inclusionModeDefinition",e,(0,w.OL)(this.originIdOf("definitionSetMap")))}_validateInclusionModeDefinition(){const{inclusionModeDefinition:e}=this;if(!e)return;const{namedTypeDefinitions:t}=e;if(t?.size>0)t.forEach(((e,i)=>{const a=this._graphTypeLookup.get(i);if(!a)return o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void t.delete(i);"relationship"!==a.type&&"entity"!==a.type&&(o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't properly modeled and will be removed`),t.delete(i))}));else if(!e.generateAllSublayers)throw new n.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined")}_setMemberTypes(){let e=[],t=[];const{inclusionModeDefinition:i}=this,a=i?.namedTypeDefinitions;!i||i.generateAllSublayers?(e=this.knowledgeGraph.dataModel?.entityTypes??[],t=this.knowledgeGraph.dataModel?.relationshipTypes??[]):a&&a.size>0&&a.forEach(((i,a)=>{const s=this._graphTypeLookup.get(a);switch(s?.type){case"relationship":t.push(s);break;case"entity":e.push(s)}})),this.memberEntityTypes=e,this.memberRelationshipTypes=t}_forEachGraphType(e){[...this.knowledgeGraph.dataModel?.entityTypes??[],...this.knowledgeGraph.dataModel?.relationshipTypes??[]].forEach((t=>{e(t)}))}_refreshNamedTypes(){this._namedTypesModified=!0;for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}async _handleNewRecords(e){const t=new Set,i=[];for(const a of e)this._graphTypeLookup.has(a.typeName)&&(!1===this.layers.concat(this.tables).some((e=>e.objectType.name===a.typeName))&&(this.dataManager.sublayerCaches.set(a.typeName,new Map),t.add(a.typeName)),(0,l.tE)(this.sublayerIdsCache,a.typeName,(()=>new Set)).add(a.id),i.push(a));this.dataManager.addToLayer(i);for(const e of t){const t=this._graphTypeLookup.get(e);t&&(this._addSublayer(t),"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e))}await(0,T.qN)(this,Array.from(t)),this._refreshNamedTypes()}_createSublayers(e,t,i){e.forEach((e=>{const a=this._createSublayer(e);i(a)&&t.push(a),this._updateSublayerCaches(e)}))}_addSublayer(e){const t=this._createSublayer(e);return t.geometryType?this.layers.push(t):this.tables.push(t),t}_createSublayer(e){return new _.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_updateSublayers(e,t){t.forEach((t=>{t.parentCompositeLayer=this;const i=e.find((e=>e.type===t.graphType&&e.name===t.graphTypeName));i&&(t.objectType=i,this._updateSublayerCaches(i))}))}_updateSublayerCaches({name:e}){if(!e)return;const t=this.dataManager.sublayerCaches;t.has(e)||t.set(e,new Map)}_saveUrlAsNewResource(e,t,i,a){e[t]="<pending>",i.pendingOperations.push(async function(e){const t=await(0,s.fe)(e);return new Blob([t],{type:"application/x-protobuf"})}(this.inclusionModeDefinition).then((s=>{const r=function(e){const t=`definitionSetMap-${(0,y.lk)()}.dat`,i=(0,u.fj)("knowledgeGraphLayer",t);return e.resourceFromPath(i)}(a);e[t]=r.itemRelativeUrl,i.toAdd.push({resource:r,content:{type:"blob",blob:s},compress:!1,finish:e=>{this.definitionSetMap=e.url}})})))}_displaysAllRecords(e){for(const[,{useAllData:t}]of e.namedTypeDefinitions)if(!t)return!1;return!0}_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"))}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=w.Gr.PORTAL_ITEM&&e<w.Gr.USER}readDefinitionSetMap(e,t,i){return(0,C.f)(e,i)}writeDefinitionSetMap(e,t,i,a){const s=a?.portalItem,r=a?.resources,n=(0,w.aB)(a?.origin);if(!s||!r||null==n)return void(e&&(t[i]=(0,C.t)(e,a)));const{inclusionModeDefinition:o}=this;if(!o||this._displaysAllRecords(o))return void(this.definitionSetMap=null);const l=this.originIdOf("inclusionModeDefinition");if(l===w.Gr.USER||this._namedTypesModified||n<l)this._saveUrlAsNewResource(t,i,r,s);else if(n===l&&e){const n=(0,C.t)(e,a);(0,u.oP)(n)?this._saveUrlAsNewResource(t,i,r,s):t[i]=n}}set inclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("inclusionModeDefinition",e):o.A.getLogger(this).error("#inclusionModeDefinition","inclusionModeDefinition cannot be changed after the layer is loaded.")}loadLayerAssumingLocalCache(){const e=[...this.memberEntityTypes,...this.memberRelationshipTypes];this.originIdOf("layers")===w.Gr.DEFAULTS?this._createSublayers(e,this.layers,(e=>!!e.geometryType)):this._updateSublayers(e,this.layers),this.originIdOf("tables")===w.Gr.DEFAULTS?this._createSublayers(e,this.tables,(e=>!e.geometryType)):this._updateSublayers(e,this.tables),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{const i=(0,l.tE)(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((e=>{i.add(e.id)}))}))}async addRecords(e){await this.load(),await this._handleNewRecords(e)}async createSublayerForNamedType(e){await this.load();const t=this._graphTypeLookup.get(e);if(!t)throw new n.A("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");if(this.dataManager.sublayerCaches.has(e))throw new n.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 i=this._addSublayer(t);return"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),this.dataManager.inclusionModeDefinition&&this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!0}),await(0,T.qN)(this,[e]),this._refreshNamedTypes(),i}convertSublayerToDynamicData(e){if(!this.dataManager.inclusionModeDefinition)throw new n.A("knowledge-graph:fully-dynamic-membership","This Knowledge Graph Layer already uses fully dynamic membership, individual sublayers cannot be converted");if(!this._graphTypeLookup.get(e))throw new n.A("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");if(!this.dataManager.sublayerCaches.has(e))throw new n.A("knowledge-graph:duplicate-type","The specified type does not exist as a sublayer.");const t=this.dataManager.inclusionModeDefinition.namedTypeDefinitions.get(e);t?.useAllData?o.A.getLogger(this).warn("This Knowledge Graph Layer already uses dynamic membership for the sublayer - no conversion was made"):(this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!0}),this.sublayerIdsCache.delete(e),this._refreshNamedTypes())}convertSublayerToExplicitMembership(e){if(!this.dataManager.inclusionModeDefinition)throw new n.A("knowledge-graph:fully-dynamic-membership","This Knowledge Graph Layer already uses fully dynamic membership, individual sublayers cannot be converted");if(!this._graphTypeLookup.get(e))throw new n.A("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");const t=this.dataManager.inclusionModeDefinition.namedTypeDefinitions.get(e);if(!t||t.useAllData){if(!this.dataManager.sublayerCaches.has(e))throw new n.A("knowledge-graph:duplicate-type","The specified type does not exist as a sublayer.");this.sublayerIdsCache.set(e,new Set),this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),this._refreshNamedTypes()}else o.A.getLogger(this).warn("This Knowledge Graph Layer already uses explicit membership for the sublayer - no conversion was made")}convertToFullyDynamicData(){this.dataManager.inclusionModeDefinition||o.A.getLogger(this).warn("This Knowledge Graph Layer already uses fully dynamic membership - no conversion was made"),this.sublayerIdsCache.clear(),this.dataManager.inclusionModeDefinition=null,this._refreshNamedTypes()}convertToExplicitMembership(){this.dataManager.inclusionModeDefinition&&this.dataManager.inclusionModeDefinition.namedTypeDefinitions.size>0&&o.A.getLogger(this).warn("This Knowledge Graph Layer already uses explicit membership - no conversion was made"),this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map};for(const e of this.dataManager.sublayerCaches.keys())(0,l.tE)(this.sublayerIdsCache,e,(()=>new Set)),this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map});this._refreshNamedTypes()}async removeRecords(e){await this.load();const t=[];for(const i of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(i.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(i.typeName)?.members?.has(i.id)&&t.push(i);this.dataManager.removeFromLayer(t);for(const e of t)this.sublayerIdsCache.get(e.typeName)?.delete(e.id);return this._refreshNamedTypes(),t}};(0,a._)([(0,c.MZ)()],N.prototype,"dataManager",void 0),(0,a._)([(0,c.MZ)({json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],N.prototype,"definitionSetMap",void 0),(0,a._)([(0,f.w)("definitionSetMap")],N.prototype,"readDefinitionSetMap",null),(0,a._)([(0,m.K)("definitionSetMap")],N.prototype,"writeDefinitionSetMap",null),(0,a._)([(0,c.MZ)()],N.prototype,"inclusionModeDefinition",null),(0,a._)([(0,c.MZ)()],N.prototype,"knowledgeGraph",void 0),(0,a._)([(0,c.MZ)({type:r.A.ofType(_.A),json:{write:{ignoreOrigin:!0}}})],N.prototype,"layers",void 0),(0,a._)([(0,c.MZ)()],N.prototype,"memberEntityTypes",void 0),(0,a._)([(0,c.MZ)()],N.prototype,"memberRelationshipTypes",void 0),(0,a._)([(0,c.MZ)({type:["KnowledgeGraphLayer"]})],N.prototype,"operationalLayerType",void 0),(0,a._)([(0,c.MZ)()],N.prototype,"sublayerIdsCache",void 0),(0,a._)([(0,c.MZ)({type:r.A.ofType(_.A),json:{write:{ignoreOrigin:!0}}})],N.prototype,"tables",void 0),(0,a._)([(0,c.MZ)({json:{read:!1}})],N.prototype,"type",void 0),(0,a._)([(0,c.MZ)(E.OZ)],N.prototype,"url",void 0),N=(0,a._)([(0,g.$)("esri.layers.KnowledgeGraphLayer")],N);const G=N},69208:(e,t,i)=>{i.d(t,{d:()=>n});var a=i(90237),s=i(10107),r=(i(44208),i(53966),i(87811),i(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,a._)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,a._)([(0,r.$)("esri.layers.mixins.CustomParametersMixin")],t),t}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8692],{8303:(e,t,i)=>{i.d(t,{A:()=>T});var a=i(90237),s=i(92602),r=i(70333),n=i(78888),o=i(60999),l=i(49186),d=i(53966),h=i(97768),p=i(74887),u=i(84952),y=i(10107),c=(i(44208),i(87811),i(36005)),f=i(40608),g=i(43937),m=i(77548),w=i(20655),M=i(80812),b=i(41318),_=i(10407);const T=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.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 M.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:a}=await i.e(1204).then(i.bind(i,41204));return(0,p.Te)(t),await a({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||d.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,p.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:a},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",a),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const a=!r.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,a);let n,o;if(s)n=i.portal.url;else try{n=await(0,m.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!n||!(0,u.b8)(n,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(r.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,d=!1,h=!1;if(!o)return{features:{edit:l,fullEdit:d},content:{updateItem:h}};try{if(s?await i.reload():(i=new M.default({id:e,portal:{url:n}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,a)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:d},content:{updateItem:h}}}_getUserPrivileges(e,t){const i=(0,_.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?r.id?.findCredential(this.url):null;if(!t)return!0;const i=v.credential===t?v.user:await this._fetchEditingUser(e);return v.credential=t,v.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=r.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const a=`${i.owningSystemUrl}/sharing/rest`,s=w.A.getDefault();if(s&&s.loaded&&(0,u.S8)(s.restUrl)===(0,u.S8)(a))return s.user;const l=`${a}/community/self`,d=null!=e?e.signal:null,h=await(0,o.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return h.ok?b.A.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,a=this.portalItem?.id&&(this.portalItem.portal||w.A.getDefault());return i&&a&&!(0,u.ut)(a.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,a._)([(0,y.MZ)({type:M.default})],t.prototype,"portalItem",null),(0,a._)([(0,c.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,a._)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,a._)([(0,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,a._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,a._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,a._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,a._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},v={credential:null,user:null}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var a=i(90237),s=i(53966),r=i(10107),n=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{let t=class extends e{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,a._)([(0,r.MZ)()],t.prototype,"title",null),(0,a._)([(0,r.MZ)({type:String})],t.prototype,"url",null),t=(0,a._)([(0,n.$)("esri.layers.mixins.ArcGISService")],t),t}},28692:(e,t,i)=>{i.r(t),i.d(t,{default:()=>G});var a=i(90237),s=i(67996),r=i(5503),n=i(49186),o=i(53966),l=i(91869),d=i(92071),h=i(74887),p=i(36708),u=i(84952),y=i(13069),c=i(10107),f=(i(44208),i(87811),i(36005)),g=i(40608),m=i(43937),w=i(35666),M=i(4146),b=i(80340),_=i(70643),T=i(85342),v=i(18768),D=i(63074),A=i(69208),I=i(16131),S=i(8303),L=i(54310),P=i(25036),E=i(10873),k=i(34246),C=i(97159);let N=class extends((0,D.dM)((0,P.j)((0,L.J)((0,v.b)((0,I.q)((0,S.A)((0,d.P)((0,A.d)(M.A))))))))){constructor(e){super(e),this._graphTypeLookup=new Map,this._namedTypesModified=!1,this.dataManager=null,this.definitionSetMap=null,this.knowledgeGraph=null,this.layers=new(r.A.ofType(_.A)),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="KnowledgeGraphLayer",this.sublayerIdsCache=new Map,this.tables=new(r.A.ofType(_.A)),this.type="knowledge-graph",this.url=null,this.addHandles((0,p.wB)((()=>this.layers.concat(this.tables)),((e,t)=>this._handleSublayersChange(e,t)),p.OH))}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){try{await this.loadFromPortal({supportedTypes:["Knowledge Graph Layer"]},e)}catch(e){(0,h.QP)(e)}await this._fetchMetadata(),await this._initializeLayerProperties(),this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await(0,T.qN)(this)}async _fetchMetadata(){if(!this.url)throw new n.A("knowledge-graph:missing-url","KnowledgeGraphLayer must be created with a url");const e=await(0,k.fetchKnowledgeGraph)(this.url);this.knowledgeGraph=e,this._forEachGraphType((e=>{e.name&&this._graphTypeLookup.set(e.name,e)}))}async _initializeLayerProperties(){this.originIdOf("inclusionModeDefinition")===w.Gr.USER?this._validateInclusionModeDefinition():await this._initializeInclusionModeDefinition(),this._setMemberTypes(),this.dataManager=new b.P({knowledgeGraph:this.knowledgeGraph,inclusionModeDefinition:this.inclusionModeDefinition})}async _initializeInclusionModeDefinition(){const e=this.definitionSetMap?await(0,s.cZ)(this.definitionSetMap,!0):{generateAllSublayers:!0,namedTypeDefinitions:new Map};[...this.layers.toArray(),...this.tables.toArray()].forEach((t=>{const i=this._graphTypeLookup.get(t.graphTypeName);i&&!e.namedTypeDefinitions.has(i.name)&&e.namedTypeDefinitions.set(i.name,{useAllData:!0})})),this.setAtOrigin("inclusionModeDefinition",e,(0,w.OL)(this.originIdOf("definitionSetMap")))}_validateInclusionModeDefinition(){const{inclusionModeDefinition:e}=this;if(!e)return;const{namedTypeDefinitions:t}=e;if(t?.size>0)t.forEach(((e,i)=>{const a=this._graphTypeLookup.get(i);if(!a)return o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void t.delete(i);"relationship"!==a.type&&"entity"!==a.type&&(o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't properly modeled and will be removed`),t.delete(i))}));else if(!e.generateAllSublayers)throw new n.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined")}_setMemberTypes(){let e=[],t=[];const{inclusionModeDefinition:i}=this,a=i?.namedTypeDefinitions;!i||i.generateAllSublayers?(e=this.knowledgeGraph.dataModel?.entityTypes??[],t=this.knowledgeGraph.dataModel?.relationshipTypes??[]):a&&a.size>0&&a.forEach(((i,a)=>{const s=this._graphTypeLookup.get(a);switch(s?.type){case"relationship":t.push(s);break;case"entity":e.push(s)}})),this.memberEntityTypes=e,this.memberRelationshipTypes=t}_forEachGraphType(e){[...this.knowledgeGraph.dataModel?.entityTypes??[],...this.knowledgeGraph.dataModel?.relationshipTypes??[]].forEach((t=>{e(t)}))}_refreshNamedTypes(){this._namedTypesModified=!0;for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}async _handleNewRecords(e){const t=new Set,i=[];for(const a of e)this._graphTypeLookup.has(a.typeName)&&(!1===this.layers.concat(this.tables).some((e=>e.objectType.name===a.typeName))&&(this.dataManager.sublayerCaches.set(a.typeName,new Map),t.add(a.typeName)),(0,l.tE)(this.sublayerIdsCache,a.typeName,(()=>new Set)).add(a.id),i.push(a));this.dataManager.addToLayer(i);for(const e of t){const t=this._graphTypeLookup.get(e);t&&(this._addSublayer(t),"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e))}await(0,T.qN)(this,Array.from(t)),this._refreshNamedTypes()}_createSublayers(e,t,i){e.forEach((e=>{const a=this._createSublayer(e);i(a)&&t.push(a),this._updateSublayerCaches(e)}))}_addSublayer(e){const t=this._createSublayer(e);return t.geometryType?this.layers.push(t):this.tables.push(t),t}_createSublayer(e){return new _.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_updateSublayers(e,t){t.forEach((t=>{t.parentCompositeLayer=this;const i=e.find((e=>e.type===t.graphType&&e.name===t.graphTypeName));i&&(t.objectType=i,this._updateSublayerCaches(i))}))}_updateSublayerCaches({name:e}){if(!e)return;const t=this.dataManager.sublayerCaches;t.has(e)||t.set(e,new Map)}_saveUrlAsNewResource(e,t,i,a){e[t]="<pending>",i.pendingOperations.push(async function(e){const t=await(0,s.fe)(e);return new Blob([t],{type:"application/x-protobuf"})}(this.inclusionModeDefinition).then((s=>{const r=function(e){const t=`definitionSetMap-${(0,y.lk)()}.dat`,i=(0,u.fj)("knowledgeGraphLayer",t);return e.resourceFromPath(i)}(a);e[t]=r.itemRelativeUrl,i.toAdd.push({resource:r,content:{type:"blob",blob:s},compress:!1,finish:e=>{this.definitionSetMap=e.url}})})))}_displaysAllRecords(e){for(const[,{useAllData:t}]of e.namedTypeDefinitions)if(!t)return!1;return!0}_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"))}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=w.Gr.PORTAL_ITEM&&e<w.Gr.USER}readDefinitionSetMap(e,t,i){return(0,C.f)(e,i)}writeDefinitionSetMap(e,t,i,a){const s=a?.portalItem,r=a?.resources,n=(0,w.aB)(a?.origin);if(!s||!r||null==n)return void(e&&(t[i]=(0,C.t)(e,a)));const{inclusionModeDefinition:o}=this;if(!o||this._displaysAllRecords(o))return void(this.definitionSetMap=null);const l=this.originIdOf("inclusionModeDefinition");if(l===w.Gr.USER||this._namedTypesModified||n<l)this._saveUrlAsNewResource(t,i,r,s);else if(n===l&&e){const n=(0,C.t)(e,a);(0,u.oP)(n)?this._saveUrlAsNewResource(t,i,r,s):t[i]=n}}set inclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("inclusionModeDefinition",e):o.A.getLogger(this).error("#inclusionModeDefinition","inclusionModeDefinition cannot be changed after the layer is loaded.")}loadLayerAssumingLocalCache(){const e=[...this.memberEntityTypes,...this.memberRelationshipTypes];this.originIdOf("layers")===w.Gr.DEFAULTS?this._createSublayers(e,this.layers,(e=>!!e.geometryType)):this._updateSublayers(e,this.layers),this.originIdOf("tables")===w.Gr.DEFAULTS?this._createSublayers(e,this.tables,(e=>!e.geometryType)):this._updateSublayers(e,this.tables),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{const i=(0,l.tE)(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((e=>{i.add(e.id)}))}))}async addRecords(e){await this.load(),await this._handleNewRecords(e)}async createSublayerForNamedType(e){await this.load();const t=this._graphTypeLookup.get(e);if(!t)throw new n.A("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");if(this.dataManager.sublayerCaches.has(e))throw new n.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 i=this._addSublayer(t);return"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),this.dataManager.inclusionModeDefinition&&this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!0}),await(0,T.qN)(this,[e]),this._refreshNamedTypes(),i}convertSublayerToDynamicData(e){if(!this.dataManager.inclusionModeDefinition)throw new n.A("knowledge-graph:fully-dynamic-membership","This Knowledge Graph Layer already uses fully dynamic membership, individual sublayers cannot be converted");if(!this._graphTypeLookup.get(e))throw new n.A("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");if(!this.dataManager.sublayerCaches.has(e))throw new n.A("knowledge-graph:duplicate-type","The specified type does not exist as a sublayer.");const t=this.dataManager.inclusionModeDefinition.namedTypeDefinitions.get(e);t?.useAllData?o.A.getLogger(this).warn("This Knowledge Graph Layer already uses dynamic membership for the sublayer - no conversion was made"):(this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!0}),this.sublayerIdsCache.delete(e),this._refreshNamedTypes())}convertSublayerToExplicitMembership(e){if(!this.dataManager.inclusionModeDefinition)throw new n.A("knowledge-graph:fully-dynamic-membership","This Knowledge Graph Layer already uses fully dynamic membership, individual sublayers cannot be converted");if(!this._graphTypeLookup.get(e))throw new n.A("knowledge-graph:missing-type","The specified type does not exist in the layer's graph data model.");const t=this.dataManager.inclusionModeDefinition.namedTypeDefinitions.get(e);if(!t||t.useAllData){if(!this.dataManager.sublayerCaches.has(e))throw new n.A("knowledge-graph:duplicate-type","The specified type does not exist as a sublayer.");this.sublayerIdsCache.set(e,new Set),this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),this._refreshNamedTypes()}else o.A.getLogger(this).warn("This Knowledge Graph Layer already uses explicit membership for the sublayer - no conversion was made")}convertToFullyDynamicData(){this.dataManager.inclusionModeDefinition||o.A.getLogger(this).warn("This Knowledge Graph Layer already uses fully dynamic membership - no conversion was made"),this.sublayerIdsCache.clear(),this.dataManager.inclusionModeDefinition=null,this._refreshNamedTypes()}convertToExplicitMembership(){this.dataManager.inclusionModeDefinition&&this.dataManager.inclusionModeDefinition.namedTypeDefinitions.size>0&&o.A.getLogger(this).warn("This Knowledge Graph Layer already uses explicit membership - no conversion was made"),this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map};for(const e of this.dataManager.sublayerCaches.keys())(0,l.tE)(this.sublayerIdsCache,e,(()=>new Set)),this.dataManager.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map});this._refreshNamedTypes()}async removeRecords(e){await this.load();const t=[];for(const i of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(i.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(i.typeName)?.members?.has(i.id)&&t.push(i);this.dataManager.removeFromLayer(t);for(const e of t)this.sublayerIdsCache.get(e.typeName)?.delete(e.id);return this._refreshNamedTypes(),t}};(0,a._)([(0,c.MZ)()],N.prototype,"dataManager",void 0),(0,a._)([(0,c.MZ)({json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],N.prototype,"definitionSetMap",void 0),(0,a._)([(0,f.w)("definitionSetMap")],N.prototype,"readDefinitionSetMap",null),(0,a._)([(0,m.K)("definitionSetMap")],N.prototype,"writeDefinitionSetMap",null),(0,a._)([(0,c.MZ)()],N.prototype,"inclusionModeDefinition",null),(0,a._)([(0,c.MZ)()],N.prototype,"knowledgeGraph",void 0),(0,a._)([(0,c.MZ)({type:r.A.ofType(_.A),json:{write:{ignoreOrigin:!0}}})],N.prototype,"layers",void 0),(0,a._)([(0,c.MZ)()],N.prototype,"memberEntityTypes",void 0),(0,a._)([(0,c.MZ)()],N.prototype,"memberRelationshipTypes",void 0),(0,a._)([(0,c.MZ)({type:["KnowledgeGraphLayer"]})],N.prototype,"operationalLayerType",void 0),(0,a._)([(0,c.MZ)()],N.prototype,"sublayerIdsCache",void 0),(0,a._)([(0,c.MZ)({type:r.A.ofType(_.A),json:{write:{ignoreOrigin:!0}}})],N.prototype,"tables",void 0),(0,a._)([(0,c.MZ)({json:{read:!1}})],N.prototype,"type",void 0),(0,a._)([(0,c.MZ)(E.OZ)],N.prototype,"url",void 0),N=(0,a._)([(0,g.$)("esri.layers.KnowledgeGraphLayer")],N);const G=N},69208:(e,t,i)=>{i.d(t,{d:()=>n});var a=i(90237),s=i(10107),r=(i(44208),i(53966),i(87811),i(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,a._)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,a._)([(0,r.$)("esri.layers.mixins.CustomParametersMixin")],t),t}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5141],{5141:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(91829),l(46686),l(32680),l(49255),l(76591),l(76597),l(60864),l(96336),l(71955),l(53466),l(92700),l(72824),l(35640),l(40261),l(77695),l(42837),l(89390),l(98619),l(62602),l(22393),l(59469),l(28056),l(96598),l(51406),l(42398),l(58614),l(27950),l(20693),l(33079),l(71988),l(20304),l(31821),l(63761),l(10906),l(46540),l(60517),l(14113);var s=l(28491)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5141],{5141:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(91829),l(46686),l(32680),l(49255),l(76591),l(76597),l(60864),l(96336),l(71955),l(53466),l(92700),l(72824),l(35640),l(40261),l(77695),l(42837),l(89390),l(98619),l(62602),l(22393),l(59469),l(39168),l(96598),l(51406),l(42398),l(58614),l(27950),l(20693),l(33079),l(71988),l(20304),l(31821),l(63761),l(10906),l(46540),l(60517),l(14113);var s=l(28491)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[708],{27647:(t,e,n)=>{function r(t,e){return t?e?4:3:e?3:2}function o(t,e,n,o){if(!e?.lengths.length)return null;t.lengths.length&&(t.lengths.length=0),t.coords.length&&(t.coords.length=0);const u=t.coords,i=[],c=n?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:h,coords:f}=e,a=r(n,o);let d=0;for(const t of h){const e=s(c,f,d,t,n,o);e&&i.push(e),d+=t*a}if(i.sort(((t,e)=>{let r=t[2]-e[2];return 0===r&&n&&(r=t[4]-e[4]),r})),i.length){let t=6*i[0][2];u[0]=i[0][0]/t,u[1]=i[0][1]/t,n&&(t=6*i[0][4],u[2]=0!==t?i[0][3]/t:0),(u[0]<c[0]||u[0]>c[1]||u[1]<c[2]||u[1]>c[3]||n&&(u[2]<c[4]||u[2]>c[5]))&&(u.length=0)}if(!u.length){const t=e.lengths[0]?l(f,0,h[0],n,o):null;if(!t)return null;u[0]=t[0],u[1]=t[1],n&&t.length>2&&(u[2]=t[2])}return t}function s(t,e,n,o,s,l){const u=r(s,l);let i=n,c=n+u,h=0,f=0,a=0,d=0,g=0;for(let n=0,r=o-1;n<r;n++,i+=u,c+=u){const n=e[i],r=e[i+1],o=e[i+2],l=e[c],u=e[c+1],m=e[c+2];let y=n*u-l*r;d+=y,h+=(n+l)*y,f+=(r+u)*y,s&&(y=n*m-l*o,a+=(o+m)*y,g+=y),n<t[0]&&(t[0]=n),n>t[1]&&(t[1]=n),r<t[2]&&(t[2]=r),r>t[3]&&(t[3]=r),s&&(o<t[4]&&(t[4]=o),o>t[5]&&(t[5]=o))}if(d>0&&(d*=-1),g>0&&(g*=-1),!d)return null;const m=[h,f,.5*d];return s&&(m[3]=a,m[4]=.5*g),m}function l(t,e,n,o,s){const l=r(o,s);let f=e,a=e+l,d=0,g=0,m=0,y=0;for(let e=0,r=n-1;e<r;e++,f+=l,a+=l){const e=t[f],n=t[f+1],r=t[f+2],s=t[a],l=t[a+1],p=t[a+2],I=o?i(e,n,r,s,l,p):u(e,n,s,l);if(I)if(d+=I,o){const t=h(e,n,r,s,l,p);g+=I*t[0],m+=I*t[1],y+=I*t[2]}else{const t=c(e,n,s,l);g+=I*t[0],m+=I*t[1]}}return d>0?o?[g/d,m/d,y/d]:[g/d,m/d]:n>0?o?[t[e],t[e+1],t[e+2]]:[t[e],t[e+1]]:null}function u(t,e,n,r){const o=n-t,s=r-e;return Math.sqrt(o*o+s*s)}function i(t,e,n,r,o,s){const l=r-t,u=o-e,i=s-n;return Math.sqrt(l*l+u*u+i*i)}function c(t,e,n,r){return[t+.5*(n-t),e+.5*(r-e)]}function h(t,e,n,r,o,s){return[t+.5*(r-t),e+.5*(o-e),n+.5*(s-n)]}n.d(e,{Q:()=>o})},43334:(t,e,n)=>{n.d(e,{N3:()=>u,Om:()=>l});var r=n(69397),o=n(27647),s=n(92722);class l{constructor(t=null,e={},n,r,o=0){this.geometry=t,this.attributes=e,this.centroid=n,this.objectId=r,this.displayId=o}static fromJSON(t){const e=t.geometry?s.A.fromJSON(t.geometry):null,n=t.centroid?s.A.fromJSON(t.centroid):null,r=t.objectId;return new l(e,t.attributes,n,r)}weakClone(){const t=new l(this.geometry,this.attributes,this.centroid,this.objectId);return t.displayId=this.displayId,t}clone(){const t=this.geometry?.clone(),e=new l(t,{...this.attributes},this.centroid?.clone(),this.objectId);return e.displayId=this.displayId,e}ensureCentroid(t){return this.centroid??=(0,o.Q)(new s.A,this.geometry,t.hasZ,t.hasM),this.centroid}get usedMemory(){return 128+(0,r.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function u(t){return!!t.geometry?.coords?.length}},58512:(t,e,n)=>{n.d(e,{A:()=>r});class r{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const t=new r;return t.globalIdFieldName=this.globalIdFieldName,t.geohashFieldName=this.geohashFieldName,t.geometryProperties=this.geometryProperties,t.geometryType=this.geometryType,t.spatialReference=this.spatialReference,t.hasZ=this.hasZ,t.hasM=this.hasM,t.features=this.features,t.fields=this.fields,t.transform=this.transform,t.exceededTransferLimit=this.exceededTransferLimit,t.uniqueIdField=this.uniqueIdField,t.queryGeometry=this.queryGeometry,t.queryGeometryType=this.queryGeometryType,t}}},69397:(t,e,n)=>{n.d(e,{$B:()=>o,Qf:()=>c,Qh:()=>u,RS:()=>s,ez:()=>a,lM:()=>l,qK:()=>f});var r=n(34275);function o(t){return 32+t.length}const s=16;function l(t){if(!t)return 0;let e=f;for(const n in t)t.hasOwnProperty(n)&&(e+=i(t[n],!1));return e}function u(t){if(!t)return 0;if("number"==typeof t[0])return c(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return h(t,8);let n=a;for(let r=0;r<e;r++)n+=i(t[r]);return n}(t);let e=f;for(const n in t)t.hasOwnProperty(n)&&(e+=i(t[n]));return e}function i(t,e=!0){switch(typeof t){case"object":return e?u(t):f;case"string":return o(t);case"number":return s;case"boolean":return 4;default:return 8}}function c(...t){return t.reduce(((t,e)=>t+(e?(0,r.iu)(e)?e.byteLength+d:Array.isArray(e)?h(e,s):0:0)),0)}function h(t,e){return a+t.length*e}const f=32,a=16,d=145},90708:(t,e,n)=>{n.d(e,{B2:()=>T,BW:()=>v,Ch:()=>ut,DF:()=>P,Di:()=>B,E2:()=>W,IE:()=>w,Nl:()=>nt,Q4:()=>it,Rk:()=>ht,Ux:()=>J,Ye:()=>C,ZF:()=>H,eU:()=>U,eY:()=>tt,hK:()=>at,jH:()=>et,jQ:()=>lt,kz:()=>rt,oN:()=>$,q3:()=>X,qK:()=>_,qN:()=>S,z5:()=>z,zv:()=>D});var r=n(49186),o=n(53966),s=n(97768),l=n(70328),u=n(19419),i=n(65864),c=n(43334),h=n(58512),f=n(92722),a=n(54339);function d(t,e){return t?e?4:3:e?3:2}const g=()=>o.A.getLogger("esri.layers.graphics.featureConversionUtils"),m={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0},y=(t,e,n,r,o,s)=>{t[n]=o,t[n+1]=s},p=(t,e,n,r,o,s)=>{t[n]=o,t[n+1]=s,t[n+2]=e[r+2]},I=(t,e,n,r,o,s)=>{t[n]=o,t[n+1]=s,t[n+2]=e[r+3]},N=(t,e,n,r,o,s)=>{t[n]=o,t[n+1]=s,t[n+2]=e[r+2],t[n+3]=e[r+3]};function b(t,e,n,r){if(t){if(n)return e&&r?N:p;if(e&&r)return I}else if(e&&r)return p;return y}function w({scale:t,translate:e},n){return Math.round((n-e[0])/t[0])}function T({scale:t,translate:e},n){return Math.round((e[1]-n)/t[1])}function M({scale:t,translate:e},n){return Math.round((n-e[0])/t[0])}function G({scale:t,translate:e},n){return Math.round((n-e[1])/t[1])}function A({scale:t,translate:e},n,r){return n*t[r]+e[r]}function P(t,e,n){return t?e?n?k(t):Z(t):n?O(t):F(t):null}function F(t){const e=t.coords;return{x:e[0],y:e[1]}}function E(t,e){return t.coords[0]=e.x,t.coords[1]=e.y,t}function Z(t){const e=t.coords;return{x:e[0],y:e[1],z:e[2]}}function x(t,e){return t.coords[0]=e.x,t.coords[1]=e.y,t.coords[2]=e.z,t}function O(t){const e=t.coords;return{x:e[0],y:e[1],m:e[2]}}function q(t,e){return t.coords[0]=e.x,t.coords[1]=e.y,t.coords[2]=e.m,t}function k(t){const e=t.coords;return{x:e[0],y:e[1],z:e[2],m:e[3]}}function Y(t,e){return t.coords[0]=e.x,t.coords[1]=e.y,t.coords[2]=e.z,t.coords[3]=e.m,t}function V(t,e){return t&&e?Y:t?x:e?q:E}function S(t,e,n=V(null!=e.z,null!=e.m)){return n(t,e)}function _(t,e,n){if(null==t)return null;const r=d(e,n),o=[];for(let e=0;e<t.coords.length;e+=r){const n=[];for(let o=0;o<r;o++)n.push(t.coords[e+o]);o.push(n)}return e?n?{points:o,hasZ:e,hasM:n}:{points:o,hasZ:e}:n?{points:o,hasM:n}:{points:o}}function R(t,e,n=d(e.hasZ,e.hasM)){t.lengths[0]=e.points.length;const r=t.coords;let o=0;for(const t of e.points)for(let e=0;e<n;e++)r[o++]=t[e];return t}function v(t,e,n){if(!t)return null;const r=d(e,n),{coords:o,lengths:s}=t,l=[];let u=0;for(const t of s){const e=[];for(let n=0;n<t;n++){const t=[];for(let e=0;e<r;e++)t.push(o[u++]);e.push(t)}l.push(e)}return e?n?{paths:l,hasZ:e,hasM:n}:{paths:l,hasZ:e}:n?{paths:l,hasM:n}:{paths:l}}function L(t,e,n=d(e.hasZ,e.hasM)){const{lengths:r,coords:o}=t;let s=0;for(const t of e.paths){for(const e of t)for(let t=0;t<n;t++)o[s++]=e[t];r.push(t.length)}return t}function z(t,e,n){if(!t)return null;const r=d(e,n),{coords:o,lengths:s}=t,l=[];let u=0;for(const t of s){const e=[];for(let n=0;n<t;n++){const t=[];for(let e=0;e<r;e++)t.push(o[u++]);e.push(t)}l.push(e)}return e?n?{rings:l,hasZ:e,hasM:n}:{rings:l,hasZ:e}:n?{rings:l,hasM:n}:{rings:l}}function C(t,e,n=e.hasZ,r=e.hasM){return U(t,e.rings,n,r)}function U(t,e,n,r){const o=d(n,r),{lengths:s,coords:l}=t;let u=0;dt(t);for(const t of e){for(const e of t)for(let t=0;t<o;t++)l[u++]=e[t];s.push(t.length)}return t}const j=[],Q=[];function W(t,e,n,r,o){j[0]=t;const[s]=B(Q,j,e,n,r,o);return gt(j),gt(Q),s}function B(t,e,n,o,s,l){if(gt(t),!n){for(const n of e){const e=(0,a.W)(n,l);t.push(new c.Om(null,n.attributes,null,e))}return t}switch(n){case"esriGeometryPoint":return function(t,e,n,r,o){const s=V(n,r);for(const n of e){const e=null!=n.geometry?s(new f.A,n.geometry):null;t.push(new c.Om(e,n.attributes,null,(0,a.W)(n,o)))}return t}(t,e,o,s,l);case"esriGeometryMultipoint":return function(t,e,n,r,o){const s=d(n,r);for(const n of e){const e=null!=n.geometry?R(new f.A,n.geometry,s):null;t.push(new c.Om(e,n.attributes,null,(0,a.W)(n,o)))}return t}(t,e,o,s,l);case"esriGeometryPolyline":return function(t,e,n,r,o){const s=d(n,r);for(const n of e){const e=null!=n.geometry?L(new f.A,n.geometry,s):null,r=null!=n.centroid?S(new f.A,n.centroid):null;t.push(new c.Om(e,n.attributes,r,(0,a.W)(n,o)))}return t}(t,e,o,s,l);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(t,e,n,r,o){for(const s of e){const e=null!=s.geometry?C(new f.A,s.geometry,n,r):null,l=(0,a.W)(s,o);null!=s.centroid?t.push(new c.Om(e,s.attributes,E(new f.A,s.centroid),l)):t.push(new c.Om(e,s.attributes,null,l))}return t}(t,e,o,s,l);default:g().error("convertToFeatureSet:unknown-geometry",new r.A("internal:geometry",`Unable to parse unknown geometry type '${n}'`)),gt(t)}return t}function $(t,e,n,r){Q[0]=t,K(j,Q,e,n,r);const o=j[0];return gt(j),gt(Q),o}function J(t,e,n){if(null==t)return null;const o=new f.A;return"hasZ"in t&&null==e&&(e=t.hasZ),"hasM"in t&&null==n&&(n=t.hasM),(0,i.fT)(t)?V(null!=e?e:null!=t.z,null!=n?n:null!=t.m)(o,t):(0,i.Bi)(t)?C(o,t,e,n):(0,i.Rg)(t)?L(o,t,d(e,n)):(0,i.U9)(t)?R(o,t,d(e,n)):void g().error("convertFromGeometry:unknown-geometry",new r.A("internal:geometry",`Unable to parse unknown geometry type '${t}'`))}function D(t,e,n,o){const s=t&&("coords"in t?t:t.geometry);if(null==s)return null;switch(e){case"esriGeometryPoint":{let t=F;return n&&o?t=k:n?t=Z:o&&(t=O),t(s)}case"esriGeometryMultipoint":return _(s,n,o);case"esriGeometryPolyline":return v(s,n,o);case"esriGeometryPolygon":return z(s,n,o);default:return g().error("convertToGeometry:unknown-geometry",new r.A("internal:geometry",`Unable to parse unknown geometry type '${e}'`)),null}}function K(t,e,n,o,s){if(gt(t),null==n)return function(t,e){for(const n of e)t.push({attributes:n.attributes});return t}(t,e);switch(n){case"esriGeometryPoint":return function(t,e,n,r){let o=F;n&&r?o=k:n?o=Z:r&&(o=O);for(const n of e){const{geometry:e,attributes:r}=n,s=null!=e?o(e):null;t.push({attributes:r,geometry:s})}return t}(t,e,o,s);case"esriGeometryMultipoint":return function(t,e,n,r){for(const{geometry:o,attributes:s}of e)t.push({attributes:s,geometry:null!=o?_(o,n,r):null});return t}(t,e,o,s);case"esriGeometryPolyline":return function(t,e,n,r){for(const{geometry:o,attributes:s}of e)t.push({attributes:s,geometry:null!=o?v(o,n,r):null});return t}(t,e,o,s);case"esriGeometryPolygon":return function(t,e,n,r){for(const{geometry:o,attributes:s,centroid:l}of e){const e=null!=o?z(o,n,r):null;if(null!=l){const n=F(l);t.push({attributes:s,centroid:n,geometry:e})}else t.push({attributes:s,geometry:e})}return t}(t,e,o,s);default:g().error("convertToFeatureSet:unknown-geometry",new r.A("internal:geometry",`Unable to parse unknown geometry type '${n}'`))}return t}function H(t){const{spatialReference:e,transform:n,fields:r,hasM:o,hasZ:s,features:l,geometryType:u,exceededTransferLimit:i,queryGeometry:c,queryGeometryType:h}=t,f={features:K([],l,u,s,o),fields:r,geometryType:u,spatialReference:e,queryGeometry:D(c,h,!1,!1)};return n&&(f.transform=n),i&&(f.exceededTransferLimit=i),o&&(f.hasM=o),s&&(f.hasZ=s),f}function X(t,e){const n=new h.A,{hasM:r,hasZ:o,features:s,spatialReference:l,geometryType:u,exceededTransferLimit:i,transform:c,fields:f}=t;return f&&(n.fields=f),n.geometryType=u??null,n.spatialReference=l??null,s&&B(n.features,s,u,o,r,e),i&&(n.exceededTransferLimit=i),r&&(n.hasM=r),o&&(n.hasZ=o),c&&(n.transform=c),n}function tt(t){const{transform:e,features:n,hasM:r,hasZ:o}=t;if(!e)return t;for(const t of n)null!=t.geometry&&ut(t.geometry,t.geometry,r,o,e),null!=t.centroid&&ut(t.centroid,t.centroid,r,o,e);return t.transform=null,t}function et(t,e){const{geometryType:n,features:r,hasM:o,hasZ:s}=e;if(!t)return e;for(let e=0;e<r.length;e++){const l=r[e],u=l.weakClone();u.geometry=new f.A,nt(u.geometry,l.geometry,o,s,n,t),l.centroid&&(u.centroid=new f.A,nt(u.centroid,l.centroid,o,s,"esriGeometryPoint",t)),r[e]=u}return e.transform=t,e}function nt(t,e,n,r,o,s,l=n,u=r){if(dt(t),!e?.coords.length)return null;const i=m[o],{coords:c,lengths:h}=e,f=d(n,r),a=d(n&&l,r&&u),g=b(n,r,l,u);if(!h.length)return g(t.coords,c,0,0,w(s,c[0]),T(s,c[1])),dt(t,f,0),t;let y,p,I,N,M=0,G=0,A=G;for(const e of h){if(e<i)continue;let n=0;G=A,I=y=w(s,c[M]),N=p=T(s,c[M+1]),g(t.coords,c,G,M,I,N),n++,M+=f,G+=a;for(let r=1;r<e;r++,M+=f)I=w(s,c[M]),N=T(s,c[M+1]),I===y&&N===p||(g(t.coords,c,G,M,I-y,N-p),G+=a,n++,y=I,p=N);n>=i&&(t.lengths.push(n),A=G)}return gt(t.coords,A),t.coords.length?t:null}function rt(t,e,n,r,o,s,l=n,u=r){if(dt(t),!e?.coords.length)return null;const i=m[o],{coords:c,lengths:h}=e,f=d(n,r),a=d(n&&l,r&&u),g=b(n,r,l,u);if(!h.length)return g(t.coords,c,0,0,c[0],c[1]),dt(t,f,0),t;let y=0;const p=s*s;for(const e of h){if(e<i){y+=e*f;continue}const n=t.coords.length/a,r=y,o=y+(e-1)*f;g(t.coords,c,t.coords.length,r,c[r],c[r+1]),st(t.coords,c,f,p,g,r,o),g(t.coords,c,t.coords.length,o,c[o],c[o+1]);const s=t.coords.length/a-n;s>=i?t.lengths.push(s):gt(t.coords,n*a),y+=e*f}return t.coords.length?t:null}function ot(t,e,n,r){const o=t[e],s=t[e+1],l=t[n],u=t[n+1],i=t[r],c=t[r+1];let h=l,f=u,a=i-h,d=c-f;if(0!==a||0!==d){const t=((o-h)*a+(s-f)*d)/(a*a+d*d);t>1?(h=i,f=c):t>0&&(h+=a*t,f+=d*t)}return a=o-h,d=s-f,a*a+d*d}function st(t,e,n,r,o,s,l){let u,i=r,c=0;for(let t=s+n;t<l;t+=n)u=ot(e,t,s,l),u>i&&(c=t,i=u);i>r&&(c-s>n&&st(t,e,n,r,o,s,c),o(t,e,t.length,c,e[c],e[c+1]),l-c>n&&st(t,e,n,r,o,c,l))}function lt(t,e,n,r){if(!e?.coords?.length)return null;const o=d(n,r);let s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,h=Number.NEGATIVE_INFINITY;if(e&&e.coords){const t=e.coords;for(let e=0;e<t.length;e+=o){const n=t[e],r=t[e+1];s=Math.min(s,n),c=Math.max(c,n),i=Math.min(i,r),h=Math.max(h,r)}}return(0,l.is)(t)?(0,l.BI)(t,s,i,c,h):(0,u.fA)(s,i,c,h,t),t}function ut(t,e,n,r,o){const{coords:l,lengths:u}=e,i=d(n,r);if(!l.length)return t!==e&&dt(t),t;(0,s.Lw)(o);const{originPosition:c,scale:h,translate:f}=o,a=mt;a.originPosition=c;const g=a.scale;g[0]=h[0]??1,g[1]=-(h[1]??1),g[2]=h[2]??1,g[3]=h[3]??1;const m=a.translate;if(m[0]=f[0]??0,m[1]=f[1]??0,m[2]=f[2]??0,m[3]=f[3]??0,!u.length){for(let e=0;e<i;++e)t.coords[e]=A(a,l[e],e);return t!==e&&dt(t,i,0),t}let y=0;for(let e=0;e<u.length;e++){const n=u[e];t.lengths[e]=n;for(let e=0;e<i;++e)t.coords[y+e]=A(a,l[y+e],e);let r=t.coords[y],o=t.coords[y+1];y+=i;for(let e=1;e<n;e++,y+=i){r+=l[y]*g[0],o+=l[y+1]*g[1],t.coords[y]=r,t.coords[y+1]=o;for(let e=2;e<i;++e)t.coords[y+e]=A(a,l[y+e],e)}}return t!==e&&dt(t,l.length,u.length),t}function it(t,e,n,r,o,s){if(dt(t),t.lengths.push(...e.lengths),n===o&&r===s)for(let n=0;n<e.coords.length;n++)t.coords.push(e.coords[n]);else{const l=d(n,r),u=b(n,r,o,s),i=e.coords;for(let e=0;e<i.length;e+=l)u(t.coords,i,t.coords.length,e,i[e],i[e+1])}return t}function ct(t,e,n,r){let o=0,s=t[r*e],l=t[r*(e+1)];for(let u=1;u<n;u++){const n=s+t[r*(e+u)],i=l+t[r*(e+u)+1],c=(n-s)*(i+l);s=n,l=i,o+=c}return.5*o}function ht(t,e){const{coords:n,lengths:r}=t;let o=0,s=0;for(let t=0;t<r.length;t++){const l=r[t];s+=ct(n,o,l,e),o+=l}return Math.abs(s)}function ft(t,e,n,r){return 0===t*r-n*e&&t*n+e*r>0}function at(t,e,n,r,o){const s=d(r,o);if(!t.lengths.length){if(t.coords.length<2)return null;const[n,r]=t.coords,o=M(e,n),s=G(e,r);return new f.A([],[o,s])}const l=new f.A([],[0,0]),u=m[n],i="esriGeometryPolygon"===n||"esriGeometryPolyline"===n;let c=0,h=0;for(let n=0;n<t.lengths.length;n++){const r=t.lengths[n],o=h;let f=M(e,t.coords[s*c]),a=G(e,t.coords[s*c+1]);l.coords[h++]=f,l.coords[h++]=a;let d=0,g=0,m=1;for(let n=1;n<r;n++){const r=M(e,t.coords[s*(n+c)]),o=G(e,t.coords[s*(n+c)+1]);if(r!==f||o!==a){const t=r-f,e=o-a;i&&ft(d,g,t,e)?(l.coords[h-2]+=t,l.coords[h-1]+=e,f+=t,a+=e):(l.coords[h++]=r,l.coords[h++]=o,f=r,a=o,d=t,g=e,m+=1)}}m<u?h=o:l.lengths.push(m),c+=r}return 0===l.lengths.length?null:l}function dt(t,e=0,n=0){gt(t.lengths,n),gt(t.coords,e)}function gt(t,e=0){t.length!==e&&(t.length=e)}const mt={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},92722:(t,e,n)=>{n.d(e,{A:()=>o});var r=n(69397);class o{constructor(t=[],e=[]){this.lengths=t??[],this.coords=e??[]}static fromJSON(t){return new o(t.lengths,t.coords)}static fromRect(t){const[e,n,r,s]=t,l=r-e,u=s-n;return new o([5],[e,n,l,0,0,u,-l,0,0,-u])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((t,e)=>t+e))}get usedMemory(){return 64+(0,r.Qf)(this.lengths,this.coords)}area(){let t=0,e=0;if(!this.lengths.length)return 0;for(let n=0;n<this.lengths.length;n++){const r=this.lengths[n];if(r<3)continue;let o=this.coords[2*e],s=this.coords[2*e+1];for(let n=1;n<r;n+=1){const r=this.coords[2*(n+e)],l=this.coords[2*(n+e)+1];t+=-.5*(r-o)*(l+s),o=r,s=l}e+=r}return t}forEachVertex(t){let e=0;this.lengths.length||t(this.coords[0],this.coords[1]);for(let n=0;n<this.lengths.length;n++){const r=this.lengths[n];for(let n=0;n<r;n++)t(this.coords[2*(n+e)],this.coords[2*(n+e)+1]);e+=r}}deltaDecode(){const t=this.clone(),{coords:e,lengths:n}=t;let r=0;for(const t of n){for(let n=1;n<t;n++)e[2*(r+n)]+=e[2*(r+n)-2],e[2*(r+n)+1]+=e[2*(r+n)-1];r+=t}return t}clone(t){if(0===this.lengths.length)return new o([],[this.coords[0],this.coords[1]]);const e=2*(0===this.lengths.length?1:this.lengths.reduce(((t,e)=>t+e))),n=this.coords.slice(0,e);return t?(t.set(n),new o(this.lengths,t)):new o(Array.from(this.lengths),Array.from(n))}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1878],{11878:(t,s,i)=>{i.d(s,{T:()=>a});var o=i(55537),e=i(83661);class h{constructor(t,s,i){if(t instanceof h)return this.data=t.data,this.N=t.N,this.M=t.M,t.data=null,t.N=0,void(t.M=0);this.data=t,this.N=s,this.M=i}assignCopy(t){return this===t||((0,o.g)(this.N*this.M===t.N*t.M),this.data.set(t.data),this.N=t.N,this.M=t.M),this}setZero(){return this.data?.fill(0),this}setIdentity(){for(let t=0;t<this.N;t++)for(let s=0;s<this.M;s++)this.setRowCol(t,s,t===s?1:0);return this}rows(){return this.N}cols(){return this.M}row(t){return(0,o.g)(0),{}}set(t,s){return this.data[t]=s,this}setRowCol(t,s,i){return this.data[t*this.M+s]=i,this}at(t){return this.data[t]}atRowCol(t,s){return this.data[t*this.M+s]}mulScalar(t,s){(0,o.g)(0)}mul(t,s){if((0,o.g)(this.M===t.rows()),(0,o.g)(this.N===s.rows()),(0,o.g)(t.cols()===s.cols()),s===this){const i=new Float64Array(this.N*this.M),o=new h(i,this.N,this.M);return this.mul(t,o),void s.assignCopy(o)}if(s===t){const i=new Float64Array(t.N*t.M),o=new h(i,t.N,t.M);return this.mul(t,o),void s.assignCopy(o)}const i=t.cols();for(let o=0;o<this.N;o++)for(let e=0;e<i;e++){let i=0;for(let s=0;s<this.M;s++)i+=this.atRowCol(o,s)*t.atRowCol(s,e);s.setRowCol(o,e,i)}}mulTranspose(t,s){if((0,o.g)(this.M===t.cols()),(0,o.g)(this.N===s.rows()),(0,o.g)(t.rows()===s.cols()),s===this){const i=new Float64Array(this.N*this.M),o=new h(i,this.N,this.M);return this.mulTranspose(t,o),void s.assignCopy(o)}if(s===t){const i=new Float64Array(t.N*t.M),o=new h(i,t.N,t.M);return this.mulTranspose(t,o),void s.assignCopy(o)}const i=t.rows();for(let o=0;o<this.N;o++)for(let e=0;e<i;e++){let i=0;for(let s=0;s<this.M;s++)i+=this.atRowCol(o,s)*t.atRowCol(e,s);s.setRowCol(o,e,i)}}mulLeft(t,s){(0,o.g)(0)}mulLeftTranspose(t,s){(0,o.g)(0)}mulDiag(t,s){if((0,o.g)(this.M===t.N*t.M),(0,o.g)(this.N===s.rows()),(0,o.g)(this.M===s.cols()),s===this){const i=new Float64Array(this.N*this.M),o=new h(i,this.N,this.M);return this.mulDiag(t,o),void s.assignCopy(o)}const i=this.M;for(let o=0;o<this.N;o++)for(let e=0;e<i;e++)s.setRowCol(o,e,this.atRowCol(o,e)*t.at(e))}transposeInPlace(){if(this.N===this.M){for(let t=0;t<this.N;t++)for(let s=t+1;s<this.M;s++){const i=this.atRowCol(t,s);this.setRowCol(t,s,this.atRowCol(s,t)),this.setRowCol(s,t,i)}return this}const t=new Float64Array(this.N*this.M),s=new h(t,this.N,this.M);return s.assignCopy(this),this.M=(0,e.c)(this.N,this.N=this.M),s.transpose(this),this}transpose(t){if(this!==t){h.checkDims(t,this.M,this.N);for(let s=0;s<this.N;s++)for(let i=0;i<this.M;i++)t.setRowCol(i,s,this.atRowCol(s,i))}else t.transposeInPlace()}add(t,s){}svd(t,s,i,e=!1){if(h.checkDims(t,this.N,this.M),h.checkDims(s,this.M,1),h.checkDims(i,this.M,this.M),e){if((0,o.g)(this.N===this.M),!this.symmetricEigen(s,i))return!1;for(let t=0;t<this.M;++t)s.at(t)<0&&s.set(t,0);return t.assignCopy(i),!0}let r,a,l,y,n,x,w,u=0,C=0,f=0,R=0,d=0;const c=this.M,M=this.N;t.assignCopy(this);const m=new Float64Array(c),N=new h(m,c,1),b=(t,s)=>s>=0?Math.abs(t):-Math.abs(t),g=(t,s)=>{if((t=Math.abs(t))>(s=Math.abs(s))){const i=s/t;return t*Math.sqrt(i*i+1)}if(s>0){const i=t/s;return s*Math.sqrt(i*i+1)}return 0};for(let i=0;i<c;i++){if(u=i+1,N.set(i,R*f),f=y=R=0,i<M){for(let s=i;s<M;s++)R+=Math.abs(t.atRowCol(s,i));if(R){for(let s=i;s<M;s++)t.setRowCol(s,i,t.atRowCol(s,i)/R),y+=t.atRowCol(s,i)*t.atRowCol(s,i);a=t.atRowCol(i,i),f=-b(Math.sqrt(y),a),l=a*f-y,t.setRowCol(i,i,a-f);for(let s=u;s<c;s++){y=0;for(let o=i;o<M;o++)y+=t.atRowCol(o,i)*t.atRowCol(o,s);a=y/l;for(let o=i;o<M;o++)t.setRowCol(o,s,t.atRowCol(o,s)+a*t.atRowCol(o,i))}for(let s=i;s<M;s++)t.setRowCol(s,i,t.atRowCol(s,i)*R)}}if(s.set(i,R*f),f=y=R=0,i<M&&i!==c-1){for(let s=u;s<c;s++)R+=Math.abs(t.atRowCol(i,s));if(R){for(let s=u;s<c;s++)t.setRowCol(i,s,t.atRowCol(i,s)/R),y+=t.atRowCol(i,s)*t.atRowCol(i,s);a=t.atRowCol(i,u),f=-b(Math.sqrt(y),a),l=a*f-y,t.setRowCol(i,u,a-f);for(let s=u;s<c;s++)N.set(s,t.atRowCol(i,s)/l);for(let s=u;s<M;s++){y=0;for(let o=u;o<c;o++)y+=t.atRowCol(s,o)*t.atRowCol(i,o);for(let i=u;i<c;i++)t.setRowCol(s,i,t.atRowCol(s,i)+y*N.at(i))}for(let s=u;s<c;s++)t.setRowCol(i,s,t.atRowCol(i,s)*R)}}const o=Math.abs(s.at(i))+Math.abs(N.at(i));d=o>d?o:d}for(let s=c-1;s>=0;s--){if(s<c-1){if(f){for(let o=u;o<c;o++)i.setRowCol(o,s,t.atRowCol(s,o)/t.atRowCol(s,u)/f);for(let o=u;o<c;o++){y=0;for(let e=u;e<c;e++)y+=t.atRowCol(s,e)*i.atRowCol(e,o);for(let t=u;t<c;t++)i.setRowCol(t,o,i.atRowCol(t,o)+y*i.atRowCol(t,s))}}for(let t=u;t<c;t++)i.setRowCol(s,t,0),i.setRowCol(t,s,0)}i.setRowCol(s,s,1),f=N.at(s),u=s}for(let i=(M<c?M:c)-1;i>=0;i--){u=i+1,f=s.at(i);for(let s=u;s<c;s++)t.setRowCol(i,s,0);if(f){f=1/f;for(let s=u;s<c;s++){y=0;for(let o=u;o<M;o++)y+=t.atRowCol(o,i)*t.atRowCol(o,s);a=y/t.atRowCol(i,i)*f;for(let o=i;o<M;o++)t.setRowCol(o,s,t.atRowCol(o,s)+a*t.atRowCol(o,i))}for(let s=i;s<M;s++)t.setRowCol(s,i,t.atRowCol(s,i)*f)}else for(let s=i;s<M;s++)t.setRowCol(s,i,0);t.setRowCol(i,i,t.atRowCol(i,i)+1)}for(let o=c-1;o>=0;o--)for(let e=1;;e++){let h=1;for(u=o;u>=0;u--){if(C=u-1,Math.abs(N.at(u))+d===d){h=0;break}if(Math.abs(s.at(C))+d===d)break}if(h){r=0,y=1;for(let i=u;i<=o&&(a=y*N.at(i),N.set(i,N.at(i)*r),Math.abs(a)+d!==d);i++){f=s.at(i),l=g(a,f),s.set(i,l),l=1/l,r=f*l,y=-a*l;for(let s=0;s<M;s++)x=t.atRowCol(s,C),w=t.atRowCol(s,i),t.setRowCol(s,C,x*r+w*y),t.setRowCol(s,i,w*r-x*y)}}if(w=s.at(o),u===o){if(w<0){s.set(o,-w);for(let t=0;t<c;t++)i.setRowCol(t,o,-i.atRowCol(t,o))}break}if(100===e)return!1;n=s.at(u),C=o-1,x=s.at(C),f=N.at(C),l=N.at(o),a=((x-w)*(x+w)+(f-l)*(f+l))/(2*l*x),f=g(a,1),a=((n-w)*(n+w)+l*(x/(a+b(f,a))-l))/n,r=y=1;for(let o=u;o<=C;o++){const e=o+1;f=N.at(e),x=s.at(e),l=y*f,f*=r,w=g(a,l),N.set(o,w),r=a/w,y=l/w,a=n*r+f*y,f=f*r-n*y,l=x*y,x*=r;for(let t=0;t<c;t++)n=i.atRowCol(t,o),w=i.atRowCol(t,e),i.setRowCol(t,o,n*r+w*y),i.setRowCol(t,e,w*r-n*y);w=g(a,l),s.set(o,w),w&&(w=1/w,r=a*w,y=l*w),a=r*f+y*x,n=r*x-y*f;for(let s=0;s<M;s++)x=t.atRowCol(s,o),w=t.atRowCol(s,e),t.setRowCol(s,o,x*r+w*y),t.setRowCol(s,e,w*r-x*y)}N.set(u,0),N.set(o,a),s.set(o,n)}const p=new Float64Array(this.N),P=new Float64Array(this.M),v=new h(p,this.N,1),T=new h(P,this.M,1);let I=1;do{I*=3,I++}while(I<=this.M);do{I/=3,I=Math.trunc(I);for(let o=I;o<this.M;o++){const e=s.at(o);for(let s=0;s<this.N;s++)v.set(s,t.atRowCol(s,o));for(let t=0;t<this.M;t++)T.set(t,i.atRowCol(t,o));let h=o;for(;s.at(h-I)<e;){s.set(h,s.at(h-I));for(let s=0;s<this.N;s++)t.setRowCol(s,h,t.atRowCol(s,h-I));for(let t=0;t<this.M;t++)i.setRowCol(t,h,i.atRowCol(t,h-I));if(h-=I,h<I)break}s.set(h,e);for(let s=0;s<this.N;s++)t.setRowCol(s,h,v.at(s));for(let t=0;t<this.M;t++)i.setRowCol(t,h,T.at(t))}}while(I>1);for(let s=0;s<this.M;s++){let o=0;for(let i=0;i<this.N;i++)t.atRowCol(i,s)<0&&o++;for(let t=0;t<this.M;t++)i.atRowCol(t,s)<0&&o++;if(o>Math.trunc((this.N+this.M)/2)){for(let i=0;i<this.N;i++)t.setRowCol(i,s,-t.atRowCol(i,s));for(let t=0;t<this.M;t++)i.setRowCol(t,s,-i.atRowCol(t,s))}}return!0}isSymmetric(){if(this.N!==this.M)return!1;for(let t=0;t<this.N;t++)for(let s=t+1;s<this.M;s++)if(this.atRowCol(t,s)!==this.atRowCol(s,t))return!1;return!0}isZero(){return(0,o.g)(0),!1}isIdentity(){return(0,o.g)(0),!1}equals(t,s){if(void 0!==s&&(0,o.g)(0),this.N!==t.N||this.M!==t.M)return!1;for(let s=0;s<this.N*this.M;s++)if(this.data[s]!==t.data[s])return!1;return!0}maxElement(){return(0,o.g)(0),0}minElement(){return(0,o.g)(0),0}determinant(){if((0,o.g)(this.N===this.M),1===this.N)return this.data[0];if(2===this.N)return this.data[0]*this.data[3]-this.data[1]*this.data[2];if(3===this.N){const t=this;return t.atRowCol(0,0)*(t.atRowCol(1,1)*t.atRowCol(2,2)-t.atRowCol(1,2)*t.atRowCol(2,1))-t.atRowCol(0,1)*(t.atRowCol(1,0)*t.atRowCol(2,2)-t.atRowCol(2,0)*t.atRowCol(1,2))+t.atRowCol(0,2)*(t.atRowCol(1,0)*t.atRowCol(2,1)-t.atRowCol(1,1)*t.atRowCol(2,0))}const t=new Float64Array(this.N*this.N),s=new h(t,this.N,this.N),i=new Float64Array(this.N);if(!this.luDecomposition(s,i))return 0;let e=1;for(let t=0;t<this.N;t++)e*=s.atRowCol(t,t),i[t]!==t&&(e=-e);return e}submatrix(t,s,i){(0,o.g)(0)}inverse(t){(0,o.g)(0)}pseudoInverse(t,s=!1,i=2220446049250313e-31){if(t.setZero(),1===this.N&&1===this.M)return 0!==this.atRowCol(0,0)?t.setRowCol(0,0,1/this.atRowCol(0,0)):t.setRowCol(0,0,0),!0;if(2===this.N&&2===this.M){const s=this.atRowCol(0,0)*this.atRowCol(1,1)-this.atRowCol(0,1)*this.atRowCol(1,0),i=1e-5*(Math.abs(this.atRowCol(0,0)*this.atRowCol(1,1))+Math.abs(this.atRowCol(0,1)*this.atRowCol(1,0)));if(Math.abs(s)>i)return t.setRowCol(0,0,this.atRowCol(1,1)/s),t.setRowCol(0,1,-this.atRowCol(0,1)/s),t.setRowCol(1,0,-this.atRowCol(1,0)/s),t.setRowCol(1,1,this.atRowCol(0,0)/s),!0}const o=new Float64Array(this.N*this.M),e=new h(o,this.N,this.M),r=new Float64Array(this.M),a=new h(r,this.M,1),l=new Float64Array(this.M*this.M),y=new h(l,this.M,this.M);if(!this.svd(e,a,y,s))return!1;const n=Math.max(this.N,this.M),x=i*Math.abs(a.at(0))*n;for(let t=0;t<this.M;t++)a.at(t)>x?a.set(t,1/a.at(t)):a.set(t,0);return y.mulDiag(a,t),t.mulTranspose(e,t),!0}luDecomposition(t,s){return(0,o.g)(0),!1}symmetricEigen(t,s){(0,o.g)(this.rows()===this.cols()),(0,o.g)(this.rows()===t.rows()),(0,o.g)(s.rows()===s.cols()&&s.rows()===this.rows()),(0,o.g)(this.isSymmetric());const i=new Float64Array(this.N*this.M),e=new h(i,this.N,this.M);e.assignCopy(this);const r=100/Number.EPSILON,a=this.rows(),l=new Float64Array(a),y=new Float64Array(a),n=new h(l,a,1),x=new h(y,a,1);for(let s=0;s<a;s++)n.set(s,e.atRowCol(s,s)),t.set(s,e.atRowCol(s,s)),x.set(s,0);s.setIdentity();const w=()=>{const i=n;s.transposeInPlace();let o=1;do{o*=3,o++}while(o<=a);do{o/=3,o=Math.trunc(o);for(let e=o;e<a;e++){const h=t.at(e),r=Math.abs(h);for(let t=0;t<this.M;t++)i.set(t,s.atRowCol(t,e));let a=e;for(;Math.abs(t.at(a-o))<r;){t.set(a,t.at(a-o));for(let t=0;t<this.M;t++)s.setRowCol(t,a,s.atRowCol(t,a-o));if(a-=o,a<o)break}if(a!==e){t.set(a,h);for(let t=0;t<this.M;t++)s.setRowCol(t,a,i.at(t))}}}while(o>1)};for(let i=1;;i++){let o=0;for(let t=1;t<a;t++)for(let s=0;s<t;s++)o+=Math.abs(e.atRowCol(t,s));if(0===o)return w(),!0;const h=i<4?.2*o/(a*a):0;for(let o=0;o<a;o++)for(let l=o+1;l<a;l++){let y=r*Math.abs(e.atRowCol(l,o));if(i>4&&y<=Math.abs(t.at(o))&&y<=Math.abs(t.at(l)))e.setRowCol(l,o,0);else if(Math.abs(e.atRowCol(l,o))>h){let i,h=t.at(l)-t.at(o);if(y<Math.abs(h))i=e.atRowCol(l,o)/h;else{const t=.5*h/e.atRowCol(l,o);i=1/(Math.abs(t)+Math.sqrt(1+t*t)),t<0&&(i=-i)}const r=1/Math.sqrt(1+i*i),n=i*r,w=n/(1+r);h=i*e.atRowCol(l,o),x.set(o,x.at(o)-h),x.set(l,x.at(l)+h),t.set(o,t.at(o)-h),t.set(l,t.at(l)+h),e.setRowCol(l,o,0);let u=0;for(;u<o;u++)y=e.atRowCol(o,u),h=e.atRowCol(l,u),e.setRowCol(o,u,y-n*(h+y*w)),e.setRowCol(l,u,h+n*(y-h*w));for(u++;u<l;u++)y=e.atRowCol(u,o),h=e.atRowCol(l,u),e.setRowCol(u,o,y-n*(h+y*w)),e.setRowCol(l,u,h+n*(y-h*w));for(u++;u<a;u++)y=e.atRowCol(u,o),h=e.atRowCol(u,l),e.setRowCol(u,o,y-n*(h+y*w)),e.setRowCol(u,l,h+n*(y-h*w));for(u=0;u<a;u++)y=s.atRowCol(o,u),h=s.atRowCol(l,u),s.setRowCol(o,u,y-n*(h+y*w)),s.setRowCol(l,u,h+n*(y-h*w))}}for(let s=0;s<a;s++)n.set(s,n.at(s)+x.at(s)),t.set(s,n.at(s)),x.set(s,0)}}static checkDims(t,s,i){(0,o.g)(t.rows()===s&&t.cols()===i)}}class r extends h{constructor(t){if(t.copy){const s=new Float64Array(t.copy.N*t.copy.M);return super(s,t.copy.N,t.copy.M),this.buffer=s,void this.assignCopy(t.copy)}const s=new Float64Array(t.NN*t.MM);super(s,t.NN,t.MM),this.buffer=s,t.initializerList&&(0,e.b)(this.buffer,t.initializerList,0,0,t.initializerList.length)}assignCopy(t){return this===t||super.assignCopy(t),this}}class a{constructor(t){this.m_TransformationType=1,void 0===t?this.setIdentity():t instanceof a?this.set(t):this.setScale(t)}set(t){return this.xx=t.xx,this.xy=t.xy,this.xd=t.xd,this.yx=t.yx,this.yy=t.yy,this.yd=t.yd,this}clone(){return(new a).set(this)}setZero(){this.xx=0,this.yy=0,this.xy=0,this.yx=0,this.xd=0,this.yd=0}isEqual(t){return this===t||this.xx===t.xx&&this.xy===t.xy&&this.xd===t.xd&&this.yx===t.yx&&this.yy===t.yy&&this.yd===t.yd}transformInPlace(t){const s=this.xx*t.x+this.xy*t.y+this.xd,i=this.yx*t.x+this.yy*t.y+this.yd;t.x=s,t.y=i}transform(t){const s=t.clone();return this.transformInPlace(s),s}queryTransform(t,s){const i=this.xx*t.x+this.xy*t.y+this.xd,o=this.yx*t.x+this.yy*t.y+this.yd;s.setCoords(i,o)}transformEnvInPlace(t){if(t.isEmpty())return;const s=(0,e.m)(e.P,4);t.queryCorners(s),this.transformPoints2D(s,4,s),t.setFromPoints(s,4)}queryTransformEnv(t,s){(0,o.g)(0)}transformPoints2D(t,s,i){for(let o=0;o<s;++o)this.queryTransform(t[o],i[o])}transformInterleavedPoints(t,s,i){s*=2;const o=e.P.getNAN();for(let e=0;e<s;e+=2)o.x=t[e],o.y=t[e+1],this.transformInPlace(o),i[e]=o.x,i[e+1]=o.y}multiply(t){return a.st_multiply(this,t,this),this}mulLeft(t){return(0,o.g)(0),this}static st_multiply(t,s,i){const o=t.xx*s.xx+t.yx*s.xy,e=t.xy*s.xx+t.yy*s.xy,h=t.xd*s.xx+t.yd*s.xy+s.xd,r=t.xx*s.yx+t.yx*s.yy,a=t.xy*s.yx+t.yy*s.yy,l=t.xd*s.yx+t.yd*s.yy+s.yd;i.xx=o,i.xy=e,i.xd=h,i.yx=r,i.yy=a,i.yd=l}getCoefficients(t){(0,o.g)(t.length>=6),t[0]=this.xx,t[1]=this.xy,t[2]=this.xd,t[3]=this.yx,t[4]=this.yy,t[5]=this.yd}setCoefficients(t){(0,o.g)(t.length>=6),this.xx=t[0],this.xy=t[1],this.xd=t[2],this.yx=t[3],this.yy=t[4],this.yd=t[5]}copyTo(t){(0,o.g)(0)}initializeFromRect(t,s){t.isEmpty()||s.isEmpty()||!t.width()||!t.height()?this.setZero():(this.xy=this.yx=0,this.xx=s.width()/t.width(),this.yy=s.height()/t.height(),this.xd=s.xmin-t.xmin*this.xx,this.yd=s.ymin-t.ymin*this.yy)}initializeFromRectIsotropic(t,s){if(t.isEmpty()||!t.width()||!t.height()||s.isEmpty())this.setZero();else{this.yx=0,this.xy=0,this.xx=s.width()/t.width(),this.yy=s.height()/t.height(),this.xx>this.yy?this.xx=this.yy:this.yy=this.xx;const i=s.getCenter(),o=t.getCenter();this.xd=i.x-o.x*this.xx,this.yd=i.y-o.y*this.yy}}initializeFromTwoPointsArray(t,s){if(t[0].equals(s[0])&&t[1].equals(s[1]))return void this.setIdentity();if(t[0].equals(t[1])){if(s[0].equals(s[1]))return void this.setShift(s[0].sub(t[0]));(0,o.a)("")}if(!t[0].equals(t[1])&&s[0].equals(s[1]))return this.setZero(),void this.shift(s[0]);this.setShiftCoords(-t[0].x,-t[0].y);const i=e.P.distance(t[0],t[1]),h=e.P.distance(s[0],s[1]),r=h/i;this.scale(r,r);const a=t[1].sub(t[0]);a.divThis(i);const l=s[1].sub(s[0]);l.divThis(h);const y=a.crossProduct(l),n=a.dotProduct(l);this.rotate(n,y),this.shiftCoords(s[0].x,s[0].y)}initializeFromTwoPoints(t,s,i,o){const e=[t,s],h=[i,o];this.initializeFromTwoPointsArray(e,h)}transformSizeInPlace(t){(0,o.g)(0)}transformSize(t,s){(0,o.g)(0)}transformTol(t){return(0,o.g)(0),0}transformWithoutTranslateArray(t,s,i){for(let o=0;o<s;++o)this.transformWithoutTranslate(t[o],i[o])}transformWithoutTranslateInPlace(t){const s=this.xx*t.x+this.xy*t.y,i=this.yx*t.x+this.yy*t.y;t.setCoords(s,i)}transformWithoutTranslate(t,s){const i=this.xx*t.x+this.xy*t.y,o=this.yx*t.x+this.yy*t.y;s.setCoords(i,o)}setIdentity(){this.xx=1,this.xy=0,this.xd=0,this.yx=0,this.yy=1,this.yd=0}isIdentity(){return!(1!==this.xx||1!==this.yy||this.xy||this.xd||this.yx||this.yd)}isIdentityTol(t){const s=t*t;return!((0,e.a)(this.xd)+(0,e.a)(this.yd)>s||(0,e.a)(this.xy+this.xd)+(0,e.a)(this.yy+this.yd-1)>s||(0,e.a)(this.xx+this.xd-1)+(0,e.a)(this.yx+this.yd)>s)}isReflective(){return this.xx*this.yy-this.yx*this.xy<0}isUniform(t){const s=this.xx*this.xx+this.yx*this.yx,i=this.xy*this.xy+this.yy*this.yy,o=(s+i)*t;return Math.abs(s-i)<=o&&Math.abs(this.xx*this.xy+this.yx*this.yy)<=o}isUniformNoRotation(){return 0!==this.xx&&Math.abs(this.xx)===Math.abs(this.yy)&&0===this.xy&&0===this.yx}isTranslate(){return 1===this.xx&&1===this.yy&&!this.xy&&!this.yx}isTranslateTol(t){const s=new e.P;return s.setCoords(0,1),this.transformWithoutTranslateInPlace(s),s.y-=1,!(s.sqrLength()>t*t)&&(s.setCoords(1,0),this.transformWithoutTranslateInPlace(s),s.x-=1,s.sqrLength()<=t*t)}isOrthonormal(t){const s=new a;return s.xx=this.xx*this.xx+this.xy*this.xy,s.xy=this.xx*this.yx+this.xy*this.yy,s.yx=this.yx*this.xx+this.yy*this.xy,s.yy=this.yx*this.yx+this.yy*this.yy,s.xd=0,s.yd=0,s.isIdentityTol(t)}isDegenerate(t){return Math.abs(this.xx*this.yy-this.yx*this.xy)<=2*t*(Math.abs(this.xx*this.yy)+Math.abs(this.yx*this.xy))}isZero(){return 0===this.xx&&0===this.yy&&0===this.xy&&0===this.yx&&0===this.xd&&0===this.yd}isScaleAndTranslateTol(t){return this.xy*this.xy+this.yx*this.yx<=(this.xx*this.xx+this.yy*this.yy)*t}setTranslate(t,s){return this.xx=1,this.xy=0,this.xd=t,this.yx=0,this.yy=1,this.yd=s,this}setShiftCoords(t,s){return this.xx=1,this.xy=0,this.xd=t,this.yx=0,this.yy=1,this.yd=s,this}setShift(t){return this.xx=1,this.xy=0,this.xd=t.x,this.yx=0,this.yy=1,this.yd=t.y,this}setScaleCoords(t,s){return this.xx=t,this.xy=0,this.xd=0,this.yx=0,this.yy=s,this.yd=0,this}setScale(t){return this.setScaleCoords(t,t),this}setFlipX(t,s){return this.xx=-1,this.xy=0,this.xd=t+s,this.yx=0,this.yy=1,this.yd=0,this}setFlipY(t,s){return this.xx=1,this.xy=0,this.xd=0,this.yx=0,this.yy=-1,this.yd=t+s,this}setShear(t,s){return this.xx=1,this.xy=t,this.xd=0,this.yx=s,this.yy=1,this.yd=0,this}scale(t,s){return this.xx*=t,this.xy*=t,this.xd*=t,this.yx*=s,this.yy*=s,this.yd*=s,this}setRotateAngle(t){return this.setRotate(Math.cos(t),Math.sin(t))}setRotate(t,s){return this.xx=t,this.xy=-s,this.xd=0,this.yx=s,this.yy=t,this.yd=0,this}setRotateAngleAbout(t,s){return this.setRotateAbout(Math.cos(t),Math.sin(t),s)}setRotateAbout(t,s,i){return this.setTranslate(-i.x,-i.y),this.rotate(t,s),this.translate(i.x,i.y)}setSwapCoordinates(){return this.xx=0,this.xy=1,this.xd=0,this.yx=1,this.yy=0,this.yd=0,this}setRotateCw90(){return this.xx=0,this.xy=1,this.xd=0,this.yx=-1,this.yy=0,this.yd=0,this}setRotateCcw90(){return this.xx=0,this.xy=-1,this.xd=0,this.yx=1,this.yy=0,this.yd=0,this}shiftCoords(t,s){return this.xd+=t,this.yd+=s,this}shift(t){return this.xd+=t.x,this.yd+=t.y,this}translate(t,s){return this.xd+=t,this.yd+=s,this}flipX(t,s){return this.xx=-this.xx,this.xy=-this.xy,this.xd=t+s-this.xd,this}flipY(t,s){return this.yx=-this.yx,this.yy=-this.yy,this.yd=t+s-this.yd,this}shear(t,s){const i=new a;return i.setShear(t,s),this.multiply(i)}rotateAngle(t){const s=new a;return s.setRotateAngle(t),this.multiply(s)}rotate(t,s){const i=new a;return i.setRotate(t,s),this.multiply(i)}rotateAbout(t,s,i){return this.translate(-i.x,-i.y),this.rotate(t,s),this.translate(i.x,i.y)}rotateAngleAbout(t,s){return this.rotateAbout(Math.cos(t),Math.sin(t),s)}setInvert(t){return this.set(t),this.invertThis()}invertThis(){let t=this.xx*this.yy-this.xy*this.yx;if(0===t)return this.setZero(),this;t=1/t;const s=(this.xy*this.yd-this.xd*this.yy)*t,i=(this.xd*this.yx-this.xx*this.yd)*t,o=this.yy*t,e=-this.xy*t,h=-this.yx*t,r=this.xx*t;return this.xd=s,this.yd=i,this.xx=o,this.yy=r,this.xy=e,this.yx=h,this}invertPrecise(t){return this.set(t),this.invertPreciseThis()}invertPreciseThis(){const t=e.M.constructDouble(this.xy),s=e.M.constructDouble(this.xx),i=s.mulDouble(this.yy).sub(t.mulDouble(this.yx));if(i.isZero())return this.setZero(),this;const o=i.clone();o.invertThis();const h=e.M.constructDouble(this.xd),r=t.mulDouble(this.yd).sub(h.mulDouble(this.yy)).mul(o).toDouble(),a=h.mulDouble(this.yx).sub(s.mulDouble(this.yd)).mul(o).toDouble(),l=o.mulDouble(this.yy).toDouble(),y=o.mulDouble(-this.xy).toDouble(),n=o.mulDouble(-this.yx).toDouble(),x=o.mulDouble(this.xx).toDouble();return this.xd=r,this.yd=a,this.xx=l,this.yy=x,this.xy=y,this.yx=n,this}extractScaleTransform(t,s){const i=Math.sqrt(this.xx*this.xx+this.xy*this.xy),o=Math.sqrt(this.yx*this.yx+this.yy*this.yy);s.setScaleCoords(1/i,1/o),s.multiply(this),t.setScaleCoords(i,o)}setFromTwoTriangles(t,s){let i=!0;for(let o=0;o<3;++o)i=i&&t[o].equals(s[o]);if(i)return this.setIdentity(),!0;const o=new e.P;o.setSub(t[0],t[1]);const h=new e.P;h.setSub(t[0],t[2]);const r=new e.P;r.setSub(s[0],s[1]);const a=new e.P;a.setSub(s[0],s[2]);const l=4*Number.EPSILON*(Math.abs(o.x*h.y)+Math.abs(h.x*o.y));let y=o.x*h.y-o.y*h.x;return Math.abs(y)>l?(y=1/y,this.xx=(r.x*h.y-o.y*a.x)*y,this.xy=(o.x*a.x-r.x*h.x)*y,this.yx=(r.y*h.y-o.y*a.y)*y,this.yy=(o.x*a.y-r.y*h.x)*y,this.xd=s[0].x-(this.xx*t[0].x+this.xy*t[0].y),this.yd=s[0].y-(this.yx*t[0].x+this.yy*t[0].y),!0):(this.setZero(),!1)}initializeFromControlPoints(t,s,i,h,n=null){return 0===s?(this.setIdentity(),void(n&&n.setIdentity())):1===s?(this.setShift(h[0].sub(i[0])),void(n&&n.setShift(i[0].sub(h[0])))):(s<3&&(t=1),void(4===t&&s>2?function(t,s,i,h,a){const l=e.P.average(i,s),n=e.P.average(h,s),x=new r({NN:2,MM:2});x.setZero();const w=new r({NN:2,MM:2});w.setZero();for(let t=0;t<s;++t)x.setRowCol(0,0,x.atRowCol(0,0)+(i[t].x-l.x)*(i[t].x-l.x)),x.setRowCol(0,1,x.atRowCol(0,1)+(i[t].x-l.x)*(i[t].y-l.y)),x.setRowCol(1,1,x.atRowCol(1,1)+(i[t].y-l.y)*(i[t].y-l.y)),w.setRowCol(0,0,w.atRowCol(0,0)+(h[t].x-n.x)*(i[t].x-l.x)),w.setRowCol(0,1,w.atRowCol(0,1)+(h[t].x-n.x)*(i[t].y-l.y)),w.setRowCol(1,0,w.atRowCol(1,0)+(h[t].y-n.y)*(i[t].x-l.x)),w.setRowCol(1,1,w.atRowCol(1,1)+(h[t].y-n.y)*(i[t].y-l.y));x.setRowCol(1,0,x.atRowCol(0,1));const u=new r({NN:2,MM:2});x.pseudoInverse(u,!0)||(0,o.b)("Failed to compute pseudo inverse"),w.mul(u,w),y(t,w);const C=l.clone();t.transformInPlace(C),t.xd=n.x-C.x,t.yd=n.y-C.y,a&&(w.pseudoInverse(u,!1)||(0,o.b)("Failed to compute pseudo inverse"),y(a,u),a.transformInPlace(n),a.xd=l.x-n.x,a.yd=l.y-n.y)}(this,s,i,h,n):function(t,s,i,h,n,x){(0,o.g)(1===t||0===t||2===t||3===t),s.setIdentity();const w=e.P.average(h,i),u=e.P.average(n,i);if((0,o.g)(t<l.length&&t>0),8&l[t]){const e=new r({NN:2,MM:2});e.setZero();for(let t=0;t<i;++t)e.setRowCol(0,0,e.atRowCol(0,0)+(n[t].x-u.x)*(h[t].x-w.x)),e.setRowCol(1,0,e.atRowCol(1,0)+(n[t].x-u.x)*(h[t].y-w.y)),e.setRowCol(0,1,e.atRowCol(0,1)+(n[t].y-u.y)*(h[t].x-w.x)),e.setRowCol(1,1,e.atRowCol(1,1)+(n[t].y-u.y)*(h[t].y-w.y));const x=new r({NN:2,MM:2}),C=new r({NN:2,MM:1}),f=new r({NN:2,MM:2});e.svd(x,C,f)||(0,o.b)("Failed to compute svd");const R=new r({NN:2,MM:2});x.transpose(R);const d=new r({NN:2,MM:2});f.mul(R,d),32&l[t]||d.determinant()<0&&(R.setRowCol(1,0,-R.atRowCol(1,0)),R.setRowCol(1,1,-R.atRowCol(1,1)),f.mul(R,d));const c=new a;y(c,d),s.set(c)}if(2&l[t]){let t=0,o=0;for(let e=0;e<i;++e){const i=h[e].sub(w);t+=i.sqrLength(),s.transformInPlace(i),o+=i.dotProduct(n[e].sub(u))}if(0===t)0===o?s.setIdentity():s.setZero();else{const i=o/t;s.scale(i,i)}}else(0,o.g)(!(4&l[t]));const C=w.clone();s.transformInPlace(C),s.xd=u.x-C.x,s.yd=u.y-C.y,x&&(x.set(s),x.invertThis(),x.isZero()&&(x.xd=w.x,x.yd=w.y))}(t,this,s,i,h,n)))}calculateErrors(t,s,i,h){(0,o.g)(t>0&&null!==s&&null!==i);let r=0;for(let o=0;o<t;++o){const t=this.transform(s[o]),a=e.P.sqrDistance(i[o],t);r+=a,h&&(h[o]=Math.sqrt(a))}return Math.sqrt(r/t)}}const l=[43,11,41,9,61];function y(t,s){(0,o.g)(!(2!==s.rows()&&3!==s.rows()||2!==s.cols()&&3!==s.rows())),t.xx=s.atRowCol(0,0),t.xy=s.atRowCol(0,1),t.yx=s.atRowCol(1,0),t.yy=s.atRowCol(1,1),3===s.cols()?(t.xd=s.atRowCol(0,2),t.yd=s.atRowCol(1,2)):(t.xd=0,t.yd=0)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7677],{563:(e,t,i)=>{i.d(t,{QueueProcessor:()=>u});var s=i(97768),n=i(74887),r=i(9775),o=i(32587),l=i(11932),a=i(44794);class c{constructor(e,t){this.item=e,this.controller=t,this.promise=null}}class u{constructor(e){this._schedule=null,this._deferreds=new o.A,this._controllers=new o.A,this._processingItems=new o.A,this._pausedSignal=(0,a.v)(!1),this.concurrency=1,e.concurrency&&(this.concurrency=e.concurrency),this._queue=new r.A(e.peeker),this.process=e.process}destroy(){this.clear(),this._schedule=(0,s.xt)(this._schedule)}get updating(){return this.running}get length(){return this._processingItems.size+this._queue.length}get running(){return!this._pausedSignal.value&&this._queue.length>0&&this._processingItems.size<this.concurrency}abort(e){const t=this._controllers.get(e);t&&t.abort()}clear(){this._queue.clear();const e=[];this._controllers.forEach((t=>e.push(t))),this._controllers.clear(),e.forEach((e=>e.abort())),this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach(((t,i)=>e(i)))}get(e){const t=this._deferreds.get(e);return t?t.promise:void 0}isOngoing(e){return this._processingItems.has(e)}has(e){return this._deferreds.has(e)}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(e,t){const i=this.get(e);if(i)return i;const s=new AbortController;let r=null;t&&(r=(0,n.u7)(t,(()=>s.abort())));const o=()=>{l.remove(),null!=r&&r.remove(),this._removeItem(e),this._queue.remove(e),this._scheduleNext()},l=(0,n.NY)(s.signal,(()=>{const t=this._processingItems.get(e);t&&t.controller.abort(),o(),a.reject((0,n.NK)())})),a=(0,n.Tw)();return this._deferreds.set(e,a),this._controllers.set(e,s),a.promise.then(o,o),this._queue.push(e),this._scheduleNext(),a.promise}last(){return this._queue.last()}lastPromise(){const e=this.last();return e?this.get(e):null}peek(){return this._queue.peek()}popLast(){const e=this._queue.popLast();return e&&(this._deferreds.get(e)?.reject((0,n.NK)()),this._removeItem(e)),e}reset(){const e=Array.from(this._processingItems.values());this._processingItems.clear();for(const t of e)this._queue.push(t.item),t.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const e=[];for(;this._queue.length;)e.push(this._queue.pop());return this.clear(),e}_removeItem(e){this._deferreds.delete(e),this._controllers.delete(e),this._processingItems.delete(e)}_scheduleNext(){this._pausedSignal.value||this._schedule||(this._schedule=(0,l._)((()=>{this._schedule=null,this._next()})))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).resolve(t))}_processError(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).reject(t))}_canProcessFulfillment(e){return!!this._deferreds.get(e.item)&&this._processingItems.get(e.item)===e}_process(e){if(null==e)return;let t;const i=new AbortController,s=new c(e,i);this._processingItems.set(e,s);try{t=this.process(e,i.signal)}catch(e){this._processError(s,e)}(0,n.$X)(t)?(s.promise=t,t.then((e=>this._processResult(s,e)),(e=>this._processError(s,e)))):this._processResult(s,t)}}},4916:(e,t,i)=>{i.d(t,{A:()=>B});var s=i(90237),n=i(78888),r=i(49186),o=i(25482),l=i(53966),a=i(74887),c=i(563),u=i(10107),h=i(56507),p=(i(44208),i(87811),i(40608)),d=i(5443),f=i(86738),m=i(16930),y=i(60694),g=i(10873),x=i(45617),_=i(91806),b=i(20223),v=i(87045),w=i(76353),R=i(77301),I=i(70834);const S=new Map,M=new class{constructor(e=15e3,t=5e3){this._timer=null,this._cachedBlocks=new Map,this._size=-1,this._duration=e,this._interval=Math.min(e,t)}decreaseRefCount(e,t){const i=e+"/"+t,s=this._cachedBlocks;if(s.has(i)){const e=s.get(i);return e.refCount--,e.refCount<=0&&(s.delete(i),e.controller&&e.controller.abort()),e.refCount}return 0}getBlock(e,t){const i=e+"/"+t,s=this._cachedBlocks;if(s.has(i)){const e=s.get(i);return e.ts=Date.now(),e.refCount++,s.delete(i),s.set(i,e),e.block}return null}putBlock(e,t,i,s){const n=this._cachedBlocks,r=e+"/"+t;if(n.has(r)){const e=n.get(r);e.ts=Date.now(),e.refCount++}else n.set(r,{block:i,ts:Date.now(),refCount:1,controller:s});this._trim(),this._updateTimer()}deleteBlock(e,t){const i=this._cachedBlocks,s=e+"/"+t;i.has(s)&&i.delete(s)}updateMaxSize(e){this._size=e,this._trim()}empty(){this._cachedBlocks.clear(),this._clearTimer()}getCurrentSize(){return this._cachedBlocks.size}_updateTimer(){if(null!=this._timer)return;const e=this._cachedBlocks;this._timer=setInterval((()=>{const t=Array.from(e),i=Date.now();for(let s=0;s<t.length&&t[s][1].ts<=i-this._duration;s++)e.delete(t[s][0]);0===e.size&&this._clearTimer()}),this._interval)}_trim(){const e=this._cachedBlocks;if(-1===this._size||this._size>=e.size)return;const t=Array.from(e);for(let i=0;i<t.length-this._size;i++)e.delete(t[i][0])}_clearTimer(){null!=this._timer&&(clearInterval(this._timer),this._timer=null)}};function k(e,t,i){const s=S.get(e);if(!s)return null==t?M.decreaseRefCount(e,i):0;if(null==t||null==s[t])return M.decreaseRefCount(e,i);const n=s[t]?.cache,r=n?.get(i);if(n&&r){if(r.refCount--,0===r.refCount){n.delete(i);for(let e=0;e<s.length;e++)s[e]?.cache.delete(i);r.controller&&r.controller.abort()}return r.refCount}return 0}function T(e,t,i){const s=S.get(e);if(!s)return null==t?M.getBlock(e,i):null;if(null==t||null==s[t]){for(let e=0;e<s.length;e++){const t=s[e]?.cache.get(i);if(t)return t.refCount++,t.block}return M.getBlock(e,i)}const n=s[t]?.cache.get(i);if(n)return n.refCount++,n.block;for(let e=0;e<s.length;e++){if(e===t||!s[e])continue;const n=s[e]?.cache,r=n?.get(i);if(n&&r)return r.refCount++,n.set(i,r),r.block}return null}function A(e,t,i,s,n=null){const r=S.get(e);if(!r)return void(null==t&&M.putBlock(e,i,s,n));if(null==t||null==r[t])return void M.putBlock(e,i,s,n);const o={refCount:1,block:s,isResolved:!1,isRejected:!1,controller:n};s.then((()=>o.isResolved=!0)).catch((()=>o.isRejected=!0)),r[t]?.cache.set(i,o)}function z(e,t,i){const s=S.get(e);s?null!=t&&null!=s[t]?s[t]?.cache.delete(i):M.deleteBlock(e,i):null==t&&M.deleteBlock(e,i)}var F=i(16019),P=i(51244),C=i(28435),D=i(14636);let N=0,B=class extends o.A{constructor(){super(...arguments),this._tileFetchQueue=new c.QueueProcessor({concurrency:32,process:(e,t)=>this._fetchRawTile(e.pyramidLevel,e.row,e.col,{...e.options,signal:t})}),this.datasetName=null,this.datasetFormat=null,this.hasUniqueSourceStorageInfo=!0,this.rasterInfo=null,this.ioConfig={sampling:"closest"}}normalizeCtorArgs(e){return e?.ioConfig&&(e={...e,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:v.A.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){const{rasterInfo:e}=this,t=(0,I.FT)(e.spatialReference);return null!=t&&e.extent.width>=t/2}get _hasNoneOrGCSShiftTransform(){const{transform:e}=this.rasterInfo;return null==e||"gcs-shift"===e.type}set rasterJobHandler(e){this._set("rasterJobHandler",e),(0,w.q)(this)&&this.primaryRasters?.rasters?.forEach((t=>t.rasterJobHandler=e))}get rasterId(){return this.url||"rasterId-"+N++}set url(e){this._set("url",(0,y.Jf)(e,l.A.getLogger(this)))}async open(e){return this._openPromise??=(0,I.Hh)().then((()=>this._open(e))),this._openPromise}async fetchTile(e,t,i,s={}){const n=s.tileInfo||this.rasterInfo.storageInfo.tileInfo,r=this.getTileExtentFromTileInfo(e,t,i,n);return s={noClip:!0,...s},this.fetchPixels(r,n.size[0],n.size[1],s)}async identify(e,t={}){e=(0,h.PZ)(f.A,e).clone().normalize();const{multidimensionalDefinition:i,timeExtent:s}=t,{rasterInfo:n}=this,{hasMultidimensionalTranspose:r,multidimensionalInfo:o}=n;let{transposedVariableName:l}=t;const a=null!=o&&r&&(null!=s||(0,R.DY)(i));a&&!l&&(l=null!=i&&i.length>0?i[0].variableName??void 0:o.variables[0].name,t={...t,transposedVariableName:l}),t=this._getRequestOptionsWithSliceId(t);const{spatialReference:c,extent:u}=n,{datumTransformation:p}=t;let m=(0,I._I)(e,c,p);if(!u.intersects(m))return{location:m,value:null};if(null!=n.transform){const e=n.transform.inverseTransform(m);if(!n.nativeExtent.intersects(e))return{location:e,value:null};m=e}let y=0;const g=null!=l&&null!=o&&n.hasMultidimensionalTranspose;if((0,w.q)(this)){const e=this.primaryRasters.rasters[0];if(g)return e.identify(m,t);const{pixelSize:s}=n,r=3,o=s.x*r/2,l=s.y*r/2,a=new d.A({xmin:m.x-o,xmax:m.x+o,ymin:m.y-l,ymax:m.y+l,spatialReference:c}),u={interpolation:"nearest",multidimensionalDefinition:i,sliceId:t.sliceId},{pixelBlock:h}=await e.fetchPixels(a,r,r,u),{pixelBlock:p}=await this.fetchPixels(a,r,r,u);if(null==h)return{location:m,value:null};const f=Math.floor(r*r*.5),y=!h.mask||h.mask[f]?h.pixels.map((e=>e[f])):null;let x;return null!=p&&(x=!p.mask||p.mask[f]?p.pixels.map((e=>e[f])):void 0),{location:m,value:y,processedValue:x,pyramidLevel:0}}if(!g)if(t.srcResolution)y=(0,I.t$)(t.srcResolution,n,this.ioConfig.sampling).pyramidLevel;else if(y=await this.computeBestPyramidLevelForLocation(e,t),null==y)return{location:m,value:null};const x=this.identifyPixelLocation(m,y,null,g);if(null===x)return{location:m,value:null};const{row:_,col:b,rowOffset:v,colOffset:S,blockWidth:M}=x,k=await this._tileFetchQueue.push({pyramidLevel:y,row:_,col:b,options:t},{signal:t.signal});if(!k?.pixels?.length)return{location:m,value:null};const T=v*M+S;return this._processIdentifyResult(k,{srcLocation:m,position:T,pyramidLevel:y,useTransposedTile:!!g,requestSomeSlices:a,identifyOptions:t})}async fetchPixels(e,t,i,s={}){e=(0,I.Ps)(e),s=this._getRequestOptionsWithSliceId(s);const{_hasNoneOrGCSShiftTransform:n}=this;if(s.requestRawData&&n)return this._fetchPixels(e,t,i,s);const r=(0,I.FT)(e.spatialReference),o=(0,I.OM)(e);if(null==r||0===o||1===o&&this._isGlobalWrappableSource&&n)return this._fetchPixels(e,t,i,s);if(o>=3)return{extent:e,pixelBlock:null};const l=[],{xmin:a,xmax:c}=e,u=Math.round(r/(c-a)*t),h=u-Math.round((r/2-a)/(c-a)*t);let p=0;const f=[];for(let n=0;n<=o;n++){const m=new d.A({xmin:0===n?a:-r/2,xmax:n===o?c-r*n:r/2,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),y=0===n?u-h:n===o?t-p:u;p+=y,f.push(y);const g=s.disableWrapAround&&n>0?null:this._fetchPixels(m,y,i,s);l.push(g)}const m=(await Promise.all(l)).map((e=>e?.pixelBlock));let y=null;const g={width:t,height:i};return y=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:m,srcMosaicSize:g,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:f},s)).pixelBlock:(0,C.z7)(m,g,{blockWidths:f}),{extent:e,srcExtent:(0,I._l)(e,this.rasterInfo.spatialReference,s.datumTransformation),pixelBlock:y}}async fetchRawPixels(e,t,i,s={}){t={x:Math.floor(t.x),y:Math.floor(t.y)};const n=await this._fetchRawTiles(e,t,i,s),{nativeExtent:r,nativePixelSize:o,storageInfo:l}=this.rasterInfo,a=2**e,c=o.x*a,u=o.y*a,h=new d.A({xmin:r.xmin+c*t.x,xmax:r.xmin+c*(t.x+i.width-1),ymin:r.ymax-u*(t.y+i.height-1),ymax:r.ymax-u*t.y,spatialReference:r.spatialReference});if(!n)return{extent:h,srcExtent:h,pixelBlock:null};const{pixelBlocks:p,mosaicSize:f}=n;if(1===p.length&&null!=p[0]&&p[0].width===i.width&&p[0].height===i.height)return{extent:h,srcExtent:h,pixelBlock:n.pixelBlocks[0]};const m=e>0?l.pyramidBlockWidth:l.blockWidth,y=e>0?l.pyramidBlockHeight:l.blockHeight,g={x:t.x%m,y:t.y%y};let x;return x=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:p,srcMosaicSize:f,destDimension:i,clipOffset:g,clipSize:i,coefs:null,sampleSpacing:null,interpolation:s.interpolation,alignmentInfo:null,blockWidths:null},s)).pixelBlock:(0,C.z7)(p,f,{clipOffset:g,clipSize:i}),{extent:h,srcExtent:h,pixelBlock:x}}fetchRawTile(e,t,i,s){throw new r.A("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return(0,I._l)(this.rasterInfo.extent,e)}decodePixelBlock(e,t){return!this.rasterJobHandler||t.useCanvas?(0,P.D)(e,t):this.rasterJobHandler.decode({data:e,options:t})}async request(e,t,i=0){const{customFetchParameters:s}=this.ioConfig,{range:r,query:o,headers:l}=t;i=i??t.retryCount??this.ioConfig.retryCount;const a=r?{Range:`bytes=${r.from}-${r.to}`}:null;try{return await(0,n.A)(e,{...t,query:{...o,...s},headers:{...l,...a}})}catch(s){if(i>0)return i--,this.request(e,t,i);throw s}}getSliceIndex(e){const{multidimensionalInfo:t}=this.rasterInfo;return null==t||null==e||0===e.length?null:(0,R.NG)(e,t)}getTileExtentFromTileInfo(e,t,i,s){const n=s.lodAt(e);return this.getTileExtent({x:n.resolution,y:n.resolution},t,i,s.origin,s.spatialReference,s.size)}updateTileInfo(){const{storageInfo:e,spatialReference:t,extent:i,pixelSize:s}=this.rasterInfo,{pyramidResolutions:n}=e;if(!e.tileInfo){const r=[],o=e.maximumPyramidLevel||0;let l=(s.x+s.y)/2,a=1/.0254*96*l;for(let e=0;e<=o&&(r.unshift(new _.A({level:o-e,resolution:l,scale:a})),e!==o);e++)if(n){const t=(n[e].x+n[e].y)/2;a*=t/l,l=t}else l*=2,a*=2;const c=new f.A({x:i.xmin,y:i.ymax,spatialReference:t});e.tileInfo=new v.A({origin:c,size:[e.blockWidth,e.blockHeight],spatialReference:t,lods:r}),e.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(e,t=512,i=512,s){const{width:n,height:r,nativeExtent:o,pixelSize:l,spatialReference:a}=e,c=new f.A({x:o.xmin,y:o.ymax,spatialReference:a});null==s&&(s=Math.max(0,Math.round(Math.log(Math.max(n,r))/Math.LN2-8)));const u=this.computeBlockBoundary(o,512,512,{x:o.xmin,y:o.ymax},[l],s);e.storageInfo=new b.A({blockWidth:t,blockHeight:i,pyramidBlockWidth:t,pyramidBlockHeight:i,origin:c,firstPyramidLevel:1,maximumPyramidLevel:s,blockBoundary:u})}async computeBestPyramidLevelForLocation(e,t={}){return 0}computeBlockBoundary(e,t,i,s,n,r=0,o=2){if(1===n.length&&r>0){n=[...n];let{x:e,y:t}=n[0];for(let i=0;i<r;i++)e*=o,t*=o,n.push({x:e,y:t})}const l=[],{x:a,y:c}=s;for(let s=0;s<n.length;s++){const{x:r,y:o}=n[s];l.push({minCol:Math.floor((e.xmin-a+.1*r)/t/r),maxCol:Math.floor((e.xmax-a-.1*r)/t/r),minRow:Math.floor((c-e.ymax+.1*o)/i/o),maxRow:Math.floor((c-e.ymin-.1*o)/i/o)})}return l}getPyramidPixelSize(e){const{nativePixelSize:t}=this.rasterInfo,{pyramidResolutions:i,pyramidScalingFactor:s}=this.rasterInfo.storageInfo;if(0===e)return t;if(null!=i&&i.length)return i[e-1];const n=s**e;return{x:t.x*n,y:t.y*n}}identifyPixelLocation(e,t,i,s){const{spatialReference:n,nativeExtent:r,storageInfo:o}=this.rasterInfo,{maximumPyramidLevel:l,origin:a,transposeInfo:c}=o,u=s&&null!=c?c.tileSize[0]:o.blockWidth,h=s&&null!=c?c.tileSize[1]:o.blockHeight,p=(0,I._I)(e,n,i);if(!r.intersects(p))return null;if(t<0||t>l)return null;const d=this.getPyramidPixelSize(t),{x:f,y:m}=d,y=(a.y-p.y)/m/h,g=(p.x-a.x)/f/u,x=Math.min(h-1,Math.floor((y-Math.floor(y))*h)),_=Math.min(u-1,Math.floor((g-Math.floor(g))*u));return{pyramidLevel:t,row:Math.floor(y),col:Math.floor(g),rowOffset:x,colOffset:_,blockWidth:u,srcLocation:p}}getTileExtent(e,t,i,s,n,r){const[o,l]=r,a=s.x+i*o*e.x,c=a+o*e.x,u=s.y-t*l*e.y,h=u-l*e.y;return new d.A({xmin:a,xmax:c,ymin:h,ymax:u,spatialReference:n})}getBlockWidthHeight(e){return{blockWidth:e>0?this.rasterInfo.storageInfo.pyramidBlockWidth:this.rasterInfo.storageInfo.blockWidth,blockHeight:e>0?this.rasterInfo.storageInfo.pyramidBlockHeight:this.rasterInfo.storageInfo.blockHeight}}isBlockOutside(e,t,i){const s=this.rasterInfo.storageInfo.blockBoundary[e];return!s||s.maxRow<t||s.maxCol<i||s.minRow>t||s.minCol>i}updateImageSpaceRasterInfo(e){const{pixelSize:t}=e,{width:i,height:s}=e,n=m.A.WebMercator;e.spatialReference=n,e.extent=e.nativeExtent=new d.A({xmin:-.5,ymax:.5,xmax:i-.5,ymin:.5-s,spatialReference:n}),e.isPseudoSpatialReference=!0,e.transform=null,e.pixelSize=new f.A({x:1,y:1,spatialReference:n});const{extent:r,storageInfo:o}=e;if(o){o.origin=new f.A({x:r.xmin,y:r.ymax,spatialReference:n});const{pyramidResolutions:i,tileInfo:s}=o;if(i&&i.forEach((e=>{e.x/=t.x,e.y/=t.y})),s){s.origin=o.origin;const t=(e.nativePixelSize.x+e.nativePixelSize.y)/2;s.lods.forEach(((e,i)=>{e.resolution=t*2**i,e.scale=96*e.resolution/.0254}))}}}async _fetchPixels(e,t,i,s={}){let n=(0,I.OM)(e);if(n>=2)return{extent:e,pixelBlock:null};const r=this._getSourceDataInfo(e,t,i,s),{pyramidLevel:o,srcResolution:l,srcExtent:a,srcWidth:c,srcHeight:u,ul:h}=r;if(0===c||0===u)return{extent:e,srcExtent:a,pixelBlock:null};const{rasterInfo:p}=this,d=p.transform,m="gcs-shift"===d?.type,y=null!=(0,I.FT)(e.spatialReference);!m&&y||(n=(0,I.OM)(r.srcExtent,m));const g=await this._fetchRawTiles(o,h,{width:c,height:u,wrapCount:n},s);if(!g)return{extent:e,srcExtent:a,pixelBlock:null};const x=p.storageInfo,_=o>0?x.pyramidBlockWidth:x.blockWidth,b=o>0?x.pyramidBlockHeight:x.blockHeight;let{x:v,y:w}=p.pixelSize;if(o>0){const{pyramidResolutions:e,pyramidScalingFactor:t}=x;if(null!=e&&e[o-1])({x:v,y:w}=e[o-1]);else{const e=t**o;v*=e,w*=e}}const R=p.spatialReference,S=new f.A({x:v,y:w,spatialReference:R}),M=_===c&&b===u&&h.x%_===0&&h.y%b===0,k=new f.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),T=!e.spatialReference.equals(R),A=R.isGeographic?1e-9:1e-4,{datumTransformation:z}=s;if(!T&&M&&1===g.pixelBlocks.length&&_===t&&b===i&&function(e,t,i){return Math.abs(e.x-t.x)<i&&Math.abs(e.y-t.y)<i}(l,k,A))return{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:g.pixelBlocks[0]};const F=y&&null!=(0,I.FT)(a.spatialReference)&&this._hasNoneOrGCSShiftTransform,P=s.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");P&&!this.rasterJobHandler&&await(0,I.Hh)();const N=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:g.extent,pixelSize:k.toJSON(),datumTransformation:z,rasterTransform:d,hasWrapAround:n>0||F,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:P},s):(0,I.l0)({projectedExtent:e,srcBufferExtent:g.extent,pixelSize:k,datumTransformation:z,rasterTransform:d,hasWrapAround:n>0||F,isAdaptive:!1,includeGCSGrid:P});let B;const O=!s.requestRawData,E={rows:N.spacing[0],cols:N.spacing[1]},J=this._hasNoneOrGCSShiftTransform?this._getRasterTileAlignmentInfo(o,g.extent.xmin):void 0,{pixelBlocks:H,mosaicSize:L,isPartiallyFilled:Z}=g;let W=null;if(this.rasterJobHandler){const e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:H,srcMosaicSize:L,destDimension:O?{width:t,height:i}:null,coefs:O?N.coefficients:null,sampleSpacing:O?E:null,projectDirections:P,gcsGrid:P?N.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:s.interpolation,alignmentInfo:J,blockWidths:null},s);({pixelBlock:B,localNorthDirections:W}=e)}else{const e=(0,C.z7)(H,L,{alignmentInfo:J});B=O?(0,C.$i)(e,{width:t,height:i},N.coefficients,E,s.interpolation):e,P&&N.gcsGrid&&(W=(0,C.QF)({width:t,height:i},N.gcsGrid),B=(0,D.Y2)(B,this.rasterInfo.dataType,W))}return s.requestRawData||P?{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:B,transformGrid:N,localNorthDirections:W,isPartiallyFilled:Z}:{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:B}}async _fetchRawTiles(e,t,i,s){const{origin:n,blockBoundary:r}=this.rasterInfo.storageInfo,{blockWidth:o,blockHeight:l}=this.getBlockWidthHeight(e);let{x:a,y:c}=t,{width:u,height:h,wrapCount:p}=i;const f=this._getRasterTileAlignmentInfo(e,0);s.buffer&&(a-=s.buffer.cols,c-=s.buffer.rows,u+=2*s.buffer.cols,h+=2*s.buffer.rows);let m=0,y=0,g=0;p&&null!=f&&(({worldColumnCountFromOrigin:y,originColumnOffset:g,rightPadding:m}=f),y*f.blockWidth-m>=a+u&&(m=0));const x=Math.floor(a/o),_=Math.floor(c/l),b=Math.floor((a+u+m-1)/o),v=Math.floor((c+h+m-1)/l),w=r[e];if(!w)return null;const{minRow:R,minCol:I,maxCol:S,maxRow:M}=w;if(0===p&&(v<R||b<I||_>M||x>S))return null;const k=new Array;let T=!1;const A=null==this.ioConfig.allowPartialFill?s.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=_;t<=v;t++)for(let i=x;i<=b;i++){let n=i;if(!s.disableWrapAround&&p&&null!=f&&y<=i&&(n=i-y-g),t>=R&&n>=I&&M>=t&&S>=n){const i=this._tileFetchQueue.push({pyramidLevel:e,row:t,col:n,options:s},{signal:s.signal});A?k.push(new Promise((e=>{i.then((t=>e(t))).catch((()=>{T=!0,e(null)}))}))):k.push(i)}else k.push(Promise.resolve(null))}if(0===k.length)return null;const z=await Promise.all(k),F={height:(v-_+1)*l,width:(b-x+1)*o},{spatialReference:P}=this.rasterInfo,C=this.getPyramidPixelSize(e),{x:D,y:N}=C;return{extent:new d.A({xmin:n.x+x*o*D,xmax:n.x+(b+1)*o*D,ymin:n.y-(v+1)*l*N,ymax:n.y-_*l*N,spatialReference:P}),pixelBlocks:z,mosaicSize:F,isPartiallyFilled:T}}_fetchRawTile(e,t,i,s){const{storageInfo:n}=this.rasterInfo,r=null!=n.transposeInfo&&!!s.transposedVariableName;if(!r){const s=n.blockBoundary[e];if(!s)return Promise.resolve(null);const{minRow:r,minCol:o,maxCol:l,maxRow:a}=s;if(t<r||i<o||t>a||i>l)return Promise.resolve(null)}const o=r?s.transposeVariableName:s.sliceId,l=this.rasterInfo.storageInfo.isBsqTile?s.bandIds:null,c=function(e,t,i){const s=[];return null!=t&&s.push(`sliceId=${t}`),null!=i&&s.push(`bandIds=${i.join(",")}`),s.length?`${e}?${s.join("&")}`:e}(this.rasterId,o,l),u=`${e}/${t}/${i}`;let h=T(c,s.registryId,u);if(null==h){const n=new AbortController;h=this.fetchRawTile(e,t,i,{...s,signal:n.signal}),A(c,s.registryId,u,h,n),h.catch((()=>z(c,s.registryId,u)))}return s.signal&&(0,a.u7)(s,(()=>{k(c,s.registryId,u)})),h}_computeMagDirValues(e){const{bandCount:t,dataType:i}=this.rasterInfo;if((2!==t||"vector-magdir"!==i)&&"vector-uv"!==i||2!==e?.length||!e[0]?.length)return null;const s=e[0].length;if("vector-magdir"===i){const t=e[1].map((e=>(e+360)%360));return[e[0],t]}const[n,r]=e,o=[],l=[];for(let e=0;e<s;e++){const[t,i]=(0,D.Lu)([n[e],r[e]]);o.push(t),l.push(i)}return[o,l]}_getRasterTileAlignmentInfo(e,t){return null==this._rasterTileAlignmentInfo&&(this._rasterTileAlignmentInfo=(0,I.DO)(this.rasterInfo)),null==this._rasterTileAlignmentInfo.pyramidsInfo?null:{startX:t,halfWorldWidth:this._rasterTileAlignmentInfo.halfWorldWidth,hasGCSSShiftTransform:this._rasterTileAlignmentInfo.hasGCSSShiftTransform,...this._rasterTileAlignmentInfo.pyramidsInfo[e]}}_getSourceDataInfo(e,t,i,s={}){const n={datumTransformation:s.datumTransformation,pyramidLevel:0,pyramidResolution:null,srcExtent:null,srcHeight:0,srcResolution:null,srcWidth:0,ul:{x:0,y:0}};s.srcResolution&&(n.srcResolution=s.srcResolution,this._updateSourceDataInfo(e,n));const r=this.rasterInfo.storageInfo.maximumPyramidLevel||0,{srcWidth:o,srcHeight:l,pyramidLevel:a}=n,c=o/t,u=l/i,h=a<r&&c*u>=16,p=a===r&&this._requireTooManySrcTiles(o,l,t,i);if(h||p||0===o||0===l){const o=new f.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference});let l=(0,I.Wo)(o,this.rasterInfo.spatialReference,e,n.datumTransformation);const p=!l||s.srcResolution&&l.x+l.y<s.srcResolution.x+s.srcResolution.y;if(h&&s.srcResolution&&p){const e=Math.round(Math.log(Math.max(c,u))/Math.LN2)-1;if(r-a+3>=e){const t=2**e;l={x:s.srcResolution.x*t,y:s.srcResolution.y*t}}}l&&(n.srcResolution=l,this._updateSourceDataInfo(e,n))}return this._requireTooManySrcTiles(n.srcWidth,n.srcHeight,t,i)&&(n.srcWidth=0,n.srcHeight=0),n}_requireTooManySrcTiles(e,t,i,s){const{tileInfo:n}=this.rasterInfo.storageInfo,r=e/i,o=t/s;return Math.ceil(e/n.size[0])*Math.ceil(t/n.size[1])>=256*Math.max(1,(i+s)/1024)||r>8||o>8}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;const{rasterInfo:i}=this,s=i.spatialReference,{srcResolution:n,datumTransformation:r}=t,{pyramidLevel:o,pyramidResolution:l,excessiveReading:a}=(0,I.t$)(n,i,this.ioConfig.sampling);if(a)return;let c=t.srcExtent||(0,I._l)(e,s,r);if(null==c)return;const u=i.transform;u&&(c=u.inverseTransform(c)),t.srcExtent=c;const{x:h,y:p}=i.storageInfo.origin,d=Math.floor((c.xmin-h)/l.x+.1),f=Math.floor((p-c.ymax)/l.y+.1),m=Math.floor((c.xmax-h)/l.x-.1),y=Math.floor((p-c.ymin)/l.y-.1),g=c.width<.1*l.x?0:m-d+1,x=c.height<.1*l.y?0:y-f+1;t.pyramidLevel=o,t.pyramidResolution=l,t.srcWidth=g,t.srcHeight=x,t.ul={x:d,y:f}}_getRequestOptionsWithSliceId(e){return null!=this.rasterInfo.multidimensionalInfo&&null==e.sliceId&&(e={...e,sliceId:this.getSliceIndex(e.multidimensionalDefinition)}),e}_processIdentifyResult(e,t){const{srcLocation:i,position:s,pyramidLevel:n,useTransposedTile:r}=t,o=e.pixels[0].length/e.width/e.height;if(e.mask&&!e.mask[s])return{location:i,value:null};const{multidimensionalInfo:l}=this.rasterInfo;if(null==l||!r){const t=e.pixels.map((e=>e[s])),r={location:i,value:t,pyramidLevel:n},o=this._computeMagDirValues(t.map((e=>[e])));return o?.length&&(r.magdirValue=o.map((e=>e[0]))),r}let a=e.pixels.map((e=>e.slice(s*o,s*o+o))),c=this._computeMagDirValues(a);const{requestSomeSlices:u,identifyOptions:h}=t;let p=(0,R.QW)(l,h.transposedVariableName);if(u){const e=(0,R.xx)(p,h.multidimensionalDefinition,h.timeExtent);a=a.map((t=>e.map((e=>t[e])))),c=c?.map((t=>e.map((e=>t[e])))),p=e.map((e=>p[e]))}const d=e.noDataValues||this.rasterInfo.noDataValue,f={pixels:a,pixelType:e.pixelType};let m;return null!=d&&((0,F.Sp)(f,d),m=f.mask),{location:i,value:null,dataSeries:p.map(((e,t)=>{const i={value:0===m?.[t]?null:a.map((e=>e[t])),multidimensionalDefinition:e.multidimensionalDefinition.map((e=>new x.A({...e,isSlice:!0})))};return c?.length&&(i.magdirValue=[c[0][t],c[1][t]]),i})),pyramidLevel:n}}};(0,s._)([(0,u.MZ)()],B.prototype,"_rasterTileAlignmentInfo",void 0),(0,s._)([(0,u.MZ)()],B.prototype,"_tileFetchQueue",void 0),(0,s._)([(0,u.MZ)({readOnly:!0})],B.prototype,"_isGlobalWrappableSource",null),(0,s._)([(0,u.MZ)({readOnly:!0})],B.prototype,"_hasNoneOrGCSShiftTransform",null),(0,s._)([(0,u.MZ)()],B.prototype,"_openPromise",void 0),(0,s._)([(0,u.MZ)()],B.prototype,"rasterJobHandler",null),(0,s._)([(0,u.MZ)({readOnly:!0})],B.prototype,"rasterId",null),(0,s._)([(0,u.MZ)(g.OZ)],B.prototype,"url",null),(0,s._)([(0,u.MZ)({type:String,json:{write:!0}})],B.prototype,"datasetName",void 0),(0,s._)([(0,u.MZ)({type:String,json:{write:!0}})],B.prototype,"datasetFormat",void 0),(0,s._)([(0,u.MZ)()],B.prototype,"hasUniqueSourceStorageInfo",void 0),(0,s._)([(0,u.MZ)()],B.prototype,"rasterInfo",void 0),(0,s._)([(0,u.MZ)()],B.prototype,"ioConfig",void 0),(0,s._)([(0,u.MZ)()],B.prototype,"sourceJSON",void 0),B=(0,s._)([(0,p.$)("esri.layers.support.rasterDatasets.BaseRaster")],B)},32587:(e,t,i)=>{i.d(t,{A:()=>r});var s=i(62788),n=i(95488);class r{constructor(e){this._observable=new n.I,this._map=new Map(e)}get size(){return(0,s.gc)(this._observable),this._map.size}clear(){this._map.size>0&&(this._map.clear(),this._observable.notify())}delete(e){const t=this._map.delete(e);return t&&this._observable.notify(),t}entries(){return(0,s.gc)(this._observable),this._map.entries()}forEach(e,t){(0,s.gc)(this._observable),this._map.forEach(((i,s)=>e.call(t,i,s,this)),t)}get(e){return(0,s.gc)(this._observable),this._map.get(e)}has(e){return(0,s.gc)(this._observable),this._map.has(e)}keys(){return(0,s.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._observable.notify(),this}values(){return(0,s.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,s.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}}},44794:(e,t,i)=>{i.d(t,{v:()=>l});var s=i(4718),n=i(62788),r=i(95488);class o{constructor(e,t){this._observable=new r.I,this._value=e,this._equalityFunction=t}get value(){return(0,n.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function l(e,t=s.gh){return new o(e,t)}},50103:(e,t,i)=>{function s(e,t){if(!e||!t)return[];let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const n=[];if(t){const r=s(e,i);for(let e=0;e<r.length;e++)s(r[e],t).forEach((e=>n.push(e)));return n}const r=e.getElementsByTagNameNS("*",i);if(!r||0===r.length)return[];for(let e=0;e<r.length;e++)n.push(r[e]||r.item(e));return n}function n(e,t){if(!e||!t)return null;let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const r=s(e,i);return r.length>0?t?n(r[0],t):r[0]:null}function r(e,t=null){const i=t?n(e,t):e;let s;return i?(s=i.textContent||i.nodeValue,s?s.trim():null):null}function o(e,t){const i=s(e,t),n=[];let r;for(let e=0;e<i.length;e++)r=i[e].textContent||i[e].nodeValue,r&&(r=r.trim(),""!==r&&n.push(r));return n}function l(e,t=null){const i=r(e,t);return i?.split(" ").map((e=>Number(e)))??[]}function a(e,t){return o(e,t).map((e=>Number(e)))}function c(e,t){const i=r(e,t);return Number(i)}function u(e,t){const i=e?.nodeName?.toLowerCase(),s=t.toLowerCase();return i.slice(i.lastIndexOf(":")+1)===s}function h(e){return e.nodeName.slice(e.nodeName.lastIndexOf(":")+1)}i.d(t,{Dy:()=>o,IC:()=>s,Ui:()=>a,V6:()=>n,g7:()=>u,mX:()=>r,pN:()=>l,v7:()=>c,vv:()=>h})},72802:(e,t,i)=>{i.d(t,{U:()=>s});class s{constructor(e,t,i,s,n=void 0){this.id=e,this.level=t,this.row=i,this.col=s,this.extent=n}}},84169:(e,t,i)=>{i.d(t,{A:()=>d});var s=i(90237),n=i(49186),r=i(10107),o=(i(44208),i(53966),i(87811),i(40608)),l=i(39829),a=i(4916),c=i(77359),u=i(28435),h=i(70834),p=i(22671);let d=class extends a.A{constructor(){super(...arguments),this.datasetFormat="Function",this.tileType="Raster",this.rasterFunction=null,this._clippingGeometry=new Map}async fetchPixels(e,t,i,s={}){const{rasters:n,rasterIds:r}=this.primaryRasters;let o=!1;const{interpolation:l}=s,a=this.rasterFunction.flatWebGLFunctionChain?.hasFocalFunction;!s.requestRawData&&a&&(o=1===n.length&&!s.skipRasterFunction,s={...s,interpolation:"bilinear",requestRawData:o});const h=n.map((n=>n.fetchPixels(e,t,i,s))),p=await Promise.all(h),d=p.map((e=>e.pixelBlock)),f=o||s.requestRawData?p.map((e=>e.srcTilePixelSize)):null;if(s.skipRasterFunction||d.every((e=>null==e)))return p[0];const m=p.find((e=>null!=e.pixelBlock))?.extent??e;let y=this.rasterJobHandler?await this.rasterJobHandler.process({extent:m,primaryPixelBlocks:d,primaryPixelSizes:f,primaryRasterIds:r}):this.rasterFunction.process({extent:m,primaryPixelBlocks:d,primaryPixelSizes:f,primaryRasterIds:r});const{transformGrid:g}=p[0];if(!o||null==y||null==g){const e=s.noClip?null:this.getClippingGeometry(m.spatialReference);return s.noClip||s.requestRawData||null==y||!e||(y=await(0,c.$Q)(y,m,e)),{...p[0],pixelBlock:y}}const x={rows:g.spacing[0],cols:g.spacing[1]};let _;_=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:[y],srcMosaicSize:{width:y.width,height:y.height},destDimension:{width:t,height:i},coefs:g.coefficients,sampleSpacing:x,projectDirections:!1,gcsGrid:null,isUV:!1,interpolation:l,alignmentInfo:void 0,blockWidths:null},s)).pixelBlock:(0,u.$i)(y,{width:t,height:i},g.coefficients,x,l);const b=s.noClip?null:this.getClippingGeometry(e.spatialReference);return s.noClip||s.requestRawData||null==_||null==b||(_=await(0,c.$Q)(_,e,b)),{extent:e,srcExtent:p[0].srcExtent,pixelBlock:_}}getClippingGeometry(e){const t=this._clippingGeometry.get("0");if(!e||!t)return t;const i=function(e){return String(e.wkid??e.wkt??e.wkt2)}(e);let s=this._clippingGeometry.get(i);return null!=s||(s=e.equals(t.spatialReference)?t:(0,h.uk)(t,e),this._clippingGeometry.set(i,s)),s}async _open(e){const{rasterFunction:t}=this;t.isRoot=!0,this.primaryRasters?.rasters?.length?t.sourceRasters=this.primaryRasters.rasters:(this.primaryRasters=t.getPrimaryRasters(),this.rasterJobHandler&&this.primaryRasters.rasters?.forEach((e=>e.rasterJobHandler=this.rasterJobHandler)));const{rasters:i,rasterIds:s}=this.primaryRasters,r=i.map((t=>t.rasterInfo?void 0:t.open(e)));await Promise.all(r);const o=i.map((({rasterInfo:e})=>e)),l=t.bind({rasterInfos:o,rasterIds:s});if(t.rawSourceRasterInfos=o,!l.success||0===o.length)throw new n.A("raster-function:open",`cannot bind the function: ${l.error??""}`);const a="Table"===t.functionName?t:t.functionArguments?.raster;"Table"===a?.functionName&&(t.rasterInfo.attributeTable=p.A.fromJSON(a.functionArguments.attributeTableAsRecordSet)),await this.syncJobHandler();const c=o[0];this.hasUniqueSourceStorageInfo=1===o.length||o.slice(1).every((e=>function(e,t){const{storageInfo:i,pixelSize:s,spatialReference:n,extent:r}=e,{storageInfo:o,pixelSize:l,spatialReference:a,extent:c}=t;return s.x===l.x&&s.y===l.y&&n.equals(a)&&r.equals(c)&&i.blockHeight===o.blockHeight&&i.blockWidth===o.blockWidth&&i.maximumPyramidLevel===o.maximumPyramidLevel}(e,c))),this.set("sourceJSON",i[0].sourceJSON),this.set("rasterInfo",t.rasterInfo),await this._updateClipGeometry()}async syncJobHandler(){return this.rasterJobHandler?.updateRasterFunction(this.rasterFunction)}async _updateClipGeometry(){const e=this.rasterFunction.getClippingGeometries()[0];let t=e?.clippingGeometry;if(t&&"inside"===e.clippingType){const{extent:e}=this.rasterInfo,s=await Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(8411)]).then(i.bind(i,88411)),n=await Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(3054)]).then(i.bind(i,93054));let r=s.execute(l.A.fromExtent(e),2*(e.width+e.height)/40);r=(0,h.uk)(r,t.spatialReference),t=n.execute(r,t)}this._clippingGeometry.clear(),t&&this._clippingGeometry.set("0",t)}};(0,s._)([(0,r.MZ)({type:String,json:{write:!0}})],d.prototype,"datasetFormat",void 0),(0,s._)([(0,r.MZ)()],d.prototype,"tileType",void 0),(0,s._)([(0,r.MZ)()],d.prototype,"rasterFunction",void 0),(0,s._)([(0,r.MZ)()],d.prototype,"primaryRasters",void 0),d=(0,s._)([(0,o.$)("esri.layers.support.rasterDatasets.FunctionRaster")],d)},87045:(e,t,i)=>{i.d(t,{A:()=>v});var s,n=i(90237),r=i(66552),o=i(25482),l=i(83047),a=i(10107),c=i(56507),u=(i(44208),i(87811),i(36005)),h=i(40608),p=i(43937),d=i(86738),f=i(16930),m=i(19419),y=i(21325),g=i(28735),x=i(91806),_=i(72802);const b=new r.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let v=class extends o.A{static{s=this}static create(e={}){const{resolutionFactor:t=1,scales:i,size:n=256,spatialReference:r=f.A.WebMercator,numLODs:o=24}=e;if(!(0,y.fn)(r)){const e=[];if(i)for(let t=0;t<i.length;t++){const s=i[t];e.push(new x.A({level:t,scale:s,resolution:s}))}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift(new x.A({level:i,scale:t,resolution:t})),t*=2}return new s({dpi:96,lods:e,origin:new d.A(0,0,r),size:[n,n],spatialReference:r})}const a=(0,y.Vp)(r),c=e.origin?new d.A({x:e.origin.x,y:e.origin.y,spatialReference:r}):new d.A(a?{x:a.origin[0],y:a.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),u=1/(39.37*(0,l.GA)(r)*96),h=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],s=t*u;h.push(new x.A({level:e,scale:t,resolution:s}))}else{let e=(0,y.EA)(r)?512/n*591657527.5917094:256/n*591657527.591555;const i=Math.ceil(o/t);h.push(new x.A({level:0,scale:e,resolution:e*u}));for(let s=1;s<i;s++){const i=e/2**t,n=i*u;h.push(new x.A({level:s,scale:i,resolution:n})),e=i}}return new s({dpi:96,lods:h,origin:c,size:[n,n],spatialReference:r})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,y.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return d.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const s=[],n=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach((e=>{s.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,n[e.level]=e}))),this._set("scales",s),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),s=i+1;return t[i]/(t[i]/t[s])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let s=0;for(;s<i;s++){const i=t[s],n=t[s+1];if(i<=e)return s;if(n===e)return s+1;if(i>e&&n<e)return s+Math.log(i/e)/Math.log(i/n)}return s}tileAt(e,t,i,s){const n=this.lodAt(e);if(!n)return null;let r,o;if("number"==typeof t)r=t,o=i;else if((0,y.aI)(t.spatialReference,this.spatialReference))r=t.x,o=t.y,s=i;else{const e=(0,g.Cv)(t,this.spatialReference);if(null==e)return null;r=e.x,o=e.y,s=i}const l=n.resolution*this.size[0],a=n.resolution*this.size[1];return s||(s=new _.U(null,0,0,0,(0,m.vt)())),s.level=e,s.row=Math.floor((this.origin.y-o)/a+.001),s.col=Math.floor((r-this.origin.x)/l+.001),this.updateTileInfo(s),s}updateTileInfo(e,t=s.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===s.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const n=e.level-i.level,r=i.resolution*this.size[0]/2**n,o=i.resolution*this.size[1]/2**n;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,m.vt)()),e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:s}=i,n=s*this.size[0],r=s*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+n,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return s.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const i=[],n=this.lods.length-t;for(let e=0;e<n;e++){const s=e+t,{scale:n,resolution:r}=s>=0?this.lods[s]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new x.A({level:e,scale:n,resolution:r}))}return new s({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const s=e[i];this._upsampleLevels[s.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/s.resolution:0},t=s}}};var w,R;(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"compressionQuality",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"dpi",void 0),(0,n._)([(0,a.MZ)({type:String,json:{read:b.read,write:b.write,origins:{"web-scene":{read:!1,write:!1}}}})],v.prototype,"format",void 0),(0,n._)([(0,a.MZ)({readOnly:!0})],v.prototype,"isWrappable",null),(0,n._)([(0,a.MZ)({type:d.A,json:{write:!0}})],v.prototype,"origin",void 0),(0,n._)([(0,u.w)("origin")],v.prototype,"readOrigin",null),(0,n._)([(0,a.MZ)({type:[x.A],value:null,json:{write:!0}})],v.prototype,"lods",null),(0,n._)([(0,a.MZ)({readOnly:!0})],v.prototype,"scales",void 0),(0,n._)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],v.prototype,"size",void 0),(0,n._)([(0,u.w)("size",["rows","cols"])],v.prototype,"readSize",null),(0,n._)([(0,p.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],v.prototype,"writeSize",null),(0,n._)([(0,a.MZ)({type:f.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),v=s=(0,n._)([(0,h.$)("esri.layers.support.TileInfo")],v),w=v||(v={}),(R=w.ExtrapolateOptions||(w.ExtrapolateOptions={}))[R.NONE=0]="NONE",R[R.POWER_OF_TWO=1]="POWER_OF_TWO"},89015:(e,t,i)=>{i.d(t,{o:()=>B});var s=i(90237),n=i(78888),r=i(49186),o=i(53966),l=i(10107),a=i(56507),c=(i(44208),i(87811),i(93223)),u=i(36005),h=i(40608),p=i(86738),d=i(16930),f=i(21325),m=i(60694),y=i(10873),g=i(45617),x=i(43577),_=i(13868),b=i(22796),v=i(87045),w=i(76353),R=i(84169),I=i(77301),S=i(77359),M=i(6049),k=i(70834),T=i(6952),A=i(12711),z=i(85676),F=i(94359),P=i(22048),C=i(49410),D=i(34606),N=i(51508);const B=e=>{let t=class extends e{constructor(...e){super(...e),this._isConstructedFromFunctionRaster=!1,this.bandIds=null,this.copyright=null,this.interpolation=null,this.multidimensionalSubset=null,this.raster=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster=(0,w.q)(e[0]?.raster)}destroy(){this._shutdownJobHandler()}get fullExtent(){return this.serviceRasterInfo?.extent}set multidimensionalDefinition(e){this._set("multidimensionalDefinition",e),this.updateRenderer()}set rasterFunction(e){"none"===e?.functionName?.toLowerCase()&&(e=void 0),this._set("rasterFunction",e),this.updateRasterFunction()}set url(e){this._set("url",(0,m.Jf)(e,o.A.getLogger(this)))}get renderer(){if("imagery-tile"!==this.type)return this.internalRenderer;const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find((({name:t})=>t===e));return i?.renderer.clone()}return this.internalRenderer}set renderer(e){"imagery-tile"===this.type&&(this.activePresetRendererName=null),this.internalRenderer=e}set internalRenderer(e){null==e&&null==this.rasterFunction?this._configDefaultRenderer("override"):(this._set("internalRenderer",e),this.updateRenderer())}readRenderer(e,t,i){const s=t?.layerDefinition?.drawingInfo?.renderer;return(0,F.LF)(s,i)||void 0}async computeStatisticsHistograms(e,t){await this.load(t),e=(0,a.PZ)(P.A,e).clone();const{serviceRasterInfo:i}=this;if(null==i)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");const{geometry:s}=e;if(null==s)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let n=s;const{spatialReference:o}=i;if(!s.spatialReference.equals(o)){await(0,k.Hh)();const e="extent"===s.type?(0,k._l)(s,o):(0,k.uk)(s,o);if(null==e)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","geometry cannot be projected to the data source");n=e}const l=e.pixelSize??new p.A({x:i.pixelSize.x,y:i.pixelSize.y,spatialReference:o}),{extent:c,width:u,height:h}=(0,S.b7)(i,n,l),d=await this.fetchPixels(c,u,h,{...t,interpolation:"nearest"});if(null==d.pixelBlock)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const f=await(0,S.$Q)(d.pixelBlock,c,n),m=this._rasterJobHandler;return m?m.computeStatisticsHistograms({pixelBlock:f},t):(0,T.eH)(f)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;const i=(0,I.XU)({rasterInfo:this.raster.rasterInfo,multidimensionalDefinition:e.multidimensionalDefinition||this.multidimensionalDefinition,timeExtent:e.timeExtent??this.timeExtent,multidimensionalSubset:this.multidimensionalSubset});return{...e,multidimensionalDefinition:i}}async updateRasterFunction(){return this.loaded&&"imagery-tile"===this.type&&(this.rasterFunction||this._cachedRasterFunctionJson)&&JSON.stringify(this.rasterFunction)!==JSON.stringify(this._cachedRasterFunctionJson)?(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this._rasterFunctionUpdatePromise=this._updateRasterFunction(),this._rasterFunctionUpdatePromise):this._rasterFunctionUpdatePromise}async updateRenderer(){const{loaded:e,symbolizer:t,renderer:i}=this;if(!e||!t||!i)return;const{rasterInfo:s}=this.raster,n=(0,I.ct)(s,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),r=n?.name,o=(0,A.m7)(s,r);return this._updateSymbolizer(t,i,r,o)}async applyRenderer(e,t,i){const s=e?.pixelBlock;if(!(null!=s&&s.pixels&&s.pixels.length>0))return null;await this.updateRenderer();const n=this.bandIds??[],{pixelBlock:r}=await this._symbolize({pixelData:e,simpleStretchParams:t,bandIds:n,symbolizer:this.symbolizer},i);return r}getTileUrl(e,t,i){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${i}`:""}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||null==t)return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;const s=(0,f.Vp)(e);return v.A.create({size:256,spatialReference:e,origin:s?{x:s.origin[0],y:s.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,t,i,s={}){if(B(this),s.requestAsImageElement){const r=this.getTileUrl(e,t,i);return(0,n.A)(r,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:s.signal}).then((e=>e.data))}const{serviceRasterInfo:r}=this;if(null!=r.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition){const n=s.tileInfo||r.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(e,t,i,n),pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(s={...s,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,t,i,s)}async fetchPixels(e,t,i,s={}){return null!=this.serviceRasterInfo.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition?{extent:e,pixelBlock:null}:(await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i),this.raster.fetchPixels(e,t,i,s))}async getSamples(e,t){if(await this.load(),(e=(0,a.PZ)(D.A,e).clone()).interpolation&&"nearest"!==e.interpolation)throw new r.A("imagery-tile-mixin:get-samples","only nearest interpolation is currently supported");const i=e.mosaicRule?.multidimensionalDefinition,s={...t,multidimensionalDefinition:i},n=(await this._getSampleLocations(e)).map((e=>this.identify(e,s).then((t=>(t.location=e,t))))),o=(await Promise.all(n)).flatMap(((e,t)=>this._convertRasterIdentifyResultToSample(e,t)));return new N.A({samples:o})}async identify(e,t={}){await this.load();const{raster:i,serviceRasterInfo:s}=this;if(null!=s?.multidimensionalInfo&&!(s.hasMultidimensionalTranspose&&((0,I.DY)(t.multidimensionalDefinition)||t.transposedVariableName||t.timeExtent)||null!=(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition))return{location:e,value:null};const n=this.multidimensionalSubset?.areaOfInterest;if(n&&!n.contains(e))throw new r.A("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");const o=this.serviceRasterInfo?.storageInfo.isBsqTile&&this.bandIds?.length?this.bandIds:void 0;return i.identify(e,{...t,bandIds:o})}hasStandardTime(){const e=this.serviceRasterInfo?.multidimensionalInfo;if(null==e||"standard-time"!==this.serviceRasterInfo?.dataType)return!1;const t=this.multidimensionalDefinition,i=t?.[0]?.variableName;return e.variables.some((e=>e.name===i&&(!t?.[0].dimensionName||e.dimensions.some((e=>"StdTime"===e.name)))))}getStandardTimeValue(e){return new Date((0,I.$E)(e)).toISOString()}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo?.multidimensionalInfo;return(0,I.z2)(this.multidimensionalSubset,t)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=(0,I.fy)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this.rasterFunction&&(0,w.q)(this.raster)&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then((async()=>{if(!this._rasterJobHandler)return;B(this);const{raster:e}=this;e.rasterJobHandler=this._rasterJobHandler,(0,w.q)(e)&&e.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch((()=>{})),this.renderer&&this.updateRenderer()})).catch((()=>{}))}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}async _getSampleLocations(e){const{geometry:t}=e;if("point"===t.type)return[t];const{spatialReference:s,type:n}=t;if("multipoint"===n)return t.points.map((e=>new p.A({x:e[0],y:e[1],spatialReference:s})));if("polyline"===n){let n=t;if(e.sampleCount||e.sampleDistance){const s=await Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(8411)]).then(i.bind(i,88411)),r=(await Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(4929)]).then(i.bind(i,965))).execute(t,{unit:"meters"}),o=Math.min(e.sampleCount||100,1e3);let l=e.sampleDistance;l||(l=r/(o+(2===n.paths[0].length?1:0))),n=s.execute(t,l,{unit:"meters"})}return n.paths.flatMap((e=>e.map((e=>new p.A({x:e[0],y:e[1],spatialReference:s})))))}const r=Math.min(e.sampleCount||100,1e3),o="extent"===t.type,l=o?t:t.extent,a=Math.sqrt(l.width*l.height/r),c=l.height/a,u=l.width/a,{xmin:h,ymax:d}=l,f=[];for(let e=0;e<c;e++)for(let i=0;i<u;i++){const n=new p.A({x:h+(i+.5)*a,y:d-(e+.5)*a,spatialReference:s});(o||t.contains(n))&&f.push(n)}return f}_configDefaultInterpolation(){if(null==this.interpolation){B(this);const{raster:e}=this,t=(0,A.w6)(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){B(this);const{rasterInfo:t}=this.raster,i=(0,I.ct)(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),s=i?.name,n=(0,A.I8)({variableName:s,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=n?.bandIds??(0,A.ci)(t)),!this.renderer||"override"===e){const e=(0,A.Mm)(this.raster),i=n?.renderer??(0,A.PD)(t,{bandIds:this.bandIds,variableName:s,rasterFunctionColorRamp:e}),r=t.statistics,o=r&&r.length>0?r[0]:null,l=o?.max??0,a=o?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===i.type&&(l>1e24||a<-1e24)&&(i.dynamicRangeAdjustment=!0,i.customStatistics=null,"none"===i.stretchType&&(i.stretchType="min-max")),this.renderer=i}const r=(0,A.$P)({...this.renderer.toJSON(),variableName:s}),l=(0,A.m7)(t,s);this.symbolizer?(this.symbolizer.rendererJSON=r,this.symbolizer.rasterInfo=l):this.symbolizer=new z.A({rendererJSON:r,rasterInfo:l});const a=this.symbolizer.bind();if(a.success){if("auto"===e){const{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){const e=(0,A.PD)(this.raster.rasterInfo);JSON.stringify(e)!==JSON.stringify(t)&&this._configDefaultRenderer("override")}else if("raster-stretch"===t.type){const e=this.bandIds?.length,i=t.customStatistics?.length;!t.dynamicRangeAdjustment&&i&&e&&i!==e&&this._configDefaultRenderer("override")}}}else o.A.getLogger(this).warn("imagery-tile-mixin",a.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}async _updateRasterFunction(){if(this._isConstructedFromFunctionRaster&&(0,w.q)(this.raster)){const e=this.raster.rasterFunction.toJSON();return void(!this.rasterFunction&&e&&this._set("rasterFunction",b.A.fromJSON(e)))}let e,t=this.raster,i=!1;(0,w.q)(t)?(e=t.primaryRasters.rasters,t=e[0],i=!0):e=[t];const{rasterFunction:s}=this;if(s){const i={raster:t};e.length>1&&e.forEach((e=>i[e.url]=e));const n=(0,M.vt)(s.functionDefinition?.toJSON()??s.toJSON(),i),r=new R.A({rasterFunction:n});r.rasterJobHandler=this._rasterJobHandler,await r.open(),this.raster=r}else this.raster=t,await t.open();if(this._cachedRendererJson=void 0,!i&&!s)return;const{bandIds:n}=this,{bandCount:r}=this.raster.rasterInfo,o=n?.length?n.some((e=>e>=r)):r>=3;n&&(o||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}_convertRasterIdentifyResultToSample(e,t){const{rasterInfo:i}=this.raster,s=i.storageInfo.pyramidScalingFactor**(e.pyramidLevel??0),n=(i.pixelSize.x+i.pixelSize.y)/2*s;if(!e.dataSeries?.length)return[new C.A({location:e.location,pixelValue:e.value,locationId:t,resolution:n})];const r=[];return e.dataSeries.forEach((({value:i,multidimensionalDefinition:s},o)=>{const l={Variables:s[0].variableName,Dimensions:s.flatMap((({dimensionName:e})=>e)).join(",")};for(const{dimensionName:e,values:t}of s){l[e]=Array.isArray(t[0])?t[0][0]:t[0];const i=t[t.length-1];l[`${e}_Max`]=Array.isArray(i)?i[i.length-1]:i}const a=new C.A({location:e.location,pixelValue:i,rasterId:o,locationId:t,resolution:n,attributes:l});r.push(a)})),r}};function B(e){if(!e.raster||!e.serviceRasterInfo)throw new r.A("imagery-tile","no raster")}return(0,s._)([(0,l.MZ)({clonable:!1})],t.prototype,"_cachedRasterFunctionJson",void 0),(0,s._)([(0,l.MZ)({clonable:!1})],t.prototype,"_compatibleFullExtent",void 0),(0,s._)([(0,l.MZ)({clonable:!1})],t.prototype,"_isConstructedFromFunctionRaster",void 0),(0,s._)([(0,l.MZ)({clonable:!1})],t.prototype,"_rasterFunctionUpdatePromise",void 0),(0,s._)([(0,l.MZ)({type:[a.jz],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],t.prototype,"bandIds",void 0),(0,s._)([(0,l.MZ)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],t.prototype,"copyright",void 0),(0,s._)([(0,l.MZ)({json:{read:!1}})],t.prototype,"fullExtent",null),(0,s._)([(0,l.MZ)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,c.e)(_.SZ)],t.prototype,"interpolation",void 0),(0,s._)([(0,l.MZ)()],t.prototype,"ioConfig",void 0),(0,s._)([(0,l.MZ)({type:[g.A],json:{write:!0}})],t.prototype,"multidimensionalDefinition",null),(0,s._)([(0,l.MZ)({type:x.A,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,s._)([(0,l.MZ)()],t.prototype,"raster",void 0),(0,s._)([(0,l.MZ)({type:b.A})],t.prototype,"rasterFunction",null),(0,s._)([(0,l.MZ)()],t.prototype,"serviceRasterInfo",void 0),(0,s._)([(0,l.MZ)()],t.prototype,"sourceJSON",void 0),(0,s._)([(0,l.MZ)({readOnly:!0,type:d.A,json:{read:!1}})],t.prototype,"spatialReference",void 0),(0,s._)([(0,l.MZ)({type:v.A})],t.prototype,"tileInfo",void 0),(0,s._)([(0,l.MZ)(y.OZ)],t.prototype,"url",null),(0,s._)([(0,l.MZ)()],t.prototype,"renderer",null),(0,s._)([(0,l.MZ)({types:F.uy,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){const e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:F.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"internalRenderer",null),(0,s._)([(0,u.w)("internalRenderer")],t.prototype,"readRenderer",null),(0,s._)([(0,l.MZ)({clonable:!1})],t.prototype,"symbolizer",void 0),t=(0,s._)([(0,h.$)("esri.layers.mixins.ImageryTileMixin")],t),t}},91806:(e,t,i)=>{i.d(t,{A:()=>c});var s,n=i(90237),r=i(25482),o=i(10107),l=i(56507),a=(i(44208),i(87811),i(40608));let c=class extends r.A{static{s=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new s({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,n._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"cols",void 0),(0,n._)([(0,o.MZ)({type:l.jz,json:{write:!0}})],c.prototype,"level",void 0),(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"levelValue",void 0),(0,n._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"origin",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{write:!0}})],c.prototype,"resolution",void 0),(0,n._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"rows",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{write:!0}})],c.prototype,"scale",void 0),c=s=(0,n._)([(0,a.$)("esri.layers.support.LOD")],c)}}]);