@esri/solutions-components 5.0.2-next.1 → 5.0.2-next.10

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 (227) hide show
  1. package/dist/cdn/{3WKRKVN4.js → 2642PFUF.js} +1 -1
  2. package/dist/cdn/{24QTPVIY.js → 2DAM5BYX.js} +1 -1
  3. package/dist/cdn/{UIFRG5Z5.js → 3B4FA5CV.js} +1 -1
  4. package/dist/cdn/{AXBVHGTQ.js → 3ELXQUHH.js} +1 -1
  5. package/dist/cdn/{AQKTTVWV.js → 3LEJ44U2.js} +1 -1
  6. package/dist/cdn/{4PMJGKRS.js → 3M6AYSM7.js} +1 -1
  7. package/dist/cdn/4CMHNL7Z.js +2 -0
  8. package/dist/cdn/{Z53N3M4L.js → 4OZQG5MW.js} +1 -1
  9. package/dist/cdn/{FLK4LATH.js → 55CA3AGN.js} +1 -1
  10. package/dist/cdn/{CO37Q2G7.js → 5UEEUPL5.js} +1 -1
  11. package/dist/cdn/{HFSCLHH3.js → 5VP4DXWE.js} +1 -1
  12. package/dist/cdn/{ZN7TFL7A.js → 5W3ANKBB.js} +1 -1
  13. package/dist/cdn/{ET27C34M.js → 5Z32YRHM.js} +1 -1
  14. package/dist/cdn/{5NB56NVE.js → 6BEDO5MX.js} +1 -1
  15. package/dist/cdn/{JCIUAWOV.js → 6EFUV7CH.js} +1 -1
  16. package/dist/cdn/{ZSOLZJPP.js → 6LPOLFT7.js} +1 -1
  17. package/dist/cdn/{HEH643UY.js → 6RXHEPPS.js} +1 -1
  18. package/dist/cdn/{5D2QCLOY.js → 73LVZIP7.js} +1 -1
  19. package/dist/cdn/{57PXC3TO.js → 7UXCJXCE.js} +1 -1
  20. package/dist/cdn/{JCBUATLL.js → ALDUB3A4.js} +1 -1
  21. package/dist/cdn/{I3SA63N4.js → BNQ63VOG.js} +1 -1
  22. package/dist/cdn/{BN7W4V6O.js → BVWFZPY7.js} +1 -1
  23. package/dist/cdn/C2MDLUTX.js +2 -0
  24. package/dist/cdn/{N7QXUPEE.js → CK7LURBK.js} +1 -1
  25. package/dist/cdn/{KETBIWNV.js → CTRHHRDP.js} +1 -1
  26. package/dist/cdn/{UCJQY6QB.js → D2QNPQWY.js} +1 -1
  27. package/dist/cdn/{R52W6IFP.js → D37HOE6T.js} +1 -1
  28. package/dist/cdn/{XOW3ZZ6I.js → DUEAJUQG.js} +1 -1
  29. package/dist/cdn/{M63QPB4V.js → DZUVI4S3.js} +1 -1
  30. package/dist/cdn/{O4ABB4PQ.js → E4L5GTBZ.js} +1 -1
  31. package/dist/cdn/{GJFGBIH7.js → E74QDAYN.js} +1 -1
  32. package/dist/cdn/{VUFOIXWZ.js → EH43P34B.js} +1 -1
  33. package/dist/cdn/{64IG3VBM.js → EL4G77RV.js} +1 -1
  34. package/dist/cdn/{5SJCOGIP.js → EUZCYCCK.js} +1 -1
  35. package/dist/cdn/{PMJSFZYX.js → EVFB6G4J.js} +1 -1
  36. package/dist/cdn/{AIYHCYB5.js → FJSRWM5L.js} +1 -1
  37. package/dist/cdn/FL74XITX.js +2 -0
  38. package/dist/cdn/{UGXAX5D3.js → GJJOB4RR.js} +1 -1
  39. package/dist/cdn/{AZFB2VFZ.js → GXXXAGCI.js} +1 -1
  40. package/dist/cdn/{A4WA7OOO.js → H5ZE4RIC.js} +1 -1
  41. package/dist/cdn/{YU5HCUEF.js → HAAFUV3J.js} +1 -1
  42. package/dist/cdn/{6QDXYJ2A.js → HNRZHAOD.js} +1 -1
  43. package/dist/cdn/{KI33523C.js → I3OLKEFJ.js} +1 -1
  44. package/dist/cdn/{SJMKG2Y2.js → IDEWFRKI.js} +1 -1
  45. package/dist/cdn/{DD3JC2L3.js → JE7L7M3J.js} +1 -1
  46. package/dist/cdn/{RWDE42UI.js → JHOXJY5O.js} +1 -1
  47. package/dist/cdn/{57LXGC2L.js → JIPE2UQ3.js} +1 -1
  48. package/dist/cdn/{5UAKLHDN.js → JN4HYWSX.js} +1 -1
  49. package/dist/cdn/{KVUHHQHL.js → JQFNYWZI.js} +1 -1
  50. package/dist/cdn/{PSNP4WYK.js → JQU7O6FD.js} +1 -1
  51. package/dist/cdn/{WCQKSAUN.js → JVMVZ2RC.js} +1 -1
  52. package/dist/cdn/{XKKGHOSR.js → KKI72ISR.js} +2 -2
  53. package/dist/cdn/{7VEBBW3O.js → KVR3XE7B.js} +1 -1
  54. package/dist/cdn/{TAAFNJJG.js → LGUC7DRT.js} +1 -1
  55. package/dist/cdn/{5CJSPIKU.js → LQ3CLDU5.js} +1 -1
  56. package/dist/cdn/{VCU5NJSP.js → LTBO6VJF.js} +1 -1
  57. package/dist/cdn/{PF7VCNOY.js → N5YBX6NM.js} +1 -1
  58. package/dist/cdn/{4FHS5SYC.js → N7RLYKQG.js} +1 -1
  59. package/dist/cdn/{FJX7UVKI.js → NLNE5H6M.js} +1 -1
  60. package/dist/cdn/{UOOIKGBP.js → O2OYKALV.js} +1 -1
  61. package/dist/cdn/{DOHELY4Q.js → OAWQFVGG.js} +1 -1
  62. package/dist/cdn/{NSQLXA5C.js → OJLSK25V.js} +1 -1
  63. package/dist/cdn/{SXSTBM77.js → P6ETLC5A.js} +1 -1
  64. package/dist/cdn/{TUBYR7DR.js → PNBTKFO6.js} +1 -1
  65. package/dist/cdn/{KJSSBTJF.js → QKGOQ7EC.js} +1 -1
  66. package/dist/cdn/{Y6GYY3TH.js → RDWJHF5P.js} +1 -1
  67. package/dist/cdn/{VKWQ2UOL.js → RIWLHWBH.js} +1 -1
  68. package/dist/cdn/{ZL6A7VRS.js → RTSKNY33.js} +1 -1
  69. package/dist/cdn/{S664RN6P.js → SETNDPAB.js} +1 -1
  70. package/dist/cdn/{YGHCNTQN.js → T5ZR5RSW.js} +1 -1
  71. package/dist/cdn/{ZE5JOQG7.js → TAXUQXTN.js} +1 -1
  72. package/dist/cdn/{JOEGOIK3.js → TP6FTOYI.js} +1 -1
  73. package/dist/cdn/{FT2RITIO.js → TPRPYUVX.js} +1 -1
  74. package/dist/cdn/{Z22WUH5B.js → U75PDOJF.js} +1 -1
  75. package/dist/cdn/UDTF5SYU.js +2 -0
  76. package/dist/cdn/{7NSN2YE4.js → UGKLBL7D.js} +1 -1
  77. package/dist/cdn/{I5FU5F72.js → UR6OMPID.js} +1 -1
  78. package/dist/cdn/{QMDTLWB6.js → USIESVTZ.js} +1 -1
  79. package/dist/cdn/{VS7Q2BDJ.js → V65IKENN.js} +1 -1
  80. package/dist/cdn/{7IAALB5U.js → VCH6XDEH.js} +1 -1
  81. package/dist/cdn/{6SETGLTS.js → VQFRDGSZ.js} +1 -1
  82. package/dist/cdn/{ETMW3Z3K.js → WDFQGUHD.js} +1 -1
  83. package/dist/cdn/{YUCIOMKU.js → XFEOA56B.js} +1 -1
  84. package/dist/cdn/{6C4EHCSR.js → XJWEK5VT.js} +1 -1
  85. package/dist/cdn/{TXGCOPR2.js → XUFPQNGT.js} +1 -1
  86. package/dist/cdn/{GRUGONVG.js → Y3FTYVXY.js} +1 -1
  87. package/dist/cdn/{KO7S5YIH.js → Y4TNT6PF.js} +1 -1
  88. package/dist/cdn/Y4YYE2LG.js +2 -0
  89. package/dist/cdn/{QHXQS2TJ.js → YQECYE4M.js} +1 -1
  90. package/dist/cdn/{NSQPTNSB.js → YT2QG2ST.js} +1 -1
  91. package/dist/cdn/{E3DW2M6B.js → ZVJIHRYK.js} +1 -1
  92. package/dist/cdn/{PX6N4BRK.js → ZZ3AVDZU.js} +1 -1
  93. package/dist/cdn/assets/create-feature/t9n/messages.ar.json +1 -1
  94. package/dist/cdn/assets/create-feature/t9n/messages.bg.json +1 -1
  95. package/dist/cdn/assets/create-feature/t9n/messages.bs.json +1 -1
  96. package/dist/cdn/assets/create-feature/t9n/messages.ca.json +1 -1
  97. package/dist/cdn/assets/create-feature/t9n/messages.cs.json +1 -1
  98. package/dist/cdn/assets/create-feature/t9n/messages.da.json +1 -1
  99. package/dist/cdn/assets/create-feature/t9n/messages.de.json +1 -1
  100. package/dist/cdn/assets/create-feature/t9n/messages.el.json +1 -1
  101. package/dist/cdn/assets/create-feature/t9n/messages.es.json +1 -1
  102. package/dist/cdn/assets/create-feature/t9n/messages.et.json +1 -1
  103. package/dist/cdn/assets/create-feature/t9n/messages.fi.json +1 -1
  104. package/dist/cdn/assets/create-feature/t9n/messages.fr.json +1 -1
  105. package/dist/cdn/assets/create-feature/t9n/messages.he.json +1 -1
  106. package/dist/cdn/assets/create-feature/t9n/messages.hr.json +1 -1
  107. package/dist/cdn/assets/create-feature/t9n/messages.hu.json +1 -1
  108. package/dist/cdn/assets/create-feature/t9n/messages.id.json +1 -1
  109. package/dist/cdn/assets/create-feature/t9n/messages.it.json +1 -1
  110. package/dist/cdn/assets/create-feature/t9n/messages.ja.json +1 -1
  111. package/dist/cdn/assets/create-feature/t9n/messages.ko.json +1 -1
  112. package/dist/cdn/assets/create-feature/t9n/messages.lt.json +1 -1
  113. package/dist/cdn/assets/create-feature/t9n/messages.lv.json +1 -1
  114. package/dist/cdn/assets/create-feature/t9n/messages.nl.json +1 -1
  115. package/dist/cdn/assets/create-feature/t9n/messages.no.json +1 -1
  116. package/dist/cdn/assets/create-feature/t9n/messages.pl.json +1 -1
  117. package/dist/cdn/assets/create-feature/t9n/messages.pt-BR.json +1 -1
  118. package/dist/cdn/assets/create-feature/t9n/messages.pt-PT.json +1 -1
  119. package/dist/cdn/assets/create-feature/t9n/messages.ro.json +1 -1
  120. package/dist/cdn/assets/create-feature/t9n/messages.ru.json +1 -1
  121. package/dist/cdn/assets/create-feature/t9n/messages.sk.json +1 -1
  122. package/dist/cdn/assets/create-feature/t9n/messages.sl.json +1 -1
  123. package/dist/cdn/assets/create-feature/t9n/messages.sr.json +1 -1
  124. package/dist/cdn/assets/create-feature/t9n/messages.sv.json +1 -1
  125. package/dist/cdn/assets/create-feature/t9n/messages.th.json +1 -1
  126. package/dist/cdn/assets/create-feature/t9n/messages.tr.json +1 -1
  127. package/dist/cdn/assets/create-feature/t9n/messages.uk.json +1 -1
  128. package/dist/cdn/assets/create-feature/t9n/messages.vi.json +1 -1
  129. package/dist/cdn/assets/create-feature/t9n/messages.zh-CN.json +1 -1
  130. package/dist/cdn/assets/create-feature/t9n/messages.zh-HK.json +1 -1
  131. package/dist/cdn/assets/create-feature/t9n/messages.zh-TW.json +1 -1
  132. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.ar.json +1 -1
  133. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.bg.json +1 -1
  134. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.bs.json +1 -1
  135. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.ca.json +1 -1
  136. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.cs.json +1 -1
  137. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.da.json +1 -1
  138. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.de.json +1 -1
  139. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.el.json +1 -1
  140. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.es.json +1 -1
  141. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.et.json +1 -1
  142. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.fi.json +1 -1
  143. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.fr.json +1 -1
  144. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.he.json +1 -1
  145. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.hr.json +1 -1
  146. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.hu.json +1 -1
  147. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.id.json +1 -1
  148. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.it.json +1 -1
  149. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.ja.json +1 -1
  150. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.ko.json +1 -1
  151. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.lt.json +1 -1
  152. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.lv.json +1 -1
  153. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.nl.json +1 -1
  154. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.no.json +1 -1
  155. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.pl.json +1 -1
  156. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.pt-BR.json +1 -1
  157. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.pt-PT.json +1 -1
  158. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.ro.json +1 -1
  159. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.ru.json +1 -1
  160. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.sk.json +1 -1
  161. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.sl.json +1 -1
  162. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.sr.json +1 -1
  163. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.sv.json +1 -1
  164. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.th.json +1 -1
  165. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.tr.json +1 -1
  166. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.uk.json +1 -1
  167. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.vi.json +1 -1
  168. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.zh-CN.json +1 -1
  169. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.zh-HK.json +1 -1
  170. package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.zh-TW.json +1 -1
  171. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.ar.json +1 -1
  172. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.bg.json +1 -1
  173. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.bs.json +1 -1
  174. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.ca.json +1 -1
  175. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.cs.json +1 -1
  176. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.da.json +1 -1
  177. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.de.json +1 -1
  178. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.el.json +1 -1
  179. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.es.json +1 -1
  180. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.et.json +1 -1
  181. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.fi.json +1 -1
  182. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.fr.json +1 -1
  183. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.he.json +1 -1
  184. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.hr.json +1 -1
  185. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.hu.json +1 -1
  186. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.id.json +1 -1
  187. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.it.json +1 -1
  188. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.ja.json +1 -1
  189. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.ko.json +1 -1
  190. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.lt.json +1 -1
  191. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.lv.json +1 -1
  192. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.nl.json +1 -1
  193. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.no.json +1 -1
  194. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.pl.json +1 -1
  195. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.pt-BR.json +1 -1
  196. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.pt-PT.json +1 -1
  197. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.ro.json +1 -1
  198. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.ru.json +1 -1
  199. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.sk.json +1 -1
  200. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.sl.json +1 -1
  201. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.sr.json +1 -1
  202. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.sv.json +1 -1
  203. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.th.json +1 -1
  204. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.tr.json +1 -1
  205. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.uk.json +1 -1
  206. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.vi.json +1 -1
  207. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.zh-CN.json +1 -1
  208. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.zh-HK.json +1 -1
  209. package/dist/cdn/assets/solutions-resources-shell/t9n/messages.zh-TW.json +1 -1
  210. package/dist/cdn/index.js +1 -1
  211. package/dist/chunks/solution-deploy-dialog.js +1 -1
  212. package/dist/components/consent-manager/customElement.js +3 -3
  213. package/dist/components/public-notification/customElement.js +25 -18
  214. package/dist/components/solution-deployed-card-panel/customElement.js +1 -1
  215. package/dist/components/solution-details-panel/customElement.js +88 -88
  216. package/dist/components/solution-snapshot-gallery/customElement.js +14 -14
  217. package/dist/components/solutions-filter-panel/customElement.js +31 -28
  218. package/dist/docs/api.json +1 -1
  219. package/dist/docs/docs.json +1 -1
  220. package/dist/docs/web-types.json +1 -1
  221. package/dist/solutions-components_commit.txt +5 -5
  222. package/package.json +5 -5
  223. package/dist/cdn/3O3GVMWO.js +0 -2
  224. package/dist/cdn/ULDNFSZC.js +0 -2
  225. package/dist/cdn/UYWF6PZK.js +0 -2
  226. package/dist/cdn/X5T425K7.js +0 -2
  227. package/dist/cdn/YRN6NQC6.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import b from"./YRN6NQC6.js";import"./6MZ227J7.js";import a from"./ZL6A7VRS.js";import"./PZ4L77M5.js";import"./DD3JC2L3.js";import"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import"./VU3OQQKP.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,a])=>{return a},a,b)
