@arcgis/portal-components 6.0.0-next.4 → 6.0.0-next.41

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 (412) hide show
  1. package/dist/cdn/{SGDDFWCJ.js → 2GIECQ25.js} +1 -1
  2. package/dist/cdn/2N6K2UUQ.js +2 -0
  3. package/dist/cdn/36DGXQLJ.js +2 -0
  4. package/dist/cdn/{2TDHJSMP.js → 3HXQ5Z4C.js} +1 -1
  5. package/dist/cdn/3HZI6MKD.js +2 -0
  6. package/dist/cdn/3OL7A2UC.js +2 -0
  7. package/dist/cdn/3Q7UJKKN.js +2 -0
  8. package/dist/cdn/3SG67WP5.js +2 -0
  9. package/dist/cdn/3ZVDEJPF.js +2 -0
  10. package/dist/cdn/42AN66SK.js +2 -0
  11. package/dist/cdn/46HNNQAD.js +2 -0
  12. package/dist/cdn/4CBRO7JP.js +2 -0
  13. package/dist/cdn/4E354KKM.js +2 -0
  14. package/dist/cdn/4QYVBXZT.js +2 -0
  15. package/dist/cdn/5MLBK66O.js +2 -0
  16. package/dist/cdn/5ZHNRQOW.js +2 -0
  17. package/dist/cdn/62TL6V4N.js +2 -0
  18. package/dist/cdn/67FEZD25.js +2 -0
  19. package/dist/cdn/{BKD7JSV2.js → 6CUXEL27.js} +1 -1
  20. package/dist/cdn/6GPAZV4Z.js +2 -0
  21. package/dist/cdn/6QI7DAS2.js +2 -0
  22. package/dist/cdn/6XDKSVRF.js +2 -0
  23. package/dist/cdn/6ZJNZZPC.js +2 -0
  24. package/dist/cdn/6ZYYG64M.js +2 -0
  25. package/dist/cdn/7AG3E7K6.js +2 -0
  26. package/dist/cdn/7JDXAVUG.js +2 -0
  27. package/dist/cdn/7JKFWVCY.js +2 -0
  28. package/dist/cdn/7VPB6Q55.js +63 -0
  29. package/dist/cdn/AJEQETRW.js +2 -0
  30. package/dist/cdn/{JE2376SE.js → AP7UWD4P.js} +1 -1
  31. package/dist/cdn/{OR6T5SB3.js → BNWJUQDF.js} +1 -1
  32. package/dist/cdn/BUYOYUA2.js +2 -0
  33. package/dist/cdn/BX7Q3V2Y.js +43 -0
  34. package/dist/cdn/BXPNB7VJ.js +2 -0
  35. package/dist/cdn/BZEKNJUA.js +2 -0
  36. package/dist/cdn/C6RUWLEJ.js +2 -0
  37. package/dist/cdn/CERDMRFQ.js +2 -0
  38. package/dist/cdn/DFECUYNW.js +2 -0
  39. package/dist/cdn/DGWOMELT.js +2 -0
  40. package/dist/cdn/DIWTHL4N.js +2 -0
  41. package/dist/cdn/DKUOQCHO.js +2 -0
  42. package/dist/cdn/{ZKZDKJ6D.js → DQL2JT6K.js} +1 -1
  43. package/dist/cdn/{2YZWRFCI.js → DTGPLVZF.js} +1 -1
  44. package/dist/cdn/DU2R3VC4.js +2 -0
  45. package/dist/cdn/E5HCHRAI.js +2 -0
  46. package/dist/cdn/EBL7YSRM.js +2 -0
  47. package/dist/cdn/EDGE3T36.js +2 -0
  48. package/dist/cdn/EETYTFHH.js +2 -0
  49. package/dist/cdn/{YZTBAUIO.js → EFMYI4L2.js} +1 -1
  50. package/dist/cdn/FINVGL3V.js +2 -0
  51. package/dist/cdn/FN2QMDEW.js +2 -0
  52. package/dist/cdn/FXXFSYNB.js +2 -0
  53. package/dist/cdn/GA4OWLSO.js +2 -0
  54. package/dist/cdn/GFUKRB6D.js +2 -0
  55. package/dist/cdn/GHDMQJG4.js +2 -0
  56. package/dist/cdn/{FRE56NBG.js → GY4SY4XC.js} +1 -1
  57. package/dist/cdn/H4TPPTVB.js +2 -0
  58. package/dist/cdn/HOIZXTOD.js +2 -0
  59. package/dist/cdn/{VDXESPJK.js → I4TKQB4A.js} +1 -1
  60. package/dist/cdn/{TWCJJCPC.js → IAMPUXPT.js} +1 -1
  61. package/dist/cdn/IQPJOVDL.js +2 -0
  62. package/dist/cdn/ITRJGXFV.js +93 -0
  63. package/dist/cdn/ITWLFQI4.js +2 -0
  64. package/dist/cdn/IWPJEUHY.js +2 -0
  65. package/dist/cdn/{7ZWYUHGK.js → IYICIRGI.js} +1 -1
  66. package/dist/cdn/JDW7ECBF.js +2 -0
  67. package/dist/cdn/JFGXTJY4.js +2 -0
  68. package/dist/cdn/JGTBDGJ7.js +2 -0
  69. package/dist/cdn/JLT5GCLY.js +2 -0
  70. package/dist/cdn/JTA223NH.js +2 -0
  71. package/dist/cdn/KA2MXQTR.js +2 -0
  72. package/dist/cdn/KAK6CNI7.js +2 -0
  73. package/dist/cdn/{CFRJU6VA.js → KRO5XRZ7.js} +1 -1
  74. package/dist/cdn/KRORL7QC.js +2 -0
  75. package/dist/cdn/KWL2D56D.js +3 -0
  76. package/dist/cdn/{QTAYXO5T.js → KXVXQYIB.js} +1 -1
  77. package/dist/cdn/L3YOPSRB.js +135 -0
  78. package/dist/cdn/{IN4JPZTY.js → LGKI24ZT.js} +1 -1
  79. package/dist/cdn/{JIJO4CAS.js → LVWAYUYZ.js} +1 -1
  80. package/dist/cdn/{Z6R3C4AK.js → MB32XRI5.js} +1 -1
  81. package/dist/cdn/ME6XACY6.js +2 -0
  82. package/dist/cdn/MSL36HAR.js +2 -0
  83. package/dist/cdn/MSSJRDR7.js +2 -0
  84. package/dist/cdn/N47MW5HI.js +9 -0
  85. package/dist/cdn/N5AG34NK.js +2 -0
  86. package/dist/cdn/N7XYFVOI.js +2 -0
  87. package/dist/cdn/NHVPNSNH.js +2 -0
  88. package/dist/cdn/{5HZNBMW6.js → NU4K2AV3.js} +1 -1
  89. package/dist/cdn/O2GPTWGF.js +3 -0
  90. package/dist/cdn/ODYYTLLQ.js +2 -0
  91. package/dist/cdn/{TRMFL7PT.js → ONRTCGLU.js} +1 -1
  92. package/dist/cdn/{RHCRPJWS.js → OPMM7QH5.js} +1 -1
  93. package/dist/cdn/OQBLBDR5.js +2 -0
  94. package/dist/cdn/OWODUQF2.js +2 -0
  95. package/dist/cdn/OXF2WDSW.js +2 -0
  96. package/dist/cdn/PM33STYQ.js +2 -0
  97. package/dist/cdn/PUHZVFK7.js +2 -0
  98. package/dist/cdn/QAXFE5DD.js +2 -0
  99. package/dist/cdn/{JPUUMGX5.js → QKRLO5CJ.js} +1 -1
  100. package/dist/cdn/QXPDVHB5.js +2 -0
  101. package/dist/cdn/R26RBXQW.js +2 -0
  102. package/dist/cdn/{NWVLGU2C.js → R45EMSQJ.js} +1 -1
  103. package/dist/cdn/R6KJVAX3.js +99 -0
  104. package/dist/cdn/RA2NMLMP.js +2 -0
  105. package/dist/cdn/RDRSZQAR.js +2 -0
  106. package/dist/cdn/RR56BOTV.js +2 -0
  107. package/dist/cdn/RT26JZP5.js +2 -0
  108. package/dist/cdn/RX64JXHI.js +170 -0
  109. package/dist/cdn/S4N5QMSN.js +2 -0
  110. package/dist/cdn/SCLYGIHM.js +2 -0
  111. package/dist/cdn/SGV47YVU.js +2 -0
  112. package/dist/cdn/SRWFOV5W.js +2 -0
  113. package/dist/cdn/{3NSHGKZA.js → TBSNDRRE.js} +1 -1
  114. package/dist/cdn/{ROX3GKKA.js → TIPQ2ZWK.js} +1 -1
  115. package/dist/cdn/TQX5BOZG.js +2 -0
  116. package/dist/cdn/U2J4ST45.js +2 -0
  117. package/dist/cdn/U3V7PPC2.js +2 -0
  118. package/dist/cdn/{TXC7YBGL.js → UBMZBXT7.js} +1 -1
  119. package/dist/cdn/UCHX4CBR.js +2 -0
  120. package/dist/cdn/UCTXRTQZ.js +2 -0
  121. package/dist/cdn/ULGME5RT.js +2 -0
  122. package/dist/cdn/UWB23CG4.js +2 -0
  123. package/dist/cdn/VABNHOVG.js +2 -0
  124. package/dist/cdn/{URQML7KV.js → VQRMXBPQ.js} +1 -1
  125. package/dist/cdn/VWOBCSD6.js +4 -0
  126. package/dist/cdn/W6U2HMEK.js +2 -0
  127. package/dist/cdn/{MKSFNVXL.js → WNXDXB3M.js} +1 -1
  128. package/dist/cdn/{JN23JH3T.js → WOSWA2VI.js} +1 -1
  129. package/dist/cdn/WTKLB3R6.js +2 -0
  130. package/dist/cdn/{GAF4YT5N.js → XSEFGIVV.js} +1 -1
  131. package/dist/cdn/XYHIVGUK.js +2 -0
  132. package/dist/cdn/{M5PPX4ZX.js → Y4JOEFBJ.js} +1 -1
  133. package/dist/cdn/Y7ZCEONL.js +73 -0
  134. package/dist/cdn/YCMZ3RVZ.js +2 -0
  135. package/dist/cdn/YELHAJB3.js +2 -0
  136. package/dist/cdn/YH2OFXPU.js +2 -0
  137. package/dist/cdn/{I6IRHXWR.js → ZECUXVTO.js} +1 -1
  138. package/dist/cdn/{K2XSYDAP.js → ZNNEU5QW.js} +1 -1
  139. package/dist/cdn/{74T6IXSN.js → ZOOEWYFB.js} +1 -1
  140. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.en.json +1 -1
  141. package/dist/cdn/assets/portal-entity-picker/t9n/messages.en.json +1 -1
  142. package/dist/cdn/assets/portal-item-card/t9n/messages.en.json +1 -1
  143. package/dist/cdn/assets/portal-item-card-sublayer-select/t9n/messages.en.json +1 -0
  144. package/dist/cdn/assets/portal-item-preview/t9n/messages.en.json +1 -0
  145. package/dist/cdn/assets/portal-item-share-summary/t9n/messages.en.json +1 -0
  146. package/dist/cdn/assets/portal-item-status-card/t9n/messages.en.json +1 -0
  147. package/dist/cdn/assets/portal-item-type/t9n/messages.en.json +1 -1
  148. package/dist/cdn/assets/portal-navigation/t9n/messages.en.json +1 -1
  149. package/dist/cdn/assets/portal-review-layer-sharing/t9n/messages.en.json +1 -0
  150. package/dist/cdn/index.js +1 -1
  151. package/dist/cdn/main.css +1 -1
  152. package/dist/chunks/FieldIcons.js +24 -0
  153. package/dist/chunks/constants.js +7 -0
  154. package/dist/chunks/contextUsage.js +208 -0
  155. package/dist/chunks/createPortalTool.js +18 -0
  156. package/dist/chunks/fieldAddDelete.js +6 -6
  157. package/dist/chunks/functionalities.js +14 -9
  158. package/dist/chunks/groups.js +8 -61
  159. package/dist/chunks/groups2.js +23 -8
  160. package/dist/chunks/help.js +22 -0
  161. package/dist/chunks/info.js +2 -2
  162. package/dist/chunks/item.js +135 -33
  163. package/dist/chunks/item2.js +96 -122
  164. package/dist/chunks/itemThumbnail.js +21 -21
  165. package/dist/chunks/items.js +11 -11
  166. package/dist/chunks/layers.js +196 -0
  167. package/dist/chunks/loadClassificationData.js +26 -27
  168. package/dist/chunks/portal-browser.js +49 -46
  169. package/dist/chunks/portal-delete-items-review.js +1 -1
  170. package/dist/chunks/portal-item-badge.js +1 -1
  171. package/dist/chunks/portal-item-preview-sublayer.js +214 -0
  172. package/dist/chunks/portal-item-status-card.js +81 -0
  173. package/dist/chunks/portal-related-items-list-item.js +1 -1
  174. package/dist/chunks/portal.js +14 -10
  175. package/dist/chunks/portal2.js +22 -22
  176. package/dist/chunks/portalEntitySelection.js +61 -0
  177. package/dist/chunks/previewSessionController.js +33 -0
  178. package/dist/chunks/query.js +14 -14
  179. package/dist/chunks/request.js +49 -41
  180. package/dist/chunks/requests.js +7 -7
  181. package/dist/chunks/selectedMentions.js +25 -0
  182. package/dist/chunks/services.js +5 -5
  183. package/dist/chunks/string.js +19 -11
  184. package/dist/chunks/ui.js +1 -0
  185. package/dist/chunks/url.js +2 -2
  186. package/dist/chunks/user.js +67 -53
  187. package/dist/chunks/user2.js +10 -10
  188. package/dist/chunks/utils.js +35 -22
  189. package/dist/chunks/utils3.js +88 -657
  190. package/dist/chunks/utils4.js +663 -0
  191. package/dist/components/arcgis-portal-account-switcher/customElement.js +57 -54
  192. package/dist/components/arcgis-portal-add-gps-metadata/customElement.d.ts +27 -0
  193. package/dist/components/arcgis-portal-add-gps-metadata/customElement.js +185 -137
  194. package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +38 -15
  195. package/dist/components/arcgis-portal-ai-assistant/customElement.js +816 -2642
  196. package/dist/components/arcgis-portal-ai-assistant/index.js +5 -0
  197. package/dist/components/arcgis-portal-ai-assistant/tools/getItemTool.d.ts +11 -0
  198. package/dist/components/arcgis-portal-ai-assistant/tools/groups.d.ts +28 -0
  199. package/dist/components/arcgis-portal-ai-assistant/tools/users.d.ts +28 -0
  200. package/dist/components/arcgis-portal-ai-assistant/types/assistantTools.d.ts +41 -3
  201. package/dist/components/arcgis-portal-ai-assistant/types/portalEntityTools.d.ts +19 -0
  202. package/dist/components/arcgis-portal-ai-assistant-diagnostics/contextUsage.d.ts +46 -0
  203. package/dist/components/arcgis-portal-ai-assistant-diagnostics/customElement.d.ts +26 -0
  204. package/dist/components/arcgis-portal-ai-assistant-diagnostics/customElement.js +46 -0
  205. package/dist/components/arcgis-portal-ai-assistant-diagnostics/index.d.ts +1 -0
  206. package/dist/components/arcgis-portal-ai-assistant-diagnostics/index.js +10 -0
  207. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.d.ts +42 -1
  208. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +49 -37
  209. package/dist/components/arcgis-portal-ai-assistant-interrupt/index.js +3 -4
  210. package/dist/components/arcgis-portal-browser/customElement.d.ts +3 -0
  211. package/dist/components/arcgis-portal-browser/customElement.js +3 -2
  212. package/dist/components/arcgis-portal-browser/index.js +1 -0
  213. package/dist/components/arcgis-portal-classification-banner/customElement.js +2 -2
  214. package/dist/components/arcgis-portal-classification-config/customElement.js +2 -2
  215. package/dist/components/arcgis-portal-classification-favorite/customElement.js +2 -2
  216. package/dist/components/arcgis-portal-classification-form-element/customElement.js +1 -1
  217. package/dist/components/arcgis-portal-delete-items/customElement.d.ts +69 -3
  218. package/dist/components/arcgis-portal-delete-items/customElement.js +437 -333
  219. package/dist/components/arcgis-portal-delete-items/index.js +1 -2
  220. package/dist/components/arcgis-portal-delete-items/types.d.ts +1 -0
  221. package/dist/components/arcgis-portal-entity-picker/customElement.d.ts +51 -5
  222. package/dist/components/arcgis-portal-entity-picker/customElement.js +204 -119
  223. package/dist/components/arcgis-portal-entity-picker/index.js +2 -0
  224. package/dist/components/arcgis-portal-field-delete/customElement.js +87 -101
  225. package/dist/components/arcgis-portal-field-delete/index.js +1 -1
  226. package/dist/components/arcgis-portal-group-badges/customElement.js +5 -5
  227. package/dist/components/arcgis-portal-group-browser/customElement.js +68 -100
  228. package/dist/components/arcgis-portal-group-browser/types.d.ts +3 -7
  229. package/dist/components/arcgis-portal-group-browser-preview/customElement.js +49 -40
  230. package/dist/components/arcgis-portal-group-browser-preview/index.js +1 -0
  231. package/dist/components/arcgis-portal-group-browser-preview-card/customElement.js +1 -4
  232. package/dist/components/arcgis-portal-group-card/customElement.js +16 -16
  233. package/dist/components/arcgis-portal-group-thumbnail/customElement.js +1 -1
  234. package/dist/components/arcgis-portal-item-badges/customElement.js +4 -4
  235. package/dist/components/arcgis-portal-item-card/customElement.d.ts +37 -10
  236. package/dist/components/arcgis-portal-item-card/customElement.js +125 -86
  237. package/dist/components/arcgis-portal-item-card/index.js +4 -1
  238. package/dist/components/arcgis-portal-item-card-sublayer-select/customElement.d.ts +102 -0
  239. package/dist/components/arcgis-portal-item-card-sublayer-select/customElement.js +181 -0
  240. package/dist/components/arcgis-portal-item-card-sublayer-select/index.d.ts +1 -0
  241. package/dist/components/arcgis-portal-item-card-sublayer-select/index.js +8 -0
  242. package/dist/components/arcgis-portal-item-card-sublayer-select/types.d.ts +22 -0
  243. package/dist/components/arcgis-portal-item-favorite/customElement.js +42 -29
  244. package/dist/components/arcgis-portal-item-preview/customElement.d.ts +263 -0
  245. package/dist/components/arcgis-portal-item-preview/customElement.js +137 -0
  246. package/dist/components/arcgis-portal-item-preview/index.d.ts +1 -0
  247. package/dist/components/arcgis-portal-item-preview/index.js +20 -0
  248. package/dist/components/arcgis-portal-item-preview/types.d.ts +14 -0
  249. package/dist/components/arcgis-portal-item-preview-copy/customElement.d.ts +215 -0
  250. package/dist/components/arcgis-portal-item-preview-copy/customElement.js +46 -0
  251. package/dist/components/arcgis-portal-item-preview-copy/index.d.ts +1 -0
  252. package/dist/components/arcgis-portal-item-preview-copy/index.js +5 -0
  253. package/dist/components/arcgis-portal-item-preview-field/customElement.d.ts +216 -0
  254. package/dist/components/arcgis-portal-item-preview-field/customElement.js +34 -0
  255. package/dist/components/arcgis-portal-item-preview-field/index.d.ts +1 -0
  256. package/dist/components/arcgis-portal-item-preview-field/index.js +6 -0
  257. package/dist/components/arcgis-portal-item-preview-sublayer/customElement.d.ts +216 -0
  258. package/dist/components/arcgis-portal-item-preview-sublayer/customElement.js +15 -0
  259. package/dist/components/arcgis-portal-item-preview-sublayer/index.d.ts +1 -0
  260. package/dist/components/arcgis-portal-item-preview-sublayer/index.js +11 -0
  261. package/dist/components/arcgis-portal-item-share-summary/customElement.d.ts +113 -0
  262. package/dist/components/arcgis-portal-item-share-summary/customElement.js +172 -0
  263. package/dist/components/arcgis-portal-item-share-summary/index.d.ts +1 -0
  264. package/dist/components/arcgis-portal-item-share-summary/index.js +5 -0
  265. package/dist/components/arcgis-portal-item-share-summary-editable/customElement.d.ts +33 -0
  266. package/dist/components/arcgis-portal-item-share-summary-editable/customElement.js +19 -0
  267. package/dist/components/arcgis-portal-item-share-summary-editable/index.d.ts +1 -0
  268. package/dist/components/arcgis-portal-item-share-summary-editable/index.js +2 -0
  269. package/dist/components/arcgis-portal-item-status-card/customElement.d.ts +82 -0
  270. package/dist/components/arcgis-portal-item-status-card/customElement.js +12 -0
  271. package/dist/components/arcgis-portal-item-status-card/index.d.ts +1 -0
  272. package/dist/components/arcgis-portal-item-status-card/index.js +4 -0
  273. package/dist/components/arcgis-portal-item-thumbnail/customElement.d.ts +1 -0
  274. package/dist/components/arcgis-portal-item-thumbnail/customElement.js +14 -14
  275. package/dist/components/arcgis-portal-item-type/customElement.d.ts +16 -14
  276. package/dist/components/arcgis-portal-item-type/customElement.js +25 -28
  277. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +61 -57
  278. package/dist/components/arcgis-portal-navigation/customElement.d.ts +10 -4
  279. package/dist/components/arcgis-portal-navigation/customElement.js +349 -351
  280. package/dist/components/arcgis-portal-navigation/index.js +4 -5
  281. package/dist/components/arcgis-portal-navigation/types.d.ts +3 -0
  282. package/dist/components/arcgis-portal-preview-panel/customElement.d.ts +40 -0
  283. package/dist/components/arcgis-portal-preview-panel/customElement.js +40 -0
  284. package/dist/components/arcgis-portal-preview-panel/index.d.ts +1 -0
  285. package/dist/components/arcgis-portal-preview-panel/index.js +1 -0
  286. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +8 -8
  287. package/dist/components/arcgis-portal-review-layer-sharing/customElement.d.ts +139 -0
  288. package/dist/components/arcgis-portal-review-layer-sharing/customElement.js +593 -0
  289. package/dist/components/arcgis-portal-review-layer-sharing/index.d.ts +1 -0
  290. package/dist/components/arcgis-portal-review-layer-sharing/index.js +10 -0
  291. package/dist/components/arcgis-portal-review-layer-sharing/types.d.ts +27 -0
  292. package/dist/components/arcgis-portal-review-related-items/customElement.d.ts +333 -0
  293. package/dist/components/arcgis-portal-review-related-items/customElement.js +46 -18
  294. package/dist/components/arcgis-portal-review-related-items/index.js +2 -0
  295. package/dist/components/arcgis-portal-sublayer-type/customElement.js +13 -103
  296. package/dist/components/arcgis-portal-user-avatar/customElement.d.ts +2 -3
  297. package/dist/components/arcgis-portal-user-avatar/customElement.js +15 -16
  298. package/dist/components/arcgis-portal-user-popup/customElement.d.ts +4 -7
  299. package/dist/components/arcgis-portal-user-popup/customElement.js +128 -111
  300. package/dist/components/portal-group-browser-filters/customElement.js +15 -15
  301. package/dist/components/portal-related-items-list-item/customElement.js +16 -14
  302. package/dist/components/portal-related-items-list-item/index.js +1 -1
  303. package/dist/docs/api.json +1 -1
  304. package/dist/docs/docs.json +1 -1
  305. package/dist/docs/vscode.css-custom-data.json +1 -1
  306. package/dist/docs/vscode.html-custom-data.json +1 -1
  307. package/dist/docs/web-types.json +1 -1
  308. package/dist/index.d.ts +87 -0
  309. package/dist/index.js +305 -6
  310. package/dist/loader.js +22 -11
  311. package/dist/services/group.d.ts +17 -0
  312. package/dist/services/groups.d.ts +9 -0
  313. package/dist/services/item.d.ts +9 -0
  314. package/dist/types/item.d.ts +23 -11
  315. package/dist/types/layer.d.ts +27 -0
  316. package/dist/types/lumina.d.ts +82 -12
  317. package/dist/types/portalAssistantCurrentContext.d.ts +9 -0
  318. package/dist/types/portalEntityPicker.d.ts +3 -0
  319. package/dist/types/preact.d.ts +93 -12
  320. package/dist/types/react.d.ts +104 -12
  321. package/dist/types/services.d.ts +28 -1
  322. package/dist/types/stencil.d.ts +82 -12
  323. package/dist/types/user.d.ts +14 -10
  324. package/dist/utils/generateEmbeddings.d.ts +7 -0
  325. package/dist/utils/semanticSearch.d.ts +60 -0
  326. package/dist/utils/types.d.ts +10 -0
  327. package/package.json +14 -13
  328. package/dist/cdn/23NXHNPU.js +0 -2
  329. package/dist/cdn/24QSQLRY.js +0 -2
  330. package/dist/cdn/2CN754CY.js +0 -2
  331. package/dist/cdn/2FQKDFEE.js +0 -2
  332. package/dist/cdn/2MPQ5IWJ.js +0 -2
  333. package/dist/cdn/3CQKCUM5.js +0 -2
  334. package/dist/cdn/3EYB5GQX.js +0 -2
  335. package/dist/cdn/3FSPL34I.js +0 -170
  336. package/dist/cdn/3LEQ37YT.js +0 -68
  337. package/dist/cdn/4KTRAA2J.js +0 -2
  338. package/dist/cdn/4MUB6TL6.js +0 -2
  339. package/dist/cdn/4PRXQFCV.js +0 -2
  340. package/dist/cdn/4QFTKB6T.js +0 -2
  341. package/dist/cdn/4TSXFX3M.js +0 -2
  342. package/dist/cdn/5C5GHX4D.js +0 -2
  343. package/dist/cdn/7LMZHJZG.js +0 -2
  344. package/dist/cdn/A2SQ4EMZ.js +0 -2
  345. package/dist/cdn/AICPYLWE.js +0 -4
  346. package/dist/cdn/AXOBMX3S.js +0 -2
  347. package/dist/cdn/AZOJHVAO.js +0 -2
  348. package/dist/cdn/BYHX3UWV.js +0 -2
  349. package/dist/cdn/CD5UWSCP.js +0 -2
  350. package/dist/cdn/D2YQWKME.js +0 -135
  351. package/dist/cdn/DDBXEXOV.js +0 -2
  352. package/dist/cdn/DHMNNIXZ.js +0 -2
  353. package/dist/cdn/DLI4XKJ3.js +0 -2
  354. package/dist/cdn/DYO5P3F2.js +0 -2
  355. package/dist/cdn/E66BDC6N.js +0 -2
  356. package/dist/cdn/EEAVX4PP.js +0 -2
  357. package/dist/cdn/EMJQI4MA.js +0 -2
  358. package/dist/cdn/EY5S6ICQ.js +0 -2
  359. package/dist/cdn/FIBQAMJ3.js +0 -2
  360. package/dist/cdn/FIQZPIIK.js +0 -2
  361. package/dist/cdn/FNLBJ4ZQ.js +0 -2
  362. package/dist/cdn/GGDOGNH4.js +0 -150
  363. package/dist/cdn/GSOBDGLK.js +0 -2
  364. package/dist/cdn/GXM3XY3J.js +0 -2
  365. package/dist/cdn/HCNTXLUT.js +0 -2
  366. package/dist/cdn/I273CANO.js +0 -2
  367. package/dist/cdn/I6NVKNZJ.js +0 -2
  368. package/dist/cdn/J5FKIZAM.js +0 -2
  369. package/dist/cdn/J5NPDIZM.js +0 -2
  370. package/dist/cdn/JOUR2FB2.js +0 -3
  371. package/dist/cdn/JWBUJT43.js +0 -2
  372. package/dist/cdn/K75JTQPW.js +0 -2
  373. package/dist/cdn/LISDTBEX.js +0 -2
  374. package/dist/cdn/LYLQCBVX.js +0 -2
  375. package/dist/cdn/MQK63FV7.js +0 -2
  376. package/dist/cdn/N4VOTJ25.js +0 -2
  377. package/dist/cdn/N5QLV56W.js +0 -2
  378. package/dist/cdn/OD5WXP7J.js +0 -2
  379. package/dist/cdn/OXPXXIWL.js +0 -2
  380. package/dist/cdn/PKA745KL.js +0 -2
  381. package/dist/cdn/PMRFXB4F.js +0 -2
  382. package/dist/cdn/PNIFJ5DQ.js +0 -2
  383. package/dist/cdn/PZDI5ZDC.js +0 -2
  384. package/dist/cdn/QROXYP6V.js +0 -2
  385. package/dist/cdn/QUOLQGKP.js +0 -2
  386. package/dist/cdn/QWHGLE3O.js +0 -2
  387. package/dist/cdn/R3PK7XOP.js +0 -2
  388. package/dist/cdn/REM3KCX6.js +0 -2
  389. package/dist/cdn/RNWICLRH.js +0 -2
  390. package/dist/cdn/RQYNPDN3.js +0 -2
  391. package/dist/cdn/S6F7U36E.js +0 -400
  392. package/dist/cdn/SMX2LEJB.js +0 -2
  393. package/dist/cdn/SVROAT3Z.js +0 -2
  394. package/dist/cdn/TBZXKKGP.js +0 -2
  395. package/dist/cdn/TNUCSWBN.js +0 -2
  396. package/dist/cdn/TOICLGFK.js +0 -2
  397. package/dist/cdn/TOTWYGB3.js +0 -2
  398. package/dist/cdn/TUUUK3VX.js +0 -2
  399. package/dist/cdn/U3KMGSVH.js +0 -2
  400. package/dist/cdn/UEP2NYJK.js +0 -2
  401. package/dist/cdn/UZP4YMTE.js +0 -2
  402. package/dist/cdn/VNU4QX7M.js +0 -41
  403. package/dist/cdn/XYMBRPC7.js +0 -2
  404. package/dist/cdn/YB3DR4VO.js +0 -2
  405. package/dist/cdn/YYTEJVBL.js +0 -2
  406. package/dist/cdn/Z3HGPBOR.js +0 -2
  407. package/dist/cdn/ZDDN7UKS.js +0 -2
  408. package/dist/cdn/ZXNF77OB.js +0 -2
  409. package/dist/chunks/functional.js +0 -9
  410. package/dist/components/arcgis-portal-ai-assistant/data/capability-registries/types.d.ts +0 -45
  411. /package/dist/cdn/{OUMTV5H5.js → KHKREBVZ.js} +0 -0
  412. /package/dist/cdn/{DAAON2UO.js → UOXUUCE7.js} +0 -0
