@esri/solutions-components 0.7.23 → 0.7.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (439) hide show
  1. package/dist/assets/t9n/crowdsource-manager/resources.json +1 -3
  2. package/dist/assets/t9n/crowdsource-manager/resources_en.json +1 -3
  3. package/dist/assets/t9n/crowdsource-reporter/resources.json +18 -1
  4. package/dist/assets/t9n/crowdsource-reporter/resources_en.json +18 -1
  5. package/dist/assets/t9n/delete-button/resources.json +8 -0
  6. package/dist/assets/t9n/delete-button/resources_en.json +8 -0
  7. package/dist/assets/t9n/feature-list/resources.json +4 -0
  8. package/dist/assets/t9n/feature-list/resources_en.json +4 -0
  9. package/dist/assets/t9n/info-card/resources.json +1 -1
  10. package/dist/assets/t9n/info-card/resources_en.json +1 -1
  11. package/dist/assets/t9n/layer-list/resources.json +4 -0
  12. package/dist/assets/t9n/layer-list/resources_en.json +4 -0
  13. package/dist/assets/t9n/layer-table/resources.json +0 -9
  14. package/dist/assets/t9n/layer-table/resources_en.json +0 -9
  15. package/dist/cjs/basemap-gallery_5.cjs.entry.js +573 -0
  16. package/dist/cjs/buffer-tools_3.cjs.entry.js +1 -1
  17. package/dist/cjs/calcite-action-bar.cjs.entry.js +255 -0
  18. package/dist/cjs/calcite-alert_3.cjs.entry.js +136 -357
  19. package/dist/cjs/calcite-combobox_6.cjs.entry.js +2 -1
  20. package/dist/cjs/{calcite-action-bar_3.cjs.entry.js → calcite-filter_5.cjs.entry.js} +333 -172
  21. package/dist/cjs/calcite-flow_4.cjs.entry.js +658 -0
  22. package/dist/cjs/calcite-input-date-picker_3.cjs.entry.js +22 -11
  23. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -1
  24. package/dist/cjs/{card-manager_3.cjs.entry.js → card-manager_2.cjs.entry.js} +48 -268
  25. package/dist/cjs/crowdsource-manager.cjs.entry.js +18 -3
  26. package/dist/cjs/crowdsource-reporter.cjs.entry.js +215 -36
  27. package/dist/cjs/{basemap-gallery_7.cjs.entry.js → info-card_4.cjs.entry.js} +322 -409
  28. package/dist/cjs/instant-apps-export.cjs.entry.js +1 -1
  29. package/dist/cjs/instant-apps-language-translator.cjs.entry.js +41 -1
  30. package/dist/cjs/layout-manager.cjs.entry.js +2 -1
  31. package/dist/cjs/loader.cjs.js +1 -1
  32. package/dist/cjs/{locale-9db09b63.js → locale-1ff119f5.js} +19 -1
  33. package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
  34. package/dist/cjs/popupUtils-8d5b6e94.js +99 -0
  35. package/dist/cjs/public-notification.cjs.entry.js +1 -1
  36. package/dist/cjs/solution-configuration.cjs.entry.js +2 -1
  37. package/dist/cjs/solution-contents_3.cjs.entry.js +16 -2
  38. package/dist/cjs/solutions-components.cjs.js +1 -1
  39. package/dist/cjs/spatial-ref.cjs.entry.js +2 -1
  40. package/dist/collection/collection-manifest.json +3 -0
  41. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +23 -2
  42. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +73 -0
  43. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +349 -56
  44. package/dist/collection/components/delete-button/delete-button.css +19 -0
  45. package/dist/collection/components/delete-button/delete-button.js +299 -0
  46. package/dist/collection/components/delete-button/test/delete-button.e2e.js +29 -0
  47. package/dist/collection/components/delete-button/test/delete-button.spec.js +37 -0
  48. package/dist/collection/components/feature-list/feature-list.css +38 -0
  49. package/dist/collection/components/feature-list/feature-list.js +303 -0
  50. package/dist/collection/components/info-card/info-card.js +65 -21
  51. package/dist/collection/components/layer-list/layer-list.css +28 -0
  52. package/dist/collection/components/layer-list/layer-list.js +288 -0
  53. package/dist/collection/components/layer-table/layer-table.js +63 -116
  54. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +31 -1
  55. package/dist/collection/demos/crowdsource-reporter.html +42 -70
  56. package/dist/collection/demos/feature-list.html +43 -0
  57. package/dist/collection/demos/layer-list.html +43 -0
  58. package/dist/collection/utils/interfaces.ts +4 -0
  59. package/dist/components/calcite-flow-item.js +1 -261
  60. package/dist/components/calcite-flow.js +1 -165
  61. package/dist/components/card-manager2.js +38 -26
  62. package/dist/components/crowdsource-manager.js +110 -89
  63. package/dist/components/crowdsource-reporter.js +463 -42
  64. package/dist/components/delete-button.d.ts +11 -0
  65. package/dist/components/delete-button.js +11 -0
  66. package/dist/components/delete-button2.js +209 -0
  67. package/dist/components/feature-list.d.ts +11 -0
  68. package/dist/components/feature-list.js +11 -0
  69. package/dist/components/feature-list2.js +281 -0
  70. package/dist/{esm/calcite-flow-item.entry.js → components/flow-item.js} +94 -19
  71. package/dist/{esm/calcite-flow.entry.js → components/flow.js} +33 -10
  72. package/dist/components/info-card2.js +87 -136
  73. package/dist/components/instant-apps-export.js +1 -1
  74. package/dist/components/instant-apps-filter-list2.js +22 -11
  75. package/dist/components/instant-apps-language-translator2.js +48 -4
  76. package/dist/components/layer-list.d.ts +11 -0
  77. package/dist/components/layer-list.js +11 -0
  78. package/dist/components/layer-list2.js +268 -0
  79. package/dist/components/layer-table2.js +126 -165
  80. package/dist/components/locale.js +19 -2
  81. package/dist/components/popupUtils.js +97 -0
  82. package/dist/components/queryUtils.js +1 -1
  83. package/dist/components/solution-spatial-ref2.js +17 -2
  84. package/dist/esm/{ExpandToggle-540998b5.js → ExpandToggle-96688cda.js} +1 -1
  85. package/dist/esm/{ar-35006b74.js → ar-29711364.js} +8 -8
  86. package/dist/esm/basemap-gallery_5.entry.js +565 -0
  87. package/dist/esm/{bg-c289978f.js → bg-c0f5033b.js} +8 -8
  88. package/dist/esm/{bs-6f9fb44a.js → bs-60479ce5.js} +8 -8
  89. package/dist/esm/buffer-tools_3.entry.js +3 -3
  90. package/dist/esm/{ca-7962c8b7.js → ca-4317b986.js} +8 -8
  91. package/dist/esm/calcite-accordion-item.entry.js +1 -1
  92. package/dist/esm/calcite-action-bar.entry.js +251 -0
  93. package/dist/esm/calcite-action-group.entry.js +3 -3
  94. package/dist/esm/calcite-action-menu_2.entry.js +5 -5
  95. package/dist/esm/calcite-action-pad_2.entry.js +4 -4
  96. package/dist/esm/calcite-action_2.entry.js +3 -3
  97. package/dist/esm/calcite-alert_3.entry.js +141 -362
  98. package/dist/esm/calcite-avatar.entry.js +1 -1
  99. package/dist/esm/calcite-block-section.entry.js +3 -3
  100. package/dist/esm/calcite-block_2.entry.js +5 -5
  101. package/dist/esm/calcite-button.entry.js +5 -5
  102. package/dist/esm/calcite-card.entry.js +3 -3
  103. package/dist/esm/calcite-checkbox.entry.js +3 -3
  104. package/dist/esm/calcite-chip-group.entry.js +1 -1
  105. package/dist/esm/calcite-chip.entry.js +3 -3
  106. package/dist/esm/calcite-color-picker-hex-input_2.entry.js +1 -1
  107. package/dist/esm/calcite-color-picker.entry.js +3 -3
  108. package/dist/esm/calcite-combobox-item-group.entry.js +2 -2
  109. package/dist/esm/calcite-combobox_6.entry.js +11 -10
  110. package/dist/esm/calcite-date-picker-day_3.entry.js +3 -3
  111. package/dist/esm/calcite-fab.entry.js +1 -1
  112. package/dist/esm/{calcite-action-bar_3.entry.js → calcite-filter_5.entry.js} +363 -204
  113. package/dist/esm/calcite-flow_4.entry.js +651 -0
  114. package/dist/esm/calcite-graph_2.entry.js +4 -4
  115. package/dist/esm/calcite-icon.entry.js +1 -1
  116. package/dist/esm/calcite-inline-editable.entry.js +4 -4
  117. package/dist/esm/calcite-input-date-picker_3.entry.js +31 -20
  118. package/dist/esm/calcite-input-number.entry.js +5 -5
  119. package/dist/esm/calcite-input-text.entry.js +5 -5
  120. package/dist/esm/{calcite-input-time-picker-63439178.js → calcite-input-time-picker-2e1b2157.js} +55 -55
  121. package/dist/esm/calcite-input-time-picker.entry.js +8 -8
  122. package/dist/esm/calcite-input-time-zone.entry.js +5 -5
  123. package/dist/esm/calcite-input_2.entry.js +5 -5
  124. package/dist/esm/calcite-label.entry.js +2 -2
  125. package/dist/esm/calcite-link.entry.js +1 -1
  126. package/dist/esm/calcite-menu-item.entry.js +3 -3
  127. package/dist/esm/calcite-menu.entry.js +3 -3
  128. package/dist/esm/calcite-meter.entry.js +3 -3
  129. package/dist/esm/calcite-modal.entry.js +4 -4
  130. package/dist/esm/calcite-navigation.entry.js +1 -1
  131. package/dist/esm/calcite-notice.entry.js +3 -3
  132. package/dist/esm/calcite-option_2.entry.js +3 -3
  133. package/dist/esm/calcite-pagination.entry.js +3 -3
  134. package/dist/esm/calcite-panel_2.entry.js +3 -3
  135. package/dist/esm/calcite-pick-list-group.entry.js +1 -1
  136. package/dist/esm/calcite-pick-list-item.entry.js +3 -3
  137. package/dist/esm/calcite-pick-list.entry.js +2 -2
  138. package/dist/esm/calcite-radio-button.entry.js +3 -3
  139. package/dist/esm/calcite-rating.entry.js +5 -5
  140. package/dist/esm/calcite-scrim.entry.js +3 -3
  141. package/dist/esm/calcite-segmented-control_2.entry.js +3 -3
  142. package/dist/esm/calcite-sheet.entry.js +2 -2
  143. package/dist/esm/calcite-shell-center-row.entry.js +1 -1
  144. package/dist/esm/calcite-shell-panel_14.entry.js +8 -7
  145. package/dist/esm/calcite-sortable-list.entry.js +1 -1
  146. package/dist/esm/calcite-stepper-item.entry.js +3 -3
  147. package/dist/esm/calcite-stepper.entry.js +3 -3
  148. package/dist/esm/calcite-switch.entry.js +3 -3
  149. package/dist/esm/calcite-table-cell_2.entry.js +3 -3
  150. package/dist/esm/calcite-table-row.entry.js +1 -1
  151. package/dist/esm/calcite-table.entry.js +3 -3
  152. package/dist/esm/calcite-text-area.entry.js +5 -5
  153. package/dist/esm/calcite-tile.entry.js +1 -1
  154. package/dist/esm/calcite-time-picker.entry.js +4 -4
  155. package/dist/esm/calcite-tip-manager.entry.js +3 -3
  156. package/dist/esm/calcite-tip.entry.js +3 -3
  157. package/dist/esm/calcite-tooltip.entry.js +2 -2
  158. package/dist/esm/calcite-tree_2.entry.js +1 -1
  159. package/dist/esm/{card-manager_3.entry.js → card-manager_2.entry.js} +51 -270
  160. package/dist/esm/{common-2cf42ac2.js → common-d04ccc0d.js} +1 -1
  161. package/dist/esm/crowdsource-manager.entry.js +19 -4
  162. package/dist/esm/crowdsource-reporter.entry.js +215 -36
  163. package/dist/esm/{cs-6d13069b.js → cs-da404a04.js} +8 -8
  164. package/dist/esm/{da-14097e6c.js → da-1afac3fa.js} +8 -8
  165. package/dist/esm/{date-1743b515.js → date-8b4a8f33.js} +1 -1
  166. package/dist/esm/{de-dff2571b.js → de-98f3129e.js} +8 -8
  167. package/dist/esm/{de-at-b733db65.js → de-at-ed4817af.js} +8 -8
  168. package/dist/esm/{de-ch-5ad0cb74.js → de-ch-556c82c8.js} +8 -8
  169. package/dist/esm/{dom-492b1b24.js → dom-8f926f33.js} +1 -1
  170. package/dist/esm/{downloadUtils-13579d93.js → downloadUtils-067dc2ff.js} +2 -2
  171. package/dist/esm/{el-688e05ba.js → el-394dfd74.js} +8 -8
  172. package/dist/esm/{en-au-357e70d8.js → en-au-6dde1e7e.js} +8 -8
  173. package/dist/esm/{en-ca-1e0b6b47.js → en-ca-420be416.js} +8 -8
  174. package/dist/esm/{en-gb-861a17f2.js → en-gb-0a7caa85.js} +8 -8
  175. package/dist/esm/{es-291ab4bd.js → es-2e1beb99.js} +8 -8
  176. package/dist/esm/{es-mx-0a7283a7.js → es-mx-ef132a24.js} +8 -8
  177. package/dist/esm/{et-addd2617.js → et-83d139c1.js} +8 -8
  178. package/dist/esm/{fi-469884d5.js → fi-8b81ed94.js} +8 -8
  179. package/dist/esm/{floating-ui-03eb4c82.js → floating-ui-c397f653.js} +1 -1
  180. package/dist/esm/{focusTrapComponent-2e7de651.js → focusTrapComponent-14368766.js} +1 -1
  181. package/dist/esm/{form-9bccaf85.js → form-133b00c7.js} +1 -1
  182. package/dist/esm/{fr-f5cb34ca.js → fr-c47c114a.js} +8 -8
  183. package/dist/esm/{fr-ch-115d3fda.js → fr-ch-97635343.js} +8 -8
  184. package/dist/esm/{he-6e5f5c56.js → he-ed2a12b9.js} +8 -8
  185. package/dist/esm/{hi-503240c2.js → hi-a05727ac.js} +8 -8
  186. package/dist/esm/{hr-cc08d6fc.js → hr-d01671ca.js} +8 -8
  187. package/dist/esm/{hu-69ac240d.js → hu-16506ca7.js} +8 -8
  188. package/dist/esm/{id-99547746.js → id-e9367e87.js} +8 -8
  189. package/dist/esm/{index.es-04d2e63e.js → index.es-92e46d8b.js} +3 -3
  190. package/dist/esm/{basemap-gallery_7.entry.js → info-card_4.entry.js} +322 -406
  191. package/dist/esm/instant-apps-export.entry.js +1 -1
  192. package/dist/esm/instant-apps-language-translator.entry.js +42 -2
  193. package/dist/esm/{interfaces-341e3ab3.js → interfaces-586e863c.js} +1 -1
  194. package/dist/esm/{it-dbb6ea7d.js → it-14246b4a.js} +8 -8
  195. package/dist/esm/{it-ch-a83801f6.js → it-ch-a877e111.js} +8 -8
  196. package/dist/esm/{ja-79dbb02f.js → ja-67a0cfa0.js} +8 -8
  197. package/dist/esm/{ko-31ebe067.js → ko-35b0b83a.js} +8 -8
  198. package/dist/esm/{label-14301f4d.js → label-cd393c81.js} +1 -1
  199. package/dist/esm/layout-manager.entry.js +3 -2
  200. package/dist/esm/loader.js +1 -1
  201. package/dist/esm/{locale-834c52c6.js → locale-13e3c96c.js} +19 -2
  202. package/dist/esm/{locale-8cfa3086.js → locale-6107ef11.js} +1 -1
  203. package/dist/esm/{lt-94d3f4b8.js → lt-71014faf.js} +8 -8
  204. package/dist/esm/{lv-d770ed0d.js → lv-def9df38.js} +8 -8
  205. package/dist/esm/map-select-tools_3.entry.js +4 -4
  206. package/dist/esm/{mapViewUtils-8fe70944.js → mapViewUtils-6daedef8.js} +2 -2
  207. package/dist/esm/{mk-1046d60a.js → mk-bfeac49e.js} +8 -8
  208. package/dist/esm/{nb-dad0b4b9.js → nb-0723b461.js} +8 -8
  209. package/dist/esm/{nl-a968c4b7.js → nl-89663165.js} +8 -8
  210. package/dist/esm/{pl-a0037bd3.js → pl-0157c37c.js} +8 -8
  211. package/dist/esm/popupUtils-b71f30fc.js +97 -0
  212. package/dist/esm/{pt-e3d9370c.js → pt-80d1520c.js} +8 -8
  213. package/dist/esm/{pt-br-44c11565.js → pt-br-ee5003c7.js} +8 -8
  214. package/dist/esm/public-notification.entry.js +4 -4
  215. package/dist/esm/{ro-290e025d.js → ro-eff987f8.js} +8 -8
  216. package/dist/esm/{ru-38ff91f1.js → ru-62839398.js} +8 -8
  217. package/dist/esm/{shared-list-render-89e4bcff.js → shared-list-render-a2ab63e8.js} +1 -1
  218. package/dist/esm/{sk-9622a24b.js → sk-c2f4bd58.js} +8 -8
  219. package/dist/esm/{sl-6bc83a24.js → sl-328ff1db.js} +8 -8
  220. package/dist/esm/solution-configuration.entry.js +4 -3
  221. package/dist/esm/solution-contents_3.entry.js +19 -5
  222. package/dist/esm/{solution-store-b08696f7.js → solution-store-19f7825b.js} +1 -1
  223. package/dist/esm/solutions-components.js +1 -1
  224. package/dist/esm/spatial-ref.entry.js +4 -3
  225. package/dist/esm/{sr-35e575d8.js → sr-75a3ad46.js} +8 -8
  226. package/dist/esm/{sv-d80fa359.js → sv-10da5ef2.js} +8 -8
  227. package/dist/esm/{t9n-3c5e55ab.js → t9n-f16911e7.js} +1 -1
  228. package/dist/esm/{th-23e71d40.js → th-aa112042.js} +8 -8
  229. package/dist/esm/{time-d956a7c8.js → time-855b3426.js} +1 -1
  230. package/dist/esm/{tr-961fd2f3.js → tr-5925a2f5.js} +8 -8
  231. package/dist/esm/{uk-4e8a425a.js → uk-c40eeb9f.js} +8 -8
  232. package/dist/esm/{utils-56206ec2.js → utils-93fd55c4.js} +2 -2
  233. package/dist/esm/{utils-8287806a.js → utils-c3509713.js} +1 -1
  234. package/dist/esm/{vi-ad983882.js → vi-27922b93.js} +8 -8
  235. package/dist/esm/{zh-cn-5b6fd039.js → zh-cn-38a2e1d3.js} +8 -8
  236. package/dist/esm/{zh-hk-7439b11d.js → zh-hk-e0217bd1.js} +8 -8
  237. package/dist/esm/{zh-tw-cf384663.js → zh-tw-31f0447c.js} +8 -8
  238. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-filter-list/instant-apps-filter-list.css +0 -1
  239. package/dist/solutions-components/demos/crowdsource-reporter.html +42 -70
  240. package/dist/solutions-components/demos/feature-list.html +43 -0
  241. package/dist/solutions-components/demos/layer-list.html +43 -0
  242. package/dist/solutions-components/{p-c634d047.entry.js → p-01032eec.entry.js} +2 -18
  243. package/dist/solutions-components/{p-e7951fcb.js → p-0392679d.js} +1 -1
  244. package/dist/solutions-components/{p-3022da2d.js → p-05f702ae.js} +1 -1
  245. package/dist/solutions-components/{p-4da72ee8.entry.js → p-068f5a8c.entry.js} +1 -1
  246. package/dist/solutions-components/{p-4f71a1a0.js → p-0d774e41.js} +1 -1
  247. package/dist/solutions-components/{p-0e723ffc.js → p-0f6b58b2.js} +1 -1
  248. package/dist/solutions-components/{p-ec8f042e.entry.js → p-10410f92.entry.js} +1 -1
  249. package/dist/solutions-components/{p-6a4b1e48.entry.js → p-10f2d6b0.entry.js} +2 -2
  250. package/dist/solutions-components/{p-5d2ccc75.entry.js → p-13be5cf5.entry.js} +1 -1
  251. package/dist/solutions-components/{p-58054bc2.js → p-14548a83.js} +1 -1
  252. package/dist/solutions-components/{p-c9f87acb.js → p-14ff1465.js} +2 -2
  253. package/dist/solutions-components/{p-026b1345.js → p-17668cb7.js} +3 -3
  254. package/dist/solutions-components/{p-5e530f8c.js → p-1c75bb3d.js} +1 -1
  255. package/dist/solutions-components/p-1f7046e9.entry.js +6 -0
  256. package/dist/solutions-components/{p-121a5dac.entry.js → p-234a8293.entry.js} +1 -1
  257. package/dist/solutions-components/{p-355249fc.js → p-2447b332.js} +1 -1
  258. package/dist/solutions-components/{p-48828002.entry.js → p-24c699b0.entry.js} +1 -1
  259. package/dist/solutions-components/{p-9bcbc1cc.js → p-2592e0dd.js} +1 -1
  260. package/dist/solutions-components/{p-b78a1c21.js → p-28b33708.js} +1 -1
  261. package/dist/solutions-components/{p-fa6ef970.js → p-2d68a6fd.js} +1 -1
  262. package/dist/solutions-components/{p-6437fee1.entry.js → p-2e2d01de.entry.js} +1 -1
  263. package/dist/solutions-components/{p-5e9b05c0.entry.js → p-2f425700.entry.js} +1 -1
  264. package/dist/solutions-components/p-3606c4b8.entry.js +6 -0
  265. package/dist/solutions-components/{p-6c3cdd09.entry.js → p-364486d1.entry.js} +1 -1
  266. package/dist/solutions-components/{p-85a89f1d.entry.js → p-368cbb2c.entry.js} +1 -1
  267. package/dist/solutions-components/{p-c68a6d4f.js → p-36cbf14f.js} +1 -1
  268. package/dist/solutions-components/{p-52ad6ff9.entry.js → p-36f247db.entry.js} +1 -1
  269. package/dist/solutions-components/{p-080249de.js → p-38544b17.js} +1 -1
  270. package/dist/solutions-components/{p-a0be72b6.entry.js → p-3a73ee38.entry.js} +1 -1
  271. package/dist/solutions-components/{p-532b7378.entry.js → p-3ad4426b.entry.js} +1 -1
  272. package/dist/solutions-components/{p-5752785e.entry.js → p-3c10901a.entry.js} +1 -1
  273. package/dist/solutions-components/{p-6e406a7b.js → p-3c7d0eb9.js} +1 -1
  274. package/dist/solutions-components/{p-bf23173c.js → p-411b73a7.js} +1 -1
  275. package/dist/solutions-components/{p-76d60881.entry.js → p-429e1284.entry.js} +1 -1
  276. package/dist/solutions-components/{p-f3d277c2.entry.js → p-42f0e1fa.entry.js} +1 -1
  277. package/dist/solutions-components/{p-1fc220c7.js → p-4416d288.js} +1 -1
  278. package/dist/solutions-components/{p-663a433a.entry.js → p-451b16b3.entry.js} +2 -2
  279. package/dist/solutions-components/{p-b5d1b979.js → p-4566438a.js} +3 -3
  280. package/dist/solutions-components/{p-7a06dcdf.js → p-4647b2a6.js} +1 -1
  281. package/dist/solutions-components/{p-75fbe76c.js → p-480d0789.js} +1 -1
  282. package/dist/solutions-components/p-49b02dda.entry.js +6 -0
  283. package/dist/solutions-components/{p-722ae773.js → p-49fb1bfa.js} +2 -2
  284. package/dist/solutions-components/{p-17183100.js → p-4abf1c34.js} +1 -1
  285. package/dist/solutions-components/p-4ae36626.js +6 -0
  286. package/dist/solutions-components/{p-5c3fd315.entry.js → p-4bff69aa.entry.js} +1 -1
  287. package/dist/solutions-components/{p-f8f18a94.entry.js → p-4ccdac24.entry.js} +1 -1
  288. package/dist/solutions-components/{p-a3a64af2.entry.js → p-4d402bcf.entry.js} +1 -1
  289. package/dist/solutions-components/{p-7e82a730.js → p-4d8fc031.js} +1 -1
  290. package/dist/solutions-components/{p-1c720ed5.entry.js → p-4d99cb49.entry.js} +1 -1
  291. package/dist/solutions-components/p-4fbadb84.entry.js +6 -0
  292. package/dist/solutions-components/{p-e0276e26.entry.js → p-5268d845.entry.js} +2 -2
  293. package/dist/solutions-components/{p-f3f09834.js → p-5e12026e.js} +1 -1
  294. package/dist/solutions-components/p-5e832d65.entry.js +6 -0
  295. package/dist/solutions-components/{p-ffee4847.entry.js → p-5fe99315.entry.js} +1 -1
  296. package/dist/solutions-components/{p-d6208a47.js → p-6105d57c.js} +1 -1
  297. package/dist/solutions-components/{p-f3dfb34f.entry.js → p-613315a7.entry.js} +1 -1
  298. package/dist/solutions-components/{p-0d97c2c5.entry.js → p-62eba559.entry.js} +1 -1
  299. package/dist/solutions-components/{p-40235cb7.entry.js → p-63fa7791.entry.js} +1 -1
  300. package/dist/solutions-components/{p-cfccae7c.js → p-6604ac77.js} +1 -1
  301. package/dist/solutions-components/{p-9b1766ef.entry.js → p-674be06c.entry.js} +1 -1
  302. package/dist/solutions-components/{p-a4aef40c.entry.js → p-67ff8e9a.entry.js} +1 -1
  303. package/dist/solutions-components/{p-16df3a9e.entry.js → p-685257d1.entry.js} +1 -1
  304. package/dist/solutions-components/{p-4647c429.js → p-68e0adcf.js} +1 -1
  305. package/dist/solutions-components/{p-fc8338c6.entry.js → p-68e84199.entry.js} +1 -1
  306. package/dist/solutions-components/{p-aa3092cf.js → p-69763854.js} +1 -1
  307. package/dist/solutions-components/{p-e31754c8.js → p-6ae45648.js} +1 -1
  308. package/dist/solutions-components/{p-98013072.entry.js → p-6cce7009.entry.js} +1 -1
  309. package/dist/solutions-components/{p-34cacf32.js → p-6d511162.js} +1 -1
  310. package/dist/solutions-components/{p-337acb3c.js → p-727596e6.js} +1 -1
  311. package/dist/solutions-components/{p-b170916e.js → p-73100e79.js} +2 -2
  312. package/dist/solutions-components/{p-23662977.entry.js → p-734bc1b0.entry.js} +2 -2
  313. package/dist/solutions-components/{p-f3626331.entry.js → p-752ece4a.entry.js} +2 -2
  314. package/dist/solutions-components/{p-ecdd587c.entry.js → p-75e2a322.entry.js} +3 -3
  315. package/dist/solutions-components/{p-ca33fa09.entry.js → p-787203af.entry.js} +1 -1
  316. package/dist/solutions-components/{p-a9fc934d.js → p-79110824.js} +1 -1
  317. package/dist/solutions-components/{p-b82179c0.js → p-793cad54.js} +1 -1
  318. package/dist/solutions-components/{p-0250dec5.js → p-797aa505.js} +1 -1
  319. package/dist/solutions-components/{p-133de052.entry.js → p-7ebd34df.entry.js} +1 -1
  320. package/dist/solutions-components/{p-8934e858.entry.js → p-809b7e47.entry.js} +2 -2
  321. package/dist/solutions-components/{p-ca97465b.js → p-83fd31d5.js} +1 -1
  322. package/dist/solutions-components/{p-2e1f7c0e.entry.js → p-84378c8d.entry.js} +2 -2
  323. package/dist/solutions-components/p-864b1d72.entry.js +6 -0
  324. package/dist/solutions-components/{p-50ea26de.entry.js → p-8b47b607.entry.js} +1 -1
  325. package/dist/solutions-components/{p-f4e91113.js → p-8d49a084.js} +1 -1
  326. package/dist/solutions-components/{p-f84848b0.entry.js → p-8fabb8a4.entry.js} +1 -1
  327. package/dist/solutions-components/p-8fc072ca.entry.js +6 -0
  328. package/dist/solutions-components/{p-29602eff.entry.js → p-96c2ed64.entry.js} +1 -1
  329. package/dist/solutions-components/{p-b42bde59.entry.js → p-978d936a.entry.js} +1 -1
  330. package/dist/solutions-components/{p-79ba73cb.js → p-981e9549.js} +1 -1
  331. package/dist/solutions-components/{p-02714171.entry.js → p-98308b13.entry.js} +2 -2
  332. package/dist/solutions-components/p-99c5701d.entry.js +6 -0
  333. package/dist/solutions-components/{p-fe68d502.js → p-9cbfd8cd.js} +1 -1
  334. package/dist/solutions-components/{p-8f8fe5d0.entry.js → p-a09c8edf.entry.js} +1 -1
  335. package/dist/solutions-components/p-a2d3df14.entry.js +6 -0
  336. package/dist/solutions-components/{p-ac6a3e13.js → p-a5272d7e.js} +1 -1
  337. package/dist/solutions-components/p-a5c5b24d.js +6 -0
  338. package/dist/solutions-components/{p-5d9ad152.entry.js → p-a5e93c7e.entry.js} +1 -1
  339. package/dist/solutions-components/{p-07b31dc9.js → p-a6bb4148.js} +1 -1
  340. package/dist/solutions-components/{p-11b59592.entry.js → p-a8c9ac0b.entry.js} +2 -2
  341. package/dist/solutions-components/{p-41f7bc94.entry.js → p-a9bd945b.entry.js} +1 -1
  342. package/dist/solutions-components/p-ab006ace.js +21 -0
  343. package/dist/solutions-components/{p-634835fe.js → p-abdd289e.js} +1 -1
  344. package/dist/solutions-components/{p-43e67b3c.entry.js → p-aca29f67.entry.js} +2 -2
  345. package/dist/solutions-components/{p-8118146c.entry.js → p-ad96cd8b.entry.js} +1 -1
  346. package/dist/solutions-components/{p-8772a573.js → p-af1bb992.js} +1 -1
  347. package/dist/solutions-components/{p-36eb8399.js → p-b1b768f7.js} +4 -4
  348. package/dist/solutions-components/{p-dd37c504.js → p-b29677ca.js} +1 -1
  349. package/dist/solutions-components/{p-82b4ab94.js → p-b2c5e62b.js} +1 -1
  350. package/dist/solutions-components/{p-db436a77.entry.js → p-b326b592.entry.js} +1 -1
  351. package/dist/solutions-components/{p-a4772574.js → p-b7285bd5.js} +1 -1
  352. package/dist/solutions-components/{p-8b5b4662.js → p-b8959537.js} +1 -1
  353. package/dist/solutions-components/p-ba56035f.entry.js +6 -0
  354. package/dist/solutions-components/{p-c21f578f.js → p-baf4cb37.js} +1 -1
  355. package/dist/solutions-components/{p-799c3f19.js → p-bfebff0e.js} +1 -1
  356. package/dist/solutions-components/p-c0ed2b83.entry.js +6 -0
  357. package/dist/solutions-components/p-c0f97ed2.entry.js +6 -0
  358. package/dist/solutions-components/{p-4af32c75.js → p-c1cf3ebc.js} +1 -1
  359. package/dist/solutions-components/{p-cfb83693.js → p-c3190f85.js} +1 -1
  360. package/dist/solutions-components/{p-0511c98c.js → p-c4ebb5d1.js} +1 -1
  361. package/dist/solutions-components/p-c56fd16c.entry.js +11 -0
  362. package/dist/solutions-components/{p-2d1b8cfa.js → p-c6b9a129.js} +1 -1
  363. package/dist/solutions-components/{p-1cb4c542.entry.js → p-c7e7da9a.entry.js} +1 -1
  364. package/dist/solutions-components/{p-d8b3d156.entry.js → p-ca4023f4.entry.js} +1 -1
  365. package/dist/solutions-components/p-cb1d29d4.entry.js +17 -0
  366. package/dist/solutions-components/p-cc88bb42.entry.js +6 -0
  367. package/dist/solutions-components/{p-034d43fb.js → p-cdee3846.js} +1 -1
  368. package/dist/solutions-components/{p-c5cb8804.js → p-cfb3d66a.js} +1 -1
  369. package/dist/solutions-components/{p-ebbeec9f.entry.js → p-d2d7d6b4.entry.js} +2 -2
  370. package/dist/solutions-components/{p-dd071507.js → p-d44e2fd7.js} +1 -1
  371. package/dist/solutions-components/{p-48a5ae32.entry.js → p-d50f34c4.entry.js} +1 -1
  372. package/dist/solutions-components/{p-5953ebe8.entry.js → p-d9061e5d.entry.js} +1 -1
  373. package/dist/solutions-components/{p-414240b2.js → p-d9a59fcc.js} +1 -1
  374. package/dist/solutions-components/{p-24286e8c.entry.js → p-db69f4ba.entry.js} +1 -1
  375. package/dist/solutions-components/{p-ede84883.js → p-de281b08.js} +2 -2
  376. package/dist/solutions-components/{p-a11fca14.js → p-df118036.js} +1 -1
  377. package/dist/solutions-components/p-e274f3b0.entry.js +23 -0
  378. package/dist/solutions-components/p-e3061220.entry.js +6 -0
  379. package/dist/solutions-components/{p-4613e205.js → p-e6d4bdce.js} +1 -1
  380. package/dist/solutions-components/{p-3c5d3b4a.js → p-e6dfc80f.js} +1 -1
  381. package/dist/solutions-components/{p-92ea9e81.js → p-e834d132.js} +1 -1
  382. package/dist/solutions-components/{p-f9eb2f2d.js → p-ee4e5212.js} +1 -1
  383. package/dist/solutions-components/{p-efce2e85.js → p-ef05dea5.js} +1 -1
  384. package/dist/solutions-components/{p-5fd1eb64.js → p-f0d68a3f.js} +2 -2
  385. package/dist/solutions-components/p-f17941f1.entry.js +6 -0
  386. package/dist/solutions-components/{p-9e3b8632.entry.js → p-f1e6ce96.entry.js} +1 -1
  387. package/dist/solutions-components/p-f54f3719.entry.js +17 -0
  388. package/dist/solutions-components/{p-fdb1ace8.entry.js → p-fb1c6811.entry.js} +2 -2
  389. package/dist/solutions-components/p-fec77450.js +21 -0
  390. package/dist/solutions-components/{p-50764143.entry.js → p-ff460d05.entry.js} +3 -3
  391. package/dist/solutions-components/{p-d1ca57f3.entry.js → p-ff7c9bc3.entry.js} +1 -1
  392. package/dist/solutions-components/{p-0b47b407.js → p-ffa2c430.js} +1 -1
  393. package/dist/solutions-components/{p-89520d31.entry.js → p-ffbed9b2.entry.js} +1 -1
  394. package/dist/solutions-components/solutions-components.esm.js +1 -1
  395. package/dist/solutions-components/utils/interfaces.ts +4 -0
  396. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +8 -0
  397. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +159 -11
  398. package/dist/types/components/delete-button/delete-button.d.ts +120 -0
  399. package/dist/types/components/feature-list/feature-list.d.ts +128 -0
  400. package/dist/types/components/info-card/info-card.d.ts +19 -0
  401. package/dist/types/components/layer-list/layer-list.d.ts +133 -0
  402. package/dist/types/components/layer-table/layer-table.d.ts +12 -40
  403. package/dist/types/components/solution-spatial-ref/solution-spatial-ref.d.ts +5 -1
  404. package/dist/types/components.d.ts +269 -11
  405. package/dist/types/preact.d.ts +15 -1
  406. package/dist/types/utils/interfaces.d.ts +2 -0
  407. package/package.json +2 -2
  408. package/dist/cjs/calcite-filter_2.cjs.entry.js +0 -237
  409. package/dist/cjs/calcite-flow-item.cjs.entry.js +0 -197
  410. package/dist/cjs/calcite-flow.cjs.entry.js +0 -153
  411. package/dist/cjs/calcite-handle.cjs.entry.js +0 -184
  412. package/dist/cjs/resources-55ba2752.js +0 -29
  413. package/dist/esm/calcite-filter_2.entry.js +0 -232
  414. package/dist/esm/calcite-handle.entry.js +0 -180
  415. package/dist/esm/resources-221791b0.js +0 -26
  416. package/dist/solutions-components/p-0200864c.entry.js +0 -11
  417. package/dist/solutions-components/p-02fad071.entry.js +0 -6
  418. package/dist/solutions-components/p-04f05bc5.entry.js +0 -6
  419. package/dist/solutions-components/p-166d5bcc.entry.js +0 -6
  420. package/dist/solutions-components/p-1711c535.entry.js +0 -6
  421. package/dist/solutions-components/p-1f88a556.entry.js +0 -6
  422. package/dist/solutions-components/p-2ddd9cf8.entry.js +0 -6
  423. package/dist/solutions-components/p-3cf20613.entry.js +0 -17
  424. package/dist/solutions-components/p-43546966.entry.js +0 -6
  425. package/dist/solutions-components/p-6b943f52.js +0 -21
  426. package/dist/solutions-components/p-79f95735.entry.js +0 -11
  427. package/dist/solutions-components/p-7f333e23.js +0 -11
  428. package/dist/solutions-components/p-897037f0.entry.js +0 -6
  429. package/dist/solutions-components/p-8c7fc78f.entry.js +0 -11
  430. package/dist/solutions-components/p-941ab8c0.js +0 -6
  431. package/dist/solutions-components/p-96974e5f.js +0 -6
  432. package/dist/solutions-components/p-a32b61ee.entry.js +0 -6
  433. package/dist/solutions-components/p-ad9fbb2a.entry.js +0 -6
  434. package/dist/solutions-components/p-bacc9b0d.entry.js +0 -6
  435. package/dist/solutions-components/p-c252997f.entry.js +0 -17
  436. package/dist/solutions-components/p-c5db42ad.entry.js +0 -6
  437. package/dist/solutions-components/p-e89c5860.entry.js +0 -6
  438. package/dist/solutions-components/p-eb9b003a.entry.js +0 -11
  439. package/dist/solutions-components/p-eff7f407.entry.js +0 -6