2
+ import b from"./4CMHNL7Z.js";import"./6MZ227J7.js";import a from"./RTSKNY33.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import"./VU3OQQKP.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,a])=>{return a},a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import f from"./EAV7DUA3.js";import e from"./S6EMQP4I.js";import c from"./P5ERFKR2.js";import b from"./GPP5RTWG.js";import{b as l}from"./AQKTTVWV.js";import"./GDPFKW75.js";import{F as i,G as n,H as r,J as o,K as d,h as s,i as a}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,,{t:p}])=>{var c=s`:host{display:block}:host .esri-legend__service{margin:0;padding:0}:host .hide{display:none}`,e={service:"esri-legend__service",groupLayer:"esri-legend__group-layer",groupContent:"esri-legend__group-content"},t=class extends r{constructor(){super(),this.layerCaption=i(),this.expanded=!0,this.isChild=!1,this.listenOn(window,"layerCaptionElementExpandUpdated",this.layerCaptionElementExpandUpdatedEmitted)}static{this.properties={expanded:16,legendvm:0,featureCount:5,activeLayerInfo:0,isChild:5}}static{this.styles=c}load(){new MutationObserver(()=>{this.requestUpdate()}).observe(this.el,{attributes:!0})}layerCaptionElementExpandUpdatedEmitted(){this.expanded=!!this.layerCaption.value?.expanded}render(){return a`<div style=${d({borderLeft:"1px solid var(--calcite-color-border-3)"})} class=${`${e.service} ${e.groupLayer}`}><instant-apps-interactive-legend-layer-element-caption class=${o(p(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${this.activeLayerInfo} .isChild=${this.isChild} ${n(this.layerCaption)}></instant-apps-interactive-legend-layer-element-caption><div class=${`${e.groupContent} ${this.expanded?"show":"hide"}`}><slot name=content></slot></div></div>`}};l("instant-apps-interactive-legend-group-legend-element",t);return t},b,c,e,f)
2
+ import f from"./EAV7DUA3.js";import e from"./S6EMQP4I.js";import c from"./P5ERFKR2.js";import b from"./GPP5RTWG.js";import{b as l}from"./3LEJ44U2.js";import"./GDPFKW75.js";import{F as i,G as n,H as r,J as o,K as d,h as s,i as a}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,,{t:p}])=>{var c=s`:host{display:block}:host .esri-legend__service{margin:0;padding:0}:host .hide{display:none}`,e={service:"esri-legend__service",groupLayer:"esri-legend__group-layer",groupContent:"esri-legend__group-content"},t=class extends r{constructor(){super(),this.layerCaption=i(),this.expanded=!0,this.isChild=!1,this.listenOn(window,"layerCaptionElementExpandUpdated",this.layerCaptionElementExpandUpdatedEmitted)}static{this.properties={expanded:16,legendvm:0,featureCount:5,activeLayerInfo:0,isChild:5}}static{this.styles=c}load(){new MutationObserver(()=>{this.requestUpdate()}).observe(this.el,{attributes:!0})}layerCaptionElementExpandUpdatedEmitted(){this.expanded=!!this.layerCaption.value?.expanded}render(){return a`<div style=${d({borderLeft:"1px solid var(--calcite-color-border-3)"})} class=${`${e.service} ${e.groupLayer}`}><instant-apps-interactive-legend-layer-element-caption class=${o(p(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${this.activeLayerInfo} .isChild=${this.isChild} ${n(this.layerCaption)}></instant-apps-interactive-legend-layer-element-caption><div class=${`${e.groupContent} ${this.expanded?"show":"hide"}`}><slot name=content></slot></div></div>`}};l("instant-apps-interactive-legend-group-legend-element",t);return t},b,c,e,f)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{b as p}from"./AQKTTVWV.js";import{H as a,h as i,i as n,u as r}from"./46DQNAMV.js";import"./OR4HXHSY.js";var h=i`@layer{:host{display:block}}`,e=class extends a{constructor(){super(...arguments),this.inTour=!1,this.instantAppsPopovers=new Map,this.beforeOpen=async()=>await Promise.resolve()}static{this.properties={inTour:7,currentId:3,instantAppsPopovers:0,beforeOpen:0}}static{this.styles=h}static{this.shadowRootOptions=r}async beginTour(){this.inTour=!0,this.handlePopoverProps({pagination:!0,disableAction:!0});let s=Array.from(this.instantAppsPopovers.keys());await this.open(s[0])}async close(s){let t=this.instantAppsPopovers.get(s)?.firstElementChild;t&&(t.open=!1)}async endTour(){await this.close(this.currentId),this.inTour=!1,this.handlePopoverProps({pagination:!1,disableAction:!1})}async open(s){await this.beforeOpen();let t=this.instantAppsPopovers.get(s)?.firstElementChild;t.open=!0}async next(){let s=Array.from(this.instantAppsPopovers.keys()),t=s.indexOf(this.currentId)+1,o=s[t];await this.close(this.currentId),await this.open(o)}async previous(){let s=Array.from(this.instantAppsPopovers.keys()),t=s.indexOf(this.currentId)-1,o=s[t];await this.close(this.currentId),await this.open(o)}async done(){await this.endTour()}load(){let s=this.el.querySelector("[slot='popovers']");(s?Array.from(s.children):[]).forEach((t,o)=>{let c=t.getAttribute("ref-id");t.parent=this,t.index=o,this.instantAppsPopovers.set(c,t)}),this.listen("calcitePopoverOpen",t=>{let o=t.target.getAttribute("ref-id")??"";this.currentId=o})}handlePopoverProps(s){Array.from(this.el.querySelector("[slot='popovers']")?.children??[]).forEach(t=>{t.disableAction=s.disableAction,t.pagination=s.pagination})}render(){return n`<slot name=popovers></slot>`}};p("instant-apps-popovers",e);export{e as InstantAppsPopovers};
2
+ import{b as p}from"./3LEJ44U2.js";import{H as a,h as i,i as n,u as r}from"./46DQNAMV.js";import"./OR4HXHSY.js";var h=i`@layer{:host{display:block}}`,e=class extends a{constructor(){super(...arguments),this.inTour=!1,this.instantAppsPopovers=new Map,this.beforeOpen=async()=>await Promise.resolve()}static{this.properties={inTour:7,currentId:3,instantAppsPopovers:0,beforeOpen:0}}static{this.styles=h}static{this.shadowRootOptions=r}async beginTour(){this.inTour=!0,this.handlePopoverProps({pagination:!0,disableAction:!0});let s=Array.from(this.instantAppsPopovers.keys());await this.open(s[0])}async close(s){let t=this.instantAppsPopovers.get(s)?.firstElementChild;t&&(t.open=!1)}async endTour(){await this.close(this.currentId),this.inTour=!1,this.handlePopoverProps({pagination:!1,disableAction:!1})}async open(s){await this.beforeOpen();let t=this.instantAppsPopovers.get(s)?.firstElementChild;t.open=!0}async next(){let s=Array.from(this.instantAppsPopovers.keys()),t=s.indexOf(this.currentId)+1,o=s[t];await this.close(this.currentId),await this.open(o)}async previous(){let s=Array.from(this.instantAppsPopovers.keys()),t=s.indexOf(this.currentId)-1,o=s[t];await this.close(this.currentId),await this.open(o)}async done(){await this.endTour()}load(){let s=this.el.querySelector("[slot='popovers']");(s?Array.from(s.children):[]).forEach((t,o)=>{let c=t.getAttribute("ref-id");t.parent=this,t.index=o,this.instantAppsPopovers.set(c,t)}),this.listen("calcitePopoverOpen",t=>{let o=t.target.getAttribute("ref-id")??"";this.currentId=o})}handlePopoverProps(s){Array.from(this.el.querySelector("[slot='popovers']")?.children??[]).forEach(t=>{t.disableAction=s.disableAction,t.pagination=s.pagination})}render(){return n`<slot name=popovers></slot>`}};p("instant-apps-popovers",e);export{e as InstantAppsPopovers};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import b from"./G6KHKVTN.js";import a from"./GPP5RTWG.js";import{a as $}from"./4T7P5RXF.js";import{a as L}from"./FT2RITIO.js";import{b as I}from"./AQKTTVWV.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{H as d,J as h,i as n,u}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,{e:i,f:f,h:C,j:k,m:c}])=>{var y="instant-apps-language-translator",O={lastItem:`${y}--last-item`},g=class extends d{constructor(){super(...arguments),this._messages=L({name:"instant-apps-language-translator",blocking:!0})}static{this.shadowRootOptions=u}render(){return k(this.el?.parentElement?.locales)?.length>0?this.renderUIData():this.renderNotice()}renderUIData(){if(!i?.uiData)return;let a=C();return n`<div>${a?.map((e,s)=>this.renderUIDataItem(e,s,a.length))}</div>`}renderUIDataItem(a,e,s){let r=this.el.parentElement,m=r.appSettings,b=m?.translatedLanguageLabels?.[i.currentLanguage],v=e===s-1?O.lastItem:"",D=m.content.find(t=>t.id===a);return $(`${a}-${e}`,n`<instant-apps-language-translator-item class=${h(v)} .fieldName=${a} .translatedLanguageLabels=${b} .setting=${D} .userLocaleInputOnChangeCallback=${async(t,l)=>{try{await r.userLocaleInputOnChangeCallback(t,l);let o=f.get("portalItemResource");c(o)}catch{}}} .translatedLocaleInputOnChangeCallback=${async(t,l,o,p)=>{try{await r.translatedLocaleInputOnChangeCallback(t,l,o,p),c(p)}catch{}}}></instant-apps-language-translator-item>`)}renderNotice(){let a=this._messages.noLanguage;return n`<calcite-notice open icon=exclamation-mark-triangle kind=warning><div slot=title>${a?.title}</div><div slot=message>${a?.message}</div></calcite-notice>`}};I("instant-apps-language-translator-content",g);return g},a,b)
2
+ import b from"./G6KHKVTN.js";import a from"./GPP5RTWG.js";import{a as $}from"./4T7P5RXF.js";import{a as L}from"./TPRPYUVX.js";import{b as I}from"./3LEJ44U2.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{H as d,J as h,i as n,u}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,{e:i,f:f,h:C,j:k,m:c}])=>{var y="instant-apps-language-translator",O={lastItem:`${y}--last-item`},g=class extends d{constructor(){super(...arguments),this._messages=L({name:"instant-apps-language-translator",blocking:!0})}static{this.shadowRootOptions=u}render(){return k(this.el?.parentElement?.locales)?.length>0?this.renderUIData():this.renderNotice()}renderUIData(){if(!i?.uiData)return;let a=C();return n`<div>${a?.map((e,s)=>this.renderUIDataItem(e,s,a.length))}</div>`}renderUIDataItem(a,e,s){let r=this.el.parentElement,m=r.appSettings,b=m?.translatedLanguageLabels?.[i.currentLanguage],v=e===s-1?O.lastItem:"",D=m.content.find(t=>t.id===a);return $(`${a}-${e}`,n`<instant-apps-language-translator-item class=${h(v)} .fieldName=${a} .translatedLanguageLabels=${b} .setting=${D} .userLocaleInputOnChangeCallback=${async(t,l)=>{try{await r.userLocaleInputOnChangeCallback(t,l);let o=f.get("portalItemResource");c(o)}catch{}}} .translatedLocaleInputOnChangeCallback=${async(t,l,o,p)=>{try{await r.translatedLocaleInputOnChangeCallback(t,l,o,p),c(p)}catch{}}}></instant-apps-language-translator-item>`)}renderNotice(){let a=this._messages.noLanguage;return n`<calcite-notice open icon=exclamation-mark-triangle kind=warning><div slot=title>${a?.title}</div><div slot=message>${a?.message}</div></calcite-notice>`}};I("instant-apps-language-translator-content",g);return g},a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{I as s}from"./46DQNAMV.js";var t=s({defaultAssetPath:"https://js.arcgis.com/5.0.0/instant-apps-components/",hydratedAttribute:"hydrated"}),{customElement:n,getAssetPath:i,setAssetPath:p}=t;t.t=void 0;t.o=void 0;t.c=void 0;t.r=void 0;export{t as a,n as b,i as c};
2
+ import{I as s}from"./46DQNAMV.js";var t=s({defaultAssetPath:"https://js.arcgis.com/5.0.4/instant-apps-components/",hydratedAttribute:"hydrated"}),{customElement:n,getAssetPath:i,setAssetPath:p}=t;t.t=void 0;t.o=void 0;t.c=void 0;t.r=void 0;export{t as a,n as b,i as c};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as S}from"./7NSN2YE4.js";import"./AQKTTVWV.js";import c from"./ZL6A7VRS.js";import"./PZ4L77M5.js";import"./DD3JC2L3.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as $}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as v}from"./VU3OQQKP.js";import{F as p,G as r,H as I,J as f,h as y,i as l,l as m,r as d,u as g}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([F,x,P,,{c:w,j:M},{C:u,o:L}])=>{function k(n){return n?.indexOf("http://")!==-1}function b(n){return k(n)?n.replace(/^http:\/\//,"https://"):n}function T(n,e,i){return i&&i.forEach(a=>{n.allLayers.forEach(t=>{t&&t.url===a.sourceUrl&&(t.url=b(a.proxyUrl),t.portalItem&&t.portalItem.when(()=>{t.portalItem.url=b(a.proxyUrl)}),e.request?.interceptors?.push({urls:a.sourceUrl,before:s=>{s.url&&s.url===a.sourceUrl&&(s.url=b(a.proxyUrl))}}))})}),n}var V=y`@layer{:host{display:block;--calcite-label-margin-bottom: 0;--calcite-block-padding: 0}.map-height{height:calc(100% - 53px)}.height-full{height:100%}.height-49-px{height:49px}.box-shadow{box-shadow:none!important}.visibility-hidden-1{visibility:hidden;height:1px}.hidden{visibility:hidden!important}.display-flex{display:flex}.display-none{display:none}.display-block{display:block}.absolute-right{position:absolute;right:0;left:unset}.esri-ui-inner-container.esri-ui-corner-container{direction:ltr}html[dir=rtl] .absolute-right{left:0;right:unset}.panel-header-override{--calcite-panel-header-content-space: 0px;--calcite-internal-panel-action-spacing: 0px !important}@media only screen and (max-width:1024px){.esri-zoom{display:none!important}}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,_=class extends I{constructor(){super(),this.defaultWebmapId="",this.defaultLayerId="",this.enableHome=!1,this.enableLegend=!1,this.enableLayerList=!0,this.enableFloorFilter=!1,this.enableFullscreen=!1,this.enableShare=!1,this.enableMapLayerPicker=!1,this.enableMapPicker=!1,this.enableSingleExpand=!1,this.enableSearch=!1,this.enableBasemap=!1,this.featureSelectionMode="multiple",this.hide=!1,this.zoomToolsSize="m",this.mapInfos=[],this.mapWidgetsIndex=0,this.mapWidgetsPosition="top-leading",this.mobileMapWidgetsPosition="top-right",this.mapWidgetsSize="m",this.stackTools=!1,this.mapToolsOrder=[],this.mobileToolsOrder=[],this.isMapLayout=!1,this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.selectedFeaturesIds=[],this.showOnlyUpdatableLayers=!1,this.isMobile=!1,this.enableSelectionTool=!1,this.visibilityIcon="eyeball",this._configLayerOrderDefined=!1,this._translations=$({name:"map-card",blocking:!0}),this._toolInfos=[],this._filterActive=!1,this._layerIds=[],this._enabledLayerIds=[],this._defaultWebmapHonored=!1,this._loadedId="",this._mapDiv=p(),this._mapPicker=p(),this._mapTools=p(),this._mobMapTools=p(),this._mapLayerPicker=p(),this._selectedWebMapId="",this._isValidWebMap=!0,this.mapChanged=d(),this.beforeMapChanged=d(),this.toggleFilter=d(),this.clearSelection=d(),this.editMultipleFeatures=d(),this.listenOn(window,"mapInfoChange",this.mapInfoChange),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"idsFound",this._idsFound),this.enableSingleExpand=!0,this.stackTools=!0,S(window)}static{this.properties={appLayout:1,appProxies:1,defaultWebmapId:1,defaultLayerId:1,enableHome:5,enableLegend:5,enableLayerList:5,enableFloorFilter:5,enableFullscreen:5,enableShare:5,enableMapLayerPicker:5,enableMapPicker:5,enableSingleExpand:5,enableSearch:5,enableBasemap:5,featureSelectionMode:1,basemapConfig:0,hide:5,zoomToolsSize:1,mapInfos:0,mapWidgetsIndex:9,mapWidgetsPosition:1,mobileMapWidgetsPosition:1,mapWidgetsSize:1,mapView:0,stackTools:5,theme:1,mapToolsOrder:0,mobileToolsOrder:0,isMapLayout:5,shareIncludeEmbed:5,shareIncludeSocial:5,selectedFeaturesIds:0,selectedLayer:0,zoomToScale:9,showOnlyUpdatableLayers:5,isMobile:5,mapInfo:0,enableSelectionTool:5,visibilityIcon:1,_configLayerOrderDefined:16,_translations:16,_searchConfiguration:16,_webMapInfo:16,_toolInfos:16,_filterActive:16,_mapDivHeight:16,_mapDivWidth:16,_layerIds:16}}static{this.styles=V}static{this.shadowRootOptions=g}willUpdate(e){e.has("appLayout")&&this.appLayoutWatchHandler(),e.has("mapView")&&this.mapViewWatchHandler(),e.has("mapInfo")&&this.mapInfoWatchHandler(),e.has("selectedFeaturesIds")&&this.selectedFeaturesIdsWatchHandler()}appLayoutWatchHandler(){this._updateShareUrl()}async mapInfoWatchHandler(){this._configLayerOrderDefined="configLayerOrder"in(this.mapInfo?.layerOptions||{}),this._enabledLayerIds=L(this.mapInfo?.layerOptions?.layers||[],this.mapInfo?.layerOptions?.configLayerOrder)}async mapViewWatchHandler(){this.mapView&&this._updateShareUrl()}async selectedFeaturesIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions()}async resetFilter(){this._filterActive=!1,this._updateShareUrl()}async updateFilterState(e){this._filterActive=e,this._updateShareUrl()}async updateLayer(){this._mapLayerPicker.value&&this._mapLayerPicker.value.updateLayer()}async mapInfoChange(e){this._selectedWebMapId=e.detail.id,await this._loadMap(e.detail)}noLayersFound(){this.selectedLayer=void 0,this.selectedFeaturesIds=[]}layerSelectionChange(){setTimeout(()=>{this._initToolInfos()},50)}_idsFound(e){this._layerIds=e.detail}async load(){this._initToolInfos(),this._mapSizeObserver||(this._mapSizeObserver=new ResizeObserver(()=>{this._mapDivWidth&&this._mapDiv.value&&(this._mapDivWidth=this._mapDiv.value.offsetWidth)}))}render(){let e=this.hide?"visibility-hidden-1":"",i=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",a="height-full",t=this.isMapLayout?"":"display-none",s=this._isValidWebMap?"":"hidden",h=this.isMobile?"":"hidden",o=this.enableMapPicker&&this.mapInfos.length>1,c=this.enableMapLayerPicker&&this._layerIds.length>1;return this._handleMapVisibility(),this._validateActiveActions(),l`<calcite-panel class="height-full width-full panel-header-override">${this._getMapLayerPicker()}${this._getHeaderActions()}<div slot=header-actions-end>${this.enableShare&&this.isMapLayout?this._getShare("share"):void 0}</div><calcite-progress class=${f(t)} value=0></calcite-progress><div class=${`${e} ${a}`}><div class="height-full" ${r(this._mapDiv)}></div></div>${l`<map-tools .basemapConfig=${this.basemapConfig} class=${`box-shadow ${i} ${s}`} .defaultLayerId=${this.defaultLayerId} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSingleExpand=${this.enableSingleExpand} .enableSelectionTool=${this.enableSelectionTool} .isMobile=${this.isMobile} .parentComponentHeight=${this._mapDivHeight} .parentComponentWidth=${this._mapDivWidth} .zoomToolsSize=${this.zoomToolsSize} layout=horizontal .mapView=${this.mapView} .mapWidgetsSize=${this.mapWidgetsSize} .position=${this.mapWidgetsPosition} .selectedFeaturesIds=${this.selectedFeaturesIds} .selectedLayer=${this.selectedLayer} .searchConfiguration=${this._searchConfiguration} .stackTools=${this.stackTools} .toolOrder=${this.mapToolsOrder} .visibilityIcon=${this.visibilityIcon} ${r(this._mapTools)}></map-tools><map-tools class=${`box-shadow ${i} ${h}`} .defaultLayerId=${this.defaultLayerId} .enabledLayerIds=${this._enabledLayerIds} .enableMapLayerPicker=${c} .enableMapPicker=${o} .isMobile=${this.isMobile} .zoomToolsSize=${this.zoomToolsSize} layout=vertical .mapInfos=${this.mapInfos} .mapView=${this.mapView} .mapWidgetsSize=${this.mapWidgetsSize} .parentComponentHeight=${this._mapDivHeight} .position=${this.mobileMapWidgetsPosition} .selectedLayer=${this.selectedLayer} .selectedWebMapId=${this._selectedWebMapId} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} .stackTools=${this.stackTools} .toolOrder=${this.mobileToolsOrder} ${r(this._mobMapTools)}></map-tools>`}</calcite-panel>`}updated(){this._mapDivHeight=this._mapDiv.value?.offsetHeight??0,document.onclick=e=>this._handleDocumentClick(e)}loaded(){this._mapDiv.value&&this._mapSizeObserver?.observe(this._mapDiv.value),this._updateShareUrl()}async _loadMap(e){let i=!this._defaultWebmapHonored&&this.defaultWebmapId,a=this.mapInfos?.filter(o=>o.id===this.defaultWebmapId),t=JSON.stringify(e)!==JSON.stringify(this._webMapInfo);this._webMapInfo=i&&a?a[0]:!e?.id&&this.mapInfos.length>0?this.mapInfos[0]:e;let s=this._webMapInfo.id,h=i&&e?.id===this.defaultWebmapId;if(this._loadedId!==s&&!i||h){let o=new P({portalItem:{id:s}});try{o&&await o.load(),this.appProxies&&o&&await T(o,F,this.appProxies),this.mapView=new x({container:this._mapDiv.value,map:o,resizeAlign:"center"}),this._loadedId=s,this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapView&&await this.mapView.when(()=>{this.mapView&&(this._mapDivWidth=this._mapDiv.value&&this._mapDiv.value.offsetWidth,this._mapTools.value&&this.mapView.ui.add(this._mapTools.value,{position:this.mapWidgetsPosition,index:this.mapWidgetsIndex}),this._mobMapTools.value&&this.mapView.ui.add(this._mobMapTools.value,{position:this.mobileMapWidgetsPosition,index:this.mapWidgetsIndex}),this._defaultWebmapHonored=h?!0:this._defaultWebmapHonored,this._isValidWebMap=!0,this.mapChanged.emit({id:s,mapView:this.mapView,isValid:!0}),this.isMobile||document.getElementsByClassName("esri-zoom")[0]?.classList.remove("display-none"))})}catch(c){console.error(c),this._loadedId=s,this._isValidWebMap=!1,this.mapChanged.emit({id:s,mapView:void 0,isValid:!1}),document.getElementsByClassName("esri-zoom")[0]?.classList.add("display-none");return}}else i?(this._defaultWebmapHonored=!0,this._mapPicker.value&&this._mapPicker.value.setMapByID(s)):t&&this.mapView&&(this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapChanged.emit({id:s,mapView:this.mapView,isValid:!0}));this._updateShareUrl()}_getMapLayerPicker(){let e=this.isMapLayout?"header-actions-start":"",i=this.mapInfos?.length>1?"":"display-none",a=this.isMapLayout?"height-0":"width-full",t="display-flex",s=this.isMapLayout?"":"display-none";return l`${!this.isMobile&&l`<div slot=${e??m}><map-picker class=${`${i} ${a}`} id=map-picker .isMapLayout=${this.isMapLayout} .mapInfos=${this.mapInfos} .selectedWebMapId=${this._selectedWebMapId} ${r(this._mapPicker)}></map-picker></div>`||""}<div slot=header-actions-start class=${`mapView-header display-flex ${s}`} id=solutions-map-layer-picker-container><div class=${`border-end ${t}`}>${this.mapView&&l`<map-layer-picker appearance=transparent .configLayerOrderDefined=${this._configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} display=inline-flex .enabledLayerIds=${this._enabledLayerIds} height=50 .isMobile=${this.isMobile} .mapView=${this.mapView} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} placeholder-icon=layers scale=l .selectedIds=${this.selectedLayer?[this.selectedLayer.id]:[]} show-single-layer-as-label show-tables show-tables-disabled type=dropdown ${r(this._mapLayerPicker)}></map-layer-picker>`||""}</div></div>`}_getHeaderActions(){return l`<div slot=header-content><calcite-action-bar class=${f("display-flex")} expand-disabled expanded id=${this._getId("bar")??m} layout=horizontal><calcite-action-group>${this.isMapLayout?this._getActions():void 0}</calcite-action-group></calcite-action-bar></div>`}_getShare(e){return l`<div class="share-action" id=${this._getId(e)??m}>${this.mapView&&l`<instant-apps-social-share class="instant-app-share" .embed=${this.shareIncludeEmbed} flip-rtl popover-button-icon-scale=s scale=m share-button-color=neutral share-button-type=action .socialMedia=${this.shareIncludeSocial} .view=${this.mapView} ${r(i=>{i&&(this._shareNode=i,this._updateShareUrl())})}></instant-apps-social-share>`||""}${this._getToolTip("bottom",`map-${e}`,this._translations?.share)}</div>`}_updateShareUrl(){let e=this._shareNode?.shareUrl;if(!e)return;let i=new URL(e);this._loadedId?i.searchParams.set("webmap",this._loadedId):i.searchParams.delete("webmap"),this.selectedLayer?.id?i.searchParams.set("layer",this.selectedLayer.id):i.searchParams.delete("layer"),this.selectedFeaturesIds?.length>0?i.searchParams.set("oid",this.selectedFeaturesIds.join(",")):i.searchParams.delete("oid"),this.appLayout&&i.searchParams.set("applayout",this.appLayout),this._shareNode&&(this._shareNode.autoUpdateShareUrl=!1,this._shareNode.shareUrl=i.href)}_initToolInfos(){let e=this.selectedFeaturesIds.length>0,i=this.selectedFeaturesIds.length<2||this.selectedFeaturesIds.length>u,a=this.featureSelectionMode==="multiple"&&this.selectedLayer?.capabilities?.operations.supportsUpdate,t=[];t.push({active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>{this._toggleFilter()},disabled:!1,toolTip:this._translations.filters}),t.push({active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>{this._zoom()},disabled:!e,toolTip:this._translations.zoom}),a&&t.push({active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>this.editMultipleFeatures.emit(this.selectedFeaturesIds),disabled:i,toolTip:this._translations.editMultiple}),t.push({active:!1,icon:"refresh",indicator:!1,label:this._translations.refresh,func:()=>this.selectedLayer?.refresh(),disabled:!1,toolTip:this._translations.refresh}),t.push({active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>this.clearSelection.emit(),disabled:!e,toolTip:this._translations.clearSelection}),this._toolInfos=[...t]}_validateActiveActions(){let e=["filter"];this._toolInfos?.forEach(i=>{i&&e.indexOf(i.icon)>-1&&i.icon==="filter"&&(i.indicator=this._filterActive)})}_handleMapVisibility(){if(this._mapDiv.value){let e=this._mapDiv.value.getElementsByClassName("esri-view-surface")[0],i=this._mapDiv.value.getElementsByClassName("esri-attribution")[0];this._isValidWebMap?(e?.classList.remove("hidden"),i?.classList.remove("hidden")):(e?.classList.add("hidden"),i?.classList.add("hidden"))}}_validateEnabledActions(){let e=this.selectedFeaturesIds.length>0,i=this.selectedFeaturesIds.length<2||this.selectedFeaturesIds.length>u,a=["zoom-to-object","pencil","erase"];this._toolInfos?.forEach(t=>{t&&a.indexOf(t.icon)>-1&&(t.disabled=t.icon==="pencil"?i:!e,t.toolTip=t.icon==="pencil"?this.selectedFeaturesIds.length>u?this._translations.featureEditLimitNotice:this._translations.editMultiple:t.toolTip)})}_handleDocumentClick(e){e.target.tagName!=="MAP-PICKER"&&this._mapPicker.value&&this._mapPicker.value.close()}async _zoom(){if(this.selectedLayer&&this.mapView){let e=await w(this.mapView,this.selectedLayer.id);e&&await M(this.selectedFeaturesIds,e,this.mapView,!0,void 0,this.zoomToScale)}}async _toggleFilter(){this.toggleFilter.emit()}_getActions(){return this._toolInfos?.reduce((e,i)=>(i&&e.push(this._getAction(i.active,i.icon,i.indicator,i.label,i.func,i.disabled,i.loading,i.toolTip)),e),[])}_getToolTip(e,i,a){return l`<calcite-tooltip .placement=${e} .referenceElement=${i}><span>${a}</span></calcite-tooltip>`}_getAction(e,i,a,t,s,h,o,c){let W=this.selectedLayer===void 0?!0:h;return l`<calcite-action .active=${e} appearance=solid .disabled=${W} .icon=${i} .id=${`map-${i}`} .indicator=${a} .label=${t} .loading=${o} @click=${s} .text=${t} text-enabled></calcite-action>${this._getToolTip("auto",`map-${i}`,c)}`}_getId(e){return`solutions-action-${e}`}};v("map-card",_);return _},"config","views/MapView","WebMap",a,b,c)
2
+ import{a as S}from"./UGKLBL7D.js";import"./3LEJ44U2.js";import c from"./RTSKNY33.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as $}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as v}from"./VU3OQQKP.js";import{F as p,G as r,H as I,J as f,h as y,i as l,l as m,r as d,u as g}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([F,x,P,,{c:w,j:M},{C:u,o:L}])=>{function k(n){return n?.indexOf("http://")!==-1}function b(n){return k(n)?n.replace(/^http:\/\//,"https://"):n}function T(n,e,i){return i&&i.forEach(a=>{n.allLayers.forEach(t=>{t&&t.url===a.sourceUrl&&(t.url=b(a.proxyUrl),t.portalItem&&t.portalItem.when(()=>{t.portalItem.url=b(a.proxyUrl)}),e.request?.interceptors?.push({urls:a.sourceUrl,before:s=>{s.url&&s.url===a.sourceUrl&&(s.url=b(a.proxyUrl))}}))})}),n}var V=y`@layer{:host{display:block;--calcite-label-margin-bottom: 0;--calcite-block-padding: 0}.map-height{height:calc(100% - 53px)}.height-full{height:100%}.height-49-px{height:49px}.box-shadow{box-shadow:none!important}.visibility-hidden-1{visibility:hidden;height:1px}.hidden{visibility:hidden!important}.display-flex{display:flex}.display-none{display:none}.display-block{display:block}.absolute-right{position:absolute;right:0;left:unset}.esri-ui-inner-container.esri-ui-corner-container{direction:ltr}html[dir=rtl] .absolute-right{left:0;right:unset}.panel-header-override{--calcite-panel-header-content-space: 0px;--calcite-internal-panel-action-spacing: 0px !important}@media only screen and (max-width:1024px){.esri-zoom{display:none!important}}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,_=class extends I{constructor(){super(),this.defaultWebmapId="",this.defaultLayerId="",this.enableHome=!1,this.enableLegend=!1,this.enableLayerList=!0,this.enableFloorFilter=!1,this.enableFullscreen=!1,this.enableShare=!1,this.enableMapLayerPicker=!1,this.enableMapPicker=!1,this.enableSingleExpand=!1,this.enableSearch=!1,this.enableBasemap=!1,this.featureSelectionMode="multiple",this.hide=!1,this.zoomToolsSize="m",this.mapInfos=[],this.mapWidgetsIndex=0,this.mapWidgetsPosition="top-leading",this.mobileMapWidgetsPosition="top-right",this.mapWidgetsSize="m",this.stackTools=!1,this.mapToolsOrder=[],this.mobileToolsOrder=[],this.isMapLayout=!1,this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.selectedFeaturesIds=[],this.showOnlyUpdatableLayers=!1,this.isMobile=!1,this.enableSelectionTool=!1,this.visibilityIcon="eyeball",this._configLayerOrderDefined=!1,this._translations=$({name:"map-card",blocking:!0}),this._toolInfos=[],this._filterActive=!1,this._layerIds=[],this._enabledLayerIds=[],this._defaultWebmapHonored=!1,this._loadedId="",this._mapDiv=p(),this._mapPicker=p(),this._mapTools=p(),this._mobMapTools=p(),this._mapLayerPicker=p(),this._selectedWebMapId="",this._isValidWebMap=!0,this.mapChanged=d(),this.beforeMapChanged=d(),this.toggleFilter=d(),this.clearSelection=d(),this.editMultipleFeatures=d(),this.listenOn(window,"mapInfoChange",this.mapInfoChange),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"idsFound",this._idsFound),this.enableSingleExpand=!0,this.stackTools=!0,S(window)}static{this.properties={appLayout:1,appProxies:1,defaultWebmapId:1,defaultLayerId:1,enableHome:5,enableLegend:5,enableLayerList:5,enableFloorFilter:5,enableFullscreen:5,enableShare:5,enableMapLayerPicker:5,enableMapPicker:5,enableSingleExpand:5,enableSearch:5,enableBasemap:5,featureSelectionMode:1,basemapConfig:0,hide:5,zoomToolsSize:1,mapInfos:0,mapWidgetsIndex:9,mapWidgetsPosition:1,mobileMapWidgetsPosition:1,mapWidgetsSize:1,mapView:0,stackTools:5,theme:1,mapToolsOrder:0,mobileToolsOrder:0,isMapLayout:5,shareIncludeEmbed:5,shareIncludeSocial:5,selectedFeaturesIds:0,selectedLayer:0,zoomToScale:9,showOnlyUpdatableLayers:5,isMobile:5,mapInfo:0,enableSelectionTool:5,visibilityIcon:1,_configLayerOrderDefined:16,_translations:16,_searchConfiguration:16,_webMapInfo:16,_toolInfos:16,_filterActive:16,_mapDivHeight:16,_mapDivWidth:16,_layerIds:16}}static{this.styles=V}static{this.shadowRootOptions=g}willUpdate(e){e.has("appLayout")&&this.appLayoutWatchHandler(),e.has("mapView")&&this.mapViewWatchHandler(),e.has("mapInfo")&&this.mapInfoWatchHandler(),e.has("selectedFeaturesIds")&&this.selectedFeaturesIdsWatchHandler()}appLayoutWatchHandler(){this._updateShareUrl()}async mapInfoWatchHandler(){this._configLayerOrderDefined="configLayerOrder"in(this.mapInfo?.layerOptions||{}),this._enabledLayerIds=L(this.mapInfo?.layerOptions?.layers||[],this.mapInfo?.layerOptions?.configLayerOrder)}async mapViewWatchHandler(){this.mapView&&this._updateShareUrl()}async selectedFeaturesIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions()}async resetFilter(){this._filterActive=!1,this._updateShareUrl()}async updateFilterState(e){this._filterActive=e,this._updateShareUrl()}async updateLayer(){this._mapLayerPicker.value&&this._mapLayerPicker.value.updateLayer()}async mapInfoChange(e){this._selectedWebMapId=e.detail.id,await this._loadMap(e.detail)}noLayersFound(){this.selectedLayer=void 0,this.selectedFeaturesIds=[]}layerSelectionChange(){setTimeout(()=>{this._initToolInfos()},50)}_idsFound(e){this._layerIds=e.detail}async load(){this._initToolInfos(),this._mapSizeObserver||(this._mapSizeObserver=new ResizeObserver(()=>{this._mapDivWidth&&this._mapDiv.value&&(this._mapDivWidth=this._mapDiv.value.offsetWidth)}))}render(){let e=this.hide?"visibility-hidden-1":"",i=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",a="height-full",t=this.isMapLayout?"":"display-none",s=this._isValidWebMap?"":"hidden",h=this.isMobile?"":"hidden",o=this.enableMapPicker&&this.mapInfos.length>1,c=this.enableMapLayerPicker&&this._layerIds.length>1;return this._handleMapVisibility(),this._validateActiveActions(),l`<calcite-panel class="height-full width-full panel-header-override">${this._getMapLayerPicker()}${this._getHeaderActions()}<div slot=header-actions-end>${this.enableShare&&this.isMapLayout?this._getShare("share"):void 0}</div><calcite-progress class=${f(t)} value=0></calcite-progress><div class=${`${e} ${a}`}><div class="height-full" ${r(this._mapDiv)}></div></div>${l`<map-tools .basemapConfig=${this.basemapConfig} class=${`box-shadow ${i} ${s}`} .defaultLayerId=${this.defaultLayerId} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSingleExpand=${this.enableSingleExpand} .enableSelectionTool=${this.enableSelectionTool} .isMobile=${this.isMobile} .parentComponentHeight=${this._mapDivHeight} .parentComponentWidth=${this._mapDivWidth} .zoomToolsSize=${this.zoomToolsSize} layout=horizontal .mapView=${this.mapView} .mapWidgetsSize=${this.mapWidgetsSize} .position=${this.mapWidgetsPosition} .selectedFeaturesIds=${this.selectedFeaturesIds} .selectedLayer=${this.selectedLayer} .searchConfiguration=${this._searchConfiguration} .stackTools=${this.stackTools} .toolOrder=${this.mapToolsOrder} .visibilityIcon=${this.visibilityIcon} ${r(this._mapTools)}></map-tools><map-tools class=${`box-shadow ${i} ${h}`} .defaultLayerId=${this.defaultLayerId} .enabledLayerIds=${this._enabledLayerIds} .enableMapLayerPicker=${c} .enableMapPicker=${o} .isMobile=${this.isMobile} .zoomToolsSize=${this.zoomToolsSize} layout=vertical .mapInfos=${this.mapInfos} .mapView=${this.mapView} .mapWidgetsSize=${this.mapWidgetsSize} .parentComponentHeight=${this._mapDivHeight} .position=${this.mobileMapWidgetsPosition} .selectedLayer=${this.selectedLayer} .selectedWebMapId=${this._selectedWebMapId} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} .stackTools=${this.stackTools} .toolOrder=${this.mobileToolsOrder} ${r(this._mobMapTools)}></map-tools>`}</calcite-panel>`}updated(){this._mapDivHeight=this._mapDiv.value?.offsetHeight??0,document.onclick=e=>this._handleDocumentClick(e)}loaded(){this._mapDiv.value&&this._mapSizeObserver?.observe(this._mapDiv.value),this._updateShareUrl()}async _loadMap(e){let i=!this._defaultWebmapHonored&&this.defaultWebmapId,a=this.mapInfos?.filter(o=>o.id===this.defaultWebmapId),t=JSON.stringify(e)!==JSON.stringify(this._webMapInfo);this._webMapInfo=i&&a?a[0]:!e?.id&&this.mapInfos.length>0?this.mapInfos[0]:e;let s=this._webMapInfo.id,h=i&&e?.id===this.defaultWebmapId;if(this._loadedId!==s&&!i||h){let o=new P({portalItem:{id:s}});try{o&&await o.load(),this.appProxies&&o&&await T(o,F,this.appProxies),this.mapView=new x({container:this._mapDiv.value,map:o,resizeAlign:"center"}),this._loadedId=s,this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapView&&await this.mapView.when(()=>{this.mapView&&(this._mapDivWidth=this._mapDiv.value&&this._mapDiv.value.offsetWidth,this._mapTools.value&&this.mapView.ui.add(this._mapTools.value,{position:this.mapWidgetsPosition,index:this.mapWidgetsIndex}),this._mobMapTools.value&&this.mapView.ui.add(this._mobMapTools.value,{position:this.mobileMapWidgetsPosition,index:this.mapWidgetsIndex}),this._defaultWebmapHonored=h?!0:this._defaultWebmapHonored,this._isValidWebMap=!0,this.mapChanged.emit({id:s,mapView:this.mapView,isValid:!0}),this.isMobile||document.getElementsByClassName("esri-zoom")[0]?.classList.remove("display-none"))})}catch(c){console.error(c),this._loadedId=s,this._isValidWebMap=!1,this.mapChanged.emit({id:s,mapView:void 0,isValid:!1}),document.getElementsByClassName("esri-zoom")[0]?.classList.add("display-none");return}}else i?(this._defaultWebmapHonored=!0,this._mapPicker.value&&this._mapPicker.value.setMapByID(s)):t&&this.mapView&&(this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapChanged.emit({id:s,mapView:this.mapView,isValid:!0}));this._updateShareUrl()}_getMapLayerPicker(){let e=this.isMapLayout?"header-actions-start":"",i=this.mapInfos?.length>1?"":"display-none",a=this.isMapLayout?"height-0":"width-full",t="display-flex",s=this.isMapLayout?"":"display-none";return l`${!this.isMobile&&l`<div slot=${e??m}><map-picker class=${`${i} ${a}`} id=map-picker .isMapLayout=${this.isMapLayout} .mapInfos=${this.mapInfos} .selectedWebMapId=${this._selectedWebMapId} ${r(this._mapPicker)}></map-picker></div>`||""}<div slot=header-actions-start class=${`mapView-header display-flex ${s}`} id=solutions-map-layer-picker-container><div class=${`border-end ${t}`}>${this.mapView&&l`<map-layer-picker appearance=transparent .configLayerOrderDefined=${this._configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} display=inline-flex .enabledLayerIds=${this._enabledLayerIds} height=50 .isMobile=${this.isMobile} .mapView=${this.mapView} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} placeholder-icon=layers scale=l .selectedIds=${this.selectedLayer?[this.selectedLayer.id]:[]} show-single-layer-as-label show-tables show-tables-disabled type=dropdown ${r(this._mapLayerPicker)}></map-layer-picker>`||""}</div></div>`}_getHeaderActions(){return l`<div slot=header-content><calcite-action-bar class=${f("display-flex")} expand-disabled expanded id=${this._getId("bar")??m} layout=horizontal><calcite-action-group>${this.isMapLayout?this._getActions():void 0}</calcite-action-group></calcite-action-bar></div>`}_getShare(e){return l`<div class="share-action" id=${this._getId(e)??m}>${this.mapView&&l`<instant-apps-social-share class="instant-app-share" .embed=${this.shareIncludeEmbed} flip-rtl popover-button-icon-scale=s scale=m share-button-color=neutral share-button-type=action .socialMedia=${this.shareIncludeSocial} .view=${this.mapView} ${r(i=>{i&&(this._shareNode=i,this._updateShareUrl())})}></instant-apps-social-share>`||""}${this._getToolTip("bottom",`map-${e}`,this._translations?.share)}</div>`}_updateShareUrl(){let e=this._shareNode?.shareUrl;if(!e)return;let i=new URL(e);this._loadedId?i.searchParams.set("webmap",this._loadedId):i.searchParams.delete("webmap"),this.selectedLayer?.id?i.searchParams.set("layer",this.selectedLayer.id):i.searchParams.delete("layer"),this.selectedFeaturesIds?.length>0?i.searchParams.set("oid",this.selectedFeaturesIds.join(",")):i.searchParams.delete("oid"),this.appLayout&&i.searchParams.set("applayout",this.appLayout),this._shareNode&&(this._shareNode.autoUpdateShareUrl=!1,this._shareNode.shareUrl=i.href)}_initToolInfos(){let e=this.selectedFeaturesIds.length>0,i=this.selectedFeaturesIds.length<2||this.selectedFeaturesIds.length>u,a=this.featureSelectionMode==="multiple"&&this.selectedLayer?.capabilities?.operations.supportsUpdate,t=[];t.push({active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>{this._toggleFilter()},disabled:!1,toolTip:this._translations.filters}),t.push({active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>{this._zoom()},disabled:!e,toolTip:this._translations.zoom}),a&&t.push({active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>this.editMultipleFeatures.emit(this.selectedFeaturesIds),disabled:i,toolTip:this._translations.editMultiple}),t.push({active:!1,icon:"refresh",indicator:!1,label:this._translations.refresh,func:()=>this.selectedLayer?.refresh(),disabled:!1,toolTip:this._translations.refresh}),t.push({active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>this.clearSelection.emit(),disabled:!e,toolTip:this._translations.clearSelection}),this._toolInfos=[...t]}_validateActiveActions(){let e=["filter"];this._toolInfos?.forEach(i=>{i&&e.indexOf(i.icon)>-1&&i.icon==="filter"&&(i.indicator=this._filterActive)})}_handleMapVisibility(){if(this._mapDiv.value){let e=this._mapDiv.value.getElementsByClassName("esri-view-surface")[0],i=this._mapDiv.value.getElementsByClassName("esri-attribution")[0];this._isValidWebMap?(e?.classList.remove("hidden"),i?.classList.remove("hidden")):(e?.classList.add("hidden"),i?.classList.add("hidden"))}}_validateEnabledActions(){let e=this.selectedFeaturesIds.length>0,i=this.selectedFeaturesIds.length<2||this.selectedFeaturesIds.length>u,a=["zoom-to-object","pencil","erase"];this._toolInfos?.forEach(t=>{t&&a.indexOf(t.icon)>-1&&(t.disabled=t.icon==="pencil"?i:!e,t.toolTip=t.icon==="pencil"?this.selectedFeaturesIds.length>u?this._translations.featureEditLimitNotice:this._translations.editMultiple:t.toolTip)})}_handleDocumentClick(e){e.target.tagName!=="MAP-PICKER"&&this._mapPicker.value&&this._mapPicker.value.close()}async _zoom(){if(this.selectedLayer&&this.mapView){let e=await w(this.mapView,this.selectedLayer.id);e&&await M(this.selectedFeaturesIds,e,this.mapView,!0,void 0,this.zoomToScale)}}async _toggleFilter(){this.toggleFilter.emit()}_getActions(){return this._toolInfos?.reduce((e,i)=>(i&&e.push(this._getAction(i.active,i.icon,i.indicator,i.label,i.func,i.disabled,i.loading,i.toolTip)),e),[])}_getToolTip(e,i,a){return l`<calcite-tooltip .placement=${e} .referenceElement=${i}><span>${a}</span></calcite-tooltip>`}_getAction(e,i,a,t,s,h,o,c){let W=this.selectedLayer===void 0?!0:h;return l`<calcite-action .active=${e} appearance=solid .disabled=${W} .icon=${i} .id=${`map-${i}`} .indicator=${a} .label=${t} .loading=${o} @click=${s} .text=${t} text-enabled></calcite-action>${this._getToolTip("auto",`map-${i}`,c)}`}_getId(e){return`solutions-action-${e}`}};v("map-card",_);return _},"config","views/MapView","WebMap",a,b,c)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
+ import{a as F}from"./6MZ227J7.js";import a from"./RTSKNY33.js";import{b as g}from"./PZ4L77M5.js";import{a as I}from"./LFIJXE3U.js";import{b as A}from"./VU3OQQKP.js";import{H as S,J as b,h as N,i as c,r as u}from"./46DQNAMV.js";export default $arcgis.t(([{D:y,E:R,K:T,a:C,b:v,t:_}])=>{var f=N`.width-full{width:100%}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1);--calcite-panel-footer-space: var(--calcite-spacing-sm)}.border-color{--calcite-block-border-color: transparent}calcite-block{margin:0;--calcite-block-content-space: 0}.tree-padding{padding:0 .2rem}.display-none{display:none}`,O={PUBLICSAFETY:["EMERGENCYMANAGEMENT","FIRESERVICE","LAWENFORCEMENT"],STATEANDLOCALGOVERNMENT:["AGRICULTURE","AIRPORT","ASSESSMENTANDTAXATION","ELECTIONS","EMERGENCYMANAGEMENT","FIRESERVICE","FISHANDWILDLIFE","HEALTHANDHUMANSERVICES","LAWENFORCEMENT","NATURALRESOURCES","PARKS","PLANNINGANDDEVELOPMENT","PUBLICWORKS","TRANSPORTATION"],UTILITIES:["DISTRICTENERGY","ELECTRIC","GAS","SEWER","STORMWATER","WATER"]},$=Object.keys(y).reduce((p,t)=>{let e=t;return p[e]=O[e]??[],p},{}),E=class extends S{constructor(){super(),this.hideIndustryFilter=!1,this.isAIDialogOpen=!1,this.showReset=!1,this._activeFilterSettings={categories:[]},this._isMobile=!1,this._translations=I({name:"solutions-filter-panel",blocking:!0}),this._userFirstName="",this._configContextConsumer=g({context:v,subscribe:!0,callback:t=>{t?.userSession&&!this._userFirstName&&this._loadUserFirstName()}}),this._isMobileContextConsumer=g({context:C,subscribe:!0,callback:t=>this._isMobile=t}),this.applyFilter=u(),this.toggleFilter=u(),this.updateUrlParams=u(),this._handleFilterRemoved=t=>{let e=t.detail;Array.isArray(e)&&(this._activeFilterSettings={...this._activeFilterSettings,categories:[...e]})},this._industryMatchName=t=>{let e=Object.keys(this._translations.industries).find(o=>o.toUpperCase()===t.replaceAll(" ","").toUpperCase());return e&&e in this._translations.industries?this._translations.industries[e]:t},this._domainMatchName=t=>{let e=Object.keys(this._translations.industriesDomain).find(o=>o.toUpperCase()===t.replaceAll(" ","").toUpperCase());return e&&e in this._translations.industriesDomain?this._translations.industriesDomain[e]:t},this.listenOn(window,"filterRemoved",this._handleFilterRemoved),this.listenOn(window,"closeAssistant",()=>{this.isAIDialogOpen=!1}),this.listenOn(window,"openAssistant",()=>{this.isAIDialogOpen=!0}),this.listenOn(window,"tabChanged",t=>{t.detail==="all-solutions"?this.updateUrlParams.emit(this._activeFilterSettings):this.updateUrlParams.emit(null)})}static{this.properties={hideIndustryFilter:5,isAIDialogOpen:5,showReset:5,_activeFilterSettings:16,_isMobile:16,_translations:16,_userFirstName:16}}static{this.styles=f}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}changeIndustryFilter(t,e,o,h){if(t!==""||e!==""){let n=[];if(e!==""){let i=y[t],a=this._industryMatchName(i),s=R[e],l=this._domainMatchName(s);n=[{displayValue:a,type:"industry",value:t,industry:t,domain:""},{displayValue:l,type:"domain",value:e,industry:t,domain:e}]}else n=[{displayValue:o,type:e!==""?"domain":"industry",value:e!==""?e:t,industry:t,domain:e}];this._activeFilterSettings={...this._activeFilterSettings,categories:[...n]},h&&this.applyFilter.emit(n)}else{let n={displayValue:o,type:"industry",value:t,industry:t,domain:e};this._activeFilterSettings={...this._activeFilterSettings,categories:[n]},h&&this.applyFilter.emit(n)}}clearFilters(){this.changeIndustryFilter("","",""),this.applyFilter.emit(null)}async load(){await this._loadUserFirstName(),this._isMobileContextConsumer.value&&(this._isMobile=this._isMobileContextConsumer.value)}render(){return c`<calcite-panel description heading>${this.showReset&&c`<calcite-action appearance=solid icon=reset @click=${()=>{this.clearFilters()}} slot=header-actions-end .text=${this._translations.resetFilters} text-enabled></calcite-action>`||""}<calcite-block-group .label=${this._translations.filters} scale=l>${!this.hideIndustryFilter&&this.renderIndustryBlock()||""}</calcite-block-group><calcite-button id=solutions-assistant-button icon-start=speech-bubbles label="Solutions Assistant" @click=${()=>{this._telemetry?.logEvent({category:T.ASSISTANT,action:"Open"}),this.isAIDialogOpen=!0}} round scale=l slot=footer-start></calcite-button><calcite-tooltip reference-element=solutions-assistant-button placement=right slot=footer-start offset-distance=10 open><span>${this._translations.assistant.welcomeTip}</span></calcite-tooltip><arcgis-solutions-assistant .open=${this.isAIDialogOpen} .userFirstName=${this._userFirstName}></arcgis-solutions-assistant></calcite-panel>`}renderIndustryBlock(){let t=(i,a)=>!this._activeFilterSettings||!this._activeFilterSettings.categories?!1:this._activeFilterSettings.categories.some(s=>s.industry===i&&(s.domain??"")===a),e=i=>!this._activeFilterSettings||!this._activeFilterSettings.categories?!1:this._activeFilterSettings.categories.some(a=>a.industry===i&&(a.domain??"")===""),o=(i,a)=>a.length>0&&(e(i)||this._activeFilterSettings.categories?.some(s=>s.industry===i&&!!s.domain&&a.includes(s.domain))===!0),h=(i,a)=>F(a,s=>s,s=>{let l=Object.keys(this._translations.industriesDomain).find(r=>r.toUpperCase()===s.toUpperCase()),d=l&&l in this._translations.industriesDomain?this._translations.industriesDomain[l]:s,m=t(i,s);return c`<calcite-tree-item .label=${d} @click=${r=>{r.detail!==0&&this.changeIndustryFilter(i,s,d,!0)}} @keydown=${r=>{_(r,()=>{this.changeIndustryFilter(i,s,d,!0)})}} .selected=${m||void 0}>${d}</calcite-tree-item>`}),n=F(Object.entries($),([i,a])=>i,([i,a])=>{let s=this._industryMatchName(i),l=a,d=e(i),m=o(i,l);return c`<calcite-tree-item .label=${s} @click=${r=>{r.detail!==0&&this.changeIndustryFilter(i,"",s,!0)}} @keydown=${r=>{_(r,()=>{this.changeIndustryFilter(i,"",s,!0)})}} .selected=${d||void 0} .expanded=${m?!0:void 0}>${s}${l.length>0&&c`<calcite-tree slot=children selection-mode=multiple>${h(i,l)}</calcite-tree>`||""}</calcite-tree-item>`});return c`<calcite-block description expanded class="border-color" .heading=${this._translations.industriesHeader} .label=${this._translations.industriesHeader}><calcite-action class=${b(this._isMobile?"":"display-none")} icon=x @click=${this._toggleFilter} slot=content-end text></calcite-action><calcite-tree selection-mode=single-persist class="tree-padding">${n}</calcite-tree></calcite-block>`}_toggleFilter(){this.toggleFilter.emit()}async _loadUserFirstName(){try{let t=await this._configContextConsumer.value?.userSession?.getUser();if(t?.fullName){let e=t.fullName.split(" ")[0];this._userFirstName=e}}catch{}}};A("solutions-filter-panel",E);return E},a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as M}from"./7NSN2YE4.js";import"./AQKTTVWV.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as L}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as I}from"./VU3OQQKP.js";import{F as h,G as r,H as $,J as d,K as v,h as g,i as l,l as w,r as _,u as y}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,{d:C}])=>{var F=g`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-foreground-1)}.padding-1-2{padding:.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.z-index-2{z-index:2!important}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-top{border-top:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.position-absolute{position:absolute}.position-sticky{position:sticky}.height-50{height:50%}.top-51{top:51px}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-51{height:calc(100% - 51px)}.display-none{display:none!important}.adjusted-height-50_25{height:calc(50% + 25px)}.display-grid{display:grid}.padding-inline-start-75{padding-inline-start:.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button,.esri-floor-filter__level-button,.esri-floor-filter__browse-button{width:40px!important;height:40px!important}.position-absolute-0{position:absolute;inset:0}.visibility-hidden{visibility:hidden;height:0px}.border-width-0{border-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;margin:100px 0;z-index:1}.left-0{left:0}.right-0{right:0}.floating-container .floating-button{box-shadow:0 10px 25px #5c5d5e99;-webkit-transform:translatey(5px);transform:translatey(5px);-webkit-transition:all .3s;transition:all .3s}.z-index-0{z-index:0!important}.z-index-1{z-index:1!important}.filter-content-space{--calcite-dialog-content-space: 0px}.background-dark{background:var(--calcite-color-background)}.filter-extent-container{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.filter-modal-buttons{display:flex;padding:12px;gap:10px}.filter-extent-message{align-items:center;display:flex;gap:5px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,m=class extends ${constructor(){super(),this.coverPageEnabled=!1,this.customInfoText="",this.defaultCenter="",this.defaultGlobalId="",this.defaultLayer="",this.defaultLevel="",this.defaultOid="",this.defaultWebmap="",this.honorMapFieldSettings=!1,this.introductionWindowEnabled=!1,this.enableAutoRefresh=!1,this.enableBasemap=!0,this.enableColumnReorder=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,this.enableLegend=!0,this.enableLayerList=!0,this.enableMapList=!0,this.visibilityIcon="eyeball",this.enableSearch=!0,this.enableShare=!1,this.enableSnapping=!0,this.enableZoom=!0,this.mapInfos=[],this.onlyShowUpdatableLayers=!1,this.popupHeaderColor="",this.popupHeaderHoverColor="",this.popupHeaderHoverTextColor="",this.popupHeaderTextColor="",this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.showNewestFirst=!0,this.theme="light",this.zoomAndScrollToSelected=!1,this.enableSelectionTool=!0,this.featureSelectionMode="multiple",this._deleteDialogOpen=!1,this._enableCreateFeatures=!0,this._hideFooter=!1,this._hideTable=!1,this._isMobile=!1,this._translations=L({name:"crowdsource-manager",blocking:!0}),this._layoutMode="GRID",this._panelOpen=!0,this._numSelected=0,this._filterOpen=!1,this._showInformationHeader=!0,this._layerExpressions=[],this._layerIds=[],this._isLoading=!0,this._mapExtentFilterChecked=!1,this._deleteIds=[],this._showInvalidMapAlert=!1,this._currentMapInfos=[],this._defaultAppLayoutHonored=!1,this._defaultCenterHonored=!1,this._defaultLevelHonored=!1,this._layerTable=h(),this._shouldSetMapView=!1,this._filterList=h(),this._mapCard=h(),this._isMapViewOnLoad=!1,this.showIntroductionWindow=_(),this.showCoverPage=_(),this.listenOn(window,"featureSelectionChange",this.featureSelectionChange),this.listenOn(window,"popupClosed",this.popupClosed),this.listenOn(window,"layoutChanged",this.layoutChanged),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"showDelete",this.showDelete),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"clearSelection",this.clearSelection),this.listenOn(window,"relatedRecordToggled",this.relatedRecordToggled),this.listenOn(window,"creatingFeature",this.creatingFeature),M(window)}static{this.properties={appLayout:1,appProxies:1,basemapConfig:0,coverPageEnabled:5,customInfoText:1,defaultAppLayout:1,defaultCenter:1,defaultGlobalId:1,defaultLayer:1,defaultLevel:1,defaultOid:1,defaultWebmap:1,honorMapFieldSettings:5,introductionWindowEnabled:5,enableAutoRefresh:5,enableBasemap:5,enableColumnReorder:5,enableCSV:5,enableFloorFilter:5,enableFullscreen:5,enableHome:5,enableLegend:5,enableLayerList:5,enableMapList:5,visibilityIcon:1,enableSearch:5,enableShare:5,enableSnapping:5,enableZoom:5,mapInfos:0,onlyShowUpdatableLayers:5,popupHeaderColor:1,popupHeaderHoverColor:1,popupHeaderHoverTextColor:1,popupHeaderTextColor:1,searchConfiguration:0,shareIncludeEmbed:5,shareIncludeSocial:5,showNewestFirst:5,theme:1,zoomAndScrollToSelected:5,zoomToScale:9,enableSelectionTool:5,featureSelectionMode:1,_deleteDialogOpen:16,_enableCreateFeatures:16,_hideFooter:16,_hideTable:16,_isMobile:16,_translations:16,_layer:16,_layoutMode:16,_mapInfo:16,_mapView:16,_panelOpen:16,_numSelected:16,_filterOpen:16,_showInformationHeader:16,_layerExpressions:16,_layerIds:16,_isLoading:16,_mapExtentFilterChecked:16,_deleteIds:16,_showInvalidMapAlert:16,_currentMapInfos:16}}static{this.styles=F}static{this.shadowRootOptions=y}willUpdate(e){e.has("appLayout")&&this.appLayout&&this.appLayoutWatchHandler(this.appLayout,e.get("appLayout")),e.has("enableZoom")&&(this.hasUpdated||this.enableZoom!==!0)&&this.enableZoomWatchHandler(),e.has("mapInfos")&&this.hasUpdated&&this.mapInfosWatchHandler()}appLayoutWatchHandler(e,t){e!==t&&(this._layerTable.value?.validateTableUpdate(e==="splitView"),this._setActiveLayout(e),this.appLayout==="mapView"&&this._layer?.isTable&&this._mapCard.value&&this._mapCard.value.updateLayer(),this._isMapViewOnLoad&&this._layerTable.value&&this._layerTable.value.refresh())}enableZoomWatchHandler(){this._initMapZoom()}mapInfosWatchHandler(){this.updateCurrentMapInfos()}async featureSelectionChange(e){this._numSelected=e.detail?.length}async popupClosed(){this._isMobile&&this.showHideMapPopupAndTable(!1)}async layoutChanged(e){this._layoutMode=e.detail}async mapChanged(e){this._isMapViewOnLoad&&(this._showMapInFullView(),this._isMapViewOnLoad=!1),this._mapChange=e.detail,this.showHideMapPopupAndTable(!1),this._mapChange?.isValid?await this._mapChange.mapView?.when(async()=>{await this._setMapView()}):(this._mapInfo=this._mapChange&&this._getMapInfo(this._mapChange.id),this._showInvalidMapAlert=!0)}async layerSelectionChange(e){let t=e.detail[0],i=this._mapView&&await C(this._mapView,t);i&&await i.when(()=>{i.isTable&&!this._isMobile&&(this.appLayout="tableView"),this._layer=i,this._initLayerExpressions(),this._handleFilterListReset(),this._isLoading=!1})}async showDelete(e){this._deleteIds=e.detail.ids,this._deleteDialogOpen=!0}async noLayersFound(){this._layer=void 0,this._isLoading=!1}async clearSelection(){this.showHideMapPopupAndTable(!1)}async relatedRecordToggled(e){let t=e.detail;this._relatedTableLayer=t}async creatingFeature(){this.appLayout="splitView"}load(){this.updateCurrentMapInfos(),this._resizeObserver=new ResizeObserver(()=>this._onResize())}render(){let e=this.popupHeaderColor&&this.popupHeaderColor!=="#FFFFFF"?"border-width-0":"",t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",i=this._translations.invalidWebMapMsg?.replace("{{web_map}}",this._mapInfo?.name||"");return l`${this._showInvalidMapAlert&&l`<calcite-alert auto-close class=${d(t)} icon=check-circle kind=danger label @calciteAlertClose=${()=>{this._showInvalidMapAlert=!1}} open placement=top><div slot=message>${i}</div></calcite-alert>`||""}<calcite-shell class="position-relative"><calcite-panel class=${`width-full height-full ${e}`} .loading=${this._isLoading}>${this._getBody(this._layoutMode,this._panelOpen,this._hideTable)}</calcite-panel>${this._getFooter()}</calcite-shell>${this._filterModal()}${!this._isMobile&&this._deleteModal()||""}`}async updated(){this._shouldSetMapView&&(this._shouldSetMapView=!1,this._mapChange&&await this._setMapView())}loaded(){this._resizeObserver?.observe(this.el),!this._defaultAppLayoutHonored&&this.defaultAppLayout?(this._defaultAppLayoutHonored=!0,this.appLayout=this.defaultAppLayout):this.appLayout||(this.appLayout="splitView"),this._isMapViewOnLoad=this.appLayout==="mapView",this._setActiveLayout(this.appLayout)}_getFooter(){let e=this._numSelected>0,t=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer,i=this._layer?.editingEnabled&&this._layer.capabilities?.operations.supportsDelete;return this._isMobile&&e&&!this._hideFooter?l`<div class=${"width-100"} slot=footer><div class="display-flex padding-1-2"><calcite-button appearance=solid id=solutions-show @click=${()=>this.showHideMapPopupAndTable(!0)} width=full>${this._translations.view.replace("{{n}}",this._numSelected.toString())}</calcite-button>${i?l`<delete-button class="padding-inline-start-1 width-full" id=solutions-delete .ids=${this.updateIdsToBeDeleted()} @deleteClicked=${this.updateIdsToBeDeleted} .layer=${t}></delete-button>`:void 0}</div></div>`:void 0}updateIdsToBeDeleted(){return this._deleteIds=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._layerTable.value.selectedRelatedIds:this._layerTable.value?.selectedIds,this._deleteIds}_setActiveLayout(e){e==="splitView"&&!this._panelOpen&&this._toggleLayout(),e==="mapView"?this._showMapInFullView():this._showMapInCardView()}_getDividerIcon(e,t){return e==="HORIZONTAL"?t?"chevrons-up":"chevrons-down":e==="VERTICAL"||e==="GRID"?t?"chevrons-left":"chevrons-right":void 0}_getMapSizeClass(e,t,i){let a="";switch(e){case"HORIZONTAL":a=`${t&&!i?"height-1-2 display-grid":t&&i?"height-full":"height-0"} width-full position-relative`;break;case"GRID":a=`height-full position-relative ${t?"width-1-3":"width-0"}`;break;case"VERTICAL":a=`height-full position-relative ${t?"width-1-2":"width-0"}`;break}return a}_getTableSizeClass(e,t){let i="";switch(e){case"HORIZONTAL":i=`${t?"height-1-2":"height-full"} width-full display-flex flex-column`;break;case"GRID":i=`${t?"width-2-3":"width-full"} height-full display-flex`;break;case"VERTICAL":i=`${t?"width-1-2":"width-full"} height-full display-flex`;break}return i}_getBody(e,t,i){let a=e==="HORIZONTAL"?"":"display-flex",s=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",o=document.dir==="rtl"?"left-0":"right-0";return l`<calcite-panel class="width-full height-full position-absolute"><div class=${`width-full height-full overflow-hidden ${a}`}>${this._getMapAndCard(e,t,i)}${this._getTable(e,t,i)}</div>${this.coverPageEnabled&&l`<div class=${`floating-container ${o}`} @click=${this.coverPageButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=content-minimal kind=neutral label round scale=l split-child=primary width=auto></calcite-button></div>`||""}${this.introductionWindowEnabled&&l`<div class=${`floating-container ${o}`} @click=${this.infoButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=information-letter kind=neutral label round scale=l split-child=primary width=auto></calcite-button></div>`||""}</calcite-panel>`}infoButtonClick(){this.showIntroductionWindow.emit()}coverPageButtonClick(){this.showCoverPage.emit()}_getMapAndCard(e,t,i){let a=this._getMapSizeClass(e,t,i);return l`<div class=${`${a} overflow-hidden z-index-2`}>${this._getMapNode(t)}${this._getPopupExpandNode()}</div>`}_getMapNode(e){let t=this.appLayout==="mapView",i=this.appLayout==="tableView",a=this._isMobile?"height-full":t||i?"position-absolute-0":this._layoutMode==="HORIZONTAL"&&(!this._isMobile||e)?"":"adjusted-height-50",s=this.defaultWebmap&&this.defaultLayer,o=this.enableSelectionTool&&this.featureSelectionMode==="multiple"&&!this._layer?.isTable,p=["home","legend","search","fullscreen","basemap","floorfilter","layers-list","selectiontool"],c=["map-picker","map-layer-picker"],n=document.dir||"ltr";return l`<div class=${`${a} overflow-hidden`} id=card-mapView><map-card .appLayout=${this.appLayout} .appProxies=${this.appProxies} .basemapConfig=${this.basemapConfig} class="width-full" .defaultLayerId=${s?this.defaultLayer:""} .defaultWebmapId=${this.defaultWebmap} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSelectionTool=${o} .enableShare=${this.enableShare} enable-single-expand enable-map-layer-picker enable-map-picker .featureSelectionMode=${this.featureSelectionMode} .hide=${!this._isMobile&&i} zoom-tools-size=s .isMapLayout=${t} .isMobile=${this._isMobile} .mapInfo=${this._mapInfo} .mapInfos=${this._currentMapInfos.filter(u=>u.visible!==!1)} map-widgets-index=0 .mapWidgetsPosition=${n==="rtl"?"top-right":"top-left"} .mobileMapWidgetsPosition=${n==="rtl"?"top-left":"top-right"} map-widgets-size=m .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .selectedFeaturesIds=${this._layerTable.value?.selectedIds??[]} .selectedLayer=${this._layer} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} stack-tools .theme=${this.theme} .visibilityIcon=${this.visibilityIcon} .mapToolsOrder=${p} .mobileToolsOrder=${c} .zoomToScale=${this.zoomToScale} ${r(this._mapCard)}></map-card></div>`}_getPopupExpandNode(){let e=this._isMobile?"height-full":"height-full position-relative",t=this._isMobile&&this._showInformationHeader?"display-none height-0":"",i=this.popupHeaderColor?"":this._isMobile?"calcite-mode-light":"calcite-mode-dark",a=this._isMobile&&this._hideTable?"position-absolute-0 width-full height-full":this._isMobile?"display-none height-0":"",s=this._currentMapInfos?.length>1&&this.appLayout==="tableView"?"position-relative top-51":"",o=this.appLayout!=="tableView"?"position-sticky":"";return l`<div class=${`${i} ${e} ${a} ${s} ${o}`} style=${v({"--calcite-color-foreground-1":this.popupHeaderColor,"--calcite-color-foreground-2":this.popupHeaderHoverColor,"--calcite-color-text-3":this.popupHeaderTextColor,"--calcite-color-text-2":this.popupHeaderTextColor})}><calcite-panel>${!this._isMobile&&this._showInformationHeader||this._numSelected>0&&!this._isMobile?l`<div class=${`display-flex align-items-center ${t}`} slot=header-content><calcite-icon icon=information scale=s></calcite-icon><div class="padding-inline-start-75">${this._translations.information}</div></div>`:l`<div></div>`}${this._getCardNode()}</calcite-panel></div>`}_getCardNode(){let e=this.appLayout==="mapView",t=this.appLayout==="tableView",i=this._isMobile?"height-full":t&&this._currentMapInfos?.length>1?"adjusted-height-100-51":e||t?"height-full":this._numSelected>0&&!this._isMobile?"height-50":this._showInformationHeader?this._isMobile?"height-full":"height-50":"adjusted-height-50_25",a=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",s=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer;return l`<div class=${`width-50 height-full ${a}`}><card-manager class=${`${i} width-full`} .customInfoText=${this.customInfoText} .enableCreateFeatures=${this._enableCreateFeatures&&!this._isMobile} .createBtnLabel=${this._mapInfo?.createFeatureButtonLabel} .enableEditGeometry=${this._mapInfo?.enableEditGeometry} .enableSnapping=${this.enableSnapping} .isMobile=${this._isMobile} .layerOrTable=${s} .mapView=${this?._mapView} @backFromCreateWorkFlow=${()=>{this._showInformationHeader=!0}} @createWorkFlowStarted=${()=>{this.appLayout=s?.isTable?"tableView":"mapView",this._showInformationHeader=!1}} @featureOrRecordSubmitted=${()=>this._layerTable.value&&void this._layerTable.value.refresh()} .selectedFeaturesIds=${this._layerTable.value?.selectedIds} .selectingFeatureFromMap=${this.appLayout==="mapView"} .showSketchWidgets=${s?.geometryType!=="point"} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected}></card-manager></div>`}_getTable(e,t,i){let a=this.appLayout==="mapView",s=this.appLayout==="tableView",o=i&&this._isMobile?"visibility-hidden":a?"display-none":"",p=a?"height-full width-full z-index-0":"display-none",c=this._getTableSizeClass(e,t),n=e==="HORIZONTAL"?"horizontal":"vertical",u=e==="HORIZONTAL"?"header":"panel-start",b=this.defaultWebmap&&this.defaultLayer,x=this._isMobile?"border-top":"",f=this.defaultGlobalId?this.defaultGlobalId?.indexOf(",")>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,T=this.defaultOid?this.defaultOid?.indexOf(",")>-1?this.defaultOid.split(",").map(S=>Number.parseInt(S,10)):[Number.parseInt(this.defaultOid,10)]:void 0;return l`<calcite-shell class=${`${c} ${x} border-bottom z-index-1`}>${this._isMobile?void 0:l`<calcite-action-bar class="border-sides" expand-disabled .layout=${n} slot=${u??w}>${this.getActions(e,t)}</calcite-action-bar>`}<div class=${`width-full height-full position-relative z-index-0 ${o}`}><layer-table .appLayout=${this.appLayout} .defaultGlobalId=${b?f:void 0} .defaultLayerId=${b?this.defaultLayer:""} .defaultOid=${b&&!f?T:void 0} .enableAutoRefresh=${this.enableAutoRefresh} .enableCSV=${this.enableCSV} .enableColumnReorder=${this.enableColumnReorder} .enableInlineEdit=${this?._mapInfo?.enableInlineEdit} .enableTableAutosave=${this._mapInfo?.enableTableAutosave!==void 0?this._mapInfo?.enableTableAutosave:!0} .enableShare=${this.enableShare} .featureSelectionMode=${this.featureSelectionMode} .honorMapFieldSettings=${this.honorMapFieldSettings} .isMobile=${this._isMobile} .mapHidden=${s} .mapInfo=${this._mapInfo} .mapView=${this?._mapView} .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showNewestFirst=${this.showNewestFirst} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected} .zoomToScale=${this.zoomToScale} ${r(this._layerTable)}></layer-table></div><div class=${d(p)} id=full-map-view></div></calcite-shell>`}getActions(e,t){let i=this._getDividerIcon(e,t),a=t?this._translations.close:this._translations.open,s="toggle-layout";return l`<calcite-action .active=${this.appLayout==="splitView"} alignment=center appearance=solid class="toggle-node" icon=browser id=browser-action @click=${()=>{this.appLayout="splitView"}} text></calcite-action><calcite-tooltip placement=right reference-element=browser-action><span>${this._translations.splitView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="tableView"} alignment=center appearance=solid class="toggle-node" icon=dock-left id=dock-left-action @click=${()=>{this.appLayout="tableView"}} text></calcite-action><calcite-tooltip placement=right reference-element=dock-left-action><span>${this._translations.tableView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="mapView"} alignment=center appearance=solid class="toggle-node" .disabled=${this._layer?.isTable} icon=browser-map id=browser-map-action @click=${()=>{this.appLayout="mapView"}} text></calcite-action><calcite-tooltip placement=right reference-element=browser-map-action><span>${this._translations.mapView}</span></calcite-tooltip><calcite-action alignment=center appearance=solid class="toggle-node" .icon=${i} id=${s} @click=${()=>this._toggleLayout()} slot=actions-end text></calcite-action><calcite-tooltip placement=bottom .referenceElement=${s}><span>${a}</span></calcite-tooltip>`}_deleteModal(){let e=(this._layerTable.value?.selectedRelatedIds?.length??0)>0?this._relatedTableLayer:this._layer;return l`<delete-dialog id=deleteDialogId .ids=${this._deleteIds} .layer=${e} @deleteDialogClose=${()=>this._deleteDialogOpen=!1} .open=${this._deleteDialogOpen}></delete-dialog>`}_mapExtentFilter(){let e=this._layerExpressions?.length===0;return l`<calcite-panel><div><calcite-block class=${d(this.theme==="dark"?"background-dark":"")} heading menu-placement=bottom-end open><div class="filter-extent-container"><div class="filter-extent-message"><span>${this._translations.filterByExtentMsg}</span><calcite-icon icon=information id=filter-message-info scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top reference-element=filter-message-info>${this._translations.filterByExtentTooltipMsg}</calcite-tooltip></div><calcite-switch .checked=${this._mapExtentFilterChecked} @calciteSwitchChange=${t=>{let i=!!(t.target.checked||this._filterList.value?.filterCount&&this._filterList.value?.filterCount>0);this._layerTable.value&&this._layerTable.value?.filterUpdate(i,t.target.checked),this._mapCard.value&&this._mapCard.value?.updateFilterState(i),this._mapExtentFilterChecked=t.target.checked}} scale=m></calcite-switch></div></calcite-block>${e&&l`<div class="filter-modal-buttons" slot=footer><calcite-button appearance=outline @click=${this._handleFilterListReset} width=full>${this._translations.Resetfilter}</calcite-button><calcite-button @click=${this._closeFilter} width=full>${this._translations.close}</calcite-button></div>`||""}</div></calcite-panel>`}_filterModal(){let e=this._layerExpressions?.length>0,t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return l`<calcite-dialog class=${`filter-content-space ${t}`} .heading=${this._translations.filter.replace("{{title}}",this._layer?.title||"")} id=solutions-filter-dialog-manager kind=brand modal @calciteDialogClose=${()=>{this._closeFilter()}} .open=${this._filterOpen} width=s>${!this._layer?.isTable&&this._mapExtentFilter()||""}${e&&this._mapView&&l`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>{this._closeFilter()}} combobox-overlay-positioning=fixed .layerExpressions=${this._layerExpressions} @filterListReset=${this._handleFilterListReset} @filterUpdate=${()=>{this._updateFilter()}} .view=${this._mapView} ${r(this._filterList)}></instant-apps-filter-list>`||""}</calcite-dialog>`}_updateFilter(){let e=this._filterList?.value?.filterCount&&this._filterList.value.filterCount>0||this._mapExtentFilterChecked;this._layerTable.value&&this._layerTable.value?.filterUpdate(e),this._mapCard.value&&this._mapCard.value.updateFilterState(e)}_initLayerExpressions(){let e=this._mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=e?e.filter(t=>t.id===this._layer?.id):[]}_toggleFilter(){this._filterOpen=!this._filterOpen}_handleFilterListReset(){this._mapExtentFilterChecked=!1,this._mapCard.value&&this._mapCard.value.resetFilter(),this._layerTable.value&&this._layerTable.value.filterReset()}async _closeFilter(){this._filterOpen&&(this._filterOpen=!1,this._layerTable.value&&this._layerTable.value.closeFilter())}_onResize(){let e=this.el.offsetWidth<=1024,t=!this._isMobile&&e;this._isMobile=e,t&&(this._panelOpen=!0),this._isMobile?(this.showHideMapPopupAndTable(!this._isMobile),this.appLayout="splitView"):(this._layer?.isTable&&(this.appLayout="tableView"),this._isMobile=!1),this._layoutMode=this._isMobile?"HORIZONTAL":"GRID"}updateCurrentMapInfos(){this._currentMapInfos=this.mapInfos,!this.enableMapList&&this.defaultWebmap&&(this._currentMapInfos=this.mapInfos.filter(e=>e.id===this.defaultWebmap))}_toggleLayout(){this._panelOpen=!this._panelOpen}_showMapInCardView(){if(this.appLayout!=="mapView"){let e=document.getElementById("full-map-view")?.childNodes[0],t=document.getElementById("card-mapView");e&&t&&t.appendChild(e)}}_showMapInFullView(){let e=document.getElementById("card-mapView")?.childNodes,t;e?.forEach(a=>{!t&&a.mapView&&(t=a)});let i=document.getElementById("full-map-view");t&&i&&i.appendChild(t)}showHideMapPopupAndTable(e){this._hideTable=e,this._hideFooter=e}_getMapInfo(e){let t;return this._currentMapInfos.some(i=>i.id===e?(t={...i},!0):!1),t}async _setMapView(){let e=this._mapChange&&this._getMapInfo(this._mapChange.id);if(e&&this._mapChange){this._mapInfo=e,this._initLayerExpressions(),this._enableCreateFeatures=this._mapInfo.enableCreateFeatures,this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView&&(this._mapView.popupEnabled=!1);let t=!this.defaultCenter||this._defaultCenterHonored?void 0:this.defaultCenter?.split(";").map(a=>Number.parseFloat(a)),i=!this.defaultLevel||this._defaultLevelHonored?void 0:Number.parseInt(this.defaultLevel,10);t&&i&&(await this._mapView?.goTo({center:t,zoom:i}),this._defaultCenterHonored=!0,this._defaultLevelHonored=!0)}}_initMapZoom(){this.enableZoom?this.enableZoom&&this._mapView?.ui.add({component:"zoom",position:"top-left",index:0}):this._mapView?.ui.remove("zoom")}};I("crowdsource-manager",m);return m},a,b)
2
+ import{a as M}from"./UGKLBL7D.js";import"./3LEJ44U2.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as L}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as I}from"./VU3OQQKP.js";import{F as h,G as r,H as $,J as d,K as v,h as g,i as l,l as w,r as _,u as y}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,{d:C}])=>{var F=g`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-foreground-1)}.padding-1-2{padding:.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.z-index-2{z-index:2!important}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-top{border-top:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.position-absolute{position:absolute}.position-sticky{position:sticky}.height-50{height:50%}.top-51{top:51px}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-51{height:calc(100% - 51px)}.display-none{display:none!important}.adjusted-height-50_25{height:calc(50% + 25px)}.display-grid{display:grid}.padding-inline-start-75{padding-inline-start:.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button,.esri-floor-filter__level-button,.esri-floor-filter__browse-button{width:40px!important;height:40px!important}.position-absolute-0{position:absolute;inset:0}.visibility-hidden{visibility:hidden;height:0px}.border-width-0{border-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;margin:100px 0;z-index:1}.left-0{left:0}.right-0{right:0}.floating-container .floating-button{box-shadow:0 10px 25px #5c5d5e99;-webkit-transform:translatey(5px);transform:translatey(5px);-webkit-transition:all .3s;transition:all .3s}.z-index-0{z-index:0!important}.z-index-1{z-index:1!important}.filter-content-space{--calcite-dialog-content-space: 0px}.background-dark{background:var(--calcite-color-background)}.filter-extent-container{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.filter-modal-buttons{display:flex;padding:12px;gap:10px}.filter-extent-message{align-items:center;display:flex;gap:5px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,m=class extends ${constructor(){super(),this.coverPageEnabled=!1,this.customInfoText="",this.defaultCenter="",this.defaultGlobalId="",this.defaultLayer="",this.defaultLevel="",this.defaultOid="",this.defaultWebmap="",this.honorMapFieldSettings=!1,this.introductionWindowEnabled=!1,this.enableAutoRefresh=!1,this.enableBasemap=!0,this.enableColumnReorder=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,this.enableLegend=!0,this.enableLayerList=!0,this.enableMapList=!0,this.visibilityIcon="eyeball",this.enableSearch=!0,this.enableShare=!1,this.enableSnapping=!0,this.enableZoom=!0,this.mapInfos=[],this.onlyShowUpdatableLayers=!1,this.popupHeaderColor="",this.popupHeaderHoverColor="",this.popupHeaderHoverTextColor="",this.popupHeaderTextColor="",this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.showNewestFirst=!0,this.theme="light",this.zoomAndScrollToSelected=!1,this.enableSelectionTool=!0,this.featureSelectionMode="multiple",this._deleteDialogOpen=!1,this._enableCreateFeatures=!0,this._hideFooter=!1,this._hideTable=!1,this._isMobile=!1,this._translations=L({name:"crowdsource-manager",blocking:!0}),this._layoutMode="GRID",this._panelOpen=!0,this._numSelected=0,this._filterOpen=!1,this._showInformationHeader=!0,this._layerExpressions=[],this._layerIds=[],this._isLoading=!0,this._mapExtentFilterChecked=!1,this._deleteIds=[],this._showInvalidMapAlert=!1,this._currentMapInfos=[],this._defaultAppLayoutHonored=!1,this._defaultCenterHonored=!1,this._defaultLevelHonored=!1,this._layerTable=h(),this._shouldSetMapView=!1,this._filterList=h(),this._mapCard=h(),this._isMapViewOnLoad=!1,this.showIntroductionWindow=_(),this.showCoverPage=_(),this.listenOn(window,"featureSelectionChange",this.featureSelectionChange),this.listenOn(window,"popupClosed",this.popupClosed),this.listenOn(window,"layoutChanged",this.layoutChanged),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"showDelete",this.showDelete),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"clearSelection",this.clearSelection),this.listenOn(window,"relatedRecordToggled",this.relatedRecordToggled),this.listenOn(window,"creatingFeature",this.creatingFeature),M(window)}static{this.properties={appLayout:1,appProxies:1,basemapConfig:0,coverPageEnabled:5,customInfoText:1,defaultAppLayout:1,defaultCenter:1,defaultGlobalId:1,defaultLayer:1,defaultLevel:1,defaultOid:1,defaultWebmap:1,honorMapFieldSettings:5,introductionWindowEnabled:5,enableAutoRefresh:5,enableBasemap:5,enableColumnReorder:5,enableCSV:5,enableFloorFilter:5,enableFullscreen:5,enableHome:5,enableLegend:5,enableLayerList:5,enableMapList:5,visibilityIcon:1,enableSearch:5,enableShare:5,enableSnapping:5,enableZoom:5,mapInfos:0,onlyShowUpdatableLayers:5,popupHeaderColor:1,popupHeaderHoverColor:1,popupHeaderHoverTextColor:1,popupHeaderTextColor:1,searchConfiguration:0,shareIncludeEmbed:5,shareIncludeSocial:5,showNewestFirst:5,theme:1,zoomAndScrollToSelected:5,zoomToScale:9,enableSelectionTool:5,featureSelectionMode:1,_deleteDialogOpen:16,_enableCreateFeatures:16,_hideFooter:16,_hideTable:16,_isMobile:16,_translations:16,_layer:16,_layoutMode:16,_mapInfo:16,_mapView:16,_panelOpen:16,_numSelected:16,_filterOpen:16,_showInformationHeader:16,_layerExpressions:16,_layerIds:16,_isLoading:16,_mapExtentFilterChecked:16,_deleteIds:16,_showInvalidMapAlert:16,_currentMapInfos:16}}static{this.styles=F}static{this.shadowRootOptions=y}willUpdate(e){e.has("appLayout")&&this.appLayout&&this.appLayoutWatchHandler(this.appLayout,e.get("appLayout")),e.has("enableZoom")&&(this.hasUpdated||this.enableZoom!==!0)&&this.enableZoomWatchHandler(),e.has("mapInfos")&&this.hasUpdated&&this.mapInfosWatchHandler()}appLayoutWatchHandler(e,t){e!==t&&(this._layerTable.value?.validateTableUpdate(e==="splitView"),this._setActiveLayout(e),this.appLayout==="mapView"&&this._layer?.isTable&&this._mapCard.value&&this._mapCard.value.updateLayer(),this._isMapViewOnLoad&&this._layerTable.value&&this._layerTable.value.refresh())}enableZoomWatchHandler(){this._initMapZoom()}mapInfosWatchHandler(){this.updateCurrentMapInfos()}async featureSelectionChange(e){this._numSelected=e.detail?.length}async popupClosed(){this._isMobile&&this.showHideMapPopupAndTable(!1)}async layoutChanged(e){this._layoutMode=e.detail}async mapChanged(e){this._isMapViewOnLoad&&(this._showMapInFullView(),this._isMapViewOnLoad=!1),this._mapChange=e.detail,this.showHideMapPopupAndTable(!1),this._mapChange?.isValid?await this._mapChange.mapView?.when(async()=>{await this._setMapView()}):(this._mapInfo=this._mapChange&&this._getMapInfo(this._mapChange.id),this._showInvalidMapAlert=!0)}async layerSelectionChange(e){let t=e.detail[0],i=this._mapView&&await C(this._mapView,t);i&&await i.when(()=>{i.isTable&&!this._isMobile&&(this.appLayout="tableView"),this._layer=i,this._initLayerExpressions(),this._handleFilterListReset(),this._isLoading=!1})}async showDelete(e){this._deleteIds=e.detail.ids,this._deleteDialogOpen=!0}async noLayersFound(){this._layer=void 0,this._isLoading=!1}async clearSelection(){this.showHideMapPopupAndTable(!1)}async relatedRecordToggled(e){let t=e.detail;this._relatedTableLayer=t}async creatingFeature(){this.appLayout="splitView"}load(){this.updateCurrentMapInfos(),this._resizeObserver=new ResizeObserver(()=>this._onResize())}render(){let e=this.popupHeaderColor&&this.popupHeaderColor!=="#FFFFFF"?"border-width-0":"",t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",i=this._translations.invalidWebMapMsg?.replace("{{web_map}}",this._mapInfo?.name||"");return l`${this._showInvalidMapAlert&&l`<calcite-alert auto-close class=${d(t)} icon=check-circle kind=danger label @calciteAlertClose=${()=>{this._showInvalidMapAlert=!1}} open placement=top><div slot=message>${i}</div></calcite-alert>`||""}<calcite-shell class="position-relative"><calcite-panel class=${`width-full height-full ${e}`} .loading=${this._isLoading}>${this._getBody(this._layoutMode,this._panelOpen,this._hideTable)}</calcite-panel>${this._getFooter()}</calcite-shell>${this._filterModal()}${!this._isMobile&&this._deleteModal()||""}`}async updated(){this._shouldSetMapView&&(this._shouldSetMapView=!1,this._mapChange&&await this._setMapView())}loaded(){this._resizeObserver?.observe(this.el),!this._defaultAppLayoutHonored&&this.defaultAppLayout?(this._defaultAppLayoutHonored=!0,this.appLayout=this.defaultAppLayout):this.appLayout||(this.appLayout="splitView"),this._isMapViewOnLoad=this.appLayout==="mapView",this._setActiveLayout(this.appLayout)}_getFooter(){let e=this._numSelected>0,t=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer,i=this._layer?.editingEnabled&&this._layer.capabilities?.operations.supportsDelete;return this._isMobile&&e&&!this._hideFooter?l`<div class=${"width-100"} slot=footer><div class="display-flex padding-1-2"><calcite-button appearance=solid id=solutions-show @click=${()=>this.showHideMapPopupAndTable(!0)} width=full>${this._translations.view.replace("{{n}}",this._numSelected.toString())}</calcite-button>${i?l`<delete-button class="padding-inline-start-1 width-full" id=solutions-delete .ids=${this.updateIdsToBeDeleted()} @deleteClicked=${this.updateIdsToBeDeleted} .layer=${t}></delete-button>`:void 0}</div></div>`:void 0}updateIdsToBeDeleted(){return this._deleteIds=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._layerTable.value.selectedRelatedIds:this._layerTable.value?.selectedIds,this._deleteIds}_setActiveLayout(e){e==="splitView"&&!this._panelOpen&&this._toggleLayout(),e==="mapView"?this._showMapInFullView():this._showMapInCardView()}_getDividerIcon(e,t){return e==="HORIZONTAL"?t?"chevrons-up":"chevrons-down":e==="VERTICAL"||e==="GRID"?t?"chevrons-left":"chevrons-right":void 0}_getMapSizeClass(e,t,i){let a="";switch(e){case"HORIZONTAL":a=`${t&&!i?"height-1-2 display-grid":t&&i?"height-full":"height-0"} width-full position-relative`;break;case"GRID":a=`height-full position-relative ${t?"width-1-3":"width-0"}`;break;case"VERTICAL":a=`height-full position-relative ${t?"width-1-2":"width-0"}`;break}return a}_getTableSizeClass(e,t){let i="";switch(e){case"HORIZONTAL":i=`${t?"height-1-2":"height-full"} width-full display-flex flex-column`;break;case"GRID":i=`${t?"width-2-3":"width-full"} height-full display-flex`;break;case"VERTICAL":i=`${t?"width-1-2":"width-full"} height-full display-flex`;break}return i}_getBody(e,t,i){let a=e==="HORIZONTAL"?"":"display-flex",s=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",o=document.dir==="rtl"?"left-0":"right-0";return l`<calcite-panel class="width-full height-full position-absolute"><div class=${`width-full height-full overflow-hidden ${a}`}>${this._getMapAndCard(e,t,i)}${this._getTable(e,t,i)}</div>${this.coverPageEnabled&&l`<div class=${`floating-container ${o}`} @click=${this.coverPageButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=content-minimal kind=neutral label round scale=l split-child=primary width=auto></calcite-button></div>`||""}${this.introductionWindowEnabled&&l`<div class=${`floating-container ${o}`} @click=${this.infoButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=information-letter kind=neutral label round scale=l split-child=primary width=auto></calcite-button></div>`||""}</calcite-panel>`}infoButtonClick(){this.showIntroductionWindow.emit()}coverPageButtonClick(){this.showCoverPage.emit()}_getMapAndCard(e,t,i){let a=this._getMapSizeClass(e,t,i);return l`<div class=${`${a} overflow-hidden z-index-2`}>${this._getMapNode(t)}${this._getPopupExpandNode()}</div>`}_getMapNode(e){let t=this.appLayout==="mapView",i=this.appLayout==="tableView",a=this._isMobile?"height-full":t||i?"position-absolute-0":this._layoutMode==="HORIZONTAL"&&(!this._isMobile||e)?"":"adjusted-height-50",s=this.defaultWebmap&&this.defaultLayer,o=this.enableSelectionTool&&this.featureSelectionMode==="multiple"&&!this._layer?.isTable,p=["home","legend","search","fullscreen","basemap","floorfilter","layers-list","selectiontool"],c=["map-picker","map-layer-picker"],n=document.dir||"ltr";return l`<div class=${`${a} overflow-hidden`} id=card-mapView><map-card .appLayout=${this.appLayout} .appProxies=${this.appProxies} .basemapConfig=${this.basemapConfig} class="width-full" .defaultLayerId=${s?this.defaultLayer:""} .defaultWebmapId=${this.defaultWebmap} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSelectionTool=${o} .enableShare=${this.enableShare} enable-single-expand enable-map-layer-picker enable-map-picker .featureSelectionMode=${this.featureSelectionMode} .hide=${!this._isMobile&&i} zoom-tools-size=s .isMapLayout=${t} .isMobile=${this._isMobile} .mapInfo=${this._mapInfo} .mapInfos=${this._currentMapInfos.filter(u=>u.visible!==!1)} map-widgets-index=0 .mapWidgetsPosition=${n==="rtl"?"top-right":"top-left"} .mobileMapWidgetsPosition=${n==="rtl"?"top-left":"top-right"} map-widgets-size=m .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .selectedFeaturesIds=${this._layerTable.value?.selectedIds??[]} .selectedLayer=${this._layer} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} stack-tools .theme=${this.theme} .visibilityIcon=${this.visibilityIcon} .mapToolsOrder=${p} .mobileToolsOrder=${c} .zoomToScale=${this.zoomToScale} ${r(this._mapCard)}></map-card></div>`}_getPopupExpandNode(){let e=this._isMobile?"height-full":"height-full position-relative",t=this._isMobile&&this._showInformationHeader?"display-none height-0":"",i=this.popupHeaderColor?"":this._isMobile?"calcite-mode-light":"calcite-mode-dark",a=this._isMobile&&this._hideTable?"position-absolute-0 width-full height-full":this._isMobile?"display-none height-0":"",s=this._currentMapInfos?.length>1&&this.appLayout==="tableView"?"position-relative top-51":"",o=this.appLayout!=="tableView"?"position-sticky":"";return l`<div class=${`${i} ${e} ${a} ${s} ${o}`} style=${v({"--calcite-color-foreground-1":this.popupHeaderColor,"--calcite-color-foreground-2":this.popupHeaderHoverColor,"--calcite-color-text-3":this.popupHeaderTextColor,"--calcite-color-text-2":this.popupHeaderTextColor})}><calcite-panel>${!this._isMobile&&this._showInformationHeader||this._numSelected>0&&!this._isMobile?l`<div class=${`display-flex align-items-center ${t}`} slot=header-content><calcite-icon icon=information scale=s></calcite-icon><div class="padding-inline-start-75">${this._translations.information}</div></div>`:l`<div></div>`}${this._getCardNode()}</calcite-panel></div>`}_getCardNode(){let e=this.appLayout==="mapView",t=this.appLayout==="tableView",i=this._isMobile?"height-full":t&&this._currentMapInfos?.length>1?"adjusted-height-100-51":e||t?"height-full":this._numSelected>0&&!this._isMobile?"height-50":this._showInformationHeader?this._isMobile?"height-full":"height-50":"adjusted-height-50_25",a=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",s=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer;return l`<div class=${`width-50 height-full ${a}`}><card-manager class=${`${i} width-full`} .customInfoText=${this.customInfoText} .enableCreateFeatures=${this._enableCreateFeatures&&!this._isMobile} .createBtnLabel=${this._mapInfo?.createFeatureButtonLabel} .enableEditGeometry=${this._mapInfo?.enableEditGeometry} .enableSnapping=${this.enableSnapping} .isMobile=${this._isMobile} .layerOrTable=${s} .mapView=${this?._mapView} @backFromCreateWorkFlow=${()=>{this._showInformationHeader=!0}} @createWorkFlowStarted=${()=>{this.appLayout=s?.isTable?"tableView":"mapView",this._showInformationHeader=!1}} @featureOrRecordSubmitted=${()=>this._layerTable.value&&void this._layerTable.value.refresh()} .selectedFeaturesIds=${this._layerTable.value?.selectedIds} .selectingFeatureFromMap=${this.appLayout==="mapView"} .showSketchWidgets=${s?.geometryType!=="point"} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected}></card-manager></div>`}_getTable(e,t,i){let a=this.appLayout==="mapView",s=this.appLayout==="tableView",o=i&&this._isMobile?"visibility-hidden":a?"display-none":"",p=a?"height-full width-full z-index-0":"display-none",c=this._getTableSizeClass(e,t),n=e==="HORIZONTAL"?"horizontal":"vertical",u=e==="HORIZONTAL"?"header":"panel-start",b=this.defaultWebmap&&this.defaultLayer,x=this._isMobile?"border-top":"",f=this.defaultGlobalId?this.defaultGlobalId?.indexOf(",")>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,T=this.defaultOid?this.defaultOid?.indexOf(",")>-1?this.defaultOid.split(",").map(S=>Number.parseInt(S,10)):[Number.parseInt(this.defaultOid,10)]:void 0;return l`<calcite-shell class=${`${c} ${x} border-bottom z-index-1`}>${this._isMobile?void 0:l`<calcite-action-bar class="border-sides" expand-disabled .layout=${n} slot=${u??w}>${this.getActions(e,t)}</calcite-action-bar>`}<div class=${`width-full height-full position-relative z-index-0 ${o}`}><layer-table .appLayout=${this.appLayout} .defaultGlobalId=${b?f:void 0} .defaultLayerId=${b?this.defaultLayer:""} .defaultOid=${b&&!f?T:void 0} .enableAutoRefresh=${this.enableAutoRefresh} .enableCSV=${this.enableCSV} .enableColumnReorder=${this.enableColumnReorder} .enableInlineEdit=${this?._mapInfo?.enableInlineEdit} .enableTableAutosave=${this._mapInfo?.enableTableAutosave!==void 0?this._mapInfo?.enableTableAutosave:!0} .enableShare=${this.enableShare} .featureSelectionMode=${this.featureSelectionMode} .honorMapFieldSettings=${this.honorMapFieldSettings} .isMobile=${this._isMobile} .mapHidden=${s} .mapInfo=${this._mapInfo} .mapView=${this?._mapView} .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showNewestFirst=${this.showNewestFirst} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected} .zoomToScale=${this.zoomToScale} ${r(this._layerTable)}></layer-table></div><div class=${d(p)} id=full-map-view></div></calcite-shell>`}getActions(e,t){let i=this._getDividerIcon(e,t),a=t?this._translations.close:this._translations.open,s="toggle-layout";return l`<calcite-action .active=${this.appLayout==="splitView"} alignment=center appearance=solid class="toggle-node" icon=browser id=browser-action @click=${()=>{this.appLayout="splitView"}} text></calcite-action><calcite-tooltip placement=right reference-element=browser-action><span>${this._translations.splitView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="tableView"} alignment=center appearance=solid class="toggle-node" icon=dock-left id=dock-left-action @click=${()=>{this.appLayout="tableView"}} text></calcite-action><calcite-tooltip placement=right reference-element=dock-left-action><span>${this._translations.tableView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="mapView"} alignment=center appearance=solid class="toggle-node" .disabled=${this._layer?.isTable} icon=browser-map id=browser-map-action @click=${()=>{this.appLayout="mapView"}} text></calcite-action><calcite-tooltip placement=right reference-element=browser-map-action><span>${this._translations.mapView}</span></calcite-tooltip><calcite-action alignment=center appearance=solid class="toggle-node" .icon=${i} id=${s} @click=${()=>this._toggleLayout()} slot=actions-end text></calcite-action><calcite-tooltip placement=bottom .referenceElement=${s}><span>${a}</span></calcite-tooltip>`}_deleteModal(){let e=(this._layerTable.value?.selectedRelatedIds?.length??0)>0?this._relatedTableLayer:this._layer;return l`<delete-dialog id=deleteDialogId .ids=${this._deleteIds} .layer=${e} @deleteDialogClose=${()=>this._deleteDialogOpen=!1} .open=${this._deleteDialogOpen}></delete-dialog>`}_mapExtentFilter(){let e=this._layerExpressions?.length===0;return l`<calcite-panel><div><calcite-block class=${d(this.theme==="dark"?"background-dark":"")} heading menu-placement=bottom-end open><div class="filter-extent-container"><div class="filter-extent-message"><span>${this._translations.filterByExtentMsg}</span><calcite-icon icon=information id=filter-message-info scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top reference-element=filter-message-info>${this._translations.filterByExtentTooltipMsg}</calcite-tooltip></div><calcite-switch .checked=${this._mapExtentFilterChecked} @calciteSwitchChange=${t=>{let i=!!(t.target.checked||this._filterList.value?.filterCount&&this._filterList.value?.filterCount>0);this._layerTable.value&&this._layerTable.value?.filterUpdate(i,t.target.checked),this._mapCard.value&&this._mapCard.value?.updateFilterState(i),this._mapExtentFilterChecked=t.target.checked}} scale=m></calcite-switch></div></calcite-block>${e&&l`<div class="filter-modal-buttons" slot=footer><calcite-button appearance=outline @click=${this._handleFilterListReset} width=full>${this._translations.Resetfilter}</calcite-button><calcite-button @click=${this._closeFilter} width=full>${this._translations.close}</calcite-button></div>`||""}</div></calcite-panel>`}_filterModal(){let e=this._layerExpressions?.length>0,t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return l`<calcite-dialog class=${`filter-content-space ${t}`} .heading=${this._translations.filter.replace("{{title}}",this._layer?.title||"")} id=solutions-filter-dialog-manager kind=brand modal @calciteDialogClose=${()=>{this._closeFilter()}} .open=${this._filterOpen} width=s>${!this._layer?.isTable&&this._mapExtentFilter()||""}${e&&this._mapView&&l`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>{this._closeFilter()}} combobox-overlay-positioning=fixed .layerExpressions=${this._layerExpressions} @filterListReset=${this._handleFilterListReset} @filterUpdate=${()=>{this._updateFilter()}} .view=${this._mapView} ${r(this._filterList)}></instant-apps-filter-list>`||""}</calcite-dialog>`}_updateFilter(){let e=this._filterList?.value?.filterCount&&this._filterList.value.filterCount>0||this._mapExtentFilterChecked;this._layerTable.value&&this._layerTable.value?.filterUpdate(e),this._mapCard.value&&this._mapCard.value.updateFilterState(e)}_initLayerExpressions(){let e=this._mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=e?e.filter(t=>t.id===this._layer?.id):[]}_toggleFilter(){this._filterOpen=!this._filterOpen}_handleFilterListReset(){this._mapExtentFilterChecked=!1,this._mapCard.value&&this._mapCard.value.resetFilter(),this._layerTable.value&&this._layerTable.value.filterReset()}async _closeFilter(){this._filterOpen&&(this._filterOpen=!1,this._layerTable.value&&this._layerTable.value.closeFilter())}_onResize(){let e=this.el.offsetWidth<=1024,t=!this._isMobile&&e;this._isMobile=e,t&&(this._panelOpen=!0),this._isMobile?(this.showHideMapPopupAndTable(!this._isMobile),this.appLayout="splitView"):(this._layer?.isTable&&(this.appLayout="tableView"),this._isMobile=!1),this._layoutMode=this._isMobile?"HORIZONTAL":"GRID"}updateCurrentMapInfos(){this._currentMapInfos=this.mapInfos,!this.enableMapList&&this.defaultWebmap&&(this._currentMapInfos=this.mapInfos.filter(e=>e.id===this.defaultWebmap))}_toggleLayout(){this._panelOpen=!this._panelOpen}_showMapInCardView(){if(this.appLayout!=="mapView"){let e=document.getElementById("full-map-view")?.childNodes[0],t=document.getElementById("card-mapView");e&&t&&t.appendChild(e)}}_showMapInFullView(){let e=document.getElementById("card-mapView")?.childNodes,t;e?.forEach(a=>{!t&&a.mapView&&(t=a)});let i=document.getElementById("full-map-view");t&&i&&i.appendChild(t)}showHideMapPopupAndTable(e){this._hideTable=e,this._hideFooter=e}_getMapInfo(e){let t;return this._currentMapInfos.some(i=>i.id===e?(t={...i},!0):!1),t}async _setMapView(){let e=this._mapChange&&this._getMapInfo(this._mapChange.id);if(e&&this._mapChange){this._mapInfo=e,this._initLayerExpressions(),this._enableCreateFeatures=this._mapInfo.enableCreateFeatures,this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView&&(this._mapView.popupEnabled=!1);let t=!this.defaultCenter||this._defaultCenterHonored?void 0:this.defaultCenter?.split(";").map(a=>Number.parseFloat(a)),i=!this.defaultLevel||this._defaultLevelHonored?void 0:Number.parseInt(this.defaultLevel,10);t&&i&&(await this._mapView?.goTo({center:t,zoom:i}),this._defaultCenterHonored=!0,this._defaultLevelHonored=!0)}}_initMapZoom(){this.enableZoom?this.enableZoom&&this._mapView?.ui.add({component:"zoom",position:"top-left",index:0}):this._mapView?.ui.remove("zoom")}};I("crowdsource-manager",m);return m},a,b)
@@ -4,4 +4,4 @@ import{a as pn}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";i
4
4
  `),this.credentialString=[this.datetime.slice(0,8),this.region,this.service,"aws4_request"].join("/"),this.signQuery&&(this.service==="s3"&&!m.has("X-Amz-Expires")&&m.set("X-Amz-Expires","86400"),m.set("X-Amz-Algorithm","AWS4-HMAC-SHA256"),m.set("X-Amz-Credential",this.accessKeyId+"/"+this.credentialString),m.set("X-Amz-SignedHeaders",this.signedHeaders)),this.service==="s3")try{this.encodedPath=decodeURIComponent(this.url.pathname.replace(/\+/g," "))}catch{this.encodedPath=this.url.pathname}else this.encodedPath=this.url.pathname.replace(/\/+/g,"/");S||(this.encodedPath=encodeURIComponent(this.encodedPath).replace(/%2F/g,"/")),this.encodedPath=pr(this.encodedPath);let O=new Set;this.encodedSearch=[...this.url.searchParams].filter(([w])=>{if(!w)return!1;if(this.service==="s3"){if(O.has(w))return!1;O.add(w)}return!0}).map(w=>w.map(v=>pr(encodeURIComponent(v)))).sort(([w,v],[A,k])=>w<A?-1:w>A?1:v<k?-1:v>k?1:0).map(w=>w.join("=")).join("&")}async sign(){return this.signQuery?(this.url.searchParams.set("X-Amz-Signature",await this.signature()),this.sessionToken&&this.appendSessionToken&&this.url.searchParams.set("X-Amz-Security-Token",this.sessionToken)):this.headers.set("Authorization",await this.authHeader()),{method:this.method,url:this.url,headers:this.headers,body:this.body}}async authHeader(){return["AWS4-HMAC-SHA256 Credential="+this.accessKeyId+"/"+this.credentialString,"SignedHeaders="+this.signedHeaders,"Signature="+await this.signature()].join(", ")}async signature(){let t=this.datetime.slice(0,8),n=[this.secretAccessKey,t,this.region,this.service].join(),r=this.cache.get(n);if(!r){let i=await _e("AWS4"+this.secretAccessKey,t),o=await _e(i,this.region),s=await _e(o,this.service);r=await _e(s,"aws4_request"),this.cache.set(n,r)}return vt(await _e(r,await this.stringToSign()))}async stringToSign(){return["AWS4-HMAC-SHA256",this.datetime,this.credentialString,vt(await fr(await this.canonicalString()))].join(`
