@esri/solutions-components 0.10.8 → 0.10.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (326) hide show
  1. package/dist/cjs/basemap-gallery_7.cjs.entry.js +2 -2
  2. package/dist/cjs/buffer-tools_3.cjs.entry.js +2 -2
  3. package/dist/cjs/calcite-action-pad_2.cjs.entry.js +2 -2
  4. package/dist/cjs/calcite-alert_4.cjs.entry.js +6 -6
  5. package/dist/cjs/calcite-block_5.cjs.entry.js +4 -4
  6. package/dist/cjs/calcite-combobox_3.cjs.entry.js +2 -2
  7. package/dist/cjs/calcite-flow_6.cjs.entry.js +2 -2
  8. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +5 -5
  9. package/dist/cjs/card-manager_3.cjs.entry.js +5 -5
  10. package/dist/cjs/{common-61b41813.js → common-4d4cf291.js} +1 -1
  11. package/dist/cjs/consent-manager.cjs.entry.js +2 -2
  12. package/dist/cjs/crowdsource-manager.cjs.entry.js +5 -4
  13. package/dist/cjs/crowdsource-reporter.cjs.entry.js +2 -2
  14. package/dist/cjs/{downloadUtils-b757205e.js → downloadUtils-60ee99e0.js} +4 -4
  15. package/dist/cjs/feature-list.cjs.entry.js +6 -6
  16. package/dist/cjs/{helpers-1deec961.js → helpers-6f7660d4.js} +1 -1
  17. package/dist/cjs/{index.es-6c8b7d64.js → index.es-38913dfa.js} +5 -5
  18. package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +5 -5
  19. package/dist/cjs/instant-apps-control-panel.cjs.entry.js +2 -2
  20. package/dist/cjs/instant-apps-create.cjs.entry.js +4 -4
  21. package/dist/cjs/instant-apps-export-views.cjs.entry.js +4 -4
  22. package/dist/cjs/instant-apps-export.cjs.entry.js +4 -4
  23. package/dist/cjs/instant-apps-header.cjs.entry.js +2 -2
  24. package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +3 -3
  25. package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +3 -3
  26. package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +3 -3
  27. package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +3 -3
  28. package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +5 -5
  29. package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +4 -4
  30. package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +6 -6
  31. package/dist/cjs/instant-apps-language-translator.cjs.entry.js +6 -6
  32. package/dist/cjs/instant-apps-measurement.cjs.entry.js +4 -4
  33. package/dist/cjs/instant-apps-popover.cjs.entry.js +4 -4
  34. package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +4 -4
  35. package/dist/cjs/instant-apps-sign-in.cjs.entry.js +4 -4
  36. package/dist/cjs/instant-apps-splash.cjs.entry.js +4 -4
  37. package/dist/cjs/instant-apps-time-filter.cjs.entry.js +4 -4
  38. package/dist/cjs/{languageSwitcher-dc2dd354.js → languageSwitcher-f0bb94fa.js} +1 -1
  39. package/dist/cjs/{languageUtil-a3e1eafd.js → languageUtil-f22ce913.js} +1 -1
  40. package/dist/cjs/layout-manager.cjs.entry.js +2 -2
  41. package/dist/cjs/{loadModules-8567855e.js → loadModules-36d49819.js} +1 -1
  42. package/dist/cjs/loader.cjs.js +1 -1
  43. package/dist/cjs/{locale-a1bcb6eb.js → locale-239118c6.js} +2 -2
  44. package/dist/cjs/{locale-4e7fe921.js → locale-2dc1252d.js} +1 -1
  45. package/dist/cjs/map-select-tools_3.cjs.entry.js +5 -5
  46. package/dist/cjs/{popupUtils-2b5ec788.js → popupUtils-0cabaa1f.js} +2 -2
  47. package/dist/cjs/public-notification.cjs.entry.js +5 -5
  48. package/dist/cjs/{restHelpersGet-bf484fda.js → restHelpersGet-88ba0e25.js} +20 -24
  49. package/dist/cjs/solution-configuration.cjs.entry.js +6 -6
  50. package/dist/cjs/solution-contents_3.cjs.entry.js +6 -6
  51. package/dist/cjs/{solution-resource-57cf345b.js → solution-resource-16c7510c.js} +1 -1
  52. package/dist/cjs/{solution-store-71bb46fa.js → solution-store-747a28ab.js} +58 -65
  53. package/dist/cjs/solutions-components.cjs.js +1 -1
  54. package/dist/cjs/spatial-ref.cjs.entry.js +4 -4
  55. package/dist/cjs/store-manager.cjs.entry.js +4 -4
  56. package/dist/cjs/{templates-e4b98319.js → templates-2f44c01b.js} +2 -2
  57. package/dist/cjs/{utils-b43fe04f.js → utils-e486aa01.js} +1 -1
  58. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +4 -20
  59. package/dist/components/crowdsource-manager.js +4 -3
  60. package/dist/components/restHelpersGet.js +19 -23
  61. package/dist/components/solution-resource.js +1 -1
  62. package/dist/components/solution-store.js +56 -63
  63. package/dist/esm/basemap-gallery_7.entry.js +2 -2
  64. package/dist/esm/buffer-tools_3.entry.js +2 -2
  65. package/dist/esm/calcite-action-pad_2.entry.js +2 -2
  66. package/dist/esm/calcite-alert_4.entry.js +6 -6
  67. package/dist/esm/calcite-block_5.entry.js +4 -4
  68. package/dist/esm/calcite-combobox_3.entry.js +2 -2
  69. package/dist/esm/calcite-flow_6.entry.js +2 -2
  70. package/dist/esm/calcite-shell-panel_14.entry.js +5 -5
  71. package/dist/esm/card-manager_3.entry.js +5 -5
  72. package/dist/esm/{common-1618d62f.js → common-3b99e350.js} +1 -1
  73. package/dist/esm/consent-manager.entry.js +2 -2
  74. package/dist/esm/crowdsource-manager.entry.js +5 -4
  75. package/dist/esm/crowdsource-reporter.entry.js +2 -2
  76. package/dist/esm/{downloadUtils-16c51b10.js → downloadUtils-51c2c502.js} +4 -4
  77. package/dist/esm/feature-list.entry.js +6 -6
  78. package/dist/esm/{helpers-2298687e.js → helpers-62213648.js} +1 -1
  79. package/dist/esm/{index.es-d950915a.js → index.es-afea294f.js} +5 -5
  80. package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +5 -5
  81. package/dist/esm/instant-apps-control-panel.entry.js +2 -2
  82. package/dist/esm/instant-apps-create.entry.js +4 -4
  83. package/dist/esm/instant-apps-export-views.entry.js +4 -4
  84. package/dist/esm/instant-apps-export.entry.js +4 -4
  85. package/dist/esm/instant-apps-header.entry.js +2 -2
  86. package/dist/esm/instant-apps-interactive-legend-classic.entry.js +3 -3
  87. package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +3 -3
  88. package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +3 -3
  89. package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +3 -3
  90. package/dist/esm/instant-apps-interactive-legend.entry.js +5 -5
  91. package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +4 -4
  92. package/dist/esm/instant-apps-language-switcher.entry.js +6 -6
  93. package/dist/esm/instant-apps-language-translator.entry.js +6 -6
  94. package/dist/esm/instant-apps-measurement.entry.js +4 -4
  95. package/dist/esm/instant-apps-popover.entry.js +4 -4
  96. package/dist/esm/instant-apps-scoreboard.entry.js +4 -4
  97. package/dist/esm/instant-apps-sign-in.entry.js +4 -4
  98. package/dist/esm/instant-apps-splash.entry.js +4 -4
  99. package/dist/esm/instant-apps-time-filter.entry.js +4 -4
  100. package/dist/esm/{languageSwitcher-9db90f1e.js → languageSwitcher-b665499d.js} +1 -1
  101. package/dist/esm/{languageUtil-2b6e191a.js → languageUtil-a3e6adf6.js} +1 -1
  102. package/dist/esm/layout-manager.entry.js +2 -2
  103. package/dist/esm/{loadModules-03ba7abe.js → loadModules-9c062d08.js} +1 -1
  104. package/dist/esm/loader.js +1 -1
  105. package/dist/esm/{locale-adb5ff0b.js → locale-35ebf4af.js} +2 -2
  106. package/dist/esm/{locale-7162b55a.js → locale-e758c2ee.js} +1 -1
  107. package/dist/esm/map-select-tools_3.entry.js +5 -5
  108. package/dist/esm/{popupUtils-44f11275.js → popupUtils-d4fe0b41.js} +2 -2
  109. package/dist/esm/public-notification.entry.js +5 -5
  110. package/dist/esm/{restHelpersGet-0a15c2f4.js → restHelpersGet-788d7f7b.js} +20 -24
  111. package/dist/esm/solution-configuration.entry.js +6 -6
  112. package/dist/esm/solution-contents_3.entry.js +6 -6
  113. package/dist/esm/{solution-resource-ab63a236.js → solution-resource-966f8511.js} +1 -1
  114. package/dist/esm/{solution-store-e2690620.js → solution-store-0586e891.js} +58 -65
  115. package/dist/esm/solutions-components.js +1 -1
  116. package/dist/esm/spatial-ref.entry.js +4 -4
  117. package/dist/esm/store-manager.entry.js +4 -4
  118. package/dist/esm/{templates-9556eb87.js → templates-9330d7b8.js} +2 -2
  119. package/dist/esm/{utils-178e7afe.js → utils-72a48b01.js} +1 -1
  120. package/dist/solutions-components/{p-618bafec.entry.js → p-0034f196.entry.js} +1 -1
  121. package/dist/solutions-components/{p-edd70ba3.entry.js → p-00786a30.entry.js} +1 -1
  122. package/dist/solutions-components/{p-00b26aac.js → p-01cc2423.js} +2 -2
  123. package/dist/solutions-components/{p-d7868dd4.js → p-09b47605.js} +1 -1
  124. package/dist/solutions-components/{p-7bfecd07.js → p-09d62c22.js} +1 -1
  125. package/dist/solutions-components/{p-0abc1354.entry.js → p-104fa4cf.entry.js} +1 -1
  126. package/dist/solutions-components/{p-38cfa3cd.entry.js → p-1176ec70.entry.js} +1 -1
  127. package/dist/solutions-components/{p-8a6fa619.entry.js → p-13f83a1a.entry.js} +1 -1
  128. package/dist/solutions-components/{p-4b3cc01f.js → p-2923d5ed.js} +2 -2
  129. package/dist/solutions-components/{p-4848b48f.entry.js → p-29962ae5.entry.js} +1 -1
  130. package/dist/solutions-components/{p-a8e6463b.js → p-2cff27c5.js} +2 -2
  131. package/dist/solutions-components/{p-5b818d29.entry.js → p-2d03b0d7.entry.js} +1 -1
  132. package/dist/solutions-components/{p-0f7b5d36.entry.js → p-2ed4f0cf.entry.js} +1 -1
  133. package/dist/solutions-components/{p-f12a94e6.entry.js → p-3058da8b.entry.js} +1 -1
  134. package/dist/solutions-components/{p-36b50b5b.entry.js → p-3581d7dc.entry.js} +1 -1
  135. package/dist/solutions-components/{p-dc17b638.entry.js → p-386429a4.entry.js} +1 -1
  136. package/dist/solutions-components/{p-69cfa9e6.entry.js → p-483fbfa7.entry.js} +1 -1
  137. package/dist/solutions-components/{p-78712b70.entry.js → p-4a0838c0.entry.js} +1 -1
  138. package/dist/solutions-components/{p-6de944af.entry.js → p-4b843bc0.entry.js} +1 -1
  139. package/dist/solutions-components/{p-abc9e858.entry.js → p-4c0b8e55.entry.js} +1 -1
  140. package/dist/solutions-components/{p-90d6755b.js → p-4d03fed9.js} +1 -1
  141. package/dist/solutions-components/{p-6b30ca36.entry.js → p-51cfb4a6.entry.js} +1 -1
  142. package/dist/solutions-components/{p-8e8b92b4.entry.js → p-614edd9f.entry.js} +1 -1
  143. package/dist/solutions-components/{p-3438cbc4.entry.js → p-65283b75.entry.js} +1 -1
  144. package/dist/solutions-components/{p-4cd4cb85.js → p-65581d83.js} +1 -1
  145. package/dist/solutions-components/{p-ef6567ae.entry.js → p-6f836c0a.entry.js} +1 -1
  146. package/dist/solutions-components/{p-badcaf04.js → p-7c583516.js} +1 -1
  147. package/dist/solutions-components/{p-5d201016.entry.js → p-8af893c6.entry.js} +1 -1
  148. package/dist/solutions-components/p-8b611f1f.entry.js +6 -0
  149. package/dist/solutions-components/{p-bebd4646.entry.js → p-91a87888.entry.js} +1 -1
  150. package/dist/solutions-components/{p-b850796d.entry.js → p-92744164.entry.js} +1 -1
  151. package/dist/solutions-components/{p-1867168b.entry.js → p-93c34427.entry.js} +1 -1
  152. package/dist/solutions-components/{p-445213cf.entry.js → p-9a370c05.entry.js} +1 -1
  153. package/dist/solutions-components/{p-c6473b38.entry.js → p-a2150807.entry.js} +1 -1
  154. package/dist/solutions-components/{p-a860f365.js → p-a7710355.js} +7 -8
  155. package/dist/solutions-components/{p-a22b8cc1.entry.js → p-a7b05a79.entry.js} +1 -1
  156. package/dist/solutions-components/{p-cc092b22.entry.js → p-ab2c4033.entry.js} +1 -1
  157. package/dist/solutions-components/{p-ac122d9e.js → p-af2c8aa9.js} +1 -1
  158. package/dist/solutions-components/{p-a091bc9a.js → p-afad4f05.js} +1 -1
  159. package/dist/solutions-components/{p-913413c3.entry.js → p-b981067f.entry.js} +1 -1
  160. package/dist/solutions-components/{p-24b3aedc.entry.js → p-beeccd19.entry.js} +1 -1
  161. package/dist/solutions-components/{p-2fc63144.js → p-c742acd9.js} +1 -1
  162. package/dist/solutions-components/{p-2e8a428a.entry.js → p-cc47ff22.entry.js} +1 -1
  163. package/dist/solutions-components/{p-8ea95c9f.entry.js → p-cdb01b99.entry.js} +1 -1
  164. package/dist/solutions-components/{p-425a1dab.entry.js → p-de30afd0.entry.js} +1 -1
  165. package/dist/solutions-components/{p-ce454f5a.entry.js → p-e6742158.entry.js} +1 -1
  166. package/dist/solutions-components/{p-20c465e9.entry.js → p-e936f80a.entry.js} +1 -1
  167. package/dist/solutions-components/{p-b19ca04e.entry.js → p-ed9b7fa1.entry.js} +1 -1
  168. package/dist/solutions-components/{p-86e6b5b3.entry.js → p-ef493a84.entry.js} +1 -1
  169. package/dist/solutions-components/{p-2fa78dd8.js → p-f067a46c.js} +1 -1
  170. package/dist/solutions-components/{p-1904654e.js → p-f2ac5d0e.js} +1 -1
  171. package/dist/solutions-components/{p-932f22b5.entry.js → p-f4828ba4.entry.js} +1 -1
  172. package/dist/solutions-components/{p-d8047d8f.entry.js → p-f7d822f7.entry.js} +1 -1
  173. package/dist/solutions-components/{p-8fb95f9a.entry.js → p-fee0a94a.entry.js} +3 -3
  174. package/dist/solutions-components/solutions-components.esm.js +1 -1
  175. package/dist/solutions-components_commit.txt +7 -0
  176. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +4 -4
  177. package/dist/types/components.d.ts +0 -8
  178. package/package.json +10 -10
  179. package/dist/node_modules/@esri/calcite-components/dist/collection/components/accordion/accordion.css +0 -77
  180. package/dist/node_modules/@esri/calcite-components/dist/collection/components/accordion-item/accordion-item.css +0 -263
  181. package/dist/node_modules/@esri/calcite-components/dist/collection/components/action/action.css +0 -341
  182. package/dist/node_modules/@esri/calcite-components/dist/collection/components/action-bar/action-bar.css +0 -105
  183. package/dist/node_modules/@esri/calcite-components/dist/collection/components/action-group/action-group.css +0 -113
  184. package/dist/node_modules/@esri/calcite-components/dist/collection/components/action-menu/action-menu.css +0 -73
  185. package/dist/node_modules/@esri/calcite-components/dist/collection/components/action-pad/action-pad.css +0 -113
  186. package/dist/node_modules/@esri/calcite-components/dist/collection/components/alert/alert.css +0 -428
  187. package/dist/node_modules/@esri/calcite-components/dist/collection/components/avatar/avatar.css +0 -81
  188. package/dist/node_modules/@esri/calcite-components/dist/collection/components/block/block.css +0 -337
  189. package/dist/node_modules/@esri/calcite-components/dist/collection/components/block-section/block-section.css +0 -156
  190. package/dist/node_modules/@esri/calcite-components/dist/collection/components/button/button.css +0 -811
  191. package/dist/node_modules/@esri/calcite-components/dist/collection/components/card/card.css +0 -339
  192. package/dist/node_modules/@esri/calcite-components/dist/collection/components/card-group/card-group.css +0 -73
  193. package/dist/node_modules/@esri/calcite-components/dist/collection/components/carousel/carousel.css +0 -330
  194. package/dist/node_modules/@esri/calcite-components/dist/collection/components/carousel-item/carousel-item.css +0 -45
  195. package/dist/node_modules/@esri/calcite-components/dist/collection/components/checkbox/checkbox.css +0 -179
  196. package/dist/node_modules/@esri/calcite-components/dist/collection/components/chip/chip.css +0 -514
  197. package/dist/node_modules/@esri/calcite-components/dist/collection/components/chip-group/chip-group.css +0 -78
  198. package/dist/node_modules/@esri/calcite-components/dist/collection/components/color-picker/color-picker.css +0 -249
  199. package/dist/node_modules/@esri/calcite-components/dist/collection/components/color-picker-hex-input/color-picker-hex-input.css +0 -66
  200. package/dist/node_modules/@esri/calcite-components/dist/collection/components/color-picker-swatch/color-picker-swatch.css +0 -74
  201. package/dist/node_modules/@esri/calcite-components/dist/collection/components/combobox/combobox.css +0 -450
  202. package/dist/node_modules/@esri/calcite-components/dist/collection/components/combobox-item/combobox-item.css +0 -248
  203. package/dist/node_modules/@esri/calcite-components/dist/collection/components/combobox-item-group/combobox-item-group.css +0 -101
  204. package/dist/node_modules/@esri/calcite-components/dist/collection/components/date-picker/date-picker.css +0 -72
  205. package/dist/node_modules/@esri/calcite-components/dist/collection/components/date-picker-day/date-picker-day.css +0 -294
  206. package/dist/node_modules/@esri/calcite-components/dist/collection/components/date-picker-month/date-picker-month.css +0 -96
  207. package/dist/node_modules/@esri/calcite-components/dist/collection/components/date-picker-month-header/date-picker-month-header.css +0 -189
  208. package/dist/node_modules/@esri/calcite-components/dist/collection/components/dialog/dialog.css +0 -322
  209. package/dist/node_modules/@esri/calcite-components/dist/collection/components/dropdown/dropdown.css +0 -140
  210. package/dist/node_modules/@esri/calcite-components/dist/collection/components/dropdown-group/dropdown-group.css +0 -84
  211. package/dist/node_modules/@esri/calcite-components/dist/collection/components/dropdown-item/dropdown-item.css +0 -199
  212. package/dist/node_modules/@esri/calcite-components/dist/collection/components/fab/fab.css +0 -76
  213. package/dist/node_modules/@esri/calcite-components/dist/collection/components/filter/filter.css +0 -140
  214. package/dist/node_modules/@esri/calcite-components/dist/collection/components/flow/flow.css +0 -98
  215. package/dist/node_modules/@esri/calcite-components/dist/collection/components/flow-item/flow-item.css +0 -94
  216. package/dist/node_modules/@esri/calcite-components/dist/collection/components/graph/graph.css +0 -51
  217. package/dist/node_modules/@esri/calcite-components/dist/collection/components/handle/handle.css +0 -102
  218. package/dist/node_modules/@esri/calcite-components/dist/collection/components/icon/icon.css +0 -73
  219. package/dist/node_modules/@esri/calcite-components/dist/collection/components/inline-editable/inline-editable.css +0 -93
  220. package/dist/node_modules/@esri/calcite-components/dist/collection/components/input/input.css +0 -650
  221. package/dist/node_modules/@esri/calcite-components/dist/collection/components/input-date-picker/input-date-picker.css +0 -293
  222. package/dist/node_modules/@esri/calcite-components/dist/collection/components/input-message/input-message.css +0 -92
  223. package/dist/node_modules/@esri/calcite-components/dist/collection/components/input-number/input-number.css +0 -504
  224. package/dist/node_modules/@esri/calcite-components/dist/collection/components/input-text/input-text.css +0 -417
  225. package/dist/node_modules/@esri/calcite-components/dist/collection/components/input-time-picker/input-time-picker.css +0 -125
  226. package/dist/node_modules/@esri/calcite-components/dist/collection/components/input-time-zone/input-time-zone.css +0 -71
  227. package/dist/node_modules/@esri/calcite-components/dist/collection/components/label/label.css +0 -138
  228. package/dist/node_modules/@esri/calcite-components/dist/collection/components/link/link.css +0 -152
  229. package/dist/node_modules/@esri/calcite-components/dist/collection/components/list/list.css +0 -106
  230. package/dist/node_modules/@esri/calcite-components/dist/collection/components/list-item/list-item.css +0 -347
  231. package/dist/node_modules/@esri/calcite-components/dist/collection/components/list-item-group/list-item-group.css +0 -79
  232. package/dist/node_modules/@esri/calcite-components/dist/collection/components/loader/loader.css +0 -297
  233. package/dist/node_modules/@esri/calcite-components/dist/collection/components/menu/menu.css +0 -50
  234. package/dist/node_modules/@esri/calcite-components/dist/collection/components/menu-item/menu-item.css +0 -281
  235. package/dist/node_modules/@esri/calcite-components/dist/collection/components/meter/meter.css +0 -187
  236. package/dist/node_modules/@esri/calcite-components/dist/collection/components/modal/modal.css +0 -529
  237. package/dist/node_modules/@esri/calcite-components/dist/collection/components/navigation/navigation.css +0 -142
  238. package/dist/node_modules/@esri/calcite-components/dist/collection/components/navigation-logo/navigation-logo.css +0 -137
  239. package/dist/node_modules/@esri/calcite-components/dist/collection/components/navigation-user/navigation-user.css +0 -112
  240. package/dist/node_modules/@esri/calcite-components/dist/collection/components/notice/notice.css +0 -289
  241. package/dist/node_modules/@esri/calcite-components/dist/collection/components/option/option.css +0 -36
  242. package/dist/node_modules/@esri/calcite-components/dist/collection/components/option-group/option-group.css +0 -36
  243. package/dist/node_modules/@esri/calcite-components/dist/collection/components/pagination/pagination.css +0 -151
  244. package/dist/node_modules/@esri/calcite-components/dist/collection/components/panel/panel.css +0 -323
  245. package/dist/node_modules/@esri/calcite-components/dist/collection/components/pick-list/pick-list.css +0 -96
  246. package/dist/node_modules/@esri/calcite-components/dist/collection/components/pick-list-group/pick-list-group.css +0 -83
  247. package/dist/node_modules/@esri/calcite-components/dist/collection/components/pick-list-item/pick-list-item.css +0 -183
  248. package/dist/node_modules/@esri/calcite-components/dist/collection/components/popover/popover.css +0 -198
  249. package/dist/node_modules/@esri/calcite-components/dist/collection/components/progress/progress.css +0 -110
  250. package/dist/node_modules/@esri/calcite-components/dist/collection/components/radio-button/radio-button.css +0 -168
  251. package/dist/node_modules/@esri/calcite-components/dist/collection/components/radio-button-group/radio-button-group.css +0 -96
  252. package/dist/node_modules/@esri/calcite-components/dist/collection/components/rating/rating.css +0 -182
  253. package/dist/node_modules/@esri/calcite-components/dist/collection/components/scrim/scrim.css +0 -76
  254. package/dist/node_modules/@esri/calcite-components/dist/collection/components/segmented-control/segmented-control.css +0 -120
  255. package/dist/node_modules/@esri/calcite-components/dist/collection/components/segmented-control-item/segmented-control-item.css +0 -179
  256. package/dist/node_modules/@esri/calcite-components/dist/collection/components/select/select.css +0 -252
  257. package/dist/node_modules/@esri/calcite-components/dist/collection/components/sheet/sheet.css +0 -267
  258. package/dist/node_modules/@esri/calcite-components/dist/collection/components/shell/shell.css +0 -194
  259. package/dist/node_modules/@esri/calcite-components/dist/collection/components/shell-center-row/shell-center-row.css +0 -124
  260. package/dist/node_modules/@esri/calcite-components/dist/collection/components/shell-panel/shell-panel.css +0 -394
  261. package/dist/node_modules/@esri/calcite-components/dist/collection/components/slider/slider.css +0 -392
  262. package/dist/node_modules/@esri/calcite-components/dist/collection/components/sortable-list/sortable-list.css +0 -72
  263. package/dist/node_modules/@esri/calcite-components/dist/collection/components/split-button/split-button.css +0 -192
  264. package/dist/node_modules/@esri/calcite-components/dist/collection/components/stack/stack.css +0 -116
  265. package/dist/node_modules/@esri/calcite-components/dist/collection/components/stepper/stepper.css +0 -150
  266. package/dist/node_modules/@esri/calcite-components/dist/collection/components/stepper-item/stepper-item.css +0 -475
  267. package/dist/node_modules/@esri/calcite-components/dist/collection/components/switch/switch.css +0 -188
  268. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tab/tab.css +0 -105
  269. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tab-nav/tab-nav.css +0 -158
  270. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tab-title/tab-title.css +0 -422
  271. package/dist/node_modules/@esri/calcite-components/dist/collection/components/table/table.css +0 -135
  272. package/dist/node_modules/@esri/calcite-components/dist/collection/components/table-cell/table-cell.css +0 -170
  273. package/dist/node_modules/@esri/calcite-components/dist/collection/components/table-header/table-header.css +0 -154
  274. package/dist/node_modules/@esri/calcite-components/dist/collection/components/table-row/table-row.css +0 -82
  275. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tabs/tabs.css +0 -101
  276. package/dist/node_modules/@esri/calcite-components/dist/collection/components/text-area/text-area.css +0 -300
  277. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tile/tile.css +0 -297
  278. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tile-group/tile-group.css +0 -86
  279. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tile-select/tile-select.css +0 -239
  280. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tile-select-group/tile-select-group.css +0 -68
  281. package/dist/node_modules/@esri/calcite-components/dist/collection/components/time-picker/time-picker.css +0 -144
  282. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tip/tip.css +0 -151
  283. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tip-group/tip-group.css +0 -47
  284. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tip-manager/tip-manager.css +0 -194
  285. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tooltip/tooltip.css +0 -120
  286. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tree/tree.css +0 -41
  287. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tree-item/tree-item.css +0 -326
  288. package/dist/node_modules/@esri/calcite-components/dist/collection/components/value-list/value-list.css +0 -109
  289. package/dist/node_modules/@esri/calcite-components/dist/collection/components/value-list-item/value-list-item.css +0 -125
  290. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-control-panel/instant-apps-control-panel.css +0 -3
  291. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-create/instant-apps-create.css +0 -150
  292. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-export/instant-apps-export.css +0 -92
  293. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-export-views/instant-apps-export-views.css +0 -92
  294. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-filter-list/instant-apps-filter-list.css +0 -108
  295. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-header/instant-apps-header.css +0 -180
  296. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-classic/instant-apps-interactive-legend-classic.css +0 -124
  297. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-count/instant-apps-interactive-legend-count.css +0 -18
  298. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-group-legend-element/instant-apps-interactive-legend-group-legend-element.css +0 -10
  299. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-group-legend-element-caption/instant-apps-interactive-legend-group-legend-element-caption.css +0 -65
  300. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-layer-element/instant-apps-interactive-legend-layer-element.css +0 -17
  301. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-layer-element-caption/instant-apps-interactive-legend-layer-element-caption.css +0 -66
  302. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-legend-element/instant-apps-interactive-legend-legend-element.css +0 -10
  303. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-legend-element-caption/instant-apps-interactive-legend-legend-element-caption.css +0 -51
  304. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-relationship/instant-apps-interactive-legend-relationship.css +0 -15
  305. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend.css +0 -12
  306. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-keyboard-shortcuts/instant-apps-keyboard-shortcuts.css +0 -33
  307. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-landing-page/instant-apps-landing-page.css +0 -241
  308. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-language-switcher/instant-apps-language-switcher.css +0 -13
  309. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-language-translator/instant-apps-ckeditor-wrapper/instant-apps-ckeditor-wrapper.css +0 -3
  310. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-language-translator/instant-apps-language-translator-item/instant-apps-language-translator-item.css +0 -90
  311. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-language-translator/instant-apps-language-translator-search/instant-apps-language-translator-search.css +0 -34
  312. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-language-translator/instant-apps-language-translator.css +0 -86
  313. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-measurement/instant-apps-measurement-tool/instant-apps-measurement-tool.css +0 -6
  314. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-measurement/instant-apps-measurement.css +0 -6
  315. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-popover/instant-apps-popover.css +0 -58
  316. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-popovers/instant-apps-popovers.css +0 -3
  317. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-scoreboard/instant-apps-scoreboard.css +0 -200
  318. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-sign-in/instant-apps-sign-in.css +0 -93
  319. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-social-share/instant-apps-social-share.css +0 -286
  320. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-splash/instant-apps-splash.css +0 -13
  321. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-time-filter/instant-apps-time-filter.css +0 -42
  322. package/dist/solutions-components/p-9af1cb14.entry.js +0 -6
  323. /package/dist/cjs/{esri-loader-08dc41bd.js → esri-loader-a56cbcbe.js} +0 -0
  324. /package/dist/esm/{esri-loader-c6842c6b.js → esri-loader-781d738a.js} +0 -0
  325. /package/dist/solutions-components/{p-9fe07c30.js → p-659678f1.js} +0 -0
  326. /package/dist/solutions-components/{p-0a24ad5f.js → p-6a68306c.js} +0 -0