@@ -1,132 +1,106 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import a from "@arcgis/core/request.js";
2
+ import { c as y } from "./requests.js";
3
+ import { c as d } from "./string.js";
3
4
  import { a as i } from "./portal.js";
4
- function f(e, r) {
5
- return `${i(r)}content/items/${e}`;
6
- }
7
- function g(e) {
8
- return e.typeKeywords?.includes("Hosted Service") && e.type !== "Insights Workbook" && e.type !== "Insights Data Engineering Workbook" && e.type !== "Insights Page";
9
- }
10
- function v(e) {
11
- return e.typeKeywords?.includes("View Service");
12
- }
13
- function h(e) {
14
- return e.typeKeywords?.includes("Service Proxy") && e.typeKeywords.includes("Geocoding filter");
15
- }
16
- function I(e) {
17
- return e.type === "Image Collection" && e.typeKeywords?.includes("Photo locations");
18
- }
19
- function p(e) {
20
- return e?.sourceType === "mosaic-dataset" || e?.serviceSourceType === "esriImageServiceSourceTypeMosaicDataset";
21
- }
22
- function P(e, r) {
23
- return e.typeKeywords?.includes("Managed Image Collection") || p(r) && !e.typeKeywords?.includes("Tiled Imagery");
24
- }
25
- function S(e, r) {
26
- return !!((e.sourceJSON?.serviceProperties?.tags || e?.serviceProperties?.tags)?.includes(
27
- "hasMultidimensions"
28
- ) || r?.hasMultidimensions);
29
- }
30
- function K(e, r) {
31
- return c(e, r) || m(e, r);
32
- }
33
- function c(e, r) {
34
- return e.owner === r.username;
35
- }
36
- function m(e, r) {
37
- const t = e.owner, s = e.itemControl === "admin", n = ["esri_livingatlas", "esri_demographics", "esri_boundaries"];
38
- return e.portal?.isPortal && !c(e, r) && s && t?.includes("esri_") && // portal incorrectly returns "itemControl="admin" for esri owned items
39
- !n.includes(t) ? !1 : s;
40
- }
41
- const T = (e, r) => !!r.orgId && e.every((t) => t.isOrgItem);
42
- function j(e) {
43
- return e.typeKeywords?.includes("Spatiotemporal");
44
- }
45
- function k(e) {
46
- return e.typeKeywords?.includes("View Service");
47
- }
48
- function V(e) {
49
- return e.typeKeywords?.includes("Hosted Service");
50
- }
51
- function G(e) {
52
- return e.typeKeywords?.includes("Multi Services View");
53
- }
54
- function U(e) {
55
- return e?.hasViews && !e.sourceSchemaChangesAllowed;
5
+ import { r as c } from "./request.js";
6
+ function k(r) {
7
+ return r.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&");
8
+ }
9
+ const g = (r, e) => [...Array(Math.ceil(r.length / e))].map((t, n) => r.slice(e * n, e + e * n));
10
+ async function v(r, e) {
11
+ const t = `${i(r)}content/items/${e}`;
12
+ try {
13
+ return { result: await c({ url: t, portal: r }) };
14
+ } catch {
15
+ return { error: { code: "unhandledError" } };
16
+ }
56
17
  }
57
- async function $(e) {
58
- const r = e?.portalItem;
59
- if (!r)
60
- return await Promise.resolve(null);
61
- const t = r.portal;
62
- if (t?.user) {
63
- const s = `${i(t)}community/users/${t.user.username}`;
64
- return await a(s, {
65
- query: {
66
- f: "json",
67
- token: r.portal.credential?.token
68
- },
69
- responseType: "json"
70
- }).then(
71
- async (n) => {
72
- const o = n.data?.groups ?? [];
73
- return await Promise.resolve(o);
74
- },
75
- async () => await Promise.reject(new Error("Failed to fetch user groups"))
76
- );
18
+ async function q(r, e, t, n) {
19
+ const s = Object.fromEntries(t.flatMap(({ id: a }) => a ? [[a, []]] : []));
20
+ if (!t.length)
21
+ return { result: s };
22
+ if (!e.groups)
23
+ return { error: { code: "unhandledError" } };
24
+ try {
25
+ return (await Promise.all(
26
+ g(e.groups, 100).map(
27
+ async (u) => await c({
28
+ url: `${i(r)}content/itemsgroups`,
29
+ portal: r,
30
+ params: {
31
+ items: t.map(({ id: o }) => o).join(","),
32
+ groups: u.map(({ id: o }) => o).join(",")
33
+ },
34
+ ...n ? { options: n } : {}
35
+ })
36
+ )
37
+ )).reduce((u, o) => {
38
+ for (const { groupId: p, items: f } of Object.values(o))
39
+ for (const { itemId: m } of f)
40
+ u[m]?.push(p);
41
+ return u;
42
+ }, s), { result: s };
43
+ } catch {
44
+ return { error: { code: "unhandledError" } };
77
45
  }
78
- return await Promise.resolve(null);
79
46
  }
80
- async function b(e) {
81
- const r = e?.portalItem;
82
- if (!r)
83
- return await Promise.resolve(null);
84
- const t = r.portal, s = `${i(t)}content/items/${r.id}/groups`;
85
- return await a(s, {
86
- query: {
87
- f: "json",
88
- token: r.portal.credential?.token
89
- },
90
- responseType: "json"
91
- }).then(
92
- async (n) => {
93
- const o = n.data?.admin ?? [], u = n.data?.member ?? [], l = n.data?.other ?? [], d = [...o, ...u, ...l];
94
- return await Promise.resolve(d);
95
- },
96
- async () => await Promise.reject(new Error("Failed to fetch item groups"))
97
- );
47
+ const j = async (r, e, t) => {
48
+ const n = d(e);
49
+ if (!n)
50
+ return {};
51
+ try {
52
+ return { result: await r.queryItems({ ...t, query: n }) };
53
+ } catch (s) {
54
+ return console.error(s), { error: { code: "unhandledError" } };
55
+ }
56
+ };
57
+ async function G(r, e) {
58
+ if (!r || !e)
59
+ return { result: null };
60
+ const t = `${r.restUrl}/content/items/${e}/data`;
61
+ return await y(t);
62
+ }
63
+ async function U(r, e) {
64
+ return !h(r) || !r.url ? !1 : await l(r.url, e);
65
+ }
66
+ function h(r) {
67
+ return r.typeKeywords?.includes("Hosted Service") && r.type !== "Insights Workbook" && r.type !== "Insights Data Engineering Workbook" && r.type !== "Insights Page";
68
+ }
69
+ function w(r) {
70
+ return `${r.split("?")[0].replace(/\/+$/u, "").replace(/\/\d+$/u, "")}/layers`;
71
+ }
72
+ async function l(r, e, t = !0) {
73
+ const n = w(r);
74
+ try {
75
+ return ((await c({
76
+ portal: e,
77
+ url: n,
78
+ options: { addTokenManually: t }
79
+ })).layers ?? []).some((a) => a.capabilities?.includes("Editing"));
80
+ } catch (s) {
81
+ const a = s instanceof Error ? s.message : String(s);
82
+ if (t && a.toLowerCase().includes("token required"))
83
+ return await l(r, e, !1);
84
+ throw s;
85
+ }
98
86
  }
99
- async function M(e, r, { relationshipType: t, direction: s }, n = !1) {
100
- const o = `${i(r)}content/items/${e}/relatedItems`;
101
- return await a(o, {
102
- query: { f: "json", relationshipType: t, direction: s, includeRecycleBin: n },
103
- responseType: "json"
87
+ async function I(r, e) {
88
+ return await c({
89
+ url: `${i(r)}content/items/${e}/groups`,
90
+ portal: r
104
91
  });
105
92
  }
106
- function C(e, r) {
107
- return e?.some(
108
- (t) => r?.some(
109
- (s) => t.id === s.id && t.capabilities.includes("updateitemcontrol")
110
- )
111
- );
112
- }
93
+ const M = async (r, e) => {
94
+ const t = await I(r, e);
95
+ return [...t.admin, ...t.member, ...t.other];
96
+ };
113
97
  export {
114
- g as a,
115
- S as b,
116
- P as c,
117
- v as d,
118
- h as e,
119
- I as f,
120
- M as g,
121
- V as h,
122
- T as i,
123
- k as j,
124
- U as k,
125
- G as l,
126
- j as m,
127
- $ as n,
128
- b as o,
129
- C as p,
130
- f as q,
131
- K as u
98
+ v as a,
99
+ M as b,
100
+ g as c,
101
+ k as e,
102
+ q as f,
103
+ G as g,
104
+ U as i,
105
+ j as s
132
106
  };
@@ -1,12 +1,12 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { g as f } from "./portal.js";
3
- import { g as v } from "./runtime.js";
4
- import { g } from "./items.js";
5
- function p(e) {
6
- const a = d(e);
7
- return v(`assets/portal-item-thumbnail/${a}`);
2
+ import { a as v, b as g } from "./portal.js";
3
+ import { g as d } from "./runtime.js";
4
+ import { g as m } from "./items.js";
5
+ function f(e) {
6
+ const a = b(e);
7
+ return d(`assets/portal-item-thumbnail/${a}`);
8
8
  }
9
- function d(e) {
9
+ function b(e) {
10
10
  const a = e.type?.toLowerCase(), r = e.typeKeywords || [];
11
11
  switch (a) {
12
12
  case "web mapping application":
@@ -172,22 +172,22 @@ function d(e) {
172
172
  return "default.avif";
173
173
  }
174
174
  }
175
- function m(e) {
176
- return e.thumbnail ?? g(e).thumbnail ?? null;
175
+ function h(e) {
176
+ return e.thumbnail ?? m(e).thumbnail ?? null;
177
177
  }
178
- function y(e, a, r = !1, l = !1, i) {
179
- const s = l ? "https://www.arcgis.com/sharing/rest/" : e?.restUrl;
180
- if (a.thumbnailUrl) {
181
- const n = new URL(a.thumbnailUrl);
182
- return n.searchParams.append("w", "400"), i && n.searchParams.append("t", i), n.href;
178
+ function j(e, a, r = !1, t = !1, i) {
179
+ const c = t ? "https://www.arcgis.com/sharing/rest/" : e ? v(e) : void 0, o = r || t;
180
+ if (!t && a.thumbnailUrl) {
181
+ const s = new URL(a.thumbnailUrl);
182
+ return s.searchParams.append("w", "400"), i && s.searchParams.append("t", i), s.href;
183
183
  }
184
- if (!e || !s)
185
- return p(a);
186
- const c = f(e), t = c && !r ? `token=${c}` : "", o = `${s ?? e.restUrl}/content/items/${a.id}`, u = m(a);
187
- return u ? `${o}/info/${u}?w=400${t ? `&${t}` : ""}${i ? `&t=${i}` : ""}` : a.type === "Image" && !r ? `${o}/data?${t}` : p(a);
184
+ if (!c)
185
+ return f(a);
186
+ const u = e && !o ? g(e) : "", n = u ? `token=${u}` : "", p = `${c}content/items/${a.id}`, l = h(a);
187
+ return l ? `${p}/info/${l}?w=400${n ? `&${n}` : ""}${i ? `&t=${i}` : ""}` : a.type === "Image" && !o ? `${p}/data?${n}` : f(a);
188
188
  }
189
189
  export {
190
- p as a,
191
- m as b,
192
- y as g
190
+ f as a,
191
+ h as b,
192
+ j as g
193
193
  };
@@ -1,16 +1,16 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- const s = (e) => e.sourceJSON ?? {}, a = (e) => e.typeKeywords ?? s(e).typeKeywords ?? [], r = (e) => s(e).contentStatus, i = (e) => {
2
+ const o = (e) => !("sourceJSON" in e), s = (e) => o(e) ? e : e.sourceJSON ?? {}, n = (e) => e.typeKeywords ?? s(e).typeKeywords ?? [], i = (e) => s(e).contentStatus, c = (e) => {
3
3
  const t = s(e).groupDesignations;
4
- return t ? t.split(",").map((n) => n.trim()).filter(Boolean) : [];
5
- }, o = (e) => e.type === "Data Store" && a(e).includes("bigDataFileShare"), c = (e) => e.type === "Big Data File Share" || o(e), p = (e) => e.type === "CityEngine Web Scene", g = (e) => e.type === "Parquet Feature Layer", y = (e) => a(e).find((t) => t.includes("replacementItemId_"))?.slice(18);
4
+ return t ? t.split(",").map((a) => a.trim()).filter(Boolean) : [];
5
+ }, r = (e) => e.type === "Data Store" && n(e).includes("bigDataFileShare"), p = (e) => e.type === "Big Data File Share" || r(e), g = (e) => e.type === "CityEngine Web Scene", y = (e) => e.type === "Parquet Feature Layer", u = (e) => n(e).find((t) => t.includes("replacementItemId_"))?.slice(18);
6
6
  export {
7
- y as a,
8
- a as b,
9
- c,
10
- r as d,
11
- i as e,
12
- g as f,
7
+ u as a,
8
+ n as b,
9
+ p as c,
10
+ i as d,
11
+ c as e,
12
+ y as f,
13
13
  s as g,
14
- o as h,
15
- p as i
14
+ r as h,
15
+ g as i
16
16
  };
@@ -0,0 +1,196 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import { isAbortError as v } from "@arcgis/core/core/promiseUtils.js";
3
+ import { log as w } from "@arcgis/toolkit/log";
4
+ import { b as k } from "./items.js";
5
+ import { a as g, b as I } from "./portal.js";
6
+ import { r as R } from "./request.js";
7
+ function b(e) {
8
+ const r = typeof e == "object" && e !== null && "details" in e ? e.details : void 0, s = typeof r == "object" && r !== null && "raw" in r ? r.raw : void 0, t = {};
9
+ for (const o of [e, r, s])
10
+ typeof o != "object" || o === null || ("code" in o && typeof o.code == "number" && t.code === void 0 && (t.code = o.code), "messageCode" in o && typeof o.messageCode == "string" && (t.messageCode = o.messageCode));
11
+ return t;
12
+ }
13
+ async function D(e, r, s) {
14
+ return await T(e, r, s);
15
+ }
16
+ async function O(e, r, s) {
17
+ return await T(e, r, s);
18
+ }
19
+ async function T(e, r, s) {
20
+ for (const t of [!1, !0])
21
+ try {
22
+ s.throwIfAborted();
23
+ const o = await m(r, e, t, !1, s);
24
+ return s.throwIfAborted(), { result: o };
25
+ } catch (o) {
26
+ if (s.aborted || v(o))
27
+ throw o;
28
+ if (L(t, o, e))
29
+ continue;
30
+ return w("error", "portal.services.layers", "Unable to load service information.", { detail: { error: o } }), { error: { code: S(o) ? "serviceNotExist" : "unhandledError" } };
31
+ }
32
+ return { error: { code: "unhandledError" } };
33
+ }
34
+ function f(e, r, s) {
35
+ if (e.id === void 0)
36
+ throw new Error("The service layer has no ID.");
37
+ return {
38
+ description: e.description,
39
+ fieldAliases: e.fields?.map((t) => t.alias ?? ""),
40
+ fields: e.fields,
41
+ geometryType: s ? "table" : e.geometryType,
42
+ id: e.id,
43
+ title: e.name || e.title || "",
44
+ type: e.type,
45
+ matched: r?.find((t) => t.id === e.id)?.matched,
46
+ sourceJSON: e
47
+ };
48
+ }
49
+ async function m(e, r, s, t, o) {
50
+ const i = r.portalMode === "multitenant", c = new URL(g(r)).hostname, a = e.includes(".arcgis.com/"), n = ["//services", "//tiles", "//features", "//locationservices"].some(
51
+ (l) => e.includes(l)
52
+ ), d = r.supportsHostedServices && e.includes(c) && i;
53
+ return await R({
54
+ url: e,
55
+ portal: r,
56
+ method: "post",
57
+ options: {
58
+ useProxy: !1,
59
+ timeout: i ? 5e3 : 6e4,
60
+ addSSL: a && n || !a && d,
61
+ ...s ? {} : { addTokenManually: !1 },
62
+ disableIdentityLookup: !t,
63
+ signal: o
64
+ }
65
+ });
66
+ }
67
+ function E(e) {
68
+ return typeof e == "object" && e !== null && "message" in e && typeof e.message == "string" ? e.message : void 0;
69
+ }
70
+ function S(e) {
71
+ return [404, 500].includes(b(e).code ?? 0) || E(e) === "Invalid URL";
72
+ }
73
+ function L(e, r, s) {
74
+ const { code: t } = b(r), o = E(r);
75
+ return !e && (t === 499 && (o === "Token Required" || o === "Token required.") || t === 403 || t === 498 && o === "Invalid Token") && !!s.user;
76
+ }
77
+ function p(e, r, s, t) {
78
+ const o = s?.tables, i = !!s?.layers?.length || !!o, c = [...s?.layers ?? [], ...s?.tables ?? []].map((a) => a.id);
79
+ return (e ?? []).filter(({ id: a, type: n }) => !i || n === "Table" && !o || c.includes(a)).map((a) => f(a, r, t));
80
+ }
81
+ async function x({
82
+ serviceInfo: e,
83
+ item: r,
84
+ portal: s,
85
+ layers: t,
86
+ isSecure: o,
87
+ allowLoginWindow: i,
88
+ data: c,
89
+ signal: a
90
+ }) {
91
+ if (!e.layers?.length && !e.tables?.length && e.fields)
92
+ return { result: { sublayers: [f(e, t)], serviceInfo: e } };
93
+ try {
94
+ const n = await m(
95
+ `${r.url}/layers`,
96
+ s,
97
+ o,
98
+ i,
99
+ a
100
+ );
101
+ return {
102
+ result: {
103
+ sublayers: [
104
+ ...p(n.layers, t, c),
105
+ ...p(n.tables, t, c, !0)
106
+ ].sort((d, u) => d.id - u.id),
107
+ serviceInfo: e
108
+ }
109
+ };
110
+ } catch {
111
+ return { error: { code: "unhandledError" } };
112
+ }
113
+ }
114
+ async function q(e, r, s) {
115
+ try {
116
+ const t = new URL(`${g(r)}content/items/${e.id}/data`);
117
+ t.searchParams.set("f", "json");
118
+ const o = I(r);
119
+ o && t.searchParams.set("token", o);
120
+ const c = await (await fetch(t, { signal: s })).text();
121
+ return c ? JSON.parse(c) : void 0;
122
+ } catch (t) {
123
+ if (s?.aborted || v(t))
124
+ throw t;
125
+ w("warn", "portal.services.layers", "Unable to read optional item data; loading the service directly.", {
126
+ detail: { error: t }
127
+ });
128
+ return;
129
+ }
130
+ }
131
+ async function N({
132
+ item: e,
133
+ portal: r,
134
+ layers: s,
135
+ isSecure: t = !1,
136
+ data: o,
137
+ allowLoginWindow: i,
138
+ retry: c,
139
+ signal: a
140
+ }) {
141
+ try {
142
+ const n = o ?? (c ? void 0 : await q(e, r, a));
143
+ if (n?.error?.code === 403 && n.error.messageCode === "SB_0006")
144
+ return { error: { code: "serviceNotExist" } };
145
+ if (e.type === "Feature Collection" && (n?.layers || n?.tables))
146
+ return {
147
+ result: {
148
+ sublayers: [...n.layers ?? [], ...n.tables ?? []].map(({ layerDefinition: d }, u) => {
149
+ if (!d)
150
+ throw new Error("A feature collection layer has no layer definition.");
151
+ return {
152
+ ...f({ ...d, id: u }, void 0, u >= (n.layers?.length ?? 0)),
153
+ description: "",
154
+ matched: !1,
155
+ sourceJSON: d
156
+ };
157
+ })
158
+ }
159
+ };
160
+ try {
161
+ if (!e.url)
162
+ throw new Error("Invalid URL");
163
+ const d = await m(e.url, r, t, i, a), u = await x({
164
+ serviceInfo: d,
165
+ item: e,
166
+ portal: r,
167
+ layers: s,
168
+ isSecure: t,
169
+ allowLoginWindow: i,
170
+ data: n,
171
+ signal: a
172
+ });
173
+ return k(e).includes("SubtypeGroupLayer") && u.result && n?.layers?.length && (u.result.sublayers = u.result.sublayers.flatMap((l) => {
174
+ const y = n?.layers?.find(({ id: h }) => h === l.id);
175
+ return y?.layerType === "SubtypeGroupLayer" && y.layers?.length ? [
176
+ l,
177
+ ...y.layers.map((h) => ({
178
+ ...f(h),
179
+ // use the parent layer as the geometry type
180
+ geometryType: l.geometryType
181
+ }))
182
+ ] : [l];
183
+ })), u;
184
+ } catch (d) {
185
+ return !a?.aborted && L(t, d, r) ? await N({ item: e, portal: r, layers: s, data: n, isSecure: !0, allowLoginWindow: i, signal: a }) : { error: { code: S(d) ? "serviceNotExist" : "unhandledError" } };
186
+ }
187
+ } catch {
188
+ return { error: { code: "unhandledError" } };
189
+ }
190
+ }
191
+ export {
192
+ O as a,
193
+ D as b,
194
+ N as f,
195
+ b as g
196
+ };
@@ -1,18 +1,17 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
2
  import d from "@arcgis/core/core/Accessor.js";
3
3
  import { property as n, subclass as p } from "@arcgis/core/core/accessorSupport/decorators.js";
4
- import { c as m, v as u } from "./requests.js";
5
- import { Deferred as h } from "@arcgis/toolkit/promise";
6
- import { makeAccessorController as C } from "@arcgis/lumina-toolkit/useAccessor";
7
- import { Task as v } from "@lit/task";
8
- var w = Object.defineProperty, g = Object.getOwnPropertyDescriptor, e = (i, t, s, a) => {
9
- for (var r = a > 1 ? void 0 : a ? g(t, s) : t, l = i.length - 1, c; l >= 0; l--)
10
- (c = i[l]) && (r = (a ? c(t, s, r) : c(r)) || r);
11
- return a && r && w(t, s, r), r;
4
+ import { a as m, v as u } from "./requests.js";
5
+ import { makeAccessorController as h } from "@arcgis/lumina-toolkit/useAccessor";
6
+ import { Task as C } from "@lit/task";
7
+ var v = Object.defineProperty, w = Object.getOwnPropertyDescriptor, e = (i, a, s, t) => {
8
+ for (var r = t > 1 ? void 0 : t ? w(a, s) : a, l = i.length - 1, c; l >= 0; l--)
9
+ (c = i[l]) && (r = (t ? c(a, s, r) : c(r)) || r);
10
+ return t && r && v(a, s, r), r;
12
11
  };
13
12
  let o = class extends d {
14
13
  constructor() {
15
- super(...arguments), this.fetching = !1, this.status = "idle", this.error = void 0, this.portalUrl = void 0, this._itemClassificationValidationErrors = /* @__PURE__ */ new Map(), this.fetchingPromise = new h();
14
+ super(...arguments), this.fetching = !1, this.status = "idle", this.error = void 0, this.portalUrl = void 0, this._itemClassificationValidationErrors = /* @__PURE__ */ new Map(), this.fetchingPromise = Promise.withResolvers();
16
15
  }
17
16
  // #endregion
18
17
  // #region Accessors
@@ -29,9 +28,9 @@ let o = class extends d {
29
28
  */
30
29
  setPortalClassificationData({
31
30
  portalUrl: i,
32
- schema: t
31
+ schema: a
33
32
  }) {
34
- this.portalUrl = i, this.portalClassificationSchema = t, this.status = "loaded", this.fetchingPromise.resolve(!0);
33
+ this.portalUrl = i, this.portalClassificationSchema = a, this.status = "loaded", this.fetchingPromise.resolve(!0);
35
34
  }
36
35
  /**
37
36
  * Sets the fetching state.
@@ -42,23 +41,23 @@ let o = class extends d {
42
41
  /**
43
42
  * Loads and sets the classification schema from the portal.
44
43
  */
45
- async loadPortalClassificationData(i, { signal: t }) {
44
+ async loadPortalClassificationData(i, { signal: a }) {
46
45
  this.status = "loading";
47
- const { result: s, error: a } = await m(i, t);
48
- if (a) {
49
- a.name === "AbortError" ? console.log("Request aborted.") : (this.error = a, this.status = "error", this.fetchingPromise.reject(a));
46
+ const { result: s, error: t } = await m(i, a);
47
+ if (t) {
48
+ t.name === "AbortError" ? console.log("Request aborted.") : (this.error = t, this.status = "error", this.fetchingPromise.reject(t));
50
49
  return;
51
50
  } else
52
51
  this.setPortalClassificationData({ schema: s, portalUrl: i });
53
52
  }
54
- async validateClassification(i, t, s, a) {
55
- if (!t)
53
+ async validateClassification(i, a, s, t) {
54
+ if (!a)
56
55
  return "";
57
56
  const r = i ? this._itemClassificationValidationErrors.get(i) : void 0;
58
57
  if (r)
59
58
  return await r;
60
59
  const l = (async () => {
61
- const { error: c } = await u(s, t, a ?? {});
60
+ const { error: c } = await u(s, a, t ?? {});
62
61
  return c ? c?.details.raw.messages.join(", ") : "";
63
62
  })();
64
63
  return i && this._itemClassificationValidationErrors.set(i, l), i ? await this._itemClassificationValidationErrors.get(i) : await l;
@@ -87,27 +86,27 @@ o = e([
87
86
  p("custom.ClassificationModel")
88
87
  ], o);
89
88
  let f;
90
- function P(i) {
89
+ function g(i) {
91
90
  return f ??= new o(i), f;
92
91
  }
93
- const A = C(P), S = (i) => new v(i, {
94
- task: async ([t], { signal: s }) => {
95
- if (!t)
92
+ const b = h(g), U = (i) => new C(i, {
93
+ task: async ([a], { signal: s }) => {
94
+ if (!a)
96
95
  throw new Error("Portal item is required to load classification data");
97
- if (t.loaded || await t.load({ signal: s }), i.itemClassification = t.classification, i.classificationModel.status === "loading" && await i.classificationModel.fetchingPromise.promise, !i.portalItem?.portal.hasClassificationSchema) {
96
+ if (a.loaded || await a.load({ signal: s }), i.itemClassification = a.classification, i.classificationModel.status === "loading" && await i.classificationModel.fetchingPromise.promise, !i.portalItem?.portal.hasClassificationSchema) {
98
97
  i.classificationModel.setPortalClassificationData({
99
- portalUrl: t.portal.restUrl,
98
+ portalUrl: a.portal.restUrl,
100
99
  schema: void 0
101
100
  });
102
101
  return;
103
102
  }
104
103
  // Only fetch if the data has not been fetched
105
104
  (i.classificationModel.status === "idle" || // or if the portal url changes
106
- i.classificationModel.status === "loaded" && i.classificationModel.portalUrl !== t.portal.restUrl) && await i.classificationModel.loadPortalClassificationData(t.portal.restUrl, { signal: s });
105
+ i.classificationModel.status === "loaded" && i.classificationModel.portalUrl !== a.portal.restUrl) && await i.classificationModel.loadPortalClassificationData(a.portal.restUrl, { signal: s });
107
106
  },
108
107
  args: () => [i.portalItem]
109
108
  });
110
109
  export {
111
- S as c,
112
- A as u
110
+ U as c,
111
+ b as u
113
112
  };