@esri/solutions-components 0.11.16 → 0.11.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{asyncToGenerator-ccb3278b.js → asyncToGenerator-c7fc3ee4.js} +1 -1
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +3 -3
- package/dist/cjs/buffer-tools_2.cjs.entry.js +5 -5
- package/dist/cjs/card-manager_3.cjs.entry.js +19 -11
- package/dist/cjs/consent-manager.cjs.entry.js +5 -5
- package/dist/cjs/create-feature_4.cjs.entry.js +7 -7
- package/dist/cjs/create-related-feature_3.cjs.entry.js +4 -4
- package/dist/cjs/crowdsource-manager.cjs.entry.js +16 -10
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +5 -5
- package/dist/cjs/deduct-calculator.cjs.entry.js +1 -1
- package/dist/cjs/delete-dialog.cjs.entry.js +3 -3
- package/dist/cjs/{downloadUtils-9de366bc.js → downloadUtils-88ec0e88.js} +5 -5
- package/dist/cjs/{effects-78c31457.js → effects-3607d1ba.js} +1 -1
- package/dist/cjs/feature-list.cjs.entry.js +7 -7
- package/dist/cjs/{helpers-67a2c953.js → helpers-a65cb83a.js} +3 -3
- package/dist/cjs/{index-b936ec03.js → index-2c21082d.js} +24 -17
- package/dist/cjs/{index-b2821254.js → index-90ef3c01.js} +1 -1
- package/dist/cjs/{index.es-0441a948.js → index.es-3c2404c3.js} +2 -2
- package/dist/cjs/instant-apps-app-guide.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +7 -7
- package/dist/cjs/instant-apps-control-panel.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-create.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-export-views.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-export.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-filter-list_2.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-header.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +8 -8
- package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-landing-page.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +8 -8
- package/dist/cjs/instant-apps-language-translator.cjs.entry.js +8 -8
- package/dist/cjs/instant-apps-measurement-tool.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-measurement.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-popover.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-popovers.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-sign-in.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-splash.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-time-filter.cjs.entry.js +7 -7
- package/dist/cjs/json-editor_7.cjs.entry.js +5 -5
- package/dist/cjs/{languageSwitcher-e2118cc6.js → languageSwitcher-19a22439.js} +1 -1
- package/dist/cjs/{languageUtil-f22ce913.js → languageUtil-a3e1eafd.js} +1 -1
- package/dist/cjs/{loadModules-accd5295.js → loadModules-e9d8977c.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{locale-e2a974ae.js → locale-0a273172.js} +3 -3
- package/dist/cjs/{locale-8017d061.js → locale-c09e93fb.js} +2 -2
- package/dist/cjs/map-layer-picker.cjs.entry.js +6 -6
- package/dist/cjs/map-select-tools_3.cjs.entry.js +8 -8
- package/dist/cjs/{mapViewUtils-18c46b84.js → mapViewUtils-319df9ec.js} +1 -1
- package/dist/cjs/pci-calculator.cjs.entry.js +1 -1
- package/dist/cjs/{popupUtils-3b069427.js → popupUtils-ca1127aa.js} +2 -2
- package/dist/cjs/public-notification.cjs.entry.js +8 -8
- package/dist/cjs/{publicNotificationStore-76755c44.js → publicNotificationStore-ee00411f.js} +1 -1
- package/dist/cjs/solution-configuration.cjs.entry.js +5 -5
- package/dist/cjs/solution-contents_3.cjs.entry.js +5 -5
- package/dist/cjs/solution-item-accordion.cjs.entry.js +6 -5
- package/dist/cjs/solution-item-icon.cjs.entry.js +1 -1
- package/dist/cjs/{solution-store-a2a8422d.js → solution-store-6208ce28.js} +1 -1
- package/dist/cjs/solutions-components.cjs.js +2 -2
- package/dist/cjs/spatial-ref.cjs.entry.js +3 -3
- package/dist/cjs/store-manager.cjs.entry.js +3 -3
- package/dist/cjs/{utils-0f287cfa.js → utils-30344ce0.js} +2 -2
- package/dist/collection/assets/t9n/consent-manager/resources_ar.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_bg.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_bs.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_ca.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_cs.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_da.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_de.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_el.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_es.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_et.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_fi.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_fr.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_he.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_hr.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_hu.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_id.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_it.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_ja.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_ko.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_lt.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_lv.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_nb.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_nl.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_pl.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_pt-BR.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_pt-PT.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_ro.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_ru.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_sk.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_sl.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_sr.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_sv.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_th.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_tr.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_uk.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_vi.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_zh-CN.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_zh-HK.json +5 -0
- package/dist/collection/assets/t9n/consent-manager/resources_zh-TW.json +5 -0
- package/dist/collection/assets/t9n/create-feature/resources_pt-BR.json +1 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources.json +3 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_ar.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_bg.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_bs.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_ca.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_cs.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_da.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_de.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_el.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_en.json +3 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_es.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_et.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_fi.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_fr.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_he.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_hr.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_hu.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_id.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_it.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_ja.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_ko.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_lt.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_lv.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_nb.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_nl.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_pl.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_pt-BR.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_pt-PT.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_ro.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_ru.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_sk.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_sl.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_sr.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_sv.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_th.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_tr.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_uk.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_vi.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_zh-CN.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_zh-HK.json +2 -1
- package/dist/collection/assets/t9n/crowdsource-reporter/resources_zh-TW.json +2 -1
- package/dist/collection/assets/t9n/edit-card/resources_fr.json +1 -1
- package/dist/collection/assets/t9n/feature-list/resources_ar.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_bg.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_bs.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_ca.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_cs.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_da.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_de.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_el.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_es.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_et.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_fi.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_fr.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_he.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_hr.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_hu.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_id.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_it.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_ja.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_ko.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_lt.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_lv.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_nb.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_nl.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_pl.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_pt-BR.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_pt-PT.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_ro.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_ru.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_sk.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_sl.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_sr.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_sv.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_th.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_tr.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_uk.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_vi.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_zh-CN.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_zh-HK.json +3 -1
- package/dist/collection/assets/t9n/feature-list/resources_zh-TW.json +3 -1
- package/dist/collection/assets/t9n/info-card/resources_et.json +1 -1
- package/dist/collection/assets/t9n/info-card/resources_ko.json +1 -1
- package/dist/collection/assets/t9n/info-card/resources_pt-PT.json +1 -1
- package/dist/collection/assets/t9n/info-card/resources_ru.json +1 -1
- package/dist/collection/assets/t9n/info-card/resources_sk.json +1 -1
- package/dist/collection/assets/t9n/info-card/resources_vi.json +1 -1
- package/dist/collection/assets/t9n/info-card/resources_zh-CN.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_ar.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_bg.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_bs.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_ca.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_cs.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_da.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_de.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_el.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_es.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_et.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_fi.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_fr.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_he.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_hr.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_hu.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_id.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_it.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_ja.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_ko.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_lt.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_lv.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_nb.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_nl.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_pl.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_pt-BR.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_pt-PT.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_ro.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_ru.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_sk.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_sl.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_sr.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_sv.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_th.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_tr.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_uk.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_vi.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_zh-CN.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_zh-HK.json +1 -1
- package/dist/collection/assets/t9n/map-card/resources_zh-TW.json +1 -1
- package/dist/collection/assets/t9n/map-select-tools/resources_zh-HK.json +1 -1
- package/dist/collection/assets/t9n/map-select-tools/resources_zh-TW.json +1 -1
- package/dist/collection/assets/t9n/solution-item-accordion/resources_ar.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_bg.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_bs.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_ca.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_cs.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_da.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_de.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_el.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_es.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_et.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_fi.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_fr.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_he.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_hr.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_hu.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_id.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_it.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_ja.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_ko.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_lt.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_lv.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_nb.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_nl.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_pl.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_pt-BR.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_pt-PT.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_ro.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_ru.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_sk.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_sl.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_sr.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_sv.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_th.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_tr.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_uk.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_vi.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_zh-CN.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_zh-HK.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_zh-TW.json +3 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +12 -6
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +1 -1
- package/dist/collection/components/layer-table/layer-table.js +13 -5
- package/dist/collection/components/solution-item-accordion/solution-item-accordion.js +8 -3
- package/dist/collection/demos/crowdsource-manager.html +1 -0
- package/dist/collection/utils/mapViewUtils.js +1 -1
- package/dist/collection/utils/mapViewUtils.ts +1 -1
- package/dist/components/crowdsource-manager.js +12 -6
- package/dist/components/crowdsource-reporter.js +1 -1
- package/dist/components/layer-table2.js +13 -5
- package/dist/components/mapViewUtils.js +1 -1
- package/dist/components/solution-item-accordion.js +3 -2
- package/dist/esm/{asyncToGenerator-48cd21fe.js → asyncToGenerator-96b2368d.js} +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +3 -3
- package/dist/esm/buffer-tools_2.entry.js +5 -5
- package/dist/esm/card-manager_3.entry.js +19 -11
- package/dist/esm/consent-manager.entry.js +5 -5
- package/dist/esm/create-feature_4.entry.js +7 -7
- package/dist/esm/create-related-feature_3.entry.js +4 -4
- package/dist/esm/crowdsource-manager.entry.js +16 -10
- package/dist/esm/crowdsource-reporter.entry.js +5 -5
- package/dist/esm/deduct-calculator.entry.js +1 -1
- package/dist/esm/delete-dialog.entry.js +3 -3
- package/dist/esm/{downloadUtils-992b4e25.js → downloadUtils-22a8f2d8.js} +5 -5
- package/dist/esm/{effects-45daffc6.js → effects-38bc1195.js} +1 -1
- package/dist/esm/feature-list.entry.js +7 -7
- package/dist/esm/{helpers-38ea1ae1.js → helpers-77bdd30e.js} +3 -3
- package/dist/esm/{index-000c7a7c.js → index-3702583a.js} +24 -17
- package/dist/esm/{index-f7533fcc.js → index-6de7c296.js} +1 -1
- package/dist/esm/{index.es-c379ea10.js → index.es-87662946.js} +2 -2
- package/dist/esm/instant-apps-app-guide.entry.js +5 -5
- package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +7 -7
- package/dist/esm/instant-apps-control-panel.entry.js +3 -3
- package/dist/esm/instant-apps-create.entry.js +5 -5
- package/dist/esm/instant-apps-export-views.entry.js +5 -5
- package/dist/esm/instant-apps-export.entry.js +5 -5
- package/dist/esm/instant-apps-filter-list_2.entry.js +5 -5
- package/dist/esm/instant-apps-header.entry.js +3 -3
- package/dist/esm/instant-apps-interactive-legend-classic.entry.js +6 -6
- package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +6 -6
- package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +6 -6
- package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +6 -6
- package/dist/esm/instant-apps-interactive-legend.entry.js +8 -8
- package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +5 -5
- package/dist/esm/instant-apps-landing-page.entry.js +1 -1
- package/dist/esm/instant-apps-language-switcher.entry.js +8 -8
- package/dist/esm/instant-apps-language-translator.entry.js +8 -8
- package/dist/esm/instant-apps-measurement-tool.entry.js +3 -3
- package/dist/esm/instant-apps-measurement.entry.js +5 -5
- package/dist/esm/instant-apps-popover.entry.js +5 -5
- package/dist/esm/instant-apps-popovers.entry.js +1 -1
- package/dist/esm/instant-apps-scoreboard.entry.js +5 -5
- package/dist/esm/instant-apps-sign-in.entry.js +5 -5
- package/dist/esm/instant-apps-splash.entry.js +5 -5
- package/dist/esm/instant-apps-time-filter.entry.js +7 -7
- package/dist/esm/json-editor_7.entry.js +5 -5
- package/dist/esm/{languageSwitcher-446c6fe7.js → languageSwitcher-49bad3f4.js} +1 -1
- package/dist/esm/{languageUtil-a3e6adf6.js → languageUtil-2b6e191a.js} +1 -1
- package/dist/esm/{loadModules-736e0284.js → loadModules-947ccfd4.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{locale-8a3e6795.js → locale-aa656a2c.js} +2 -2
- package/dist/esm/{locale-5b76949e.js → locale-b0016f8e.js} +3 -3
- package/dist/esm/map-layer-picker.entry.js +6 -6
- package/dist/esm/map-select-tools_3.entry.js +8 -8
- package/dist/esm/{mapViewUtils-f54edae3.js → mapViewUtils-a854e298.js} +1 -1
- package/dist/esm/pci-calculator.entry.js +1 -1
- package/dist/esm/{popupUtils-12e61a9a.js → popupUtils-1314cb13.js} +2 -2
- package/dist/esm/public-notification.entry.js +8 -8
- package/dist/esm/{publicNotificationStore-e5306ea6.js → publicNotificationStore-70219049.js} +1 -1
- package/dist/esm/solution-configuration.entry.js +5 -5
- package/dist/esm/solution-contents_3.entry.js +5 -5
- package/dist/esm/solution-item-accordion.entry.js +6 -5
- package/dist/esm/solution-item-icon.entry.js +1 -1
- package/dist/esm/{solution-store-26e3d8c6.js → solution-store-2493275a.js} +1 -1
- package/dist/esm/solutions-components.js +3 -3
- package/dist/esm/spatial-ref.entry.js +3 -3
- package/dist/esm/store-manager.entry.js +3 -3
- package/dist/esm/{utils-793f7261.js → utils-68015f9d.js} +2 -2
- package/dist/solutions-components/assets/t9n/consent-manager/resources_ar.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_bg.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_bs.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_ca.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_cs.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_da.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_de.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_el.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_es.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_et.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_fi.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_fr.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_he.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_hr.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_hu.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_id.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_it.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_ja.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_ko.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_lt.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_lv.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_nb.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_nl.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_pl.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_pt-BR.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_pt-PT.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_ro.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_ru.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_sk.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_sl.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_sr.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_sv.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_th.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_tr.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_uk.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_vi.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_zh-CN.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_zh-HK.json +5 -0
- package/dist/solutions-components/assets/t9n/consent-manager/resources_zh-TW.json +5 -0
- package/dist/solutions-components/assets/t9n/create-feature/resources_pt-BR.json +1 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources.json +3 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_ar.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_bg.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_bs.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_ca.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_cs.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_da.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_de.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_el.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_en.json +3 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_es.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_et.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_fi.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_fr.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_he.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_hr.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_hu.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_id.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_it.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_ja.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_ko.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_lt.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_lv.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_nb.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_nl.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_pl.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_pt-BR.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_pt-PT.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_ro.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_ru.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_sk.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_sl.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_sr.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_sv.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_th.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_tr.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_uk.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_vi.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_zh-CN.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_zh-HK.json +2 -1
- package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_zh-TW.json +2 -1
- package/dist/solutions-components/assets/t9n/edit-card/resources_fr.json +1 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_ar.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_bg.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_bs.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_ca.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_cs.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_da.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_de.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_el.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_es.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_et.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_fi.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_fr.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_he.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_hr.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_hu.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_id.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_it.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_ja.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_ko.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_lt.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_lv.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_nb.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_nl.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_pl.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_pt-BR.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_pt-PT.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_ro.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_ru.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_sk.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_sl.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_sr.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_sv.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_th.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_tr.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_uk.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_vi.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_zh-CN.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_zh-HK.json +3 -1
- package/dist/solutions-components/assets/t9n/feature-list/resources_zh-TW.json +3 -1
- package/dist/solutions-components/assets/t9n/info-card/resources_et.json +1 -1
- package/dist/solutions-components/assets/t9n/info-card/resources_ko.json +1 -1
- package/dist/solutions-components/assets/t9n/info-card/resources_pt-PT.json +1 -1
- package/dist/solutions-components/assets/t9n/info-card/resources_ru.json +1 -1
- package/dist/solutions-components/assets/t9n/info-card/resources_sk.json +1 -1
- package/dist/solutions-components/assets/t9n/info-card/resources_vi.json +1 -1
- package/dist/solutions-components/assets/t9n/info-card/resources_zh-CN.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_ar.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_bg.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_bs.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_ca.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_cs.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_da.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_de.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_el.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_es.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_et.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_fi.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_fr.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_he.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_hr.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_hu.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_id.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_it.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_ja.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_ko.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_lt.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_lv.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_nb.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_nl.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_pl.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_pt-BR.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_pt-PT.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_ro.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_ru.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_sk.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_sl.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_sr.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_sv.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_th.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_tr.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_uk.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_vi.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_zh-CN.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_zh-HK.json +1 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_zh-TW.json +1 -1
- package/dist/solutions-components/assets/t9n/map-select-tools/resources_zh-HK.json +1 -1
- package/dist/solutions-components/assets/t9n/map-select-tools/resources_zh-TW.json +1 -1
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_ar.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_bg.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_bs.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_ca.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_cs.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_da.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_de.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_el.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_es.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_et.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_fi.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_fr.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_he.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_hr.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_hu.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_id.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_it.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_ja.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_ko.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_lt.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_lv.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_nb.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_nl.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_pl.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_pt-BR.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_pt-PT.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_ro.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_ru.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_sk.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_sl.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_sr.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_sv.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_th.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_tr.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_uk.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_vi.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_zh-CN.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_zh-HK.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_zh-TW.json +3 -0
- package/dist/solutions-components/demos/crowdsource-manager.html +1 -0
- package/dist/solutions-components/{p-282a3090.entry.js → p-032d4411.entry.js} +1 -1
- package/dist/solutions-components/{p-a4bd7b09.js → p-08ad0b7a.js} +1 -1
- package/dist/solutions-components/{p-1e364924.js → p-173d5fce.js} +1 -1
- package/dist/solutions-components/{p-3e25c5b0.js → p-174fa218.js} +1 -1
- package/dist/solutions-components/{p-0d311ebf.entry.js → p-1890b884.entry.js} +1 -1
- package/dist/solutions-components/p-1b0588d2.js +7 -0
- package/dist/solutions-components/{p-ae7bcbff.entry.js → p-1ddd7128.entry.js} +1 -1
- package/dist/solutions-components/{p-ff3d2df3.entry.js → p-1dffcc22.entry.js} +1 -1
- package/dist/solutions-components/{p-ff0b00d7.entry.js → p-1fe3577a.entry.js} +1 -1
- package/dist/solutions-components/{p-182a4844.entry.js → p-265f5dc4.entry.js} +1 -1
- package/dist/solutions-components/{p-056d4371.entry.js → p-2b556610.entry.js} +1 -1
- package/dist/solutions-components/{p-d600ca73.entry.js → p-2c8360b4.entry.js} +1 -1
- package/dist/solutions-components/{p-b2a6916d.entry.js → p-2dcf8f00.entry.js} +1 -1
- package/dist/solutions-components/{p-0d879c77.entry.js → p-300ff31e.entry.js} +1 -1
- package/dist/solutions-components/{p-9e92da5e.entry.js → p-335a630e.entry.js} +1 -1
- package/dist/solutions-components/{p-91bb7fdc.js → p-3c3aecdd.js} +1 -1
- package/dist/solutions-components/{p-ea6440fd.js → p-3d20e307.js} +1 -1
- package/dist/solutions-components/{p-75fabd1c.entry.js → p-43d9bb7d.entry.js} +1 -1
- package/dist/solutions-components/{p-b8dde3e5.entry.js → p-4426901e.entry.js} +1 -1
- package/dist/solutions-components/{p-bf007c87.js → p-48942eb8.js} +2 -2
- package/dist/solutions-components/{p-79083691.entry.js → p-4bdd4009.entry.js} +1 -1
- package/dist/solutions-components/{p-b66a3619.entry.js → p-4ebc471b.entry.js} +1 -1
- package/dist/solutions-components/{p-20085e58.js → p-4f514c6d.js} +2 -2
- package/dist/solutions-components/{p-8af77823.entry.js → p-579628d9.entry.js} +1 -1
- package/dist/solutions-components/{p-3ab93412.entry.js → p-5ea1e18b.entry.js} +1 -1
- package/dist/solutions-components/{p-ec7c3f5c.entry.js → p-68d49e1a.entry.js} +1 -1
- package/dist/solutions-components/{p-5474d6f0.entry.js → p-699a9557.entry.js} +1 -1
- package/dist/solutions-components/{p-5c05f28a.entry.js → p-6d62a4fa.entry.js} +1 -1
- package/dist/solutions-components/{p-a1d1dc83.entry.js → p-6da8fe2d.entry.js} +1 -1
- package/dist/solutions-components/{p-f3ee7398.entry.js → p-70036eb6.entry.js} +1 -1
- package/dist/solutions-components/{p-c25ebd5a.entry.js → p-70e8be5c.entry.js} +1 -1
- package/dist/solutions-components/{p-e508cfaf.entry.js → p-7f6cbe61.entry.js} +1 -1
- package/dist/solutions-components/{p-0bb54295.entry.js → p-8107be38.entry.js} +1 -1
- package/dist/solutions-components/{p-a7d18a21.entry.js → p-81ae30bd.entry.js} +1 -1
- package/dist/solutions-components/p-87919d6d.entry.js +6 -0
- package/dist/solutions-components/{p-78051ff1.js → p-89fbc318.js} +1 -1
- package/dist/solutions-components/{p-1309ac58.js → p-8b218ba7.js} +1 -1
- package/dist/solutions-components/{p-20bd829d.entry.js → p-8ea0a36a.entry.js} +1 -1
- package/dist/solutions-components/{p-3ea987a7.js → p-8f7957a2.js} +1 -1
- package/dist/solutions-components/{p-d572627c.js → p-952da957.js} +1 -1
- package/dist/solutions-components/{p-60bdf635.entry.js → p-959cb673.entry.js} +1 -1
- package/dist/solutions-components/{p-e8fa98f5.entry.js → p-9d953313.entry.js} +1 -1
- package/dist/solutions-components/{p-442b2dfb.entry.js → p-a003600b.entry.js} +1 -1
- package/dist/solutions-components/{p-af2c8aa9.js → p-ac122d9e.js} +1 -1
- package/dist/solutions-components/{p-65df6acd.entry.js → p-acd2699e.entry.js} +1 -1
- package/dist/solutions-components/p-afc3ac6d.entry.js +6 -0
- package/dist/solutions-components/p-b37be371.entry.js +6 -0
- package/dist/solutions-components/{p-74b3e39c.entry.js → p-b40b5be5.entry.js} +1 -1
- package/dist/solutions-components/{p-d995adc3.entry.js → p-b560498c.entry.js} +1 -1
- package/dist/solutions-components/{p-fe9c9f03.entry.js → p-bc2548ba.entry.js} +1 -1
- package/dist/solutions-components/{p-5b3ee71d.entry.js → p-bf2598f8.entry.js} +1 -1
- package/dist/solutions-components/{p-ad03f5cf.entry.js → p-ce8377c6.entry.js} +1 -1
- package/dist/solutions-components/{p-62a0aa8e.js → p-d65f8b73.js} +1 -1
- package/dist/solutions-components/{p-6d1ee086.js → p-dc188d13.js} +1 -1
- package/dist/solutions-components/{p-fa639501.js → p-e23b4193.js} +1 -1
- package/dist/solutions-components/{p-1fb25c0c.entry.js → p-e81e2d83.entry.js} +1 -1
- package/dist/solutions-components/{p-c44cbee6.entry.js → p-e85da876.entry.js} +1 -1
- package/dist/solutions-components/{p-ed8f7591.entry.js → p-ea64b72e.entry.js} +1 -1
- package/dist/solutions-components/{p-ffa545ee.entry.js → p-eb97b5ad.entry.js} +1 -1
- package/dist/solutions-components/{p-a23de3b0.js → p-ee2cbba0.js} +1 -1
- package/dist/solutions-components/{p-097bac90.entry.js → p-ee863ffb.entry.js} +1 -1
- package/dist/solutions-components/{p-c421d92d.entry.js → p-f07a02e2.entry.js} +1 -1
- package/dist/solutions-components/{p-c5f701bd.entry.js → p-fa09caf3.entry.js} +1 -1
- package/dist/solutions-components/{p-2010e62e.entry.js → p-ff5db601.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/mapViewUtils.ts +1 -1
- package/dist/solutions-components_commit.txt +8 -5
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +6 -0
- package/dist/types/components/solution-item-accordion/solution-item-accordion.d.ts +1 -1
- package/dist/types/components.d.ts +1 -1
- package/package.json +17 -17
- package/dist/solutions-components/p-433b34a3.entry.js +0 -6
- package/dist/solutions-components/p-44105d86.entry.js +0 -6
- package/dist/solutions-components/p-8c40bdec.js +0 -7
- package/dist/solutions-components/p-a5618671.entry.js +0 -6
- /package/dist/cjs/{esri-loader-a56cbcbe.js → esri-loader-08dc41bd.js} +0 -0
- /package/dist/cjs/{typeof-920a4426.js → typeof-2a7e2dec.js} +0 -0
- /package/dist/esm/{esri-loader-781d738a.js → esri-loader-c6842c6b.js} +0 -0
- /package/dist/esm/{typeof-2511410e.js → typeof-ef2a007d.js} +0 -0
- /package/dist/solutions-components/{p-6a68306c.js → p-0a24ad5f.js} +0 -0
- /package/dist/solutions-components/{p-af7e43e0.js → p-4fe489cf.js} +0 -0
@@ -3,4 +3,4 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as t,c as i,h as s,H as e,g as n}from"./p-8c40bdec.js";import{l as o}from"./p-a4bd7b09.js";import{g as a}from"./p-1e364924.js";import{g as l}from"./p-a9a72626.js";import"./p-6a68306c.js";import"./p-d4056c1c.js";import"./p-af2c8aa9.js";const r="instant-apps-filter-list calcite-mode-light",c=["feature","geojson","wfs","csv","scene","subtype-group","point-cloud","map-image","sublayer"];function d(t){return t.replaceAll("'","''")}function h(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 p(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 u="instant-apps-filter-list__item-container--user-input",v=class{constructor(s){t(this,s),this.filterListReset=i(this,"filterListReset",7),this.filterUpdate=i(this,"filterUpdate",7),this.isLayerExpUpdated=!1,this.layerExpressions=void 0,this.autoUpdateUrl=!1,this.closeBtn=!1,this.closeBtnOnClick=void 0,this.comboboxOverlayPositioning="absolute",this.closeBtnText=void 0,this.openFilters=!1,this.extentSelector=!1,this.extentSelectorConfig=void 0,this.urlParams=void 0,this.filterCount=0,this.view=void 0,this.zoomBtn=!0,this.resetBtn=!0,this.resetFiltersOnDisconnect=!0,this.loading=void 0,this.filterLayerExpressions=void 0,this.messages=void 0,this.baseClass=r,this.initDefExpressions=void 0,this.initMapImageExpressions=void 0,this.initPointCloudFilters=void 0}watchViewHandler(){this.handleWhenView()}watchLayerExpressions(){this.resetAllFilters(),this.filterLayerExpressions=structuredClone(this.layerExpressions),this.handleLayerExpressionsUpdate()}getFilterInitState(){return Promise.resolve({initDefExpressions:this.initDefExpressions,initMapImageExpressions:this.initMapImageExpressions,initPointCloudFilters:this.initPointCloudFilters})}forceReset(){return this.resetExpressions(),Promise.resolve()}updateInitDefExpressions(t){return this.initDefExpressions=t.initDefExpressions,this.initMapImageExpressions=t.initMapImageExpressions,this.initPointCloudFilters=t.initPointCloudFilters,Promise.resolve()}getCurrentLayerExpressions(){const t=structuredClone(this.filterLayerExpressions);return Promise.resolve(t)}handleUpdatingT9nData(t){var i;return null==t||null===(i=this.filterLayerExpressions)||void 0===i||i.forEach((i=>{var s;const e=null==t?void 0:t.find((t=>t.id===i.id));null!=e&&(i.title=e.title,null===(s=i.expressions)||void 0===s||s.forEach((t=>{var i;const s=null===(i=e.expressions)||void 0===i?void 0:i.find((i=>i.id===t.id));null!=s&&(t.name=s.name)})))})),Promise.resolve()}connectedCallback(){null==this.layerExpressions&&null==this.view||(this.isLayerExpUpdated=!0,this.filterLayerExpressions=structuredClone(this.layerExpressions),this.handleLayerExpressionsUpdate())}async componentWillLoad(){this.baseClass="dark"===l(this.el)?"instant-apps-filter-list calcite-mode-dark":r,await this.initializeModules(),a(this),this.isLayerExpUpdated||(this.isLayerExpUpdated=!0,this.filterLayerExpressions=null!=this.layerExpressions?structuredClone(this.layerExpressions):[],null!=this.view&&this.handleLayerExpressionsUpdate())}componentDidRender(){var t;null!=this.resetBtnEl&&(this.resetBtnEl.disabled=!((null===(t=this.filterLayerExpressions)||void 0===t?void 0:t.length)>0))}disconnectedCallback(){this.resetFiltersOnDisconnect&&(this.isLayerExpUpdated=!1,this.filterLayerExpressions=structuredClone(this.layerExpressions),this.resetAllFilters())}async initializeModules(){const[t,i]=await o(["esri/intl","esri/geometry/support/jsonUtils"]);this.geometryJsonUtils=i,this.locale=t.getLocale(),this.intl=t}render(){const t=this.loading?this.renderLoading():this.initFilterConfig(),i=this.renderFooter();return s(e,{key:"b3949fb2efa7587520eee01619be306a936b2f05"},s("calcite-panel",{key:"2336ee3cd209346516ebb12780f7158fc88aa35c",class:this.baseClass,ref:t=>this.panelEl=t},s("slot",{key:"d7400f3192055b45d9f75d19fcac85138f2958f8",slot:"header-content",name:"filter-header-content"}),s("slot",{key:"fb684d06b51fd62fcc56129851444fad10beafc4",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,o="OR"===(null==n?void 0:n.trim())?"orOperator":"andOperator",a=this.renderZoomTo(t);return s("calcite-block",{key:t.id,heading:t.title,description:null===(i=this.messages)||void 0===i?void 0:i[o],open:!!this.openFilters||void 0,collapsible:!0},a,e)}renderCombobox(t,i){var e;return s("label",{key:"combo-select",class:u},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,selectionMode:"multiple","max-items":"6",scale:"s",overlayPositioning:this.comboboxOverlayPositioning},null===(e=i.fields)||void 0===e?void 0:e.map(((t,s)=>this.renderComboboxItem(i,t,s)))))}renderComboboxItem(t,i,e){var n;const o=this.createLabel(t,i),a=null==t?void 0:t.selectedFields,l=null!==(n=null==a?void 0:a.includes(i))&&void 0!==n&&n;return s("calcite-combobox-item",{key:`${o}-${e}`,value:i,heading:`${o}`,selected:l})}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,o,a,l,r,c,d;const h=null==i?void 0:i.min,p=null==i?void 0:i.max,v=(null==i?void 0:i.step)?i.step:1,m=null!==(e=null==i?void 0:i.field)&&void 0!==e?e:"",f=[null!=(null===(n=null==i?void 0:i.range)||void 0===n?void 0:n.min)?i.range.min:h,null!=(null===(o=null==i?void 0:i.range)||void 0===o?void 0:o.max)?i.range.max:p];return null!=h&&null!=p?s("label",{key:null==i?void 0:i.id.toString(),class:u},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:h,max:p,minValue:h,maxValue:p,"min-label":null===(l=null===(a=this.messages)||void 0===a?void 0:a.minSlider)||void 0===l?void 0:l.replace("{field}",m),"max-label":null===(c=null===(r=this.messages)||void 0===r?void 0:r.maxSlider)||void 0===c?void 0:c.replace("{field}",m),step:v,labelHandles:!0,snap:!0,value:f,"group-separator":null===(d=null==i?void 0:i.format)||void 0===d?void 0:d.digitSeparator}))):void 0}renderDatePicker(t,i){var e,n,o,a;const{min:l,max:r}=i,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:u},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,"overlay-positioning":"fixed",lang:null!==(o=this.locale)&&void 0!==o?o:"en",layout:"vertical",value:c,range:!0}),s("calcite-action",{onClick:this.handleResetDatePicker.bind(this,i,t),icon:"reset",text:null===(a=this.messages)||void 0===a?void 0:a.resetDatePicker,scale:"s"}))):null}renderFooter(){var t,i,e;const n=null!=this.closeBtnText?this.closeBtnText:null===(t=this.messages)||void 0===t?void 0:t.close,o=this.closeBtn&&this.resetBtn?"half":"full";return s("div",{class:"instant-apps-filter-list__footer",slot:"footer"},this.resetBtn?s("calcite-button",{appearance:"outline",width:o,ref:t=>this.resetBtnEl=t,onClick:this.handleResetFilter.bind(this)},null===(i=this.messages)||void 0===i?void 0:i.resetFilter):void 0,this.closeBtn?s("calcite-button",{appearance:"solid",width:o,kind:"brand",onClick:null===(e=this.closeBtnOnClick)||void 0===e?void 0:e.bind(this)},n):void 0)}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){p(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,numDisplayOption:e,displayOption:n}=i;return"string"!==s&&"coded-value"!==s&&("number"!==s&&"range"!==s&&"date"!==s||"drop-down"!==e&&"drop-down"!==n)?"number"===s||"range"===s?this.renderNumberSlider(t,i):"date"===s?this.renderDatePicker(t,i):void 0:this.renderCombobox(t,i)}async initExpressions(){this.loading=!0,null!=this.filterLayerExpressions&&null!=this.view?(await this.processExpressions(),this.loading=!1):this.loading=!1}async processExpressions(){if(this.filterLayerExpressions)for(const t of this.filterLayerExpressions)for(const i of t.expressions||[])await this.setInitExpression(t,i)}handleResetFilter(){this.resetExpressions(),this.resetAllFilters(),this.generateURLParams(),this.filterListReset.emit()}resetExpressions(){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,numDisplayOption:s,displayOption:e}=t;let n="";"string"!==i&&"coded-value"!==i&&("date"!==i||"drop-down"!==s&&"drop-down"!==e)&&("number"!==i&&"range"!==i||"drop-down"!==s&&"drop-down"!==e)?"date"===i?n="datePicker":"number"!==i&&"range"!==i||(n="numberRange"):n="combobox",n?this.resetExpressionUI(n,t):this.resetCheckbox(t),t.active=!1}))}))}resetExpressionUI(t,i){const{id:s}=i;switch(t){case"combobox":i.selectedFields=void 0;const t=this.panelEl.querySelector(`[id='${s}']`);t&&Array.from(t.children).forEach((t=>{t.selected=!1}));break;case"datePicker":i.range=void 0,p(this.panelEl.querySelector(`[id='${s}']`));break;case"numberRange":i.range=void 0;const e=this.panelEl.querySelector(`[id='${s}']`);e&&(e.minValue=i.min,e.maxValue=i.max)}}resetCheckbox(t){const{id:i}=t,s=this.panelEl.querySelector(`[id='${i}']`);null!=s&&(s.checked=!1)}resetAllFilters(){var t,i,s,e,n;if(null==this.initDefExpressions)return;const o=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==o||o.forEach((t=>{var i,s;if(!c.includes(t.type))return;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 s=this.findFilterLayer(t);return await this.getFeatureAttributes(s,i),this.handleDateField(s,i),!!(null==i?void 0:i.selectedFields)&&(i.definitionExpression=this.createDefinitionExpression(i),!0)}handleDateField(t,i){if("date"===i.type){const s=t.fields.find((({name:t})=>t===i.field));"date-only"===(null==s?void 0:s.type)&&(i.dateOnly=!0)}}createDefinitionExpression(t){var i;if(!(null===(i=t.selectedFields)||void 0===i?void 0:i.length))return"";const s=t.selectedFields.map((t=>"number"==typeof t?t:`'${d(t)}'`));return`${t.field} IN (${s.join(",")})`}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:o}=i;if(null!=o)if(this.setExpressionFormat(n,i,o),"drop-down"===(null==i?void 0:i.numDisplayOption)||"drop-down"===(null==i?void 0:i.displayOption))await this.getFeatureAttributes(n,i);else{const t=await this.calculateMinMaxStatistics(n,o),a=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(a[`min${o}`],i.format.places),i.max=this.roundMaxNumberUp(a[`max${o}`],i.format.places)):(i.min=a[`min${o}`],i.max=a[`max${o}`]),(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,o=this.findFilterLayer(t),a=await this.calculateMinMaxStatistics(o,e),l=null===(s=null==a?void 0:a[0])||void 0===s?void 0:s.attributes;if(i.min=h(l[`min${e}`]),i.max=h(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}async updateCodedValueExpression(t,i,s){var e,n;if(!(null==s?void 0:s.domain)||"coded-value"!==(null===(e=null==s?void 0:s.domain)||void 0===e?void 0:e.type))return!1;const o=this.findFilterLayer(t);await this.getFeatureAttributes(o,i);const a=s.domain.codedValues.reduce(((t,{code:i,name:s})=>(t[i]=s,t)),{});if(i.codedValues=a,null===(n=i.selectedFields)||void 0===n?void 0:n.length){const t=i.selectedFields.map((t=>"number"==typeof t?t:`'${d(t)}'`)).join(",");return i.definitionExpression=`${i.field} IN (${t})`,!0}return!1}updateRangeExpression(t,i){var s;if(!(null==i?void 0:i.domain)||"range"!==(null===(s=null==i?void 0:i.domain)||void 0===s?void 0:s.type))return!1;const{field:e,range:n}=t;return t.min=i.domain.minValue,t.max=i.domain.maxValue,!(!n||!Object.keys(n).length||(t.definitionExpression=`${e} BETWEEN ${n.min} AND ${n.max}`,0))}async getFeatureAttributes(t,i){if(!this.isLayerSupported(t))return void(i.fields=[]);const s=await this.getQueryLayer(t),{maxRecordCount:e,supportsMaxRecordCountFactor:n}=this.extractQueryCapabilities(t),o=await s.queryFeatureCount(),a=this.createQuery(s,i);await this.queryDistinctFeatures(s,a,i),this.shouldPaginate(e,o,n)&&this.handlePagination(s,a,e,n,o,i)}isLayerSupported(t){return t&&c.includes(t.type)}extractQueryCapabilities(t){var i,s,e,n,o,a;return{maxRecordCount:null!==(e=null===(s=null===(i=t.capabilities)||void 0===i?void 0:i.query)||void 0===s?void 0:s.maxRecordCount)&&void 0!==e?e:null===(n=t.sourceJSON)||void 0===n?void 0:n.maxRecordCount,supportsMaxRecordCountFactor:null===(a=null===(o=t.capabilities)||void 0===o?void 0:o.query)||void 0===a?void 0:a.supportsMaxRecordCountFactor}}createQuery(t,i){const s=t.createQuery();this.applyCacheHint(t,s);const e=null==i?void 0:i.field;if(e){const i=this.getInitDefExprFromLayer(t);s.where=i||"1=1",s.outFields=[e],s.orderByFields=[`${e} ASC`],s.returnDistinctValues=!0,s.returnGeometry=!1,s.maxRecordCountFactor=5,this.applyQueryGeometryFromExtentSelector(s)}return s}async queryDistinctFeatures(t,i,s){if(!i.outFields)return;const e=await this.queryForFeatures(t,i,i.outFields[0]);(null==e?void 0:e.length)&&(s.fields=[...new Set(e)],"string"===s.type?s.fields=s.fields.sort(((t,i)=>t.localeCompare(i))):"number"===s.type&&(s.fields=s.fields.sort(((t,i)=>t-i))))}getQueryCount(t,i){return i?5*t:t}shouldPaginate(t,i,s){const e=this.getQueryCount(t,s);return null!=t&&i>e}async handlePagination(t,i,s,e,n,o){const a=this.getQueryCount(s,e),l=[];for(let e=a;e<n;e+=a){const n=i.clone();n.num=s,n.start=e,l.push(this.queryForFeatures(t,n,i.outFields[0]))}Promise.all(l).then((t=>{t.forEach((t=>{(null==t?void 0:t.length)&&o.fields&&o.fields.push(...t)})),o.fields="string"===o.type?[...new Set(o.fields)].sort(((t,i)=>t.localeCompare(i))):"number"===o.type?[...new Set(o.fields)].sort(((t,i)=>t-i)):[...new Set(o.fields)].sort()}))}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){if(!t||!c.includes(t.type)||!i)return[];const s=this.createStatisticsQuery(t,i),e=await t.queryFeatures(s);return(null==e?void 0:e.features)||[]}createStatisticsQuery(t,i){const s=t.createQuery();return s.where=this.getInitDefExprFromLayer(t)||"1=1",this.applyCacheHint(t,s),s.outStatistics=[{onStatisticField:i,outStatisticFieldName:`max${i}`,statisticType:"max"},{onStatisticField:i,outStatisticFieldName:`min${i}`,statisticType:"min"}],this.applyQueryGeometryFromExtentSelector(s),s}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="extent"in e?e:this.geometryJsonUtils.fromJSON(e);if("extent"===(null==t?void 0:t.type)||"polygon"===(null==t?void 0:t.type))return t}}}async setInitExpression(t,i){if(!i.field||!i.type)return void await this.updateExpression(t,i,void 0);const s=this.findFilterLayer(t);s&&("not-loaded"!==s.loadStatus&&"failed"!==s.loadStatus||await s.load(),await s.when((async()=>{var e,n;const o=null===(e=s.fields)||void 0===e?void 0:e.find((({name:t})=>t===i.field)),a=null===(n=null==o?void 0:o.domain)||void 0===n?void 0:n.type;i.type="coded-value"===a||"range"===a?a:i.type,await this.updateExpression(t,i,o)})))}async updateExpression(t,i,s){await this.handleExpressionType(t,i,s)&&this.generateOutput(t)}async handleExpressionType(t,i,s){var e;switch(i.type){case"string":return await this.updateStringExpression(t,i);case"number":return await this.updateNumberExpression(t,i);case"date":return await this.updateDateExpressionBasedOnDisplayOption(t,i);case"coded-value":return await this.updateCodedValueExpression(t,i,s);case"range":return await this.updateRangeExpressionBasedOnDisplayOption(t,i,s);case"checkbox":case null:case void 0:return null!==(e=i.active)&&void 0!==e&&e;default:return!1}}async updateDateExpressionBasedOnDisplayOption(t,i){return"drop-down"===i.displayOption?await this.updateStringExpression(t,i):await this.updateDateExpression(t,i)}async updateRangeExpressionBasedOnDisplayOption(t,i,s){return"drop-down"===i.displayOption?await this.updateStringExpression(t,i):this.updateRangeExpression(i,s)}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,type:o}=t;if(t.selectedFields=e.map((({value:t})=>t)),e.length){const i=e.map((({value:t})=>"number"==typeof t?t:`'${d(t)}'`));t.definitionExpression="date"===o?i.map((t=>this.buildDateExpression(t,n))).join(" OR "):`${n} IN (${i.join(",")})`,t.active=!0}else t.definitionExpression=void 0,t.active=!1;this.generateOutput(i)}handleDatePickerRangeChange(t,i,s){const e=s.target,[n,o]=e.valueAsDate,a=n?h(Math.floor(n.getTime()),!0):void 0,l=o?h(Math.floor(o.getTime()),!0):void 0;(a||l)&&(t.definitionExpression=this.constructDefinitionExpression(t.field,a,l),t.range={min:a,max:l},t.active=!0,this.generateOutput(i))}constructDefinitionExpression(t,i,s){return i?s?`${t} BETWEEN '${i}' AND '${s}'`:`${t} > '${i}'`:`${t} < '${s}'`}handleURLParams(){if(!("URLSearchParams"in window))return;const t=new URLSearchParams(document.location.search).get("filter");if(!t)return void(this.filterCount=0);const i=t.split(";").map((t=>JSON.parse(t)));this.filterCount=this.applyFilters(i)}applyFilters(t){let i=0;return t.forEach((t=>{var s,e;const n=null===(s=this.filterLayerExpressions)||void 0===s?void 0:s.find((i=>i.id===t.layerId));n&&(null===(e=n.expressions)||void 0===e||e.forEach((s=>{var e,n;(null===(e=s.id)||void 0===e?void 0:e.toString())===(null===(n=t.expressionId)||void 0===n?void 0:n.toString())&&(this.activateExpression(s,t),i++)})))})),i}activateExpression(t,i){t.active=!0,"range"===i.type?t.range=i.range:"select"===i.type&&(t.selectedFields=i.selectedFields)}createURLParamExpression(t,i){const{id:s,range:e,selectedFields:n,type:o}=i;return"string"===o||"coded-value"===o||"drop-down"===(null==i?void 0:i.numDisplayOption)||"drop-down"===(null==i?void 0:i.displayOption)?{type:"select",layerId:t.id,expressionId:s.toString(),selectedFields:n}:"number"===o||"range"===o||"date"===o?{type:"range",layerId:t.id,expressionId:s.toString(),range:e}:{layerId:t.id,expressionId:s.toString()}}autoUpdateURLCheck(t){if(this.autoUpdateUrl){const i=t.toString()?`${window.location.pathname}?${t}`.trim():window.location.pathname;window.history.replaceState({},"",i)}}generateURLParams(){var t;if(!("URLSearchParams"in window))return;const i=new URLSearchParams(window.location.search),s=(null===(t=this.filterLayerExpressions)||void 0===t?void 0:t.flatMap((t=>{var i;return(null===(i=null==t?void 0:t.expressions)||void 0===i?void 0:i.filter((t=>t.active)).map((i=>JSON.stringify(this.createURLParamExpression(t,i)))))||[]})))||[];this.filterCount=s.length,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 o=(null==i?void 0:i.length)>0&&null!=n?`(${i.join(e)}) AND (${n})`:i.length>0?i.join(e):n;t.definitionExpression=o}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(){this.updateInitExpressions(),this.handleURLParams(),this.initExpressions()}async handleZoomTo(t){const i=this.panelEl.querySelector((null==t?void 0:t.sublayerId)?`#zoom-to-${t.id}-${t.sublayerId}`:`#zoom-to-${t.id}`),s=(t,s)=>{i&&(i.loading=t,i.disabled=s)};s(!0,!0),await this.getZoomToExtent(t);const e="point"===this.zoomToExtent.type&&1===this.zoomToExtent.count?{target:this.zoomToExtent.extent,zoom:10}:this.zoomToExtent.extent;await this.view.goTo(e),s(!1,!1)}async getZoomToExtent(t){var i;const s=this.view.allLayerViews.find((({layer:i})=>i.id===t.id)),e=s.layer,n="map-image"===e.type?e.findSublayerById(t.sublayerId):e;if("point-cloud"!==n.type&&c.includes(null==n?void 0:n.type)){const t=await this.getQueryLayer(n),s=t.createQuery();s.where=null!==(i=t.definitionExpression)&&void 0!==i?i:"1=1";const e=await t.queryExtent(s);this.zoomToExtent=Object.assign(Object.assign({},e),{type:t.geometryType})}}applyFilterToQuery(t,i){var s,e;const n=this.view.allLayerViews.find((({layer:t})=>t.id===i.id)),o=null!==(e=null===(s=null==n?void 0:n.featureEffect)||void 0===s?void 0:s.filter)&&void 0!==e?e:n.filter;o&&["objectIds","distance","geometry","spatialRelationship","units","where","timeExtent"].forEach((i=>{null!=o[i]&&(t[i]=o[i])}))}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:o}=e;t&&n&&i.push(`(${n})`),t&&null!=o&&o.length>0&&(s=s.concat(o))}this.updateFilter(t,i,s),this.generateURLParams(),this.filterUpdate.emit()}}numberWithCommas(t){return t.toLocaleString("en-US",{maximumFractionDigits:20})}scientificRounding(t,i,s){if(null==t)return;let e;if(String(t).includes("e")){const[n,o]=String(t).split("e").map((t=>Number(t)));e=Math[s](+`${n}e${o+i}`)*Math.pow(10,-i)}else e=Math[s](t*Math.pow(10,i))/Math.pow(10,i);return+e.toFixed(i)}roundMinNumberDown(t,i){return this.scientificRounding(t,i,"floor")}roundMaxNumberUp(t,i){return this.scientificRounding(t,i,"ceil")}roundNumber(t,i){var s;return null!==(s=this.scientificRounding(t,i,"round"))&&void 0!==s?s:t}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}createLabel(t,i){var s,e,n;if("coded-value"===t.type)return null===(s=t.codedValues)||void 0===s?void 0:s[i];if("number"===t.type&&"number"==typeof i){let s=i;return null!=(null===(e=t.format)||void 0===e?void 0:e.places)&&(s=this.roundNumber(i,t.format.places)),(null===(n=t.format)||void 0===n?void 0:n.digitSeparator)?this.numberWithCommas(s):s}if("date"===t.type&&!t.dateOnly){const t=this.intl.convertDateFormatToIntlOptions("short-date-long-time");return this.intl.formatDate(i,t)}return i}buildDateExpression(t,i){if(t){const s=new Date(t),e=new Date(t),n=new Date(e.setDate(s.getDate()+1)),o=`${s.getFullYear()}-${s.getMonth()+1}-${s.getDate()}`,a=`${s.getHours()}:${s.getMinutes()}:${s.getSeconds()}`,l=`${n.getHours()}:${n.getMinutes()}:${n.getSeconds()}`;return`${i} BETWEEN '${o} ${a}' AND '${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()} ${l}'`}}async getQueryLayer(t){return"sublayer"===t.type?await t.createFeatureLayer():t}applyCacheHint(t,i){var s,e;(null===(e=null===(s=null==t?void 0:t.capabilities)||void 0===s?void 0:s.query)||void 0===e?void 0:e.supportsCacheHint)&&(i.cacheHint=!0)}applyQueryGeometryFromExtentSelector(t){if(!this.extentSelector||!this.extentSelectorConfig)return;const i=this.getExtent(this.extentSelector,this.extentSelectorConfig);i&&(t.geometry=i,t.spatialRelationship="intersects")}updateInitExpressions(){if(null==this.view)return;const t=this.view.map;this.initDefExpressions={},this.initPointCloudFilters={},this.initMapImageExpressions={},t.allLayers.concat(t.allTables).forEach((t=>{if(!c.includes(t.type))return;const i=t;"point-cloud"===i.type?this.initPointCloudFilters[i.id]=i.filters:"map-image"===i.type?this.initMapImageExpressions[i.id]=i.allSublayers.reduce(((t,i)=>(t[i.id]=i.definitionExpression,t)),{}):this.initDefExpressions[i.id]=i.definitionExpression}))}get el(){return n(this)}static get watchers(){return{view:["watchViewHandler"],layerExpressions:["watchLayerExpressions"]}}};v.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%;font-size:16px;--calcite-combobox-input-height:24px}.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:64px;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}.instant-apps-filter-list calcite-input-date-picker{--calcite-font-size--1:16px}@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 m="instant-apps-social-share",f=".calcite-mode-dark",_={base:m,dialog:`${m}__dialog`,dialogEmbed:`${m}__dialog-embed`,dialogContent:`${m}__dialog-content`,options:`${m}__options`,tipContainer:`${m}__tip`,tipHeader:`${m}__tip-header`,tipContent:`${m}__tip-content`,icon:`${m}__icon`,iconContainer:`${m}__icon-container`,optionText:`${m}__option-text`,popoverButton:`${m}__popover-button`,layout:{vertical:`${m}__layout--vertical`,horizontal:`${m}__layout--horizontal`},xLogo:{light:`${m}__x-logo--light`,dark:`${m}__x-logo--dark`},success:{container:`${m}__success`,header:`${m}__success-header`,message:`${m}__success-message`,icon:`${m}__success-icon`},embed:{container:`${m}__embed`,header:`${m}__embed-header`,embedCode:{container:`${m}__embed-code`,textArea:`${m}__embed-code-text-area`,copyButton:`${m}__embed-code-copy-button`},textAreaText:`${m}__embed-text-area-text`,dimensions:{container:`${m}__embed-dimensions`,input:`${m}__embed-dimensions-input`}},rtl:{optionText:`${m}__option-text--rtl`,textArea:`${m}__text-area--rtl`}},b={facebook:"https://www.facebook.com/sharer/sharer.php?u={url}",x:"https://x.com/intent/post?url={url}",linkedIn:"https://www.linkedin.com/sharing/share-offsite/?url={url}"},g=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.popoverPositioning="absolute",this.removePopoverOffset=!1,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;a(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,o,a,l;const r=this.copied&&"popover"===this.mode?this.renderSuccess():s("div",{class:_.dialogContent},this.renderOptions(),this.displayTipText?this.renderTip():null,this.embed?this.renderEmbed():null),c="vertical"===this.shareIconsLayout?` ${_.layout.vertical}`:` ${_.layout.horizontal}`,d=" calcite-mode-"+(this.el.closest(f)?"dark":"light"),h=s("div",{key:"6fa27d9de3fff34dde6702cdbeac00b799355651",ref:t=>this.dialogContentRef=t,class:`${_.dialog}${c}${d}`},r);return s(e,{key:"d35d755dc0d1a827e7859a86366b4f03a6c02a28"},"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,"overlay-positioning":this.popoverPositioning,"offset-distance":this.removePopoverOffset?0:6,"pointer-disabled":this.removePopoverOffset},h),this.renderButton()]:[h,s("calcite-popover",{ref:t=>this.copyLinkPopoverRef=t,label:null===(o=null===(n=this.messages)||void 0===n?void 0:n.share)||void 0===o?void 0:o.label,referenceElement:"copyToClipboard",placement:this.inlineSuccessPopoverPlacement,scale:this.scale},this.renderSuccess()),s("calcite-popover",{ref:t=>this.copyEmbedPopoverRef=t,label:null===(l=null===(a=this.messages)||void 0===a?void 0:a.share)||void 0===l?void 0:l.label,referenceElement:"copyEmbedToClipboard",placement:this.inlineSuccessPopoverPlacement,scale:this.scale},this.renderEmbedSuccess())])}renderButton(){var t,i,e,n,o,a,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:_.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:_.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:_.popoverButton,appearance:"transparent",label:null===(a=null===(o=this.messages)||void 0===o?void 0:o.share)||void 0===a?void 0:a.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:"",alignment:"center"},s("div",{class:_.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:_.success.container},s("span",{class:_.success.header},s("span",{class:_.success.icon},s("calcite-icon",{icon:"check-circle-f",scale:this.scale})),null==i?void 0:i.label),s("span",{class:_.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:_.success.container},s("span",{class:_.success.header},s("span",{class:_.success.icon},s("calcite-icon",{icon:"check-circle-f",scale:this.scale})),null==i?void 0:i.label),s("span",{class:_.success.message},null==i?void 0:i.embed))}renderOptions(){var t,i,e,n;const o=null===(t=this.messages)||void 0===t?void 0:t.options,a="rtl"===document.dir?` ${_.rtl.optionText}`:"";return s("ul",{ref:t=>this.shareListRef=t,class:_.options,role:"menu"},s("li",{id:"copyToClipboard",onClick:this.handleShareItem.bind(this,"link"),onKeyDown:this.handleOptionKeyDown("link"),role:"menuitem",tabindex:"0"},s("span",{class:_.icon},s("calcite-icon",{icon:"link",scale:this.scale})),s("span",{class:`${_.optionText}${a}`},null===(i=null==o?void 0:o.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:_.icon},this.renderFacebookIcon()),s("span",{class:`${_.optionText}${a}`},null===(e=null==o?void 0:o.facebook)||void 0===e?void 0:e.label)),s("li",{onClick:this.handleShareItem.bind(this,"x"),onKeyDown:this.handleOptionKeyDown("x"),role:"menuitem",tabindex:"0"},s("span",{class:_.icon},this.renderXIcon()),s("span",{class:`${_.optionText}${a}`},"X")),s("li",{onClick:this.handleShareItem.bind(this,"linkedIn"),onKeyDown:this.handleOptionKeyDown("linkedIn"),role:"menuitem",tabindex:"0"},s("span",{class:_.icon},this.renderLinkedInIcon()),s("span",{class:`${_.optionText}${a}`},null===(n=null==o?void 0:o.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"}})))}renderXIcon(){const t=!!this.el.closest(f);return s("svg",{class:t?_.xLogo.dark:_.xLogo.light,viewBox:"0 0 1200 1227",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s("rect",{height:"400",style:{fill:"none"},width:"400",x:"56",y:"56"}),s("path",{d:"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z",fill:t?"white":"black"}))}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:_.tipContainer},s("span",{class:_.tipHeader},s("calcite-icon",{icon:"lightbulb",scale:this.scale}),s("span",null,null==i?void 0:i.label)),s("p",{class:_.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,o="rtl"===document.dir?` ${_.rtl.textArea}`:"";return s("div",{class:_.embed.container},s("span",{class:_.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:_.embed.embedCode.container},s("div",{class:_.embed.embedCode.textArea},s("textarea",{ref:t=>this.embedCodeRef=t,cols:30,rows:5,readonly:!0,class:o,value:this.getEmbedCode()}),s("button",{id:"copyEmbedToClipboard",onClick:this.copyEmbedCode.bind(this),class:_.embed.embedCode.copyButton},s("calcite-icon",{icon:"copy",scale:this.scale}),s("span",null,null==n?void 0:n.copy))),s("span",{class:_.embed.textAreaText},s("slot",{name:"text-area-text"})),s("div",{class:_.embed.dimensions.container},s("label",{class:_.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:_.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 l=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,r=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&&!l;!r&&this.shortenShareUrl&&(a=await this.shortenUrl(this.shareUrl));let c=a||this.shareUrl;switch(t){case"link":return navigator.clipboard.writeText(c),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"x":case"linkedIn":let i;r&&(i=window.open("","_blank"),this.shortenShareUrl&&(c=await this.shortenUrl(this.shareUrl)||c));const s={url:encodeURI(c)},e="x"===t?Object.assign(Object.assign({},s),{text:this.shareText}):s,[n]=await o(["esri/intl"]),a=n.substitute(b[t],e);return"popover"===this.mode&&this.closePopover(),void(r&&i?(i.location=a,i.focus()):window.open(encodeURI(a),"_blank"))}}async shortenUrl(t){var i,s;const[e]=await o(["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 o(["esri/geometry/Point","esri/geometry/SpatialReference"]),l=new n({x:i,y:s,spatialReference:new a(Object.assign({},e.toJSON()))}),r=await this.processPoint(l),{isWGS84:c,isWebMercator:d}=r.spatialReference;return this.generateShareUrlParams(r,c||d)}async processPoint(t){const{isWGS84:i,isWebMercator:s}=t.spatialReference;if(i||s)return t;const[e,n]=await o(["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,o,a;const{longitude:l,latitude:r,x:c,y:d}=t;if(void 0===l||void 0===r)return this.shareUrl;const h=this.roundValue(i?l:c),p=this.roundValue(i?r:d),{zoom:u}=this.view,v=this.roundValue(u),m=null===(e=null===(s=this.view)||void 0===s?void 0:s.popup)||void 0===e?void 0:e.selectedFeature,f=null===(o=null===(n=this.view)||void 0===n?void 0:n.popup)||void 0===o?void 0:o.visible;let _,b,g;if(m&&f&&"feature"===(null===(a=null==m?void 0:m.layer)||void 0===a?void 0:a.type)){const t=null==m?void 0:m.layer;_=null==t?void 0:t.id,b=m.attributes[t.objectIdField]}g=this.view.map.allLayers.filter((t=>!t.visible)).toArray().map((t=>t.id)).toString().replaceAll(",",";");const{type:x}=this.view,{defaultUrlParams:w}=this,y=new URL(this.shareUrl),{searchParams:$}=y;if($.get("center")&&$.delete("center"),$.get("level")&&$.delete("level"),$.get("selectedFeature")&&$.delete("selectedFeature"),$.get("hiddenLayers")&&$.delete("hiddenLayers"),$.get("viewpoint")&&$.delete("viewpoint"),"3d"===x){const{camera:t}=this.view,{heading:i,position:s,tilt:e}=t,{longitude:n,latitude:o,z:a}=s,l={longitude:this.roundValue(n,8),latitude:this.roundValue(o,8),z:this.roundValue(a,3),heading:this.roundValue(i,3),tilt:this.roundValue(e,3)};return!1!==(null==w?void 0:w.viewpoint)&&y.searchParams.set("viewpoint",`cam:${l.longitude},${l.latitude},${l.z};${l.heading},${l.tilt}`),_&&b&&!1!==(null==w?void 0:w.selectedFeature)&&y.searchParams.set("selectedFeature",`${_};${b}`),g&&!1!==(null==w?void 0:w.hiddenLayers)&&y.searchParams.set("hiddenLayers",g),y.search=decodeURIComponent(y.search),y.href}return!1!==(null==w?void 0:w.center)&&y.searchParams.set("center",`${h};${p}`),!1!==(null==w?void 0:w.level)&&y.searchParams.set("level",`${v}`),_&&b&&!1!==(null==w?void 0:w.selectedFeature)&&y.searchParams.set("selectedFeature",`${_};${b}`),g&&!1!==(null==w?void 0:w.hiddenLayers)&&y.searchParams.set("hiddenLayers",g),y.search=decodeURIComponent(y.search),y.href}roundValue(t,i=4){return parseFloat(t.toFixed(i))}get el(){return n(this)}};g.style=":host{display:block;--instant-apps-social-share-action-width:initial;--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;color:var(--calcite-color-text-1)}: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__options__x-logo--light path{fill:#000000}:host .instant-apps-social-share__options__x-logo--dark path{fill:#ffffff}: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;direction:ltr}: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 calcite-action{width:var(--instant-apps-social-share-action-width)}: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{v as instant_apps_filter_list,g as instant_apps_social_share}
|
6
|
+
import{r as t,c as i,h as s,H as e,g as n}from"./p-1b0588d2.js";import{l as o}from"./p-08ad0b7a.js";import{g as a}from"./p-173d5fce.js";import{g as l}from"./p-a9a72626.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-ac122d9e.js";const r="instant-apps-filter-list calcite-mode-light",c=["feature","geojson","wfs","csv","scene","subtype-group","point-cloud","map-image","sublayer"];function d(t){return t.replaceAll("'","''")}function h(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 p(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 u="instant-apps-filter-list__item-container--user-input",v=class{constructor(s){t(this,s),this.filterListReset=i(this,"filterListReset",7),this.filterUpdate=i(this,"filterUpdate",7),this.isLayerExpUpdated=!1,this.layerExpressions=void 0,this.autoUpdateUrl=!1,this.closeBtn=!1,this.closeBtnOnClick=void 0,this.comboboxOverlayPositioning="absolute",this.closeBtnText=void 0,this.openFilters=!1,this.extentSelector=!1,this.extentSelectorConfig=void 0,this.urlParams=void 0,this.filterCount=0,this.view=void 0,this.zoomBtn=!0,this.resetBtn=!0,this.resetFiltersOnDisconnect=!0,this.loading=void 0,this.filterLayerExpressions=void 0,this.messages=void 0,this.baseClass=r,this.initDefExpressions=void 0,this.initMapImageExpressions=void 0,this.initPointCloudFilters=void 0}watchViewHandler(){this.handleWhenView()}watchLayerExpressions(){this.resetAllFilters(),this.filterLayerExpressions=structuredClone(this.layerExpressions),this.handleLayerExpressionsUpdate()}getFilterInitState(){return Promise.resolve({initDefExpressions:this.initDefExpressions,initMapImageExpressions:this.initMapImageExpressions,initPointCloudFilters:this.initPointCloudFilters})}forceReset(){return this.resetExpressions(),Promise.resolve()}updateInitDefExpressions(t){return this.initDefExpressions=t.initDefExpressions,this.initMapImageExpressions=t.initMapImageExpressions,this.initPointCloudFilters=t.initPointCloudFilters,Promise.resolve()}getCurrentLayerExpressions(){const t=structuredClone(this.filterLayerExpressions);return Promise.resolve(t)}handleUpdatingT9nData(t){var i;return null==t||null===(i=this.filterLayerExpressions)||void 0===i||i.forEach((i=>{var s;const e=null==t?void 0:t.find((t=>t.id===i.id));null!=e&&(i.title=e.title,null===(s=i.expressions)||void 0===s||s.forEach((t=>{var i;const s=null===(i=e.expressions)||void 0===i?void 0:i.find((i=>i.id===t.id));null!=s&&(t.name=s.name)})))})),Promise.resolve()}connectedCallback(){null==this.layerExpressions&&null==this.view||(this.isLayerExpUpdated=!0,this.filterLayerExpressions=structuredClone(this.layerExpressions),this.handleLayerExpressionsUpdate())}async componentWillLoad(){this.baseClass="dark"===l(this.el)?"instant-apps-filter-list calcite-mode-dark":r,await this.initializeModules(),a(this),this.isLayerExpUpdated||(this.isLayerExpUpdated=!0,this.filterLayerExpressions=null!=this.layerExpressions?structuredClone(this.layerExpressions):[],null!=this.view&&this.handleLayerExpressionsUpdate())}componentDidRender(){var t;null!=this.resetBtnEl&&(this.resetBtnEl.disabled=!((null===(t=this.filterLayerExpressions)||void 0===t?void 0:t.length)>0))}disconnectedCallback(){this.resetFiltersOnDisconnect&&(this.isLayerExpUpdated=!1,this.filterLayerExpressions=structuredClone(this.layerExpressions),this.resetAllFilters())}async initializeModules(){const[t,i]=await o(["esri/intl","esri/geometry/support/jsonUtils"]);this.geometryJsonUtils=i,this.locale=t.getLocale(),this.intl=t}render(){const t=this.loading?this.renderLoading():this.initFilterConfig(),i=this.renderFooter();return s(e,{key:"b3949fb2efa7587520eee01619be306a936b2f05"},s("calcite-panel",{key:"2336ee3cd209346516ebb12780f7158fc88aa35c",class:this.baseClass,ref:t=>this.panelEl=t},s("slot",{key:"d7400f3192055b45d9f75d19fcac85138f2958f8",slot:"header-content",name:"filter-header-content"}),s("slot",{key:"fb684d06b51fd62fcc56129851444fad10beafc4",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,o="OR"===(null==n?void 0:n.trim())?"orOperator":"andOperator",a=this.renderZoomTo(t);return s("calcite-block",{key:t.id,heading:t.title,description:null===(i=this.messages)||void 0===i?void 0:i[o],open:!!this.openFilters||void 0,collapsible:!0},a,e)}renderCombobox(t,i){var e;return s("label",{key:"combo-select",class:u},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,selectionMode:"multiple","max-items":"6",scale:"s",overlayPositioning:this.comboboxOverlayPositioning},null===(e=i.fields)||void 0===e?void 0:e.map(((t,s)=>this.renderComboboxItem(i,t,s)))))}renderComboboxItem(t,i,e){var n;const o=this.createLabel(t,i),a=null==t?void 0:t.selectedFields,l=null!==(n=null==a?void 0:a.includes(i))&&void 0!==n&&n;return s("calcite-combobox-item",{key:`${o}-${e}`,value:i,heading:`${o}`,selected:l})}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,o,a,l,r,c,d;const h=null==i?void 0:i.min,p=null==i?void 0:i.max,v=(null==i?void 0:i.step)?i.step:1,m=null!==(e=null==i?void 0:i.field)&&void 0!==e?e:"",f=[null!=(null===(n=null==i?void 0:i.range)||void 0===n?void 0:n.min)?i.range.min:h,null!=(null===(o=null==i?void 0:i.range)||void 0===o?void 0:o.max)?i.range.max:p];return null!=h&&null!=p?s("label",{key:null==i?void 0:i.id.toString(),class:u},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:h,max:p,minValue:h,maxValue:p,"min-label":null===(l=null===(a=this.messages)||void 0===a?void 0:a.minSlider)||void 0===l?void 0:l.replace("{field}",m),"max-label":null===(c=null===(r=this.messages)||void 0===r?void 0:r.maxSlider)||void 0===c?void 0:c.replace("{field}",m),step:v,labelHandles:!0,snap:!0,value:f,"group-separator":null===(d=null==i?void 0:i.format)||void 0===d?void 0:d.digitSeparator}))):void 0}renderDatePicker(t,i){var e,n,o,a;const{min:l,max:r}=i,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:u},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,"overlay-positioning":"fixed",lang:null!==(o=this.locale)&&void 0!==o?o:"en",layout:"vertical",value:c,range:!0}),s("calcite-action",{onClick:this.handleResetDatePicker.bind(this,i,t),icon:"reset",text:null===(a=this.messages)||void 0===a?void 0:a.resetDatePicker,scale:"s"}))):null}renderFooter(){var t,i,e;const n=null!=this.closeBtnText?this.closeBtnText:null===(t=this.messages)||void 0===t?void 0:t.close,o=this.closeBtn&&this.resetBtn?"half":"full";return s("div",{class:"instant-apps-filter-list__footer",slot:"footer"},this.resetBtn?s("calcite-button",{appearance:"outline",width:o,ref:t=>this.resetBtnEl=t,onClick:this.handleResetFilter.bind(this)},null===(i=this.messages)||void 0===i?void 0:i.resetFilter):void 0,this.closeBtn?s("calcite-button",{appearance:"solid",width:o,kind:"brand",onClick:null===(e=this.closeBtnOnClick)||void 0===e?void 0:e.bind(this)},n):void 0)}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){p(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,numDisplayOption:e,displayOption:n}=i;return"string"!==s&&"coded-value"!==s&&("number"!==s&&"range"!==s&&"date"!==s||"drop-down"!==e&&"drop-down"!==n)?"number"===s||"range"===s?this.renderNumberSlider(t,i):"date"===s?this.renderDatePicker(t,i):void 0:this.renderCombobox(t,i)}async initExpressions(){this.loading=!0,null!=this.filterLayerExpressions&&null!=this.view?(await this.processExpressions(),this.loading=!1):this.loading=!1}async processExpressions(){if(this.filterLayerExpressions)for(const t of this.filterLayerExpressions)for(const i of t.expressions||[])await this.setInitExpression(t,i)}handleResetFilter(){this.resetExpressions(),this.resetAllFilters(),this.generateURLParams(),this.filterListReset.emit()}resetExpressions(){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,numDisplayOption:s,displayOption:e}=t;let n="";"string"!==i&&"coded-value"!==i&&("date"!==i||"drop-down"!==s&&"drop-down"!==e)&&("number"!==i&&"range"!==i||"drop-down"!==s&&"drop-down"!==e)?"date"===i?n="datePicker":"number"!==i&&"range"!==i||(n="numberRange"):n="combobox",n?this.resetExpressionUI(n,t):this.resetCheckbox(t),t.active=!1}))}))}resetExpressionUI(t,i){const{id:s}=i;switch(t){case"combobox":i.selectedFields=void 0;const t=this.panelEl.querySelector(`[id='${s}']`);t&&Array.from(t.children).forEach((t=>{t.selected=!1}));break;case"datePicker":i.range=void 0,p(this.panelEl.querySelector(`[id='${s}']`));break;case"numberRange":i.range=void 0;const e=this.panelEl.querySelector(`[id='${s}']`);e&&(e.minValue=i.min,e.maxValue=i.max)}}resetCheckbox(t){const{id:i}=t,s=this.panelEl.querySelector(`[id='${i}']`);null!=s&&(s.checked=!1)}resetAllFilters(){var t,i,s,e,n;if(null==this.initDefExpressions)return;const o=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==o||o.forEach((t=>{var i,s;if(!c.includes(t.type))return;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 s=this.findFilterLayer(t);return await this.getFeatureAttributes(s,i),this.handleDateField(s,i),!!(null==i?void 0:i.selectedFields)&&(i.definitionExpression=this.createDefinitionExpression(i),!0)}handleDateField(t,i){if("date"===i.type){const s=t.fields.find((({name:t})=>t===i.field));"date-only"===(null==s?void 0:s.type)&&(i.dateOnly=!0)}}createDefinitionExpression(t){var i;if(!(null===(i=t.selectedFields)||void 0===i?void 0:i.length))return"";const s=t.selectedFields.map((t=>"number"==typeof t?t:`'${d(t)}'`));return`${t.field} IN (${s.join(",")})`}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:o}=i;if(null!=o)if(this.setExpressionFormat(n,i,o),"drop-down"===(null==i?void 0:i.numDisplayOption)||"drop-down"===(null==i?void 0:i.displayOption))await this.getFeatureAttributes(n,i);else{const t=await this.calculateMinMaxStatistics(n,o),a=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(a[`min${o}`],i.format.places),i.max=this.roundMaxNumberUp(a[`max${o}`],i.format.places)):(i.min=a[`min${o}`],i.max=a[`max${o}`]),(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,o=this.findFilterLayer(t),a=await this.calculateMinMaxStatistics(o,e),l=null===(s=null==a?void 0:a[0])||void 0===s?void 0:s.attributes;if(i.min=h(l[`min${e}`]),i.max=h(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}async updateCodedValueExpression(t,i,s){var e,n;if(!(null==s?void 0:s.domain)||"coded-value"!==(null===(e=null==s?void 0:s.domain)||void 0===e?void 0:e.type))return!1;const o=this.findFilterLayer(t);await this.getFeatureAttributes(o,i);const a=s.domain.codedValues.reduce(((t,{code:i,name:s})=>(t[i]=s,t)),{});if(i.codedValues=a,null===(n=i.selectedFields)||void 0===n?void 0:n.length){const t=i.selectedFields.map((t=>"number"==typeof t?t:`'${d(t)}'`)).join(",");return i.definitionExpression=`${i.field} IN (${t})`,!0}return!1}updateRangeExpression(t,i){var s;if(!(null==i?void 0:i.domain)||"range"!==(null===(s=null==i?void 0:i.domain)||void 0===s?void 0:s.type))return!1;const{field:e,range:n}=t;return t.min=i.domain.minValue,t.max=i.domain.maxValue,!(!n||!Object.keys(n).length||(t.definitionExpression=`${e} BETWEEN ${n.min} AND ${n.max}`,0))}async getFeatureAttributes(t,i){if(!this.isLayerSupported(t))return void(i.fields=[]);const s=await this.getQueryLayer(t),{maxRecordCount:e,supportsMaxRecordCountFactor:n}=this.extractQueryCapabilities(t),o=await s.queryFeatureCount(),a=this.createQuery(s,i);await this.queryDistinctFeatures(s,a,i),this.shouldPaginate(e,o,n)&&this.handlePagination(s,a,e,n,o,i)}isLayerSupported(t){return t&&c.includes(t.type)}extractQueryCapabilities(t){var i,s,e,n,o,a;return{maxRecordCount:null!==(e=null===(s=null===(i=t.capabilities)||void 0===i?void 0:i.query)||void 0===s?void 0:s.maxRecordCount)&&void 0!==e?e:null===(n=t.sourceJSON)||void 0===n?void 0:n.maxRecordCount,supportsMaxRecordCountFactor:null===(a=null===(o=t.capabilities)||void 0===o?void 0:o.query)||void 0===a?void 0:a.supportsMaxRecordCountFactor}}createQuery(t,i){const s=t.createQuery();this.applyCacheHint(t,s);const e=null==i?void 0:i.field;if(e){const i=this.getInitDefExprFromLayer(t);s.where=i||"1=1",s.outFields=[e],s.orderByFields=[`${e} ASC`],s.returnDistinctValues=!0,s.returnGeometry=!1,s.maxRecordCountFactor=5,this.applyQueryGeometryFromExtentSelector(s)}return s}async queryDistinctFeatures(t,i,s){if(!i.outFields)return;const e=await this.queryForFeatures(t,i,i.outFields[0]);(null==e?void 0:e.length)&&(s.fields=[...new Set(e)],"string"===s.type?s.fields=s.fields.sort(((t,i)=>t.localeCompare(i))):"number"===s.type&&(s.fields=s.fields.sort(((t,i)=>t-i))))}getQueryCount(t,i){return i?5*t:t}shouldPaginate(t,i,s){const e=this.getQueryCount(t,s);return null!=t&&i>e}async handlePagination(t,i,s,e,n,o){const a=this.getQueryCount(s,e),l=[];for(let e=a;e<n;e+=a){const n=i.clone();n.num=s,n.start=e,l.push(this.queryForFeatures(t,n,i.outFields[0]))}Promise.all(l).then((t=>{t.forEach((t=>{(null==t?void 0:t.length)&&o.fields&&o.fields.push(...t)})),o.fields="string"===o.type?[...new Set(o.fields)].sort(((t,i)=>t.localeCompare(i))):"number"===o.type?[...new Set(o.fields)].sort(((t,i)=>t-i)):[...new Set(o.fields)].sort()}))}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){if(!t||!c.includes(t.type)||!i)return[];const s=this.createStatisticsQuery(t,i),e=await t.queryFeatures(s);return(null==e?void 0:e.features)||[]}createStatisticsQuery(t,i){const s=t.createQuery();return s.where=this.getInitDefExprFromLayer(t)||"1=1",this.applyCacheHint(t,s),s.outStatistics=[{onStatisticField:i,outStatisticFieldName:`max${i}`,statisticType:"max"},{onStatisticField:i,outStatisticFieldName:`min${i}`,statisticType:"min"}],this.applyQueryGeometryFromExtentSelector(s),s}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="extent"in e?e:this.geometryJsonUtils.fromJSON(e);if("extent"===(null==t?void 0:t.type)||"polygon"===(null==t?void 0:t.type))return t}}}async setInitExpression(t,i){if(!i.field||!i.type)return void await this.updateExpression(t,i,void 0);const s=this.findFilterLayer(t);s&&("not-loaded"!==s.loadStatus&&"failed"!==s.loadStatus||await s.load(),await s.when((async()=>{var e,n;const o=null===(e=s.fields)||void 0===e?void 0:e.find((({name:t})=>t===i.field)),a=null===(n=null==o?void 0:o.domain)||void 0===n?void 0:n.type;i.type="coded-value"===a||"range"===a?a:i.type,await this.updateExpression(t,i,o)})))}async updateExpression(t,i,s){await this.handleExpressionType(t,i,s)&&this.generateOutput(t)}async handleExpressionType(t,i,s){var e;switch(i.type){case"string":return await this.updateStringExpression(t,i);case"number":return await this.updateNumberExpression(t,i);case"date":return await this.updateDateExpressionBasedOnDisplayOption(t,i);case"coded-value":return await this.updateCodedValueExpression(t,i,s);case"range":return await this.updateRangeExpressionBasedOnDisplayOption(t,i,s);case"checkbox":case null:case void 0:return null!==(e=i.active)&&void 0!==e&&e;default:return!1}}async updateDateExpressionBasedOnDisplayOption(t,i){return"drop-down"===i.displayOption?await this.updateStringExpression(t,i):await this.updateDateExpression(t,i)}async updateRangeExpressionBasedOnDisplayOption(t,i,s){return"drop-down"===i.displayOption?await this.updateStringExpression(t,i):this.updateRangeExpression(i,s)}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,type:o}=t;if(t.selectedFields=e.map((({value:t})=>t)),e.length){const i=e.map((({value:t})=>"number"==typeof t?t:`'${d(t)}'`));t.definitionExpression="date"===o?i.map((t=>this.buildDateExpression(t,n))).join(" OR "):`${n} IN (${i.join(",")})`,t.active=!0}else t.definitionExpression=void 0,t.active=!1;this.generateOutput(i)}handleDatePickerRangeChange(t,i,s){const e=s.target,[n,o]=e.valueAsDate,a=n?h(Math.floor(n.getTime()),!0):void 0,l=o?h(Math.floor(o.getTime()),!0):void 0;(a||l)&&(t.definitionExpression=this.constructDefinitionExpression(t.field,a,l),t.range={min:a,max:l},t.active=!0,this.generateOutput(i))}constructDefinitionExpression(t,i,s){return i?s?`${t} BETWEEN '${i}' AND '${s}'`:`${t} > '${i}'`:`${t} < '${s}'`}handleURLParams(){if(!("URLSearchParams"in window))return;const t=new URLSearchParams(document.location.search).get("filter");if(!t)return void(this.filterCount=0);const i=t.split(";").map((t=>JSON.parse(t)));this.filterCount=this.applyFilters(i)}applyFilters(t){let i=0;return t.forEach((t=>{var s,e;const n=null===(s=this.filterLayerExpressions)||void 0===s?void 0:s.find((i=>i.id===t.layerId));n&&(null===(e=n.expressions)||void 0===e||e.forEach((s=>{var e,n;(null===(e=s.id)||void 0===e?void 0:e.toString())===(null===(n=t.expressionId)||void 0===n?void 0:n.toString())&&(this.activateExpression(s,t),i++)})))})),i}activateExpression(t,i){t.active=!0,"range"===i.type?t.range=i.range:"select"===i.type&&(t.selectedFields=i.selectedFields)}createURLParamExpression(t,i){const{id:s,range:e,selectedFields:n,type:o}=i;return"string"===o||"coded-value"===o||"drop-down"===(null==i?void 0:i.numDisplayOption)||"drop-down"===(null==i?void 0:i.displayOption)?{type:"select",layerId:t.id,expressionId:s.toString(),selectedFields:n}:"number"===o||"range"===o||"date"===o?{type:"range",layerId:t.id,expressionId:s.toString(),range:e}:{layerId:t.id,expressionId:s.toString()}}autoUpdateURLCheck(t){if(this.autoUpdateUrl){const i=t.toString()?`${window.location.pathname}?${t}`.trim():window.location.pathname;window.history.replaceState({},"",i)}}generateURLParams(){var t;if(!("URLSearchParams"in window))return;const i=new URLSearchParams(window.location.search),s=(null===(t=this.filterLayerExpressions)||void 0===t?void 0:t.flatMap((t=>{var i;return(null===(i=null==t?void 0:t.expressions)||void 0===i?void 0:i.filter((t=>t.active)).map((i=>JSON.stringify(this.createURLParamExpression(t,i)))))||[]})))||[];this.filterCount=s.length,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 o=(null==i?void 0:i.length)>0&&null!=n?`(${i.join(e)}) AND (${n})`:i.length>0?i.join(e):n;t.definitionExpression=o}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(){this.updateInitExpressions(),this.handleURLParams(),this.initExpressions()}async handleZoomTo(t){const i=this.panelEl.querySelector((null==t?void 0:t.sublayerId)?`#zoom-to-${t.id}-${t.sublayerId}`:`#zoom-to-${t.id}`),s=(t,s)=>{i&&(i.loading=t,i.disabled=s)};s(!0,!0),await this.getZoomToExtent(t);const e="point"===this.zoomToExtent.type&&1===this.zoomToExtent.count?{target:this.zoomToExtent.extent,zoom:10}:this.zoomToExtent.extent;await this.view.goTo(e),s(!1,!1)}async getZoomToExtent(t){var i;const s=this.view.allLayerViews.find((({layer:i})=>i.id===t.id)),e=s.layer,n="map-image"===e.type?e.findSublayerById(t.sublayerId):e;if("point-cloud"!==n.type&&c.includes(null==n?void 0:n.type)){const t=await this.getQueryLayer(n),s=t.createQuery();s.where=null!==(i=t.definitionExpression)&&void 0!==i?i:"1=1";const e=await t.queryExtent(s);this.zoomToExtent=Object.assign(Object.assign({},e),{type:t.geometryType})}}applyFilterToQuery(t,i){var s,e;const n=this.view.allLayerViews.find((({layer:t})=>t.id===i.id)),o=null!==(e=null===(s=null==n?void 0:n.featureEffect)||void 0===s?void 0:s.filter)&&void 0!==e?e:n.filter;o&&["objectIds","distance","geometry","spatialRelationship","units","where","timeExtent"].forEach((i=>{null!=o[i]&&(t[i]=o[i])}))}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:o}=e;t&&n&&i.push(`(${n})`),t&&null!=o&&o.length>0&&(s=s.concat(o))}this.updateFilter(t,i,s),this.generateURLParams(),this.filterUpdate.emit()}}numberWithCommas(t){return t.toLocaleString("en-US",{maximumFractionDigits:20})}scientificRounding(t,i,s){if(null==t)return;let e;if(String(t).includes("e")){const[n,o]=String(t).split("e").map((t=>Number(t)));e=Math[s](+`${n}e${o+i}`)*Math.pow(10,-i)}else e=Math[s](t*Math.pow(10,i))/Math.pow(10,i);return+e.toFixed(i)}roundMinNumberDown(t,i){return this.scientificRounding(t,i,"floor")}roundMaxNumberUp(t,i){return this.scientificRounding(t,i,"ceil")}roundNumber(t,i){var s;return null!==(s=this.scientificRounding(t,i,"round"))&&void 0!==s?s:t}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}createLabel(t,i){var s,e,n;if("coded-value"===t.type)return null===(s=t.codedValues)||void 0===s?void 0:s[i];if("number"===t.type&&"number"==typeof i){let s=i;return null!=(null===(e=t.format)||void 0===e?void 0:e.places)&&(s=this.roundNumber(i,t.format.places)),(null===(n=t.format)||void 0===n?void 0:n.digitSeparator)?this.numberWithCommas(s):s}if("date"===t.type&&!t.dateOnly){const t=this.intl.convertDateFormatToIntlOptions("short-date-long-time");return this.intl.formatDate(i,t)}return i}buildDateExpression(t,i){if(t){const s=new Date(t),e=new Date(t),n=new Date(e.setDate(s.getDate()+1)),o=`${s.getFullYear()}-${s.getMonth()+1}-${s.getDate()}`,a=`${s.getHours()}:${s.getMinutes()}:${s.getSeconds()}`,l=`${n.getHours()}:${n.getMinutes()}:${n.getSeconds()}`;return`${i} BETWEEN '${o} ${a}' AND '${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()} ${l}'`}}async getQueryLayer(t){return"sublayer"===t.type?await t.createFeatureLayer():t}applyCacheHint(t,i){var s,e;(null===(e=null===(s=null==t?void 0:t.capabilities)||void 0===s?void 0:s.query)||void 0===e?void 0:e.supportsCacheHint)&&(i.cacheHint=!0)}applyQueryGeometryFromExtentSelector(t){if(!this.extentSelector||!this.extentSelectorConfig)return;const i=this.getExtent(this.extentSelector,this.extentSelectorConfig);i&&(t.geometry=i,t.spatialRelationship="intersects")}updateInitExpressions(){if(null==this.view)return;const t=this.view.map;this.initDefExpressions={},this.initPointCloudFilters={},this.initMapImageExpressions={},t.allLayers.concat(t.allTables).forEach((t=>{if(!c.includes(t.type))return;const i=t;"point-cloud"===i.type?this.initPointCloudFilters[i.id]=i.filters:"map-image"===i.type?this.initMapImageExpressions[i.id]=i.allSublayers.reduce(((t,i)=>(t[i.id]=i.definitionExpression,t)),{}):this.initDefExpressions[i.id]=i.definitionExpression}))}get el(){return n(this)}static get watchers(){return{view:["watchViewHandler"],layerExpressions:["watchLayerExpressions"]}}};v.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%;font-size:16px;--calcite-combobox-input-height:24px}.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:64px;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}.instant-apps-filter-list calcite-input-date-picker{--calcite-font-size--1:16px}@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 m="instant-apps-social-share",f=".calcite-mode-dark",_={base:m,dialog:`${m}__dialog`,dialogEmbed:`${m}__dialog-embed`,dialogContent:`${m}__dialog-content`,options:`${m}__options`,tipContainer:`${m}__tip`,tipHeader:`${m}__tip-header`,tipContent:`${m}__tip-content`,icon:`${m}__icon`,iconContainer:`${m}__icon-container`,optionText:`${m}__option-text`,popoverButton:`${m}__popover-button`,layout:{vertical:`${m}__layout--vertical`,horizontal:`${m}__layout--horizontal`},xLogo:{light:`${m}__x-logo--light`,dark:`${m}__x-logo--dark`},success:{container:`${m}__success`,header:`${m}__success-header`,message:`${m}__success-message`,icon:`${m}__success-icon`},embed:{container:`${m}__embed`,header:`${m}__embed-header`,embedCode:{container:`${m}__embed-code`,textArea:`${m}__embed-code-text-area`,copyButton:`${m}__embed-code-copy-button`},textAreaText:`${m}__embed-text-area-text`,dimensions:{container:`${m}__embed-dimensions`,input:`${m}__embed-dimensions-input`}},rtl:{optionText:`${m}__option-text--rtl`,textArea:`${m}__text-area--rtl`}},b={facebook:"https://www.facebook.com/sharer/sharer.php?u={url}",x:"https://x.com/intent/post?url={url}",linkedIn:"https://www.linkedin.com/sharing/share-offsite/?url={url}"},g=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.popoverPositioning="absolute",this.removePopoverOffset=!1,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;a(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,o,a,l;const r=this.copied&&"popover"===this.mode?this.renderSuccess():s("div",{class:_.dialogContent},this.renderOptions(),this.displayTipText?this.renderTip():null,this.embed?this.renderEmbed():null),c="vertical"===this.shareIconsLayout?` ${_.layout.vertical}`:` ${_.layout.horizontal}`,d=" calcite-mode-"+(this.el.closest(f)?"dark":"light"),h=s("div",{key:"6fa27d9de3fff34dde6702cdbeac00b799355651",ref:t=>this.dialogContentRef=t,class:`${_.dialog}${c}${d}`},r);return s(e,{key:"d35d755dc0d1a827e7859a86366b4f03a6c02a28"},"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,"overlay-positioning":this.popoverPositioning,"offset-distance":this.removePopoverOffset?0:6,"pointer-disabled":this.removePopoverOffset},h),this.renderButton()]:[h,s("calcite-popover",{ref:t=>this.copyLinkPopoverRef=t,label:null===(o=null===(n=this.messages)||void 0===n?void 0:n.share)||void 0===o?void 0:o.label,referenceElement:"copyToClipboard",placement:this.inlineSuccessPopoverPlacement,scale:this.scale},this.renderSuccess()),s("calcite-popover",{ref:t=>this.copyEmbedPopoverRef=t,label:null===(l=null===(a=this.messages)||void 0===a?void 0:a.share)||void 0===l?void 0:l.label,referenceElement:"copyEmbedToClipboard",placement:this.inlineSuccessPopoverPlacement,scale:this.scale},this.renderEmbedSuccess())])}renderButton(){var t,i,e,n,o,a,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:_.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:_.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:_.popoverButton,appearance:"transparent",label:null===(a=null===(o=this.messages)||void 0===o?void 0:o.share)||void 0===a?void 0:a.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:"",alignment:"center"},s("div",{class:_.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:_.success.container},s("span",{class:_.success.header},s("span",{class:_.success.icon},s("calcite-icon",{icon:"check-circle-f",scale:this.scale})),null==i?void 0:i.label),s("span",{class:_.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:_.success.container},s("span",{class:_.success.header},s("span",{class:_.success.icon},s("calcite-icon",{icon:"check-circle-f",scale:this.scale})),null==i?void 0:i.label),s("span",{class:_.success.message},null==i?void 0:i.embed))}renderOptions(){var t,i,e,n;const o=null===(t=this.messages)||void 0===t?void 0:t.options,a="rtl"===document.dir?` ${_.rtl.optionText}`:"";return s("ul",{ref:t=>this.shareListRef=t,class:_.options,role:"menu"},s("li",{id:"copyToClipboard",onClick:this.handleShareItem.bind(this,"link"),onKeyDown:this.handleOptionKeyDown("link"),role:"menuitem",tabindex:"0"},s("span",{class:_.icon},s("calcite-icon",{icon:"link",scale:this.scale})),s("span",{class:`${_.optionText}${a}`},null===(i=null==o?void 0:o.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:_.icon},this.renderFacebookIcon()),s("span",{class:`${_.optionText}${a}`},null===(e=null==o?void 0:o.facebook)||void 0===e?void 0:e.label)),s("li",{onClick:this.handleShareItem.bind(this,"x"),onKeyDown:this.handleOptionKeyDown("x"),role:"menuitem",tabindex:"0"},s("span",{class:_.icon},this.renderXIcon()),s("span",{class:`${_.optionText}${a}`},"X")),s("li",{onClick:this.handleShareItem.bind(this,"linkedIn"),onKeyDown:this.handleOptionKeyDown("linkedIn"),role:"menuitem",tabindex:"0"},s("span",{class:_.icon},this.renderLinkedInIcon()),s("span",{class:`${_.optionText}${a}`},null===(n=null==o?void 0:o.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"}})))}renderXIcon(){const t=!!this.el.closest(f);return s("svg",{class:t?_.xLogo.dark:_.xLogo.light,viewBox:"0 0 1200 1227",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s("rect",{height:"400",style:{fill:"none"},width:"400",x:"56",y:"56"}),s("path",{d:"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z",fill:t?"white":"black"}))}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:_.tipContainer},s("span",{class:_.tipHeader},s("calcite-icon",{icon:"lightbulb",scale:this.scale}),s("span",null,null==i?void 0:i.label)),s("p",{class:_.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,o="rtl"===document.dir?` ${_.rtl.textArea}`:"";return s("div",{class:_.embed.container},s("span",{class:_.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:_.embed.embedCode.container},s("div",{class:_.embed.embedCode.textArea},s("textarea",{ref:t=>this.embedCodeRef=t,cols:30,rows:5,readonly:!0,class:o,value:this.getEmbedCode()}),s("button",{id:"copyEmbedToClipboard",onClick:this.copyEmbedCode.bind(this),class:_.embed.embedCode.copyButton},s("calcite-icon",{icon:"copy",scale:this.scale}),s("span",null,null==n?void 0:n.copy))),s("span",{class:_.embed.textAreaText},s("slot",{name:"text-area-text"})),s("div",{class:_.embed.dimensions.container},s("label",{class:_.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:_.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 l=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,r=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&&!l;!r&&this.shortenShareUrl&&(a=await this.shortenUrl(this.shareUrl));let c=a||this.shareUrl;switch(t){case"link":return navigator.clipboard.writeText(c),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"x":case"linkedIn":let i;r&&(i=window.open("","_blank"),this.shortenShareUrl&&(c=await this.shortenUrl(this.shareUrl)||c));const s={url:encodeURI(c)},e="x"===t?Object.assign(Object.assign({},s),{text:this.shareText}):s,[n]=await o(["esri/intl"]),a=n.substitute(b[t],e);return"popover"===this.mode&&this.closePopover(),void(r&&i?(i.location=a,i.focus()):window.open(encodeURI(a),"_blank"))}}async shortenUrl(t){var i,s;const[e]=await o(["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 o(["esri/geometry/Point","esri/geometry/SpatialReference"]),l=new n({x:i,y:s,spatialReference:new a(Object.assign({},e.toJSON()))}),r=await this.processPoint(l),{isWGS84:c,isWebMercator:d}=r.spatialReference;return this.generateShareUrlParams(r,c||d)}async processPoint(t){const{isWGS84:i,isWebMercator:s}=t.spatialReference;if(i||s)return t;const[e,n]=await o(["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,o,a;const{longitude:l,latitude:r,x:c,y:d}=t;if(void 0===l||void 0===r)return this.shareUrl;const h=this.roundValue(i?l:c),p=this.roundValue(i?r:d),{zoom:u}=this.view,v=this.roundValue(u),m=null===(e=null===(s=this.view)||void 0===s?void 0:s.popup)||void 0===e?void 0:e.selectedFeature,f=null===(o=null===(n=this.view)||void 0===n?void 0:n.popup)||void 0===o?void 0:o.visible;let _,b,g;if(m&&f&&"feature"===(null===(a=null==m?void 0:m.layer)||void 0===a?void 0:a.type)){const t=null==m?void 0:m.layer;_=null==t?void 0:t.id,b=m.attributes[t.objectIdField]}g=this.view.map.allLayers.filter((t=>!t.visible)).toArray().map((t=>t.id)).toString().replaceAll(",",";");const{type:x}=this.view,{defaultUrlParams:w}=this,y=new URL(this.shareUrl),{searchParams:$}=y;if($.get("center")&&$.delete("center"),$.get("level")&&$.delete("level"),$.get("selectedFeature")&&$.delete("selectedFeature"),$.get("hiddenLayers")&&$.delete("hiddenLayers"),$.get("viewpoint")&&$.delete("viewpoint"),"3d"===x){const{camera:t}=this.view,{heading:i,position:s,tilt:e}=t,{longitude:n,latitude:o,z:a}=s,l={longitude:this.roundValue(n,8),latitude:this.roundValue(o,8),z:this.roundValue(a,3),heading:this.roundValue(i,3),tilt:this.roundValue(e,3)};return!1!==(null==w?void 0:w.viewpoint)&&y.searchParams.set("viewpoint",`cam:${l.longitude},${l.latitude},${l.z};${l.heading},${l.tilt}`),_&&b&&!1!==(null==w?void 0:w.selectedFeature)&&y.searchParams.set("selectedFeature",`${_};${b}`),g&&!1!==(null==w?void 0:w.hiddenLayers)&&y.searchParams.set("hiddenLayers",g),y.search=decodeURIComponent(y.search),y.href}return!1!==(null==w?void 0:w.center)&&y.searchParams.set("center",`${h};${p}`),!1!==(null==w?void 0:w.level)&&y.searchParams.set("level",`${v}`),_&&b&&!1!==(null==w?void 0:w.selectedFeature)&&y.searchParams.set("selectedFeature",`${_};${b}`),g&&!1!==(null==w?void 0:w.hiddenLayers)&&y.searchParams.set("hiddenLayers",g),y.search=decodeURIComponent(y.search),y.href}roundValue(t,i=4){return parseFloat(t.toFixed(i))}get el(){return n(this)}};g.style=":host{display:block;--instant-apps-social-share-action-width:initial;--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;color:var(--calcite-color-text-1)}: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__options__x-logo--light path{fill:#000000}:host .instant-apps-social-share__options__x-logo--dark path{fill:#ffffff}: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;direction:ltr}: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 calcite-action{width:var(--instant-apps-social-share-action-width)}: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{v as instant_apps_filter_list,g as instant_apps_social_share}
|
@@ -3,4 +3,4 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as t,c as a,h as n,H as s,g as e,F as i}from"./p-8c40bdec.js";import{d as r,e as o,f as l,s as c,h as p,E as u,l as g,j as d,c as h}from"./p-3ea987a7.js";import"./p-1e364924.js";import"./p-a4bd7b09.js";import"./p-6a68306c.js";import"./p-d4056c1c.js";import"./p-af2c8aa9.js";import"./p-fa639501.js";const m="instant-apps-components__ckeditor-wrapper",v=class{constructor(n){t(this,n),this.isFocused=a(this,"isFocused",7),this.dataChanged=a(this,"dataChanged",7),this.value=void 0,this.editorInstance=void 0,this.config=void 0}updateValue(){this.value&&this.editorInstance.setData(this.value)}async componentDidLoad(){this.init()}componentDidUpdate(){this.editorInstance.setData(this.value)}render(){return n(s,{key:"26f62d5413e21916b77253476cf48f69682861d5"},n("div",{key:"45a9d7b859a21e49c81afdaa3bdd5074f1428cd5"}))}init(){this.applyStyles(),this.initEditor()}applyStyles(){if(document.getElementById(m))return;const t=document.createElement("style");t.id=m,t.innerHTML="\n .ck.ck-reset.ck-editor.ck-rounded-corners {\n margin-top: 10px !important;\n margin-left: 55px !important;\n }\n .ck-editor__editable {\n height: 70px !important;\n font-size: 0.875rem !important;\n line-height: \t1.375 !important;\n color: var(--calcite-color-text-1) !important;\n }\n\n .ck.ck-editor__editable_inline>:first-child,\n .ck.ck-editor__editable_inline>:last-child {\n --ck-spacing-large: 0.5rem !important;\n }\n\n .ck.ck-balloon-panel.ck-powered-by-balloon {\n --ck-z-modal: 700;\n z-index: 700;\n }\n\n .calcite-mode-dark .ck-editor__editable {\n color: var(--calcite-color-text-inverse) !important;\n }\n",document.head.prepend(t)}async initEditor(){const t=await this.createEditor();t&&(this.editorInstance=t,(this.value||""===this.value)&&t.setData(this.value),t.editing.view.document.on("change:isFocused",this.getEditorFocusedCallback(t)))}async createEditor(){try{let t;return t=this.config?await ClassicEditor.create(this.el,this.config):await ClassicEditor.create(this.el),this.editorInstance=t,Promise.resolve(t)}catch(t){return console.error(t),Promise.reject(null)}}getEditorFocusedCallback(t){return(a,n,s)=>{if(s)this.isFocused.emit();else{const a=t.getData();this.value!==a&&(this.value=a,this.dataChanged.emit(a))}}}get el(){return e(this)}static get watchers(){return{value:["updateValue"]}}};v.style=":host{display:block}";const _="instant-apps-language-translator-item",f={section:`${_}__section`,selected:`${_}__section--selected`,collapsed:`${_}__section--collapsed`,topRow:`${_}__top-row`,labelContainer:`${_}__label-container`,label:`${_}__label`,uiLocationPopoverContent:`${_}__ui-location-popover-content`,uiLocationItems:`${_}__ui-location-items`,uiLocationItem:`${_}__ui-location-item`,infoIcon:`${_}__info-icon`,infoButton:`${_}__info-button`,tip:`${_}__tip`,nestedInput:`${_}__nested-input`},b=class{constructor(n){t(this,n),this.translatorItemDataUpdated=a(this,"translatorItemDataUpdated",7),this.userInputs={},this.translatedInputs={},this.fieldName=void 0,this.translatedLanguageLabels=void 0,this.setting=void 0,this.userLocaleInputOnChangeCallback=void 0,this.translatedLocaleInputOnChangeCallback=void 0}get isTextEditor(){return this.setting.type===r.TextEditor}get calciteMode(){return o()?l.Dark:l.Light}get hasNestedContent(){var t;return!!(null===(t=this.setting)||void 0===t?void 0:t.content)}get tipID(){return`${this.fieldName}goTo`}componentDidLoad(){this.isTextEditor&&c.onChange("uiData",(()=>this.handleEditorCollapse()))}render(){var t;return"content"in this.setting&&(null===(t=this.setting.content)||void 0===t?void 0:t.every((t=>{var a;return 0===(null===(a=null==t?void 0:t.content)||void 0===a?void 0:a.length)})))?n(i,null):n(s,{class:this.calciteMode},this.renderBase(),this.renderPopover())}renderBase(){return n("div",{class:_},this.renderUserLocaleSection(),this.renderTranslatedLanguageSection())}renderPopover(){const t=this.getTip();return n("calcite-popover",{referenceElement:this.tipID,label:"","auto-close":"true",placement:"trailing",closable:!0},n("span",{class:f.uiLocationPopoverContent},n("span",{class:f.uiLocationItems},this.getUILocation()),t?n("span",{class:f.tip},t):null))}renderUserLocaleSection(){const t=this.getUIDataItem(),a=null==t?void 0:t.userLocaleData,s=null==a?void 0:a.value,e=this.setting.id;return n("div",{class:`${f.section}${(null==t?void 0:t.selected)?` ${f.selected}`:""}`},this.renderItemHeader(p.User,null==a?void 0:a.label,e),this.handleInputRender(p.User,s,e))}renderTranslatedLanguageSection(){var t,a;const s=this.getUIDataItem(),e=this.setting.id,i=c.get("currentLanguage"),r=c.get("portalItemResourceT9n"),o=null===(t=this.translatedLanguageLabels)||void 0===t?void 0:t[this.fieldName],l=null===(a=null==r?void 0:r[i])||void 0===a?void 0:a[e];return n("div",{class:`${f.section}${(null==s?void 0:s.selected)?` ${f.selected}`:""}`},this.renderItemHeader(p.Translation,o,e),this.handleInputRender(p.Translation,l,e))}handleInputRender(t,a,n){const s=this.getUIDataItem();return(null==s?void 0:s.expanded)?this.hasNestedContent?this.renderNestedInputs(t):this.renderInput(t,a,n):null}renderNestedInputs(t,a){const n=null!=a?a:this.setting,{content:s}=n;return null==s?void 0:s.map((a=>a.hasOwnProperty("content")?this.renderNestedInputs(t,a):this.renderNestedInput(t,a)))}renderNestedInput(t,a){var s;const e=c.get("currentLanguage"),i=c.get("portalItemResourceT9n"),r=null==a?void 0:a.id,o=null==i?void 0:i[e],l=null==o?void 0:o[r],{label:u,value:g,id:d}=a,h=t===p.Translation?null===(s=this.translatedLanguageLabels)||void 0===s?void 0:s[d]:u,m=t===p.User?g:l;return n("div",{class:f.nestedInput},this.renderItemHeader(t,h,r,a),this.renderInput(t,m,r,a))}renderItemHeader(t,a,s,e){const i=!this.hasNestedContent||!!e;return n("div",{class:f.topRow},this.renderItemHeaderLabel(t,a,e),i?this.renderCopyButton(t,s):null)}renderItemHeaderLabel(t,a,s){const e=t===p.User&&!s;return n("div",{class:f.labelContainer},s?null:this.renderExpandCollapseButton(),n("calcite-icon",{icon:this.getIcon(s),scale:"s"}),n("span",{class:f.label},a),e?this.renderInfoButton():null)}renderExpandCollapseButton(){const t=this.getUIDataItem(),a=(null==t?void 0:t.expanded)?u.Expanded:u.Collapsed;return n("calcite-action",{onClick:this.handleExpand.bind(this,t),icon:a,scale:"s",appearance:"transparent",text:""})}renderInfoButton(){return n("button",{id:this.tipID,class:f.infoButton},n("calcite-icon",{class:f.infoIcon,icon:u.Popover,scale:"s"}))}renderCopyButton(t,a){return n("calcite-action",{class:this.calciteMode,onClick:this.copySelection.bind(this,t,a),slot:"action",icon:u.Copy,appearance:"transparent",text:""})}renderInput(t,a,n,s){const e=null!=s?s:this.setting;return"string"===e.type||"textarea"===e.type?t===p.User?this.renderUserLocaleInput(a,n):this.renderTranslatedLanguageInput(a,n):this.renderTextEditor(a,t,n)}renderUserLocaleInput(t,a){return n("calcite-input",{ref:t=>this.userInputs[a]=t,key:a,id:a,class:l.Light,"data-field-name":this.fieldName,value:t,onFocus:this.handleSelection,onCalciteInputChange:this.handleUserInputChange.bind(this)})}renderTranslatedLanguageInput(t,a){return n("calcite-input",{ref:t=>this.translatedInputs[a]=t,key:a,id:a,class:l.Light,"data-field-name":this.fieldName,value:t,onFocus:this.handleSelection,onCalciteInputChange:this.handleTranslatedInputChange.bind(this)})}renderTextEditor(t,a,s){return n("instant-apps-ckeditor-wrapper",{id:s,ref:this.setEditor.bind(this,a),onDataChanged:this.handleTextEditorDataChange.bind(this,a),onIsFocused:this.handleSelection,value:null!=t?t:"","data-field-name":this.fieldName,config:{toolbar:[]}})}getUIDataItem(){if(g.uiData)return g.uiData.get(this.fieldName)}updateT9nStore(t,a){const n=c.get("currentLanguage"),s=d(n,{[t]:a});c.set("portalItemResourceT9n",s)}handleExpand(){const t=this.getUIDataItem();t.expanded=!t.expanded;const a=new Map(g.uiData);a.set(this.fieldName,t),c.set("uiData",a)}handleEditorCollapse(){var t,a;const n=c.get("uiData"),s=null==n?void 0:n.get(this.fieldName);if(!(null==s?void 0:s.expanded)&&(null===(t=this.userEditorWrapper)||void 0===t?void 0:t.editorInstance)&&(null===(a=this.translatedEditorWrapper)||void 0===a?void 0:a.editorInstance)){const{userEditorWrapper:t,translatedEditorWrapper:a}=this,n=t.editorInstance.getData();t.value=n;const s=a.editorInstance.getData();a.value=s,t.editorInstance.destroy(),a.editorInstance.destroy()}}handleSelection(t){const a=new Map(g.uiData),n=h();n.forEach((t=>{(null==a?void 0:a.get(t)).selected=!1})),n.forEach((n=>{const s=null==t?void 0:t.target;n===(null==s?void 0:s.getAttribute("data-field-name"))&&((null==a?void 0:a.get(n)).selected=!0)})),c.set("uiData",a)}getUILocation(){const t=this.getUIDataItem(),{uiLocation:a,userLocaleData:s}=t,{section:e,subsection:i}=a,r=[e.label,i.label,s.label].filter((t=>!!t));return r.map(((t,a)=>n("span",{class:f.uiLocationItem},n("span",null,t),a!==r.length-1?n("calcite-icon",{icon:"chevron-right",scale:"s"}):null)))}getTip(){const t=this.getUIDataItem(),{tip:a}=t;return a}copySelection(t,a){this.setting.type===r.TextEditor?this.copyTextEditorContent(t):this.copyCalciteInputContent(a,t)}copyTextEditorContent(t){var a,n;const s=t===p.User?null===(a=this.userEditorWrapper)||void 0===a?void 0:a.editorInstance:null===(n=this.translatedEditorWrapper)||void 0===n?void 0:n.editorInstance;setTimeout((()=>{this.selectContent(s),setTimeout((()=>this.selectContent(s)),50)}),50),this.copyContent(s)}selectContent(t){t.editing.view.focus();const{model:a}=t,n=a.createRangeIn(a.document.getRoot());a.change((t=>t.setSelection(n)))}copyContent(t){const a=t.getData(),n=document.createElement("div");n.contentEditable="true",n.innerHTML=a,document.body.appendChild(n);const s=document.createRange();s.selectNodeContents(n);const e=window.getSelection();null==e||e.removeAllRanges(),null==e||e.addRange(s),document.execCommand("copy"),document.body.removeChild(n)}copyCalciteInputContent(t,a){const n=a===p.User?this.userInputs[t]:this.translatedInputs[t];n&&(n.selectText(),navigator.clipboard.writeText(n.value))}setEditor(t,a){t===p.User?this.userEditorWrapper=a:this.translatedEditorWrapper=a}async handleUserInputChange(t){c.set("saving",!0);try{const a=t.target,n=a.id,s=a.value;this.getUIDataItem().userLocaleData.value=s,await this.userLocaleInputOnChangeCallback(n,s),c.set("saving",!1)}catch(t){c.set("saving",!1)}}async handleUserTextEditorChange(t){c.set("saving",!0);try{const a=t.detail,n=t.target.id;this.getUIDataItem().userLocaleData.value=a,await this.userLocaleInputOnChangeCallback(n,a),c.set("saving",!1)}catch(t){c.set("saving",!1)}}async handleTranslatedInputChange(t){c.set("saving",!0);try{const a=t.composedPath()[0],n=a.id;this.updateT9nStore(n,a.value);const{locale:s,resource:e}=this.getTranslatedLocaleCallbackData(),i=t.target.value;await this.translatedLocaleInputOnChangeCallback(n,i,s,e),setTimeout((()=>c.set("saving",!1)),1500),this.translatorItemDataUpdated.emit()}catch(t){console.error("Error writing to portal item resource: ",t),c.set("saving",!1)}}async handleTranslatedTextEditorChange(t){c.set("saving",!0);try{const a=t.target.id;this.updateT9nStore(a,t.detail);const{locale:n,resource:s}=this.getTranslatedLocaleCallbackData(),e=t.detail;await this.translatedLocaleInputOnChangeCallback(a,e,n,s),setTimeout((()=>c.set("saving",!1)),1500),this.translatorItemDataUpdated.emit()}catch(t){console.error("Error writing to portal item resource: ",t),c.set("saving",!1)}}handleTextEditorDataChange(t,a){t===p.User?this.handleUserTextEditorChange(a):this.handleTranslatedTextEditorChange(a)}getTranslatedLocaleCallbackData(){return{locale:c.get("currentLanguage"),resource:c.get("portalItemResource")}}getIcon(t){switch((null!=t?t:this.setting).stringType){case"title":return u.Title;case"subtitle":return u.Subtitle;case"text":return u.Text;case"button":return u.Button;case"string":return u.String;default:return u.SettingIndicator}}};b.style=".sc-instant-apps-language-translator-item-h{display:block}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item.sc-instant-apps-language-translator-item{display:flex}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item{padding:10px;border-bottom:1px solid var(--calcite-color-border-1);background-color:var(--calcite-color-foreground-2);width:49%}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item .instant-apps-language-translator-item__top-row.sc-instant-apps-language-translator-item{display:flex;align-items:center;justify-content:space-between}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item .instant-apps-language-translator-item__label-container.sc-instant-apps-language-translator-item{display:flex;align-items:center}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item .instant-apps-language-translator-item__label.sc-instant-apps-language-translator-item{display:inline-block;margin-left:10px;font-size:14px;font-weight:var(--calcite-font-weight-medium)}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item calcite-input.sc-instant-apps-language-translator-item{margin-top:10px;margin-left:55px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--last-item.sc-instant-apps-language-translator-item{border-bottom:none}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item{background-color:#f1faff}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item:first-child{margin-right:1%}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__ui-location-popover-content.sc-instant-apps-language-translator-item{display:inline-block;padding:10px;max-width:400px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__ui-location-items.sc-instant-apps-language-translator-item{display:flex}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__ui-location-item.sc-instant-apps-language-translator-item{display:flex;align-items:center;font-weight:var(--calcite-font-weight-medium);font-size:14px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__tip.sc-instant-apps-language-translator-item{display:inline-block;font-size:14px;line-height:22px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__info-icon.sc-instant-apps-language-translator-item{color:var(--calcite-color-brand)}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__info-button.sc-instant-apps-language-translator-item{border:0;background-color:transparent;cursor:pointer}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__nested-input.sc-instant-apps-language-translator-item{margin-left:60px;margin-top:8px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__nested-input.sc-instant-apps-language-translator-item calcite-input.sc-instant-apps-language-translator-item{margin-left:30px}.calcite-mode-dark.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item{background-color:#f1faff;background-color:var(--calcite-color-brand);color:var(--calcite-color-text-inverse)}.calcite-mode-dark.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item calcite-action.sc-instant-apps-language-translator-item{--calcite-ui-icon-color:var(--calcite-color-text-inverse)}.calcite-mode-dark.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item calcite-icon.sc-instant-apps-language-translator-item{color:var(--calcite-color-text-inverse)}.instant-apps-language-translator--last-item.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item{border-bottom:none}";const x="instant-apps-language-translator-search",k={base:x,input:`${x}__input`,suggestionList:`${x}__suggestion-list`,suggestionListItem:`${x}__suggestion-list-item`},y=class{constructor(n){t(this,n),this.suggestionSelected=a(this,"suggestionSelected",7),this.t9nPlaceholder=void 0,this.results=[]}render(){return n(s,{key:"80febf289e2bbfcf09636c84b5a5a83e80f377c0"},this.renderSearchInput(),this.renderSuggestions())}renderSearchInput(){return n("calcite-input",{ref:t=>this.searchInput=t,class:k.input,onCalciteInputInput:this.handleSearch.bind(this),type:"search",placeholder:this.t9nPlaceholder,icon:"search"})}renderSuggestions(){return this.results.length>0?this.renderSuggestionList():null}renderSuggestionList(){return n("ul",{class:k.suggestionList},this.results.map((t=>this.renderSuggestionListItem(t))))}renderSuggestionListItem(t){return n("li",{onClick:this.selectSuggestion.bind(this),class:k.suggestionListItem,"data-field-name":t.fieldName},t.userLocaleData.label)}handleSearch(t){var a,n;const s=null===(n=null===(a=t.target.value)||void 0===a?void 0:a.toLowerCase())||void 0===n?void 0:n.trim(),e=c.get("uiData"),i=h(),r=c.get("portalItemResourceT9n"),o=c.get("currentLanguage"),l=r[o],p=this.getSettingDataItems(i).filter(this.matchedResultsCallback(e,l,s,o));this.results=[...p.map((t=>Object.assign({fieldName:t},e.get(t))))]}matchedResultsCallback(t,a,n,s){return e=>{var i;const r=t.get(e),{label:o}=r.userLocaleData,{value:l}=r.userLocaleData,c=t.get("translatedLanguageLabels"),p=null===(i=null==c?void 0:c[s])||void 0===i?void 0:i[e],u=null==a?void 0:a[e],g=this.testUserInput(o,n),d=this.testUserInput(l,n),h=this.testUserInput(p,n),m=this.testUserInput(u,n);return g||d||h||m}}getSettingDataItems(t){return t.filter((t=>"locales"!==t&&"translatedLanguageLabels"!==t))}testUserInput(t,a){var n;return!!(null==t?void 0:t.trim())&&!!(null==a?void 0:a.trim())&&-1!==(null===(n=null==t?void 0:t.toLowerCase())||void 0===n?void 0:n.search(a))}selectSuggestion(t){const a=t.target.getAttribute("data-field-name");this.suggestionSelected.emit(a),this.resetSearchInput()}resetSearchInput(){this.searchInput.value="",this.results=[]}};y.style=".sc-instant-apps-language-translator-search-h{display:block;position:relative}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__input.sc-instant-apps-language-translator-search{width:235.5px}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list.sc-instant-apps-language-translator-search{position:absolute;margin:0;padding:0;width:100%;max-height:30vh;overflow:auto;border-left:none;background-color:var(--calcite-color-foreground-1);border:1px solid #c0c0c0;z-index:702}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list-item.sc-instant-apps-language-translator-search:first-child{border:none}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list-item.sc-instant-apps-language-translator-search{margin-top:0;padding:0.8em 1em;border-top:solid 1px rgba(110, 110, 110, 0.3);display:flex;flex-direction:column;cursor:pointer;word-break:break-word}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list-item.sc-instant-apps-language-translator-search:hover{background-color:var(--calcite-color-foreground-2)}";export{v as instant_apps_ckeditor_wrapper,b as instant_apps_language_translator_item,y as instant_apps_language_translator_search}
|
6
|
+
import{r as t,c as a,h as n,H as s,g as e,F as i}from"./p-1b0588d2.js";import{d as r,e as o,f as l,s as c,h as p,E as u,l as g,j as d,c as h}from"./p-8f7957a2.js";import"./p-173d5fce.js";import"./p-08ad0b7a.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-ac122d9e.js";import"./p-e23b4193.js";const m="instant-apps-components__ckeditor-wrapper",v=class{constructor(n){t(this,n),this.isFocused=a(this,"isFocused",7),this.dataChanged=a(this,"dataChanged",7),this.value=void 0,this.editorInstance=void 0,this.config=void 0}updateValue(){this.value&&this.editorInstance.setData(this.value)}async componentDidLoad(){this.init()}componentDidUpdate(){this.editorInstance.setData(this.value)}render(){return n(s,{key:"26f62d5413e21916b77253476cf48f69682861d5"},n("div",{key:"45a9d7b859a21e49c81afdaa3bdd5074f1428cd5"}))}init(){this.applyStyles(),this.initEditor()}applyStyles(){if(document.getElementById(m))return;const t=document.createElement("style");t.id=m,t.innerHTML="\n .ck.ck-reset.ck-editor.ck-rounded-corners {\n margin-top: 10px !important;\n margin-left: 55px !important;\n }\n .ck-editor__editable {\n height: 70px !important;\n font-size: 0.875rem !important;\n line-height: \t1.375 !important;\n color: var(--calcite-color-text-1) !important;\n }\n\n .ck.ck-editor__editable_inline>:first-child,\n .ck.ck-editor__editable_inline>:last-child {\n --ck-spacing-large: 0.5rem !important;\n }\n\n .ck.ck-balloon-panel.ck-powered-by-balloon {\n --ck-z-modal: 700;\n z-index: 700;\n }\n\n .calcite-mode-dark .ck-editor__editable {\n color: var(--calcite-color-text-inverse) !important;\n }\n",document.head.prepend(t)}async initEditor(){const t=await this.createEditor();t&&(this.editorInstance=t,(this.value||""===this.value)&&t.setData(this.value),t.editing.view.document.on("change:isFocused",this.getEditorFocusedCallback(t)))}async createEditor(){try{let t;return t=this.config?await ClassicEditor.create(this.el,this.config):await ClassicEditor.create(this.el),this.editorInstance=t,Promise.resolve(t)}catch(t){return console.error(t),Promise.reject(null)}}getEditorFocusedCallback(t){return(a,n,s)=>{if(s)this.isFocused.emit();else{const a=t.getData();this.value!==a&&(this.value=a,this.dataChanged.emit(a))}}}get el(){return e(this)}static get watchers(){return{value:["updateValue"]}}};v.style=":host{display:block}";const _="instant-apps-language-translator-item",f={section:`${_}__section`,selected:`${_}__section--selected`,collapsed:`${_}__section--collapsed`,topRow:`${_}__top-row`,labelContainer:`${_}__label-container`,label:`${_}__label`,uiLocationPopoverContent:`${_}__ui-location-popover-content`,uiLocationItems:`${_}__ui-location-items`,uiLocationItem:`${_}__ui-location-item`,infoIcon:`${_}__info-icon`,infoButton:`${_}__info-button`,tip:`${_}__tip`,nestedInput:`${_}__nested-input`},b=class{constructor(n){t(this,n),this.translatorItemDataUpdated=a(this,"translatorItemDataUpdated",7),this.userInputs={},this.translatedInputs={},this.fieldName=void 0,this.translatedLanguageLabels=void 0,this.setting=void 0,this.userLocaleInputOnChangeCallback=void 0,this.translatedLocaleInputOnChangeCallback=void 0}get isTextEditor(){return this.setting.type===r.TextEditor}get calciteMode(){return o()?l.Dark:l.Light}get hasNestedContent(){var t;return!!(null===(t=this.setting)||void 0===t?void 0:t.content)}get tipID(){return`${this.fieldName}goTo`}componentDidLoad(){this.isTextEditor&&c.onChange("uiData",(()=>this.handleEditorCollapse()))}render(){var t;return"content"in this.setting&&(null===(t=this.setting.content)||void 0===t?void 0:t.every((t=>{var a;return 0===(null===(a=null==t?void 0:t.content)||void 0===a?void 0:a.length)})))?n(i,null):n(s,{class:this.calciteMode},this.renderBase(),this.renderPopover())}renderBase(){return n("div",{class:_},this.renderUserLocaleSection(),this.renderTranslatedLanguageSection())}renderPopover(){const t=this.getTip();return n("calcite-popover",{referenceElement:this.tipID,label:"","auto-close":"true",placement:"trailing",closable:!0},n("span",{class:f.uiLocationPopoverContent},n("span",{class:f.uiLocationItems},this.getUILocation()),t?n("span",{class:f.tip},t):null))}renderUserLocaleSection(){const t=this.getUIDataItem(),a=null==t?void 0:t.userLocaleData,s=null==a?void 0:a.value,e=this.setting.id;return n("div",{class:`${f.section}${(null==t?void 0:t.selected)?` ${f.selected}`:""}`},this.renderItemHeader(p.User,null==a?void 0:a.label,e),this.handleInputRender(p.User,s,e))}renderTranslatedLanguageSection(){var t,a;const s=this.getUIDataItem(),e=this.setting.id,i=c.get("currentLanguage"),r=c.get("portalItemResourceT9n"),o=null===(t=this.translatedLanguageLabels)||void 0===t?void 0:t[this.fieldName],l=null===(a=null==r?void 0:r[i])||void 0===a?void 0:a[e];return n("div",{class:`${f.section}${(null==s?void 0:s.selected)?` ${f.selected}`:""}`},this.renderItemHeader(p.Translation,o,e),this.handleInputRender(p.Translation,l,e))}handleInputRender(t,a,n){const s=this.getUIDataItem();return(null==s?void 0:s.expanded)?this.hasNestedContent?this.renderNestedInputs(t):this.renderInput(t,a,n):null}renderNestedInputs(t,a){const n=null!=a?a:this.setting,{content:s}=n;return null==s?void 0:s.map((a=>a.hasOwnProperty("content")?this.renderNestedInputs(t,a):this.renderNestedInput(t,a)))}renderNestedInput(t,a){var s;const e=c.get("currentLanguage"),i=c.get("portalItemResourceT9n"),r=null==a?void 0:a.id,o=null==i?void 0:i[e],l=null==o?void 0:o[r],{label:u,value:g,id:d}=a,h=t===p.Translation?null===(s=this.translatedLanguageLabels)||void 0===s?void 0:s[d]:u,m=t===p.User?g:l;return n("div",{class:f.nestedInput},this.renderItemHeader(t,h,r,a),this.renderInput(t,m,r,a))}renderItemHeader(t,a,s,e){const i=!this.hasNestedContent||!!e;return n("div",{class:f.topRow},this.renderItemHeaderLabel(t,a,e),i?this.renderCopyButton(t,s):null)}renderItemHeaderLabel(t,a,s){const e=t===p.User&&!s;return n("div",{class:f.labelContainer},s?null:this.renderExpandCollapseButton(),n("calcite-icon",{icon:this.getIcon(s),scale:"s"}),n("span",{class:f.label},a),e?this.renderInfoButton():null)}renderExpandCollapseButton(){const t=this.getUIDataItem(),a=(null==t?void 0:t.expanded)?u.Expanded:u.Collapsed;return n("calcite-action",{onClick:this.handleExpand.bind(this,t),icon:a,scale:"s",appearance:"transparent",text:""})}renderInfoButton(){return n("button",{id:this.tipID,class:f.infoButton},n("calcite-icon",{class:f.infoIcon,icon:u.Popover,scale:"s"}))}renderCopyButton(t,a){return n("calcite-action",{class:this.calciteMode,onClick:this.copySelection.bind(this,t,a),slot:"action",icon:u.Copy,appearance:"transparent",text:""})}renderInput(t,a,n,s){const e=null!=s?s:this.setting;return"string"===e.type||"textarea"===e.type?t===p.User?this.renderUserLocaleInput(a,n):this.renderTranslatedLanguageInput(a,n):this.renderTextEditor(a,t,n)}renderUserLocaleInput(t,a){return n("calcite-input",{ref:t=>this.userInputs[a]=t,key:a,id:a,class:l.Light,"data-field-name":this.fieldName,value:t,onFocus:this.handleSelection,onCalciteInputChange:this.handleUserInputChange.bind(this)})}renderTranslatedLanguageInput(t,a){return n("calcite-input",{ref:t=>this.translatedInputs[a]=t,key:a,id:a,class:l.Light,"data-field-name":this.fieldName,value:t,onFocus:this.handleSelection,onCalciteInputChange:this.handleTranslatedInputChange.bind(this)})}renderTextEditor(t,a,s){return n("instant-apps-ckeditor-wrapper",{id:s,ref:this.setEditor.bind(this,a),onDataChanged:this.handleTextEditorDataChange.bind(this,a),onIsFocused:this.handleSelection,value:null!=t?t:"","data-field-name":this.fieldName,config:{toolbar:[]}})}getUIDataItem(){if(g.uiData)return g.uiData.get(this.fieldName)}updateT9nStore(t,a){const n=c.get("currentLanguage"),s=d(n,{[t]:a});c.set("portalItemResourceT9n",s)}handleExpand(){const t=this.getUIDataItem();t.expanded=!t.expanded;const a=new Map(g.uiData);a.set(this.fieldName,t),c.set("uiData",a)}handleEditorCollapse(){var t,a;const n=c.get("uiData"),s=null==n?void 0:n.get(this.fieldName);if(!(null==s?void 0:s.expanded)&&(null===(t=this.userEditorWrapper)||void 0===t?void 0:t.editorInstance)&&(null===(a=this.translatedEditorWrapper)||void 0===a?void 0:a.editorInstance)){const{userEditorWrapper:t,translatedEditorWrapper:a}=this,n=t.editorInstance.getData();t.value=n;const s=a.editorInstance.getData();a.value=s,t.editorInstance.destroy(),a.editorInstance.destroy()}}handleSelection(t){const a=new Map(g.uiData),n=h();n.forEach((t=>{(null==a?void 0:a.get(t)).selected=!1})),n.forEach((n=>{const s=null==t?void 0:t.target;n===(null==s?void 0:s.getAttribute("data-field-name"))&&((null==a?void 0:a.get(n)).selected=!0)})),c.set("uiData",a)}getUILocation(){const t=this.getUIDataItem(),{uiLocation:a,userLocaleData:s}=t,{section:e,subsection:i}=a,r=[e.label,i.label,s.label].filter((t=>!!t));return r.map(((t,a)=>n("span",{class:f.uiLocationItem},n("span",null,t),a!==r.length-1?n("calcite-icon",{icon:"chevron-right",scale:"s"}):null)))}getTip(){const t=this.getUIDataItem(),{tip:a}=t;return a}copySelection(t,a){this.setting.type===r.TextEditor?this.copyTextEditorContent(t):this.copyCalciteInputContent(a,t)}copyTextEditorContent(t){var a,n;const s=t===p.User?null===(a=this.userEditorWrapper)||void 0===a?void 0:a.editorInstance:null===(n=this.translatedEditorWrapper)||void 0===n?void 0:n.editorInstance;setTimeout((()=>{this.selectContent(s),setTimeout((()=>this.selectContent(s)),50)}),50),this.copyContent(s)}selectContent(t){t.editing.view.focus();const{model:a}=t,n=a.createRangeIn(a.document.getRoot());a.change((t=>t.setSelection(n)))}copyContent(t){const a=t.getData(),n=document.createElement("div");n.contentEditable="true",n.innerHTML=a,document.body.appendChild(n);const s=document.createRange();s.selectNodeContents(n);const e=window.getSelection();null==e||e.removeAllRanges(),null==e||e.addRange(s),document.execCommand("copy"),document.body.removeChild(n)}copyCalciteInputContent(t,a){const n=a===p.User?this.userInputs[t]:this.translatedInputs[t];n&&(n.selectText(),navigator.clipboard.writeText(n.value))}setEditor(t,a){t===p.User?this.userEditorWrapper=a:this.translatedEditorWrapper=a}async handleUserInputChange(t){c.set("saving",!0);try{const a=t.target,n=a.id,s=a.value;this.getUIDataItem().userLocaleData.value=s,await this.userLocaleInputOnChangeCallback(n,s),c.set("saving",!1)}catch(t){c.set("saving",!1)}}async handleUserTextEditorChange(t){c.set("saving",!0);try{const a=t.detail,n=t.target.id;this.getUIDataItem().userLocaleData.value=a,await this.userLocaleInputOnChangeCallback(n,a),c.set("saving",!1)}catch(t){c.set("saving",!1)}}async handleTranslatedInputChange(t){c.set("saving",!0);try{const a=t.composedPath()[0],n=a.id;this.updateT9nStore(n,a.value);const{locale:s,resource:e}=this.getTranslatedLocaleCallbackData(),i=t.target.value;await this.translatedLocaleInputOnChangeCallback(n,i,s,e),setTimeout((()=>c.set("saving",!1)),1500),this.translatorItemDataUpdated.emit()}catch(t){console.error("Error writing to portal item resource: ",t),c.set("saving",!1)}}async handleTranslatedTextEditorChange(t){c.set("saving",!0);try{const a=t.target.id;this.updateT9nStore(a,t.detail);const{locale:n,resource:s}=this.getTranslatedLocaleCallbackData(),e=t.detail;await this.translatedLocaleInputOnChangeCallback(a,e,n,s),setTimeout((()=>c.set("saving",!1)),1500),this.translatorItemDataUpdated.emit()}catch(t){console.error("Error writing to portal item resource: ",t),c.set("saving",!1)}}handleTextEditorDataChange(t,a){t===p.User?this.handleUserTextEditorChange(a):this.handleTranslatedTextEditorChange(a)}getTranslatedLocaleCallbackData(){return{locale:c.get("currentLanguage"),resource:c.get("portalItemResource")}}getIcon(t){switch((null!=t?t:this.setting).stringType){case"title":return u.Title;case"subtitle":return u.Subtitle;case"text":return u.Text;case"button":return u.Button;case"string":return u.String;default:return u.SettingIndicator}}};b.style=".sc-instant-apps-language-translator-item-h{display:block}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item.sc-instant-apps-language-translator-item{display:flex}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item{padding:10px;border-bottom:1px solid var(--calcite-color-border-1);background-color:var(--calcite-color-foreground-2);width:49%}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item .instant-apps-language-translator-item__top-row.sc-instant-apps-language-translator-item{display:flex;align-items:center;justify-content:space-between}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item .instant-apps-language-translator-item__label-container.sc-instant-apps-language-translator-item{display:flex;align-items:center}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item .instant-apps-language-translator-item__label.sc-instant-apps-language-translator-item{display:inline-block;margin-left:10px;font-size:14px;font-weight:var(--calcite-font-weight-medium)}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item calcite-input.sc-instant-apps-language-translator-item{margin-top:10px;margin-left:55px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--last-item.sc-instant-apps-language-translator-item{border-bottom:none}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item{background-color:#f1faff}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item:first-child{margin-right:1%}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__ui-location-popover-content.sc-instant-apps-language-translator-item{display:inline-block;padding:10px;max-width:400px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__ui-location-items.sc-instant-apps-language-translator-item{display:flex}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__ui-location-item.sc-instant-apps-language-translator-item{display:flex;align-items:center;font-weight:var(--calcite-font-weight-medium);font-size:14px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__tip.sc-instant-apps-language-translator-item{display:inline-block;font-size:14px;line-height:22px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__info-icon.sc-instant-apps-language-translator-item{color:var(--calcite-color-brand)}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__info-button.sc-instant-apps-language-translator-item{border:0;background-color:transparent;cursor:pointer}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__nested-input.sc-instant-apps-language-translator-item{margin-left:60px;margin-top:8px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__nested-input.sc-instant-apps-language-translator-item calcite-input.sc-instant-apps-language-translator-item{margin-left:30px}.calcite-mode-dark.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item{background-color:#f1faff;background-color:var(--calcite-color-brand);color:var(--calcite-color-text-inverse)}.calcite-mode-dark.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item calcite-action.sc-instant-apps-language-translator-item{--calcite-ui-icon-color:var(--calcite-color-text-inverse)}.calcite-mode-dark.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item calcite-icon.sc-instant-apps-language-translator-item{color:var(--calcite-color-text-inverse)}.instant-apps-language-translator--last-item.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item{border-bottom:none}";const x="instant-apps-language-translator-search",k={base:x,input:`${x}__input`,suggestionList:`${x}__suggestion-list`,suggestionListItem:`${x}__suggestion-list-item`},y=class{constructor(n){t(this,n),this.suggestionSelected=a(this,"suggestionSelected",7),this.t9nPlaceholder=void 0,this.results=[]}render(){return n(s,{key:"80febf289e2bbfcf09636c84b5a5a83e80f377c0"},this.renderSearchInput(),this.renderSuggestions())}renderSearchInput(){return n("calcite-input",{ref:t=>this.searchInput=t,class:k.input,onCalciteInputInput:this.handleSearch.bind(this),type:"search",placeholder:this.t9nPlaceholder,icon:"search"})}renderSuggestions(){return this.results.length>0?this.renderSuggestionList():null}renderSuggestionList(){return n("ul",{class:k.suggestionList},this.results.map((t=>this.renderSuggestionListItem(t))))}renderSuggestionListItem(t){return n("li",{onClick:this.selectSuggestion.bind(this),class:k.suggestionListItem,"data-field-name":t.fieldName},t.userLocaleData.label)}handleSearch(t){var a,n;const s=null===(n=null===(a=t.target.value)||void 0===a?void 0:a.toLowerCase())||void 0===n?void 0:n.trim(),e=c.get("uiData"),i=h(),r=c.get("portalItemResourceT9n"),o=c.get("currentLanguage"),l=r[o],p=this.getSettingDataItems(i).filter(this.matchedResultsCallback(e,l,s,o));this.results=[...p.map((t=>Object.assign({fieldName:t},e.get(t))))]}matchedResultsCallback(t,a,n,s){return e=>{var i;const r=t.get(e),{label:o}=r.userLocaleData,{value:l}=r.userLocaleData,c=t.get("translatedLanguageLabels"),p=null===(i=null==c?void 0:c[s])||void 0===i?void 0:i[e],u=null==a?void 0:a[e],g=this.testUserInput(o,n),d=this.testUserInput(l,n),h=this.testUserInput(p,n),m=this.testUserInput(u,n);return g||d||h||m}}getSettingDataItems(t){return t.filter((t=>"locales"!==t&&"translatedLanguageLabels"!==t))}testUserInput(t,a){var n;return!!(null==t?void 0:t.trim())&&!!(null==a?void 0:a.trim())&&-1!==(null===(n=null==t?void 0:t.toLowerCase())||void 0===n?void 0:n.search(a))}selectSuggestion(t){const a=t.target.getAttribute("data-field-name");this.suggestionSelected.emit(a),this.resetSearchInput()}resetSearchInput(){this.searchInput.value="",this.results=[]}};y.style=".sc-instant-apps-language-translator-search-h{display:block;position:relative}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__input.sc-instant-apps-language-translator-search{width:235.5px}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list.sc-instant-apps-language-translator-search{position:absolute;margin:0;padding:0;width:100%;max-height:30vh;overflow:auto;border-left:none;background-color:var(--calcite-color-foreground-1);border:1px solid #c0c0c0;z-index:702}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list-item.sc-instant-apps-language-translator-search:first-child{border:none}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list-item.sc-instant-apps-language-translator-search{margin-top:0;padding:0.8em 1em;border-top:solid 1px rgba(110, 110, 110, 0.3);display:flex;flex-direction:column;cursor:pointer;word-break:break-word}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list-item.sc-instant-apps-language-translator-search:hover{background-color:var(--calcite-color-foreground-2)}";export{v as instant_apps_ckeditor_wrapper,b as instant_apps_language_translator_item,y as instant_apps_language_translator_search}
|
@@ -3,4 +3,4 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as n,c as t,h as i,H as e,g as o}from"./p-8c40bdec.js";import{l as a}from"./p-a4bd7b09.js";import{g as s}from"./p-1e364924.js";import{g as r}from"./p-a9a72626.js";import"./p-6a68306c.js";import"./p-d4056c1c.js";import"./p-af2c8aa9.js";const p="instant-apps-export calcite-mode-light",c="instant-apps-export-print",l="instant-apps-export-print__legend-container",d="instant-apps-export-print__compass-container",h="instant-apps-export-print__scale-bar-container",u="instant-apps-export-print__popup-container",v="instant-apps-export-print__popup-content",_="instant-apps-export-print__popup-title",x="instant-apps-export-print__view",b="instant-apps-export-print__view-container",g="instant-apps-export-print__views-container",f="instant-apps-export-print__view-wrapper",m="instant-apps-export-print__view-content",w="instant-apps-export-print__view-header",k=class{constructor(i){n(this,i),this.exportOutputUpdated=t(this,"exportOutputUpdated",7),this.legends={},this.compasses={},this.output=void 0,this.beforeExport=()=>Promise.resolve(),this.popoverIcon="export",this.includeLegend=!0,this.includeMap=!0,this.includePopup=!1,this.includeHeader=!1,this.mode="popover",this.popoverPositioning="absolute",this.popoverPlacement="auto",this.scale="m",this.showIncludeLegend=!0,this.showIncludeMap=!1,this.showIncludePopup=!0,this.showIncludeHeader=!0,this.showScaleBar=!1,this.exportViews=void 0,this.baseClass=p,this.exportIsLoading=void 0,this.messages=void 0}watchIncludeMap(n){var t;n&&(null===(t=this.exportViews)||void 0===t||t.forEach((({view:n},t)=>{const i=this.printEl.querySelector(`#legend-${t}`);null!=i&&this.updateLegend(n,t,i)})))}watchView(){var n;null===(n=this.exportViews)||void 0===n||n.forEach((({view:n},t)=>{this.handleIncludePopup(n,t)}))}async componentWillLoad(){this.baseClass="dark"===r(this.el)?"instant-apps-export calcite-mode-dark":p,s(this),await this.initializeModules()}componentDidLoad(){var n;this.printContainerEl.prepend(this.printEl),null===(n=this.exportViews)||void 0===n||n.forEach((({view:n},t)=>{this.handleIncludePopup(n,t)}))}componentDidUpdate(){var n;null===(n=this.exportViews)||void 0===n||n.forEach((({view:n},t)=>{const i=this.printEl.querySelector(`#legend-${t}`);this.updateLegend(n,t,i)}))}async initializeModules(){const[n,t]=await a(["esri/core/Handles","esri/core/reactiveUtils"]);return this.handles=new n,this.reactiveUtils=t,Promise.resolve()}render(){const n="popover"===this.mode?this.renderPopover():this.renderPanel();return i(e,{key:"52f53735afba2085f45bdd8ba64e8e37b48318bb"},i("div",{key:"ac8fc3e66ccc5f9c27e25642bbe640c3fc8c7d33",class:this.baseClass,onMouseEnter:this.handleWidgetCreation.bind(this),onFocusin:this.handleWidgetCreation.bind(this)},n))}renderPopover(){var n,t,e;const o=this.renderPanel();return[i("calcite-popover",{referenceElement:"export-popover-btn",label:null===(n=this.messages)||void 0===n?void 0:n.exportPopover,overlayPositioning:this.popoverPositioning,placement:this.popoverPlacement,autoClose:!0,ref:n=>this.popoverEl=n},o),i("calcite-action",{id:"export-popover-btn",alignment:"center",icon:this.popoverIcon,scale:this.scale,title:null===(t=this.messages)||void 0===t?void 0:t.exportBtn,text:null===(e=this.messages)||void 0===e?void 0:e.exportBtn})]}renderPanel(){var n;const t=this.showIncludeMap?this.renderSwitch("includeMap"):null,e=this.includeMap?this.renderMapOptions():null,o=this.renderPrint();return i("div",{class:"inline"===this.mode?"instant-apps-export__inline-container":"instant-apps-export__popover-container"},t,e,i("calcite-button",{width:"full",onClick:this.exportOnClick.bind(this),disabled:this.exportIsLoading},null===(n=this.messages)||void 0===n?void 0:n.export),o)}renderSwitch(n,t){var e;const o=null!=t?t:null===(e=this.messages)||void 0===e?void 0:e[n];return i("calcite-label",{layout:"inline-space-between"},o,i("calcite-switch",{checked:this[n],value:n,onCalciteSwitchChange:this.optionOnChange.bind(this)}))}renderMapOptions(){const n=this.showIncludeHeader?this.renderSwitch("includeHeader","Include header"):null,t=this.showIncludeLegend?this.renderSwitch("includeLegend"):null,e=this.showIncludePopup?this.renderSwitch("includePopup"):null;return i("div",null,n,t,e)}renderPrint(){var n;return i("div",{ref:n=>this.printContainerEl=n},i("div",{class:c,ref:n=>this.printEl=n},i("div",{class:g},null===(n=this.exportViews)||void 0===n?void 0:n.map((({title:n,view:t},e)=>{var o,a;const s=null===(a=null===(o=t.map)||void 0===o?void 0:o.portalItem)||void 0===a?void 0:a.id,r=this.includeMap?this.renderPrintMap(n,e):null,p=this.includeMap&&this.showIncludeLegend?this.renderLegend(e):null,c=this.includeMap&&this.showIncludePopup?this.renderPopup(e):null;return i("div",{key:s,id:`print-${e}`,class:m},r,p,c)})))))}renderPrintMap(n,t){return i("div",{id:`view-container-${t}`,class:b},i("div",{id:`view-wrapper-${t}`,class:f},this.includeHeader&&n?i("div",{class:w},i("h1",null,n)):null,i("img",{id:`view-${t}`,class:x}),i("div",{id:`scalebar-container-${t}`,class:h})))}renderLegend(n){return i("div",{id:`legend-${n}`,class:l})}renderCompass(n){return i("div",{id:`compass-${n}`,class:d})}renderPopup(n){return i("div",{id:`popup-${n}`,class:u},i("div",{id:`popup-title-${n}`,class:_}),i("div",{id:`popup-content-${n}`,class:v}))}optionOnChange(n){const{checked:t,value:i}=n.target;this[i]=t,this.updateExportOutput()}async exportOnClick(){var n;await this.beforeExport(),(null===(n=this.exportViews)||void 0===n?void 0:n.length)?(this.addPrintStyling(),document.body.prepend(this.printEl),this.exportViews.forEach((({view:n},t)=>{this.handleViewExportOnClick(n,t)})),this.handleImgLoaded()):null!=this.popoverEl&&(this.popoverEl.open=!1)}async handleViewExportOnClick(n,t){this.includeMap&&(this.updateScaleBar(n,t),this.updatePopupToPrint(n,t),this.viewScreenshot(n,t),this.handleLegendSetup(t))}addPrintStyling(){null==this.printStyleEl&&(this.printStyleEl=document.createElement("style"),this.printStyleEl.innerHTML='\n @media print {\n @page {\n size: Portrait;\n margin: .25in;\n }\n\n html, body {\n padding: 0;\n margin: 0;\n height: 100%;\n width: 100%;\n }\n\n body > *:not(.instant-apps-export-print) { display: none; }\n }\n\n * {\n -webkit-print-color-adjust: exact;\n color-adjust: exact;\n }\n\n instant-apps-header {\n height: 50px;\n display: block;\n }\n\n\n .instant-apps-export-print {\n z-index: -999;\n color: #323232 !important;\n display: grid;\n grid-auto-flow: row;\n --esri-calcite-mode-name: "light";\n position: absolute;\n }\n\n .instant-apps-export-print__view-header {\n background: #fff;\n }\n\n .instant-apps-export-print__view-header h1 {\n font-size: 16px;\n font-weight: 500;\n color: #323232;\n margin: 6px;\n }\n\n .instant-apps-export-print__views-container {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .instant-apps-export-print__view-content:first-child {\n page-break-before: unset;\n } \n\n .instant-apps-export-print__view-content {\n height: 100%;\n display: flex;\n flex-direction: column;\n gap: 32px;\n page-break-before: always;\n }\n\n .instant-apps-export-print, .instant-apps-export-print * {\n box-sizing: border-box;\n }\n\n .instant-apps-export-print__view-section {\n height: 100%;\n }\n\n .instant-apps-export-print__view-container {\n height: 100%;\n width: 100%;\n break-inside: avoid;\n }\n\n .instant-apps-export-print__view-wrapper {\n height: fit-content;\n width: min-content;\n position: relative;\n display: flex;\n flex-direction: column;\n border: 2pt solid #323232;\n overflow: hidden;\n }\n\n .instant-apps-export-print__view {\n max-height: 60vh;\n max-width: calc(100vw - .25in);\n object-fit: contain;\n }\n\n .instant-apps-export-print__popup-container {\n height: min-content;\n max-width: 350px;\n display: none;\n color: #323232;\n background: #fff;\n border: 1pt solid #323232;\n break-inside: avoid;\n }\n\n .instant-apps-export-print__popup-title {\n border-bottom: 1pt solid #323232;\n }\n\n .instant-apps-export-print__popup-content {\n background: #fff;\n padding-top: 8pt;\n }\n\n .instant-apps-export-print__popup-content .esri-feature-media__chart {\n background: #fff;\n }\n\n .instant-apps-export-print__legend-container {\n height: min-content;\n background: #fff;\n overflow: unset;\n }\n\n .esri-legend--card, .esri-legend--card__service-content {\n flex-flow: row wrap;\n }\n\n .instant-apps-export-print .esri-widget > *:not(.esri-scale-bar.esri-widget > *) {\n background: #fff;\n color: #323232;\n }\n\n .instant-apps-export-print__popup-content * {\n color: #323232;\n }\n\n .instant-apps-export-print .esri-widget__heading {\n margin: 2pt 7pt;\n padding: 0;\n color: #323232;\n }\n\n .instant-apps-export-print .esri-legend__ramp-label:before {\n border-color: rgba(0,0,0,0) rgba(50,50,50,.8) rgba(0,0,0,0) rgba(0,0,0,0);\n }\n\n .instant-apps-export-print .esri-legend--card__section {\n padding: 4pt 0 4pt;\n min-width: unset;\n border-left: none;\n }\n\n .instant-apps-export-print .esri-legend--card__section:first-child {\n border-left: none;\n }\n\n .instant-apps-export-print .esri-legend--card__service {\n border: none;\n flex: 0 1 auto;\n break-inside: avoid;\n }\n\n .instant-apps-export-print .esri-legend--card {\n border: none;\n gap: 6pt 12pt;\n }\n\n .instant-apps-export-print .esri-legend--card:not(:first-child),\n .instant-apps-export-print .esri-compass.esri-widget:not(:first-child) {\n display: none;\n }\n\n .instant-apps-export-print .esri-legend--card__service-caption-container {\n height: unset;\n padding: 0;\n border-bottom: none;\n }\n\n .instant-apps-export-print .esri-legend--card__service-caption-text {\n padding-bottom: 4px;\n }\n\n .instant-apps-export-print__compass-container {\n position: absolute;\n top: 65px;\n left: 15px;\n background: #fff;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n --calcite-ui-icon-color: #000;\n border-radius: 50%;\n height: fit-content;\n }\n\n .instant-apps-export-print__compass-container .esri-compass {\n background: #fff;\n }\n\n .instant-apps-export-print__compass-container .esri-compass__icon.esri-icon-compass {\n color: #000;\n }\n\n .instant-apps-export-print__compass-container.esri-compass.esri-widget--button {\n background: #fff;\n }\n\n .instant-apps-export-print__scale-bar-container {\n width: 100%;\n position: absolute;\n bottom: 15px;\n margin: 0 15px;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__label {\n color: #323232;\n font-size: 10px;\n padding: 0 4px;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__label-container--line {\n height: 16px;\n overflow: hidden;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__label-container--top {\n bottom: 1px;\n }\n \n .instant-apps-export-print__scale-bar-container--position .esri-scale-bar__label {\n height: 10px;\n padding: 0 2px;\n line-height: 11px;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__bar-container:nth-child(1n+3) {\n display: none;\n }\n\n .instant-apps-export-print__scale-bar-container--position .esri-scale-bar__bar-container.esri-scale-bar__bar-container--line {\n align-items: center;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line {\n background-color: rgba(255, 255, 255, 0.66);\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--top {\n width: var(--instant-apps-scale-bar-top) !important;\n border-bottom: 2px solid #323232;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--bottom {\n width: var(--instant-apps-scale-bar-bottom) !important;\n border-top: 2px solid #323232;\n }\n\n .instant-apps-export-print__scale-bar-container--position .esri-scale-bar__label-container--line {\n position: unset;\n margin: 0 2px;\n background-color: rgba(255, 255, 255, 0.66);\n height: 10px;\n display: flex;\n align-items: center;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--top:before,\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--top:after,\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--bottom:before,\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--bottom:after {\n background-color: #323232;\n border-right: 2px solid #323232;\n }\n\n .instant-apps-export-print__popup-container .esri-feature-media__item-navigation {\n display: none;\n }\n\n .instant-apps-export-print__popup-container .esri-feature-media__chart.esri-feature-media__chart--rendered * {\n width: 100%!important;\n }\n\n .instant-apps-export-print__popup-content .esri-popup__content {\n margin: 0;\n }',document.body.prepend(this.printStyleEl))}handleImgLoaded(){this.exportIsLoading=!0,setTimeout((()=>{this.exportIsLoading=void 0,this.setupViewPrintElements()}),1500)}resetPrintContent(){}async updatePopupToPrint(n,t){var i,e;const o=this.printEl.querySelector(`#popup-${t}`);if(null!=o&&(o.style.display=this.includePopup&&n.popup.visible?"block":"none",this.checkPopupOpen(n,t)),n.popup.visible&&null!=n.popup.selectedFeature){const o=document.createElement(`h${null!==(i=n.popup.headingLevel)&&void 0!==i?i:2}`);o.innerHTML=null!==(e=n.popup.title)&&void 0!==e?e:"",o.className="esri-widget__heading esri-popup__header-title";const a=this.printEl.querySelector(`#popup-title-${t}`);null!=a&&(a.style.display=n.popup.title?"block":"none",a.innerHTML="",a.prepend(o))}}updateExportOutput(){this.output={},this.showIncludeLegend&&(this.output.includeLegend=this.includeLegend),this.showIncludeMap&&(this.output.includeMap=this.includeMap),this.showIncludePopup&&(this.output.includePopup=this.includePopup),this.showIncludeHeader&&(this.output.includeHeader=this.includeHeader),this.exportOutputUpdated.emit()}setupViewPrintElements(){const n=document.title;window.print(),document.title=n,setTimeout((()=>{this.resetPrintContent()}),1e3)}handleLegendSetup(n){var t;const i=this.printEl.querySelector(`#legend-${n}`);if(this.showIncludeLegend&&this.includeMap&&i){const e=this.legends[n],o=null!=e&&(null===(t=e.activeLayerInfos)||void 0===t?void 0:t.length)>0;i.style.display=this.includeLegend&&o?"block":"none"}}handleWidgetCreation(){var n;this.includeMap&&(null===(n=this.exportViews)||void 0===n||n.forEach((({view:n},t)=>{this.handleLegendCreation(n,t)})))}handleIncludePopup(n,t){var i,e;if(this.showIncludePopup){const o=`includePopup-${t}`;null===(i=this.handles)||void 0===i||i.remove(o),null===(e=this.reactiveUtils)||void 0===e||e.whenOnce((()=>null==n?void 0:n.ready)).then((()=>{var t;null===(t=this.handles)||void 0===t||t.add(this.reactiveUtils.watch((()=>{var t;return null===(t=null==n?void 0:n.popup)||void 0===t?void 0:t.visible}),(n=>{this.includePopup=n})),o)}))}}handleLegendCreation(n,t){var i,e,o,a;const s=this.printEl.querySelector(`#legend-${t}`);if(this.showIncludeLegend&&null!=s){const r=n.map,p=this.legends[t],c=null===(i=null==p?void 0:p.view)||void 0===i?void 0:i.map;null!=(null===(e=null==r?void 0:r.portalItem)||void 0===e?void 0:e.id)&&(null===(o=null==r?void 0:r.portalItem)||void 0===o?void 0:o.id)===(null===(a=null==c?void 0:c.portalItem)||void 0===a?void 0:a.id)||this.updateLegend(n,t,s)}}async updateLegend(n,t,i){null==n||n.when((async n=>{if(null==this.legends[t]&&null!=i){i.innerHTML="";const e=document.createElement("div");i.append(e);const[o]=await a(["esri/widgets/Legend"]);this.legends[t]=new o({id:`legend-widget-${t}`,container:e,view:n,style:{type:"card",layout:"side-by-side"}})}}))}handleCompassCreation(n,t){var i,e,o;const a=this.compassContainerEl.querySelector(`#compass-${t}`);if(null!=a){const s=n.map,r=this.compasses[t],p=null===(i=null==r?void 0:r.view)||void 0===i?void 0:i.map;(null===(e=null==s?void 0:s.portalItem)||void 0===e?void 0:e.id)===(null===(o=null==p?void 0:p.portalItem)||void 0===o?void 0:o.id)||this.updateCompass(n,t,a)}}updateCompass(n,t,i){null==n||n.when((async n=>{const e=document.createElement("div");if(null==i)return;i.append(e);const[o]=await a(["esri/widgets/Compass"]);this.compasses[t]=new o({id:`compass-widget-${t}`,container:e,view:n})}))}updateScaleBar(n,t){const i=this.printEl.querySelector(`#scalebar-container-${t}`);if(i&&null!=n&&(i.innerHTML="",this.showScaleBar)){const t=n.ui.getComponents(),e=null==t?void 0:t.find((({container:n})=>{var t;return null===(t=null==n?void 0:n.className)||void 0===t?void 0:t.includes("esri-scale-bar")}));null!=(null==e?void 0:e.container)&&"string"!=typeof e.container&&i.append(e.container.cloneNode(!0))}}async viewScreenshot(n,t){if(this.includeMap){const i=this.printEl.querySelector(`#scalebar-container-${t}`);null==i||i.classList.toggle("instant-apps-export-print__scale-bar-container--position",n.width>1e3);const e=await n.takeScreenshot({width:2*n.width,height:2*n.height});this.handleScaleBarSize(n,e,i);const o=this.printEl.querySelector(`#view-${t}`);null!=e&&null!=o&&(o.src=e.dataUrl)}}checkPopupOpen(n,t){const i=n.popup.container,e=null==i?void 0:i.querySelector(".esri-popup .esri-feature__main-container");if(null!=e){const n=e.querySelectorAll("canvas"),i=this.printEl.querySelector(`#popup-content-${t}`);if(null==i)return;i.innerHTML="",i.append(e.cloneNode(!0));const o=i.querySelectorAll("canvas");n.forEach(((n,t)=>{var i;const e=n.toDataURL(),a=document.createElement("img");a.src=e;const s=n.getAttribute("style");s&&a.setAttribute("style",s);const r=o[t];null!=r&&(r.replaceWith(a),document.querySelector("link[href*='esri/themes/dark/main.css']")&&null!=(null===(i=a.parentElement)||void 0===i?void 0:i.parentElement)&&(a.parentElement.style.background="#242424",a.parentElement.parentElement.style.background="#242424"))}))}}handleScaleBarSize(n,t,i){if(this.showScaleBar&&"2d"===(null==n?void 0:n.type)&&null!=i){const n=i.querySelector(".esri-scale-bar__line--top"),e=i.querySelector(".esri-scale-bar__line--bottom");this.setScalebarWidth(t,i,n,"top"),this.setScalebarWidth(t,i,e,"bottom")}}setScalebarWidth(n,t,i,e){if(null!=i&&null!=n){const o=n.data.width/2,a=Number(i.style.width.replace("px",""));null==t||t.style.setProperty(`--instant-apps-scale-bar-${e}`,a/o*100+"%")}}get el(){return o(this)}static get watchers(){return{includeMap:["watchIncludeMap"],exportViews:["watchView"]}}};k.style=":host{display:block;--instant-apps-export-action-background:var(--calcite-color-foreground-1);--instant-apps-export-action-background-hover:var(--calcite-color-foreground-2);--instant-apps-export-action-background-press:var(--calcite-color-foreground-3);--instant-apps-export-action-height:100%;--instant-apps-export-action-width:fit-content;--instant-apps-export-action-icon-color:var(--calcite-color-text-3);--instant-apps-export-action-icon-hover-color:var(--calcite-color-text-1);--instant-apps-export-background:var(--calcite-color-foreground-1);--instant-apps-export-text-color:var(--calcite-color-text-1);--instant-apps-export-popover-width:250px}.instant-apps-export{height:100%}.instant-apps-export *{box-sizing:border-box}.instant-apps-export__popover-container,.instant-apps-export__inline-container{padding:12px;background:var(--instant-apps-export-background);--calcite-color-text-1:var(--instant-apps-export-text-color)}.instant-apps-export__popover-container{width:var(--instant-apps-export-popover-width)}.instant-apps-export calcite-action{height:var(--instant-apps-export-action-height);width:var(--instant-apps-export-action-width);--calcite-color-foreground-1:var(--instant-apps-export-action-background);--calcite-color-foreground-2:var(--instant-apps-export-action-background-hover);--calcite-color-foreground-3:var(--instant-apps-export-action-background-press);--calcite-color-text-3:var(--instant-apps-export-action-icon-color);--calcite-color-text-1:var(--instant-apps-export-action-icon-hover-color)}.instant-apps-export .instant-apps-export-print{display:none}.instant-apps-export__visually-hidden{position:absolute;top:0;z-index:-1;visibility:hidden}.instant-apps-export calcite-input{--calcite-color-foreground-1:var(--instant-apps-export-background);--calcite-color-text-1:var(--instant-apps-export-text-color)}.instant-apps-export calcite-popover{--calcite-color-foreground-1:var(--instant-apps-export-background)}.instant-apps-export calcite-switch{--calcite-color-foreground-1:#fff;--calcite-color-foreground-2:#f3f3f3}.instant-apps-export calcite-button:last-of-type{margin-top:0.5rem}.instant-apps-export .calcite-mode-dark calcite-switch{--calcite-color-foreground-1:#2b2b2b;--calcite-color-foreground-2:#202020}.instant-apps-export__compass-container.esri-widget{background:#fff;box-shadow:0 1px 2px rgba(0, 0, 0, 0.3)}.instant-apps-export__compass-container.esri-widget .esri-compass__icon.esri-icon-compass{color:#6e6e6e}.hide{display:none}.screenshotCursor{cursor:crosshair}";export{k as instant_apps_export_views}
|
6
|
+
import{r as n,c as t,h as i,H as e,g as o}from"./p-1b0588d2.js";import{l as a}from"./p-08ad0b7a.js";import{g as s}from"./p-173d5fce.js";import{g as r}from"./p-a9a72626.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-ac122d9e.js";const p="instant-apps-export calcite-mode-light",c="instant-apps-export-print",l="instant-apps-export-print__legend-container",d="instant-apps-export-print__compass-container",h="instant-apps-export-print__scale-bar-container",u="instant-apps-export-print__popup-container",v="instant-apps-export-print__popup-content",_="instant-apps-export-print__popup-title",x="instant-apps-export-print__view",b="instant-apps-export-print__view-container",g="instant-apps-export-print__views-container",f="instant-apps-export-print__view-wrapper",m="instant-apps-export-print__view-content",w="instant-apps-export-print__view-header",k=class{constructor(i){n(this,i),this.exportOutputUpdated=t(this,"exportOutputUpdated",7),this.legends={},this.compasses={},this.output=void 0,this.beforeExport=()=>Promise.resolve(),this.popoverIcon="export",this.includeLegend=!0,this.includeMap=!0,this.includePopup=!1,this.includeHeader=!1,this.mode="popover",this.popoverPositioning="absolute",this.popoverPlacement="auto",this.scale="m",this.showIncludeLegend=!0,this.showIncludeMap=!1,this.showIncludePopup=!0,this.showIncludeHeader=!0,this.showScaleBar=!1,this.exportViews=void 0,this.baseClass=p,this.exportIsLoading=void 0,this.messages=void 0}watchIncludeMap(n){var t;n&&(null===(t=this.exportViews)||void 0===t||t.forEach((({view:n},t)=>{const i=this.printEl.querySelector(`#legend-${t}`);null!=i&&this.updateLegend(n,t,i)})))}watchView(){var n;null===(n=this.exportViews)||void 0===n||n.forEach((({view:n},t)=>{this.handleIncludePopup(n,t)}))}async componentWillLoad(){this.baseClass="dark"===r(this.el)?"instant-apps-export calcite-mode-dark":p,s(this),await this.initializeModules()}componentDidLoad(){var n;this.printContainerEl.prepend(this.printEl),null===(n=this.exportViews)||void 0===n||n.forEach((({view:n},t)=>{this.handleIncludePopup(n,t)}))}componentDidUpdate(){var n;null===(n=this.exportViews)||void 0===n||n.forEach((({view:n},t)=>{const i=this.printEl.querySelector(`#legend-${t}`);this.updateLegend(n,t,i)}))}async initializeModules(){const[n,t]=await a(["esri/core/Handles","esri/core/reactiveUtils"]);return this.handles=new n,this.reactiveUtils=t,Promise.resolve()}render(){const n="popover"===this.mode?this.renderPopover():this.renderPanel();return i(e,{key:"52f53735afba2085f45bdd8ba64e8e37b48318bb"},i("div",{key:"ac8fc3e66ccc5f9c27e25642bbe640c3fc8c7d33",class:this.baseClass,onMouseEnter:this.handleWidgetCreation.bind(this),onFocusin:this.handleWidgetCreation.bind(this)},n))}renderPopover(){var n,t,e;const o=this.renderPanel();return[i("calcite-popover",{referenceElement:"export-popover-btn",label:null===(n=this.messages)||void 0===n?void 0:n.exportPopover,overlayPositioning:this.popoverPositioning,placement:this.popoverPlacement,autoClose:!0,ref:n=>this.popoverEl=n},o),i("calcite-action",{id:"export-popover-btn",alignment:"center",icon:this.popoverIcon,scale:this.scale,title:null===(t=this.messages)||void 0===t?void 0:t.exportBtn,text:null===(e=this.messages)||void 0===e?void 0:e.exportBtn})]}renderPanel(){var n;const t=this.showIncludeMap?this.renderSwitch("includeMap"):null,e=this.includeMap?this.renderMapOptions():null,o=this.renderPrint();return i("div",{class:"inline"===this.mode?"instant-apps-export__inline-container":"instant-apps-export__popover-container"},t,e,i("calcite-button",{width:"full",onClick:this.exportOnClick.bind(this),disabled:this.exportIsLoading},null===(n=this.messages)||void 0===n?void 0:n.export),o)}renderSwitch(n,t){var e;const o=null!=t?t:null===(e=this.messages)||void 0===e?void 0:e[n];return i("calcite-label",{layout:"inline-space-between"},o,i("calcite-switch",{checked:this[n],value:n,onCalciteSwitchChange:this.optionOnChange.bind(this)}))}renderMapOptions(){const n=this.showIncludeHeader?this.renderSwitch("includeHeader","Include header"):null,t=this.showIncludeLegend?this.renderSwitch("includeLegend"):null,e=this.showIncludePopup?this.renderSwitch("includePopup"):null;return i("div",null,n,t,e)}renderPrint(){var n;return i("div",{ref:n=>this.printContainerEl=n},i("div",{class:c,ref:n=>this.printEl=n},i("div",{class:g},null===(n=this.exportViews)||void 0===n?void 0:n.map((({title:n,view:t},e)=>{var o,a;const s=null===(a=null===(o=t.map)||void 0===o?void 0:o.portalItem)||void 0===a?void 0:a.id,r=this.includeMap?this.renderPrintMap(n,e):null,p=this.includeMap&&this.showIncludeLegend?this.renderLegend(e):null,c=this.includeMap&&this.showIncludePopup?this.renderPopup(e):null;return i("div",{key:s,id:`print-${e}`,class:m},r,p,c)})))))}renderPrintMap(n,t){return i("div",{id:`view-container-${t}`,class:b},i("div",{id:`view-wrapper-${t}`,class:f},this.includeHeader&&n?i("div",{class:w},i("h1",null,n)):null,i("img",{id:`view-${t}`,class:x}),i("div",{id:`scalebar-container-${t}`,class:h})))}renderLegend(n){return i("div",{id:`legend-${n}`,class:l})}renderCompass(n){return i("div",{id:`compass-${n}`,class:d})}renderPopup(n){return i("div",{id:`popup-${n}`,class:u},i("div",{id:`popup-title-${n}`,class:_}),i("div",{id:`popup-content-${n}`,class:v}))}optionOnChange(n){const{checked:t,value:i}=n.target;this[i]=t,this.updateExportOutput()}async exportOnClick(){var n;await this.beforeExport(),(null===(n=this.exportViews)||void 0===n?void 0:n.length)?(this.addPrintStyling(),document.body.prepend(this.printEl),this.exportViews.forEach((({view:n},t)=>{this.handleViewExportOnClick(n,t)})),this.handleImgLoaded()):null!=this.popoverEl&&(this.popoverEl.open=!1)}async handleViewExportOnClick(n,t){this.includeMap&&(this.updateScaleBar(n,t),this.updatePopupToPrint(n,t),this.viewScreenshot(n,t),this.handleLegendSetup(t))}addPrintStyling(){null==this.printStyleEl&&(this.printStyleEl=document.createElement("style"),this.printStyleEl.innerHTML='\n @media print {\n @page {\n size: Portrait;\n margin: .25in;\n }\n\n html, body {\n padding: 0;\n margin: 0;\n height: 100%;\n width: 100%;\n }\n\n body > *:not(.instant-apps-export-print) { display: none; }\n }\n\n * {\n -webkit-print-color-adjust: exact;\n color-adjust: exact;\n }\n\n instant-apps-header {\n height: 50px;\n display: block;\n }\n\n\n .instant-apps-export-print {\n z-index: -999;\n color: #323232 !important;\n display: grid;\n grid-auto-flow: row;\n --esri-calcite-mode-name: "light";\n position: absolute;\n }\n\n .instant-apps-export-print__view-header {\n background: #fff;\n }\n\n .instant-apps-export-print__view-header h1 {\n font-size: 16px;\n font-weight: 500;\n color: #323232;\n margin: 6px;\n }\n\n .instant-apps-export-print__views-container {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .instant-apps-export-print__view-content:first-child {\n page-break-before: unset;\n } \n\n .instant-apps-export-print__view-content {\n height: 100%;\n display: flex;\n flex-direction: column;\n gap: 32px;\n page-break-before: always;\n }\n\n .instant-apps-export-print, .instant-apps-export-print * {\n box-sizing: border-box;\n }\n\n .instant-apps-export-print__view-section {\n height: 100%;\n }\n\n .instant-apps-export-print__view-container {\n height: 100%;\n width: 100%;\n break-inside: avoid;\n }\n\n .instant-apps-export-print__view-wrapper {\n height: fit-content;\n width: min-content;\n position: relative;\n display: flex;\n flex-direction: column;\n border: 2pt solid #323232;\n overflow: hidden;\n }\n\n .instant-apps-export-print__view {\n max-height: 60vh;\n max-width: calc(100vw - .25in);\n object-fit: contain;\n }\n\n .instant-apps-export-print__popup-container {\n height: min-content;\n max-width: 350px;\n display: none;\n color: #323232;\n background: #fff;\n border: 1pt solid #323232;\n break-inside: avoid;\n }\n\n .instant-apps-export-print__popup-title {\n border-bottom: 1pt solid #323232;\n }\n\n .instant-apps-export-print__popup-content {\n background: #fff;\n padding-top: 8pt;\n }\n\n .instant-apps-export-print__popup-content .esri-feature-media__chart {\n background: #fff;\n }\n\n .instant-apps-export-print__legend-container {\n height: min-content;\n background: #fff;\n overflow: unset;\n }\n\n .esri-legend--card, .esri-legend--card__service-content {\n flex-flow: row wrap;\n }\n\n .instant-apps-export-print .esri-widget > *:not(.esri-scale-bar.esri-widget > *) {\n background: #fff;\n color: #323232;\n }\n\n .instant-apps-export-print__popup-content * {\n color: #323232;\n }\n\n .instant-apps-export-print .esri-widget__heading {\n margin: 2pt 7pt;\n padding: 0;\n color: #323232;\n }\n\n .instant-apps-export-print .esri-legend__ramp-label:before {\n border-color: rgba(0,0,0,0) rgba(50,50,50,.8) rgba(0,0,0,0) rgba(0,0,0,0);\n }\n\n .instant-apps-export-print .esri-legend--card__section {\n padding: 4pt 0 4pt;\n min-width: unset;\n border-left: none;\n }\n\n .instant-apps-export-print .esri-legend--card__section:first-child {\n border-left: none;\n }\n\n .instant-apps-export-print .esri-legend--card__service {\n border: none;\n flex: 0 1 auto;\n break-inside: avoid;\n }\n\n .instant-apps-export-print .esri-legend--card {\n border: none;\n gap: 6pt 12pt;\n }\n\n .instant-apps-export-print .esri-legend--card:not(:first-child),\n .instant-apps-export-print .esri-compass.esri-widget:not(:first-child) {\n display: none;\n }\n\n .instant-apps-export-print .esri-legend--card__service-caption-container {\n height: unset;\n padding: 0;\n border-bottom: none;\n }\n\n .instant-apps-export-print .esri-legend--card__service-caption-text {\n padding-bottom: 4px;\n }\n\n .instant-apps-export-print__compass-container {\n position: absolute;\n top: 65px;\n left: 15px;\n background: #fff;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n --calcite-ui-icon-color: #000;\n border-radius: 50%;\n height: fit-content;\n }\n\n .instant-apps-export-print__compass-container .esri-compass {\n background: #fff;\n }\n\n .instant-apps-export-print__compass-container .esri-compass__icon.esri-icon-compass {\n color: #000;\n }\n\n .instant-apps-export-print__compass-container.esri-compass.esri-widget--button {\n background: #fff;\n }\n\n .instant-apps-export-print__scale-bar-container {\n width: 100%;\n position: absolute;\n bottom: 15px;\n margin: 0 15px;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__label {\n color: #323232;\n font-size: 10px;\n padding: 0 4px;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__label-container--line {\n height: 16px;\n overflow: hidden;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__label-container--top {\n bottom: 1px;\n }\n \n .instant-apps-export-print__scale-bar-container--position .esri-scale-bar__label {\n height: 10px;\n padding: 0 2px;\n line-height: 11px;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__bar-container:nth-child(1n+3) {\n display: none;\n }\n\n .instant-apps-export-print__scale-bar-container--position .esri-scale-bar__bar-container.esri-scale-bar__bar-container--line {\n align-items: center;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line {\n background-color: rgba(255, 255, 255, 0.66);\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--top {\n width: var(--instant-apps-scale-bar-top) !important;\n border-bottom: 2px solid #323232;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--bottom {\n width: var(--instant-apps-scale-bar-bottom) !important;\n border-top: 2px solid #323232;\n }\n\n .instant-apps-export-print__scale-bar-container--position .esri-scale-bar__label-container--line {\n position: unset;\n margin: 0 2px;\n background-color: rgba(255, 255, 255, 0.66);\n height: 10px;\n display: flex;\n align-items: center;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--top:before,\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--top:after,\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--bottom:before,\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--bottom:after {\n background-color: #323232;\n border-right: 2px solid #323232;\n }\n\n .instant-apps-export-print__popup-container .esri-feature-media__item-navigation {\n display: none;\n }\n\n .instant-apps-export-print__popup-container .esri-feature-media__chart.esri-feature-media__chart--rendered * {\n width: 100%!important;\n }\n\n .instant-apps-export-print__popup-content .esri-popup__content {\n margin: 0;\n }',document.body.prepend(this.printStyleEl))}handleImgLoaded(){this.exportIsLoading=!0,setTimeout((()=>{this.exportIsLoading=void 0,this.setupViewPrintElements()}),1500)}resetPrintContent(){}async updatePopupToPrint(n,t){var i,e;const o=this.printEl.querySelector(`#popup-${t}`);if(null!=o&&(o.style.display=this.includePopup&&n.popup.visible?"block":"none",this.checkPopupOpen(n,t)),n.popup.visible&&null!=n.popup.selectedFeature){const o=document.createElement(`h${null!==(i=n.popup.headingLevel)&&void 0!==i?i:2}`);o.innerHTML=null!==(e=n.popup.title)&&void 0!==e?e:"",o.className="esri-widget__heading esri-popup__header-title";const a=this.printEl.querySelector(`#popup-title-${t}`);null!=a&&(a.style.display=n.popup.title?"block":"none",a.innerHTML="",a.prepend(o))}}updateExportOutput(){this.output={},this.showIncludeLegend&&(this.output.includeLegend=this.includeLegend),this.showIncludeMap&&(this.output.includeMap=this.includeMap),this.showIncludePopup&&(this.output.includePopup=this.includePopup),this.showIncludeHeader&&(this.output.includeHeader=this.includeHeader),this.exportOutputUpdated.emit()}setupViewPrintElements(){const n=document.title;window.print(),document.title=n,setTimeout((()=>{this.resetPrintContent()}),1e3)}handleLegendSetup(n){var t;const i=this.printEl.querySelector(`#legend-${n}`);if(this.showIncludeLegend&&this.includeMap&&i){const e=this.legends[n],o=null!=e&&(null===(t=e.activeLayerInfos)||void 0===t?void 0:t.length)>0;i.style.display=this.includeLegend&&o?"block":"none"}}handleWidgetCreation(){var n;this.includeMap&&(null===(n=this.exportViews)||void 0===n||n.forEach((({view:n},t)=>{this.handleLegendCreation(n,t)})))}handleIncludePopup(n,t){var i,e;if(this.showIncludePopup){const o=`includePopup-${t}`;null===(i=this.handles)||void 0===i||i.remove(o),null===(e=this.reactiveUtils)||void 0===e||e.whenOnce((()=>null==n?void 0:n.ready)).then((()=>{var t;null===(t=this.handles)||void 0===t||t.add(this.reactiveUtils.watch((()=>{var t;return null===(t=null==n?void 0:n.popup)||void 0===t?void 0:t.visible}),(n=>{this.includePopup=n})),o)}))}}handleLegendCreation(n,t){var i,e,o,a;const s=this.printEl.querySelector(`#legend-${t}`);if(this.showIncludeLegend&&null!=s){const r=n.map,p=this.legends[t],c=null===(i=null==p?void 0:p.view)||void 0===i?void 0:i.map;null!=(null===(e=null==r?void 0:r.portalItem)||void 0===e?void 0:e.id)&&(null===(o=null==r?void 0:r.portalItem)||void 0===o?void 0:o.id)===(null===(a=null==c?void 0:c.portalItem)||void 0===a?void 0:a.id)||this.updateLegend(n,t,s)}}async updateLegend(n,t,i){null==n||n.when((async n=>{if(null==this.legends[t]&&null!=i){i.innerHTML="";const e=document.createElement("div");i.append(e);const[o]=await a(["esri/widgets/Legend"]);this.legends[t]=new o({id:`legend-widget-${t}`,container:e,view:n,style:{type:"card",layout:"side-by-side"}})}}))}handleCompassCreation(n,t){var i,e,o;const a=this.compassContainerEl.querySelector(`#compass-${t}`);if(null!=a){const s=n.map,r=this.compasses[t],p=null===(i=null==r?void 0:r.view)||void 0===i?void 0:i.map;(null===(e=null==s?void 0:s.portalItem)||void 0===e?void 0:e.id)===(null===(o=null==p?void 0:p.portalItem)||void 0===o?void 0:o.id)||this.updateCompass(n,t,a)}}updateCompass(n,t,i){null==n||n.when((async n=>{const e=document.createElement("div");if(null==i)return;i.append(e);const[o]=await a(["esri/widgets/Compass"]);this.compasses[t]=new o({id:`compass-widget-${t}`,container:e,view:n})}))}updateScaleBar(n,t){const i=this.printEl.querySelector(`#scalebar-container-${t}`);if(i&&null!=n&&(i.innerHTML="",this.showScaleBar)){const t=n.ui.getComponents(),e=null==t?void 0:t.find((({container:n})=>{var t;return null===(t=null==n?void 0:n.className)||void 0===t?void 0:t.includes("esri-scale-bar")}));null!=(null==e?void 0:e.container)&&"string"!=typeof e.container&&i.append(e.container.cloneNode(!0))}}async viewScreenshot(n,t){if(this.includeMap){const i=this.printEl.querySelector(`#scalebar-container-${t}`);null==i||i.classList.toggle("instant-apps-export-print__scale-bar-container--position",n.width>1e3);const e=await n.takeScreenshot({width:2*n.width,height:2*n.height});this.handleScaleBarSize(n,e,i);const o=this.printEl.querySelector(`#view-${t}`);null!=e&&null!=o&&(o.src=e.dataUrl)}}checkPopupOpen(n,t){const i=n.popup.container,e=null==i?void 0:i.querySelector(".esri-popup .esri-feature__main-container");if(null!=e){const n=e.querySelectorAll("canvas"),i=this.printEl.querySelector(`#popup-content-${t}`);if(null==i)return;i.innerHTML="",i.append(e.cloneNode(!0));const o=i.querySelectorAll("canvas");n.forEach(((n,t)=>{var i;const e=n.toDataURL(),a=document.createElement("img");a.src=e;const s=n.getAttribute("style");s&&a.setAttribute("style",s);const r=o[t];null!=r&&(r.replaceWith(a),document.querySelector("link[href*='esri/themes/dark/main.css']")&&null!=(null===(i=a.parentElement)||void 0===i?void 0:i.parentElement)&&(a.parentElement.style.background="#242424",a.parentElement.parentElement.style.background="#242424"))}))}}handleScaleBarSize(n,t,i){if(this.showScaleBar&&"2d"===(null==n?void 0:n.type)&&null!=i){const n=i.querySelector(".esri-scale-bar__line--top"),e=i.querySelector(".esri-scale-bar__line--bottom");this.setScalebarWidth(t,i,n,"top"),this.setScalebarWidth(t,i,e,"bottom")}}setScalebarWidth(n,t,i,e){if(null!=i&&null!=n){const o=n.data.width/2,a=Number(i.style.width.replace("px",""));null==t||t.style.setProperty(`--instant-apps-scale-bar-${e}`,a/o*100+"%")}}get el(){return o(this)}static get watchers(){return{includeMap:["watchIncludeMap"],exportViews:["watchView"]}}};k.style=":host{display:block;--instant-apps-export-action-background:var(--calcite-color-foreground-1);--instant-apps-export-action-background-hover:var(--calcite-color-foreground-2);--instant-apps-export-action-background-press:var(--calcite-color-foreground-3);--instant-apps-export-action-height:100%;--instant-apps-export-action-width:fit-content;--instant-apps-export-action-icon-color:var(--calcite-color-text-3);--instant-apps-export-action-icon-hover-color:var(--calcite-color-text-1);--instant-apps-export-background:var(--calcite-color-foreground-1);--instant-apps-export-text-color:var(--calcite-color-text-1);--instant-apps-export-popover-width:250px}.instant-apps-export{height:100%}.instant-apps-export *{box-sizing:border-box}.instant-apps-export__popover-container,.instant-apps-export__inline-container{padding:12px;background:var(--instant-apps-export-background);--calcite-color-text-1:var(--instant-apps-export-text-color)}.instant-apps-export__popover-container{width:var(--instant-apps-export-popover-width)}.instant-apps-export calcite-action{height:var(--instant-apps-export-action-height);width:var(--instant-apps-export-action-width);--calcite-color-foreground-1:var(--instant-apps-export-action-background);--calcite-color-foreground-2:var(--instant-apps-export-action-background-hover);--calcite-color-foreground-3:var(--instant-apps-export-action-background-press);--calcite-color-text-3:var(--instant-apps-export-action-icon-color);--calcite-color-text-1:var(--instant-apps-export-action-icon-hover-color)}.instant-apps-export .instant-apps-export-print{display:none}.instant-apps-export__visually-hidden{position:absolute;top:0;z-index:-1;visibility:hidden}.instant-apps-export calcite-input{--calcite-color-foreground-1:var(--instant-apps-export-background);--calcite-color-text-1:var(--instant-apps-export-text-color)}.instant-apps-export calcite-popover{--calcite-color-foreground-1:var(--instant-apps-export-background)}.instant-apps-export calcite-switch{--calcite-color-foreground-1:#fff;--calcite-color-foreground-2:#f3f3f3}.instant-apps-export calcite-button:last-of-type{margin-top:0.5rem}.instant-apps-export .calcite-mode-dark calcite-switch{--calcite-color-foreground-1:#2b2b2b;--calcite-color-foreground-2:#202020}.instant-apps-export__compass-container.esri-widget{background:#fff;box-shadow:0 1px 2px rgba(0, 0, 0, 0.3)}.instant-apps-export__compass-container.esri-widget .esri-compass__icon.esri-icon-compass{color:#6e6e6e}.hide{display:none}.screenshotCursor{cursor:crosshair}";export{k as instant_apps_export_views}
|
@@ -3,4 +3,4 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as t,h as s,H as i,g as e}from"./p-
|
6
|
+
import{r as t,h as s,H as i,g as e}from"./p-1b0588d2.js";import{l as a}from"./p-08ad0b7a.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";const n="instant-apps-measurement-tool",o={base:n,hide:`${n}__hide`},r=class{constructor(s){t(this,s),this.view=void 0,this.measureConfiguration=void 0,this.activeTool=void 0}async componentWillLoad(){await this._initModules()}componentDidLoad(){this._init()}render(){return s(i,{key:"eabd8e43ae6d095e02bcc99935a2069ba620d66a"},s("div",{key:"5bb33f7f1785e60e4cde37ee8ba08bae4681751d",class:o.base},s("div",{key:"8826eb9665c17f8eed640e0bcab3cff50a02ec23",ref:t=>{this._measureElement=t}}),s("div",{key:"0e3b7364403866976f5e6578c08b8fdc50d1e33f",class:o.hide,ref:t=>{this._coordinateElement=t}})))}disconnectedCallback(){var t,s;null===(t=this._measureWidget)||void 0===t||t.destroy(),null===(s=this._coordinateWidget)||void 0===s||s.destroy()}async _initModules(){const[t,s,i]=await a(["esri/widgets/Measurement","esri/widgets/CoordinateConversion","esri/widgets/CoordinateConversion/support/Conversion"]);this.Measurement=t,this.CoordinateConversion=s,this.Conversion=i}_init(){this._initMeasurementWidget(),this._initCoordinateWidget()}_updateToolType(t){this._setActiveTool(t)}_initMeasurementWidget(){this.view&&this._measureElement&&!this._measureWidget&&(this._measureWidget=new this.Measurement(Object.assign({view:this.view,container:this._measureElement},this.measureConfiguration)),this.measureConfiguration.activeToolType&&this._setActiveTool(this.measureConfiguration.activeToolType))}_setActiveTool(t){var s,i,e;const a=this.view.type;this._measureWidget.clear(),null===(s=this._coordinateElement)||void 0===s||s.classList.add(o.hide),"distance"===t?this._measureWidget.activeTool="2d"===a?"distance":"direct-line":"area"===t?this._measureWidget.activeTool="area":"point"===t&&(null===(e=null===(i=this._coordinateElement)||void 0===i?void 0:i.classList)||void 0===e||e.remove(o.hide))}_initCoordinateWidget(){var t,s;const{activeToolType:i,coordinateFormat:e}=this.measureConfiguration;if((null==this?void 0:this.view)&&this._coordinateElement&&!this._coordinateWidget&&(this._coordinateWidget=new this.CoordinateConversion({view:this.view,storageEnabled:!1,container:this._coordinateElement}),null!=e)){const i=this._coordinateWidget.formats.find((t=>t.name===e));null===(s=null===(t=this._coordinateWidget)||void 0===t?void 0:t.conversions)||void 0===s||s.splice(0,0,new this.Conversion({format:i}))}null!=i&&this._setActiveTool(i)}get el(){return e(this)}static get watchers(){return{activeTool:["_updateToolType"]}}};r.style=".sc-instant-apps-measurement-tool-h .esri-measurement.sc-instant-apps-measurement-tool,.sc-instant-apps-measurement-tool-h .esri-coordinate-conversion.sc-instant-apps-measurement-tool{width:300px}.sc-instant-apps-measurement-tool-h .instant-apps-measurement-tool__hide.sc-instant-apps-measurement-tool{display:none}";export{r as instant_apps_measurement_tool}
|