@@ -4,11 +4,11 @@
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
6
  import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-e3f04fa1.js';
7
- import { g as getLocaleComponentStrings } from './locale-7162b55a.js';
8
- import { n as nodeListToArray } from './common-1618d62f.js';
9
- import './esri-loader-c6842c6b.js';
7
+ import { g as getLocaleComponentStrings } from './locale-e758c2ee.js';
8
+ import { n as nodeListToArray } from './common-3b99e350.js';
9
+ import './esri-loader-781d738a.js';
10
10
  import './_commonjsHelpers-089957fe.js';
11
- import './solution-resource-ab63a236.js';
11
+ import './solution-resource-966f8511.js';
12
12
  import './interfaces-659e3836.js';
13
13
 
14
14
  /** @license
@@ -4,13 +4,13 @@
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
6
  import { r as registerInstance, c as createEvent, g as getElement } from './index-e3f04fa1.js';
7
- import { s as state } from './solution-store-e2690620.js';
8
- import { c as getFeatureServices, d as getSpatialReferenceInfo } from './templates-9556eb87.js';
7
+ import { s as state } from './solution-store-0586e891.js';
8
+ import { c as getFeatureServices, d as getSpatialReferenceInfo } from './templates-9330d7b8.js';
9
9
  import './index-1dc14abf.js';
10
10
  import './interfaces-659e3836.js';
11
- import './solution-resource-ab63a236.js';
11
+ import './solution-resource-966f8511.js';
12
12
  import './_commonjsHelpers-089957fe.js';
13
- import './restHelpersGet-0a15c2f4.js';
13
+ import './restHelpersGet-788d7f7b.js';
14
14
 
15
15
  const StoreManager = class {
16
16
  constructor(hostRef) {
@@ -4,8 +4,8 @@
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
6
  import { C as CSpatialRefCustomizingPrefix } from './interfaces-659e3836.js';
7
- import './solution-resource-ab63a236.js';
8
- import { a as getProp, b as getPropWithDefault } from './restHelpersGet-0a15c2f4.js';
7
+ import './solution-resource-966f8511.js';
8
+ import { a as getProp, b as getPropWithDefault } from './restHelpersGet-788d7f7b.js';
9
9
 
10
10
  /** @license
11
11
  * Copyright 2022 Esri
@@ -3,7 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import { b as getLocaleComponentStrings } from './locale-adb5ff0b.js';
6
+ import { b as getLocaleComponentStrings } from './locale-35ebf4af.js';
7
7
  import { c as createStore } from './index-1dc14abf.js';
8
8
 
9
9
  var EInputType;
@@ -3,7 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{g as a,r as x,c as e,h as t,H as n}from"./p-f4c4a2b7.js";import{g as m}from"./p-d7868dd4.js";import{n as l}from"./p-2fa78dd8.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-9fe07c30.js";import"./p-80cb7c73.js";
6
+ import{g as a,r as x,c as e,h as t,H as n}from"./p-f4c4a2b7.js";import{g as m}from"./p-09b47605.js";import{n as l}from"./p-f067a46c.js";import"./p-6a68306c.js";import"./p-d4056c1c.js";import"./p-659678f1.js";import"./p-80cb7c73.js";
7
7
  /** @license
8
8
  * Copyright 2022 Esri
9
9
  *
@@ -3,4 +3,4 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{r as t,c as s,h as i,g as e}from"./p-f4c4a2b7.js";import{S as o}from"./p-36c1c370.js";import{g as n}from"./p-7bfecd07.js";import"./p-4cd4cb85.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-ac122d9e.js";function l(t){var s;return!!(null===(s=null===window||void 0===window?void 0:window.localStorage)||void 0===s?void 0:s.getItem(t))}const a=class{constructor(i){var e;t(this,i),this.splashClose=s(this,"splashClose",7),this._sanitizer=null==(e=o)||"function"!=typeof e?null:new e({whiteList:{h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],img:["style","src","width","height"],pre:["style"],p:["id","class","style"],div:["id","class","style","role"],span:["id","class","style","role"],figure:["class","style"]}},!0),this.localStorageKey=void 0,this.titleText="",this.content="",this.primaryButtonText="",this.open=!0,this.closeButtonDisabled=!1,this.outsideCloseDisabled=!1,this.secondaryButton=!1,this.secondaryButtonText=void 0,this.secondaryButtonIcon=void 0,this.secondaryButtonCallback=void 0,this.messages=void 0}sanitizeContent(){this.content=this._sanitizer.sanitize(this.content)}componentWillLoad(){let t;const{localStorageKey:s}=this;t=s?this.open&&!l(this.localStorageKey):this.open,this.el.open=t,this.content&&this._sanitizer&&this.sanitizeContent()}componentDidLoad(){n(this)}render(){return i("calcite-modal",{key:"6d98522026f0aba032808d486474ac04501e9a81",onCalciteModalClose:this.close.bind(this),open:this.open,closeButtonDisabled:this.closeButtonDisabled,outsideCloseDisabled:this.outsideCloseDisabled},this.renderHeader(),this.renderContent(),this.localStorageKey?this.renderDontShowThisAgainCheckbox():null,this.renderPrimaryButton(),this.secondaryButton?this.renderSecondaryButton():null)}renderHeader(){const{titleText:t}=this;return i("header",{slot:"header"},t)}renderContent(){const{content:t}=this;return i("div",{slot:"content",innerHTML:t},i("slot",{name:"custom-action"}))}renderDontShowThisAgainCheckbox(){const{localStorageKey:t,messages:s}=this,e=!!l(t)||null;return i("div",{class:"instant-apps-splash__back-content",slot:"back"},i("calcite-label",{layout:"inline"},i("calcite-checkbox",{onCalciteCheckboxChange:this.handleDontShowThisAgain.bind(this),checked:null!=e?e:void 0}),null==s?void 0:s.dontShowThisAgain))}renderPrimaryButton(){const{primaryButtonText:t}=this;return i("calcite-button",{onClick:this.close.bind(this),slot:"primary"},t||"Enter")}renderSecondaryButton(){var t;return i("calcite-button",{onClick:null===(t=this.secondaryButtonCallback)||void 0===t?void 0:t.bind(this),slot:"secondary","icon-start":this.secondaryButtonIcon,appearance:"outline"},this.secondaryButtonText)}close(){this.open=!1,this.splashClose.emit()}handleDontShowThisAgain(t){const{localStorageKey:s}=this;if(!s)return;const i=t.target,{checked:e}=i;e?null===window||void 0===window||window.localStorage.setItem(s,"false"):function(t){var s;null===(s=null===window||void 0===window?void 0:window.localStorage)||void 0===s||s.removeItem(t)}(s)}get el(){return e(this)}static get watchers(){return{content:["sanitizeContent"]}}};a.style=":host{display:block}:host .image.image_resized img{width:100%}:host .instant-apps-splash__back-content{display:flex;align-items:center}:host .instant-apps-splash__back-content calcite-label{--calcite-label-margin-bottom:0}";export{a as instant_apps_splash}
6
+ import{r as t,c as s,h as i,g as e}from"./p-f4c4a2b7.js";import{S as o}from"./p-36c1c370.js";import{g as n}from"./p-09d62c22.js";import"./p-65581d83.js";import"./p-6a68306c.js";import"./p-d4056c1c.js";import"./p-af2c8aa9.js";function l(t){var s;return!!(null===(s=null===window||void 0===window?void 0:window.localStorage)||void 0===s?void 0:s.getItem(t))}const a=class{constructor(i){var e;t(this,i),this.splashClose=s(this,"splashClose",7),this._sanitizer=null==(e=o)||"function"!=typeof e?null:new e({whiteList:{h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],img:["style","src","width","height"],pre:["style"],p:["id","class","style"],div:["id","class","style","role"],span:["id","class","style","role"],figure:["class","style"]}},!0),this.localStorageKey=void 0,this.titleText="",this.content="",this.primaryButtonText="",this.open=!0,this.closeButtonDisabled=!1,this.outsideCloseDisabled=!1,this.secondaryButton=!1,this.secondaryButtonText=void 0,this.secondaryButtonIcon=void 0,this.secondaryButtonCallback=void 0,this.messages=void 0}sanitizeContent(){this.content=this._sanitizer.sanitize(this.content)}componentWillLoad(){let t;const{localStorageKey:s}=this;t=s?this.open&&!l(this.localStorageKey):this.open,this.el.open=t,this.content&&this._sanitizer&&this.sanitizeContent()}componentDidLoad(){n(this)}render(){return i("calcite-modal",{key:"6d98522026f0aba032808d486474ac04501e9a81",onCalciteModalClose:this.close.bind(this),open:this.open,closeButtonDisabled:this.closeButtonDisabled,outsideCloseDisabled:this.outsideCloseDisabled},this.renderHeader(),this.renderContent(),this.localStorageKey?this.renderDontShowThisAgainCheckbox():null,this.renderPrimaryButton(),this.secondaryButton?this.renderSecondaryButton():null)}renderHeader(){const{titleText:t}=this;return i("header",{slot:"header"},t)}renderContent(){const{content:t}=this;return i("div",{slot:"content",innerHTML:t},i("slot",{name:"custom-action"}))}renderDontShowThisAgainCheckbox(){const{localStorageKey:t,messages:s}=this,e=!!l(t)||null;return i("div",{class:"instant-apps-splash__back-content",slot:"back"},i("calcite-label",{layout:"inline"},i("calcite-checkbox",{onCalciteCheckboxChange:this.handleDontShowThisAgain.bind(this),checked:null!=e?e:void 0}),null==s?void 0:s.dontShowThisAgain))}renderPrimaryButton(){const{primaryButtonText:t}=this;return i("calcite-button",{onClick:this.close.bind(this),slot:"primary"},t||"Enter")}renderSecondaryButton(){var t;return i("calcite-button",{onClick:null===(t=this.secondaryButtonCallback)||void 0===t?void 0:t.bind(this),slot:"secondary","icon-start":this.secondaryButtonIcon,appearance:"outline"},this.secondaryButtonText)}close(){this.open=!1,this.splashClose.emit()}handleDontShowThisAgain(t){const{localStorageKey:s}=this;if(!s)return;const i=t.target,{checked:e}=i;e?null===window||void 0===window||window.localStorage.setItem(s,"false"):function(t){var s;null===(s=null===window||void 0===window?void 0:window.localStorage)||void 0===s||s.removeItem(t)}(s)}get el(){return e(this)}static get watchers(){return{content:["sanitizeContent"]}}};a.style=":host{display:block}:host .image.image_resized img{width:100%}:host .instant-apps-splash__back-content{display:flex;align-items:center}:host .instant-apps-splash__back-content calcite-label{--calcite-label-margin-bottom:0}";export{a as instant_apps_splash}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{_ as t}from"./p-4b3cc01f.js";import{l as s}from"./p-d7868dd4.js";
6
+ import{_ as t}from"./p-2923d5ed.js";import{l as s}from"./p-09b47605.js";
7
7
  /** @license
8
8
  * Copyright 2022 Esri
9
9
  *
@@ -18,4 +18,4 @@ import{_ as t}from"./p-4b3cc01f.js";import{l as s}from"./p-d7868dd4.js";
18
18
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
19
  * See the License for the specific language governing permissions and
20
20
  * limitations under the License.
21
- */class i{arcade;intl;async getPopupTitle(s,i){this.arcade||await this._initModules();let e={};for(const[t,i]of Object.entries(s.attributes))e={...e,[`{${t.toUpperCase()}}`]:i};const a=s.layer,o=this._removeTags(a?.popupTemplate?.title);if(o.includes("{expression/expr")&&null!=a?.popupTemplate?.expressionInfos)for(let t=0;t<a.popupTemplate?.expressionInfos.length;t++){const o=a.popupTemplate.expressionInfos[t],n=this.arcade.createArcadeProfile("popup");try{const t=await this.arcade.createArcadeExecutor(o.expression,n),r=await t.executeAsync({$feature:s,$layer:a,$map:i});null==r&&""===r||(e[`{expression/${o.name}}`.toUpperCase()]=r)}catch(t){console.error(t);continue}}return a.popupTemplate.fieldInfos&&a.fields.forEach((i=>{const o=s.attributes[i.name],n=a.popupTemplate.fieldInfos.find((t=>t.fieldName.toLowerCase()===i.name.toLowerCase())),r=t(o,i.type,i.domain,n?.format,this.intl);e[`{${i.name.toUpperCase()}}`]=r??o})),o?.replace(/{.*?}/g,(t=>null!=e[t.toUpperCase()]?e[t.toUpperCase()]:""))}_removeTags(t){return null==t||""===t?"":t.toString().replace(/(<([^>]+)>)/gi,"")}async _initModules(){const[t,i]=await s(["esri/arcade","esri/intl"]);this.arcade=t,this.intl=i}}export{i as P}
21
+ */class e{arcade;intl;async getPopupTitle(s,e){this.arcade||await this._initModules();let i={};for(const[t,e]of Object.entries(s.attributes))i={...i,[`{${t.toUpperCase()}}`]:e};const a=s.layer,o=this._removeTags(a?.popupTemplate?.title);if(o.includes("{expression/expr")&&null!=a?.popupTemplate?.expressionInfos)for(let t=0;t<a.popupTemplate?.expressionInfos.length;t++){const o=a.popupTemplate.expressionInfos[t],n=this.arcade.createArcadeProfile("popup");try{const t=await this.arcade.createArcadeExecutor(o.expression,n),r=await t.executeAsync({$feature:s,$layer:a,$map:e});null==r&&""===r||(i[`{expression/${o.name}}`.toUpperCase()]=r)}catch(t){console.error(t);continue}}return a.popupTemplate.fieldInfos&&a.fields.forEach((e=>{const o=s.attributes[e.name],n=a.popupTemplate.fieldInfos.find((t=>t.fieldName.toLowerCase()===e.name.toLowerCase())),r=t(o,e.type,e.domain,n?.format,this.intl);i[`{${e.name.toUpperCase()}}`]=r??o})),o?.replace(/{.*?}/g,(t=>null!=i[t.toUpperCase()]?i[t.toUpperCase()]:""))}_removeTags(t){return null==t||""===t?"":t.toString().replace(/(<([^>]+)>)/gi,"")}async _initModules(){const[t,e]=await s(["esri/arcade","esri/intl"]);this.arcade=t,this.intl=e}}export{e as P}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{e as t}from"./p-0a24ad5f.js";import{a}from"./p-f4c4a2b7.js";
6
+ import{e as t}from"./p-6a68306c.js";import{a}from"./p-f4c4a2b7.js";
7
7
  /** @license
8
8
  * Copyright 2022 Esri
9
9
  *
@@ -3,4 +3,4 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{l as n}from"./p-4cd4cb85.js";import{l as t}from"./p-ac122d9e.js";const o=new URL(window.location.href).origin.includes("localhost:4444");function a(){const n=(document.documentElement.lang||(null===navigator||void 0===navigator?void 0:navigator.language)||"en").toLowerCase();return t.has(n)?t.get(n):t.has(n.slice(0,2))?t.get(n.slice(0,2)):"en"}async function c(n,t){const a=`assets/t9n/${n}/resources_${t}.json`,c=new URL(`./${a}`,window.location.href).href,e=`${new URL(window.location.href).origin}/dist/${a}`;async function r(n){const t=await fetch(n);if(!t.ok)throw new Error(`Fetch failed with status ${t.status}: ${t.statusText}`);const o=t.headers.get("content-type");if(!o||!o.includes("application/json")){const n=await t.text();throw console.error(`Expected JSON, but received (${o}): ${n}`),new Error("Fetched content is not JSON")}return await t.json()}try{return await r(o?e:c)}catch(n){console.error(`Primary fetch error: ${n}`);try{return await r(e)}catch(n){throw console.error(`Fallback fetch error: ${n}`),new Error("Both primary and fallback fetches failed")}}}function e(n,t){var o,a;const c=null===(o=null==t?void 0:t.user)||void 0===o?void 0:o.culture,e=null===(a=null===window||void 0===window?void 0:window.navigator)||void 0===a?void 0:a.language,r=n.getLocale();return n.normalizeMessageBundleLocale(c||e||r||"en")}async function r(n,t){const o=n.tagName.toLowerCase(),e=null!=t?t:a();let r;try{r=await c(o,e)}catch(n){console.warn(`no locale for ${o} (${e}) loading default locale en.`),r=await c(o,"en")}return[r,e]}async function i(t,o){try{s(t,await r(t.el),o)}catch(n){}finally{try{const[a]=await n(["esri/intl"]);a.onLocaleChange(function(n,t){return async o=>{const a=await r(n.el,o);s(n,a,t)}}(t,o))}catch(n){}}}function s(n,t,o){n.messages=t[0],o&&(n.messages=Object.assign(Object.assign({},n.messages),o))}export{e as a,r as b,a as c,i as g}
6
+ import{l as n}from"./p-65581d83.js";import{l as t}from"./p-af2c8aa9.js";const o=new URL(window.location.href).origin.includes("localhost:4444");function a(){const n=(document.documentElement.lang||(null===navigator||void 0===navigator?void 0:navigator.language)||"en").toLowerCase();return t.has(n)?t.get(n):t.has(n.slice(0,2))?t.get(n.slice(0,2)):"en"}async function c(n,t){const a=`assets/t9n/${n}/resources_${t}.json`,c=new URL(`./${a}`,window.location.href).href,r=`${new URL(window.location.href).origin}/dist/${a}`;async function e(n){const t=await fetch(n);if(!t.ok)throw new Error(`Fetch failed with status ${t.status}: ${t.statusText}`);const o=t.headers.get("content-type");if(!o||!o.includes("application/json")){const n=await t.text();throw console.error(`Expected JSON, but received (${o}): ${n}`),new Error("Fetched content is not JSON")}return await t.json()}try{return await e(o?r:c)}catch(n){console.error(`Primary fetch error: ${n}`);try{return await e(r)}catch(n){throw console.error(`Fallback fetch error: ${n}`),new Error("Both primary and fallback fetches failed")}}}function r(n,t){var o,a;const c=null===(o=null==t?void 0:t.user)||void 0===o?void 0:o.culture,r=null===(a=null===window||void 0===window?void 0:window.navigator)||void 0===a?void 0:a.language,e=n.getLocale();return n.normalizeMessageBundleLocale(c||r||e||"en")}async function e(n,t){const o=n.tagName.toLowerCase(),r=null!=t?t:a();let e;try{e=await c(o,r)}catch(n){console.warn(`no locale for ${o} (${r}) loading default locale en.`),e=await c(o,"en")}return[e,r]}async function i(t,o){try{s(t,await e(t.el),o)}catch(n){}finally{try{const[a]=await n(["esri/intl"]);a.onLocaleChange(function(n,t){return async o=>{const a=await e(n.el,o);s(n,a,t)}}(t,o))}catch(n){}}}function s(n,t,o){n.messages=t[0],o&&(n.messages=Object.assign(Object.assign({},n.messages),o))}export{r as a,e as b,a as c,i as g}
@@ -3,4 +3,4 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{r as t,g as i,h as s,H as e,c as h,F as a}from"./p-f4c4a2b7.js";import{g as o,l}from"./p-d7868dd4.js";import{g as n,q as d,e as c,f as r,i as p,j as b,c as f}from"./p-eb483242.js";import{d as u}from"./p-4b3cc01f.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-80cb7c73.js";import"./p-9fe07c30.js";import"./p-badcaf04.js";const m=class{constructor(i){t(this,i),this.enableEditGeometry=!1,this.isMobile=void 0,this.layer=void 0,this.mapView=void 0,this.zoomAndScrollToSelected=void 0,this.selectedFeaturesIds=void 0,this._cardLoading=!1,this._graphics=void 0,this._translations=void 0}get el(){return i(this)}async featureSelectionChange(t){const i=t.detail;this._graphics=await this._getFeaturesByIds(i)}async layerSelectionChange(t){const i=t.detail[0];this.layer=await n(this.mapView,i)}async componentWillLoad(){await this._getTranslations(),this.selectedFeaturesIds?.length>0&&(this._graphics=await this._getFeaturesByIds(this.selectedFeaturesIds))}render(){const t=this._graphics?.length>0?"":"display-none",i=this._graphics?.length>0?"display-none":"";return s(e,{key:"0309205d485d9c7a5c558b3619a6c5ac03fcb528"},s("div",{key:"a5d291f6073b0e0a918573549c6eb29fe1d892dd",class:"overflow-auto height-full"},s("calcite-shell",{key:"572b9cdf002e0c8c46e6c4bc5e2f1f8494228e93",class:"position-relative "+t},s("div",{key:"f8ba07deb9786d64f3d25011ff66ead43d809bf1"},s("info-card",{key:"6eda3ab2cfa2e5fb948f5a7ddaeb6b9022aa5543",enableEditGeometry:this.enableEditGeometry,graphics:this._graphics,isLoading:this._cardLoading,isMobile:this.isMobile,mapView:this.mapView}))),s("calcite-shell",{key:"f32d9cfe3a41bbd7d58cdc732c8abe99b232beb7",class:"position-relative "+i},s("div",{key:"b97eb023c5d57a4a8dda09467d8599166da40f3c",class:"padding-1"},s("calcite-notice",{key:"23a204782bd254909e3ab803a944d10004e4954a",icon:"table",open:!0},s("div",{key:"ea25078647612b8fa40e26b4474a91c853dae126",slot:"message"},this._translations.selectFeaturesToStart))))))}async _getFeaturesByIds(t){return(t.length>0?await d(t,this.layer,[],!1,this.mapView.spatialReference):[]).sort(((i,s)=>t.indexOf(i.getObjectId())-t.indexOf(s.getObjectId())))}async _getTranslations(){const t=await o(this.el);this._translations=t[0]}};m.style=":host{display:block !important}.display-flex{display:flex}.display-none{display:none}.w-100{width:100%}.padding-bottom-1{padding-bottom:1rem}.padding-1{padding:1rem}.position-relative{position:relative}.focus-margin{margin:1px 1px 0px 1px}.overflow-auto{overflow:auto}.height-full{height:100%}card-manager{display:block}";const g=class{constructor(i){t(this,i),this.featureSelectionChange=h(this,"featureSelectionChange",7),this.toggleFilter=h(this,"toggleFilter",7),this.defaultGlobalId=void 0,this.defaultLayerId=void 0,this.defaultOid=void 0,this.enableAutoRefresh=void 0,this.enableColumnReorder=!0,this.enableCSV=void 0,this.enableInlineEdit=void 0,this.enableShare=void 0,this.isMobile=void 0,this.mapHidden=void 0,this.mapInfo=void 0,this.mapView=void 0,this.onlyShowUpdatableLayers=void 0,this.selectedIds=[],this.shareIncludeEmbed=void 0,this.shareIncludeSocial=void 0,this.showNewestFirst=void 0,this.zoomAndScrollToSelected=void 0,this.zoomToScale=void 0,this.createFilterModal=!0,this._allIds=[],this._controlsThatFit=void 0,this._csvExporting=!1,this._fetchingData=!1,this._filterActive=!1,this._filterOpen=!1,this._layer=void 0,this._selectAllActive=!1,this._showHideOpen=!1,this._showOnlySelected=!1,this._toolInfos=void 0,this._translations=void 0}get el(){return i(this)}FeatureTable;TableTemplate;_columnsInfo;_ctrlIsPressed=!1;_currentId;_editEnabled;_defaultFilterHonored=!1;_defaultGlobalIdHonored=!1;_defaultOidHonored=!1;_defaultVisibleToolSizeInfos;_definitionExpression;_deleteEnabled;_filterList;_floorExpression;_floorField;_floorFacility;_floorLevel;_floorSite;_layerExpressions;_loaded=!1;_mapClickHandle;_observerSet=!1;_previousCurrentId;reactiveUtils;_refreshHandle;_resizeObserver;_selectAllElement;_selectionFromMap=!1;_shareNode;_shiftIsPressed=!1;_showHideDropdown;_skipOnChange=!1;_moreDropdown;_table;_tableNode;_timeout;_toolbar;_toolbarSizeInfos;async defaultOidWatchHandler(){await this._handleDefaults()}async defaultGlobalIdWatchHandler(){await this._handleDefaults()}enableCSVWatchHandler(){this._toolInfos?.length>0&&this._initToolInfos()}enableInlineEditWatchHandler(){this._table&&(this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit)}enableShareWatchHandler(){this._toolbar&&this._updateToolbar()}_controlsThatFitWatchHandler(){const t=this._controlsThatFit?this._controlsThatFit.reduce(((t,i)=>(t.push(i.id),t)),[]):[];this._toolInfos=this._toolInfos?.map((i=>{if(i&&this._controlsThatFit){const s=this._getId(i.icon);return i.isOverflow=t.indexOf(s)<0,i}}))}mapHiddenWatchHandler(){this._toolInfos?.length>0&&this._initToolInfos()}isMobileWatchHandler(){this._toolInfos||this.isMobile||this._initToolInfos()}async mapInfoWatchHandler(){this._resetColumnTemplates(),this.createFilterModal&&this._initLayerExpressions(),this._initToolInfos(),this._updateToolbar(),await this._sortTable()}async mapViewWatchHandler(){this._mapClickHandle&&this._mapClickHandle.remove(),this.mapView&&(this._floorExpression=void 0,this._updateShareUrl(),this._mapClickHandle=this.reactiveUtils.on((()=>this.mapView),"click",(t=>{this._mapClicked(t)})))}async _layerWatchHandler(){this._fetchingData=!0,await(this._layer?.when((async()=>{this._definitionExpression=this._layer.definitionExpression,this._floorField=this._layer.floorInfo?.floorField,this._updateFloorDefinitionExpression(),await this._resetTable(),this.createFilterModal&&this._initLayerExpressions(),this._updateShareUrl(),this._fetchingData=!1})))}async selectedIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions(),this._selectAllActive&&this.selectedIds.length!==this._allIds.length&&(this._selectAllActive=!1),this.selectedIds.length>0&&(this._table.rowHighlightIds.removeAll(),this._table.rowHighlightIds.add(this.selectedIds[0]))}async filterReset(){this._handleFilterListReset()}async filterUpdate(){this._handleFilterUpdate()}async closeFilter(){await this._closeFilter()}async refresh(){await this._refresh()}featureSelectionChange;toggleFilter;async selectionChanged(t){const i=t.detail.selectedFeature[0],s=i.getObjectId(),e=this._table;if(e.rowHighlightIds.length&&e.rowHighlightIds.removeAll(),e.rowHighlightIds.add(s),this.zoomAndScrollToSelected){const t=this._table.viewModel.getObjectIdIndex(s);this._table.scrollToIndex(t);const e=i.layer;let h;this.mapView.allLayerViews.toArray().some((t=>{if(t.layer.title===e.title&&"feature"===t.layer.type)return h=t,!0})),h&&await c([s],h,this.mapView,!0,void 0,this.zoomToScale)}}async layerSelectionChange(t){await this._layerSelectionChanged(t)}async editsComplete(t){const i=t.detail;"delete"!==i&&"add"!==i||(this._allIds=await r(this._layer)),await this._refresh()}async facilityChanged(t){this._floorFacility=t.detail,this._updateFloorDefinitionExpression()}async levelChanged(t){this._floorLevel=t.detail,this._updateFloorDefinitionExpression()}async siteChanged(t){this._floorSite=t.detail,this._updateFloorDefinitionExpression()}noLayersFound(){this._layer=void 0,this._allIds=[],this._clearSelection()}async componentWillLoad(){await this._getTranslations(),await this._initModules(),this._initToolInfos(),this._resizeObserver||(this._resizeObserver=new ResizeObserver((()=>this._onResize())))}render(){const t=this._fetchingData?"display-none":"",i=this._fetchingData?"":"display-none",h=this._allIds.length.toString(),a=this.selectedIds.length.toString(),o=this.isMobile?"height-full":"height-full-adjusted";return this._validateActiveActions(),s(e,{key:"17071727cb283d84afb8beab8382bd3623f35920"},s("calcite-shell",{key:"f8508d67fd4b100fdc3f52b7db63194714cf216b"},this._getTableControlRow("header"),s("div",{key:"5c1ebcb0530764a9568dc5dae153632a3d9491c8",class:`width-full ${o}`},s("calcite-panel",{key:"7a6420894e4e50e2b4cda6e5ebe043134f4c0397",class:"height-full width-full"},s("calcite-loader",{key:"48d4fe7e27fae877ca0e4caa22555968636f6c33",class:i,label:this._translations.fetchingData,scale:"l"}),s("div",{key:"cce71356e8ca141d1a18b32944d4fa03af8aae33",class:t,ref:this.onTableNodeCreate})),this.isMobile?void 0:s("div",{class:"bottom-left text-color height-19"},this._translations.recordsSelected.replace("{{total}}",h).replace("{{selected}}",a)))),this.createFilterModal&&this._filterModal())}async componentDidLoad(){this.isMobile||this._observerSet||(this._resizeObserver.observe(this._toolbar),this._observerSet=!0),document.onclick=t=>this._handleDocumentClick(t),document.onkeydown=t=>this._handleKeyDown(t),document.onkeyup=t=>this._handleKeyUp(t)}componentDidRender(){this._updateToolbar()}async _initModules(){const[t,i,s]=await l(["esri/widgets/FeatureTable","esri/core/reactiveUtils","esri/widgets/FeatureTable/support/TableTemplate"]);this.FeatureTable=t,this.reactiveUtils=i,this.TableTemplate=s}_onResize(){this._updateToolbar()}_getTableControlRow(t){return s("div",{class:"display-flex border-bottom height-51",ref:t=>this._toolbar=t,slot:t},this._getActionBar(),this.isMobile?void 0:this._getDropdown("more-table-options"),this.enableShare&&!this.isMobile?this._getShare("share"):void 0)}_getActionBar(){const t=this.isMobile?"width-full":"",i=this.isMobile?"border-top":"";return s("calcite-action-bar",{class:t,expandDisabled:!0,expanded:!0,id:this._getId("bar"),layout:"horizontal"},s("div",{class:`border-end ${t} ${i}`,id:"solutions-map-layer-picker-container"},s("map-layer-picker",{appearance:"transparent",defaultLayerId:this.defaultLayerId,display:"inline-flex",height:50,isMobile:this.isMobile,mapView:this.mapView,onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,placeholderIcon:"layers",scale:"l",selectedIds:this._layer?[this._layer?.id]:[],showSingleLayerAsLabel:!0,showTables:!0,type:"dropdown"})),this.isMobile?void 0:this._getActions())}_getActions(){const t=this._getActionItems();return t?.reduce(((t,i)=>(i&&!i.isOverflow&&t.push(i.isDanger?this._getDangerAction(i.icon,i.label,i.func,i.disabled):i.isSublist?s("calcite-dropdown",{closeOnSelectDisabled:!0,id:this._getId(i.icon),onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._showHideDropdown=t},this._getAction(i.active,this._showHideOpen?"chevron-down":i.icon,i.indicator,i.label,i.func,i.disabled,i.loading,"trigger"),this._showHideOpen?this._getFieldlist():void 0):this._getAction(i.active,i.icon,i.indicator,i.label,i.func,i.disabled,i.loading)),t)),[])}_getFieldlist(){return this._columnsInfo?s("calcite-dropdown-group",{"selection-mode":"multiple"},Object.keys(this._columnsInfo).map((t=>s("calcite-dropdown-item",{id:t,onClick:t=>{const i=t.target;this._columnsInfo[i.id]=i.selected,i.selected?this._table.showColumn(i.id):this._table.hideColumn(i.id)},selected:this._columnsInfo[t]},t)))):void 0}_validateEnabledActions(){const t=this._featuresSelected(),i=this.selectedIds.length>1&&this._layer?.capabilities?.operations?.supportsUpdate,s=["zoom-to-object","pencil","trash","erase","selected-items-filter"];this._toolInfos?.forEach((e=>{e&&s.indexOf(e.icon)>-1&&(e.disabled="pencil"===e.icon?!i:!t)}))}_validateActiveActions(){const t=["filter","list-check-all","selected-items-filter"];this._toolInfos?.forEach((i=>{i&&t.indexOf(i.icon)>-1&&("filter"===i.icon&&(i.indicator=this._filterActive),"list-check-all"===i.icon&&(i.active=this._selectAllActive),"selected-items-filter"===i.icon&&(i.active=this._showOnlySelected))}))}_initToolInfos(){const t=this._featuresSelected(),i=this.selectedIds.length>1&&this._layer?.capabilities?.operations?.supportsUpdate,s=this._featuresEmpty(),e=this._hasFilterExpressions();this._translations&&(this._toolInfos=[this.mapHidden?void 0:{active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>this._zoom(),disabled:!t,isOverflow:!1},e?{active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>this.createFilterModal?this._toggleFilter():this.toggleFilter.emit(),disabled:!1,isOverflow:!1}:void 0,this.mapHidden?void 0:{active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>alert(this._translations.editMultiple),disabled:!i,isOverflow:!1,isSublist:!1},this._deleteEnabled?{active:void 0,icon:"trash",indicator:void 0,label:void 0,func:void 0,disabled:!t,isDanger:!0,isOverflow:!1}:void 0,{active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>this._clearSelection(),disabled:!t,isOverflow:!1},{active:!1,icon:"selected-items-filter",indicator:!1,label:this._showOnlySelected?this._translations.showAll:this._translations.showSelected,func:()=>this._toggleShowSelected(),disabled:!t,isOverflow:!1},{active:!1,icon:"list-check-all",indicator:!1,func:()=>this._selectAll(),label:this._translations.selectAll,disabled:s,isOverflow:!1},{active:!1,icon:"compare",indicator:!1,func:()=>this._switchSelected(),label:this._translations.switchSelected,disabled:s,isOverflow:!1},{active:!1,icon:"refresh",indicator:!1,func:()=>this._refresh(),label:this._translations.refresh,disabled:!1,isOverflow:!1},this.enableCSV?{active:!1,icon:"export",indicator:!1,func:()=>{this._exportToCSV()},label:this._translations.exportCSV,loading:this._csvExporting,disabled:s,isOverflow:!1}:void 0,{active:!1,icon:this._showHideOpen?"chevron-down":"chevron-right",indicator:!1,func:()=>this._toggleShowHide(),label:this._translations.showHideColumns,disabled:!1,isOverflow:!1,isSublist:!0}],this._defaultVisibleToolSizeInfos=void 0)}_updateFloorDefinitionExpression(){if(this._floorField&&this._floorLevel){const t=`${this._floorField} = '${this._floorLevel}'`,i=this._layer.definitionExpression;this._layer.definitionExpression=i?.indexOf(this._floorExpression)>-1?i.replace(this._floorExpression,t):i?`${i} AND (${t})`:t,this._floorExpression=t}}_featuresSelected(){return this.selectedIds.length>0}_featuresEmpty(){return 0===this._allIds.length}_hasFilterExpressions(){let t;return this.mapInfo?.filterConfig?.layerExpressions&&this._layer?.id&&(t=this.mapInfo.filterConfig.layerExpressions.filter((t=>t.id===this._layer.id))),t?.length>0}_updateToolbar(){this._timeout&&clearTimeout(this._timeout),!this.isMobile&&this._toolbar&&this._toolInfos&&(this._timeout=setTimeout((()=>{clearTimeout(this._timeout),this._setToolbarSizeInfos();const t=this._toolbar.offsetWidth;let i=this._toolbarSizeInfos.reduce(((t,i)=>t+i.width),0);const s=["solutions-more","solutions-map-layer-picker-container","solutions-action-share"];if(i>t){if(this._toolbarSizeInfos.length>0){const e=[...this._toolbarSizeInfos].reverse().reduce(((e,h)=>(s.indexOf(h.id)<0&&(i>t?i-=h.width:e.push(h)),e)),[]).reverse();this._setControlsThatFit(e,s)}}else if(this._defaultVisibleToolSizeInfos){const e=this._toolbarSizeInfos.reduce(((t,i)=>(t.push(i.id),t)),[]);let h=!1;const a=[...this._defaultVisibleToolSizeInfos].reduce(((a,o)=>(!h&&s.indexOf(o.id)<0&&(e.indexOf(o.id)>-1||i+o.width<=t)?(e.indexOf(o.id)<0&&(i+=o.width),a.push(o)):s.indexOf(o.id)<0&&i+o.width>t&&(h=!0),a)),[]);this._setControlsThatFit(a,s)}}),250))}_setControlsThatFit(t,i){let s=JSON.stringify(t)!==JSON.stringify(this._controlsThatFit);const e=document.getElementById("solutions-action-bar");e?.childNodes?.forEach((t=>{i.indexOf(t.id)<0&&!s&&(s=this._controlsThatFit.map((t=>t.id)).indexOf(t.id)<0)})),s&&(this._controlsThatFit=[...t])}_setToolbarSizeInfos(){let t=!1;this._toolbarSizeInfos=[],this._toolbar.childNodes.forEach(((i,s)=>{0===s?i.childNodes.forEach((i=>{this._toolbarSizeInfos.push({id:i.id,width:i.offsetWidth}),t||(t=i.offsetWidth>0)})):i.referenceElement||(this._toolbarSizeInfos.push({id:i.id,width:i.offsetWidth}),t||(t=i.offsetWidth>0))})),t&&!this._defaultVisibleToolSizeInfos&&(this._defaultVisibleToolSizeInfos=[...this._toolbarSizeInfos])}_getActionItems(){return this._toolInfos?.filter((t=>t&&!t.isOverflow))}_getDropdown(t){const i=this._getDropdownItems();return i.length>0?s("calcite-dropdown",{closeOnSelectDisabled:!0,disabled:void 0===this._layer,id:"solutions-more",onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._moreDropdown=t},s("calcite-action",{appearance:"solid",id:t,label:"",onClick:()=>this._closeShowHide(),slot:"trigger",text:""},s("calcite-button",{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral"},this._translations.more)),s("calcite-dropdown-group",{"selection-mode":"none"},i.map((t=>s("calcite-dropdown-group",{class:t.disabled?"disabled":"",selectionMode:t.disabled?"none":"single"},s("calcite-dropdown-item",{disabled:t.loading,iconStart:t.isSublist&&this._showHideOpen?"chevron-down":t.loading?"":t.icon,id:"solutions-subset-list",onClick:t.func},t.loading?s("div",{class:"display-flex"},s("calcite-loader",{inline:!0,label:t.label,scale:"m"}),t.label):t.label))))),this._showHideOpen?this._getFieldlist():void 0):void 0}_getDropdownItems(){return this._toolInfos?.filter((t=>t&&t.isOverflow))}_getAction(t,i,e,h,a,o,l,n){const d=void 0===this._layer||o;return s("div",{class:"display-flex",id:this._getId(i),slot:n},s("calcite-action",{active:t,appearance:"solid",disabled:d,icon:i,id:i,indicator:e,label:h,loading:l,onClick:a,text:h,textEnabled:!0}),this._getToolTip("bottom",i,h))}_getShare(t){return s("div",{class:"share-action",id:this._getId(t)},s("instant-apps-social-share",{autoUpdateShareUrl:!1,class:"instant-app-share",embed:this.shareIncludeEmbed,popoverButtonIconScale:"s",ref:t=>this._shareNode=t,scale:"m",shareButtonColor:"neutral",shareButtonType:"action",socialMedia:this.shareIncludeSocial,view:this.mapView}),this._getToolTip("bottom",t,this._translations.share))}_updateShareUrl(){const t=this._shareNode?.shareUrl;if(!t)return;const i=new URL(t);this.mapInfo?.id?i.searchParams.set("webmap",this.mapInfo.id):i.searchParams.delete("webmap"),this._layer?.id?i.searchParams.set("layer",this._layer.id):i.searchParams.delete("layer"),this.selectedIds?.length>0?i.searchParams.set("oid",this.selectedIds.join(",")):i.searchParams.delete("oid"),this._shareNode.shareUrl=i.href}_getToolTip(t,i,e){return document.getElementById(i)?s("calcite-tooltip",{placement:t,"reference-element":i},s("span",null,e)):void 0}_getId(t){return`solutions-action-${t}`}_getDangerAction(t,i,e,h){const a=void 0===this._layer||h;return s("div",{class:"display-flex",id:this._getId(t)},"trash"===t?s("delete-button",{buttonType:"action",class:"display-flex",disabled:a,icon:t,ids:this._getIds(),layer:this._layer}):s("calcite-action",{appearance:"solid",disabled:a,id:t,onClick:e,text:""},s("calcite-button",{appearance:"transparent",iconStart:t,kind:"danger"},i)),this._getToolTip("bottom",t,i))}_getIds(){return this._table.highlightIds.toArray()}onTableNodeCreate=t=>{this._tableNode=t};async _getTable(t,i){this._layer&&(await this._layer.when((()=>{this._table=new this.FeatureTable({autoRefreshEnabled:this.enableAutoRefresh,layer:this._layer,view:this.mapView,columnReorderingEnabled:this.enableColumnReorder,editingEnabled:this._editEnabled&&this.enableInlineEdit,highlightEnabled:!0,multiSortEnabled:!1,visibleElements:{header:!1,menu:!1},tableTemplate:{columnTemplates:i},container:t})})),await this._table.when((()=>{this._table.highlightIds.on("change",(t=>{this._handleOnChange(t)}))})))}async _handleOnChange(t){const i=[...this._table.highlightIds.toArray()];if(this._skipOnChange)this._skipOnChange=!1;else{if(!this._ctrlIsPressed&&!this._shiftIsPressed||this._selectionFromMap&&this._shiftIsPressed)if(this.selectedIds.length>0){this._skipOnChange=!0;const s=this.selectedIds.length>1&&1===t.removed.length?t.removed:i.filter((t=>this.selectedIds.indexOf(t)<0));this._clearSelection(),this.selectedIds=[...s],s.length>0?this._table.highlightIds.add(s[0]):this._skipOnChange=!1}else this.selectedIds=i.reverse();else if(this._ctrlIsPressed)this.selectedIds=i.reverse();else if(this._shiftIsPressed&&i?.length>0)if(this._skipOnChange=!0,this._previousCurrentId=this._currentId,this._currentId=[...i].reverse()[0],1===i.length)this._skipOnChange=!1;else if(this._previousCurrentId!==this._currentId){const t=this._table.activeSortOrders.reduce(((t,i)=>(t.push(`${i.fieldName} ${i.direction}`),t)),[]),s=await p(0,this._layer,[],t);let e=!1;const h=this._table.viewModel.getObjectIdIndex(this._previousCurrentId),a=this._table.viewModel.getObjectIdIndex(this._currentId);this._skipOnChange=(h<a?h:a)+1!==(a>h?a:h);const o=s.reduce(((t,i)=>{const s=i;return s===this._currentId||s===this._previousCurrentId?(e=!e,t.indexOf(s)<0&&t.push(s)):e&&t.indexOf(s)<0&&t.push(s),t}),[]),l=h<a?o.reverse():o;this.selectedIds=[...new Set([...l,...this.selectedIds])],this._table.highlightIds.addMany(this.selectedIds.filter((t=>i.indexOf(t)<0)))}this._finishOnChange()}this._currentId=[...this._table.highlightIds.toArray()].reverse()[0],this._selectionFromMap=!1}_finishOnChange(){this._showOnlySelected&&(this._featuresSelected()?this._table.filterBySelection():this._toggleShowSelected()),this.featureSelectionChange.emit(this.selectedIds)}_resetColumnTemplates(){const t=this._getColumnTemplates(this._layer?.id,this._layer?.fields),i=t?.some(((t,i)=>JSON.stringify(this._table?.tableTemplate.columnTemplates[i])!==JSON.stringify(t)));if(this._table&&t&&(i||!this._columnsInfo)){this._table.tableTemplate=new this.TableTemplate({columnTemplates:t});const i=t.map((t=>t.fieldName));this._initColumnsInfo(i)}}async _resetTable(){if(this._loaded=!1,this._clearSelection(),this._allIds=await r(this._layer),this._table)this._table.view=this.mapView,this._table.layer=this._layer;else{const t=this._getColumnTemplates(this._layer.id,this._layer?.fields);await this._getTable(this._tableNode,t)}await this._initLayerRefresh(),this._checkEditEnabled(),this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit,await this._table.when(),setTimeout((()=>{this._loaded||(console.log(`table.state: ${this._table.state}`),this.finishLoading())}),1e3),await this.reactiveUtils.once((()=>"loaded"===this._table.state)).then((async()=>{await this.finishLoading()}))}async finishLoading(){try{this._loaded=!0,this._table.highlightIds.removeAll(),this._table.clearSelectionFilter(),this._resetColumnTemplates(),this._showOnlySelected=!1,await this._handleDefaults(),await this._sortTable(),this._initToolInfos(),this._updateToolbar()}catch(t){console.log(t)}}async _initLayerRefresh(){this._refreshHandle&&this._refreshHandle.remove(),this._refreshHandle=this._layer.on("refresh",(t=>{t.dataChanged&&(this._skipOnChange=!0,this._updateAllIds())}))}async _updateAllIds(){this._allIds=await r(this._layer),this.selectedIds=this.selectedIds.filter((t=>this._allIds.indexOf(t)>-1)),await this._refresh()}async _handleDefaults(){if(!this._defaultOidHonored&&this.defaultOid?.length>0&&this.defaultOid[0]>-1&&this._table&&(await this._selectDefaultFeature(this.defaultOid),this._defaultOidHonored=!0,this.defaultOid=void 0,this._showOnlySelected=!1,this._toggleShowSelected()),!this._defaultGlobalIdHonored&&this.defaultGlobalId?.length>0&&this._table){const t=await b(this.defaultGlobalId,this._layer),i=t?.length>0?t.map((t=>t.getObjectId())):void 0;i&&await this._selectDefaultFeature(i),this._defaultGlobalIdHonored=!0,this.defaultGlobalId=void 0,this._showOnlySelected=!1,this._toggleShowSelected()}}_initColumnsInfo(t){const i=this._table?.columns.reduce(((i,s)=>((!t||t?.indexOf(s.name)>-1)&&(i[s.name]=!s.hidden),i)),{}),s=this._table?.columns.map((t=>t.name));(t?t.filter((t=>s.indexOf(t)<0)):[]).forEach((t=>{i[t]=!0})),this._columnsInfo=t?t.reduce(((t,s)=>(t[s]=i[s],t)),{}):i}async _selectDefaultFeature(t){t.length>0&&this._table.highlightIds.addMany(t)}_checkEditEnabled(){this._editEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsUpdate,this._deleteEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsDelete}async _sortTable(){let t,i=this._layer?.objectIdField,s="desc";this.mapInfo?.layerOptions?.layers?.length>0&&this._layer?.id&&(t=this.mapInfo.layerOptions.layers.filter((t=>t.id===this._layer.id)),t&&t.length>0&&(t=t[0],t.sortField&&t.fields?.includes(t.sortField)&&(i=t.sortField),s=t?.sortOrder?t.sortOrder:"desc")),this._table&&this._layer&&(await this._table.when(),await this._layer.when((()=>{this._table.sortColumn(i,s)})))}_forceShowHide(){this._showHideDropdown&&(this._showHideDropdown.open=this._showHideOpen),this._moreDropdown&&(this._moreDropdown.open=this._showHideOpen)}_toggleShowHide(){this._showHideOpen=!this._showHideOpen}_closeShowHide(){this._showHideOpen=!1}_handleDocumentClick(t){const i=t.target?.id;this._showHideOpen&&Object.keys(this._columnsInfo).indexOf(i)<0&&"solutions-subset-list"!==i&&"chevron-right"!==i&&(this._closeShowHide(),this._moreDropdown&&(this._moreDropdown.open=!1),this._showHideDropdown&&(this._showHideDropdown.open=!1))}_handleKeyDown(t){this._ctrlIsPressed=t.ctrlKey,this._shiftIsPressed=t.shiftKey}_handleKeyUp(t){this._ctrlIsPressed=t.ctrlKey,this._shiftIsPressed=t.shiftKey}_filterModal(){return s("calcite-modal",{"aria-labelledby":"modal-title",class:"modal",kind:"brand",onCalciteModalClose:()=>{this._closeFilter()},open:this._filterOpen,widthScale:"s"},s("div",{class:"display-flex align-center",id:"modal-title",slot:"header"},this._translations?.filter?.replace("{{title}}",this._layer?.title)),s("div",{slot:"content"},s("instant-apps-filter-list",{autoUpdateUrl:!1,closeBtn:!0,closeBtnOnClick:async()=>this._closeFilter(),comboboxOverlayPositioning:"fixed",layerExpressions:this._layerExpressions,onFilterListReset:()=>this._handleFilterListReset(),onFilterUpdate:()=>this._handleFilterUpdate(),ref:t=>this._filterList=t,view:this.mapView,zoomBtn:!1})))}_handleFilterListReset(){this._filterActive=!1,this._updateShareUrl()}_handleFilterUpdate(){const t=this._layer.definitionExpression;if(this._floorExpression){const i=new RegExp(`${this._floorField} = ['].+[']`,"gm");this._layer.definitionExpression=t&&this._floorField&&t.indexOf(`${this._floorField} = '`)>-1?t.replace(i,this._floorExpression):t?`${t} AND (${this._floorExpression})`:this._floorExpression}this._filterActive=this._definitionExpression!==this._layer.definitionExpression&&(!this._floorExpression||this._layer.definitionExpression!==this._floorExpression),this._updateShareUrl()}async _closeFilter(){this._filterOpen&&(this._allIds=await r(this._layer),this._filterOpen=!1)}async _mapClicked(t){const i={include:this._layer},s=await this.mapView.hitTest(t.screenPoint,i);s.results.length>0?(s.results.forEach((t=>{const i=t.graphic.getObjectId();this._table.highlightIds.indexOf(i)<0&&(this._selectionFromMap=!0,this._table.highlightIds.add(i))})),this._showOnlySelected&&this._table.filterBySelection()):this._clearSelection()}_selectAll(){const t=this._allIds;this._table.highlightIds.removeAll(),this._skipOnChange=!0,this._table.highlightIds.addMany(t),this.selectedIds=t,this._finishOnChange(),this._selectAllActive=!0}_toggleShowSelected(){this._showOnlySelected=!this._showOnlySelected,this._showOnlySelected?this._table.filterBySelection():this._table.clearSelectionFilter()}_clearSelection(){this.selectedIds=[],this._table?.highlightIds.removeAll(),this._table?.rowHighlightIds.removeAll(),this._finishOnChange()}_toggleFilter(){this._filterOpen=!this._filterOpen}_initLayerExpressions(){const t=this.mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=t?t.filter((t=>t.id===this._layer?.id)):[],this._filterList.layerExpressions=this._layerExpressions,this._filterActive=this._layerExpressions.filter((t=>t.expressions.filter((t=>t.active)).length>0)).length>0}_switchSelected(){const t=[...this.selectedIds];this._table.highlightIds.removeAll();const i=this._allIds.reduce(((i,s)=>(t.indexOf(s)<0&&i.push(s),i)),[]).sort(((t,i)=>t-i));this._skipOnChange=!0,this._table.highlightIds.addMany(i),this.selectedIds=i,this._finishOnChange()}async _exportToCSV(){const t={},i=this._table.highlightIds.toArray();t[this._layer.id]={selectionSetNames:[this._layer.title],ids:i,layer:this._layer};const s=this._table.columns.toArray().reduce(((t,i)=>(i.hidden||t.push(i.name.toLocaleLowerCase()),t)),[]);this._updateToolInfoLoading("export",!0),this._csvExporting=!0,await u(null,t,!1,!1,!0,s,!0,!0),this._updateToolInfoLoading("export",!1),this._csvExporting=!1}_updateToolInfoLoading(t,i){this._toolInfos.some((s=>{if(s?.icon===t)return s.loading=i,!0}))}async _refresh(){await this._table.refresh(),this.featureSelectionChange.emit(this.selectedIds)}async _zoom(){if(this._layer){const t=await f(this.mapView,this._layer.id);await c(this.selectedIds,t,this.mapView,!0,void 0,this.zoomToScale)}}async _layerSelectionChanged(t){const i=t.detail[0];if(i!==this._layer?.id||this._featuresEmpty()){this._fetchingData=!0;const t=await n(this.mapView,i);await t.when((()=>{this._layer=t}))}this._fetchingData=!1}_getColumnTemplates(t,i){let s;this.mapInfo?.layerOptions?.layers.some((i=>{if(i.id===t)return s=i,!0}));const e=s?.fields&&s?.fieldOrder?s.fieldOrder.filter((t=>s.fields.indexOf(t)>-1)):void 0;let h;return i&&(h=s&&s?.fields?i.reduce(((t,i)=>{if(s.fields.indexOf(i.name)>-1){const s={type:"field",fieldName:i.name,label:i.alias,menuConfig:this._getMenuConfig(i.name)};t.push(s)}return t}),[]).sort(this._sortFields.bind(this,s?.fieldOrder)):i.map((t=>({type:"field",fieldName:t.name,label:t.alias,menuConfig:this._getMenuConfig(t.name)})))),e?h?.sort(this._sortFields.bind(this,e)):h}_sortFields(t,i,s){return t?.indexOf(i.fieldName)-t.indexOf(s.fieldName)}_getMenuConfig(t){return{items:[{label:this._translations.hideField,icon:"view-hide",autoCloseMenu:!0,clickFunction:()=>{this._handleHideClick(t)}}]}}_handleHideClick(t){this._columnsInfo[t]=!1,this._table.hideColumn(t),this._table.tableTemplate.columnTemplates.forEach((i=>{i.fieldName===t&&(i.visible=!1)}))}async _getTranslations(){const t=await o(this.el);this._translations=t[0]}static get watchers(){return{defaultOid:["defaultOidWatchHandler"],defaultGlobalId:["defaultGlobalIdWatchHandler"],enableCSV:["enableCSVWatchHandler"],enableInlineEdit:["enableInlineEditWatchHandler"],enableShare:["enableShareWatchHandler"],_controlsThatFit:["_controlsThatFitWatchHandler"],mapHidden:["mapHiddenWatchHandler"],isMobile:["isMobileWatchHandler"],mapInfo:["mapInfoWatchHandler"],mapView:["mapViewWatchHandler"],_layer:["_layerWatchHandler"],selectedIds:["selectedIdsWatchHandler"]}}};function v(t){return function(t){return-1!==t?.indexOf("http://")}(t)?t.replace(/^http:\/\//,"https://"):t}g.style=':host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir="rtl"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0}html[dir="rtl"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-modal-content-padding:0}.esri-feature-table__table-container{height:100%}';const w=class{constructor(i){t(this,i),this.mapChanged=h(this,"mapChanged",7),this.beforeMapChanged=h(this,"beforeMapChanged",7),this.toggleFilter=h(this,"toggleFilter",7),this.appProxies=void 0,this.defaultWebmapId="",this.defaultLayerId=void 0,this.enableHome=void 0,this.enableLegend=void 0,this.enableFloorFilter=void 0,this.enableFullscreen=void 0,this.enableSingleExpand=!0,this.enableSearch=void 0,this.enableBasemap=void 0,this.basemapConfig=void 0,this.hidden=void 0,this.homeZoomIndex=3,this.homeZoomPosition="top-left",this.homeZoomToolsSize="m",this.mapInfos=[],this.mapWidgetsIndex=0,this.mapWidgetsPosition="top-right",this.mapWidgetsSize="m",this.mapView=void 0,this.stackTools=!0,this.theme=void 0,this.toolOrder=void 0,this.isMapLayout=void 0,this.selectedFeaturesIds=void 0,this.selectedLayer=void 0,this.zoomToScale=void 0,this.onlyShowUpdatableLayers=void 0,this.isMobile=void 0,this.mapInfo=void 0,this._translations=void 0,this._searchConfiguration=void 0,this._webMapInfo=void 0,this._showHideOpen=!1}get el(){return i(this)}esriConfig;Home;MapView;WebMap;_defaultWebmapHonored=!1;_homeWidget;_loadedId="";_mapDiv;_mapPicker;_mapTools;_moreDropdown;_mapListExpanded=!1;_filterActive=!1;_definitionExpression;enableHomeWatchHandler(){this._initHome()}async selectedLayerWatchHandler(){await(this.selectedLayer?.when((async()=>{this._definitionExpression=this.selectedLayer.definitionExpression})))}async filterReset(){this._filterActive=!1}async updateFilter(){this._filterActive=this._definitionExpression!==this.selectedLayer.definitionExpression}mapChanged;beforeMapChanged;toggleFilter;async mapInfoChange(t){await this._loadMap(t.detail)}noLayersFound(){this.selectedLayer=void 0,this.selectedFeaturesIds=[]}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){const t=this.isMapLayout?"display-flex height-50-px":"",i=this.hidden?"visibility-hidden-1":"",h="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light",a=this.mapInfos?.length>1?"":"display-none",o=this.mapInfos?.length>1?"map-height":"height-full",l=this.isMobile?"width-full":"",n=this.isMobile?"border-top":"",d=this.isMapLayout?"":"display-none";return s(e,{key:"7029e518173a8c1e6e00049b8e68e23bed23d9cb"},s("div",{key:"2b8d9197dcb68529562728fddeb53d0a7e9cbb86",class:`${t}`},s("map-picker",{key:"2e50b7c70832f4151fafd06e860846a5efa8f6f1",class:a,isMapLayout:this.isMapLayout,mapInfos:this.mapInfos,ref:t=>this._mapPicker=t}),s("div",{key:"bc01ef7fb34400e3ff58151cab6abbabd9fa8a6f",class:`mapView-header display-flex ${d}`},s("div",{key:"1f1bf6ffb92fbc182be8333b4ae3d70271ea2f1b",class:`border-end ${l} ${n}`,id:"solutions-map-layer-picker-container"},this.mapView&&s("map-layer-picker",{key:"47320f3794f060262c4ed29ec1400a50d9744a97",appearance:"transparent",defaultLayerId:this.defaultLayerId,display:"inline-flex",height:50,isMobile:this.isMobile,mapView:this.mapView,onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,placeholderIcon:"layers",scale:"l",selectedIds:this.selectedLayer?[this.selectedLayer.id]:[],showSingleLayerAsLabel:!0,showTables:!0,type:"dropdown"})),this._getDropDownItem())),s("div",{key:"7101bfed6c0e0932275b0d28eea0ea5e1603aa8e",class:`${o} ${i}`,ref:t=>this._mapDiv=t}),s("map-tools",{key:"8ca28e50a77a25699cd6c17fe4f31788ca1cb49d",basemapConfig:this.basemapConfig,class:`box-shadow ${h}`,enableBasemap:this.enableBasemap,enableFloorFilter:this.enableFloorFilter,enableFullscreen:this.enableFullscreen,enableHome:this.enableHome,enableLegend:this.enableLegend,enableSearch:this.enableSearch,enableSingleExpand:this.enableSingleExpand,homeZoomToolsSize:this.homeZoomToolsSize,mapView:this.mapView,mapWidgetsSize:this.mapWidgetsSize,position:this.mapWidgetsPosition,ref:t=>this._mapTools=t,searchConfiguration:this._searchConfiguration,stackTools:this.stackTools,toolOrder:this.toolOrder}))}async componentDidRender(){document.onclick=t=>this._handleDocumentClick(t)}async _initModules(){const[t,i,s,e]=await l(["esri/WebMap","esri/views/MapView","esri/widgets/Home","esri/config"]);this.WebMap=t,this.MapView=i,this.Home=s,this.esriConfig=e}async _loadMap(t){const i=!this._defaultWebmapHonored&&this.defaultWebmapId,s=this.mapInfos?.filter((t=>t.id===this.defaultWebmapId)),e=JSON.stringify(t)!==JSON.stringify(this._webMapInfo);this._webMapInfo=i&&s?s[0]:!t?.id&&this.mapInfos.length>0?this.mapInfos[0]:t;const h=this._webMapInfo.id,a=i&&t?.id===this.defaultWebmapId;if(this._loadedId!==h&&!i||a){const t=new this.WebMap({portalItem:{id:h}});this.appProxies&&(await t.load(),await(o=t,l=this.esriConfig,n=this.appProxies,n&&n.forEach((t=>{o.allLayers.forEach((i=>{i&&i.url===t.sourceUrl&&(i.url=v(t.proxyUrl),i.portalItem&&i.portalItem.when((()=>{i.portalItem.url=v(t.proxyUrl)})),l.request?.interceptors?.push({urls:t.sourceUrl,before:i=>{i.url&&i.url===t.sourceUrl&&(i.url=v(t.proxyUrl))}}))}))})),o)),this.mapView=new this.MapView({container:this._mapDiv,map:t,resizeAlign:"center"}),this._loadedId=h,this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),await this.mapView.when((()=>{this._initHome(),this.mapView.ui.add(this._mapTools,{position:this.mapWidgetsPosition,index:this.mapWidgetsIndex}),this._defaultWebmapHonored=!!a||this._defaultWebmapHonored,this.mapChanged.emit({id:h,mapView:this.mapView})}))}else i?(this._defaultWebmapHonored=!0,this._mapPicker.setMapByID(h)):e&&(this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapChanged.emit({id:h,mapView:this.mapView}));var o,l,n}_initHome(){if(this.enableHome){this._homeWidget=new this.Home({view:this.mapView}),this.mapView.ui.add(this._homeWidget,{position:this.homeZoomPosition,index:this.homeZoomIndex});const t="s"===this.homeZoomToolsSize?"32px":"m"===this.homeZoomToolsSize?"40px":"48px";this._homeWidget.domNode.style.height=t,this._homeWidget.domNode.style.width=t}else this._homeWidget&&this.mapView.ui.remove(this._homeWidget)}_toggleShowHide(){this._showHideOpen=!this._showHideOpen}_forceShowHide(){this._moreDropdown&&(this._moreDropdown.open=this._showHideOpen)}_handleDocumentClick(t){const i=t.target?.id;this._showHideOpen&&"solutions-subset-list"!==i&&"solutions-more"!==i&&"chevron-down"!==i&&this._moreDropdown&&(this._showHideOpen=!1,this._moreDropdown.open=!1),"MAP-PICKER"===t.target.tagName&&(this._mapListExpanded=!this._mapListExpanded,this._mapPicker.toggle(this._mapListExpanded)),"MAP-PICKER"!==t.target.tagName&&(this._mapListExpanded=!1,this._mapPicker.close())}async _zoom(){if(this.selectedLayer){const t=await f(this.mapView,this.selectedLayer.id);await c(this.selectedFeaturesIds,t,this.mapView,!0,void 0,this.zoomToScale)}}async _toggleFilter(){this.toggleFilter.emit()}_hasFilterExpressions(){let t;return this.mapInfo?.filterConfig?.layerExpressions&&this.selectedLayer?.id&&(t=this.mapInfo.filterConfig.layerExpressions.filter((t=>t.id===this.selectedLayer.id))),t?.length>0}_getDropDownItem(){return s("calcite-dropdown",{closeOnSelectDisabled:!0,disabled:void 0===this.selectedLayer,id:"solutions-more",onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._moreDropdown=t,widthScale:"l"},s("calcite-action",{appearance:"solid",id:"solutions-more",label:"",onClick:()=>this._toggleShowHide(),slot:"trigger",text:""},s("calcite-button",{appearance:"transparent",iconEnd:this._showHideOpen?"chevron-up":"chevron-down",kind:"neutral"},this._translations.more)),s("calcite-dropdown-group",{selectionMode:"none"},this._getDropDownItems()))}_getDropDownItems(){const t=this.selectedFeaturesIds?.length>0,i=this.selectedFeaturesIds?.length>1,e=this._hasFilterExpressions();return s(a,null,s("calcite-dropdown-group",{selectionMode:"none"},s("calcite-dropdown-item",{disabled:!i,iconStart:"pencil",id:"solutions-subset-list",onClick:()=>alert(this._translations.editMultiple)},this._translations.editMultiple)),s("calcite-dropdown-group",{selectionMode:"none"},s("calcite-dropdown-item",{iconStart:"refresh",id:"solutions-subset-list",onClick:()=>{this.selectedLayer.refresh()}},this._translations.refresh)),s("calcite-dropdown-group",{selectionMode:"none"},s("calcite-dropdown-item",{disabled:!t,iconStart:"zoom-to-object",id:"solutions-subset-list",onClick:this._zoom.bind(this)},this._translations.zoom)),e&&s("calcite-dropdown-group",null,s("calcite-dropdown-item",{disabled:!1,iconStart:"filter",id:"solutions-subset-list",onClick:this._toggleFilter.bind(this),selected:this._filterActive},this._translations.filters)))}async _getTranslations(){const t=await o(this.el);this._translations=t[0]}static get watchers(){return{enableHome:["enableHomeWatchHandler"],selectedLayer:["selectedLayerWatchHandler"]}}};w.style=":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 51px)}.height-full{height:100%}.height-50-px{height:50px}.box-shadow{box-shadow:none !important}.visibility-hidden-1{visibility:hidden;height:1px;}.display-none{display:none}";export{m as card_manager,g as layer_table,w as map_card}
6
+ import{r as t,g as i,h as s,H as e,c as h,F as a}from"./p-f4c4a2b7.js";import{g as o,l}from"./p-09b47605.js";import{g as n,q as d,e as c,f as r,i as p,j as b,c as f}from"./p-eb483242.js";import{d as u}from"./p-2923d5ed.js";import"./p-6a68306c.js";import"./p-d4056c1c.js";import"./p-80cb7c73.js";import"./p-659678f1.js";import"./p-7c583516.js";const m=class{constructor(i){t(this,i),this.enableEditGeometry=!1,this.isMobile=void 0,this.layer=void 0,this.mapView=void 0,this.zoomAndScrollToSelected=void 0,this.selectedFeaturesIds=void 0,this._cardLoading=!1,this._graphics=void 0,this._translations=void 0}get el(){return i(this)}async featureSelectionChange(t){const i=t.detail;this._graphics=await this._getFeaturesByIds(i)}async layerSelectionChange(t){const i=t.detail[0];this.layer=await n(this.mapView,i)}async componentWillLoad(){await this._getTranslations(),this.selectedFeaturesIds?.length>0&&(this._graphics=await this._getFeaturesByIds(this.selectedFeaturesIds))}render(){const t=this._graphics?.length>0?"":"display-none",i=this._graphics?.length>0?"display-none":"";return s(e,{key:"0309205d485d9c7a5c558b3619a6c5ac03fcb528"},s("div",{key:"a5d291f6073b0e0a918573549c6eb29fe1d892dd",class:"overflow-auto height-full"},s("calcite-shell",{key:"572b9cdf002e0c8c46e6c4bc5e2f1f8494228e93",class:"position-relative "+t},s("div",{key:"f8ba07deb9786d64f3d25011ff66ead43d809bf1"},s("info-card",{key:"6eda3ab2cfa2e5fb948f5a7ddaeb6b9022aa5543",enableEditGeometry:this.enableEditGeometry,graphics:this._graphics,isLoading:this._cardLoading,isMobile:this.isMobile,mapView:this.mapView}))),s("calcite-shell",{key:"f32d9cfe3a41bbd7d58cdc732c8abe99b232beb7",class:"position-relative "+i},s("div",{key:"b97eb023c5d57a4a8dda09467d8599166da40f3c",class:"padding-1"},s("calcite-notice",{key:"23a204782bd254909e3ab803a944d10004e4954a",icon:"table",open:!0},s("div",{key:"ea25078647612b8fa40e26b4474a91c853dae126",slot:"message"},this._translations.selectFeaturesToStart))))))}async _getFeaturesByIds(t){return(t.length>0?await d(t,this.layer,[],!1,this.mapView.spatialReference):[]).sort(((i,s)=>t.indexOf(i.getObjectId())-t.indexOf(s.getObjectId())))}async _getTranslations(){const t=await o(this.el);this._translations=t[0]}};m.style=":host{display:block !important}.display-flex{display:flex}.display-none{display:none}.w-100{width:100%}.padding-bottom-1{padding-bottom:1rem}.padding-1{padding:1rem}.position-relative{position:relative}.focus-margin{margin:1px 1px 0px 1px}.overflow-auto{overflow:auto}.height-full{height:100%}card-manager{display:block}";const g=class{constructor(i){t(this,i),this.featureSelectionChange=h(this,"featureSelectionChange",7),this.toggleFilter=h(this,"toggleFilter",7),this.defaultGlobalId=void 0,this.defaultLayerId=void 0,this.defaultOid=void 0,this.enableAutoRefresh=void 0,this.enableColumnReorder=!0,this.enableCSV=void 0,this.enableInlineEdit=void 0,this.enableShare=void 0,this.isMobile=void 0,this.mapHidden=void 0,this.mapInfo=void 0,this.mapView=void 0,this.onlyShowUpdatableLayers=void 0,this.selectedIds=[],this.shareIncludeEmbed=void 0,this.shareIncludeSocial=void 0,this.showNewestFirst=void 0,this.zoomAndScrollToSelected=void 0,this.zoomToScale=void 0,this.createFilterModal=!0,this._allIds=[],this._controlsThatFit=void 0,this._csvExporting=!1,this._fetchingData=!1,this._filterActive=!1,this._filterOpen=!1,this._layer=void 0,this._selectAllActive=!1,this._showHideOpen=!1,this._showOnlySelected=!1,this._toolInfos=void 0,this._translations=void 0}get el(){return i(this)}FeatureTable;TableTemplate;_columnsInfo;_ctrlIsPressed=!1;_currentId;_editEnabled;_defaultFilterHonored=!1;_defaultGlobalIdHonored=!1;_defaultOidHonored=!1;_defaultVisibleToolSizeInfos;_definitionExpression;_deleteEnabled;_filterList;_floorExpression;_floorField;_floorFacility;_floorLevel;_floorSite;_layerExpressions;_loaded=!1;_mapClickHandle;_observerSet=!1;_previousCurrentId;reactiveUtils;_refreshHandle;_resizeObserver;_selectAllElement;_selectionFromMap=!1;_shareNode;_shiftIsPressed=!1;_showHideDropdown;_skipOnChange=!1;_moreDropdown;_table;_tableNode;_timeout;_toolbar;_toolbarSizeInfos;async defaultOidWatchHandler(){await this._handleDefaults()}async defaultGlobalIdWatchHandler(){await this._handleDefaults()}enableCSVWatchHandler(){this._toolInfos?.length>0&&this._initToolInfos()}enableInlineEditWatchHandler(){this._table&&(this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit)}enableShareWatchHandler(){this._toolbar&&this._updateToolbar()}_controlsThatFitWatchHandler(){const t=this._controlsThatFit?this._controlsThatFit.reduce(((t,i)=>(t.push(i.id),t)),[]):[];this._toolInfos=this._toolInfos?.map((i=>{if(i&&this._controlsThatFit){const s=this._getId(i.icon);return i.isOverflow=t.indexOf(s)<0,i}}))}mapHiddenWatchHandler(){this._toolInfos?.length>0&&this._initToolInfos()}isMobileWatchHandler(){this._toolInfos||this.isMobile||this._initToolInfos()}async mapInfoWatchHandler(){this._resetColumnTemplates(),this.createFilterModal&&this._initLayerExpressions(),this._initToolInfos(),this._updateToolbar(),await this._sortTable()}async mapViewWatchHandler(){this._mapClickHandle&&this._mapClickHandle.remove(),this.mapView&&(this._floorExpression=void 0,this._updateShareUrl(),this._mapClickHandle=this.reactiveUtils.on((()=>this.mapView),"click",(t=>{this._mapClicked(t)})))}async _layerWatchHandler(){this._fetchingData=!0,await(this._layer?.when((async()=>{this._definitionExpression=this._layer.definitionExpression,this._floorField=this._layer.floorInfo?.floorField,this._updateFloorDefinitionExpression(),await this._resetTable(),this.createFilterModal&&this._initLayerExpressions(),this._updateShareUrl(),this._fetchingData=!1})))}async selectedIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions(),this._selectAllActive&&this.selectedIds.length!==this._allIds.length&&(this._selectAllActive=!1),this.selectedIds.length>0&&(this._table.rowHighlightIds.removeAll(),this._table.rowHighlightIds.add(this.selectedIds[0]))}async filterReset(){this._handleFilterListReset()}async filterUpdate(){this._handleFilterUpdate()}async closeFilter(){await this._closeFilter()}async refresh(){await this._refresh()}featureSelectionChange;toggleFilter;async selectionChanged(t){const i=t.detail.selectedFeature[0],s=i.getObjectId(),e=this._table;if(e.rowHighlightIds.length&&e.rowHighlightIds.removeAll(),e.rowHighlightIds.add(s),this.zoomAndScrollToSelected){const t=this._table.viewModel.getObjectIdIndex(s);this._table.scrollToIndex(t);const e=i.layer;let h;this.mapView.allLayerViews.toArray().some((t=>{if(t.layer.title===e.title&&"feature"===t.layer.type)return h=t,!0})),h&&await c([s],h,this.mapView,!0,void 0,this.zoomToScale)}}async layerSelectionChange(t){await this._layerSelectionChanged(t)}async editsComplete(t){const i=t.detail;"delete"!==i&&"add"!==i||(this._allIds=await r(this._layer)),await this._refresh()}async facilityChanged(t){this._floorFacility=t.detail,this._updateFloorDefinitionExpression()}async levelChanged(t){this._floorLevel=t.detail,this._updateFloorDefinitionExpression()}async siteChanged(t){this._floorSite=t.detail,this._updateFloorDefinitionExpression()}noLayersFound(){this._layer=void 0,this._allIds=[],this._clearSelection()}async componentWillLoad(){await this._getTranslations(),await this._initModules(),this._initToolInfos(),this._resizeObserver||(this._resizeObserver=new ResizeObserver((()=>this._onResize())))}render(){const t=this._fetchingData?"display-none":"",i=this._fetchingData?"":"display-none",h=this._allIds.length.toString(),a=this.selectedIds.length.toString(),o=this.isMobile?"height-full":"height-full-adjusted";return this._validateActiveActions(),s(e,{key:"17071727cb283d84afb8beab8382bd3623f35920"},s("calcite-shell",{key:"f8508d67fd4b100fdc3f52b7db63194714cf216b"},this._getTableControlRow("header"),s("div",{key:"5c1ebcb0530764a9568dc5dae153632a3d9491c8",class:`width-full ${o}`},s("calcite-panel",{key:"7a6420894e4e50e2b4cda6e5ebe043134f4c0397",class:"height-full width-full"},s("calcite-loader",{key:"48d4fe7e27fae877ca0e4caa22555968636f6c33",class:i,label:this._translations.fetchingData,scale:"l"}),s("div",{key:"cce71356e8ca141d1a18b32944d4fa03af8aae33",class:t,ref:this.onTableNodeCreate})),this.isMobile?void 0:s("div",{class:"bottom-left text-color height-19"},this._translations.recordsSelected.replace("{{total}}",h).replace("{{selected}}",a)))),this.createFilterModal&&this._filterModal())}async componentDidLoad(){this.isMobile||this._observerSet||(this._resizeObserver.observe(this._toolbar),this._observerSet=!0),document.onclick=t=>this._handleDocumentClick(t),document.onkeydown=t=>this._handleKeyDown(t),document.onkeyup=t=>this._handleKeyUp(t)}componentDidRender(){this._updateToolbar()}async _initModules(){const[t,i,s]=await l(["esri/widgets/FeatureTable","esri/core/reactiveUtils","esri/widgets/FeatureTable/support/TableTemplate"]);this.FeatureTable=t,this.reactiveUtils=i,this.TableTemplate=s}_onResize(){this._updateToolbar()}_getTableControlRow(t){return s("div",{class:"display-flex border-bottom height-51",ref:t=>this._toolbar=t,slot:t},this._getActionBar(),this.isMobile?void 0:this._getDropdown("more-table-options"),this.enableShare&&!this.isMobile?this._getShare("share"):void 0)}_getActionBar(){const t=this.isMobile?"width-full":"",i=this.isMobile?"border-top":"";return s("calcite-action-bar",{class:t,expandDisabled:!0,expanded:!0,id:this._getId("bar"),layout:"horizontal"},s("div",{class:`border-end ${t} ${i}`,id:"solutions-map-layer-picker-container"},s("map-layer-picker",{appearance:"transparent",defaultLayerId:this.defaultLayerId,display:"inline-flex",height:50,isMobile:this.isMobile,mapView:this.mapView,onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,placeholderIcon:"layers",scale:"l",selectedIds:this._layer?[this._layer?.id]:[],showSingleLayerAsLabel:!0,showTables:!0,type:"dropdown"})),this.isMobile?void 0:this._getActions())}_getActions(){const t=this._getActionItems();return t?.reduce(((t,i)=>(i&&!i.isOverflow&&t.push(i.isDanger?this._getDangerAction(i.icon,i.label,i.func,i.disabled):i.isSublist?s("calcite-dropdown",{closeOnSelectDisabled:!0,id:this._getId(i.icon),onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._showHideDropdown=t},this._getAction(i.active,this._showHideOpen?"chevron-down":i.icon,i.indicator,i.label,i.func,i.disabled,i.loading,"trigger"),this._showHideOpen?this._getFieldlist():void 0):this._getAction(i.active,i.icon,i.indicator,i.label,i.func,i.disabled,i.loading)),t)),[])}_getFieldlist(){return this._columnsInfo?s("calcite-dropdown-group",{"selection-mode":"multiple"},Object.keys(this._columnsInfo).map((t=>s("calcite-dropdown-item",{id:t,onClick:t=>{const i=t.target;this._columnsInfo[i.id]=i.selected,i.selected?this._table.showColumn(i.id):this._table.hideColumn(i.id)},selected:this._columnsInfo[t]},t)))):void 0}_validateEnabledActions(){const t=this._featuresSelected(),i=this.selectedIds.length>1&&this._layer?.capabilities?.operations?.supportsUpdate,s=["zoom-to-object","pencil","trash","erase","selected-items-filter"];this._toolInfos?.forEach((e=>{e&&s.indexOf(e.icon)>-1&&(e.disabled="pencil"===e.icon?!i:!t)}))}_validateActiveActions(){const t=["filter","list-check-all","selected-items-filter"];this._toolInfos?.forEach((i=>{i&&t.indexOf(i.icon)>-1&&("filter"===i.icon&&(i.indicator=this._filterActive),"list-check-all"===i.icon&&(i.active=this._selectAllActive),"selected-items-filter"===i.icon&&(i.active=this._showOnlySelected))}))}_initToolInfos(){const t=this._featuresSelected(),i=this.selectedIds.length>1&&this._layer?.capabilities?.operations?.supportsUpdate,s=this._featuresEmpty(),e=this._hasFilterExpressions();this._translations&&(this._toolInfos=[this.mapHidden?void 0:{active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>this._zoom(),disabled:!t,isOverflow:!1},e?{active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>this.createFilterModal?this._toggleFilter():this.toggleFilter.emit(),disabled:!1,isOverflow:!1}:void 0,this.mapHidden?void 0:{active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>alert(this._translations.editMultiple),disabled:!i,isOverflow:!1,isSublist:!1},this._deleteEnabled?{active:void 0,icon:"trash",indicator:void 0,label:void 0,func:void 0,disabled:!t,isDanger:!0,isOverflow:!1}:void 0,{active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>this._clearSelection(),disabled:!t,isOverflow:!1},{active:!1,icon:"selected-items-filter",indicator:!1,label:this._showOnlySelected?this._translations.showAll:this._translations.showSelected,func:()=>this._toggleShowSelected(),disabled:!t,isOverflow:!1},{active:!1,icon:"list-check-all",indicator:!1,func:()=>this._selectAll(),label:this._translations.selectAll,disabled:s,isOverflow:!1},{active:!1,icon:"compare",indicator:!1,func:()=>this._switchSelected(),label:this._translations.switchSelected,disabled:s,isOverflow:!1},{active:!1,icon:"refresh",indicator:!1,func:()=>this._refresh(),label:this._translations.refresh,disabled:!1,isOverflow:!1},this.enableCSV?{active:!1,icon:"export",indicator:!1,func:()=>{this._exportToCSV()},label:this._translations.exportCSV,loading:this._csvExporting,disabled:s,isOverflow:!1}:void 0,{active:!1,icon:this._showHideOpen?"chevron-down":"chevron-right",indicator:!1,func:()=>this._toggleShowHide(),label:this._translations.showHideColumns,disabled:!1,isOverflow:!1,isSublist:!0}],this._defaultVisibleToolSizeInfos=void 0)}_updateFloorDefinitionExpression(){if(this._floorField&&this._floorLevel){const t=`${this._floorField} = '${this._floorLevel}'`,i=this._layer.definitionExpression;this._layer.definitionExpression=i?.indexOf(this._floorExpression)>-1?i.replace(this._floorExpression,t):i?`${i} AND (${t})`:t,this._floorExpression=t}}_featuresSelected(){return this.selectedIds.length>0}_featuresEmpty(){return 0===this._allIds.length}_hasFilterExpressions(){let t;return this.mapInfo?.filterConfig?.layerExpressions&&this._layer?.id&&(t=this.mapInfo.filterConfig.layerExpressions.filter((t=>t.id===this._layer.id))),t?.length>0}_updateToolbar(){this._timeout&&clearTimeout(this._timeout),!this.isMobile&&this._toolbar&&this._toolInfos&&(this._timeout=setTimeout((()=>{clearTimeout(this._timeout),this._setToolbarSizeInfos();const t=this._toolbar.offsetWidth;let i=this._toolbarSizeInfos.reduce(((t,i)=>t+i.width),0);const s=["solutions-more","solutions-map-layer-picker-container","solutions-action-share"];if(i>t){if(this._toolbarSizeInfos.length>0){const e=[...this._toolbarSizeInfos].reverse().reduce(((e,h)=>(s.indexOf(h.id)<0&&(i>t?i-=h.width:e.push(h)),e)),[]).reverse();this._setControlsThatFit(e,s)}}else if(this._defaultVisibleToolSizeInfos){const e=this._toolbarSizeInfos.reduce(((t,i)=>(t.push(i.id),t)),[]);let h=!1;const a=[...this._defaultVisibleToolSizeInfos].reduce(((a,o)=>(!h&&s.indexOf(o.id)<0&&(e.indexOf(o.id)>-1||i+o.width<=t)?(e.indexOf(o.id)<0&&(i+=o.width),a.push(o)):s.indexOf(o.id)<0&&i+o.width>t&&(h=!0),a)),[]);this._setControlsThatFit(a,s)}}),250))}_setControlsThatFit(t,i){let s=JSON.stringify(t)!==JSON.stringify(this._controlsThatFit);const e=document.getElementById("solutions-action-bar");e?.childNodes?.forEach((t=>{i.indexOf(t.id)<0&&!s&&(s=this._controlsThatFit.map((t=>t.id)).indexOf(t.id)<0)})),s&&(this._controlsThatFit=[...t])}_setToolbarSizeInfos(){let t=!1;this._toolbarSizeInfos=[],this._toolbar.childNodes.forEach(((i,s)=>{0===s?i.childNodes.forEach((i=>{this._toolbarSizeInfos.push({id:i.id,width:i.offsetWidth}),t||(t=i.offsetWidth>0)})):i.referenceElement||(this._toolbarSizeInfos.push({id:i.id,width:i.offsetWidth}),t||(t=i.offsetWidth>0))})),t&&!this._defaultVisibleToolSizeInfos&&(this._defaultVisibleToolSizeInfos=[...this._toolbarSizeInfos])}_getActionItems(){return this._toolInfos?.filter((t=>t&&!t.isOverflow))}_getDropdown(t){const i=this._getDropdownItems();return i.length>0?s("calcite-dropdown",{closeOnSelectDisabled:!0,disabled:void 0===this._layer,id:"solutions-more",onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._moreDropdown=t},s("calcite-action",{appearance:"solid",id:t,label:"",onClick:()=>this._closeShowHide(),slot:"trigger",text:""},s("calcite-button",{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral"},this._translations.more)),s("calcite-dropdown-group",{"selection-mode":"none"},i.map((t=>s("calcite-dropdown-group",{class:t.disabled?"disabled":"",selectionMode:t.disabled?"none":"single"},s("calcite-dropdown-item",{disabled:t.loading,iconStart:t.isSublist&&this._showHideOpen?"chevron-down":t.loading?"":t.icon,id:"solutions-subset-list",onClick:t.func},t.loading?s("div",{class:"display-flex"},s("calcite-loader",{inline:!0,label:t.label,scale:"m"}),t.label):t.label))))),this._showHideOpen?this._getFieldlist():void 0):void 0}_getDropdownItems(){return this._toolInfos?.filter((t=>t&&t.isOverflow))}_getAction(t,i,e,h,a,o,l,n){const d=void 0===this._layer||o;return s("div",{class:"display-flex",id:this._getId(i),slot:n},s("calcite-action",{active:t,appearance:"solid",disabled:d,icon:i,id:i,indicator:e,label:h,loading:l,onClick:a,text:h,textEnabled:!0}),this._getToolTip("bottom",i,h))}_getShare(t){return s("div",{class:"share-action",id:this._getId(t)},s("instant-apps-social-share",{autoUpdateShareUrl:!1,class:"instant-app-share",embed:this.shareIncludeEmbed,popoverButtonIconScale:"s",ref:t=>this._shareNode=t,scale:"m",shareButtonColor:"neutral",shareButtonType:"action",socialMedia:this.shareIncludeSocial,view:this.mapView}),this._getToolTip("bottom",t,this._translations.share))}_updateShareUrl(){const t=this._shareNode?.shareUrl;if(!t)return;const i=new URL(t);this.mapInfo?.id?i.searchParams.set("webmap",this.mapInfo.id):i.searchParams.delete("webmap"),this._layer?.id?i.searchParams.set("layer",this._layer.id):i.searchParams.delete("layer"),this.selectedIds?.length>0?i.searchParams.set("oid",this.selectedIds.join(",")):i.searchParams.delete("oid"),this._shareNode.shareUrl=i.href}_getToolTip(t,i,e){return document.getElementById(i)?s("calcite-tooltip",{placement:t,"reference-element":i},s("span",null,e)):void 0}_getId(t){return`solutions-action-${t}`}_getDangerAction(t,i,e,h){const a=void 0===this._layer||h;return s("div",{class:"display-flex",id:this._getId(t)},"trash"===t?s("delete-button",{buttonType:"action",class:"display-flex",disabled:a,icon:t,ids:this._getIds(),layer:this._layer}):s("calcite-action",{appearance:"solid",disabled:a,id:t,onClick:e,text:""},s("calcite-button",{appearance:"transparent",iconStart:t,kind:"danger"},i)),this._getToolTip("bottom",t,i))}_getIds(){return this._table.highlightIds.toArray()}onTableNodeCreate=t=>{this._tableNode=t};async _getTable(t,i){this._layer&&(await this._layer.when((()=>{this._table=new this.FeatureTable({autoRefreshEnabled:this.enableAutoRefresh,layer:this._layer,view:this.mapView,columnReorderingEnabled:this.enableColumnReorder,editingEnabled:this._editEnabled&&this.enableInlineEdit,highlightEnabled:!0,multiSortEnabled:!1,visibleElements:{header:!1,menu:!1},tableTemplate:{columnTemplates:i},container:t})})),await this._table.when((()=>{this._table.highlightIds.on("change",(t=>{this._handleOnChange(t)}))})))}async _handleOnChange(t){const i=[...this._table.highlightIds.toArray()];if(this._skipOnChange)this._skipOnChange=!1;else{if(!this._ctrlIsPressed&&!this._shiftIsPressed||this._selectionFromMap&&this._shiftIsPressed)if(this.selectedIds.length>0){this._skipOnChange=!0;const s=this.selectedIds.length>1&&1===t.removed.length?t.removed:i.filter((t=>this.selectedIds.indexOf(t)<0));this._clearSelection(),this.selectedIds=[...s],s.length>0?this._table.highlightIds.add(s[0]):this._skipOnChange=!1}else this.selectedIds=i.reverse();else if(this._ctrlIsPressed)this.selectedIds=i.reverse();else if(this._shiftIsPressed&&i?.length>0)if(this._skipOnChange=!0,this._previousCurrentId=this._currentId,this._currentId=[...i].reverse()[0],1===i.length)this._skipOnChange=!1;else if(this._previousCurrentId!==this._currentId){const t=this._table.activeSortOrders.reduce(((t,i)=>(t.push(`${i.fieldName} ${i.direction}`),t)),[]),s=await p(0,this._layer,[],t);let e=!1;const h=this._table.viewModel.getObjectIdIndex(this._previousCurrentId),a=this._table.viewModel.getObjectIdIndex(this._currentId);this._skipOnChange=(h<a?h:a)+1!==(a>h?a:h);const o=s.reduce(((t,i)=>{const s=i;return s===this._currentId||s===this._previousCurrentId?(e=!e,t.indexOf(s)<0&&t.push(s)):e&&t.indexOf(s)<0&&t.push(s),t}),[]),l=h<a?o.reverse():o;this.selectedIds=[...new Set([...l,...this.selectedIds])],this._table.highlightIds.addMany(this.selectedIds.filter((t=>i.indexOf(t)<0)))}this._finishOnChange()}this._currentId=[...this._table.highlightIds.toArray()].reverse()[0],this._selectionFromMap=!1}_finishOnChange(){this._showOnlySelected&&(this._featuresSelected()?this._table.filterBySelection():this._toggleShowSelected()),this.featureSelectionChange.emit(this.selectedIds)}_resetColumnTemplates(){const t=this._getColumnTemplates(this._layer?.id,this._layer?.fields),i=t?.some(((t,i)=>JSON.stringify(this._table?.tableTemplate.columnTemplates[i])!==JSON.stringify(t)));if(this._table&&t&&(i||!this._columnsInfo)){this._table.tableTemplate=new this.TableTemplate({columnTemplates:t});const i=t.map((t=>t.fieldName));this._initColumnsInfo(i)}}async _resetTable(){if(this._loaded=!1,this._clearSelection(),this._allIds=await r(this._layer),this._table)this._table.view=this.mapView,this._table.layer=this._layer;else{const t=this._getColumnTemplates(this._layer.id,this._layer?.fields);await this._getTable(this._tableNode,t)}await this._initLayerRefresh(),this._checkEditEnabled(),this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit,await this._table.when(),setTimeout((()=>{this._loaded||(console.log(`table.state: ${this._table.state}`),this.finishLoading())}),1e3),await this.reactiveUtils.once((()=>"loaded"===this._table.state)).then((async()=>{await this.finishLoading()}))}async finishLoading(){try{this._loaded=!0,this._table.highlightIds.removeAll(),this._table.clearSelectionFilter(),this._resetColumnTemplates(),this._showOnlySelected=!1,await this._handleDefaults(),await this._sortTable(),this._initToolInfos(),this._updateToolbar()}catch(t){console.log(t)}}async _initLayerRefresh(){this._refreshHandle&&this._refreshHandle.remove(),this._refreshHandle=this._layer.on("refresh",(t=>{t.dataChanged&&(this._skipOnChange=!0,this._updateAllIds())}))}async _updateAllIds(){this._allIds=await r(this._layer),this.selectedIds=this.selectedIds.filter((t=>this._allIds.indexOf(t)>-1)),await this._refresh()}async _handleDefaults(){if(!this._defaultOidHonored&&this.defaultOid?.length>0&&this.defaultOid[0]>-1&&this._table&&(await this._selectDefaultFeature(this.defaultOid),this._defaultOidHonored=!0,this.defaultOid=void 0,this._showOnlySelected=!1,this._toggleShowSelected()),!this._defaultGlobalIdHonored&&this.defaultGlobalId?.length>0&&this._table){const t=await b(this.defaultGlobalId,this._layer),i=t?.length>0?t.map((t=>t.getObjectId())):void 0;i&&await this._selectDefaultFeature(i),this._defaultGlobalIdHonored=!0,this.defaultGlobalId=void 0,this._showOnlySelected=!1,this._toggleShowSelected()}}_initColumnsInfo(t){const i=this._table?.columns.reduce(((i,s)=>((!t||t?.indexOf(s.name)>-1)&&(i[s.name]=!s.hidden),i)),{}),s=this._table?.columns.map((t=>t.name));(t?t.filter((t=>s.indexOf(t)<0)):[]).forEach((t=>{i[t]=!0})),this._columnsInfo=t?t.reduce(((t,s)=>(t[s]=i[s],t)),{}):i}async _selectDefaultFeature(t){t.length>0&&this._table.highlightIds.addMany(t)}_checkEditEnabled(){this._editEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsUpdate,this._deleteEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsDelete}async _sortTable(){let t,i=this._layer?.objectIdField,s="desc";this.mapInfo?.layerOptions?.layers?.length>0&&this._layer?.id&&(t=this.mapInfo.layerOptions.layers.filter((t=>t.id===this._layer.id)),t&&t.length>0&&(t=t[0],t.sortField&&t.fields?.includes(t.sortField)&&(i=t.sortField),s=t?.sortOrder?t.sortOrder:"desc")),this._table&&this._layer&&(await this._table.when(),await this._layer.when((()=>{this._table.sortColumn(i,s)})))}_forceShowHide(){this._showHideDropdown&&(this._showHideDropdown.open=this._showHideOpen),this._moreDropdown&&(this._moreDropdown.open=this._showHideOpen)}_toggleShowHide(){this._showHideOpen=!this._showHideOpen}_closeShowHide(){this._showHideOpen=!1}_handleDocumentClick(t){const i=t.target?.id;this._showHideOpen&&Object.keys(this._columnsInfo).indexOf(i)<0&&"solutions-subset-list"!==i&&"chevron-right"!==i&&(this._closeShowHide(),this._moreDropdown&&(this._moreDropdown.open=!1),this._showHideDropdown&&(this._showHideDropdown.open=!1))}_handleKeyDown(t){this._ctrlIsPressed=t.ctrlKey,this._shiftIsPressed=t.shiftKey}_handleKeyUp(t){this._ctrlIsPressed=t.ctrlKey,this._shiftIsPressed=t.shiftKey}_filterModal(){return s("calcite-modal",{"aria-labelledby":"modal-title",class:"modal",kind:"brand",onCalciteModalClose:()=>{this._closeFilter()},open:this._filterOpen,widthScale:"s"},s("div",{class:"display-flex align-center",id:"modal-title",slot:"header"},this._translations?.filter?.replace("{{title}}",this._layer?.title)),s("div",{slot:"content"},s("instant-apps-filter-list",{autoUpdateUrl:!1,closeBtn:!0,closeBtnOnClick:async()=>this._closeFilter(),comboboxOverlayPositioning:"fixed",layerExpressions:this._layerExpressions,onFilterListReset:()=>this._handleFilterListReset(),onFilterUpdate:()=>this._handleFilterUpdate(),ref:t=>this._filterList=t,view:this.mapView,zoomBtn:!1})))}_handleFilterListReset(){this._filterActive=!1,this._updateShareUrl()}_handleFilterUpdate(){const t=this._layer.definitionExpression;if(this._floorExpression){const i=new RegExp(`${this._floorField} = ['].+[']`,"gm");this._layer.definitionExpression=t&&this._floorField&&t.indexOf(`${this._floorField} = '`)>-1?t.replace(i,this._floorExpression):t?`${t} AND (${this._floorExpression})`:this._floorExpression}this._filterActive=this._definitionExpression!==this._layer.definitionExpression&&(!this._floorExpression||this._layer.definitionExpression!==this._floorExpression),this._updateShareUrl()}async _closeFilter(){this._filterOpen&&(this._allIds=await r(this._layer),this._filterOpen=!1)}async _mapClicked(t){const i={include:this._layer},s=await this.mapView.hitTest(t.screenPoint,i);s.results.length>0?(s.results.forEach((t=>{const i=t.graphic.getObjectId();this._table.highlightIds.indexOf(i)<0&&(this._selectionFromMap=!0,this._table.highlightIds.add(i))})),this._showOnlySelected&&this._table.filterBySelection()):this._clearSelection()}_selectAll(){const t=this._allIds;this._table.highlightIds.removeAll(),this._skipOnChange=!0,this._table.highlightIds.addMany(t),this.selectedIds=t,this._finishOnChange(),this._selectAllActive=!0}_toggleShowSelected(){this._showOnlySelected=!this._showOnlySelected,this._showOnlySelected?this._table.filterBySelection():this._table.clearSelectionFilter()}_clearSelection(){this.selectedIds=[],this._table?.highlightIds.removeAll(),this._table?.rowHighlightIds.removeAll(),this._finishOnChange()}_toggleFilter(){this._filterOpen=!this._filterOpen}_initLayerExpressions(){const t=this.mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=t?t.filter((t=>t.id===this._layer?.id)):[],this._filterList.layerExpressions=this._layerExpressions,this._filterActive=this._layerExpressions.filter((t=>t.expressions.filter((t=>t.active)).length>0)).length>0}_switchSelected(){const t=[...this.selectedIds];this._table.highlightIds.removeAll();const i=this._allIds.reduce(((i,s)=>(t.indexOf(s)<0&&i.push(s),i)),[]).sort(((t,i)=>t-i));this._skipOnChange=!0,this._table.highlightIds.addMany(i),this.selectedIds=i,this._finishOnChange()}async _exportToCSV(){const t={},i=this._table.highlightIds.toArray();t[this._layer.id]={selectionSetNames:[this._layer.title],ids:i,layer:this._layer};const s=this._table.columns.toArray().reduce(((t,i)=>(i.hidden||t.push(i.name.toLocaleLowerCase()),t)),[]);this._updateToolInfoLoading("export",!0),this._csvExporting=!0,await u(null,t,!1,!1,!0,s,!0,!0),this._updateToolInfoLoading("export",!1),this._csvExporting=!1}_updateToolInfoLoading(t,i){this._toolInfos.some((s=>{if(s?.icon===t)return s.loading=i,!0}))}async _refresh(){await this._table.refresh(),this.featureSelectionChange.emit(this.selectedIds)}async _zoom(){if(this._layer){const t=await f(this.mapView,this._layer.id);await c(this.selectedIds,t,this.mapView,!0,void 0,this.zoomToScale)}}async _layerSelectionChanged(t){const i=t.detail[0];if(i!==this._layer?.id||this._featuresEmpty()){this._fetchingData=!0;const t=await n(this.mapView,i);await t.when((()=>{this._layer=t}))}this._fetchingData=!1}_getColumnTemplates(t,i){let s;this.mapInfo?.layerOptions?.layers.some((i=>{if(i.id===t)return s=i,!0}));const e=s?.fields&&s?.fieldOrder?s.fieldOrder.filter((t=>s.fields.indexOf(t)>-1)):void 0;let h;return i&&(h=s&&s?.fields?i.reduce(((t,i)=>{if(s.fields.indexOf(i.name)>-1){const s={type:"field",fieldName:i.name,label:i.alias,menuConfig:this._getMenuConfig(i.name)};t.push(s)}return t}),[]).sort(this._sortFields.bind(this,s?.fieldOrder)):i.map((t=>({type:"field",fieldName:t.name,label:t.alias,menuConfig:this._getMenuConfig(t.name)})))),e?h?.sort(this._sortFields.bind(this,e)):h}_sortFields(t,i,s){return t?.indexOf(i.fieldName)-t.indexOf(s.fieldName)}_getMenuConfig(t){return{items:[{label:this._translations.hideField,icon:"view-hide",autoCloseMenu:!0,clickFunction:()=>{this._handleHideClick(t)}}]}}_handleHideClick(t){this._columnsInfo[t]=!1,this._table.hideColumn(t),this._table.tableTemplate.columnTemplates.forEach((i=>{i.fieldName===t&&(i.visible=!1)}))}async _getTranslations(){const t=await o(this.el);this._translations=t[0]}static get watchers(){return{defaultOid:["defaultOidWatchHandler"],defaultGlobalId:["defaultGlobalIdWatchHandler"],enableCSV:["enableCSVWatchHandler"],enableInlineEdit:["enableInlineEditWatchHandler"],enableShare:["enableShareWatchHandler"],_controlsThatFit:["_controlsThatFitWatchHandler"],mapHidden:["mapHiddenWatchHandler"],isMobile:["isMobileWatchHandler"],mapInfo:["mapInfoWatchHandler"],mapView:["mapViewWatchHandler"],_layer:["_layerWatchHandler"],selectedIds:["selectedIdsWatchHandler"]}}};function v(t){return function(t){return-1!==t?.indexOf("http://")}(t)?t.replace(/^http:\/\//,"https://"):t}g.style=':host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir="rtl"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0}html[dir="rtl"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-modal-content-padding:0}.esri-feature-table__table-container{height:100%}';const w=class{constructor(i){t(this,i),this.mapChanged=h(this,"mapChanged",7),this.beforeMapChanged=h(this,"beforeMapChanged",7),this.toggleFilter=h(this,"toggleFilter",7),this.appProxies=void 0,this.defaultWebmapId="",this.defaultLayerId=void 0,this.enableHome=void 0,this.enableLegend=void 0,this.enableFloorFilter=void 0,this.enableFullscreen=void 0,this.enableSingleExpand=!0,this.enableSearch=void 0,this.enableBasemap=void 0,this.basemapConfig=void 0,this.hidden=void 0,this.homeZoomIndex=3,this.homeZoomPosition="top-left",this.homeZoomToolsSize="m",this.mapInfos=[],this.mapWidgetsIndex=0,this.mapWidgetsPosition="top-right",this.mapWidgetsSize="m",this.mapView=void 0,this.stackTools=!0,this.theme=void 0,this.toolOrder=void 0,this.isMapLayout=void 0,this.selectedFeaturesIds=void 0,this.selectedLayer=void 0,this.zoomToScale=void 0,this.onlyShowUpdatableLayers=void 0,this.isMobile=void 0,this.mapInfo=void 0,this._translations=void 0,this._searchConfiguration=void 0,this._webMapInfo=void 0,this._showHideOpen=!1}get el(){return i(this)}esriConfig;Home;MapView;WebMap;_defaultWebmapHonored=!1;_homeWidget;_loadedId="";_mapDiv;_mapPicker;_mapTools;_moreDropdown;_mapListExpanded=!1;_filterActive=!1;_definitionExpression;enableHomeWatchHandler(){this._initHome()}async selectedLayerWatchHandler(){await(this.selectedLayer?.when((async()=>{this._definitionExpression=this.selectedLayer.definitionExpression})))}async filterReset(){this._filterActive=!1}async updateFilter(){this._filterActive=this._definitionExpression!==this.selectedLayer.definitionExpression}mapChanged;beforeMapChanged;toggleFilter;async mapInfoChange(t){await this._loadMap(t.detail)}noLayersFound(){this.selectedLayer=void 0,this.selectedFeaturesIds=[]}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){const t=this.isMapLayout?"display-flex height-50-px":"",i=this.hidden?"visibility-hidden-1":"",h="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light",a=this.mapInfos?.length>1?"":"display-none",o=this.mapInfos?.length>1?"map-height":"height-full",l=this.isMobile?"width-full":"",n=this.isMobile?"border-top":"",d=this.isMapLayout?"":"display-none";return s(e,{key:"7029e518173a8c1e6e00049b8e68e23bed23d9cb"},s("div",{key:"2b8d9197dcb68529562728fddeb53d0a7e9cbb86",class:`${t}`},s("map-picker",{key:"2e50b7c70832f4151fafd06e860846a5efa8f6f1",class:a,isMapLayout:this.isMapLayout,mapInfos:this.mapInfos,ref:t=>this._mapPicker=t}),s("div",{key:"bc01ef7fb34400e3ff58151cab6abbabd9fa8a6f",class:`mapView-header display-flex ${d}`},s("div",{key:"1f1bf6ffb92fbc182be8333b4ae3d70271ea2f1b",class:`border-end ${l} ${n}`,id:"solutions-map-layer-picker-container"},this.mapView&&s("map-layer-picker",{key:"47320f3794f060262c4ed29ec1400a50d9744a97",appearance:"transparent",defaultLayerId:this.defaultLayerId,display:"inline-flex",height:50,isMobile:this.isMobile,mapView:this.mapView,onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,placeholderIcon:"layers",scale:"l",selectedIds:this.selectedLayer?[this.selectedLayer.id]:[],showSingleLayerAsLabel:!0,showTables:!0,type:"dropdown"})),this._getDropDownItem())),s("div",{key:"7101bfed6c0e0932275b0d28eea0ea5e1603aa8e",class:`${o} ${i}`,ref:t=>this._mapDiv=t}),s("map-tools",{key:"8ca28e50a77a25699cd6c17fe4f31788ca1cb49d",basemapConfig:this.basemapConfig,class:`box-shadow ${h}`,enableBasemap:this.enableBasemap,enableFloorFilter:this.enableFloorFilter,enableFullscreen:this.enableFullscreen,enableHome:this.enableHome,enableLegend:this.enableLegend,enableSearch:this.enableSearch,enableSingleExpand:this.enableSingleExpand,homeZoomToolsSize:this.homeZoomToolsSize,mapView:this.mapView,mapWidgetsSize:this.mapWidgetsSize,position:this.mapWidgetsPosition,ref:t=>this._mapTools=t,searchConfiguration:this._searchConfiguration,stackTools:this.stackTools,toolOrder:this.toolOrder}))}async componentDidRender(){document.onclick=t=>this._handleDocumentClick(t)}async _initModules(){const[t,i,s,e]=await l(["esri/WebMap","esri/views/MapView","esri/widgets/Home","esri/config"]);this.WebMap=t,this.MapView=i,this.Home=s,this.esriConfig=e}async _loadMap(t){const i=!this._defaultWebmapHonored&&this.defaultWebmapId,s=this.mapInfos?.filter((t=>t.id===this.defaultWebmapId)),e=JSON.stringify(t)!==JSON.stringify(this._webMapInfo);this._webMapInfo=i&&s?s[0]:!t?.id&&this.mapInfos.length>0?this.mapInfos[0]:t;const h=this._webMapInfo.id,a=i&&t?.id===this.defaultWebmapId;if(this._loadedId!==h&&!i||a){const t=new this.WebMap({portalItem:{id:h}});this.appProxies&&(await t.load(),await(o=t,l=this.esriConfig,n=this.appProxies,n&&n.forEach((t=>{o.allLayers.forEach((i=>{i&&i.url===t.sourceUrl&&(i.url=v(t.proxyUrl),i.portalItem&&i.portalItem.when((()=>{i.portalItem.url=v(t.proxyUrl)})),l.request?.interceptors?.push({urls:t.sourceUrl,before:i=>{i.url&&i.url===t.sourceUrl&&(i.url=v(t.proxyUrl))}}))}))})),o)),this.mapView=new this.MapView({container:this._mapDiv,map:t,resizeAlign:"center"}),this._loadedId=h,this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),await this.mapView.when((()=>{this._initHome(),this.mapView.ui.add(this._mapTools,{position:this.mapWidgetsPosition,index:this.mapWidgetsIndex}),this._defaultWebmapHonored=!!a||this._defaultWebmapHonored,this.mapChanged.emit({id:h,mapView:this.mapView})}))}else i?(this._defaultWebmapHonored=!0,this._mapPicker.setMapByID(h)):e&&(this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapChanged.emit({id:h,mapView:this.mapView}));var o,l,n}_initHome(){if(this.enableHome){this._homeWidget=new this.Home({view:this.mapView}),this.mapView.ui.add(this._homeWidget,{position:this.homeZoomPosition,index:this.homeZoomIndex});const t="s"===this.homeZoomToolsSize?"32px":"m"===this.homeZoomToolsSize?"40px":"48px";this._homeWidget.domNode.style.height=t,this._homeWidget.domNode.style.width=t}else this._homeWidget&&this.mapView.ui.remove(this._homeWidget)}_toggleShowHide(){this._showHideOpen=!this._showHideOpen}_forceShowHide(){this._moreDropdown&&(this._moreDropdown.open=this._showHideOpen)}_handleDocumentClick(t){const i=t.target?.id;this._showHideOpen&&"solutions-subset-list"!==i&&"solutions-more"!==i&&"chevron-down"!==i&&this._moreDropdown&&(this._showHideOpen=!1,this._moreDropdown.open=!1),"MAP-PICKER"===t.target.tagName&&(this._mapListExpanded=!this._mapListExpanded,this._mapPicker.toggle(this._mapListExpanded)),"MAP-PICKER"!==t.target.tagName&&(this._mapListExpanded=!1,this._mapPicker.close())}async _zoom(){if(this.selectedLayer){const t=await f(this.mapView,this.selectedLayer.id);await c(this.selectedFeaturesIds,t,this.mapView,!0,void 0,this.zoomToScale)}}async _toggleFilter(){this.toggleFilter.emit()}_hasFilterExpressions(){let t;return this.mapInfo?.filterConfig?.layerExpressions&&this.selectedLayer?.id&&(t=this.mapInfo.filterConfig.layerExpressions.filter((t=>t.id===this.selectedLayer.id))),t?.length>0}_getDropDownItem(){return s("calcite-dropdown",{closeOnSelectDisabled:!0,disabled:void 0===this.selectedLayer,id:"solutions-more",onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._moreDropdown=t,widthScale:"l"},s("calcite-action",{appearance:"solid",id:"solutions-more",label:"",onClick:()=>this._toggleShowHide(),slot:"trigger",text:""},s("calcite-button",{appearance:"transparent",iconEnd:this._showHideOpen?"chevron-up":"chevron-down",kind:"neutral"},this._translations.more)),s("calcite-dropdown-group",{selectionMode:"none"},this._getDropDownItems()))}_getDropDownItems(){const t=this.selectedFeaturesIds?.length>0,i=this.selectedFeaturesIds?.length>1,e=this._hasFilterExpressions();return s(a,null,s("calcite-dropdown-group",{selectionMode:"none"},s("calcite-dropdown-item",{disabled:!i,iconStart:"pencil",id:"solutions-subset-list",onClick:()=>alert(this._translations.editMultiple)},this._translations.editMultiple)),s("calcite-dropdown-group",{selectionMode:"none"},s("calcite-dropdown-item",{iconStart:"refresh",id:"solutions-subset-list",onClick:()=>{this.selectedLayer.refresh()}},this._translations.refresh)),s("calcite-dropdown-group",{selectionMode:"none"},s("calcite-dropdown-item",{disabled:!t,iconStart:"zoom-to-object",id:"solutions-subset-list",onClick:this._zoom.bind(this)},this._translations.zoom)),e&&s("calcite-dropdown-group",null,s("calcite-dropdown-item",{disabled:!1,iconStart:"filter",id:"solutions-subset-list",onClick:this._toggleFilter.bind(this),selected:this._filterActive},this._translations.filters)))}async _getTranslations(){const t=await o(this.el);this._translations=t[0]}static get watchers(){return{enableHome:["enableHomeWatchHandler"],selectedLayer:["selectedLayerWatchHandler"]}}};w.style=":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 51px)}.height-full{height:100%}.height-50-px{height:50px}.box-shadow{box-shadow:none !important}.visibility-hidden-1{visibility:hidden;height:1px;}.display-none{display:none}";export{m as card_manager,g as layer_table,w as map_card}
@@ -3,4 +3,4 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{r as t,c as a,h as n,H as s,g as e,F as i}from"./p-f4c4a2b7.js";import{d as r,i as o,e as l,s as c,f as p,E as u,l as g,h as d,c as h}from"./p-a091bc9a.js";import"./p-7bfecd07.js";import"./p-4cd4cb85.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-ac122d9e.js";import"./p-dcc35070.js";const m="instant-apps-components__ckeditor-wrapper",v=class{constructor(n){t(this,n),this.isFocused=a(this,"isFocused",7),this.dataChanged=a(this,"dataChanged",7),this.value=void 0,this.editorInstance=void 0,this.config=void 0}updateValue(){this.value&&this.editorInstance.setData(this.value)}async componentDidLoad(){this.init()}componentDidUpdate(){this.editorInstance.setData(this.value)}render(){return n(s,{key:"4a000cee4310d40e940c97d16f24c78415083f1b"},n("div",{key:"55b2e7ddd6b259b58e19f8946d2198df1fd7b579"}))}init(){this.applyStyles(),this.initEditor()}applyStyles(){if(document.getElementById(m))return;const t=document.createElement("style");t.id=m,t.innerHTML="\n .ck.ck-reset.ck-editor.ck-rounded-corners {\n margin-top: 10px !important;\n margin-left: 55px !important;\n }\n .ck-editor__editable {\n height: 70px !important;\n font-size: 0.875rem !important;\n line-height: \t1.375 !important;\n color: var(--calcite-color-text-1) !important;\n }\n\n .ck.ck-editor__editable_inline>:first-child,\n .ck.ck-editor__editable_inline>:last-child {\n --ck-spacing-large: 0.5rem !important;\n }\n\n .ck.ck-balloon-panel.ck-powered-by-balloon {\n --ck-z-modal: 700;\n z-index: 700;\n }\n\n .calcite-mode-dark .ck-editor__editable {\n color: var(--calcite-color-text-inverse) !important;\n }\n",document.head.prepend(t)}async initEditor(){const t=await this.createEditor();t&&(this.editorInstance=t,(this.value||""===this.value)&&t.setData(this.value),t.editing.view.document.on("change:isFocused",this.getEditorFocusedCallback(t)))}async createEditor(){try{let t;return t=this.config?await ClassicEditor.create(this.el,this.config):await ClassicEditor.create(this.el),this.editorInstance=t,Promise.resolve(t)}catch(t){return console.error(t),Promise.reject(null)}}getEditorFocusedCallback(t){return(a,n,s)=>{if(s)this.isFocused.emit();else{const a=t.getData();this.value!==a&&(this.value=a,this.dataChanged.emit(a))}}}get el(){return e(this)}static get watchers(){return{value:["updateValue"]}}};v.style=":host{display:block}";const _="instant-apps-language-translator-item",b={section:`${_}__section`,selected:`${_}__section--selected`,collapsed:`${_}__section--collapsed`,topRow:`${_}__top-row`,labelContainer:`${_}__label-container`,label:`${_}__label`,uiLocationPopoverContent:`${_}__ui-location-popover-content`,uiLocationItems:`${_}__ui-location-items`,uiLocationItem:`${_}__ui-location-item`,infoIcon:`${_}__info-icon`,infoButton:`${_}__info-button`,tip:`${_}__tip`,nestedInput:`${_}__nested-input`},f=class{constructor(n){t(this,n),this.translatorItemDataUpdated=a(this,"translatorItemDataUpdated",7),this.userInputs={},this.translatedInputs={},this.fieldName=void 0,this.translatedLanguageLabels=void 0,this.setting=void 0,this.userLocaleInputOnChangeCallback=void 0,this.translatedLocaleInputOnChangeCallback=void 0}get isTextEditor(){return this.setting.type===r.TextEditor}get calciteMode(){return o()?l.Dark:l.Light}get hasNestedContent(){var t;return!!(null===(t=this.setting)||void 0===t?void 0:t.content)}get tipID(){return`${this.fieldName}goTo`}componentDidLoad(){this.isTextEditor&&c.onChange("uiData",(()=>this.handleEditorCollapse()))}render(){var t;return"content"in this.setting&&(null===(t=this.setting.content)||void 0===t?void 0:t.every((t=>{var a;return 0===(null===(a=null==t?void 0:t.content)||void 0===a?void 0:a.length)})))?n(i,null):n(s,{class:this.calciteMode},this.renderBase(),this.renderPopover())}renderBase(){return n("div",{class:_},this.renderUserLocaleSection(),this.renderTranslatedLanguageSection())}renderPopover(){const t=this.getTip();return n("calcite-popover",{referenceElement:this.tipID,label:"","auto-close":"true",placement:"trailing",closable:!0},n("span",{class:b.uiLocationPopoverContent},n("span",{class:b.uiLocationItems},this.getUILocation()),t?n("span",{class:b.tip},t):null))}renderUserLocaleSection(){const t=this.getUIDataItem(),a=null==t?void 0:t.userLocaleData,s=null==a?void 0:a.value,e=this.setting.id;return n("div",{class:`${b.section}${(null==t?void 0:t.selected)?` ${b.selected}`:""}`},this.renderItemHeader(p.User,null==a?void 0:a.label,e),this.handleInputRender(p.User,s,e))}renderTranslatedLanguageSection(){var t,a;const s=this.getUIDataItem(),e=this.setting.id,i=c.get("currentLanguage"),r=c.get("portalItemResourceT9n"),o=null===(t=this.translatedLanguageLabels)||void 0===t?void 0:t[this.fieldName],l=null===(a=null==r?void 0:r[i])||void 0===a?void 0:a[e];return n("div",{class:`${b.section}${(null==s?void 0:s.selected)?` ${b.selected}`:""}`},this.renderItemHeader(p.Translation,o,e),this.handleInputRender(p.Translation,l,e))}handleInputRender(t,a,n){const s=this.getUIDataItem();return(null==s?void 0:s.expanded)?this.hasNestedContent?this.renderNestedInputs(t):this.renderInput(t,a,n):null}renderNestedInputs(t,a){const n=null!=a?a:this.setting,{content:s}=n;return null==s?void 0:s.map((a=>a.hasOwnProperty("content")?this.renderNestedInputs(t,a):this.renderNestedInput(t,a)))}renderNestedInput(t,a){var s;const e=c.get("currentLanguage"),i=c.get("portalItemResourceT9n"),r=null==a?void 0:a.id,o=null==i?void 0:i[e],l=null==o?void 0:o[r],{label:u,value:g,id:d}=a,h=t===p.Translation?null===(s=this.translatedLanguageLabels)||void 0===s?void 0:s[d]:u,m=t===p.User?g:l;return n("div",{class:b.nestedInput},this.renderItemHeader(t,h,r,a),this.renderInput(t,m,r,a))}renderItemHeader(t,a,s,e){const i=!this.hasNestedContent||!!e;return n("div",{class:b.topRow},this.renderItemHeaderLabel(t,a,e),i?this.renderCopyButton(t,s):null)}renderItemHeaderLabel(t,a,s){const e=t===p.User&&!s;return n("div",{class:b.labelContainer},s?null:this.renderExpandCollapseButton(),n("calcite-icon",{icon:this.getIcon(s),scale:"s"}),n("span",{class:b.label},a),e?this.renderInfoButton():null)}renderExpandCollapseButton(){const t=this.getUIDataItem(),a=(null==t?void 0:t.expanded)?u.Expanded:u.Collapsed;return n("calcite-action",{onClick:this.handleExpand.bind(this,t),icon:a,scale:"s",appearance:"transparent",text:""})}renderInfoButton(){return n("button",{id:this.tipID,class:b.infoButton},n("calcite-icon",{class:b.infoIcon,icon:u.Popover,scale:"s"}))}renderCopyButton(t,a){return n("calcite-action",{class:this.calciteMode,onClick:this.copySelection.bind(this,t,a),slot:"action",icon:u.Copy,appearance:"transparent",text:""})}renderInput(t,a,n,s){const e=null!=s?s:this.setting;return"string"===e.type||"textarea"===e.type?t===p.User?this.renderUserLocaleInput(a,n):this.renderTranslatedLanguageInput(a,n):this.renderTextEditor(a,t,n)}renderUserLocaleInput(t,a){return n("calcite-input",{ref:t=>this.userInputs[a]=t,key:a,id:a,class:l.Light,"data-field-name":this.fieldName,value:t,onFocus:this.handleSelection,onCalciteInputChange:this.handleUserInputChange.bind(this)})}renderTranslatedLanguageInput(t,a){return n("calcite-input",{ref:t=>this.translatedInputs[a]=t,key:a,id:a,class:l.Light,"data-field-name":this.fieldName,value:t,onFocus:this.handleSelection,onCalciteInputChange:this.handleTranslatedInputChange.bind(this)})}renderTextEditor(t,a,s){return n("instant-apps-ckeditor-wrapper",{id:s,ref:this.setEditor.bind(this,a),onDataChanged:this.handleTextEditorDataChange.bind(this,a),onIsFocused:this.handleSelection,value:null!=t?t:"","data-field-name":this.fieldName,config:{toolbar:[]}})}getUIDataItem(){if(g.uiData)return g.uiData.get(this.fieldName)}updateT9nStore(t,a){const n=c.get("currentLanguage"),s=d(n,{[t]:a});c.set("portalItemResourceT9n",s)}handleExpand(){const t=this.getUIDataItem();t.expanded=!t.expanded;const a=new Map(g.uiData);a.set(this.fieldName,t),c.set("uiData",a)}handleEditorCollapse(){var t,a;const n=c.get("uiData"),s=null==n?void 0:n.get(this.fieldName);if(!(null==s?void 0:s.expanded)&&(null===(t=this.userEditorWrapper)||void 0===t?void 0:t.editorInstance)&&(null===(a=this.translatedEditorWrapper)||void 0===a?void 0:a.editorInstance)){const{userEditorWrapper:t,translatedEditorWrapper:a}=this,n=t.editorInstance.getData();t.value=n;const s=a.editorInstance.getData();a.value=s,t.editorInstance.destroy(),a.editorInstance.destroy()}}handleSelection(t){const a=new Map(g.uiData),n=h();n.forEach((t=>{(null==a?void 0:a.get(t)).selected=!1})),n.forEach((n=>{const s=null==t?void 0:t.target;n===(null==s?void 0:s.getAttribute("data-field-name"))&&((null==a?void 0:a.get(n)).selected=!0)})),c.set("uiData",a)}getUILocation(){const t=this.getUIDataItem(),{uiLocation:a,userLocaleData:s}=t,{section:e,subsection:i}=a,r=[e.label,i.label,s.label].filter((t=>!!t));return r.map(((t,a)=>n("span",{class:b.uiLocationItem},n("span",null,t),a!==r.length-1?n("calcite-icon",{icon:"chevron-right",scale:"s"}):null)))}getTip(){const t=this.getUIDataItem(),{tip:a}=t;return a}copySelection(t,a){this.setting.type===r.TextEditor?this.copyTextEditorContent(t):this.copyCalciteInputContent(a,t)}copyTextEditorContent(t){var a,n;const s=t===p.User?null===(a=this.userEditorWrapper)||void 0===a?void 0:a.editorInstance:null===(n=this.translatedEditorWrapper)||void 0===n?void 0:n.editorInstance;setTimeout((()=>{this.selectContent(s),setTimeout((()=>this.selectContent(s)),50)}),50),this.copyContent(s)}selectContent(t){t.editing.view.focus();const{model:a}=t,n=a.createRangeIn(a.document.getRoot());a.change((t=>t.setSelection(n)))}copyContent(t){const a=t.getData(),n=document.createElement("div");n.contentEditable="true",n.innerHTML=a,document.body.appendChild(n);const s=document.createRange();s.selectNodeContents(n);const e=window.getSelection();null==e||e.removeAllRanges(),null==e||e.addRange(s),document.execCommand("copy"),document.body.removeChild(n)}copyCalciteInputContent(t,a){const n=a===p.User?this.userInputs[t]:this.translatedInputs[t];n&&(n.selectText(),navigator.clipboard.writeText(n.value))}setEditor(t,a){t===p.User?this.userEditorWrapper=a:this.translatedEditorWrapper=a}async handleUserInputChange(t){c.set("saving",!0);try{const a=t.target,n=a.id,s=a.value;this.getUIDataItem().userLocaleData.value=s,await this.userLocaleInputOnChangeCallback(n,s),c.set("saving",!1)}catch(t){c.set("saving",!1)}}async handleUserTextEditorChange(t){c.set("saving",!0);try{const a=t.detail;this.getUIDataItem().userLocaleData.value=a,await this.userLocaleInputOnChangeCallback(this.fieldName,a),c.set("saving",!1)}catch(t){c.set("saving",!1)}}async handleTranslatedInputChange(t){c.set("saving",!0);try{const a=t.composedPath()[0],n=a.id;this.updateT9nStore(n,a.value);const{locale:s,resource:e}=this.getTranslatedLocaleCallbackData(),i=t.target.value;await this.translatedLocaleInputOnChangeCallback(n,i,s,e),setTimeout((()=>c.set("saving",!1)),1500),this.translatorItemDataUpdated.emit()}catch(t){console.error("Error writing to portal item resource: ",t),c.set("saving",!1)}}async handleTranslatedTextEditorChange(t){c.set("saving",!0);try{const a=t.target.id;this.updateT9nStore(a,t.detail);const{locale:n,resource:s}=this.getTranslatedLocaleCallbackData(),e=t.detail;await this.translatedLocaleInputOnChangeCallback(a,e,n,s),setTimeout((()=>c.set("saving",!1)),1500),this.translatorItemDataUpdated.emit()}catch(t){console.error("Error writing to portal item resource: ",t),c.set("saving",!1)}}handleTextEditorDataChange(t,a){t===p.User?this.handleUserTextEditorChange(a):this.handleTranslatedTextEditorChange(a)}getTranslatedLocaleCallbackData(){return{locale:c.get("currentLanguage"),resource:c.get("portalItemResource")}}getIcon(t){switch((null!=t?t:this.setting).stringType){case"title":return u.Title;case"subtitle":return u.Subtitle;case"text":return u.Text;case"button":return u.Button;case"string":return u.String;default:return u.SettingIndicator}}};f.style=".sc-instant-apps-language-translator-item-h{display:block}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item.sc-instant-apps-language-translator-item{display:flex}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item{padding:10px;border-bottom:1px solid var(--calcite-color-border-1);background-color:var(--calcite-color-foreground-2);width:49%}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item .instant-apps-language-translator-item__top-row.sc-instant-apps-language-translator-item{display:flex;align-items:center;justify-content:space-between}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item .instant-apps-language-translator-item__label-container.sc-instant-apps-language-translator-item{display:flex;align-items:center}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item .instant-apps-language-translator-item__label.sc-instant-apps-language-translator-item{display:inline-block;margin-left:10px;font-size:14px;font-weight:var(--calcite-font-weight-medium)}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item calcite-input.sc-instant-apps-language-translator-item{margin-top:10px;margin-left:55px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--last-item.sc-instant-apps-language-translator-item{border-bottom:none}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item{background-color:#f1faff}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item:first-child{margin-right:1%}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__ui-location-popover-content.sc-instant-apps-language-translator-item{display:inline-block;padding:10px;max-width:400px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__ui-location-items.sc-instant-apps-language-translator-item{display:flex}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__ui-location-item.sc-instant-apps-language-translator-item{display:flex;align-items:center;font-weight:var(--calcite-font-weight-medium);font-size:14px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__tip.sc-instant-apps-language-translator-item{display:inline-block;font-size:14px;line-height:22px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__info-icon.sc-instant-apps-language-translator-item{color:var(--calcite-color-brand)}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__info-button.sc-instant-apps-language-translator-item{border:0;background-color:transparent;cursor:pointer}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__nested-input.sc-instant-apps-language-translator-item{margin-left:60px;margin-top:8px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__nested-input.sc-instant-apps-language-translator-item calcite-input.sc-instant-apps-language-translator-item{margin-left:30px}.calcite-mode-dark.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item{background-color:#f1faff;background-color:var(--calcite-color-brand);color:var(--calcite-color-text-inverse)}.calcite-mode-dark.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item calcite-action.sc-instant-apps-language-translator-item{--calcite-ui-icon-color:var(--calcite-color-text-inverse)}.calcite-mode-dark.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item calcite-icon.sc-instant-apps-language-translator-item{color:var(--calcite-color-text-inverse)}.instant-apps-language-translator--last-item.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item{border-bottom:none}";const x="instant-apps-language-translator-search",k={base:x,input:`${x}__input`,suggestionList:`${x}__suggestion-list`,suggestionListItem:`${x}__suggestion-list-item`},y=class{constructor(n){t(this,n),this.suggestionSelected=a(this,"suggestionSelected",7),this.t9nPlaceholder=void 0,this.results=[]}render(){return n(s,{key:"71fa373371b7b33faa8f3d91959dc50b1e3b0f34"},this.renderSearchInput(),this.renderSuggestions())}renderSearchInput(){return n("calcite-input",{ref:t=>this.searchInput=t,class:k.input,onCalciteInputInput:this.handleSearch.bind(this),type:"search",placeholder:this.t9nPlaceholder,icon:"search"})}renderSuggestions(){return this.results.length>0?this.renderSuggestionList():null}renderSuggestionList(){return n("ul",{class:k.suggestionList},this.results.map((t=>this.renderSuggestionListItem(t))))}renderSuggestionListItem(t){return n("li",{onClick:this.selectSuggestion.bind(this),class:k.suggestionListItem,"data-field-name":t.fieldName},t.userLocaleData.label)}handleSearch(t){var a,n;const s=null===(n=null===(a=t.target.value)||void 0===a?void 0:a.toLowerCase())||void 0===n?void 0:n.trim(),e=c.get("uiData"),i=h(),r=c.get("portalItemResourceT9n"),o=c.get("currentLanguage"),l=r[o],p=this.getSettingDataItems(i).filter(this.matchedResultsCallback(e,l,s,o));this.results=[...p.map((t=>Object.assign({fieldName:t},e.get(t))))]}matchedResultsCallback(t,a,n,s){return e=>{var i;const r=t.get(e),{label:o}=r.userLocaleData,{value:l}=r.userLocaleData,c=t.get("translatedLanguageLabels"),p=null===(i=null==c?void 0:c[s])||void 0===i?void 0:i[e],u=null==a?void 0:a[e],g=this.testUserInput(o,n),d=this.testUserInput(l,n),h=this.testUserInput(p,n),m=this.testUserInput(u,n);return g||d||h||m}}getSettingDataItems(t){return t.filter((t=>"locales"!==t&&"translatedLanguageLabels"!==t))}testUserInput(t,a){var n;return!!(null==t?void 0:t.trim())&&!!(null==a?void 0:a.trim())&&-1!==(null===(n=null==t?void 0:t.toLowerCase())||void 0===n?void 0:n.search(a))}selectSuggestion(t){const a=t.target.getAttribute("data-field-name");this.suggestionSelected.emit(a),this.resetSearchInput()}resetSearchInput(){this.searchInput.value="",this.results=[]}};y.style=".sc-instant-apps-language-translator-search-h{display:block;position:relative}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__input.sc-instant-apps-language-translator-search{width:235.5px}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list.sc-instant-apps-language-translator-search{position:absolute;margin:0;padding:0;width:100%;max-height:30vh;overflow:auto;border-left:none;background-color:var(--calcite-color-foreground-1);border:1px solid #c0c0c0;z-index:702}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list-item.sc-instant-apps-language-translator-search:first-child{border:none}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list-item.sc-instant-apps-language-translator-search{margin-top:0;padding:0.8em 1em;border-top:solid 1px rgba(110, 110, 110, 0.3);display:flex;flex-direction:column;cursor:pointer;word-break:break-word}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list-item.sc-instant-apps-language-translator-search:hover{background-color:var(--calcite-color-foreground-2)}";export{v as instant_apps_ckeditor_wrapper,f as instant_apps_language_translator_item,y as instant_apps_language_translator_search}
6
+ import{r as t,c as a,h as n,H as s,g as e,F as i}from"./p-f4c4a2b7.js";import{d as r,i as o,e as l,s as c,f as p,E as u,l as g,h as d,c as h}from"./p-afad4f05.js";import"./p-09d62c22.js";import"./p-65581d83.js";import"./p-6a68306c.js";import"./p-d4056c1c.js";import"./p-af2c8aa9.js";import"./p-dcc35070.js";const m="instant-apps-components__ckeditor-wrapper",v=class{constructor(n){t(this,n),this.isFocused=a(this,"isFocused",7),this.dataChanged=a(this,"dataChanged",7),this.value=void 0,this.editorInstance=void 0,this.config=void 0}updateValue(){this.value&&this.editorInstance.setData(this.value)}async componentDidLoad(){this.init()}componentDidUpdate(){this.editorInstance.setData(this.value)}render(){return n(s,{key:"4a000cee4310d40e940c97d16f24c78415083f1b"},n("div",{key:"55b2e7ddd6b259b58e19f8946d2198df1fd7b579"}))}init(){this.applyStyles(),this.initEditor()}applyStyles(){if(document.getElementById(m))return;const t=document.createElement("style");t.id=m,t.innerHTML="\n .ck.ck-reset.ck-editor.ck-rounded-corners {\n margin-top: 10px !important;\n margin-left: 55px !important;\n }\n .ck-editor__editable {\n height: 70px !important;\n font-size: 0.875rem !important;\n line-height: \t1.375 !important;\n color: var(--calcite-color-text-1) !important;\n }\n\n .ck.ck-editor__editable_inline>:first-child,\n .ck.ck-editor__editable_inline>:last-child {\n --ck-spacing-large: 0.5rem !important;\n }\n\n .ck.ck-balloon-panel.ck-powered-by-balloon {\n --ck-z-modal: 700;\n z-index: 700;\n }\n\n .calcite-mode-dark .ck-editor__editable {\n color: var(--calcite-color-text-inverse) !important;\n }\n",document.head.prepend(t)}async initEditor(){const t=await this.createEditor();t&&(this.editorInstance=t,(this.value||""===this.value)&&t.setData(this.value),t.editing.view.document.on("change:isFocused",this.getEditorFocusedCallback(t)))}async createEditor(){try{let t;return t=this.config?await ClassicEditor.create(this.el,this.config):await ClassicEditor.create(this.el),this.editorInstance=t,Promise.resolve(t)}catch(t){return console.error(t),Promise.reject(null)}}getEditorFocusedCallback(t){return(a,n,s)=>{if(s)this.isFocused.emit();else{const a=t.getData();this.value!==a&&(this.value=a,this.dataChanged.emit(a))}}}get el(){return e(this)}static get watchers(){return{value:["updateValue"]}}};v.style=":host{display:block}";const _="instant-apps-language-translator-item",f={section:`${_}__section`,selected:`${_}__section--selected`,collapsed:`${_}__section--collapsed`,topRow:`${_}__top-row`,labelContainer:`${_}__label-container`,label:`${_}__label`,uiLocationPopoverContent:`${_}__ui-location-popover-content`,uiLocationItems:`${_}__ui-location-items`,uiLocationItem:`${_}__ui-location-item`,infoIcon:`${_}__info-icon`,infoButton:`${_}__info-button`,tip:`${_}__tip`,nestedInput:`${_}__nested-input`},b=class{constructor(n){t(this,n),this.translatorItemDataUpdated=a(this,"translatorItemDataUpdated",7),this.userInputs={},this.translatedInputs={},this.fieldName=void 0,this.translatedLanguageLabels=void 0,this.setting=void 0,this.userLocaleInputOnChangeCallback=void 0,this.translatedLocaleInputOnChangeCallback=void 0}get isTextEditor(){return this.setting.type===r.TextEditor}get calciteMode(){return o()?l.Dark:l.Light}get hasNestedContent(){var t;return!!(null===(t=this.setting)||void 0===t?void 0:t.content)}get tipID(){return`${this.fieldName}goTo`}componentDidLoad(){this.isTextEditor&&c.onChange("uiData",(()=>this.handleEditorCollapse()))}render(){var t;return"content"in this.setting&&(null===(t=this.setting.content)||void 0===t?void 0:t.every((t=>{var a;return 0===(null===(a=null==t?void 0:t.content)||void 0===a?void 0:a.length)})))?n(i,null):n(s,{class:this.calciteMode},this.renderBase(),this.renderPopover())}renderBase(){return n("div",{class:_},this.renderUserLocaleSection(),this.renderTranslatedLanguageSection())}renderPopover(){const t=this.getTip();return n("calcite-popover",{referenceElement:this.tipID,label:"","auto-close":"true",placement:"trailing",closable:!0},n("span",{class:f.uiLocationPopoverContent},n("span",{class:f.uiLocationItems},this.getUILocation()),t?n("span",{class:f.tip},t):null))}renderUserLocaleSection(){const t=this.getUIDataItem(),a=null==t?void 0:t.userLocaleData,s=null==a?void 0:a.value,e=this.setting.id;return n("div",{class:`${f.section}${(null==t?void 0:t.selected)?` ${f.selected}`:""}`},this.renderItemHeader(p.User,null==a?void 0:a.label,e),this.handleInputRender(p.User,s,e))}renderTranslatedLanguageSection(){var t,a;const s=this.getUIDataItem(),e=this.setting.id,i=c.get("currentLanguage"),r=c.get("portalItemResourceT9n"),o=null===(t=this.translatedLanguageLabels)||void 0===t?void 0:t[this.fieldName],l=null===(a=null==r?void 0:r[i])||void 0===a?void 0:a[e];return n("div",{class:`${f.section}${(null==s?void 0:s.selected)?` ${f.selected}`:""}`},this.renderItemHeader(p.Translation,o,e),this.handleInputRender(p.Translation,l,e))}handleInputRender(t,a,n){const s=this.getUIDataItem();return(null==s?void 0:s.expanded)?this.hasNestedContent?this.renderNestedInputs(t):this.renderInput(t,a,n):null}renderNestedInputs(t,a){const n=null!=a?a:this.setting,{content:s}=n;return null==s?void 0:s.map((a=>a.hasOwnProperty("content")?this.renderNestedInputs(t,a):this.renderNestedInput(t,a)))}renderNestedInput(t,a){var s;const e=c.get("currentLanguage"),i=c.get("portalItemResourceT9n"),r=null==a?void 0:a.id,o=null==i?void 0:i[e],l=null==o?void 0:o[r],{label:u,value:g,id:d}=a,h=t===p.Translation?null===(s=this.translatedLanguageLabels)||void 0===s?void 0:s[d]:u,m=t===p.User?g:l;return n("div",{class:f.nestedInput},this.renderItemHeader(t,h,r,a),this.renderInput(t,m,r,a))}renderItemHeader(t,a,s,e){const i=!this.hasNestedContent||!!e;return n("div",{class:f.topRow},this.renderItemHeaderLabel(t,a,e),i?this.renderCopyButton(t,s):null)}renderItemHeaderLabel(t,a,s){const e=t===p.User&&!s;return n("div",{class:f.labelContainer},s?null:this.renderExpandCollapseButton(),n("calcite-icon",{icon:this.getIcon(s),scale:"s"}),n("span",{class:f.label},a),e?this.renderInfoButton():null)}renderExpandCollapseButton(){const t=this.getUIDataItem(),a=(null==t?void 0:t.expanded)?u.Expanded:u.Collapsed;return n("calcite-action",{onClick:this.handleExpand.bind(this,t),icon:a,scale:"s",appearance:"transparent",text:""})}renderInfoButton(){return n("button",{id:this.tipID,class:f.infoButton},n("calcite-icon",{class:f.infoIcon,icon:u.Popover,scale:"s"}))}renderCopyButton(t,a){return n("calcite-action",{class:this.calciteMode,onClick:this.copySelection.bind(this,t,a),slot:"action",icon:u.Copy,appearance:"transparent",text:""})}renderInput(t,a,n,s){const e=null!=s?s:this.setting;return"string"===e.type||"textarea"===e.type?t===p.User?this.renderUserLocaleInput(a,n):this.renderTranslatedLanguageInput(a,n):this.renderTextEditor(a,t,n)}renderUserLocaleInput(t,a){return n("calcite-input",{ref:t=>this.userInputs[a]=t,key:a,id:a,class:l.Light,"data-field-name":this.fieldName,value:t,onFocus:this.handleSelection,onCalciteInputChange:this.handleUserInputChange.bind(this)})}renderTranslatedLanguageInput(t,a){return n("calcite-input",{ref:t=>this.translatedInputs[a]=t,key:a,id:a,class:l.Light,"data-field-name":this.fieldName,value:t,onFocus:this.handleSelection,onCalciteInputChange:this.handleTranslatedInputChange.bind(this)})}renderTextEditor(t,a,s){return n("instant-apps-ckeditor-wrapper",{id:s,ref:this.setEditor.bind(this,a),onDataChanged:this.handleTextEditorDataChange.bind(this,a),onIsFocused:this.handleSelection,value:null!=t?t:"","data-field-name":this.fieldName,config:{toolbar:[]}})}getUIDataItem(){if(g.uiData)return g.uiData.get(this.fieldName)}updateT9nStore(t,a){const n=c.get("currentLanguage"),s=d(n,{[t]:a});c.set("portalItemResourceT9n",s)}handleExpand(){const t=this.getUIDataItem();t.expanded=!t.expanded;const a=new Map(g.uiData);a.set(this.fieldName,t),c.set("uiData",a)}handleEditorCollapse(){var t,a;const n=c.get("uiData"),s=null==n?void 0:n.get(this.fieldName);if(!(null==s?void 0:s.expanded)&&(null===(t=this.userEditorWrapper)||void 0===t?void 0:t.editorInstance)&&(null===(a=this.translatedEditorWrapper)||void 0===a?void 0:a.editorInstance)){const{userEditorWrapper:t,translatedEditorWrapper:a}=this,n=t.editorInstance.getData();t.value=n;const s=a.editorInstance.getData();a.value=s,t.editorInstance.destroy(),a.editorInstance.destroy()}}handleSelection(t){const a=new Map(g.uiData),n=h();n.forEach((t=>{(null==a?void 0:a.get(t)).selected=!1})),n.forEach((n=>{const s=null==t?void 0:t.target;n===(null==s?void 0:s.getAttribute("data-field-name"))&&((null==a?void 0:a.get(n)).selected=!0)})),c.set("uiData",a)}getUILocation(){const t=this.getUIDataItem(),{uiLocation:a,userLocaleData:s}=t,{section:e,subsection:i}=a,r=[e.label,i.label,s.label].filter((t=>!!t));return r.map(((t,a)=>n("span",{class:f.uiLocationItem},n("span",null,t),a!==r.length-1?n("calcite-icon",{icon:"chevron-right",scale:"s"}):null)))}getTip(){const t=this.getUIDataItem(),{tip:a}=t;return a}copySelection(t,a){this.setting.type===r.TextEditor?this.copyTextEditorContent(t):this.copyCalciteInputContent(a,t)}copyTextEditorContent(t){var a,n;const s=t===p.User?null===(a=this.userEditorWrapper)||void 0===a?void 0:a.editorInstance:null===(n=this.translatedEditorWrapper)||void 0===n?void 0:n.editorInstance;setTimeout((()=>{this.selectContent(s),setTimeout((()=>this.selectContent(s)),50)}),50),this.copyContent(s)}selectContent(t){t.editing.view.focus();const{model:a}=t,n=a.createRangeIn(a.document.getRoot());a.change((t=>t.setSelection(n)))}copyContent(t){const a=t.getData(),n=document.createElement("div");n.contentEditable="true",n.innerHTML=a,document.body.appendChild(n);const s=document.createRange();s.selectNodeContents(n);const e=window.getSelection();null==e||e.removeAllRanges(),null==e||e.addRange(s),document.execCommand("copy"),document.body.removeChild(n)}copyCalciteInputContent(t,a){const n=a===p.User?this.userInputs[t]:this.translatedInputs[t];n&&(n.selectText(),navigator.clipboard.writeText(n.value))}setEditor(t,a){t===p.User?this.userEditorWrapper=a:this.translatedEditorWrapper=a}async handleUserInputChange(t){c.set("saving",!0);try{const a=t.target,n=a.id,s=a.value;this.getUIDataItem().userLocaleData.value=s,await this.userLocaleInputOnChangeCallback(n,s),c.set("saving",!1)}catch(t){c.set("saving",!1)}}async handleUserTextEditorChange(t){c.set("saving",!0);try{const a=t.detail;this.getUIDataItem().userLocaleData.value=a,await this.userLocaleInputOnChangeCallback(this.fieldName,a),c.set("saving",!1)}catch(t){c.set("saving",!1)}}async handleTranslatedInputChange(t){c.set("saving",!0);try{const a=t.composedPath()[0],n=a.id;this.updateT9nStore(n,a.value);const{locale:s,resource:e}=this.getTranslatedLocaleCallbackData(),i=t.target.value;await this.translatedLocaleInputOnChangeCallback(n,i,s,e),setTimeout((()=>c.set("saving",!1)),1500),this.translatorItemDataUpdated.emit()}catch(t){console.error("Error writing to portal item resource: ",t),c.set("saving",!1)}}async handleTranslatedTextEditorChange(t){c.set("saving",!0);try{const a=t.target.id;this.updateT9nStore(a,t.detail);const{locale:n,resource:s}=this.getTranslatedLocaleCallbackData(),e=t.detail;await this.translatedLocaleInputOnChangeCallback(a,e,n,s),setTimeout((()=>c.set("saving",!1)),1500),this.translatorItemDataUpdated.emit()}catch(t){console.error("Error writing to portal item resource: ",t),c.set("saving",!1)}}handleTextEditorDataChange(t,a){t===p.User?this.handleUserTextEditorChange(a):this.handleTranslatedTextEditorChange(a)}getTranslatedLocaleCallbackData(){return{locale:c.get("currentLanguage"),resource:c.get("portalItemResource")}}getIcon(t){switch((null!=t?t:this.setting).stringType){case"title":return u.Title;case"subtitle":return u.Subtitle;case"text":return u.Text;case"button":return u.Button;case"string":return u.String;default:return u.SettingIndicator}}};b.style=".sc-instant-apps-language-translator-item-h{display:block}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item.sc-instant-apps-language-translator-item{display:flex}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item{padding:10px;border-bottom:1px solid var(--calcite-color-border-1);background-color:var(--calcite-color-foreground-2);width:49%}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item .instant-apps-language-translator-item__top-row.sc-instant-apps-language-translator-item{display:flex;align-items:center;justify-content:space-between}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item .instant-apps-language-translator-item__label-container.sc-instant-apps-language-translator-item{display:flex;align-items:center}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item .instant-apps-language-translator-item__label.sc-instant-apps-language-translator-item{display:inline-block;margin-left:10px;font-size:14px;font-weight:var(--calcite-font-weight-medium)}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item calcite-input.sc-instant-apps-language-translator-item{margin-top:10px;margin-left:55px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--last-item.sc-instant-apps-language-translator-item{border-bottom:none}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item{background-color:#f1faff}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item:first-child{margin-right:1%}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__ui-location-popover-content.sc-instant-apps-language-translator-item{display:inline-block;padding:10px;max-width:400px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__ui-location-items.sc-instant-apps-language-translator-item{display:flex}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__ui-location-item.sc-instant-apps-language-translator-item{display:flex;align-items:center;font-weight:var(--calcite-font-weight-medium);font-size:14px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__tip.sc-instant-apps-language-translator-item{display:inline-block;font-size:14px;line-height:22px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__info-icon.sc-instant-apps-language-translator-item{color:var(--calcite-color-brand)}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__info-button.sc-instant-apps-language-translator-item{border:0;background-color:transparent;cursor:pointer}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__nested-input.sc-instant-apps-language-translator-item{margin-left:60px;margin-top:8px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__nested-input.sc-instant-apps-language-translator-item calcite-input.sc-instant-apps-language-translator-item{margin-left:30px}.calcite-mode-dark.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item{background-color:#f1faff;background-color:var(--calcite-color-brand);color:var(--calcite-color-text-inverse)}.calcite-mode-dark.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item calcite-action.sc-instant-apps-language-translator-item{--calcite-ui-icon-color:var(--calcite-color-text-inverse)}.calcite-mode-dark.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item calcite-icon.sc-instant-apps-language-translator-item{color:var(--calcite-color-text-inverse)}.instant-apps-language-translator--last-item.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item{border-bottom:none}";const x="instant-apps-language-translator-search",k={base:x,input:`${x}__input`,suggestionList:`${x}__suggestion-list`,suggestionListItem:`${x}__suggestion-list-item`},y=class{constructor(n){t(this,n),this.suggestionSelected=a(this,"suggestionSelected",7),this.t9nPlaceholder=void 0,this.results=[]}render(){return n(s,{key:"71fa373371b7b33faa8f3d91959dc50b1e3b0f34"},this.renderSearchInput(),this.renderSuggestions())}renderSearchInput(){return n("calcite-input",{ref:t=>this.searchInput=t,class:k.input,onCalciteInputInput:this.handleSearch.bind(this),type:"search",placeholder:this.t9nPlaceholder,icon:"search"})}renderSuggestions(){return this.results.length>0?this.renderSuggestionList():null}renderSuggestionList(){return n("ul",{class:k.suggestionList},this.results.map((t=>this.renderSuggestionListItem(t))))}renderSuggestionListItem(t){return n("li",{onClick:this.selectSuggestion.bind(this),class:k.suggestionListItem,"data-field-name":t.fieldName},t.userLocaleData.label)}handleSearch(t){var a,n;const s=null===(n=null===(a=t.target.value)||void 0===a?void 0:a.toLowerCase())||void 0===n?void 0:n.trim(),e=c.get("uiData"),i=h(),r=c.get("portalItemResourceT9n"),o=c.get("currentLanguage"),l=r[o],p=this.getSettingDataItems(i).filter(this.matchedResultsCallback(e,l,s,o));this.results=[...p.map((t=>Object.assign({fieldName:t},e.get(t))))]}matchedResultsCallback(t,a,n,s){return e=>{var i;const r=t.get(e),{label:o}=r.userLocaleData,{value:l}=r.userLocaleData,c=t.get("translatedLanguageLabels"),p=null===(i=null==c?void 0:c[s])||void 0===i?void 0:i[e],u=null==a?void 0:a[e],g=this.testUserInput(o,n),d=this.testUserInput(l,n),h=this.testUserInput(p,n),m=this.testUserInput(u,n);return g||d||h||m}}getSettingDataItems(t){return t.filter((t=>"locales"!==t&&"translatedLanguageLabels"!==t))}testUserInput(t,a){var n;return!!(null==t?void 0:t.trim())&&!!(null==a?void 0:a.trim())&&-1!==(null===(n=null==t?void 0:t.toLowerCase())||void 0===n?void 0:n.search(a))}selectSuggestion(t){const a=t.target.getAttribute("data-field-name");this.suggestionSelected.emit(a),this.resetSearchInput()}resetSearchInput(){this.searchInput.value="",this.results=[]}};y.style=".sc-instant-apps-language-translator-search-h{display:block;position:relative}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__input.sc-instant-apps-language-translator-search{width:235.5px}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list.sc-instant-apps-language-translator-search{position:absolute;margin:0;padding:0;width:100%;max-height:30vh;overflow:auto;border-left:none;background-color:var(--calcite-color-foreground-1);border:1px solid #c0c0c0;z-index:702}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list-item.sc-instant-apps-language-translator-search:first-child{border:none}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list-item.sc-instant-apps-language-translator-search{margin-top:0;padding:0.8em 1em;border-top:solid 1px rgba(110, 110, 110, 0.3);display:flex;flex-direction:column;cursor:pointer;word-break:break-word}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list-item.sc-instant-apps-language-translator-search:hover{background-color:var(--calcite-color-foreground-2)}";export{v as instant_apps_ckeditor_wrapper,b as instant_apps_language_translator_item,y as instant_apps_language_translator_search}
@@ -3,4 +3,4 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{r as e,c as a,g as t,h as i,H as c}from"./p-f4c4a2b7.js";import{g as o}from"./p-d7868dd4.js";import{E as n}from"./p-80cb7c73.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";const r=class{constructor(t){e(this,t),this.layoutChanged=a(this,"layoutChanged",7),this._translations=void 0}get el(){return t(this)}_layoutMode=n.GRID;layoutChanged;async componentWillLoad(){await this._getTranslations()}render(){return i(c,{key:"10b8c1f7ee9503c4bd7cb1bbbd8b58cb5009336f"},i("div",{key:"39ae898c19e24746bfa5f7510006e368f37fe7d5",class:"display-flex"},i("div",{key:"0080f9562ab26665e26a8447e4484d76e4861f9f",class:"display-flex action-center"},i("calcite-icon",{key:"cc941eede331c518fe0944e2bf4b46b0c9799f0c",class:"icon icon-color",icon:"information",id:"app-information-icon",scale:"s"}),i("calcite-popover",{key:"d92ccbe95f58f15964fd8b5d0d1446216ef780a7",closable:!0,label:"",referenceElement:"app-information-icon"},i("span",{key:"37d306563b80589652c25809233063c60035397b",class:"tooltip-message"},this._translations.appInfo))),i("div",{key:"e33a33071990cd0edb32e1c76505ddcc834ae932",class:"header-text"},this._translations.layout),this._getAction("grid-background",n.GRID,this._translations.grid),this._getAction("vertical-background",n.VERTICAL,this._translations.vertical),this._getAction("horizontal-background",n.HORIZONTAL,this._translations.horizontal)))}_getAction(e,a,t){return i("div",null,i("calcite-action",{alignment:"center",appearance:"transparent",compact:!1,id:e,indicator:a===this._layoutMode,onClick:()=>{this._setLayoutMode(a)},text:""},i("div",{class:e+" img-background"})),i("calcite-tooltip",{label:"",placement:"bottom","reference-element":e},i("span",null,t)))}_setLayoutMode(e){this._layoutMode=e,this.layoutChanged.emit(this._layoutMode)}async _getTranslations(){const e=await o(this.el);this._translations=e[0]}};r.style=":host{display:block}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.display-flex{display:flex}.icon-color{--calcite-color-icon-color:var(--calcite-color-brand)}.icon{cursor:pointer}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2)}.header-text{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);padding-inline:0.75rem;padding-block:0.875rem;line-height:1.25rem}.img-background{background-repeat:no-repeat;background-size:100% 100%;width:38px;height:26px}.grid-background{background-image:url('../../assets/data/images/grid.png')}.horizontal-background{background-image:url('../../assets/data/images/horizontal.png')}.vertical-background{background-image:url('../../assets/data/images/vertical.png')}";export{r as layout_manager}
6
+ import{r as e,c as t,g as a,h as i,H as c}from"./p-f4c4a2b7.js";import{g as o}from"./p-09b47605.js";import{E as n}from"./p-80cb7c73.js";import"./p-6a68306c.js";import"./p-d4056c1c.js";const r=class{constructor(a){e(this,a),this.layoutChanged=t(this,"layoutChanged",7),this._translations=void 0}get el(){return a(this)}_layoutMode=n.GRID;layoutChanged;async componentWillLoad(){await this._getTranslations()}render(){return i(c,{key:"10b8c1f7ee9503c4bd7cb1bbbd8b58cb5009336f"},i("div",{key:"39ae898c19e24746bfa5f7510006e368f37fe7d5",class:"display-flex"},i("div",{key:"0080f9562ab26665e26a8447e4484d76e4861f9f",class:"display-flex action-center"},i("calcite-icon",{key:"cc941eede331c518fe0944e2bf4b46b0c9799f0c",class:"icon icon-color",icon:"information",id:"app-information-icon",scale:"s"}),i("calcite-popover",{key:"d92ccbe95f58f15964fd8b5d0d1446216ef780a7",closable:!0,label:"",referenceElement:"app-information-icon"},i("span",{key:"37d306563b80589652c25809233063c60035397b",class:"tooltip-message"},this._translations.appInfo))),i("div",{key:"e33a33071990cd0edb32e1c76505ddcc834ae932",class:"header-text"},this._translations.layout),this._getAction("grid-background",n.GRID,this._translations.grid),this._getAction("vertical-background",n.VERTICAL,this._translations.vertical),this._getAction("horizontal-background",n.HORIZONTAL,this._translations.horizontal)))}_getAction(e,t,a){return i("div",null,i("calcite-action",{alignment:"center",appearance:"transparent",compact:!1,id:e,indicator:t===this._layoutMode,onClick:()=>{this._setLayoutMode(t)},text:""},i("div",{class:e+" img-background"})),i("calcite-tooltip",{label:"",placement:"bottom","reference-element":e},i("span",null,a)))}_setLayoutMode(e){this._layoutMode=e,this.layoutChanged.emit(this._layoutMode)}async _getTranslations(){const e=await o(this.el);this._translations=e[0]}};r.style=":host{display:block}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.display-flex{display:flex}.icon-color{--calcite-color-icon-color:var(--calcite-color-brand)}.icon{cursor:pointer}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2)}.header-text{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);padding-inline:0.75rem;padding-block:0.875rem;line-height:1.25rem}.img-background{background-repeat:no-repeat;background-size:100% 100%;width:38px;height:26px}.grid-background{background-image:url('../../assets/data/images/grid.png')}.horizontal-background{background-image:url('../../assets/data/images/horizontal.png')}.vertical-background{background-image:url('../../assets/data/images/vertical.png')}";export{r as layout_manager}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{g as t}from"./p-d4056c1c.js";import{a as n}from"./p-f4c4a2b7.js";import{l as i}from"./p-d7868dd4.js";import{q as r}from"./p-eb483242.js";import"./p-9fe07c30.js";import{_ as e,r as s,c as o,g as a}from"./p-badcaf04.js";
6
+ import{g as t}from"./p-d4056c1c.js";import{a as n}from"./p-f4c4a2b7.js";import{l as i}from"./p-09b47605.js";import{q as r}from"./p-eb483242.js";import"./p-659678f1.js";import{_ as e,r as s,c as o,g as a}from"./p-7c583516.js";
7
7
  /* @preserve
8
8
  * arcgis-pdf-creator v0.0.1
9
9
  * Thu Apr 27 2023 17:20:32 GMT-0700 (Pacific Daylight Time)
@@ -310,7 +310,7 @@ function(t){var n=function(t){for(var n=t.length,i=new Uint8Array(n),r=0;r<n;r++
310
310
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
311
311
  * ====================================================================
312
312
  */
