@arcgis/core 5.2.0-next.69 → 5.2.0-next.70

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 (639) hide show
  1. package/Basemap.js +1 -1
  2. package/Ground.js +1 -1
  3. package/WebDocument2D.js +1 -1
  4. package/WebScene.js +1 -1
  5. package/applications/Components/analysisUtils.js +1 -1
  6. package/applications/Components/arcadeEditorUtils.js +1 -1
  7. package/applications/Components/testUtils.js +1 -1
  8. package/applications/Urban/meshUtils.js +1 -1
  9. package/arcade/arcadeCompiler.js +1 -1
  10. package/arcade/functions/geomasync.js +1 -1
  11. package/arcade/functions/geomsync.js +1 -1
  12. package/arcade/functions/knowledgegraph.js +1 -1
  13. package/arcade/functions/track.js +1 -1
  14. package/arcade/geometry/operators.js +1 -1
  15. package/arcade/geometry/operatorsWorker.js +1 -1
  16. package/arcade/geometry/rotate.js +2 -0
  17. package/arcade/geometry/unitConversion.js +1 -1
  18. package/arcgisGlobal.d.ts +1 -0
  19. package/assets/components/assets/icon/loadConfiguration16.json +1 -0
  20. package/assets/components/assets/icon/loadConfiguration24.json +1 -0
  21. package/assets/components/assets/icon/loadConfiguration32.json +1 -0
  22. package/assets/esri/core/workers/RemoteClient.js +1 -1
  23. package/assets/esri/core/workers/chunks/{bece22668622a9a6bfe2.js → 011281fe918c4f0aec5d.js} +1 -1
  24. package/assets/esri/core/workers/chunks/01c92e68fb17cf2d0e08.js +1 -0
  25. package/assets/esri/core/workers/chunks/02dd79beb13eff6be85e.js +1 -0
  26. package/assets/esri/core/workers/chunks/0623acb2bd14a61b65c9.js +29 -0
  27. package/assets/esri/core/workers/chunks/065e3353124fc5ac44ce.js +1 -0
  28. package/assets/esri/core/workers/chunks/06c9aac75a01d3af6d54.js +1 -0
  29. package/assets/esri/core/workers/chunks/073f1d5f89875c6aefb1.js +1 -0
  30. package/assets/esri/core/workers/chunks/{d583bcea4d1a21da9147.js → 0846855843f85661e974.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{7a818499c1079906c2d7.js → 089f8c60e96d920a2cb2.js} +1 -1
  32. package/assets/esri/core/workers/chunks/09653bd2a31d293a10d9.js +2 -0
  33. package/assets/esri/core/workers/chunks/0ae0483b72f5e8d00d55.js +1 -0
  34. package/assets/esri/core/workers/chunks/0aedeb837399d3f92e4a.js +1 -0
  35. package/assets/esri/core/workers/chunks/0b18de5147d76b68896f.js +1 -0
  36. package/assets/esri/core/workers/chunks/{f5d809d30cbb56be852d.js → 0e333aced8b23aa49a0e.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{dad39ddf0f8dfb0bef47.js → 0eaa8265a4cd64297545.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{4e1b087453fc5e20e961.js → 118ccfa2d685764752ee.js} +1 -1
  39. package/assets/esri/core/workers/chunks/158d2ac0333d53556e33.js +1 -0
  40. package/assets/esri/core/workers/chunks/160b204cbf5bda2a29e9.js +1 -0
  41. package/assets/esri/core/workers/chunks/16cade1c2ddf44e336ee.js +1 -0
  42. package/assets/esri/core/workers/chunks/19233d0016e5b154c5ce.js +1 -0
  43. package/assets/esri/core/workers/chunks/19cb8963d5ec2246357b.js +1 -0
  44. package/assets/esri/core/workers/chunks/{0ae35b02dda9b9662560.js → 1ac8a7a129ba33e05a24.js} +1 -1
  45. package/assets/esri/core/workers/chunks/1b130af7d14eaae69d96.js +1 -0
  46. package/assets/esri/core/workers/chunks/1ca04ecf010e68863014.js +1 -0
  47. package/assets/esri/core/workers/chunks/1cc063aa2ddf44bbd515.js +1 -0
  48. package/assets/esri/core/workers/chunks/{c055c16379f5bb56e930.js → 1d92d53186debd52e753.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{37a8cfec11057947b45f.js → 1dba93abe84d30f05d8d.js} +1 -1
  50. package/assets/esri/core/workers/chunks/1e0140556c2e3fa72545.js +1 -0
  51. package/assets/esri/core/workers/chunks/1e5cb72830c7f32f2961.js +1 -0
  52. package/assets/esri/core/workers/chunks/{510acf2e8781be9b0dba.js → 1f888f026b004447772c.js} +1 -1
  53. package/assets/esri/core/workers/chunks/2033e6d42453e4e67048.js +1 -0
  54. package/assets/esri/core/workers/chunks/24006cea112d657f053a.js +1 -0
  55. package/assets/esri/core/workers/chunks/{7b531feba4fd662575f9.js → 28924f31f5ba8ebdc60a.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{893ffc38e1a43de5b63d.js → 28b09fe50b855a1d8a3f.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{b9c7aa04861f545a559c.js → 2bcb7e43578124538c3c.js} +1 -1
  58. package/assets/esri/core/workers/chunks/2bdb9b5365869081c936.js +1 -0
  59. package/assets/esri/core/workers/chunks/{df89bf05c18f0c8e418b.js → 2cfe6f41865ffb3a4645.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{63858dfcff1177e597e7.js → 2d1ae18a28491b00091d.js} +1 -1
  61. package/assets/esri/core/workers/chunks/2d3a18d56e2e5669c562.js +1 -0
  62. package/assets/esri/core/workers/chunks/2d45daacec0d5ed38782.js +1 -0
  63. package/assets/esri/core/workers/chunks/2f58e1f64df2da8259a2.js +1 -0
  64. package/assets/esri/core/workers/chunks/31669511cfddf116d991.js +1 -0
  65. package/assets/esri/core/workers/chunks/32f5112c848efec6c33b.js +1 -0
  66. package/assets/esri/core/workers/chunks/33e293836f5d28dc5d62.js +1 -0
  67. package/assets/esri/core/workers/chunks/{59a795eba31061dc357a.js → 359584a8fb5687a7d098.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{9c5dff4f13102871786e.js → 36171c72a3c04b0d13ef.js} +1 -1
  69. package/assets/esri/core/workers/chunks/38660a8cc3623c854d88.js +1 -0
  70. package/assets/esri/core/workers/chunks/3978f00a03e97645b276.js +1 -0
  71. package/assets/esri/core/workers/chunks/3b14ed3184743df336a6.js +1 -0
  72. package/assets/esri/core/workers/chunks/{f82cd34a79c8aa58d40c.js → 3b3a8a6167f2e1eeb828.js} +2 -2
  73. package/assets/esri/core/workers/chunks/3d6b2d5ae647e140abaf.js +1 -0
  74. package/assets/esri/core/workers/chunks/3dc71e03a630dd50b28e.js +1 -0
  75. package/assets/esri/core/workers/chunks/3de6e54b6ed0feae1940.js +1 -0
  76. package/assets/esri/core/workers/chunks/3dff36f6de181d9dcdc5.js +1 -0
  77. package/assets/esri/core/workers/chunks/3fd022df127af32782ce.js +1 -0
  78. package/assets/esri/core/workers/chunks/40693ee558a1eb1e93f4.js +1 -0
  79. package/assets/esri/core/workers/chunks/4344ab1250a1c550bf8b.js +1 -0
  80. package/assets/esri/core/workers/chunks/4491dc227c28e2ab4f8e.js +1 -0
  81. package/assets/esri/core/workers/chunks/{909e88c27d80777b047c.js → 463747a822499dd933ef.js} +1 -1
  82. package/assets/esri/core/workers/chunks/4695cd6120f60b234d5c.js +1 -0
  83. package/assets/esri/core/workers/chunks/4823e77515f451628fad.js +1 -0
  84. package/assets/esri/core/workers/chunks/484b3e2a220c440ccbb4.js +1 -0
  85. package/assets/esri/core/workers/chunks/4c2794687aea172775a0.js +1 -0
  86. package/assets/esri/core/workers/chunks/{b5b698008b8f3f4d5d61.js → 4ce57dd39075e8fb357c.js} +1 -1
  87. package/assets/esri/core/workers/chunks/4da993c79b373b9d304e.js +2 -0
  88. package/assets/esri/core/workers/chunks/4da993c79b373b9d304e.js.LICENSE.txt +4 -0
  89. package/assets/esri/core/workers/chunks/4e129b9f5772a06e580c.js +1 -0
  90. package/assets/esri/core/workers/chunks/50e0dd74795978468625.js +1 -0
  91. package/assets/esri/core/workers/chunks/{0a98a13418f53082ca7a.js → 5459ba8fdeb2370bb52b.js} +1 -1
  92. package/assets/esri/core/workers/chunks/582a1d468089b9986416.js +1 -0
  93. package/assets/esri/core/workers/chunks/5e3d5347223f0111f40f.js +1 -0
  94. package/assets/esri/core/workers/chunks/{bfb626805405646a0419.js → 5eb29f0068f1c839d05e.js} +1 -1
  95. package/assets/esri/core/workers/chunks/5f201c77a09ae0df29d6.js +1 -0
  96. package/assets/esri/core/workers/chunks/{6d5038d4351fe29e2718.js → 5fb76575575fe8cfb1f0.js} +1 -1
  97. package/assets/esri/core/workers/chunks/6072c63a5da4366e9942.js +1 -0
  98. package/assets/esri/core/workers/chunks/6080e46fc79127500283.js +1 -0
  99. package/assets/esri/core/workers/chunks/623d5518bca227f643bd.js +1 -0
  100. package/assets/esri/core/workers/chunks/62811bca7ad2100c023c.js +1 -0
  101. package/assets/esri/core/workers/chunks/6357c7cac401aee9fe77.js +1 -0
  102. package/assets/esri/core/workers/chunks/{91c543443cd6768ad6ff.js → 6525c925bb91facb3575.js} +1 -1
  103. package/assets/esri/core/workers/chunks/67d3ff7fcefaa7d5d27f.js +1 -0
  104. package/assets/esri/core/workers/chunks/{b5571e93bc136dac8ee1.js → 67ebde34377f98d17cda.js} +1 -1
  105. package/assets/esri/core/workers/chunks/687cf21e027f49b44d22.js +1 -0
  106. package/assets/esri/core/workers/chunks/{6b0acd1a7dd74a7367e0.js → 694371f51c52a7a94da4.js} +1 -1
  107. package/assets/esri/core/workers/chunks/6a9002fcba11e2cf3f2e.js +1 -0
  108. package/assets/esri/core/workers/chunks/{f4e813ead56d963b16b8.js → 6b208bac120bcfecd9e4.js} +1 -1
  109. package/assets/esri/core/workers/chunks/6cd6d0cfd313f0475d98.js +1 -0
  110. package/assets/esri/core/workers/chunks/6f58cb9dffe8016397a2.js +1 -0
  111. package/assets/esri/core/workers/chunks/7260e63252fa5452dc22.js +1 -0
  112. package/assets/esri/core/workers/chunks/72dcd4bd1a28bf8605c5.js +1 -0
  113. package/assets/esri/core/workers/chunks/73f77f5a6907cb8d9a35.js +1 -0
  114. package/assets/esri/core/workers/chunks/77df0bb35d2688729479.js +1 -0
  115. package/assets/esri/core/workers/chunks/{09c43bcb09aad02e83a9.js → 7a143ca61c0a70306185.js} +1 -1
  116. package/assets/esri/core/workers/chunks/7ca9c908432b1afa0367.js +1 -0
  117. package/assets/esri/core/workers/chunks/{ec2e0b2e31fd53b81d0a.js → 7ddf9b2718dd047f15e6.js} +1 -1
  118. package/assets/esri/core/workers/chunks/7f208ef75ef2ce0d7cf9.js +1 -0
  119. package/assets/esri/core/workers/chunks/7f4a592bcf4ecb55949a.js +1 -0
  120. package/assets/esri/core/workers/chunks/7f91e45156bbe88f9a62.js +1 -0
  121. package/assets/esri/core/workers/chunks/864691186c449ca2c3db.js +1 -0
  122. package/assets/esri/core/workers/chunks/869d292a60747c93dc84.js +1 -0
  123. package/assets/esri/core/workers/chunks/{7e2794705b4e679fcb3f.js → 86a4057572755b403548.js} +1 -1
  124. package/assets/esri/core/workers/chunks/{99772ce7e628364434fa.js → 8c1bddc88cc5f4251021.js} +1 -1
  125. package/assets/esri/core/workers/chunks/8c76f31a363dd0c3354d.js +1 -0
  126. package/assets/esri/core/workers/chunks/8eecc6df6511c8830f5d.js +1 -0
  127. package/assets/esri/core/workers/chunks/{0da4816c11b45b4a6289.js → 8fea514aada1195c8f30.js} +1 -1
  128. package/assets/esri/core/workers/chunks/{7ebbb90d80600d9ba889.js → 913fb883455aeac8582b.js} +1 -1
  129. package/assets/esri/core/workers/chunks/927582ec15bff2acbb49.js +1 -0
  130. package/assets/esri/core/workers/chunks/{89132395eca329b9ab92.js → 9482a6d7baa24bbf5693.js} +1 -1
  131. package/assets/esri/core/workers/chunks/9684ab5e8254fdfcb7bb.js +1 -0
  132. package/assets/esri/core/workers/chunks/96d861265566854760cd.js +1 -0
  133. package/assets/esri/core/workers/chunks/98e6c1d035755a074d24.js +1 -0
  134. package/assets/esri/core/workers/chunks/9937920e7993814d0b2c.js +1 -0
  135. package/assets/esri/core/workers/chunks/{9d0bda096cdbd7e22f4b.js → 9bbff8237540409610b3.js} +1 -1
  136. package/assets/esri/core/workers/chunks/9dda9414104f585560a4.js +2 -0
  137. package/assets/esri/core/workers/chunks/{be291d920ebc68fde02b.js.LICENSE.txt → 9dda9414104f585560a4.js.LICENSE.txt} +0 -5
  138. package/assets/esri/core/workers/chunks/{1dc1bfb3425665f560e4.js → a486d99f9879f94151ba.js} +1 -1
  139. package/assets/esri/core/workers/chunks/{475c60ed8785d07911c6.js → a5c115fc53edb52ce1de.js} +1 -1
  140. package/assets/esri/core/workers/chunks/a62f1b8ed065b2a38f1a.js +1 -0
  141. package/assets/esri/core/workers/chunks/{830d1a7dee43422507ab.js → a739e617fc461014ad1f.js} +1 -1
  142. package/assets/esri/core/workers/chunks/aa21031c8f12ca438eaa.js +1 -0
  143. package/assets/esri/core/workers/chunks/ad27689b231e282b7620.js +1 -0
  144. package/assets/esri/core/workers/chunks/af6e8c961fd768fa7be3.js +1 -0
  145. package/assets/esri/core/workers/chunks/afeeb11b39e140303b5a.js +1 -0
  146. package/assets/esri/core/workers/chunks/b599b7dadce8b8bc88f6.js +1 -0
  147. package/assets/esri/core/workers/chunks/{873d8332e2149eb1b36a.js → b6c7b7b7f87dce5de811.js} +3 -3
  148. package/assets/esri/core/workers/chunks/b7d8817018b3d277c454.js +1 -0
  149. package/assets/esri/core/workers/chunks/{d90bc34d97bb21c29c40.js → b8cd81d8fcc78d272130.js} +1 -1
  150. package/assets/esri/core/workers/chunks/{450bc48a7389607bce1e.js → b984b808d383974ca3d8.js} +1 -1
  151. package/assets/esri/core/workers/chunks/b9953277d0cd4a01bdc6.js +1 -0
  152. package/assets/esri/core/workers/chunks/c02b3b8b71205f6ce290.js +1 -0
  153. package/assets/esri/core/workers/chunks/c03da138651ac53cadcb.js +2 -0
  154. package/assets/esri/core/workers/chunks/c21212c356f65244e34e.js +1 -0
  155. package/assets/esri/core/workers/chunks/{1fece9757de7c10d1e9f.js → c29df43817278f674707.js} +1 -1
  156. package/assets/esri/core/workers/chunks/{589b31cc5c663a288942.js → c6bf17b5ff6ec4b980a1.js} +1 -1
  157. package/assets/esri/core/workers/chunks/c715c585c42d8c2b86f5.js +1 -0
  158. package/assets/esri/core/workers/chunks/c7e9513f75b8ec205562.js +1 -0
  159. package/assets/esri/core/workers/chunks/c866b66ba72d96453899.js +1 -0
  160. package/assets/esri/core/workers/chunks/{5fde1234c5cccaee6763.js → c873383e7dae35dc1a61.js} +1 -1
  161. package/assets/esri/core/workers/chunks/c99dcc17fbd7acd2ad2e.js +1 -0
  162. package/assets/esri/core/workers/chunks/cae94d6805e0e8db3600.js +1 -0
  163. package/assets/esri/core/workers/chunks/cc5ec6e99aa09342c704.js +1 -0
  164. package/assets/esri/core/workers/chunks/cd4e5c948d1bfa9b9a2d.js +1 -0
  165. package/assets/esri/core/workers/chunks/{6501ee40bf25f9f75d02.js → ce481eeb27ea9c1782ae.js} +1 -1
  166. package/assets/esri/core/workers/chunks/{d214ac457ac970479536.js → cec1c87eb3749276ced4.js} +1 -1
  167. package/assets/esri/core/workers/chunks/cfe31b7d1c6c05fbd268.js +1 -0
  168. package/assets/esri/core/workers/chunks/d08f81d545930a79fb2e.js +1 -0
  169. package/assets/esri/core/workers/chunks/d0c1bc90e474f706211c.js +1 -0
  170. package/assets/esri/core/workers/chunks/d2faac81142586cf7509.js +1 -0
  171. package/assets/esri/core/workers/chunks/d607cf154218d20e4114.js +1 -0
  172. package/assets/esri/core/workers/chunks/{b94cd7eac5ff4a78dd5b.js → d7b6985984071e78c764.js} +1 -1
  173. package/assets/esri/core/workers/chunks/d901f8503a73277cfa58.js +1 -0
  174. package/assets/esri/core/workers/chunks/d93d0cb69f3a9a722510.js +1 -0
  175. package/assets/esri/core/workers/chunks/{9073b0f0ec93d6e243b9.js → da1c9257793c2817f40f.js} +1 -1
  176. package/assets/esri/core/workers/chunks/{94719ac469dadc4c05dc.js → dc0c3109b7558b4fe016.js} +1 -1
  177. package/assets/esri/core/workers/chunks/{dc7e4f7879debf557e46.js → de3d0973cff1e0858c52.js} +2 -2
  178. package/assets/esri/core/workers/chunks/{adce59e4111bae4225f7.js → e421dee5d8b030e79ffb.js} +1 -1
  179. package/assets/esri/core/workers/chunks/e602b91d8fdc36a92530.js +1 -0
  180. package/assets/esri/core/workers/chunks/{c13e55b9efb0b532f7ee.js → e61ab8ef30bbe788b9d7.js} +1 -1
  181. package/assets/esri/core/workers/chunks/e702abaeccef20b64a81.js +1 -0
  182. package/assets/esri/core/workers/chunks/{11a3aa43fb940c21f148.js → eb95464bd017fb839510.js} +1 -1
  183. package/assets/esri/core/workers/chunks/ebd619533be077059494.js +1 -0
  184. package/assets/esri/core/workers/chunks/ed564358cc7b3ee463a3.js +1 -0
  185. package/assets/esri/core/workers/chunks/ef2e0a014c982d9c7ca4.js +1 -0
  186. package/assets/esri/core/workers/chunks/f5cf338cecfc81f23128.js +1 -0
  187. package/assets/esri/core/workers/chunks/f6150b51a9430691a040.js +1 -0
  188. package/assets/esri/core/workers/chunks/{f4aed2b6e92bd0474069.js → f69329b85b362b349a8c.js} +1 -1
  189. package/assets/esri/core/workers/chunks/f721756a6c1593f96409.js +1 -0
  190. package/assets/esri/core/workers/chunks/fa19d5923276418096da.js +1 -0
  191. package/assets/esri/core/workers/chunks/fa5d27e47d47ff8fcb96.js +2 -0
  192. package/assets/esri/core/workers/chunks/fb12d3c63fcac8391e06.js +1 -0
  193. package/assets/esri/core/workers/chunks/fc9065d0cd6285fe0f0d.js +1 -0
  194. package/assets/esri/core/workers/chunks/{b526055794e64b0227ca.js → fd6107f95082e05f016a.js} +11 -11
  195. package/assets/esri/core/workers/chunks/fe10a95ebe1da2322af6.js +1 -0
  196. package/assets/esri/core/workers/chunks/fe71a0604f0928113419.js +1 -0
  197. package/assets/esri/core/workers/chunks/fec07a16b72cdcafc641.js +1 -0
  198. package/assets/esri/core/workers/chunks/fff23b2682590c4b21e3.js +1 -0
  199. package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
  200. package/chunks/Bufferer-CclWhXVb.js +1 -1
  201. package/chunks/ColorMaterial.glsl.js +18 -5
  202. package/chunks/Component.glsl.js +42 -34
  203. package/chunks/Envelope.js +1 -1
  204. package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +1 -1
  205. package/chunks/Geometry.js +1 -1
  206. package/chunks/GeometryCleaner-CIE8Wfmb.js +1 -1
  207. package/chunks/MultiPathImpl.js +1 -1
  208. package/chunks/OperatorAffineTransform.js +2 -0
  209. package/chunks/OperatorCentroid2D.js +2 -0
  210. package/chunks/OperatorCrosses.js +1 -1
  211. package/chunks/OperatorCut.js +1 -1
  212. package/chunks/OperatorGeneralize.js +1 -1
  213. package/chunks/OperatorGeodesicBuffer.js +1 -1
  214. package/chunks/OperatorGeodeticLength.js +1 -1
  215. package/chunks/OperatorGraphicBuffer.js +1 -1
  216. package/chunks/OperatorIntersects.js +1 -1
  217. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  218. package/chunks/OperatorOverlaps.js +1 -1
  219. package/chunks/OperatorProximityGeodesic.js +1 -1
  220. package/chunks/OperatorShapePreservingLength.js +1 -1
  221. package/chunks/OperatorShapePreservingProject.js +1 -1
  222. package/chunks/OperatorSimplifyOGC.js +1 -1
  223. package/chunks/OperatorTouches.js +1 -1
  224. package/chunks/OperatorWithin.js +1 -1
  225. package/chunks/Point2D.js +1 -1
  226. package/chunks/SideCalculator2D-DX0718xq.js +1 -1
  227. package/chunks/SpatialReference.js +1 -1
  228. package/chunks/arcade.js +1 -1
  229. package/chunks/bundle.js +1 -1
  230. package/chunks/bundle2.js +1 -1
  231. package/chunks/centroidOperator.js +1 -1
  232. package/chunks/containsOperator.js +1 -1
  233. package/chunks/disjointOperator.js +1 -1
  234. package/chunks/equalsOperator.js +1 -1
  235. package/chunks/geodeticDistanceOperator.js +2 -0
  236. package/chunks/multiPartToSinglePartOperator.js +2 -0
  237. package/chunks/offsetOperator.js +2 -0
  238. package/config.js +1 -1
  239. package/core/imageUtils.js +1 -1
  240. package/core/workers/WorkerFallback.js +1 -1
  241. package/core/workers/registry.js +1 -1
  242. package/core/workers/workerFactory.js +1 -1
  243. package/core/workers/workers.js +1 -1
  244. package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
  245. package/editing/sharedTemplates/executor/builders/support/offsetUtils.js +1 -1
  246. package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
  247. package/editing/sharedTemplates/templateLoader.js +1 -1
  248. package/geometry/libtess.js +1 -1
  249. package/geometry/operators/affineTransformOperator.js +1 -1
  250. package/geometry/operators/centroidOperator.js +1 -1
  251. package/geometry/operators/geodeticDistanceOperator.js +1 -1
  252. package/geometry/operators/gx/operatorAffineTransform.js +1 -1
  253. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  254. package/geometry/operators/gx/operatorBuffer.js +1 -1
  255. package/geometry/operators/gx/operatorConvexHull.js +1 -1
  256. package/geometry/operators/gx/operatorDifference.js +1 -1
  257. package/geometry/operators/gx/operatorIntersection.js +1 -1
  258. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  259. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  260. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  261. package/geometry/operators/gx/operatorOffset.js +1 -1
  262. package/geometry/operators/gx/operatorSinglePartToMultiPart.js +1 -1
  263. package/geometry/operators/gx/operatorUnion.js +1 -1
  264. package/geometry/operators/json/containsOperator.js +1 -1
  265. package/geometry/operators/json/disjointOperator.js +1 -1
  266. package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
  267. package/geometry/operators/offsetOperator.js +1 -1
  268. package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
  269. package/geometry/support/meshUtils.js +1 -1
  270. package/interfaces.d.ts +3 -0
  271. package/kernel.js +1 -1
  272. package/layers/CSVLayer.js +1 -1
  273. package/layers/CatalogLayer.js +1 -1
  274. package/layers/ElevationLayer.js +1 -1
  275. package/layers/FeatureLayer.js +1 -1
  276. package/layers/GeoJSONLayer.js +1 -1
  277. package/layers/GroupLayer.js +1 -1
  278. package/layers/ImageryLayer.js +1 -1
  279. package/layers/ImageryTileLayer.js +1 -1
  280. package/layers/Layer.js +1 -1
  281. package/layers/MapImageLayer.js +1 -1
  282. package/layers/MediaLayer.js +1 -1
  283. package/layers/SceneLayer.js +1 -1
  284. package/layers/StreamLayer.js +1 -1
  285. package/layers/SubtypeGroupLayer.js +1 -1
  286. package/layers/WCSLayer.js +1 -1
  287. package/layers/WFSLayer.js +1 -1
  288. package/layers/graphics/data/QueryEngineResult.js +1 -1
  289. package/layers/graphics/data/queryUtils.js +1 -1
  290. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  291. package/layers/graphics/sources/MemorySource.js +1 -1
  292. package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
  293. package/layers/graphics/sources/support/sourceUtils.js +1 -1
  294. package/layers/knowledgeGraph/cypherUtils.js +1 -1
  295. package/layers/mixins/ArcGISImageService.js +1 -1
  296. package/layers/mixins/PortalLayer.js +1 -1
  297. package/layers/mixins/TiledImagery.js +1 -1
  298. package/layers/raster/datasets/FunctionRaster.js +1 -1
  299. package/layers/raster/datasets/pixelReader.js +1 -1
  300. package/layers/raster/functions/clipUtils.js +1 -1
  301. package/layers/raster/functions/rasterProjectionHelper.js +1 -1
  302. package/layers/support/Sublayer.js +1 -1
  303. package/layers/support/arcgisLayers.js +1 -1
  304. package/layers/support/featureLayerUtils.js +1 -1
  305. package/layers/support/fromPortalItem.js +1 -1
  306. package/layers/support/layersLoader.js +1 -1
  307. package/layers/support/vectorTileLayerLoader.js +1 -1
  308. package/libs/basisu/BasisUEncoder.js +1 -1
  309. package/libs/basisu/BasisUTranscoder.js +1 -1
  310. package/libs/dracoMeshDecoder/dracoMeshDecoder.js +1 -1
  311. package/libs/dxtEncoder/DXTEncoder.js +1 -1
  312. package/libs/i3s/I3SModule.js +1 -1
  313. package/libs/parquet/loadParquetModule.js +1 -1
  314. package/libs/text/loadTextModule.js +1 -1
  315. package/networks/UtilityNetwork.js +1 -1
  316. package/networks/support/utils.js +1 -1
  317. package/package.json +3 -3
  318. package/popup/FeatureContentCollection.js +1 -1
  319. package/popup/Features.js +1 -1
  320. package/portal/Portal.js +1 -1
  321. package/portal/PortalItem.js +1 -1
  322. package/portal/PortalItemResource.js +1 -1
  323. package/portal/PortalUser.js +1 -1
  324. package/renderers/support/DictionaryLoader.js +1 -1
  325. package/request/process.js +1 -1
  326. package/request/queue.js +1 -1
  327. package/request.js +1 -1
  328. package/rest/geoprocessor/utils.js +1 -1
  329. package/rest/knowledgeGraph/wasmInterface/knowledgeWasmAccess.js +1 -1
  330. package/rest/support/JobInfo.js +1 -1
  331. package/rest/utils.js +1 -1
  332. package/smartMapping/renderers/support/rendererUtils.js +1 -1
  333. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  334. package/support/revision.js +1 -1
  335. package/support/tests/serviceMockDependencies.js +1 -1
  336. package/support/zipUtils.js +1 -1
  337. package/symbols/WebStyleSymbol.js +1 -1
  338. package/symbols/cim/CIMOperators.js +1 -1
  339. package/symbols/cim/cimAnalyzer.js +1 -1
  340. package/symbols/cim/defaultCIMValues.js +1 -1
  341. package/symbols/cim/effects/EffectCircularSector.js +2 -0
  342. package/symbols/cim/types.d.ts +42 -1
  343. package/symbols/cim/utils.js +1 -1
  344. package/symbols/support/symbolLayerUtils.js +1 -1
  345. package/symbols/support/symbolUtils.js +1 -1
  346. package/symbols/support/utils.js +1 -1
  347. package/undoredo/support/ServiceVersionInfo.js +1 -1
  348. package/versionManagement/VersionManagementService.js +1 -1
  349. package/views/2d/engine/Stage.js +1 -1
  350. package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
  351. package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
  352. package/views/2d/engine/vectorTiles/TileParser.js +1 -1
  353. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  354. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  355. package/views/2d/engine/vectorTiles/WorkerTile.js +1 -1
  356. package/views/2d/engine/vectorTiles/WorkerTileHandler.js +1 -1
  357. package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSource.js +2 -0
  358. package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSourceWorker.js +2 -0
  359. package/views/2d/engine/vectorTiles/style/RemoteVectorTileSource.js +2 -0
  360. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  361. package/views/2d/engine/vectorTiles/style/VectorTilePbfWriter.js +2 -0
  362. package/views/2d/engine/vectorTiles/style/VectorTileSource.js +1 -1
  363. package/views/2d/engine/vectorTiles/style/encodeVectorTileFeatures.js +2 -0
  364. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  365. package/views/2d/engine/webgl/GlyphSDFCreator.js +1 -1
  366. package/views/2d/engine/webgl/GlyphSource.js +1 -1
  367. package/views/2d/engine/webgl/GlyphWorker.js +2 -0
  368. package/views/2d/engine/webgl/Painter.js +1 -1
  369. package/views/2d/engine/webgl/TextureManager.js +1 -1
  370. package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
  371. package/views/2d/engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js +1 -1
  372. package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js +1 -1
  373. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
  374. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
  375. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  376. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  377. package/views/2d/layers/RouteLayerView2D.js +1 -1
  378. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  379. package/views/2d/layers/features/Processor.js +1 -1
  380. package/views/2d/layers/features/schema/processor/MatcherSchema.js +1 -1
  381. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  382. package/views/2d/layers/features/support/FeatureSetReaderVectorTileFeatureCursor.js +2 -0
  383. package/views/2d/layers/support/MediaLayerInteraction.js +1 -1
  384. package/views/3d/analysis/Viewshed/ViewshedConfiguration.js +1 -1
  385. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  386. package/views/3d/analysis/Viewshed/ViewshedObserverManipulatedObject3D.js +1 -1
  387. package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +1 -1
  388. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  389. package/views/3d/analysis/Viewshed/viewshedToolManipulatorUtils.js +1 -1
  390. package/views/3d/interactive/manipulatorUtils.js +1 -1
  391. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  392. package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
  393. package/views/3d/layers/I3SMeshView3D.js +1 -1
  394. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  395. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  396. package/views/3d/layers/SceneLayerWorker.js +1 -1
  397. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  398. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  399. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  400. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  401. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  402. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  403. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  404. package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
  405. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  406. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  407. package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
  408. package/views/3d/layers/support/FlowTileTree3DDebugger.js +1 -1
  409. package/views/3d/layers/support/TerrainTileTree3DDebugger.js +1 -1
  410. package/views/3d/state/ViewStateManager.js +1 -1
  411. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  412. package/views/3d/support/CombinedElevationProvider.js +1 -1
  413. package/views/3d/support/viewpointUtils.js +1 -1
  414. package/views/3d/terrain/TerrainSurface.js +1 -1
  415. package/views/3d/terrain/TransparencyMode.js +2 -0
  416. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  417. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  418. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  419. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialInitParameters.js +1 -1
  420. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
  421. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  422. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +7 -7
  423. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  424. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  425. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  426. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  427. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  428. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  429. package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
  430. package/views/PopupView.js +1 -1
  431. package/views/SceneView.js +1 -1
  432. package/views/VideoView.js +1 -1
  433. package/views/View.js +1 -1
  434. package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
  435. package/views/draw/PointDrawAction.js +1 -1
  436. package/views/draw/PolygonDrawAction.js +1 -1
  437. package/views/draw/PolylineDrawAction.js +1 -1
  438. package/views/draw/SegmentDrawAction.js +1 -1
  439. package/views/draw/support/createSnappingVisualizer.js +1 -1
  440. package/views/interactive/snapping/SnappingManager.js +1 -1
  441. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  442. package/views/layers/HighlightableLayerView.d.ts +2 -0
  443. package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
  444. package/views/selection/SelectionOperation.js +1 -1
  445. package/views/support/GeometryWorker.js +1 -1
  446. package/views/support/GroundElevationSampler.js +1 -1
  447. package/webdoc/support/resourceUtils.js +1 -1
  448. package/webdoc/support/webdocLoadUtils.js +1 -1
  449. package/webdoc/support/webdocSaveUtils.js +1 -1
  450. package/webscene/Slide.js +1 -1
  451. package/webscene/spec-certification/api.js +1 -1
  452. package/webscene/spec-certification/spec.js +1 -1
  453. package/webscene/support/analysisUtils.js +1 -1
  454. package/widgets/BasemapLayerList.js +1 -1
  455. package/widgets/BatchAttributeForm/ValueChangeTransaction.js +1 -1
  456. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  457. package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
  458. package/widgets/BatchAttributeForm/templates/support/textElementTemplateUtils.js +1 -1
  459. package/widgets/BatchAttributeForm.js +1 -1
  460. package/widgets/CatalogLayerList.js +1 -1
  461. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  462. package/widgets/Editor/UpdateWorkflow.js +1 -1
  463. package/widgets/Editor/legacy/CreateFeaturesWorkflow.js +1 -1
  464. package/widgets/Editor/legacy/UpdateWorkflow.js +1 -1
  465. package/widgets/Editor/modelUploadUtils.js +1 -1
  466. package/widgets/Editor/support/mergeFeaturesUtils.js +1 -1
  467. package/widgets/Editor/support/splitFeatureUtils.js +1 -1
  468. package/widgets/Editor/workflowUtils.js +1 -1
  469. package/widgets/Editor.js +1 -1
  470. package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
  471. package/widgets/ElevationProfile.js +1 -1
  472. package/widgets/Feature/FeatureMedia.js +1 -1
  473. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  474. package/widgets/Feature/FeatureRelationship.js +1 -1
  475. package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
  476. package/widgets/Feature.js +1 -1
  477. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  478. package/widgets/FeatureForm/support/textManipulationUtils.js +1 -1
  479. package/widgets/FeatureForm.js +1 -1
  480. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  481. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  482. package/widgets/FeatureTable/Grid/types.d.ts +78 -4
  483. package/widgets/FeatureTable/support/FeatureStore.d.ts +675 -0
  484. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  485. package/widgets/FeatureTable/support/types.d.ts +28 -0
  486. package/widgets/Features/FeaturesViewModel.js +1 -1
  487. package/widgets/Features.js +1 -1
  488. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  489. package/widgets/LayerList/ListItemPanel.js +1 -1
  490. package/widgets/LayerList.js +1 -1
  491. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  492. package/widgets/Legend/support/colorRampUtils.js +1 -1
  493. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  494. package/widgets/Legend/support/utils.js +1 -1
  495. package/widgets/Measurement.js +1 -1
  496. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  497. package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
  498. package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
  499. package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
  500. package/widgets/OrientedImageryViewer.js +1 -1
  501. package/widgets/PanoramicVideoViewer.js +1 -1
  502. package/widgets/PanoramicViewer/support/PanoramicMedia.js +1 -1
  503. package/widgets/PanoramicViewer/support/importUtils.js +1 -1
  504. package/widgets/PanoramicViewer.js +1 -1
  505. package/widgets/Print.js +1 -1
  506. package/widgets/Search/SearchViewModel.js +1 -1
  507. package/widgets/Search/support/layerSearchUtils.js +1 -1
  508. package/widgets/Search/support/locatorUtils.js +1 -1
  509. package/widgets/Sketch/SketchViewModel.js +1 -1
  510. package/widgets/Sketch/support/PluginManager.js +1 -1
  511. package/widgets/Sketch.js +1 -1
  512. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  513. package/widgets/support/SnappingControls.js +1 -1
  514. package/widgets/support/symbolPreviewUtils.js +1 -1
  515. package/arcade/geometry/offset.js +0 -2
  516. package/assets/esri/core/workers/chunks/067b00498ae85f635f60.js +0 -1
  517. package/assets/esri/core/workers/chunks/0b20f92bae2b4c40d299.js +0 -1
  518. package/assets/esri/core/workers/chunks/0c582abc8d25249eb530.js +0 -1
  519. package/assets/esri/core/workers/chunks/0d6776055e9b34c14151.js +0 -1
  520. package/assets/esri/core/workers/chunks/0e6b6fcc55cc43ede1fc.js +0 -1
  521. package/assets/esri/core/workers/chunks/126f1f6b355723db6c4f.js +0 -1
  522. package/assets/esri/core/workers/chunks/149284464115981694ff.js +0 -1
  523. package/assets/esri/core/workers/chunks/181f330314c1989f642f.js +0 -1
  524. package/assets/esri/core/workers/chunks/1840d74ebae777a0200b.js +0 -1
  525. package/assets/esri/core/workers/chunks/1bfbdec791e19f5a2534.js +0 -1
  526. package/assets/esri/core/workers/chunks/1d38a710cf799cb0e5b3.js +0 -1
  527. package/assets/esri/core/workers/chunks/1d8280f63a6698e74f20.js +0 -1
  528. package/assets/esri/core/workers/chunks/1f48438b3055afeb710f.js +0 -1
  529. package/assets/esri/core/workers/chunks/25999b6f96ec305a7679.js +0 -1
  530. package/assets/esri/core/workers/chunks/28565756f884d0851003.js +0 -1
  531. package/assets/esri/core/workers/chunks/2a5a165848413764381b.js +0 -1
  532. package/assets/esri/core/workers/chunks/2e7a5bb740281ef59199.js +0 -1
  533. package/assets/esri/core/workers/chunks/2f87a49bdd00f899d81d.js +0 -1
  534. package/assets/esri/core/workers/chunks/302d91b7c480c6c9304b.js +0 -1
  535. package/assets/esri/core/workers/chunks/30c53a7e1ad5aa52f2f3.js +0 -1
  536. package/assets/esri/core/workers/chunks/3b493e8043ec1a2a5d96.js +0 -1
  537. package/assets/esri/core/workers/chunks/3ddd717ea12d9823eee2.js +0 -1
  538. package/assets/esri/core/workers/chunks/3f84ade6285560b692d1.js +0 -1
  539. package/assets/esri/core/workers/chunks/4129b27fcd4103cdc499.js +0 -1
  540. package/assets/esri/core/workers/chunks/41f7f3615d3ecb87c59a.js +0 -1
  541. package/assets/esri/core/workers/chunks/465a050fd838ee8eddf3.js +0 -1
  542. package/assets/esri/core/workers/chunks/46d8a1d6f7341ad20749.js +0 -1
  543. package/assets/esri/core/workers/chunks/48a0dfaabb9b4bce4191.js +0 -1
  544. package/assets/esri/core/workers/chunks/4addea2e35b0c845743e.js +0 -1
  545. package/assets/esri/core/workers/chunks/4ae626868e14bedd7fc5.js +0 -1
  546. package/assets/esri/core/workers/chunks/529ee4670940720e888b.js +0 -1
  547. package/assets/esri/core/workers/chunks/538bdf02c4dfb5ec72fe.js +0 -1
  548. package/assets/esri/core/workers/chunks/59d1708ae13c6e7e6e55.js +0 -1
  549. package/assets/esri/core/workers/chunks/5adf16c034a590b5e9f5.js +0 -1
  550. package/assets/esri/core/workers/chunks/5fb0e8f89b885e5e3742.js +0 -1
  551. package/assets/esri/core/workers/chunks/60f9b37dd738d884c48d.js +0 -1
  552. package/assets/esri/core/workers/chunks/62c8413f3bbc1378273d.js +0 -1
  553. package/assets/esri/core/workers/chunks/632ab11cdd4b0d9a5cc5.js +0 -1
  554. package/assets/esri/core/workers/chunks/663cf8bff17c894cd5f8.js +0 -1
  555. package/assets/esri/core/workers/chunks/6cc1120554bcb1b4899b.js +0 -1
  556. package/assets/esri/core/workers/chunks/6d1371b521c7f94fd77e.js +0 -1
  557. package/assets/esri/core/workers/chunks/6f102c90908c9900cdaa.js +0 -1
  558. package/assets/esri/core/workers/chunks/7278fdf6bfcdffa10a7f.js +0 -1
  559. package/assets/esri/core/workers/chunks/73cb499d7d68c59ba34e.js +0 -1
  560. package/assets/esri/core/workers/chunks/76bccc318d7cc33829a7.js +0 -1
  561. package/assets/esri/core/workers/chunks/777eafdb86b26b35c803.js +0 -1
  562. package/assets/esri/core/workers/chunks/7821aeba3e414b318a75.js +0 -1
  563. package/assets/esri/core/workers/chunks/7ac47a9ad244100bc3b1.js +0 -1
  564. package/assets/esri/core/workers/chunks/7b0ed52363704cfce129.js +0 -1
  565. package/assets/esri/core/workers/chunks/7c57354d026e27e056d4.js +0 -1
  566. package/assets/esri/core/workers/chunks/7dd672c25beb8813cc75.js +0 -2
  567. package/assets/esri/core/workers/chunks/7eb94fc75926bc739233.js +0 -1
  568. package/assets/esri/core/workers/chunks/7f125963555dc1ce63ad.js +0 -1
  569. package/assets/esri/core/workers/chunks/805c97b875d3066fb8df.js +0 -1
  570. package/assets/esri/core/workers/chunks/86ed75b7169b8ee43025.js +0 -1
  571. package/assets/esri/core/workers/chunks/88c3b60b403e2454b56e.js +0 -1
  572. package/assets/esri/core/workers/chunks/894343e415639df88243.js +0 -1
  573. package/assets/esri/core/workers/chunks/8b4759cef5ae5e43253b.js +0 -1
  574. package/assets/esri/core/workers/chunks/8ba4175f5e9a24ffecf7.js +0 -1
  575. package/assets/esri/core/workers/chunks/8e1d4867406753c5483c.js +0 -1
  576. package/assets/esri/core/workers/chunks/8e38c5e63aae42bdf5a4.js +0 -29
  577. package/assets/esri/core/workers/chunks/8f785b722b1a131bf370.js +0 -1
  578. package/assets/esri/core/workers/chunks/8f8db62f126e4a8c1bf7.js +0 -1
  579. package/assets/esri/core/workers/chunks/8f9874f42f21a4cb3acd.js +0 -1
  580. package/assets/esri/core/workers/chunks/90f4b81c6034253b70d7.js +0 -1
  581. package/assets/esri/core/workers/chunks/93ab247ff34694ac60eb.js +0 -1
  582. package/assets/esri/core/workers/chunks/9954149def644c371894.js +0 -1
  583. package/assets/esri/core/workers/chunks/9dfb7d120195991e9672.js +0 -1
  584. package/assets/esri/core/workers/chunks/9ed5e6b06afea6c85330.js +0 -1
  585. package/assets/esri/core/workers/chunks/a108f276659d5f25352c.js +0 -1
  586. package/assets/esri/core/workers/chunks/a504fa17d83facf1c01f.js +0 -1
  587. package/assets/esri/core/workers/chunks/a5fdb02b1714e93fa69e.js +0 -1
  588. package/assets/esri/core/workers/chunks/a9f616f22042b0dce8b9.js +0 -1
  589. package/assets/esri/core/workers/chunks/afd63c18ce4656271c8e.js +0 -1
  590. package/assets/esri/core/workers/chunks/b059dabb1c732829487c.js +0 -1
  591. package/assets/esri/core/workers/chunks/b318823aefcefad6fad5.js +0 -1
  592. package/assets/esri/core/workers/chunks/b378e504a5b1afc8d0ce.js +0 -1
  593. package/assets/esri/core/workers/chunks/b5397dc03fa0bd654ba6.js +0 -1
  594. package/assets/esri/core/workers/chunks/b7bcb31737b01d7736d0.js +0 -1
  595. package/assets/esri/core/workers/chunks/ba030767cf935f967454.js +0 -1
  596. package/assets/esri/core/workers/chunks/be291d920ebc68fde02b.js +0 -2
  597. package/assets/esri/core/workers/chunks/c10a0eebd935472d8fae.js +0 -1
  598. package/assets/esri/core/workers/chunks/c16e83e448a32d13048f.js +0 -1
  599. package/assets/esri/core/workers/chunks/c2db773201adca204f95.js +0 -1
  600. package/assets/esri/core/workers/chunks/c4c83b5129c279c3615b.js +0 -1
  601. package/assets/esri/core/workers/chunks/c7e391df714839484cd1.js +0 -1
  602. package/assets/esri/core/workers/chunks/cca095f0c623e037002d.js +0 -1
  603. package/assets/esri/core/workers/chunks/cded485ad893a7dd2948.js +0 -1
  604. package/assets/esri/core/workers/chunks/cf03d391d50a4c7aca4f.js +0 -1
  605. package/assets/esri/core/workers/chunks/cf8ce63711488f2e677c.js +0 -1
  606. package/assets/esri/core/workers/chunks/d198ecb1fe3690d6092f.js +0 -2
  607. package/assets/esri/core/workers/chunks/d2a51c797b2966cb95f3.js +0 -2
  608. package/assets/esri/core/workers/chunks/d303621c902330be5035.js +0 -1
  609. package/assets/esri/core/workers/chunks/d4d385d19e62ef1c286f.js +0 -1
  610. package/assets/esri/core/workers/chunks/d4f005dadba75422b401.js +0 -1
  611. package/assets/esri/core/workers/chunks/d5e15021928e95c11463.js +0 -1
  612. package/assets/esri/core/workers/chunks/d6500f6b2ff115d9eb09.js +0 -1
  613. package/assets/esri/core/workers/chunks/d9c78c2db04a06ee83ed.js +0 -1
  614. package/assets/esri/core/workers/chunks/dccb46c7dce68528c72b.js +0 -1
  615. package/assets/esri/core/workers/chunks/df174346a7e9b629a392.js +0 -1
  616. package/assets/esri/core/workers/chunks/e08c64e4ae5a68eae2be.js +0 -1
  617. package/assets/esri/core/workers/chunks/e1492d2404c3ed82931e.js +0 -1
  618. package/assets/esri/core/workers/chunks/e34ed3b818b2eb4116c5.js +0 -1
  619. package/assets/esri/core/workers/chunks/e7149d23615fee31ab7e.js +0 -1
  620. package/assets/esri/core/workers/chunks/ec774f5d6ea5c29536e5.js +0 -1
  621. package/assets/esri/core/workers/chunks/ed71a4e353715db0a6e9.js +0 -1
  622. package/assets/esri/core/workers/chunks/f029c12f1afee0e9b2a1.js +0 -1
  623. package/assets/esri/core/workers/chunks/f4eda59ec1e816ecc827.js +0 -1
  624. package/assets/esri/core/workers/chunks/f54eba484f40d5eeb590.js +0 -1
  625. package/assets/esri/core/workers/chunks/f622b27ebdf1c918fd6d.js +0 -1
  626. package/assets/esri/core/workers/chunks/f6a13f07a5f7b781a9a8.js +0 -1
  627. package/assets/esri/core/workers/chunks/f6f1122bed931f1d960b.js +0 -1
  628. package/assets/esri/core/workers/chunks/f8b8d3d2710c83acccf3.js +0 -1
  629. package/assets/esri/core/workers/chunks/f98bb3885bfc7f18f26c.js +0 -1
  630. package/assets/esri/core/workers/chunks/fc827f58db3194922056.js +0 -1
  631. package/chunks/ShadedColorMaterial.glsl.js +0 -13
  632. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +0 -2
  633. package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +0 -2
  634. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +0 -2
  635. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +0 -2
  636. /package/assets/esri/core/workers/chunks/{d198ecb1fe3690d6092f.js.LICENSE.txt → 09653bd2a31d293a10d9.js.LICENSE.txt} +0 -0
  637. /package/assets/esri/core/workers/chunks/{f82cd34a79c8aa58d40c.js.LICENSE.txt → 3b3a8a6167f2e1eeb828.js.LICENSE.txt} +0 -0
  638. /package/assets/esri/core/workers/chunks/{d2a51c797b2966cb95f3.js.LICENSE.txt → c03da138651ac53cadcb.js.LICENSE.txt} +0 -0
  639. /package/assets/esri/core/workers/chunks/{7dd672c25beb8813cc75.js.LICENSE.txt → fa5d27e47d47ff8fcb96.js.LICENSE.txt} +0 -0
package/portal/Portal.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../config.js";import{id as r}from"../kernel.js";import o from"../request.js";import s from"../core/Error.js";import has from"../core/has.js";import{JSONSupportMixin as a}from"../core/JSONSupport.js";import{Loadable as i}from"../core/Loadable.js";import{destroyMaybe as l,removeMaybe as u}from"../core/maybe.js";import{throwIfAborted as n,isAborted as p,createAbortError as h,throwIfAbortError as d}from"../core/promiseUtils.js";import{property as y,subclass as c}from"../core/accessorSupport/decorators.js";import{ensureType as m}from"../core/accessorSupport/ensureType.js";import f from"../geometry/Extent.js";import{getLocale as v}from"../intl/locale.js";import{ensureDefaultPortalInstance as S}from"./portalDefault.js";import g from"./PortalGroup.js";import P from"./PortalQueryParams.js";import G from"./PortalQueryResult.js";import O from"./PortalUser.js";import{isApiKeyApplicable as D,hasBasemapStylesApiKey as B}from"../support/apiKeyUtils.js";import{reader as Q}from"../core/accessorSupport/decorators/reader.js";var _;let b;const U={PortalGroup:()=>Promise.resolve({default:g}),PortalItem:()=>import("./PortalItem.js"),PortalUser:()=>Promise.resolve({default:O})};let M=class extends(a(i)){static{_=this}static{this.AUTH_MODE_ANONYMOUS="anonymous"}static{this.AUTH_MODE_AUTO="auto"}static{this.AUTH_MODE_IMMEDIATE="immediate"}static{this.AUTH_MODE_NO_PROMPT="no-prompt"}constructor(e){super(e),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.g3DTilesGalleryGroupQuery=null,this.g3dTilesEnabled=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.default3DBasemapQuery=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.layoutGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.hasClassificationSchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.recycleBinEnabled=!1,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=t.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useDefault3dBasemap=!1,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e}destroy(){C.unregister(this),this.defaultBasemap=l(this.defaultBasemap),this.defaultDevBasemap=l(this.defaultDevBasemap),this.defaultVectorBasemap=l(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=u(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(e){if(e)for(const r of e)t.request.trustedServers.includes(r)||t.request.trustedServers.push(r);return e}readDefaultBasemap(e){return this._readBasemap(e)}readDefaultDevBasemap(e){return this._readBasemap(e)}readDefaultVectorBasemap(e){return this._readBasemap(e)}get extraQuery(){const e=this.user?.orgId,t=!e||this.canSearchPublic;return this.id&&!t?`orgid:${this.id}`:null}get hasAPIKey(){return D(this.restUrl)}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get loaded(){return super.loaded}get restUrl(){let e=this.url;if(e){const t=e.indexOf("/sharing");e=t>0?e.slice(0,t):this.url.replace(/\/+$/,""),e+="/sharing/rest"}return e}get thumbnailUrl(){const e=this.restUrl,t=this.thumbnail;return e&&t?this._normalizeSSL(e+"/portals/self/resources/"+t):null}readUrlKey(e){return e?e.toLowerCase():e}readUser(e){let t=null;return e&&(t=O.fromJSON(e),t.portal=this),t}load(e){const t=import("../Basemap.js").then(({default:t})=>{n(e),b=t}).then(()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,e)).then(e=>{if(!this.hasAPIKey&&r){const e=r;this.credential=e.findCredential(this.restUrl),this.credential||this.authMode!==_.AUTH_MODE_AUTO&&this.authMode!==_.AUTH_MODE_NO_PROMPT||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=e.on("credential-create",T(new WeakRef(this))),C.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=e,this.read(e)});return this.addResolvingPromise(t),Promise.resolve(this)}async createElevationLayers(){await this.load();const e=this._getHelperService("defaultElevationLayers"),t=(await import("../layers/ElevationLayer.js")).default;return e?e.map(e=>new t({id:e.id,url:e.url})):[]}async fetchBasemaps(e,t){const r=await this._fetchBasemaps(e,t);if(!0===t?.include3d&&!1!==this.use3dBasemaps){if(this.g3dTilesEnabled&&this.g3DTilesGalleryGroupQuery&&has("enable-feature:basemap-groundlayers")){const e=await this._fetchBasemaps3D(this.g3DTilesGalleryGroupQuery,t);r.unshift(...e)}const o=await this._fetchBasemaps3D(e,t);r.unshift(...o)}return r}async fetchDefault3DBasemap(e){if(!this.useDefault3dBasemap||!this.default3DBasemapQuery||"none"===this.default3DBasemapQuery)return null;const t=new P;t.query=this.default3DBasemapQuery,t.disableExtraQuery=!0;const r=(await this.queryItems(t,e)).results.find(e=>"Web Scene"===e.type);return r?new b({portalItem:r}):null}fetchCategorySchema(e){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",e).then(e=>e.categorySchema):p(e)?Promise.reject(h()):Promise.resolve([])}async fetchClassificationSchema(e){return this.hasClassificationSchema?this.request(this.restUrl+"/portals/self/classification/classificationSchema",e).then(e=>e.classificationSchema):null}fetchFeaturedGroups(e){const t=this.featuredGroups,r=new P({num:100,sortField:"title"});if(t?.length){const o=[];for(const e of t)o.push(`(title:"${e.title}" AND owner:${e.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,e).then(e=>e.results)}return p(e)?Promise.reject(h()):Promise.resolve([])}fetchRegions(e){const t=this.user?.culture||this.culture||v();return this.request(this.restUrl+"/portals/regions",{...e,query:{culture:t}})}fetchSettings(e){const t=this.user?.culture||this.culture||v();return this.request(this.restUrl+"/portals/self/settings",{...e,query:{culture:t}})}static getDefault(){return S(()=>new _)}queryGroups(e,t){return this.queryPortal("/community/groups",e,"PortalGroup",t)}queryItems(e,t){return this.queryPortal("/search",e,"PortalItem",t)}queryUsers(e,t){return e.sortField||(e.sortField="username"),this.queryPortal("/community/users",e,"PortalUser",t)}fetchSelf(e=this.authMode,t=!1,r){const o=this.restUrl+"/portals/self",s={authMode:e,query:{culture:v().toLowerCase()},withCredentials:!0,...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),t&&(s.query.default=!0),this.request(o,s)}queryPortal(e,t,r,o){const s=m(P,t),a=t=>this.request(this.restUrl+e,{...s.toRequestOptions(this),...o}).then(e=>{const r=s.clone();return r.start=e.nextStart,new G({nextQueryParams:r,queryParams:s,total:e.total,results:_._resultsToTypedArray(t,{portal:this},e,o)})}).then(e=>Promise.all(e.results.map(t=>"function"==typeof t.when?t.when():e)).then(()=>e,t=>(d(t),e)));return r&&U[r]?U[r]().then(({default:e})=>(n(o),a(e))):a()}signIn(){if(this.hasAPIKey)return this.load().then(()=>{if(!this.user)throw new s("portal:not-authenticated","Unable to authenticate user. Portal.user is missing")});if(this.authMode===_.AUTH_MODE_ANONYMOUS||this.authMode===_.AUTH_MODE_NO_PROMPT&&!r)return Promise.reject(new s("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const e=e=>Promise.resolve().then(()=>"not-loaded"===this.loadStatus?(e||(this.authMode="immediate"),this.load().then(()=>null)):"loading"===this.loadStatus?this.load().then(()=>this.credential?null:(this.credential=e,this.fetchSelf("immediate"))):this.user&&this.credential===e?null:(this.credential=e,this.fetchSelf("immediate"))).then(e=>{e&&(this.sourceJSON=e,this.read(e))});return r?r.getCredential(this.restUrl,{prompt:this.authMode!==_.AUTH_MODE_NO_PROMPT}).then(t=>e(t)):e(this.credential)}normalizeUrl(e){const t=this.credential?.token;return this._normalizeSSL(t?e+(e.includes("?")?"&":"?")+"token="+t:e)}requestToTypedArray(e,t,r){return this.request(e,t).then(e=>{const t=_._resultsToTypedArray(r,{portal:this},e);return Promise.all(t.map(t=>"function"==typeof t.when?t.when():e)).then(()=>t,()=>t)})}request(e,t={}){const r={f:"json",...t.query},{authMode:s=(this.authMode===_.AUTH_MODE_ANONYMOUS||this.authMode===_.AUTH_MODE_NO_PROMPT?this.authMode:"auto"),body:a=null,cacheBust:i=!1,method:l="auto",responseType:u="json",signal:n}=t,p={authMode:s,body:a,cacheBust:i,method:l,query:r,responseType:u,timeout:0,signal:n};return t.withCredentials&&(p.withCredentials=!0),o(this._normalizeSSL(e),p).then(e=>e.data)}toJSON(){throw new s("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new _({sourceJSON:e})}_getHelperService(e){const t=this.helperServices?.[e];if(!t)throw new s("portal:service-not-found",`The \`helperServices\` do not include an entry named "${e}"`);return t}async _fetchBasemaps(e,t){const r=new P;r.query=e||(B()?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const o=await this.queryGroups(r,t);if(!o.total)return[];const s=o.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=s.sortField||"name",r.sortOrder=s.sortOrder||"desc";const a=await s.queryItems(r,t);if(!a.total)return[];return a.results.filter(e=>"Web Map"===e.type).map(e=>new b({portalItem:e}))}async _fetchBasemaps3D(e,t){const r=e||this.basemapGalleryGroupQuery3D;if(!r)return[];if(B())return[];const o=new P({query:r,disableExtraQuery:!0}),s=await this.queryGroups(o,t);if(!s.total)return[];const a=s.results[0];o.num=100,o.query='type:"Web Scene"',o.sortField=a.sortField||"name",o.sortOrder=a.sortOrder||"desc";const i=await a.queryItems(o,t);if(!i.total)return[];return i.results.filter(e=>"Web Scene"===e.type).map(e=>new b({portalItem:e}))}_normalizeSSL(e){return e.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(e){if(e){const t=b.fromJSON(e);return t.portalItem={portal:this},t}return null}static _resultsToTypedArray(e,t,r,o){let s;if(r){const a=null!=o?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(e||t)&&(s=s.map(r=>{const o=Object.assign(e?e.fromJSON(r):r,t);return"function"==typeof o.load&&o.load(a),o}))}else s=[];return s}};e([y()],M.prototype,"access",void 0),e([y()],M.prototype,"allSSL",void 0),e([y()],M.prototype,"authMode",void 0),e([y()],M.prototype,"authorizedCrossOriginDomains",void 0),e([Q("authorizedCrossOriginDomains")],M.prototype,"readAuthorizedCrossOriginDomains",null),e([y()],M.prototype,"basemapGalleryGroupQuery",void 0),e([y({json:{name:"3DBasemapGalleryGroupQuery"}})],M.prototype,"basemapGalleryGroupQuery3D",void 0),e([y({json:{name:"g3DTilesGalleryGroupQuery"}})],M.prototype,"g3DTilesGalleryGroupQuery",void 0),e([y({json:{name:"g3dTilesEnabled"}})],M.prototype,"g3dTilesEnabled",void 0),e([y()],M.prototype,"bingKey",void 0),e([y()],M.prototype,"canListApps",void 0),e([y()],M.prototype,"canListData",void 0),e([y()],M.prototype,"canListPreProvisionedItems",void 0),e([y()],M.prototype,"canProvisionDirectPurchase",void 0),e([y()],M.prototype,"canSearchPublic",void 0),e([y()],M.prototype,"canShareBingPublic",void 0),e([y()],M.prototype,"canSharePublic",void 0),e([y()],M.prototype,"canSignInArcGIS",void 0),e([y()],M.prototype,"canSignInIDP",void 0),e([y()],M.prototype,"colorSetsGroupQuery",void 0),e([y()],M.prototype,"commentsEnabled",void 0),e([y({type:Date})],M.prototype,"created",void 0),e([y()],M.prototype,"credential",void 0),e([y()],M.prototype,"culture",void 0),e([y()],M.prototype,"currentVersion",void 0),e([y()],M.prototype,"customBaseUrl",void 0),e([y()],M.prototype,"default3DBasemapQuery",void 0),e([y()],M.prototype,"defaultBasemap",void 0),e([Q("defaultBasemap")],M.prototype,"readDefaultBasemap",null),e([y()],M.prototype,"defaultDevBasemap",void 0),e([Q("defaultDevBasemap")],M.prototype,"readDefaultDevBasemap",null),e([y({type:f})],M.prototype,"defaultExtent",void 0),e([y()],M.prototype,"defaultVectorBasemap",void 0),e([Q("defaultVectorBasemap")],M.prototype,"readDefaultVectorBasemap",null),e([y()],M.prototype,"description",void 0),e([y()],M.prototype,"devBasemapGalleryGroupQuery",void 0),e([y()],M.prototype,"eueiEnabled",void 0),e([y({readOnly:!0})],M.prototype,"extraQuery",null),e([y()],M.prototype,"featuredGroups",void 0),e([y()],M.prototype,"featuredItemsGroupQuery",void 0),e([y()],M.prototype,"galleryTemplatesGroupQuery",void 0),e([y()],M.prototype,"layoutGroupQuery",void 0),e([y()],M.prototype,"livingAtlasGroupQuery",void 0),e([y({readOnly:!0})],M.prototype,"hasAPIKey",null),e([y()],M.prototype,"hasCategorySchema",void 0),e([y()],M.prototype,"hasClassificationSchema",void 0),e([y()],M.prototype,"helpBase",void 0),e([y()],M.prototype,"helperServices",void 0),e([y()],M.prototype,"helpMap",void 0),e([y()],M.prototype,"homePageFeaturedContent",void 0),e([y()],M.prototype,"homePageFeaturedContentCount",void 0),e([y()],M.prototype,"httpPort",void 0),e([y()],M.prototype,"httpsPort",void 0),e([y()],M.prototype,"id",void 0),e([y()],M.prototype,"ipCntryCode",void 0),e([y({readOnly:!0})],M.prototype,"isOrganization",null),e([y()],M.prototype,"isPortal",void 0),e([y()],M.prototype,"isReadOnly",void 0),e([y({readOnly:!0})],M.prototype,"itemPageUrl",null),e([y()],M.prototype,"layerTemplatesGroupQuery",void 0),e([y()],M.prototype,"maxTokenExpirationMinutes",void 0),e([y({type:Date})],M.prototype,"modified",void 0),e([y()],M.prototype,"name",void 0),e([y()],M.prototype,"portalHostname",void 0),e([y()],M.prototype,"portalMode",void 0),e([y()],M.prototype,"portalProperties",void 0),e([y()],M.prototype,"region",void 0),e([y()],M.prototype,"recycleBinEnabled",void 0),e([y({readOnly:!0})],M.prototype,"restUrl",null),e([y()],M.prototype,"rotatorPanels",void 0),e([y()],M.prototype,"showHomePageDescription",void 0),e([y()],M.prototype,"sourceJSON",void 0),e([y()],M.prototype,"staticImagesUrl",void 0),e([y({json:{name:"2DStylesGroupQuery"}})],M.prototype,"stylesGroupQuery2d",void 0),e([y({json:{name:"stylesGroupQuery"}})],M.prototype,"stylesGroupQuery3d",void 0),e([y()],M.prototype,"supportsHostedServices",void 0),e([y()],M.prototype,"symbolSetsGroupQuery",void 0),e([y()],M.prototype,"templatesGroupQuery",void 0),e([y()],M.prototype,"thumbnail",void 0),e([y({readOnly:!0})],M.prototype,"thumbnailUrl",null),e([y()],M.prototype,"units",void 0),e([y()],M.prototype,"url",void 0),e([y()],M.prototype,"urlKey",void 0),e([Q("urlKey")],M.prototype,"readUrlKey",null),e([y()],M.prototype,"user",void 0),e([Q("user")],M.prototype,"readUser",null),e([y()],M.prototype,"use3dBasemaps",void 0),e([y()],M.prototype,"useDefault3dBasemap",void 0),e([y()],M.prototype,"useStandardizedQuery",void 0),e([y()],M.prototype,"useVectorBasemaps",void 0),e([y()],M.prototype,"vectorBasemapGalleryGroupQuery",void 0),M=_=e([c("esri.portal.Portal")],M);const C=new FinalizationRegistry(e=>{e.remove()});function T(e){const t=r;return()=>{const r=e.deref();r&&t.findCredential(r.restUrl)&&r.signIn().catch(()=>{})}}export{M as default};
2
+ import{__decorate as e}from"tslib";import t from"../config.js";import{id as r}from"../kernel.js";import o from"../request.js";import s from"../core/Error.js";import has from"../core/has.js";import{JSONSupportMixin as a}from"../core/JSONSupport.js";import{Loadable as i}from"../core/Loadable.js";import{destroyMaybe as l,removeMaybe as u}from"../core/maybe.js";import{throwIfAborted as n,isAborted as p,createAbortError as h,throwIfAbortError as d}from"../core/promiseUtils.js";import{property as y,subclass as c}from"../core/accessorSupport/decorators.js";import{ensureType as m}from"../core/accessorSupport/ensureType.js";import f from"../geometry/Extent.js";import{getLocale as v}from"../intl/locale.js";import{ensureDefaultPortalInstance as S}from"./portalDefault.js";import g from"./PortalGroup.js";import P from"./PortalQueryParams.js";import G from"./PortalQueryResult.js";import O from"./PortalUser.js";import{isApiKeyApplicable as D,hasBasemapStylesApiKey as B}from"../support/apiKeyUtils.js";import{reader as Q}from"../core/accessorSupport/decorators/reader.js";var _;let b;const U={PortalGroup:()=>Promise.resolve({default:g}),PortalItem:()=>import("./PortalItem.js"),PortalUser:()=>Promise.resolve({default:O})};let M=class extends(a(i)){static{_=this}static{this.AUTH_MODE_ANONYMOUS="anonymous"}static{this.AUTH_MODE_AUTO="auto"}static{this.AUTH_MODE_IMMEDIATE="immediate"}static{this.AUTH_MODE_NO_PROMPT="no-prompt"}constructor(e){super(e),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.g3DTilesGalleryGroupQuery=null,this.g3dTilesEnabled=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.default3DBasemapQuery=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.layoutGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.hasClassificationSchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.recycleBinEnabled=!1,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=t.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useDefault3dBasemap=!1,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e}destroy(){C.unregister(this),this.defaultBasemap=l(this.defaultBasemap),this.defaultDevBasemap=l(this.defaultDevBasemap),this.defaultVectorBasemap=l(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=u(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(e){if(e)for(const r of e)t.request.trustedServers.includes(r)||t.request.trustedServers.push(r);return e}readDefaultBasemap(e){return this._readBasemap(e)}readDefaultDevBasemap(e){return this._readBasemap(e)}readDefaultVectorBasemap(e){return this._readBasemap(e)}get extraQuery(){const e=this.user?.orgId,t=!e||this.canSearchPublic;return this.id&&!t?`orgid:${this.id}`:null}get hasAPIKey(){return D(this.restUrl)}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get loaded(){return super.loaded}get restUrl(){let e=this.url;if(e){const t=e.indexOf("/sharing");e=t>0?e.slice(0,t):this.url.replace(/\/+$/,""),e+="/sharing/rest"}return e}get thumbnailUrl(){const e=this.restUrl,t=this.thumbnail;return e&&t?this._normalizeSSL(e+"/portals/self/resources/"+t):null}readUrlKey(e){return e?e.toLowerCase():e}readUser(e){let t=null;return e&&(t=O.fromJSON(e),t.portal=this),t}load(e){const t=import("../Basemap.js").then(({default:t})=>{n(e),b=t}).then(()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,e)).then(e=>{if(!this.hasAPIKey&&r){const e=r;this.credential=e.findCredential(this.restUrl),this.credential||this.authMode!==_.AUTH_MODE_AUTO&&this.authMode!==_.AUTH_MODE_NO_PROMPT||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=e.on("credential-create",T(new WeakRef(this))),C.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=e,this.read(e)});return this.addResolvingPromise(t),Promise.resolve(this)}async createElevationLayers(){await this.load();const e=this._getHelperService("defaultElevationLayers"),t=(await(import("../layers/ElevationLayer.js"))).default;return e?e.map(e=>new t({id:e.id,url:e.url})):[]}async fetchBasemaps(e,t){const r=await this._fetchBasemaps(e,t);if(!0===t?.include3d&&!1!==this.use3dBasemaps){if(this.g3dTilesEnabled&&this.g3DTilesGalleryGroupQuery&&has("enable-feature:basemap-groundlayers")){const e=await this._fetchBasemaps3D(this.g3DTilesGalleryGroupQuery,t);r.unshift(...e)}const o=await this._fetchBasemaps3D(e,t);r.unshift(...o)}return r}async fetchDefault3DBasemap(e){if(!this.useDefault3dBasemap||!this.default3DBasemapQuery||"none"===this.default3DBasemapQuery)return null;const t=new P;t.query=this.default3DBasemapQuery,t.disableExtraQuery=!0;const r=(await this.queryItems(t,e)).results.find(e=>"Web Scene"===e.type);return r?new b({portalItem:r}):null}fetchCategorySchema(e){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",e).then(e=>e.categorySchema):p(e)?Promise.reject(h()):Promise.resolve([])}async fetchClassificationSchema(e){return this.hasClassificationSchema?this.request(this.restUrl+"/portals/self/classification/classificationSchema",e).then(e=>e.classificationSchema):null}fetchFeaturedGroups(e){const t=this.featuredGroups,r=new P({num:100,sortField:"title"});if(t?.length){const o=[];for(const e of t)o.push(`(title:"${e.title}" AND owner:${e.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,e).then(e=>e.results)}return p(e)?Promise.reject(h()):Promise.resolve([])}fetchRegions(e){const t=this.user?.culture||this.culture||v();return this.request(this.restUrl+"/portals/regions",{...e,query:{culture:t}})}fetchSettings(e){const t=this.user?.culture||this.culture||v();return this.request(this.restUrl+"/portals/self/settings",{...e,query:{culture:t}})}static getDefault(){return S(()=>new _)}queryGroups(e,t){return this.queryPortal("/community/groups",e,"PortalGroup",t)}queryItems(e,t){return this.queryPortal("/search",e,"PortalItem",t)}queryUsers(e,t){return e.sortField||(e.sortField="username"),this.queryPortal("/community/users",e,"PortalUser",t)}fetchSelf(e=this.authMode,t=!1,r){const o=this.restUrl+"/portals/self",s={authMode:e,query:{culture:v().toLowerCase()},withCredentials:!0,...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),t&&(s.query.default=!0),this.request(o,s)}queryPortal(e,t,r,o){const s=m(P,t),a=t=>this.request(this.restUrl+e,{...s.toRequestOptions(this),...o}).then(e=>{const r=s.clone();return r.start=e.nextStart,new G({nextQueryParams:r,queryParams:s,total:e.total,results:_._resultsToTypedArray(t,{portal:this},e,o)})}).then(e=>Promise.all(e.results.map(t=>"function"==typeof t.when?t.when():e)).then(()=>e,t=>(d(t),e)));return r&&U[r]?U[r]().then(({default:e})=>(n(o),a(e))):a()}signIn(){if(this.hasAPIKey)return this.load().then(()=>{if(!this.user)throw new s("portal:not-authenticated","Unable to authenticate user. Portal.user is missing")});if(this.authMode===_.AUTH_MODE_ANONYMOUS||this.authMode===_.AUTH_MODE_NO_PROMPT&&!r)return Promise.reject(new s("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const e=e=>Promise.resolve().then(()=>"not-loaded"===this.loadStatus?(e||(this.authMode="immediate"),this.load().then(()=>null)):"loading"===this.loadStatus?this.load().then(()=>this.credential?null:(this.credential=e,this.fetchSelf("immediate"))):this.user&&this.credential===e?null:(this.credential=e,this.fetchSelf("immediate"))).then(e=>{e&&(this.sourceJSON=e,this.read(e))});return r?r.getCredential(this.restUrl,{prompt:this.authMode!==_.AUTH_MODE_NO_PROMPT}).then(t=>e(t)):e(this.credential)}normalizeUrl(e){const t=this.credential?.token;return this._normalizeSSL(t?e+(e.includes("?")?"&":"?")+"token="+t:e)}requestToTypedArray(e,t,r){return this.request(e,t).then(e=>{const t=_._resultsToTypedArray(r,{portal:this},e);return Promise.all(t.map(t=>"function"==typeof t.when?t.when():e)).then(()=>t,()=>t)})}request(e,t={}){const r={f:"json",...t.query},{authMode:s=(this.authMode===_.AUTH_MODE_ANONYMOUS||this.authMode===_.AUTH_MODE_NO_PROMPT?this.authMode:"auto"),body:a=null,cacheBust:i=!1,method:l="auto",responseType:u="json",signal:n}=t,p={authMode:s,body:a,cacheBust:i,method:l,query:r,responseType:u,timeout:0,signal:n};return t.withCredentials&&(p.withCredentials=!0),o(this._normalizeSSL(e),p).then(e=>e.data)}toJSON(){throw new s("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new _({sourceJSON:e})}_getHelperService(e){const t=this.helperServices?.[e];if(!t)throw new s("portal:service-not-found",`The \`helperServices\` do not include an entry named "${e}"`);return t}async _fetchBasemaps(e,t){const r=new P;r.query=e||(B()?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const o=await this.queryGroups(r,t);if(!o.total)return[];const s=o.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=s.sortField||"name",r.sortOrder=s.sortOrder||"desc";const a=await s.queryItems(r,t);if(!a.total)return[];return a.results.filter(e=>"Web Map"===e.type).map(e=>new b({portalItem:e}))}async _fetchBasemaps3D(e,t){const r=e||this.basemapGalleryGroupQuery3D;if(!r)return[];if(B())return[];const o=new P({query:r,disableExtraQuery:!0}),s=await this.queryGroups(o,t);if(!s.total)return[];const a=s.results[0];o.num=100,o.query='type:"Web Scene"',o.sortField=a.sortField||"name",o.sortOrder=a.sortOrder||"desc";const i=await a.queryItems(o,t);if(!i.total)return[];return i.results.filter(e=>"Web Scene"===e.type).map(e=>new b({portalItem:e}))}_normalizeSSL(e){return e.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(e){if(e){const t=b.fromJSON(e);return t.portalItem={portal:this},t}return null}static _resultsToTypedArray(e,t,r,o){let s;if(r){const a=null!=o?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(e||t)&&(s=s.map(r=>{const o=Object.assign(e?e.fromJSON(r):r,t);return"function"==typeof o.load&&o.load(a),o}))}else s=[];return s}};e([y()],M.prototype,"access",void 0),e([y()],M.prototype,"allSSL",void 0),e([y()],M.prototype,"authMode",void 0),e([y()],M.prototype,"authorizedCrossOriginDomains",void 0),e([Q("authorizedCrossOriginDomains")],M.prototype,"readAuthorizedCrossOriginDomains",null),e([y()],M.prototype,"basemapGalleryGroupQuery",void 0),e([y({json:{name:"3DBasemapGalleryGroupQuery"}})],M.prototype,"basemapGalleryGroupQuery3D",void 0),e([y({json:{name:"g3DTilesGalleryGroupQuery"}})],M.prototype,"g3DTilesGalleryGroupQuery",void 0),e([y({json:{name:"g3dTilesEnabled"}})],M.prototype,"g3dTilesEnabled",void 0),e([y()],M.prototype,"bingKey",void 0),e([y()],M.prototype,"canListApps",void 0),e([y()],M.prototype,"canListData",void 0),e([y()],M.prototype,"canListPreProvisionedItems",void 0),e([y()],M.prototype,"canProvisionDirectPurchase",void 0),e([y()],M.prototype,"canSearchPublic",void 0),e([y()],M.prototype,"canShareBingPublic",void 0),e([y()],M.prototype,"canSharePublic",void 0),e([y()],M.prototype,"canSignInArcGIS",void 0),e([y()],M.prototype,"canSignInIDP",void 0),e([y()],M.prototype,"colorSetsGroupQuery",void 0),e([y()],M.prototype,"commentsEnabled",void 0),e([y({type:Date})],M.prototype,"created",void 0),e([y()],M.prototype,"credential",void 0),e([y()],M.prototype,"culture",void 0),e([y()],M.prototype,"currentVersion",void 0),e([y()],M.prototype,"customBaseUrl",void 0),e([y()],M.prototype,"default3DBasemapQuery",void 0),e([y()],M.prototype,"defaultBasemap",void 0),e([Q("defaultBasemap")],M.prototype,"readDefaultBasemap",null),e([y()],M.prototype,"defaultDevBasemap",void 0),e([Q("defaultDevBasemap")],M.prototype,"readDefaultDevBasemap",null),e([y({type:f})],M.prototype,"defaultExtent",void 0),e([y()],M.prototype,"defaultVectorBasemap",void 0),e([Q("defaultVectorBasemap")],M.prototype,"readDefaultVectorBasemap",null),e([y()],M.prototype,"description",void 0),e([y()],M.prototype,"devBasemapGalleryGroupQuery",void 0),e([y()],M.prototype,"eueiEnabled",void 0),e([y({readOnly:!0})],M.prototype,"extraQuery",null),e([y()],M.prototype,"featuredGroups",void 0),e([y()],M.prototype,"featuredItemsGroupQuery",void 0),e([y()],M.prototype,"galleryTemplatesGroupQuery",void 0),e([y()],M.prototype,"layoutGroupQuery",void 0),e([y()],M.prototype,"livingAtlasGroupQuery",void 0),e([y({readOnly:!0})],M.prototype,"hasAPIKey",null),e([y()],M.prototype,"hasCategorySchema",void 0),e([y()],M.prototype,"hasClassificationSchema",void 0),e([y()],M.prototype,"helpBase",void 0),e([y()],M.prototype,"helperServices",void 0),e([y()],M.prototype,"helpMap",void 0),e([y()],M.prototype,"homePageFeaturedContent",void 0),e([y()],M.prototype,"homePageFeaturedContentCount",void 0),e([y()],M.prototype,"httpPort",void 0),e([y()],M.prototype,"httpsPort",void 0),e([y()],M.prototype,"id",void 0),e([y()],M.prototype,"ipCntryCode",void 0),e([y({readOnly:!0})],M.prototype,"isOrganization",null),e([y()],M.prototype,"isPortal",void 0),e([y()],M.prototype,"isReadOnly",void 0),e([y({readOnly:!0})],M.prototype,"itemPageUrl",null),e([y()],M.prototype,"layerTemplatesGroupQuery",void 0),e([y()],M.prototype,"maxTokenExpirationMinutes",void 0),e([y({type:Date})],M.prototype,"modified",void 0),e([y()],M.prototype,"name",void 0),e([y()],M.prototype,"portalHostname",void 0),e([y()],M.prototype,"portalMode",void 0),e([y()],M.prototype,"portalProperties",void 0),e([y()],M.prototype,"region",void 0),e([y()],M.prototype,"recycleBinEnabled",void 0),e([y({readOnly:!0})],M.prototype,"restUrl",null),e([y()],M.prototype,"rotatorPanels",void 0),e([y()],M.prototype,"showHomePageDescription",void 0),e([y()],M.prototype,"sourceJSON",void 0),e([y()],M.prototype,"staticImagesUrl",void 0),e([y({json:{name:"2DStylesGroupQuery"}})],M.prototype,"stylesGroupQuery2d",void 0),e([y({json:{name:"stylesGroupQuery"}})],M.prototype,"stylesGroupQuery3d",void 0),e([y()],M.prototype,"supportsHostedServices",void 0),e([y()],M.prototype,"symbolSetsGroupQuery",void 0),e([y()],M.prototype,"templatesGroupQuery",void 0),e([y()],M.prototype,"thumbnail",void 0),e([y({readOnly:!0})],M.prototype,"thumbnailUrl",null),e([y()],M.prototype,"units",void 0),e([y()],M.prototype,"url",void 0),e([y()],M.prototype,"urlKey",void 0),e([Q("urlKey")],M.prototype,"readUrlKey",null),e([y()],M.prototype,"user",void 0),e([Q("user")],M.prototype,"readUser",null),e([y()],M.prototype,"use3dBasemaps",void 0),e([y()],M.prototype,"useDefault3dBasemap",void 0),e([y()],M.prototype,"useStandardizedQuery",void 0),e([y()],M.prototype,"useVectorBasemaps",void 0),e([y()],M.prototype,"vectorBasemapGalleryGroupQuery",void 0),M=_=e([c("esri.portal.Portal")],M);const C=new FinalizationRegistry(e=>{e.remove()});function T(e){const t=r;return()=>{const r=e.deref();r&&t.findCredential(r.restUrl)&&r.signIn().catch(()=>{})}}export{M as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{getAssetUrl as t}from"../assets.js";import i from"../core/Error.js";import{JSONSupportMixin as r}from"../core/JSONSupport.js";import{clone as o,fixJson as s}from"../core/lang.js";import{Loadable as a}from"../core/Loadable.js";import{isDataProtocol as n,makeAbsolute as l}from"../core/urlUtils.js";import{property as p,subclass as c}from"../core/accessorSupport/decorators.js";import{ensureClass as d}from"../core/accessorSupport/ensureType.js";import u from"../geometry/Extent.js";import m from"./Portal.js";import h from"./PortalItemResource.js";import g from"./PortalRating.js";import{a as y}from"../chunks/persistableUrlUtils.js";import{reader as w}from"../core/accessorSupport/decorators/reader.js";var v;const f=new Set(["3DTiles Service","CSV","Feature Collection","Feature Service","Feed","GeoJson","Group Layer","Image Service","KML","Knowledge Graph Layer","Map Service","Media Layer","Scene Service","Stream Service","Video Service","Vector Tile Service","WCS","WFS","WMS","WMTS"]),b=new Set(["KML","GeoJson","CSV"]);let k=v=class extends(r(a)){static from(e){return d(v,e)}constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.classification=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.isOrgItem=!1,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.sourceUrl=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.includes("Table")?"Table":t.includes("Route Layer")?"Route Layer":t.includes("Markup")?"Markup":"Feature Layer":"Image Service"===e?i=t.includes("Elevation 3D Layer")?"Elevation Layer":t.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Video Service"===e?i="Video Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e?i=t.includes("Web Tool")?"Tool":"Geoprocessing Service":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Geocoding Service"===e?i="Locator":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=t.includes("Spatiotemporal")||!t.includes("Hosted Service")&&!t.includes("Tiled")||t.includes("Relational")?"Map Image Layer":"Tile Layer":e?.toLowerCase().includes("add in")?i=e.replaceAll(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"Raster function template"===e?i="Raster Function Template":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.includes("configurableApp")?i="Instant App":"Insights Page"===e?i="Insights Report":"Excalibur Imagery Project"===e?i="Excalibur Project":"3DTiles Service"===e?i="3D tiles layer":"3DTiles Package"===e&&(i="3D tiles package"),i}readExtent(e){return e&&e.length?new u(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type?.toLowerCase()||"",i=this.typeKeywords||[],r="esri/images/portal/",o="16";let s,a=!1,n=!1,l=!1,p=!1,c=!1,d=!1,u=!1,m=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(a=i.includes("Hosted Service"),"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(n=i.includes("Table"),l=i.includes("Route Layer"),p=i.includes("Markup"),c=i.includes("Spatiotemporal"),d=i.includes("UtilityNetwork"),s=c&&n?"spatiotemporaltable":n?"table":l?"routelayer":p?"markup":c?"spatiotemporal":d?"utilitynetwork":a?"featureshosted":"features"):"map service"===e||"wms"===e||"wmts"===e?(c=i.includes("Spatiotemporal"),u=i.includes("Relational"),s=c||u?"mapimages":a||i.includes("Tiled")||"wmts"===e?"maptiles":"mapimages"):s="scene service"===e?i.includes("Line")?"sceneweblayerline":i.includes("3DObject")?"sceneweblayermultipatch":i.includes("Point")?"sceneweblayerpoint":i.includes("IntegratedMesh")?"sceneweblayermesh":i.includes("PointCloud")?"sceneweblayerpointcloud":i.includes("Polygon")?"sceneweblayerpolygon":i.includes("Building")?"sceneweblayerbuilding":i.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":"image service"===e?i.includes("Elevation 3D Layer")?"elevationlayer":i.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"video service"===e?i.includes("Live Stream")?"livestreamvideolayer":"videolayer":"geoprocessing service"===e?i.includes("Web Tool")?"tool":"layers":"geodata service"===e?"geodataservice":"3dtiles service"===e?i.includes("3DObject")?"3dobjecttileslayer":i.includes("IntegratedMesh")?"integratedmeshtileslayer":i.includes("GaussianSplat")?"gaussiansplatlayer":"3dtileslayer":"layers"):"web map"===e||"cityengine web scene"===e?s="maps":"web scene"===e?s=i.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===e&&i.includes("configurableApp")?s="instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?s="apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&i.includes("ArcGIS Pro")||"explorer map"===e&&i.indexOf("Explorer Document")?s="mapsgray":"service definition"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"netcdf"===e||"administrative report"===e?s="datafiles":"360 vr experience"===e?s="360vr":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?s="appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?s="addindesktop":"pdf"===e?s="pdf":"microsoft word"===e?s="word":"microsoft excel"===e?s="excel":"microsoft powerpoint"===e?s="ppt":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"workflow manager package"===e||"explorer map"===e&&i.includes("Explorer Mapping Application")||i.includes("Document")?s="datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?s="toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?s="layersgray":"analysis model"===e?s="analysismodel":"scene package"===e?s="scenepackage":"3dtiles package"===e?s="3dtileslayerpackage":"3dtiles service"===e?s="3dtileslayer":"mobile scene package"===e?s="mobilescenepackage":"tile package"===e||"compact tile package"===e?s="tilepackage":"task file"===e?s="taskfile":"report template"===e?s="report-template":"statistical data collection"===e?s="statisticaldatacollection":"insights workbook"===e?s="workbook":"insights model"===e?s="insightsmodel":"insights page"===e?s="insightspage":"insights theme"===e?s="insightstheme":"hub initiative"===e?s="hubinitiative":"hub page"===e?s="hubpage":"hub site application"===e?s="hubsite":"hub event"===e?s="hubevent":"hub project"===e?s="hubproject":"relational database connection"===e?s="relationaldatabaseconnection":"big data file share"===e?s="datastorecollection":"image collection"===e?s="imagecollection":"desktop style"===e?s="desktopstyle":"style"===e?s=i.includes("Dictionary")?"dictionarystyle":"style":"dashboard"===e?s="dashboard":"raster function template"===e?s="rasterprocessingtemplate":"vector tile package"===e?s="vectortilepackage":"ortho mapping project"===e?s="orthomappingproject":"ortho mapping template"===e?s="orthomappingtemplate":"solution"===e?s="solutions":"geopackage"===e?s="geopackage":"deep learning package"===e?s="deeplearningpackage":"real time analytic"===e?s="realtimeanalytics":"reality mapping project"===e?s="realitymappingproject":"big data analytic"===e?s="bigdataanalytics":"feed"===e?s="feed":"excalibur imagery project"===e?s="excaliburimageryproject":"notebook"===e?s="notebook":"storymap"===e?s="storymap":"survey123 add in"===e?s="survey123addin":"mission"===e?s="mission":"mission report"===e?s="missionreport":"mission template"===e?s="missiontemplate":"quickcapture project"===e?s="quickcaptureproject":"pro report"===e?s="proreport":"pro report template"===e?s="proreporttemplate":"urban model"===e?s="urbanmodel":"urban project"===e?s="urbanproject":"web experience"===e?s="experiencebuilder":"web experience template"===e?s="webexperiencetemplate":"experience builder widget"===e?s="experiencebuilderwidget":"experience builder widget package"===e?s="experiencebuilderwidgetpackage":"workflow"===e?s="workflow":"kernel gateway connection"===e?s="kernelgatewayconnection":"insights script"===e?s="insightsscript":"hub initiative template"===e?s="hubinitiativetemplate":"storymap theme"===e?s="storymaptheme":"knowledge graph"===e?s="knowledgegraph":"knowledge graph layer"===e?s="knowledgegraphlayer":"knowledge studio project"===e?s="knowledgestudio":"native application"===e?s="nativeapp":"native application installer"===e?s="nativeappinstaller":"web link chart"===e?s="linkchart":"knowledge graph web investigation"===e?s="investigation":"ogcfeatureserver"===e?s="features":"pro presentation"===e?s="propresentation":"pro project"===e?s="proproject":"insights workbook package"===e?s="insightsworkbookpackage":"apache parquet"===e?s="apacheparquet":"notebook code snippet library"===e?s="notebookcodesnippets":"suitability model"===e?s="suitabilitymodel":"esri classifier definition"===e?s="classifierdefinition":"esri classification schema"===e?s="classificationschema":"insights data engineering workbook"===e?s="dataengineeringworkbook":"insights data engineering model"===e?s="dataengineeringmodel":"deep learning studio project"===e?s="deeplearningproject":"discussion"===e?s="discussion":"allsource project"===e?s="allsourceproject":"api key"===e?s="apikey":"data pipeline"===e?s="datapipelines":"group layer"===e?(m=i.includes("Map"),s=m?"layergroup2d":"layergroup"):s="media layer"===e?"onlinemedialayer":"form"===e?i.includes("Survey123")?"survey":"datafilesgray":"csv"===e?"csv":"image"===e?"image":"xr experience"===e?"xrexperience":"maps",s?t(r+s+o+".png"):null}get isLayer(){return null!=this.type&&f.has(this.type)}get itemCdnUrl(){return y(this.itemUrl)}get itemPageUrl(){const e=this.portal?.itemPageUrl;return e&&this.id?`${e}?id=${this.id}`:null}get itemUrl(){const e=this.portal?.restUrl;return e&&this.id?`${e}/content/items/${this.id}`:null}get loaded(){return super.loaded}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`)??null:null}get userItemUrl(){const e=this.portal?.restUrl;if(!e)return null;const t=this.owner||this.portal?.user?.id;if(!t)return null;return`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`}load(e){const t=this.portal??(this.portal=m.getDefault()),i=t.load(e).then(()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?t.request(this.itemUrl,{signal:null!=e?e.signal:null,query:{token:this.apiKey}}):{}).then(e=>{this.sourceJSON=e,this.read(e)});return this.addResolvingPromise(i),Promise.resolve(this)}async addRating(e){const t={method:"post",query:{}},i=e instanceof g?e.rating:e;return null==i||isNaN(i)||"number"!=typeof e||(t.query.rating=i),this.portal?(await this.portal.request(this.itemUrl+"/addRating",t),new g({rating:i,created:new Date})):null}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:o(this.applicationProxies),avgRating:this.avgRating,categories:o(this.categories),classification:o(this.classification),created:o(this.created),culture:this.culture,description:this.description,extent:o(this.extent),groupCategories:o(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:o(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:o(this.screenshots),size:this.size,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};this.loaded&&(e.loadStatus="loaded");const t=new v({sourceJSON:this.sourceJSON}).set(e);return t._set("isOrgItem",this.isOrgItem),t}createPostQuery(){const e=this.toJSON();for(const t of["tags","typeKeywords","categories"])e[t]=e[t]?.join(", ");for(const t of["extent","classification"]){const i=e[t];i&&(e[t]=JSON.stringify(i))}return e}async deleteRating(){await this.portal.request(this.itemUrl+"/deleteRating",{method:"post"})}fetchData(e="json",t){return this.portal.request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}async fetchRating(e){const t=await this.portal.request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e});return null!=t.rating?(t.created=new Date(t.created),new g(t)):null}fetchRelatedItems(e,t){return this.portal.requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},v)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal.request(this.itemUrl??"",{cacheBust:!0,query:{token:this.apiKey}}).then(e=>(this.applicationProxies&&!Object.hasOwn(e,"appProxies")&&(this.applicationProxies=null),this.sourceJSON=e,this.read(e),this))}update(e){return this.id?this.load().then(()=>this.portal.signIn()).then(()=>{const t=e?.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal.request(`${this.userItemUrl}/update`,i).then(()=>this.reload())}):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async copy(e){if(!this.id)throw new i("portal:item-does-not-exist","The item does not exist yet");await this.load();const{portal:t,itemUrl:r}=this;await t.signIn();const{copyResources:o,folder:s,tags:a,title:n}=e||{},l={method:"post",query:{copyPrivateResources:"all"===o,folder:"string"==typeof s?s:s?.id,includeResources:!!o,tags:a?.join(","),title:n}},{itemId:p}=await t.request(`${r}/copy`,l);return new v({id:p,portal:t})}updateThumbnail(e){return this.id?this.load().then(()=>this.portal.signIn()).then(()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)n(t)?r.query={data:t}:r.query={url:l(t)},null!=i&&(r.query.filename=i);else{const e=new FormData;null!=i?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal.request(`${this.userItemUrl}/updateThumbnail`,r).then(()=>this.reload())}):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){const{fetchResources:i}=await import("./support/resourceUtils.js");return i(this,e,t)}async addResource(e,t,i){const{addOrUpdateResources:r}=await import("./support/resourceUtils.js");return e.portalItem=this,await r(this,[{resource:e,content:t,compress:i?.compress,access:i?.access}],"add",i),e}async removeResource(e,t){const{removeResource:r}=await import("./support/resourceUtils.js");if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new i("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r(this,e,t)}async removeAllResources(e){const{removeAllResources:t}=await import("./support/resourceUtils.js");return t(this,e)}resourceFromPath(e){return new h({portalItem:this,path:e})}toJSON(){const e=this.extent,t={accessInformation:this.accessInformation,categories:o(this.categories),classification:o(this.classification),created:this.created?.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,isOrgItem:this.isOrgItem,licenseInfo:this.licenseInfo,modified:this.modified?.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};return s(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new v({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};e([p({type:["private","shared","org","public"]})],k.prototype,"access",void 0),e([p()],k.prototype,"accessInformation",void 0),e([p({type:String})],k.prototype,"apiKey",void 0),e([p({json:{read:{source:"appProxies"}}})],k.prototype,"applicationProxies",void 0),e([p()],k.prototype,"avgRating",void 0),e([p()],k.prototype,"categories",void 0),e([p()],k.prototype,"classification",void 0),e([p({type:Date})],k.prototype,"created",void 0),e([p()],k.prototype,"culture",void 0),e([p()],k.prototype,"description",void 0),e([p({readOnly:!0})],k.prototype,"displayName",null),e([p({type:u})],k.prototype,"extent",void 0),e([w("extent")],k.prototype,"readExtent",null),e([p()],k.prototype,"groupCategories",void 0),e([p({readOnly:!0})],k.prototype,"iconUrl",null),e([p()],k.prototype,"id",void 0),e([p({readOnly:!0})],k.prototype,"isLayer",null),e([p({type:Boolean,readOnly:!0})],k.prototype,"isOrgItem",void 0),e([p()],k.prototype,"itemControl",void 0),e([p({readOnly:!0})],k.prototype,"itemPageUrl",null),e([p({readOnly:!0})],k.prototype,"itemUrl",null),e([p()],k.prototype,"licenseInfo",void 0),e([p({type:Date})],k.prototype,"modified",void 0),e([p()],k.prototype,"name",void 0),e([p()],k.prototype,"numComments",void 0),e([p()],k.prototype,"numRatings",void 0),e([p()],k.prototype,"numViews",void 0),e([p()],k.prototype,"owner",void 0),e([p()],k.prototype,"ownerFolder",void 0),e([p({type:m})],k.prototype,"portal",void 0),e([p()],k.prototype,"screenshots",void 0),e([p()],k.prototype,"size",void 0),e([p()],k.prototype,"snippet",void 0),e([p()],k.prototype,"sourceJSON",void 0),e([p({type:String})],k.prototype,"sourceUrl",void 0),e([p({type:String})],k.prototype,"spatialReference",void 0),e([p()],k.prototype,"tags",void 0),e([p()],k.prototype,"thumbnail",void 0),e([p({readOnly:!0})],k.prototype,"thumbnailUrl",null),e([p()],k.prototype,"title",void 0),e([p()],k.prototype,"type",void 0),e([p()],k.prototype,"typeKeywords",void 0),e([p({type:String,json:{read(e,t){if(b.has(t.type)){const t=this.portal?.restUrl;e||=t&&this.id?`${t}/content/items/${this.id}/data`:null}return e}}})],k.prototype,"url",void 0),e([p({readOnly:!0})],k.prototype,"userItemUrl",null),k=v=e([c("esri.portal.PortalItem")],k);export{k as default};
2
+ import{__decorate as e}from"tslib";import{getAssetUrl as t}from"../assets.js";import i from"../core/Error.js";import{JSONSupportMixin as r}from"../core/JSONSupport.js";import{clone as o,fixJson as s}from"../core/lang.js";import{Loadable as a}from"../core/Loadable.js";import{isDataProtocol as n,makeAbsolute as l}from"../core/urlUtils.js";import{property as p,subclass as c}from"../core/accessorSupport/decorators.js";import{ensureClass as d}from"../core/accessorSupport/ensureType.js";import u from"../geometry/Extent.js";import m from"./Portal.js";import h from"./PortalItemResource.js";import g from"./PortalRating.js";import{a as y}from"../chunks/persistableUrlUtils.js";import{reader as w}from"../core/accessorSupport/decorators/reader.js";var v;const f=new Set(["3DTiles Service","CSV","Feature Collection","Feature Service","Feed","GeoJson","Group Layer","Image Service","KML","Knowledge Graph Layer","Map Service","Media Layer","Scene Service","Stream Service","Video Service","Vector Tile Service","WCS","WFS","WMS","WMTS"]),b=new Set(["KML","GeoJson","CSV"]);let k=v=class extends(r(a)){static from(e){return d(v,e)}constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.classification=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.isOrgItem=!1,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.sourceUrl=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.includes("Table")?"Table":t.includes("Route Layer")?"Route Layer":t.includes("Markup")?"Markup":"Feature Layer":"Image Service"===e?i=t.includes("Elevation 3D Layer")?"Elevation Layer":t.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Video Service"===e?i="Video Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e?i=t.includes("Web Tool")?"Tool":"Geoprocessing Service":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Geocoding Service"===e?i="Locator":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=t.includes("Spatiotemporal")||!t.includes("Hosted Service")&&!t.includes("Tiled")||t.includes("Relational")?"Map Image Layer":"Tile Layer":e?.toLowerCase().includes("add in")?i=e.replaceAll(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"Raster function template"===e?i="Raster Function Template":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.includes("configurableApp")?i="Instant App":"Insights Page"===e?i="Insights Report":"Excalibur Imagery Project"===e?i="Excalibur Project":"3DTiles Service"===e?i="3D tiles layer":"3DTiles Package"===e&&(i="3D tiles package"),i}readExtent(e){return e&&e.length?new u(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type?.toLowerCase()||"",i=this.typeKeywords||[],r="esri/images/portal/",o="16";let s,a=!1,n=!1,l=!1,p=!1,c=!1,d=!1,u=!1,m=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(a=i.includes("Hosted Service"),"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(n=i.includes("Table"),l=i.includes("Route Layer"),p=i.includes("Markup"),c=i.includes("Spatiotemporal"),d=i.includes("UtilityNetwork"),s=c&&n?"spatiotemporaltable":n?"table":l?"routelayer":p?"markup":c?"spatiotemporal":d?"utilitynetwork":a?"featureshosted":"features"):"map service"===e||"wms"===e||"wmts"===e?(c=i.includes("Spatiotemporal"),u=i.includes("Relational"),s=c||u?"mapimages":a||i.includes("Tiled")||"wmts"===e?"maptiles":"mapimages"):s="scene service"===e?i.includes("Line")?"sceneweblayerline":i.includes("3DObject")?"sceneweblayermultipatch":i.includes("Point")?"sceneweblayerpoint":i.includes("IntegratedMesh")?"sceneweblayermesh":i.includes("PointCloud")?"sceneweblayerpointcloud":i.includes("Polygon")?"sceneweblayerpolygon":i.includes("Building")?"sceneweblayerbuilding":i.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":"image service"===e?i.includes("Elevation 3D Layer")?"elevationlayer":i.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"video service"===e?i.includes("Live Stream")?"livestreamvideolayer":"videolayer":"geoprocessing service"===e?i.includes("Web Tool")?"tool":"layers":"geodata service"===e?"geodataservice":"3dtiles service"===e?i.includes("3DObject")?"3dobjecttileslayer":i.includes("IntegratedMesh")?"integratedmeshtileslayer":i.includes("GaussianSplat")?"gaussiansplatlayer":"3dtileslayer":"layers"):"web map"===e||"cityengine web scene"===e?s="maps":"web scene"===e?s=i.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===e&&i.includes("configurableApp")?s="instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?s="apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&i.includes("ArcGIS Pro")||"explorer map"===e&&i.indexOf("Explorer Document")?s="mapsgray":"service definition"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"netcdf"===e||"administrative report"===e?s="datafiles":"360 vr experience"===e?s="360vr":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?s="appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?s="addindesktop":"pdf"===e?s="pdf":"microsoft word"===e?s="word":"microsoft excel"===e?s="excel":"microsoft powerpoint"===e?s="ppt":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"workflow manager package"===e||"explorer map"===e&&i.includes("Explorer Mapping Application")||i.includes("Document")?s="datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?s="toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?s="layersgray":"analysis model"===e?s="analysismodel":"scene package"===e?s="scenepackage":"3dtiles package"===e?s="3dtileslayerpackage":"3dtiles service"===e?s="3dtileslayer":"mobile scene package"===e?s="mobilescenepackage":"tile package"===e||"compact tile package"===e?s="tilepackage":"task file"===e?s="taskfile":"report template"===e?s="report-template":"statistical data collection"===e?s="statisticaldatacollection":"insights workbook"===e?s="workbook":"insights model"===e?s="insightsmodel":"insights page"===e?s="insightspage":"insights theme"===e?s="insightstheme":"hub initiative"===e?s="hubinitiative":"hub page"===e?s="hubpage":"hub site application"===e?s="hubsite":"hub event"===e?s="hubevent":"hub project"===e?s="hubproject":"relational database connection"===e?s="relationaldatabaseconnection":"big data file share"===e?s="datastorecollection":"image collection"===e?s="imagecollection":"desktop style"===e?s="desktopstyle":"style"===e?s=i.includes("Dictionary")?"dictionarystyle":"style":"dashboard"===e?s="dashboard":"raster function template"===e?s="rasterprocessingtemplate":"vector tile package"===e?s="vectortilepackage":"ortho mapping project"===e?s="orthomappingproject":"ortho mapping template"===e?s="orthomappingtemplate":"solution"===e?s="solutions":"geopackage"===e?s="geopackage":"deep learning package"===e?s="deeplearningpackage":"real time analytic"===e?s="realtimeanalytics":"reality mapping project"===e?s="realitymappingproject":"big data analytic"===e?s="bigdataanalytics":"feed"===e?s="feed":"excalibur imagery project"===e?s="excaliburimageryproject":"notebook"===e?s="notebook":"storymap"===e?s="storymap":"survey123 add in"===e?s="survey123addin":"mission"===e?s="mission":"mission report"===e?s="missionreport":"mission template"===e?s="missiontemplate":"quickcapture project"===e?s="quickcaptureproject":"pro report"===e?s="proreport":"pro report template"===e?s="proreporttemplate":"urban model"===e?s="urbanmodel":"urban project"===e?s="urbanproject":"web experience"===e?s="experiencebuilder":"web experience template"===e?s="webexperiencetemplate":"experience builder widget"===e?s="experiencebuilderwidget":"experience builder widget package"===e?s="experiencebuilderwidgetpackage":"workflow"===e?s="workflow":"kernel gateway connection"===e?s="kernelgatewayconnection":"insights script"===e?s="insightsscript":"hub initiative template"===e?s="hubinitiativetemplate":"storymap theme"===e?s="storymaptheme":"knowledge graph"===e?s="knowledgegraph":"knowledge graph layer"===e?s="knowledgegraphlayer":"knowledge studio project"===e?s="knowledgestudio":"native application"===e?s="nativeapp":"native application installer"===e?s="nativeappinstaller":"web link chart"===e?s="linkchart":"knowledge graph web investigation"===e?s="investigation":"ogcfeatureserver"===e?s="features":"pro presentation"===e?s="propresentation":"pro project"===e?s="proproject":"insights workbook package"===e?s="insightsworkbookpackage":"apache parquet"===e?s="apacheparquet":"notebook code snippet library"===e?s="notebookcodesnippets":"suitability model"===e?s="suitabilitymodel":"esri classifier definition"===e?s="classifierdefinition":"esri classification schema"===e?s="classificationschema":"insights data engineering workbook"===e?s="dataengineeringworkbook":"insights data engineering model"===e?s="dataengineeringmodel":"deep learning studio project"===e?s="deeplearningproject":"discussion"===e?s="discussion":"allsource project"===e?s="allsourceproject":"api key"===e?s="apikey":"data pipeline"===e?s="datapipelines":"group layer"===e?(m=i.includes("Map"),s=m?"layergroup2d":"layergroup"):s="media layer"===e?"onlinemedialayer":"form"===e?i.includes("Survey123")?"survey":"datafilesgray":"csv"===e?"csv":"image"===e?"image":"xr experience"===e?"xrexperience":"maps",s?t(r+s+o+".png"):null}get isLayer(){return null!=this.type&&f.has(this.type)}get itemCdnUrl(){return y(this.itemUrl)}get itemPageUrl(){const e=this.portal?.itemPageUrl;return e&&this.id?`${e}?id=${this.id}`:null}get itemUrl(){const e=this.portal?.restUrl;return e&&this.id?`${e}/content/items/${this.id}`:null}get loaded(){return super.loaded}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`)??null:null}get userItemUrl(){const e=this.portal?.restUrl;if(!e)return null;const t=this.owner||this.portal?.user?.id;if(!t)return null;return`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`}load(e){const t=this.portal??(this.portal=m.getDefault()),i=t.load(e).then(()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?t.request(this.itemUrl,{signal:null!=e?e.signal:null,query:{token:this.apiKey}}):{}).then(e=>{this.sourceJSON=e,this.read(e)});return this.addResolvingPromise(i),Promise.resolve(this)}async addRating(e){const t={method:"post",query:{}},i=e instanceof g?e.rating:e;return null==i||isNaN(i)||"number"!=typeof e||(t.query.rating=i),this.portal?(await this.portal.request(this.itemUrl+"/addRating",t),new g({rating:i,created:new Date})):null}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:o(this.applicationProxies),avgRating:this.avgRating,categories:o(this.categories),classification:o(this.classification),created:o(this.created),culture:this.culture,description:this.description,extent:o(this.extent),groupCategories:o(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:o(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:o(this.screenshots),size:this.size,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};this.loaded&&(e.loadStatus="loaded");const t=new v({sourceJSON:this.sourceJSON}).set(e);return t._set("isOrgItem",this.isOrgItem),t}createPostQuery(){const e=this.toJSON();for(const t of["tags","typeKeywords","categories"])e[t]=e[t]?.join(", ");for(const t of["extent","classification"]){const i=e[t];i&&(e[t]=JSON.stringify(i))}return e}async deleteRating(){await this.portal.request(this.itemUrl+"/deleteRating",{method:"post"})}fetchData(e="json",t){return this.portal.request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}async fetchRating(e){const t=await this.portal.request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e});return null!=t.rating?(t.created=new Date(t.created),new g(t)):null}fetchRelatedItems(e,t){return this.portal.requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},v)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal.request(this.itemUrl??"",{cacheBust:!0,query:{token:this.apiKey}}).then(e=>(this.applicationProxies&&!Object.hasOwn(e,"appProxies")&&(this.applicationProxies=null),this.sourceJSON=e,this.read(e),this))}update(e){return this.id?this.load().then(()=>this.portal.signIn()).then(()=>{const t=e?.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal.request(`${this.userItemUrl}/update`,i).then(()=>this.reload())}):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async copy(e){if(!this.id)throw new i("portal:item-does-not-exist","The item does not exist yet");await this.load();const{portal:t,itemUrl:r}=this;await t.signIn();const{copyResources:o,folder:s,tags:a,title:n}=e||{},l={method:"post",query:{copyPrivateResources:"all"===o,folder:"string"==typeof s?s:s?.id,includeResources:!!o,tags:a?.join(","),title:n}},{itemId:p}=await t.request(`${r}/copy`,l);return new v({id:p,portal:t})}updateThumbnail(e){return this.id?this.load().then(()=>this.portal.signIn()).then(()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)n(t)?r.query={data:t}:r.query={url:l(t)},null!=i&&(r.query.filename=i);else{const e=new FormData;null!=i?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal.request(`${this.userItemUrl}/updateThumbnail`,r).then(()=>this.reload())}):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){const{fetchResources:i}=await(import("./support/resourceUtils.js"));return i(this,e,t)}async addResource(e,t,i){const{addOrUpdateResources:r}=await(import("./support/resourceUtils.js"));return e.portalItem=this,await r(this,[{resource:e,content:t,compress:i?.compress,access:i?.access}],"add",i),e}async removeResource(e,t){const{removeResource:r}=await(import("./support/resourceUtils.js"));if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new i("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r(this,e,t)}async removeAllResources(e){const{removeAllResources:t}=await(import("./support/resourceUtils.js"));return t(this,e)}resourceFromPath(e){return new h({portalItem:this,path:e})}toJSON(){const e=this.extent,t={accessInformation:this.accessInformation,categories:o(this.categories),classification:o(this.classification),created:this.created?.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,isOrgItem:this.isOrgItem,licenseInfo:this.licenseInfo,modified:this.modified?.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};return s(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new v({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};e([p({type:["private","shared","org","public"]})],k.prototype,"access",void 0),e([p()],k.prototype,"accessInformation",void 0),e([p({type:String})],k.prototype,"apiKey",void 0),e([p({json:{read:{source:"appProxies"}}})],k.prototype,"applicationProxies",void 0),e([p()],k.prototype,"avgRating",void 0),e([p()],k.prototype,"categories",void 0),e([p()],k.prototype,"classification",void 0),e([p({type:Date})],k.prototype,"created",void 0),e([p()],k.prototype,"culture",void 0),e([p()],k.prototype,"description",void 0),e([p({readOnly:!0})],k.prototype,"displayName",null),e([p({type:u})],k.prototype,"extent",void 0),e([w("extent")],k.prototype,"readExtent",null),e([p()],k.prototype,"groupCategories",void 0),e([p({readOnly:!0})],k.prototype,"iconUrl",null),e([p()],k.prototype,"id",void 0),e([p({readOnly:!0})],k.prototype,"isLayer",null),e([p({type:Boolean,readOnly:!0})],k.prototype,"isOrgItem",void 0),e([p()],k.prototype,"itemControl",void 0),e([p({readOnly:!0})],k.prototype,"itemPageUrl",null),e([p({readOnly:!0})],k.prototype,"itemUrl",null),e([p()],k.prototype,"licenseInfo",void 0),e([p({type:Date})],k.prototype,"modified",void 0),e([p()],k.prototype,"name",void 0),e([p()],k.prototype,"numComments",void 0),e([p()],k.prototype,"numRatings",void 0),e([p()],k.prototype,"numViews",void 0),e([p()],k.prototype,"owner",void 0),e([p()],k.prototype,"ownerFolder",void 0),e([p({type:m})],k.prototype,"portal",void 0),e([p()],k.prototype,"screenshots",void 0),e([p()],k.prototype,"size",void 0),e([p()],k.prototype,"snippet",void 0),e([p()],k.prototype,"sourceJSON",void 0),e([p({type:String})],k.prototype,"sourceUrl",void 0),e([p({type:String})],k.prototype,"spatialReference",void 0),e([p()],k.prototype,"tags",void 0),e([p()],k.prototype,"thumbnail",void 0),e([p({readOnly:!0})],k.prototype,"thumbnailUrl",null),e([p()],k.prototype,"title",void 0),e([p()],k.prototype,"type",void 0),e([p()],k.prototype,"typeKeywords",void 0),e([p({type:String,json:{read(e,t){if(b.has(t.type)){const t=this.portal?.restUrl;e||=t&&this.id?`${t}/content/items/${this.id}/data`:null}return e}}})],k.prototype,"url",void 0),e([p({readOnly:!0})],k.prototype,"userItemUrl",null),k=v=e([c("esri.portal.PortalItem")],k);export{k as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import r from"../core/Accessor.js";import e from"../core/Error.js";import o from"../core/Logger.js";import{isAbsolute as s,makeRelative as l}from"../core/urlUtils.js";import{property as a,cast as p,subclass as i}from"../core/accessorSupport/decorators.js";let n=class extends r{constructor(t){super(t),this.portalItem=null}normalizeCtorArgs(t){return t?.portalItem&&t.path?{...t,path:u(t.path,t.portalItem)}:t}set path(t){null!=t&&s(t)?o.getLogger(this).error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",t)}_castPath(t){return u(t,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get cdnUrl(){return this.portalItem&&this.path?`${this.portalItem.itemCdnUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(t="json",r){const o=this.cdnUrl;if(null==o)throw new e("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal.request(o,{responseType:t,query:{token:this.portalItem.apiKey,_ts:r?.cacheBust?Date.now():null},signal:r?.signal})}async update(t,r){const{addOrUpdateResources:e}=await import("./support/resourceUtils.js");return await e(this.portalItem,[{resource:this,content:t,compress:r?.compress,access:r?.access}],"update",r),this}hasPath(){return null!=this.path}};function u(t,r){return null==t?t:(t=t.replace(/^\/+/,""),null!=r&&s(t)&&(t=l(t,r.itemUrl)),t?.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}t([a()],n.prototype,"portalItem",void 0),t([a({type:String,value:null})],n.prototype,"path",null),t([p("path")],n.prototype,"_castPath",null),t([a({type:String,readOnly:!0})],n.prototype,"url",null),t([a({type:String,readOnly:!0})],n.prototype,"cdnUrl",null),t([a({type:String,readOnly:!0})],n.prototype,"itemRelativeUrl",null),n=t([i("esri.portal.PortalItemResource")],n);export{n as default};
2
+ import{__decorate as t}from"tslib";import r from"../core/Accessor.js";import e from"../core/Error.js";import o from"../core/Logger.js";import{isAbsolute as s,makeRelative as l}from"../core/urlUtils.js";import{property as a,cast as p,subclass as i}from"../core/accessorSupport/decorators.js";let n=class extends r{constructor(t){super(t),this.portalItem=null}normalizeCtorArgs(t){return t?.portalItem&&t.path?{...t,path:u(t.path,t.portalItem)}:t}set path(t){null!=t&&s(t)?o.getLogger(this).error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",t)}_castPath(t){return u(t,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get cdnUrl(){return this.portalItem&&this.path?`${this.portalItem.itemCdnUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(t="json",r){const o=this.cdnUrl;if(null==o)throw new e("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal.request(o,{responseType:t,query:{token:this.portalItem.apiKey,_ts:r?.cacheBust?Date.now():null},signal:r?.signal})}async update(t,r){const{addOrUpdateResources:e}=await(import("./support/resourceUtils.js"));return await e(this.portalItem,[{resource:this,content:t,compress:r?.compress,access:r?.access}],"update",r),this}hasPath(){return null!=this.path}};function u(t,r){return null==t?t:(t=t.replace(/^\/+/,""),null!=r&&s(t)&&(t=l(t,r.itemUrl)),t?.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}t([a()],n.prototype,"portalItem",void 0),t([a({type:String,value:null})],n.prototype,"path",null),t([p("path")],n.prototype,"_castPath",null),t([a({type:String,readOnly:!0})],n.prototype,"url",null),t([a({type:String,readOnly:!0})],n.prototype,"cdnUrl",null),t([a({type:String,readOnly:!0})],n.prototype,"itemRelativeUrl",null),n=t([i("esri.portal.PortalItemResource")],n);export{n as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../core/Error.js";import{JSONSupport as r}from"../core/JSONSupport.js";import{property as o,subclass as l}from"../core/accessorSupport/decorators.js";import s from"./PortalFolder.js";import i from"./PortalGroup.js";var n;let u=n=class extends r{constructor(t){super(t),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.id=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userLicenseTypeId=null,this.userType=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal.normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.portal?.restUrl;return t?`${t}/content/users/${this.id}`:null}get url(){const t=this.portal?.restUrl;return t?`${t}/community/users/${this.id}`:null}addItem(t){const e=t&&t.item,r=t?.data,o=t?.folder,l={method:"post"};e&&(l.query=e.createPostQuery(),null!=r&&("string"==typeof r?l.query.text=r:"object"==typeof r&&(l.query.text=JSON.stringify(r))));let s=this.userContentUrl;return o&&(s+="/"+("string"==typeof o?o:o.id)),this.portal.request(s+"/addItem",l).then(t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load()))}async deleteItem(t,e=!1){let r=this.userContentUrl;t.ownerFolder&&(r+="/"+t.ownerFolder);const o=e?{permanentDelete:!0}:{};await this.portal.request(r+`/items/${t.id}/delete`,{method:"post",query:o}),t.id=null,t.portal=null}async deleteItems(t,r=!1){t=t.slice();const o=this.userContentUrl+"/deleteItems",l=[],s=t.map(t=>t.id);if(s.length){const i={method:"post",query:{items:s.join(","),permanentDelete:r}},n=await this.portal.request(o,i);for(const r of n.results){const o=t.find(t=>r.itemId===t.id),s=r.success;let i=null;s?(o.id=null,o.portal=null):r.error&&(i=new e("portal:delete-item-failed",r.error.message,r.error)),l.push({item:o,success:s,error:i})}}return l}fetchFolders(){const t={query:{num:1}};return this.portal.request(this.userContentUrl??"",t).then(t=>{let e;return e=t&&t.folders?t.folders.map(t=>{const e=s.fromJSON(t);return e.portal=this.portal,e}):[],e})}fetchGroups(){return this.portal.request(this.url??"").then(t=>{let e;return e=t&&t.groups?t.groups.map(t=>{const e=i.fromJSON(t);return e.portal=this.portal,e}):[],e})}async fetchItems(t){t??={};let e=this.userContentUrl??"";t.folder&&(e+="/"+t.folder.id);const{default:r}=await import("./PortalItem.js"),o={folders:!1,inRecycleBin:!!t.inRecycleBin||null,foldersContent:!(t.folder||!t.includeSubfolderItems)||null,num:t.num||10,start:t.start||1,sortField:t.sortField||"created",sortOrder:t.sortOrder||"asc"},l=await this.portal.request(e,{query:o});let s;return l?.items?(s=l.items.map(t=>{const e=r.fromJSON(t);return e.portal=this.portal,e}),await Promise.all(s.map(t=>t.load())),{items:s,nextStart:l.nextStart,total:l.total}):{items:[],nextStart:-1,total:0}}fetchTags(){return this.portal.request(this.url+"/tags").then(t=>t.tags)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new i({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new e("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}async restoreItem(t,e){const r=this.userContentUrl,o=e?{folderID:"string"==typeof e?e:e.id}:null;await this.portal.request(r+`/items/${t.id}/restore`,{method:"post",query:o})}toJSON(){throw new e("internal:not-yet-implemented","PortalUser.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new n({sourceJSON:t});return e.read(t),e}};t([o()],u.prototype,"access",void 0),t([o({type:Date})],u.prototype,"created",void 0),t([o()],u.prototype,"culture",void 0),t([o()],u.prototype,"description",void 0),t([o()],u.prototype,"email",void 0),t([o()],u.prototype,"favGroupId",void 0),t([o()],u.prototype,"fullName",void 0),t([o()],u.prototype,"id",void 0),t([o({type:Date})],u.prototype,"modified",void 0),t([o()],u.prototype,"orgId",void 0),t([o()],u.prototype,"portal",void 0),t([o()],u.prototype,"preferredView",void 0),t([o()],u.prototype,"privileges",void 0),t([o()],u.prototype,"region",void 0),t([o()],u.prototype,"role",void 0),t([o()],u.prototype,"roleId",void 0),t([o()],u.prototype,"sourceJSON",void 0),t([o()],u.prototype,"thumbnail",void 0),t([o({readOnly:!0})],u.prototype,"thumbnailUrl",null),t([o()],u.prototype,"units",void 0),t([o({readOnly:!0})],u.prototype,"userContentUrl",null),t([o({readOnly:!0})],u.prototype,"url",null),t([o()],u.prototype,"username",void 0),t([o()],u.prototype,"userLicenseTypeId",void 0),t([o()],u.prototype,"userType",void 0),u=n=t([l("esri.portal.PortalUser")],u);export{u as default};
2
+ import{__decorate as t}from"tslib";import e from"../core/Error.js";import{JSONSupport as r}from"../core/JSONSupport.js";import{property as o,subclass as l}from"../core/accessorSupport/decorators.js";import s from"./PortalFolder.js";import i from"./PortalGroup.js";var n;let u=n=class extends r{constructor(t){super(t),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.id=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userLicenseTypeId=null,this.userType=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal.normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.portal?.restUrl;return t?`${t}/content/users/${this.id}`:null}get url(){const t=this.portal?.restUrl;return t?`${t}/community/users/${this.id}`:null}addItem(t){const e=t&&t.item,r=t?.data,o=t?.folder,l={method:"post"};e&&(l.query=e.createPostQuery(),null!=r&&("string"==typeof r?l.query.text=r:"object"==typeof r&&(l.query.text=JSON.stringify(r))));let s=this.userContentUrl;return o&&(s+="/"+("string"==typeof o?o:o.id)),this.portal.request(s+"/addItem",l).then(t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load()))}async deleteItem(t,e=!1){let r=this.userContentUrl;t.ownerFolder&&(r+="/"+t.ownerFolder);const o=e?{permanentDelete:!0}:{};await this.portal.request(r+`/items/${t.id}/delete`,{method:"post",query:o}),t.id=null,t.portal=null}async deleteItems(t,r=!1){t=t.slice();const o=this.userContentUrl+"/deleteItems",l=[],s=t.map(t=>t.id);if(s.length){const i={method:"post",query:{items:s.join(","),permanentDelete:r}},n=await this.portal.request(o,i);for(const r of n.results){const o=t.find(t=>r.itemId===t.id),s=r.success;let i=null;s?(o.id=null,o.portal=null):r.error&&(i=new e("portal:delete-item-failed",r.error.message,r.error)),l.push({item:o,success:s,error:i})}}return l}fetchFolders(){const t={query:{num:1}};return this.portal.request(this.userContentUrl??"",t).then(t=>{let e;return e=t&&t.folders?t.folders.map(t=>{const e=s.fromJSON(t);return e.portal=this.portal,e}):[],e})}fetchGroups(){return this.portal.request(this.url??"").then(t=>{let e;return e=t&&t.groups?t.groups.map(t=>{const e=i.fromJSON(t);return e.portal=this.portal,e}):[],e})}async fetchItems(t){t??={};let e=this.userContentUrl??"";t.folder&&(e+="/"+t.folder.id);const{default:r}=await(import("./PortalItem.js")),o={folders:!1,inRecycleBin:!!t.inRecycleBin||null,foldersContent:!(t.folder||!t.includeSubfolderItems)||null,num:t.num||10,start:t.start||1,sortField:t.sortField||"created",sortOrder:t.sortOrder||"asc"},l=await this.portal.request(e,{query:o});let s;return l?.items?(s=l.items.map(t=>{const e=r.fromJSON(t);return e.portal=this.portal,e}),await Promise.all(s.map(t=>t.load())),{items:s,nextStart:l.nextStart,total:l.total}):{items:[],nextStart:-1,total:0}}fetchTags(){return this.portal.request(this.url+"/tags").then(t=>t.tags)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new i({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new e("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}async restoreItem(t,e){const r=this.userContentUrl,o=e?{folderID:"string"==typeof e?e:e.id}:null;await this.portal.request(r+`/items/${t.id}/restore`,{method:"post",query:o})}toJSON(){throw new e("internal:not-yet-implemented","PortalUser.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new n({sourceJSON:t});return e.read(t),e}};t([o()],u.prototype,"access",void 0),t([o({type:Date})],u.prototype,"created",void 0),t([o()],u.prototype,"culture",void 0),t([o()],u.prototype,"description",void 0),t([o()],u.prototype,"email",void 0),t([o()],u.prototype,"favGroupId",void 0),t([o()],u.prototype,"fullName",void 0),t([o()],u.prototype,"id",void 0),t([o({type:Date})],u.prototype,"modified",void 0),t([o()],u.prototype,"orgId",void 0),t([o()],u.prototype,"portal",void 0),t([o()],u.prototype,"preferredView",void 0),t([o()],u.prototype,"privileges",void 0),t([o()],u.prototype,"region",void 0),t([o()],u.prototype,"role",void 0),t([o()],u.prototype,"roleId",void 0),t([o()],u.prototype,"sourceJSON",void 0),t([o()],u.prototype,"thumbnail",void 0),t([o({readOnly:!0})],u.prototype,"thumbnailUrl",null),t([o()],u.prototype,"units",void 0),t([o({readOnly:!0})],u.prototype,"userContentUrl",null),t([o({readOnly:!0})],u.prototype,"url",null),t([o()],u.prototype,"username",void 0),t([o()],u.prototype,"userLicenseTypeId",void 0),t([o()],u.prototype,"userType",void 0),u=n=t([l("esri.portal.PortalUser")],u);export{u as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import t from"../../request.js";import{clone as e}from"../../core/lang.js";import{LRUCache as r}from"../../core/LRUCache.js";import{getJsonType as o}from"../../geometry/support/jsonTypeUtils.js";import{DictionaryControlString as s}from"./DictionaryControlString.js";import{DictionaryScriptEvaluator as i}from"./DictionaryScriptEvaluator.js";import{deriveFields as a}from"../../support/ArcadeExpression.js";import l from"../../symbols/CIMSymbol.js";import{getTextCasing as n}from"../../symbols/cim/utils.js";const m={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,width:.5,color:[0,0,0,255]}]}};class c{constructor(t,e,o,s){this.url=t,this.fieldMap=o,this.dictionaryInfo=s,this._symbolPartCache=new r(100);const a=async()=>i.from(await s,e,o);this._evaluator=a()}async getSymbolAsync(t,e,r=!0){const i=await this._evaluator,l=e?.fields??a(t.attributes),n=i.createDictionaryFieldsIndex(l),m=i.evaluate(t,e?.scale??0,n,e?.spatialReference);if(null==m)return null;const c=o(t.geometry),y=s.parse(m,i.itemNames,c),f="esriGeometryPoint"===c&&!t.geometry?.hasZ;return await this._cimPartsToCIMSymbol(t,y.partNames,y.overrides,f,e,r,n)}async getSymbolForControlString(t,e,r){const o=await this._evaluator,i=s.parse(t,o.itemNames,e),a="esriGeometryPoint"===e&&!r,n=y(await Promise.all(i.partNames.map(t=>this._getSymbolPart(t))),i.overrides,a);return new l({data:n})}async _cimPartsToCIMSymbol(t,r,o,s,i,a,m){const c=r.map(t=>this._getSymbolPart(t,i));let f=await Promise.all(c);if(a&&this.fieldMap&&f.length>0){const{OverrideHelper:r}=await import("../../symbols/cim/OverrideHelper.js");f=e(f);for(const e of f)r.applyDictionaryTextOverrides(e,t,this.fieldMap,m,n(e))}const p=y(f,o,s);return new l({data:p})}async _fetchSymbolPart(e,r){const o=await this.dictionaryInfo,s=(this.url+"/"+o.cimRefTemplateUrl).replaceAll(/\{itemName\}/gi,e),{data:i}=await t(s,{responseType:"json",query:{f:"json"},...r});return i}async _getSymbolPart(t,e){let r=this._symbolPartCache.get(t);return r||(r=this._fetchSymbolPart(t,e),this._symbolPartCache.put(t,r)),r}}function y(t,e,r){if(!t||0===t.length)return null;const o={...t[0]};if(t.length>1){o.effects=null,o.symbolLayers=[];for(const e of t){const t=e;if(null!=t.effects)for(const e of t.symbolLayers)null==e.effects?e.effects=t.effects:e.effects.unshift(...t.effects);o.symbolLayers.unshift(...t.symbolLayers)}}return r&&(o.callout=m),{type:"CIMSymbolReference",symbol:o,primitiveOverrides:e}}export{c as DictionaryLoader};
2
+ import t from"../../request.js";import{clone as e}from"../../core/lang.js";import{LRUCache as r}from"../../core/LRUCache.js";import{getJsonType as o}from"../../geometry/support/jsonTypeUtils.js";import{DictionaryControlString as s}from"./DictionaryControlString.js";import{DictionaryScriptEvaluator as i}from"./DictionaryScriptEvaluator.js";import{deriveFields as a}from"../../support/ArcadeExpression.js";import l from"../../symbols/CIMSymbol.js";import{getTextCasing as n}from"../../symbols/cim/utils.js";const m={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,width:.5,color:[0,0,0,255]}]}};class c{constructor(t,e,o,s){this.url=t,this.fieldMap=o,this.dictionaryInfo=s,this._symbolPartCache=new r(100);const a=async()=>i.from(await s,e,o);this._evaluator=a()}async getSymbolAsync(t,e,r=!0){const i=await this._evaluator,l=e?.fields??a(t.attributes),n=i.createDictionaryFieldsIndex(l),m=i.evaluate(t,e?.scale??0,n,e?.spatialReference);if(null==m)return null;const c=o(t.geometry),y=s.parse(m,i.itemNames,c),f="esriGeometryPoint"===c&&!t.geometry?.hasZ;return await this._cimPartsToCIMSymbol(t,y.partNames,y.overrides,f,e,r,n)}async getSymbolForControlString(t,e,r){const o=await this._evaluator,i=s.parse(t,o.itemNames,e),a="esriGeometryPoint"===e&&!r,n=y(await Promise.all(i.partNames.map(t=>this._getSymbolPart(t))),i.overrides,a);return new l({data:n})}async _cimPartsToCIMSymbol(t,r,o,s,i,a,m){const c=r.map(t=>this._getSymbolPart(t,i));let f=await Promise.all(c);if(a&&this.fieldMap&&f.length>0){const{OverrideHelper:r}=await(import("../../symbols/cim/OverrideHelper.js"));f=e(f);for(const e of f)r.applyDictionaryTextOverrides(e,t,this.fieldMap,m,n(e))}const p=y(f,o,s);return new l({data:p})}async _fetchSymbolPart(e,r){const o=await this.dictionaryInfo,s=(this.url+"/"+o.cimRefTemplateUrl).replaceAll(/\{itemName\}/gi,e),{data:i}=await t(s,{responseType:"json",query:{f:"json"},...r});return i}async _getSymbolPart(t,e){let r=this._symbolPartCache.get(t);return r||(r=this._fetchSymbolPart(t,e),this._symbolPartCache.put(t,r)),r}}function y(t,e,r){if(!t||0===t.length)return null;const o={...t[0]};if(t.length>1){o.effects=null,o.symbolLayers=[];for(const e of t){const t=e;if(null!=t.effects)for(const e of t.symbolLayers)null==e.effects?e.effects=t.effects:e.effects.unshift(...t.effects);o.symbolLayers.unshift(...t.symbolLayers)}}return r&&(o.callout=m),{type:"CIMSymbolReference",symbol:o,primitiveOverrides:e}}export{c as DictionaryLoader};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../config.js";import{id as t}from"../kernel.js";import r from"../core/Error.js";import has from"../core/has.js";import{clone as s}from"../core/lang.js";import{isAbortError as o,createAbortError as a,isAborted as n}from"../core/promiseUtils.js";import{isTrustedServer as i,getOrigin as l,isBlobProtocol as u,isDataProtocol as c,toHTTPS as d,objectToQuery as m,getProxyRule as p,getProxyUrl as h,addQueryParameters as f,hasSameOrigin as y,addProxyRule as g,getAppUrl as w}from"../core/urlUtils.js";import{isSecureProxyService as b}from"../portal/support/urlUtils.js";import{requestConfig as T}from"./config.js";import{registerNoCorsDomains as k,isNoCorsRequestRequired as q,sendNoCorsRequest as S}from"./cors.js";import{loadImage as O}from"./loadImage.js";import{setPreferredHost as C,getPreferredUrl as x}from"./preferredHosts.js";const j="FormData"in globalThis,v=new Set([499,498,403,401]),E=new Set(["COM_0056","COM_0057","SB_0008"]),L=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i];async function U(r){let s,o;await A(r);try{do{[s,o]=await P(r)}while(!await B(r,s,o))}catch(u){const e=$("request:server",u,r.parameters,s);throw e.details.ssl=r.useSSL,r.interceptor?.error?.(e),e}const a=r.parameters.url;if(o)if(/\/sharing\/rest\/(accounts|portals)\/self/i.test(a)){if(!r.hasToken&&!r.credentialToken&&o.user?.username&&!i(a)){const t=l(a,!0);t&&e.request.trustedServers.push(t)}Array.isArray(o.authorizedCrossOriginNoCorsDomains)&&k(o.authorizedCrossOriginNoCorsDomains)}else{"json"===(r.parameters.requestOptions.responseType||"json")&&C(a,o)}const n=r.credential;if(n&&t){const e=t.findServerInfo(n.server);let r=e?.owningSystemUrl;if(r){r=r.replace(/\/?$/,"/sharing");const e=t.findCredential(r,n.userId);e&&-1===t._getIdenticalSvcIdx(r,e)&&e.resources.unshift(r)}}return{data:o,getAllHeaders:s?()=>Array.from(s.headers):z,getHeader:s?e=>s.headers.get(e):z,httpStatus:s?.status??200,requestOptions:r.parameters.requestOptions,ssl:r.useSSL,url:r.parameters.url}}async function A(r){const s=r.parameters.url,o=r.parameters.requestOptions,a=r.controller.signal,i=o.body;let l=null,u=null;if(j&&"HTMLFormElement"in globalThis&&(i instanceof FormData?l=i:i instanceof HTMLFormElement&&(l=new FormData(i))),"string"==typeof i&&(u=i),r.fetchOptions={cache:o.cacheMode??(o.cacheBust?"no-cache":"default"),credentials:"same-origin",headers:o.headers||{},keepalive:o.keepAlive??!1,method:"head"===o.method?"HEAD":"GET",mode:"cors",priority:o.priority??e.request.priority,redirect:"follow",signal:a},(l||u)&&(r.fetchOptions.body=l||u),(T.isForeignWorker||"anonymous"===o.authMode)&&(r.useIdentity=!1),r.hasToken=!!(/token=/i.test(s)||o.query?.token||l?.get("token")),!r.hasToken){const{getApiKey:e,getSessionToken:t}=await import("../support/apiKeyUtils.js"),a=await t(s)??e(s);a&&(o.query??={},o.query.token=a,r.hasToken=!0)}if(r.useIdentity&&!r.hasToken&&!r.credential&&!r.credentialToken&&!F(s)&&!n(a)){let e;"immediate"===o.authMode?(await I(),e=await t.getCredential(s,{signal:a})):"no-prompt"===o.authMode?(await I(),e=await t.getCredential(s,{prompt:!1,signal:a}).catch(()=>{})):t&&(e=t.findCredential(s)),e&&(r.credential=e,r.credentialToken=e.token,r.useSSL=!!e.ssl)}}async function P(r){let s=r.parameters.url,o=x(s);const n=r.parameters.requestOptions,k=r.fetchOptions??{},O=u(s)||c(s),C=n.responseType??"json",v=O?0:null!=n.timeout?n.timeout:e.request.timeout;let E=!1;if(!O){r.useSSL&&(s=d(s));let a={...n.query};r.credentialToken&&(a.token=r.credentialToken);let l=m(a);has("esri-url-encodes-apostrophe")&&(l=l.replaceAll("'","%27"));const u=o.length+1+l.length;let c;E="delete"===n.method||"post"===n.method||"put"===n.method||!!n.body||u>e.request.maxUrlLength;const g=n.useProxy||!!p(s);if(g){const t=h(s);c=t.path,!E&&c.length+1+u>e.request.maxUrlLength&&(E=!0),t.query&&(a={...t.query,...a})}if("HEAD"===k.method&&(E||g)){if(E){if(u>e.request.maxUrlLength)throw $("request:invalid-parameters",new Error("URL exceeds maximum length"),r.parameters);throw $("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),r.parameters)}if(g)throw $("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),r.parameters)}if(E?(k.method="delete"===n.method?"DELETE":"put"===n.method?"PUT":"POST",n.body?s=f(s,a):(k.body=m(a),k.headers||(k.headers={}),k.headers["Content-Type"]="application/x-www-form-urlencoded")):s=f(s,a),g&&(r.useProxy=!0,s=`${c}?${s}`),a.token&&j&&k.body instanceof FormData&&!b(s)&&k.body.set("token",a.token),n.hasOwnProperty("withCredentials"))r.withCredentials=n.withCredentials;else if(!y(s,w()))if(i(s))r.withCredentials=!0;else if(t){const e=t.findServerInfo(s);e?.webTierAuth&&(r.withCredentials=!0)}r.withCredentials&&(k.credentials="include",q(s)&&await S(E?f(s,a):s)),o=x(s)}let L,U,A=0,P=!1;v>0&&(A=setTimeout(()=>{P=!0,r.controller.abort()},v));try{if("native-request-init"===n.responseType)U=k,U.url=o,n.signal?U.signal=n.signal:delete U.signal;else if("image"!==n.responseType||"default"!==k.cache||k.keepalive||"GET"!==k.method||E||N(n.headers)||!O&&!r.useProxy&&e.request.proxyUrl&&!D(s)){if(await(T.beforeFetch?.(s,k)),L=await fetch(o,k),await(T.afterFetch?.(L)),r.useProxy||M(s),"native"===n.responseType)U=L;else if("HEAD"!==k.method)if(L.ok){switch(C){case"array-buffer":U=await L.arrayBuffer();break;case"blob":case"image":U=await L.blob();break;default:U=await L.text()}if(A&&(clearTimeout(A),A=0),"json"===C||"xml"===C||"document"===C)if(U)switch(C){case"json":U=JSON.parse(U);break;case"xml":U=R(U,"application/xml");break;case"document":U=R(U,"text/html")}else U=null;if(U){if(("array-buffer"===C||"blob"===C)&&U["blob"===C?"size":"byteLength"]<=750)try{const e=await new Response(U).json();e.error&&(U=e)}catch{}"image"===C&&U instanceof Blob&&(U=await H(URL.createObjectURL(U),r,!0))}}else{U=await L.text();try{U=JSON.parse(U)}catch{}}}else U=await H(o,r)}catch(I){if("AbortError"===I.name){if(P)throw J();throw a("Request canceled")}if(!(!L&&I instanceof TypeError&&e.request.proxyUrl)||n.body||"delete"===n.method||"head"===n.method||"post"===n.method||"put"===n.method||r.useProxy||D(s))throw I;r.redoRequest=!0,g({proxyUrl:e.request.proxyUrl,urlPrefix:l(s)??""})}finally{A&&clearTimeout(A)}return[L,U]}function H(t,r,s=!1){const o=r.controller.signal,a=new Image;return r.withCredentials?a.crossOrigin="use-credentials":a.crossOrigin="anonymous",a.alt="",a.fetchPriority=e.request.priority,a.src=t,O(a,t,s,o)}function M(e){const t=l(e);t&&!T.corsServers.includes(t)&&T.corsServers.push(t)}function D(e){const t=l(e);return!t||t.endsWith(".arcgis.com")||T.corsServers.includes(t)||i(t)}async function I(){t||await import("../identity/IdentityManager.js")}function F(e){return L.some(t=>t.test(e))}function N(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}function R(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function B(e,r,s){if(e.redoRequest)return e.redoRequest=!1,!1;const o=e.parameters.requestOptions;if(!r||"native"===o.responseType||"native-request-init"===o.responseType)return!0;let a,n;if(s&&(s.error&&"object"==typeof s.error?a=s.error:"error"===s.status&&Array.isArray(s.messages)&&(a={...s},a[_]=s,a.details=s.messages)),!a&&!r.ok)throw a=new Error(`Unable to load ${r.url} status: ${r.status}`),a[_]=s,a;let i,l=null;a&&(n=Number(a.code),l=a.hasOwnProperty("subcode")?Number(a.subcode):null,i=a.messageCode,i=i?.toUpperCase());const u=o.authMode;if(403===n&&(4===l||a.message?.toLowerCase().includes("ssl")&&!a.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===n)&&void 0!==n&&v.has(n)&&!F(e.parameters.url)&&(403!==n||(!i||!E.has(i))&&(null==l||2===l&&e.credentialToken))){await I();try{const r=await t.getCredential(e.parameters.url,{error:$("request:server",a,e.parameters),credential:e.credential,prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=r,e.credentialToken=r.token,e.useSSL=e.useSSL||r.ssl,!1}catch(c){if("no-prompt"===u)return e.credential=void 0,e.credentialToken=void 0,!1;a=c}}if(a)throw a;return!0}function $(e,t,n,i){let l;const u={url:n.url,requestOptions:n.requestOptions,getAllHeaders:z,getHeader:z,ssl:!1};if(t instanceof r)return t.details?(t.details=s(t.details),t.details.url=n.url,t.details.requestOptions=n.requestOptions):t.details=u,t;if(t){const e=i&&(()=>Array.from(i.headers)),r=i&&(e=>i.headers.get(e)),s=i?.status,o=t.message;o&&(l=o),e&&r&&(u.getAllHeaders=e,u.getHeader=r),u.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||s||0,u.subCode=t.subcode,u.messageCode=t.messageCode,"string"==typeof t.details?(u.messages=[t.details],l??=t.details):(u.messages=t.details,l??=u.messages?.[0]),u.raw=_ in t?t[_]:t}return l??="Error",o(t)?a():new r(e,l,u)}const _=Symbol(),z=()=>null,G="Timeout exceeded";function J(){return new Error(G)}function K(e){return"object"==typeof e&&!!e&&"message"in e&&e.message===G}export{$ as createRequestError,K as isTimeoutError,U as processRequest};
2
+ import e from"../config.js";import{id as t}from"../kernel.js";import r from"../core/Error.js";import has from"../core/has.js";import{clone as s}from"../core/lang.js";import{isAbortError as o,createAbortError as a,isAborted as n}from"../core/promiseUtils.js";import{isTrustedServer as i,getOrigin as l,isBlobProtocol as u,isDataProtocol as c,toHTTPS as d,objectToQuery as m,getProxyRule as p,getProxyUrl as h,addQueryParameters as f,hasSameOrigin as y,addProxyRule as g,getAppUrl as w}from"../core/urlUtils.js";import{isSecureProxyService as b}from"../portal/support/urlUtils.js";import{requestConfig as T}from"./config.js";import{registerNoCorsDomains as k,isNoCorsRequestRequired as q,sendNoCorsRequest as S}from"./cors.js";import{loadImage as O}from"./loadImage.js";import{setPreferredHost as C,getPreferredUrl as x}from"./preferredHosts.js";const j="FormData"in globalThis,v=new Set([499,498,403,401]),E=new Set(["COM_0056","COM_0057","SB_0008"]),L=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i];async function U(r){let s,o;await A(r);try{do{[s,o]=await P(r)}while(!await B(r,s,o))}catch(u){const e=$("request:server",u,r.parameters,s);throw e.details.ssl=r.useSSL,r.interceptor?.error?.(e),e}const a=r.parameters.url;if(o)if(/\/sharing\/rest\/(accounts|portals)\/self/i.test(a)){if(!r.hasToken&&!r.credentialToken&&o.user?.username&&!i(a)){const t=l(a,!0);t&&e.request.trustedServers.push(t)}Array.isArray(o.authorizedCrossOriginNoCorsDomains)&&k(o.authorizedCrossOriginNoCorsDomains)}else{"json"===(r.parameters.requestOptions.responseType||"json")&&C(a,o)}const n=r.credential;if(n&&t){const e=t.findServerInfo(n.server);let r=e?.owningSystemUrl;if(r){r=r.replace(/\/?$/,"/sharing");const e=t.findCredential(r,n.userId);e&&-1===t._getIdenticalSvcIdx(r,e)&&e.resources.unshift(r)}}return{data:o,getAllHeaders:s?()=>Array.from(s.headers):z,getHeader:s?e=>s.headers.get(e):z,httpStatus:s?.status??200,requestOptions:r.parameters.requestOptions,ssl:r.useSSL,url:r.parameters.url}}async function A(r){const s=r.parameters.url,o=r.parameters.requestOptions,a=r.controller.signal,i=o.body;let l=null,u=null;if(j&&"HTMLFormElement"in globalThis&&(i instanceof FormData?l=i:i instanceof HTMLFormElement&&(l=new FormData(i))),"string"==typeof i&&(u=i),r.fetchOptions={cache:o.cacheMode??(o.cacheBust?"no-cache":"default"),credentials:"same-origin",headers:o.headers||{},keepalive:o.keepAlive??!1,method:"head"===o.method?"HEAD":"GET",mode:"cors",priority:o.priority??e.request.priority,redirect:"follow",signal:a},(l||u)&&(r.fetchOptions.body=l||u),(T.isForeignWorker||"anonymous"===o.authMode)&&(r.useIdentity=!1),r.hasToken=!!(/token=/i.test(s)||o.query?.token||l?.get("token")),!r.hasToken){const{getApiKey:e,getSessionToken:t}=await(import("../support/apiKeyUtils.js")),a=await t(s)??e(s);a&&(o.query??={},o.query.token=a,r.hasToken=!0)}if(r.useIdentity&&!r.hasToken&&!r.credential&&!r.credentialToken&&!F(s)&&!n(a)){let e;"immediate"===o.authMode?(await I(),e=await t.getCredential(s,{signal:a})):"no-prompt"===o.authMode?(await I(),e=await t.getCredential(s,{prompt:!1,signal:a}).catch(()=>{})):t&&(e=t.findCredential(s)),e&&(r.credential=e,r.credentialToken=e.token,r.useSSL=!!e.ssl)}}async function P(r){let s=r.parameters.url,o=x(s);const n=r.parameters.requestOptions,k=r.fetchOptions??{},O=u(s)||c(s),C=n.responseType??"json",v=O?0:null!=n.timeout?n.timeout:e.request.timeout;let E=!1;if(!O){r.useSSL&&(s=d(s));let a={...n.query};r.credentialToken&&(a.token=r.credentialToken);let l=m(a);has("esri-url-encodes-apostrophe")&&(l=l.replaceAll("'","%27"));const u=o.length+1+l.length;let c;E="delete"===n.method||"post"===n.method||"put"===n.method||!!n.body||u>e.request.maxUrlLength;const g=n.useProxy||!!p(s);if(g){const t=h(s);c=t.path,!E&&c.length+1+u>e.request.maxUrlLength&&(E=!0),t.query&&(a={...t.query,...a})}if("HEAD"===k.method&&(E||g)){if(E){if(u>e.request.maxUrlLength)throw $("request:invalid-parameters",new Error("URL exceeds maximum length"),r.parameters);throw $("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),r.parameters)}if(g)throw $("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),r.parameters)}if(E?(k.method="delete"===n.method?"DELETE":"put"===n.method?"PUT":"POST",n.body?s=f(s,a):(k.body=m(a),k.headers||(k.headers={}),k.headers["Content-Type"]="application/x-www-form-urlencoded")):s=f(s,a),g&&(r.useProxy=!0,s=`${c}?${s}`),a.token&&j&&k.body instanceof FormData&&!b(s)&&k.body.set("token",a.token),n.hasOwnProperty("withCredentials"))r.withCredentials=n.withCredentials;else if(!y(s,w()))if(i(s))r.withCredentials=!0;else if(t){const e=t.findServerInfo(s);e?.webTierAuth&&(r.withCredentials=!0)}r.withCredentials&&(k.credentials="include",q(s)&&await S(E?f(s,a):s)),o=x(s)}let L,U,A=0,P=!1;v>0&&(A=setTimeout(()=>{P=!0,r.controller.abort()},v));try{if("native-request-init"===n.responseType)U=k,U.url=o,n.signal?U.signal=n.signal:delete U.signal;else if("image"!==n.responseType||"default"!==k.cache||k.keepalive||"GET"!==k.method||E||N(n.headers)||!O&&!r.useProxy&&e.request.proxyUrl&&!D(s)){if(await(T.beforeFetch?.(s,k)),L=await fetch(o,k),await(T.afterFetch?.(L)),r.useProxy||M(s),"native"===n.responseType)U=L;else if("HEAD"!==k.method)if(L.ok){switch(C){case"array-buffer":U=await L.arrayBuffer();break;case"blob":case"image":U=await L.blob();break;default:U=await L.text()}if(A&&(clearTimeout(A),A=0),"json"===C||"xml"===C||"document"===C)if(U)switch(C){case"json":U=JSON.parse(U);break;case"xml":U=R(U,"application/xml");break;case"document":U=R(U,"text/html")}else U=null;if(U){if(("array-buffer"===C||"blob"===C)&&U["blob"===C?"size":"byteLength"]<=750)try{const e=await new Response(U).json();e.error&&(U=e)}catch{}"image"===C&&U instanceof Blob&&(U=await H(URL.createObjectURL(U),r,!0))}}else{U=await L.text();try{U=JSON.parse(U)}catch{}}}else U=await H(o,r)}catch(I){if("AbortError"===I.name){if(P)throw J();throw a("Request canceled")}if(!(!L&&I instanceof TypeError&&e.request.proxyUrl)||n.body||"delete"===n.method||"head"===n.method||"post"===n.method||"put"===n.method||r.useProxy||D(s))throw I;r.redoRequest=!0,g({proxyUrl:e.request.proxyUrl,urlPrefix:l(s)??""})}finally{A&&clearTimeout(A)}return[L,U]}function H(t,r,s=!1){const o=r.controller.signal,a=new Image;return r.withCredentials?a.crossOrigin="use-credentials":a.crossOrigin="anonymous",a.alt="",a.fetchPriority=e.request.priority,a.src=t,O(a,t,s,o)}function M(e){const t=l(e);t&&!T.corsServers.includes(t)&&T.corsServers.push(t)}function D(e){const t=l(e);return!t||t.endsWith(".arcgis.com")||T.corsServers.includes(t)||i(t)}async function I(){t||await(import("../identity/IdentityManager.js"))}function F(e){return L.some(t=>t.test(e))}function N(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}function R(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function B(e,r,s){if(e.redoRequest)return e.redoRequest=!1,!1;const o=e.parameters.requestOptions;if(!r||"native"===o.responseType||"native-request-init"===o.responseType)return!0;let a,n;if(s&&(s.error&&"object"==typeof s.error?a=s.error:"error"===s.status&&Array.isArray(s.messages)&&(a={...s},a[_]=s,a.details=s.messages)),!a&&!r.ok)throw a=new Error(`Unable to load ${r.url} status: ${r.status}`),a[_]=s,a;let i,l=null;a&&(n=Number(a.code),l=a.hasOwnProperty("subcode")?Number(a.subcode):null,i=a.messageCode,i=i?.toUpperCase());const u=o.authMode;if(403===n&&(4===l||a.message?.toLowerCase().includes("ssl")&&!a.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===n)&&void 0!==n&&v.has(n)&&!F(e.parameters.url)&&(403!==n||(!i||!E.has(i))&&(null==l||2===l&&e.credentialToken))){await I();try{const r=await t.getCredential(e.parameters.url,{error:$("request:server",a,e.parameters),credential:e.credential,prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=r,e.credentialToken=r.token,e.useSSL=e.useSSL||r.ssl,!1}catch(c){if("no-prompt"===u)return e.credential=void 0,e.credentialToken=void 0,!1;a=c}}if(a)throw a;return!0}function $(e,t,n,i){let l;const u={url:n.url,requestOptions:n.requestOptions,getAllHeaders:z,getHeader:z,ssl:!1};if(t instanceof r)return t.details?(t.details=s(t.details),t.details.url=n.url,t.details.requestOptions=n.requestOptions):t.details=u,t;if(t){const e=i&&(()=>Array.from(i.headers)),r=i&&(e=>i.headers.get(e)),s=i?.status,o=t.message;o&&(l=o),e&&r&&(u.getAllHeaders=e,u.getHeader=r),u.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||s||0,u.subCode=t.subcode,u.messageCode=t.messageCode,"string"==typeof t.details?(u.messages=[t.details],l??=t.details):(u.messages=t.details,l??=u.messages?.[0]),u.raw=_ in t?t[_]:t}return l??="Error",o(t)?a():new r(e,l,u)}const _=Symbol(),z=()=>null,G="Timeout exceeded";function J(){return new Error(G)}function K(e){return"object"==typeof e&&!!e&&"message"in e&&e.message===G}export{$ as createRequestError,K as isTimeoutError,U as processRequest};
package/request/queue.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"../core/has.js";import{getOrCreateMapValue as r}from"../core/MapUtils.js";import{isAborted as e,createAbortError as o}from"../core/promiseUtils.js";import{getOrigin as t}from"../core/urlUtils.js";import{isHostedAgolService as s}from"../layers/support/arcgisLayerUrl.js";import{createRequestError as n,processRequest as u}from"./process.js";const c={useQueue:!0,priority:"high"},i={useQueue:!0,priority:"auto"};function p(r){const e=f(r);if(!e)return!1;const o=l.get(e.origin);return o?.full??!1}async function a(t){const s=f(t.parameters.url);if(!s)return null;const{QueueProcessor:c,SharedConcurrency:i}=await import("../core/QueueProcessor.js");return r(l,s.origin,()=>{const r=(s.isHosted?has("request-queue-concurrency-hosted"):has("request-queue-concurrency-non-hosted"))??4;return m??=new i(has("request-queue-concurrency-global")??50),new c({concurrency:r,sharedConcurrency:m,process:r=>{if(e(r.parameters.requestOptions))throw n("",o("Request canceled"),r.parameters);return u(r)}})})}const l=new Map;let m;function f(r){let e,o=!1;return"string"==typeof r?(e=t(r,!0),o=s(r)):(e=r.origin,o=s(r.toString())),null==e?null:new y(e,o)}class y{constructor(r,e){this.origin=r,this.isHosted=e}}export{a as ensureRequestQueue,f as getOriginInfo,p as isRequestQueueFull,i as queueAutoPriority,c as queueHighPriority};
2
+ import has from"../core/has.js";import{getOrCreateMapValue as r}from"../core/MapUtils.js";import{isAborted as e,createAbortError as o}from"../core/promiseUtils.js";import{getOrigin as t}from"../core/urlUtils.js";import{isHostedAgolService as s}from"../layers/support/arcgisLayerUrl.js";import{createRequestError as n,processRequest as u}from"./process.js";const c={useQueue:!0,priority:"high"},i={useQueue:!0,priority:"auto"};function p(r){const e=f(r);if(!e)return!1;const o=l.get(e.origin);return o?.full??!1}async function a(t){const s=f(t.parameters.url);if(!s)return null;const{QueueProcessor:c,SharedConcurrency:i}=await(import("../core/QueueProcessor.js"));return r(l,s.origin,()=>{const r=(s.isHosted?has("request-queue-concurrency-hosted"):has("request-queue-concurrency-non-hosted"))??4;return m??=new i(has("request-queue-concurrency-global")??50),new c({concurrency:r,sharedConcurrency:m,process:r=>{if(e(r.parameters.requestOptions))throw n("",o("Request canceled"),r.parameters);return u(r)}})})}const l=new Map;let m;function f(r){let e,o=!1;return"string"==typeof r?(e=t(r,!0),o=s(r)):(e=r.origin,o=s(r.toString())),null==e?null:new y(e,o)}class y{constructor(r,e){this.origin=r,this.isHosted=e}}export{a as ensureRequestQueue,f as getOriginInfo,p as isRequestQueueFull,i as queueAutoPriority,c as queueHighPriority};
package/request.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"./config.js";import r from"./core/Error.js";import has from"./core/has.js";import{onAbort as t}from"./core/promiseUtils.js";import{isDataProtocol as o,isBlobProtocol as s,normalize as n,queryToObject as i,getInterceptor as a}from"./core/urlUtils.js";import{requestConfig as u}from"./request/config.js";import{createRequestError as p,processRequest as c}from"./request/process.js";import{ensureRequestQueue as l}from"./request/queue.js";async function f(e,r){e instanceof URL&&(e=e.toString());const u=o(e),l=s(e);l||u||(e=n(e));const f={url:e,requestOptions:{...r}};r?.query&&(f.requestOptions.query=r?.query instanceof URLSearchParams?i(r.query.toString().replaceAll("+"," ")):r?.query);const b=e=>({data:e,getAllHeaders:q,getHeader:q,httpStatus:200,requestOptions:f.requestOptions,url:f.url}),g=a(e,m.internalInterceptors);if(g){const e=await w(g,f);if(null!=e)return b(e)}let O=a(e);if(O){const e=await w(O,f);if(null!=e)return b(e);O.after||O.error||(O=null)}if(e=f.url,"image"===(r=f.requestOptions).responseType&&(has("host-webworker")||has("host-node")))throw p("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),f);if("head"===r.method){if(r.body)throw p("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),f);if(u||l)throw p("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),f)}if(await h(),d)return d.execute(e,r);const j=new AbortController,v=t(r,()=>j.abort()),k={controller:j,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:O,parameters:f,redoRequest:!1,useIdentity:m.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},S=r.useQueue?y(k):c(k),E=await S.finally(()=>v?.remove());return O?.after?.(E),E}let d;const m=e.request,q=()=>null;async function h(){has("host-webworker")&&(!d&&globalThis.invokeStaticMessage?d=await import("./core/workers/request.js"):u.isForeignWorker=!0)}async function w(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let s,n;try{n=await e.before(t)}catch(o){s=p("request:interceptor",o,t)}if((n instanceof Error||n instanceof r)&&(s=p("request:interceptor",n,t)),s)throw e.error&&e.error(s),s;return n}}async function y(e){const r=await l(e);return r?r.push(e):c(e)}export{f as default};
2
+ import e from"./config.js";import r from"./core/Error.js";import has from"./core/has.js";import{onAbort as t}from"./core/promiseUtils.js";import{isDataProtocol as o,isBlobProtocol as s,normalize as n,queryToObject as i,getInterceptor as a}from"./core/urlUtils.js";import{requestConfig as u}from"./request/config.js";import{createRequestError as p,processRequest as c}from"./request/process.js";import{ensureRequestQueue as l}from"./request/queue.js";async function f(e,r){e instanceof URL&&(e=e.toString());const u=o(e),l=s(e);l||u||(e=n(e));const f={url:e,requestOptions:{...r}};r?.query&&(f.requestOptions.query=r?.query instanceof URLSearchParams?i(r.query.toString().replaceAll("+"," ")):r?.query);const b=e=>({data:e,getAllHeaders:q,getHeader:q,httpStatus:200,requestOptions:f.requestOptions,url:f.url}),g=a(e,m.internalInterceptors);if(g){const e=await w(g,f);if(null!=e)return b(e)}let O=a(e);if(O){const e=await w(O,f);if(null!=e)return b(e);O.after||O.error||(O=null)}if(e=f.url,"image"===(r=f.requestOptions).responseType&&(has("host-webworker")||has("host-node")))throw p("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),f);if("head"===r.method){if(r.body)throw p("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),f);if(u||l)throw p("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),f)}if(await h(),d)return d.execute(e,r);const j=new AbortController,v=t(r,()=>j.abort()),k={controller:j,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:O,parameters:f,redoRequest:!1,useIdentity:m.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},S=r.useQueue?y(k):c(k),E=await S.finally(()=>v?.remove());return O?.after?.(E),E}let d;const m=e.request,q=()=>null;async function h(){has("host-webworker")&&(!d&&globalThis.invokeStaticMessage?d=await(import("./core/workers/request.js")):u.isForeignWorker=!0)}async function w(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let s,n;try{n=await e.before(t)}catch(o){s=p("request:interceptor",o,t)}if((n instanceof Error||n instanceof r)&&(s=p("request:interceptor",n,t)),s)throw e.error&&e.error(s),s;return n}}async function y(e){const r=await l(e);return r?r.push(e):c(e)}export{f as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../request.js";import r from"../../geometry/SpatialReference.js";import{normalizeCentralMeridian as t}from"../../geometry/support/normalizeUtils.js";import a from"../../layers/support/Field.js";import o from"../../layers/support/MapImage.js";import{parseUrl as n,encode as s}from"../utils.js";import i from"../support/ArealUnit.js";import u from"../support/DataFile.js";import m from"../support/FeatureSet.js";import p from"../support/LinearUnit.js";import c from"../support/ParameterValue.js";import{dataTypeJsonMap as f,multiValuePrefix as l}from"../support/parameterValueUtils.js";import S from"../support/RasterData.js";import y from"../support/TimeUnit.js";async function d(r,a,o,s,i){const u={},m={},p=[];return N(s,p,u),t(p).then(t=>{const{outSpatialReference:p,processExtent:c,processSpatialReference:f,returnColumnName:l,returnFeatureCollection:S,returnM:y,returnZ:d}=o,{path:N}=n(r);for(const e in u){const[r,a]=u[e];m[e]=t.slice(r,a)}const j=p?p.wkid||p:null,J=f?f.wkid||f:null,O="execute"===a?{returnColumnName:l||void 0,returnFeatureCollection:S||void 0,returnM:y||void 0,returnZ:d||void 0}:null,g=v({...c?{context:{extent:c,outSR:j,processSR:J}}:{"env:outSR":j,"env:processSR":J},...s,...O,f:"json"},null,m),R={...i,query:g};return e(`${N}/${a}`,R)})}function N(e,r,t){for(const a in e){const o=e[a];if(o&&"object"==typeof o&&o instanceof m){const{features:e}=o;t[a]=[r.length,r.length+e.length],e.forEach(e=>{r.push(e.geometry)})}}}async function j(e,t){switch(e){case"time-unit":return y.fromJSON(t);case"areal-unit":return i.fromJSON(t);case"boolean":case"double":case"long":case"string":case"value-table":return t;case"date":return new Date(t);case"data-file":return u.fromJSON(t);case"linear-unit":return p.fromJSON(t);case"feature-record-set-layer":if("url"in t)return u.fromJSON(t);if("layerDefinition"in t){const e=new(0,(await import("../../layers/FeatureLayer.js")).default),{layerDefinition:a,featureSet:o}=t;return e.read({layerDefinition:a,featureSet:o},{origin:"portal-item"}),e.spatialReference=r.fromJSON(o.spatialReference??a.spatialReference??a.extent.spatialReference),e}return m.fromJSON(t);case"record-set":return"url"in t?u.fromJSON(t):m.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?o.fromJSON(t.mapImage):S.fromJSON(t);case"field":return a.fromJSON(t)}}function J(e){return e.startsWith(l)}function O(e){return e.replace(l,"")}async function g(e,r){const t=O(e),a="composite"===t?r.map(e=>j(f.fromJSON(e.dataType),e.value)):r.map(e=>j(t,e));return Promise.all(a)}async function R(e){const r=f.fromJSON(e.dataType),{paramName:t}=e,a=J(r)?await g(r,e.value):await j(r,e.value);return new c({dataType:r,paramName:t,value:a})}function v(e,r,t){for(const a in e){const r=e[a];Array.isArray(r)?e[a]=JSON.stringify(r.map(e=>v({item:e},!0).item)):r instanceof Date&&(e[a]=r.getTime())}return s(e,r,t)}export{N as collectGeometries,d as constructRequest,R as decode,v as gpEncode};
2
+ import e from"../../request.js";import r from"../../geometry/SpatialReference.js";import{normalizeCentralMeridian as t}from"../../geometry/support/normalizeUtils.js";import a from"../../layers/support/Field.js";import o from"../../layers/support/MapImage.js";import{parseUrl as n,encode as s}from"../utils.js";import i from"../support/ArealUnit.js";import u from"../support/DataFile.js";import m from"../support/FeatureSet.js";import p from"../support/LinearUnit.js";import c from"../support/ParameterValue.js";import{dataTypeJsonMap as f,multiValuePrefix as l}from"../support/parameterValueUtils.js";import S from"../support/RasterData.js";import y from"../support/TimeUnit.js";async function d(r,a,o,s,i){const u={},m={},p=[];return N(s,p,u),t(p).then(t=>{const{outSpatialReference:p,processExtent:c,processSpatialReference:f,returnColumnName:l,returnFeatureCollection:S,returnM:y,returnZ:d}=o,{path:N}=n(r);for(const e in u){const[r,a]=u[e];m[e]=t.slice(r,a)}const j=p?p.wkid||p:null,J=f?f.wkid||f:null,O="execute"===a?{returnColumnName:l||void 0,returnFeatureCollection:S||void 0,returnM:y||void 0,returnZ:d||void 0}:null,g=v({...c?{context:{extent:c,outSR:j,processSR:J}}:{"env:outSR":j,"env:processSR":J},...s,...O,f:"json"},null,m),R={...i,query:g};return e(`${N}/${a}`,R)})}function N(e,r,t){for(const a in e){const o=e[a];if(o&&"object"==typeof o&&o instanceof m){const{features:e}=o;t[a]=[r.length,r.length+e.length],e.forEach(e=>{r.push(e.geometry)})}}}async function j(e,t){switch(e){case"time-unit":return y.fromJSON(t);case"areal-unit":return i.fromJSON(t);case"boolean":case"double":case"long":case"string":case"value-table":return t;case"date":return new Date(t);case"data-file":return u.fromJSON(t);case"linear-unit":return p.fromJSON(t);case"feature-record-set-layer":if("url"in t)return u.fromJSON(t);if("layerDefinition"in t){const e=new(0,(await(import("../../layers/FeatureLayer.js"))).default),{layerDefinition:a,featureSet:o}=t;return e.read({layerDefinition:a,featureSet:o},{origin:"portal-item"}),e.spatialReference=r.fromJSON(o.spatialReference??a.spatialReference??a.extent.spatialReference),e}return m.fromJSON(t);case"record-set":return"url"in t?u.fromJSON(t):m.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?o.fromJSON(t.mapImage):S.fromJSON(t);case"field":return a.fromJSON(t)}}function J(e){return e.startsWith(l)}function O(e){return e.replace(l,"")}async function g(e,r){const t=O(e),a="composite"===t?r.map(e=>j(f.fromJSON(e.dataType),e.value)):r.map(e=>j(t,e));return Promise.all(a)}async function R(e){const r=f.fromJSON(e.dataType),{paramName:t}=e,a=J(r)?await g(r,e.value):await j(r,e.value);return new c({dataType:r,paramName:t,value:a})}function v(e,r,t){for(const a in e){const r=e[a];Array.isArray(r)?e[a]=JSON.stringify(r.map(e=>v({item:e},!0).item)):r instanceof Date&&(e[a]=r.getTime())}return s(e,r,t)}export{N as collectGeometries,d as constructRequest,R as decode,v as gpEncode};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{getAssetUrl as e}from"../../../assets.js";import has from"../../../core/has.js";const t="esri/rest/knowledgeGraph/wasmInterface/";let s,r;async function o(){const e=s??r;if(e)return e;const t=!!has("wasm-simd");return r=n(t),r}async function n(s){if(s){const{default:s}=await import("../../../chunks/arcgis-knowledge-client-core-simd.js");return s({locateFile:s=>e(t+s)})}const{default:r}=await import("../../../chunks/arcgis-knowledge-client-core.js");return r({locateFile:s=>e(t+s)})}const c={setWasmInterfacePromise:e=>s=e,restoreWasmInterfacePromise:()=>s=void 0};export{n as getNewInterface,o as getWasmInterface,c as test};
2
+ import{getAssetUrl as e}from"../../../assets.js";import has from"../../../core/has.js";const t="esri/rest/knowledgeGraph/wasmInterface/";let s,r;async function o(){const e=s??r;if(e)return e;const t=!!has("wasm-simd");return r=n(t),r}async function n(s){if(s){const{default:s}=await(import("../../../chunks/arcgis-knowledge-client-core-simd.js"));return s({locateFile:s=>e(t+s)})}const{default:r}=await(import("../../../chunks/arcgis-knowledge-client-core.js"));return r({locateFile:s=>e(t+s)})}const c={setWasmInterfacePromise:e=>s=e,restoreWasmInterfacePromise:()=>s=void 0};export{n as getNewInterface,o as getWasmInterface,c as test};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../request.js";import{strict as o}from"../../core/jsonMap.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{onAbort as r,createAbortError as i}from"../../core/promiseUtils.js";import{property as a,subclass as c}from"../../core/accessorSupport/decorators.js";import{parseUrl as n}from"../utils.js";import l from"../geoprocessor/GPOptions.js";import{gpEncode as u,decode as b}from"../geoprocessor/utils.js";import m from"./GPMessage.js";import{enumeration as j}from"../../core/accessorSupport/decorators/enumeration.js";var p;const h=o()({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"},{ignoreUnknown:!1}),d=1e3;let g=class extends s{static{p=this}constructor(e){super(e),this.jobId=null,this.jobStatus=null,this.messages=null,this.progress=null,this.requestOptions=null,this.sourceUrl=null,this._cancelJobTimer=void 0,this._jobCompletionTimer=void 0}async cancelJob(e){const{jobId:o,sourceUrl:s}=this,{path:a}=n(s),c={...this.requestOptions,...e,query:{f:"json"}},l=`${a}/jobs/${o}/cancel`,{data:u}=await t(l,c),{messages:b,jobStatus:m,progress:j}=p.fromJSON(u);return this.set({messages:b,jobStatus:m,progress:j}),"job-cancelled"===m?this:new Promise((t,o)=>{r(c.signal,()=>{this.clearCancelJobTimer(),o(i())}),this.clearCancelJobTimer();const s=()=>{this._cancelJobTimer||o(i()),this.checkJobStatus(e).then(({jobStatus:e})=>{switch(e){case"job-cancelling":default:this._cancelJobTimer=setTimeout(s,d);break;case"job-deleted":case"job-deleting":case"job-executing":case"job-failed":case"job-new":case"job-submitted":case"job-succeeded":case"job-timed-out":case"job-waiting":o(this);break;case"job-cancelled":t(this)}}).catch(e=>{o(e)})};this._cancelJobTimer=setTimeout(s,d)})}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:o}=n(this.sourceUrl),s={...this.requestOptions,...e,query:{...e?.query,f:"json"}},r=`${o}/jobs/${this.jobId}`,{data:i}=await t(r,s),{messages:a,jobStatus:c,progress:l}=p.fromJSON(i);return this.set({messages:a,jobStatus:c,progress:l}),this}async fetchResultData(e,o,s){o=l.from(o||{});const{returnColumnName:r,returnFeatureCollection:i,returnM:a,returnZ:c,outSpatialReference:m}=o,{path:j}=n(this.sourceUrl),p={returnColumnName:r||null,returnFeatureCollection:i||null,returnM:a||null,returnZ:c||null,outSR:m,returnType:"data",f:"json",...s?.query},h=u(p,null),d={...this.requestOptions,...s,query:h},g=`${j}/jobs/${this.jobId}/results/${e}`,{data:J}=await t(g,d);return b(J)}async fetchResultImage(e,o,s){const{path:r}=n(this.sourceUrl),i={...o.toJSON(),f:"json"},a=u(i),c={...this.requestOptions,...s,query:a},l=`${r}/jobs/${this.jobId}/results/${e}`,{data:m}=await t(l,c);return b(m)}async fetchResultMapImageLayer(){const{path:e}=n(this.sourceUrl),t=e.indexOf("/GPServer/"),o=`${e.slice(0,Math.max(0,t))}/MapServer/jobs/${this.jobId}`;return new(0,(await import("../../layers/MapImageLayer.js")).default)({url:o})}async waitForJobCompletion(e={}){const{interval:t=d,signal:o,statusCallback:s,apiKey:a}=e;return new Promise((e,c)=>{r(o,()=>{this.clearJobCompletionTimer(),c(i())}),this.clearJobCompletionTimer();const n=()=>{this._jobCompletionTimer||c(i()),this.checkJobStatus({query:{token:a}}).then(({jobStatus:o})=>{switch(o){case"job-succeeded":e(this);break;case"job-executing":case"job-new":case"job-submitted":case"job-waiting":s&&s(this),this._jobCompletionTimer=setTimeout(n,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":c(this);break;default:this._jobCompletionTimer=setTimeout(n,t)}}).catch(e=>{c(e)})};this._jobCompletionTimer=setTimeout(n,t)})}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};e([a()],g.prototype,"jobId",void 0),e([j(h,{ignoreUnknown:!1})],g.prototype,"jobStatus",void 0),e([a({type:[m]})],g.prototype,"messages",void 0),e([a()],g.prototype,"progress",void 0),e([a()],g.prototype,"requestOptions",void 0),e([a({json:{write:!0}})],g.prototype,"sourceUrl",void 0),g=p=e([c("esri.rest.support.JobInfo")],g);export{g as default};
2
+ import{__decorate as e}from"tslib";import t from"../../request.js";import{strict as o}from"../../core/jsonMap.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{onAbort as r,createAbortError as i}from"../../core/promiseUtils.js";import{property as a,subclass as c}from"../../core/accessorSupport/decorators.js";import{parseUrl as n}from"../utils.js";import l from"../geoprocessor/GPOptions.js";import{gpEncode as u,decode as b}from"../geoprocessor/utils.js";import m from"./GPMessage.js";import{enumeration as j}from"../../core/accessorSupport/decorators/enumeration.js";var p;const h=o()({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"},{ignoreUnknown:!1}),d=1e3;let g=class extends s{static{p=this}constructor(e){super(e),this.jobId=null,this.jobStatus=null,this.messages=null,this.progress=null,this.requestOptions=null,this.sourceUrl=null,this._cancelJobTimer=void 0,this._jobCompletionTimer=void 0}async cancelJob(e){const{jobId:o,sourceUrl:s}=this,{path:a}=n(s),c={...this.requestOptions,...e,query:{f:"json"}},l=`${a}/jobs/${o}/cancel`,{data:u}=await t(l,c),{messages:b,jobStatus:m,progress:j}=p.fromJSON(u);return this.set({messages:b,jobStatus:m,progress:j}),"job-cancelled"===m?this:new Promise((t,o)=>{r(c.signal,()=>{this.clearCancelJobTimer(),o(i())}),this.clearCancelJobTimer();const s=()=>{this._cancelJobTimer||o(i()),this.checkJobStatus(e).then(({jobStatus:e})=>{switch(e){case"job-cancelling":default:this._cancelJobTimer=setTimeout(s,d);break;case"job-deleted":case"job-deleting":case"job-executing":case"job-failed":case"job-new":case"job-submitted":case"job-succeeded":case"job-timed-out":case"job-waiting":o(this);break;case"job-cancelled":t(this)}}).catch(e=>{o(e)})};this._cancelJobTimer=setTimeout(s,d)})}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:o}=n(this.sourceUrl),s={...this.requestOptions,...e,query:{...e?.query,f:"json"}},r=`${o}/jobs/${this.jobId}`,{data:i}=await t(r,s),{messages:a,jobStatus:c,progress:l}=p.fromJSON(i);return this.set({messages:a,jobStatus:c,progress:l}),this}async fetchResultData(e,o,s){o=l.from(o||{});const{returnColumnName:r,returnFeatureCollection:i,returnM:a,returnZ:c,outSpatialReference:m}=o,{path:j}=n(this.sourceUrl),p={returnColumnName:r||null,returnFeatureCollection:i||null,returnM:a||null,returnZ:c||null,outSR:m,returnType:"data",f:"json",...s?.query},h=u(p,null),d={...this.requestOptions,...s,query:h},g=`${j}/jobs/${this.jobId}/results/${e}`,{data:J}=await t(g,d);return b(J)}async fetchResultImage(e,o,s){const{path:r}=n(this.sourceUrl),i={...o.toJSON(),f:"json"},a=u(i),c={...this.requestOptions,...s,query:a},l=`${r}/jobs/${this.jobId}/results/${e}`,{data:m}=await t(l,c);return b(m)}async fetchResultMapImageLayer(){const{path:e}=n(this.sourceUrl),t=e.indexOf("/GPServer/"),o=`${e.slice(0,Math.max(0,t))}/MapServer/jobs/${this.jobId}`;return new(0,(await(import("../../layers/MapImageLayer.js"))).default)({url:o})}async waitForJobCompletion(e={}){const{interval:t=d,signal:o,statusCallback:s,apiKey:a}=e;return new Promise((e,c)=>{r(o,()=>{this.clearJobCompletionTimer(),c(i())}),this.clearJobCompletionTimer();const n=()=>{this._jobCompletionTimer||c(i()),this.checkJobStatus({query:{token:a}}).then(({jobStatus:o})=>{switch(o){case"job-succeeded":e(this);break;case"job-executing":case"job-new":case"job-submitted":case"job-waiting":s&&s(this),this._jobCompletionTimer=setTimeout(n,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":c(this);break;default:this._jobCompletionTimer=setTimeout(n,t)}}).catch(e=>{c(e)})};this._jobCompletionTimer=setTimeout(n,t)})}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};e([a()],g.prototype,"jobId",void 0),e([j(h,{ignoreUnknown:!1})],g.prototype,"jobStatus",void 0),e([a({type:[m]})],g.prototype,"messages",void 0),e([a()],g.prototype,"progress",void 0),e([a()],g.prototype,"requestOptions",void 0),e([a({json:{write:!0}})],g.prototype,"sourceUrl",void 0),g=p=e([c("esri.rest.support.JobInfo")],g);export{g as default};
package/rest/utils.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import t from"../config.js";import{id as n}from"../kernel.js";import{clone as r}from"../core/lang.js";import{urlToObject as e}from"../core/urlUtils.js";import{getApiKey as i,supportsApiKey as o}from"../support/apiKeyUtils.js";function s(t,n){return n?{...n,query:{...t,...n.query}}:{query:t}}function f(t){return"string"==typeof t?e(t):r(t)}function u(t,n,r){const e={};for(const i in t){if("declaredClass"===i)continue;const o=t[i];if(null!=o&&"function"!=typeof o)if(Array.isArray(o))e[i]=o.map(t=>u(t));else if("object"==typeof o)if(o.toJSON){const t=o.toJSON(r?.[i]);e[i]=n?t:JSON.stringify(t)}else e[i]=n?o:JSON.stringify(o);else e[i]=o}return e}function c(t,r){return t?r&&o(t)?r:i(t)??n?.findCredential(t)?.token:null}async function a(r,e,i){const o=c(r,e);if(o)return o;!n&&t.request.useIdentity&&await import("../identity/IdentityManager.js");const s=await n.getCredential(r,i);return s?.token}export{s as asValidOptions,u as encode,c as findToken,a as getToken,f as parseUrl};
2
+ import t from"../config.js";import{id as n}from"../kernel.js";import{clone as r}from"../core/lang.js";import{urlToObject as e}from"../core/urlUtils.js";import{getApiKey as i,supportsApiKey as o}from"../support/apiKeyUtils.js";function s(t,n){return n?{...n,query:{...t,...n.query}}:{query:t}}function f(t){return"string"==typeof t?e(t):r(t)}function u(t,n,r){const e={};for(const i in t){if("declaredClass"===i)continue;const o=t[i];if(null!=o&&"function"!=typeof o)if(Array.isArray(o))e[i]=o.map(t=>u(t));else if("object"==typeof o)if(o.toJSON){const t=o.toJSON(r?.[i]);e[i]=n?t:JSON.stringify(t)}else e[i]=n?o:JSON.stringify(o);else e[i]=o}return e}function c(t,r){return t?r&&o(t)?r:i(t)??n?.findCredential(t)?.token:null}async function a(r,e,i){const o=c(r,e);if(o)return o;!n&&t.request.useIdentity&&await(import("../identity/IdentityManager.js"));const s=await n.getCredential(r,i);return s?.token}export{s as asValidOptions,u as encode,c as findToken,a as getToken,f as parseUrl};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../core/Error.js";import r from"../../../renderers/visualVariables/RotationVariable.js";import{regenerateVisualVariable as a}from"../opacity.js";import{getRendererToUpdate as i,getStyleType as t,findOpacityVVIndex as n,spliceVisualVariables as s,updateAuthoringInfoVisualVariable as o,findRotationVVIndex as l,findSizeVVIndex as c,getAuthoringInfoVisualVariable as u,hasScaleDependentSizeVV as d}from"./regenerateUtils.js";import{resolveDataSeriesInfo as p}from"./timeSeriesUtils.js";async function w(r){let a=await i(r);const n=t(a),s=r.includedParts,o=s?.includes("size-variable")??!0,l=s?.includes("color-variable")??!0,c=s?.includes("class-breaks")??!0,u=s?.includes("opacity-variable")??!0,d=s?.includes("rotation-variable")??!0;switch(a=await f({params:r,renderer:a,styleType:n,includeOpacityVariable:u,includeRotationVariable:d}),r={...r,renderer:a},n){case"color-continuous":{if(!l)return a;const{regenerateContinuousRenderer:e}=await import("../color.js");return(await e(r)).renderer}case"color-class-breaks":{if(!c)return a;const{regenerateClassBreaksRenderer:e}=await import("../color.js");return(await e(r)).renderer}case"color-age":{if(!l)return a;const{regenerateAgeRenderer:e}=await import("../color.js");return(await e(r)).renderer}case"size-continuous":{if(!o)return a;const{regenerateContinuousRenderer:e}=await import("../size.js");return(await e(r)).renderer}case"size-class-breaks":{if(!c)return a;const{regenerateClassBreaksRenderer:e}=await import("../size.js");return(await e(r)).renderer}case"size-age":{if(!o)return a;const{regenerateAgeRenderer:e}=await import("../size.js");return(await e(r)).renderer}case"color-size":{let e=a;if(l){const{regenerateContinuousRenderer:a}=await import("../color.js");e=(await a(r)).renderer}return o?await m(r,e):e}case"type":{const{regenerateRenderer:e}=await import("../type.js");return(await e(r)).renderer}case"type-size":{const{regenerateRenderer:e}=await import("../type.js"),{renderer:a}=await e(r);return o?await m(r,a):a}case"predominance":{const{regenerateRenderer:e}=await import("../predominance.js");return(await e(r)).renderer}case"relationship":{if(!c)return a;const{regenerateRenderer:e}=await import("../relationship.js");return(await e(r)).renderer}case"relationship-size":{let e=a;if(c){const{regenerateRenderer:a}=await import("../relationship.js"),{renderer:i}=await a(r);e=i}return o?await m(r,e):e}case"pie-chart":{const{regenerateRenderer:e}=await import("../pieChart.js");return(await e(r)).renderer}case"dot-density":{const{regenerateRenderer:e}=await import("../dotDensity.js");return(await e(r)).renderer}case"heatmap":{const{regenerateRenderer:e}=await import("../heatmap.js");return(await e(r)).renderer}case"location":{const{regenerateRenderer:e}=await import("../location.js");return(await e(r)).renderer}case"univariate-color-size":{const{regenerateRenderer:e}=await import("../univariateColorSize.js");return(await e(r)).renderer}default:throw new e("regenerate-renderer:invalid-parameters","renderer type not supported")}}async function m(e,r){const{regenerateVisualVariables:a,updateRendererWithReferenceSize:i,updateRendererWithSpike:t}=await import("../size.js"),{visualVariables:n,authoringInfo:l,isGrid:p}=await a({...e,renderer:r});s(r,n,c),o(r,l,"size");const w=u(r,"size","reference-size"),m=u(r,"size","spike");return w||m?m?await t({layer:e.layer,renderer:r,sizeStops:m.sizeStops,forBinning:e.forBinning}):await i({layer:e.layer,renderer:r,sizeStops:w.sizeStops,view:e.view,forBinning:e.forBinning,sizeOptimizationEnabled:d(r),isGrid:p}):r}async function f({params:e,renderer:r,styleType:i,includeOpacityVariable:t,includeRotationVariable:c}){if(!("visualVariables"in r))return r;if(t&&"predominance"!==i&&-1!==n(r.visualVariables)){const i=await a({...e,renderer:r});s(r,i?.visualVariable,n),o(r,i?.authoringInfo,"opacity")}if(c){const a=await g(e,r);s(r,a,l)}return r}async function g(e,a){const i=a.visualVariables?.[l(a.visualVariables)],t=u(a,"rotation");if(!i)return null;const n=new r({axis:i.axis,rotationType:i.rotationType,field:i.field,valueExpression:i.valueExpression,valueExpressionTitle:i.valueExpressionTitle,legendOptions:i.legendOptions?.clone()});if(!t?.dataSeriesName)return n;const s=p({layer:e.layer,view:e.view,field:n.field??null,dataSeriesName:t.dataSeriesName,valueExpression:n.valueExpression??null,valueExpressionTitle:n.valueExpressionTitle??null});return n.field=s.field??null,n.valueExpression=s.valueExpression??null,n.valueExpressionTitle=s.valueExpressionTitle??null,n}export{w as regenerateRenderer};
2
+ import e from"../../../core/Error.js";import r from"../../../renderers/visualVariables/RotationVariable.js";import{regenerateVisualVariable as a}from"../opacity.js";import{getRendererToUpdate as i,getStyleType as t,findOpacityVVIndex as n,spliceVisualVariables as s,updateAuthoringInfoVisualVariable as o,findRotationVVIndex as l,findSizeVVIndex as c,getAuthoringInfoVisualVariable as u,hasScaleDependentSizeVV as d}from"./regenerateUtils.js";import{resolveDataSeriesInfo as p}from"./timeSeriesUtils.js";async function w(r){let a=await i(r);const n=t(a),s=r.includedParts,o=s?.includes("size-variable")??!0,l=s?.includes("color-variable")??!0,c=s?.includes("class-breaks")??!0,u=s?.includes("opacity-variable")??!0,d=s?.includes("rotation-variable")??!0;switch(a=await f({params:r,renderer:a,styleType:n,includeOpacityVariable:u,includeRotationVariable:d}),r={...r,renderer:a},n){case"color-continuous":{if(!l)return a;const{regenerateContinuousRenderer:e}=await(import("../color.js"));return(await e(r)).renderer}case"color-class-breaks":{if(!c)return a;const{regenerateClassBreaksRenderer:e}=await(import("../color.js"));return(await e(r)).renderer}case"color-age":{if(!l)return a;const{regenerateAgeRenderer:e}=await(import("../color.js"));return(await e(r)).renderer}case"size-continuous":{if(!o)return a;const{regenerateContinuousRenderer:e}=await(import("../size.js"));return(await e(r)).renderer}case"size-class-breaks":{if(!c)return a;const{regenerateClassBreaksRenderer:e}=await(import("../size.js"));return(await e(r)).renderer}case"size-age":{if(!o)return a;const{regenerateAgeRenderer:e}=await(import("../size.js"));return(await e(r)).renderer}case"color-size":{let e=a;if(l){const{regenerateContinuousRenderer:a}=await(import("../color.js"));e=(await a(r)).renderer}return o?await m(r,e):e}case"type":{const{regenerateRenderer:e}=await(import("../type.js"));return(await e(r)).renderer}case"type-size":{const{regenerateRenderer:e}=await(import("../type.js")),{renderer:a}=await e(r);return o?await m(r,a):a}case"predominance":{const{regenerateRenderer:e}=await(import("../predominance.js"));return(await e(r)).renderer}case"relationship":{if(!c)return a;const{regenerateRenderer:e}=await(import("../relationship.js"));return(await e(r)).renderer}case"relationship-size":{let e=a;if(c){const{regenerateRenderer:a}=await(import("../relationship.js")),{renderer:i}=await a(r);e=i}return o?await m(r,e):e}case"pie-chart":{const{regenerateRenderer:e}=await(import("../pieChart.js"));return(await e(r)).renderer}case"dot-density":{const{regenerateRenderer:e}=await(import("../dotDensity.js"));return(await e(r)).renderer}case"heatmap":{const{regenerateRenderer:e}=await(import("../heatmap.js"));return(await e(r)).renderer}case"location":{const{regenerateRenderer:e}=await(import("../location.js"));return(await e(r)).renderer}case"univariate-color-size":{const{regenerateRenderer:e}=await(import("../univariateColorSize.js"));return(await e(r)).renderer}default:throw new e("regenerate-renderer:invalid-parameters","renderer type not supported")}}async function m(e,r){const{regenerateVisualVariables:a,updateRendererWithReferenceSize:i,updateRendererWithSpike:t}=await(import("../size.js")),{visualVariables:n,authoringInfo:l,isGrid:p}=await a({...e,renderer:r});s(r,n,c),o(r,l,"size");const w=u(r,"size","reference-size"),m=u(r,"size","spike");return w||m?m?await t({layer:e.layer,renderer:r,sizeStops:m.sizeStops,forBinning:e.forBinning}):await i({layer:e.layer,renderer:r,sizeStops:w.sizeStops,view:e.view,forBinning:e.forBinning,sizeOptimizationEnabled:d(r),isGrid:p}):r}async function f({params:e,renderer:r,styleType:i,includeOpacityVariable:t,includeRotationVariable:c}){if(!("visualVariables"in r))return r;if(t&&"predominance"!==i&&-1!==n(r.visualVariables)){const i=await a({...e,renderer:r});s(r,i?.visualVariable,n),o(r,i?.authoringInfo,"opacity")}if(c){const a=await g(e,r);s(r,a,l)}return r}async function g(e,a){const i=a.visualVariables?.[l(a.visualVariables)],t=u(a,"rotation");if(!i)return null;const n=new r({axis:i.axis,rotationType:i.rotationType,field:i.field,valueExpression:i.valueExpression,valueExpressionTitle:i.valueExpressionTitle,legendOptions:i.legendOptions?.clone()});if(!t?.dataSeriesName)return n;const s=p({layer:e.layer,view:e.view,field:n.field??null,dataSeriesName:t.dataSeriesName,valueExpression:n.valueExpression??null,valueExpressionTitle:n.valueExpressionTitle??null});return n.field=s.field??null,n.valueExpression=s.valueExpression??null,n.valueExpressionTitle=s.valueExpressionTitle??null,n}export{w as regenerateRenderer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{pickRandom as t}from"../../../core/arrayUtils.js";import r from"../../../core/Error.js";import a from"../../../core/Logger.js";import{assertIsSome as i}from"../../../core/maybe.js";import{timeout as s,throwIfAborted as o}from"../../../core/promiseUtils.js";import{whenOnce as n}from"../../../core/reactiveUtils.js";import{property as l,subclass as u}from"../../../core/accessorSupport/decorators.js";import{toQuantizationTransform as m}from"../../../geometry/support/quantizationUtils.js";import{kebabDict as p}from"../../../layers/support/fieldType.js";import{isTimeOnlyField as y}from"../../../layers/support/fieldUtils.js";import f from"../../../rest/support/QuantizationParameters.js";import{getArcadeForPredominantCategory as c}from"../../statistics/support/predominanceUtils.js";import{summaryStatistics as d,uniqueValues as h,histogram as w,classBreaks as g,heatmapStatistics as F}from"../../statistics/support/statsWorker.js";import{mergeWhereClauses as S}from"../../statistics/support/utils.js";import{WorkerClient as q}from"../../statistics/support/WorkerClient.js";import{getFieldsList as v,isAnyDateField as x,getFieldsFromWhereClauses as V,fieldDelimiter as _}from"../utils.js";import z from"./LayerAdapter.js";import{getHistogramAttributeDefinition as T,getAttributeBinsQuery as N,processQueryAttributeBinsResult as M}from"./support/histogramUtils.js";import{ensureFeaturesJSON as L,getSummaryStatsQuery as E,getSummaryStatisticsFromFeatureSet as C,getViewInfoParams as j,getMissingFields as b,updateQueryWithFeatureFilter as I,getUVQuery as k,getUniqueValuesFromFeatureSet as O,getBins as Q,getDomainsForFields as J,getPredominantCategoriesFromUVInfos as B}from"./support/utils.js";import{processSummaryStatisticsResult as P,createUVResult as U,resolveCBResult as A}from"../../../statistics/utils.js";import{loadArcade as $}from"../../../support/loadArcade.js";const G=5;let R,D=class extends z{constructor(){super(...arguments),this._hasLocalSource=!1,this.adapterName="in-memory-layer-adapter"}destroy(){this.workerClient?.destroy()}async _waitForLayerViewUpdate(e){if(!e)throw new r(`${this.adapterName}:insufficient-data`,"layerView is required to fetch the features");const t=new AbortController,i=n(()=>!e.updating,t.signal);await s(i,5e3,t).catch(e=>{throw a.getLogger(this).warn("LayerView is taking too long to update. Aborting fetch from layerView."),e})}async _fetchFeatureSetFromMemory(e,t,a){const i=this.layer;if(this._hasLocalSource&&"queryFeatures"in i)return i.queryFeatures(e);if(!t)throw new r(`${this.adapterName}:insufficient-data`,"view is required to fetch the features from layerView");const s=await t.whenLayerView(this.layer);return await this._waitForLayerViewUpdate(s),s.queryFeatures(e,{signal:a})}async _fetchFeaturesFromMemory(e,t,a,i){const s=this.layer,o="json"===i;if(this._hasLocalSource&&"queryFeatures"in s){const e=await s.queryFeatures(t);return o?L(e.features):e.features}if(await this._waitForLayerViewUpdate(e),o&&"queryFeaturesJSON"in e&&e.queryFeaturesJSON){const{features:r}=await e.queryFeaturesJSON(t,{signal:a});return r}if(!("queryFeatures"in e))throw new r(`${this.adapterName}:not-supported`,"'queryFeatures' is not supported on the layerView");const n=await e.queryFeatures(t,{signal:a});return o?L(n.features):n.features}_fetchFeaturesForStats(e,t){return v({field:e.field,field2:e.field2,field3:e.field3,normalizationField:e.normalizationField,valueExpression:e.valueExpression,fields:e.fields}).then(r=>this.getSampleFeatures({sampleSize:-1,view:e.view,returnGeometry:e.returnGeometry,filter:e.filter,requiredFields:r,sqlWhere:e.sqlWhere,signal:e.signal},t))}async _summaryStatsFromClientQuery(e,t){const{view:r,signal:a}=e,i=E(this,e,t),s=await this._fetchFeatureSetFromMemory(i,r,a),o=C(s,x(t)||y(t));return P(o,e.outStatisticTypes)}async _getNormalizationTotalFromMemory(e,t,a){const{featuresJSON:i,graphics:s,layerView:o,query:n}=t,l={include:["sum"]},u=(!i&&!s&&o&&"querySummaryStatistics"in o?await o.querySummaryStatistics(n,{field:e},{signal:a}):i?await this.workerClient.summaryStatistics({field:e,outStatisticTypes:l},i):await d({attribute:{field:e,outStatisticTypes:l},features:s??[]})).sum;if(null==u)throw new r(`${this.adapterName}:invalid`,"invalid normalizationTotal");return u}async _summaryStatsFromMemory(e,t){const{view:r,field:a,valueExpression:i,normalizationType:s,signal:o}=e,n={field:a,valueExpression:i,normalizationType:s,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,outStatisticTypes:e.outStatisticTypes},{featuresJSON:l,graphics:u,layerView:m,query:y,fieldInfos:f}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"querySummaryStatistics"});return i&&r&&(l||u)&&(n.fieldType=t?.type?p.toJSON(t.type):null,n.viewInfoParams=j(r),n.timeZone=r.timeZone,n.fieldInfos=f),"percent-of-total"===s&&null==e.normalizationTotal&&(n.normalizationTotal=await this._getNormalizationTotalFromMemory(a,{featuresJSON:l,graphics:u,layerView:m,query:y},o)),!l&&!u&&m&&"querySummaryStatistics"in m?m.querySummaryStatistics(y,n,{signal:o}):l?this.workerClient.summaryStatistics(n,l):d({attribute:n,features:u})}async _getFilteredFeatures(e,t){let r=e;const a=t?.geometry;if("intersects"===t?.spatialRelationship&&a){const t=await import("../../../geometry/operators/intersectionOperator.js");r=e.filter(({geometry:e})=>!(!e||!t.execute(e,a)))}return e.length&&"declaredClass"in e[0]&&"esri.Graphic"===e[0].declaredClass?{graphics:r}:{featuresJSON:r}}async _processStatsFromMemoryParams(e){const{features:t,filter:r}=e;if(t?.length)return this._getFilteredFeatures(t,r);const{view:a,field:i,field2:s,field3:o,normalizationField:n,valueExpression:l,sqlExpression:u,sqlWhere:m,layerViewFunc:p,signal:y}=e;let f=e.returnGeometry;if(null==f&&l){if(!R){const{arcadeUtils:e}=await $();R=e}const e=R.hasGeometryOperations(l);e&&await R.enableGeometryOperations(),f=e}let c=null,d=null,h=null,w=null,g=null;if(a)try{const e="subtype-sublayer"===this.layer.type?this.layer.parent:this.layer;c=await a.whenLayerView(e),d=null!=p&&null!=c&&p in c&&"function"==typeof c[p]}catch{d=!1}if(d)try{await this._waitForLayerViewUpdate(c);const e=await v({field:i,field2:s,field3:o,normalizationField:n,valueExpression:l,fields:await V([u,m],this.layer.fieldsIndex)});b(this,e,c).length?d=!1:(h=this.layer.createQuery(),h.outFields=e,h.returnGeometry=!1,h.where=S(h.where,m),I(h,r)),c.suspended&&(d=!1)}catch{d=!1}return d||(w=await this._fetchFeaturesForStats({field:i,field2:s,field3:o,fields:await V([u,m],this.layer.fieldsIndex),valueExpression:l,normalizationField:n,returnGeometry:f,filter:r,sqlWhere:m,view:a,signal:y},"json"),g=(await v({valueExpression:l})).map(e=>this.getField(e)?.toJSON()).filter(Boolean)),{layerView:c,query:h,featuresJSON:w,fieldInfos:g}}async _uvFromClientQuery(e,t){const{view:r,signal:a}=e,i=k(this,e),s=await this._fetchFeatureSetFromMemory(i,r,a),o=await O(s,{layer:this,field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:_,view:e.view,signal:e.signal});return U(o,t,e.returnAllCodedValues,_)}async _uvFromMemory(e,t){const{view:r,field:a,valueExpression:i,returnAllCodedValues:s,signal:o}=e,{featuresJSON:n,graphics:l,layerView:u,query:m,fieldInfos:p}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryUniqueValues"}),y={field:a,field2:e.field2,field3:e.field3,fieldDelimiter:_,valueExpression:i,domains:t,returnAllCodedValues:s};return i&&r&&(n||l)&&(y.viewInfoParams=j(r),y.timeZone=r.timeZone,y.fieldInfos=p),!n&&!l&&u&&"queryUniqueValues"in u?u.queryUniqueValues(m,y,{signal:o}):n?this.workerClient.uniqueValues(y,n):h({attribute:y,features:l})}_histogramForField(e){let t=null;return t=null!=e.minValue&&null!=e.maxValue?Promise.resolve({min:e.minValue,max:e.maxValue}):this.summaryStatistics({...e,outStatisticTypes:{include:["min","max","count"]}}).then(e=>{if(!e.count)throw new r(`${this.adapterName}:insufficient-data`,"Either the layer has no features or none of the features have data for the field");return{min:e.min,max:e.max}}),t.then(t=>Q(this,{min:t.min,max:t.max},e.field,e.numBins??void 0,e.view,e.filter,e.signal))}async _histogramFromQueryAttributeBinsFromMemory(e){const{field:t,normalizationType:r,signal:a}=e,i=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryAttributeBins"}),{featuresJSON:s,graphics:o,layerView:n,query:l}=i,u="percent-of-total"===r?e.normalizationTotal??await this._getNormalizationTotalFromMemory(t,i,a):void 0;if(!n||!("queryAttributeBins"in n)||s||o){const t=T(e,i,u);return s?this.workerClient.histogram(t,s):w({attribute:t,features:o})}const{query:m,min:p,max:y}=await N(e,this,u,l);if(!m)return{bins:[],minValue:p,maxValue:y,normalizationTotal:u};const f=await n.queryAttributeBins(m,{signal:a});return M(f,t?this.getField(t):null,{minValue:p,maxValue:y,normalizationTotal:u})}async _histogramFromMemory(e){const{field:t,signal:r}=e,a=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryHistogram"}),{featuresJSON:i,graphics:s,layerView:o,query:n}=a,l="percent-of-total"===e.normalizationType?e.normalizationTotal??await this._getNormalizationTotalFromMemory(t,a,r):void 0,u=T(e,a,l);return!i&&!s&&o&&"queryHistogram"in o?o.queryHistogram(n,u,{signal:r}):i?this.workerClient.histogram(u,i):w({attribute:u,features:s})}_classBreaksFromInterpolation(e){const{minValue:t,maxValue:r}=e,a=e.numClasses||G,i=[],s=(r-t)/a;for(let l=0;l<a;l++){const e=t+l*s;i.push({minValue:e,maxValue:e+s})}i[a-1].maxValue=r;const o={classBreaks:i,normalizationTotal:e.normalizationTotal},n=A(o,e.classificationMethod);return Promise.resolve(n)}async _classBreaksFromMemory(e){const{view:t,field:r,valueExpression:a,signal:i}=e,{featuresJSON:s,graphics:o,layerView:n,query:l,fieldInfos:u}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryClassBreaks"}),m={field:r,valueExpression:a,normalizationType:e.normalizationType,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,standardDeviationInterval:e.standardDeviationInterval,classificationMethod:e.classificationMethod,numClasses:e.numClasses};return a&&t&&(s||o)&&(m.viewInfoParams=j(t),m.timeZone=t.timeZone,m.fieldInfos=u),"percent-of-total"===e.normalizationType&&null==e.normalizationTotal&&(m.normalizationTotal=await this._getNormalizationTotalFromMemory(r,{featuresJSON:s,graphics:o,layerView:n,query:l},i)),!s&&!o&&n&&"queryClassBreaks"in n?n.queryClassBreaks(l,m,{signal:i}):s?this.workerClient.classBreaks(m,s):g({attribute:m,features:o})}async _heatmapStatsFromMemory(e){const{view:t,field:r,radius:a,signal:s}=e;i(t,"InMemoryLayerAdapter: must have a view");try{const r=await t.whenLayerView(this.layer);if("queryHeatmapStatistics"in r&&!r.updating&&!e.filter)return await r.queryHeatmapStatistics({field:e.field,radius:e.radius})}catch{o(s)}const{featuresJSON:n,graphics:l}=await this._processStatsFromMemoryParams({...e,returnGeometry:!0}),u=new f({extent:t.extent,tolerance:"2d"===t.type?t.state.resolution:t.pixelSizeAt?.(t.center)}),p={field:r,radius:a,transform:m(u),spatialReference:t.spatialReference?.toJSON(),size:t.size};return n?.length||l?.length?n?this.workerClient.heatmapStatistics(p,n):F({attribute:p,features:l}):{min:null,max:null}}getField(e=""){return this.layer.getField(e)}getFieldUsageInfo(e){return this.getField(e)?{supportsLabelingInfo:!0,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:!0,supportsStatistics:!0}:null}getFieldDomain(e,t){return this.layer.getFieldDomain(e,t)}createQuery(){return this.layer.createQuery()}async summaryStatistics(e){const{field:t,valueExpression:a,sqlExpression:i,features:s,view:o}=e,n=t?this.getField(t):null,l=!!a,u="3d"===o?.type;if(!a&&i&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return l||s||u?this._summaryStatsFromMemory(e,n):this._summaryStatsFromClientQuery(e,n)}async uniqueValues(e){const{valueExpression:t,sqlExpression:a,features:i,view:s}=e,o=await J(e,this),n=!!t,l="3d"===s?.type;if(!t&&a&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return n||i||l?this._uvFromMemory(e,o):this._uvFromClientQuery(e,o)}async histogram(e){const{features:t,valueExpression:a,normalizationType:i,sqlExpression:s}=e,o=t||!!a;if(!a&&s&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return o||i?this._histogramFromMemory(e):this._histogramForField(e)}async classBreaks(e){return!1!==e.analyzeData?this._classBreaksFromMemory(e):this._classBreaksFromInterpolation(e)}async queryFeatureCount(e){const{whereClause:t,view:a,signal:i}=e;if(!a)throw new r(`${this.adapterName}:insufficient-data`,"view is required to fetch the features from layerView");const s=this.layer.createQuery();s.where=S(s.where,t);const o=await a.whenLayerView(this.layer);return await n(()=>!o.updating,i),o.queryFeatureCount(s,{signal:i})}async generateRenderer(e,t){throw new r(`${this.adapterName}:not-supported`,"Layer does not support generateRenderer operation")}async predominantCategories(e){const{fields:t,view:r,signal:a,filter:i}=e,s=c(t),o=await this._uvFromMemory({valueExpression:s,view:r,signal:a,filter:i});return B(o.uniqueValueInfos,t)}async heatmapStatistics(e){return this._heatmapStatsFromMemory(e)}async getSampleFeatures(e,a){const{view:i,sampleSize:s,requiredFields:o,returnGeometry:n,sqlWhere:l,filter:u,signal:m}=e,p=this.layer.createQuery(),y=1;if(p.outSpatialReference=i?.spatialReference,p.returnGeometry=!!n,p.outFields=o,p.where=S(p.where,l),I(p,u),!i)throw new r(`${this.adapterName}:not-supported`,"view is required to get sample features for Layer");const f=await i.whenLayerView(this.layer);if(b(this,o,f).length)throw new r(`${this.adapterName}:not-supported`,"Required fields need to be passed in the outFields for Layer");const c=await this._fetchFeaturesFromMemory(f,p,m,a),d=null!=s&&s>0&&s<=c.length?s:c.length;return t(c,d,y)}load(e){const t=this.layer.load(e).then(async t=>{this.geometryType=t.geometryType,this.objectIdField=t.objectIdField,this.supportsSQLExpression="stream"===t.type||!!t.capabilities?.query?.supportsSqlExpression,this.minScale=t.minScale,this.maxScale=t.maxScale,this.fullExtent="fullExtent"in t?t.fullExtent:t.parent?.fullExtent,this._hasLocalSource=!1,this.hasQueryEngine=!0,this.workerClient=q.getInstance(),await this.workerClient.open(e.signal)});return this.addResolvingPromise(t),Promise.resolve(this)}};e([l({readOnly:!0})],D.prototype,"adapterName",void 0),e([l({constructOnly:!0})],D.prototype,"layer",void 0),D=e([u("esri.smartMapping.support.adapters.InMemoryLayerAdapter")],D);export{D as default};
2
+ import{__decorate as e}from"tslib";import{pickRandom as t}from"../../../core/arrayUtils.js";import r from"../../../core/Error.js";import a from"../../../core/Logger.js";import{assertIsSome as i}from"../../../core/maybe.js";import{timeout as s,throwIfAborted as o}from"../../../core/promiseUtils.js";import{whenOnce as n}from"../../../core/reactiveUtils.js";import{property as l,subclass as u}from"../../../core/accessorSupport/decorators.js";import{toQuantizationTransform as m}from"../../../geometry/support/quantizationUtils.js";import{kebabDict as p}from"../../../layers/support/fieldType.js";import{isTimeOnlyField as y}from"../../../layers/support/fieldUtils.js";import f from"../../../rest/support/QuantizationParameters.js";import{getArcadeForPredominantCategory as c}from"../../statistics/support/predominanceUtils.js";import{summaryStatistics as d,uniqueValues as h,histogram as w,classBreaks as g,heatmapStatistics as F}from"../../statistics/support/statsWorker.js";import{mergeWhereClauses as S}from"../../statistics/support/utils.js";import{WorkerClient as q}from"../../statistics/support/WorkerClient.js";import{getFieldsList as v,isAnyDateField as x,getFieldsFromWhereClauses as V,fieldDelimiter as _}from"../utils.js";import z from"./LayerAdapter.js";import{getHistogramAttributeDefinition as T,getAttributeBinsQuery as N,processQueryAttributeBinsResult as M}from"./support/histogramUtils.js";import{ensureFeaturesJSON as L,getSummaryStatsQuery as E,getSummaryStatisticsFromFeatureSet as C,getViewInfoParams as j,getMissingFields as b,updateQueryWithFeatureFilter as I,getUVQuery as k,getUniqueValuesFromFeatureSet as O,getBins as Q,getDomainsForFields as J,getPredominantCategoriesFromUVInfos as B}from"./support/utils.js";import{processSummaryStatisticsResult as P,createUVResult as U,resolveCBResult as A}from"../../../statistics/utils.js";import{loadArcade as $}from"../../../support/loadArcade.js";const G=5;let R,D=class extends z{constructor(){super(...arguments),this._hasLocalSource=!1,this.adapterName="in-memory-layer-adapter"}destroy(){this.workerClient?.destroy()}async _waitForLayerViewUpdate(e){if(!e)throw new r(`${this.adapterName}:insufficient-data`,"layerView is required to fetch the features");const t=new AbortController,i=n(()=>!e.updating,t.signal);await s(i,5e3,t).catch(e=>{throw a.getLogger(this).warn("LayerView is taking too long to update. Aborting fetch from layerView."),e})}async _fetchFeatureSetFromMemory(e,t,a){const i=this.layer;if(this._hasLocalSource&&"queryFeatures"in i)return i.queryFeatures(e);if(!t)throw new r(`${this.adapterName}:insufficient-data`,"view is required to fetch the features from layerView");const s=await t.whenLayerView(this.layer);return await this._waitForLayerViewUpdate(s),s.queryFeatures(e,{signal:a})}async _fetchFeaturesFromMemory(e,t,a,i){const s=this.layer,o="json"===i;if(this._hasLocalSource&&"queryFeatures"in s){const e=await s.queryFeatures(t);return o?L(e.features):e.features}if(await this._waitForLayerViewUpdate(e),o&&"queryFeaturesJSON"in e&&e.queryFeaturesJSON){const{features:r}=await e.queryFeaturesJSON(t,{signal:a});return r}if(!("queryFeatures"in e))throw new r(`${this.adapterName}:not-supported`,"'queryFeatures' is not supported on the layerView");const n=await e.queryFeatures(t,{signal:a});return o?L(n.features):n.features}_fetchFeaturesForStats(e,t){return v({field:e.field,field2:e.field2,field3:e.field3,normalizationField:e.normalizationField,valueExpression:e.valueExpression,fields:e.fields}).then(r=>this.getSampleFeatures({sampleSize:-1,view:e.view,returnGeometry:e.returnGeometry,filter:e.filter,requiredFields:r,sqlWhere:e.sqlWhere,signal:e.signal},t))}async _summaryStatsFromClientQuery(e,t){const{view:r,signal:a}=e,i=E(this,e,t),s=await this._fetchFeatureSetFromMemory(i,r,a),o=C(s,x(t)||y(t));return P(o,e.outStatisticTypes)}async _getNormalizationTotalFromMemory(e,t,a){const{featuresJSON:i,graphics:s,layerView:o,query:n}=t,l={include:["sum"]},u=(!i&&!s&&o&&"querySummaryStatistics"in o?await o.querySummaryStatistics(n,{field:e},{signal:a}):i?await this.workerClient.summaryStatistics({field:e,outStatisticTypes:l},i):await d({attribute:{field:e,outStatisticTypes:l},features:s??[]})).sum;if(null==u)throw new r(`${this.adapterName}:invalid`,"invalid normalizationTotal");return u}async _summaryStatsFromMemory(e,t){const{view:r,field:a,valueExpression:i,normalizationType:s,signal:o}=e,n={field:a,valueExpression:i,normalizationType:s,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,outStatisticTypes:e.outStatisticTypes},{featuresJSON:l,graphics:u,layerView:m,query:y,fieldInfos:f}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"querySummaryStatistics"});return i&&r&&(l||u)&&(n.fieldType=t?.type?p.toJSON(t.type):null,n.viewInfoParams=j(r),n.timeZone=r.timeZone,n.fieldInfos=f),"percent-of-total"===s&&null==e.normalizationTotal&&(n.normalizationTotal=await this._getNormalizationTotalFromMemory(a,{featuresJSON:l,graphics:u,layerView:m,query:y},o)),!l&&!u&&m&&"querySummaryStatistics"in m?m.querySummaryStatistics(y,n,{signal:o}):l?this.workerClient.summaryStatistics(n,l):d({attribute:n,features:u})}async _getFilteredFeatures(e,t){let r=e;const a=t?.geometry;if("intersects"===t?.spatialRelationship&&a){const t=await(import("../../../geometry/operators/intersectionOperator.js"));r=e.filter(({geometry:e})=>!(!e||!t.execute(e,a)))}return e.length&&"declaredClass"in e[0]&&"esri.Graphic"===e[0].declaredClass?{graphics:r}:{featuresJSON:r}}async _processStatsFromMemoryParams(e){const{features:t,filter:r}=e;if(t?.length)return this._getFilteredFeatures(t,r);const{view:a,field:i,field2:s,field3:o,normalizationField:n,valueExpression:l,sqlExpression:u,sqlWhere:m,layerViewFunc:p,signal:y}=e;let f=e.returnGeometry;if(null==f&&l){if(!R){const{arcadeUtils:e}=await $();R=e}const e=R.hasGeometryOperations(l);e&&await R.enableGeometryOperations(),f=e}let c=null,d=null,h=null,w=null,g=null;if(a)try{const e="subtype-sublayer"===this.layer.type?this.layer.parent:this.layer;c=await a.whenLayerView(e),d=null!=p&&null!=c&&p in c&&"function"==typeof c[p]}catch{d=!1}if(d)try{await this._waitForLayerViewUpdate(c);const e=await v({field:i,field2:s,field3:o,normalizationField:n,valueExpression:l,fields:await V([u,m],this.layer.fieldsIndex)});b(this,e,c).length?d=!1:(h=this.layer.createQuery(),h.outFields=e,h.returnGeometry=!1,h.where=S(h.where,m),I(h,r)),c.suspended&&(d=!1)}catch{d=!1}return d||(w=await this._fetchFeaturesForStats({field:i,field2:s,field3:o,fields:await V([u,m],this.layer.fieldsIndex),valueExpression:l,normalizationField:n,returnGeometry:f,filter:r,sqlWhere:m,view:a,signal:y},"json"),g=(await v({valueExpression:l})).map(e=>this.getField(e)?.toJSON()).filter(Boolean)),{layerView:c,query:h,featuresJSON:w,fieldInfos:g}}async _uvFromClientQuery(e,t){const{view:r,signal:a}=e,i=k(this,e),s=await this._fetchFeatureSetFromMemory(i,r,a),o=await O(s,{layer:this,field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:_,view:e.view,signal:e.signal});return U(o,t,e.returnAllCodedValues,_)}async _uvFromMemory(e,t){const{view:r,field:a,valueExpression:i,returnAllCodedValues:s,signal:o}=e,{featuresJSON:n,graphics:l,layerView:u,query:m,fieldInfos:p}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryUniqueValues"}),y={field:a,field2:e.field2,field3:e.field3,fieldDelimiter:_,valueExpression:i,domains:t,returnAllCodedValues:s};return i&&r&&(n||l)&&(y.viewInfoParams=j(r),y.timeZone=r.timeZone,y.fieldInfos=p),!n&&!l&&u&&"queryUniqueValues"in u?u.queryUniqueValues(m,y,{signal:o}):n?this.workerClient.uniqueValues(y,n):h({attribute:y,features:l})}_histogramForField(e){let t=null;return t=null!=e.minValue&&null!=e.maxValue?Promise.resolve({min:e.minValue,max:e.maxValue}):this.summaryStatistics({...e,outStatisticTypes:{include:["min","max","count"]}}).then(e=>{if(!e.count)throw new r(`${this.adapterName}:insufficient-data`,"Either the layer has no features or none of the features have data for the field");return{min:e.min,max:e.max}}),t.then(t=>Q(this,{min:t.min,max:t.max},e.field,e.numBins??void 0,e.view,e.filter,e.signal))}async _histogramFromQueryAttributeBinsFromMemory(e){const{field:t,normalizationType:r,signal:a}=e,i=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryAttributeBins"}),{featuresJSON:s,graphics:o,layerView:n,query:l}=i,u="percent-of-total"===r?e.normalizationTotal??await this._getNormalizationTotalFromMemory(t,i,a):void 0;if(!n||!("queryAttributeBins"in n)||s||o){const t=T(e,i,u);return s?this.workerClient.histogram(t,s):w({attribute:t,features:o})}const{query:m,min:p,max:y}=await N(e,this,u,l);if(!m)return{bins:[],minValue:p,maxValue:y,normalizationTotal:u};const f=await n.queryAttributeBins(m,{signal:a});return M(f,t?this.getField(t):null,{minValue:p,maxValue:y,normalizationTotal:u})}async _histogramFromMemory(e){const{field:t,signal:r}=e,a=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryHistogram"}),{featuresJSON:i,graphics:s,layerView:o,query:n}=a,l="percent-of-total"===e.normalizationType?e.normalizationTotal??await this._getNormalizationTotalFromMemory(t,a,r):void 0,u=T(e,a,l);return!i&&!s&&o&&"queryHistogram"in o?o.queryHistogram(n,u,{signal:r}):i?this.workerClient.histogram(u,i):w({attribute:u,features:s})}_classBreaksFromInterpolation(e){const{minValue:t,maxValue:r}=e,a=e.numClasses||G,i=[],s=(r-t)/a;for(let l=0;l<a;l++){const e=t+l*s;i.push({minValue:e,maxValue:e+s})}i[a-1].maxValue=r;const o={classBreaks:i,normalizationTotal:e.normalizationTotal},n=A(o,e.classificationMethod);return Promise.resolve(n)}async _classBreaksFromMemory(e){const{view:t,field:r,valueExpression:a,signal:i}=e,{featuresJSON:s,graphics:o,layerView:n,query:l,fieldInfos:u}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryClassBreaks"}),m={field:r,valueExpression:a,normalizationType:e.normalizationType,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,standardDeviationInterval:e.standardDeviationInterval,classificationMethod:e.classificationMethod,numClasses:e.numClasses};return a&&t&&(s||o)&&(m.viewInfoParams=j(t),m.timeZone=t.timeZone,m.fieldInfos=u),"percent-of-total"===e.normalizationType&&null==e.normalizationTotal&&(m.normalizationTotal=await this._getNormalizationTotalFromMemory(r,{featuresJSON:s,graphics:o,layerView:n,query:l},i)),!s&&!o&&n&&"queryClassBreaks"in n?n.queryClassBreaks(l,m,{signal:i}):s?this.workerClient.classBreaks(m,s):g({attribute:m,features:o})}async _heatmapStatsFromMemory(e){const{view:t,field:r,radius:a,signal:s}=e;i(t,"InMemoryLayerAdapter: must have a view");try{const r=await t.whenLayerView(this.layer);if("queryHeatmapStatistics"in r&&!r.updating&&!e.filter)return await r.queryHeatmapStatistics({field:e.field,radius:e.radius})}catch{o(s)}const{featuresJSON:n,graphics:l}=await this._processStatsFromMemoryParams({...e,returnGeometry:!0}),u=new f({extent:t.extent,tolerance:"2d"===t.type?t.state.resolution:t.pixelSizeAt?.(t.center)}),p={field:r,radius:a,transform:m(u),spatialReference:t.spatialReference?.toJSON(),size:t.size};return n?.length||l?.length?n?this.workerClient.heatmapStatistics(p,n):F({attribute:p,features:l}):{min:null,max:null}}getField(e=""){return this.layer.getField(e)}getFieldUsageInfo(e){return this.getField(e)?{supportsLabelingInfo:!0,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:!0,supportsStatistics:!0}:null}getFieldDomain(e,t){return this.layer.getFieldDomain(e,t)}createQuery(){return this.layer.createQuery()}async summaryStatistics(e){const{field:t,valueExpression:a,sqlExpression:i,features:s,view:o}=e,n=t?this.getField(t):null,l=!!a,u="3d"===o?.type;if(!a&&i&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return l||s||u?this._summaryStatsFromMemory(e,n):this._summaryStatsFromClientQuery(e,n)}async uniqueValues(e){const{valueExpression:t,sqlExpression:a,features:i,view:s}=e,o=await J(e,this),n=!!t,l="3d"===s?.type;if(!t&&a&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return n||i||l?this._uvFromMemory(e,o):this._uvFromClientQuery(e,o)}async histogram(e){const{features:t,valueExpression:a,normalizationType:i,sqlExpression:s}=e,o=t||!!a;if(!a&&s&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return o||i?this._histogramFromMemory(e):this._histogramForField(e)}async classBreaks(e){return!1!==e.analyzeData?this._classBreaksFromMemory(e):this._classBreaksFromInterpolation(e)}async queryFeatureCount(e){const{whereClause:t,view:a,signal:i}=e;if(!a)throw new r(`${this.adapterName}:insufficient-data`,"view is required to fetch the features from layerView");const s=this.layer.createQuery();s.where=S(s.where,t);const o=await a.whenLayerView(this.layer);return await n(()=>!o.updating,i),o.queryFeatureCount(s,{signal:i})}async generateRenderer(e,t){throw new r(`${this.adapterName}:not-supported`,"Layer does not support generateRenderer operation")}async predominantCategories(e){const{fields:t,view:r,signal:a,filter:i}=e,s=c(t),o=await this._uvFromMemory({valueExpression:s,view:r,signal:a,filter:i});return B(o.uniqueValueInfos,t)}async heatmapStatistics(e){return this._heatmapStatsFromMemory(e)}async getSampleFeatures(e,a){const{view:i,sampleSize:s,requiredFields:o,returnGeometry:n,sqlWhere:l,filter:u,signal:m}=e,p=this.layer.createQuery(),y=1;if(p.outSpatialReference=i?.spatialReference,p.returnGeometry=!!n,p.outFields=o,p.where=S(p.where,l),I(p,u),!i)throw new r(`${this.adapterName}:not-supported`,"view is required to get sample features for Layer");const f=await i.whenLayerView(this.layer);if(b(this,o,f).length)throw new r(`${this.adapterName}:not-supported`,"Required fields need to be passed in the outFields for Layer");const c=await this._fetchFeaturesFromMemory(f,p,m,a),d=null!=s&&s>0&&s<=c.length?s:c.length;return t(c,d,y)}load(e){const t=this.layer.load(e).then(async t=>{this.geometryType=t.geometryType,this.objectIdField=t.objectIdField,this.supportsSQLExpression="stream"===t.type||!!t.capabilities?.query?.supportsSqlExpression,this.minScale=t.minScale,this.maxScale=t.maxScale,this.fullExtent="fullExtent"in t?t.fullExtent:t.parent?.fullExtent,this._hasLocalSource=!1,this.hasQueryEngine=!0,this.workerClient=q.getInstance(),await this.workerClient.open(e.signal)});return this.addResolvingPromise(t),Promise.resolve(this)}};e([l({readOnly:!0})],D.prototype,"adapterName",void 0),e([l({constructOnly:!0})],D.prototype,"layer",void 0),D=e([u("esri.smartMapping.support.adapters.InMemoryLayerAdapter")],D);export{D as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const b="20260805",e="ecfb0d38abbeb070a2507e42648123856d3b756c";export{b as buildDate,e as commitHash};
2
+ const d="20260807",c="43add78fd01debfbebc7d1425f2392480ec35cdc";export{d as buildDate,c as commitHash};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{parseWhereClause as e}from"../../core/sql.js";import{load as r,project as t}from"../../geometry/projectionUtils.js";import o from"../../geometry/SpatialReference.js";import{e as s}from"../../chunks/containsOperator.js";import{e as n}from"../../chunks/crossesOperator.js";import{e as a}from"../../chunks/generalizeOperator.js";import{e as m,a as i}from"../../chunks/intersectsOperator.js";import{e as c}from"../../chunks/overlapsOperator.js";import{e as p}from"../../chunks/touchesOperator.js";import{e as u}from"../../chunks/withinOperator.js";import{getGeometryExtent as f}from"../../geometry/support/extentUtils.js";import{fromJSON as y}from"../../geometry/support/jsonUtils.js";import{quantizeGeometry as j}from"../../geometry/support/quantizationUtils.js";import{isGeographic as G,equals as l}from"../../geometry/support/spatialReferenceUtils.js";import{densifyCurvedGeometry as g}from"../../geometry/support/curves/densifyCurvedGeometry.js";import h from"../../layers/support/FieldsIndex.js";function k(){const k=new WeakMap,O=new WeakMap;function d(e,r){const t=k.get(e);if(t)return t;const s=y(e);return s.spatialReference=r instanceof o?r:o.fromJSON(r),k.set(e,s),i(s),s}function v(e,r,t){return!e||l(r,t)?e:b(e,r,t)?.toJSON()}function b(e,r,s){if(!e)return;const n=O.get(e);if(n&&l(n.spatialReference,s))return n.geometry;const a=!l(r,s),m=a?t(d(e,r),o.fromJSON(s),{zConversionDisabled:!0}):d(e,r);return a&&i(m),O.set(e,{spatialReference:s,geometry:m}),m}function w(e,r,t,o){return{aGeometry:d(e,r),bGeometry:b(t,o,r)}}return{sql:{async createTestFeature(r,t){const o=await e(r,new h(t));return e=>o.testFeature(e)}},projection:{load:r,project:v},geometry:{isGeographic:G,quantize:(e,r)=>j(e,r),operations:{intersects(e,r,t,o){const{aGeometry:s,bGeometry:n}=w(e,r,t,o);return m(s,n)},contains(e,r,t,o){const{aGeometry:n,bGeometry:a}=w(e,r,t,o);return s(n,a)},overlaps(e,r,t,o){const{aGeometry:s,bGeometry:n}=w(e,r,t,o);return c(s,n)},crosses(e,r,t,o){const{aGeometry:s,bGeometry:a}=w(e,r,t,o);return n(s,a)},touches(e,r,t,o){const{aGeometry:s,bGeometry:n}=w(e,r,t,o);return p(s,n)},within(e,r,t,o){const{aGeometry:s,bGeometry:n}=w(e,r,t,o);return u(s,n)},generalize(e,r,t,o){const s=a(d(e,r),t,{removeDegenerateParts:o});return s?.toJSON()},densifyCurves:e=>g(e)},extentFromGeometry:e=>f(e),extentFromGLB:async(e,r,t,o)=>{const{extentFromGLB:s}=await import("./setupServiceMocksMesh.js");return s(e,r,t,o)},nodeDataFromGLB:async(e,r,t,o)=>{const{nodeDataFromGLB:s}=await import("./setupServiceMocksMesh.js");return s(e,r,t,o)}}}}export{k as getServiceMockDependencies};
2
+ import{parseWhereClause as e}from"../../core/sql.js";import{load as r,project as t}from"../../geometry/projectionUtils.js";import o from"../../geometry/SpatialReference.js";import{e as s}from"../../chunks/containsOperator.js";import{e as n}from"../../chunks/crossesOperator.js";import{e as a}from"../../chunks/generalizeOperator.js";import{e as m,a as i}from"../../chunks/intersectsOperator.js";import{e as c}from"../../chunks/overlapsOperator.js";import{e as p}from"../../chunks/touchesOperator.js";import{e as u}from"../../chunks/withinOperator.js";import{getGeometryExtent as f}from"../../geometry/support/extentUtils.js";import{fromJSON as y}from"../../geometry/support/jsonUtils.js";import{quantizeGeometry as j}from"../../geometry/support/quantizationUtils.js";import{isGeographic as G,equals as l}from"../../geometry/support/spatialReferenceUtils.js";import{densifyCurvedGeometry as g}from"../../geometry/support/curves/densifyCurvedGeometry.js";import h from"../../layers/support/FieldsIndex.js";function k(){const k=new WeakMap,O=new WeakMap;function d(e,r){const t=k.get(e);if(t)return t;const s=y(e);return s.spatialReference=r instanceof o?r:o.fromJSON(r),k.set(e,s),i(s),s}function v(e,r,t){return!e||l(r,t)?e:b(e,r,t)?.toJSON()}function b(e,r,s){if(!e)return;const n=O.get(e);if(n&&l(n.spatialReference,s))return n.geometry;const a=!l(r,s),m=a?t(d(e,r),o.fromJSON(s),{zConversionDisabled:!0}):d(e,r);return a&&i(m),O.set(e,{spatialReference:s,geometry:m}),m}function w(e,r,t,o){return{aGeometry:d(e,r),bGeometry:b(t,o,r)}}return{sql:{async createTestFeature(r,t){const o=await e(r,new h(t));return e=>o.testFeature(e)}},projection:{load:r,project:v},geometry:{isGeographic:G,quantize:(e,r)=>j(e,r),operations:{intersects(e,r,t,o){const{aGeometry:s,bGeometry:n}=w(e,r,t,o);return m(s,n)},contains(e,r,t,o){const{aGeometry:n,bGeometry:a}=w(e,r,t,o);return s(n,a)},overlaps(e,r,t,o){const{aGeometry:s,bGeometry:n}=w(e,r,t,o);return c(s,n)},crosses(e,r,t,o){const{aGeometry:s,bGeometry:a}=w(e,r,t,o);return n(s,a)},touches(e,r,t,o){const{aGeometry:s,bGeometry:n}=w(e,r,t,o);return p(s,n)},within(e,r,t,o){const{aGeometry:s,bGeometry:n}=w(e,r,t,o);return u(s,n)},generalize(e,r,t,o){const s=a(d(e,r),t,{removeDegenerateParts:o});return s?.toJSON()},densifyCurves:e=>g(e)},extentFromGeometry:e=>f(e),extentFromGLB:async(e,r,t,o)=>{const{extentFromGLB:s}=await(import("./setupServiceMocksMesh.js"));return s(e,r,t,o)},nodeDataFromGLB:async(e,r,t,o)=>{const{nodeDataFromGLB:s}=await(import("./setupServiceMocksMesh.js"));return s(e,r,t,o)}}}}export{k as getServiceMockDependencies};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- async function e(e){const r=[];for(const n of e)n.name.toLowerCase().endsWith(".zip")?r.push(t(n)):r.push(Promise.resolve(n));return(await Promise.all(r)).flat()}async function t(e){const{BlobReader:t,ZipReader:r,BlobWriter:n}=await import("./zipjs-wrapper.js"),a=[],i=new r(new t(e));return(await i.getEntries()).forEach(e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new n;a.push(e.getData(t).then(t=>new File([t],e.filename)))}),Promise.all(a)}export{t as extractZipFile,e as extractZipFiles};
2
+ async function e(e){const r=[];for(const n of e)n.name.toLowerCase().endsWith(".zip")?r.push(t(n)):r.push(Promise.resolve(n));return(await Promise.all(r)).flat()}async function t(e){const{BlobReader:t,ZipReader:r,BlobWriter:n}=await(import("./zipjs-wrapper.js")),a=[],i=new r(new t(e));return(await i.getEntries()).forEach(e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new n;a.push(e.getData(t).then(t=>new File([t],e.filename)))}),Promise.all(a)}export{t as extractZipFile,e as extractZipFiles};