@@ -0,0 +1,17 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as t,c as i,h as s,H as e,g as n}from"./p-78780f63.js";import{d as a,a as o,b as l,i as r,c,e as h,f as d}from"./p-4416d288.js";import{t as p}from"./p-83fd31d5.js";import{f as u,c as v,d as m,r as f,a as g,F as b}from"./p-c4ebb5d1.js";import{s as _,c as x,d as w,H as y}from"./p-6604ac77.js";import{c as k,d as $,u as C}from"./p-0c97de08.js";import{n as z}from"./p-1e2ffee3.js";import{c as E,d as D}from"./p-49fb1bfa.js";import{c as I,s as P,a as F}from"./p-f10944e6.js";import{n as R,c as S,d as j,f as L}from"./p-de281b08.js";import{o as N}from"./p-653af7e0.js";import{g as O,a as T}from"./p-727596e6.js";import{c as A,s as M,d as U}from"./p-981e9549.js";import{c as B,d as W,a as H}from"./p-d9a59fcc.js";import{g as V}from"./p-fcefdfff.js";import{g as J}from"./p-0c07ad8a.js";import{l as K}from"./p-a8a0187d.js";import{g as q}from"./p-86b21da1.js";import{g as Y}from"./p-c96eb2db.js";import"./p-29d68474.js";import"./p-a82f35c9.js";import"./p-c92fff33.js";import"./p-5b566d55.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-14a48b14.js";
7
+ /*!
8
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
+ * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
10
+ * v2.0.0
11
+ */const Z=class{constructor(s){t(this,s),this.calciteInputDatePickerChange=i(this,"calciteInputDatePickerChange",6),this.calciteInputDatePickerBeforeClose=i(this,"calciteInputDatePickerBeforeClose",6),this.calciteInputDatePickerClose=i(this,"calciteInputDatePickerClose",6),this.calciteInputDatePickerBeforeOpen=i(this,"calciteInputDatePickerBeforeOpen",6),this.calciteInputDatePickerOpen=i(this,"calciteInputDatePickerOpen",6),this.calciteInternalInputInputHandler=t=>{const i=t.target,s=i.value,e=this.parseNumerals(s),n=this.formatNumerals(e);i.value=n;const{year:a}=o(s,this.localeData);if(a&&a.length<4)return;const c=l(s,this.localeData);r(c,this.min,this.max)&&(this.datePickerActiveDate=c)},this.calciteInternalInputBlurHandler=()=>{this.commitValue()},this.dialogId=`date-picker-dialog--${V()}`,this.focusOnOpen=!1,this.lastBlurredInput="none",this.userChangedValue=!1,this.openTransitionProp="opacity",this.valueAsDateChangedExternally=!1,this.placeholderTextId=`calcite-input-date-picker-placeholder-${V()}`,this.onInputWrapperClick=()=>{this.range&&"none"!==this.lastBlurredInput&&this.open||(this.open=!this.open),this.lastBlurredInput="none"},this.setFilteredPlacements=()=>{const{el:t,flipPlacements:i}=this;this.filteredFlipPlacements=i?u(i,t):null},this.setTransitionEl=t=>{this.transitionEl=t},this.setStartInput=t=>{this.startInput=t},this.setEndInput=t=>{this.endInput=t},this.deactivate=()=>{this.open=!1,this.lastBlurredInput="none"},this.keyDownHandler=t=>{var i,s;const{defaultPrevented:e,key:n}=t;e||("Enter"===n?(this.commitValue(),this.shouldFocusRangeEnd()?null===(i=this.endInput)||void 0===i||i.setFocus():this.shouldFocusRangeStart()&&(null===(s=this.startInput)||void 0===s||s.setFocus()),_(this)&&(t.preventDefault(),this.restoreInputFocus())):"ArrowDown"===n?(this.open=!0,this.focusOnOpen=!0,t.preventDefault()):"Escape"===n&&(this.open=!1,t.preventDefault(),this.restoreInputFocus()))},this.startInputFocus=()=>{this.focusedInput="start"},this.startEndInputFocus=t=>{const i=t.relatedTarget;this.lastBlurredInput=i===this.startInput?"start":i===this.endInput?"end":"none"},this.endInputFocus=()=>{this.focusedInput="end"},this.setFloatingEl=t=>{this.floatingEl=t,v(this,this.referenceEl,this.floatingEl)},this.setStartWrapper=t=>{this.startWrapper=t,this.setReferenceEl()},this.setEndWrapper=t=>{this.endWrapper=t,this.setReferenceEl()},this.setDatePickerRef=t=>{this.datePickerEl=t,B(this,{focusTrapEl:t,focusTrapOptions:{initialFocus:!1,setReturnFocus:!1}})},this.handleDateChange=t=>{this.range||(t.stopPropagation(),this.setValue(t.target.valueAsDate),this.localizeInputValues(),this.restoreInputFocus())},this.handleDateRangeChange=t=>{this.range&&(t.stopPropagation(),this.setRangeValue(t.target.valueAsDate),this.localizeInputValues(),this.restoreInputFocus())},this.setInputValue=(t,i="start")=>{const s=this[`${i}Input`];s&&(s.value=t)},this.setRangeValue=t=>{if(!this.range)return;const{value:i}=this,s=Array.isArray(i),e=Array.isArray(t);let n=e?c(e?t[0]:null):"";n&&(n=this.getNormalizedDate(n));let a=e?c(e?t[1]:null):"";a&&(a=this.getNormalizedDate(a));const o=n||a?[n,a]:"";if(o===i)return;this.userChangedValue=!0,this.value=o,this.valueAsDate=o?O(o):void 0;const l=this.calciteInputDatePickerChange.emit();l&&l.defaultPrevented&&(this.value=i,s?(this.setInputValue(i[0],"start"),this.setInputValue(i[1],"end")):(this.value=i,this.setInputValue(i)))},this.setValue=t=>{if(this.range)return;const i=this.value;let s=c(t);s=this.getNormalizedDate(s),s!==i&&(this.userChangedValue=!0,this.valueAsDate=s?h(s):void 0,this.value=s||"",this.calciteInputDatePickerChange.emit().defaultPrevented&&(this.value=i,this.setInputValue(i)))},this.commonDateSeparators=[".","-","/"],this.formatNumerals=t=>t?t.split("").map((t=>{var i,s,e;return(null===(i=this.commonDateSeparators)||void 0===i?void 0:i.includes(t))?null===(s=this.localeData)||void 0===s?void 0:s.separator:(null==z?void 0:z.includes(t))?null===(e=null==R?void 0:R.numberFormatter)||void 0===e?void 0:e.format(Number(t)):t})).join(""):"",this.parseNumerals=t=>t?t.split("").map((t=>z.includes(t)?R.delocalize(t):t)).join(""):"",this.disabled=!1,this.focusTrapDisabled=!1,this.form=void 0,this.readOnly=!1,this.value="",this.flipPlacements=void 0,this.headingLevel=void 0,this.valueAsDate=void 0,this.messageOverrides=void 0,this.messages=void 0,this.minAsDate=void 0,this.maxAsDate=void 0,this.min=void 0,this.max=void 0,this.open=!1,this.name=void 0,this.numberingSystem=void 0,this.scale="m",this.status="idle",this.placement=m,this.range=!1,this.required=!1,this.overlayPositioning="absolute",this.proximitySelectionDisabled=!1,this.layout="horizontal",this.datePickerActiveDate=void 0,this.defaultMessages=void 0,this.effectiveLocale="",this.focusedInput="start",this.localeData=void 0}handleFocusTrapDisabled(t){this.open&&(t?W(this):H(this))}handleDisabledAndReadOnlyChange(t){t||(this.open=!1)}valueWatcher(t){if(!this.userChangedValue){let i;i=Array.isArray(t)?O(t):t?h(t):void 0,this.valueAsDateChangedExternally||i===this.valueAsDate||(this.valueAsDate=i),this.localizeInputValues()}this.userChangedValue=!1}valueAsDateWatcher(t){this.datePickerActiveDate=t;const i=this.range&&Array.isArray(t)?[c(t[0]),c(t[1])]:c(t);this.value!==i&&(this.valueAsDateChangedExternally=!0,this.value=i,this.valueAsDateChangedExternally=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}onMessagesChange(){}onMinChanged(t){t&&(this.minAsDate=h(t))}onMaxChanged(t){t&&(this.maxAsDate=h(t))}openHandler(){N(this),(this.disabled||this.readOnly)&&(this.open=!1)}overlayPositioningHandler(){this.reposition(!0)}calciteDaySelectHandler(){this.shouldFocusRangeStart()||this.shouldFocusRangeEnd()||(this.open=!1)}async setFocus(){await I(this),this.el.focus()}async reposition(t=!1){const{floatingEl:i,referenceEl:s,placement:e,overlayPositioning:n,filteredFlipPlacements:a}=this;return f(this,{floatingEl:i,referenceEl:s,overlayPositioning:n,placement:e,flipPlacements:a,type:"menu"},t)}connectedCallback(){k(this),S(this);const{open:t}=this;if(t&&this.openHandler(),Array.isArray(this.value))this.valueAsDate=O(this.value);else if(this.value)try{this.valueAsDate=h(this.value)}catch(t){this.warnAboutInvalidValue(this.value),this.value=""}else this.range&&this.valueAsDate&&this.setRangeValue(this.valueAsDate);this.min&&(this.minAsDate=h(this.min)),this.max&&(this.maxAsDate=h(this.max)),E(this),x(this),A(this),this.setFilteredPlacements(),this.reposition(!0),R.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.effectiveLocale,useGrouping:!1},this.open&&N(this),v(this,this.referenceEl,this.floatingEl)}async componentWillLoad(){P(this),await Promise.all([this.loadLocaleData(),M(this)]),this.onMinChanged(this.min),this.onMaxChanged(this.max)}componentDidLoad(){F(this),this.localizeInputValues(),this.reposition(!0)}disconnectedCallback(){W(this),$(this),D(this),w(this),g(this,this.referenceEl,this.floatingEl),j(this),U(this)}componentDidRender(){C(this)}render(){var t,i,n;const{disabled:a,effectiveLocale:o,messages:l,numberingSystem:r,readOnly:c}=this;return R.numberFormatOptions={numberingSystem:r,locale:o,useGrouping:!1},s(e,{onBlur:this.deactivate,onKeyDown:this.keyDownHandler},this.localeData&&s("div",{class:"input-container"},s("div",{class:"input-wrapper",onClick:this.onInputWrapperClick,ref:this.setStartWrapper},s("calcite-input-text",{"aria-autocomplete":"none","aria-controls":this.dialogId,"aria-describedby":this.placeholderTextId,"aria-expanded":p(this.open),"aria-haspopup":"dialog",class:"input "+("vertical"===this.layout&&this.range?"no-bottom-border":""),disabled:a,icon:"calendar",onCalciteInputTextInput:this.calciteInternalInputInputHandler,onCalciteInternalInputTextBlur:this.calciteInternalInputBlurHandler,onCalciteInternalInputTextFocus:this.startInputFocus,onFocus:this.startEndInputFocus,placeholder:null===(t=this.localeData)||void 0===t?void 0:t.placeholder,readOnly:c,role:"combobox",scale:this.scale,status:this.status,ref:this.setStartInput}),!this.readOnly&&this.renderToggleIcon(this.open&&"start"===this.focusedInput),s("span",{"aria-hidden":"true",class:"assistive-text",id:this.placeholderTextId},"Date Format: ",null===(i=this.localeData)||void 0===i?void 0:i.placeholder)),s("div",{"aria-hidden":p(!this.open),"aria-label":l.chooseDate,"aria-live":"polite","aria-modal":"true",class:{"menu-container":!0,"menu-container--active":this.open},id:this.dialogId,role:"dialog",ref:this.setFloatingEl},s("div",{class:{"calendar-picker-wrapper":!0,"calendar-picker-wrapper--end":"end"===this.focusedInput,[b.animation]:!0,[b.animationActive]:this.open},ref:this.setTransitionEl},s("calcite-date-picker",{activeDate:this.datePickerActiveDate,activeRange:this.focusedInput,headingLevel:this.headingLevel,max:this.max,maxAsDate:this.maxAsDate,messageOverrides:this.messageOverrides,min:this.min,minAsDate:this.minAsDate,numberingSystem:r,onCalciteDatePickerChange:this.handleDateChange,onCalciteDatePickerRangeChange:this.handleDateRangeChange,proximitySelectionDisabled:this.proximitySelectionDisabled,range:this.range,scale:this.scale,tabIndex:this.open?void 0:-1,valueAsDate:this.valueAsDate,ref:this.setDatePickerRef}))),this.range&&"horizontal"===this.layout&&s("div",{class:"horizontal-arrow-container"},s("calcite-icon",{flipRtl:!0,icon:"arrow-right",scale:J(this.scale)})),this.range&&"vertical"===this.layout&&"s"!==this.scale&&s("div",{class:"vertical-arrow-container"},s("calcite-icon",{icon:"arrow-down",scale:J(this.scale)})),this.range&&s("div",{class:"input-wrapper",onClick:this.onInputWrapperClick,ref:this.setEndWrapper},s("calcite-input-text",{"aria-autocomplete":"none","aria-controls":this.dialogId,"aria-expanded":p(this.open),"aria-haspopup":"dialog",class:{input:!0,"border-top-color-one":"vertical"===this.layout&&this.range},disabled:a,icon:"calendar",onCalciteInputTextInput:this.calciteInternalInputInputHandler,onCalciteInternalInputTextBlur:this.calciteInternalInputBlurHandler,onCalciteInternalInputTextFocus:this.endInputFocus,onFocus:this.startEndInputFocus,placeholder:null===(n=this.localeData)||void 0===n?void 0:n.placeholder,readOnly:c,role:"combobox",scale:this.scale,status:this.status,ref:this.setEndInput}),!this.readOnly&&this.renderToggleIcon(this.open&&"end"===this.focusedInput))),s(y,{component:this}))}renderToggleIcon(t){return s("span",{class:"toggle-icon"},s("calcite-icon",{icon:t?"chevron-up":"chevron-down",scale:J(this.scale)}))}setReferenceEl(){const{focusedInput:t,layout:i,endWrapper:s,startWrapper:e}=this;this.referenceEl="end"===t||"vertical"===i?s||e:e||s,requestAnimationFrame((()=>v(this,this.referenceEl,this.floatingEl)))}onLabelClick(){this.setFocus()}onBeforeOpen(){this.reposition(!0),this.calciteInputDatePickerBeforeOpen.emit()}onOpen(){H(this,{onActivate:()=>{this.focusOnOpen&&(this.datePickerEl.setFocus(),this.focusOnOpen=!1)}}),this.calciteInputDatePickerOpen.emit()}onBeforeClose(){this.calciteInputDatePickerBeforeClose.emit()}onClose(){this.calciteInputDatePickerClose.emit(),W(this),this.restoreInputFocus(),this.focusOnOpen=!1,this.datePickerEl.reset(),this.reposition(!0)}commitValue(){const{focusedInput:t,value:i}=this,s=l(this[`${t}Input`].value,this.localeData),e=c(s),n=Array.isArray(i);if(this.range)if(n){if(e===i["start"===t?0:1])return;s?(this.setRangeValue(["start"===t?s:h(i[0]),"end"===t?s:h(i[1])]),this.localizeInputValues()):this.setRangeValue(["end"===t&&h(i[0]),"start"===t&&h(i[1])])}else s&&(this.setRangeValue(["start"===t?s:h(i[0]),"end"===t?s:h(i[1])]),this.localizeInputValues());else{if(e===i)return;this.setValue(s),this.localizeInputValues()}}async loadLocaleData(){R.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.effectiveLocale,useGrouping:!1},this.localeData=await T(this.effectiveLocale),this.localizeInputValues()}shouldFocusRangeStart(){return!(!this.value[1]||this.value[0]||"end"!==this.focusedInput||!this.startInput)}shouldFocusRangeEnd(){return!(!this.value[0]||this.value[1]||"start"!==this.focusedInput||!this.endInput)}restoreInputFocus(){this.range?("start"===this.focusedInput?this.startInput:this.endInput).setFocus():this.startInput.setFocus()}localizeInputValues(){var t;const i=d(this.range?Array.isArray(this.valueAsDate)&&this.valueAsDate[0]||void 0:this.valueAsDate,this.minAsDate,this.maxAsDate),s=this.range?d(Array.isArray(this.valueAsDate)&&this.valueAsDate[1]||void 0,this.minAsDate,this.maxAsDate):null,e={numberingSystem:L},n=i&&this.formatNumerals(i.toLocaleDateString(this.effectiveLocale,e)),a=s&&this.formatNumerals(s.toLocaleDateString(this.effectiveLocale,e));this.setInputValue(null!=n?n:"","start"),this.setInputValue(null!==(t=this.range&&a)&&void 0!==t?t:"","end")}warnAboutInvalidValue(t){console.warn(`The specified value "${t}" does not conform to the required format, "YYYY-MM-DD".`)}getNormalizedDate(t){if(!t)return"";if(!
12
+ /*!
13
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
14
+ * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
15
+ * v2.0.0
16
+ */
17
+ function(t){if(!t)return!1;const{year:i}=a(t);return Number(i)<100}(t))return t;const{day:i,month:s,year:e}=a(t);return`${function(t){const i=(new Date).getFullYear();return 100*Math.floor(i/100)+t}(Number(e))}-${s}-${i}`}static get delegatesFocus(){return!0}static get assetsDirs(){return["assets"]}get el(){return n(this)}static get watchers(){return{focusTrapDisabled:["handleFocusTrapDisabled"],disabled:["handleDisabledAndReadOnlyChange"],readOnly:["handleDisabledAndReadOnlyChange"],value:["valueWatcher"],valueAsDate:["valueAsDateWatcher"],flipPlacements:["flipPlacementsHandler"],messageOverrides:["onMessagesChange"],min:["onMinChanged"],max:["onMaxChanged"],open:["openHandler"],overlayPositioning:["overlayPositioningHandler"],layout:["setReferenceEl"],focusedInput:["setReferenceEl"],effectiveLocale:["loadLocaleData"]}}};Z.style=":host{--calcite-icon-size:1rem;--calcite-spacing-eighth:0.125rem;--calcite-spacing-quarter:0.25rem;--calcite-spacing-half:0.5rem;--calcite-spacing-three-quarters:0.75rem;--calcite-spacing:1rem;--calcite-spacing-plus-quarter:1.25rem;--calcite-spacing-plus-half:1.5rem;--calcite-spacing-double:2rem;--calcite-menu-min-width:10rem;--calcite-header-min-height:3rem;--calcite-footer-min-height:3rem}:host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:inline-block;inline-size:100%;overflow:visible;vertical-align:top;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host .menu-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:var(--calcite-z-index);border-radius:0.25rem}:host .menu-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}:host .menu-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}:host .menu-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}:host .menu-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}:host .menu-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;transform:translate(0)}:host([scale=s]){--calcite-toggle-spacing:0.5rem;--calcite-internal-input-text-input-padding-inline-end:calc(var(--calcite-toggle-spacing) + 1rem)}:host([scale=m]){--calcite-toggle-spacing:0.75rem;--calcite-internal-input-text-input-padding-inline-end:calc(var(--calcite-toggle-spacing) + 1.5rem)}:host([scale=l]){--calcite-toggle-spacing:1rem;--calcite-internal-input-text-input-padding-inline-end:calc(var(--calcite-toggle-spacing) + 2rem)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.calendar-picker-wrapper{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transform:translate3d(0, 0, 0)}.input-wrapper{position:relative}.toggle-icon{position:absolute;display:flex;cursor:pointer;align-items:center;inset-inline-end:0;inset-block:0;padding-inline:var(--calcite-toggle-spacing)}:host([range]) .input-container{display:flex}:host([range]) .input-wrapper{flex:1 1 auto}:host([range]) .horizontal-arrow-container{display:flex;align-items:center;border-width:1px;border-inline-start-width:0px;border-inline-end-width:0px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-background);padding-block:0px;padding-inline:0.25rem}:host([range][layout=vertical]) .input-wrapper{inline-size:100%}:host([range][layout=vertical]) .input-container{flex-direction:column;align-items:flex-start}:host([range][layout=vertical]) .calendar-picker-wrapper--end{transform:translate3d(0, 0, 0)}:host([range][layout=vertical]) .vertical-arrow-container{inset-block-start:1.5rem;position:absolute;z-index:var(--calcite-z-index);margin-inline:1px;background-color:var(--calcite-color-foreground-1);padding-inline:0.625rem;inset-inline-start:0}.menu-container{--calcite-floating-ui-z-index:var(--calcite-z-index-dropdown);display:block;position:absolute;z-index:var(--calcite-floating-ui-z-index);visibility:hidden}.menu-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:var(--calcite-z-index);border-radius:0.25rem}.menu-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.menu-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.menu-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.menu-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.menu-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;transform:translate(0)}:host([open]) .menu-container{visibility:visible}.menu-container--active{visibility:visible}.input .calcite-input__wrapper{margin-block-start:0px}:host([range][layout=vertical][scale=m]) .vertical-arrow-container{inset-block-start:1.5rem;padding-inline-start:0.75rem}:host([range][layout=vertical][scale=m]) .vertical-arrow-container calcite-icon{block-size:0.75rem;inline-size:0.75rem;min-inline-size:0px}:host([range][layout=vertical][scale=l]) .vertical-arrow-container{inset-block-start:2.25rem;padding-inline:0.875rem}:host([range][layout=vertical][open]) .vertical-arrow-container{display:none}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}";const G="instant-apps-filter-list calcite-mode-light",X=["feature","geojson","wfs","csv","scene","subtype-group","point-cloud","map-image","sublayer"];function Q(t){return t.replaceAll("'","''")}function tt(t,i=!1){if(t){const s=new Date(t),e=`${s.getFullYear()}-${s.getMonth()+1}-${s.getDate()}`;return i?`${e} ${s.getHours()}:${s.getMinutes()}:${s.getSeconds()}`:e}}function it(t){var i;if(null!=t){t.value=["",""];const s=null===(i=t.shadowRoot)||void 0===i?void 0:i.querySelectorAll("calcite-input");if(null!=s)for(const t of s)t.value=""}}const st="instant-apps-filter-list__footer",et="instant-apps-filter-list__item-container--user-input",nt=class{constructor(s){t(this,s),this.filterListReset=i(this,"filterListReset",7),this.filterUpdate=i(this,"filterUpdate",7),this.layerExpressions=void 0,this.autoUpdateUrl=!1,this.closeBtn=!1,this.closeBtnOnClick=void 0,this.closeBtnText=void 0,this.openFilters=!1,this.extentSelector=!1,this.extentSelectorConfig=void 0,this.urlParams=void 0,this.view=void 0,this.zoomBtn=!0,this.loading=void 0,this.filterLayerExpressions=void 0,this.messages=void 0,this.baseClass=G,this.disabled=!0,this.hasLayerExpression=!1,this.initDefExpressions=void 0,this.initMapImageExpressions=void 0,this.initPointCloudFilters=void 0}watchViewHandler(){this.handleWhenView()}watchLayerExpressions(){this.hasLayerExpression||(this.filterLayerExpressions=JSON.parse(JSON.stringify(this.layerExpressions)),this.handleLayerExpressionsUpdate(),this.hasLayerExpression=!0)}async componentWillLoad(){var t;this.baseClass="dark"===Y(this.el)?"instant-apps-filter-list calcite-mode-dark":G,await this.initializeModules(),q(this),this.hasLayerExpression=null!=this.layerExpressions,this.filterLayerExpressions=null!=this.layerExpressions?JSON.parse(JSON.stringify(this.layerExpressions)):void 0,this.disabled=!(null===(t=this.filterLayerExpressions)||void 0===t?void 0:t.length)||void 0,this.reactiveUtils.whenOnce((()=>this.view)).then((()=>this.handleLayerExpressionsUpdate()))}componentShouldUpdate(t,i,s){"view"===s&&null!=t?this.handleWhenView():"layerExpressions"===s&&(this.hasLayerExpression&&this.resetAllFilters(),this.filterLayerExpressions=JSON.parse(JSON.stringify(this.layerExpressions)),this.handleLayerExpressionsUpdate(),this.hasLayerExpression=!0)}componentWillRender(){var t;this.disabled=!((null===(t=this.filterLayerExpressions)||void 0===t?void 0:t.length)>0)||void 0}disconnectedCallback(){this.filterLayerExpressions=JSON.parse(JSON.stringify(this.layerExpressions)),this.resetAllFilters()}async initializeModules(){const[t,i,s]=await K(["esri/intl","esri/geometry/support/jsonUtils","esri/core/reactiveUtils"]);return this.geometryJsonUtils=i,this.reactiveUtils=s,this.locale=t.getLocale(),Promise.resolve()}render(){const t=this.loading?this.renderLoading():this.initFilterConfig(),i=this.closeBtn?this.renderFullFooter():this.renderFooter();return s(e,null,s("calcite-panel",{class:this.baseClass,ref:t=>this.panelEl=t},s("slot",{slot:"header-content",name:"filter-header-content"}),s("slot",{slot:"header-actions-end",name:"filter-header-actions-end"}),s("div",{key:"filter-container",class:"instant-apps-filter-list__container"},t,i)))}renderLoading(){return s("calcite-loader",{label:"Loading filters..."})}renderFilter(t){const{id:i}=t;return t.expressions.map(((e,n)=>"checkbox"==e.type||null==e.type?s("div",{key:`${i}-${n}`,class:"instant-apps-filter-list__item-container"},s("div",{class:"instant-apps-filter-list__title"},s("p",null,e.name)),s("div",{class:"instant-apps-filter-list__checkbox-container"},s("calcite-checkbox",{id:e.id.toString(),scale:"l",checked:null==e?void 0:e.active,onCalciteCheckboxChange:this.handleCheckboxChange.bind(this,t,e)}))):this.initInput(t,e)))}renderLayerBlock(){return this.filterLayerExpressions.map((t=>this.renderFilterBlocks(t)))}renderFilterBlocks(t){var i;const e=this.renderFilter(t),{operator:n}=t,a="OR"===(null==n?void 0:n.trim())?"orOperator":"andOperator",o=this.renderZoomTo(t);return s("calcite-block",{key:t.id,heading:t.title,description:null===(i=this.messages)||void 0===i?void 0:i[a],open:!!this.openFilters||void 0,collapsible:!0},o,e)}renderCombobox(t,i){var e;return s("label",{key:"combo-select",class:et},s("span",null,i.name),s("calcite-combobox",{id:i.id.toString(),onCalciteComboboxChange:this.handleComboSelect.bind(this,i,t),label:i.name,placeholder:i.placeholder,overlayPositioning:"fixed",selectionMode:"multiple",scale:"s","max-items":"6"},null===(e=i.fields)||void 0===e?void 0:e.map(((t,s)=>this.renderComboboxItem(i,t,s)))))}renderComboboxItem(t,i,e){var n,a;let o=i;"coded-value"===t.type?o=null===(n=t.codedValues)||void 0===n?void 0:n[i]:"number"===t.type&&"number"==typeof i&&null!=t.format&&(null!=t.format.places&&(o=this.roundNumber(i,t.format.places)),t.format.digitSeparator&&(o=this.numberWithCommas(o)));const l=null==t?void 0:t.selectedFields,r=null!==(a=null==l?void 0:l.includes(i))&&void 0!==a&&a;return s("calcite-combobox-item",{key:`${o}-${e}`,value:i,textLabel:`${o}`,selected:r})}initFilterConfig(){var t,i;if((null===(t=this.filterLayerExpressions)||void 0===t?void 0:t.length)>0){if(1===this.filterLayerExpressions.length){const{operator:t}=this.filterLayerExpressions[0],e="OR"===(null==t?void 0:t.trim())?"orOperator":"andOperator",n=this.renderZoomTo(this.filterLayerExpressions[0]);return s("calcite-block",{class:"instant-apps-filter-list__operator-description",heading:null===(i=this.messages)||void 0===i?void 0:i[e],open:!0},n,this.renderFilter(this.filterLayerExpressions[0]))}if(this.filterLayerExpressions.length>1)return this.renderLayerBlock()}}renderNumberSlider(t,i){var e,n,a,o,l,r,c,h;const d=null==i?void 0:i.min,p=null==i?void 0:i.max,u=(null==i?void 0:i.step)?i.step:1,v=null!==(e=null==i?void 0:i.field)&&void 0!==e?e:"",m=[null!=(null===(n=null==i?void 0:i.range)||void 0===n?void 0:n.min)?i.range.min:d,null!=(null===(a=null==i?void 0:i.range)||void 0===a?void 0:a.max)?i.range.max:p];return null!=d&&null!=p?s("label",{key:null==i?void 0:i.id.toString(),class:et},s("span",null,null==i?void 0:i.name),s("div",{class:"instant-apps-filter-list__number-input-container"},s("calcite-slider",{id:null==i?void 0:i.id.toString(),onCalciteSliderChange:this.handleSliderChange.bind(this,i,t),min:d,max:p,minValue:d,maxValue:p,"min-label":null===(l=null===(o=this.messages)||void 0===o?void 0:o.minSlider)||void 0===l?void 0:l.replace("{field}",v),"max-label":null===(c=null===(r=this.messages)||void 0===r?void 0:r.maxSlider)||void 0===c?void 0:c.replace("{field}",v),step:u,labelHandles:!0,snap:!0,value:m,"group-separator":null===(h=null==i?void 0:i.format)||void 0===h?void 0:h.digitSeparator}))):void 0}renderDatePicker(t,i){var e,n,a,o;const l=tt(i.min),r=tt(i.max),c=[null===(e=null==i?void 0:i.range)||void 0===e?void 0:e.min,null===(n=null==i?void 0:i.range)||void 0===n?void 0:n.max];return null!=l&&null!=r?s("label",{class:et},s("span",null,null==i?void 0:i.name),s("div",{class:"instant-apps-filter-list__date-picker-input-container"},s("calcite-input-date-picker",{id:null==i?void 0:i.id.toString(),onCalciteInputDatePickerChange:this.handleDatePickerRangeChange.bind(this,i,t),min:l,max:r,scale:"s",lang:null!==(a=this.locale)&&void 0!==a?a:"en","overlay-positioning":"fixed",layout:"vertical",value:c,range:!0}),s("calcite-action",{onClick:this.handleResetDatePicker.bind(this,i,t),icon:"reset",text:null===(o=this.messages)||void 0===o?void 0:o.resetDatePicker,scale:"s"}))):null}renderFooter(){var t;return s("div",{class:st,slot:"footer"},s("calcite-button",{appearance:"outline",width:"full",disabled:this.disabled,onClick:this.handleResetFilter.bind(this)},null===(t=this.messages)||void 0===t?void 0:t.resetFilter))}renderFullFooter(){var t,i,e;const n=null!=this.closeBtnText?this.closeBtnText:null===(t=this.messages)||void 0===t?void 0:t.close;return s("div",{class:st,slot:"footer"},s("calcite-button",{appearance:"outline",width:"half",disabled:this.disabled,onClick:this.handleResetFilter.bind(this)},null===(i=this.messages)||void 0===i?void 0:i.resetFilter),s("calcite-button",{appearance:"solid",width:"half",kind:"brand",onClick:null===(e=this.closeBtnOnClick)||void 0===e?void 0:e.bind(this)},n))}renderZoomTo(t){var i;return this.zoomBtn?s("div",{class:"instant-apps-filter-list__zoom-to"},s("calcite-button",{id:(null==t?void 0:t.sublayerId)?`zoom-to-${t.id}-${t.sublayerId}`:`zoom-to-${t.id}`,appearance:"transparent",kind:"neutral",scale:"s",iconStart:"magnifying-glass-plus",onClick:this.handleZoomTo.bind(this,t)},null===(i=this.messages)||void 0===i?void 0:i.zoomTo)):void 0}handleResetDatePicker(t,i){it(this.panelEl.querySelector(`[id='${t.id}']`)),t.active=!1,t.definitionExpression=void 0,t.range=void 0,this.generateOutput(i)}initInput(t,i){const{type:s}=i;return"string"===s||"coded-value"==s?this.renderCombobox(t,i):"number"===s||"range"==s?"drop-down"===(null==i?void 0:i.numDisplayOption)||"drop-down"===(null==i?void 0:i.displayOption)?this.renderCombobox(t,i):this.renderNumberSlider(t,i):"date"===s?"drop-down"===(null==i?void 0:i.displayOption)?this.renderCombobox(t,i):this.renderDatePicker(t,i):void 0}async initExpressions(){if(this.loading=!0,null==this.filterLayerExpressions)return;const t=this.filterLayerExpressions;for(let i=0;i<(null==t?void 0:t.length);i++){const s=t[i].expressions;for(let e=0;e<(null==s?void 0:s.length);e++)null==s[e].active&&null!=s[e].definitionExpression&&(s[e].active=!1),await this.setInitExpression(t[i],s[e])}this.loading=!1,this.filterLayerExpressions=[...t]}handleResetFilter(){var t;null===(t=this.filterLayerExpressions)||void 0===t||t.forEach((t=>{var i;null===(i=t.expressions)||void 0===i||i.forEach((t=>{const{type:i}=t;"string"===i||"coded-value"===i?this.resetCombobox(t):"date"===i?this.resetDatePicker(t):"number"===i||"range"===i?"drop-down"===(null==t?void 0:t.numDisplayOption)||"drop-down"===(null==t?void 0:t.displayOption)?this.resetCombobox(t):this.resetNumberRange(t):this.resetCheckbox(t),t.active=!1}))})),this.resetAllFilters(),this.generateURLParams(),this.filterListReset.emit()}resetCombobox(t){const{id:i}=t;t.selectedFields=void 0;const s=this.panelEl.querySelector(`[id='${i}']`);if(null!=s)for(let t=0;t<s.children.length;t++)s.children[t].selected=!1}resetDatePicker(t){const{id:i}=t;t.range=void 0,it(this.panelEl.querySelector(`[id='${i}']`))}resetNumberRange(t){t.range=void 0;const{id:i,max:s,min:e}=t,n=this.panelEl.querySelector(`[id='${i}']`);null!=n&&(n.minValue=e,n.maxValue=s)}resetCheckbox(t){const{id:i}=t,s=this.panelEl.querySelector(`[id='${i}']`);null!=s&&(s.checked=!1)}resetAllFilters(){var t,i,s,e,n;const a=null===(s=null===(i=null===(t=this.view)||void 0===t?void 0:t.map)||void 0===i?void 0:i.allLayers)||void 0===s?void 0:s.concat(null===(n=null===(e=this.view)||void 0===e?void 0:e.map)||void 0===n?void 0:n.allTables);null==a||a.forEach((t=>{var i,s;if(X.includes(t.type)){const e=t;"point-cloud"===e.type?e.filters=null===(i=this.initPointCloudFilters)||void 0===i?void 0:i[e.id]:"map-image"===e.type?e.allSublayers.forEach((t=>{var i,s;t.definitionExpression=null===(s=null===(i=this.initMapImageExpressions)||void 0===i?void 0:i[e.id])||void 0===s?void 0:s[t.id]})):e.definitionExpression=null===(s=this.initDefExpressions)||void 0===s?void 0:s[e.id]}}))}async updateStringExpression(t,i){const{field:s}=i,e=this.findFilterLayer(t);if(i.fields=await this.getFeatureAttributes(e,s),null==i?void 0:i.selectedFields){const t=i.selectedFields.map((t=>"number"==typeof t?t:`'${Q(t)}'`));return i.definitionExpression=`${s} IN (${t.join(",")})`,Promise.resolve(!0)}return Promise.resolve(!1)}async updateNumberExpression(t,i){var s,e;if(!(null==i?void 0:i.min)&&0!==(null==i?void 0:i.min)||!(null==i?void 0:i.max)&&0!==(null==i?void 0:i.max)){const n=this.findFilterLayer(t),{field:a}=i;if(null!=a)if(this.setExpressionFormat(n,i,a),"drop-down"===(null==i?void 0:i.numDisplayOption)||"drop-down"===(null==i?void 0:i.displayOption)){const t=await this.getFeatureAttributes(n,a);t.sort(((t,i)=>t-i)),i.fields=t}else{const t=await this.calculateMinMaxStatistics(n,a),o=null===(s=null==t?void 0:t[0])||void 0===s?void 0:s.attributes;if(null!=(null===(e=i.format)||void 0===e?void 0:e.places)?(i.min=this.roundMinNumberDown(o[`min${a}`],i.format.places),i.max=this.roundMaxNumberUp(o[`max${a}`],i.format.places)):(i.min=o[`min${a}`],i.max=o[`max${a}`]),(null==i?void 0:i.range)&&Object.keys(i.range).length){const{min:t,max:s}=i.range;return i.definitionExpression=`${i.field} BETWEEN ${t} AND ${s}`,!0}}}return!1}async updateDateExpression(t,i){var s;const{field:e,range:n}=i,a=this.findFilterLayer(t),o=await this.calculateMinMaxStatistics(a,e),l=null===(s=null==o?void 0:o[0])||void 0===s?void 0:s.attributes;if(i.min=tt(l[`min${e}`]),i.max=tt(l[`max${e}`]),null!=n&&(null!=(null==n?void 0:n.max)||null!=(null==n?void 0:n.min))){let{min:t,max:s}=n;if(t=null==t?void 0:t.replace("+"," "),s=null==s?void 0:s.replace("+"," "),t||s){const n=s&&!t?"<":!s&&t?">":null;return i.definitionExpression=n?`${e} ${n} '${null!=t?t:s}'`:`${e} BETWEEN '${t}' AND '${s}'`,!0}}return!1}updateCodedValueExpression(t,i){var s;const{field:e}=t,n=[];t.codedValues={};const a=null==i?void 0:i.domain;if(null===(s=null==a?void 0:a.codedValues)||void 0===s||s.forEach((i=>{const{code:s,name:e}=i;n.push(s),null!=t.codedValues&&(t.codedValues[s]=e)})),t.fields=n,null==t?void 0:t.selectedFields){const i=t.selectedFields.map((t=>"number"==typeof t?t:`'${Q(t)}'`)),s=`${e} IN (${i.join(",")})`;return t.definitionExpression=s,!0}return!1}updateRangeExpression(t,i){const{field:s,range:e}=t,n=null==i?void 0:i.domain;if(t.min=null==n?void 0:n.minValue,t.max=null==n?void 0:n.maxValue,e&&Object.keys(e).length){const{min:i,max:n}=e;return t.definitionExpression=`${s} BETWEEN ${i} AND ${n}`,!0}return!1}async getFeatureAttributes(t,i){var s,e,n;if(t&&X.includes(t.type)){const a=t.createQuery();if((null===(e=null===(s=null==t?void 0:t.capabilities)||void 0===s?void 0:s.query)||void 0===e?void 0:e.supportsCacheHint)&&(a.cacheHint=!0),i){const s=this.getInitDefExprFromLayer(t);if(a.where=s||"1=1",a.outFields=[i],a.orderByFields=[`${i} DESC`],a.returnDistinctValues=!0,a.returnGeometry=!1,a.maxRecordCountFactor=3,this.extentSelector&&this.extentSelectorConfig){const t=this.getExtent(this.extentSelector,this.extentSelectorConfig);null!=t&&(a.geometry=t),a.spatialRelationship="intersects"}return null===(n=await this.queryForFeatures(t,a,i))||void 0===n?void 0:n.sort()}}return[]}async queryForFeatures(t,i,s){const e=await t.queryFeatures(i),n=null==e?void 0:e.features.filter((t=>{var i;return null===(i=t.attributes)||void 0===i?void 0:i[s]}));return null==n?void 0:n.map((t=>{var i;return null===(i=t.attributes)||void 0===i?void 0:i[s]}))}async calculateMinMaxStatistics(t,i){var s,e;if(t&&X.includes(t.type)){const n=t.createQuery();let a=this.getInitDefExprFromLayer(t);if(n.where=a||"1=1",(null===(e=null===(s=null==t?void 0:t.capabilities)||void 0===s?void 0:s.query)||void 0===e?void 0:e.supportsCacheHint)&&(n.cacheHint=!0),i){if(n.outStatistics=[{onStatisticField:i,outStatisticFieldName:`max${i}`,statisticType:"max"},{onStatisticField:i,outStatisticFieldName:`min${i}`,statisticType:"min"}],this.extentSelector&&this.extentSelectorConfig){const t=this.getExtent(this.extentSelector,this.extentSelectorConfig);null!=t&&(n.geometry=t),n.spatialRelationship="intersects"}const s=await t.queryFeatures(n);return null==s?void 0:s.features}}return[]}getExtent(t,i){if(t&&i){const{constraints:t}=i;let s=Object.assign({},t);const e=null==s?void 0:s.geometry;if(e){const t=this.geometryJsonUtils.fromJSON(e);if(t&&("extent"===(null==t?void 0:t.type)||"polygon"===(null==t?void 0:t.type)))return t}}}setInitExpression(t,i){if(i.field&&i.type){const s=this.findFilterLayer(t);return null==s?Promise.resolve():("not-loaded"!==s.loadStatus&&"failed"!==s.loadStatus||s.load(),s.when((async()=>{var e,n;const a=null===(e=s.fields)||void 0===e?void 0:e.find((({name:t})=>t===i.field)),o=null===(n=null==a?void 0:a.domain)||void 0===n?void 0:n.type;i.type="coded-value"===o||"range"===o?o:i.type,await this.updateExpression(t,i,a)})))}return this.updateExpression(t,i,void 0),Promise.resolve()}async updateExpression(t,i,s){let e=!1;const{type:n}=i;"string"===n?e=await this.updateStringExpression(t,i):"number"===n?e=await this.updateNumberExpression(t,i):"date"===n?e="drop-down"===i.displayOption?await this.updateStringExpression(t,i):await this.updateDateExpression(t,i):"coded-value"===n?e=this.updateCodedValueExpression(i,s):"range"===n?e=this.updateRangeExpression(i,s):!i.active||"checkbox"!==n&&null!=n||(e=!0),e&&this.generateOutput(t)}updateRangeExpressions(t,i,s,e){const n=this.getInitDefExprFromLayerExpression(i);!e&&0!==e||!s&&0!==s||(e===(null==t?void 0:t.min)&&s===(null==t?void 0:t.max)?(t.definitionExpression=void 0,t.active=!1):(t.definitionExpression=n?`(${n}) AND ${null==t?void 0:t.field} BETWEEN ${e} AND ${s}`:`${null==t?void 0:t.field} BETWEEN ${e} AND ${s}`,t.active=!0)),t.range={min:e,max:s}}handleCheckboxChange(t,i,s){i.active=s.target.checked,this.generateOutput(t)}handleSliderChange(t,i,s){const{maxValue:e,minValue:n}=s.target;this.updateRangeExpressions(t,i,e,n),this.generateOutput(i)}handleComboSelect(t,i,s){const e=s.target.selectedItems,{field:n}=t;if(e&&e.length){const i=e.map((({value:t})=>"number"==typeof t?t:`'${Q(t)}'`));t.selectedFields=e.map((({value:t})=>t));const s=`${n} IN (${i.join(",")})`;t.definitionExpression=s,t.active=!0}else t.definitionExpression=void 0,t.active=!1;this.generateOutput(i)}handleDatePickerRangeChange(t,i,s){const e=s.target,[n,a]=e.valueAsDate,o=null!=n?tt(Math.floor(n.getTime()),!0):void 0,l=null!=a?tt(Math.floor(a.getTime()),!0):void 0;if(null!=o||null!=l){const s=l&&null==o?"<":null==l&&o?">":null;t.definitionExpression=s?`${t.field} ${s} '${null!=o?o:l}'`:`${t.field} BETWEEN '${o}' AND '${l}'`,t.range={min:o,max:l},t.active=!0,this.generateOutput(i)}}handleURLParams(){var t;if("URLSearchParams"in window){const i=null===(t=new URLSearchParams(document.location.search).get("filter"))||void 0===t?void 0:t.split(";");null==i||i.forEach((t=>{var i;const s=JSON.parse(t);null===(i=this.filterLayerExpressions)||void 0===i||i.forEach((t=>{var i;(null==s?void 0:s.layerId)===t.id&&(null===(i=t.expressions)||void 0===i||i.forEach((t=>{var i,e;(null===(i=t.id)||void 0===i?void 0:i.toString())===(null===(e=null==s?void 0:s.expressionId)||void 0===e?void 0:e.toString())&&(t.active=!0,"range"===s.type?t.range=s.range:"select"===s.type&&(t.selectedFields=s.selectedFields))})))}))}))}}createURLParamExpression(t,i){const{id:s,range:e,selectedFields:n,type:a}=i;return"number"===a||"range"===a||"date"===a?{type:"range",layerId:t.id,expressionId:s.toString(),range:e}:"string"===a||"coded-value"===a?{type:"select",layerId:t.id,expressionId:s.toString(),selectedFields:n}:{layerId:t.id,expressionId:s.toString()}}autoUpdateURLCheck(t){this.autoUpdateUrl&&(t.toString()?window.history.replaceState({},"",`${window.location.pathname}?${t} `):window.history.replaceState({},"",window.location.pathname))}generateURLParams(){var t;if("URLSearchParams"in window){const i=new URLSearchParams(window.location.search),s=[];null===(t=this.filterLayerExpressions)||void 0===t||t.forEach((t=>{var i;null===(i=null==t?void 0:t.expressions)||void 0===i||i.forEach((i=>{if(i.active){const e=this.createURLParamExpression(t,i);s.push(JSON.stringify(e))}}))})),s.length>0?i.set("filter",s.join(";")):i.delete("filter"),this.autoUpdateURLCheck(i),this.urlParams=i}}updateFilter(t,i,s){const{id:e}=t,n=this.view.map.findLayerById(e)||this.view.map.findTableById(e);if(null!=n)if("point-cloud"===n.type)this.updateFilterLayerPCLFilter(n,s);else if("map-image"===n.type){const s=n.findSublayerById(null==t?void 0:t.sublayerId);null!=s&&this.updateFilterLayerDefExpression(s,i,t)}else this.updateFilterLayerDefExpression(n,i,t)}updateFilterLayerDefExpression(t,i,s){const{operator:e}=s;let n=this.getInitDefExprFromLayer(t);const a=(null==i?void 0:i.length)>0&&null!=n?`(${i.join(e)}) AND (${n})`:i.length>0?i.join(e):n;t.definitionExpression=a}updateFilterLayerPCLFilter(t,i){t.filters=i}async handleWhenView(){if(null==this.view)return;const t=this.view.map;await t.loadAll(),this.handleLayerExpressionsUpdate()}async handleLayerExpressionsUpdate(){if(null==this.view)return;const t=this.view.map;this.initDefExpressions={},this.initPointCloudFilters={},this.initMapImageExpressions={};const i=t.allLayers.concat(t.allTables);for(let t=0;t<i.length;t++){const s=i.getItemAt(t);if(X.includes(s.type)){const t=s;"point-cloud"===t.type?this.initPointCloudFilters[t.id]=t.filters:"map-image"===t.type?(this.initMapImageExpressions[t.id]={},t.allSublayers.forEach((i=>{this.initMapImageExpressions[t.id][i.id]=i.definitionExpression}))):this.initDefExpressions[t.id]=t.definitionExpression}}this.initExpressions(),this.handleURLParams()}async handleZoomTo(t){const i=this.panelEl.querySelector((null==t?void 0:t.sublayerId)?`#zoom-to-${t.id}-${t.sublayerId}`:`#zoom-to-${t.id}`);null!=i&&(i.loading=!0,i.disabled=!0),this.zoomToGraphics=[];let s=0,e=!1;const n=setInterval((()=>{s>=1e3&&e&&(this.view.goTo(this.zoomToGraphics),null!=i&&(i.loading=!1,i.disabled=!1),clearInterval(n)),s+=500}),500);await this.getZoomToGraphics(t),e=!0}async getZoomToGraphics(t){var i,s,e,n,a;const o=this.view.allLayerViews.find((({layer:i})=>i.id===t.id)),l=o.layer,r="map-image"===l.type?l.findSublayerById(t.sublayerId):l;if("point-cloud"!==r.type&&X.includes(null==r?void 0:r.type)){const t=r.createQuery();if((null===(s=null===(i=null==l?void 0:l.capabilities)||void 0===i?void 0:i.query)||void 0===s?void 0:s.supportsCacheHint)&&(t.cacheHint=!0),t.where=null!==(e=r.definitionExpression)&&void 0!==e?e:"1=1",t.returnGeometry=!0,t.returnDistinctValues=!0,t.maxRecordCountFactor=3,t.returnExceededLimitFeatures=!0,t.outFields=[],this.extentSelector&&this.extentSelectorConfig){const i=this.getExtent(this.extentSelector,this.extentSelectorConfig);null!=i&&(t.geometry=i),t.spatialRelationship="intersects"}const c=null!=(null===(n=null==o?void 0:o.featureEffect)||void 0===n?void 0:n.filter)?o.featureEffect.filter:o.filter;null!=c&&(null!=c.objectIds&&(t.objectIds=c.objectIds),null!=c.distance&&(t.distance=c.distance),null!=c.geometry&&(t.geometry=c.geometry),null!=c.distance&&(t.distance=c.distance),null!=c.spatialRelationship&&(t.spatialRelationship=c.spatialRelationship),null!=c.units&&(t.units=c.units),null!=c.where&&(t.where=c.where),null!=c.timeExtent&&(t.timeExtent=c.timeExtent));try{const i=await r.queryFeatures(t);this.zoomToGraphics.push(...i.features)}catch(i){if(null===(a=null==i?void 0:i.message)||void 0===a?void 0:a.toLowerCase().includes("distinct"))try{t.returnDistinctValues=!1;const i=await r.queryFeatures(t);this.zoomToGraphics.push(...i.features)}catch(t){}}}return Promise.resolve()}generateOutput(t){if(null==this.view)return;const i=[];let s=[];if(t){for(const e of t.expressions){const{active:t,definitionExpression:n,pointCloudFilters:a}=e;t&&n&&i.push(`(${n})`),t&&null!=a&&a.length>0&&(s=s.concat(a))}this.updateFilter(t,i,s),this.generateURLParams(),this.filterUpdate.emit()}}numberWithCommas(t){return t.toLocaleString("en-US",{maximumFractionDigits:20})}roundMinNumberDown(t,i){if(null!=t){if((""+t).includes("e")){var s=(""+t).split("e"),e="";return+s[1]+i>0&&(e="+"),+(Math.floor(+s[0]+"e"+e+(+s[1]+i))+"e-"+i)}return+(Math.floor(t+"e+"+i)+"e-"+i)}}roundMaxNumberUp(t,i){if(null!=t){if((""+t).includes("e")){var s=(""+t).split("e"),e="";return+s[1]+i>0&&(e="+"),+(Math.ceil(+s[0]+"e"+e+(+s[1]+i))+"e-"+i)}return+(Math.ceil(t+"e+"+i)+"e-"+i)}}roundNumber(t,i){if(null!=t){if((""+t).includes("e")){var s=(""+t).split("e"),e="";return+s[1]+i>0&&(e="+"),+(Math.round(+s[0]+"e"+e+(+s[1]+i))+"e-"+i)}return+(Math.round(t+"e+"+i)+"e-"+i)}}setExpressionFormat(t,i,s){if(null!=(null==t?void 0:t.popupTemplate)){const e=t.popupTemplate.fieldInfos.find((({fieldName:t})=>t===s));i.format=null==e?void 0:e.format}}getInitDefExprFromLayer(t){var i,s,e;return"sublayer"===t.type?null===(s=null===(i=this.initMapImageExpressions)||void 0===i?void 0:i[t.layer.id])||void 0===s?void 0:s[t.id]:null===(e=this.initDefExpressions)||void 0===e?void 0:e[t.id]}getInitDefExprFromLayerExpression(t){var i,s,e;return null!=(null==t?void 0:t.sublayerId)?null===(s=null===(i=this.initMapImageExpressions)||void 0===i?void 0:i[t.id])||void 0===s?void 0:s[t.sublayerId]:null===(e=this.initDefExpressions)||void 0===e?void 0:e[t.id]}findFilterLayer(t){const i=this.view.map.allLayers.concat(this.view.map.allTables).find((({id:i})=>i===t.id));return"map-image"===i.type?null==i?void 0:i.findSublayerById(t.sublayerId):i}get el(){return n(this)}static get watchers(){return{view:["watchViewHandler"],layerExpressions:["watchLayerExpressions"]}}};nt.style=":host{display:block}.instant-apps-filter-list *{box-sizing:border-box}.instant-apps-filter-list__container{height:100%}.instant-apps-filter-list__container calcite-block:last-of-type{margin-bottom:0}.instant-apps-filter-list__footer{padding:12px;display:flex}.instant-apps-filter-list__footer calcite-button:nth-child(2){margin-left:6px}.instant-apps-filter-list__item-container,.instant-apps-filter-list__item-container--user-input{display:flex;justify-content:space-between;align-items:center}.instant-apps-filter-list__item-container:not(:last-child),.instant-apps-filter-list__item-container--user-input:not(:last-child){padding-bottom:20px}.instant-apps-filter-list__item-container--user-input{margin:0;display:flex;flex-direction:column;align-items:flex-start}.instant-apps-filter-list__item-container--user-input>span{margin:0 0 6px;font-size:14px;font-weight:normal}.instant-apps-filter-list__item-container--user-input calcite-combobox{width:100%}.instant-apps-filter-list__number-input-container{width:100%;display:flex;justify-content:center}.instant-apps-filter-list__number-input-container calcite-slider{width:90%}.instant-apps-filter-list__date-picker-input-container{display:flex;align-items:center;justify-content:unset;width:100%}.instant-apps-filter-list__date-picker-input-container calcite-action{height:48px;border-top:1px solid var(--calcite-color-border-input);border-right:1px solid var(--calcite-color-border-input);border-bottom:1px solid var(--calcite-color-border-input)}.instant-apps-filter-list__title{margin-right:20px}.instant-apps-filter-list__title>p{font-size:14px;font-weight:normal;margin:0}.instant-apps-filter-list__checkbox-container{display:flex}.instant-apps-filter-list__checkbox-container calcite-checkbox{height:18px}.instant-apps-filter-list__operator-description{margin:0;--calcite-font-size--1:12px}.instant-apps-filter-list__zoom-to{display:flex;justify-content:flex-end;margin:8px 0 20px}.instant-apps-filter-list__zoom-to calcite-action{width:-moz-min-content;width:min-content}@media (prefers-reduced-motion){.instant-apps-filter-list calcite-loader{--calcite-internal-duration-factor:2;--calcite-internal-animation-timing-slow:calc(300ms * 2)}}.instant-apps-filter-list.calcite-mode-dark .instant-apps-filter-list__header-container{background:#2b2b2b;color:#fff}.instant-apps-filter-list.calcite-mode-dark .instant-apps-filter-list__operator-description{background:#353535}";const at="instant-apps-social-share",ot={base:at,dialog:`${at}__dialog`,dialogEmbed:`${at}__dialog-embed`,dialogContent:`${at}__dialog-content`,options:`${at}__options`,tipContainer:`${at}__tip`,tipHeader:`${at}__tip-header`,tipContent:`${at}__tip-content`,icon:`${at}__icon`,iconContainer:`${at}__icon-container`,optionText:`${at}__option-text`,popoverButton:`${at}__popover-button`,layout:{vertical:`${at}__layout--vertical`,horizontal:`${at}__layout--horizontal`},success:{container:`${at}__success`,header:`${at}__success-header`,message:`${at}__success-message`,icon:`${at}__success-icon`},embed:{container:`${at}__embed`,header:`${at}__embed-header`,embedCode:{container:`${at}__embed-code`,textArea:`${at}__embed-code-text-area`,copyButton:`${at}__embed-code-copy-button`},textAreaText:`${at}__embed-text-area-text`,dimensions:{container:`${at}__embed-dimensions`,input:`${at}__embed-dimensions-input`}},rtl:{optionText:`${at}__option-text--rtl`,textArea:`${at}__text-area--rtl`}},lt={facebook:"https://www.facebook.com/sharer/sharer.php?u={url}",twitter:"https://twitter.com/intent/tweet?text={text}&url={url}",linkedIn:"https://www.linkedin.com/sharing/share-offsite/?url={url}"},rt=class{constructor(i){t(this,i),this.mode="popover",this.shareUrl=window.location.href,this.autoUpdateShareUrl=!0,this.shareText="",this.embed=!1,this.shareButtonColor="neutral",this.shareButtonType="button",this.shareButtonScale=void 0,this.iframeInnerText="",this.popoverButtonIconScale="m",this.view=void 0,this.displayTipText=!0,this.shortenShareUrl=!0,this.socialMedia=!0,this.shareIconsLayout="vertical",this.scale="m",this.successMessage="",this.defaultUrlParams=null,this.inlineSuccessPopoverPlacement="trailing",this.messages=void 0,this.opened=!1,this.copied=!1,this.inlineCopyLinkOpened=!1,this.inlineCopyEmbedOpened=!1,this.embedWidth=400,this.embedHeight=600}componentDidLoad(){var t,i;q(this),this.setupAutoCloseListeners(),"popover"===this.mode&&(this.opened&&(this.popoverRef.open=!0),this.popoverRef.addEventListener("calcitePopoverOpen",(()=>{this.shareListRef&&this.shareListRef.children[0].focus()})),this.popoverRef.addEventListener("keydown",this.handlePopoverRefKeyDown.bind(this))),this.embed&&(null===(t=this.embedWidthRef)||void 0===t||t.addEventListener("change",this.updateDimensions.bind(this,"width")),null===(i=this.embedHeightRef)||void 0===i||i.addEventListener("change",this.updateDimensions.bind(this,"height")))}disconnectedCallback(){var t,i,s;document.documentElement.removeEventListener("click",this.autoCloseCallback.bind(this)),"popover"===this.mode?null!=this.popoverRef&&(this.popoverRef.removeEventListener("click",this.stopPropagationCallback.bind(this)),this.popoverRef.removeEventListener("calcitePopoverClose",this.resetPopoverCopyState.bind(this)),this.popoverRef.removeEventListener("keydown",this.handlePopoverRefKeyDown.bind(this))):(null===(t=this.embedWidthRef)||void 0===t||t.removeEventListener("change",this.updateDimensions.bind(this)),null===(i=this.embedHeightRef)||void 0===i||i.removeEventListener("change",this.updateDimensions.bind(this)),null===(s=this.dialogContentRef)||void 0===s||s.removeEventListener("click",this.stopPropagationCallback.bind(this)))}setupAutoCloseListeners(){var t,i,s;document.documentElement.addEventListener("click",this.autoCloseCallback.bind(this)),"popover"===this.mode?(null===(t=this.popoverRef)||void 0===t||t.addEventListener("click",this.stopPropagationCallback.bind(this)),null===(i=this.popoverRef)||void 0===i||i.addEventListener("calcitePopoverClose",this.resetPopoverCopyState.bind(this))):null===(s=this.dialogContentRef)||void 0===s||s.addEventListener("click",this.stopPropagationCallback.bind(this))}handlePopoverRefKeyDown(t){var i,s;if("Tab"===t.code){if(!this.shareListRef)return;const s=t.target,e=this.shareListRef.children[0],n=this.shareListRef.children[(null===(i=this.shareListRef)||void 0===i?void 0:i.children.length)-1];t.shiftKey&&s===e?(t.preventDefault(),n.focus()):t.shiftKey||s!==n||(t.preventDefault(),e.focus())}else"Escape"===t.code&&(this.closePopover(),null===(s=this.popoverButtonRef)||void 0===s||s.setFocus())}autoCloseCallback(){"popover"===this.mode?(this.opened=!1,this.popoverRef.open=this.opened):(this.copyLinkPopoverRef&&(this.copyLinkPopoverRef.open=!1),this.inlineCopyLinkOpened=!1,this.copyEmbedPopoverRef&&(this.copyEmbedPopoverRef.open=!1),this.inlineCopyEmbedOpened=!1)}stopPropagationCallback(t){t.stopPropagation()}resetPopoverCopyState(){var t;null===(t=this.popoverButtonRef)||void 0===t||t.setFocus(),setTimeout((()=>{this.copied=!1}),200)}updateDimensions(t){var i,s;if("width"===t){const t=null===(i=this.embedWidthRef)||void 0===i?void 0:i.value;this.embedWidth=parseInt(t)}else{const t=null===(s=this.embedHeightRef)||void 0===s?void 0:s.value;this.embedHeight=parseInt(t)}}render(){var t,i,n,a,o,l;const r=this.copied&&"popover"===this.mode?this.renderSuccess():s("div",{class:ot.dialogContent},this.renderOptions(),this.displayTipText?this.renderTip():null,this.embed?this.renderEmbed():null),c=s("div",{ref:t=>this.dialogContentRef=t,class:`${ot.dialog}${"vertical"===this.shareIconsLayout?` ${ot.layout.vertical}`:` ${ot.layout.horizontal}`}`},r);return s(e,null,"popover"===this.mode?[s("calcite-popover",{ref:t=>this.popoverRef=t,label:null===(i=null===(t=this.messages)||void 0===t?void 0:t.share)||void 0===i?void 0:i.label,referenceElement:"shareButton",placement:"bottom-start",scale:this.scale},c),this.renderButton()]:[c,s("calcite-popover",{ref:t=>this.copyLinkPopoverRef=t,label:null===(a=null===(n=this.messages)||void 0===n?void 0:n.share)||void 0===a?void 0:a.label,referenceElement:"copyToClipboard",placement:this.inlineSuccessPopoverPlacement,scale:this.scale},this.renderSuccess()),s("calcite-popover",{ref:t=>this.copyEmbedPopoverRef=t,label:null===(l=null===(o=this.messages)||void 0===o?void 0:o.share)||void 0===l?void 0:l.label,referenceElement:"copyEmbedToClipboard",placement:this.inlineSuccessPopoverPlacement,scale:this.scale},this.renderEmbedSuccess())])}renderButton(){var t,i,e,n,a,o,l,r;const c=null!=this.shareButtonScale?this.shareButtonScale:this.scale;return"button"===this.shareButtonType?s("calcite-button",{ref:t=>this.popoverButtonRef=t,onClick:this.togglePopover.bind(this),id:"shareButton",class:ot.popoverButton,kind:this.shareButtonColor,appearance:"transparent",label:null===(i=null===(t=this.messages)||void 0===t?void 0:t.share)||void 0===i?void 0:i.label,title:null===(n=null===(e=this.messages)||void 0===e?void 0:e.share)||void 0===n?void 0:n.label,scale:c},s("div",{class:ot.iconContainer},s("calcite-icon",{icon:"share",scale:this.popoverButtonIconScale}))):s("calcite-action",{ref:t=>this.popoverButtonRef=t,onClick:this.togglePopover.bind(this),id:"shareButton",class:ot.popoverButton,appearance:"transparent",label:null===(o=null===(a=this.messages)||void 0===a?void 0:a.share)||void 0===o?void 0:o.label,title:null===(r=null===(l=this.messages)||void 0===l?void 0:l.share)||void 0===r?void 0:r.label,scale:c,text:""},s("div",{class:ot.iconContainer},s("calcite-icon",{icon:"share",scale:this.popoverButtonIconScale})))}renderSuccess(){var t;const i=null===(t=this.messages)||void 0===t?void 0:t.success;return s("div",{class:ot.success.container},s("span",{class:ot.success.header},s("span",{class:ot.success.icon},s("calcite-icon",{icon:"check-circle-f",scale:this.scale})),null==i?void 0:i.label),s("span",{class:ot.success.message},this.successMessage||(null==i?void 0:i.url)))}renderEmbedSuccess(){var t;const i=null===(t=this.messages)||void 0===t?void 0:t.success;return s("div",{class:ot.success.container},s("span",{class:ot.success.header},s("span",{class:ot.success.icon},s("calcite-icon",{icon:"check-circle-f",scale:this.scale})),null==i?void 0:i.label),s("span",{class:ot.success.message},null==i?void 0:i.embed))}renderOptions(){var t,i,e,n;const a=null===(t=this.messages)||void 0===t?void 0:t.options,o="rtl"===document.dir?` ${ot.rtl.optionText}`:"";return s("ul",{ref:t=>this.shareListRef=t,class:ot.options,role:"menu"},s("li",{id:"copyToClipboard",onClick:this.handleShareItem.bind(this,"link"),onKeyDown:this.handleOptionKeyDown("link"),role:"menuitem",tabindex:"0"},s("span",{class:ot.icon},s("calcite-icon",{icon:"link",scale:this.scale})),s("span",{class:`${ot.optionText}${o}`},null===(i=null==a?void 0:a.link)||void 0===i?void 0:i.label)),this.socialMedia?[s("li",{onClick:this.handleShareItem.bind(this,"facebook"),onKeyDown:this.handleOptionKeyDown("facebook"),role:"menuitem",tabindex:"0"},s("span",{class:ot.icon},this.renderFacebookIcon()),s("span",{class:`${ot.optionText}${o}`},null===(e=null==a?void 0:a.facebook)||void 0===e?void 0:e.label)),s("li",{onClick:this.handleShareItem.bind(this,"twitter"),onKeyDown:this.handleOptionKeyDown("twitter"),role:"menuitem",tabindex:"0"},s("span",{class:ot.icon},this.renderTwitterIcon()),s("span",{class:`${ot.optionText}${o}`},"Twitter")),s("li",{onClick:this.handleShareItem.bind(this,"linkedIn"),onKeyDown:this.handleOptionKeyDown("linkedIn"),role:"menuitem",tabindex:"0"},s("span",{class:ot.icon},this.renderLinkedInIcon()),s("span",{class:`${ot.optionText}${o}`},null===(n=null==a?void 0:a.linkedIn)||void 0===n?void 0:n.label))]:null)}handleOptionKeyDown(t){return i=>{const s=i.code;("Space"===s||"Enter"===s)&&this.handleShareItem(t)}}renderFacebookIcon(){return s("svg",{height:"100%",style:{fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"},version:"1.1",viewBox:"0 0 512 512",width:"100%",xmlns:"http://www.w3.org/2000/svg"},s("g",null,s("path",{d:"M512,256c0,-141.385 -114.615,-256 -256,-256c-141.385,0 -256,114.615 -256,256c0,127.777 93.616,233.685 216,252.89l0,-178.89l-65,0l0,-74l65,0l0,-56.4c0,-64.16 38.219,-99.6 96.695,-99.6c28.009,0 57.305,5 57.305,5l0,63l-32.281,0c-31.801,0 -41.719,19.733 -41.719,39.978l0,48.022l71,0l-11.35,74l-59.65,0l0,178.89c122.385,-19.205 216,-125.113 216,-252.89Z",style:{fill:"#1877f2",fillRule:"nonzero"}}),s("path",{d:"M355.65,330l11.35,-74l-71,0l0,-48.022c0,-20.245 9.917,-39.978 41.719,-39.978l32.281,0l0,-63c0,0 -29.297,-5 -57.305,-5c-58.476,0 -96.695,35.44 -96.695,99.6l0,56.4l-65,0l0,74l65,0l0,178.89c13.033,2.045 26.392,3.11 40,3.11c13.608,0 26.966,-1.065 40,-3.11l0,-178.89l59.65,0Z",style:{fill:"#fff",fillRule:"nonzero"}})))}renderTwitterIcon(){return s("svg",{height:"100%",style:{fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"},version:"1.1",viewBox:"0 0 512 512",width:"100%",xmlns:"http://www.w3.org/2000/svg"},s("rect",{height:"400",style:{fill:"none"},width:"400",x:"56",y:"56"}),s("path",{d:"M161.014,464.013c193.208,0 298.885,-160.071 298.885,-298.885c0,-4.546 0,-9.072 -0.307,-13.578c20.558,-14.871 38.305,-33.282 52.408,-54.374c-19.171,8.495 -39.51,14.065 -60.334,16.527c21.924,-13.124 38.343,-33.782 46.182,-58.102c-20.619,12.235 -43.18,20.859 -66.703,25.498c-19.862,-21.121 -47.602,-33.112 -76.593,-33.112c-57.682,0 -105.145,47.464 -105.145,105.144c0,8.002 0.914,15.979 2.722,23.773c-84.418,-4.231 -163.18,-44.161 -216.494,-109.752c-27.724,47.726 -13.379,109.576 32.522,140.226c-16.715,-0.495 -33.071,-5.005 -47.677,-13.148l0,1.331c0.014,49.814 35.447,93.111 84.275,102.974c-15.464,4.217 -31.693,4.833 -47.431,1.802c13.727,42.685 53.311,72.108 98.14,72.95c-37.19,29.227 -83.157,45.103 -130.458,45.056c-8.358,-0.016 -16.708,-0.522 -25.006,-1.516c48.034,30.825 103.94,47.18 161.014,47.104",style:{fill:"#1da1f2",fillRule:"nonzero"}}))}renderLinkedInIcon(){return s("svg",{height:"100%",style:{fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"},version:"1.1",viewBox:"0 0 512 512",width:"100%",xmlns:"http://www.w3.org/2000/svg"},s("g",{id:"g5891"},s("path",{d:"M512,64c0,-35.323 -28.677,-64 -64,-64l-384,0c-35.323,0 -64,28.677 -64,64l0,384c0,35.323 28.677,64 64,64l384,0c35.323,0 64,-28.677 64,-64l0,-384Z",id:"background",style:{fill:"#2867b2"}}),s("g",{id:"shapes"},s("rect",{height:"257.962",id:"rect11",style:{fill:"#fff"},width:"85.76",x:"61.053",y:"178.667"}),s("path",{d:"M104.512,54.28c-29.341,0 -48.512,19.29 -48.512,44.573c0,24.752 18.588,44.574 47.377,44.574l0.554,0c29.903,0 48.516,-19.822 48.516,-44.574c-0.555,-25.283 -18.611,-44.573 -47.935,-44.573Z",id:"path13-0",style:{fill:"#fff",fillRule:"nonzero"}}),s("path",{d:"M357.278,172.601c-45.49,0 -65.866,25.017 -77.276,42.589l0,-36.523l-85.738,0c1.137,24.197 0,257.961 0,257.961l85.737,0l0,-144.064c0,-7.711 0.554,-15.42 2.827,-20.931c6.188,-15.4 20.305,-31.352 43.993,-31.352c31.012,0 43.436,23.664 43.436,58.327l0,138.02l85.741,0l0,-147.93c0,-79.237 -42.305,-116.097 -98.72,-116.097Z",id:"path15",style:{fill:"#fff",fillRule:"nonzero"}}))))}renderTip(){var t;const i=null===(t=this.messages)||void 0===t?void 0:t.info;return s("div",{class:ot.tipContainer},s("span",{class:ot.tipHeader},s("calcite-icon",{icon:"lightbulb",scale:this.scale}),s("span",null,null==i?void 0:i.label)),s("p",{class:ot.tipContent},null==i?void 0:i.tooltip))}renderEmbed(){var t,i,e;const n=null===(t=this.messages)||void 0===t?void 0:t.embed,a="rtl"===document.dir?` ${ot.rtl.textArea}`:"";return s("div",{class:ot.embed.container},s("span",{class:ot.embed.header},s("calcite-icon",{icon:"code",scale:this.scale}),s("span",null,null===(e=null===(i=this.messages)||void 0===i?void 0:i.embed)||void 0===e?void 0:e.label)),s("div",{class:ot.embed.embedCode.container},s("div",{class:ot.embed.embedCode.textArea},s("textarea",{ref:t=>this.embedCodeRef=t,cols:30,rows:5,readonly:!0,class:a,value:this.getEmbedCode()}),s("button",{id:"copyEmbedToClipboard",onClick:this.copyEmbedCode.bind(this),class:ot.embed.embedCode.copyButton},s("calcite-icon",{icon:"copy",scale:this.scale}),s("span",null,null==n?void 0:n.copy))),s("span",{class:ot.embed.textAreaText},s("slot",{name:"text-area-text"})),s("div",{class:ot.embed.dimensions.container},s("label",{class:ot.embed.dimensions.input},s("span",null,null==n?void 0:n.width),s("input",{ref:t=>this.embedWidthRef=t,type:"number",onKeyDown:t=>["e","E","+","-"].includes(t.key)&&t.preventDefault(),onChange:this.handleNumberInputOnChange("width"),value:this.embedWidth,min:"1"})),s("label",{class:ot.embed.dimensions.input},s("span",null,null==n?void 0:n.height),s("input",{ref:t=>this.embedHeightRef=t,type:"number",onKeyDown:t=>["e","E","+","-"].includes(t.key)&&t.preventDefault(),onChange:this.handleNumberInputOnChange("height"),value:this.embedHeight,min:"1"})))))}handleNumberInputOnChange(t){const i="width"===t?this.embedWidthRef:this.embedHeightRef,s="width"===t?"embedWidth":"embedHeight";return()=>{i&&parseFloat(i.value)<=0&&(this[s]=parseInt("1"),i.value="1")}}togglePopover(t){t.stopPropagation(),this.opened=!this.opened,this.popoverRef.open=this.opened}closePopover(){this.opened=!1,this.popoverRef.open=this.opened}async handleShareItem(t){var i,s,e,n;this.shareUrl=await this.generateShareUrl();let a=null;const o=null!==(s=null===(i=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===i?void 0:i.includes("Chrome"))&&void 0!==s&&s,l=null!==(n=null===(e=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===e?void 0:e.includes("Safari"))&&void 0!==n&&n&&!o;!l&&this.shortenShareUrl&&(a=await this.shortenUrl(this.shareUrl));let r=a||this.shareUrl;switch(t){case"link":return navigator.clipboard.writeText(r),this.embed&&(this.copyEmbedPopoverRef.open=!1,this.inlineCopyEmbedOpened=!1),"inline"===this.mode&&(this.copyLinkPopoverRef.open=!0,setTimeout((()=>this.copyLinkPopoverRef.open=!1),3e3)),this.inlineCopyLinkOpened=!0,this.copied=!0,void("popover"===this.mode&&setTimeout((()=>this.closePopover()),2e3));case"facebook":case"twitter":case"linkedIn":let i;l&&(i=window.open("","_blank"),this.shortenShareUrl&&(r=await this.shortenUrl(this.shareUrl)||r));const s={url:encodeURI(r)},e="twitter"===t?Object.assign(Object.assign({},s),{text:this.shareText}):s,[n]=await K(["esri/intl"]),a=n.substitute(lt[t],e);return"popover"===this.mode&&this.closePopover(),void(l&&i?(i.location=a,i.focus()):window.open(encodeURI(a),"_blank"))}}async shortenUrl(t){var i,s;const[e]=await K(["esri/request"]),n=await e("https://arcg.is/prod/shorten",{query:{longUrl:t,f:"json"}}),a=null===(s=null===(i=null==n?void 0:n.data)||void 0===i?void 0:i.data)||void 0===s?void 0:s.url;if(a)return a.replace("http://","https://")}getEmbedCode(){return`<iframe src="${this.shareUrl}" width="${this.embedWidth}" height="${this.embedHeight}" frameborder="0" style="border:0" allowfullscreen>${this.iframeInnerText}</iframe>`}copyEmbedCode(){navigator.clipboard.writeText(this.getEmbedCode()),this.copyLinkPopoverRef.open=!1,this.inlineCopyLinkOpened=!1,this.copyEmbedPopoverRef.open=!0,setTimeout((()=>this.copyEmbedPopoverRef.open=!1),3e3),this.inlineCopyEmbedOpened=!0}async generateShareUrl(){var t;if(this.autoUpdateShareUrl&&(this.shareUrl=window.location.href),!this.view||!(null===(t=this.view)||void 0===t?void 0:t.ready))return this.shareUrl;const{x:i,y:s}=this.view.center,{spatialReference:e}=this.view,[n,a]=await K(["esri/geometry/Point","esri/geometry/SpatialReference"]),o=new n({x:i,y:s,spatialReference:new a(Object.assign({},e.toJSON()))}),l=await this.processPoint(o),{isWGS84:r,isWebMercator:c}=l.spatialReference;return this.generateShareUrlParams(l,r||c)}async processPoint(t){const{isWGS84:i,isWebMercator:s}=t.spatialReference;if(i||s)return t;const[e,n]=await K(["esri/geometry/SpatialReference","esri/geometry/projection"]),a=new e({wkid:4326});try{await n.load();const i=n.project(t,a);return Promise.resolve(i)}catch(t){return console.error("Failed to project point",t),Promise.reject(null)}}generateShareUrlParams(t,i){var s,e,n,a;const{longitude:o,latitude:l,x:r,y:c}=t;if(void 0===o||void 0===l)return this.shareUrl;const h=this.roundValue(i?o:r),d=this.roundValue(i?l:c),{zoom:p}=this.view,u=this.roundValue(p),v=null===(e=null===(s=this.view)||void 0===s?void 0:s.popup)||void 0===e?void 0:e.selectedFeature,m=null===(a=null===(n=this.view)||void 0===n?void 0:n.popup)||void 0===a?void 0:a.visible;let f,g;if(v&&m){const t=null==v?void 0:v.layer;f=t.id,g=v.attributes[t.objectIdField]}const b=this.view.map.allLayers.filter((t=>!t.visible)).toArray().map((t=>t.id)).toString().replaceAll(",",";"),{type:_}=this.view,{defaultUrlParams:x}=this,w=new URL(this.shareUrl),{searchParams:y}=w;if(y.get("center")&&y.delete("center"),y.get("level")&&y.delete("level"),y.get("selectedFeature")&&y.delete("selectedFeature"),y.get("hiddenLayers")&&y.delete("hiddenLayers"),y.get("viewpoint")&&y.delete("viewpoint"),"3d"===_){const{camera:t}=this.view,{heading:i,position:s,tilt:e}=t,{longitude:n,latitude:a,z:o}=s,l={longitude:this.roundValue(n,8),latitude:this.roundValue(a,8),z:this.roundValue(o,3),heading:this.roundValue(i,3),tilt:this.roundValue(e,3)};return!1!==(null==x?void 0:x.viewpoint)&&w.searchParams.set("viewpoint",`cam:${l.longitude},${l.latitude},${l.z};${l.heading},${l.tilt}`),f&&g&&!1!==(null==x?void 0:x.selectedFeature)&&w.searchParams.set("selectedFeature",`${f};${g}`),b&&!1!==(null==x?void 0:x.hiddenLayers)&&w.searchParams.set("hiddenLayers",b),w.search=decodeURIComponent(w.search),w.href}return!1!==(null==x?void 0:x.center)&&w.searchParams.set("center",`${h};${d}`),!1!==(null==x?void 0:x.level)&&w.searchParams.set("level",`${u}`),f&&g&&!1!==(null==x?void 0:x.selectedFeature)&&w.searchParams.set("selectedFeature",`${f};${g}`),b&&!1!==(null==x?void 0:x.hiddenLayers)&&w.searchParams.set("hiddenLayers",b),w.search=decodeURIComponent(w.search),w.href}roundValue(t,i=4){return parseFloat(t.toFixed(i))}get el(){return n(this)}};rt.style=":host{display:block;--instant-apps-social-share-width--s:200px;--instant-apps-social-share-width--m:280px;--instant-apps-social-share-width--l:320px;--instant-apps-social-share-width-horizontal--s:300px;--instant-apps-social-share-width-horizontal--m:380px;--instant-apps-social-share-width-horizontal--l:420px;--instant-apps-social-share-background-color:var(--calcite-color-foreground-1);--instant-apps-social-share-popover-button-background-color:transparent;--instant-apps-social-share-popover-button-icon-color:var(--calcite-ui-icon-color);--instant-apps-social-share-embed-border:1px solid $border;--instant-apps-social-share-embed-text-area-text:#468540}:host .instant-apps-social-share__popover-button{background-color:var(--instant-apps-social-share-popover-button-background-color)}:host .instant-apps-social-share__popover-button calcite-icon{color:var(--instant-apps-social-share-popover-button-icon-color)}:host .instant-apps-social-share__dialog,:host .instant-apps-social-share__dialog-embed{background-color:var(--instant-apps-social-share-background-color);border:var(--instant-apps-social-share-embed-border)}:host .instant-apps-social-share__dialog{box-sizing:border-box;height:auto;padding:10px 0;border-radius:5px}:host .instant-apps-social-share__options{margin:0;padding:1% 0 0 0;list-style-type:none}:host .instant-apps-social-share__options li{box-sizing:border-box;display:flex;align-items:center;width:100%;padding:5%;transition:background-color 0.15s ease-out 0s}:host .instant-apps-social-share__options li .instant-apps-social-share__icon,:host .instant-apps-social-share__options li .instant-apps-social-share__option-text{display:inline-block}:host .instant-apps-social-share__options li .instant-apps-social-share__icon{display:flex;align-items:center}:host .instant-apps-social-share__options li .instant-apps-social-share__option-text{width:85%;margin-left:10px;word-break:break-word}:host .instant-apps-social-share__options li .instant-apps-social-share__option-text--rtl{margin-left:0;margin-right:10px}:host .instant-apps-social-share__options li:hover{cursor:pointer;background-color:var(--calcite-color-foreground-2)}:host .instant-apps-social-share__tip{box-sizing:border-box;padding:0 5% 1% 5%}:host .instant-apps-social-share__tip-header{display:flex;align-items:center;color:#007ac2;margin:8px 0 5px 0}:host .instant-apps-social-share__tip-header calcite-icon{margin-right:5px}:host .instant-apps-social-share__tip-content{line-height:17px;margin:0;padding-top:2%}:host .instant-apps-social-share__success{display:flex;flex-direction:column;padding:15px}:host .instant-apps-social-share__success-header{display:flex;align-items:center;font-weight:bold;margin-bottom:10px}:host .instant-apps-social-share__success-icon{display:flex;align-items:center;margin-right:5px}:host .instant-apps-social-share__success-icon calcite-icon{color:var(--calcite-color-status-success)}:host .instant-apps-social-share__success-message{line-height:16px}:host .instant-apps-social-share__embed{box-sizing:border-box;width:100%;padding:5%;margin-bottom:10px;border-top:1px solid #d3d3d3}:host .instant-apps-social-share__embed-header{display:flex;align-items:center;margin-bottom:5px}:host .instant-apps-social-share__embed-header calcite-icon{margin-right:5px}:host .instant-apps-social-share__embed-code-text-area{border:1px solid #d3d3d3}:host .instant-apps-social-share__embed-code-text-area textarea{box-sizing:border-box;padding:4%;border:none;resize:none;background:transparent;width:100%;font-family:var(--calcite-sans-family);color:var(--calcite-color-text-1)}:host .instant-apps-social-share__embed-code-text-area button{display:flex;align-items:center;text-align:start;width:100%;border:none;border-top:1px solid #d3d3d3;background-color:transparent;line-height:16px;font-weight:400;padding:3%;color:var(--calcite-color-text-1)}:host .instant-apps-social-share__embed-code-text-area button calcite-icon{color:#007ac2;margin-right:3px}:host .instant-apps-social-share__embed-code-text-area button:hover{cursor:pointer;background-color:var(--calcite-color-foreground-2);transition:background-color 0.15s ease-out 0s}:host .instant-apps-social-share__embed-text-area-text{font-weight:600;color:var(--instant-apps-social-share-embed-text-area-text)}:host .instant-apps-social-share__embed .instant-apps-social-share__text-area--rtl{text-align:left}:host .instant-apps-social-share__embed-dimensions{display:flex;justify-content:space-between;margin-top:10px}:host .instant-apps-social-share__embed-dimensions-input{width:47%;box-sizing:border-box}:host .instant-apps-social-share__embed-dimensions-input input{border:1px solid #d3d3d3;width:100%;height:25px;font-family:var(--calcite-sans-family)}:host .instant-apps-social-share__layout--horizontal .instant-apps-social-share__options{display:flex;justify-content:space-around;margin-bottom:8%}:host .instant-apps-social-share__layout--horizontal .instant-apps-social-share__options li{flex-direction:column;padding:0}:host .instant-apps-social-share__layout--horizontal .instant-apps-social-share__options li .instant-apps-social-share__option-text{word-break:break-word;margin-left:0;margin-top:10px;text-align:center}:host .instant-apps-social-share__layout--horizontal .instant-apps-social-share__options li:hover{background-color:unset}:host .instant-apps-social-share__icon-container{display:flex;align-items:center}:host([scale=s]) .instant-apps-social-share__dialog{width:var(--instant-apps-social-share-width--s)}:host([scale=s]) .instant-apps-social-share__icon{width:16px;height:16px}:host([scale=s]) .instant-apps-social-share__option-text{font-size:var(--calcite-font-size--1)}:host([scale=s]) .instant-apps-social-share__dialog.instant-apps-social-share__layout--horizontal{width:var(--instant-apps-social-share-width-horizontal--s)}:host([scale=s]) .instant-apps-social-share__tip-header,:host([scale=s]) .instant-apps-social-share__tip-content,:host([scale=s]) .instant-apps-social-share__embed-header,:host([scale=s]) .instant-apps-social-share__embed-dimensions-input{font-size:var(--calcite-font-size--2)}:host([scale=m]) .instant-apps-social-share__dialog{width:var(--instant-apps-social-share-width--m)}:host([scale=m]) .instant-apps-social-share__icon{width:24px;height:24px}:host([scale=m]) .instant-apps-social-share__option-text{font-size:var(--calcite-font-size-0)}:host([scale=m]) .instant-apps-social-share__dialog.instant-apps-social-share__layout--horizontal{width:var(--instant-apps-social-share-width-horizontal--m)}:host([scale=m]) .instant-apps-social-share__tip-header,:host([scale=m]) .instant-apps-social-share__tip-content,:host([scale=m]) .instant-apps-social-share__embed-header,:host([scale=m]) .instant-apps-social-share__embed-dimensions-input{font-size:var(--calcite-font-size--1)}:host([scale=l]) .instant-apps-social-share__dialog{width:var(--instant-apps-social-share-width--l)}:host([scale=l]) .instant-apps-social-share__icon{width:32px;height:32px}:host([scale=l]) .instant-apps-social-share__option-text{font-size:var(--calcite-font-size-1)}:host([scale=l]) .instant-apps-social-share__dialog.instant-apps-social-share__layout--horizontal{width:var(--instant-apps-social-share-width-horizontal--l)}:host([scale=l]) .instant-apps-social-share__tip-header,:host([scale=l]) .instant-apps-social-share__tip-content,:host([scale=l]) .instant-apps-social-share__embed-header,:host([scale=l]) .instant-apps-social-share__embed-dimensions-input{font-size:var(--calcite-font-size-0)}";export{Z as calcite_input_date_picker,nt as instant_apps_filter_list,rt as instant_apps_social_share}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as t,h as i,H as s,g as e,c as a}from"./p-78780f63.js";import{l as h}from"./p-48ff9cea.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";const n=class{constructor(i){t(this,i),this.mapView=void 0,this.basemapConfig=void 0,this.basemapWidget=void 0}async mapViewWatchHandler(){await this.mapView.when((()=>{this._initBaseMapGallery(this.mapView)}))}async componentWillLoad(){return this._initModules()}render(){return i(s,null,i("div",{ref:t=>{this._basemapElement=t}}))}async componentDidLoad(){this.mapView&&await this.mapViewWatchHandler()}async _initModules(){const[t,i]=await h(["esri/widgets/BasemapGallery","esri/widgets/BasemapGallery/support/PortalBasemapsSource"]);this.BasemapGallery=t,this.PortalBasemapsSource=i}async _initBaseMapGallery(t){var i;if(this.BasemapGallery){this.basemapWidget&&this.basemapWidget.destroy();const s=new this.PortalBasemapsSource({query:(null===(i=this.basemapConfig)||void 0===i?void 0:i.basemapGroupId)?`id:${this.basemapConfig.basemapGroupId}`:null,filterFunction:this.basemapConfig?t=>!this.basemapConfig.basemapIdsToFilter.includes(t.portalItem.id):()=>!0});await s.refresh(),this.basemapWidget=new this.BasemapGallery({container:this._basemapElement,view:t,source:s})}}get el(){return e(this)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};n.style=":host{display:block}";const r=class{constructor(i){t(this,i),this.levelChanged=a(this,"levelChanged",7),this.enabled=void 0,this.floorFilterWidget=void 0,this.mapView=void 0}async mapViewWatchHandler(){await this.mapView.when((()=>{this._initFloorFilter(this.mapView)}))}async componentWillLoad(){return this._initModules()}render(){return i(s,null,i("div",{ref:t=>{this._floorFilterElement=t}}))}async _initModules(){const[t,i]=await h(["esri/widgets/FloorFilter","esri/core/reactiveUtils"]);this.FloorFilter=t,this.reactiveUtils=i}_initFloorFilter(t){var i;t&&this.enabled&&this.FloorFilter&&(null===(i=null==t?void 0:t.map)||void 0===i?void 0:i.floorInfo)&&(this.floorFilterWidget?this.floorFilterWidget.view=t:(this.floorFilterWidget=new this.FloorFilter({container:this._floorFilterElement,view:t}),this._levelHandle&&this._levelHandle.remove(),this._levelHandle=this.reactiveUtils.watch((()=>this.floorFilterWidget.level),(t=>{this.levelChanged.emit(t)}))))}get el(){return e(this)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};r.style=":host{display:block}";const o=class{constructor(i){t(this,i),this.fullscreenStateChange=a(this,"fullscreenStateChange",7),this.mapView=void 0,this.fullscreenWidget=void 0}async mapViewWatchHandler(){await this.mapView.when((async()=>{await this._initFullscreenWidget()}))}async componentWillLoad(){await this._initModules()}render(){return i(s,null,i("div",{class:"fullscreen-widget",ref:t=>{this._fullscreenElement=t}}))}async componentDidUpdate(){await this._initFullscreenWidget()}async componentDidLoad(){await this._initFullscreenWidget()}async _initModules(){const[t,i]=await h(["esri/widgets/Fullscreen","esri/core/reactiveUtils"]);this.Fullscreen=t,this.reactiveUtils=i}async _initFullscreenWidget(){this.mapView&&this._fullscreenElement&&!this.fullscreenWidget?(this.fullscreenWidget=new this.Fullscreen({view:this.mapView}),await this.fullscreenWidget.when((()=>{this._fullscreenStateChangeHandle&&this._fullscreenStateChangeHandle.remove(),this._fullscreenStateChangeHandle=this.reactiveUtils.watch((()=>this.fullscreenWidget.viewModel.state),(t=>this.fullscreenStateChange.emit(t)))}))):this.fullscreenWidget&&(this.fullscreenWidget.view=this.mapView)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};o.style=":host{display:block}";const c=class{constructor(i){t(this,i),this.mapView=void 0,this.legendWidget=void 0}async mapViewWatchHandler(){await this.mapView.when((()=>{this._initLegend(this.mapView)}))}async componentWillLoad(){return this._initModules()}render(){return i(s,null,i("div",{ref:t=>{this._legendElement=t}}))}async componentDidLoad(){this.mapView&&await this.mapViewWatchHandler()}async _initModules(){const[t]=await h(["esri/widgets/Legend"]);this.Legend=t}_initLegend(t){t&&this.Legend&&(this.legendWidget?this.legendWidget.view=t:this.legendWidget=new this.Legend({container:this._legendElement,view:t}))}get el(){return e(this)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};c.style=":host{display:block}";const l=class{constructor(i){t(this,i),this.mapView=void 0,this.popupEnabled=!1,this.resultGraphicEnabled=!1,this.searchConfiguration=void 0,this.searchTerm=void 0,this.searchWidget=void 0}async watchSearchConfigurationHandler(){this._initSearchWidget()}async mapViewWatchHandler(){await this.mapView.when((()=>{this._initSearchWidget()}))}async componentWillLoad(){await this._initModules()}async componentDidLoad(){return this._initSearchWidget()}render(){return i(s,null,i("div",{class:"search-widget",ref:t=>{this._searchElement=t}}))}async _initModules(){const[t,i]=await h(["esri/widgets/Search","esri/layers/FeatureLayer"]);this.Search=t,this.FeatureLayer=i}_initSearchWidget(){if(this.mapView&&this._searchElement&&!this.searchWidget){let t={view:this.mapView,container:this._searchElement,searchTerm:this.searchTerm};if(this.searchConfiguration){const i=this._getSearchConfig(this.searchConfiguration,this.mapView);t=Object.assign({},i)}this.searchWidget=new this.Search(t),this.searchWidget.popupEnabled=this.popupEnabled,this.searchWidget.resultGraphicEnabled=this.resultGraphicEnabled}else this.searchWidget&&(this.searchWidget.view=this.mapView)}_getSearchConfig(t,i){const s=t.sources;return(null==s?void 0:s.length)>0?(t.includeDefaultSources=!1,s.forEach((t=>{var s,e;if(t.hasOwnProperty("layer")){const a=t,h=null===(s=a.layer)||void 0===s?void 0:s.id,n=h?i.map.findLayerById(h):null,r=null===(e=null==a?void 0:a.layer)||void 0===e?void 0:e.url;n?a.layer=n:r&&(a.layer=new this.FeatureLayer(r))}})),null==s||s.forEach((t=>{if(t.hasOwnProperty("locator")){const i=t;"ArcGIS World Geocoding Service"===(null==i?void 0:i.name)&&(i.outFields=i.outFields||["Addr_type","Match_addr","StAddr","City"],i.singleLineFieldName="SingleLine"),i.url=i.url,delete i.url}}))):t=Object.assign(Object.assign({},t),{includeDefaultSources:!0}),t}static get watchers(){return{searchConfiguration:["watchSearchConfigurationHandler"],mapView:["mapViewWatchHandler"]}}};l.style=":host{display:block}.search-widget{width:100% !important;border:1px solid var(--calcite-color-border-input)}";export{n as basemap_gallery,r as floor_filter,o as map_fullscreen,c as map_legend,l as map_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{d as p}from"./p-5fd1eb64.js";import"./p-78780f63.js";import"./p-cfccae7c.js";import"./p-ca97465b.js";import"./p-fcefdfff.js";import"./p-29d68474.js";import"./p-0c97de08.js";import"./p-c92fff33.js";import"./p-1e2ffee3.js";import"./p-722ae773.js";import"./p-0c07ad8a.js";import"./p-f10944e6.js";import"./p-ede84883.js";import"./p-5b566d55.js";import"./p-414240b2.js";import"./p-2d1b8cfa.js";import"./p-475ad635.js";import"./p-79ba73cb.js";import"./p-653af7e0.js";var e={name:"bs",weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),weekStart:1,weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),ordinal:function(p){return p},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"}};p.locale(e,null,!0);export default e;
6
+ import{d as p}from"./p-f0d68a3f.js";import"./p-78780f63.js";import"./p-6604ac77.js";import"./p-83fd31d5.js";import"./p-fcefdfff.js";import"./p-29d68474.js";import"./p-0c97de08.js";import"./p-c92fff33.js";import"./p-1e2ffee3.js";import"./p-49fb1bfa.js";import"./p-0c07ad8a.js";import"./p-f10944e6.js";import"./p-de281b08.js";import"./p-5b566d55.js";import"./p-d9a59fcc.js";import"./p-c6b9a129.js";import"./p-475ad635.js";import"./p-981e9549.js";import"./p-653af7e0.js";var r={name:"bs",weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),weekStart:1,weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),ordinal:function(p){return p},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"}};p.locale(r,null,!0);export default r;
@@ -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{d as s}from"./p-5fd1eb64.js";import"./p-78780f63.js";import"./p-cfccae7c.js";import"./p-ca97465b.js";import"./p-fcefdfff.js";import"./p-29d68474.js";import"./p-0c97de08.js";import"./p-c92fff33.js";import"./p-1e2ffee3.js";import"./p-722ae773.js";import"./p-0c07ad8a.js";import"./p-f10944e6.js";import"./p-ede84883.js";import"./p-5b566d55.js";import"./p-414240b2.js";import"./p-2d1b8cfa.js";import"./p-475ad635.js";import"./p-79ba73cb.js";import"./p-653af7e0.js";var i="sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),m="sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),a=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,M=function(s,M){return a.test(M)?i[s.month()]:m[s.month()]};M.s=m,M.f=i;var d={name:"lt",weekdays:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),weekdaysShort:"sek_pir_ant_tre_ket_pen_šeš".split("_"),weekdaysMin:"s_p_a_t_k_pn_š".split("_"),months:M,monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),ordinal:function(s){return s+"."},weekStart:1,relativeTime:{future:"už %s",past:"prieš %s",s:"kelias sekundes",m:"minutę",mm:"%d minutes",h:"valandą",hh:"%d valandas",d:"dieną",dd:"%d dienas",M:"mėnesį",MM:"%d mėnesius",y:"metus",yy:"%d metus"},format:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"}};s.locale(d,null,!0);export default d;
6
+ import{d as s}from"./p-f0d68a3f.js";import"./p-78780f63.js";import"./p-6604ac77.js";import"./p-83fd31d5.js";import"./p-fcefdfff.js";import"./p-29d68474.js";import"./p-0c97de08.js";import"./p-c92fff33.js";import"./p-1e2ffee3.js";import"./p-49fb1bfa.js";import"./p-0c07ad8a.js";import"./p-f10944e6.js";import"./p-de281b08.js";import"./p-5b566d55.js";import"./p-d9a59fcc.js";import"./p-c6b9a129.js";import"./p-475ad635.js";import"./p-981e9549.js";import"./p-653af7e0.js";var i="sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),m="sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),a=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,d=function(s,d){return a.test(d)?i[s.month()]:m[s.month()]};d.s=m,d.f=i;var M={name:"lt",weekdays:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),weekdaysShort:"sek_pir_ant_tre_ket_pen_šeš".split("_"),weekdaysMin:"s_p_a_t_k_pn_š".split("_"),months:d,monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),ordinal:function(s){return s+"."},weekStart:1,relativeTime:{future:"už %s",past:"prieš %s",s:"kelias sekundes",m:"minutę",mm:"%d minutes",h:"valandą",hh:"%d valandas",d:"dieną",dd:"%d dienas",M:"mėnesį",MM:"%d mėnesius",y:"metus",yy:"%d metus"},format:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"}};s.locale(M,null,!0);export default M;
@@ -3,9 +3,9 @@
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 i,h as t,H as n,g as c}from"./p-78780f63.js";import{u as o,t as a}from"./p-ca97465b.js";import{c as s,d as r}from"./p-1be63b50.js";import{a as l,s as h,c as d}from"./p-f10944e6.js";import{u as p,c as v,d as m,s as u}from"./p-79ba73cb.js";import{c as b,u as g,d as f}from"./p-0c97de08.js";import{c as k,d as x}from"./p-ede84883.js";import{c as y}from"./p-5b566d55.js";import{i as z}from"./p-1e2ffee3.js";import{g as w}from"./p-0c07ad8a.js";import"./p-fcefdfff.js";import"./p-29d68474.js";import"./p-c92fff33.js";
6
+ import{r as e,c as i,h as t,H as n,g as c}from"./p-78780f63.js";import{u as o,t as a}from"./p-83fd31d5.js";import{c as s,d as r}from"./p-1be63b50.js";import{a as l,s as h,c as d}from"./p-f10944e6.js";import{u as p,c as v,d as m,s as u}from"./p-981e9549.js";import{c as g,u as b,d as f}from"./p-0c97de08.js";import{c as k,d as x}from"./p-de281b08.js";import{c as y}from"./p-5b566d55.js";import{i as z}from"./p-1e2ffee3.js";import{g as w}from"./p-0c07ad8a.js";import"./p-fcefdfff.js";import"./p-29d68474.js";import"./p-c92fff33.js";
7
7
  /*!
8
8
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
9
  * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
10
10
  * v2.0.0
11
- */const j=class{constructor(t){e(this,t),this.calciteChipClose=i(this,"calciteChipClose",6),this.calciteChipSelect=i(this,"calciteChipSelect",6),this.calciteInternalChipKeyEvent=i(this,"calciteInternalChipKeyEvent",6),this.mutationObserver=y("mutation",(()=>this.updateHasText())),this.close=()=>{this.calciteChipClose.emit(),this.selected=!1,this.closed=!0},this.closeButtonKeyDownHandler=e=>{z(e.key)&&(e.preventDefault(),this.close())},this.handleSlotImageChange=e=>{this.hasImage=o(e)},this.handleEmittingEvent=()=>{this.interactive&&this.calciteChipSelect.emit()},this.disabled=!1,this.appearance="solid",this.kind="neutral",this.closable=!1,this.icon=void 0,this.iconFlipRtl=!1,this.scale="m",this.label=void 0,this.value=void 0,this.closed=!1,this.selectionMode="none",this.selected=!1,this.messageOverrides=void 0,this.messages=void 0,this.interactive=!1,this.defaultMessages=void 0,this.effectiveLocale=void 0,this.hasText=!1,this.hasImage=!1}onMessagesChange(){}effectiveLocaleChange(){p(this,this.effectiveLocale)}connectedCallback(){var e;s(this),b(this),k(this),v(this),null===(e=this.mutationObserver)||void 0===e||e.observe(this.el,{childList:!0,subtree:!0})}componentDidLoad(){l(this)}componentDidRender(){g(this)}disconnectedCallback(){var e;r(this),f(this),x(this),m(this),null===(e=this.mutationObserver)||void 0===e||e.disconnect()}async componentWillLoad(){h(this),await u(this),this.updateHasText()}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.handleEmittingEvent(),e.preventDefault();break;case"ArrowRight":case"ArrowLeft":case"Home":case"End":this.calciteInternalChipKeyEvent.emit(e),e.preventDefault()}}clickHandler(){!this.interactive&&this.closable&&this.closeButtonEl.focus()}async setFocus(){var e,i;await d(this),!this.disabled&&this.interactive?null===(e=this.containerEl)||void 0===e||e.focus():!this.disabled&&this.closable&&(null===(i=this.closeButtonEl)||void 0===i||i.focus())}updateHasText(){this.hasText=this.el.textContent.trim().length>0}renderChipImage(){return t("div",{class:"image-container"},t("slot",{name:"image",onSlotchange:this.handleSlotImageChange}))}renderSelectionIcon(){return t("div",{class:{"select-icon":!0,"select-icon--active":"multiple"===this.selectionMode||this.selected}},t("calcite-icon",{icon:"multiple"===this.selectionMode&&this.selected?"check-circle-f":"multiple"===this.selectionMode?"circle":this.selected?"circle-f":void 0,scale:w(this.scale)}))}renderCloseButton(){return t("button",{"aria-label":this.messages.dismissLabel,class:"close",onClick:this.close,onKeyDown:this.closeButtonKeyDownHandler,tabIndex:this.disabled?-1:0,ref:e=>this.closeButtonEl=e},t("calcite-icon",{icon:"x",scale:w(this.scale)}))}renderIcon(){return t("calcite-icon",{class:"chip-icon",flipRtl:this.iconFlipRtl,icon:this.icon,scale:w(this.scale)})}render(){const e=this.disabled||!this.disabled&&!this.interactive,i="multiple"===this.selectionMode&&this.interactive?"checkbox":"none"!==this.selectionMode&&this.interactive?"radio":this.interactive?"button":void 0;return t(n,null,t("div",{"aria-checked":"none"!==this.selectionMode&&this.interactive?a(this.selected):void 0,"aria-disabled":e?a(this.disabled):void 0,"aria-label":this.label,class:{container:!0,"text--slotted":this.hasText,"image--slotted":this.hasImage,selectable:"none"!==this.selectionMode,multiple:"multiple"===this.selectionMode,closable:this.closable,"non-interactive":!this.interactive,"is-circle":!(this.closable||this.hasText||this.icon&&this.hasImage||"none"!==this.selectionMode&&(!this.selectionMode||"multiple"===this.selectionMode||this.selected))},onClick:this.handleEmittingEvent,role:i,tabIndex:e?-1:0,ref:e=>this.containerEl=e},"none"!==this.selectionMode&&this.renderSelectionIcon(),this.renderChipImage(),this.icon&&this.renderIcon(),t("span",{class:"title"},t("slot",null)),this.closable&&this.renderCloseButton()))}static get assetsDirs(){return["assets"]}get el(){return c(this)}static get watchers(){return{messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};j.style=":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){block-size:1.5rem;font-size:var(--calcite-font-size--2);--calcite-chip-spacing-s-internal:0.25rem;--calcite-chip-spacing-l-internal:0.5rem}:host([scale=s]) .close,:host([scale=s]) .select-icon--active{block-size:1rem;inline-size:1rem}:host([scale=s]) .image-container{block-size:1.25rem;inline-size:1.25rem}:host([scale=s]) .container.is-circle{block-size:1.5rem;inline-size:1.5rem}:host([scale=m]){block-size:2rem;font-size:var(--calcite-font-size--1);--calcite-chip-spacing-s-internal:0.375rem;--calcite-chip-spacing-l-internal:0.5rem}:host([scale=m]) .close,:host([scale=m]) .image-container,:host([scale=m]) .select-icon--active{block-size:1.5rem;inline-size:1.5rem}:host([scale=m]) .container.is-circle{block-size:2rem;inline-size:2rem}:host([scale=l]){block-size:2.75rem;font-size:var(--calcite-font-size-0);--calcite-chip-spacing-s-internal:0.5rem;--calcite-chip-spacing-l-internal:0.75rem}:host([scale=l]) .image-container,:host([scale=l]) .close,:host([scale=l]) .select-icon--active{block-size:2rem;inline-size:2rem}:host([scale=l]) .container.is-circle{block-size:2.75rem;inline-size:2.75rem}:host{display:inline-flex;cursor:default;border-radius:9999px}.container{box-sizing:border-box;display:inline-flex;block-size:100%;max-inline-size:100%;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-1);font-weight:var(--calcite-font-weight-medium);outline-color:transparent}.container:not(.is-circle){padding-inline:var(--calcite-chip-spacing-s-internal)}.container.selectable{cursor:pointer}.container:not(.non-interactive):focus{outline:2px solid var(--calcite-color-brand);outline-offset:calc(\n 2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}:host([scale=s]) .container.image--slotted{padding-inline-start:calc(0.125rem / 2)}:host([scale=s]) .container.is-circle{padding-inline:0}.container.text--slotted .title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:var(--calcite-chip-spacing-s-internal)}.container:not(.text--slotted) .title{display:none}.container:not(.image--slotted) .image-container{display:none}.container.closable{padding-inline-end:calc(var(--calcite-chip-spacing-l-internal) / 2)}.container:not(.is-circle).image--slotted{padding-inline-start:calc(var(--calcite-chip-spacing-l-internal) / 2)}.container:not(.is-circle).image--slotted .image-container{margin-inline-end:var(--calcite-chip-spacing-s-internal)}.container:not(.is-circle).image--slotted .image-container~.chip-icon{margin-inline-start:var(--calcite-chip-spacing-s-internal)}.container:not(.is-circle).selectable:not(.text--slotted) .chip-icon{margin-inline-end:var(--calcite-chip-spacing-s-internal)}.container:not(.is-circle):not(.selectable):not(.text--slotted) .chip-icon{margin-inline-start:var(--calcite-chip-spacing-s-internal)}.container:not(.is-circle):not(.text--slotted) .chip-icon{margin-inline-end:var(--calcite-chip-spacing-s-internal)}.container:not(.is-circle):not(.text-slotted).image--slotted .image-container{margin-inline-end:var(--calcite-chip-spacing-s-internal)}.container:not(.is-circle):not(.closable):not(.text--slotted).image--slotted.selectable .image-container{margin-inline-end:0}.container:not(.is-circle):not(.closable):not(.text--slotted).image--slotted.selectable .image-container~.chip-icon{margin-inline-start:calc(var(--calcite-chip-spacing-s-internal) * 2)}.chip-icon{position:relative;margin-block:0px;display:inline-flex;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);margin-inline:var(--calcite-chip-spacing-s-internal)}.image-container{display:inline-flex;overflow:hidden;align-items:center;justify-content:center;pointer-events:none}.close{margin:0px;cursor:pointer;align-items:center;border-style:none;background-color:transparent;color:var(--calcite-color-text-1);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;-webkit-appearance:none;display:flex;border-radius:50%;align-content:center;justify-content:center;--calcite-chip-transparent-hover:var(--calcite-color-transparent-hover);--calcite-chip-transparent-press:var(--calcite-color-transparent-press)}.close:hover{background-color:var(--calcite-chip-transparent-hover)}.close:focus{background-color:var(--calcite-chip-transparent-hover);outline:2px solid var(--calcite-color-brand);outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}.close:active{background-color:var(--calcite-chip-transparent-press)}.close calcite-icon{color:inherit}.select-icon{align-self:center;justify-content:center;align-items:center;display:flex;inset-block-start:-1px;position:relative;visibility:hidden;inline-size:0;opacity:0;transition:opacity 0.15s ease-in-out, inline-size 0.15s ease-in-out}.select-icon.select-icon--active{visibility:visible;opacity:0.5}.container:not(.is-circle).image--slotted .select-icon.select-icon--active{margin-inline-end:var(--calcite-chip-spacing-s-internal)}:host([selected]) .select-icon{opacity:1}.container:hover .select-icon--active{opacity:1}slot[name=image]::slotted(*){display:flex;block-size:100%;inline-size:100%;overflow:hidden;border-radius:50%}:host([kind=neutral]){background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-1)}:host([kind=neutral]) .container{border-color:transparent}:host([kind=neutral]) .close{color:var(--calcite-color-text-3)}:host([kind=neutral]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-color-text-3))}:host([kind=inverse]){background-color:var(--calcite-color-inverse);color:var(--calcite-color-text-inverse)}:host([kind=inverse]) .container{border-color:transparent}:host([kind=inverse]) .close{color:var(--calcite-color-text-inverse)}:host([kind=inverse]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-color-text-inverse))}:host([kind=brand]){background-color:var(--calcite-color-brand);color:var(--calcite-color-text-inverse)}:host([kind=brand]) .container{border-color:transparent}:host([kind=brand]) .close{color:var(--calcite-color-text-inverse)}:host([kind=brand]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-color-text-inverse))}:host([appearance=outline-fill]),:host([appearance=outline]){background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1)}:host([appearance=outline-fill]) .close,:host([appearance=outline]) .close{color:var(--calcite-color-text-3)}:host([appearance=outline-fill]) .chip-icon,:host([appearance=outline]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-color-text-3))}:host([appearance=outline-fill]){background-color:var(--calcite-color-foreground-1)}:host([appearance=outline]){background-color:transparent}:host([kind=neutral][appearance=outline-fill]) .container,:host([kind=neutral][appearance=outline]) .container{border-color:var(--calcite-color-border-1)}:host([kind=inverse][appearance=outline-fill]) .container,:host([kind=inverse][appearance=outline]) .container{border-color:var(--calcite-color-border-inverse)}:host([kind=brand][appearance=outline-fill]) .container,:host([kind=brand][appearance=outline]) .container{border-color:var(--calcite-color-brand)}:host([kind=brand][appearance=solid]) button,:host([kind=inverse][appearance=solid]) button{outline-color:var(--calcite-color-text-inverse)}:host([closed]){display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([hidden]){display:none}[hidden]{display:none}";export{j as calcite_chip}
11
+ */const j=class{constructor(t){e(this,t),this.calciteChipClose=i(this,"calciteChipClose",6),this.calciteChipSelect=i(this,"calciteChipSelect",6),this.calciteInternalChipKeyEvent=i(this,"calciteInternalChipKeyEvent",6),this.mutationObserver=y("mutation",(()=>this.updateHasText())),this.close=()=>{this.calciteChipClose.emit(),this.selected=!1,this.closed=!0},this.closeButtonKeyDownHandler=e=>{z(e.key)&&(e.preventDefault(),this.close())},this.handleSlotImageChange=e=>{this.hasImage=o(e)},this.handleEmittingEvent=()=>{this.interactive&&this.calciteChipSelect.emit()},this.disabled=!1,this.appearance="solid",this.kind="neutral",this.closable=!1,this.icon=void 0,this.iconFlipRtl=!1,this.scale="m",this.label=void 0,this.value=void 0,this.closed=!1,this.selectionMode="none",this.selected=!1,this.messageOverrides=void 0,this.messages=void 0,this.interactive=!1,this.defaultMessages=void 0,this.effectiveLocale=void 0,this.hasText=!1,this.hasImage=!1}onMessagesChange(){}effectiveLocaleChange(){p(this,this.effectiveLocale)}connectedCallback(){var e;s(this),g(this),k(this),v(this),null===(e=this.mutationObserver)||void 0===e||e.observe(this.el,{childList:!0,subtree:!0})}componentDidLoad(){l(this)}componentDidRender(){b(this)}disconnectedCallback(){var e;r(this),f(this),x(this),m(this),null===(e=this.mutationObserver)||void 0===e||e.disconnect()}async componentWillLoad(){h(this),await u(this),this.updateHasText()}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.handleEmittingEvent(),e.preventDefault();break;case"ArrowRight":case"ArrowLeft":case"Home":case"End":this.calciteInternalChipKeyEvent.emit(e),e.preventDefault()}}clickHandler(){!this.interactive&&this.closable&&this.closeButtonEl.focus()}async setFocus(){var e,i;await d(this),!this.disabled&&this.interactive?null===(e=this.containerEl)||void 0===e||e.focus():!this.disabled&&this.closable&&(null===(i=this.closeButtonEl)||void 0===i||i.focus())}updateHasText(){this.hasText=this.el.textContent.trim().length>0}renderChipImage(){return t("div",{class:"image-container"},t("slot",{name:"image",onSlotchange:this.handleSlotImageChange}))}renderSelectionIcon(){return t("div",{class:{"select-icon":!0,"select-icon--active":"multiple"===this.selectionMode||this.selected}},t("calcite-icon",{icon:"multiple"===this.selectionMode&&this.selected?"check-circle-f":"multiple"===this.selectionMode?"circle":this.selected?"circle-f":void 0,scale:w(this.scale)}))}renderCloseButton(){return t("button",{"aria-label":this.messages.dismissLabel,class:"close",onClick:this.close,onKeyDown:this.closeButtonKeyDownHandler,tabIndex:this.disabled?-1:0,ref:e=>this.closeButtonEl=e},t("calcite-icon",{icon:"x",scale:w(this.scale)}))}renderIcon(){return t("calcite-icon",{class:"chip-icon",flipRtl:this.iconFlipRtl,icon:this.icon,scale:w(this.scale)})}render(){const e=this.disabled||!this.disabled&&!this.interactive,i="multiple"===this.selectionMode&&this.interactive?"checkbox":"none"!==this.selectionMode&&this.interactive?"radio":this.interactive?"button":void 0;return t(n,null,t("div",{"aria-checked":"none"!==this.selectionMode&&this.interactive?a(this.selected):void 0,"aria-disabled":e?a(this.disabled):void 0,"aria-label":this.label,class:{container:!0,"text--slotted":this.hasText,"image--slotted":this.hasImage,selectable:"none"!==this.selectionMode,multiple:"multiple"===this.selectionMode,closable:this.closable,"non-interactive":!this.interactive,"is-circle":!(this.closable||this.hasText||this.icon&&this.hasImage||"none"!==this.selectionMode&&(!this.selectionMode||"multiple"===this.selectionMode||this.selected))},onClick:this.handleEmittingEvent,role:i,tabIndex:e?-1:0,ref:e=>this.containerEl=e},"none"!==this.selectionMode&&this.renderSelectionIcon(),this.renderChipImage(),this.icon&&this.renderIcon(),t("span",{class:"title"},t("slot",null)),this.closable&&this.renderCloseButton()))}static get assetsDirs(){return["assets"]}get el(){return c(this)}static get watchers(){return{messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};j.style=":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){block-size:1.5rem;font-size:var(--calcite-font-size--2);--calcite-chip-spacing-s-internal:0.25rem;--calcite-chip-spacing-l-internal:0.5rem}:host([scale=s]) .close,:host([scale=s]) .select-icon--active{block-size:1rem;inline-size:1rem}:host([scale=s]) .image-container{block-size:1.25rem;inline-size:1.25rem}:host([scale=s]) .container.is-circle{block-size:1.5rem;inline-size:1.5rem}:host([scale=m]){block-size:2rem;font-size:var(--calcite-font-size--1);--calcite-chip-spacing-s-internal:0.375rem;--calcite-chip-spacing-l-internal:0.5rem}:host([scale=m]) .close,:host([scale=m]) .image-container,:host([scale=m]) .select-icon--active{block-size:1.5rem;inline-size:1.5rem}:host([scale=m]) .container.is-circle{block-size:2rem;inline-size:2rem}:host([scale=l]){block-size:2.75rem;font-size:var(--calcite-font-size-0);--calcite-chip-spacing-s-internal:0.5rem;--calcite-chip-spacing-l-internal:0.75rem}:host([scale=l]) .image-container,:host([scale=l]) .close,:host([scale=l]) .select-icon--active{block-size:2rem;inline-size:2rem}:host([scale=l]) .container.is-circle{block-size:2.75rem;inline-size:2.75rem}:host{display:inline-flex;cursor:default;border-radius:9999px}.container{box-sizing:border-box;display:inline-flex;block-size:100%;max-inline-size:100%;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-1);font-weight:var(--calcite-font-weight-medium);outline-color:transparent}.container:not(.is-circle){padding-inline:var(--calcite-chip-spacing-s-internal)}.container.selectable{cursor:pointer}.container:not(.non-interactive):focus{outline:2px solid var(--calcite-color-brand);outline-offset:calc(\n 2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}:host([scale=s]) .container.image--slotted{padding-inline-start:calc(0.125rem / 2)}:host([scale=s]) .container.is-circle{padding-inline:0}.container.text--slotted .title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:var(--calcite-chip-spacing-s-internal)}.container:not(.text--slotted) .title{display:none}.container:not(.image--slotted) .image-container{display:none}.container.closable{padding-inline-end:calc(var(--calcite-chip-spacing-l-internal) / 2)}.container:not(.is-circle).image--slotted{padding-inline-start:calc(var(--calcite-chip-spacing-l-internal) / 2)}.container:not(.is-circle).image--slotted .image-container{margin-inline-end:var(--calcite-chip-spacing-s-internal)}.container:not(.is-circle).image--slotted .image-container~.chip-icon{margin-inline-start:var(--calcite-chip-spacing-s-internal)}.container:not(.is-circle).selectable:not(.text--slotted) .chip-icon{margin-inline-end:var(--calcite-chip-spacing-s-internal)}.container:not(.is-circle):not(.selectable):not(.text--slotted) .chip-icon{margin-inline-start:var(--calcite-chip-spacing-s-internal)}.container:not(.is-circle):not(.text--slotted) .chip-icon{margin-inline-end:var(--calcite-chip-spacing-s-internal)}.container:not(.is-circle):not(.text-slotted).image--slotted .image-container{margin-inline-end:var(--calcite-chip-spacing-s-internal)}.container:not(.is-circle):not(.closable):not(.text--slotted).image--slotted.selectable .image-container{margin-inline-end:0}.container:not(.is-circle):not(.closable):not(.text--slotted).image--slotted.selectable .image-container~.chip-icon{margin-inline-start:calc(var(--calcite-chip-spacing-s-internal) * 2)}.chip-icon{position:relative;margin-block:0px;display:inline-flex;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);margin-inline:var(--calcite-chip-spacing-s-internal)}.image-container{display:inline-flex;overflow:hidden;align-items:center;justify-content:center;pointer-events:none}.close{margin:0px;cursor:pointer;align-items:center;border-style:none;background-color:transparent;color:var(--calcite-color-text-1);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;-webkit-appearance:none;display:flex;border-radius:50%;align-content:center;justify-content:center;--calcite-chip-transparent-hover:var(--calcite-color-transparent-hover);--calcite-chip-transparent-press:var(--calcite-color-transparent-press)}.close:hover{background-color:var(--calcite-chip-transparent-hover)}.close:focus{background-color:var(--calcite-chip-transparent-hover);outline:2px solid var(--calcite-color-brand);outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}.close:active{background-color:var(--calcite-chip-transparent-press)}.close calcite-icon{color:inherit}.select-icon{align-self:center;justify-content:center;align-items:center;display:flex;inset-block-start:-1px;position:relative;visibility:hidden;inline-size:0;opacity:0;transition:opacity 0.15s ease-in-out, inline-size 0.15s ease-in-out}.select-icon.select-icon--active{visibility:visible;opacity:0.5}.container:not(.is-circle).image--slotted .select-icon.select-icon--active{margin-inline-end:var(--calcite-chip-spacing-s-internal)}:host([selected]) .select-icon{opacity:1}.container:hover .select-icon--active{opacity:1}slot[name=image]::slotted(*){display:flex;block-size:100%;inline-size:100%;overflow:hidden;border-radius:50%}:host([kind=neutral]){background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-1)}:host([kind=neutral]) .container{border-color:transparent}:host([kind=neutral]) .close{color:var(--calcite-color-text-3)}:host([kind=neutral]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-color-text-3))}:host([kind=inverse]){background-color:var(--calcite-color-inverse);color:var(--calcite-color-text-inverse)}:host([kind=inverse]) .container{border-color:transparent}:host([kind=inverse]) .close{color:var(--calcite-color-text-inverse)}:host([kind=inverse]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-color-text-inverse))}:host([kind=brand]){background-color:var(--calcite-color-brand);color:var(--calcite-color-text-inverse)}:host([kind=brand]) .container{border-color:transparent}:host([kind=brand]) .close{color:var(--calcite-color-text-inverse)}:host([kind=brand]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-color-text-inverse))}:host([appearance=outline-fill]),:host([appearance=outline]){background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1)}:host([appearance=outline-fill]) .close,:host([appearance=outline]) .close{color:var(--calcite-color-text-3)}:host([appearance=outline-fill]) .chip-icon,:host([appearance=outline]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-color-text-3))}:host([appearance=outline-fill]){background-color:var(--calcite-color-foreground-1)}:host([appearance=outline]){background-color:transparent}:host([kind=neutral][appearance=outline-fill]) .container,:host([kind=neutral][appearance=outline]) .container{border-color:var(--calcite-color-border-1)}:host([kind=inverse][appearance=outline-fill]) .container,:host([kind=inverse][appearance=outline]) .container{border-color:var(--calcite-color-border-inverse)}:host([kind=brand][appearance=outline-fill]) .container,:host([kind=brand][appearance=outline]) .container{border-color:var(--calcite-color-brand)}:host([kind=brand][appearance=solid]) button,:host([kind=inverse][appearance=solid]) button{outline-color:var(--calcite-color-text-inverse)}:host([closed]){display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([hidden]){display:none}[hidden]{display:none}";export{j as calcite_chip}
@@ -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{d as a}from"./p-5fd1eb64.js";import"./p-78780f63.js";import"./p-cfccae7c.js";import"./p-ca97465b.js";import"./p-fcefdfff.js";import"./p-29d68474.js";import"./p-0c97de08.js";import"./p-c92fff33.js";import"./p-1e2ffee3.js";import"./p-722ae773.js";import"./p-0c07ad8a.js";import"./p-f10944e6.js";import"./p-ede84883.js";import"./p-5b566d55.js";import"./p-414240b2.js";import"./p-2d1b8cfa.js";import"./p-475ad635.js";import"./p-79ba73cb.js";import"./p-653af7e0.js";var s="siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),p="siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),e=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/,_=function(a,_){return e.test(_)?s[a.month()]:p[a.month()]};_.s=p,_.f=s;var t={name:"hr",weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),months:_,monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},relativeTime:{future:"za %s",past:"prije %s",s:"sekunda",m:"minuta",mm:"%d minuta",h:"sat",hh:"%d sati",d:"dan",dd:"%d dana",M:"mjesec",MM:"%d mjeseci",y:"godina",yy:"%d godine"},ordinal:function(a){return a+"."}};a.locale(t,null,!0);export default t;
6
+ import{d as a}from"./p-f0d68a3f.js";import"./p-78780f63.js";import"./p-6604ac77.js";import"./p-83fd31d5.js";import"./p-fcefdfff.js";import"./p-29d68474.js";import"./p-0c97de08.js";import"./p-c92fff33.js";import"./p-1e2ffee3.js";import"./p-49fb1bfa.js";import"./p-0c07ad8a.js";import"./p-f10944e6.js";import"./p-de281b08.js";import"./p-5b566d55.js";import"./p-d9a59fcc.js";import"./p-c6b9a129.js";import"./p-475ad635.js";import"./p-981e9549.js";import"./p-653af7e0.js";var s="siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),p="siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),_=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/,t=function(a,t){return _.test(t)?s[a.month()]:p[a.month()]};t.s=p,t.f=s;var e={name:"hr",weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),months:t,monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},relativeTime:{future:"za %s",past:"prije %s",s:"sekunda",m:"minuta",mm:"%d minuta",h:"sat",hh:"%d sati",d:"dan",dd:"%d dana",M:"mjesec",MM:"%d mjeseci",y:"godina",yy:"%d godine"},ordinal:function(a){return a+"."}};a.locale(e,null,!0);export default e;
@@ -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{r as t,h as i,f as e,g as s,c as o,H as a,F as n}from"./p-78780f63.js";import{c as l,d as r}from"./p-1be63b50.js";import{a as c,i as h,s as d,u as p,n as b,d as u,y as m,t as v,e as g,g as f}from"./p-ca97465b.js";import{c as x,d as w}from"./p-ede84883.js";import{c as y}from"./p-475ad635.js";import{c as k,s as z,d as C,u as T}from"./p-79ba73cb.js";import{C as _}from"./p-29d68474.js";import{g as I}from"./p-fcefdfff.js";import{c as L}from"./p-5b566d55.js";import{c as H,d as j,u as A}from"./p-0c97de08.js";import{g as S}from"./p-0c07ad8a.js";import{s as W,a as D,c as E}from"./p-f10944e6.js";import{q as $,m as F,d as R,a as M,s as N,h as B,b as O,g as U,k as P,t as V,i as J,c as q,f as K,e as G,n as X,r as Y,j as Q,l as Z,o as tt,p as it,L as et}from"./p-026b1345.js";import{d as st,a as ot,c as at}from"./p-3f279568.js";import{C as nt,S as lt}from"./p-d32e6900.js";import{I as rt}from"./p-b3ebaa79.js";import{g as ct}from"./p-6b943f52.js";import{s as ht}from"./p-36eb8399.js";import{d as dt}from"./p-4af32c75.js";import{E as pt}from"./p-d89fff3a.js";import"./p-a230b270.js";import"./p-1e2ffee3.js";import"./p-c92fff33.js";import"./p-77b43a94.js";import"./p-993e8bd0.js";import"./p-a82f35c9.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-225c4ca4.js";import"./p-220ec0d1.js";
6
+ import{r as t,h as i,f as e,g as s,c as o,H as a,F as n}from"./p-78780f63.js";import{c as l,d as r}from"./p-1be63b50.js";import{a as c,i as h,s as d,u as p,n as b,d as u,y as m,t as v,e as g,g as f}from"./p-83fd31d5.js";import{c as x,d as w}from"./p-de281b08.js";import{c as y}from"./p-475ad635.js";import{c as k,s as z,d as C,u as T}from"./p-981e9549.js";import{C as _}from"./p-29d68474.js";import{g as I}from"./p-fcefdfff.js";import{c as L}from"./p-5b566d55.js";import{c as H,d as j,u as A}from"./p-0c97de08.js";import{g as S}from"./p-0c07ad8a.js";import{s as W,a as D,c as E}from"./p-f10944e6.js";import{q as $,m as F,d as R,a as M,s as N,h as B,b as O,g as U,k as P,t as V,i as J,c as q,f as K,e as G,n as X,r as Y,j as Q,l as Z,o as tt,p as it,L as et}from"./p-17668cb7.js";import{d as st,a as ot,c as at}from"./p-3f279568.js";import{C as nt,S as lt}from"./p-d32e6900.js";import{I as rt}from"./p-b3ebaa79.js";import{g as ct}from"./p-ab006ace.js";import{s as ht}from"./p-b1b768f7.js";import{d as dt}from"./p-c1cf3ebc.js";import{E as pt}from"./p-d89fff3a.js";import"./p-a230b270.js";import"./p-1e2ffee3.js";import"./p-c92fff33.js";import"./p-77b43a94.js";import"./p-993e8bd0.js";import"./p-a82f35c9.js";import"./p-48ff9cea.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-225c4ca4.js";import"./p-220ec0d1.js";
7
7
  /*!
8
8
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
9
  * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
@@ -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{r as t,h as e,H as i,g as n}from"./p-78780f63.js";import{s as r}from"./p-36eb8399.js";import"./p-d89fff3a.js";import{r as s,N as o,c as a,e as h,A as u,a as c}from"./p-220ec0d1.js";import"./p-a230b270.js";import{g as l}from"./p-6b943f52.js";import"./p-225c4ca4.js";import"./p-4af32c75.js";import"./p-e1a4994d.js";import"./p-d918ec36.js";
6
+ import{r as t,h as e,H as i,g as n}from"./p-78780f63.js";import{s as r}from"./p-b1b768f7.js";import"./p-d89fff3a.js";import{r as s,N as o,c as a,e as h,A as u,a as c}from"./p-220ec0d1.js";import"./p-a230b270.js";import{g as l}from"./p-ab006ace.js";import"./p-225c4ca4.js";import"./p-c1cf3ebc.js";import"./p-e1a4994d.js";import"./p-48ff9cea.js";import"./p-d918ec36.js";
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
9
9
 
@@ -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{j as n,k as t,l as e,m as r,o,e as i,p as u}from"./p-ca97465b.js";
6
+ import{j as n,k as t,l as e,m as r,o,e as i,p as u}from"./p-83fd31d5.js";
7
7
  /*!
8
8
  * focus-trap 7.5.4
9
9
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
@@ -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 i,c as t,h as s,H as e,g as a}from"./p-78780f63.js";import{l}from"./p-48ff9cea.js";import{g as h,h as n,e as o,f as r,i as d,j as c,k as p,l as g}from"./p-b5d1b979.js";import{c as b,e as u,f as v}from"./p-4af32c75.js";import{s as y}from"./p-8684a905.js";import{a as m,g as w}from"./p-6b943f52.js";import{d as f,a as S}from"./p-c9f87acb.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-225c4ca4.js";import"./p-d89fff3a.js";import"./p-a230b270.js";import"./p-220ec0d1.js";const _=class{constructor(s){i(this,s),this.selectionSetChange=t(this,"selectionSetChange",7),this._selectedIds=[],this._selectionLabel="",this._graphics=[],this._featuresCollection={},this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=void 0,this.enabledLayerIds=[],this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.geometries=[],this.isUpdate=!1,this.layerViews=[],this.mapView=void 0,this.noResultText=void 0,this.searchConfiguration=void 0,this.selectionSet=void 0,this.selectionLayerIds=[],this.selectLayerView=void 0,this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._numSelected=0,this._searchDistanceEnabled=!1,this._searchTerm=void 0,this._selectionLoading=!1,this._translations=void 0,this._useLayerFeaturesEnabled=!1}async watchGeometriesHandler(i,t){if(i!==t){const t=0===i.length;if(await this._clearResults(t,t),i.length>0)return this._highlightWithOIDsOrGeoms()}}async watchSearchConfigurationHandler(i,t){JSON.stringify(i)!==JSON.stringify(t)&&this._initSearchWidget()}async clearSelection(){return this._clearResults(!0,!0)}async getSelection(){return/\S+/gm.test(this._selectionLabel)||await this._updateLabel(),{id:this.isUpdate?this.selectionSet.id:Date.now(),searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools.distance,download:!0,unit:this._bufferTools.unit,label:this._selectionLabel,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,graphics:this._graphics,selectLayers:this.layerViews,skipGeomOIDs:this._skipGeomOIDs,searchDistanceEnabled:this._searchDistanceEnabled,workflowType:this._workflowType,useLayerFeaturesEnabled:this._useLayerFeaturesEnabled,sketchGraphic:this._sketchGraphic}}searchConfigurationChangeChanged(i){this.searchConfiguration=i.detail}async distanceChanged(i){await this._distanceChanged(i.detail)}async unitChanged(i){i.detail.newValue!==i.detail.oldValue&&(this._unit=i.detail.newValue,await this._updateLabel())}async componentWillLoad(){await this._getTranslations(),await this._initModules()}async componentDidLoad(){await this._init(),await this._searchWidget.when((()=>{var i;this._searchWidget.allPlaceholder=(null===(i=this.searchConfiguration)||void 0===i?void 0:i.allPlaceholder)&&"find address or place"!==this.searchConfiguration.allPlaceholder.toLowerCase()?this.searchConfiguration.allPlaceholder:this._translations.placeholder}))}render(){return s(e,null,this._getMapLayerPicker(),s("div",{class:"border-bottom"}),s("div",{class:"padding-top-sides-1"},s("div",{class:"search-widget",ref:i=>{this._searchElement=i}}),s("div",{class:"padding-top-1"},s("map-draw-tools",{active:!0,editGraphicsEnabled:!this._useLayerFeaturesEnabled,graphics:this._graphics,mapView:this.mapView,onSketchGraphicsChange:i=>this._sketchGraphicsChanged(i),pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,ref:i=>{this._drawTools=i}})),this._getBufferOptions(),this._getUseLayerFeaturesOptions(),this._getNumSelected()),s("div",{class:"border-bottom"}),this._getNameInput())}_getBufferOptions(){var i,t;const e=this._searchDistanceEnabled?"search-distance":"div-not-visible",a="number"==typeof(null===(i=this.selectionSet)||void 0===i?void 0:i.distance)?this.selectionSet.distance:this.defaultBufferDistance;return s("div",null,s("div",{class:"padding-top-1 display-flex"},s("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},s("div",{class:"tooltip-container"},this._translations.searchDistance,s("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"search-distance-icon",scale:"s"}))),s("calcite-popover",{closable:!0,label:"",referenceElement:"search-distance-icon"},s("span",{class:"tooltip-message"},this._translations.useSearchDistanceTootip)),s("calcite-switch",{checked:this._searchDistanceEnabled,onCalciteSwitchChange:()=>this._searchDistanceEnabled=!this._searchDistanceEnabled})),s("div",{class:e},s("buffer-tools",{disabled:!this._searchDistanceEnabled,distance:a,geometries:this.geometries,onBufferComplete:i=>this._bufferComplete(i),ref:i=>this._bufferTools=i,unit:(null===(t=this.selectionSet)||void 0===t?void 0:t.unit)||this.defaultBufferUnit})))}_getUseLayerFeaturesOptions(){const i=this._useLayerFeaturesEnabled?"div-visible":"div-not-visible";return s("div",null,s("div",{class:"padding-top-1 display-flex"},s("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},s("div",{class:"tooltip-container"},this._translations.useLayerFeatures,s("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"use-layer-features-icon",scale:"s"}))),s("calcite-popover",{closable:!0,label:"",referenceElement:"use-layer-features-icon"},s("span",{class:"tooltip-message"},this._translations.useLayerFeaturesTooltip)),s("calcite-switch",{checked:this._useLayerFeaturesEnabled,onCalciteSwitchChange:()=>{this._useLayerFeaturesEnabledChanged()}})),s("div",{class:i+" padding-top-1"},s("map-layer-picker",{enabledLayerIds:this.selectionLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},selectedIds:this.layerViews.map((i=>i.layer.id)),showTables:!1})))}_getNumSelected(){const i=m(this.el),t=i&&"en"===i?`${this._translations.selectionLoading}...`:this._translations.selectionLoading;return s("div",{class:"padding-top-1 padding-bottom-1",style:{"align-items":"end",display:"flex"}},this._selectionLoading?s("div",null,s("calcite-loader",{class:"info-blue",inline:!0,label:t,scale:"m",type:"indeterminate"})):s("calcite-icon",{class:"info-blue padding-end-1-2",icon:"feature-layer",scale:"s"}),s("calcite-input-message",{class:"info-blue",scale:"m"},this._selectionLoading?t:this.noResultText&&0===this._numSelected?this.noResultText:this._translations.selectedFeatures.replace("{{n}}",this._numSelected.toString())))}_getNameInput(){return s("div",{class:"padding-sides-1 padding-top-1 "+(this.customLabelEnabled?"":"display-none")},s("calcite-label",{class:"font-bold"},this._translations.listName,s("calcite-input",{onInput:()=>{this._selectionLabel=this._labelName.value},placeholder:this._translations.listNamePlaceholder,ref:i=>{this._labelName=i},value:this._selectionLabel||""})))}_getMapLayerPicker(){return s("div",{class:"display-flex padding-sides-1 padding-bottom-1"},s("calcite-label",{class:"font-bold width-full label-margin-0"},this._translations.inputLayer,s("map-layer-picker",{enabledLayerIds:this.enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>this._inputLayerSelectionChange(i),selectedIds:this.selectLayerView?[this.selectLayerView.layer.id]:this.selectionSet?[this.selectionSet.layerView.layer.id]:[],showTables:!1})))}async _initModules(){const[i,t,s,e,a]=await l(["esri/layers/GraphicsLayer","esri/Graphic","esri/widgets/Search","esri/geometry/geometryEngine","esri/layers/FeatureLayer"]);this.GraphicsLayer=i,this.Graphic=t,this.Search=s,this._geometryEngine=e,this.FeatureLayer=a}async _init(){this._initGraphicsLayer(),await this._initSelectionSet(),this._initSearchWidget()}async _initSelectionSet(){var i,t,s,e;this.selectionSet&&(this._searchTerm=null===(i=this.selectionSet.searchResult)||void 0===i?void 0:i.name,this._searchResult=this.selectionSet.searchResult,this._selectLayers=this.selectionSet.selectLayers,this._selectedIds=this.selectionSet.selectedIds,this._skipGeomOIDs=this.selectionSet.skipGeomOIDs,this._searchDistanceEnabled=this.selectionSet.searchDistanceEnabled,this._useLayerFeaturesEnabled=this.selectionSet.useLayerFeaturesEnabled,this._distance=this.selectionSet.searchDistanceEnabled?this.selectionSet.distance:0,this._unit=this.selectionSet.unit,this._workflowType=this.selectionSet.workflowType,this.selectLayerView=this.selectionSet.layerView,this._sketchGraphic=this.selectionSet.sketchGraphic,this.geometries=[...(null===(t=this.selectionSet)||void 0===t?void 0:t.geometries)||[]],this._graphics=this.geometries.map((i=>new this.Graphic({geometry:i,symbol:"point"===i.type?this.sketchPointSymbol:"polyline"===i.type?this.sketchLineSymbol:this.sketchPolygonSymbol}))),this._selectionLabel=null===(s=this.selectionSet)||void 0===s?void 0:s.label,this._useLayerFeaturesEnabled||null===(e=this._drawTools)||void 0===e||e.updateGraphics(),await h(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1))}_initSearchWidget(){if(this.mapView&&this._searchElement){const i=this._getSearchConfig(this.searchConfiguration,this.mapView),t=Object.assign({view:this.mapView,container:this._searchElement,searchTerm:this._searchTerm},i);this._searchWidget=new this.Search(t),this._searchWidget.popupEnabled=!1,this._searchWidget.resultGraphicEnabled=!1,this._searchWidget.on("search-clear",(()=>{const i=this._searchClearLabel();this._clearResults(!1,i)})),this._searchWidget.on("select-result",(i=>{var t,s;if(i.result){this._searchResult=i.result;const e=(null===(s=null===(t=i.source)||void 0===t?void 0:t.layer)||void 0===s?void 0:s.id)&&i.source.layer.id===this.selectLayerView.layer.id,a=e?[i.result.feature.getObjectId()]:void 0;this._workflowType=b.SEARCH,this._updateLabel();const l=[i.result.feature];this._updateSelection(l,e,a),this._drawTools.graphics=l,this._searchWidget.resultGraphic.visible=!1}else{const i=this._searchClearLabel();this._clearResults(!1,i)}}))}}_searchClearLabel(){var i;return(null===(i=this._searchResult)||void 0===i?void 0:i.name)&&this._labelName.value.indexOf(this._searchResult.name)>-1}_getSearchConfig(i,t){const s=null==i?void 0:i.sources;return(null==s?void 0:s.length)>0?(i.includeDefaultSources=!1,s.forEach((i=>{var s,e;if(i.hasOwnProperty("layer")){const a=i,l=null===(s=a.layer)||void 0===s?void 0:s.id,h=l?t.map.findLayerById(l):null,n=null===(e=null==a?void 0:a.layer)||void 0===e?void 0:e.url;h?a.layer=h:n&&(a.layer=new this.FeatureLayer(n))}})),null==s||s.forEach((i=>{if(i.hasOwnProperty("locator")){const t=i;"ArcGIS World Geocoding Service"===(null==t?void 0:t.name)&&(t.outFields=t.outFields||["Addr_type","Match_addr","StAddr","City"],t.singleLineFieldName="SingleLine"),t.url=t.url,delete t.url}}))):i=Object.assign(Object.assign({},i),{includeDefaultSources:!0}),i}_initGraphicsLayer(){const i=this._translations.bufferLayer,t=this.mapView.map.layers.findIndex((t=>t.title===i));if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else{this._bufferGraphicsLayer=new this.GraphicsLayer({title:i,listMode:"hide"}),y.managedLayers.push(i);const t=this.mapView.map.layers.findIndex((i=>i.title===this._translations.sketchLayer));t>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,t):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}async _sketchGraphicsChanged(i,t=!1){const s=i.detail.graphics;if(s.length>0&&s[0])if(t||(this._sketchGraphic=s[0]),this._workflowType=this._useLayerFeaturesEnabled?b.SELECT:b.SKETCH,this._workflowType===b.SKETCH&&this._drawTools.updateGraphics(),await this._updateLabel(),this._clearSearchWidget(),this._useLayerFeaturesEnabled&&!t){const i=Array.isArray(s)?s.map((i=>i.geometry)):this.geometries;await this._selectLayerFeatures(i[0])}else{const t=s.reduce(((i,t)=>{var s;return(null===(s=null==t?void 0:t.layer)||void 0===s?void 0:s.objectIdField)?i.push(t.attributes[t.layer.objectIdField]):t.getObjectId&&i.push(t.getObjectId()),i}),[]),e=i.detail.useOIDs&&t.length>0;this._updateSelection(s,e,t),e&&await this._highlightFeatures(t)}else await this._clearResults(!0,!0)}async _highlightWithOIDsOrGeoms(){var i;return(null===(i=this._skipGeomOIDs)||void 0===i?void 0:i.length)>0?(this._selectedIds=this._skipGeomOIDs,this._highlightFeatures(this._selectedIds)):this._geomQuery(this.geometries)}async _highlightFeatures(i){y.removeHandles(),i.length>0&&y.highlightHandles.push(await n(i,this.selectLayerView,this.mapView)),this._numSelected=i.length,this.selectionSetChange.emit(i.length)}async _selectFeatures(i){this._selectionLoading=!0,this._selectedIds=await o(i,this.selectLayerView.layer),this._selectionLoading=!1,this._drawTools.graphics=this._graphics,await this._highlightFeatures(this._selectedIds)}async _bufferComplete(i){this._bufferGeometry=Array.isArray(i.detail)?i.detail[0]:i.detail;let t=this._bufferTools.distance,s=0;if(this._bufferGeometry){const i=new this.Graphic({geometry:this._bufferGeometry,symbol:{type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}}});this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),await this._selectFeatures([this._bufferGeometry]),await this.mapView.goTo(i.geometry.extent),s=t,t=0}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),await this._highlightWithOIDsOrGeoms();await this._distanceChanged({oldValue:t,newValue:s})}_geomQuery(i){const t=r(i,this._geometryEngine);return this._selectFeatures(t)}async _clearResults(i=!0,t=!1){var s;this._selectedIds=[],this._distance=void 0,this._unit=void 0,t&&(this._selectionLabel="",this._labelName.value=""),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),i&&this._searchWidget&&this._clearSearchWidget(),y.removeHandles(),(null===(s=this._drawTools)||void 0===s?void 0:s.clear)&&(this._graphics=[],await this._drawTools.clear()),this.selectionSetChange.emit(this._selectedIds.length)}_clearSearchWidget(){this._searchWidget.clear(),this._searchResult=void 0}_updateSelection(i,t,s){this._selectedIds=t&&s?s:this._selectedIds,this._skipGeomOIDs=t?s:void 0,this.geometries=Array.isArray(i)?i.map((i=>i.geometry)):this.geometries,this._graphics=i}async _updateLabel(){var i,t;const s=this._selectionLabel.indexOf(this._translations.sketch)>-1,e=this._selectionLabel.indexOf(this._translations.select)>-1,a=this._selectionLabel.indexOf(null===(i=this._searchResult)||void 0===i?void 0:i.name)>-1,l=this._workflowType===b.SEARCH?null===(t=this._searchResult)||void 0===t?void 0:t.name:this._workflowType===b.SELECT?this._translations.select:this._translations.sketch,h=this._unit?this._unit:this._bufferTools.unit,n=await this._bufferTools.getTranslatedUnit(h),o=isNaN(this._distance)?this._bufferTools.distance:this._distance;this._selectionLabel=s||e||a||!this._selectionLabel?`${l} ${o} ${n}`:this._selectionLabel,this._labelName.value=this._selectionLabel}async _layerSelectionChange(i){if(Array.isArray(i.detail)&&i.detail.length>0){const t=i.detail.map((i=>d(this.mapView,i)));return Promise.all(t).then((i=>{this.layerViews=i,this._featuresCollection={},this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}))}}async _inputLayerSelectionChange(i){var t;const s=(null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.length)>0?i.detail[0]:"";this.selectLayerView&&s===this.selectLayerView.layer.id||(this.selectLayerView=await d(this.mapView,s),await this._updateLabel(),this._bufferGeometry?await this._selectFeatures([this._bufferGeometry]):await this._highlightWithOIDsOrGeoms())}async _distanceChanged(i){i.newValue!==i.oldValue&&(this._distance=i.newValue,await this._updateLabel())}async _selectLayerFeatures(i){this._selectionLoading=!0;const t=this.layerViews.map((t=>(this._featuresCollection[t.layer.id]=[],c(0,t.layer,i,this._featuresCollection))));return Promise.all(t).then((async i=>{this._selectionLoading=!1;let t=[];i.forEach((i=>{Object.keys(i).forEach((s=>{t=t.concat(i[s])}))}));let s=!1;t.forEach((i=>{var t;const e=i.geometry;i.symbol="point"===e.type?this.sketchPointSymbol:"polyline"===e.type?this.sketchLineSymbol:"polygon"===e.type?this.sketchPolygonSymbol:void 0,s=(null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.hasOwnProperty("objectIdField"))||i.hasOwnProperty("getObjectId")}));const e=this.layerViews[0].layer.title===this.selectLayerView.layer.title&&s;await this._sketchGraphicsChanged({detail:{graphics:t,useOIDs:e}},!0)}))}_useLayerFeaturesEnabledChanged(){this._useLayerFeaturesEnabled=!this._useLayerFeaturesEnabled,this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}async _getTranslations(){const i=await w(this.el);this._translations=i[0]}get el(){return a(this)}static get watchers(){return{geometries:["watchGeometriesHandler"],searchConfiguration:["watchSearchConfigurationHandler"]}}};_.style=':host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.padding-top-1{padding-top:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-color-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:"1rem" !important}.end-border{border-inline-end:1px solid var(--calcite-color-border-2)}.search-distance{display:flex;padding-top:1rem}.font-bold{font:bold}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.tooltip-container{display:flex}.padding-start-1-2{padding-inline-start:0.5rem}.icon{--calcite-color-icon-color:var(--calcite-color-brand)}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2)}';const L=Object.freeze({__proto__:null,default:[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}]}),P=class{constructor(t){i(this,t),this.defaultNumLabelsPerPage=void 0,this.disabled=!1,this._translations=void 0}async downloadCSV(i,t,s,e=!0){return f(i,t,!0,s,e)}async downloadPDF(i,t,s=!1,e="",a=""){var l;return S(i,t,null===(l=this._labelInfoElement.selectedOption)||void 0===l?void 0:l.value,s,e,a)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){return s(e,null,s("calcite-select",{disabled:this.disabled,label:"",ref:i=>{this._labelInfoElement=i}}))}componentDidLoad(){this._renderOptions()}async _initModules(){const[i]=await l(["esri/intl"]);this._intl=i}_getLabelSizeText(i){const t="&lrm;"+i.descriptionPDF.labelWidthDisplay+" x "+i.descriptionPDF.labelHeightDisplay+"&rlm;";return this._translations.pdfLabel.replace("{{n}}",i.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",t)}async _getTranslations(){const i=await w(this.el);this._translations=i[0]}_renderOptions(){(L.default||L).sort(((i,t)=>{const s=parseInt(i.descriptionPDF.labelsPerPageDisplay,10),e=parseInt(t.descriptionPDF.labelsPerPageDisplay,10);return s<e?-1:s>e?1:0})).forEach(((i,t)=>{const s=document.createElement("calcite-option");s.value=i,s.innerHTML=this._getLabelSizeText(i),this._labelInfoElement.appendChild(s),(this.defaultNumLabelsPerPage?parseInt(i.descriptionPDF.labelsPerPageDisplay,10)===this.defaultNumLabelsPerPage:0===t)&&(s.selected=!0,this._labelInfoElement.selectedOption=s)}))}get el(){return a(this)}};P.style=":host{display:block}";const x=class{constructor(s){i(this,s),this.selectionLoadingChange=t(this,"selectionLoadingChange",7),this.selectionSetsChanged=t(this,"selectionSetsChanged",7),this._addEnabled=!0,this._refineSets=[],this._enabledLayerIds=[],this._featuresCollection={},this.addresseeLayer=void 0,this.enabledLayerIds=[],this.mapView=void 0,this.selectionSets=[],this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._translations=void 0,this._selectionMode=u.ADD,this._refineLayer=void 0}async componentWillLoad(){await this._getTranslations(),this._enabledLayerIds=this._getEnabledLayerIds(),await this._setRefineSet(this._enabledLayerIds[0])}render(){var i,t;return s(e,null,s("div",{class:(this._enabledLayerIds.length>1?"display-block":"display-none")+" padding-top-sides-1"},s("div",{class:"display-flex"},s("calcite-label",{class:"font-bold width-full label-margin-0"},s("div",{class:"display-flex"},this._translations.inputLayer,s("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"refine-input-layer",scale:"s"})),s("map-layer-picker",{enabledLayerIds:this._enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},ref:i=>{this._layerPicker=i},selectedIds:[this._refineLayer.layer.id],showTables:!1})),s("calcite-popover",{closable:!0,label:"",referenceElement:"refine-input-layer"},s("span",{class:"tooltip-message"},this._translations.inputLayerTip)))),s("div",{class:"padding-1"},s("div",{class:"padding-bottom-1"},s("calcite-segmented-control",{class:"w-100"},s("calcite-segmented-control-item",{checked:this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(u.ADD),value:u.ADD},s("span",{class:"font-weight-500"},this._translations.add)),s("calcite-segmented-control-item",{checked:!this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(u.REMOVE),value:u.REMOVE},s("span",{class:"font-weight-500"},this._translations.remove)))),s("div",null,s("map-draw-tools",{active:!0,drawMode:v.REFINE,mapView:this.mapView,onDrawRedo:()=>this._redo(),onDrawUndo:()=>this._undo(),onSketchGraphicsChange:i=>this._sketchGraphicsChanged(i),pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,redoEnabled:(null===(i=this._refineSelectionSet)||void 0===i?void 0:i.redoStack.length)>0,ref:i=>{this._drawTools=i},undoEnabled:(null===(t=this._refineSelectionSet)||void 0===t?void 0:t.undoStack.length)>0})),s("br",null),s("calcite-list",{class:"list-border"},this._getRefineSelectionSetList())))}_layerSelectionChange(i){this._setRefineSet(i.detail[0])}_setSelectionMode(i){this._selectionMode=i}_sketchGraphicsChanged(i){var t;const s=null===(t=i.detail)||void 0===t?void 0:t.graphics[0].geometry;this._selectFeatures(s)}_getEnabledLayerIds(){return this.selectionSets.reduce(((i,t)=>{var s;const e=null===(s=null==t?void 0:t.layerView)||void 0===s?void 0:s.layer.id;return e&&i.indexOf(e)<0?i.push(e):t.workflowType===b.REFINE&&Object.keys(t.refineInfos).forEach((t=>{i.indexOf(t)<0&&i.push(t)})),i}),[])}async _setRefineSet(i){this.selectionSets.some((t=>{if(t.workflowType===b.REFINE)return this._refineSelectionSet=t,Object.keys(t.refineInfos).indexOf(i)>-1}))||await this._initRefineSet(i,this._refineSelectionSet),this._refineLayer=this._refineSelectionSet.refineInfos[i].layerView}async _initRefineSet(i,t){const s={};s[i]={addIds:[],removeIds:[],layerView:await d(this.mapView,i)},t?t.refineInfos=Object.assign(Object.assign({},t.refineInfos),s):(this._refineSelectionSet={id:Date.now(),searchResult:void 0,buffer:void 0,distance:0,download:!0,unit:"feet",label:"Refine",selectedIds:[],layerView:void 0,geometries:[],graphics:[],selectLayers:[],workflowType:b.REFINE,searchDistanceEnabled:!1,useLayerFeaturesEnabled:!1,refineInfos:s,redoStack:[],undoStack:[],sketchGraphic:void 0},this.selectionSets.push(this._refineSelectionSet))}_undo(){const i=this._refineSelectionSet.undoStack.pop();this._updateIds(i.ids,i.mode===u.ADD?u.REMOVE:u.ADD,this._refineSelectionSet.redoStack,i.layerView)}_redo(){const i=this._refineSelectionSet.redoStack.pop();this._updateIds(i.ids,i.mode===u.ADD?u.REMOVE:u.ADD,this._refineSelectionSet.undoStack,i.layerView)}_getRefineSelectionSetList(){const i=this._getTotal(this.selectionSets);let t;this.selectionSets.some((i=>{if(i.workflowType===b.REFINE)return t=i,!0}));let e=0,a=0;return Object.keys(t.refineInfos).forEach((i=>{e+=t.refineInfos[i].addIds.length,a+=t.refineInfos[i].removeIds.length})),[s("calcite-list-item",{label:this._translations.featuresAdded.replace("{{n}}",e.toString()),"non-interactive":!0}),s("calcite-list-item",{label:this._translations.featuresRemoved.replace("{{n}}",a.toString()),"non-interactive":!0}),s("calcite-list-item",{label:this._translations.totalSelected.replace("{{n}}",i.toString()),"non-interactive":!0})]}_getTotal(i){const t=p(i);return Object.keys(t).reduce(((i,s)=>i+t[s].ids.length),0)}async _getTranslations(){const i=await w(this.el);this._translations=i[0]}async _selectFeatures(i){var t,s;this.selectionLoadingChange.emit(!0),this._featuresCollection[null===(t=this._refineLayer)||void 0===t?void 0:t.layer.id]=[];const e=await c(0,null===(s=this._refineLayer)||void 0===s?void 0:s.layer,i,this._featuresCollection);this.selectionLoadingChange.emit(!1);let a=[];Object.keys(e).forEach((i=>{var t;i===(null===(t=this._refineLayer)||void 0===t?void 0:t.layer.id)&&(a=a.concat(e[i]))}));const l=Array.isArray(a)?a.map((i=>{var t;return i.attributes[null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.objectIdField]})):[];await this._updateIds(l,this._selectionMode,this._refineSelectionSet.undoStack,this._refineLayer),this._drawTools.clear()}async _highlightFeatures(){this._clearHighlight(),y.highlightHandles=await g(this.selectionSets)}_clearHighlight(){y.removeHandles()}async _updateIds(i,t,s,e){let a=!1;const l=this._refineSelectionSet.refineInfos,h=e.layer.id,n={};n[h]={addIds:[],removeIds:[],layerView:e};const o=Object.keys(l).indexOf(h)>-1?l[h]:n[h];if(t===u.ADD)o.addIds=[...new Set([...i,...o.addIds])],o.addIds.length>0&&s.push({ids:i,mode:t,layerView:e}),o.removeIds.length>0&&(o.removeIds=o.removeIds.filter((t=>i.indexOf(t)<0)));else{const l=this.selectionSets.reduce(((t,s)=>(i.forEach((i=>{s.workflowType!==b.REFINE?s.selectedIds.indexOf(i)>-1&&t.push(i):Object.keys(s.refineInfos).some((a=>{const l=s.refineInfos[a];if(l.layerView.layer.id===e.layer.id&&l.addIds.indexOf(i)>-1)return t.push(i),!0}))})),t)),[]);o.removeIds=[...new Set([...l,...o.removeIds])],o.addIds=o.addIds.filter((i=>l.indexOf(i)<0)),o.removeIds.length>0&&s.push({ids:l,mode:t,layerView:e}),this.selectionSets=this.selectionSets.reduce(((i,t)=>(t.workflowType!==b.REFINE&&t.layerView.layer.id===e.layer.id?(t.selectedIds=t.selectedIds.filter((i=>o.removeIds.indexOf(i)<0)),t.selectedIds.length>0?i.push(t):a=!0):i.push(t),i)),[])}this._refineSelectionSet.refineInfos[h]=o,this.selectionSets=[...this.selectionSets],a&&this.selectionSetsChanged.emit(this.selectionSets),await this._highlightFeatures()}get el(){return a(this)}};x.style=':host{display:block}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir="rtl"] .main-label{display:flex;float:right}.border{outline:1px solid var(--calcite-color-border-input)}.margin-top-1{margin-top:1rem}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:"Avenir Next","Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:var(--calcite-color-foreground-1)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}*/ .esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}.display-flex{display:flex}.font-bold{font-weight:bold}.width-full{width:100%}.label-margin-0{--calcite-label-margin-bottom:0}.padding-start-1-2{padding-inline-start:0.5rem}.font-weight-500{font-weight:500}.word-wrap-anywhere{word-wrap:anywhere}';export{_ as map_select_tools,P as pdf_download,x as refine_selection}
6
+ import{r as i,c as t,h as s,H as e,g as a}from"./p-78780f63.js";import{l}from"./p-48ff9cea.js";import{a as h,h as n,j as o,k as r,b as d,l as c,m as p,n as g}from"./p-4566438a.js";import{a as b,e as u,f as v}from"./p-c1cf3ebc.js";import{s as y}from"./p-8684a905.js";import{a as m,g as w}from"./p-ab006ace.js";import{d as f,a as S}from"./p-14ff1465.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-225c4ca4.js";import"./p-d89fff3a.js";import"./p-a230b270.js";import"./p-220ec0d1.js";const _=class{constructor(s){i(this,s),this.selectionSetChange=t(this,"selectionSetChange",7),this._selectedIds=[],this._selectionLabel="",this._graphics=[],this._featuresCollection={},this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=void 0,this.enabledLayerIds=[],this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.geometries=[],this.isUpdate=!1,this.layerViews=[],this.mapView=void 0,this.noResultText=void 0,this.searchConfiguration=void 0,this.selectionSet=void 0,this.selectionLayerIds=[],this.selectLayerView=void 0,this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._numSelected=0,this._searchDistanceEnabled=!1,this._searchTerm=void 0,this._selectionLoading=!1,this._translations=void 0,this._useLayerFeaturesEnabled=!1}async watchGeometriesHandler(i,t){if(i!==t){const t=0===i.length;if(await this._clearResults(t,t),i.length>0)return this._highlightWithOIDsOrGeoms()}}async watchSearchConfigurationHandler(i,t){JSON.stringify(i)!==JSON.stringify(t)&&this._initSearchWidget()}async clearSelection(){return this._clearResults(!0,!0)}async getSelection(){return/\S+/gm.test(this._selectionLabel)||await this._updateLabel(),{id:this.isUpdate?this.selectionSet.id:Date.now(),searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools.distance,download:!0,unit:this._bufferTools.unit,label:this._selectionLabel,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,graphics:this._graphics,selectLayers:this.layerViews,skipGeomOIDs:this._skipGeomOIDs,searchDistanceEnabled:this._searchDistanceEnabled,workflowType:this._workflowType,useLayerFeaturesEnabled:this._useLayerFeaturesEnabled,sketchGraphic:this._sketchGraphic}}searchConfigurationChangeChanged(i){this.searchConfiguration=i.detail}async distanceChanged(i){await this._distanceChanged(i.detail)}async unitChanged(i){i.detail.newValue!==i.detail.oldValue&&(this._unit=i.detail.newValue,await this._updateLabel())}async componentWillLoad(){await this._getTranslations(),await this._initModules()}async componentDidLoad(){await this._init(),await this._searchWidget.when((()=>{var i;this._searchWidget.allPlaceholder=(null===(i=this.searchConfiguration)||void 0===i?void 0:i.allPlaceholder)&&"find address or place"!==this.searchConfiguration.allPlaceholder.toLowerCase()?this.searchConfiguration.allPlaceholder:this._translations.placeholder}))}render(){return s(e,null,this._getMapLayerPicker(),s("div",{class:"border-bottom"}),s("div",{class:"padding-top-sides-1"},s("div",{class:"search-widget",ref:i=>{this._searchElement=i}}),s("div",{class:"padding-top-1"},s("map-draw-tools",{active:!0,editGraphicsEnabled:!this._useLayerFeaturesEnabled,graphics:this._graphics,mapView:this.mapView,onSketchGraphicsChange:i=>this._sketchGraphicsChanged(i),pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,ref:i=>{this._drawTools=i}})),this._getBufferOptions(),this._getUseLayerFeaturesOptions(),this._getNumSelected()),s("div",{class:"border-bottom"}),this._getNameInput())}_getBufferOptions(){var i,t;const e=this._searchDistanceEnabled?"search-distance":"div-not-visible",a="number"==typeof(null===(i=this.selectionSet)||void 0===i?void 0:i.distance)?this.selectionSet.distance:this.defaultBufferDistance;return s("div",null,s("div",{class:"padding-top-1 display-flex"},s("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},s("div",{class:"tooltip-container"},this._translations.searchDistance,s("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"search-distance-icon",scale:"s"}))),s("calcite-popover",{closable:!0,label:"",referenceElement:"search-distance-icon"},s("span",{class:"tooltip-message"},this._translations.useSearchDistanceTootip)),s("calcite-switch",{checked:this._searchDistanceEnabled,onCalciteSwitchChange:()=>this._searchDistanceEnabled=!this._searchDistanceEnabled})),s("div",{class:e},s("buffer-tools",{disabled:!this._searchDistanceEnabled,distance:a,geometries:this.geometries,onBufferComplete:i=>this._bufferComplete(i),ref:i=>this._bufferTools=i,unit:(null===(t=this.selectionSet)||void 0===t?void 0:t.unit)||this.defaultBufferUnit})))}_getUseLayerFeaturesOptions(){const i=this._useLayerFeaturesEnabled?"div-visible":"div-not-visible";return s("div",null,s("div",{class:"padding-top-1 display-flex"},s("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},s("div",{class:"tooltip-container"},this._translations.useLayerFeatures,s("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"use-layer-features-icon",scale:"s"}))),s("calcite-popover",{closable:!0,label:"",referenceElement:"use-layer-features-icon"},s("span",{class:"tooltip-message"},this._translations.useLayerFeaturesTooltip)),s("calcite-switch",{checked:this._useLayerFeaturesEnabled,onCalciteSwitchChange:()=>{this._useLayerFeaturesEnabledChanged()}})),s("div",{class:i+" padding-top-1"},s("map-layer-picker",{enabledLayerIds:this.selectionLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},selectedIds:this.layerViews.map((i=>i.layer.id)),showTables:!1})))}_getNumSelected(){const i=m(this.el),t=i&&"en"===i?`${this._translations.selectionLoading}...`:this._translations.selectionLoading;return s("div",{class:"padding-top-1 padding-bottom-1",style:{"align-items":"end",display:"flex"}},this._selectionLoading?s("div",null,s("calcite-loader",{class:"info-blue",inline:!0,label:t,scale:"m",type:"indeterminate"})):s("calcite-icon",{class:"info-blue padding-end-1-2",icon:"feature-layer",scale:"s"}),s("calcite-input-message",{class:"info-blue",scale:"m"},this._selectionLoading?t:this.noResultText&&0===this._numSelected?this.noResultText:this._translations.selectedFeatures.replace("{{n}}",this._numSelected.toString())))}_getNameInput(){return s("div",{class:"padding-sides-1 padding-top-1 "+(this.customLabelEnabled?"":"display-none")},s("calcite-label",{class:"font-bold"},this._translations.listName,s("calcite-input",{onInput:()=>{this._selectionLabel=this._labelName.value},placeholder:this._translations.listNamePlaceholder,ref:i=>{this._labelName=i},value:this._selectionLabel||""})))}_getMapLayerPicker(){return s("div",{class:"display-flex padding-sides-1 padding-bottom-1"},s("calcite-label",{class:"font-bold width-full label-margin-0"},this._translations.inputLayer,s("map-layer-picker",{enabledLayerIds:this.enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>this._inputLayerSelectionChange(i),selectedIds:this.selectLayerView?[this.selectLayerView.layer.id]:this.selectionSet?[this.selectionSet.layerView.layer.id]:[],showTables:!1})))}async _initModules(){const[i,t,s,e,a]=await l(["esri/layers/GraphicsLayer","esri/Graphic","esri/widgets/Search","esri/geometry/geometryEngine","esri/layers/FeatureLayer"]);this.GraphicsLayer=i,this.Graphic=t,this.Search=s,this._geometryEngine=e,this.FeatureLayer=a}async _init(){this._initGraphicsLayer(),await this._initSelectionSet(),this._initSearchWidget()}async _initSelectionSet(){var i,t,s,e;this.selectionSet&&(this._searchTerm=null===(i=this.selectionSet.searchResult)||void 0===i?void 0:i.name,this._searchResult=this.selectionSet.searchResult,this._selectLayers=this.selectionSet.selectLayers,this._selectedIds=this.selectionSet.selectedIds,this._skipGeomOIDs=this.selectionSet.skipGeomOIDs,this._searchDistanceEnabled=this.selectionSet.searchDistanceEnabled,this._useLayerFeaturesEnabled=this.selectionSet.useLayerFeaturesEnabled,this._distance=this.selectionSet.searchDistanceEnabled?this.selectionSet.distance:0,this._unit=this.selectionSet.unit,this._workflowType=this.selectionSet.workflowType,this.selectLayerView=this.selectionSet.layerView,this._sketchGraphic=this.selectionSet.sketchGraphic,this.geometries=[...(null===(t=this.selectionSet)||void 0===t?void 0:t.geometries)||[]],this._graphics=this.geometries.map((i=>new this.Graphic({geometry:i,symbol:"point"===i.type?this.sketchPointSymbol:"polyline"===i.type?this.sketchLineSymbol:this.sketchPolygonSymbol}))),this._selectionLabel=null===(s=this.selectionSet)||void 0===s?void 0:s.label,this._useLayerFeaturesEnabled||null===(e=this._drawTools)||void 0===e||e.updateGraphics(),await h(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1))}_initSearchWidget(){if(this.mapView&&this._searchElement){const i=this._getSearchConfig(this.searchConfiguration,this.mapView),t=Object.assign({view:this.mapView,container:this._searchElement,searchTerm:this._searchTerm},i);this._searchWidget=new this.Search(t),this._searchWidget.popupEnabled=!1,this._searchWidget.resultGraphicEnabled=!1,this._searchWidget.on("search-clear",(()=>{const i=this._searchClearLabel();this._clearResults(!1,i)})),this._searchWidget.on("select-result",(i=>{var t,s;if(i.result){this._searchResult=i.result;const e=(null===(s=null===(t=i.source)||void 0===t?void 0:t.layer)||void 0===s?void 0:s.id)&&i.source.layer.id===this.selectLayerView.layer.id,a=e?[i.result.feature.getObjectId()]:void 0;this._workflowType=b.SEARCH,this._updateLabel();const l=[i.result.feature];this._updateSelection(l,e,a),this._drawTools.graphics=l,this._searchWidget.resultGraphic.visible=!1}else{const i=this._searchClearLabel();this._clearResults(!1,i)}}))}}_searchClearLabel(){var i;return(null===(i=this._searchResult)||void 0===i?void 0:i.name)&&this._labelName.value.indexOf(this._searchResult.name)>-1}_getSearchConfig(i,t){const s=null==i?void 0:i.sources;return(null==s?void 0:s.length)>0?(i.includeDefaultSources=!1,s.forEach((i=>{var s,e;if(i.hasOwnProperty("layer")){const a=i,l=null===(s=a.layer)||void 0===s?void 0:s.id,h=l?t.map.findLayerById(l):null,n=null===(e=null==a?void 0:a.layer)||void 0===e?void 0:e.url;h?a.layer=h:n&&(a.layer=new this.FeatureLayer(n))}})),null==s||s.forEach((i=>{if(i.hasOwnProperty("locator")){const t=i;"ArcGIS World Geocoding Service"===(null==t?void 0:t.name)&&(t.outFields=t.outFields||["Addr_type","Match_addr","StAddr","City"],t.singleLineFieldName="SingleLine"),t.url=t.url,delete t.url}}))):i=Object.assign(Object.assign({},i),{includeDefaultSources:!0}),i}_initGraphicsLayer(){const i=this._translations.bufferLayer,t=this.mapView.map.layers.findIndex((t=>t.title===i));if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else{this._bufferGraphicsLayer=new this.GraphicsLayer({title:i,listMode:"hide"}),y.managedLayers.push(i);const t=this.mapView.map.layers.findIndex((i=>i.title===this._translations.sketchLayer));t>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,t):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}async _sketchGraphicsChanged(i,t=!1){const s=i.detail.graphics;if(s.length>0&&s[0])if(t||(this._sketchGraphic=s[0]),this._workflowType=this._useLayerFeaturesEnabled?b.SELECT:b.SKETCH,this._workflowType===b.SKETCH&&this._drawTools.updateGraphics(),await this._updateLabel(),this._clearSearchWidget(),this._useLayerFeaturesEnabled&&!t){const i=Array.isArray(s)?s.map((i=>i.geometry)):this.geometries;await this._selectLayerFeatures(i[0])}else{const t=s.reduce(((i,t)=>{var s;return(null===(s=null==t?void 0:t.layer)||void 0===s?void 0:s.objectIdField)?i.push(t.attributes[t.layer.objectIdField]):t.getObjectId&&i.push(t.getObjectId()),i}),[]),e=i.detail.useOIDs&&t.length>0;this._updateSelection(s,e,t),e&&await this._highlightFeatures(t)}else await this._clearResults(!0,!0)}async _highlightWithOIDsOrGeoms(){var i;return(null===(i=this._skipGeomOIDs)||void 0===i?void 0:i.length)>0?(this._selectedIds=this._skipGeomOIDs,this._highlightFeatures(this._selectedIds)):this._geomQuery(this.geometries)}async _highlightFeatures(i){y.removeHandles(),i.length>0&&y.highlightHandles.push(await n(i,this.selectLayerView,this.mapView)),this._numSelected=i.length,this.selectionSetChange.emit(i.length)}async _selectFeatures(i){this._selectionLoading=!0,this._selectedIds=await o(i,this.selectLayerView.layer),this._selectionLoading=!1,this._drawTools.graphics=this._graphics,await this._highlightFeatures(this._selectedIds)}async _bufferComplete(i){this._bufferGeometry=Array.isArray(i.detail)?i.detail[0]:i.detail;let t=this._bufferTools.distance,s=0;if(this._bufferGeometry){const i=new this.Graphic({geometry:this._bufferGeometry,symbol:{type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}}});this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),await this._selectFeatures([this._bufferGeometry]),await this.mapView.goTo(i.geometry.extent),s=t,t=0}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),await this._highlightWithOIDsOrGeoms();await this._distanceChanged({oldValue:t,newValue:s})}_geomQuery(i){const t=r(i,this._geometryEngine);return this._selectFeatures(t)}async _clearResults(i=!0,t=!1){var s;this._selectedIds=[],this._distance=void 0,this._unit=void 0,t&&(this._selectionLabel="",this._labelName.value=""),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),i&&this._searchWidget&&this._clearSearchWidget(),y.removeHandles(),(null===(s=this._drawTools)||void 0===s?void 0:s.clear)&&(this._graphics=[],await this._drawTools.clear()),this.selectionSetChange.emit(this._selectedIds.length)}_clearSearchWidget(){this._searchWidget.clear(),this._searchResult=void 0}_updateSelection(i,t,s){this._selectedIds=t&&s?s:this._selectedIds,this._skipGeomOIDs=t?s:void 0,this.geometries=Array.isArray(i)?i.map((i=>i.geometry)):this.geometries,this._graphics=i}async _updateLabel(){var i,t;const s=this._selectionLabel.indexOf(this._translations.sketch)>-1,e=this._selectionLabel.indexOf(this._translations.select)>-1,a=this._selectionLabel.indexOf(null===(i=this._searchResult)||void 0===i?void 0:i.name)>-1,l=this._workflowType===b.SEARCH?null===(t=this._searchResult)||void 0===t?void 0:t.name:this._workflowType===b.SELECT?this._translations.select:this._translations.sketch,h=this._unit?this._unit:this._bufferTools.unit,n=await this._bufferTools.getTranslatedUnit(h),o=isNaN(this._distance)?this._bufferTools.distance:this._distance;this._selectionLabel=s||e||a||!this._selectionLabel?`${l} ${o} ${n}`:this._selectionLabel,this._labelName.value=this._selectionLabel}async _layerSelectionChange(i){if(Array.isArray(i.detail)&&i.detail.length>0){const t=i.detail.map((i=>d(this.mapView,i)));return Promise.all(t).then((i=>{this.layerViews=i,this._featuresCollection={},this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}))}}async _inputLayerSelectionChange(i){var t;const s=(null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.length)>0?i.detail[0]:"";this.selectLayerView&&s===this.selectLayerView.layer.id||(this.selectLayerView=await d(this.mapView,s),await this._updateLabel(),this._bufferGeometry?await this._selectFeatures([this._bufferGeometry]):await this._highlightWithOIDsOrGeoms())}async _distanceChanged(i){i.newValue!==i.oldValue&&(this._distance=i.newValue,await this._updateLabel())}async _selectLayerFeatures(i){this._selectionLoading=!0;const t=this.layerViews.map((t=>(this._featuresCollection[t.layer.id]=[],c(0,t.layer,i,this._featuresCollection))));return Promise.all(t).then((async i=>{this._selectionLoading=!1;let t=[];i.forEach((i=>{Object.keys(i).forEach((s=>{t=t.concat(i[s])}))}));let s=!1;t.forEach((i=>{var t;const e=i.geometry;i.symbol="point"===e.type?this.sketchPointSymbol:"polyline"===e.type?this.sketchLineSymbol:"polygon"===e.type?this.sketchPolygonSymbol:void 0,s=(null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.hasOwnProperty("objectIdField"))||i.hasOwnProperty("getObjectId")}));const e=this.layerViews[0].layer.title===this.selectLayerView.layer.title&&s;await this._sketchGraphicsChanged({detail:{graphics:t,useOIDs:e}},!0)}))}_useLayerFeaturesEnabledChanged(){this._useLayerFeaturesEnabled=!this._useLayerFeaturesEnabled,this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}async _getTranslations(){const i=await w(this.el);this._translations=i[0]}get el(){return a(this)}static get watchers(){return{geometries:["watchGeometriesHandler"],searchConfiguration:["watchSearchConfigurationHandler"]}}};_.style=':host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.padding-top-1{padding-top:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-color-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:"1rem" !important}.end-border{border-inline-end:1px solid var(--calcite-color-border-2)}.search-distance{display:flex;padding-top:1rem}.font-bold{font:bold}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.tooltip-container{display:flex}.padding-start-1-2{padding-inline-start:0.5rem}.icon{--calcite-color-icon-color:var(--calcite-color-brand)}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2)}';const L=Object.freeze({__proto__:null,default:[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}]}),P=class{constructor(t){i(this,t),this.defaultNumLabelsPerPage=void 0,this.disabled=!1,this._translations=void 0}async downloadCSV(i,t,s,e=!0){return f(i,t,!0,s,e)}async downloadPDF(i,t,s=!1,e="",a=""){var l;return S(i,t,null===(l=this._labelInfoElement.selectedOption)||void 0===l?void 0:l.value,s,e,a)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){return s(e,null,s("calcite-select",{disabled:this.disabled,label:"",ref:i=>{this._labelInfoElement=i}}))}componentDidLoad(){this._renderOptions()}async _initModules(){const[i]=await l(["esri/intl"]);this._intl=i}_getLabelSizeText(i){const t="&lrm;"+i.descriptionPDF.labelWidthDisplay+" x "+i.descriptionPDF.labelHeightDisplay+"&rlm;";return this._translations.pdfLabel.replace("{{n}}",i.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",t)}async _getTranslations(){const i=await w(this.el);this._translations=i[0]}_renderOptions(){(L.default||L).sort(((i,t)=>{const s=parseInt(i.descriptionPDF.labelsPerPageDisplay,10),e=parseInt(t.descriptionPDF.labelsPerPageDisplay,10);return s<e?-1:s>e?1:0})).forEach(((i,t)=>{const s=document.createElement("calcite-option");s.value=i,s.innerHTML=this._getLabelSizeText(i),this._labelInfoElement.appendChild(s),(this.defaultNumLabelsPerPage?parseInt(i.descriptionPDF.labelsPerPageDisplay,10)===this.defaultNumLabelsPerPage:0===t)&&(s.selected=!0,this._labelInfoElement.selectedOption=s)}))}get el(){return a(this)}};P.style=":host{display:block}";const x=class{constructor(s){i(this,s),this.selectionLoadingChange=t(this,"selectionLoadingChange",7),this.selectionSetsChanged=t(this,"selectionSetsChanged",7),this._addEnabled=!0,this._refineSets=[],this._enabledLayerIds=[],this._featuresCollection={},this.addresseeLayer=void 0,this.enabledLayerIds=[],this.mapView=void 0,this.selectionSets=[],this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._translations=void 0,this._selectionMode=u.ADD,this._refineLayer=void 0}async componentWillLoad(){await this._getTranslations(),this._enabledLayerIds=this._getEnabledLayerIds(),await this._setRefineSet(this._enabledLayerIds[0])}render(){var i,t;return s(e,null,s("div",{class:(this._enabledLayerIds.length>1?"display-block":"display-none")+" padding-top-sides-1"},s("div",{class:"display-flex"},s("calcite-label",{class:"font-bold width-full label-margin-0"},s("div",{class:"display-flex"},this._translations.inputLayer,s("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"refine-input-layer",scale:"s"})),s("map-layer-picker",{enabledLayerIds:this._enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},ref:i=>{this._layerPicker=i},selectedIds:[this._refineLayer.layer.id],showTables:!1})),s("calcite-popover",{closable:!0,label:"",referenceElement:"refine-input-layer"},s("span",{class:"tooltip-message"},this._translations.inputLayerTip)))),s("div",{class:"padding-1"},s("div",{class:"padding-bottom-1"},s("calcite-segmented-control",{class:"w-100"},s("calcite-segmented-control-item",{checked:this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(u.ADD),value:u.ADD},s("span",{class:"font-weight-500"},this._translations.add)),s("calcite-segmented-control-item",{checked:!this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(u.REMOVE),value:u.REMOVE},s("span",{class:"font-weight-500"},this._translations.remove)))),s("div",null,s("map-draw-tools",{active:!0,drawMode:v.REFINE,mapView:this.mapView,onDrawRedo:()=>this._redo(),onDrawUndo:()=>this._undo(),onSketchGraphicsChange:i=>this._sketchGraphicsChanged(i),pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,redoEnabled:(null===(i=this._refineSelectionSet)||void 0===i?void 0:i.redoStack.length)>0,ref:i=>{this._drawTools=i},undoEnabled:(null===(t=this._refineSelectionSet)||void 0===t?void 0:t.undoStack.length)>0})),s("br",null),s("calcite-list",{class:"list-border"},this._getRefineSelectionSetList())))}_layerSelectionChange(i){this._setRefineSet(i.detail[0])}_setSelectionMode(i){this._selectionMode=i}_sketchGraphicsChanged(i){var t;const s=null===(t=i.detail)||void 0===t?void 0:t.graphics[0].geometry;this._selectFeatures(s)}_getEnabledLayerIds(){return this.selectionSets.reduce(((i,t)=>{var s;const e=null===(s=null==t?void 0:t.layerView)||void 0===s?void 0:s.layer.id;return e&&i.indexOf(e)<0?i.push(e):t.workflowType===b.REFINE&&Object.keys(t.refineInfos).forEach((t=>{i.indexOf(t)<0&&i.push(t)})),i}),[])}async _setRefineSet(i){this.selectionSets.some((t=>{if(t.workflowType===b.REFINE)return this._refineSelectionSet=t,Object.keys(t.refineInfos).indexOf(i)>-1}))||await this._initRefineSet(i,this._refineSelectionSet),this._refineLayer=this._refineSelectionSet.refineInfos[i].layerView}async _initRefineSet(i,t){const s={};s[i]={addIds:[],removeIds:[],layerView:await d(this.mapView,i)},t?t.refineInfos=Object.assign(Object.assign({},t.refineInfos),s):(this._refineSelectionSet={id:Date.now(),searchResult:void 0,buffer:void 0,distance:0,download:!0,unit:"feet",label:"Refine",selectedIds:[],layerView:void 0,geometries:[],graphics:[],selectLayers:[],workflowType:b.REFINE,searchDistanceEnabled:!1,useLayerFeaturesEnabled:!1,refineInfos:s,redoStack:[],undoStack:[],sketchGraphic:void 0},this.selectionSets.push(this._refineSelectionSet))}_undo(){const i=this._refineSelectionSet.undoStack.pop();this._updateIds(i.ids,i.mode===u.ADD?u.REMOVE:u.ADD,this._refineSelectionSet.redoStack,i.layerView)}_redo(){const i=this._refineSelectionSet.redoStack.pop();this._updateIds(i.ids,i.mode===u.ADD?u.REMOVE:u.ADD,this._refineSelectionSet.undoStack,i.layerView)}_getRefineSelectionSetList(){const i=this._getTotal(this.selectionSets);let t;this.selectionSets.some((i=>{if(i.workflowType===b.REFINE)return t=i,!0}));let e=0,a=0;return Object.keys(t.refineInfos).forEach((i=>{e+=t.refineInfos[i].addIds.length,a+=t.refineInfos[i].removeIds.length})),[s("calcite-list-item",{label:this._translations.featuresAdded.replace("{{n}}",e.toString()),"non-interactive":!0}),s("calcite-list-item",{label:this._translations.featuresRemoved.replace("{{n}}",a.toString()),"non-interactive":!0}),s("calcite-list-item",{label:this._translations.totalSelected.replace("{{n}}",i.toString()),"non-interactive":!0})]}_getTotal(i){const t=p(i);return Object.keys(t).reduce(((i,s)=>i+t[s].ids.length),0)}async _getTranslations(){const i=await w(this.el);this._translations=i[0]}async _selectFeatures(i){var t,s;this.selectionLoadingChange.emit(!0),this._featuresCollection[null===(t=this._refineLayer)||void 0===t?void 0:t.layer.id]=[];const e=await c(0,null===(s=this._refineLayer)||void 0===s?void 0:s.layer,i,this._featuresCollection);this.selectionLoadingChange.emit(!1);let a=[];Object.keys(e).forEach((i=>{var t;i===(null===(t=this._refineLayer)||void 0===t?void 0:t.layer.id)&&(a=a.concat(e[i]))}));const l=Array.isArray(a)?a.map((i=>{var t;return i.attributes[null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.objectIdField]})):[];await this._updateIds(l,this._selectionMode,this._refineSelectionSet.undoStack,this._refineLayer),this._drawTools.clear()}async _highlightFeatures(){this._clearHighlight(),y.highlightHandles=await g(this.selectionSets)}_clearHighlight(){y.removeHandles()}async _updateIds(i,t,s,e){let a=!1;const l=this._refineSelectionSet.refineInfos,h=e.layer.id,n={};n[h]={addIds:[],removeIds:[],layerView:e};const o=Object.keys(l).indexOf(h)>-1?l[h]:n[h];if(t===u.ADD)o.addIds=[...new Set([...i,...o.addIds])],o.addIds.length>0&&s.push({ids:i,mode:t,layerView:e}),o.removeIds.length>0&&(o.removeIds=o.removeIds.filter((t=>i.indexOf(t)<0)));else{const l=this.selectionSets.reduce(((t,s)=>(i.forEach((i=>{s.workflowType!==b.REFINE?s.selectedIds.indexOf(i)>-1&&t.push(i):Object.keys(s.refineInfos).some((a=>{const l=s.refineInfos[a];if(l.layerView.layer.id===e.layer.id&&l.addIds.indexOf(i)>-1)return t.push(i),!0}))})),t)),[]);o.removeIds=[...new Set([...l,...o.removeIds])],o.addIds=o.addIds.filter((i=>l.indexOf(i)<0)),o.removeIds.length>0&&s.push({ids:l,mode:t,layerView:e}),this.selectionSets=this.selectionSets.reduce(((i,t)=>(t.workflowType!==b.REFINE&&t.layerView.layer.id===e.layer.id?(t.selectedIds=t.selectedIds.filter((i=>o.removeIds.indexOf(i)<0)),t.selectedIds.length>0?i.push(t):a=!0):i.push(t),i)),[])}this._refineSelectionSet.refineInfos[h]=o,this.selectionSets=[...this.selectionSets],a&&this.selectionSetsChanged.emit(this.selectionSets),await this._highlightFeatures()}get el(){return a(this)}};x.style=':host{display:block}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir="rtl"] .main-label{display:flex;float:right}.border{outline:1px solid var(--calcite-color-border-input)}.margin-top-1{margin-top:1rem}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:"Avenir Next","Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:var(--calcite-color-foreground-1)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}*/ .esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}.display-flex{display:flex}.font-bold{font-weight:bold}.width-full{width:100%}.label-margin-0{--calcite-label-margin-bottom:0}.padding-start-1-2{padding-inline-start:0.5rem}.font-weight-500{font-weight:500}.word-wrap-anywhere{word-wrap:anywhere}';export{_ as map_select_tools,P as pdf_download,x as refine_selection}