voyager-ionic-core 7.6.3 → 7.6.5
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/components/ion-back-button.js +1 -1
- package/components/ion-input.js +2 -2
- package/components/ion-menu-button.js +1 -1
- package/components/list.js +1 -1
- package/components/overlays.js +12 -3
- package/components/spinner.js +1 -1
- package/dist/cjs/{app-globals-7def22c8.js → app-globals-07127773.js} +1 -1
- package/dist/cjs/{button-active-962fe442.js → button-active-85665616.js} +1 -1
- package/dist/cjs/{index-17ab7794.js → index-6bb6b651.js} +3 -3
- package/dist/cjs/{index-50dcfe2f.js → index-71f41461.js} +25 -27
- package/dist/cjs/{index-3b012034.js → index-96a721a7.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/ion-accordion_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-action-sheet.cjs.entry.js +4 -4
- package/dist/cjs/ion-alert.cjs.entry.js +4 -4
- package/dist/cjs/ion-app_8.cjs.entry.js +4 -4
- package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-back-button.cjs.entry.js +3 -3
- package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-button_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-card_5.cjs.entry.js +2 -2
- package/dist/cjs/ion-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ion-chip.cjs.entry.js +2 -2
- package/dist/cjs/ion-col_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime-button.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime_3.cjs.entry.js +3 -3
- package/dist/cjs/ion-fab_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-img.cjs.entry.js +2 -2
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-input.cjs.entry.js +4 -4
- package/dist/cjs/ion-item-option_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-item_8.cjs.entry.js +3 -3
- package/dist/cjs/ion-loading.cjs.entry.js +3 -3
- package/dist/cjs/ion-menu_3.cjs.entry.js +5 -5
- package/dist/cjs/ion-modal.cjs.entry.js +4 -4
- package/dist/cjs/ion-nav_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-picker-column-internal.cjs.entry.js +2 -2
- package/dist/cjs/ion-picker-internal.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +4 -4
- package/dist/cjs/ion-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/ion-radio_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-range.cjs.entry.js +2 -2
- package/dist/cjs/ion-refresher_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +2 -2
- package/dist/cjs/ion-route_4.cjs.entry.js +2 -2
- package/dist/cjs/ion-searchbar.cjs.entry.js +2 -2
- package/dist/cjs/ion-segment_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-select_3.cjs.entry.js +3 -3
- package/dist/cjs/ion-spinner.cjs.entry.js +3 -3
- package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-text.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ion-toast.cjs.entry.js +3 -3
- package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
- package/dist/cjs/{ionic-global-a4edbf03.js → ionic-global-c70c3fb5.js} +1 -1
- package/dist/cjs/ionic.cjs.js +4 -4
- package/dist/cjs/{ios.transition-b5353f3e.js → ios.transition-9624a175.js} +2 -2
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{md.transition-67157dd9.js → md.transition-786baf9a.js} +2 -2
- package/dist/cjs/{overlays-e77cc023.js → overlays-4c97edb0.js} +13 -4
- package/dist/cjs/{status-tap-b5d77c08.js → status-tap-66296dcb.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/accordion-group/accordion-group.js +6 -4
- package/dist/collection/components/action-sheet/action-sheet.js +6 -10
- package/dist/collection/components/alert/alert.js +6 -10
- package/dist/collection/components/app/app.js +3 -2
- package/dist/collection/components/back-button/back-button.js +1 -1
- package/dist/collection/components/content/content.js +24 -40
- package/dist/collection/components/datetime/datetime.js +9 -6
- package/dist/collection/components/datetime/test/highlighted-dates/datetime.e2e.js +1 -1
- package/dist/collection/components/input/input.ios.css +4 -4
- package/dist/collection/components/input/input.md.css +4 -4
- package/dist/collection/components/item-sliding/item-sliding.js +3 -5
- package/dist/collection/components/list/list.md.css +1 -21
- package/dist/collection/components/loading/loading.js +6 -10
- package/dist/collection/components/menu/menu.js +15 -10
- package/dist/collection/components/menu-button/menu-button.js +1 -1
- package/dist/collection/components/modal/modal.js +9 -12
- package/dist/collection/components/nav/nav.js +114 -190
- package/dist/collection/components/picker/picker.js +9 -15
- package/dist/collection/components/picker-column-internal/picker-column-internal.js +3 -2
- package/dist/collection/components/popover/popover.js +18 -21
- package/dist/collection/components/radio/radio.js +6 -4
- package/dist/collection/components/reorder-group/reorder-group.js +3 -5
- package/dist/collection/components/ripple-effect/ripple-effect.js +6 -10
- package/dist/collection/components/router/router.js +12 -14
- package/dist/collection/components/router-outlet/router-outlet.js +21 -14
- package/dist/collection/components/select/select.js +3 -5
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/tabs/tabs.js +9 -12
- package/dist/collection/components/toast/toast.js +6 -10
- package/dist/collection/utils/overlays.js +12 -3
- package/dist/docs.d.ts +1 -21
- package/dist/docs.json +707 -534
- package/dist/esm/{app-globals-8c62bec2.js → app-globals-52c78291.js} +1 -1
- package/dist/esm/{button-active-308d3edd.js → button-active-b62776db.js} +1 -1
- package/dist/esm/{index-1193f005.js → index-01cb9192.js} +1 -1
- package/dist/esm/{index-b7d870cf.js → index-27668d5b.js} +25 -27
- package/dist/esm/{index-4743453d.js → index-a97c95a7.js} +3 -3
- package/dist/esm/index.js +7 -7
- package/dist/esm/ion-accordion_2.entry.js +2 -2
- package/dist/esm/ion-action-sheet.entry.js +4 -4
- package/dist/esm/ion-alert.entry.js +4 -4
- package/dist/esm/ion-app_8.entry.js +4 -4
- package/dist/esm/ion-avatar_3.entry.js +2 -2
- package/dist/esm/ion-back-button.entry.js +3 -3
- package/dist/esm/ion-backdrop.entry.js +2 -2
- package/dist/esm/ion-breadcrumb_2.entry.js +2 -2
- package/dist/esm/ion-button_2.entry.js +2 -2
- package/dist/esm/ion-card_5.entry.js +2 -2
- package/dist/esm/ion-checkbox.entry.js +2 -2
- package/dist/esm/ion-chip.entry.js +2 -2
- package/dist/esm/ion-col_3.entry.js +2 -2
- package/dist/esm/ion-datetime-button.entry.js +2 -2
- package/dist/esm/ion-datetime_3.entry.js +3 -3
- package/dist/esm/ion-fab_3.entry.js +2 -2
- package/dist/esm/ion-img.entry.js +2 -2
- package/dist/esm/ion-infinite-scroll_2.entry.js +2 -2
- package/dist/esm/ion-input.entry.js +4 -4
- package/dist/esm/ion-item-option_3.entry.js +2 -2
- package/dist/esm/ion-item_8.entry.js +3 -3
- package/dist/esm/ion-loading.entry.js +3 -3
- package/dist/esm/ion-menu_3.entry.js +5 -5
- package/dist/esm/ion-modal.entry.js +4 -4
- package/dist/esm/ion-nav_2.entry.js +3 -3
- package/dist/esm/ion-picker-column-internal.entry.js +2 -2
- package/dist/esm/ion-picker-internal.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +4 -4
- package/dist/esm/ion-progress-bar.entry.js +2 -2
- package/dist/esm/ion-radio_2.entry.js +2 -2
- package/dist/esm/ion-range.entry.js +2 -2
- package/dist/esm/ion-refresher_2.entry.js +2 -2
- package/dist/esm/ion-reorder_2.entry.js +2 -2
- package/dist/esm/ion-ripple-effect.entry.js +2 -2
- package/dist/esm/ion-route_4.entry.js +2 -2
- package/dist/esm/ion-searchbar.entry.js +2 -2
- package/dist/esm/ion-segment_2.entry.js +2 -2
- package/dist/esm/ion-select_3.entry.js +3 -3
- package/dist/esm/ion-spinner.entry.js +3 -3
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar_2.entry.js +2 -2
- package/dist/esm/ion-tab_2.entry.js +1 -1
- package/dist/esm/ion-text.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +3 -3
- package/dist/esm/ion-toggle.entry.js +2 -2
- package/dist/esm/{ionic-global-1f99b929.js → ionic-global-8fa0f940.js} +1 -1
- package/dist/esm/ionic.js +5 -5
- package/dist/esm/{ios.transition-3376ccb2.js → ios.transition-62fd50ab.js} +2 -2
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{md.transition-f992779f.js → md.transition-7e56966a.js} +2 -2
- package/dist/esm/{overlays-b33f6bca.js → overlays-8414359b.js} +13 -4
- package/dist/esm/{status-tap-16fd8f3d.js → status-tap-129c01cf.js} +1 -1
- package/dist/esm-es5/app-globals-52c78291.js +4 -0
- package/dist/esm-es5/{button-active-308d3edd.js → button-active-b62776db.js} +1 -1
- package/dist/esm-es5/{index-1193f005.js → index-01cb9192.js} +1 -1
- package/dist/esm-es5/index-27668d5b.js +5 -0
- package/dist/esm-es5/{index-4743453d.js → index-a97c95a7.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
- package/dist/esm-es5/ion-back-button.entry.js +1 -1
- package/dist/esm-es5/ion-backdrop.entry.js +1 -1
- package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
- package/dist/esm-es5/ion-button_2.entry.js +1 -1
- package/dist/esm-es5/ion-card_5.entry.js +1 -1
- package/dist/esm-es5/ion-checkbox.entry.js +1 -1
- package/dist/esm-es5/ion-chip.entry.js +1 -1
- package/dist/esm-es5/ion-col_3.entry.js +1 -1
- package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-fab_3.entry.js +1 -1
- package/dist/esm-es5/ion-img.entry.js +1 -1
- package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
- package/dist/esm-es5/ion-input.entry.js +1 -1
- package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
- package/dist/esm-es5/ion-item_8.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-nav_2.entry.js +1 -1
- package/dist/esm-es5/ion-picker-column-internal.entry.js +1 -1
- package/dist/esm-es5/ion-picker-internal.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-progress-bar.entry.js +1 -1
- package/dist/esm-es5/ion-radio_2.entry.js +1 -1
- package/dist/esm-es5/ion-range.entry.js +1 -1
- package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
- package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
- package/dist/esm-es5/ion-ripple-effect.entry.js +1 -1
- package/dist/esm-es5/ion-route_4.entry.js +1 -1
- package/dist/esm-es5/ion-searchbar.entry.js +1 -1
- package/dist/esm-es5/ion-segment_2.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-spinner.entry.js +1 -1
- package/dist/esm-es5/ion-split-pane.entry.js +1 -1
- package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
- package/dist/esm-es5/ion-tab_2.entry.js +1 -1
- package/dist/esm-es5/ion-text.entry.js +1 -1
- package/dist/esm-es5/ion-textarea.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/ion-toggle.entry.js +1 -1
- package/dist/esm-es5/{ionic-global-1f99b929.js → ionic-global-8fa0f940.js} +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/{ios.transition-3376ccb2.js → ios.transition-62fd50ab.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/md.transition-7e56966a.js +4 -0
- package/dist/esm-es5/{overlays-b33f6bca.js → overlays-8414359b.js} +1 -1
- package/dist/esm-es5/{status-tap-16fd8f3d.js → status-tap-129c01cf.js} +1 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/ionic.js +1 -1
- package/dist/ionic/p-005e0ad0.js +4 -0
- package/dist/ionic/{p-928ee57a.entry.js → p-01438d78.entry.js} +1 -1
- package/dist/ionic/{p-9a68d8ef.system.js → p-02e530f5.system.js} +1 -1
- package/dist/ionic/{p-04377cfa.js → p-03e00f90.js} +1 -1
- package/dist/ionic/{p-47bb15a1.entry.js → p-0abedd22.entry.js} +1 -1
- package/dist/ionic/{p-26c4bf85.entry.js → p-0d2b6901.entry.js} +1 -1
- package/dist/ionic/{p-4f400544.entry.js → p-1052ef2b.entry.js} +1 -1
- package/dist/ionic/{p-c68dd1e0.entry.js → p-127ff448.entry.js} +1 -1
- package/dist/ionic/{p-e33d1ebc.entry.js → p-13387c28.entry.js} +1 -1
- package/dist/ionic/{p-abd5d0d5.system.entry.js → p-1a0bf247.system.entry.js} +1 -1
- package/dist/ionic/{p-19d9ceb8.system.js → p-1a5f0313.system.js} +1 -1
- package/dist/ionic/{p-c23eff76.entry.js → p-1f7fc88d.entry.js} +1 -1
- package/dist/ionic/{p-158efe8d.system.entry.js → p-1ffb40d0.system.entry.js} +1 -1
- package/dist/ionic/{p-0509fd34.js → p-23ce95e8.js} +1 -1
- package/dist/ionic/{p-bdf71399.entry.js → p-249633a4.entry.js} +1 -1
- package/dist/ionic/{p-44a56556.js → p-25221a73.js} +1 -1
- package/dist/ionic/{p-507ddbfe.system.entry.js → p-25553eba.system.entry.js} +1 -1
- package/dist/ionic/{p-6ab03751.js → p-2a496995.js} +1 -1
- package/dist/ionic/{p-d0748f6d.entry.js → p-3197dbf7.entry.js} +1 -1
- package/dist/ionic/{p-a074be82.system.js → p-32b8e50d.system.js} +1 -1
- package/dist/ionic/{p-a4461d1c.system.entry.js → p-35e1a80f.system.entry.js} +1 -1
- package/dist/ionic/{p-254ec7c0.system.entry.js → p-3b83e483.system.entry.js} +1 -1
- package/dist/ionic/{p-9fda6824.system.entry.js → p-3bcbbf43.system.entry.js} +1 -1
- package/dist/ionic/{p-9f94c72e.system.js → p-3c33dc30.system.js} +1 -1
- package/dist/ionic/{p-2b3debd5.entry.js → p-3f0afc6f.entry.js} +1 -1
- package/dist/ionic/{p-793a10e0.system.entry.js → p-41040a92.system.entry.js} +1 -1
- package/dist/ionic/{p-84b567a6.entry.js → p-41aa2662.entry.js} +1 -1
- package/dist/ionic/{p-799da666.entry.js → p-436bd99a.entry.js} +1 -1
- package/dist/ionic/{p-afa9f205.system.js → p-43afd001.system.js} +1 -1
- package/dist/ionic/{p-6c277fa2.system.entry.js → p-48f7e8cc.system.entry.js} +1 -1
- package/dist/ionic/{p-5ad1fe3b.system.js → p-4a4bbcc5.system.js} +2 -2
- package/dist/ionic/{p-328107a5.system.entry.js → p-4cd6a04c.system.entry.js} +1 -1
- package/dist/ionic/{p-745e3339.system.entry.js → p-525b6ac4.system.entry.js} +1 -1
- package/dist/ionic/{p-eb246b50.entry.js → p-54c92c77.entry.js} +1 -1
- package/dist/ionic/{p-44dc52e5.entry.js → p-5a85d71d.entry.js} +1 -1
- package/dist/ionic/{p-dc71e4ef.system.entry.js → p-5aecd304.system.entry.js} +1 -1
- package/dist/ionic/{p-149567b1.system.entry.js → p-5c2da581.system.entry.js} +1 -1
- package/dist/ionic/{p-ee810056.system.entry.js → p-619fafe3.system.entry.js} +1 -1
- package/dist/ionic/{p-8f301ac5.system.entry.js → p-61bf9f6f.system.entry.js} +1 -1
- package/dist/ionic/p-677cb2f7.js +4 -0
- package/dist/ionic/p-67c3a2a8.system.js +5 -0
- package/dist/ionic/{p-aed4931c.entry.js → p-688a36c7.entry.js} +1 -1
- package/dist/ionic/{p-c1701827.entry.js → p-6a257379.entry.js} +1 -1
- package/dist/ionic/{p-c8aadc98.system.entry.js → p-6b9eee40.system.entry.js} +1 -1
- package/dist/ionic/{p-6337e56b.system.entry.js → p-6ba863b1.system.entry.js} +1 -1
- package/dist/ionic/{p-213e377d.system.entry.js → p-6e165986.system.entry.js} +1 -1
- package/dist/ionic/{p-154e5e06.entry.js → p-7510e462.entry.js} +1 -1
- package/dist/ionic/{p-72cb0718.system.entry.js → p-76b6b42e.system.entry.js} +1 -1
- package/dist/ionic/{p-a49931aa.system.js → p-770f5b43.system.js} +1 -1
- package/dist/ionic/{p-0ebc87b7.system.entry.js → p-7751def0.system.entry.js} +1 -1
- package/dist/ionic/{p-648ad047.system.entry.js → p-788942c8.system.entry.js} +1 -1
- package/dist/ionic/{p-b964aba3.entry.js → p-7bae84aa.entry.js} +1 -1
- package/dist/ionic/{p-cf235986.entry.js → p-7de774dd.entry.js} +1 -1
- package/dist/ionic/{p-1c249831.entry.js → p-803ad1e3.entry.js} +1 -1
- package/dist/ionic/{p-6855f26a.entry.js → p-8084e9cb.entry.js} +1 -1
- package/dist/ionic/{p-a20bb802.entry.js → p-80ddd0c1.entry.js} +1 -1
- package/dist/ionic/{p-0550f802.entry.js → p-85e04029.entry.js} +1 -1
- package/dist/ionic/{p-068ec6d3.system.entry.js → p-87e10168.system.entry.js} +1 -1
- package/dist/ionic/{p-69641343.system.entry.js → p-88d99112.system.entry.js} +1 -1
- package/dist/ionic/{p-39f96ff6.system.entry.js → p-89c28901.system.entry.js} +1 -1
- package/dist/ionic/{p-da666998.system.entry.js → p-928e945d.system.entry.js} +1 -1
- package/dist/ionic/{p-ddd48faf.system.entry.js → p-978c6799.system.entry.js} +1 -1
- package/dist/ionic/{p-93390f78.entry.js → p-9a0b9b64.entry.js} +1 -1
- package/dist/ionic/{p-85f48531.entry.js → p-a2d75455.entry.js} +1 -1
- package/dist/ionic/{p-beeed22c.system.entry.js → p-a706cf11.system.entry.js} +1 -1
- package/dist/ionic/{p-3381c3f4.entry.js → p-a78d17e2.entry.js} +1 -1
- package/dist/ionic/{p-a3013394.entry.js → p-aca77953.entry.js} +1 -1
- package/dist/ionic/{p-0aa78a8d.system.js → p-ae638cb5.system.js} +1 -1
- package/dist/ionic/{p-2894d5f6.entry.js → p-b09c8228.entry.js} +1 -1
- package/dist/ionic/{p-93419ece.system.entry.js → p-b2205a7c.system.entry.js} +1 -1
- package/dist/ionic/{p-61e4d3ec.entry.js → p-b43cf55f.entry.js} +1 -1
- package/dist/ionic/{p-767f1a92.entry.js → p-b6f6f00e.entry.js} +1 -1
- package/dist/ionic/{p-d93eed83.system.entry.js → p-bb41c476.system.entry.js} +1 -1
- package/dist/ionic/{p-b7058a0e.system.entry.js → p-bc59962f.system.entry.js} +1 -1
- package/dist/ionic/{p-17d283b9.system.entry.js → p-be04fcd8.system.entry.js} +1 -1
- package/dist/ionic/{p-b8a9e195.system.entry.js → p-bf595ef8.system.entry.js} +1 -1
- package/dist/ionic/{p-1b27ac67.entry.js → p-bf80f9d1.entry.js} +1 -1
- package/dist/ionic/{p-3671f1b9.system.js → p-c0f62b42.system.js} +1 -1
- package/dist/ionic/{p-e2903cdc.system.entry.js → p-c16d9f2c.system.entry.js} +1 -1
- package/dist/ionic/{p-41208f54.system.entry.js → p-c1c57873.system.entry.js} +1 -1
- package/dist/ionic/{p-6fba0ce1.system.entry.js → p-c48a9ef3.system.entry.js} +1 -1
- package/dist/ionic/{p-60959b71.entry.js → p-c9219299.entry.js} +1 -1
- package/dist/ionic/{p-2ba9a9bd.system.entry.js → p-cae77add.system.entry.js} +1 -1
- package/dist/ionic/{p-4489dd20.system.entry.js → p-cd6bb7f5.system.entry.js} +1 -1
- package/dist/ionic/{p-043aa6cc.system.entry.js → p-cdce5ba3.system.entry.js} +1 -1
- package/dist/ionic/{p-f6e9c227.system.js → p-d2707f9d.system.js} +1 -1
- package/dist/ionic/{p-f894e0ad.entry.js → p-d5216086.entry.js} +1 -1
- package/dist/ionic/p-d6129c6e.js +5 -0
- package/dist/ionic/p-d6beb1c9.system.entry.js +4 -0
- package/dist/ionic/{p-43f03cf4.system.entry.js → p-db798370.system.entry.js} +1 -1
- package/dist/ionic/{p-a821750c.system.entry.js → p-dc1d883c.system.entry.js} +1 -1
- package/dist/ionic/{p-3e8d5e53.entry.js → p-dd9dff11.entry.js} +1 -1
- package/dist/ionic/{p-cad1126a.entry.js → p-df62accd.entry.js} +1 -1
- package/dist/ionic/{p-b7a2ffc9.system.entry.js → p-e1e05489.system.entry.js} +1 -1
- package/dist/ionic/{p-06abe918.system.entry.js → p-e3ff3cde.system.entry.js} +1 -1
- package/dist/ionic/p-e814f9c0.entry.js +4 -0
- package/dist/ionic/{p-8dae44aa.entry.js → p-e8294cc1.entry.js} +1 -1
- package/dist/ionic/{p-c08fe2c0.entry.js → p-e87564bc.entry.js} +1 -1
- package/dist/ionic/{p-cd1b920b.entry.js → p-ea7f77e7.entry.js} +1 -1
- package/dist/ionic/{p-6e0539ea.system.entry.js → p-eb210b21.system.entry.js} +1 -1
- package/dist/ionic/{p-da5e2652.entry.js → p-eb80ca40.entry.js} +1 -1
- package/dist/ionic/{p-332ea4d3.system.entry.js → p-eba17ff5.system.entry.js} +1 -1
- package/dist/ionic/{p-ade3cf46.entry.js → p-ed60d571.entry.js} +1 -1
- package/dist/ionic/{p-1501b945.system.js → p-ef3a6b51.system.js} +1 -1
- package/dist/ionic/{p-3313c481.entry.js → p-efcc4b66.entry.js} +1 -1
- package/dist/ionic/p-f08d8865.js +4 -0
- package/dist/ionic/{p-20e0e75d.system.entry.js → p-f3478ed6.system.entry.js} +1 -1
- package/dist/ionic/{p-9fb45814.entry.js → p-f4bf2448.entry.js} +1 -1
- package/dist/ionic/{p-3dfc522b.entry.js → p-f4e37ba7.entry.js} +1 -1
- package/dist/ionic/{p-5e0c7fdc.entry.js → p-f56d53bd.entry.js} +1 -1
- package/dist/ionic/{p-328b49db.system.entry.js → p-f8564a9b.system.entry.js} +1 -1
- package/dist/ionic/{p-5ff99b79.entry.js → p-f865bc9a.entry.js} +1 -1
- package/dist/ionic/p-fd1a0431.js +4 -0
- package/dist/ionic/{p-7fae5c36.js → p-fd41bd8a.js} +1 -1
- package/dist/types/components/spinner/spinner-interface.d.ts +3 -1
- package/dist/types/components/split-pane/split-pane.d.ts +1 -1
- package/dist/types/utils/helpers.d.ts +1 -1
- package/hydrate/index.d.ts +2 -2
- package/hydrate/index.js +1793 -93
- package/package.json +3 -3
- package/dist/esm-es5/app-globals-8c62bec2.js +0 -4
- package/dist/esm-es5/index-b7d870cf.js +0 -5
- package/dist/esm-es5/md.transition-f992779f.js +0 -4
- package/dist/ionic/p-0235067a.js +0 -4
- package/dist/ionic/p-02cb0cf0.entry.js +0 -4
- package/dist/ionic/p-290d3fe9.js +0 -5
- package/dist/ionic/p-4a3218d4.system.entry.js +0 -4
- package/dist/ionic/p-52cfafe9.system.js +0 -5
- package/dist/ionic/p-97174c1e.js +0 -4
- package/dist/ionic/p-98f35d98.js +0 -4
- package/dist/ionic/p-cd574dfa.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{__awaiter,__generator}from"tslib";
|
|
2
2
|
/*!
|
|
3
3
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{r as registerInstance,d as createEvent,h,H as Host,f as getElement}from"./index-b7d870cf.js";import{g as getTimeGivenProgression}from"./cubic-bezier-fe2083dc.js";import{G as GESTURE_CONTROLLER}from"./gesture-controller-1bf57181.js";import{p as isEndSide,i as inheritAriaAttributes,o as assert,l as clamp}from"./helpers-ae653409.js";import{m as menuController}from"./index-1193f005.js";import{q as getPresentedOverlay}from"./overlays-b33f6bca.js";import{c as config,b as getIonMode}from"./ionic-global-1f99b929.js";import{c as createColorClasses,h as hostContext}from"./theme-01f3f29c.js";import{u as menuOutline,v as menuSharp}from"./index-f7dc70ba.js";import"./index-a5d50daf.js";import"./hardware-back-button-b2bc76db.js";import"./index-9b0d46f4.js";import"./animation-dde8cc0d.js";import"./framework-delegate-bc1fd82a.js";var menuIosCss=":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{-webkit-transform:translateX(-9999px);transform:translateX(-9999px);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:strict}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{inset-inline-start:0;inset-inline-end:auto}}@supports not (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{left:0;right:auto}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{left:unset;right:unset;left:auto;right:0}@supports selector(:dir(rtl)){:host(.menu-side-start:dir(rtl)) .menu-inner{left:unset;right:unset;left:auto;right:0}}}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}@supports selector(:dir(rtl)){:host(.menu-side-start:dir(rtl)) .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{inset-inline-start:auto;inset-inline-end:0}}@supports not (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{left:auto;right:0}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{left:unset;right:unset;left:0;right:auto}@supports selector(:dir(rtl)){:host(.menu-side-end:dir(rtl)) .menu-inner{left:unset;right:unset;left:0;right:auto}}}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}@supports selector(:dir(rtl)){:host(.menu-side-end:dir(rtl)) .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){width:var(--width);min-width:var(--min-width);max-width:var(--max-width)}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none;transform:none;-webkit-box-shadow:none;box-shadow:none}:host(.menu-pane-visible) ion-backdrop{display:hidden !important}:host(.menu-type-push){z-index:1000}:host(.menu-type-push) .show-backdrop{display:block}";var menuMdCss=":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{-webkit-transform:translateX(-9999px);transform:translateX(-9999px);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:strict}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{inset-inline-start:0;inset-inline-end:auto}}@supports not (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{left:0;right:auto}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{left:unset;right:unset;left:auto;right:0}@supports selector(:dir(rtl)){:host(.menu-side-start:dir(rtl)) .menu-inner{left:unset;right:unset;left:auto;right:0}}}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}@supports selector(:dir(rtl)){:host(.menu-side-start:dir(rtl)) .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{inset-inline-start:auto;inset-inline-end:0}}@supports not (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{left:auto;right:0}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{left:unset;right:unset;left:0;right:auto}@supports selector(:dir(rtl)){:host(.menu-side-end:dir(rtl)) .menu-inner{left:unset;right:unset;left:0;right:auto}}}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}@supports selector(:dir(rtl)){:host(.menu-side-end:dir(rtl)) .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){width:var(--width);min-width:var(--min-width);max-width:var(--max-width)}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none;transform:none;-webkit-box-shadow:none;box-shadow:none}:host(.menu-pane-visible) ion-backdrop{display:hidden !important}:host(.menu-type-overlay) .menu-inner{-webkit-box-shadow:4px 0px 16px rgba(0, 0, 0, 0.18);box-shadow:4px 0px 16px rgba(0, 0, 0, 0.18)}";var iosEasing="cubic-bezier(0.32,0.72,0,1)";var mdEasing="cubic-bezier(0.0,0.0,0.2,1)";var iosEasingReverse="cubic-bezier(1, 0, 0.68, 0.28)";var mdEasingReverse="cubic-bezier(0.4, 0, 0.6, 1)";var focusableQueryString='[tabindex]:not([tabindex^="-"]), input:not([type=hidden]):not([tabindex^="-"]), textarea:not([tabindex^="-"]), button:not([tabindex^="-"]), select:not([tabindex^="-"]), .ion-focusable:not([tabindex^="-"])';var Menu=function(){function t(t){var e=this;registerInstance(this,t);this.ionWillOpen=createEvent(this,"ionWillOpen",7);this.ionWillClose=createEvent(this,"ionWillClose",7);this.ionDidOpen=createEvent(this,"ionDidOpen",7);this.ionDidClose=createEvent(this,"ionDidClose",7);this.ionMenuChange=createEvent(this,"ionMenuChange",7);this.lastOnEnd=0;this.blocker=GESTURE_CONTROLLER.createBlocker({disableScroll:true});this.didLoad=false;this.operationCancelled=false;this.isAnimating=false;this._isOpen=false;this.inheritedAttributes={};this.handleFocus=function(t){var n=getPresentedOverlay(document);if(n&&!n.contains(e.el)){return}e.trapKeyboardFocus(t,document)};this.isPaneVisible=false;this.isEndSide=false;this.contentId=undefined;this.menuId=undefined;this.type=undefined;this.disabled=false;this.side="start";this.swipeGesture=true;this.maxEdgeStart=50}t.prototype.typeChanged=function(t,e){var n=this.contentEl;if(n){if(e!==undefined){n.classList.remove("menu-content-".concat(e))}n.classList.add("menu-content-".concat(t));n.removeAttribute("style")}if(this.menuInnerEl){this.menuInnerEl.removeAttribute("style")}this.animation=undefined};t.prototype.disabledChanged=function(){this.updateState();this.ionMenuChange.emit({disabled:this.disabled,open:this._isOpen})};t.prototype.sideChanged=function(){this.isEndSide=isEndSide(this.side);this.animation=undefined};t.prototype.swipeGestureChanged=function(){this.updateState()};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;var n=this;return __generator(this,(function(i){switch(i.label){case 0:if(!(typeof customElements!=="undefined"&&customElements!=null))return[3,2];return[4,customElements.whenDefined("ion-menu")];case 1:i.sent();i.label=2;case 2:if(this.type===undefined){this.type=config.get("menuType","overlay")}t=this.contentId!==undefined?document.getElementById(this.contentId):null;if(t===null){console.error('Menu: must have a "content" element to listen for drag events on.');return[2]}if(this.el.contains(t)){console.error('Menu: "contentId" should refer to the main view\'s ion-content, not the ion-content inside of the ion-menu.')}this.contentEl=t;t.classList.add("menu-content");this.typeChanged(this.type,undefined);this.sideChanged();menuController._register(this);this.menuChanged();e=this;return[4,import("./index-2cf77112.js")];case 3:e.gesture=i.sent().createGesture({el:document,gestureName:"menu-swipe",gesturePriority:30,threshold:10,blurOnStart:true,canStart:function(t){return n.canStart(t)},onWillStart:function(){return n.onWillStart()},onStart:function(){return n.onStart()},onMove:function(t){return n.onMove(t)},onEnd:function(t){return n.onEnd(t)}});this.updateState();return[2]}}))}))};t.prototype.componentWillLoad=function(){this.inheritedAttributes=inheritAriaAttributes(this.el)};t.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.didLoad=true;this.menuChanged();this.updateState();return[2]}))}))};t.prototype.menuChanged=function(){if(this.didLoad){this.ionMenuChange.emit({disabled:this.disabled,open:this._isOpen})}};t.prototype.disconnectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.close(false)];case 1:t.sent();this.blocker.destroy();menuController._unregister(this);if(this.animation){this.animation.destroy()}if(this.gesture){this.gesture.destroy();this.gesture=undefined}this.animation=undefined;this.contentEl=undefined;return[2]}}))}))};t.prototype.onSplitPaneChanged=function(t){var e=t.target;var n=this.el.closest("ion-split-pane");if(e!==n){return}this.isPaneVisible=t.detail.isPane(this.el);this.updateState()};t.prototype.onBackdropClick=function(t){if(this._isOpen&&this.lastOnEnd<t.timeStamp-100){var e=t.composedPath?!t.composedPath().includes(this.menuInnerEl):false;if(e){t.preventDefault();t.stopPropagation();this.close()}}};t.prototype.onKeydown=function(t){if(t.key==="Escape"){this.close()}};t.prototype.isOpen=function(){return Promise.resolve(this._isOpen)};t.prototype.isActive=function(){return Promise.resolve(this._isActive())};t.prototype.open=function(t){if(t===void 0){t=true}return this.setOpen(true,t)};t.prototype.close=function(t){if(t===void 0){t=true}return this.setOpen(false,t)};t.prototype.toggle=function(t){if(t===void 0){t=true}return this.setOpen(!this._isOpen,t)};t.prototype.setOpen=function(t,e){if(e===void 0){e=true}return menuController._setOpen(this,t,e)};t.prototype.focusFirstDescendant=function(){var t=this.el;var e=t.querySelector(focusableQueryString);if(e){e.focus()}else{t.focus()}};t.prototype.focusLastDescendant=function(){var t=this.el;var e=Array.from(t.querySelectorAll(focusableQueryString));var n=e.length>0?e[e.length-1]:null;if(n){n.focus()}else{t.focus()}};t.prototype.trapKeyboardFocus=function(t,e){var n=t.target;if(!n){return}if(this.el.contains(n)){this.lastFocus=n}else{this.focusFirstDescendant();if(this.lastFocus===e.activeElement){this.focusLastDescendant()}}};t.prototype._setOpen=function(t,e){if(e===void 0){e=true}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:if(!this._isActive()||this.isAnimating||t===this._isOpen){return[2,false]}this.beforeAnimation(t);return[4,this.loadAnimation()];case 1:n.sent();return[4,this.startAnimation(t,e)];case 2:n.sent();if(this.operationCancelled){this.operationCancelled=false;return[2,false]}this.afterAnimation(t);return[2,true]}}))}))};t.prototype.loadAnimation=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n,i;return __generator(this,(function(r){switch(r.label){case 0:t=this.menuInnerEl.offsetWidth;e=isEndSide(this.side);if(t===this.width&&this.animation!==undefined&&e===this.isEndSide){return[2]}this.width=t;this.isEndSide=e;if(this.animation){this.animation.destroy();this.animation=undefined}i=this;return[4,menuController._createAnimation(this.type,this)];case 1:n=i.animation=r.sent();if(!config.getBoolean("animated",true)){n.duration(0)}n.fill("both");return[2]}}))}))};t.prototype.startAnimation=function(t,e){return __awaiter(this,void 0,void 0,(function(){var n,i,r,o,s;return __generator(this,(function(a){switch(a.label){case 0:n=!t;i=getIonMode(this);r=i==="ios"?iosEasing:mdEasing;o=i==="ios"?iosEasingReverse:mdEasingReverse;s=this.animation.direction(n?"reverse":"normal").easing(n?o:r);if(!e)return[3,2];return[4,s.play()];case 1:a.sent();return[3,3];case 2:s.play({sync:true});a.label=3;case 3:if(s.getDirection()==="reverse"){s.direction("normal")}return[2]}}))}))};t.prototype._isActive=function(){return!this.disabled&&!this.isPaneVisible};t.prototype.canSwipe=function(){return this.swipeGesture&&!this.isAnimating&&this._isActive()};t.prototype.canStart=function(t){var e=!!document.querySelector("ion-modal.show-modal");if(e||!this.canSwipe()){return false}if(this._isOpen){return true}else if(menuController._getOpenSync()){return false}return checkEdgeSide(window,t.currentX,this.isEndSide,this.maxEdgeStart)};t.prototype.onWillStart=function(){this.beforeAnimation(!this._isOpen);return this.loadAnimation()};t.prototype.onStart=function(){if(!this.isAnimating||!this.animation){assert(false,"isAnimating has to be true");return}this.animation.progressStart(true,this._isOpen?1:0)};t.prototype.onMove=function(t){if(!this.isAnimating||!this.animation){assert(false,"isAnimating has to be true");return}var e=computeDelta(t.deltaX,this._isOpen,this.isEndSide);var n=e/this.width;this.animation.progressStep(this._isOpen?1-n:n)};t.prototype.onEnd=function(t){var e=this;if(!this.isAnimating||!this.animation){assert(false,"isAnimating has to be true");return}var n=this._isOpen;var i=this.isEndSide;var r=computeDelta(t.deltaX,n,i);var o=this.width;var s=r/o;var a=t.velocityX;var u=o/2;var h=a>=0&&(a>.2||t.deltaX>u);var d=a<=0&&(a<-.2||t.deltaX<-u);var l=n?i?h:d:i?d:h;var c=!n&&l;if(n&&!l){c=true}this.lastOnEnd=t.currentTime;var f=l?.001:-.001;var m=s<0?.01:s;f+=getTimeGivenProgression([0,0],[.4,0],[.6,1],[1,1],clamp(0,m,.9999))[0]||0;var p=this._isOpen?!l:l;this.animation.easing("cubic-bezier(0.4, 0.0, 0.6, 1)").onFinish((function(){return e.afterAnimation(c)}),{oneTimeCallback:true}).progressEnd(p?1:0,this._isOpen?1-f:f,300)};t.prototype.beforeAnimation=function(t){assert(!this.isAnimating,"_before() should not be called while animating");this.el.classList.add(SHOW_MENU);this.el.setAttribute("tabindex","0");if(this.backdropEl){this.backdropEl.classList.add(SHOW_BACKDROP)}if(this.contentEl){this.contentEl.classList.add(MENU_CONTENT_OPEN);this.contentEl.setAttribute("aria-hidden","true")}this.blocker.block();this.isAnimating=true;if(t){this.ionWillOpen.emit()}else{this.ionWillClose.emit()}};t.prototype.afterAnimation=function(t){var e;this._isOpen=t;this.isAnimating=false;if(!this._isOpen){this.blocker.unblock()}if(t){this.ionDidOpen.emit();var n=(e=document.activeElement)===null||e===void 0?void 0:e.closest("ion-menu");if(n!==this.el){this.el.focus()}document.addEventListener("focus",this.handleFocus,true)}else{this.el.classList.remove(SHOW_MENU);this.el.removeAttribute("tabindex");if(this.contentEl){this.contentEl.classList.remove(MENU_CONTENT_OPEN);this.contentEl.removeAttribute("aria-hidden")}if(this.backdropEl){this.backdropEl.classList.remove(SHOW_BACKDROP)}if(this.animation){this.animation.stop()}this.ionDidClose.emit();document.removeEventListener("focus",this.handleFocus,true)}};t.prototype.updateState=function(){var t=this._isActive();if(this.gesture){this.gesture.enable(t&&this.swipeGesture)}if(!t){if(this.isAnimating){this.operationCancelled=true}this.afterAnimation(false)}};t.prototype.render=function(){var t;var e=this;var n=this,i=n.type,r=n.disabled,o=n.isPaneVisible,s=n.inheritedAttributes,a=n.side;var u=getIonMode(this);return h(Host,{role:"navigation","aria-label":s["aria-label"]||"menu",class:(t={},t[u]=true,t["menu-type-".concat(i)]=true,t["menu-enabled"]=!r,t["menu-side-".concat(a)]=true,t["menu-pane-visible"]=o,t)},h("div",{class:"menu-inner",part:"container",ref:function(t){return e.menuInnerEl=t}},h("slot",null)),h("ion-backdrop",{ref:function(t){return e.backdropEl=t},class:"menu-backdrop",tappable:false,stopPropagation:false,part:"backdrop"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{type:["typeChanged"],disabled:["disabledChanged"],side:["sideChanged"],swipeGesture:["swipeGestureChanged"]}},enumerable:false,configurable:true});return t}();var computeDelta=function(t,e,n){return Math.max(0,e!==n?-t:t)};var checkEdgeSide=function(t,e,n,i){if(n){return e>=t.innerWidth-i}else{return e<=i}};var SHOW_MENU="show-menu";var SHOW_BACKDROP="show-backdrop";var MENU_CONTENT_OPEN="menu-content-open";Menu.style={ios:menuIosCss,md:menuMdCss};var updateVisibility=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e,n;return __generator(this,(function(i){switch(i.label){case 0:return[4,menuController.get(t)];case 1:e=i.sent();n=e;if(!n)return[3,3];return[4,e.isActive()];case 2:n=i.sent();i.label=3;case 3:return[2,!!n]}}))}))};var menuButtonIosCss=':host{--background:transparent;--color-focused:currentColor;--border-radius:initial;--padding-top:0;--padding-bottom:0;color:var(--color);text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-font-kerning:none;font-kerning:none}.button-native{border-radius:var(--border-radius);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit;border:0;outline:none;background:var(--background);line-height:1;cursor:pointer;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit;z-index:1}ion-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;pointer-events:none}:host(.menu-button-hidden){display:none}:host(.menu-button-disabled){cursor:default;opacity:0.5;pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity, 0)}}:host(.ion-color) .button-native{color:var(--ion-color-base)}:host(.in-toolbar:not(.in-toolbar-color)){color:var(--ion-toolbar-color, var(--color))}:host{--background-focused:currentColor;--background-focused-opacity:.1;--border-radius:4px;--color:var(--ion-color-primary, #3880ff);--padding-start:5px;--padding-end:5px;min-height:32px;font-size:clamp(31px, 1.9375rem, 38.13px)}:host(.ion-activated){opacity:0.4}@media (any-hover: hover){:host(:hover){opacity:0.6}}';var menuButtonMdCss=':host{--background:transparent;--color-focused:currentColor;--border-radius:initial;--padding-top:0;--padding-bottom:0;color:var(--color);text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-font-kerning:none;font-kerning:none}.button-native{border-radius:var(--border-radius);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit;border:0;outline:none;background:var(--background);line-height:1;cursor:pointer;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit;z-index:1}ion-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;pointer-events:none}:host(.menu-button-hidden){display:none}:host(.menu-button-disabled){cursor:default;opacity:0.5;pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity, 0)}}:host(.ion-color) .button-native{color:var(--ion-color-base)}:host(.in-toolbar:not(.in-toolbar-color)){color:var(--ion-toolbar-color, var(--color))}:host{--background-focused:currentColor;--background-focused-opacity:.12;--background-hover:currentColor;--background-hover-opacity:.04;--border-radius:50%;--color:initial;--padding-start:8px;--padding-end:8px;width:3rem;height:3rem;font-size:1.5rem}:host(.ion-color.ion-focused)::after{background:var(--ion-color-base)}@media (any-hover: hover){:host(.ion-color:hover) .button-native::after{background:var(--ion-color-base)}}';var MenuButton=function(){function t(t){var e=this;registerInstance(this,t);this.inheritedAttributes={};this.onClick=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(t){return[2,menuController.toggle(this.menu)]}))}))};this.visible=false;this.color=undefined;this.disabled=false;this.menu=undefined;this.autoHide=true;this.type="button"}t.prototype.componentWillLoad=function(){this.inheritedAttributes=inheritAriaAttributes(this.el)};t.prototype.componentDidLoad=function(){this.visibilityChanged()};t.prototype.visibilityChanged=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,updateVisibility(this.menu)];case 1:t.visible=e.sent();return[2]}}))}))};t.prototype.render=function(){var t;var e=this,n=e.color,i=e.disabled,r=e.inheritedAttributes;var o=getIonMode(this);var s=config.get("menuIcon",o==="ios"?menuOutline:menuSharp);var a=this.autoHide&&!this.visible;var u={type:this.type};var d=r["aria-label"]||"menu";return h(Host,{onClick:this.onClick,"aria-disabled":i?"true":null,"aria-hidden":a?"true":null,class:createColorClasses(n,(t={},t[o]=true,t.button=true,t["menu-button-hidden"]=a,t["menu-button-disabled"]=i,t["in-toolbar"]=hostContext("ion-toolbar",this.el),t["in-toolbar-color"]=hostContext("ion-toolbar[color]",this.el),t["ion-activatable"]=true,t["ion-focusable"]=true,t))},h("button",Object.assign({},u,{disabled:i,class:"button-native",part:"native","aria-label":d}),h("span",{class:"button-inner"},h("slot",null,h("ion-icon",{part:"icon",icon:s,mode:o,lazy:false,"aria-hidden":"true"}))),o==="md"&&h("ion-ripple-effect",{type:"unbounded"})))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();MenuButton.style={ios:menuButtonIosCss,md:menuButtonMdCss};var menuToggleCss=":host(.menu-toggle-hidden){display:none}";var MenuToggle=function(){function t(t){var e=this;registerInstance(this,t);this.onClick=function(){return menuController.toggle(e.menu)};this.visible=false;this.menu=undefined;this.autoHide=true}t.prototype.connectedCallback=function(){this.visibilityChanged()};t.prototype.visibilityChanged=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,updateVisibility(this.menu)];case 1:t.visible=e.sent();return[2]}}))}))};t.prototype.render=function(){var t;var e=getIonMode(this);var n=this.autoHide&&!this.visible;return h(Host,{onClick:this.onClick,"aria-hidden":n?"true":null,class:(t={},t[e]=true,t["menu-toggle-hidden"]=n,t)},h("slot",null))};return t}();MenuToggle.style=menuToggleCss;export{Menu as ion_menu,MenuButton as ion_menu_button,MenuToggle as ion_menu_toggle};
|
|
4
|
+
*/import{r as registerInstance,d as createEvent,h,H as Host,f as getElement}from"./index-27668d5b.js";import{g as getTimeGivenProgression}from"./cubic-bezier-fe2083dc.js";import{G as GESTURE_CONTROLLER}from"./gesture-controller-1bf57181.js";import{p as isEndSide,i as inheritAriaAttributes,o as assert,l as clamp}from"./helpers-ae653409.js";import{m as menuController}from"./index-01cb9192.js";import{q as getPresentedOverlay}from"./overlays-8414359b.js";import{c as config,b as getIonMode}from"./ionic-global-8fa0f940.js";import{c as createColorClasses,h as hostContext}from"./theme-01f3f29c.js";import{u as menuOutline,v as menuSharp}from"./index-f7dc70ba.js";import"./index-a5d50daf.js";import"./hardware-back-button-b2bc76db.js";import"./index-9b0d46f4.js";import"./animation-dde8cc0d.js";import"./framework-delegate-bc1fd82a.js";var menuIosCss=":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{-webkit-transform:translateX(-9999px);transform:translateX(-9999px);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:strict}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{inset-inline-start:0;inset-inline-end:auto}}@supports not (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{left:0;right:auto}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{left:unset;right:unset;left:auto;right:0}@supports selector(:dir(rtl)){:host(.menu-side-start:dir(rtl)) .menu-inner{left:unset;right:unset;left:auto;right:0}}}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}@supports selector(:dir(rtl)){:host(.menu-side-start:dir(rtl)) .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{inset-inline-start:auto;inset-inline-end:0}}@supports not (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{left:auto;right:0}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{left:unset;right:unset;left:0;right:auto}@supports selector(:dir(rtl)){:host(.menu-side-end:dir(rtl)) .menu-inner{left:unset;right:unset;left:0;right:auto}}}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}@supports selector(:dir(rtl)){:host(.menu-side-end:dir(rtl)) .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){width:var(--width);min-width:var(--min-width);max-width:var(--max-width)}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none;transform:none;-webkit-box-shadow:none;box-shadow:none}:host(.menu-pane-visible) ion-backdrop{display:hidden !important}:host(.menu-type-push){z-index:1000}:host(.menu-type-push) .show-backdrop{display:block}";var menuMdCss=":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{-webkit-transform:translateX(-9999px);transform:translateX(-9999px);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:strict}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{inset-inline-start:0;inset-inline-end:auto}}@supports not (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{left:0;right:auto}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{left:unset;right:unset;left:auto;right:0}@supports selector(:dir(rtl)){:host(.menu-side-start:dir(rtl)) .menu-inner{left:unset;right:unset;left:auto;right:0}}}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}@supports selector(:dir(rtl)){:host(.menu-side-start:dir(rtl)) .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{inset-inline-start:auto;inset-inline-end:0}}@supports not (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{left:auto;right:0}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{left:unset;right:unset;left:0;right:auto}@supports selector(:dir(rtl)){:host(.menu-side-end:dir(rtl)) .menu-inner{left:unset;right:unset;left:0;right:auto}}}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}@supports selector(:dir(rtl)){:host(.menu-side-end:dir(rtl)) .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){width:var(--width);min-width:var(--min-width);max-width:var(--max-width)}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none;transform:none;-webkit-box-shadow:none;box-shadow:none}:host(.menu-pane-visible) ion-backdrop{display:hidden !important}:host(.menu-type-overlay) .menu-inner{-webkit-box-shadow:4px 0px 16px rgba(0, 0, 0, 0.18);box-shadow:4px 0px 16px rgba(0, 0, 0, 0.18)}";var iosEasing="cubic-bezier(0.32,0.72,0,1)";var mdEasing="cubic-bezier(0.0,0.0,0.2,1)";var iosEasingReverse="cubic-bezier(1, 0, 0.68, 0.28)";var mdEasingReverse="cubic-bezier(0.4, 0, 0.6, 1)";var focusableQueryString='[tabindex]:not([tabindex^="-"]), input:not([type=hidden]):not([tabindex^="-"]), textarea:not([tabindex^="-"]), button:not([tabindex^="-"]), select:not([tabindex^="-"]), .ion-focusable:not([tabindex^="-"])';var Menu=function(){function t(t){var e=this;registerInstance(this,t);this.ionWillOpen=createEvent(this,"ionWillOpen",7);this.ionWillClose=createEvent(this,"ionWillClose",7);this.ionDidOpen=createEvent(this,"ionDidOpen",7);this.ionDidClose=createEvent(this,"ionDidClose",7);this.ionMenuChange=createEvent(this,"ionMenuChange",7);this.lastOnEnd=0;this.blocker=GESTURE_CONTROLLER.createBlocker({disableScroll:true});this.didLoad=false;this.operationCancelled=false;this.isAnimating=false;this._isOpen=false;this.inheritedAttributes={};this.handleFocus=function(t){var n=getPresentedOverlay(document);if(n&&!n.contains(e.el)){return}e.trapKeyboardFocus(t,document)};this.isPaneVisible=false;this.isEndSide=false;this.contentId=undefined;this.menuId=undefined;this.type=undefined;this.disabled=false;this.side="start";this.swipeGesture=true;this.maxEdgeStart=50}t.prototype.typeChanged=function(t,e){var n=this.contentEl;if(n){if(e!==undefined){n.classList.remove("menu-content-".concat(e))}n.classList.add("menu-content-".concat(t));n.removeAttribute("style")}if(this.menuInnerEl){this.menuInnerEl.removeAttribute("style")}this.animation=undefined};t.prototype.disabledChanged=function(){this.updateState();this.ionMenuChange.emit({disabled:this.disabled,open:this._isOpen})};t.prototype.sideChanged=function(){this.isEndSide=isEndSide(this.side);this.animation=undefined};t.prototype.swipeGestureChanged=function(){this.updateState()};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;var n=this;return __generator(this,(function(i){switch(i.label){case 0:if(!(typeof customElements!=="undefined"&&customElements!=null))return[3,2];return[4,customElements.whenDefined("ion-menu")];case 1:i.sent();i.label=2;case 2:if(this.type===undefined){this.type=config.get("menuType","overlay")}t=this.contentId!==undefined?document.getElementById(this.contentId):null;if(t===null){console.error('Menu: must have a "content" element to listen for drag events on.');return[2]}if(this.el.contains(t)){console.error('Menu: "contentId" should refer to the main view\'s ion-content, not the ion-content inside of the ion-menu.')}this.contentEl=t;t.classList.add("menu-content");this.typeChanged(this.type,undefined);this.sideChanged();menuController._register(this);this.menuChanged();e=this;return[4,import("./index-2cf77112.js")];case 3:e.gesture=i.sent().createGesture({el:document,gestureName:"menu-swipe",gesturePriority:30,threshold:10,blurOnStart:true,canStart:function(t){return n.canStart(t)},onWillStart:function(){return n.onWillStart()},onStart:function(){return n.onStart()},onMove:function(t){return n.onMove(t)},onEnd:function(t){return n.onEnd(t)}});this.updateState();return[2]}}))}))};t.prototype.componentWillLoad=function(){this.inheritedAttributes=inheritAriaAttributes(this.el)};t.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.didLoad=true;this.menuChanged();this.updateState();return[2]}))}))};t.prototype.menuChanged=function(){if(this.didLoad){this.ionMenuChange.emit({disabled:this.disabled,open:this._isOpen})}};t.prototype.disconnectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.close(false)];case 1:t.sent();this.blocker.destroy();menuController._unregister(this);if(this.animation){this.animation.destroy()}if(this.gesture){this.gesture.destroy();this.gesture=undefined}this.animation=undefined;this.contentEl=undefined;return[2]}}))}))};t.prototype.onSplitPaneChanged=function(t){var e=t.target;var n=this.el.closest("ion-split-pane");if(e!==n){return}this.isPaneVisible=t.detail.isPane(this.el);this.updateState()};t.prototype.onBackdropClick=function(t){if(this._isOpen&&this.lastOnEnd<t.timeStamp-100){var e=t.composedPath?!t.composedPath().includes(this.menuInnerEl):false;if(e){t.preventDefault();t.stopPropagation();this.close()}}};t.prototype.onKeydown=function(t){if(t.key==="Escape"){this.close()}};t.prototype.isOpen=function(){return Promise.resolve(this._isOpen)};t.prototype.isActive=function(){return Promise.resolve(this._isActive())};t.prototype.open=function(t){if(t===void 0){t=true}return this.setOpen(true,t)};t.prototype.close=function(t){if(t===void 0){t=true}return this.setOpen(false,t)};t.prototype.toggle=function(t){if(t===void 0){t=true}return this.setOpen(!this._isOpen,t)};t.prototype.setOpen=function(t,e){if(e===void 0){e=true}return menuController._setOpen(this,t,e)};t.prototype.focusFirstDescendant=function(){var t=this.el;var e=t.querySelector(focusableQueryString);if(e){e.focus()}else{t.focus()}};t.prototype.focusLastDescendant=function(){var t=this.el;var e=Array.from(t.querySelectorAll(focusableQueryString));var n=e.length>0?e[e.length-1]:null;if(n){n.focus()}else{t.focus()}};t.prototype.trapKeyboardFocus=function(t,e){var n=t.target;if(!n){return}if(this.el.contains(n)){this.lastFocus=n}else{this.focusFirstDescendant();if(this.lastFocus===e.activeElement){this.focusLastDescendant()}}};t.prototype._setOpen=function(t,e){if(e===void 0){e=true}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:if(!this._isActive()||this.isAnimating||t===this._isOpen){return[2,false]}this.beforeAnimation(t);return[4,this.loadAnimation()];case 1:n.sent();return[4,this.startAnimation(t,e)];case 2:n.sent();if(this.operationCancelled){this.operationCancelled=false;return[2,false]}this.afterAnimation(t);return[2,true]}}))}))};t.prototype.loadAnimation=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n,i;return __generator(this,(function(r){switch(r.label){case 0:t=this.menuInnerEl.offsetWidth;e=isEndSide(this.side);if(t===this.width&&this.animation!==undefined&&e===this.isEndSide){return[2]}this.width=t;this.isEndSide=e;if(this.animation){this.animation.destroy();this.animation=undefined}i=this;return[4,menuController._createAnimation(this.type,this)];case 1:n=i.animation=r.sent();if(!config.getBoolean("animated",true)){n.duration(0)}n.fill("both");return[2]}}))}))};t.prototype.startAnimation=function(t,e){return __awaiter(this,void 0,void 0,(function(){var n,i,r,o,s;return __generator(this,(function(a){switch(a.label){case 0:n=!t;i=getIonMode(this);r=i==="ios"?iosEasing:mdEasing;o=i==="ios"?iosEasingReverse:mdEasingReverse;s=this.animation.direction(n?"reverse":"normal").easing(n?o:r);if(!e)return[3,2];return[4,s.play()];case 1:a.sent();return[3,3];case 2:s.play({sync:true});a.label=3;case 3:if(s.getDirection()==="reverse"){s.direction("normal")}return[2]}}))}))};t.prototype._isActive=function(){return!this.disabled&&!this.isPaneVisible};t.prototype.canSwipe=function(){return this.swipeGesture&&!this.isAnimating&&this._isActive()};t.prototype.canStart=function(t){var e=!!document.querySelector("ion-modal.show-modal");if(e||!this.canSwipe()){return false}if(this._isOpen){return true}else if(menuController._getOpenSync()){return false}return checkEdgeSide(window,t.currentX,this.isEndSide,this.maxEdgeStart)};t.prototype.onWillStart=function(){this.beforeAnimation(!this._isOpen);return this.loadAnimation()};t.prototype.onStart=function(){if(!this.isAnimating||!this.animation){assert(false,"isAnimating has to be true");return}this.animation.progressStart(true,this._isOpen?1:0)};t.prototype.onMove=function(t){if(!this.isAnimating||!this.animation){assert(false,"isAnimating has to be true");return}var e=computeDelta(t.deltaX,this._isOpen,this.isEndSide);var n=e/this.width;this.animation.progressStep(this._isOpen?1-n:n)};t.prototype.onEnd=function(t){var e=this;if(!this.isAnimating||!this.animation){assert(false,"isAnimating has to be true");return}var n=this._isOpen;var i=this.isEndSide;var r=computeDelta(t.deltaX,n,i);var o=this.width;var s=r/o;var a=t.velocityX;var u=o/2;var h=a>=0&&(a>.2||t.deltaX>u);var d=a<=0&&(a<-.2||t.deltaX<-u);var l=n?i?h:d:i?d:h;var c=!n&&l;if(n&&!l){c=true}this.lastOnEnd=t.currentTime;var f=l?.001:-.001;var m=s<0?.01:s;f+=getTimeGivenProgression([0,0],[.4,0],[.6,1],[1,1],clamp(0,m,.9999))[0]||0;var p=this._isOpen?!l:l;this.animation.easing("cubic-bezier(0.4, 0.0, 0.6, 1)").onFinish((function(){return e.afterAnimation(c)}),{oneTimeCallback:true}).progressEnd(p?1:0,this._isOpen?1-f:f,300)};t.prototype.beforeAnimation=function(t){assert(!this.isAnimating,"_before() should not be called while animating");this.el.classList.add(SHOW_MENU);this.el.setAttribute("tabindex","0");if(this.backdropEl){this.backdropEl.classList.add(SHOW_BACKDROP)}if(this.contentEl){this.contentEl.classList.add(MENU_CONTENT_OPEN);this.contentEl.setAttribute("aria-hidden","true")}this.blocker.block();this.isAnimating=true;if(t){this.ionWillOpen.emit()}else{this.ionWillClose.emit()}};t.prototype.afterAnimation=function(t){var e;this._isOpen=t;this.isAnimating=false;if(!this._isOpen){this.blocker.unblock()}if(t){this.ionDidOpen.emit();var n=(e=document.activeElement)===null||e===void 0?void 0:e.closest("ion-menu");if(n!==this.el){this.el.focus()}document.addEventListener("focus",this.handleFocus,true)}else{this.el.classList.remove(SHOW_MENU);this.el.removeAttribute("tabindex");if(this.contentEl){this.contentEl.classList.remove(MENU_CONTENT_OPEN);this.contentEl.removeAttribute("aria-hidden")}if(this.backdropEl){this.backdropEl.classList.remove(SHOW_BACKDROP)}if(this.animation){this.animation.stop()}this.ionDidClose.emit();document.removeEventListener("focus",this.handleFocus,true)}};t.prototype.updateState=function(){var t=this._isActive();if(this.gesture){this.gesture.enable(t&&this.swipeGesture)}if(!t){if(this.isAnimating){this.operationCancelled=true}this.afterAnimation(false)}};t.prototype.render=function(){var t;var e=this;var n=this,i=n.type,r=n.disabled,o=n.isPaneVisible,s=n.inheritedAttributes,a=n.side;var u=getIonMode(this);return h(Host,{role:"navigation","aria-label":s["aria-label"]||"menu",class:(t={},t[u]=true,t["menu-type-".concat(i)]=true,t["menu-enabled"]=!r,t["menu-side-".concat(a)]=true,t["menu-pane-visible"]=o,t)},h("div",{class:"menu-inner",part:"container",ref:function(t){return e.menuInnerEl=t}},h("slot",null)),h("ion-backdrop",{ref:function(t){return e.backdropEl=t},class:"menu-backdrop",tappable:false,stopPropagation:false,part:"backdrop"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{type:["typeChanged"],disabled:["disabledChanged"],side:["sideChanged"],swipeGesture:["swipeGestureChanged"]}},enumerable:false,configurable:true});return t}();var computeDelta=function(t,e,n){return Math.max(0,e!==n?-t:t)};var checkEdgeSide=function(t,e,n,i){if(n){return e>=t.innerWidth-i}else{return e<=i}};var SHOW_MENU="show-menu";var SHOW_BACKDROP="show-backdrop";var MENU_CONTENT_OPEN="menu-content-open";Menu.style={ios:menuIosCss,md:menuMdCss};var updateVisibility=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e,n;return __generator(this,(function(i){switch(i.label){case 0:return[4,menuController.get(t)];case 1:e=i.sent();n=e;if(!n)return[3,3];return[4,e.isActive()];case 2:n=i.sent();i.label=3;case 3:return[2,!!n]}}))}))};var menuButtonIosCss=':host{--background:transparent;--color-focused:currentColor;--border-radius:initial;--padding-top:0;--padding-bottom:0;color:var(--color);text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-font-kerning:none;font-kerning:none}.button-native{border-radius:var(--border-radius);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit;border:0;outline:none;background:var(--background);line-height:1;cursor:pointer;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit;z-index:1}ion-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;pointer-events:none}:host(.menu-button-hidden){display:none}:host(.menu-button-disabled){cursor:default;opacity:0.5;pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity, 0)}}:host(.ion-color) .button-native{color:var(--ion-color-base)}:host(.in-toolbar:not(.in-toolbar-color)){color:var(--ion-toolbar-color, var(--color))}:host{--background-focused:currentColor;--background-focused-opacity:.1;--border-radius:4px;--color:var(--ion-color-primary, #3880ff);--padding-start:5px;--padding-end:5px;min-height:32px;font-size:clamp(31px, 1.9375rem, 38.13px)}:host(.ion-activated){opacity:0.4}@media (any-hover: hover){:host(:hover){opacity:0.6}}';var menuButtonMdCss=':host{--background:transparent;--color-focused:currentColor;--border-radius:initial;--padding-top:0;--padding-bottom:0;color:var(--color);text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-font-kerning:none;font-kerning:none}.button-native{border-radius:var(--border-radius);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit;border:0;outline:none;background:var(--background);line-height:1;cursor:pointer;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit;z-index:1}ion-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;pointer-events:none}:host(.menu-button-hidden){display:none}:host(.menu-button-disabled){cursor:default;opacity:0.5;pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity, 0)}}:host(.ion-color) .button-native{color:var(--ion-color-base)}:host(.in-toolbar:not(.in-toolbar-color)){color:var(--ion-toolbar-color, var(--color))}:host{--background-focused:currentColor;--background-focused-opacity:.12;--background-hover:currentColor;--background-hover-opacity:.04;--border-radius:50%;--color:initial;--padding-start:8px;--padding-end:8px;width:3rem;height:3rem;font-size:1.5rem}:host(.ion-color.ion-focused)::after{background:var(--ion-color-base)}@media (any-hover: hover){:host(.ion-color:hover) .button-native::after{background:var(--ion-color-base)}}';var MenuButton=function(){function t(t){var e=this;registerInstance(this,t);this.inheritedAttributes={};this.onClick=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(t){return[2,menuController.toggle(this.menu)]}))}))};this.visible=false;this.color=undefined;this.disabled=false;this.menu=undefined;this.autoHide=true;this.type="button"}t.prototype.componentWillLoad=function(){this.inheritedAttributes=inheritAriaAttributes(this.el)};t.prototype.componentDidLoad=function(){this.visibilityChanged()};t.prototype.visibilityChanged=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,updateVisibility(this.menu)];case 1:t.visible=e.sent();return[2]}}))}))};t.prototype.render=function(){var t;var e=this,n=e.color,i=e.disabled,r=e.inheritedAttributes;var o=getIonMode(this);var s=config.get("menuIcon",o==="ios"?menuOutline:menuSharp);var a=this.autoHide&&!this.visible;var u={type:this.type};var d=r["aria-label"]||"menu";return h(Host,{onClick:this.onClick,"aria-disabled":i?"true":null,"aria-hidden":a?"true":null,class:createColorClasses(n,(t={},t[o]=true,t.button=true,t["menu-button-hidden"]=a,t["menu-button-disabled"]=i,t["in-toolbar"]=hostContext("ion-toolbar",this.el),t["in-toolbar-color"]=hostContext("ion-toolbar[color]",this.el),t["ion-activatable"]=true,t["ion-focusable"]=true,t))},h("button",Object.assign({},u,{disabled:i,class:"button-native",part:"native","aria-label":d}),h("span",{class:"button-inner"},h("slot",null,h("ion-icon",{part:"icon",icon:s,mode:o,lazy:false,"aria-hidden":"true"}))),o==="md"&&h("ion-ripple-effect",{type:"unbounded"})))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();MenuButton.style={ios:menuButtonIosCss,md:menuButtonMdCss};var menuToggleCss=":host(.menu-toggle-hidden){display:none}";var MenuToggle=function(){function t(t){var e=this;registerInstance(this,t);this.onClick=function(){return menuController.toggle(e.menu)};this.visible=false;this.menu=undefined;this.autoHide=true}t.prototype.connectedCallback=function(){this.visibilityChanged()};t.prototype.visibilityChanged=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,updateVisibility(this.menu)];case 1:t.visible=e.sent();return[2]}}))}))};t.prototype.render=function(){var t;var e=getIonMode(this);var n=this.autoHide&&!this.visible;return h(Host,{onClick:this.onClick,"aria-hidden":n?"true":null,class:(t={},t[e]=true,t["menu-toggle-hidden"]=n,t)},h("slot",null))};return t}();MenuToggle.style=menuToggleCss;export{Menu as ion_menu,MenuButton as ion_menu_button,MenuToggle as ion_menu_toggle};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{__awaiter,__generator,__spreadArray}from"tslib";
|
|
2
2
|
/*!
|
|
3
3
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{r as registerInstance,d as createEvent,w as writeTask,h,H as Host,f as getElement}from"./index-b7d870cf.js";import{f as findClosestIonContent,i as isIonContent,d as disableContentScrollY,r as resetContentScrollY,a as findIonContent,p as printIonContentErrorMsg}from"./index-b9e742e5.js";import{C as CoreDelegate,a as attachComponent,d as detachComponent}from"./framework-delegate-bc1fd82a.js";import{g as getElementRoot,l as clamp,r as raf,k as inheritAttributes,m as hasLazyBuild}from"./helpers-ae653409.js";import{c as createLockController}from"./lock-controller-316928be.js";import{p as printIonWarning}from"./index-9b0d46f4.js";import{g as getCapacitor}from"./capacitor-59395cbd.js";import{G as GESTURE,O as OVERLAY_GESTURE_PRIORITY,e as createTriggerController,B as BACKDROP,j as prepareOverlay,k as setOverlayId,f as present,n as activeAnimations,g as dismiss,h as eventMethod}from"./overlays-b33f6bca.js";import{g as getClassMap}from"./theme-01f3f29c.js";import{e as deepReady,w as waitForMount}from"./index-4743453d.js";import{b as getIonMode,c as config}from"./ionic-global-1f99b929.js";import{KEYBOARD_DID_OPEN}from"./keyboard-52278bd7.js";import{c as createAnimation}from"./animation-dde8cc0d.js";import{g as getTimeGivenProgression}from"./cubic-bezier-fe2083dc.js";import{createGesture}from"./index-2cf77112.js";import{w as win}from"./index-a5d50daf.js";import"./hardware-back-button-b2bc76db.js";import"./keyboard-73175e24.js";import"./gesture-controller-1bf57181.js";var Style;(function(t){t["Dark"]="DARK";t["Light"]="LIGHT";t["Default"]="DEFAULT"})(Style||(Style={}));var StatusBar={getEngine:function(){var t=getCapacitor();if(t===null||t===void 0?void 0:t.isPluginAvailable("StatusBar")){return t.Plugins.StatusBar}return undefined},supportsDefaultStatusBarStyle:function(){var t=getCapacitor();return!!(t===null||t===void 0?void 0:t.PluginHeaders)},setStyle:function(t){var e=this.getEngine();if(!e){return}e.setStyle(t)},getStyle:function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(r){switch(r.label){case 0:t=this.getEngine();if(!t){return[2,Style.Default]}return[4,t.getInfo()];case 1:e=r.sent().style;return[2,e]}}))}))}};var getBackdropValueForSheet=function(t,e){if(e===1){return 0}var r=1/(1-e);var a=-(e*r);return t*r+a};var setCardStatusBarDark=function(){if(!win||win.innerWidth>=768||!StatusBar.supportsDefaultStatusBarStyle()){return}StatusBar.setStyle({style:Style.Dark})};var setCardStatusBarDefault=function(t){if(t===void 0){t=Style.Default}if(!win||win.innerWidth>=768||!StatusBar.supportsDefaultStatusBarStyle()){return}StatusBar.setStyle({style:t})};var handleCanDismiss=function(t,e){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(a){switch(a.label){case 0:if(typeof t.canDismiss!=="function"){return[2]}return[4,t.canDismiss(undefined,GESTURE)];case 1:r=a.sent();if(!r){return[2]}if(e.isRunning()){e.onFinish((function(){t.dismiss(undefined,"handler")}),{oneTimeCallback:true})}else{t.dismiss(undefined,"handler")}return[2]}}))}))};var calculateSpringStep=function(t){return.00255275*Math.pow(2.71828,-14.9619*t)-1.00255*Math.pow(2.71828,-.0380968*t)+1};var SwipeToCloseDefaults={MIN_PRESENTING_SCALE:.93};var createSwipeToCloseGesture=function(t,e,r,a){var i=.5;var n=t.offsetHeight;var o=false;var s=false;var d=null;var l=null;var u=.2;var f=true;var c=0;var h=function(){if(d&&isIonContent(d)){return d.scrollY}else{return true}};var p=function(t){var e=t.event.target;if(e===null||!e.closest){return true}d=findClosestIonContent(e);if(d){if(isIonContent(d)){var r=getElementRoot(d);l=r.querySelector(".inner-scroll")}else{l=d}var a=!!d.querySelector("ion-refresher");return!a&&l.scrollTop===0}var i=e.closest("ion-footer");if(i===null){return true}return false};var m=function(r){var a=r.deltaY;f=h();s=t.canDismiss!==undefined&&t.canDismiss!==true;if(a>0&&d){disableContentScrollY(d)}e.progressStart(true,o?1:0)};var v=function(t){var a=t.deltaY;if(a>0&&d){disableContentScrollY(d)}var o=t.deltaY/n;var l=o>=0&&s;var f=l?u:.9999;var h=l?calculateSpringStep(o/f):o;var p=clamp(1e-4,h,f);e.progressStep(p);if(p>=i&&c<i){setCardStatusBarDefault(r)}else if(p<i&&c>=i){setCardStatusBarDark()}c=p};var b=function(r){var l=r.velocityY;var c=r.deltaY/n;var h=c>=0&&s;var p=h?u:.9999;var m=h?calculateSpringStep(c/p):c;var v=clamp(1e-4,m,p);var b=(r.deltaY+l*1e3)/n;var g=!h&&b>=i;var x=g?-.001:.001;if(!g){e.easing("cubic-bezier(1, 0, 0.68, 0.28)");x+=getTimeGivenProgression([0,0],[1,0],[.68,.28],[1,1],v)[0]}else{e.easing("cubic-bezier(0.32, 0.72, 0, 1)");x+=getTimeGivenProgression([0,0],[.32,.72],[0,1],[1,1],v)[0]}var y=g?computeDuration(c*n,l):computeDuration((1-v)*n,l);o=g;w.enable(false);if(d){resetContentScrollY(d,f)}e.onFinish((function(){if(!g){w.enable(true)}})).progressEnd(g?1:0,x,y);if(h&&v>p/4){handleCanDismiss(t,e)}else if(g){a()}};var w=createGesture({el:t,gestureName:"modalSwipeToClose",gesturePriority:OVERLAY_GESTURE_PRIORITY,direction:"y",threshold:10,canStart:p,onStart:m,onMove:v,onEnd:b});return w};var computeDuration=function(t,e){return clamp(400,t/Math.abs(e*1.1),500)};var createSheetEnterAnimation=function(t){var e=t.currentBreakpoint,r=t.backdropBreakpoint;var a=r===undefined||r<e;var i=a?"calc(var(--backdrop-opacity) * ".concat(e,")"):"0";var n=createAnimation("backdropAnimation").fromTo("opacity",0,i);if(a){n.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"])}var o=createAnimation("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:"translateY(".concat(100-e*100,"%)")}]);return{wrapperAnimation:o,backdropAnimation:n}};var createSheetLeaveAnimation=function(t){var e=t.currentBreakpoint,r=t.backdropBreakpoint;var a="calc(var(--backdrop-opacity) * ".concat(getBackdropValueForSheet(e,r),")");var i=[{offset:0,opacity:a},{offset:1,opacity:0}];var n=[{offset:0,opacity:a},{offset:r,opacity:0},{offset:1,opacity:0}];var o=createAnimation("backdropAnimation").keyframes(r!==0?n:i);var s=createAnimation("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(".concat(100-e*100,"%)")},{offset:1,opacity:1,transform:"translateY(100%)"}]);return{wrapperAnimation:s,backdropAnimation:o}};var createEnterAnimation$1=function(){var t=createAnimation().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);var e=createAnimation().fromTo("transform","translateY(100vh)","translateY(0vh)");return{backdropAnimation:t,wrapperAnimation:e}};var iosEnterAnimation=function(t,e){var r=e.presentingEl,a=e.currentBreakpoint;var i=getElementRoot(t);var n=a!==undefined?createSheetEnterAnimation(e):createEnterAnimation$1(),o=n.wrapperAnimation,s=n.backdropAnimation;s.addElement(i.querySelector("ion-backdrop"));o.addElement(i.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});var d=createAnimation("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation(o);if(r){var l=window.innerWidth<768;var u=r.tagName==="ION-MODAL"&&r.presentingElement!==undefined;var f=getElementRoot(r);var c=createAnimation().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});var h=t.closest("ion-app");if(l&&h){var p=!CSS.supports("width","max(0px, 1px)")?"30px":"max(30px, var(--ion-safe-area-top))";var m=u?"-10px":p;var v=SwipeToCloseDefaults.MIN_PRESENTING_SCALE;var b="translateY(".concat(m,") scale(").concat(v,")");c.afterStyles({transform:b}).beforeAddWrite((function(){return h.style.setProperty("background-color","black")})).addElement(r).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"},{offset:1,filter:"contrast(0.85)",transform:b,borderRadius:"10px 10px 0 0"}]);d.addAnimation(c)}else{d.addAnimation(s);if(!u){o.fromTo("opacity","0","1")}else{var v=u?SwipeToCloseDefaults.MIN_PRESENTING_SCALE:1;var b="translateY(-10px) scale(".concat(v,")");c.afterStyles({transform:b}).addElement(f.querySelector(".modal-wrapper")).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0) scale(1)"},{offset:1,filter:"contrast(0.85)",transform:b}]);var w=createAnimation().afterStyles({transform:b}).addElement(f.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:b}]);d.addAnimation([c,w])}}}else{d.addAnimation(s)}return d};var createLeaveAnimation$1=function(){var t=createAnimation().fromTo("opacity","var(--backdrop-opacity)",0);var e=createAnimation().fromTo("transform","translateY(0vh)","translateY(100vh)");return{backdropAnimation:t,wrapperAnimation:e}};var iosLeaveAnimation=function(t,e,r){if(r===void 0){r=500}var a=e.presentingEl,i=e.currentBreakpoint;var n=getElementRoot(t);var o=i!==undefined?createSheetLeaveAnimation(e):createLeaveAnimation$1(),s=o.wrapperAnimation,d=o.backdropAnimation;d.addElement(n.querySelector("ion-backdrop"));s.addElement(n.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});var l=createAnimation("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(r).addAnimation(s);var u=t.closest("ion-app");if(a&&u){var f=window.innerWidth<768;var c=a.tagName==="ION-MODAL"&&a.presentingElement!==undefined;var h=getElementRoot(a);var p=createAnimation().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((function(t){if(t!==1){return}a.style.setProperty("overflow","");var e=Array.from(u.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((function(t){return t.presentingElement!==undefined})).length;if(e<=1){u.style.setProperty("background-color","")}}));if(f){var m=!CSS.supports("width","max(0px, 1px)")?"30px":"max(30px, var(--ion-safe-area-top))";var v=c?"-10px":m;var b=SwipeToCloseDefaults.MIN_PRESENTING_SCALE;var w="translateY(".concat(v,") scale(").concat(b,")");p.addElement(a).keyframes([{offset:0,filter:"contrast(0.85)",transform:w,borderRadius:"10px 10px 0 0"},{offset:1,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"}]);l.addAnimation(p)}else{l.addAnimation(d);if(!c){s.fromTo("opacity","1","0")}else{var b=c?SwipeToCloseDefaults.MIN_PRESENTING_SCALE:1;var w="translateY(-10px) scale(".concat(b,")");p.addElement(h.querySelector(".modal-wrapper")).afterStyles({transform:"translate3d(0, 0, 0)"}).keyframes([{offset:0,filter:"contrast(0.85)",transform:w},{offset:1,filter:"contrast(1)",transform:"translateY(0) scale(1)"}]);var g=createAnimation().addElement(h.querySelector(".modal-shadow")).afterStyles({transform:"translateY(0) scale(1)"}).keyframes([{offset:0,opacity:"0",transform:w},{offset:1,opacity:"1",transform:"translateY(0) scale(1)"}]);l.addAnimation([p,g])}}}else{l.addAnimation(d)}return l};var createEnterAnimation=function(){var t=createAnimation().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);var e=createAnimation().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}]);return{backdropAnimation:t,wrapperAnimation:e}};var mdEnterAnimation=function(t,e){var r=e.currentBreakpoint;var a=getElementRoot(t);var i=r!==undefined?createSheetEnterAnimation(e):createEnterAnimation(),n=i.wrapperAnimation,o=i.backdropAnimation;o.addElement(a.querySelector("ion-backdrop"));n.addElement(a.querySelector(".modal-wrapper"));return createAnimation().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([o,n])};var createLeaveAnimation=function(){var t=createAnimation().fromTo("opacity","var(--backdrop-opacity)",0);var e=createAnimation().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}]);return{backdropAnimation:t,wrapperAnimation:e}};var mdLeaveAnimation=function(t,e){var r=e.currentBreakpoint;var a=getElementRoot(t);var i=r!==undefined?createSheetLeaveAnimation(e):createLeaveAnimation(),n=i.wrapperAnimation,o=i.backdropAnimation;o.addElement(a.querySelector("ion-backdrop"));n.addElement(a.querySelector(".modal-wrapper"));return createAnimation().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([o,n])};var createSheetGesture=function(t,e,r,a,i,n,o,s,d,l){if(o===void 0){o=[]}var u=[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}];var f=[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-i,opacity:0},{offset:1,opacity:0}];var c={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:i!==0?f:u};var h=t.querySelector("ion-content");var p=r.clientHeight;var m=a;var v=0;var b=false;var w=.95;var g=n.childAnimations.find((function(t){return t.id==="wrapperAnimation"}));var x=n.childAnimations.find((function(t){return t.id==="backdropAnimation"}));var y=o[o.length-1];var k=o[0];var A=function(){t.style.setProperty("pointer-events","auto");e.style.setProperty("pointer-events","auto");t.classList.remove("ion-disable-focus-trap")};var E=function(){t.style.setProperty("pointer-events","none");e.style.setProperty("pointer-events","none");t.classList.add("ion-disable-focus-trap")};if(g&&x){g.keyframes(__spreadArray([],c.WRAPPER_KEYFRAMES,true));x.keyframes(__spreadArray([],c.BACKDROP_KEYFRAMES,true));n.progressStart(true,1-m);var S=m>i;if(S){A()}else{E()}}if(h&&m!==y){h.scrollY=false}var C=function(t){var e=t.event.target.closest("ion-content");m=s();if(m===1&&e){return false}return true};var _=function(){b=t.canDismiss!==undefined&&t.canDismiss!==true&&k===0;if(h){h.scrollY=false}raf((function(){t.focus()}));n.progressStart(true,1-m)};var D=function(t){var e=1-m;var r=o.length>1?1-o[1]:undefined;var a=e+t.deltaY/p;var i=r!==undefined&&a>=r&&b;var s=i?w:.9999;var d=i&&r!==undefined?r+calculateSpringStep((a-r)/(s-r)):a;v=clamp(1e-4,d,s);n.progressStep(v)};var M=function(t){var e=t.velocityY;var r=(t.deltaY+e*350)/p;var a=m-r;var i=o.reduce((function(t,e){return Math.abs(e-a)<Math.abs(t-a)?e:t}));I({breakpoint:i,breakpointOffset:v,canDismiss:b,animated:true})};var I=function(e){var r=e.breakpoint,a=e.canDismiss,s=e.breakpointOffset,u=e.animated;var f=a&&r===0;var p=f?m:r;var v=p!==0;m=0;if(g&&x){g.keyframes([{offset:0,transform:"translateY(".concat(s*100,"%)")},{offset:1,transform:"translateY(".concat((1-p)*100,"%)")}]);x.keyframes([{offset:0,opacity:"calc(var(--backdrop-opacity) * ".concat(getBackdropValueForSheet(1-s,i),")")},{offset:1,opacity:"calc(var(--backdrop-opacity) * ".concat(getBackdropValueForSheet(p,i),")")}]);n.progressStep(0)}Y.enable(false);if(f){handleCanDismiss(t,n)}else if(!v){d()}return new Promise((function(t){n.onFinish((function(){if(v){if(g&&x){raf((function(){g.keyframes(__spreadArray([],c.WRAPPER_KEYFRAMES,true));x.keyframes(__spreadArray([],c.BACKDROP_KEYFRAMES,true));n.progressStart(true,1-p);m=p;l(m);if(h&&m===o[o.length-1]){h.scrollY=true}var e=m>i;if(e){A()}else{E()}Y.enable(true);t()}))}else{Y.enable(true);t()}}else{t()}}),{oneTimeCallback:true}).progressEnd(1,0,u?500:0)}))};var Y=createGesture({el:r,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:C,onStart:_,onMove:D,onEnd:M});return{gesture:Y,moveSheetToBreakpoint:I}};var modalIosCss=':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, #c0c0be);cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl]):host(.modal-card) .modal-wrapper,:host-context([dir=rtl]).modal-card .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}@supports selector(:dir(rtl)){:host(.modal-card:dir(rtl)) .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl]):host(.modal-sheet) .modal-wrapper,:host-context([dir=rtl]).modal-sheet .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}@supports selector(:dir(rtl)){:host(.modal-sheet:dir(rtl)) .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}}';var modalMdCss=':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, #c0c0be);cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}';var Modal=function(){function t(t){var e=this;registerInstance(this,t);this.didPresent=createEvent(this,"ionModalDidPresent",7);this.willPresent=createEvent(this,"ionModalWillPresent",7);this.willDismiss=createEvent(this,"ionModalWillDismiss",7);this.didDismiss=createEvent(this,"ionModalDidDismiss",7);this.ionBreakpointDidChange=createEvent(this,"ionBreakpointDidChange",7);this.didPresentShorthand=createEvent(this,"didPresent",7);this.willPresentShorthand=createEvent(this,"willPresent",7);this.willDismissShorthand=createEvent(this,"willDismiss",7);this.didDismissShorthand=createEvent(this,"didDismiss",7);this.ionMount=createEvent(this,"ionMount",7);this.lockController=createLockController();this.triggerController=createTriggerController();this.coreDelegate=CoreDelegate();this.isSheetModal=false;this.inheritedAttributes={};this.inline=false;this.gestureAnimationDismissing=false;this.onHandleClick=function(){var t=e,r=t.sheetTransition,a=t.handleBehavior;if(a!=="cycle"||r!==undefined){return}e.moveToNextBreakpoint()};this.onBackdropTap=function(){var t=e.sheetTransition;if(t!==undefined){return}e.dismiss(undefined,BACKDROP)};this.onLifecycle=function(t){var r=e.usersElement;var a=LIFECYCLE_MAP[t.type];if(r&&a){var i=new CustomEvent(a,{bubbles:false,cancelable:false,detail:t.detail});r.dispatchEvent(i)}};this.presented=false;this.hasController=false;this.overlayIndex=undefined;this.delegate=undefined;this.keyboardClose=true;this.enterAnimation=undefined;this.leaveAnimation=undefined;this.breakpoints=undefined;this.initialBreakpoint=undefined;this.backdropBreakpoint=0;this.handle=undefined;this.handleBehavior="none";this.component=undefined;this.componentProps=undefined;this.cssClass=undefined;this.backdropDismiss=true;this.showBackdrop=true;this.animated=true;this.presentingElement=undefined;this.htmlAttributes=undefined;this.isOpen=false;this.trigger=undefined;this.keepContentsMounted=false;this.canDismiss=true}t.prototype.onIsOpenChange=function(t,e){if(t===true&&e===false){this.present()}else if(t===false&&e===true){this.dismiss()}};t.prototype.triggerChanged=function(){var t=this,e=t.trigger,r=t.el,a=t.triggerController;if(e){a.addClickListener(r,e)}};t.prototype.breakpointsChanged=function(t){if(t!==undefined){this.sortedBreakpoints=t.sort((function(t,e){return t-e}))}};t.prototype.connectedCallback=function(){var t=this.el;prepareOverlay(t);this.triggerChanged()};t.prototype.disconnectedCallback=function(){this.triggerController.removeClickListener()};t.prototype.componentWillLoad=function(){var t=this,e=t.breakpoints,r=t.initialBreakpoint,a=t.el;var i=this.isSheetModal=e!==undefined&&r!==undefined;this.inheritedAttributes=inheritAttributes(a,["aria-label","role"]);if(i){this.currentBreakpoint=this.initialBreakpoint}if(e!==undefined&&r!==undefined&&!e.includes(r)){printIonWarning("Your breakpoints array must include the initialBreakpoint value.")}setOverlayId(a)};t.prototype.componentDidLoad=function(){var t=this;if(this.isOpen===true){raf((function(){return t.present()}))}this.breakpointsChanged(this.breakpoints);this.triggerChanged()};t.prototype.getDelegate=function(t){if(t===void 0){t=false}if(this.workingDelegate&&!t){return{delegate:this.workingDelegate,inline:this.inline}}var e=this.el.parentNode;var r=this.inline=e!==null&&!this.hasController;var a=this.workingDelegate=r?this.delegate||this.coreDelegate:this.delegate;return{inline:r,delegate:a}};t.prototype.checkCanDismiss=function(t,e){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(a){r=this.canDismiss;if(typeof r==="function"){return[2,r(t,e)]}return[2,r]}))}))};t.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,r,a,i,n,o,s,d,l;var u=this;return __generator(this,(function(f){switch(f.label){case 0:return[4,this.lockController.lock()];case 1:t=f.sent();if(this.presented){t();return[2]}e=this,r=e.presentingElement,a=e.el;this.currentBreakpoint=this.initialBreakpoint;i=this.getDelegate(true),n=i.inline,o=i.delegate;this.ionMount.emit();s=this;return[4,attachComponent(o,a,this.component,["ion-page"],this.componentProps,n)];case 2:s.usersElement=f.sent();if(!hasLazyBuild(a))return[3,4];return[4,deepReady(this.usersElement)];case 3:f.sent();return[3,6];case 4:if(!!this.keepContentsMounted)return[3,6];return[4,waitForMount()];case 5:f.sent();f.label=6;case 6:writeTask((function(){return u.el.classList.add("show-modal")}));d=r!==undefined;if(!(d&&getIonMode(this)==="ios"))return[3,8];l=this;return[4,StatusBar.getStyle()];case 7:l.statusBarStyle=f.sent();setCardStatusBarDark();f.label=8;case 8:return[4,present(this,"modalEnter",iosEnterAnimation,mdEnterAnimation,{presentingEl:r,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint})];case 9:f.sent();if(typeof window!=="undefined"){this.keyboardOpenCallback=function(){if(u.gesture){u.gesture.enable(false);raf((function(){if(u.gesture){u.gesture.enable(true)}}))}};window.addEventListener(KEYBOARD_DID_OPEN,this.keyboardOpenCallback)}if(this.isSheetModal){this.initSheetGesture()}else if(d){this.initSwipeToClose()}t();return[2]}}))}))};t.prototype.initSwipeToClose=function(){var t=this;var e;if(getIonMode(this)!=="ios"){return}var r=this.el;var a=this.leaveAnimation||config.get("modalLeave",iosLeaveAnimation);var i=this.animation=a(r,{presentingEl:this.presentingElement});var n=findIonContent(r);if(!n){printIonContentErrorMsg(r);return}var o=(e=this.statusBarStyle)!==null&&e!==void 0?e:Style.Default;this.gesture=createSwipeToCloseGesture(r,i,o,(function(){t.gestureAnimationDismissing=true;setCardStatusBarDefault(t.statusBarStyle);t.animation.onFinish((function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.dismiss(undefined,GESTURE)];case 1:t.sent();this.gestureAnimationDismissing=false;return[2]}}))}))}))}));this.gesture.enable(true)};t.prototype.initSheetGesture=function(){var t=this;var e=this,r=e.wrapperEl,a=e.initialBreakpoint,i=e.backdropBreakpoint;if(!r||a===undefined){return}var n=this.enterAnimation||config.get("modalEnter",iosEnterAnimation);var o=this.animation=n(this.el,{presentingEl:this.presentingElement,currentBreakpoint:a,backdropBreakpoint:i});o.progressStart(true,1);var s=createSheetGesture(this.el,this.backdropEl,r,a,i,o,this.sortedBreakpoints,(function(){var e;return(e=t.currentBreakpoint)!==null&&e!==void 0?e:0}),(function(){return t.sheetOnDismiss()}),(function(e){if(t.currentBreakpoint!==e){t.currentBreakpoint=e;t.ionBreakpointDidChange.emit({breakpoint:e})}})),d=s.gesture,l=s.moveSheetToBreakpoint;this.gesture=d;this.moveSheetToBreakpoint=l;this.gesture.enable(true)};t.prototype.sheetOnDismiss=function(){var t=this;this.gestureAnimationDismissing=true;this.animation.onFinish((function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.currentBreakpoint=0;this.ionBreakpointDidChange.emit({breakpoint:this.currentBreakpoint});return[4,this.dismiss(undefined,GESTURE)];case 1:t.sent();this.gestureAnimationDismissing=false;return[2]}}))}))}))};t.prototype.dismiss=function(t,e){return __awaiter(this,void 0,void 0,(function(){var r,a,i,n,o,s,d,l;var u=this;return __generator(this,(function(f){switch(f.label){case 0:if(this.gestureAnimationDismissing&&e!==GESTURE){return[2,false]}return[4,this.lockController.lock()];case 1:a=f.sent();i=e!=="handler";if(!i)return[3,3];return[4,this.checkCanDismiss(t,e)];case 2:i=!f.sent();f.label=3;case 3:if(i){a();return[2,false]}n=this.presentingElement;o=n!==undefined;if(o&&getIonMode(this)==="ios"){setCardStatusBarDefault(this.statusBarStyle)}if(typeof window!=="undefined"&&this.keyboardOpenCallback){window.removeEventListener(KEYBOARD_DID_OPEN,this.keyboardOpenCallback);this.keyboardOpenCallback=undefined}s=activeAnimations.get(this)||[];return[4,dismiss(this,t,e,"modalLeave",iosLeaveAnimation,mdLeaveAnimation,{presentingEl:n,currentBreakpoint:(r=this.currentBreakpoint)!==null&&r!==void 0?r:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint})];case 4:d=f.sent();if(!d)return[3,6];l=this.getDelegate().delegate;return[4,detachComponent(l,this.usersElement)];case 5:f.sent();writeTask((function(){return u.el.classList.remove("show-modal")}));if(this.animation){this.animation.destroy()}if(this.gesture){this.gesture.destroy()}s.forEach((function(t){return t.destroy()}));f.label=6;case 6:this.currentBreakpoint=undefined;this.animation=undefined;a();return[2,d]}}))}))};t.prototype.onDidDismiss=function(){return eventMethod(this.el,"ionModalDidDismiss")};t.prototype.onWillDismiss=function(){return eventMethod(this.el,"ionModalWillDismiss")};t.prototype.setCurrentBreakpoint=function(t){return __awaiter(this,void 0,void 0,(function(){var e,r,a,i,n,o;return __generator(this,(function(s){switch(s.label){case 0:if(!this.isSheetModal){printIonWarning("setCurrentBreakpoint is only supported on sheet modals.");return[2]}if(!this.breakpoints.includes(t)){printIonWarning("Attempted to set invalid breakpoint value ".concat(t,". Please double check that the breakpoint value is part of your defined breakpoints."));return[2]}e=this,r=e.currentBreakpoint,a=e.moveSheetToBreakpoint,i=e.canDismiss,n=e.breakpoints,o=e.animated;if(r===t){return[2]}if(!a)return[3,2];this.sheetTransition=a({breakpoint:t,breakpointOffset:1-r,canDismiss:i!==undefined&&i!==true&&n[0]===0,animated:o});return[4,this.sheetTransition];case 1:s.sent();this.sheetTransition=undefined;s.label=2;case 2:return[2]}}))}))};t.prototype.getCurrentBreakpoint=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.currentBreakpoint]}))}))};t.prototype.moveToNextBreakpoint=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,r,a,i,n,o;return __generator(this,(function(s){switch(s.label){case 0:t=this,e=t.breakpoints,r=t.currentBreakpoint;if(!e||r==null){return[2,false]}a=e.filter((function(t){return t!==0}));i=a.indexOf(r);n=(i+1)%a.length;o=a[n];return[4,this.setCurrentBreakpoint(o)];case 1:s.sent();return[2,true]}}))}))};t.prototype.render=function(){var t;var e=this;var r=this,a=r.handle,i=r.isSheetModal,n=r.presentingElement,o=r.htmlAttributes,s=r.handleBehavior,d=r.inheritedAttributes;var l=a!==false&&i;var u=getIonMode(this);var f=n!==undefined&&u==="ios";var c=s==="cycle";return h(Host,Object.assign({"no-router":true,tabindex:"-1"},o,{style:{zIndex:"".concat(2e4+this.overlayIndex)},class:Object.assign((t={},t[u]=true,t["modal-default"]=!f&&!i,t["modal-card"]=f,t["modal-sheet"]=i,t["overlay-hidden"]=true,t),getClassMap(this.cssClass)),onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle}),h("ion-backdrop",{ref:function(t){return e.backdropEl=t},visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),u==="ios"&&h("div",{class:"modal-shadow"}),h("div",Object.assign({role:"dialog"},d,{"aria-modal":"true",class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:function(t){return e.wrapperEl=t}}),l&&h("button",{class:"modal-handle",tabIndex:!c?-1:0,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:c?this.onHandleClick:undefined,part:"handle"}),h("slot",null)))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}},enumerable:false,configurable:true});return t}();var LIFECYCLE_MAP={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};Modal.style={ios:modalIosCss,md:modalMdCss};export{Modal as ion_modal};
|
|
4
|
+
*/import{r as registerInstance,d as createEvent,w as writeTask,h,H as Host,f as getElement}from"./index-27668d5b.js";import{f as findClosestIonContent,i as isIonContent,d as disableContentScrollY,r as resetContentScrollY,a as findIonContent,p as printIonContentErrorMsg}from"./index-b9e742e5.js";import{C as CoreDelegate,a as attachComponent,d as detachComponent}from"./framework-delegate-bc1fd82a.js";import{g as getElementRoot,l as clamp,r as raf,k as inheritAttributes,m as hasLazyBuild}from"./helpers-ae653409.js";import{c as createLockController}from"./lock-controller-316928be.js";import{p as printIonWarning}from"./index-9b0d46f4.js";import{g as getCapacitor}from"./capacitor-59395cbd.js";import{G as GESTURE,O as OVERLAY_GESTURE_PRIORITY,e as createTriggerController,B as BACKDROP,j as prepareOverlay,k as setOverlayId,f as present,n as activeAnimations,g as dismiss,h as eventMethod}from"./overlays-8414359b.js";import{g as getClassMap}from"./theme-01f3f29c.js";import{e as deepReady,w as waitForMount}from"./index-a97c95a7.js";import{b as getIonMode,c as config}from"./ionic-global-8fa0f940.js";import{KEYBOARD_DID_OPEN}from"./keyboard-52278bd7.js";import{c as createAnimation}from"./animation-dde8cc0d.js";import{g as getTimeGivenProgression}from"./cubic-bezier-fe2083dc.js";import{createGesture}from"./index-2cf77112.js";import{w as win}from"./index-a5d50daf.js";import"./hardware-back-button-b2bc76db.js";import"./keyboard-73175e24.js";import"./gesture-controller-1bf57181.js";var Style;(function(t){t["Dark"]="DARK";t["Light"]="LIGHT";t["Default"]="DEFAULT"})(Style||(Style={}));var StatusBar={getEngine:function(){var t=getCapacitor();if(t===null||t===void 0?void 0:t.isPluginAvailable("StatusBar")){return t.Plugins.StatusBar}return undefined},supportsDefaultStatusBarStyle:function(){var t=getCapacitor();return!!(t===null||t===void 0?void 0:t.PluginHeaders)},setStyle:function(t){var e=this.getEngine();if(!e){return}e.setStyle(t)},getStyle:function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(r){switch(r.label){case 0:t=this.getEngine();if(!t){return[2,Style.Default]}return[4,t.getInfo()];case 1:e=r.sent().style;return[2,e]}}))}))}};var getBackdropValueForSheet=function(t,e){if(e===1){return 0}var r=1/(1-e);var a=-(e*r);return t*r+a};var setCardStatusBarDark=function(){if(!win||win.innerWidth>=768||!StatusBar.supportsDefaultStatusBarStyle()){return}StatusBar.setStyle({style:Style.Dark})};var setCardStatusBarDefault=function(t){if(t===void 0){t=Style.Default}if(!win||win.innerWidth>=768||!StatusBar.supportsDefaultStatusBarStyle()){return}StatusBar.setStyle({style:t})};var handleCanDismiss=function(t,e){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(a){switch(a.label){case 0:if(typeof t.canDismiss!=="function"){return[2]}return[4,t.canDismiss(undefined,GESTURE)];case 1:r=a.sent();if(!r){return[2]}if(e.isRunning()){e.onFinish((function(){t.dismiss(undefined,"handler")}),{oneTimeCallback:true})}else{t.dismiss(undefined,"handler")}return[2]}}))}))};var calculateSpringStep=function(t){return.00255275*Math.pow(2.71828,-14.9619*t)-1.00255*Math.pow(2.71828,-.0380968*t)+1};var SwipeToCloseDefaults={MIN_PRESENTING_SCALE:.93};var createSwipeToCloseGesture=function(t,e,r,a){var i=.5;var n=t.offsetHeight;var o=false;var s=false;var d=null;var l=null;var u=.2;var f=true;var c=0;var h=function(){if(d&&isIonContent(d)){return d.scrollY}else{return true}};var p=function(t){var e=t.event.target;if(e===null||!e.closest){return true}d=findClosestIonContent(e);if(d){if(isIonContent(d)){var r=getElementRoot(d);l=r.querySelector(".inner-scroll")}else{l=d}var a=!!d.querySelector("ion-refresher");return!a&&l.scrollTop===0}var i=e.closest("ion-footer");if(i===null){return true}return false};var m=function(r){var a=r.deltaY;f=h();s=t.canDismiss!==undefined&&t.canDismiss!==true;if(a>0&&d){disableContentScrollY(d)}e.progressStart(true,o?1:0)};var v=function(t){var a=t.deltaY;if(a>0&&d){disableContentScrollY(d)}var o=t.deltaY/n;var l=o>=0&&s;var f=l?u:.9999;var h=l?calculateSpringStep(o/f):o;var p=clamp(1e-4,h,f);e.progressStep(p);if(p>=i&&c<i){setCardStatusBarDefault(r)}else if(p<i&&c>=i){setCardStatusBarDark()}c=p};var b=function(r){var l=r.velocityY;var c=r.deltaY/n;var h=c>=0&&s;var p=h?u:.9999;var m=h?calculateSpringStep(c/p):c;var v=clamp(1e-4,m,p);var b=(r.deltaY+l*1e3)/n;var g=!h&&b>=i;var x=g?-.001:.001;if(!g){e.easing("cubic-bezier(1, 0, 0.68, 0.28)");x+=getTimeGivenProgression([0,0],[1,0],[.68,.28],[1,1],v)[0]}else{e.easing("cubic-bezier(0.32, 0.72, 0, 1)");x+=getTimeGivenProgression([0,0],[.32,.72],[0,1],[1,1],v)[0]}var y=g?computeDuration(c*n,l):computeDuration((1-v)*n,l);o=g;w.enable(false);if(d){resetContentScrollY(d,f)}e.onFinish((function(){if(!g){w.enable(true)}})).progressEnd(g?1:0,x,y);if(h&&v>p/4){handleCanDismiss(t,e)}else if(g){a()}};var w=createGesture({el:t,gestureName:"modalSwipeToClose",gesturePriority:OVERLAY_GESTURE_PRIORITY,direction:"y",threshold:10,canStart:p,onStart:m,onMove:v,onEnd:b});return w};var computeDuration=function(t,e){return clamp(400,t/Math.abs(e*1.1),500)};var createSheetEnterAnimation=function(t){var e=t.currentBreakpoint,r=t.backdropBreakpoint;var a=r===undefined||r<e;var i=a?"calc(var(--backdrop-opacity) * ".concat(e,")"):"0";var n=createAnimation("backdropAnimation").fromTo("opacity",0,i);if(a){n.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"])}var o=createAnimation("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:"translateY(".concat(100-e*100,"%)")}]);return{wrapperAnimation:o,backdropAnimation:n}};var createSheetLeaveAnimation=function(t){var e=t.currentBreakpoint,r=t.backdropBreakpoint;var a="calc(var(--backdrop-opacity) * ".concat(getBackdropValueForSheet(e,r),")");var i=[{offset:0,opacity:a},{offset:1,opacity:0}];var n=[{offset:0,opacity:a},{offset:r,opacity:0},{offset:1,opacity:0}];var o=createAnimation("backdropAnimation").keyframes(r!==0?n:i);var s=createAnimation("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(".concat(100-e*100,"%)")},{offset:1,opacity:1,transform:"translateY(100%)"}]);return{wrapperAnimation:s,backdropAnimation:o}};var createEnterAnimation$1=function(){var t=createAnimation().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);var e=createAnimation().fromTo("transform","translateY(100vh)","translateY(0vh)");return{backdropAnimation:t,wrapperAnimation:e}};var iosEnterAnimation=function(t,e){var r=e.presentingEl,a=e.currentBreakpoint;var i=getElementRoot(t);var n=a!==undefined?createSheetEnterAnimation(e):createEnterAnimation$1(),o=n.wrapperAnimation,s=n.backdropAnimation;s.addElement(i.querySelector("ion-backdrop"));o.addElement(i.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});var d=createAnimation("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation(o);if(r){var l=window.innerWidth<768;var u=r.tagName==="ION-MODAL"&&r.presentingElement!==undefined;var f=getElementRoot(r);var c=createAnimation().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});var h=t.closest("ion-app");if(l&&h){var p=!CSS.supports("width","max(0px, 1px)")?"30px":"max(30px, var(--ion-safe-area-top))";var m=u?"-10px":p;var v=SwipeToCloseDefaults.MIN_PRESENTING_SCALE;var b="translateY(".concat(m,") scale(").concat(v,")");c.afterStyles({transform:b}).beforeAddWrite((function(){return h.style.setProperty("background-color","black")})).addElement(r).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"},{offset:1,filter:"contrast(0.85)",transform:b,borderRadius:"10px 10px 0 0"}]);d.addAnimation(c)}else{d.addAnimation(s);if(!u){o.fromTo("opacity","0","1")}else{var v=u?SwipeToCloseDefaults.MIN_PRESENTING_SCALE:1;var b="translateY(-10px) scale(".concat(v,")");c.afterStyles({transform:b}).addElement(f.querySelector(".modal-wrapper")).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0) scale(1)"},{offset:1,filter:"contrast(0.85)",transform:b}]);var w=createAnimation().afterStyles({transform:b}).addElement(f.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:b}]);d.addAnimation([c,w])}}}else{d.addAnimation(s)}return d};var createLeaveAnimation$1=function(){var t=createAnimation().fromTo("opacity","var(--backdrop-opacity)",0);var e=createAnimation().fromTo("transform","translateY(0vh)","translateY(100vh)");return{backdropAnimation:t,wrapperAnimation:e}};var iosLeaveAnimation=function(t,e,r){if(r===void 0){r=500}var a=e.presentingEl,i=e.currentBreakpoint;var n=getElementRoot(t);var o=i!==undefined?createSheetLeaveAnimation(e):createLeaveAnimation$1(),s=o.wrapperAnimation,d=o.backdropAnimation;d.addElement(n.querySelector("ion-backdrop"));s.addElement(n.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});var l=createAnimation("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(r).addAnimation(s);var u=t.closest("ion-app");if(a&&u){var f=window.innerWidth<768;var c=a.tagName==="ION-MODAL"&&a.presentingElement!==undefined;var h=getElementRoot(a);var p=createAnimation().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((function(t){if(t!==1){return}a.style.setProperty("overflow","");var e=Array.from(u.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((function(t){return t.presentingElement!==undefined})).length;if(e<=1){u.style.setProperty("background-color","")}}));if(f){var m=!CSS.supports("width","max(0px, 1px)")?"30px":"max(30px, var(--ion-safe-area-top))";var v=c?"-10px":m;var b=SwipeToCloseDefaults.MIN_PRESENTING_SCALE;var w="translateY(".concat(v,") scale(").concat(b,")");p.addElement(a).keyframes([{offset:0,filter:"contrast(0.85)",transform:w,borderRadius:"10px 10px 0 0"},{offset:1,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"}]);l.addAnimation(p)}else{l.addAnimation(d);if(!c){s.fromTo("opacity","1","0")}else{var b=c?SwipeToCloseDefaults.MIN_PRESENTING_SCALE:1;var w="translateY(-10px) scale(".concat(b,")");p.addElement(h.querySelector(".modal-wrapper")).afterStyles({transform:"translate3d(0, 0, 0)"}).keyframes([{offset:0,filter:"contrast(0.85)",transform:w},{offset:1,filter:"contrast(1)",transform:"translateY(0) scale(1)"}]);var g=createAnimation().addElement(h.querySelector(".modal-shadow")).afterStyles({transform:"translateY(0) scale(1)"}).keyframes([{offset:0,opacity:"0",transform:w},{offset:1,opacity:"1",transform:"translateY(0) scale(1)"}]);l.addAnimation([p,g])}}}else{l.addAnimation(d)}return l};var createEnterAnimation=function(){var t=createAnimation().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);var e=createAnimation().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}]);return{backdropAnimation:t,wrapperAnimation:e}};var mdEnterAnimation=function(t,e){var r=e.currentBreakpoint;var a=getElementRoot(t);var i=r!==undefined?createSheetEnterAnimation(e):createEnterAnimation(),n=i.wrapperAnimation,o=i.backdropAnimation;o.addElement(a.querySelector("ion-backdrop"));n.addElement(a.querySelector(".modal-wrapper"));return createAnimation().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([o,n])};var createLeaveAnimation=function(){var t=createAnimation().fromTo("opacity","var(--backdrop-opacity)",0);var e=createAnimation().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}]);return{backdropAnimation:t,wrapperAnimation:e}};var mdLeaveAnimation=function(t,e){var r=e.currentBreakpoint;var a=getElementRoot(t);var i=r!==undefined?createSheetLeaveAnimation(e):createLeaveAnimation(),n=i.wrapperAnimation,o=i.backdropAnimation;o.addElement(a.querySelector("ion-backdrop"));n.addElement(a.querySelector(".modal-wrapper"));return createAnimation().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([o,n])};var createSheetGesture=function(t,e,r,a,i,n,o,s,d,l){if(o===void 0){o=[]}var u=[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}];var f=[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-i,opacity:0},{offset:1,opacity:0}];var c={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:i!==0?f:u};var h=t.querySelector("ion-content");var p=r.clientHeight;var m=a;var v=0;var b=false;var w=.95;var g=n.childAnimations.find((function(t){return t.id==="wrapperAnimation"}));var x=n.childAnimations.find((function(t){return t.id==="backdropAnimation"}));var y=o[o.length-1];var k=o[0];var A=function(){t.style.setProperty("pointer-events","auto");e.style.setProperty("pointer-events","auto");t.classList.remove("ion-disable-focus-trap")};var E=function(){t.style.setProperty("pointer-events","none");e.style.setProperty("pointer-events","none");t.classList.add("ion-disable-focus-trap")};if(g&&x){g.keyframes(__spreadArray([],c.WRAPPER_KEYFRAMES,true));x.keyframes(__spreadArray([],c.BACKDROP_KEYFRAMES,true));n.progressStart(true,1-m);var S=m>i;if(S){A()}else{E()}}if(h&&m!==y){h.scrollY=false}var C=function(t){var e=t.event.target.closest("ion-content");m=s();if(m===1&&e){return false}return true};var _=function(){b=t.canDismiss!==undefined&&t.canDismiss!==true&&k===0;if(h){h.scrollY=false}raf((function(){t.focus()}));n.progressStart(true,1-m)};var D=function(t){var e=1-m;var r=o.length>1?1-o[1]:undefined;var a=e+t.deltaY/p;var i=r!==undefined&&a>=r&&b;var s=i?w:.9999;var d=i&&r!==undefined?r+calculateSpringStep((a-r)/(s-r)):a;v=clamp(1e-4,d,s);n.progressStep(v)};var M=function(t){var e=t.velocityY;var r=(t.deltaY+e*350)/p;var a=m-r;var i=o.reduce((function(t,e){return Math.abs(e-a)<Math.abs(t-a)?e:t}));I({breakpoint:i,breakpointOffset:v,canDismiss:b,animated:true})};var I=function(e){var r=e.breakpoint,a=e.canDismiss,s=e.breakpointOffset,u=e.animated;var f=a&&r===0;var p=f?m:r;var v=p!==0;m=0;if(g&&x){g.keyframes([{offset:0,transform:"translateY(".concat(s*100,"%)")},{offset:1,transform:"translateY(".concat((1-p)*100,"%)")}]);x.keyframes([{offset:0,opacity:"calc(var(--backdrop-opacity) * ".concat(getBackdropValueForSheet(1-s,i),")")},{offset:1,opacity:"calc(var(--backdrop-opacity) * ".concat(getBackdropValueForSheet(p,i),")")}]);n.progressStep(0)}Y.enable(false);if(f){handleCanDismiss(t,n)}else if(!v){d()}return new Promise((function(t){n.onFinish((function(){if(v){if(g&&x){raf((function(){g.keyframes(__spreadArray([],c.WRAPPER_KEYFRAMES,true));x.keyframes(__spreadArray([],c.BACKDROP_KEYFRAMES,true));n.progressStart(true,1-p);m=p;l(m);if(h&&m===o[o.length-1]){h.scrollY=true}var e=m>i;if(e){A()}else{E()}Y.enable(true);t()}))}else{Y.enable(true);t()}}else{t()}}),{oneTimeCallback:true}).progressEnd(1,0,u?500:0)}))};var Y=createGesture({el:r,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:C,onStart:_,onMove:D,onEnd:M});return{gesture:Y,moveSheetToBreakpoint:I}};var modalIosCss=':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, #c0c0be);cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl]):host(.modal-card) .modal-wrapper,:host-context([dir=rtl]).modal-card .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}@supports selector(:dir(rtl)){:host(.modal-card:dir(rtl)) .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl]):host(.modal-sheet) .modal-wrapper,:host-context([dir=rtl]).modal-sheet .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}@supports selector(:dir(rtl)){:host(.modal-sheet:dir(rtl)) .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}}';var modalMdCss=':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, #c0c0be);cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}';var Modal=function(){function t(t){var e=this;registerInstance(this,t);this.didPresent=createEvent(this,"ionModalDidPresent",7);this.willPresent=createEvent(this,"ionModalWillPresent",7);this.willDismiss=createEvent(this,"ionModalWillDismiss",7);this.didDismiss=createEvent(this,"ionModalDidDismiss",7);this.ionBreakpointDidChange=createEvent(this,"ionBreakpointDidChange",7);this.didPresentShorthand=createEvent(this,"didPresent",7);this.willPresentShorthand=createEvent(this,"willPresent",7);this.willDismissShorthand=createEvent(this,"willDismiss",7);this.didDismissShorthand=createEvent(this,"didDismiss",7);this.ionMount=createEvent(this,"ionMount",7);this.lockController=createLockController();this.triggerController=createTriggerController();this.coreDelegate=CoreDelegate();this.isSheetModal=false;this.inheritedAttributes={};this.inline=false;this.gestureAnimationDismissing=false;this.onHandleClick=function(){var t=e,r=t.sheetTransition,a=t.handleBehavior;if(a!=="cycle"||r!==undefined){return}e.moveToNextBreakpoint()};this.onBackdropTap=function(){var t=e.sheetTransition;if(t!==undefined){return}e.dismiss(undefined,BACKDROP)};this.onLifecycle=function(t){var r=e.usersElement;var a=LIFECYCLE_MAP[t.type];if(r&&a){var i=new CustomEvent(a,{bubbles:false,cancelable:false,detail:t.detail});r.dispatchEvent(i)}};this.presented=false;this.hasController=false;this.overlayIndex=undefined;this.delegate=undefined;this.keyboardClose=true;this.enterAnimation=undefined;this.leaveAnimation=undefined;this.breakpoints=undefined;this.initialBreakpoint=undefined;this.backdropBreakpoint=0;this.handle=undefined;this.handleBehavior="none";this.component=undefined;this.componentProps=undefined;this.cssClass=undefined;this.backdropDismiss=true;this.showBackdrop=true;this.animated=true;this.presentingElement=undefined;this.htmlAttributes=undefined;this.isOpen=false;this.trigger=undefined;this.keepContentsMounted=false;this.canDismiss=true}t.prototype.onIsOpenChange=function(t,e){if(t===true&&e===false){this.present()}else if(t===false&&e===true){this.dismiss()}};t.prototype.triggerChanged=function(){var t=this,e=t.trigger,r=t.el,a=t.triggerController;if(e){a.addClickListener(r,e)}};t.prototype.breakpointsChanged=function(t){if(t!==undefined){this.sortedBreakpoints=t.sort((function(t,e){return t-e}))}};t.prototype.connectedCallback=function(){var t=this.el;prepareOverlay(t);this.triggerChanged()};t.prototype.disconnectedCallback=function(){this.triggerController.removeClickListener()};t.prototype.componentWillLoad=function(){var t=this,e=t.breakpoints,r=t.initialBreakpoint,a=t.el;var i=this.isSheetModal=e!==undefined&&r!==undefined;this.inheritedAttributes=inheritAttributes(a,["aria-label","role"]);if(i){this.currentBreakpoint=this.initialBreakpoint}if(e!==undefined&&r!==undefined&&!e.includes(r)){printIonWarning("Your breakpoints array must include the initialBreakpoint value.")}setOverlayId(a)};t.prototype.componentDidLoad=function(){var t=this;if(this.isOpen===true){raf((function(){return t.present()}))}this.breakpointsChanged(this.breakpoints);this.triggerChanged()};t.prototype.getDelegate=function(t){if(t===void 0){t=false}if(this.workingDelegate&&!t){return{delegate:this.workingDelegate,inline:this.inline}}var e=this.el.parentNode;var r=this.inline=e!==null&&!this.hasController;var a=this.workingDelegate=r?this.delegate||this.coreDelegate:this.delegate;return{inline:r,delegate:a}};t.prototype.checkCanDismiss=function(t,e){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(a){r=this.canDismiss;if(typeof r==="function"){return[2,r(t,e)]}return[2,r]}))}))};t.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,r,a,i,n,o,s,d,l;var u=this;return __generator(this,(function(f){switch(f.label){case 0:return[4,this.lockController.lock()];case 1:t=f.sent();if(this.presented){t();return[2]}e=this,r=e.presentingElement,a=e.el;this.currentBreakpoint=this.initialBreakpoint;i=this.getDelegate(true),n=i.inline,o=i.delegate;this.ionMount.emit();s=this;return[4,attachComponent(o,a,this.component,["ion-page"],this.componentProps,n)];case 2:s.usersElement=f.sent();if(!hasLazyBuild(a))return[3,4];return[4,deepReady(this.usersElement)];case 3:f.sent();return[3,6];case 4:if(!!this.keepContentsMounted)return[3,6];return[4,waitForMount()];case 5:f.sent();f.label=6;case 6:writeTask((function(){return u.el.classList.add("show-modal")}));d=r!==undefined;if(!(d&&getIonMode(this)==="ios"))return[3,8];l=this;return[4,StatusBar.getStyle()];case 7:l.statusBarStyle=f.sent();setCardStatusBarDark();f.label=8;case 8:return[4,present(this,"modalEnter",iosEnterAnimation,mdEnterAnimation,{presentingEl:r,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint})];case 9:f.sent();if(typeof window!=="undefined"){this.keyboardOpenCallback=function(){if(u.gesture){u.gesture.enable(false);raf((function(){if(u.gesture){u.gesture.enable(true)}}))}};window.addEventListener(KEYBOARD_DID_OPEN,this.keyboardOpenCallback)}if(this.isSheetModal){this.initSheetGesture()}else if(d){this.initSwipeToClose()}t();return[2]}}))}))};t.prototype.initSwipeToClose=function(){var t=this;var e;if(getIonMode(this)!=="ios"){return}var r=this.el;var a=this.leaveAnimation||config.get("modalLeave",iosLeaveAnimation);var i=this.animation=a(r,{presentingEl:this.presentingElement});var n=findIonContent(r);if(!n){printIonContentErrorMsg(r);return}var o=(e=this.statusBarStyle)!==null&&e!==void 0?e:Style.Default;this.gesture=createSwipeToCloseGesture(r,i,o,(function(){t.gestureAnimationDismissing=true;setCardStatusBarDefault(t.statusBarStyle);t.animation.onFinish((function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.dismiss(undefined,GESTURE)];case 1:t.sent();this.gestureAnimationDismissing=false;return[2]}}))}))}))}));this.gesture.enable(true)};t.prototype.initSheetGesture=function(){var t=this;var e=this,r=e.wrapperEl,a=e.initialBreakpoint,i=e.backdropBreakpoint;if(!r||a===undefined){return}var n=this.enterAnimation||config.get("modalEnter",iosEnterAnimation);var o=this.animation=n(this.el,{presentingEl:this.presentingElement,currentBreakpoint:a,backdropBreakpoint:i});o.progressStart(true,1);var s=createSheetGesture(this.el,this.backdropEl,r,a,i,o,this.sortedBreakpoints,(function(){var e;return(e=t.currentBreakpoint)!==null&&e!==void 0?e:0}),(function(){return t.sheetOnDismiss()}),(function(e){if(t.currentBreakpoint!==e){t.currentBreakpoint=e;t.ionBreakpointDidChange.emit({breakpoint:e})}})),d=s.gesture,l=s.moveSheetToBreakpoint;this.gesture=d;this.moveSheetToBreakpoint=l;this.gesture.enable(true)};t.prototype.sheetOnDismiss=function(){var t=this;this.gestureAnimationDismissing=true;this.animation.onFinish((function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.currentBreakpoint=0;this.ionBreakpointDidChange.emit({breakpoint:this.currentBreakpoint});return[4,this.dismiss(undefined,GESTURE)];case 1:t.sent();this.gestureAnimationDismissing=false;return[2]}}))}))}))};t.prototype.dismiss=function(t,e){return __awaiter(this,void 0,void 0,(function(){var r,a,i,n,o,s,d,l;var u=this;return __generator(this,(function(f){switch(f.label){case 0:if(this.gestureAnimationDismissing&&e!==GESTURE){return[2,false]}return[4,this.lockController.lock()];case 1:a=f.sent();i=e!=="handler";if(!i)return[3,3];return[4,this.checkCanDismiss(t,e)];case 2:i=!f.sent();f.label=3;case 3:if(i){a();return[2,false]}n=this.presentingElement;o=n!==undefined;if(o&&getIonMode(this)==="ios"){setCardStatusBarDefault(this.statusBarStyle)}if(typeof window!=="undefined"&&this.keyboardOpenCallback){window.removeEventListener(KEYBOARD_DID_OPEN,this.keyboardOpenCallback);this.keyboardOpenCallback=undefined}s=activeAnimations.get(this)||[];return[4,dismiss(this,t,e,"modalLeave",iosLeaveAnimation,mdLeaveAnimation,{presentingEl:n,currentBreakpoint:(r=this.currentBreakpoint)!==null&&r!==void 0?r:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint})];case 4:d=f.sent();if(!d)return[3,6];l=this.getDelegate().delegate;return[4,detachComponent(l,this.usersElement)];case 5:f.sent();writeTask((function(){return u.el.classList.remove("show-modal")}));if(this.animation){this.animation.destroy()}if(this.gesture){this.gesture.destroy()}s.forEach((function(t){return t.destroy()}));f.label=6;case 6:this.currentBreakpoint=undefined;this.animation=undefined;a();return[2,d]}}))}))};t.prototype.onDidDismiss=function(){return eventMethod(this.el,"ionModalDidDismiss")};t.prototype.onWillDismiss=function(){return eventMethod(this.el,"ionModalWillDismiss")};t.prototype.setCurrentBreakpoint=function(t){return __awaiter(this,void 0,void 0,(function(){var e,r,a,i,n,o;return __generator(this,(function(s){switch(s.label){case 0:if(!this.isSheetModal){printIonWarning("setCurrentBreakpoint is only supported on sheet modals.");return[2]}if(!this.breakpoints.includes(t)){printIonWarning("Attempted to set invalid breakpoint value ".concat(t,". Please double check that the breakpoint value is part of your defined breakpoints."));return[2]}e=this,r=e.currentBreakpoint,a=e.moveSheetToBreakpoint,i=e.canDismiss,n=e.breakpoints,o=e.animated;if(r===t){return[2]}if(!a)return[3,2];this.sheetTransition=a({breakpoint:t,breakpointOffset:1-r,canDismiss:i!==undefined&&i!==true&&n[0]===0,animated:o});return[4,this.sheetTransition];case 1:s.sent();this.sheetTransition=undefined;s.label=2;case 2:return[2]}}))}))};t.prototype.getCurrentBreakpoint=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.currentBreakpoint]}))}))};t.prototype.moveToNextBreakpoint=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,r,a,i,n,o;return __generator(this,(function(s){switch(s.label){case 0:t=this,e=t.breakpoints,r=t.currentBreakpoint;if(!e||r==null){return[2,false]}a=e.filter((function(t){return t!==0}));i=a.indexOf(r);n=(i+1)%a.length;o=a[n];return[4,this.setCurrentBreakpoint(o)];case 1:s.sent();return[2,true]}}))}))};t.prototype.render=function(){var t;var e=this;var r=this,a=r.handle,i=r.isSheetModal,n=r.presentingElement,o=r.htmlAttributes,s=r.handleBehavior,d=r.inheritedAttributes;var l=a!==false&&i;var u=getIonMode(this);var f=n!==undefined&&u==="ios";var c=s==="cycle";return h(Host,Object.assign({"no-router":true,tabindex:"-1"},o,{style:{zIndex:"".concat(2e4+this.overlayIndex)},class:Object.assign((t={},t[u]=true,t["modal-default"]=!f&&!i,t["modal-card"]=f,t["modal-sheet"]=i,t["overlay-hidden"]=true,t),getClassMap(this.cssClass)),onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle}),h("ion-backdrop",{ref:function(t){return e.backdropEl=t},visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),u==="ios"&&h("div",{class:"modal-shadow"}),h("div",Object.assign({role:"dialog"},d,{"aria-modal":"true",class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:function(t){return e.wrapperEl=t}}),l&&h("button",{class:"modal-handle",tabIndex:!c?-1:0,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:c?this.onHandleClick:undefined,part:"handle"}),h("slot",null)))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}},enumerable:false,configurable:true});return t}();var LIFECYCLE_MAP={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};Modal.style={ios:modalIosCss,md:modalMdCss};export{Modal as ion_modal};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{__awaiter,__generator}from"tslib";
|
|
2
2
|
/*!
|
|
3
3
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{r as registerInstance,d as createEvent,h,f as getElement,H as Host}from"./index-b7d870cf.js";import{g as getTimeGivenProgression}from"./cubic-bezier-fe2083dc.js";import{o as assert,s as shallowEqualStringMap}from"./helpers-ae653409.js";import{l as lifecycle,t as transition,s as setPageHidden,d as LIFECYCLE_WILL_UNLOAD,b as LIFECYCLE_WILL_LEAVE,c as LIFECYCLE_DID_LEAVE}from"./index-4743453d.js";import{b as getIonMode,c as config}from"./ionic-global-1f99b929.js";import{a as attachComponent}from"./framework-delegate-bc1fd82a.js";var VIEW_STATE_NEW=1;var VIEW_STATE_ATTACHED=2;var VIEW_STATE_DESTROYED=3;var ViewController=function(){function t(t,e){this.component=t;this.params=e;this.state=VIEW_STATE_NEW}t.prototype.init=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){switch(n.label){case 0:this.state=VIEW_STATE_ATTACHED;if(!!this.element)return[3,2];e=this.component;i=this;return[4,attachComponent(this.delegate,t,e,["ion-page","ion-page-invisible"],this.params)];case 1:i.element=n.sent();n.label=2;case 2:return[2]}}))}))};t.prototype._destroy=function(){assert(this.state!==VIEW_STATE_DESTROYED,"view state must be ATTACHED");var t=this.element;if(t){if(this.delegate){this.delegate.removeViewFromDom(t.parentElement,t)}else{t.remove()}}this.nav=undefined;this.state=VIEW_STATE_DESTROYED};return t}();var matches=function(t,e,i){if(!t){return false}if(t.component!==e){return false}return shallowEqualStringMap(t.params,i)};var convertToView=function(t,e){if(!t){return null}if(t instanceof ViewController){return t}return new ViewController(t,e)};var convertToViews=function(t){return t.map((function(t){if(t instanceof ViewController){return t}if("component"in t){return convertToView(t.component,t.componentProps===null?undefined:t.componentProps)}return convertToView(t,undefined)})).filter((function(t){return t!==null}))};var navCss=":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:layout size style;z-index:0}";var Nav=function(){function t(t){registerInstance(this,t);this.ionNavWillLoad=createEvent(this,"ionNavWillLoad",7);this.ionNavWillChange=createEvent(this,"ionNavWillChange",3);this.ionNavDidChange=createEvent(this,"ionNavDidChange",3);this.transInstr=[];this.gestureOrAnimationInProgress=false;this.useRouter=false;this.isTransitioning=false;this.destroyed=false;this.views=[];this.didLoad=false;this.delegate=undefined;this.swipeGesture=undefined;this.animated=true;this.animation=undefined;this.rootParams=undefined;this.root=undefined}t.prototype.swipeGestureChanged=function(){if(this.gesture){this.gesture.enable(this.swipeGesture===true)}};t.prototype.rootChanged=function(){if(this.root===undefined){return}if(this.didLoad===false){return}if(!this.useRouter){if(this.root!==undefined){this.setRoot(this.root,this.rootParams)}}};t.prototype.componentWillLoad=function(){this.useRouter=document.querySelector("ion-router")!==null&&this.el.closest("[no-router]")===null;if(this.swipeGesture===undefined){var t=getIonMode(this);this.swipeGesture=config.getBoolean("swipeBackEnabled",t==="ios")}this.ionNavWillLoad.emit()};t.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:this.didLoad=true;this.rootChanged();t=this;return[4,import("./swipe-back-18cb49f7.js")];case 1:t.gesture=e.sent().createSwipeBackGesture(this.el,this.canStart.bind(this),this.onStart.bind(this),this.onMove.bind(this),this.onEnd.bind(this));this.swipeGestureChanged();return[2]}}))}))};t.prototype.connectedCallback=function(){this.destroyed=false};t.prototype.disconnectedCallback=function(){for(var t=0,e=this.views;t<e.length;t++){var i=e[t];lifecycle(i.element,LIFECYCLE_WILL_UNLOAD);i._destroy()}if(this.gesture){this.gesture.destroy();this.gesture=undefined}this.transInstr.length=0;this.views.length=0;this.destroyed=true};t.prototype.push=function(t,e,i,n){return this.insert(-1,t,e,i,n)};t.prototype.insert=function(t,e,i,n,r){return this.insertPages(t,[{component:e,componentProps:i}],n,r)};t.prototype.insertPages=function(t,e,i,n){return this.queueTrns({insertStart:t,insertViews:e,opts:i},n)};t.prototype.pop=function(t,e){return this.removeIndex(-1,1,t,e)};t.prototype.popTo=function(t,e,i){var n={removeStart:-1,removeCount:-1,opts:e};if(typeof t==="object"&&t.component){n.removeView=t;n.removeStart=1}else if(typeof t==="number"){n.removeStart=t+1}return this.queueTrns(n,i)};t.prototype.popToRoot=function(t,e){return this.removeIndex(1,-1,t,e)};t.prototype.removeIndex=function(t,e,i,n){if(e===void 0){e=1}return this.queueTrns({removeStart:t,removeCount:e,opts:i},n)};t.prototype.setRoot=function(t,e,i,n){return this.setPages([{component:t,componentProps:e}],i,n)};t.prototype.setPages=function(t,e,i){e!==null&&e!==void 0?e:e={};if(e.animated!==true){e.animated=false}return this.queueTrns({insertStart:0,insertViews:t,removeStart:0,removeCount:-1,opts:e},i)};t.prototype.setRouteId=function(t,e,i,n){var r=this;var s=this.getActiveSync();if(matches(s,t,e)){return Promise.resolve({changed:false,element:s.element})}var o;var a=new Promise((function(t){return o=t}));var u;var f={updateURL:false,viewIsReady:function(t){var e;var i=new Promise((function(t){return e=t}));o({changed:true,element:t,markVisible:function(){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:e();return[4,u];case 1:t.sent();return[2]}}))}))}});return i}};if(i==="root"){u=this.setRoot(t,e,f)}else{var h=this.views.find((function(i){return matches(i,t,e)}));if(h){u=this.popTo(h,Object.assign(Object.assign({},f),{direction:"back",animationBuilder:n}))}else if(i==="forward"){u=this.push(t,e,Object.assign(Object.assign({},f),{animationBuilder:n}))}else if(i==="back"){u=this.setRoot(t,e,Object.assign(Object.assign({},f),{direction:"back",animated:true,animationBuilder:n}))}}return a};t.prototype.getRouteId=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){t=this.getActiveSync();if(t){return[2,{id:t.element.tagName,params:t.params,element:t.element}]}return[2,undefined]}))}))};t.prototype.getActive=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.getActiveSync()]}))}))};t.prototype.getByIndex=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.views[t]]}))}))};t.prototype.canGoBack=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.canGoBackSync(t)]}))}))};t.prototype.getPrevious=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.getPreviousSync(t)]}))}))};t.prototype.getLength=function(){return this.views.length};t.prototype.getActiveSync=function(){return this.views[this.views.length-1]};t.prototype.canGoBackSync=function(t){if(t===void 0){t=this.getActiveSync()}return!!(t&&this.getPreviousSync(t))};t.prototype.getPreviousSync=function(t){if(t===void 0){t=this.getActiveSync()}if(!t){return undefined}var e=this.views;var i=e.indexOf(t);return i>0?e[i-1]:undefined};t.prototype.queueTrns=function(t,e){return __awaiter(this,void 0,void 0,(function(){var i,n,r,s,o;return __generator(this,(function(a){switch(a.label){case 0:if(this.isTransitioning&&((i=t.opts)===null||i===void 0?void 0:i.skipIfBusy)){return[2,false]}r=new Promise((function(e,i){t.resolve=e;t.reject=i}));t.done=e;if(!(t.opts&&t.opts.updateURL!==false&&this.useRouter))return[3,2];s=document.querySelector("ion-router");if(!s)return[3,2];return[4,s.canTransition()];case 1:o=a.sent();if(o===false){return[2,false]}if(typeof o==="string"){s.push(o,t.opts.direction||"back");return[2,false]}a.label=2;case 2:if(((n=t.insertViews)===null||n===void 0?void 0:n.length)===0){t.insertViews=undefined}this.transInstr.push(t);this.nextTrns();return[2,r]}}))}))};t.prototype.success=function(t,e){if(this.destroyed){this.fireError("nav controller was destroyed",e);return}if(e.done){e.done(t.hasCompleted,t.requiresTransition,t.enteringView,t.leavingView,t.direction)}e.resolve(t.hasCompleted);if(e.opts.updateURL!==false&&this.useRouter){var i=document.querySelector("ion-router");if(i){var n=t.direction==="back"?"back":"forward";i.navChanged(n)}}};t.prototype.failed=function(t,e){if(this.destroyed){this.fireError("nav controller was destroyed",e);return}this.transInstr.length=0;this.fireError(t,e)};t.prototype.fireError=function(t,e){if(e.done){e.done(false,false,t)}if(e.reject&&!this.destroyed){e.reject(t)}else{e.resolve(false)}};t.prototype.nextTrns=function(){if(this.isTransitioning){return false}var t=this.transInstr.shift();if(!t){return false}this.runTransition(t);return true};t.prototype.runTransition=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,n,r,s,o;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,6,,7]);this.ionNavWillChange.emit();this.isTransitioning=true;this.prepareTI(t);e=this.getActiveSync();i=this.getEnteringView(t,e);if(!e&&!i){throw new Error("no views in the stack to be removed")}if(!(i&&i.state===VIEW_STATE_NEW))return[3,2];return[4,i.init(this.el)];case 1:a.sent();a.label=2;case 2:this.postViewInit(i,e,t);n=(t.enteringRequiresTransition||t.leavingRequiresTransition)&&i!==e;if(n&&t.opts&&e){r=t.opts.direction==="back";if(r){t.opts.animationBuilder=t.opts.animationBuilder||(i===null||i===void 0?void 0:i.animationBuilder)}e.animationBuilder=t.opts.animationBuilder}s=void 0;if(!n)return[3,4];return[4,this.transition(i,e,t)];case 3:s=a.sent();return[3,5];case 4:s={hasCompleted:true,requiresTransition:false};a.label=5;case 5:this.success(s,t);this.ionNavDidChange.emit();return[3,7];case 6:o=a.sent();this.failed(o,t);return[3,7];case 7:this.isTransitioning=false;this.nextTrns();return[2]}}))}))};t.prototype.prepareTI=function(t){var e,i;var n;var r=this.views.length;(e=t.opts)!==null&&e!==void 0?e:t.opts={};(i=(n=t.opts).delegate)!==null&&i!==void 0?i:n.delegate=this.delegate;if(t.removeView!==undefined){assert(t.removeStart!==undefined,"removeView needs removeStart");assert(t.removeCount!==undefined,"removeView needs removeCount");var s=this.views.indexOf(t.removeView);if(s<0){throw new Error("removeView was not found")}t.removeStart+=s}if(t.removeStart!==undefined){if(t.removeStart<0){t.removeStart=r-1}if(t.removeCount<0){t.removeCount=r-t.removeStart}t.leavingRequiresTransition=t.removeCount>0&&t.removeStart+t.removeCount===r}if(t.insertViews){if(t.insertStart<0||t.insertStart>r){t.insertStart=r}t.enteringRequiresTransition=t.insertStart===r}var o=t.insertViews;if(!o){return}assert(o.length>0,"length can not be zero");var a=convertToViews(o);if(a.length===0){throw new Error("invalid views to insert")}for(var u=0,f=a;u<f.length;u++){var h=f[u];h.delegate=t.opts.delegate;var c=h.nav;if(c&&c!==this){throw new Error("inserted view was already inserted")}if(h.state===VIEW_STATE_DESTROYED){throw new Error("inserted view was already destroyed")}}t.insertViews=a};t.prototype.getEnteringView=function(t,e){var i=t.insertViews;if(i!==undefined){return i[i.length-1]}var n=t.removeStart;if(n!==undefined){var r=this.views;var s=n+t.removeCount;for(var o=r.length-1;o>=0;o--){var a=r[o];if((o<n||o>=s)&&a!==e){return a}}}return undefined};t.prototype.postViewInit=function(t,e,i){var n,r,s;assert(e||t,"Both leavingView and enteringView are null");assert(i.resolve,"resolve must be valid");assert(i.reject,"reject must be valid");var o=i.opts;var a=i.insertViews,u=i.removeStart,f=i.removeCount;var h;if(u!==undefined&&f!==undefined){assert(u>=0,"removeStart can not be negative");assert(f>=0,"removeCount can not be negative");h=[];for(var c=u;c<u+f;c++){var v=this.views[c];if(v!==undefined&&v!==t&&v!==e){h.push(v)}}(n=o.direction)!==null&&n!==void 0?n:o.direction="back"}var d=this.views.length+((r=a===null||a===void 0?void 0:a.length)!==null&&r!==void 0?r:0)-(f!==null&&f!==void 0?f:0);assert(d>=0,"final balance can not be negative");if(d===0){console.warn("You can't remove all the pages in the navigation stack. nav.pop() is probably called too many times.",this,this.el);throw new Error("navigation stack needs at least one root page")}if(a){var l=i.insertStart;for(var _=0,m=a;_<m.length;_++){var v=m[_];this.insertViewAt(v,l);l++}if(i.enteringRequiresTransition){(s=o.direction)!==null&&s!==void 0?s:o.direction="forward"}}if(h&&h.length>0){for(var E=0,w=h;E<w.length;E++){var v=w[E];lifecycle(v.element,LIFECYCLE_WILL_LEAVE);lifecycle(v.element,LIFECYCLE_DID_LEAVE);lifecycle(v.element,LIFECYCLE_WILL_UNLOAD)}for(var g=0,b=h;g<b.length;g++){var v=b[g];this.destroyView(v)}}};t.prototype.transition=function(t,e,i){return __awaiter(this,void 0,void 0,(function(){var n,r,s,o,a,u,f;var h=this;return __generator(this,(function(c){switch(c.label){case 0:n=i.opts;r=n.progressAnimation?function(t){if(t!==undefined&&!h.gestureOrAnimationInProgress){h.gestureOrAnimationInProgress=true;t.onFinish((function(){h.gestureOrAnimationInProgress=false}),{oneTimeCallback:true});t.progressEnd(0,0,0)}else{h.sbAni=t}}:undefined;s=getIonMode(this);o=t.element;a=e&&e.element;u=Object.assign(Object.assign({mode:s,showGoBack:this.canGoBackSync(t),baseEl:this.el,progressCallback:r,animated:this.animated&&config.getBoolean("animated",true),enteringEl:o,leavingEl:a},n),{animationBuilder:n.animationBuilder||this.animation||config.get("navAnimation")});return[4,transition(u)];case 1:f=c.sent().hasCompleted;return[2,this.transitionFinish(f,t,e,n)]}}))}))};t.prototype.transitionFinish=function(t,e,i,n){var r=t?e:i;if(r){this.unmountInactiveViews(r)}return{hasCompleted:t,requiresTransition:true,enteringView:e,leavingView:i,direction:n.direction}};t.prototype.insertViewAt=function(t,e){var i=this.views;var n=i.indexOf(t);if(n>-1){assert(t.nav===this,"view is not part of the nav");i.splice(n,1);i.splice(e,0,t)}else{assert(!t.nav,"nav is used");t.nav=this;i.splice(e,0,t)}};t.prototype.removeView=function(t){assert(t.state===VIEW_STATE_ATTACHED||t.state===VIEW_STATE_DESTROYED,"view state should be loaded or destroyed");var e=this.views;var i=e.indexOf(t);assert(i>-1,"view must be part of the stack");if(i>=0){e.splice(i,1)}};t.prototype.destroyView=function(t){t._destroy();this.removeView(t)};t.prototype.unmountInactiveViews=function(t){if(this.destroyed){return}var e=this.views;var i=e.indexOf(t);for(var n=e.length-1;n>=0;n--){var r=e[n];var s=r.element;if(s){if(n>i){lifecycle(s,LIFECYCLE_WILL_UNLOAD);this.destroyView(r)}else if(n<i){setPageHidden(s,true)}}}};t.prototype.canStart=function(){return!this.gestureOrAnimationInProgress&&!!this.swipeGesture&&!this.isTransitioning&&this.transInstr.length===0&&this.canGoBackSync()};t.prototype.onStart=function(){this.gestureOrAnimationInProgress=true;this.pop({direction:"back",progressAnimation:true})};t.prototype.onMove=function(t){if(this.sbAni){this.sbAni.progressStep(t)}};t.prototype.onEnd=function(t,e,i){var n=this;if(this.sbAni){this.sbAni.onFinish((function(){n.gestureOrAnimationInProgress=false}),{oneTimeCallback:true});var r=t?-.001:.001;if(!t){this.sbAni.easing("cubic-bezier(1, 0, 0.68, 0.28)");r+=getTimeGivenProgression([0,0],[1,0],[.68,.28],[1,1],e)[0]}else{r+=getTimeGivenProgression([0,0],[.32,.72],[0,1],[1,1],e)[0]}this.sbAni.progressEnd(t?1:0,r,i)}else{this.gestureOrAnimationInProgress=false}};t.prototype.render=function(){return h("slot",null)};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{swipeGesture:["swipeGestureChanged"],root:["rootChanged"]}},enumerable:false,configurable:true});return t}();Nav.style=navCss;var navLink=function(t,e,i,n,r){var s=t.closest("ion-nav");if(s){if(e==="forward"){if(i!==undefined){return s.push(i,n,{skipIfBusy:true,animationBuilder:r})}}else if(e==="root"){if(i!==undefined){return s.setRoot(i,n,{skipIfBusy:true,animationBuilder:r})}}else if(e==="back"){return s.pop({skipIfBusy:true,animationBuilder:r})}}return Promise.resolve(false)};var NavLink=function(){function t(t){var e=this;registerInstance(this,t);this.onClick=function(){return navLink(e.el,e.routerDirection,e.component,e.componentProps,e.routerAnimation)};this.component=undefined;this.componentProps=undefined;this.routerDirection="forward";this.routerAnimation=undefined}t.prototype.render=function(){return h(Host,{onClick:this.onClick})};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();export{Nav as ion_nav,NavLink as ion_nav_link};
|
|
4
|
+
*/import{r as registerInstance,d as createEvent,h,f as getElement,H as Host}from"./index-27668d5b.js";import{g as getTimeGivenProgression}from"./cubic-bezier-fe2083dc.js";import{o as assert,s as shallowEqualStringMap}from"./helpers-ae653409.js";import{l as lifecycle,t as transition,s as setPageHidden,d as LIFECYCLE_WILL_UNLOAD,b as LIFECYCLE_WILL_LEAVE,c as LIFECYCLE_DID_LEAVE}from"./index-a97c95a7.js";import{b as getIonMode,c as config}from"./ionic-global-8fa0f940.js";import{a as attachComponent}from"./framework-delegate-bc1fd82a.js";var VIEW_STATE_NEW=1;var VIEW_STATE_ATTACHED=2;var VIEW_STATE_DESTROYED=3;var ViewController=function(){function t(t,e){this.component=t;this.params=e;this.state=VIEW_STATE_NEW}t.prototype.init=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){switch(n.label){case 0:this.state=VIEW_STATE_ATTACHED;if(!!this.element)return[3,2];e=this.component;i=this;return[4,attachComponent(this.delegate,t,e,["ion-page","ion-page-invisible"],this.params)];case 1:i.element=n.sent();n.label=2;case 2:return[2]}}))}))};t.prototype._destroy=function(){assert(this.state!==VIEW_STATE_DESTROYED,"view state must be ATTACHED");var t=this.element;if(t){if(this.delegate){this.delegate.removeViewFromDom(t.parentElement,t)}else{t.remove()}}this.nav=undefined;this.state=VIEW_STATE_DESTROYED};return t}();var matches=function(t,e,i){if(!t){return false}if(t.component!==e){return false}return shallowEqualStringMap(t.params,i)};var convertToView=function(t,e){if(!t){return null}if(t instanceof ViewController){return t}return new ViewController(t,e)};var convertToViews=function(t){return t.map((function(t){if(t instanceof ViewController){return t}if("component"in t){return convertToView(t.component,t.componentProps===null?undefined:t.componentProps)}return convertToView(t,undefined)})).filter((function(t){return t!==null}))};var navCss=":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:layout size style;z-index:0}";var Nav=function(){function t(t){registerInstance(this,t);this.ionNavWillLoad=createEvent(this,"ionNavWillLoad",7);this.ionNavWillChange=createEvent(this,"ionNavWillChange",3);this.ionNavDidChange=createEvent(this,"ionNavDidChange",3);this.transInstr=[];this.gestureOrAnimationInProgress=false;this.useRouter=false;this.isTransitioning=false;this.destroyed=false;this.views=[];this.didLoad=false;this.delegate=undefined;this.swipeGesture=undefined;this.animated=true;this.animation=undefined;this.rootParams=undefined;this.root=undefined}t.prototype.swipeGestureChanged=function(){if(this.gesture){this.gesture.enable(this.swipeGesture===true)}};t.prototype.rootChanged=function(){if(this.root===undefined){return}if(this.didLoad===false){return}if(!this.useRouter){if(this.root!==undefined){this.setRoot(this.root,this.rootParams)}}};t.prototype.componentWillLoad=function(){this.useRouter=document.querySelector("ion-router")!==null&&this.el.closest("[no-router]")===null;if(this.swipeGesture===undefined){var t=getIonMode(this);this.swipeGesture=config.getBoolean("swipeBackEnabled",t==="ios")}this.ionNavWillLoad.emit()};t.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:this.didLoad=true;this.rootChanged();t=this;return[4,import("./swipe-back-18cb49f7.js")];case 1:t.gesture=e.sent().createSwipeBackGesture(this.el,this.canStart.bind(this),this.onStart.bind(this),this.onMove.bind(this),this.onEnd.bind(this));this.swipeGestureChanged();return[2]}}))}))};t.prototype.connectedCallback=function(){this.destroyed=false};t.prototype.disconnectedCallback=function(){for(var t=0,e=this.views;t<e.length;t++){var i=e[t];lifecycle(i.element,LIFECYCLE_WILL_UNLOAD);i._destroy()}if(this.gesture){this.gesture.destroy();this.gesture=undefined}this.transInstr.length=0;this.views.length=0;this.destroyed=true};t.prototype.push=function(t,e,i,n){return this.insert(-1,t,e,i,n)};t.prototype.insert=function(t,e,i,n,r){return this.insertPages(t,[{component:e,componentProps:i}],n,r)};t.prototype.insertPages=function(t,e,i,n){return this.queueTrns({insertStart:t,insertViews:e,opts:i},n)};t.prototype.pop=function(t,e){return this.removeIndex(-1,1,t,e)};t.prototype.popTo=function(t,e,i){var n={removeStart:-1,removeCount:-1,opts:e};if(typeof t==="object"&&t.component){n.removeView=t;n.removeStart=1}else if(typeof t==="number"){n.removeStart=t+1}return this.queueTrns(n,i)};t.prototype.popToRoot=function(t,e){return this.removeIndex(1,-1,t,e)};t.prototype.removeIndex=function(t,e,i,n){if(e===void 0){e=1}return this.queueTrns({removeStart:t,removeCount:e,opts:i},n)};t.prototype.setRoot=function(t,e,i,n){return this.setPages([{component:t,componentProps:e}],i,n)};t.prototype.setPages=function(t,e,i){e!==null&&e!==void 0?e:e={};if(e.animated!==true){e.animated=false}return this.queueTrns({insertStart:0,insertViews:t,removeStart:0,removeCount:-1,opts:e},i)};t.prototype.setRouteId=function(t,e,i,n){var r=this;var s=this.getActiveSync();if(matches(s,t,e)){return Promise.resolve({changed:false,element:s.element})}var a;var o=new Promise((function(t){return a=t}));var u;var f={updateURL:false,viewIsReady:function(t){var e;var i=new Promise((function(t){return e=t}));a({changed:true,element:t,markVisible:function(){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:e();return[4,u];case 1:t.sent();return[2]}}))}))}});return i}};if(i==="root"){u=this.setRoot(t,e,f)}else{var h=this.views.find((function(i){return matches(i,t,e)}));if(h){u=this.popTo(h,Object.assign(Object.assign({},f),{direction:"back",animationBuilder:n}))}else if(i==="forward"){u=this.push(t,e,Object.assign(Object.assign({},f),{animationBuilder:n}))}else if(i==="back"){u=this.setRoot(t,e,Object.assign(Object.assign({},f),{direction:"back",animated:true,animationBuilder:n}))}}return o};t.prototype.getRouteId=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){t=this.getActiveSync();if(t){return[2,{id:t.element.tagName,params:t.params,element:t.element}]}return[2,undefined]}))}))};t.prototype.getActive=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.getActiveSync()]}))}))};t.prototype.getByIndex=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.views[t]]}))}))};t.prototype.canGoBack=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.canGoBackSync(t)]}))}))};t.prototype.getPrevious=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.getPreviousSync(t)]}))}))};t.prototype.getLength=function(){return this.views.length};t.prototype.getActiveSync=function(){return this.views[this.views.length-1]};t.prototype.canGoBackSync=function(t){if(t===void 0){t=this.getActiveSync()}return!!(t&&this.getPreviousSync(t))};t.prototype.getPreviousSync=function(t){if(t===void 0){t=this.getActiveSync()}if(!t){return undefined}var e=this.views;var i=e.indexOf(t);return i>0?e[i-1]:undefined};t.prototype.queueTrns=function(t,e){return __awaiter(this,void 0,void 0,(function(){var i,n,r,s,a;return __generator(this,(function(o){switch(o.label){case 0:if(this.isTransitioning&&((i=t.opts)===null||i===void 0?void 0:i.skipIfBusy)){return[2,false]}r=new Promise((function(e,i){t.resolve=e;t.reject=i}));t.done=e;if(!(t.opts&&t.opts.updateURL!==false&&this.useRouter))return[3,2];s=document.querySelector("ion-router");if(!s)return[3,2];return[4,s.canTransition()];case 1:a=o.sent();if(a===false){return[2,false]}if(typeof a==="string"){s.push(a,t.opts.direction||"back");return[2,false]}o.label=2;case 2:if(((n=t.insertViews)===null||n===void 0?void 0:n.length)===0){t.insertViews=undefined}this.transInstr.push(t);this.nextTrns();return[2,r]}}))}))};t.prototype.success=function(t,e){if(this.destroyed){this.fireError("nav controller was destroyed",e);return}if(e.done){e.done(t.hasCompleted,t.requiresTransition,t.enteringView,t.leavingView,t.direction)}e.resolve(t.hasCompleted);if(e.opts.updateURL!==false&&this.useRouter){var i=document.querySelector("ion-router");if(i){var n=t.direction==="back"?"back":"forward";i.navChanged(n)}}};t.prototype.failed=function(t,e){if(this.destroyed){this.fireError("nav controller was destroyed",e);return}this.transInstr.length=0;this.fireError(t,e)};t.prototype.fireError=function(t,e){if(e.done){e.done(false,false,t)}if(e.reject&&!this.destroyed){e.reject(t)}else{e.resolve(false)}};t.prototype.nextTrns=function(){if(this.isTransitioning){return false}var t=this.transInstr.shift();if(!t){return false}this.runTransition(t);return true};t.prototype.runTransition=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,n,r,s,a;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,6,,7]);this.ionNavWillChange.emit();this.isTransitioning=true;this.prepareTI(t);e=this.getActiveSync();i=this.getEnteringView(t,e);if(!e&&!i){throw new Error("no views in the stack to be removed")}if(!(i&&i.state===VIEW_STATE_NEW))return[3,2];return[4,i.init(this.el)];case 1:o.sent();o.label=2;case 2:this.postViewInit(i,e,t);n=(t.enteringRequiresTransition||t.leavingRequiresTransition)&&i!==e;if(n&&t.opts&&e){r=t.opts.direction==="back";if(r){t.opts.animationBuilder=t.opts.animationBuilder||(i===null||i===void 0?void 0:i.animationBuilder)}e.animationBuilder=t.opts.animationBuilder}s=void 0;if(!n)return[3,4];return[4,this.transition(i,e,t)];case 3:s=o.sent();return[3,5];case 4:s={hasCompleted:true,requiresTransition:false};o.label=5;case 5:this.success(s,t);this.ionNavDidChange.emit();return[3,7];case 6:a=o.sent();this.failed(a,t);return[3,7];case 7:this.isTransitioning=false;this.nextTrns();return[2]}}))}))};t.prototype.prepareTI=function(t){var e,i;var n;var r=this.views.length;(e=t.opts)!==null&&e!==void 0?e:t.opts={};(i=(n=t.opts).delegate)!==null&&i!==void 0?i:n.delegate=this.delegate;if(t.removeView!==undefined){assert(t.removeStart!==undefined,"removeView needs removeStart");assert(t.removeCount!==undefined,"removeView needs removeCount");var s=this.views.indexOf(t.removeView);if(s<0){throw new Error("removeView was not found")}t.removeStart+=s}if(t.removeStart!==undefined){if(t.removeStart<0){t.removeStart=r-1}if(t.removeCount<0){t.removeCount=r-t.removeStart}t.leavingRequiresTransition=t.removeCount>0&&t.removeStart+t.removeCount===r}if(t.insertViews){if(t.insertStart<0||t.insertStart>r){t.insertStart=r}t.enteringRequiresTransition=t.insertStart===r}var a=t.insertViews;if(!a){return}assert(a.length>0,"length can not be zero");var o=convertToViews(a);if(o.length===0){throw new Error("invalid views to insert")}for(var u=0,f=o;u<f.length;u++){var h=f[u];h.delegate=t.opts.delegate;var c=h.nav;if(c&&c!==this){throw new Error("inserted view was already inserted")}if(h.state===VIEW_STATE_DESTROYED){throw new Error("inserted view was already destroyed")}}t.insertViews=o};t.prototype.getEnteringView=function(t,e){var i=t.insertViews;if(i!==undefined){return i[i.length-1]}var n=t.removeStart;if(n!==undefined){var r=this.views;var s=n+t.removeCount;for(var a=r.length-1;a>=0;a--){var o=r[a];if((a<n||a>=s)&&o!==e){return o}}}return undefined};t.prototype.postViewInit=function(t,e,i){var n,r,s;assert(e||t,"Both leavingView and enteringView are null");assert(i.resolve,"resolve must be valid");assert(i.reject,"reject must be valid");var a=i.opts;var o=i.insertViews,u=i.removeStart,f=i.removeCount;var h;if(u!==undefined&&f!==undefined){assert(u>=0,"removeStart can not be negative");assert(f>=0,"removeCount can not be negative");h=[];for(var c=u;c<u+f;c++){var v=this.views[c];if(v!==undefined&&v!==t&&v!==e){h.push(v)}}(n=a.direction)!==null&&n!==void 0?n:a.direction="back"}var d=this.views.length+((r=o===null||o===void 0?void 0:o.length)!==null&&r!==void 0?r:0)-(f!==null&&f!==void 0?f:0);assert(d>=0,"final balance can not be negative");if(d===0){console.warn("You can't remove all the pages in the navigation stack. nav.pop() is probably called too many times.",this,this.el);throw new Error("navigation stack needs at least one root page")}if(o){var l=i.insertStart;for(var _=0,m=o;_<m.length;_++){var v=m[_];this.insertViewAt(v,l);l++}if(i.enteringRequiresTransition){(s=a.direction)!==null&&s!==void 0?s:a.direction="forward"}}if(h&&h.length>0){for(var E=0,w=h;E<w.length;E++){var v=w[E];lifecycle(v.element,LIFECYCLE_WILL_LEAVE);lifecycle(v.element,LIFECYCLE_DID_LEAVE);lifecycle(v.element,LIFECYCLE_WILL_UNLOAD)}for(var g=0,b=h;g<b.length;g++){var v=b[g];this.destroyView(v)}}};t.prototype.transition=function(t,e,i){return __awaiter(this,void 0,void 0,(function(){var n,r,s,a,o,u,f;var h=this;return __generator(this,(function(c){switch(c.label){case 0:n=i.opts;r=n.progressAnimation?function(t){if(t!==undefined&&!h.gestureOrAnimationInProgress){h.gestureOrAnimationInProgress=true;t.onFinish((function(){h.gestureOrAnimationInProgress=false}),{oneTimeCallback:true});t.progressEnd(0,0,0)}else{h.sbAni=t}}:undefined;s=getIonMode(this);a=t.element;o=e&&e.element;u=Object.assign(Object.assign({mode:s,showGoBack:this.canGoBackSync(t),baseEl:this.el,progressCallback:r,animated:this.animated&&config.getBoolean("animated",true),enteringEl:a,leavingEl:o},n),{animationBuilder:n.animationBuilder||this.animation||config.get("navAnimation")});return[4,transition(u)];case 1:f=c.sent().hasCompleted;return[2,this.transitionFinish(f,t,e,n)]}}))}))};t.prototype.transitionFinish=function(t,e,i,n){var r=t?e:i;if(r){this.unmountInactiveViews(r)}return{hasCompleted:t,requiresTransition:true,enteringView:e,leavingView:i,direction:n.direction}};t.prototype.insertViewAt=function(t,e){var i=this.views;var n=i.indexOf(t);if(n>-1){assert(t.nav===this,"view is not part of the nav");i.splice(n,1);i.splice(e,0,t)}else{assert(!t.nav,"nav is used");t.nav=this;i.splice(e,0,t)}};t.prototype.removeView=function(t){assert(t.state===VIEW_STATE_ATTACHED||t.state===VIEW_STATE_DESTROYED,"view state should be loaded or destroyed");var e=this.views;var i=e.indexOf(t);assert(i>-1,"view must be part of the stack");if(i>=0){e.splice(i,1)}};t.prototype.destroyView=function(t){t._destroy();this.removeView(t)};t.prototype.unmountInactiveViews=function(t){if(this.destroyed){return}var e=this.views;var i=e.indexOf(t);for(var n=e.length-1;n>=0;n--){var r=e[n];var s=r.element;if(s){if(n>i){lifecycle(s,LIFECYCLE_WILL_UNLOAD);this.destroyView(r)}else if(n<i){setPageHidden(s,true)}}}};t.prototype.canStart=function(){return!this.gestureOrAnimationInProgress&&!!this.swipeGesture&&!this.isTransitioning&&this.transInstr.length===0&&this.canGoBackSync()};t.prototype.onStart=function(){this.gestureOrAnimationInProgress=true;this.pop({direction:"back",progressAnimation:true})};t.prototype.onMove=function(t){if(this.sbAni){this.sbAni.progressStep(t)}};t.prototype.onEnd=function(t,e,i){var n=this;if(this.sbAni){this.sbAni.onFinish((function(){n.gestureOrAnimationInProgress=false}),{oneTimeCallback:true});var r=t?-.001:.001;if(!t){this.sbAni.easing("cubic-bezier(1, 0, 0.68, 0.28)");r+=getTimeGivenProgression([0,0],[1,0],[.68,.28],[1,1],e)[0]}else{r+=getTimeGivenProgression([0,0],[.32,.72],[0,1],[1,1],e)[0]}this.sbAni.progressEnd(t?1:0,r,i)}else{this.gestureOrAnimationInProgress=false}};t.prototype.render=function(){return h("slot",null)};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{swipeGesture:["swipeGestureChanged"],root:["rootChanged"]}},enumerable:false,configurable:true});return t}();Nav.style=navCss;var navLink=function(t,e,i,n,r){var s=t.closest("ion-nav");if(s){if(e==="forward"){if(i!==undefined){return s.push(i,n,{skipIfBusy:true,animationBuilder:r})}}else if(e==="root"){if(i!==undefined){return s.setRoot(i,n,{skipIfBusy:true,animationBuilder:r})}}else if(e==="back"){return s.pop({skipIfBusy:true,animationBuilder:r})}}return Promise.resolve(false)};var NavLink=function(){function t(t){var e=this;registerInstance(this,t);this.onClick=function(){return navLink(e.el,e.routerDirection,e.component,e.componentProps,e.routerAnimation)};this.component=undefined;this.componentProps=undefined;this.routerDirection="forward";this.routerAnimation=undefined}t.prototype.render=function(){return h(Host,{onClick:this.onClick})};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();export{Nav as ion_nav,NavLink as ion_nav_link};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{__awaiter,__generator}from"tslib";
|
|
2
2
|
/*!
|
|
3
3
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{r as registerInstance,d as createEvent,h,H as Host,f as getElement}from"./index-
|
|
4
|
+
*/import{r as registerInstance,d as createEvent,h,H as Host,f as getElement}from"./index-27668d5b.js";import{r as raf,g as getElementRoot}from"./helpers-ae653409.js";import{a as hapticSelectionStart,b as hapticSelectionChanged,h as hapticSelectionEnd}from"./haptic-554688a5.js";import{a as isPlatform,b as getIonMode}from"./ionic-global-8fa0f940.js";import{c as createColorClasses}from"./theme-01f3f29c.js";import"./capacitor-59395cbd.js";import"./index-a5d50daf.js";var pickerColumnInternalIosCss=":host{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;height:200px;outline:none;font-size:22px;-webkit-scroll-snap-type:y mandatory;-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory;overflow-x:hidden;overflow-y:scroll;scrollbar-width:none;text-align:center}:host::-webkit-scrollbar{display:none}:host .picker-item{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden;scroll-snap-align:center}:host .picker-item-empty,:host .picker-item[disabled]{cursor:default}:host .picker-item-empty,:host(:not([disabled])) .picker-item[disabled]{scroll-snap-align:none}:host([disabled]){overflow-y:hidden}:host .picker-item[disabled]{opacity:0.4}:host(.picker-column-active) .picker-item.picker-item-active{color:var(--ion-color-base)}@media (any-hover: hover){:host(:focus){outline:none;background:rgba(var(--ion-color-base-rgb), 0.2)}}";var pickerColumnInternalMdCss=":host{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;height:200px;outline:none;font-size:22px;-webkit-scroll-snap-type:y mandatory;-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory;overflow-x:hidden;overflow-y:scroll;scrollbar-width:none;text-align:center}:host::-webkit-scrollbar{display:none}:host .picker-item{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden;scroll-snap-align:center}:host .picker-item-empty,:host .picker-item[disabled]{cursor:default}:host .picker-item-empty,:host(:not([disabled])) .picker-item[disabled]{scroll-snap-align:none}:host([disabled]){overflow-y:hidden}:host .picker-item[disabled]{opacity:0.4}:host(.picker-column-active) .picker-item.picker-item-active{color:var(--ion-color-base)}@media (any-hover: hover){:host(:focus){outline:none;background:rgba(var(--ion-color-base-rgb), 0.2)}}:host .picker-item-active{color:var(--ion-color-base)}";var PickerColumnInternal=function(){function e(e){var i=this;registerInstance(this,e);this.ionChange=createEvent(this,"ionChange",7);this.isScrolling=false;this.isColumnVisible=false;this.canExitInputMode=true;this.centerPickerItemInView=function(e,t,r){if(t===void 0){t=true}if(r===void 0){r=true}var n=i,a=n.el,o=n.isColumnVisible;if(o){var s=e.offsetTop-3*e.clientHeight+e.clientHeight/2;if(a.scrollTop!==s){i.canExitInputMode=r;a.scroll({top:s,left:0,behavior:t?"smooth":undefined})}}};this.setPickerItemActiveState=function(e,i){if(i){e.classList.add(PICKER_ITEM_ACTIVE_CLASS);e.part.add(PICKER_ITEM_ACTIVE_PART)}else{e.classList.remove(PICKER_ITEM_ACTIVE_CLASS);e.part.remove(PICKER_ITEM_ACTIVE_PART)}};this.inputModeChange=function(e){if(!i.numericInput){return}var t=e.detail,r=t.useInputMode,n=t.inputModeColumn;var a=n===undefined||n===i.el;if(!r||!a){i.setInputModeActive(false);return}i.setInputModeActive(true)};this.setInputModeActive=function(e){if(i.isScrolling){i.scrollEndCallback=function(){i.isActive=e};return}i.isActive=e};this.initializeScrollListener=function(){var e=isPlatform("ios");var t=i.el;var r;var n=i.activeItem;var a=function(){raf((function(){if(r){clearTimeout(r);r=undefined}if(!i.isScrolling){e&&hapticSelectionStart();i.isScrolling=true}var a=t.getBoundingClientRect();var o=a.x+a.width/2;var s=a.y+a.height/2;var l=t.shadowRoot.elementFromPoint(o,s);if(n!==null){i.setPickerItemActiveState(n,false)}if(l===null||l.disabled){return}if(l!==n){e&&hapticSelectionChanged();if(i.canExitInputMode){i.exitInputMode()}}n=l;i.setPickerItemActiveState(l,true);r=setTimeout((function(){i.isScrolling=false;e&&hapticSelectionEnd();var t=i.scrollEndCallback;if(t){t();i.scrollEndCallback=undefined}i.canExitInputMode=true;var r=l.getAttribute("data-index");if(r===null){return}var n=parseInt(r,10);var a=i.items[n];if(a.value!==i.value){i.setValue(a.value)}}),250)}))};raf((function(){t.addEventListener("scroll",a);i.destroyScrollListener=function(){t.removeEventListener("scroll",a)}}))};this.exitInputMode=function(){var e=i.parentEl;if(e==null)return;e.exitInputMode();i.el.classList.remove("picker-column-active")};this.isActive=false;this.disabled=false;this.items=[];this.value=undefined;this.color="primary";this.numericInput=false}e.prototype.valueChange=function(){if(this.isColumnVisible){this.scrollActiveItemIntoView()}};e.prototype.componentWillLoad=function(){var e=this;var i=function(i){var t=i[0];if(t.isIntersecting){var r=e,n=r.activeItem,a=r.el;e.isColumnVisible=true;var o=getElementRoot(a).querySelector(".".concat(PICKER_ITEM_ACTIVE_CLASS));if(o){e.setPickerItemActiveState(o,false)}e.scrollActiveItemIntoView();if(n){e.setPickerItemActiveState(n,true)}e.initializeScrollListener()}else{e.isColumnVisible=false;if(e.destroyScrollListener){e.destroyScrollListener();e.destroyScrollListener=undefined}}};new IntersectionObserver(i,{threshold:.001}).observe(this.el);var t=this.parentEl=this.el.closest("ion-picker-internal");if(t!==null){t.addEventListener("ionInputModeChange",(function(i){return e.inputModeChange(i)}))}};e.prototype.componentDidRender=function(){var e;var i=this,t=i.activeItem,r=i.items,n=i.isColumnVisible,a=i.value;if(n){if(t){this.scrollActiveItemIntoView()}else if(((e=r[0])===null||e===void 0?void 0:e.value)!==a){this.setValue(r[0].value)}}};e.prototype.scrollActiveItemIntoView=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){e=this.activeItem;if(e){this.centerPickerItemInView(e,false,false)}return[2]}))}))};e.prototype.setValue=function(e){return __awaiter(this,void 0,void 0,(function(){var i,t;return __generator(this,(function(r){i=this.items;this.value=e;t=i.find((function(i){return i.value===e&&i.disabled!==true}));if(t){this.ionChange.emit(t)}return[2]}))}))};Object.defineProperty(e.prototype,"activeItem",{get:function(){var e='.picker-item[data-value="'.concat(this.value,'"]').concat(this.disabled?"":":not([disabled])");return getElementRoot(this.el).querySelector(e)},enumerable:false,configurable:true});e.prototype.render=function(){var e;var i=this;var t=this,r=t.items,n=t.color,a=t.disabled,o=t.isActive,s=t.numericInput;var l=getIonMode(this);return h(Host,{exportparts:"".concat(PICKER_ITEM_PART,", ").concat(PICKER_ITEM_ACTIVE_PART),disabled:a,tabindex:a?null:0,class:createColorClasses(n,(e={},e[l]=true,e["picker-column-active"]=o,e["picker-column-numeric-input"]=s,e))},h("div",{class:"picker-item picker-item-empty","aria-hidden":"true"}," "),h("div",{class:"picker-item picker-item-empty","aria-hidden":"true"}," "),h("div",{class:"picker-item picker-item-empty","aria-hidden":"true"}," "),r.map((function(e,t){var r=a||e.disabled||false;return h("button",{tabindex:"-1",class:{"picker-item":true},"data-value":e.value,"data-index":t,onClick:function(e){i.centerPickerItemInView(e.target,true)},disabled:r,part:PICKER_ITEM_PART},e.text)})),h("div",{class:"picker-item picker-item-empty","aria-hidden":"true"}," "),h("div",{class:"picker-item picker-item-empty","aria-hidden":"true"}," "),h("div",{class:"picker-item picker-item-empty","aria-hidden":"true"}," "))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["valueChange"]}},enumerable:false,configurable:true});return e}();var PICKER_ITEM_ACTIVE_CLASS="picker-item-active";var PICKER_ITEM_PART="wheel-item";var PICKER_ITEM_ACTIVE_PART="active";PickerColumnInternal.style={ios:pickerColumnInternalIosCss,md:pickerColumnInternalMdCss};export{PickerColumnInternal as ion_picker_column_internal};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{__awaiter,__generator}from"tslib";
|
|
2
2
|
/*!
|
|
3
3
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{r as registerInstance,d as createEvent,h,H as Host,f as getElement}from"./index-b7d870cf.js";import{g as getElementRoot}from"./helpers-ae653409.js";var pickerInternalIosCss=":host{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{top:0;height:83px}@supports (inset-inline-start: 0){:host .picker-before{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-before{left:0}:host-context([dir=rtl]) .picker-before{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-before{left:unset;right:unset;right:0}}}:host .picker-after{top:116px;height:84px}@supports (inset-inline-start: 0){:host .picker-after{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-after{left:0}:host-context([dir=rtl]) .picker-after{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-after{left:unset;right:unset;right:0}}}:host .picker-highlight{border-radius:8px;left:0;right:0;top:50%;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--wheel-highlight-background);z-index:-1}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column-internal:first-of-type){text-align:start}:host ::slotted(ion-picker-column-internal:last-of-type){text-align:end}:host ::slotted(ion-picker-column-internal:only-child){text-align:center}:host .picker-before{background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), to(rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8)));background:linear-gradient(to bottom, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8) 100%)}:host .picker-after{background:-webkit-gradient(linear, left bottom, left top, color-stop(20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), to(rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8)));background:linear-gradient(to top, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8) 100%)}:host .picker-highlight{background:var(--wheel-highlight-background, var(--ion-color-step-150, #eeeeef))}";var pickerInternalMdCss=":host{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{top:0;height:83px}@supports (inset-inline-start: 0){:host .picker-before{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-before{left:0}:host-context([dir=rtl]) .picker-before{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-before{left:unset;right:unset;right:0}}}:host .picker-after{top:116px;height:84px}@supports (inset-inline-start: 0){:host .picker-after{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-after{left:0}:host-context([dir=rtl]) .picker-after{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-after{left:unset;right:unset;right:0}}}:host .picker-highlight{border-radius:8px;left:0;right:0;top:50%;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--wheel-highlight-background);z-index:-1}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column-internal:first-of-type){text-align:start}:host ::slotted(ion-picker-column-internal:last-of-type){text-align:end}:host ::slotted(ion-picker-column-internal:only-child){text-align:center}:host .picker-before{background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), color-stop(90%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0)));background:linear-gradient(to bottom, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0) 90%)}:host .picker-after{background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), color-stop(90%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0)));background:linear-gradient(to top, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 30%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0) 90%)}";var PickerInternal=function(){function r(r){var t=this;registerInstance(this,r);this.ionInputModeChange=createEvent(this,"ionInputModeChange",7);this.useInputMode=false;this.isInHighlightBounds=function(r){var e=t.highlightEl;if(!e){return false}var n=e.getBoundingClientRect();var i=r.clientX<n.left||r.clientX>n.right;var o=r.clientY<n.top||r.clientY>n.bottom;if(i||o){return false}return true};this.onFocusOut=function(r){var e=r.relatedTarget;if(!e||e.tagName!=="ION-PICKER-COLUMN-INTERNAL"&&e!==t.inputEl){t.exitInputMode()}};this.onFocusIn=function(r){var e=r.target;if(e.tagName!=="ION-PICKER-COLUMN-INTERNAL"){return}if(!t.actionOnClick){var n=e;var i=n.numericInput;if(i){t.enterInputMode(n,false)}else{t.exitInputMode()}}};this.onClick=function(){var r=t.actionOnClick;if(r){r();t.actionOnClick=undefined}};this.onPointerDown=function(r){var e=t,n=e.useInputMode,i=e.inputModeColumn,o=e.el;if(t.isInHighlightBounds(r)){if(n){if(r.target.tagName==="ION-PICKER-COLUMN-INTERNAL"){if(i&&i===r.target){t.actionOnClick=function(){t.enterInputMode()}}else{t.actionOnClick=function(){t.enterInputMode(r.target)}}}else{t.actionOnClick=function(){t.exitInputMode()}}}else{var a=o.querySelectorAll("ion-picker-column-internal.picker-column-numeric-input");var s=a.length===1?r.target:undefined;t.actionOnClick=function(){t.enterInputMode(s)}}return}t.actionOnClick=function(){t.exitInputMode()}};this.enterInputMode=function(r,e){if(e===void 0){e=true}var n=t,i=n.inputEl,o=n.el;if(!i){return}var a=o.querySelector("ion-picker-column-internal.picker-column-numeric-input");if(!a){return}t.useInputMode=true;t.inputModeColumn=r;if(e){if(t.destroyKeypressListener){t.destroyKeypressListener();t.destroyKeypressListener=undefined}i.focus()}else{o.addEventListener("keypress",t.onKeyPress);t.destroyKeypressListener=function(){o.removeEventListener("keypress",t.onKeyPress)}}t.emitInputModeChange()};this.onKeyPress=function(r){var e=t.inputEl;if(!e){return}var n=parseInt(r.key,10);if(!Number.isNaN(n)){e.value+=r.key;t.onInputChange()}};this.selectSingleColumn=function(){var r=t,e=r.inputEl,n=r.inputModeColumn,i=r.singleColumnSearchTimeout;if(!e||!n){return}var o=n.items.filter((function(r){return r.disabled!==true}));if(i){clearTimeout(i)}t.singleColumnSearchTimeout=setTimeout((function(){e.value="";t.singleColumnSearchTimeout=undefined}),1e3);if(e.value.length>=3){var a=e.value.length-2;var s=e.value.substring(a);e.value=s;t.selectSingleColumn();return}var c=o.find((function(r){var t=r.text;var n=t.replace(/^0+(?=[1-9])|0+(?=0$)/,"");return n===e.value}));if(c){n.setValue(c.value);return}if(e.value.length===2){var l=e.value.substring(e.value.length-1);e.value=l;t.selectSingleColumn()}};this.searchColumn=function(r,t,e){if(e===void 0){e="start"}var n=e==="start"?/^0+/:/0$/;var i=r.items.find((function(r){var e=r.text,i=r.disabled;return i!==true&&e.replace(n,"")===t}));if(i){r.setValue(i.value)}};this.selectMultiColumn=function(){var r=t,e=r.inputEl,n=r.el;if(!e){return}var i=Array.from(n.querySelectorAll("ion-picker-column-internal")).filter((function(r){return r.numericInput}));var o=i[0];var a=i[1];var s=e.value;var c;switch(s.length){case 1:t.searchColumn(o,s);break;case 2:var l=e.value.substring(0,1);s=l==="0"||l==="1"?e.value:l;t.searchColumn(o,s);if(s.length===1){c=e.value.substring(e.value.length-1);t.searchColumn(a,c,"end")}break;case 3:var u=e.value.substring(0,1);s=u==="0"||u==="1"?e.value.substring(0,2):u;t.searchColumn(o,s);c=s.length===1?e.value.substring(1):e.value.substring(2);t.searchColumn(a,c,"end");break;case 4:var g=e.value.substring(0,1);s=g==="0"||g==="1"?e.value.substring(0,2):g;t.searchColumn(o,s);var b=s.length===1?e.value.substring(1,e.value.length):e.value.substring(2,e.value.length);t.searchColumn(a,b,"end");break;default:var f=e.value.length-4;var d=e.value.substring(f);e.value=d;t.selectMultiColumn();break}};this.onInputChange=function(){var r=t,e=r.useInputMode,n=r.inputEl,i=r.inputModeColumn;if(!e||!n){return}if(i){t.selectSingleColumn()}else{t.selectMultiColumn()}};this.emitInputModeChange=function(){var r=t,e=r.useInputMode,n=r.inputModeColumn;t.ionInputModeChange.emit({useInputMode:e,inputModeColumn:n})}}r.prototype.preventTouchStartPropagation=function(r){r.stopPropagation()};r.prototype.componentWillLoad=function(){getElementRoot(this.el).addEventListener("focusin",this.onFocusIn);getElementRoot(this.el).addEventListener("focusout",this.onFocusOut)};r.prototype.exitInputMode=function(){return __awaiter(this,void 0,void 0,(function(){var r,t,e;return __generator(this,(function(n){r=this,t=r.inputEl,e=r.useInputMode;if(!e||!t){return[2]}this.useInputMode=false;this.inputModeColumn=undefined;t.blur();t.value="";if(this.destroyKeypressListener){this.destroyKeypressListener();this.destroyKeypressListener=undefined}this.emitInputModeChange();return[2]}))}))};r.prototype.render=function(){var r=this;return h(Host,{onPointerDown:function(t){return r.onPointerDown(t)},onClick:function(){return r.onClick()}},h("input",{"aria-hidden":"true",tabindex:-1,inputmode:"numeric",type:"number",ref:function(t){return r.inputEl=t},onInput:function(){return r.onInputChange()},onBlur:function(){return r.exitInputMode()}}),h("div",{class:"picker-before"}),h("div",{class:"picker-after"}),h("div",{class:"picker-highlight",ref:function(t){return r.highlightEl=t}}),h("slot",null))};Object.defineProperty(r.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return r}();PickerInternal.style={ios:pickerInternalIosCss,md:pickerInternalMdCss};export{PickerInternal as ion_picker_internal};
|
|
4
|
+
*/import{r as registerInstance,d as createEvent,h,H as Host,f as getElement}from"./index-27668d5b.js";import{g as getElementRoot}from"./helpers-ae653409.js";var pickerInternalIosCss=":host{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{top:0;height:83px}@supports (inset-inline-start: 0){:host .picker-before{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-before{left:0}:host-context([dir=rtl]) .picker-before{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-before{left:unset;right:unset;right:0}}}:host .picker-after{top:116px;height:84px}@supports (inset-inline-start: 0){:host .picker-after{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-after{left:0}:host-context([dir=rtl]) .picker-after{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-after{left:unset;right:unset;right:0}}}:host .picker-highlight{border-radius:8px;left:0;right:0;top:50%;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--wheel-highlight-background);z-index:-1}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column-internal:first-of-type){text-align:start}:host ::slotted(ion-picker-column-internal:last-of-type){text-align:end}:host ::slotted(ion-picker-column-internal:only-child){text-align:center}:host .picker-before{background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), to(rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8)));background:linear-gradient(to bottom, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8) 100%)}:host .picker-after{background:-webkit-gradient(linear, left bottom, left top, color-stop(20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), to(rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8)));background:linear-gradient(to top, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8) 100%)}:host .picker-highlight{background:var(--wheel-highlight-background, var(--ion-color-step-150, #eeeeef))}";var pickerInternalMdCss=":host{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{top:0;height:83px}@supports (inset-inline-start: 0){:host .picker-before{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-before{left:0}:host-context([dir=rtl]) .picker-before{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-before{left:unset;right:unset;right:0}}}:host .picker-after{top:116px;height:84px}@supports (inset-inline-start: 0){:host .picker-after{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-after{left:0}:host-context([dir=rtl]) .picker-after{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-after{left:unset;right:unset;right:0}}}:host .picker-highlight{border-radius:8px;left:0;right:0;top:50%;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--wheel-highlight-background);z-index:-1}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column-internal:first-of-type){text-align:start}:host ::slotted(ion-picker-column-internal:last-of-type){text-align:end}:host ::slotted(ion-picker-column-internal:only-child){text-align:center}:host .picker-before{background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), color-stop(90%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0)));background:linear-gradient(to bottom, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0) 90%)}:host .picker-after{background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), color-stop(90%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0)));background:linear-gradient(to top, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 30%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0) 90%)}";var PickerInternal=function(){function r(r){var t=this;registerInstance(this,r);this.ionInputModeChange=createEvent(this,"ionInputModeChange",7);this.useInputMode=false;this.isInHighlightBounds=function(r){var e=t.highlightEl;if(!e){return false}var n=e.getBoundingClientRect();var i=r.clientX<n.left||r.clientX>n.right;var o=r.clientY<n.top||r.clientY>n.bottom;if(i||o){return false}return true};this.onFocusOut=function(r){var e=r.relatedTarget;if(!e||e.tagName!=="ION-PICKER-COLUMN-INTERNAL"&&e!==t.inputEl){t.exitInputMode()}};this.onFocusIn=function(r){var e=r.target;if(e.tagName!=="ION-PICKER-COLUMN-INTERNAL"){return}if(!t.actionOnClick){var n=e;var i=n.numericInput;if(i){t.enterInputMode(n,false)}else{t.exitInputMode()}}};this.onClick=function(){var r=t.actionOnClick;if(r){r();t.actionOnClick=undefined}};this.onPointerDown=function(r){var e=t,n=e.useInputMode,i=e.inputModeColumn,o=e.el;if(t.isInHighlightBounds(r)){if(n){if(r.target.tagName==="ION-PICKER-COLUMN-INTERNAL"){if(i&&i===r.target){t.actionOnClick=function(){t.enterInputMode()}}else{t.actionOnClick=function(){t.enterInputMode(r.target)}}}else{t.actionOnClick=function(){t.exitInputMode()}}}else{var a=o.querySelectorAll("ion-picker-column-internal.picker-column-numeric-input");var s=a.length===1?r.target:undefined;t.actionOnClick=function(){t.enterInputMode(s)}}return}t.actionOnClick=function(){t.exitInputMode()}};this.enterInputMode=function(r,e){if(e===void 0){e=true}var n=t,i=n.inputEl,o=n.el;if(!i){return}var a=o.querySelector("ion-picker-column-internal.picker-column-numeric-input");if(!a){return}t.useInputMode=true;t.inputModeColumn=r;if(e){if(t.destroyKeypressListener){t.destroyKeypressListener();t.destroyKeypressListener=undefined}i.focus()}else{o.addEventListener("keypress",t.onKeyPress);t.destroyKeypressListener=function(){o.removeEventListener("keypress",t.onKeyPress)}}t.emitInputModeChange()};this.onKeyPress=function(r){var e=t.inputEl;if(!e){return}var n=parseInt(r.key,10);if(!Number.isNaN(n)){e.value+=r.key;t.onInputChange()}};this.selectSingleColumn=function(){var r=t,e=r.inputEl,n=r.inputModeColumn,i=r.singleColumnSearchTimeout;if(!e||!n){return}var o=n.items.filter((function(r){return r.disabled!==true}));if(i){clearTimeout(i)}t.singleColumnSearchTimeout=setTimeout((function(){e.value="";t.singleColumnSearchTimeout=undefined}),1e3);if(e.value.length>=3){var a=e.value.length-2;var s=e.value.substring(a);e.value=s;t.selectSingleColumn();return}var c=o.find((function(r){var t=r.text;var n=t.replace(/^0+(?=[1-9])|0+(?=0$)/,"");return n===e.value}));if(c){n.setValue(c.value);return}if(e.value.length===2){var l=e.value.substring(e.value.length-1);e.value=l;t.selectSingleColumn()}};this.searchColumn=function(r,t,e){if(e===void 0){e="start"}var n=e==="start"?/^0+/:/0$/;var i=r.items.find((function(r){var e=r.text,i=r.disabled;return i!==true&&e.replace(n,"")===t}));if(i){r.setValue(i.value)}};this.selectMultiColumn=function(){var r=t,e=r.inputEl,n=r.el;if(!e){return}var i=Array.from(n.querySelectorAll("ion-picker-column-internal")).filter((function(r){return r.numericInput}));var o=i[0];var a=i[1];var s=e.value;var c;switch(s.length){case 1:t.searchColumn(o,s);break;case 2:var l=e.value.substring(0,1);s=l==="0"||l==="1"?e.value:l;t.searchColumn(o,s);if(s.length===1){c=e.value.substring(e.value.length-1);t.searchColumn(a,c,"end")}break;case 3:var u=e.value.substring(0,1);s=u==="0"||u==="1"?e.value.substring(0,2):u;t.searchColumn(o,s);c=s.length===1?e.value.substring(1):e.value.substring(2);t.searchColumn(a,c,"end");break;case 4:var g=e.value.substring(0,1);s=g==="0"||g==="1"?e.value.substring(0,2):g;t.searchColumn(o,s);var b=s.length===1?e.value.substring(1,e.value.length):e.value.substring(2,e.value.length);t.searchColumn(a,b,"end");break;default:var f=e.value.length-4;var d=e.value.substring(f);e.value=d;t.selectMultiColumn();break}};this.onInputChange=function(){var r=t,e=r.useInputMode,n=r.inputEl,i=r.inputModeColumn;if(!e||!n){return}if(i){t.selectSingleColumn()}else{t.selectMultiColumn()}};this.emitInputModeChange=function(){var r=t,e=r.useInputMode,n=r.inputModeColumn;t.ionInputModeChange.emit({useInputMode:e,inputModeColumn:n})}}r.prototype.preventTouchStartPropagation=function(r){r.stopPropagation()};r.prototype.componentWillLoad=function(){getElementRoot(this.el).addEventListener("focusin",this.onFocusIn);getElementRoot(this.el).addEventListener("focusout",this.onFocusOut)};r.prototype.exitInputMode=function(){return __awaiter(this,void 0,void 0,(function(){var r,t,e;return __generator(this,(function(n){r=this,t=r.inputEl,e=r.useInputMode;if(!e||!t){return[2]}this.useInputMode=false;this.inputModeColumn=undefined;t.blur();t.value="";if(this.destroyKeypressListener){this.destroyKeypressListener();this.destroyKeypressListener=undefined}this.emitInputModeChange();return[2]}))}))};r.prototype.render=function(){var r=this;return h(Host,{onPointerDown:function(t){return r.onPointerDown(t)},onClick:function(){return r.onClick()}},h("input",{"aria-hidden":"true",tabindex:-1,inputmode:"numeric",type:"number",ref:function(t){return r.inputEl=t},onInput:function(){return r.onInputChange()},onBlur:function(){return r.exitInputMode()}}),h("div",{class:"picker-before"}),h("div",{class:"picker-after"}),h("div",{class:"picker-highlight",ref:function(t){return r.highlightEl=t}}),h("slot",null))};Object.defineProperty(r.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return r}();PickerInternal.style={ios:pickerInternalIosCss,md:pickerInternalMdCss};export{PickerInternal as ion_picker_internal};
|