313
- function(){function t(){return(X.canvg?Promise.resolve(X.canvg):import("./p-90d6755b.js")).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}Et.API.addSvgAsImage=function(n,i,r,e,s,o,a,u){if(isNaN(i)||isNaN(r))throw Q.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(e)||isNaN(s))throw Q.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var f=document.createElement("canvas");f.width=e,f.height=s;var c=f.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,f.width,f.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},l=this;return t().then((function(t){return t.fromString(c,n,h)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(h)})).then((function(){l.addImage(f.toDataURL("image/jpeg",1),i,r,e,s,a,u)}))}}(),Et.API.putTotalPages=function(t){var n,i=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(n=new RegExp(t,"g"),i=this.internal.getNumberOfPages()):(n=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),i=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var e=0;e<this.internal.pages[r].length;e++)this.internal.pages[r][e]=this.internal.pages[r][e].replace(n,i);return this},Et.API.viewerPreferences=function(t,n){var i;t=t||{},n=n||!1;var r,e,s,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},a=Object.keys(o),u=[],f=0,c=0,l=0;function v(t,n){var i,r=!1;for(i=0;i<t.length;i+=1)t[i]===n&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),i=this.internal.viewerpreferences.configuration,"reset"===t||!0===n){var d=a.length;for(l=0;l<d;l+=1)i[a[l]].value=i[a[l]].defaultValue,i[a[l]].explicitSet=!1}if("object"===h(t))for(e in t)if(s=t[e],v(a,e)&&void 0!==s){if("boolean"===i[e].type&&"boolean"==typeof s)i[e].value=s;else if("name"===i[e].type&&v(i[e].valueSet,s))i[e].value=s;else if("integer"===i[e].type&&Number.isInteger(s))i[e].value=s;else if("array"===i[e].type){for(f=0;f<s.length;f+=1)if(r=!0,1===s[f].length&&"number"==typeof s[f][0])u.push(String(s[f]-1));else if(s[f].length>1){for(c=0;c<s[f].length;c+=1)"number"!=typeof s[f][c]&&(r=!1);!0===r&&u.push([s[f][0]-1,s[f][1]-1].join(" "))}i[e].value="["+u.join(" ")+"]"}else i[e].value=i[e].defaultValue;i[e].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,n=[];for(t in i)!0===i[t].explicitSet&&n.push("name"===i[t].type?"/"+t+" /"+i[t].value:"/"+t+" "+i[t].value);0!==n.length&&this.internal.write("/ViewerPreferences\n<<\n"+n.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=i,this
313
+ function(){function t(){return(X.canvg?Promise.resolve(X.canvg):import("./p-4d03fed9.js")).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}Et.API.addSvgAsImage=function(n,i,r,e,s,o,a,u){if(isNaN(i)||isNaN(r))throw Q.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(e)||isNaN(s))throw Q.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var f=document.createElement("canvas");f.width=e,f.height=s;var c=f.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,f.width,f.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},l=this;return t().then((function(t){return t.fromString(c,n,h)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(h)})).then((function(){l.addImage(f.toDataURL("image/jpeg",1),i,r,e,s,a,u)}))}}(),Et.API.putTotalPages=function(t){var n,i=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(n=new RegExp(t,"g"),i=this.internal.getNumberOfPages()):(n=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),i=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var e=0;e<this.internal.pages[r].length;e++)this.internal.pages[r][e]=this.internal.pages[r][e].replace(n,i);return this},Et.API.viewerPreferences=function(t,n){var i;t=t||{},n=n||!1;var r,e,s,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},a=Object.keys(o),u=[],f=0,c=0,l=0;function v(t,n){var i,r=!1;for(i=0;i<t.length;i+=1)t[i]===n&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),i=this.internal.viewerpreferences.configuration,"reset"===t||!0===n){var d=a.length;for(l=0;l<d;l+=1)i[a[l]].value=i[a[l]].defaultValue,i[a[l]].explicitSet=!1}if("object"===h(t))for(e in t)if(s=t[e],v(a,e)&&void 0!==s){if("boolean"===i[e].type&&"boolean"==typeof s)i[e].value=s;else if("name"===i[e].type&&v(i[e].valueSet,s))i[e].value=s;else if("integer"===i[e].type&&Number.isInteger(s))i[e].value=s;else if("array"===i[e].type){for(f=0;f<s.length;f+=1)if(r=!0,1===s[f].length&&"number"==typeof s[f][0])u.push(String(s[f]-1));else if(s[f].length>1){for(c=0;c<s[f].length;c+=1)"number"!=typeof s[f][c]&&(r=!1);!0===r&&u.push([s[f][0]-1,s[f][1]-1].join(" "))}i[e].value="["+u.join(" ")+"]"}else i[e].value=i[e].defaultValue;i[e].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,n=[];for(t in i)!0===i[t].explicitSet&&n.push("name"===i[t].type?"/"+t+" /"+i[t].value:"/"+t+" "+i[t].value);0!==n.length&&this.internal.write("/ViewerPreferences\n<<\n"+n.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=i,this
314
314
  /** ====================================================================
315
315
  * @license
316
316
  * jsPDF XMP metadata plugin
@@ -3,4 +3,4 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{r as a,c as t,h as n,H as s,F as e,g as i}from"./p-f4c4a2b7.js";import{g as r,a as l,s as o,E as c,b as p,l as g,c as u}from"./p-a091bc9a.js";import{l as d}from"./p-4cd4cb85.js";import{c as h}from"./p-7bfecd07.js";import{g as v,f as m}from"./p-2fc63144.js";import"./p-dcc35070.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-ac122d9e.js";const _="instant-apps-language-translator",b={BASE:_,header:`${_}__header`,headerText:`${_}__header-text`,savingIndicator:`${_}__saving-indicator`,closeButton:`${_}__close-button`,headerTip:`${_}__header-tip`,topBar:`${_}__top-bar`,topBarSection:`${_}__top-bar-section`,collapseSearchContainer:`${_}__collapse-search-container`,userLangText:`${_}__user-lang-text`,lastItem:`${_}--last-item`,writingIcon:`${_}__writing-icon`},f=class{constructor(n){a(this,n),this.translatorDataUpdated=t(this,"translatorDataUpdated",7),this.portalItem=void 0,this.appSettings=void 0,this.locales=void 0,this.open=!1,this.userLocaleInputOnChangeCallback=void 0,this.translatedLocaleInputOnChangeCallback=void 0,this.saving=!1,this.messages=void 0,this.isCollapse=!0}handleT9nItemUpdate(){this.translatorDataUpdated.emit()}handleLocaleChange(){this.initUIData(),this.initSelectLanguage()}handleAppSettings(){this.initUIData(),this.initSelectLanguage()}async componentDidLoad(){this.initialize()}async initialize(){const[a,t]=await d(["esri/intl","esri/request"]);this.intl=a,this.request=t,await this.initMessages(),this.initUIData(),this.initPortalItemResourceT9nData(),this.initSelectLanguage()}async initMessages(){try{const{el:a}=this,t=await r(a);return this.messages=t,Promise.resolve()}catch(a){return Promise.reject()}}initUIData(){const{appSettings:a,locales:t}=this,n=l(a,t);o.set("uiData",n)}initSelectLanguage(){var a,t;if(!this.intl)return;const{locales:n}=this,s=null!==(t=null===(a=null==n?void 0:n[0])||void 0===a?void 0:a.locale)&&void 0!==t?t:this.intl.getLocale(),e=o.get("currentLanguage");0===this.locales.filter((a=>a.locale===e)).length&&o.set("currentLanguage",s)}async initPortalItemResourceT9nData(){try{const a=await v(this.portalItem);o.set("portalItemResource",a);const t=await m(this.request,a);o.set("portalItemResourceT9n",null!=t?t:{})}catch(a){}}render(){return n(s,{key:"23aee2b74a94bcc3caae9aee35ab7d1f2f378a04"},this.renderModal(),this.renderPopoverTip())}renderModal(){return n("calcite-modal",{open:this.open,scale:"l",fullscreen:!0,onCalciteModalClose:this.close.bind(this)},this.renderHeader(),this.renderContent(),this.renderPrimaryButton())}renderPopoverTip(){var a;return n("calcite-popover",{label:"",referenceElement:"headerTip",placement:"trailing","auto-close":!0,closable:!0},n("div",{class:b.headerTip},null===(a=this.messages)||void 0===a?void 0:a.headerTip))}renderHeader(){const a=o.get("saving");return n("header",{class:b.header,slot:"header"},this.renderHeaderText(),a?this.renderSavingIndicator():null)}renderHeaderText(){const{messages:a}=this;return n("div",{class:b.headerText},n("span",null,null==a?void 0:a.header),n("calcite-button",{id:"headerTip",appearance:"transparent"},n("calcite-icon",{icon:c.Popover,scale:"s"})))}renderSavingIndicator(){var a;const t=o.get("saving"),s=null===(a=this.messages)||void 0===a?void 0:a.saving;return n("div",{class:b.savingIndicator},t?n("calcite-loader",{label:s,inline:!0}):null,n("span",null,s))}renderContent(){const a=p(this.locales);return n("div",{slot:"content"},this.renderTopBar(),(null==a?void 0:a.length)>0?this.renderUIData():this.renderNotice())}renderTopBar(){return n("div",{class:b.topBar},this.renderLeadingTopBarSection(),this.renderTrailingTopBarSection())}renderLeadingTopBarSection(){return n("div",{class:b.topBarSection},this.renderUserLocale(),this.renderCollapseSearchContainer())}renderUserLocale(){var a;const t=null===(a=this.messages)||void 0===a?void 0:a.languages,s=h();return n("div",{class:b.userLangText},null==t?void 0:t[s])}renderCollapseSearchContainer(){return n("div",{class:b.collapseSearchContainer},this.renderExpandCollapseButton(),this.renderSearch())}renderExpandCollapseButton(){const{isCollapse:a,messages:t}=this,s=a?null==t?void 0:t.collapseAll:null==t?void 0:t.expandAll;return n(e,null,n("slot",{name:"primary-custom-action"}),n("slot",{name:"secondary-custom-action"}),n("calcite-button",{onClick:this.handleExpandCollapseAll.bind(this),appearance:"transparent","icon-start":c.ExpandCollapse},s))}renderSearch(){var a;return n("instant-apps-language-translator-search",{onSuggestionSelected:this.onSuggestionSelect.bind(this),t9nPlaceholder:null===(a=this.messages)||void 0===a?void 0:a.searchPlaceholder})}renderTrailingTopBarSection(){return n("div",{class:b.topBarSection},this.renderLanguageSelection(),n("slot",{name:"translation-custom-action"}))}renderLanguageSelection(){var a;return n("calcite-label",{layout:"inline"},null===(a=this.messages)||void 0===a?void 0:a.translatedLanguage,n("calcite-select",{label:"",onCalciteSelectChange:this.handleLanguageSelection.bind(this)},this.renderTranslatedLangOptions()))}renderTranslatedLangOptions(){const a=o.get("uiData"),t=null==a?void 0:a.get("locales"),s=p(t);return null==s?void 0:s.map((a=>{const{messages:t}=this,s=null==t?void 0:t.translatedLanguageNames,e=null==t?void 0:t.languages;return n("calcite-option",{key:`translated-lang-option-${a}`,value:a},`${null==s?void 0:s[a]} - ${null==e?void 0:e[a]}`)}))}renderUIData(){if(!(null==g?void 0:g.uiData))return;const a=u();return n("div",null,null==a?void 0:a.map(((t,n)=>this.renderUIDataItem(t,n,a.length))))}renderNotice(){var a;const t=null===(a=this.messages)||void 0===a?void 0:a.noLanguage;return n("calcite-notice",{open:!0,icon:"exclamation-mark-triangle",kind:"warning"},n("div",{slot:"title"},null==t?void 0:t.title),n("div",{slot:"message"},null==t?void 0:t.message))}renderUIDataItem(a,t,s){var e,i;const r=null===(i=null===(e=this.appSettings)||void 0===e?void 0:e.translatedLanguageLabels)||void 0===i?void 0:i[g.currentLanguage],l=`${t===s-1?b.lastItem:""}`,o=this.appSettings.content.filter((t=>t.id===a))[0];return n("instant-apps-language-translator-item",{key:`${a}-${t}`,class:l,fieldName:a,translatedLanguageLabels:r,setting:o,userLocaleInputOnChangeCallback:this.userLocaleInputOnChangeCallback,translatedLocaleInputOnChangeCallback:this.translatedLocaleInputOnChangeCallback})}renderPrimaryButton(){var a;return n("calcite-button",{onClick:()=>this.open=!1,slot:"primary",class:b.closeButton},null===(a=this.messages)||void 0===a?void 0:a.close)}handleExpandCollapseAll(){this.isCollapse=!this.isCollapse;const a=new Map(g.uiData);u().forEach((t=>a.get(t).expanded=this.isCollapse)),o.set("uiData",a)}onSuggestionSelect(a){const t=a.detail,n=new Map(g.uiData);u().forEach((a=>{n.get(a).selected=a===t})),o.set("uiData",n)}close(){this.open=!1}handleLanguageSelection(a){o.set("currentLanguage",a.target.value)}async getTranslationData(){return o.get("portalItemResourceT9n")}async setTranslationData(a){return o.set("portalItemResourceT9n",a)}async getPortalItemResource(){return o.get("portalItemResource")}async batchWriteToPortalItemResource(a){o.set("saving",!0);try{const t=await this.getPortalItemResource(),n=JSON.stringify(a),s=new Blob([n],{type:"application/json"});return await t.update(s),setTimeout((()=>o.set("saving",!1)),1500),this.translatorDataUpdated.emit(),Promise.resolve()}catch(a){return console.error("Error writing to portal item resource: ",a),o.set("saving",!1),Promise.reject()}}get el(){return i(this)}static get watchers(){return{locales:["handleLocaleChange"],appSettings:["handleAppSettings"]}}};f.style=".sc-instant-apps-language-translator-h{display:block}.sc-instant-apps-language-translator-h calcite-modal.sc-instant-apps-language-translator{--calcite-modal-content-padding:0}.sc-instant-apps-language-translator-h .instant-apps-language-translator__header.sc-instant-apps-language-translator{display:flex;justify-content:space-between;width:100%}.sc-instant-apps-language-translator-h .instant-apps-language-translator__header-text.sc-instant-apps-language-translator{font-size:18px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__saving-indicator.sc-instant-apps-language-translator{display:flex;align-items:center;font-size:14.5px;color:var(--calcite-color-brand)}.sc-instant-apps-language-translator-h .instant-apps-language-translator__writing-icon.sc-instant-apps-language-translator{display:flex;justify-content:center;align-items:center;margin-right:5px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__close-button.sc-instant-apps-language-translator{width:175px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__header-tip.sc-instant-apps-language-translator{padding:20px;max-width:45vw}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar.sc-instant-apps-language-translator{display:flex;width:100%;position:sticky;top:0;background:var(--calcite-color-foreground-1);z-index:1}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar.sc-instant-apps-language-translator calcite-label.sc-instant-apps-language-translator{--calcite-label-margin-bottom:0;font-weight:var(--calcite-font-weight-medium)}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar-section.sc-instant-apps-language-translator{box-sizing:border-box;display:flex;align-items:center;width:50%;padding:0.5%}.sc-instant-apps-language-translator-h .instant-apps-language-translator__user-lang-text.sc-instant-apps-language-translator{font-weight:var(--calcite-font-weight-medium)}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar-section.sc-instant-apps-language-translator:first-child{display:flex;justify-content:space-between}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar-section.sc-instant-apps-language-translator:nth-child(2) calcite-select.sc-instant-apps-language-translator{width:255px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__collapse-search-container.sc-instant-apps-language-translator{display:flex;justify-content:space-between}.sc-instant-apps-language-translator-h .instant-apps-language-translator__collapse-search-container.sc-instant-apps-language-translator calcite-input.sc-instant-apps-language-translator{width:300px;margin-left:30px}.ck.ck-reset.ck-editor.ck-rounded-corners.sc-instant-apps-language-translator{margin-top:10px !important;margin-left:55px !important}.ck-editor__editable.sc-instant-apps-language-translator{height:70px !important;font-size:0.875rem !important;line-height:1.375 !important}.ck.ck-editor__editable_inline.sc-instant-apps-language-translator>.sc-instant-apps-language-translator:first-child,.ck.ck-editor__editable_inline.sc-instant-apps-language-translator>.sc-instant-apps-language-translator:last-child{--ck-spacing-large:0.5rem !important}";export{f as instant_apps_language_translator}
6
+ import{r as a,c as t,h as n,H as s,F as e,g as i}from"./p-f4c4a2b7.js";import{g as r,a as l,s as o,E as c,b as p,l as g,c as u}from"./p-afad4f05.js";import{l as d}from"./p-65581d83.js";import{c as h}from"./p-09d62c22.js";import{g as v,f as m}from"./p-c742acd9.js";import"./p-dcc35070.js";import"./p-6a68306c.js";import"./p-d4056c1c.js";import"./p-af2c8aa9.js";const _="instant-apps-language-translator",b={BASE:_,header:`${_}__header`,headerText:`${_}__header-text`,savingIndicator:`${_}__saving-indicator`,closeButton:`${_}__close-button`,headerTip:`${_}__header-tip`,topBar:`${_}__top-bar`,topBarSection:`${_}__top-bar-section`,collapseSearchContainer:`${_}__collapse-search-container`,userLangText:`${_}__user-lang-text`,lastItem:`${_}--last-item`,writingIcon:`${_}__writing-icon`},f=class{constructor(n){a(this,n),this.translatorDataUpdated=t(this,"translatorDataUpdated",7),this.portalItem=void 0,this.appSettings=void 0,this.locales=void 0,this.open=!1,this.userLocaleInputOnChangeCallback=void 0,this.translatedLocaleInputOnChangeCallback=void 0,this.saving=!1,this.messages=void 0,this.isCollapse=!0}handleT9nItemUpdate(){this.translatorDataUpdated.emit()}handleLocaleChange(){this.initUIData(),this.initSelectLanguage()}handleAppSettings(){this.initUIData(),this.initSelectLanguage()}async componentDidLoad(){this.initialize()}async initialize(){const[a,t]=await d(["esri/intl","esri/request"]);this.intl=a,this.request=t,await this.initMessages(),this.initUIData(),this.initPortalItemResourceT9nData(),this.initSelectLanguage()}async initMessages(){try{const{el:a}=this,t=await r(a);return this.messages=t,Promise.resolve()}catch(a){return Promise.reject()}}initUIData(){const{appSettings:a,locales:t}=this,n=l(a,t);o.set("uiData",n)}initSelectLanguage(){var a,t;if(!this.intl)return;const{locales:n}=this,s=null!==(t=null===(a=null==n?void 0:n[0])||void 0===a?void 0:a.locale)&&void 0!==t?t:this.intl.getLocale(),e=o.get("currentLanguage");0===this.locales.filter((a=>a.locale===e)).length&&o.set("currentLanguage",s)}async initPortalItemResourceT9nData(){try{const a=await v(this.portalItem);o.set("portalItemResource",a);const t=await m(this.request,a);o.set("portalItemResourceT9n",null!=t?t:{})}catch(a){}}render(){return n(s,{key:"23aee2b74a94bcc3caae9aee35ab7d1f2f378a04"},this.renderModal(),this.renderPopoverTip())}renderModal(){return n("calcite-modal",{open:this.open,scale:"l",fullscreen:!0,onCalciteModalClose:this.close.bind(this)},this.renderHeader(),this.renderContent(),this.renderPrimaryButton())}renderPopoverTip(){var a;return n("calcite-popover",{label:"",referenceElement:"headerTip",placement:"trailing","auto-close":!0,closable:!0},n("div",{class:b.headerTip},null===(a=this.messages)||void 0===a?void 0:a.headerTip))}renderHeader(){const a=o.get("saving");return n("header",{class:b.header,slot:"header"},this.renderHeaderText(),a?this.renderSavingIndicator():null)}renderHeaderText(){const{messages:a}=this;return n("div",{class:b.headerText},n("span",null,null==a?void 0:a.header),n("calcite-button",{id:"headerTip",appearance:"transparent"},n("calcite-icon",{icon:c.Popover,scale:"s"})))}renderSavingIndicator(){var a;const t=o.get("saving"),s=null===(a=this.messages)||void 0===a?void 0:a.saving;return n("div",{class:b.savingIndicator},t?n("calcite-loader",{label:s,inline:!0}):null,n("span",null,s))}renderContent(){const a=p(this.locales);return n("div",{slot:"content"},this.renderTopBar(),(null==a?void 0:a.length)>0?this.renderUIData():this.renderNotice())}renderTopBar(){return n("div",{class:b.topBar},this.renderLeadingTopBarSection(),this.renderTrailingTopBarSection())}renderLeadingTopBarSection(){return n("div",{class:b.topBarSection},this.renderUserLocale(),this.renderCollapseSearchContainer())}renderUserLocale(){var a;const t=null===(a=this.messages)||void 0===a?void 0:a.languages,s=h();return n("div",{class:b.userLangText},null==t?void 0:t[s])}renderCollapseSearchContainer(){return n("div",{class:b.collapseSearchContainer},this.renderExpandCollapseButton(),this.renderSearch())}renderExpandCollapseButton(){const{isCollapse:a,messages:t}=this,s=a?null==t?void 0:t.collapseAll:null==t?void 0:t.expandAll;return n(e,null,n("slot",{name:"primary-custom-action"}),n("slot",{name:"secondary-custom-action"}),n("calcite-button",{onClick:this.handleExpandCollapseAll.bind(this),appearance:"transparent","icon-start":c.ExpandCollapse},s))}renderSearch(){var a;return n("instant-apps-language-translator-search",{onSuggestionSelected:this.onSuggestionSelect.bind(this),t9nPlaceholder:null===(a=this.messages)||void 0===a?void 0:a.searchPlaceholder})}renderTrailingTopBarSection(){return n("div",{class:b.topBarSection},this.renderLanguageSelection(),n("slot",{name:"translation-custom-action"}))}renderLanguageSelection(){var a;return n("calcite-label",{layout:"inline"},null===(a=this.messages)||void 0===a?void 0:a.translatedLanguage,n("calcite-select",{label:"",onCalciteSelectChange:this.handleLanguageSelection.bind(this)},this.renderTranslatedLangOptions()))}renderTranslatedLangOptions(){const a=o.get("uiData"),t=null==a?void 0:a.get("locales"),s=p(t);return null==s?void 0:s.map((a=>{const{messages:t}=this,s=null==t?void 0:t.translatedLanguageNames,e=null==t?void 0:t.languages;return n("calcite-option",{key:`translated-lang-option-${a}`,value:a},`${null==s?void 0:s[a]} - ${null==e?void 0:e[a]}`)}))}renderUIData(){if(!(null==g?void 0:g.uiData))return;const a=u();return n("div",null,null==a?void 0:a.map(((t,n)=>this.renderUIDataItem(t,n,a.length))))}renderNotice(){var a;const t=null===(a=this.messages)||void 0===a?void 0:a.noLanguage;return n("calcite-notice",{open:!0,icon:"exclamation-mark-triangle",kind:"warning"},n("div",{slot:"title"},null==t?void 0:t.title),n("div",{slot:"message"},null==t?void 0:t.message))}renderUIDataItem(a,t,s){var e,i;const r=null===(i=null===(e=this.appSettings)||void 0===e?void 0:e.translatedLanguageLabels)||void 0===i?void 0:i[g.currentLanguage],l=`${t===s-1?b.lastItem:""}`,o=this.appSettings.content.filter((t=>t.id===a))[0];return n("instant-apps-language-translator-item",{key:`${a}-${t}`,class:l,fieldName:a,translatedLanguageLabels:r,setting:o,userLocaleInputOnChangeCallback:this.userLocaleInputOnChangeCallback,translatedLocaleInputOnChangeCallback:this.translatedLocaleInputOnChangeCallback})}renderPrimaryButton(){var a;return n("calcite-button",{onClick:()=>this.open=!1,slot:"primary",class:b.closeButton},null===(a=this.messages)||void 0===a?void 0:a.close)}handleExpandCollapseAll(){this.isCollapse=!this.isCollapse;const a=new Map(g.uiData);u().forEach((t=>a.get(t).expanded=this.isCollapse)),o.set("uiData",a)}onSuggestionSelect(a){const t=a.detail,n=new Map(g.uiData);u().forEach((a=>{n.get(a).selected=a===t})),o.set("uiData",n)}close(){this.open=!1}handleLanguageSelection(a){o.set("currentLanguage",a.target.value)}async getTranslationData(){return o.get("portalItemResourceT9n")}async setTranslationData(a){return o.set("portalItemResourceT9n",a)}async getPortalItemResource(){return o.get("portalItemResource")}async batchWriteToPortalItemResource(a){o.set("saving",!0);try{const t=await this.getPortalItemResource(),n=JSON.stringify(a),s=new Blob([n],{type:"application/json"});return await t.update(s),setTimeout((()=>o.set("saving",!1)),1500),this.translatorDataUpdated.emit(),Promise.resolve()}catch(a){return console.error("Error writing to portal item resource: ",a),o.set("saving",!1),Promise.reject()}}get el(){return i(this)}static get watchers(){return{locales:["handleLocaleChange"],appSettings:["handleAppSettings"]}}};f.style=".sc-instant-apps-language-translator-h{display:block}.sc-instant-apps-language-translator-h calcite-modal.sc-instant-apps-language-translator{--calcite-modal-content-padding:0}.sc-instant-apps-language-translator-h .instant-apps-language-translator__header.sc-instant-apps-language-translator{display:flex;justify-content:space-between;width:100%}.sc-instant-apps-language-translator-h .instant-apps-language-translator__header-text.sc-instant-apps-language-translator{font-size:18px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__saving-indicator.sc-instant-apps-language-translator{display:flex;align-items:center;font-size:14.5px;color:var(--calcite-color-brand)}.sc-instant-apps-language-translator-h .instant-apps-language-translator__writing-icon.sc-instant-apps-language-translator{display:flex;justify-content:center;align-items:center;margin-right:5px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__close-button.sc-instant-apps-language-translator{width:175px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__header-tip.sc-instant-apps-language-translator{padding:20px;max-width:45vw}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar.sc-instant-apps-language-translator{display:flex;width:100%;position:sticky;top:0;background:var(--calcite-color-foreground-1);z-index:1}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar.sc-instant-apps-language-translator calcite-label.sc-instant-apps-language-translator{--calcite-label-margin-bottom:0;font-weight:var(--calcite-font-weight-medium)}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar-section.sc-instant-apps-language-translator{box-sizing:border-box;display:flex;align-items:center;width:50%;padding:0.5%}.sc-instant-apps-language-translator-h .instant-apps-language-translator__user-lang-text.sc-instant-apps-language-translator{font-weight:var(--calcite-font-weight-medium)}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar-section.sc-instant-apps-language-translator:first-child{display:flex;justify-content:space-between}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar-section.sc-instant-apps-language-translator:nth-child(2) calcite-select.sc-instant-apps-language-translator{width:255px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__collapse-search-container.sc-instant-apps-language-translator{display:flex;justify-content:space-between}.sc-instant-apps-language-translator-h .instant-apps-language-translator__collapse-search-container.sc-instant-apps-language-translator calcite-input.sc-instant-apps-language-translator{width:300px;margin-left:30px}.ck.ck-reset.ck-editor.ck-rounded-corners.sc-instant-apps-language-translator{margin-top:10px !important;margin-left:55px !important}.ck-editor__editable.sc-instant-apps-language-translator{height:70px !important;font-size:0.875rem !important;line-height:1.375 !important}.ck.ck-editor__editable_inline.sc-instant-apps-language-translator>.sc-instant-apps-language-translator:first-child,.ck.ck-editor__editable_inline.sc-instant-apps-language-translator>.sc-instant-apps-language-translator:last-child{--ck-spacing-large:0.5rem !important}";export{f as instant_apps_language_translator}