5
5
  `)}async canonicalString(){return[this.method.toUpperCase(),this.encodedPath,this.encodedSearch,this.canonicalHeaders+`
6
6
  `,this.signedHeaders,await this.hexBodyHash()].join(`
7
- `)}async hexBodyHash(){let t=this.headers.get("X-Amz-Content-Sha256")||(this.service==="s3"&&this.signQuery?"UNSIGNED-PAYLOAD":null);if(t==null){if(this.body&&typeof this.body!="string"&&!("byteLength"in this.body))throw new Error("body must be a string, ArrayBuffer or ArrayBufferView, unless you include the X-Amz-Content-Sha256 header");t=vt(await fr(this.body||""))}return t}};async function _e(e,t){let n=await crypto.subtle.importKey("raw",typeof e=="string"?Nt.encode(e):e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]);return crypto.subtle.sign("HMAC",n,Nt.encode(t))}async function fr(e){return crypto.subtle.digest("SHA-256",typeof e=="string"?Nt.encode(e):e)}var dr=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function vt(e){let t=new Uint8Array(e),n="";for(let r=0;r<t.length;r++){let i=t[r];n+=dr[i>>>4&15],n+=dr[i&15]}return n}function pr(e){return e.replace(/[!'()*]/g,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase())}function As(e,t){let{hostname:n,pathname:r}=e;if(n.endsWith(".on.aws")){let a=n.match(/^[^.]{1,63}\.lambda-url\.([^.]{1,63})\.on\.aws$/);return a!=null?["lambda",a[1]||""]:["",""]}if(n.endsWith(".r2.cloudflarestorage.com"))return["s3","auto"];if(n.endsWith(".backblazeb2.com")){let a=n.match(/^(?:[^.]{1,63}\.)?s3\.([^.]{1,63})\.backblazeb2\.com$/);return a!=null?["s3",a[1]||""]:["",""]}let i=n.replace("dualstack.","").match(/([^.]{1,63})\.(?:([^.]{0,63})\.)?amazonaws\.com(?:\.cn)?$/),o=i&&i[1]||"",s=i&&i[2];if(s==="us-gov")s="us-gov-west-1";else if(s==="s3"||s==="s3-accelerate")s="us-east-1",o="s3";else if(o==="iot")n.startsWith("iot.")?o="execute-api":n.startsWith("data.jobs.iot.")?o="iot-jobs-data":o=r==="/mqtt"?"iotdevicegateway":"iotdata";else if(o==="autoscaling"){let a=(t.get("X-Amz-Target")||"").split(".")[0];a==="AnyScaleFrontendService"?o="application-autoscaling":a==="AnyScaleScalingPlannerFrontendService"&&(o="autoscaling-plans")}else s==null&&o.startsWith("s3-")?(s=o.slice(3).replace(/^fips-|^external-1/,""),o="s3"):o.endsWith("-fips")?o=o.slice(0,-5):s&&/-\d$/.test(o)&&!/-\d$/.test(s)&&([o,s]=[s,o]);return[Os[o]||o,s||""]}var on="Event",gr=on+"Listener";function Is(e){return function(t,n,r,i){var o=r||no,s=i||!1;if(!Z)return o;var a=et(n),u=et(t,!0);if(!u.length)throw new Error("noElements");if(!a.length)throw new Error("no"+on);var c=[];return(function p(l){l&&(c=[]);for(var x=l?"add"+gr:"remove"+gr,y=0;y<u.length;y++){var b=u[y];c[y]=l?s&&s.once?Es(o):o:c[y]||o;for(var S=0;S<a.length;S++)b[x]?b["on"+a[S]]=l?c[y]:null:b[x](a[S],c[y],s)}return p.bind(null,!l)})(e)}}function et(e,t){if(le(e))return t?et(document.querySelectorAll(e)):(n=e).split(n.indexOf(",")>-1?",":" ").map(function(s){return s.trim()});var n;if(NodeList.prototype.isPrototypeOf(e)){for(var r=[],i=e.length>>>0;i--;)r[i]=e[i];return r}var o=yo(e);return t?o.map(function(s){return le(s)?et(s,!0):s}).flat():o}function Es(e,t){var n;return function(){return e&&(n=e.apply(this,arguments),e=null),n}}var bt=Is(on);function ci(e,t){return Z&&ee(window[e])?(n=window[e],r=t,(i=window)===void 0&&(i=null),ee(n)?function(){n.apply(i,arguments),r.apply(i,arguments)}:r):window[e]=t;var n,r,i}ci.bind(null,"onerror");ci.bind(null,"onload");var li=typeof window>"u",hr="hidden";function Ps(e){if(li)return!1;var t=js(),n="".concat(t.replace(/[H|h]idden/,""),"visibilitychange"),r=function(){return e(!!document[t])},i=function(){return document.addEventListener(n,r)};return i(),function(){return document.removeEventListener(n,r),i}}function js(){var e=["webkit","moz","ms","o"];return li||hr in document?hr:e.reduce(function(t,n){var r=n+"Hidden";return!t&&r in document?r:t},null)}var Ts=["mousemove","mousedown","touchmove","touchstart","touchend","keydown"];function Ns(e,t){t===void 0&&(t={});var n=(function(s,a){var u=this,c=!1;return function(p){c||(s.call(u,p),c=!0,setTimeout(function(){return c=!1},a))}})(e,t.throttle||1e4),r=[];function i(){var s=Ps(function(a){a||n({type:"tabVisible"})});return r=[s].concat(Ts.map(function(a){return bt(document,a,n)})).concat(bt(window,"load",n)).concat(bt(window,"scroll",n,{capture:!0,passive:!0})),o}function o(){r.map(function(s){return s()})}return i(),function(){return o(),i}}function _s(e){var t,n,r=e.onIdle,i=e.onWakeUp,o=e.onHeartbeat,s=e.timeout,a=s,u=e.throttle,c=u,p=!1,l=!1,x=new Date,y=function(){return clearTimeout(t)};function b(h){y(),o&&!p&&o(Ce(x),h),i&&p&&(p=!1,i(Ce(n),h),x=new Date),t=setTimeout(function(){p=!0,r&&(n=new Date,r(Ce(x),h))},a)}var S=Ns(b,{throttle:c});return{disable:function(){l=!0,p=!1,y();var h=S();return function(){return l=!1,x=new Date,b({type:"load"}),h()}},getStatus:function(){return{isIdle:p,isDisabled:l,active:p?0:Ce(x,l),idle:p?Ce(n,l):0}}}}function Ce(e,t){return t?0:Math.round((new Date-e)/1e3)}var fi="object",Cs="string",mr="?",F="name",B="version",Ms="",yr="function",Us="undefined",Ds="BlackBerry",Rs="Chrome",zs="Firefox",vr={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ls=[[/microsoft (windows) (vista|xp)/i],[F,B],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[F,[B,br,vr]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[F,"Windows"],[B,br,vr]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[B,/_/g,"."],[F,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[F,"MacOS"],[B,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[B,F],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[F,B],[/\(bb(10);/i],[B,[F,Ds]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[B,[F,zs+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[B,[F,"webOS"]],[/crkey\/([\d\.]+)/i],[B,[F,Rs+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[F,"Chromium OS"],B],[/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/(unix) ?([\w\.]*)/i],[F,B]];function $s(e,t){for(var n=0,r,i,o,s,a,u;n<t.length&&!a;){var c=t[n],p=t[n+1];for(r=i=0;r<c.length&&!a;)if(a=c[r++].exec(e),a)for(o=0;o<p.length;o++)u=a[++i],s=p[o],te(s)===fi&&s.length>0?s.length==2?te(s[1])==yr?this[s[0]]=s[1].call(this,u):this[s[0]]=s[1]:s.length==3?te(s[1])===yr&&!(s[1].exec&&s[1].test)?this[s[0]]=u?s[1].call(this,u,s[2]):void 0:this[s[0]]=u?u.replace(s[1],s[2]):void 0:s.length==4&&(this[s[0]]=u?s[3].call(this,u.replace(s[1],s[2])):void 0):this[s]=u||void 0;n+=2}}function br(e,t){for(var n in t)if(te(t[n])===fi&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(wr(t[n][r],e))return n===mr?void 0:n}else if(wr(t[n],e))return n===mr?void 0:n;return e}function wr(e,t){return te(e)===Cs?xr(t).indexOf(xr(e))!==-1:!1}function xr(e){return e.toLowerCase()}function Vs(e){var t=(typeof window>"u"?"undefined":te(window))!==Us&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:Ms,n={};return n[F]=void 0,n[B]=void 0,$s.call(n,t,Ls),n}var di="Brave";function sn(){if(typeof window>"u")return{};if(!window.navigator)return{};var e=window.navigator,t=e.platform,n=e.product,r=e.vendor,i=Hs(window.navigator),o=i.type,s=i.version,a=o===di?o:(r||"").split(" ")[0];return{platform:t,os:Vs(),make:a||n,model:o,version:s,name:[o,s].join("/"),language:Ws(),timezone:qs()}}function Ws(){var e=window.navigator,t=e.language,n=e.browserLanguage,r=e.languages;return(t||n||(r||["en_US"])[0]).toLowerCase().replace("-","_")}function qs(){var e=/\(([A-Za-z\s].*)\)/.exec(new Date().toString());return e&&e[1]||""}function Hs(e){var t=e.userAgent,n=/.+(Opera[\s[A-Z]*|OPR[\sA-Z]*)\/([0-9\.]+).*/i.exec(t);if(n)return{type:n[1],version:n[2]};var r=/.+(Trident|Edge)\/([0-9\.]+).*/i.exec(t);if(r)return{type:r[1],version:r[2]};var i=/(headlesschrome)(?:\/([\w\.]+)| )/i.exec(t);if(i)return{type:i[1],version:i[2]};var o=/.+(Chrome|Firefox|FxiOS)\/([0-9\.]+).*/i.exec(t);if(o){var s=e.brave&&e.brave.isBrave||!1;return{type:s?di:o[1],version:o[2]}}var a=/.+(Safari)\/([0-9\.]+).*/i.exec(t);if(a)return{type:a[1],version:a[2]};var u=/.+(AppleWebKit)\/([0-9\.]+).*/i.exec(t);if(u)return{type:u[1],version:u[2]};var c=/.*([A-Z]+)\/([0-9\.]+).*/i.exec(t),p=c||["","NA","0.0.0"];return{type:p[1],version:p[2]}}function Ks(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t[e]||e}function Mt(e){return Ut.apply(this,arguments)}function Ut(){return Ut=re(K.mark(function e(t){var n,r,i,o,s,a,u=arguments;return K.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:n=u.length>1&&u[1]!==void 0?u[1]:!1,r={},c.t0=K.keys(t);case 3:if((c.t1=c.t0()).done){c.next=13;break}return i=c.t1.value,o=Array.isArray(t[i])?t[i]:[t[i]],s=n?o:o[0],c.next=9,gi(s,Gs);case 9:a=c.sent,hi(a)||(r[i]=a),c.next=3;break;case 13:return c.abrupt("return",r);case 14:case"end":return c.stop()}},e)})),Ut.apply(this,arguments)}function pi(e){return Dt.apply(this,arguments)}function Dt(){return Dt=re(K.mark(function e(t){var n,r;return K.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:n={},i.t0=K.keys(t);case 2:if((i.t1=i.t0()).done){i.next=9;break}return r=i.t1.value,i.next=6,gi(t[r],Js);case 6:n[r]=i.sent,i.next=2;break;case 9:return i.abrupt("return",n);case 10:case"end":return i.stop()}},e)})),Dt.apply(this,arguments)}function gi(e,t){return Rt.apply(this,arguments)}function Rt(){return Rt=re(K.mark(function e(t,n){return K.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(typeof t!="function"){r.next=4;break}return r.next=3,t();case 3:t=r.sent;case 4:return r.abrupt("return",n(t));case 5:case"end":return r.stop()}},e)})),Rt.apply(this,arguments)}function Gs(e){if(e!=null)return Array.isArray(e)?e.filter(Xs).map(function(t){return t.toString()}):hi(e)?e:e.toString()}function Js(e){return parseFloat(Number(Array.isArray(e)?e[0]:e))}function Xs(e){return e!==null&&typeof e<"u"}function hi(e){return e==null}var zt="_session.start",ut="_session.stop",mi="pageView";function Fs(e){return Lt.apply(this,arguments)}function Lt(){return Lt=re(K.mark(function e(t){var n,r,i,o,s,a,u,c,p,l,x,y,b,S,h,f,m,O,w,v,A,k,C,M,P,z,U,q,$,E,H,D=arguments;return K.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(n=D.length>1&&D[1]!==void 0?D[1]:{},r=D.length>2&&D[2]!==void 0?D[2]:{},i=r.appTitle,o=r.appPackageName,s=r.appVersionCode,a=r.eventMapping,u=r.enrichEventAttributes,c=r.enrichEventMetrics,p=r.debug,l=p?console.log:function(){},x=Ks(t,a),y=Le(),b=n.sessionId||y.id,S=n.sessionStart||y.createdAt,h=n.sessionStart?new Date(n.sessionStart).getTime():y.created,l("event sessionData ",JSON.stringify(y)),be&&(f=rn(),m=ui(),l("event pageSessionInfo",JSON.stringify(f)),l("event tabSessionData ",JSON.stringify(m))),O=n.attributes||{},w=n.eventId||xe(),v=n.time?new Date(n.time):new Date,A=v.toISOString(),k=v.getTime()-h,C=J({date:A,sessionId:b},be?{pageSession:f.id}:{}),!u){N.next=23;break}return N.next=20,u();case 20:N.t0=N.sent,N.next=24;break;case 23:N.t0={};case 24:if(M=N.t0,P=J(J(J({},C),M),O),z=n.metrics||{},U={sessionTime:y.elapsed||k,hour:v.getHours(),day:v.getDay()+1,month:v.getMonth()+1,year:v.getFullYear()},!c){N.next=34;break}return N.next=31,c();case 31:N.t1=N.sent,N.next=35;break;case 34:N.t1={};case 35:return q=N.t1,$=J(J(J({},U),q),z),N.next=39,Mt(P);case 39:return N.t2=N.sent,N.next=42,pi($);case 42:return N.t3=N.sent,E={attributes:N.t2,metrics:N.t3},l("".concat(w,":").concat(x)),l("eventAttributes",E.attributes),l("eventMetrics",E.metrics),be&&l("clientInfo",sn()),H=tn({},w,J(J({EventType:x,Timestamp:A,AppPackageName:o,AppTitle:i},s?{AppVersionCode:s}:{}),{},{Attributes:E.attributes,Metrics:E.metrics,Session:{Id:b,StartTimestamp:S}})),t===ut&&(H[w].Session.Duration=k,H[w].Session.StopTimestamp=A),N.abrupt("return",H);case 51:case"end":return N.stop()}},e)})),Lt.apply(this,arguments)}var Bs="__endpoint";function ct(e){return"".concat(Bs,".").concat(e)}var Sr="__endpoint",Or=!1;function an(){return $t.apply(this,arguments)}function $t(){return $t=re(K.mark(function e(){var t,n,r,i,o,s,a,u,c,p,l,x,y,b,S,h,f,m,O,w,v,A=arguments;return K.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return t=A.length>0&&A[0]!==void 0?A[0]:{},n=A.length>1&&A[1]!==void 0?A[1]:{},r=n.getUserId,i=n.getEndpointId,o=n.endpointMigration,s=ra(n),a=s.sessionKey?s.sessionKey():"sessions",u=s.pageViewKey?s.pageViewKey():"pageViews",be&&(l=sn(),c=rn(),p=c.id),x=Le(),k.next=10,i();case 10:if(y=k.sent,Or||(Or=!0,b=Ft(Sr),b&&(wt(y,b),Qr(Sr))),S=Qs(y),h=ta(n),f=Ys(h,l),m={Attributes:{},Demographic:f,Location:{},Metrics:{}},be&&(l.device&&l.device.vendor&&(m.Attributes.DeviceMake=[l.device.vendor]),l.device&&l.device.model&&(m.Attributes.DeviceModel=[l.device.model]),l.device&&l.device.type&&(m.Attributes.DeviceType=[l.device.type])),t=Ss.all([S,m,t],{arrayMerge:na}),!(t.User&&t.User.UserId)){k.next=23;break}return k.next=21,r();case 21:O=k.sent,t.User.UserId!==O&&(t.User.UserId=O);case 23:if(!(!t.User||!t.User.UserId)){k.next=28;break}return k.next=26,r();case 26:w=k.sent,w&&(t.User=t.User||{},t.User.UserId=w);case 28:if(!(t.User&&t.User.UserAttributes)){k.next=32;break}return k.next=31,Mt(t.User.UserAttributes,!0);case 31:t.User.UserAttributes=k.sent;case 32:return k.next=34,Mt(t.Attributes,!0);case 34:return t.Attributes=k.sent,k.next=37,pi(t.Metrics);case 37:if(t.Metrics=k.sent,t.Metrics[a]||(t.Metrics[a]=1),t.Metrics[u]||(t.Metrics[u]=1),o&&(t=o(y,t)),v=t.Attributes.lastSession,v){k.next=47;break}return t.Attributes.lastSessionDate=[x.createdAt],t.Attributes.lastSession=[x.id],p&&(t.Attributes.lastPageSession=[p]),k.abrupt("return",wt(y,t));case 47:return v&&v[0]!==x.id&&(t.Attributes.lastSessionDate=[x.createdAt],t.Attributes.lastSession=[x.id],t.Metrics[a]+=1),t.Attributes&&t.Attributes.lastPageSession&&Array.isArray(t.Attributes.lastPageSession)&&t.Attributes.lastPageSession.length>0&&t.Attributes.lastPageSession[0]!==p&&(t.Attributes.lastPageSession=[p],t.Metrics[u]+=1),k.abrupt("return",wt(y,t));case 50:case"end":return k.stop()}},e)})),$t.apply(this,arguments)}function wt(e,t){var n=ct(e),r=bs(t)?t:JSON.stringify(t);return Xo(n,r),t}function Qs(e){try{return JSON.parse(Ft(ct(e)))||{}}catch{}return{}}function Ys(e,t){return be?ea(e,t):Zs(e)}function Zs(e){var t={AppVersion:e,Make:"generic server",Platform:"Node.js",PlatformVersion:process.version};return t}function ea(e,t){var n={AppVersion:e,Locale:t.language,Make:t.make,Model:t.model,ModelVersion:t.version,Platform:t.os.name||t.platform};return t.os&&t.os.version&&(n.PlatformVersion=t.os.version),n}function ta(e){var t=e.appTitle||e.appPackageName||"",n=e.appVersionCode||"0.0.0";return t?"".concat(t,"@").concat(n):n}function na(e,t){return t}function ra(e){var t=e.getContext;return typeof t=="function"?t():t}function ia(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function(){var n=re(K.mark(function i(o){var s,a,u,c,p=arguments;return K.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return s=p.length>1&&p[1]!==void 0?p[1]:{},a=p.length>2&&p[2]!==void 0?p[2]:{},u=p.length>3&&p[3]!==void 0?p[3]:!1,cr(s)&&(s={},u=s),cr(a)&&(a={},u=a),l.next=7,Fs(o,s,t);case 7:if(c=l.sent,!(Object.entries(a).length||o===mi)){l.next=12;break}return l.next=11,an(a,t);case 11:a=l.sent;case 12:if(e.push(c),!u){l.next=17;break}return l.abrupt("return",e.flush());case 17:case"end":return l.stop()}},i)}));function r(i){return n.apply(this,arguments)}return r})()}var kr,oa=[429,500],sa=[202],aa=400;function ua(e,t){return Vt.apply(this,arguments)}function Vt(){return Vt=re(K.mark(function e(t,n){var r,i,o,s,a,u,c,p,l,x,y,b,S,h,f,m,O,w,v;return K.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return r=n.pinpointRegion,i=n.pinpointAppId,o=n.lambdaArn,s=n.lambdaRegion,a=n.credentials,u=n.getCredentials,c=n.debug,A.next=3,ca(a,u);case 3:return p=A.sent,c&&console.log("pinpoint auth",p),l=s||r,x=r||s,y=n.fips===!0?"-fips":"",b="https://lambda.".concat(l,".amazonaws.com/2015-03-31/functions/").concat(o,"/invocations"),S="https://pinpoint".concat(y,".").concat(x,".amazonaws.com/v1/apps/").concat(i,"/events"),h=o?b:S,O={body:JSON.stringify(t)},f=new _t(p),A.next=16,f.fetch(h,O).then(function(k){return k.json()});case 16:m=A.sent,A.next=24;break;case 19:return f=new kr.PinpointClient({credentials:p,region:r}),w=new kr.PutEventsCommand({ApplicationId:i,EventsRequest:t}),A.next=23,f.send(w);case 23:m=A.sent;case 24:return m&&m.Results&&(v=Object.keys(m.Results).map(function(k){return m.Results[k]}),v.forEach(function(k){var C=k.EndpointItemResponse||{},M=k.EventsItemResponse||{};Object.keys(C).length&&(sa.includes(C.StatusCode)||oa.includes(C.StatusCode)||la(C,Endpoint));var P=Object.keys(M);P.length&&P.forEach(function(z){})})),A.abrupt("return",m);case 26:case"end":return A.stop()}},e)})),Vt.apply(this,arguments)}function ca(e,t){return Wt.apply(this,arguments)}function Wt(){return Wt=re(K.mark(function e(t,n){var r,i;return K.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(r=t,!(!Object.keys(r).length&&n)){o.next=11;break}return o.prev=2,o.next=5,n();case 5:r=o.sent,o.next=11;break;case 8:throw o.prev=8,o.t0=o.catch(2),new Error(o.t0);case 11:return i={accessKeyId:r.accessKeyId||r.AccessKeyId,secretAccessKey:r.secretAccessKey||r.SecretKey,sessionToken:r.sessionToken||r.SessionToken,retries:5},o.abrupt("return",i);case 13:case"end":return o.stop()}},e,null,[[2,8]])})),Wt.apply(this,arguments)}function la(e,t){var n=e.StatusCode,r=e.Message;if(n===aa){if(r.startsWith("Missing ChannelType"))throw new Error("Missing ChannelType");if(r.startsWith("Exceeded maximum endpoint per user count"))throw new Error("Exceeded maximum endpoint per user count")}}var fa=["PUSH","GCM","APNS","APNS_SANDBOX","APNS_VOIP","APNS_VOIP_SANDBOX","ADM","SMS","VOICE","EMAIL","BAIDU","CUSTOM"],xt=fa.reduce(function(e,t){return e[t]=t,e},{}),da=sn(),Ar=zt,Ir=ut,pa=/.+\@.+\..+/;function ga(e){return pa.test(e)}function ha(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.getEndpointId,n=e.debug;return(function(){var r=re(K.mark(function o(){var s,a,u,c,p,l,x,y,b,S,h=arguments;return K.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=h.length>0&&h[0]!==void 0?h[0]:[],a=h.length>1&&h[1]!==void 0?h[1]:{},f.next=4,t();case 4:if(u=f.sent,u){f.next=8;break}return console.error("No endpoint id. check getEndpointId()"),f.abrupt("return");case 8:if(c=te(a)==="object"&&Object.keys(a).length,c){f.next=13;break}f.t0=ma(u),f.next=16;break;case 13:return f.next=15,an(a,e);case 15:f.t0=f.sent;case 16:return p=f.t0,l=p.ChannelType,p.Address&&ga(p.Address)&&(l=xt.EMAIL),!l&&p.Address&&(da.platform==="android"?l=l||xt.GCM:l=l||xt.APNS),n&&(console.log("Endpoint",p),console.log("CHANNEL_TYPE",l)),p.RequestId=xe(),p.ChannelType=l,p.Address&&(p.OptOut=p.OptOut||"NONE"),x=ya(s),y=va(u,p,x),f.prev=26,f.next=29,ua(y,e);case 29:b=f.sent,f.next=36;break;case 32:f.prev=32,f.t1=f.catch(26),console.log("Error calling AWS",f.t1),S=f.t1;case 36:return f.abrupt("return",{endpoint:p,response:b,error:S,events:s});case 37:case"end":return f.stop()}},o,null,[[26,32]])}));function i(){return r.apply(this,arguments)}return i})()}function ma(e){try{return JSON.parse(Ft(ct(e)))||{}}catch{}return{}}function ya(e){return e.sort(function(t,n){var r=t.EventType,i=n.EventType;if(r==Ar)return-1;if(i==Ar||r==Ir)return 1;if(i==Ir)return-1}).reduce(function(t,n){return J(J({},n),t)},{})}function va(e,t,n){return{BatchItem:tn({},e,{Endpoint:t,Events:n})}}var ba=ut;function yi(){return{}}function wa(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=J({getContext:e.getContext||yi,credentials:e.credentials||{},getEndpointId:e.getEndpointId},e),n=t.debug?console.log:function(){},r=ha(t),i=hs((function(){var u=re(K.mark(function c(p,l){var x;return K.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return p.forEach(function(b){return n("> Queue event",b)}),y.next=3,r(p,{});case 3:x=y.sent,n("> Queue response",x);case 5:case"end":return y.stop()}},c)}));return function(c,p){return u.apply(this,arguments)}})(),{max:10,interval:e.flushInterval||3e3,throttle:!0}),o=ia(i,t);an({},e);var s=xa(o);function a(u){return r([],u)}return{updateEndpoint:a,recordEvent:o,disable:function(){s()}}}function xa(e){if(!be)return yi;var t=Sa(e);return window.addEventListener("beforeunload",t),function(){return window.removeEventListener("beforeunload",t)}}function Sa(e){return function(){e(ba,!0)}}function St(){throw new Error("Pinpoint not loaded")}function Oa(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return typeof r=="number"&&(t.metrics[n]=r),(typeof r=="string"||typeof r=="boolean")&&(t.attributes[n]=r),t},{attributes:{},metrics:{}})}function ka(e){var t=e.config,n=e.instance;t&&t.disableAnonymousTraffic&&!n.user("userId")&&n.once("identifyStart",function(r){var i=r.plugins,o=i["aws-pinpoint"];o.loaded()||n.loadPlugin("aws-pinpoint")})}var Aa={disableAnonymousTraffic:!1,pinpointRegion:"us-east-1",eventMapping:{}};function Ia(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t,n,r=!1;function i(){var s=Le();e.debug&&console.log("Stop session",s),t(ut,!0)}function o(){var s=Ze(30);e.debug&&console.log("START SESSION",s),t(zt)}return{name:"aws-pinpoint",config:J(J({},Aa),e),bootstrap:ka,initialize:function(s){var a=s.config,u=s.instance,c=a.disableAnonymousTraffic,p=a.debug,l=p?console.log:function(){},x=u.getState(),y=x.user||{},b=y.userId,S=y.anonymousId,h=x.context||{},f=h.app,m=h.version,O=h.campaign,w=rn(),v=ui(),A=Le();if(l("initPageSession",w),l("initTabSession",v),l("initSessionData",A),A&&A.anonId&&A.anonId!==S){l("anonId different refresh session details"),ur(),vs();var k=Ze(30,{anonId:S,userId:b});l("newSessionForNewUser",k)}if(!b&&c)return!1;var C=Object.keys(O).reduce(function(U,q){return U["utm_".concat(q)]=O[q],U},{}),M=wa(J(J({},a),{},{appTitle:a.appTitle||f,appPackageName:a.appPackageName||f,appVersionCode:a.appVersionCode||m,eventMapping:a.eventMapping,getEndpointId:function(){return u.user("anonymousId")},getUserId:function(){return u.user("userId")},getContext:function(){return{sessionKey:a.sessionKey,pageViewKey:a.pageViewKey,initialSession:A}},enrichEventAttributes:function(){return J({anonId:u.user("anonymousId"),userId:u.user("userId"),hash:window.location.hash,path:window.location.pathname,referrer:document.referrer,search:window.location.search,title:document.title,host:window.location.hostname,url:window.location.origin+window.location.pathname},C)},enrichUserAttributes:a.enrichUserAttributes,enrichEventMetrics:function(){return{}}}));t=M.recordEvent,n=M.updateEndpoint,A&&A.isNew&&(l("Start brand new session because cookie not found"),t(zt));var P=18e5,z=P;_s({timeout:z,throttle:2e4,onIdle:function(U,q){l("Session idle. Active ".concat(U," seconds")),i()},onWakeUp:function(U,q){l("Session wakeup. Idle ".concat(U," seconds")),o()},onHeartbeat:function(U,q){l("ping session",new Date),l("total active time",U);var $=u.user();ys(30,{anonId:$.anonymousId,userId:$.userId})}})},page:function(s){if(s.payload,s.config,!t)return St();r&&ur(),t(mi),r=!0},track:function(s){var a=s.payload,u=s.config;if(s.instance,!t)return St();if(!(u.disableAnonymousTraffic&&!a.userId)){var c=Oa(a.properties);t(a.event,c)}},identify:function(s){var a=s.payload,u=a.userId,c=a.traits;if(!n)return St();var p={},l={};u&&(l.UserId=u),c&&Object.keys(c).length&&(l.UserAttributes=c),Object.keys(l).length&&(p.User=l),n(p,!0)},reset:function(s){var a=s.instance,u=a.user("anonymousId"),c=ct(u);Qr(c)},loaded:function(){return!!t}}}var Ea=Ia;function vi(e){return Object.keys(e).some(t=>{let n=e[t];if(!n)return!1;switch(n&&n.toParam&&(n=n.toParam()),n.constructor.name){case"Array":return!1;case"Object":return!1;case"Date":return!1;case"Function":return!1;case"Boolean":return!1;case"String":return!1;case"Number":return!1;default:return!0}})}function bi(e){let t={};return Object.keys(e).forEach(n=>{var r,i;let o=e[n];if(o&&o.toParam&&(o=o.toParam()),!o&&o!==0&&typeof o!="boolean"&&typeof o!="string")return;let s=o.constructor.name,a;switch(s){case"Array":let u=(i=(r=o[0])===null||r===void 0?void 0:r.constructor)===null||i===void 0?void 0:i.name;a=u==="Array"?o:u==="Object"?JSON.stringify(o):o.join(",");break;case"Object":a=JSON.stringify(o);break;case"Date":a=o.valueOf();break;case"Function":a=null;break;case"Boolean":a=o+"";break;default:a=o;break}(a||a===0||typeof a=="string"||Array.isArray(a))&&(t[n]=a)}),t}function wi(e,t){return Array.isArray(t)&&t[0]&&Array.isArray(t[0])?t.map(n=>wi(e,n)).join("&"):encodeURIComponent(e)+"="+encodeURIComponent(t)}function xi(e){let t=bi(e);return Object.keys(t).map(n=>wi(n,t[n])).join("&")}var Pa=globalThis.FormData;function ja(e,t){let n=vi(e)||t,r=bi(e);if(n){let i=new Pa;return Object.keys(r).forEach(o=>{if(typeof Blob<"u"&&r[o]instanceof Blob){let s=r.fileName||r[o].name||o;i.append(o,r[o],s)}else i.append(o,r[o])}),i}else return xi(e)}var de=class extends Error{constructor(t,n,r,i,o){super(t);let s=new.target.prototype;Object.setPrototypeOf(this,s),t=t||"UNKNOWN_ERROR",n=n||"UNKNOWN_ERROR_CODE",this.name="ArcGISRequestError",this.message=n==="UNKNOWN_ERROR_CODE"?t:`${n}: ${t}`,this.originalMessage=t,this.code=n,this.response=r,this.url=i,this.options=o}},Ta={noCorsDomains:[],crossOriginNoCorsDomains:{},pendingNoCorsRequests:{}},qt="ARCGIS_REST_JS_NO_CORS";globalThis[qt]||(globalThis[qt]=Object.assign({},Ta));var Y=globalThis[qt];function Na(e){let t=new URL(e);e=t.origin+t.pathname,t.search.includes("f=json")&&(e+="?f=json");let n=t.origin;return Y.pendingNoCorsRequests[n]||(Y.pendingNoCorsRequests[n]=fetch(e,{mode:"no-cors",credentials:"include",cache:"no-store"}).then(r=>{Y.noCorsDomains.indexOf(n)===-1&&Y.noCorsDomains.push(n),Y.crossOriginNoCorsDomains[n.toLowerCase()]=Date.now(),delete Y.pendingNoCorsRequests[n]}).catch(r=>(delete Y.pendingNoCorsRequests[n],Promise.reject(new Error(`no-cors request to ${n} failed`))))),Y.pendingNoCorsRequests[n]}function _a(e){e.forEach(t=>{t=t.toLowerCase(),/^https?:\/\//.test(t)?Ot(t):(Ot("http://"+t),Ot("https://"+t))})}function Ot(e){let t=new URL(e).origin;Y.noCorsDomains.indexOf(t)===-1&&Y.noCorsDomains.push(t)}function Si(e){let t=!1;if(Y.noCorsDomains.length){let n=new URL(e).origin.toLowerCase();t=Y.noCorsDomains.some(r=>n.includes(r))}return t}function Ca(e){let t=!1;if(Si(e)){let n=new URL(e).origin.toLowerCase(),r=Y.crossOriginNoCorsDomains[n]||0;Date.now()-60*6e4>r&&(t=!0)}return t}function Ma(e){console&&console.warn&&console.warn.apply(console,[e])}function Ua(){return Promise.resolve({fetch:globalThis.fetch,Headers:globalThis.Headers,Response:globalThis.Response,Request:globalThis.Request})}function Da(e,t){var n;if(!t&&!window||!e)return!1;{t=t||window;let r=(n=t.location)===null||n===void 0?void 0:n.origin;return e.startsWith(r)}}var Ra="@esri/arcgis-rest-js";function za(){return globalThis.DEFAULT_ARCGIS_REQUEST_OPTIONS||{httpMethod:"POST",params:{f:"json"}}}var tt=class extends de{constructor(t="AUTHENTICATION_ERROR",n="AUTHENTICATION_ERROR_CODE",r,i,o){super(t,n,r,i,o),this.name="ArcGISAuthError",this.message=n==="AUTHENTICATION_ERROR_CODE"?t:`${n}: ${t}`;let s=new.target.prototype;Object.setPrototypeOf(this,s)}retry(t,n=1){let r=0,i=(o,s)=>{r=r+1,t(this.url,this.options).then(a=>{let u=Object.assign(Object.assign({},this.options),{authentication:a});return Oi(this.url,u)}).then(a=>{o(a)}).catch(a=>{a.name==="ArcGISAuthError"&&r<n?i(o,s):a.name===this.name&&a.message===this.message&&r>=n?s(this):s(a)})};return new Promise((o,s)=>{i(o,s)})}};function La(e,t,n,r,i){if(e.code>=400){let{message:o,code:s}=e;throw new de(o,s,e,t,r)}if(e.error){let{message:o,code:s,messageCode:a}=e.error,u=a||s||"UNKNOWN_ERROR_CODE";throw s===498||s===499?i||new tt(o,u,e,t,r):new de(o,u,e,t,r)}if(e.status==="failed"||e.status==="failure"){let o,s="UNKNOWN_ERROR_CODE";try{o=JSON.parse(e.statusMessage).message,s=JSON.parse(e.statusMessage).code}catch{o=e.statusMessage||e.message}throw new de(o,s,e,t,r)}return e}function Oi(e,t){let n=za(),r=Object.assign(Object.assign(Object.assign({httpMethod:"POST"},n),t),{params:Object.assign(Object.assign({},n.params),t.params),headers:Object.assign(Object.assign({},n.headers),t.headers)}),{httpMethod:i,rawResponse:o}=r,s=Object.assign({f:"json"},r.params),a=null,u={method:i,signal:r.signal,credentials:r.credentials||"same-origin"};Si(e)&&(u.credentials="include"),r.headers&&r.headers["X-Esri-Auth-Client-Id"]&&e.indexOf("/oauth2/platformSelf")>-1&&(u.credentials="include");let c;if(typeof r.authentication=="string"){let b=r.authentication;c={portal:"https://www.arcgis.com/sharing/rest",getToken:()=>Promise.resolve(b)},!r.authentication.startsWith("AAPK")&&!r.authentication.startsWith("AAPT")&&!r.authentication.startsWith("AATK")&&!r.authentication.startsWith("AAST")&&!r.suppressWarnings&&!globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING&&(Ma("Using an oAuth 2.0 access token directly in the token option is discouraged. Consider using ArcGISIdentityManager or Application session. See https://esriurl.com/arcgis-rest-js-direct-token-warning for more information."),globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING=!0)}else c=r.authentication;let p=e,l=!1;typeof window<"u"&&(l=Da(e));let x=!l&&Ca(e);r.headers&&r.headers["X-Esri-Auth-Client-Id"]&&e.indexOf("/oauth2/platformSelf")>-1&&(u.credentials="include");let y=Promise.resolve();return x&&(u.credentials="include",y=Na(e)),y.then(()=>c?c.getToken(e).catch(b=>(b.url=e,b.options=r,a=b,Promise.resolve(""))):Promise.resolve("")).then(b=>{b.length&&(s.token=b),c&&c.getDomainCredentials&&(u.credentials=c.getDomainCredentials(e));let S={};if(u.method==="GET"){s.token&&r.hideToken&&typeof window>"u"&&(S["X-Esri-Authorization"]=`Bearer ${s.token}`,delete s.token);let f=xi(s),m=f===""?e:`${e}?${f}`;r.maxUrlLength&&m.length>r.maxUrlLength||!r.maxUrlLength&&m.length>2e3||s.token&&r.hideToken?(u.method="POST",b.length&&r.hideToken&&(s.token=b,delete S["X-Esri-Authorization"])):e=m}let h=new RegExp("/items/.+/updateResources").test(e);return u.method==="POST"&&(u.body=ja(s,h)),u.headers=Object.assign(Object.assign({},S),r.headers),(typeof window>"u"||window&&typeof window.document>"u")&&!u.headers.referer&&(u.headers.referer=Ra),!vi(s)&&!h&&(u.headers["Content-Type"]="application/x-www-form-urlencoded"),globalThis.fetch?globalThis.fetch(e,u):Ua().then(({fetch:f})=>f(e,u))}).then(b=>{if(!b.ok)return b.json().then(S=>{let{status:h,statusText:f}=b,{message:m,details:O}=S.error,w=`${m}. ${O?O.join(" "):""}`.trim();throw new de(w,`HTTP ${h} ${f}`,S,e,r)}).catch(S=>{if(S.name==="ArcGISRequestError")throw S;let{status:h,statusText:f}=b;throw new de(f,`HTTP ${h}`,b,e,r)});if(o)return console.warn("rawResponse option is deprecated and will be removed in ArcGIS REST JS v5.0."),b;switch(s.f){case"json":return b.json();case"geojson":return b.json();case"html":return b.text();case"text":return b.text();default:return b.blob()}}).then(b=>{if((s.f==="json"||s.f==="geojson")&&!o){let S=La(b,p,s,r,a);if(b&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(e)&&Array.isArray(b.authorizedCrossOriginNoCorsDomains)&&_a(b.authorizedCrossOriginNoCorsDomains),a){let h=e.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0];r.authentication.federatedServers[h]={token:[],expires:new Date(Date.now()+86400*1e3)},a=null}return S}else return b})}function ki(e,t={params:{f:"json"}}){let{request:n}=t,r=Gt(t,["request"]);return n?n(e,r):Oi(e,r).catch(i=>i instanceof tt&&t.authentication&&typeof t.authentication!="string"&&t.authentication.canRefresh&&t.authentication.refreshCredentials?i.retry(()=>t.authentication.refreshCredentials(),1):Promise.reject(i))}function $a(e){return typeof e!="string"||(e=e.trim(),e[e.length-1]==="/"&&(e=e.slice(0,-1))),e}function Re(e={}){return e.portal?$a(e.portal):e.authentication&&typeof e.authentication!="string"?e.authentication.portal:"https://www.arcgis.com/sharing/rest"}function Va(e){return e.owner?Promise.resolve(e.owner):e.item&&e.item.owner?Promise.resolve(e.item.owner):e.authentication&&e.authentication.getUsername?e.authentication.getUsername():Promise.reject(new Error("Could not determine the owner of this item. Pass the `owner`, `item.owner`, or `authentication` option."))}function Wa(e){return Array.isArray(e)&&Array.isArray(e[0])&&Array.isArray(e[1])}function qa(e){return e.join(",")}function Ai(e,t,n){if(!e)return e;let r=null;return typeof e.thumbnail=="string"&&(r=`${t}/content/items/${e.id}/info/${e.thumbnail}`,r&&e.access!=="public"&&n&&(r+=`?${n}`)),Object.assign(Object.assign({},e),r?{thumbnailUrl:r}:{})}function Ha(e){return Va(e).then(t=>{let n=e.folderId?`${Re(e)}/content/users/${t}/${e.folderId}/items/${e.item.id}/update`:`${Re(e)}/content/users/${t}/items/${e.item.id}/update`;e.params=Object.assign(Object.assign({},e.params),e.item),e.params.extent&&Wa(e.params.extent)&&(e.params.extent=qa(e.params.extent));let r=Re(e),i=Ai(Object.assign(Object.assign({},e.item),{access:e.item.access}),r),o=e.params.thumbnailUrl;return typeof i.thumbnailUrl=="string"&&typeof o=="string"&&i.thumbnailUrl.split("?")[0]===o.split("?")[0]&&delete e.params.thumbnailUrl,ki(n,e)})}function Ii(e,t){let n=Ka(e,t),r=Object.assign({httpMethod:"GET"},t);return ki(n,r).then(async i=>{let o=t?.portal||Re(t),s;return t?.authentication&&typeof t.authentication!="string"&&i.access!=="public"&&(s=await t.authentication.getToken(n)),Ai(i,o,s)})}var Ka=(e,t)=>`${typeof t=="string"?t:Re(t)}/content/items/${e}`;function Ga(e,t,n){return n.reduce((r,i)=>{let{action:o,targetProperty:s}=i;return o==="add"?r[s]={updatedAt:new Date,updatedBy:e}:o==="remove"&&delete r[s],r},t)}async function Ja({id:e,authentication:t,username:n,accessChangeset:r}){let{properties:i={}}=await Ii(e,{authentication:t}),o=i.telemetry,s=o===void 0?{}:o,{arcgis:{access:a={}}={}}=s,u=Gt(s,["arcgis"]),c=Ga(n,a,r);return Ha({item:{id:e,properties:Object.assign(Object.assign({},i),{telemetry:Object.assign(Object.assign({},u),{arcgis:{access:Object.assign({},c)}})})},authentication:t})}async function Xa({id:e,authentication:t}){let{properties:{telemetry:{arcgis:{access:n={}}={}}={}}}=await Ii(e,{authentication:t});return{access:n}}var Ht=class{constructor(t){this.name="amazon",this.isInitialized=!1;let{app:n={},fips:r,userPoolID:i}=t;this.analytics=os({app:n.name,version:n.version,plugins:[Ea({fips:r,pinpointAppId:n.id,getCredentials:()=>Wi(i,{fips:r})})]}),Object.assign(this,t)}init(){if(!this.isInitialized)return this.isInitialized=!0,Promise.resolve()}static async setAccessPermissions({id:t,authentication:n,username:r,accessChangeset:i}){return Ja({id:t,authentication:n,username:r,accessChangeset:i})}static async getAccessPermissions({id:t,authentication:n}){return Xa({id:t,authentication:n})}logPageView(t,n){let r=Xi({page:t,previousPage:this.previousPage,options:n,dimensionLookup:this.dimensions,metricLookup:this.metrics}),{pageUrl:i,pageName:o}=r;this.previousPage={pageUrl:i,pageName:o},this.analytics.track("pageView",r)}logEvent(t={}){let n=Ji({event:t,dimensionLookup:this.dimensions,metricLookup:this.metrics}),{name:r}=n;this.analytics.track(r,n)}},Fa=cn`:host{display:block}`,Kt=class extends fn{constructor(){super(...arguments),this.amazonAppId="",this.amazonAppName="",this.amazonUserPoolID="",this.amazonVersion="",this.firstUseVar="",this.measurementIds=[],this._open=!1,this._translations=pn({name:"consent-manager",blocking:!0}),this._loaded=!1,this.consentGranted=ln()}static{this.properties={amazonAppId:1,amazonAppName:1,amazonUserPoolID:1,amazonVersion:1,firstUseVar:1,measurementIds:0,portal:0,_open:16,_translations:16}}static{this.styles=Fa}async getInstance(){if(localStorage.getItem(this.firstUseVar)==="true"||this.portal?.eueiEnabled)return await this._init(),this._telemetryInstance}async load(){this._open=localStorage.getItem(this.firstUseVar)===null}render(){return""}loaded(){this.consentGranted.emit({granted:localStorage.getItem(this.firstUseVar)==="true"})}async _init(){if(!this._loaded){let t={info:console.info.bind(console),error:console.error.bind(console),warn:(r,...i)=>{(!r.includes("non-primitive value")||!r.includes("userSince"))&&console.warn(r,...i)}},n={plugins:[],portal:this.portal,logger:t};if(this.measurementIds?.length>0){let r=new At({measurementIds:this.measurementIds});n.plugins.push(r)}if(this.amazonUserPoolID){let r=new Ht({userPoolID:this.amazonUserPoolID,app:{name:this.amazonAppName,id:this.amazonAppId,version:this.amazonVersion}});n.plugins.push(r)}this._telemetryInstance=new kt(n),await this._telemetryInstance.init(),this._loaded=!0}}_alertClosed(){this._open=!1,localStorage.getItem(this.firstUseVar)!=="true"&&localStorage.setItem(this.firstUseVar,"false")}_accept(){localStorage.setItem(this.firstUseVar,"true"),this.consentGranted.emit({granted:!0}),this._open=!1}};dn("consent-manager",Kt);export{Kt as ConsentManager};
7
+ `)}async hexBodyHash(){let t=this.headers.get("X-Amz-Content-Sha256")||(this.service==="s3"&&this.signQuery?"UNSIGNED-PAYLOAD":null);if(t==null){if(this.body&&typeof this.body!="string"&&!("byteLength"in this.body))throw new Error("body must be a string, ArrayBuffer or ArrayBufferView, unless you include the X-Amz-Content-Sha256 header");t=vt(await fr(this.body||""))}return t}};async function _e(e,t){let n=await crypto.subtle.importKey("raw",typeof e=="string"?Nt.encode(e):e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]);return crypto.subtle.sign("HMAC",n,Nt.encode(t))}async function fr(e){return crypto.subtle.digest("SHA-256",typeof e=="string"?Nt.encode(e):e)}var dr=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function vt(e){let t=new Uint8Array(e),n="";for(let r=0;r<t.length;r++){let i=t[r];n+=dr[i>>>4&15],n+=dr[i&15]}return n}function pr(e){return e.replace(/[!'()*]/g,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase())}function As(e,t){let{hostname:n,pathname:r}=e;if(n.endsWith(".on.aws")){let a=n.match(/^[^.]{1,63}\.lambda-url\.([^.]{1,63})\.on\.aws$/);return a!=null?["lambda",a[1]||""]:["",""]}if(n.endsWith(".r2.cloudflarestorage.com"))return["s3","auto"];if(n.endsWith(".backblazeb2.com")){let a=n.match(/^(?:[^.]{1,63}\.)?s3\.([^.]{1,63})\.backblazeb2\.com$/);return a!=null?["s3",a[1]||""]:["",""]}let i=n.replace("dualstack.","").match(/([^.]{1,63})\.(?:([^.]{0,63})\.)?amazonaws\.com(?:\.cn)?$/),o=i&&i[1]||"",s=i&&i[2];if(s==="us-gov")s="us-gov-west-1";else if(s==="s3"||s==="s3-accelerate")s="us-east-1",o="s3";else if(o==="iot")n.startsWith("iot.")?o="execute-api":n.startsWith("data.jobs.iot.")?o="iot-jobs-data":o=r==="/mqtt"?"iotdevicegateway":"iotdata";else if(o==="autoscaling"){let a=(t.get("X-Amz-Target")||"").split(".")[0];a==="AnyScaleFrontendService"?o="application-autoscaling":a==="AnyScaleScalingPlannerFrontendService"&&(o="autoscaling-plans")}else s==null&&o.startsWith("s3-")?(s=o.slice(3).replace(/^fips-|^external-1/,""),o="s3"):o.endsWith("-fips")?o=o.slice(0,-5):s&&/-\d$/.test(o)&&!/-\d$/.test(s)&&([o,s]=[s,o]);return[Os[o]||o,s||""]}var on="Event",gr=on+"Listener";function Is(e){return function(t,n,r,i){var o=r||no,s=i||!1;if(!Z)return o;var a=et(n),u=et(t,!0);if(!u.length)throw new Error("noElements");if(!a.length)throw new Error("no"+on);var c=[];return(function p(l){l&&(c=[]);for(var x=l?"add"+gr:"remove"+gr,y=0;y<u.length;y++){var b=u[y];c[y]=l?s&&s.once?Es(o):o:c[y]||o;for(var S=0;S<a.length;S++)b[x]?b["on"+a[S]]=l?c[y]:null:b[x](a[S],c[y],s)}return p.bind(null,!l)})(e)}}function et(e,t){if(le(e))return t?et(document.querySelectorAll(e)):(n=e).split(n.indexOf(",")>-1?",":" ").map(function(s){return s.trim()});var n;if(NodeList.prototype.isPrototypeOf(e)){for(var r=[],i=e.length>>>0;i--;)r[i]=e[i];return r}var o=yo(e);return t?o.map(function(s){return le(s)?et(s,!0):s}).flat():o}function Es(e,t){var n;return function(){return e&&(n=e.apply(this,arguments),e=null),n}}var bt=Is(on);function ci(e,t){return Z&&ee(window[e])?(n=window[e],r=t,(i=window)===void 0&&(i=null),ee(n)?function(){n.apply(i,arguments),r.apply(i,arguments)}:r):window[e]=t;var n,r,i}ci.bind(null,"onerror");ci.bind(null,"onload");var li=typeof window>"u",hr="hidden";function Ps(e){if(li)return!1;var t=js(),n="".concat(t.replace(/[H|h]idden/,""),"visibilitychange"),r=function(){return e(!!document[t])},i=function(){return document.addEventListener(n,r)};return i(),function(){return document.removeEventListener(n,r),i}}function js(){var e=["webkit","moz","ms","o"];return li||hr in document?hr:e.reduce(function(t,n){var r=n+"Hidden";return!t&&r in document?r:t},null)}var Ts=["mousemove","mousedown","touchmove","touchstart","touchend","keydown"];function Ns(e,t){t===void 0&&(t={});var n=(function(s,a){var u=this,c=!1;return function(p){c||(s.call(u,p),c=!0,setTimeout(function(){return c=!1},a))}})(e,t.throttle||1e4),r=[];function i(){var s=Ps(function(a){a||n({type:"tabVisible"})});return r=[s].concat(Ts.map(function(a){return bt(document,a,n)})).concat(bt(window,"load",n)).concat(bt(window,"scroll",n,{capture:!0,passive:!0})),o}function o(){r.map(function(s){return s()})}return i(),function(){return o(),i}}function _s(e){var t,n,r=e.onIdle,i=e.onWakeUp,o=e.onHeartbeat,s=e.timeout,a=s,u=e.throttle,c=u,p=!1,l=!1,x=new Date,y=function(){return clearTimeout(t)};function b(h){y(),o&&!p&&o(Ce(x),h),i&&p&&(p=!1,i(Ce(n),h),x=new Date),t=setTimeout(function(){p=!0,r&&(n=new Date,r(Ce(x),h))},a)}var S=Ns(b,{throttle:c});return{disable:function(){l=!0,p=!1,y();var h=S();return function(){return l=!1,x=new Date,b({type:"load"}),h()}},getStatus:function(){return{isIdle:p,isDisabled:l,active:p?0:Ce(x,l),idle:p?Ce(n,l):0}}}}function Ce(e,t){return t?0:Math.round((new Date-e)/1e3)}var fi="object",Cs="string",mr="?",F="name",B="version",Ms="",yr="function",Us="undefined",Ds="BlackBerry",Rs="Chrome",zs="Firefox",vr={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ls=[[/microsoft (windows) (vista|xp)/i],[F,B],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[F,[B,br,vr]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[F,"Windows"],[B,br,vr]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[B,/_/g,"."],[F,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[F,"MacOS"],[B,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[B,F],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[F,B],[/\(bb(10);/i],[B,[F,Ds]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[B,[F,zs+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[B,[F,"webOS"]],[/crkey\/([\d\.]+)/i],[B,[F,Rs+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[F,"Chromium OS"],B],[/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/(unix) ?([\w\.]*)/i],[F,B]];function $s(e,t){for(var n=0,r,i,o,s,a,u;n<t.length&&!a;){var c=t[n],p=t[n+1];for(r=i=0;r<c.length&&!a;)if(a=c[r++].exec(e),a)for(o=0;o<p.length;o++)u=a[++i],s=p[o],te(s)===fi&&s.length>0?s.length==2?te(s[1])==yr?this[s[0]]=s[1].call(this,u):this[s[0]]=s[1]:s.length==3?te(s[1])===yr&&!(s[1].exec&&s[1].test)?this[s[0]]=u?s[1].call(this,u,s[2]):void 0:this[s[0]]=u?u.replace(s[1],s[2]):void 0:s.length==4&&(this[s[0]]=u?s[3].call(this,u.replace(s[1],s[2])):void 0):this[s]=u||void 0;n+=2}}function br(e,t){for(var n in t)if(te(t[n])===fi&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(wr(t[n][r],e))return n===mr?void 0:n}else if(wr(t[n],e))return n===mr?void 0:n;return e}function wr(e,t){return te(e)===Cs?xr(t).indexOf(xr(e))!==-1:!1}function xr(e){return e.toLowerCase()}function Vs(e){var t=(typeof window>"u"?"undefined":te(window))!==Us&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:Ms,n={};return n[F]=void 0,n[B]=void 0,$s.call(n,t,Ls),n}var di="Brave";function sn(){if(typeof window>"u")return{};if(!window.navigator)return{};var e=window.navigator,t=e.platform,n=e.product,r=e.vendor,i=Hs(window.navigator),o=i.type,s=i.version,a=o===di?o:(r||"").split(" ")[0];return{platform:t,os:Vs(),make:a||n,model:o,version:s,name:[o,s].join("/"),language:Ws(),timezone:qs()}}function Ws(){var e=window.navigator,t=e.language,n=e.browserLanguage,r=e.languages;return(t||n||(r||["en_US"])[0]).toLowerCase().replace("-","_")}function qs(){var e=/\(([A-Za-z\s].*)\)/.exec(new Date().toString());return e&&e[1]||""}function Hs(e){var t=e.userAgent,n=/.+(Opera[\s[A-Z]*|OPR[\sA-Z]*)\/([0-9\.]+).*/i.exec(t);if(n)return{type:n[1],version:n[2]};var r=/.+(Trident|Edge)\/([0-9\.]+).*/i.exec(t);if(r)return{type:r[1],version:r[2]};var i=/(headlesschrome)(?:\/([\w\.]+)| )/i.exec(t);if(i)return{type:i[1],version:i[2]};var o=/.+(Chrome|Firefox|FxiOS)\/([0-9\.]+).*/i.exec(t);if(o){var s=e.brave&&e.brave.isBrave||!1;return{type:s?di:o[1],version:o[2]}}var a=/.+(Safari)\/([0-9\.]+).*/i.exec(t);if(a)return{type:a[1],version:a[2]};var u=/.+(AppleWebKit)\/([0-9\.]+).*/i.exec(t);if(u)return{type:u[1],version:u[2]};var c=/.*([A-Z]+)\/([0-9\.]+).*/i.exec(t),p=c||["","NA","0.0.0"];return{type:p[1],version:p[2]}}function Ks(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t[e]||e}function Mt(e){return Ut.apply(this,arguments)}function Ut(){return Ut=re(K.mark(function e(t){var n,r,i,o,s,a,u=arguments;return K.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:n=u.length>1&&u[1]!==void 0?u[1]:!1,r={},c.t0=K.keys(t);case 3:if((c.t1=c.t0()).done){c.next=13;break}return i=c.t1.value,o=Array.isArray(t[i])?t[i]:[t[i]],s=n?o:o[0],c.next=9,gi(s,Gs);case 9:a=c.sent,hi(a)||(r[i]=a),c.next=3;break;case 13:return c.abrupt("return",r);case 14:case"end":return c.stop()}},e)})),Ut.apply(this,arguments)}function pi(e){return Dt.apply(this,arguments)}function Dt(){return Dt=re(K.mark(function e(t){var n,r;return K.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:n={},i.t0=K.keys(t);case 2:if((i.t1=i.t0()).done){i.next=9;break}return r=i.t1.value,i.next=6,gi(t[r],Js);case 6:n[r]=i.sent,i.next=2;break;case 9:return i.abrupt("return",n);case 10:case"end":return i.stop()}},e)})),Dt.apply(this,arguments)}function gi(e,t){return Rt.apply(this,arguments)}function Rt(){return Rt=re(K.mark(function e(t,n){return K.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(typeof t!="function"){r.next=4;break}return r.next=3,t();case 3:t=r.sent;case 4:return r.abrupt("return",n(t));case 5:case"end":return r.stop()}},e)})),Rt.apply(this,arguments)}function Gs(e){if(e!=null)return Array.isArray(e)?e.filter(Xs).map(function(t){return t.toString()}):hi(e)?e:e.toString()}function Js(e){return parseFloat(Number(Array.isArray(e)?e[0]:e))}function Xs(e){return e!==null&&typeof e<"u"}function hi(e){return e==null}var zt="_session.start",ut="_session.stop",mi="pageView";function Fs(e){return Lt.apply(this,arguments)}function Lt(){return Lt=re(K.mark(function e(t){var n,r,i,o,s,a,u,c,p,l,x,y,b,S,h,f,m,O,w,v,A,k,C,M,P,z,U,q,$,E,H,D=arguments;return K.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(n=D.length>1&&D[1]!==void 0?D[1]:{},r=D.length>2&&D[2]!==void 0?D[2]:{},i=r.appTitle,o=r.appPackageName,s=r.appVersionCode,a=r.eventMapping,u=r.enrichEventAttributes,c=r.enrichEventMetrics,p=r.debug,l=p?console.log:function(){},x=Ks(t,a),y=Le(),b=n.sessionId||y.id,S=n.sessionStart||y.createdAt,h=n.sessionStart?new Date(n.sessionStart).getTime():y.created,l("event sessionData ",JSON.stringify(y)),be&&(f=rn(),m=ui(),l("event pageSessionInfo",JSON.stringify(f)),l("event tabSessionData ",JSON.stringify(m))),O=n.attributes||{},w=n.eventId||xe(),v=n.time?new Date(n.time):new Date,A=v.toISOString(),k=v.getTime()-h,C=J({date:A,sessionId:b},be?{pageSession:f.id}:{}),!u){N.next=23;break}return N.next=20,u();case 20:N.t0=N.sent,N.next=24;break;case 23:N.t0={};case 24:if(M=N.t0,P=J(J(J({},C),M),O),z=n.metrics||{},U={sessionTime:y.elapsed||k,hour:v.getHours(),day:v.getDay()+1,month:v.getMonth()+1,year:v.getFullYear()},!c){N.next=34;break}return N.next=31,c();case 31:N.t1=N.sent,N.next=35;break;case 34:N.t1={};case 35:return q=N.t1,$=J(J(J({},U),q),z),N.next=39,Mt(P);case 39:return N.t2=N.sent,N.next=42,pi($);case 42:return N.t3=N.sent,E={attributes:N.t2,metrics:N.t3},l("".concat(w,":").concat(x)),l("eventAttributes",E.attributes),l("eventMetrics",E.metrics),be&&l("clientInfo",sn()),H=tn({},w,J(J({EventType:x,Timestamp:A,AppPackageName:o,AppTitle:i},s?{AppVersionCode:s}:{}),{},{Attributes:E.attributes,Metrics:E.metrics,Session:{Id:b,StartTimestamp:S}})),t===ut&&(H[w].Session.Duration=k,H[w].Session.StopTimestamp=A),N.abrupt("return",H);case 51:case"end":return N.stop()}},e)})),Lt.apply(this,arguments)}var Bs="__endpoint";function ct(e){return"".concat(Bs,".").concat(e)}var Sr="__endpoint",Or=!1;function an(){return $t.apply(this,arguments)}function $t(){return $t=re(K.mark(function e(){var t,n,r,i,o,s,a,u,c,p,l,x,y,b,S,h,f,m,O,w,v,A=arguments;return K.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return t=A.length>0&&A[0]!==void 0?A[0]:{},n=A.length>1&&A[1]!==void 0?A[1]:{},r=n.getUserId,i=n.getEndpointId,o=n.endpointMigration,s=ra(n),a=s.sessionKey?s.sessionKey():"sessions",u=s.pageViewKey?s.pageViewKey():"pageViews",be&&(l=sn(),c=rn(),p=c.id),x=Le(),k.next=10,i();case 10:if(y=k.sent,Or||(Or=!0,b=Ft(Sr),b&&(wt(y,b),Qr(Sr))),S=Qs(y),h=ta(n),f=Ys(h,l),m={Attributes:{},Demographic:f,Location:{},Metrics:{}},be&&(l.device&&l.device.vendor&&(m.Attributes.DeviceMake=[l.device.vendor]),l.device&&l.device.model&&(m.Attributes.DeviceModel=[l.device.model]),l.device&&l.device.type&&(m.Attributes.DeviceType=[l.device.type])),t=Ss.all([S,m,t],{arrayMerge:na}),!(t.User&&t.User.UserId)){k.next=23;break}return k.next=21,r();case 21:O=k.sent,t.User.UserId!==O&&(t.User.UserId=O);case 23:if(!(!t.User||!t.User.UserId)){k.next=28;break}return k.next=26,r();case 26:w=k.sent,w&&(t.User=t.User||{},t.User.UserId=w);case 28:if(!(t.User&&t.User.UserAttributes)){k.next=32;break}return k.next=31,Mt(t.User.UserAttributes,!0);case 31:t.User.UserAttributes=k.sent;case 32:return k.next=34,Mt(t.Attributes,!0);case 34:return t.Attributes=k.sent,k.next=37,pi(t.Metrics);case 37:if(t.Metrics=k.sent,t.Metrics[a]||(t.Metrics[a]=1),t.Metrics[u]||(t.Metrics[u]=1),o&&(t=o(y,t)),v=t.Attributes.lastSession,v){k.next=47;break}return t.Attributes.lastSessionDate=[x.createdAt],t.Attributes.lastSession=[x.id],p&&(t.Attributes.lastPageSession=[p]),k.abrupt("return",wt(y,t));case 47:return v&&v[0]!==x.id&&(t.Attributes.lastSessionDate=[x.createdAt],t.Attributes.lastSession=[x.id],t.Metrics[a]+=1),t.Attributes&&t.Attributes.lastPageSession&&Array.isArray(t.Attributes.lastPageSession)&&t.Attributes.lastPageSession.length>0&&t.Attributes.lastPageSession[0]!==p&&(t.Attributes.lastPageSession=[p],t.Metrics[u]+=1),k.abrupt("return",wt(y,t));case 50:case"end":return k.stop()}},e)})),$t.apply(this,arguments)}function wt(e,t){var n=ct(e),r=bs(t)?t:JSON.stringify(t);return Xo(n,r),t}function Qs(e){try{return JSON.parse(Ft(ct(e)))||{}}catch{}return{}}function Ys(e,t){return be?ea(e,t):Zs(e)}function Zs(e){var t={AppVersion:e,Make:"generic server",Platform:"Node.js",PlatformVersion:process.version};return t}function ea(e,t){var n={AppVersion:e,Locale:t.language,Make:t.make,Model:t.model,ModelVersion:t.version,Platform:t.os.name||t.platform};return t.os&&t.os.version&&(n.PlatformVersion=t.os.version),n}function ta(e){var t=e.appTitle||e.appPackageName||"",n=e.appVersionCode||"0.0.0";return t?"".concat(t,"@").concat(n):n}function na(e,t){return t}function ra(e){var t=e.getContext;return typeof t=="function"?t():t}function ia(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function(){var n=re(K.mark(function i(o){var s,a,u,c,p=arguments;return K.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return s=p.length>1&&p[1]!==void 0?p[1]:{},a=p.length>2&&p[2]!==void 0?p[2]:{},u=p.length>3&&p[3]!==void 0?p[3]:!1,cr(s)&&(s={},u=s),cr(a)&&(a={},u=a),l.next=7,Fs(o,s,t);case 7:if(c=l.sent,!(Object.entries(a).length||o===mi)){l.next=12;break}return l.next=11,an(a,t);case 11:a=l.sent;case 12:if(e.push(c),!u){l.next=17;break}return l.abrupt("return",e.flush());case 17:case"end":return l.stop()}},i)}));function r(i){return n.apply(this,arguments)}return r})()}var kr,oa=[429,500],sa=[202],aa=400;function ua(e,t){return Vt.apply(this,arguments)}function Vt(){return Vt=re(K.mark(function e(t,n){var r,i,o,s,a,u,c,p,l,x,y,b,S,h,f,m,O,w,v;return K.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return r=n.pinpointRegion,i=n.pinpointAppId,o=n.lambdaArn,s=n.lambdaRegion,a=n.credentials,u=n.getCredentials,c=n.debug,A.next=3,ca(a,u);case 3:return p=A.sent,c&&console.log("pinpoint auth",p),l=s||r,x=r||s,y=n.fips===!0?"-fips":"",b="https://lambda.".concat(l,".amazonaws.com/2015-03-31/functions/").concat(o,"/invocations"),S="https://pinpoint".concat(y,".").concat(x,".amazonaws.com/v1/apps/").concat(i,"/events"),h=o?b:S,O={body:JSON.stringify(t)},f=new _t(p),A.next=16,f.fetch(h,O).then(function(k){return k.json()});case 16:m=A.sent,A.next=24;break;case 19:return f=new kr.PinpointClient({credentials:p,region:r}),w=new kr.PutEventsCommand({ApplicationId:i,EventsRequest:t}),A.next=23,f.send(w);case 23:m=A.sent;case 24:return m&&m.Results&&(v=Object.keys(m.Results).map(function(k){return m.Results[k]}),v.forEach(function(k){var C=k.EndpointItemResponse||{},M=k.EventsItemResponse||{};Object.keys(C).length&&(sa.includes(C.StatusCode)||oa.includes(C.StatusCode)||la(C,Endpoint));var P=Object.keys(M);P.length&&P.forEach(function(z){})})),A.abrupt("return",m);case 26:case"end":return A.stop()}},e)})),Vt.apply(this,arguments)}function ca(e,t){return Wt.apply(this,arguments)}function Wt(){return Wt=re(K.mark(function e(t,n){var r,i;return K.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(r=t,!(!Object.keys(r).length&&n)){o.next=11;break}return o.prev=2,o.next=5,n();case 5:r=o.sent,o.next=11;break;case 8:throw o.prev=8,o.t0=o.catch(2),new Error(o.t0);case 11:return i={accessKeyId:r.accessKeyId||r.AccessKeyId,secretAccessKey:r.secretAccessKey||r.SecretKey,sessionToken:r.sessionToken||r.SessionToken,retries:5},o.abrupt("return",i);case 13:case"end":return o.stop()}},e,null,[[2,8]])})),Wt.apply(this,arguments)}function la(e,t){var n=e.StatusCode,r=e.Message;if(n===aa){if(r.startsWith("Missing ChannelType"))throw new Error("Missing ChannelType");if(r.startsWith("Exceeded maximum endpoint per user count"))throw new Error("Exceeded maximum endpoint per user count")}}var fa=["PUSH","GCM","APNS","APNS_SANDBOX","APNS_VOIP","APNS_VOIP_SANDBOX","ADM","SMS","VOICE","EMAIL","BAIDU","CUSTOM"],xt=fa.reduce(function(e,t){return e[t]=t,e},{}),da=sn(),Ar=zt,Ir=ut,pa=/.+\@.+\..+/;function ga(e){return pa.test(e)}function ha(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.getEndpointId,n=e.debug;return(function(){var r=re(K.mark(function o(){var s,a,u,c,p,l,x,y,b,S,h=arguments;return K.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=h.length>0&&h[0]!==void 0?h[0]:[],a=h.length>1&&h[1]!==void 0?h[1]:{},f.next=4,t();case 4:if(u=f.sent,u){f.next=8;break}return console.error("No endpoint id. check getEndpointId()"),f.abrupt("return");case 8:if(c=te(a)==="object"&&Object.keys(a).length,c){f.next=13;break}f.t0=ma(u),f.next=16;break;case 13:return f.next=15,an(a,e);case 15:f.t0=f.sent;case 16:return p=f.t0,l=p.ChannelType,p.Address&&ga(p.Address)&&(l=xt.EMAIL),!l&&p.Address&&(da.platform==="android"?l=l||xt.GCM:l=l||xt.APNS),n&&(console.log("Endpoint",p),console.log("CHANNEL_TYPE",l)),p.RequestId=xe(),p.ChannelType=l,p.Address&&(p.OptOut=p.OptOut||"NONE"),x=ya(s),y=va(u,p,x),f.prev=26,f.next=29,ua(y,e);case 29:b=f.sent,f.next=36;break;case 32:f.prev=32,f.t1=f.catch(26),console.log("Error calling AWS",f.t1),S=f.t1;case 36:return f.abrupt("return",{endpoint:p,response:b,error:S,events:s});case 37:case"end":return f.stop()}},o,null,[[26,32]])}));function i(){return r.apply(this,arguments)}return i})()}function ma(e){try{return JSON.parse(Ft(ct(e)))||{}}catch{}return{}}function ya(e){return e.sort(function(t,n){var r=t.EventType,i=n.EventType;if(r==Ar)return-1;if(i==Ar||r==Ir)return 1;if(i==Ir)return-1}).reduce(function(t,n){return J(J({},n),t)},{})}function va(e,t,n){return{BatchItem:tn({},e,{Endpoint:t,Events:n})}}var ba=ut;function yi(){return{}}function wa(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=J({getContext:e.getContext||yi,credentials:e.credentials||{},getEndpointId:e.getEndpointId},e),n=t.debug?console.log:function(){},r=ha(t),i=hs((function(){var u=re(K.mark(function c(p,l){var x;return K.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return p.forEach(function(b){return n("> Queue event",b)}),y.next=3,r(p,{});case 3:x=y.sent,n("> Queue response",x);case 5:case"end":return y.stop()}},c)}));return function(c,p){return u.apply(this,arguments)}})(),{max:10,interval:e.flushInterval||3e3,throttle:!0}),o=ia(i,t);an({},e);var s=xa(o);function a(u){return r([],u)}return{updateEndpoint:a,recordEvent:o,disable:function(){s()}}}function xa(e){if(!be)return yi;var t=Sa(e);return window.addEventListener("beforeunload",t),function(){return window.removeEventListener("beforeunload",t)}}function Sa(e){return function(){e(ba,!0)}}function St(){throw new Error("Pinpoint not loaded")}function Oa(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return typeof r=="number"&&(t.metrics[n]=r),(typeof r=="string"||typeof r=="boolean")&&(t.attributes[n]=r),t},{attributes:{},metrics:{}})}function ka(e){var t=e.config,n=e.instance;t&&t.disableAnonymousTraffic&&!n.user("userId")&&n.once("identifyStart",function(r){var i=r.plugins,o=i["aws-pinpoint"];o.loaded()||n.loadPlugin("aws-pinpoint")})}var Aa={disableAnonymousTraffic:!1,pinpointRegion:"us-east-1",eventMapping:{}};function Ia(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t,n,r=!1;function i(){var s=Le();e.debug&&console.log("Stop session",s),t(ut,!0)}function o(){var s=Ze(30);e.debug&&console.log("START SESSION",s),t(zt)}return{name:"aws-pinpoint",config:J(J({},Aa),e),bootstrap:ka,initialize:function(s){var a=s.config,u=s.instance,c=a.disableAnonymousTraffic,p=a.debug,l=p?console.log:function(){},x=u.getState(),y=x.user||{},b=y.userId,S=y.anonymousId,h=x.context||{},f=h.app,m=h.version,O=h.campaign,w=rn(),v=ui(),A=Le();if(l("initPageSession",w),l("initTabSession",v),l("initSessionData",A),A&&A.anonId&&A.anonId!==S){l("anonId different refresh session details"),ur(),vs();var k=Ze(30,{anonId:S,userId:b});l("newSessionForNewUser",k)}if(!b&&c)return!1;var C=Object.keys(O).reduce(function(U,q){return U["utm_".concat(q)]=O[q],U},{}),M=wa(J(J({},a),{},{appTitle:a.appTitle||f,appPackageName:a.appPackageName||f,appVersionCode:a.appVersionCode||m,eventMapping:a.eventMapping,getEndpointId:function(){return u.user("anonymousId")},getUserId:function(){return u.user("userId")},getContext:function(){return{sessionKey:a.sessionKey,pageViewKey:a.pageViewKey,initialSession:A}},enrichEventAttributes:function(){return J({anonId:u.user("anonymousId"),userId:u.user("userId"),hash:window.location.hash,path:window.location.pathname,referrer:document.referrer,search:window.location.search,title:document.title,host:window.location.hostname,url:window.location.origin+window.location.pathname},C)},enrichUserAttributes:a.enrichUserAttributes,enrichEventMetrics:function(){return{}}}));t=M.recordEvent,n=M.updateEndpoint,A&&A.isNew&&(l("Start brand new session because cookie not found"),t(zt));var P=18e5,z=P;_s({timeout:z,throttle:2e4,onIdle:function(U,q){l("Session idle. Active ".concat(U," seconds")),i()},onWakeUp:function(U,q){l("Session wakeup. Idle ".concat(U," seconds")),o()},onHeartbeat:function(U,q){l("ping session",new Date),l("total active time",U);var $=u.user();ys(30,{anonId:$.anonymousId,userId:$.userId})}})},page:function(s){if(s.payload,s.config,!t)return St();r&&ur(),t(mi),r=!0},track:function(s){var a=s.payload,u=s.config;if(s.instance,!t)return St();if(!(u.disableAnonymousTraffic&&!a.userId)){var c=Oa(a.properties);t(a.event,c)}},identify:function(s){var a=s.payload,u=a.userId,c=a.traits;if(!n)return St();var p={},l={};u&&(l.UserId=u),c&&Object.keys(c).length&&(l.UserAttributes=c),Object.keys(l).length&&(p.User=l),n(p,!0)},reset:function(s){var a=s.instance,u=a.user("anonymousId"),c=ct(u);Qr(c)},loaded:function(){return!!t}}}var Ea=Ia;function vi(e){return Object.keys(e).some(t=>{let n=e[t];if(!n)return!1;switch(n&&n.toParam&&(n=n.toParam()),n.constructor.name){case"Array":return!1;case"Object":return!1;case"Date":return!1;case"Function":return!1;case"Boolean":return!1;case"String":return!1;case"Number":return!1;default:return!0}})}function bi(e){let t={};return Object.keys(e).forEach(n=>{var r,i;let o=e[n];if(o&&o.toParam&&(o=o.toParam()),!o&&o!==0&&typeof o!="boolean"&&typeof o!="string")return;let s=o.constructor.name,a;switch(s){case"Array":let u=(i=(r=o[0])===null||r===void 0?void 0:r.constructor)===null||i===void 0?void 0:i.name;a=u==="Array"?o:u==="Object"?JSON.stringify(o):o.join(",");break;case"Object":a=JSON.stringify(o);break;case"Date":a=o.valueOf();break;case"Function":a=null;break;case"Boolean":a=o+"";break;default:a=o;break}(a||a===0||typeof a=="string"||Array.isArray(a))&&(t[n]=a)}),t}function wi(e,t){return Array.isArray(t)&&t[0]&&Array.isArray(t[0])?t.map(n=>wi(e,n)).join("&"):encodeURIComponent(e)+"="+encodeURIComponent(t)}function xi(e){let t=bi(e);return Object.keys(t).map(n=>wi(n,t[n])).join("&")}var Pa=globalThis.FormData;function ja(e,t){let n=vi(e)||t,r=bi(e);if(n){let i=new Pa;return Object.keys(r).forEach(o=>{if(typeof Blob<"u"&&r[o]instanceof Blob){let s=r.fileName||r[o].name||o;i.append(o,r[o],s)}else i.append(o,r[o])}),i}else return xi(e)}var de=class extends Error{constructor(t,n,r,i,o){super(t);let s=new.target.prototype;Object.setPrototypeOf(this,s),t=t||"UNKNOWN_ERROR",n=n||"UNKNOWN_ERROR_CODE",this.name="ArcGISRequestError",this.message=n==="UNKNOWN_ERROR_CODE"?t:`${n}: ${t}`,this.originalMessage=t,this.code=n,this.response=r,this.url=i,this.options=o}},Ta={noCorsDomains:[],crossOriginNoCorsDomains:{},pendingNoCorsRequests:{}},qt="ARCGIS_REST_JS_NO_CORS";globalThis[qt]||(globalThis[qt]=Object.assign({},Ta));var Y=globalThis[qt];function Na(e){let t=new URL(e);e=t.origin+t.pathname,t.search.includes("f=json")&&(e+="?f=json");let n=t.origin;return Y.pendingNoCorsRequests[n]||(Y.pendingNoCorsRequests[n]=fetch(e,{mode:"no-cors",credentials:"include",cache:"no-store"}).then(r=>{Y.noCorsDomains.indexOf(n)===-1&&Y.noCorsDomains.push(n),Y.crossOriginNoCorsDomains[n.toLowerCase()]=Date.now(),delete Y.pendingNoCorsRequests[n]}).catch(r=>(delete Y.pendingNoCorsRequests[n],Promise.reject(new Error(`no-cors request to ${n} failed`))))),Y.pendingNoCorsRequests[n]}function _a(e){e.forEach(t=>{t=t.toLowerCase(),/^https?:\/\//.test(t)?Ot(t):(Ot("http://"+t),Ot("https://"+t))})}function Ot(e){let t=new URL(e).origin;Y.noCorsDomains.indexOf(t)===-1&&Y.noCorsDomains.push(t)}function Si(e){let t=!1;if(Y.noCorsDomains.length){let n=new URL(e).origin.toLowerCase();t=Y.noCorsDomains.some(r=>n.includes(r))}return t}function Ca(e){let t=!1;if(Si(e)){let n=new URL(e).origin.toLowerCase(),r=Y.crossOriginNoCorsDomains[n]||0;Date.now()-60*6e4>r&&(t=!0)}return t}function Ma(e){console&&console.warn&&console.warn.apply(console,[e])}function Ua(){return Promise.resolve({fetch:globalThis.fetch,Headers:globalThis.Headers,Response:globalThis.Response,Request:globalThis.Request})}function Da(e,t){var n;if(!t&&!window||!e)return!1;{t=t||window;let r=(n=t.location)===null||n===void 0?void 0:n.origin;return e.startsWith(r)}}var Ra="@esri/arcgis-rest-js";function za(){return globalThis.DEFAULT_ARCGIS_REQUEST_OPTIONS||{httpMethod:"POST",params:{f:"json"}}}var tt=class extends de{constructor(t="AUTHENTICATION_ERROR",n="AUTHENTICATION_ERROR_CODE",r,i,o){super(t,n,r,i,o),this.name="ArcGISAuthError",this.message=n==="AUTHENTICATION_ERROR_CODE"?t:`${n}: ${t}`;let s=new.target.prototype;Object.setPrototypeOf(this,s)}retry(t,n=1){let r=0,i=(o,s)=>{r=r+1,t(this.url,this.options).then(a=>{let u=Object.assign(Object.assign({},this.options),{authentication:a});return Oi(this.url,u)}).then(a=>{o(a)}).catch(a=>{a.name==="ArcGISAuthError"&&r<n?i(o,s):a.name===this.name&&a.message===this.message&&r>=n?s(this):s(a)})};return new Promise((o,s)=>{i(o,s)})}};function La(e,t,n,r,i){if(e.code>=400){let{message:o,code:s}=e;throw new de(o,s,e,t,r)}if(e.error){let{message:o,code:s,messageCode:a}=e.error,u=a||s||"UNKNOWN_ERROR_CODE";throw s===498||s===499?i||new tt(o,u,e,t,r):new de(o,u,e,t,r)}if(e.status==="failed"||e.status==="failure"){let o,s="UNKNOWN_ERROR_CODE";try{o=JSON.parse(e.statusMessage).message,s=JSON.parse(e.statusMessage).code}catch{o=e.statusMessage||e.message}throw new de(o,s,e,t,r)}return e}function Oi(e,t){let n=za(),r=Object.assign(Object.assign(Object.assign({httpMethod:"POST"},n),t),{params:Object.assign(Object.assign({},n.params),t.params),headers:Object.assign(Object.assign({},n.headers),t.headers)}),{httpMethod:i,rawResponse:o}=r,s=Object.assign({f:"json"},r.params),a=null,u={method:i,signal:r.signal,credentials:r.credentials||"same-origin"};Si(e)&&(u.credentials="include"),r.headers&&r.headers["X-Esri-Auth-Client-Id"]&&e.indexOf("/oauth2/platformSelf")>-1&&(u.credentials="include");let c;if(typeof r.authentication=="string"){let b=r.authentication;c={portal:"https://www.arcgis.com/sharing/rest",getToken:()=>Promise.resolve(b)},!r.authentication.startsWith("AAPK")&&!r.authentication.startsWith("AAPT")&&!r.authentication.startsWith("AATK")&&!r.authentication.startsWith("AAST")&&!r.suppressWarnings&&!globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING&&(Ma("Using an oAuth 2.0 access token directly in the token option is discouraged. Consider using ArcGISIdentityManager or Application session. See https://esriurl.com/arcgis-rest-js-direct-token-warning for more information."),globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING=!0)}else c=r.authentication;let p=e,l=!1;typeof window<"u"&&(l=Da(e));let x=!l&&Ca(e);r.headers&&r.headers["X-Esri-Auth-Client-Id"]&&e.indexOf("/oauth2/platformSelf")>-1&&(u.credentials="include");let y=Promise.resolve();return x&&(u.credentials="include",y=Na(e)),y.then(()=>c?c.getToken(e).catch(b=>(b.url=e,b.options=r,a=b,Promise.resolve(""))):Promise.resolve("")).then(b=>{b.length&&(s.token=b),c&&c.getDomainCredentials&&(u.credentials=c.getDomainCredentials(e));let S={};if(u.method==="GET"){s.token&&r.hideToken&&typeof window>"u"&&(S["X-Esri-Authorization"]=`Bearer ${s.token}`,delete s.token);let f=xi(s),m=f===""?e:`${e}?${f}`;r.maxUrlLength&&m.length>r.maxUrlLength||!r.maxUrlLength&&m.length>2e3||s.token&&r.hideToken?(u.method="POST",b.length&&r.hideToken&&(s.token=b,delete S["X-Esri-Authorization"])):e=m}let h=new RegExp("/items/.+/updateResources").test(e);return u.method==="POST"&&(u.body=ja(s,h)),u.headers=Object.assign(Object.assign({},S),r.headers),(typeof window>"u"||window&&typeof window.document>"u")&&!u.headers.referer&&(u.headers.referer=Ra),!vi(s)&&!h&&(u.headers["Content-Type"]="application/x-www-form-urlencoded"),globalThis.fetch?globalThis.fetch(e,u):Ua().then(({fetch:f})=>f(e,u))}).then(b=>{if(!b.ok)return b.json().then(S=>{let{status:h,statusText:f}=b,{message:m,details:O}=S.error,w=`${m}. ${O?O.join(" "):""}`.trim();throw new de(w,`HTTP ${h} ${f}`,S,e,r)}).catch(S=>{if(S.name==="ArcGISRequestError")throw S;let{status:h,statusText:f}=b;throw new de(f,`HTTP ${h}`,b,e,r)});if(o)return console.warn("rawResponse option is deprecated and will be removed in ArcGIS REST JS v5.0."),b;switch(s.f){case"json":return b.json();case"geojson":return b.json();case"html":return b.text();case"text":return b.text();default:return b.blob()}}).then(b=>{if((s.f==="json"||s.f==="geojson")&&!o){let S=La(b,p,s,r,a);if(b&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(e)&&Array.isArray(b.authorizedCrossOriginNoCorsDomains)&&_a(b.authorizedCrossOriginNoCorsDomains),a){let h=e.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0];r.authentication.federatedServers[h]={token:[],expires:new Date(Date.now()+86400*1e3)},a=null}return S}else return b})}function ki(e,t={params:{f:"json"}}){let{request:n}=t,r=Gt(t,["request"]);return n?n(e,r):Oi(e,r).catch(i=>i instanceof tt&&t.authentication&&typeof t.authentication!="string"&&t.authentication.canRefresh&&t.authentication.refreshCredentials?i.retry(()=>t.authentication.refreshCredentials(),1):Promise.reject(i))}function $a(e){return typeof e!="string"||(e=e.trim(),e[e.length-1]==="/"&&(e=e.slice(0,-1))),e}function Re(e={}){return e.portal?$a(e.portal):e.authentication&&typeof e.authentication!="string"?e.authentication.portal:"https://www.arcgis.com/sharing/rest"}function Va(e){return e.owner?Promise.resolve(e.owner):e.item&&e.item.owner?Promise.resolve(e.item.owner):e.authentication&&e.authentication.getUsername?e.authentication.getUsername():Promise.reject(new Error("Could not determine the owner of this item. Pass the `owner`, `item.owner`, or `authentication` option."))}function Wa(e){return Array.isArray(e)&&Array.isArray(e[0])&&Array.isArray(e[1])}function qa(e){return e.join(",")}function Ai(e,t,n){if(!e)return e;let r=null;return typeof e.thumbnail=="string"&&(r=`${t}/content/items/${e.id}/info/${e.thumbnail}`,r&&e.access!=="public"&&n&&(r+=`?${n}`)),Object.assign(Object.assign({},e),r?{thumbnailUrl:r}:{})}function Ha(e){return Va(e).then(t=>{let n=e.folderId?`${Re(e)}/content/users/${t}/${e.folderId}/items/${e.item.id}/update`:`${Re(e)}/content/users/${t}/items/${e.item.id}/update`;e.params=Object.assign(Object.assign({},e.params),e.item),e.params.extent&&Wa(e.params.extent)&&(e.params.extent=qa(e.params.extent));let r=Re(e),i=Ai(Object.assign(Object.assign({},e.item),{access:e.item.access}),r),o=e.params.thumbnailUrl;return typeof i.thumbnailUrl=="string"&&typeof o=="string"&&i.thumbnailUrl.split("?")[0]===o.split("?")[0]&&delete e.params.thumbnailUrl,ki(n,e)})}function Ii(e,t){let n=Ka(e,t),r=Object.assign({httpMethod:"GET"},t);return ki(n,r).then(async i=>{let o=t?.portal||Re(t),s;return t?.authentication&&typeof t.authentication!="string"&&i.access!=="public"&&(s=await t.authentication.getToken(n)),Ai(i,o,s)})}var Ka=(e,t)=>`${typeof t=="string"?t:Re(t)}/content/items/${e}`;function Ga(e,t,n){return n.reduce((r,i)=>{let{action:o,targetProperty:s}=i;return o==="add"?r[s]={updatedAt:new Date,updatedBy:e}:o==="remove"&&delete r[s],r},t)}async function Ja({id:e,authentication:t,username:n,accessChangeset:r}){let{properties:i={}}=await Ii(e,{authentication:t}),o=i.telemetry,s=o===void 0?{}:o,{arcgis:{access:a={}}={}}=s,u=Gt(s,["arcgis"]),c=Ga(n,a,r);return Ha({item:{id:e,properties:Object.assign(Object.assign({},i),{telemetry:Object.assign(Object.assign({},u),{arcgis:{access:Object.assign({},c)}})})},authentication:t})}async function Xa({id:e,authentication:t}){let{properties:{telemetry:{arcgis:{access:n={}}={}}={}}}=await Ii(e,{authentication:t});return{access:n}}var Ht=class{constructor(t){this.name="amazon",this.isInitialized=!1;let{app:n={},fips:r,userPoolID:i}=t;this.analytics=os({app:n.name,version:n.version,plugins:[Ea({fips:r,pinpointAppId:n.id,getCredentials:()=>Wi(i,{fips:r})})]}),Object.assign(this,t)}init(){if(!this.isInitialized)return this.isInitialized=!0,Promise.resolve()}static async setAccessPermissions({id:t,authentication:n,username:r,accessChangeset:i}){return Ja({id:t,authentication:n,username:r,accessChangeset:i})}static async getAccessPermissions({id:t,authentication:n}){return Xa({id:t,authentication:n})}logPageView(t,n){let r=Xi({page:t,previousPage:this.previousPage,options:n,dimensionLookup:this.dimensions,metricLookup:this.metrics}),{pageUrl:i,pageName:o}=r;this.previousPage={pageUrl:i,pageName:o},this.analytics.track("pageView",r)}logEvent(t={}){let n=Ji({event:t,dimensionLookup:this.dimensions,metricLookup:this.metrics}),{name:r}=n;this.analytics.track(r,n)}},Fa=cn`:host{display:block}`,Kt=class extends fn{constructor(){super(...arguments),this.amazonAppId="",this.amazonAppName="",this.amazonUserPoolID="",this.amazonVersion="",this.firstUseVar="",this.measurementIds=[],this._open=!1,this._translations=pn({name:"consent-manager",blocking:!0}),this._loaded=!1,this.consentGranted=ln()}static{this.properties={amazonAppId:1,amazonAppName:1,amazonUserPoolID:1,amazonVersion:1,firstUseVar:1,measurementIds:0,portal:0,_open:16,_translations:16}}static{this.styles=Fa}async getInstance(){if(localStorage.getItem(this.firstUseVar)==="true"||this.portal?.eueiEnabled)return await this._init(),this._telemetryInstance}async load(){this._open=localStorage.getItem(this.firstUseVar)===null}render(){return""}loaded(){this.consentGranted.emit({granted:localStorage.getItem(this.firstUseVar)==="true"})}async _init(){if(!this._loaded){let t={info:console.info?console.info.bind(console):console.log.bind(console),error:console.error?console.error.bind(console):console.log.bind(console),warn:(r,...i)=>{(!r.includes("non-primitive value")||!r.includes("userSince"))&&(console.warn||console.log)(r,...i)}},n={plugins:[],portal:this.portal,logger:t};if(this.measurementIds?.length>0){let r=new At({measurementIds:this.measurementIds});n.plugins.push(r)}if(this.amazonUserPoolID){let r=new Ht({userPoolID:this.amazonUserPoolID,app:{name:this.amazonAppName,id:this.amazonAppId,version:this.amazonVersion}});n.plugins.push(r)}this._telemetryInstance=new kt(n),await this._telemetryInstance.init(),this._loaded=!0}}_alertClosed(){this._open=!1,localStorage.getItem(this.firstUseVar)!=="true"&&localStorage.setItem(this.firstUseVar,"false")}_accept(){localStorage.setItem(this.firstUseVar,"true"),this.consentGranted.emit({granted:!0}),this._open=!1}};dn("consent-manager",Kt);export{Kt as ConsentManager};