@nanoporetech-digital/components 3.13.0 → 4.0.0
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/CHANGELOG.md +51 -0
- package/dist/cjs/{algolia-data-533e3a95.js → algolia-data-ed53eaa8.js} +2 -2
- package/dist/cjs/{algolia-data-533e3a95.js.map → algolia-data-ed53eaa8.js.map} +1 -1
- package/dist/cjs/{component-store-5ad4de07.js → component-store-74d25f63.js} +2 -2
- package/dist/cjs/{component-store-5ad4de07.js.map → component-store-74d25f63.js.map} +1 -1
- package/dist/cjs/{form-control-80c69d1d.js → form-control-2e900f54.js} +2 -2
- package/dist/cjs/{form-control-80c69d1d.js.map → form-control-2e900f54.js.map} +1 -1
- package/dist/cjs/{index-46286eea.js → index-71f899a7.js} +85 -42
- package/dist/cjs/index-71f899a7.js.map +1 -0
- package/dist/cjs/{index-b13f69e7.js → index-99649bef.js} +2 -2
- package/dist/cjs/{index-b13f69e7.js.map → index-99649bef.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/nano-accordion.cjs.entry.js +1 -1
- package/dist/cjs/nano-alert.cjs.entry.js +2 -2
- package/dist/cjs/nano-algolia-filter.cjs.entry.js +3 -3
- package/dist/cjs/nano-algolia-input.cjs.entry.js +3 -3
- package/dist/cjs/nano-algolia-pagination.cjs.entry.js +2 -2
- package/dist/cjs/nano-algolia-results.cjs.entry.js +2 -2
- package/dist/cjs/nano-algolia.cjs.entry.js +3 -3
- package/dist/cjs/nano-aspect-ratio.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-components.cjs.js +3 -3
- package/dist/cjs/nano-components.cjs.js.map +1 -1
- package/dist/cjs/nano-datalist_3.cjs.entry.js +1 -1
- package/dist/cjs/nano-date-input.cjs.entry.js +1 -1
- package/dist/cjs/nano-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/nano-demo.cjs.entry.js +1 -1
- package/dist/cjs/nano-details.cjs.entry.js +2 -2
- package/dist/cjs/nano-dialog.cjs.entry.js +3 -3
- package/dist/cjs/nano-drawer.cjs.entry.js +2 -2
- package/dist/cjs/nano-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/nano-field-validator.cjs.entry.js +2 -2
- package/dist/cjs/nano-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js +5 -5
- package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-global-nav.cjs.entry.js +61 -75
- package/dist/cjs/nano-global-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-global-search-results.cjs.entry.js +1 -1
- package/dist/cjs/nano-grid_3.cjs.entry.js +2 -2
- package/dist/cjs/nano-grid_3.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-hero.cjs.entry.js +2 -2
- package/dist/cjs/nano-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/nano-icon.cjs.entry.js +2 -2
- package/dist/cjs/nano-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-input.cjs.entry.js +2 -2
- package/dist/cjs/nano-menu-drawer.cjs.entry.js +1 -1
- package/dist/cjs/nano-overflow-nav.cjs.entry.js +282 -0
- package/dist/cjs/nano-overflow-nav.cjs.entry.js.map +1 -0
- package/dist/cjs/nano-progress-bar_2.cjs.entry.js +1 -1
- package/dist/cjs/nano-progress-bar_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-range.cjs.entry.js +1 -1
- package/dist/cjs/nano-range.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-rating.cjs.entry.js +1 -1
- package/dist/cjs/nano-resize-observe_2.cjs.entry.js +4 -4
- package/dist/cjs/nano-resize-observe_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-slide.cjs.entry.js +1 -1
- package/dist/cjs/nano-slides.cjs.entry.js +11 -14
- package/dist/cjs/nano-slides.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-spinner.cjs.entry.js +1 -1
- package/dist/cjs/nano-spinner.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-split-pane.cjs.entry.js +1 -1
- package/dist/cjs/nano-sticker.cjs.entry.js +1 -1
- package/dist/cjs/nano-tab-content.cjs.entry.js +1 -1
- package/dist/cjs/nano-tab-group.cjs.entry.js +4 -4
- package/dist/cjs/nano-tab.cjs.entry.js +2 -2
- package/dist/cjs/nano-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/{nano-table-60c06885.js → nano-table-737365b7.js} +4 -4
- package/dist/cjs/{nano-table-60c06885.js.map → nano-table-737365b7.js.map} +1 -1
- package/dist/cjs/nano-table.cjs.entry.js +3 -3
- package/dist/cjs/{scroll-a197d9c4.js → scroll-6a9bedb4.js} +15 -8
- package/dist/cjs/scroll-6a9bedb4.js.map +1 -0
- package/dist/cjs/{table.worker-f902766e.js → table.worker-c3b11144.js} +4 -4
- package/dist/cjs/table.worker-c3b11144.js.map +1 -0
- package/dist/cjs/{transitions-5cd8f697.js → transitions-1205f12b.js} +3 -3
- package/dist/cjs/transitions-1205f12b.js.map +1 -0
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/checkbox/checkbox.css +3 -3
- package/dist/collection/components/drawer/drawer.css +1 -1
- package/dist/collection/components/global-nav/global-nav-user-profile.js +1 -1
- package/dist/collection/components/global-nav/global-nav-user-profile.js.map +1 -1
- package/dist/collection/components/global-nav/global-nav.js +60 -73
- package/dist/collection/components/global-nav/global-nav.js.map +1 -1
- package/dist/collection/components/global-nav/style/global-nav.css +4 -3
- package/dist/collection/components/hero/hero.css +2 -2
- package/dist/collection/components/icon/utils.js +1 -1
- package/dist/collection/components/icon/utils.js.map +1 -1
- package/dist/collection/components/img/img.css +1 -1
- package/dist/collection/components/input/input.css +3 -3
- package/dist/collection/components/nav-item/nav-item.css +2 -0
- package/dist/collection/components/overflow-nav/overflow-nav.css +223 -0
- package/dist/collection/components/overflow-nav/overflow-nav.js +441 -0
- package/dist/collection/components/overflow-nav/overflow-nav.js.map +1 -0
- package/dist/collection/components/progress-bar/progress-bar.css +2 -2
- package/dist/collection/components/range/range.css +1 -1
- package/dist/collection/components/resize-observe/resize-observe.js +5 -5
- package/dist/collection/components/resize-observe/resize-observe.js.map +1 -1
- package/dist/collection/components/select/select.css +3 -3
- package/dist/collection/components/slides/slides.css +5 -1
- package/dist/collection/components/slides/slides.js +9 -12
- package/dist/collection/components/slides/slides.js.map +1 -1
- package/dist/collection/components/spinner/spinner.css +2 -2
- package/dist/collection/components/tabs/tab.css +3 -3
- package/dist/collection/utils/scroll.js +14 -7
- package/dist/collection/utils/scroll.js.map +1 -1
- package/dist/collection/utils/transitions.js +2 -2
- package/dist/collection/utils/transitions.js.map +1 -1
- package/dist/components/global-nav-user-profile.js +1 -1
- package/dist/components/global-nav-user-profile.js.map +1 -1
- package/dist/components/icon.js +1 -1
- package/dist/components/icon.js.map +1 -1
- package/dist/components/img.js +1 -1
- package/dist/components/img.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/nano-checkbox.js.map +1 -1
- package/dist/components/nano-drawer.js.map +1 -1
- package/dist/components/nano-global-nav.js +59 -74
- package/dist/components/nano-global-nav.js.map +1 -1
- package/dist/components/nano-hero.js +1 -1
- package/dist/components/nano-hero.js.map +1 -1
- package/dist/components/nano-overflow-nav.d.ts +11 -0
- package/dist/components/nano-overflow-nav.js +317 -0
- package/dist/components/nano-overflow-nav.js.map +1 -0
- package/dist/components/nano-range.js.map +1 -1
- package/dist/components/nano-slides.js +10 -13
- package/dist/components/nano-slides.js.map +1 -1
- package/dist/components/nano-tab.js +1 -1
- package/dist/components/nano-tab.js.map +1 -1
- package/dist/components/nav-item.js +1 -1
- package/dist/components/nav-item.js.map +1 -1
- package/dist/components/progress-bar.js.map +1 -1
- package/dist/components/resize-observe.js +3 -3
- package/dist/components/resize-observe.js.map +1 -1
- package/dist/components/scroll.js +14 -7
- package/dist/components/scroll.js.map +1 -1
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/transitions.js +2 -2
- package/dist/components/transitions.js.map +1 -1
- package/dist/esm/{algolia-data-e5e86f12.js → algolia-data-ef2829e0.js} +2 -2
- package/dist/esm/{algolia-data-e5e86f12.js.map → algolia-data-ef2829e0.js.map} +1 -1
- package/dist/esm/{component-store-2044c2c2.js → component-store-244a8431.js} +2 -2
- package/dist/esm/{component-store-2044c2c2.js.map → component-store-244a8431.js.map} +1 -1
- package/dist/esm/{form-control-4f3a88a1.js → form-control-269ba84f.js} +2 -2
- package/dist/esm/{form-control-4f3a88a1.js.map → form-control-269ba84f.js.map} +1 -1
- package/dist/esm/{index-728dda31.js → index-5d0f4704.js} +2 -2
- package/dist/esm/{index-728dda31.js.map → index-5d0f4704.js.map} +1 -1
- package/dist/esm/{index-52b0408e.js → index-dad5627b.js} +85 -42
- package/dist/esm/index-dad5627b.js.map +1 -0
- package/dist/esm/loader.js +4 -4
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/nano-accordion.entry.js +1 -1
- package/dist/esm/nano-alert.entry.js +2 -2
- package/dist/esm/nano-algolia-filter.entry.js +3 -3
- package/dist/esm/nano-algolia-input.entry.js +3 -3
- package/dist/esm/nano-algolia-pagination.entry.js +2 -2
- package/dist/esm/nano-algolia-results.entry.js +2 -2
- package/dist/esm/nano-algolia.entry.js +3 -3
- package/dist/esm/nano-aspect-ratio.entry.js +1 -1
- package/dist/esm/nano-checkbox-group.entry.js +1 -1
- package/dist/esm/nano-checkbox.entry.js +1 -1
- package/dist/esm/nano-checkbox.entry.js.map +1 -1
- package/dist/esm/nano-components.js +4 -4
- package/dist/esm/nano-components.js.map +1 -1
- package/dist/esm/nano-datalist_3.entry.js +1 -1
- package/dist/esm/nano-date-input.entry.js +1 -1
- package/dist/esm/nano-date-picker.entry.js +1 -1
- package/dist/esm/nano-demo.entry.js +1 -1
- package/dist/esm/nano-details.entry.js +2 -2
- package/dist/esm/nano-dialog.entry.js +3 -3
- package/dist/esm/nano-drawer.entry.js +2 -2
- package/dist/esm/nano-drawer.entry.js.map +1 -1
- package/dist/esm/nano-dropdown.entry.js +1 -1
- package/dist/esm/nano-field-validator.entry.js +2 -2
- package/dist/esm/nano-file-upload.entry.js +1 -1
- package/dist/esm/nano-global-nav-user-profile_3.entry.js +5 -5
- package/dist/esm/nano-global-nav-user-profile_3.entry.js.map +1 -1
- package/dist/esm/nano-global-nav.entry.js +61 -75
- package/dist/esm/nano-global-nav.entry.js.map +1 -1
- package/dist/esm/nano-global-search-results.entry.js +1 -1
- package/dist/esm/nano-grid_3.entry.js +2 -2
- package/dist/esm/nano-grid_3.entry.js.map +1 -1
- package/dist/esm/nano-hero.entry.js +2 -2
- package/dist/esm/nano-hero.entry.js.map +1 -1
- package/dist/esm/nano-icon-button.entry.js +1 -1
- package/dist/esm/nano-icon.entry.js +2 -2
- package/dist/esm/nano-icon.entry.js.map +1 -1
- package/dist/esm/nano-input.entry.js +2 -2
- package/dist/esm/nano-menu-drawer.entry.js +1 -1
- package/dist/esm/nano-overflow-nav.entry.js +278 -0
- package/dist/esm/nano-overflow-nav.entry.js.map +1 -0
- package/dist/esm/nano-progress-bar_2.entry.js +1 -1
- package/dist/esm/nano-progress-bar_2.entry.js.map +1 -1
- package/dist/esm/nano-range.entry.js +1 -1
- package/dist/esm/nano-range.entry.js.map +1 -1
- package/dist/esm/nano-rating.entry.js +1 -1
- package/dist/esm/nano-resize-observe_2.entry.js +4 -4
- package/dist/esm/nano-resize-observe_2.entry.js.map +1 -1
- package/dist/esm/nano-slide.entry.js +1 -1
- package/dist/esm/nano-slides.entry.js +11 -14
- package/dist/esm/nano-slides.entry.js.map +1 -1
- package/dist/esm/nano-spinner.entry.js +1 -1
- package/dist/esm/nano-spinner.entry.js.map +1 -1
- package/dist/esm/nano-split-pane.entry.js +1 -1
- package/dist/esm/nano-sticker.entry.js +1 -1
- package/dist/esm/nano-tab-content.entry.js +1 -1
- package/dist/esm/nano-tab-group.entry.js +4 -4
- package/dist/esm/nano-tab.entry.js +2 -2
- package/dist/esm/nano-tab.entry.js.map +1 -1
- package/dist/esm/{nano-table-e64af51e.js → nano-table-75d755ae.js} +4 -4
- package/dist/esm/{nano-table-e64af51e.js.map → nano-table-75d755ae.js.map} +1 -1
- package/dist/esm/nano-table.entry.js +3 -3
- package/dist/esm/{scroll-e5825d8d.js → scroll-952d292a.js} +15 -8
- package/dist/esm/scroll-952d292a.js.map +1 -0
- package/dist/esm/{table.worker-2f887b5f.js → table.worker-d60d6df4.js} +4 -4
- package/dist/esm/table.worker-d60d6df4.js.map +1 -0
- package/dist/esm/{transitions-71cca3ed.js → transitions-686c5fec.js} +3 -3
- package/dist/esm/transitions-686c5fec.js.map +1 -0
- package/dist/nano-components/nano-components.css +1 -1
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/nano-components.esm.js.map +1 -1
- package/dist/nano-components/{p-f25d2e90.entry.js → p-053eb1df.entry.js} +2 -2
- package/dist/nano-components/{p-ad3ddbc8.entry.js → p-068bdd89.entry.js} +2 -2
- package/dist/nano-components/{p-e4505f00.entry.js → p-0d1ca590.entry.js} +2 -2
- package/dist/nano-components/{p-ece694af.entry.js → p-104b7e3a.entry.js} +2 -2
- package/dist/nano-components/p-104b7e3a.entry.js.map +1 -0
- package/dist/nano-components/p-107d4549.entry.js +5 -0
- package/dist/nano-components/p-107d4549.entry.js.map +1 -0
- package/dist/nano-components/p-15217442.entry.js +5 -0
- package/dist/nano-components/p-15217442.entry.js.map +1 -0
- package/dist/nano-components/p-1b7bad31.entry.js +5 -0
- package/dist/nano-components/{p-93bece01.entry.js → p-1c6c94cb.entry.js} +2 -2
- package/dist/nano-components/{p-a9beb006.entry.js → p-207a1fbc.entry.js} +2 -2
- package/dist/nano-components/{p-d32dafd9.entry.js → p-239d343a.entry.js} +2 -2
- package/dist/nano-components/{p-d32dafd9.entry.js.map → p-239d343a.entry.js.map} +1 -1
- package/dist/nano-components/{p-dab8526f.entry.js → p-288dbe6b.entry.js} +2 -2
- package/dist/nano-components/{p-7b21ec0b.entry.js → p-30d55046.entry.js} +2 -2
- package/dist/nano-components/{p-add3ac22.js → p-42e7f253.js} +2 -2
- package/dist/nano-components/{p-378fe272.entry.js → p-57085052.entry.js} +2 -2
- package/dist/nano-components/{p-8f888280.entry.js → p-578f5e8d.entry.js} +2 -2
- package/dist/nano-components/{p-17eebe94.entry.js → p-583d8d70.entry.js} +2 -2
- package/dist/nano-components/p-583d8d70.entry.js.map +1 -0
- package/dist/nano-components/{p-6bb4545b.entry.js → p-5984ae16.entry.js} +2 -2
- package/dist/nano-components/{p-76d8a8a8.js → p-5ac74848.js} +2 -2
- package/dist/nano-components/{p-ebb61a70.entry.js → p-5d466a58.entry.js} +2 -2
- package/dist/nano-components/p-60a8c896.js +5 -0
- package/dist/nano-components/{p-e113074e.entry.js → p-68928c59.entry.js} +2 -2
- package/dist/nano-components/p-68928c59.entry.js.map +1 -0
- package/dist/nano-components/{p-3667832c.entry.js → p-7304107c.entry.js} +2 -2
- package/dist/nano-components/{p-16e45583.entry.js → p-76a650b1.entry.js} +2 -2
- package/dist/nano-components/{p-09751447.entry.js → p-7d6065c6.entry.js} +2 -2
- package/dist/nano-components/{p-07b6af21.entry.js → p-935aef3d.entry.js} +2 -2
- package/dist/nano-components/{p-8065d85b.entry.js → p-93cfbdb6.entry.js} +2 -2
- package/dist/nano-components/p-9dfe2c55.entry.js +5 -0
- package/dist/nano-components/{p-f486c940.entry.js.map → p-9dfe2c55.entry.js.map} +1 -1
- package/dist/nano-components/{p-b65e0e63.js → p-9ebbb814.js} +2 -2
- package/dist/nano-components/{p-a26a7de3.entry.js → p-a1c0afb6.entry.js} +2 -2
- package/dist/nano-components/{p-76ab079e.entry.js → p-a5a560e7.entry.js} +2 -2
- package/dist/nano-components/{p-9d1432be.js → p-a6ff5ca6.js} +2 -2
- package/dist/nano-components/{p-4bbb04d3.entry.js → p-a761ac89.entry.js} +2 -2
- package/dist/nano-components/p-a761ac89.entry.js.map +1 -0
- package/dist/nano-components/{p-62e3646b.entry.js → p-ac0ac58f.entry.js} +2 -2
- package/dist/nano-components/p-b2655717.entry.js +5 -0
- package/dist/nano-components/p-b2655717.entry.js.map +1 -0
- package/dist/nano-components/{p-63f1e229.entry.js → p-b6306aff.entry.js} +2 -2
- package/dist/nano-components/p-b6306aff.entry.js.map +1 -0
- package/dist/nano-components/{p-3e7153c8.entry.js → p-cba50c3e.entry.js} +2 -2
- package/dist/nano-components/{p-ce07df57.entry.js → p-cd2f5e97.entry.js} +2 -2
- package/dist/nano-components/p-d0e15e46.entry.js +5 -0
- package/dist/nano-components/p-d0e15e46.entry.js.map +1 -0
- package/dist/nano-components/p-d4cebdef.entry.js +5 -0
- package/dist/nano-components/p-d4cebdef.entry.js.map +1 -0
- package/dist/nano-components/{p-dc88e52b.entry.js → p-d792f692.entry.js} +2 -2
- package/dist/nano-components/p-d792f692.entry.js.map +1 -0
- package/dist/nano-components/p-d7c34990.js +5 -0
- package/dist/nano-components/{p-45b7682a.js.map → p-d7c34990.js.map} +1 -1
- package/dist/nano-components/p-d98c6a62.js +5 -0
- package/dist/nano-components/{p-3d27d563.entry.js → p-db370094.entry.js} +4 -4
- package/dist/nano-components/{p-3d27d563.entry.js.map → p-db370094.entry.js.map} +1 -1
- package/dist/nano-components/{p-47866646.entry.js → p-e41baa11.entry.js} +2 -2
- package/dist/nano-components/{p-9be2cba5.entry.js → p-e43f76c8.entry.js} +2 -2
- package/dist/nano-components/{p-7f545755.entry.js → p-eab09335.entry.js} +2 -2
- package/dist/nano-components/p-f471a392.entry.js +5 -0
- package/dist/nano-components/p-f471a392.entry.js.map +1 -0
- package/dist/nano-components/p-f6a8467a.js +6 -0
- package/dist/nano-components/p-f6a8467a.js.map +1 -0
- package/dist/nano-components/p-f6de2d5d.js +5 -0
- package/dist/nano-components/p-f6de2d5d.js.map +1 -0
- package/dist/nano-components/{p-a20d2028.entry.js → p-f93bd976.entry.js} +2 -2
- package/dist/nano-components/{p-36a2f1c0.entry.js → p-fe7a0158.entry.js} +2 -2
- package/dist/nano-components/{p-6a5ae656.entry.js → p-fecb72b9.entry.js} +2 -2
- package/dist/themes/nanopore.cn.css +1 -0
- package/dist/themes/nanopore.cn.css.map +1 -0
- package/dist/types/components/global-nav/global-nav.d.ts +2 -1
- package/dist/types/components/overflow-nav/overflow-nav.d.ts +78 -0
- package/dist/types/components/resize-observe/resize-observe.d.ts +4 -2
- package/dist/types/components.d.ts +90 -1
- package/dist/types/utils/transitions.d.ts +1 -1
- package/docs-json.json +299 -23
- package/docs-vscode.json +26 -1
- package/hydrate/index.js +431 -116
- package/package.json +3 -3
- package/dist/cjs/index-46286eea.js.map +0 -1
- package/dist/cjs/scroll-a197d9c4.js.map +0 -1
- package/dist/cjs/table.worker-f902766e.js.map +0 -1
- package/dist/cjs/transitions-5cd8f697.js.map +0 -1
- package/dist/esm/index-52b0408e.js.map +0 -1
- package/dist/esm/scroll-e5825d8d.js.map +0 -1
- package/dist/esm/table.worker-2f887b5f.js.map +0 -1
- package/dist/esm/transitions-71cca3ed.js.map +0 -1
- package/dist/nano-components/p-0e2f0040.entry.js +0 -5
- package/dist/nano-components/p-0e2f0040.entry.js.map +0 -1
- package/dist/nano-components/p-167b9165.js +0 -5
- package/dist/nano-components/p-167b9165.js.map +0 -1
- package/dist/nano-components/p-17eebe94.entry.js.map +0 -1
- package/dist/nano-components/p-1aff5304.entry.js +0 -5
- package/dist/nano-components/p-1aff5304.entry.js.map +0 -1
- package/dist/nano-components/p-45b7682a.js +0 -5
- package/dist/nano-components/p-4bbb04d3.entry.js.map +0 -1
- package/dist/nano-components/p-63f1e229.entry.js.map +0 -1
- package/dist/nano-components/p-6ef53fa1.js +0 -6
- package/dist/nano-components/p-6ef53fa1.js.map +0 -1
- package/dist/nano-components/p-7733f1f8.entry.js +0 -5
- package/dist/nano-components/p-7733f1f8.entry.js.map +0 -1
- package/dist/nano-components/p-80ddfa30.entry.js +0 -5
- package/dist/nano-components/p-80ecc273.entry.js +0 -5
- package/dist/nano-components/p-80ecc273.entry.js.map +0 -1
- package/dist/nano-components/p-a145fbc1.js +0 -5
- package/dist/nano-components/p-b4b55f64.entry.js +0 -5
- package/dist/nano-components/p-b4b55f64.entry.js.map +0 -1
- package/dist/nano-components/p-d518b939.js +0 -5
- package/dist/nano-components/p-dc88e52b.entry.js.map +0 -1
- package/dist/nano-components/p-e113074e.entry.js.map +0 -1
- package/dist/nano-components/p-ece694af.entry.js.map +0 -1
- package/dist/nano-components/p-f486c940.entry.js +0 -5
- /package/dist/nano-components/{p-f25d2e90.entry.js.map → p-053eb1df.entry.js.map} +0 -0
- /package/dist/nano-components/{p-ad3ddbc8.entry.js.map → p-068bdd89.entry.js.map} +0 -0
- /package/dist/nano-components/{p-e4505f00.entry.js.map → p-0d1ca590.entry.js.map} +0 -0
- /package/dist/nano-components/{p-80ddfa30.entry.js.map → p-1b7bad31.entry.js.map} +0 -0
- /package/dist/nano-components/{p-93bece01.entry.js.map → p-1c6c94cb.entry.js.map} +0 -0
- /package/dist/nano-components/{p-a9beb006.entry.js.map → p-207a1fbc.entry.js.map} +0 -0
- /package/dist/nano-components/{p-dab8526f.entry.js.map → p-288dbe6b.entry.js.map} +0 -0
- /package/dist/nano-components/{p-7b21ec0b.entry.js.map → p-30d55046.entry.js.map} +0 -0
- /package/dist/nano-components/{p-add3ac22.js.map → p-42e7f253.js.map} +0 -0
- /package/dist/nano-components/{p-378fe272.entry.js.map → p-57085052.entry.js.map} +0 -0
- /package/dist/nano-components/{p-8f888280.entry.js.map → p-578f5e8d.entry.js.map} +0 -0
- /package/dist/nano-components/{p-6bb4545b.entry.js.map → p-5984ae16.entry.js.map} +0 -0
- /package/dist/nano-components/{p-76d8a8a8.js.map → p-5ac74848.js.map} +0 -0
- /package/dist/nano-components/{p-ebb61a70.entry.js.map → p-5d466a58.entry.js.map} +0 -0
- /package/dist/nano-components/{p-d518b939.js.map → p-60a8c896.js.map} +0 -0
- /package/dist/nano-components/{p-3667832c.entry.js.map → p-7304107c.entry.js.map} +0 -0
- /package/dist/nano-components/{p-16e45583.entry.js.map → p-76a650b1.entry.js.map} +0 -0
- /package/dist/nano-components/{p-09751447.entry.js.map → p-7d6065c6.entry.js.map} +0 -0
- /package/dist/nano-components/{p-07b6af21.entry.js.map → p-935aef3d.entry.js.map} +0 -0
- /package/dist/nano-components/{p-8065d85b.entry.js.map → p-93cfbdb6.entry.js.map} +0 -0
- /package/dist/nano-components/{p-b65e0e63.js.map → p-9ebbb814.js.map} +0 -0
- /package/dist/nano-components/{p-a26a7de3.entry.js.map → p-a1c0afb6.entry.js.map} +0 -0
- /package/dist/nano-components/{p-76ab079e.entry.js.map → p-a5a560e7.entry.js.map} +0 -0
- /package/dist/nano-components/{p-9d1432be.js.map → p-a6ff5ca6.js.map} +0 -0
- /package/dist/nano-components/{p-62e3646b.entry.js.map → p-ac0ac58f.entry.js.map} +0 -0
- /package/dist/nano-components/{p-3e7153c8.entry.js.map → p-cba50c3e.entry.js.map} +0 -0
- /package/dist/nano-components/{p-ce07df57.entry.js.map → p-cd2f5e97.entry.js.map} +0 -0
- /package/dist/nano-components/{p-a145fbc1.js.map → p-d98c6a62.js.map} +0 -0
- /package/dist/nano-components/{p-47866646.entry.js.map → p-e41baa11.entry.js.map} +0 -0
- /package/dist/nano-components/{p-9be2cba5.entry.js.map → p-e43f76c8.entry.js.map} +0 -0
- /package/dist/nano-components/{p-7f545755.entry.js.map → p-eab09335.entry.js.map} +0 -0
- /package/dist/nano-components/{p-a20d2028.entry.js.map → p-f93bd976.entry.js.map} +0 -0
- /package/dist/nano-components/{p-36a2f1c0.entry.js.map → p-fe7a0158.entry.js.map} +0 -0
- /package/dist/nano-components/{p-6a5ae656.entry.js.map → p-fecb72b9.entry.js.map} +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["renderHiddenInput","container","name","value","disabled","input","querySelector","ownerDocument","createElement","type","classList","add","appendChild","rangeCss","Range","this","noUpdate","hasFocus","clampBounds","clamp","min","max","ensureValueInBounds","dualKnobs","lower","upper","handleKeyboard","knob","isIncrease","step","ratioA","ratioB","updateValue","onBlur","nanoBlur","emit","emitStyle","onFocus","nanoFocus","debounceChanged","nanoChange","debounceEvent","debounce","minChanged","updateRatio","maxChanged","disabledChanged","gesture","enable","valueChanged","connectedCallback","disconnectedCallback","destroy","undefined","async","rangeSlider","import","createGesture","el","gestureName","gesturePriority","threshold","onStart","ev","onMove","onEnd","getValue","nanoStyle","interactive","detail","rect","getBoundingClientRect","currentX","ratio","left","width","document","dir","pressedKnob","Math","abs","setFocus","update","snaps","valueToRatio","ratioToValue","valA","valB","ratioLower","ratioUpper","shadowRoot","knobEl","focus","render","pin","barStart","barEnd","doc","isRTL","start","end","tickStyle","tick","barStyle","ticks","active","push","JSON","stringify","h","Host","onFocusin","onFocusout","class","createColorClasses","color","ref","rangeEl","map","style","role","part","renderKnob","pressed","knobStyle","onKeyDown","key","preventDefault","stopPropagation","tabindex","round"],"sources":["./src/utils/form.ts","./src/components/range/range.scss?tag=nano-range&encapsulation=scoped","./src/components/range/range.tsx"],"sourcesContent":["export const renderHiddenInput = (\n container: HTMLElement,\n name: string,\n value: string | undefined | null,\n disabled: boolean\n) => {\n let input = container.querySelector(\n 'input.aux-input'\n ) as HTMLInputElement | null;\n if (!input) {\n input = container.ownerDocument!.createElement('input');\n input.type = 'hidden';\n input.classList.add('aux-input');\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value || '';\n};\n","@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/form';\n\n// Range\n// --------------------------------------------------\n\n:host {\n /**\n * @prop --knob-handle-size: defaults to calc(var(--knob-size) * 2);\n * @prop --rgb-inactive: defaults to #{color-to-rgb-list(#a5a5a5)};\n * @prop --bar-background: Background of the range bar; Defaults to #e2e1e0;\n * @prop --bar-background-active: Background of the active range bar; Defaults to #a5a5a5;\n * @prop --bar-height: Height of the range bar; Defaults to 8px;\n * @prop --bar-border-radius: Border radius of the range bar; Defaults to 4px;\n * @prop --height: Height of the range. Defaults to 42px;\n * @prop --knob-background: Background of the range knob. Defaults to #{nano-color(primary, base)};\n * @prop --knob-border-radius: Border radius of the range knob. Defaults to 50%;\n * @prop --knob-box-shadow: Box shadow of the range knob; Defaults to 0 2px 4px 0 rgb(0 0 0 / 30%);\n * @prop --knob-size: Size of the range knob; Defaults to 30px;\n * @prop --pin-background: Background of the range pin; Defaults to #{nano-color(primary, base)};\n * @prop --pin-color: Color of the range pin; Defaults to #{nano-color(primary, contrast)};\n * @prop --focus-style: Focus shadow around knob; Defaults to 0 0 0 5px #{$control-focus-color};\n */\n --knob-handle-size: (var(--knob-size) * 2);\n --rgb-inactive: #{color-to-rgb-list(#a5a5a5)};\n --knob-border-radius: 50%;\n --knob-background: #{nano-color(primary, base)};\n --knob-box-shadow: 0 2px 4px 0 rgb(0 0 0 / 30%);\n --knob-size: 30px;\n --bar-height: 8px;\n --bar-background: #e2e1e0;\n --bar-background-active: #a5a5a5;\n --bar-border-radius: 4px;\n --height: 42px;\n --pin-background: #{nano-color(primary, base)};\n --pin-color: #{nano-color(primary, contrast)};\n --focus-style: 0 0 0 5px #{$control-focus-color};\n}\n\n.range-wrap {\n display: flex;\n position: relative;\n flex: 3;\n align-items: center;\n user-select: none;\n\n ::slotted(ion-icon[slot]) {\n font-size: 1.5em;\n }\n\n ::slotted([slot='start']) {\n margin-inline: 0 14px;\n margin-block: 0;\n font-size: 0.9em;\n }\n\n ::slotted([slot='end']) {\n margin-inline: 14px 0;\n margin-block: 0;\n font-size: 0.9em;\n }\n}\n\n.range-slider {\n position: relative;\n flex: 1;\n width: 100%;\n height: var(--height);\n contain: size layout style;\n cursor: grab;\n touch-action: pan-y;\n}\n\n:host(.range-pressed) .range-slider {\n cursor: grabbing;\n}\n\n// bar\n\n.range-bar {\n border-radius: var(--bar-border-radius);\n inset-block-start: calc((var(--height) - var(--bar-height)) / 2);\n inset-inline-start: 0;\n position: absolute;\n width: 100%;\n height: var(--bar-height);\n background: var(--bar-background);\n pointer-events: none;\n\n :host(.range-snaps) & {\n border-radius: var(--bar-border-radius) 0 0 var(--bar-border-radius);\n }\n}\n\n.range-bar-active {\n inset-block-end: 0;\n width: auto;\n background: var(--bar-background-active);\n\n :host(.range-pressed) {\n will-change: left, right;\n }\n}\n\n// knob\n\n.range-knob {\n border-radius: var(--knob-border-radius);\n inset-block-start: calc(50% - var(--knob-size) / 2);\n inset-inline-start: calc(50% - var(--knob-size) / 2);\n position: absolute;\n width: var(--knob-size);\n height: var(--knob-size);\n background: var(--knob-background);\n box-shadow: var(--knob-box-shadow);\n z-index: 2;\n pointer-events: none;\n transform: scale(0.67);\n transition-duration: 120ms;\n transition-property: transform, background-color, border;\n transition-timing-function: ease;\n\n :host(:not(.range-has-pin)) .range-knob-pressed & {\n transform: scale(1);\n }\n}\n\n.range-knob-handle {\n inset-block-start: calc((var(--height) - var(--knob-handle-size)) / 2);\n inset-inline-start: 0;\n margin-inline-start: calc(0px - var(--knob-handle-size) / 2);\n position: absolute;\n width: calc(var(--knob-handle-size));\n height: calc(var(--knob-handle-size));\n text-align: center;\n\n &:active,\n &:focus {\n outline: none;\n\n .range-knob {\n box-shadow: var(--knob-box-shadow), var(--focus-style);\n }\n }\n}\n\n// ticks\n\n.range-tick {\n position: absolute;\n inset-block-start: calc((var(--height) - var(--bar-height)) / 2);\n width: var(--bar-height);\n height: var(--bar-height);\n background: var(--bar-background-active);\n z-index: 1;\n pointer-events: none;\n\n &:first-of-type {\n border-radius: var(--bar-border-radius) 0 0 var(--bar-border-radius);\n }\n\n &:last-of-type {\n border-radius: 0 var(--bar-border-radius) var(--bar-border-radius) 0;\n }\n\n &-active {\n background: transparent;\n }\n}\n\n// pin\n\n.range-pin {\n transform: translate3d(0, 0, 0) scale(0.01);\n transform-origin: center top;\n padding: 0.66em 0;\n border-radius: 50%;\n text-align: center;\n box-sizing: border-box;\n display: inline-block;\n position: relative;\n min-width: 2.33em;\n height: 2.33em;\n transition: transform 120ms ease, background 120ms ease;\n background: var(--pin-background);\n color: var(--pin-color);\n font-size: 0.75em;\n\n &::before {\n inset-block-start: 0.25em;\n inset-inline-start: 50%;\n margin-inline-start: -1.08em;\n border-radius: 50% 50% 50% 0;\n position: absolute;\n width: 2.16em;\n height: 2.16em;\n transform: rotate(-45deg);\n transition: background 120ms ease;\n background: var(--pin-background);\n content: '';\n z-index: -1;\n }\n\n .range-knob-pressed & {\n transform: translate3d(0, -50%, 0) scale(1);\n transform: translate3d(0, calc((100% - var(--bar-height)) * -1), 0) scale(1);\n }\n}\n\n// disabled\n\n:host(.range-disabled) {\n pointer-events: none;\n\n .range-bar-active,\n .range-bar,\n .range-tick {\n background-color: rgb(var(--rgb-inactive) / 50%);\n }\n\n .range-knob {\n transform: scale(0.55);\n outline: 5px solid #fff;\n background-color: rgb(var(--rgb-inactive) / 50%);\n }\n}\n\n// theme\n\n:host(.nano-color) {\n .range-bar-active,\n .range-knob,\n .range-pin,\n .range-pin::before,\n .range-tick {\n background: current-color(base);\n color: current-color(contrast);\n }\n\n .range-bar {\n background: current-color(base, 0.26);\n }\n\n .range-knob-handle {\n &:active,\n &:focus {\n .range-knob {\n box-shadow: var(--knob-box-shadow), 0 0 0 5px current-color(tint, 0.56);\n }\n }\n }\n}\n","import {\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n Host,\n Prop,\n State,\n Watch,\n h,\n} from '@stencil/core';\nimport { renderHiddenInput } from '../../utils/form';\nimport { clamp } from '../../utils/math';\nimport { createColorClasses } from '../../utils/theme';\nimport { debounceEvent } from '../../utils/throttle';\nimport type {\n Color,\n Gesture,\n GestureDetail,\n KnobName,\n RangeChangeEventDetail,\n RangeValue,\n StyleEventDetail,\n} from '../../interface';\n\n/**\n * The Range slider lets users select from a range of values by moving\n * the slider knob. It can accept dual knobs, but by default one knob controls the value of the range.\n *\n * Labels can be placed on either side of the range by adding the\n * `slot=\"start\"` or `slot=\"end\"` to the element.\n *\n * @slot start - Content is placed to the left of the range slider in LTR, and to the right in RTL.\n * @slot end - Content is placed to the right of the range slider in LTR, and to the left in RTL.\n */\n@Component({\n tag: 'nano-range',\n styleUrl: 'range.scss',\n scoped: true,\n})\nexport class Range implements ComponentInterface {\n private noUpdate = false;\n private rect!: ClientRect;\n private hasFocus = false;\n private rangeSlider?: HTMLElement;\n private gesture?: Gesture;\n\n @Element() el!: HTMLNanoRangeElement;\n\n @State() private ratioA = 0;\n @State() private ratioB = 0;\n @State() private pressedKnob: KnobName;\n\n /**\n * The color to use from your application's color palette.\n * Default options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`\n */\n @Prop() color?: Color;\n\n /**\n * How long, in milliseconds, to wait to trigger the\n * `nanoChange` event after each change in the range value.\n */\n @Prop() debounce = 0;\n\n @Watch('debounce')\n protected debounceChanged() {\n this.nanoChange = debounceEvent(this.nanoChange, this.debounce);\n }\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name = '';\n\n /**\n * Show two knobs.\n */\n @Prop() dualKnobs = false;\n\n /**\n * Minimum integer value of the range.\n */\n @Prop() min = 0;\n @Watch('min')\n protected minChanged() {\n if (!this.noUpdate) {\n this.updateRatio();\n }\n }\n\n /**\n * Maximum integer value of the range.\n */\n @Prop() max = 100;\n @Watch('max')\n protected maxChanged() {\n if (!this.noUpdate) {\n this.updateRatio();\n }\n }\n\n /**\n * If `true`, a pin with integer value is shown when the knob\n * is pressed.\n */\n @Prop() pin = false;\n\n /**\n * If `true`, the knob snaps to tick marks evenly spaced based\n * on the step property value.\n */\n @Prop() snaps = false;\n\n /**\n * Specifies the value granularity.\n */\n @Prop() step = 1;\n\n /**\n * If `true`, tick marks are displayed based on the step value.\n * Only applies when `snaps` is `true`.\n */\n @Prop() ticks = false;\n\n /**\n * If `true`, the user cannot interact with the range.\n */\n @Prop() disabled = false;\n @Watch('disabled')\n protected disabledChanged() {\n if (this.gesture) {\n this.gesture.enable(!this.disabled);\n }\n this.emitStyle();\n }\n\n /**\n * the value of the range.\n */\n @Prop({ mutable: true }) value: RangeValue = 0;\n @Watch('value')\n protected valueChanged(value: RangeValue) {\n if (!this.noUpdate) {\n this.updateRatio();\n }\n\n value = this.ensureValueInBounds(value);\n\n this.nanoChange.emit({ value });\n }\n\n private clampBounds = (value: any): number => {\n return clamp(this.min, value, this.max);\n };\n\n private ensureValueInBounds = (value: any) => {\n if (this.dualKnobs) {\n return {\n lower: this.clampBounds(value.lower),\n upper: this.clampBounds(value.upper),\n };\n } else {\n return this.clampBounds(value);\n }\n };\n\n /**\n * Emitted when the value property has changed.\n */\n @Event() nanoChange!: EventEmitter<RangeChangeEventDetail>;\n\n /**\n * Emitted when the styles change.\n * @internal\n */\n @Event() nanoStyle!: EventEmitter<StyleEventDetail>;\n\n /**\n * Emitted when the range has focus.\n */\n @Event() nanoFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the range loses focus.\n */\n @Event() nanoBlur!: EventEmitter<void>;\n\n connectedCallback() {\n this.updateRatio();\n this.debounceChanged();\n this.disabledChanged();\n }\n\n disconnectedCallback() {\n if (this.gesture) {\n this.gesture.destroy();\n this.gesture = undefined;\n }\n }\n\n async componentDidLoad() {\n const rangeSlider = this.rangeSlider;\n if (rangeSlider) {\n this.gesture = (await import('../../utils/gesture/index')).createGesture({\n el: rangeSlider,\n gestureName: 'range',\n gesturePriority: 100,\n threshold: 0,\n onStart: (ev) => this.onStart(ev),\n onMove: (ev) => this.onMove(ev),\n onEnd: (ev) => this.onEnd(ev),\n });\n this.gesture.enable(!this.disabled);\n }\n }\n\n private handleKeyboard = (knob: KnobName, isIncrease: boolean) => {\n let step = this.step;\n step = step > 0 ? step : 1;\n step = step / (this.max - this.min);\n if (!isIncrease) {\n step *= -1;\n }\n if (knob === 'A') {\n this.ratioA = clamp(0, this.ratioA + step, 1);\n } else {\n this.ratioB = clamp(0, this.ratioB + step, 1);\n }\n this.updateValue();\n };\n\n private getValue(): RangeValue {\n const value = this.value || 0;\n if (this.dualKnobs) {\n if (typeof value === 'object') {\n return value;\n }\n return {\n lower: 0,\n upper: value,\n };\n } else {\n if (typeof value === 'object') {\n return value.upper;\n }\n return value;\n }\n }\n\n private emitStyle() {\n this.nanoStyle.emit({\n interactive: true,\n 'interactive-disabled': this.disabled,\n });\n }\n\n private onStart(detail: GestureDetail) {\n const rect = (this.rect = this.rangeSlider!.getBoundingClientRect() as any);\n const currentX = detail.currentX;\n\n // figure out which knob they started closer to\n let ratio = clamp(0, (currentX - rect.left) / rect.width, 1);\n if (document.dir === 'rtl') {\n ratio = 1 - ratio;\n }\n\n this.pressedKnob =\n !this.dualKnobs ||\n Math.abs(this.ratioA - ratio) < Math.abs(this.ratioB - ratio)\n ? 'A'\n : 'B';\n\n this.setFocus(this.pressedKnob);\n\n // update the active knob's position\n this.update(currentX);\n }\n\n private onMove(detail: GestureDetail) {\n this.update(detail.currentX);\n }\n\n private onEnd(detail: GestureDetail) {\n this.update(detail.currentX);\n this.pressedKnob = undefined;\n }\n\n private update(currentX: number) {\n // figure out where the pointer is currently at\n // update the knob being interacted with\n const rect = this.rect;\n let ratio = clamp(0, (currentX - rect.left) / rect.width, 1);\n if (document.dir === 'rtl') {\n ratio = 1 - ratio;\n }\n\n if (this.snaps) {\n // snaps the ratio to the current value\n ratio = valueToRatio(\n ratioToValue(ratio, this.min, this.max, this.step),\n this.min,\n this.max\n );\n }\n\n // update which knob is pressed\n if (this.pressedKnob === 'A') {\n this.ratioA = ratio;\n } else {\n this.ratioB = ratio;\n }\n\n // Update input value\n this.updateValue();\n }\n\n private get valA() {\n return ratioToValue(this.ratioA, this.min, this.max, this.step);\n }\n\n private get valB() {\n return ratioToValue(this.ratioB, this.min, this.max, this.step);\n }\n\n private get ratioLower() {\n if (this.dualKnobs) {\n return Math.min(this.ratioA, this.ratioB);\n }\n return 0;\n }\n\n private get ratioUpper() {\n if (this.dualKnobs) {\n return Math.max(this.ratioA, this.ratioB);\n }\n return this.ratioA;\n }\n\n private updateRatio() {\n const value = this.getValue() as any;\n const { min, max } = this;\n if (this.dualKnobs) {\n this.ratioA = valueToRatio(value.lower, min, max);\n this.ratioB = valueToRatio(value.upper, min, max);\n } else {\n this.ratioA = valueToRatio(value, min, max);\n }\n }\n\n private updateValue() {\n this.noUpdate = true;\n\n const { valA, valB } = this;\n this.value = !this.dualKnobs\n ? valA\n : {\n lower: Math.min(valA, valB),\n upper: Math.max(valA, valB),\n };\n\n this.noUpdate = false;\n }\n\n private setFocus(knob: KnobName) {\n if (this.el.shadowRoot) {\n const knobEl = this.el.shadowRoot.querySelector(\n knob === 'A' ? '.range-knob-a' : '.range-knob-b'\n ) as HTMLElement | undefined;\n if (knobEl) {\n knobEl.focus();\n }\n }\n }\n\n private onBlur = () => {\n if (this.hasFocus) {\n this.hasFocus = false;\n this.nanoBlur.emit();\n this.emitStyle();\n }\n };\n\n private onFocus = () => {\n if (!this.hasFocus) {\n this.hasFocus = true;\n this.nanoFocus.emit();\n this.emitStyle();\n }\n };\n\n render() {\n const {\n min,\n max,\n step,\n el,\n handleKeyboard,\n pressedKnob,\n disabled,\n pin,\n ratioLower,\n ratioUpper,\n } = this;\n\n const barStart = `${ratioLower * 100}%`;\n const barEnd = `${100 - ratioUpper * 100}%`;\n\n const doc = document;\n const isRTL = doc.dir === 'rtl';\n const start = isRTL ? 'right' : 'left';\n const end = isRTL ? 'left' : 'right';\n\n const tickStyle = (tick: any) => {\n return {\n [start]: tick[start],\n };\n };\n\n const barStyle = {\n [start]: barStart,\n [end]: barEnd,\n };\n\n const ticks = [];\n if (this.snaps && this.ticks) {\n for (let value = min; value <= max; value += step) {\n const ratio = valueToRatio(value, min, max);\n\n const tick: any = {\n ratio,\n active: ratio >= ratioLower && ratio <= ratioUpper,\n };\n\n tick[start] = `${ratio * 100}%`;\n\n ticks.push(tick);\n }\n }\n\n renderHiddenInput(el, this.name, JSON.stringify(this.getValue()), disabled);\n\n return (\n <Host\n onFocusin={this.onFocus}\n onFocusout={this.onBlur}\n class={createColorClasses(this.color, {\n 'range-disabled': disabled,\n 'range-pressed': pressedKnob !== undefined,\n 'range-has-pin': pin,\n 'range-snaps': this.snaps,\n })}\n >\n <div class=\"range-wrap\">\n <slot name=\"start\"></slot>\n <div\n class=\"range-slider\"\n ref={(rangeEl) => (this.rangeSlider = rangeEl)}\n >\n {ticks.map((tick) => (\n <span\n style={tickStyle(tick)}\n role=\"presentation\"\n class={{\n 'range-tick': true,\n 'range-tick-active': tick.active,\n }}\n part={tick.active ? 'tick-active' : 'tick'}\n />\n ))}\n\n <div class=\"range-bar\" role=\"presentation\" part=\"bar\" />\n <div\n class=\"range-bar range-bar-active\"\n role=\"presentation\"\n style={barStyle}\n part=\"bar-active\"\n />\n\n {renderKnob(isRTL, {\n knob: 'A',\n pressed: pressedKnob === 'A',\n value: this.valA,\n ratio: this.ratioA,\n pin,\n disabled,\n handleKeyboard,\n min,\n max,\n })}\n\n {this.dualKnobs &&\n renderKnob(isRTL, {\n knob: 'B',\n pressed: pressedKnob === 'B',\n value: this.valB,\n ratio: this.ratioB,\n pin,\n disabled,\n handleKeyboard,\n min,\n max,\n })}\n </div>\n <slot name=\"end\"></slot>\n </div>\n </Host>\n );\n }\n}\n\ninterface RangeKnob {\n knob: KnobName;\n value: number;\n ratio: number;\n min: number;\n max: number;\n disabled: boolean;\n pressed: boolean;\n pin: boolean;\n\n handleKeyboard: (name: KnobName, isIncrease: boolean) => void;\n}\n\nconst renderKnob = (\n isRTL: boolean,\n {\n knob,\n value,\n ratio,\n min,\n max,\n disabled,\n pressed,\n pin,\n handleKeyboard,\n }: RangeKnob\n) => {\n const start = isRTL ? 'right' : 'left';\n\n const knobStyle = () => {\n const style: any = {};\n style[start] = `${ratio * 100}%`;\n return style;\n };\n\n return (\n <div\n onKeyDown={(ev: KeyboardEvent) => {\n const key = ev.key;\n if (key === 'ArrowLeft' || key === 'ArrowDown') {\n handleKeyboard(knob, false);\n ev.preventDefault();\n ev.stopPropagation();\n } else if (key === 'ArrowRight' || key === 'ArrowUp') {\n handleKeyboard(knob, true);\n ev.preventDefault();\n ev.stopPropagation();\n }\n }}\n class={{\n 'range-knob-handle': true,\n 'range-knob-a': knob === 'A',\n 'range-knob-b': knob === 'B',\n 'range-knob-pressed': pressed,\n 'range-knob-min': value === min,\n 'range-knob-max': value === max,\n }}\n style={knobStyle()}\n role=\"slider\"\n tabindex={disabled ? -1 : 0}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-disabled={disabled ? 'true' : null}\n aria-valuenow={value}\n >\n {pin && (\n <div class=\"range-pin\" role=\"presentation\" part=\"pin\">\n {Math.round(value)}\n </div>\n )}\n <div class=\"range-knob\" role=\"presentation\" part=\"knob\" />\n </div>\n );\n};\n\nconst ratioToValue = (\n ratio: number,\n min: number,\n max: number,\n step: number\n): number => {\n let value = (max - min) * ratio;\n if (step > 0) {\n value = Math.round(value / step) * step + min;\n }\n return clamp(min, value, max);\n};\n\nconst valueToRatio = (value: number, min: number, max: number): number => {\n return clamp(0, (value - min) / (max - min), 1);\n};\n"],"mappings":";;;4KAAO,MAAMA,EAAoB,CAC/BC,EACAC,EACAC,EACAC,KAEA,IAAIC,EAAQJ,EAAUK,cACpB,mBAEF,IAAKD,EAAO,CACVA,EAAQJ,EAAUM,cAAeC,cAAc,SAC/CH,EAAMI,KAAO,SACbJ,EAAMK,UAAUC,IAAI,aACpBV,EAAUW,YAAYP,E,CAExBA,EAAMD,SAAWA,EACjBC,EAAMH,KAAOA,EACbG,EAAMF,MAAQA,GAAS,EAAE,ECjB3B,MAAMU,EAAW,6jL,MCyCJC,EAAK,M,6KACRC,KAAAC,SAAW,MAEXD,KAAAE,SAAW,MA6GXF,KAAAG,YAAef,GACdgB,EAAMJ,KAAKK,IAAKjB,EAAOY,KAAKM,KAG7BN,KAAAO,oBAAuBnB,IAC7B,GAAIY,KAAKQ,UAAW,CAClB,MAAO,CACLC,MAAOT,KAAKG,YAAYf,EAAMqB,OAC9BC,MAAOV,KAAKG,YAAYf,EAAMsB,O,KAE3B,CACL,OAAOV,KAAKG,YAAYf,E,GAsDpBY,KAAAW,eAAiB,CAACC,EAAgBC,KACxC,IAAIC,EAAOd,KAAKc,KAChBA,EAAOA,EAAO,EAAIA,EAAO,EACzBA,EAAOA,GAAQd,KAAKM,IAAMN,KAAKK,KAC/B,IAAKQ,EAAY,CACfC,IAAS,C,CAEX,GAAIF,IAAS,IAAK,CAChBZ,KAAKe,OAASX,EAAM,EAAGJ,KAAKe,OAASD,EAAM,E,KACtC,CACLd,KAAKgB,OAASZ,EAAM,EAAGJ,KAAKgB,OAASF,EAAM,E,CAE7Cd,KAAKiB,aAAa,EAkJZjB,KAAAkB,OAAS,KACf,GAAIlB,KAAKE,SAAU,CACjBF,KAAKE,SAAW,MAChBF,KAAKmB,SAASC,OACdpB,KAAKqB,W,GAIDrB,KAAAsB,QAAU,KAChB,IAAKtB,KAAKE,SAAU,CAClBF,KAAKE,SAAW,KAChBF,KAAKuB,UAAUH,OACfpB,KAAKqB,W,eAlViB,E,YACA,E,8DAaP,E,UAUJ,G,eAKK,M,SAKN,E,SAWA,I,SAYA,M,WAME,M,UAKD,E,WAMC,M,cAKG,M,WAY0B,C,CA1EnCG,kBACRxB,KAAKyB,WAAaC,EAAc1B,KAAKyB,WAAYzB,KAAK2B,S,CAkB9CC,aACR,IAAK5B,KAAKC,SAAU,CAClBD,KAAK6B,a,EASCC,aACR,IAAK9B,KAAKC,SAAU,CAClBD,KAAK6B,a,EAgCCE,kBACR,GAAI/B,KAAKgC,QAAS,CAChBhC,KAAKgC,QAAQC,QAAQjC,KAAKX,S,CAE5BW,KAAKqB,W,CAQGa,aAAa9C,GACrB,IAAKY,KAAKC,SAAU,CAClBD,KAAK6B,a,CAGPzC,EAAQY,KAAKO,oBAAoBnB,GAEjCY,KAAKyB,WAAWL,KAAK,CAAEhC,S,CAuCzB+C,oBACEnC,KAAK6B,cACL7B,KAAKwB,kBACLxB,KAAK+B,iB,CAGPK,uBACE,GAAIpC,KAAKgC,QAAS,CAChBhC,KAAKgC,QAAQK,UACbrC,KAAKgC,QAAUM,S,EAInBC,yBACE,MAAMC,EAAcxC,KAAKwC,YACzB,GAAIA,EAAa,CACfxC,KAAKgC,eAAiBS,OAAO,oBAA8BC,cAAc,CACvEC,GAAIH,EACJI,YAAa,QACbC,gBAAiB,IACjBC,UAAW,EACXC,QAAUC,GAAOhD,KAAK+C,QAAQC,GAC9BC,OAASD,GAAOhD,KAAKiD,OAAOD,GAC5BE,MAAQF,GAAOhD,KAAKkD,MAAMF,KAE5BhD,KAAKgC,QAAQC,QAAQjC,KAAKX,S,EAmBtB8D,WACN,MAAM/D,EAAQY,KAAKZ,OAAS,EAC5B,GAAIY,KAAKQ,UAAW,CAClB,UAAWpB,IAAU,SAAU,CAC7B,OAAOA,C,CAET,MAAO,CACLqB,MAAO,EACPC,MAAOtB,E,KAEJ,CACL,UAAWA,IAAU,SAAU,CAC7B,OAAOA,EAAMsB,K,CAEf,OAAOtB,C,EAIHiC,YACNrB,KAAKoD,UAAUhC,KAAK,CAClBiC,YAAa,KACb,uBAAwBrD,KAAKX,U,CAIzB0D,QAAQO,GACd,MAAMC,EAAQvD,KAAKuD,KAAOvD,KAAKwC,YAAagB,wBAC5C,MAAMC,EAAWH,EAAOG,SAGxB,IAAIC,EAAQtD,EAAM,GAAIqD,EAAWF,EAAKI,MAAQJ,EAAKK,MAAO,GAC1D,GAAIC,SAASC,MAAQ,MAAO,CAC1BJ,EAAQ,EAAIA,C,CAGd1D,KAAK+D,aACF/D,KAAKQ,WACNwD,KAAKC,IAAIjE,KAAKe,OAAS2C,GAASM,KAAKC,IAAIjE,KAAKgB,OAAS0C,GACnD,IACA,IAEN1D,KAAKkE,SAASlE,KAAK+D,aAGnB/D,KAAKmE,OAAOV,E,CAGNR,OAAOK,GACbtD,KAAKmE,OAAOb,EAAOG,S,CAGbP,MAAMI,GACZtD,KAAKmE,OAAOb,EAAOG,UACnBzD,KAAK+D,YAAczB,S,CAGb6B,OAAOV,GAGb,MAAMF,EAAOvD,KAAKuD,KAClB,IAAIG,EAAQtD,EAAM,GAAIqD,EAAWF,EAAKI,MAAQJ,EAAKK,MAAO,GAC1D,GAAIC,SAASC,MAAQ,MAAO,CAC1BJ,EAAQ,EAAIA,C,CAGd,GAAI1D,KAAKoE,MAAO,CAEdV,EAAQW,EACNC,EAAaZ,EAAO1D,KAAKK,IAAKL,KAAKM,IAAKN,KAAKc,MAC7Cd,KAAKK,IACLL,KAAKM,I,CAKT,GAAIN,KAAK+D,cAAgB,IAAK,CAC5B/D,KAAKe,OAAS2C,C,KACT,CACL1D,KAAKgB,OAAS0C,C,CAIhB1D,KAAKiB,a,CAGKsD,WACV,OAAOD,EAAatE,KAAKe,OAAQf,KAAKK,IAAKL,KAAKM,IAAKN,KAAKc,K,CAGhD0D,WACV,OAAOF,EAAatE,KAAKgB,OAAQhB,KAAKK,IAAKL,KAAKM,IAAKN,KAAKc,K,CAGhD2D,iBACV,GAAIzE,KAAKQ,UAAW,CAClB,OAAOwD,KAAK3D,IAAIL,KAAKe,OAAQf,KAAKgB,O,CAEpC,OAAO,C,CAGG0D,iBACV,GAAI1E,KAAKQ,UAAW,CAClB,OAAOwD,KAAK1D,IAAIN,KAAKe,OAAQf,KAAKgB,O,CAEpC,OAAOhB,KAAKe,M,CAGNc,cACN,MAAMzC,EAAQY,KAAKmD,WACnB,MAAM9C,IAAEA,EAAGC,IAAEA,GAAQN,KACrB,GAAIA,KAAKQ,UAAW,CAClBR,KAAKe,OAASsD,EAAajF,EAAMqB,MAAOJ,EAAKC,GAC7CN,KAAKgB,OAASqD,EAAajF,EAAMsB,MAAOL,EAAKC,E,KACxC,CACLN,KAAKe,OAASsD,EAAajF,EAAOiB,EAAKC,E,EAInCW,cACNjB,KAAKC,SAAW,KAEhB,MAAMsE,KAAEA,EAAIC,KAAEA,GAASxE,KACvBA,KAAKZ,OAASY,KAAKQ,UACf+D,EACA,CACE9D,MAAOuD,KAAK3D,IAAIkE,EAAMC,GACtB9D,MAAOsD,KAAK1D,IAAIiE,EAAMC,IAG5BxE,KAAKC,SAAW,K,CAGViE,SAAStD,GACf,GAAIZ,KAAK2C,GAAGgC,WAAY,CACtB,MAAMC,EAAS5E,KAAK2C,GAAGgC,WAAWpF,cAChCqB,IAAS,IAAM,gBAAkB,iBAEnC,GAAIgE,EAAQ,CACVA,EAAOC,O,GAqBbC,SACE,MAAMzE,IACJA,EAAGC,IACHA,EAAGQ,KACHA,EAAI6B,GACJA,EAAEhC,eACFA,EAAcoD,YACdA,EAAW1E,SACXA,EAAQ0F,IACRA,EAAGN,WACHA,EAAUC,WACVA,GACE1E,KAEJ,MAAMgF,EAAW,GAAGP,EAAa,OACjC,MAAMQ,EAAS,GAAG,IAAMP,EAAa,OAErC,MAAMQ,EAAMrB,SACZ,MAAMsB,EAAQD,EAAIpB,MAAQ,MAC1B,MAAMsB,EAAQD,EAAQ,QAAU,OAChC,MAAME,EAAMF,EAAQ,OAAS,QAE7B,MAAMG,EAAaC,IACV,CACLH,CAACA,GAAQG,EAAKH,KAIlB,MAAMI,EAAW,CACfJ,CAACA,GAAQJ,EACTK,CAACA,GAAMJ,GAGT,MAAMQ,EAAQ,GACd,GAAIzF,KAAKoE,OAASpE,KAAKyF,MAAO,CAC5B,IAAK,IAAIrG,EAAQiB,EAAKjB,GAASkB,EAAKlB,GAAS0B,EAAM,CACjD,MAAM4C,EAAQW,EAAajF,EAAOiB,EAAKC,GAEvC,MAAMiF,EAAY,CAChB7B,QACAgC,OAAQhC,GAASe,GAAcf,GAASgB,GAG1Ca,EAAKH,GAAS,GAAG1B,EAAQ,OAEzB+B,EAAME,KAAKJ,E,EAIftG,EAAkB0D,EAAI3C,KAAKb,KAAMyG,KAAKC,UAAU7F,KAAKmD,YAAa9D,GAElE,OACEyG,EAACC,EAAI,CACHC,UAAWhG,KAAKsB,QAChB2E,WAAYjG,KAAKkB,OACjBgF,MAAOC,EAAmBnG,KAAKoG,MAAO,CACpC,iBAAkB/G,EAClB,gBAAiB0E,IAAgBzB,UACjC,gBAAiByC,EACjB,cAAe/E,KAAKoE,SAGtB0B,EAAA,OAAKI,MAAM,cACTJ,EAAA,QAAM3G,KAAK,UACX2G,EAAA,OACEI,MAAM,eACNG,IAAMC,GAAatG,KAAKwC,YAAc8D,GAErCb,EAAMc,KAAKhB,GACVO,EAAA,QACEU,MAAOlB,EAAUC,GACjBkB,KAAK,eACLP,MAAO,CACL,aAAc,KACd,oBAAqBX,EAAKG,QAE5BgB,KAAMnB,EAAKG,OAAS,cAAgB,WAIxCI,EAAA,OAAKI,MAAM,YAAYO,KAAK,eAAeC,KAAK,QAChDZ,EAAA,OACEI,MAAM,6BACNO,KAAK,eACLD,MAAOhB,EACPkB,KAAK,eAGNC,EAAWxB,EAAO,CACjBvE,KAAM,IACNgG,QAAS7C,IAAgB,IACzB3E,MAAOY,KAAKuE,KACZb,MAAO1D,KAAKe,OACZgE,MACA1F,WACAsB,iBACAN,MACAC,QAGDN,KAAKQ,WACJmG,EAAWxB,EAAO,CAChBvE,KAAM,IACNgG,QAAS7C,IAAgB,IACzB3E,MAAOY,KAAKwE,KACZd,MAAO1D,KAAKgB,OACZ+D,MACA1F,WACAsB,iBACAN,MACAC,SAGNwF,EAAA,QAAM3G,KAAK,S,gLAoBrB,MAAMwH,EAAa,CACjBxB,GAEEvE,OACAxB,QACAsE,QACArD,MACAC,MACAjB,WACAuH,UACA7B,MACApE,qBAGF,MAAMyE,EAAQD,EAAQ,QAAU,OAEhC,MAAM0B,EAAY,KAChB,MAAML,EAAa,GACnBA,EAAMpB,GAAS,GAAG1B,EAAQ,OAC1B,OAAO8C,CAAK,EAGd,OACEV,EAAA,OACEgB,UAAY9D,IACV,MAAM+D,EAAM/D,EAAG+D,IACf,GAAIA,IAAQ,aAAeA,IAAQ,YAAa,CAC9CpG,EAAeC,EAAM,OACrBoC,EAAGgE,iBACHhE,EAAGiE,iB,MACE,GAAIF,IAAQ,cAAgBA,IAAQ,UAAW,CACpDpG,EAAeC,EAAM,MACrBoC,EAAGgE,iBACHhE,EAAGiE,iB,GAGPf,MAAO,CACL,oBAAqB,KACrB,eAAgBtF,IAAS,IACzB,eAAgBA,IAAS,IACzB,qBAAsBgG,EACtB,iBAAkBxH,IAAUiB,EAC5B,iBAAkBjB,IAAUkB,GAE9BkG,MAAOK,IACPJ,KAAK,SACLS,SAAU7H,GAAY,EAAI,EAAC,gBACZgB,EAAG,gBACHC,EAAG,gBACHjB,EAAW,OAAS,KAAI,gBACxBD,GAEd2F,GACCe,EAAA,OAAKI,MAAM,YAAYO,KAAK,eAAeC,KAAK,OAC7C1C,KAAKmD,MAAM/H,IAGhB0G,EAAA,OAAKI,MAAM,aAAaO,KAAK,eAAeC,KAAK,SAC7C,EAIV,MAAMpC,EAAe,CACnBZ,EACArD,EACAC,EACAQ,KAEA,IAAI1B,GAASkB,EAAMD,GAAOqD,EAC1B,GAAI5C,EAAO,EAAG,CACZ1B,EAAQ4E,KAAKmD,MAAM/H,EAAQ0B,GAAQA,EAAOT,C,CAE5C,OAAOD,EAAMC,EAAKjB,EAAOkB,EAAI,EAG/B,MAAM+D,EAAe,CAACjF,EAAeiB,EAAaC,IACzCF,EAAM,GAAIhB,EAAQiB,IAAQC,EAAMD,GAAM,G"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/*!
|
2
|
+
* Web Components for Nanopore digital Web Apps
|
3
|
+
*/
|
4
|
+
import{a as t}from"./p-257432ff.js";const o=new Set;function s(t){o.add(t);document.body.classList.add("nano-scroll-lock")}function n(t){o.delete(t);if(o.size===0){document.body.classList.remove("nano-scroll-lock")}}function c(t,o,s=false){if(!s){try{t.scrollTo({left:o,behavior:"smooth"})}catch(s){t.scrollLeft=o}return}try{t.scrollTo({top:o,behavior:"smooth"})}catch(s){t.scrollTop=o}}function e(o,s,n="vertical",e="start"){const i=t(o,s);const r=i.top+s.scrollTop;const f=i.left+s.scrollLeft;const a=s.scrollLeft;const l=s.scrollLeft+s.offsetWidth;const u=s.scrollTop;const h=s.scrollTop+s.offsetHeight;if(n==="horizontal"||n==="both"){if(e==="start"){if(f<a)c(s,f);else if(f+o.clientWidth>l)c(s,f-s.offsetWidth+o.clientWidth)}else{c(s,s.scrollLeft+i.left-(s.offsetWidth/2+o.offsetWidth/2))}}if(n==="vertical"||n==="both"){if(e==="start"){if(r<u)c(s,r,true);else if(r+o.clientHeight>h){c(s,r-s.offsetHeight+o.clientHeight,true)}}else{c(s,s.scrollTop+i.top-(s.offsetHeight/2+o.offsetHeight/2),true)}}}export{s as l,e as s,n as u};
|
5
|
+
//# sourceMappingURL=p-d7c34990.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["locks","Set","lockBodyScrolling","lockingEl","add","document","body","classList","unlockBodyScrolling","delete","size","remove","scrollTo","element","scrollAmt","vertical","left","behavior","e","scrollLeft","top","scrollTop","scrollIntoView","container","direction","position","offset","getOffset","offsetTop","offsetLeft","minX","maxX","offsetWidth","minY","maxY","offsetHeight","clientWidth","clientHeight"],"sources":["./src/utils/scroll.ts"],"sourcesContent":["import { getOffset } from './dom';\n\nconst locks = new Set();\n\n/**\n * Prevents body scrolling. Keeps track of which elements requested a lock so multiple levels of locking are possible\n * without premature unlocking.\n */\nexport function lockBodyScrolling(lockingEl: HTMLElement) {\n locks.add(lockingEl);\n document.body.classList.add('nano-scroll-lock');\n}\n\n/**\n * Unlocks body scrolling. Scrolling will only be unlocked once all elements that requested a lock call this method.\n */\nexport function unlockBodyScrolling(lockingEl: HTMLElement) {\n locks.delete(lockingEl);\n\n if (locks.size === 0) {\n document.body.classList.remove('nano-scroll-lock');\n }\n}\n\nfunction scrollTo(\n element: HTMLElement,\n scrollAmt: number,\n vertical: boolean = false\n) {\n if (!vertical) {\n try {\n element.scrollTo({ left: scrollAmt, behavior: 'smooth' });\n } catch (e) {\n element.scrollLeft = scrollAmt;\n }\n return;\n }\n try {\n element.scrollTo({ top: scrollAmt, behavior: 'smooth' });\n } catch (e) {\n element.scrollTop = scrollAmt;\n }\n}\n\n/**\n * Scrolls an element into view of its container. If the element is already in view, nothing will happen.\n */\nexport function scrollIntoView(\n element: HTMLElement,\n container: HTMLElement,\n direction: 'horizontal' | 'vertical' | 'both' = 'vertical',\n position: 'center' | 'start' = 'start'\n) {\n const offset = getOffset(element, container);\n const offsetTop = offset.top + container.scrollTop;\n const offsetLeft = offset.left + container.scrollLeft;\n const minX = container.scrollLeft;\n const maxX = container.scrollLeft + container.offsetWidth;\n const minY = container.scrollTop;\n const maxY = container.scrollTop + container.offsetHeight;\n\n if (direction === 'horizontal' || direction === 'both') {\n if (position === 'start') {\n if (offsetLeft < minX) scrollTo(container, offsetLeft);\n else if (offsetLeft + element.clientWidth > maxX)\n scrollTo(\n container,\n offsetLeft - container.offsetWidth + element.clientWidth\n );\n } else\n scrollTo(\n container,\n container.scrollLeft +\n offset.left -\n container.offsetWidth / 2
|
1
|
+
{"version":3,"names":["locks","Set","lockBodyScrolling","lockingEl","add","document","body","classList","unlockBodyScrolling","delete","size","remove","scrollTo","element","scrollAmt","vertical","left","behavior","e","scrollLeft","top","scrollTop","scrollIntoView","container","direction","position","offset","getOffset","offsetTop","offsetLeft","minX","maxX","offsetWidth","minY","maxY","offsetHeight","clientWidth","clientHeight"],"sources":["./src/utils/scroll.ts"],"sourcesContent":["import { getOffset } from './dom';\n\nconst locks = new Set();\n\n/**\n * Prevents body scrolling. Keeps track of which elements requested a lock so multiple levels of locking are possible\n * without premature unlocking.\n */\nexport function lockBodyScrolling(lockingEl: HTMLElement) {\n locks.add(lockingEl);\n document.body.classList.add('nano-scroll-lock');\n}\n\n/**\n * Unlocks body scrolling. Scrolling will only be unlocked once all elements that requested a lock call this method.\n */\nexport function unlockBodyScrolling(lockingEl: HTMLElement) {\n locks.delete(lockingEl);\n\n if (locks.size === 0) {\n document.body.classList.remove('nano-scroll-lock');\n }\n}\n\nfunction scrollTo(\n element: HTMLElement,\n scrollAmt: number,\n vertical: boolean = false\n) {\n if (!vertical) {\n try {\n element.scrollTo({ left: scrollAmt, behavior: 'smooth' });\n } catch (e) {\n element.scrollLeft = scrollAmt;\n }\n return;\n }\n try {\n element.scrollTo({ top: scrollAmt, behavior: 'smooth' });\n } catch (e) {\n element.scrollTop = scrollAmt;\n }\n}\n\n/**\n * Scrolls an element into view of its container. If the element is already in view, nothing will happen.\n */\nexport function scrollIntoView(\n element: HTMLElement,\n container: HTMLElement,\n direction: 'horizontal' | 'vertical' | 'both' = 'vertical',\n position: 'center' | 'start' = 'start'\n) {\n const offset = getOffset(element, container);\n const offsetTop = offset.top + container.scrollTop;\n const offsetLeft = offset.left + container.scrollLeft;\n const minX = container.scrollLeft;\n const maxX = container.scrollLeft + container.offsetWidth;\n const minY = container.scrollTop;\n const maxY = container.scrollTop + container.offsetHeight;\n\n if (direction === 'horizontal' || direction === 'both') {\n if (position === 'start') {\n if (offsetLeft < minX) scrollTo(container, offsetLeft);\n else if (offsetLeft + element.clientWidth > maxX)\n scrollTo(\n container,\n offsetLeft - container.offsetWidth + element.clientWidth\n );\n } else {\n scrollTo(\n container,\n container.scrollLeft +\n offset.left -\n (container.offsetWidth / 2 + element.offsetWidth / 2)\n );\n }\n }\n\n if (direction === 'vertical' || direction === 'both') {\n if (position === 'start') {\n if (offsetTop < minY) scrollTo(container, offsetTop, true);\n else if (offsetTop + element.clientHeight > maxY) {\n scrollTo(\n container,\n offsetTop - container.offsetHeight + element.clientHeight,\n true\n );\n }\n } else {\n scrollTo(\n container,\n container.scrollTop +\n offset.top -\n (container.offsetHeight / 2 + element.offsetHeight / 2),\n true\n );\n }\n }\n}\n"],"mappings":";;;oCAEA,MAAMA,EAAQ,IAAIC,I,SAMFC,EAAkBC,GAChCH,EAAMI,IAAID,GACVE,SAASC,KAAKC,UAAUH,IAAI,mBAC9B,C,SAKgBI,EAAoBL,GAClCH,EAAMS,OAAON,GAEb,GAAIH,EAAMU,OAAS,EAAG,CACpBL,SAASC,KAAKC,UAAUI,OAAO,mB,CAEnC,CAEA,SAASC,EACPC,EACAC,EACAC,EAAoB,OAEpB,IAAKA,EAAU,CACb,IACEF,EAAQD,SAAS,CAAEI,KAAMF,EAAWG,SAAU,U,CAC9C,MAAOC,GACPL,EAAQM,WAAaL,C,CAEvB,M,CAEF,IACED,EAAQD,SAAS,CAAEQ,IAAKN,EAAWG,SAAU,U,CAC7C,MAAOC,GACPL,EAAQQ,UAAYP,C,CAExB,C,SAKgBQ,EACdT,EACAU,EACAC,EAAgD,WAChDC,EAA+B,SAE/B,MAAMC,EAASC,EAAUd,EAASU,GAClC,MAAMK,EAAYF,EAAON,IAAMG,EAAUF,UACzC,MAAMQ,EAAaH,EAAOV,KAAOO,EAAUJ,WAC3C,MAAMW,EAAOP,EAAUJ,WACvB,MAAMY,EAAOR,EAAUJ,WAAaI,EAAUS,YAC9C,MAAMC,EAAOV,EAAUF,UACvB,MAAMa,EAAOX,EAAUF,UAAYE,EAAUY,aAE7C,GAAIX,IAAc,cAAgBA,IAAc,OAAQ,CACtD,GAAIC,IAAa,QAAS,CACxB,GAAII,EAAaC,EAAMlB,EAASW,EAAWM,QACtC,GAAIA,EAAahB,EAAQuB,YAAcL,EAC1CnB,EACEW,EACAM,EAAaN,EAAUS,YAAcnB,EAAQuB,Y,KAE5C,CACLxB,EACEW,EACAA,EAAUJ,WACRO,EAAOV,MACNO,EAAUS,YAAc,EAAInB,EAAQmB,YAAc,G,EAK3D,GAAIR,IAAc,YAAcA,IAAc,OAAQ,CACpD,GAAIC,IAAa,QAAS,CACxB,GAAIG,EAAYK,EAAMrB,EAASW,EAAWK,EAAW,WAChD,GAAIA,EAAYf,EAAQwB,aAAeH,EAAM,CAChDtB,EACEW,EACAK,EAAYL,EAAUY,aAAetB,EAAQwB,aAC7C,K,MAGC,CACLzB,EACEW,EACAA,EAAUF,UACRK,EAAON,KACNG,EAAUY,aAAe,EAAItB,EAAQsB,aAAe,GACvD,K,EAIR,Q"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/*!
|
2
|
+
* Web Components for Nanopore digital Web Apps
|
3
|
+
*/
|
4
|
+
import{c as t}from"./p-42e7f253.js";import"./p-f6a8467a.js";import"./p-ee045579.js";import"./p-9746b0a5.js";import"./p-9ebbb814.js";const o="table.worker";const p="stencil.table.worker";const s=new URL("p-e2f9ccfa.js",import.meta.url).href;const e=new Blob(['importScripts("'+s+'")'],{type:"text/javascript"});const r=URL.createObjectURL(e);const c=t(r,o,p);URL.revokeObjectURL(r);export{c as worker,p as workerMsgId,o as workerName,s as workerPath};
|
5
|
+
//# sourceMappingURL=p-d98c6a62.js.map
|
@@ -1,13 +1,13 @@
|
|
1
1
|
/*!
|
2
2
|
* Web Components for Nanopore digital Web Apps
|
3
3
|
*/
|
4
|
-
import{r as t,c as i,h as s,a as n,g as h}from"./p-
|
4
|
+
import{r as t,c as i,h as s,a as n,g as h}from"./p-f6a8467a.js";import{c as e,a as r}from"./p-69a3e911.js";var a=e((function(t){(function(i,s){if(t.exports){t.exports=s()}else{i.EvEmitter=s()}})(typeof window!="undefined"?window:r,(function(){function t(){}var i=t.prototype;i.on=function(t,i){if(!t||!i){return}var s=this._events=this._events||{};var n=s[t]=s[t]||[];if(n.indexOf(i)==-1){n.push(i)}return this};i.once=function(t,i){if(!t||!i){return}this.on(t,i);var s=this._onceEvents=this._onceEvents||{};var n=s[t]=s[t]||{};n[i]=true;return this};i.off=function(t,i){var s=this._events&&this._events[t];if(!s||!s.length){return}var n=s.indexOf(i);if(n!=-1){s.splice(n,1)}return this};i.emitEvent=function(t,i){var s=this._events&&this._events[t];if(!s||!s.length){return}s=s.slice(0);i=i||[];var n=this._onceEvents&&this._onceEvents[t];for(var h=0;h<s.length;h++){var e=s[h];var r=n&&n[e];if(r){this.off(t,e);delete n[e]}e.apply(this,i)}return this};i.allOff=function(){delete this._events;delete this._onceEvents};return t}))}));var o=e((function(t){
|
5
5
|
/*!
|
6
6
|
* getSize v2.0.3
|
7
7
|
* measure size of elements
|
8
8
|
* MIT license
|
9
9
|
*/
|
10
|
-
(function(i,s){if(t.exports){t.exports=s()}else{i.getSize=s()}})(window,(function t(){function i(t){var i=parseFloat(t);var s=t.indexOf("%")==-1&&!isNaN(i);return s&&i}function s(){}var n=typeof console=="undefined"?s:function(t){console.error(t)};var h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];var e=h.length;function r(){var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(var i=0;i<e;i++){var s=h[i];t[s]=0}return t}function a(t){var i=getComputedStyle(t);if(!i){n("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? "+"See https://bit.ly/getsizebug1")}return i}var o=false;var c;function f(){if(o){return}o=true;var t=document.createElement("div");t.style.width="200px";t.style.padding="1px 2px 3px 4px";t.style.borderStyle="solid";t.style.borderWidth="1px 2px 3px 4px";t.style.boxSizing="border-box";var s=document.body||document.documentElement;s.appendChild(t);var n=a(t);c=Math.round(i(n.width))==200;u.isBoxSizeOuter=c;s.removeChild(t)}function u(t){f();if(typeof t=="string"){t=document.querySelector(t)}if(!t||typeof t!="object"||!t.nodeType){return}var s=a(t);if(s.display=="none"){return r()}var n={};n.width=t.offsetWidth;n.height=t.offsetHeight;var o=n.isBorderBox=s.boxSizing=="border-box";for(var u=0;u<e;u++){var l=h[u];var v=s[l];var d=parseFloat(v);n[l]=!isNaN(d)?d:0}var y=n.paddingLeft+n.paddingRight;var p=n.paddingTop+n.paddingBottom;var b=n.marginLeft+n.marginRight;var g=n.marginTop+n.marginBottom;var k=n.borderLeftWidth+n.borderRightWidth;var w=n.borderTopWidth+n.borderBottomWidth;var m=o&&c;var x=i(s.width);if(x!==false){n.width=x+(m?0:y+k)}var z=i(s.height);if(z!==false){n.height=z+(m?0:p+w)}n.innerWidth=n.width-(y+k);n.innerHeight=n.height-(p+w);n.outerWidth=n.width+b;n.outerHeight=n.height+g;return n}return u}))}));var c=e((function(t){(function(i,s){if(t.exports){t.exports=s()}else{i.matchesSelector=s()}})(window,(function t(){var i=function(){var t=window.Element.prototype;if(t.matches){return"matches"}if(t.matchesSelector){return"matchesSelector"}var i=["webkit","moz","ms","o"];for(var s=0;s<i.length;s++){var n=i[s];var h=n+"MatchesSelector";if(t[h]){return h}}}();return function t(s,n){return s[i](n)}}))}));var f=e((function(t){(function(i,s){if(t.exports){t.exports=s(i,c)}else{i.fizzyUIUtils=s(i,i.matchesSelector)}})(window,(function t(i,s){var n={};n.extend=function(t,i){for(var s in i){t[s]=i[s]}return t};n.modulo=function(t,i){return(t%i+i)%i};var h=Array.prototype.slice;n.makeArray=function(t){if(Array.isArray(t)){return t}if(t===null||t===undefined){return[]}var i=typeof t=="object"&&typeof t.length=="number";if(i){return h.call(t)}return[t]};n.removeFrom=function(t,i){var s=t.indexOf(i);if(s!=-1){t.splice(s,1)}};n.getParent=function(t,i){while(t.parentNode&&t!=document.body){t=t.parentNode;if(s(t,i)){return t}}};n.getQueryElement=function(t){if(typeof t=="string"){return document.querySelector(t)}return t};n.handleEvent=function(t){var i="on"+t.type;if(this[i]){this[i](t)}};n.filterFindElements=function(t,i){t=n.makeArray(t);var h=[];t.forEach((function(t){if(!(t instanceof HTMLElement)){return}if(!i){h.push(t);return}if(s(t,i)){h.push(t)}var n=t.querySelectorAll(i);for(var e=0;e<n.length;e++){h.push(n[e])}}));return h};n.debounceMethod=function(t,i,s){s=s||100;var n=t.prototype[i];var h=i+"Timeout";t.prototype[i]=function(){var t=this[h];clearTimeout(t);var i=arguments;var e=this;this[h]=setTimeout((function(){n.apply(e,i);delete e[h]}),s)}};n.docReady=function(t){var i=document.readyState;if(i=="complete"||i=="interactive"){setTimeout(t)}else{document.addEventListener("DOMContentLoaded",t)}};n.toDashed=function(t){return t.replace(/(.)([A-Z])/g,(function(t,i,s){return i+"-"+s})).toLowerCase()};var e=i.console;n.htmlInit=function(t,s){n.docReady((function(){var h=n.toDashed(s);var r="data-"+h;var a=document.querySelectorAll("["+r+"]");var o=document.querySelectorAll(".js-"+h);var c=n.makeArray(a).concat(n.makeArray(o));var f=r+"-options";var u=i.jQuery;c.forEach((function(i){var n=i.getAttribute(r)||i.getAttribute(f);var h;try{h=n&&JSON.parse(n)}catch(t){if(e){e.error("Error parsing "+r+" on "+i.className+": "+t)}return}var a=new t(i,h);if(u){u.data(i,s,a)}}))}))};return n}))}));function u(t,i){this.element=t;this.parent=i;this.create()}var l=u.prototype;l.create=function(){this.element.style.position="absolute";this.element.setAttribute("aria-hidden","true");this.x=0;this.shift=0;Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.setAttribute("tabindex","-1")}))};l.destroy=function(){this.unselect();this.element.style.position="";var t=this.parent.originSide;this.element.style[t]=""};l.getSize=function(){this.size=o(this.element)};l.setPosition=function(t){this.x=t;this.updateTarget();this.renderPosition(t)};l.updateTarget=l.setDefaultTarget=function(){var t=this.parent.originSide=="left"?"marginLeft":"marginRight";this.target=this.x+this.size[t]+this.size.width*this.parent.cellAlign};l.renderPosition=function(t){var i=this.parent.originSide;this.element.style[i]=this.parent.getPositionValue(t)};l.select=function(){this.element.classList.add("is-selected");this.element.removeAttribute("aria-hidden");Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.removeAttribute("tabindex")}))};l.unselect=function(){this.element.classList.remove("is-selected");this.element.setAttribute("aria-hidden","true");Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.setAttribute("tabindex","-1")}))};l.wrapShift=function(t){this.shift=t;this.renderPosition(this.x+this.parent.slideableWidth*t)};l.remove=function(){this.element.parentNode.removeChild(this.element)};function v(t){this.parent=t;this.isOriginLeft=t.originSide=="left";this.cells=[];this.outerWidth=0;this.height=0}var d=v.prototype;d.addCell=function(t){this.cells.push(t);this.outerWidth+=t.size.outerWidth;this.height=Math.max(t.size.outerHeight,this.height);if(this.cells.length==1){this.x=t.x;var i=this.isOriginLeft?"marginLeft":"marginRight";this.firstMargin=t.size[i]}};d.updateTarget=function(){var t=this.isOriginLeft?"marginRight":"marginLeft";var i=this.getLastCell();var s=i?i.size[t]:0;var n=this.outerWidth-(this.firstMargin+s);this.target=this.x+this.firstMargin+n*this.parent.cellAlign};d.getLastCell=function(){return this.cells[this.cells.length-1]};d.select=function(){this.cells.forEach((function(t){t.select()}))};d.unselect=function(){this.cells.forEach((function(t){t.unselect()}))};d.getCellElements=function(){return this.cells.map((function(t){return t.element}))};const y={};y.startAnimation=function(){if(this.isAnimating){return}this.isAnimating=true;this.restingFrames=0;this.animate()};y.animate=function(){this.applyDragForce();this.applySelectedAttraction();var t=this.x;this.integratePhysics();this.positionSlider();this.settle(t);if(this.isAnimating){var i=this;requestAnimationFrame((function t(){i.animate()}))}};y.positionSlider=function(){var t=this.x;if(this.options.wrapAround&&this.cells.length>1){t=f.modulo(t,this.slideableWidth);t=t-this.slideableWidth;this.shiftWrapCells(t)}this.setTranslateX(t,this.isAnimating);this.dispatchScrollEvent()};y.setTranslateX=function(t,i){t+=this.cursorPosition;t=this.options.rightToLeft?-t:t;var s=this.getPositionValue(t);this.slider.style.transform=i?"translate3d("+s+",0,0)":"translateX("+s+")"};y.dispatchScrollEvent=function(){var t=this.slides[0];if(!t){return}var i=-this.x-t.target;var s=i/this.slidesWidth;this.dispatchEvent("scroll",null,[s,i])};y.positionSliderAtSelected=function(){if(!this.cells.length){return}this.x=-this.selectedSlide.target;this.velocity=0;this.positionSlider()};y.getPositionValue=function(t){if(this.options.percentPosition){return Math.round(t/this.size.innerWidth*1e4)*.01+"%"}else{return Math.round(t)+"px"}};y.settle=function(t){if(!this.isPointerDown&&Math.round(this.x*100)==Math.round(t*100)){this.restingFrames++}if(this.restingFrames>2){this.isAnimating=false;delete this.isFreeScrolling;this.positionSlider();this.dispatchEvent("settle",null,[this.selectedIndex])}};y.shiftWrapCells=function(t){var i=this.cursorPosition+t;this._shiftCells(this.beforeShiftCells,i,-1);var s=this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,s,1)};y._shiftCells=function(t,i,s){for(var n=0;n<t.length;n++){var h=t[n];var e=i>0?s:0;h.wrapShift(e);i-=h.size.outerWidth}};y._unshiftCells=function(t){if(!t||!t.length){return}for(var i=0;i<t.length;i++){t[i].wrapShift(0)}};y.integratePhysics=function(){this.x+=this.velocity;this.velocity*=this.getFrictionFactor()};y.applyForce=function(t){this.velocity+=t};y.getFrictionFactor=function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]};y.getRestingPosition=function(){return this.x+this.velocity/(1-this.getFrictionFactor())};y.applyDragForce=function(){if(!this.isDraggable||!this.isPointerDown){return}var t=this.dragX-this.x;var i=t-this.velocity;this.applyForce(i)};y.applySelectedAttraction=function(){var t=this.isDraggable&&this.isPointerDown;if(t||this.isFreeScrolling||!this.slides.length){return}var i=this.selectedSlide.target*-1-this.x;var s=i*this.options.selectedAttraction;this.applyForce(s)};var p=window.getComputedStyle;var b=window.console;function g(t,i){t=f.makeArray(t);while(t.length){i.appendChild(t.shift())}}var k=0;var w={};function m(t,i){var s=f.getQueryElement(t);if(!s){if(b){b.error("Bad element for Flickity: "+(s||t))}return}this.element=s;if(this.element.flickityGUID){var n=w[this.element.flickityGUID];if(!w[this.element.flickityGUID])return;n.option(i);return n}this.options=f.extend({},this.constructor.defaults);this.option(i);this._create()}m.defaults={accessibility:true,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:true,percentPosition:true,resize:true,selectedAttraction:.025,setGallerySize:true};m.createMethods=[];var x=m.prototype;f.extend(x,a.prototype);x._create=function(){var t=this.guid=++k;this.element.flickityGUID=t;w[t]=this;this.selectedIndex=0;this.restingFrames=0;this.x=0;this.velocity=0;this.originSide=this.options.rightToLeft?"right":"left";this.viewport=document.createElement("div");this.viewport.className="flickity-viewport";this._createSlider();if(this.options.resize||this.options.watchCSS){window.addEventListener("resize",this)}for(var i in this.options.on){var s=this.options.on[i];this.on(i,s)}m.createMethods.forEach((function(t){this[t]()}),this);if(this.options.watchCSS){this.watchCSS()}else{this.activate()}};x.option=function(t){f.extend(this.options,t)};x.activate=function(){if(this.isActive){return}this.isActive=true;this.element.classList.add("flickity-enabled");if(this.options.rightToLeft){this.element.classList.add("flickity-rtl")}this.getSize();var t=this.element.children;g(t,this.slider);this.viewport.appendChild(this.slider);this.element.appendChild(this.viewport);this.reloadCells();if(this.options.accessibility){this.element.tabIndex=0;this.element.addEventListener("keydown",this)}this.emitEvent("activate");this.selectInitialIndex();this.isInitActivated=true;this.dispatchEvent("ready")};x._createSlider=function(){var t=document.createElement("div");t.className="flickity-slider";t.style[this.originSide]=0;this.slider=t};x._filterFindCellElements=function(t){return f.filterFindElements(t,this.options.cellSelector)};x.reloadCells=function(){this.cells=this._makeCells(this.slider.getRootNode().host?this.slider.getRootNode().host.children:this.slider.children);this.positionCells();this._getWrapShiftCells();this.setGallerySize()};x._makeCells=function(t){var i=this._filterFindCellElements(t);var s=i.map((function(t){return new u(t,this)}),this);return s};x.getLastCell=function(){return this.cells[this.cells.length-1]};x.getLastSlide=function(){return this.slides[this.slides.length-1]};x.positionCells=function(){this._sizeCells(this.cells);this._positionCells(0)};x._positionCells=function(t){t=t||0;this.maxCellHeight=t?this.maxCellHeight||0:0;var i=0;if(t>0){var s=this.cells[t-1];i=s.x+s.size.outerWidth}var n=this.cells.length;for(var h=t;h<n;h++){var e=this.cells[h];e.setPosition(i);i+=e.size.outerWidth;this.maxCellHeight=Math.max(e.size.outerHeight,this.maxCellHeight)}this.slideableWidth=i;this.updateSlides();this._containSlides();this.slidesWidth=n?this.getLastSlide().target-this.slides[0].target:0};x._sizeCells=function(t){t.forEach((function(t){t.getSize()}))};x.updateSlides=function(){this.slides=[];if(!this.cells.length){return}var t=new v(this);this.slides.push(t);var i=this.originSide=="left";var s=i?"marginRight":"marginLeft";var n=this._getCanCellFit();this.cells.forEach((function(i,h){if(!t.cells.length){t.addCell(i);return}var e=t.outerWidth-t.firstMargin+(i.size.outerWidth-i.size[s]);if(n.call(this,h,e)){t.addCell(i)}else{t.updateTarget();t=new v(this);this.slides.push(t);t.addCell(i)}}),this);t.updateTarget();this.updateSelectedSlide()};x._getCanCellFit=function(){var t=this.options.groupCells;if(!t){return function(){return false}}else if(typeof t=="number"){var i=parseInt(t,10);return function(t){return t%i!==0}}var s=typeof t=="string"&&t.match(/^(\d+)%$/);var n=s?parseInt(s[1],10)/100:1;return function(t,i){return i<=(this.size.innerWidth+1)*n}};x._init=x.reposition=function(){this.positionCells();this.positionSliderAtSelected()};x.getSize=function(){this.size=o(this.element);this.setCellAlign();this.cursorPosition=this.size.innerWidth*this.cellAlign};var z={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};x.setCellAlign=function(){var t=z[this.options.cellAlign];this.cellAlign=t?t[this.originSide]:this.options.cellAlign};x.setGallerySize=function(){if(this.options.setGallerySize){var t=this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight;this.viewport.style.height=t+"px"}};x._getWrapShiftCells=function(){if(!this.options.wrapAround){return}this._unshiftCells(this.beforeShiftCells);this._unshiftCells(this.afterShiftCells);var t=this.cursorPosition;var i=this.cells.length-1;this.beforeShiftCells=this._getGapCells(t,i,-1);t=this.size.innerWidth-this.cursorPosition;this.afterShiftCells=this._getGapCells(t,0,1)};x._getGapCells=function(t,i,s){var n=[];while(t>0){var h=this.cells[i];if(!h){break}n.push(h);i+=s;t-=h.size.outerWidth}return n};x._containSlides=function(){if(!this.options.contain||this.options.wrapAround||!this.cells.length){return}var t=this.options.rightToLeft;var i=t?"marginRight":"marginLeft";var s=t?"marginLeft":"marginRight";var n=this.slideableWidth-this.getLastCell().size[s];var h=n<this.size.innerWidth;var e=this.cursorPosition+this.cells[0].size[i];var r=n-this.size.innerWidth*(1-this.cellAlign);this.slides.forEach((function(t){if(h){t.target=n*this.cellAlign}else{t.target=Math.max(t.target,e);t.target=Math.min(t.target,r)}}),this)};x.dispatchEvent=function(t,i,s){var n=i?[i].concat(s):s;this.emitEvent(t,n)};x.select=function(t,i,s){if(!this.isActive){return}t=parseInt(t,10);this._wrapSelect(t);if(this.options.wrapAround||i){t=f.modulo(t,this.slides.length)}if(!this.slides[t]){return}var n=this.selectedIndex;this.selectedIndex=t;this.updateSelectedSlide();if(s){this.positionSliderAtSelected()}else{this.startAnimation()}if(this.options.adaptiveHeight){this.setGallerySize()}this.dispatchEvent("select",null,[t]);if(t!=n){this.dispatchEvent("change",null,[t])}this.dispatchEvent("cellSelect")};x._wrapSelect=function(t){var i=this.slides.length;var s=this.options.wrapAround&&i>1;if(!s){return t}var n=f.modulo(t,i);var h=Math.abs(n-this.selectedIndex);var e=Math.abs(n+i-this.selectedIndex);var r=Math.abs(n-i-this.selectedIndex);if(!this.isDragSelect&&e<h){t+=i}else if(!this.isDragSelect&&r<h){t-=i}if(t<0){this.x-=this.slideableWidth}else if(t>=i){this.x+=this.slideableWidth}};x.previous=function(t,i){this.select(this.selectedIndex-1,t,i)};x.next=function(t,i){this.select(this.selectedIndex+1,t,i)};x.updateSelectedSlide=function(){var t=this.slides[this.selectedIndex];if(!t){return}this.unselectSelectedSlide();this.selectedSlide=t;t.select();this.selectedCells=t.cells;this.selectedElements=t.getCellElements();this.selectedCell=t.cells[0];this.selectedElement=this.selectedElements[0]};x.unselectSelectedSlide=function(){if(this.selectedSlide){this.selectedSlide.unselect()}};x.selectInitialIndex=function(){var t=this.options.initialIndex;if(this.isInitActivated){this.select(this.selectedIndex,false,true);return}if(t&&typeof t=="string"){var i=this.queryCell(t);if(i){this.selectCell(t,false,true);return}}var s=0;if(t&&this.slides[t]){s=t}this.select(s,false,true)};x.selectCell=function(t,i,s){var n=this.queryCell(t);if(!n){return}var h=this.getCellSlideIndex(n);this.select(h,i,s)};x.getCellSlideIndex=function(t){for(var i=0;i<this.slides.length;i++){var s=this.slides[i];var n=s.cells.indexOf(t);if(n!=-1){return i}}};x.getCell=function(t){for(var i=0;i<this.cells.length;i++){var s=this.cells[i];if(s.element==t){return s}}};x.getCells=function(t){t=f.makeArray(t);var i=[];t.forEach((function(t){var s=this.getCell(t);if(s){i.push(s)}}),this);return i};x.getCellElements=function(){return this.cells.map((function(t){return t.element}))};x.getParentCell=function(t){var i=this.getCell(t);if(i){return i}t=f.getParent(t,".flickity-slider > *");return this.getCell(t)};x.getAdjacentCellElements=function(t,i){if(!t){return this.selectedSlide.getCellElements()}i=i===undefined?this.selectedIndex:i;var s=this.slides.length;if(1+t*2>=s){return this.getCellElements()}var n=[];for(var h=i-t;h<=i+t;h++){var e=this.options.wrapAround?f.modulo(h,s):h;var r=this.slides[e];if(r){n=n.concat(r.getCellElements())}}return n};x.queryCell=function(t){if(typeof t=="number"){return this.cells[t]}if(typeof t=="string"){if(t.match(/^[#\.]?[\d\/]/)){return}t=this.element.querySelector(t)}return this.getCell(t)};x.uiChange=function(){this.emitEvent("uiChange")};x.childUIPointerDown=function(t){if(t.type!="touchstart"){t.preventDefault()}this.focus()};x.onresize=function(){this.watchCSS();this.resize()};f.debounceMethod(m,"onresize",150);x.resize=function(){if(!this.isActive){return}this.getSize();if(this.options.wrapAround){this.x=f.modulo(this.x,this.slideableWidth)}this.positionCells();this._getWrapShiftCells();this.setGallerySize();this.emitEvent("resize");var t=this.selectedElements&&this.selectedElements[0];this.selectCell(t,false,true)};x.watchCSS=function(){var t=this.options.watchCSS;if(!t){return}var i=p(this.element,":after").content;if(i.indexOf("flickity")!=-1){this.activate()}else{this.deactivate()}};x.onkeydown=function(t){var i=document.activeElement&&document.activeElement!=this.element;if(!this.options.accessibility||i){return}var s=m.keyboardHandlers[t.keyCode];if(s){s.call(this)}};m.keyboardHandlers={37:function(){var t=this.options.rightToLeft?"next":"previous";this.uiChange();this[t]()},39:function(){var t=this.options.rightToLeft?"previous":"next";this.uiChange();this[t]()}};x.focus=function(){var t=window.pageYOffset;this.element.focus({preventScroll:true});if(window.pageYOffset!=t){window.scrollTo(window.pageXOffset,t)}};x.deactivate=function(){if(!this.isActive){return}this.element.classList.remove("flickity-enabled");this.element.classList.remove("flickity-rtl");this.unselectSelectedSlide();this.cells.forEach((function(t){t.destroy()}));this.element.removeChild(this.viewport);g(this.slider.children,this.element);if(this.options.accessibility){this.element.removeAttribute("tabIndex");this.element.removeEventListener("keydown",this)}this.isActive=false;this.emitEvent("deactivate")};x.destroy=function(){this.deactivate();window.removeEventListener("resize",this);this.allOff();this.emitEvent("destroy");delete this.element.flickityGUID;delete w[this.guid]};f.extend(x,y);m.data=function(t){t=f.getQueryElement(t);var i=t&&t.flickityGUID;return i&&w[i]};f.htmlInit(m,"flickity");m.Cell=u;m.Slide=v;var M=e((function(t){
|
10
|
+
(function(i,s){if(t.exports){t.exports=s()}else{i.getSize=s()}})(window,(function t(){function i(t){var i=parseFloat(t);var s=t.indexOf("%")==-1&&!isNaN(i);return s&&i}function s(){}var n=typeof console=="undefined"?s:function(t){console.error(t)};var h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];var e=h.length;function r(){var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(var i=0;i<e;i++){var s=h[i];t[s]=0}return t}function a(t){var i=getComputedStyle(t);if(!i){n("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? "+"See https://bit.ly/getsizebug1")}return i}var o=false;var c;function f(){if(o){return}o=true;var t=document.createElement("div");t.style.width="200px";t.style.padding="1px 2px 3px 4px";t.style.borderStyle="solid";t.style.borderWidth="1px 2px 3px 4px";t.style.boxSizing="border-box";var s=document.body||document.documentElement;s.appendChild(t);var n=a(t);c=Math.round(i(n.width))==200;u.isBoxSizeOuter=c;s.removeChild(t)}function u(t){f();if(typeof t=="string"){t=document.querySelector(t)}if(!t||typeof t!="object"||!t.nodeType){return}var s=a(t);if(s.display=="none"){return r()}var n={};n.width=t.offsetWidth;n.height=t.offsetHeight;var o=n.isBorderBox=s.boxSizing=="border-box";for(var u=0;u<e;u++){var l=h[u];var v=s[l];var d=parseFloat(v);n[l]=!isNaN(d)?d:0}var y=n.paddingLeft+n.paddingRight;var p=n.paddingTop+n.paddingBottom;var b=n.marginLeft+n.marginRight;var g=n.marginTop+n.marginBottom;var w=n.borderLeftWidth+n.borderRightWidth;var k=n.borderTopWidth+n.borderBottomWidth;var m=o&&c;var x=i(s.width);if(x!==false){n.width=x+(m?0:y+w)}var z=i(s.height);if(z!==false){n.height=z+(m?0:p+k)}n.innerWidth=n.width-(y+w);n.innerHeight=n.height-(p+k);n.outerWidth=n.width+b;n.outerHeight=n.height+g;return n}return u}))}));var c=e((function(t){(function(i,s){if(t.exports){t.exports=s()}else{i.matchesSelector=s()}})(window,(function t(){var i=function(){var t=window.Element.prototype;if(t.matches){return"matches"}if(t.matchesSelector){return"matchesSelector"}var i=["webkit","moz","ms","o"];for(var s=0;s<i.length;s++){var n=i[s];var h=n+"MatchesSelector";if(t[h]){return h}}}();return function t(s,n){return s[i](n)}}))}));var f=e((function(t){(function(i,s){if(t.exports){t.exports=s(i,c)}else{i.fizzyUIUtils=s(i,i.matchesSelector)}})(window,(function t(i,s){var n={};n.extend=function(t,i){for(var s in i){t[s]=i[s]}return t};n.modulo=function(t,i){return(t%i+i)%i};var h=Array.prototype.slice;n.makeArray=function(t){if(Array.isArray(t)){return t}if(t===null||t===undefined){return[]}var i=typeof t=="object"&&typeof t.length=="number";if(i){return h.call(t)}return[t]};n.removeFrom=function(t,i){var s=t.indexOf(i);if(s!=-1){t.splice(s,1)}};n.getParent=function(t,i){while(t.parentNode&&t!=document.body){t=t.parentNode;if(s(t,i)){return t}}};n.getQueryElement=function(t){if(typeof t=="string"){return document.querySelector(t)}return t};n.handleEvent=function(t){var i="on"+t.type;if(this[i]){this[i](t)}};n.filterFindElements=function(t,i){t=n.makeArray(t);var h=[];t.forEach((function(t){if(!(t instanceof HTMLElement)){return}if(!i){h.push(t);return}if(s(t,i)){h.push(t)}var n=t.querySelectorAll(i);for(var e=0;e<n.length;e++){h.push(n[e])}}));return h};n.debounceMethod=function(t,i,s){s=s||100;var n=t.prototype[i];var h=i+"Timeout";t.prototype[i]=function(){var t=this[h];clearTimeout(t);var i=arguments;var e=this;this[h]=setTimeout((function(){n.apply(e,i);delete e[h]}),s)}};n.docReady=function(t){var i=document.readyState;if(i=="complete"||i=="interactive"){setTimeout(t)}else{document.addEventListener("DOMContentLoaded",t)}};n.toDashed=function(t){return t.replace(/(.)([A-Z])/g,(function(t,i,s){return i+"-"+s})).toLowerCase()};var e=i.console;n.htmlInit=function(t,s){n.docReady((function(){var h=n.toDashed(s);var r="data-"+h;var a=document.querySelectorAll("["+r+"]");var o=document.querySelectorAll(".js-"+h);var c=n.makeArray(a).concat(n.makeArray(o));var f=r+"-options";var u=i.jQuery;c.forEach((function(i){var n=i.getAttribute(r)||i.getAttribute(f);var h;try{h=n&&JSON.parse(n)}catch(t){if(e){e.error("Error parsing "+r+" on "+i.className+": "+t)}return}var a=new t(i,h);if(u){u.data(i,s,a)}}))}))};return n}))}));function u(t,i){this.element=t;this.parent=i;this.create()}var l=u.prototype;l.create=function(){this.element.style.position="absolute";this.element.setAttribute("aria-hidden","true");this.x=0;this.shift=0;Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.setAttribute("tabindex","-1")}))};l.destroy=function(){this.unselect();this.element.style.position="";var t=this.parent.originSide;this.element.style[t]=""};l.getSize=function(){this.size=o(this.element)};l.setPosition=function(t){this.x=t;this.updateTarget();this.renderPosition(t)};l.updateTarget=l.setDefaultTarget=function(){var t=this.parent.originSide=="left"?"marginLeft":"marginRight";this.target=this.x+this.size[t]+this.size.width*this.parent.cellAlign};l.renderPosition=function(t){var i=this.parent.originSide;this.element.style[i]=this.parent.getPositionValue(t)};l.select=function(){this.element.classList.add("is-selected");this.element.removeAttribute("aria-hidden");Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.removeAttribute("tabindex")}))};l.unselect=function(){this.element.classList.remove("is-selected");this.element.setAttribute("aria-hidden","true");Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.setAttribute("tabindex","-1")}))};l.wrapShift=function(t){this.shift=t;this.renderPosition(this.x+this.parent.slideableWidth*t)};l.remove=function(){this.element.parentNode.removeChild(this.element)};function v(t){this.parent=t;this.isOriginLeft=t.originSide=="left";this.cells=[];this.outerWidth=0;this.height=0}var d=v.prototype;d.addCell=function(t){this.cells.push(t);this.outerWidth+=t.size.outerWidth;this.height=Math.max(t.size.outerHeight,this.height);if(this.cells.length==1){this.x=t.x;var i=this.isOriginLeft?"marginLeft":"marginRight";this.firstMargin=t.size[i]}};d.updateTarget=function(){var t=this.isOriginLeft?"marginRight":"marginLeft";var i=this.getLastCell();var s=i?i.size[t]:0;var n=this.outerWidth-(this.firstMargin+s);this.target=this.x+this.firstMargin+n*this.parent.cellAlign};d.getLastCell=function(){return this.cells[this.cells.length-1]};d.select=function(){this.cells.forEach((function(t){t.select()}))};d.unselect=function(){this.cells.forEach((function(t){t.unselect()}))};d.getCellElements=function(){return this.cells.map((function(t){return t.element}))};const y={};y.startAnimation=function(){if(this.isAnimating){return}this.isAnimating=true;this.restingFrames=0;this.animate()};y.animate=function(){this.applyDragForce();this.applySelectedAttraction();var t=this.x;this.integratePhysics();this.positionSlider();this.settle(t);if(this.isAnimating){var i=this;requestAnimationFrame((function t(){i.animate()}))}};y.positionSlider=function(){var t=this.x;if(this.options.wrapAround&&this.cells.length>1){t=f.modulo(t,this.slideableWidth);t=t-this.slideableWidth;this.shiftWrapCells(t)}this.setTranslateX(t,this.isAnimating);this.dispatchScrollEvent()};y.setTranslateX=function(t,i){t+=this.cursorPosition;t=this.options.rightToLeft?-t:t;var s=this.getPositionValue(t);this.slider.style.transform=i?"translate3d("+s+",0,0)":"translateX("+s+")"};y.dispatchScrollEvent=function(){var t=this.slides[0];if(!t){return}var i=-this.x-t.target;var s=i/this.slidesWidth;this.dispatchEvent("scroll",null,[s,i])};y.positionSliderAtSelected=function(){if(!this.cells.length){return}this.x=-this.selectedSlide.target;this.velocity=0;this.positionSlider()};y.getPositionValue=function(t){if(this.options.percentPosition){return Math.round(t/this.size.innerWidth*1e4)*.01+"%"}else{return Math.round(t)+"px"}};y.settle=function(t){if(!this.isPointerDown&&Math.round(this.x*100)==Math.round(t*100)){this.restingFrames++}if(this.restingFrames>2){this.isAnimating=false;delete this.isFreeScrolling;this.positionSlider();this.dispatchEvent("settle",null,[this.selectedIndex])}};y.shiftWrapCells=function(t){var i=this.cursorPosition+t;this._shiftCells(this.beforeShiftCells,i,-1);var s=this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,s,1)};y._shiftCells=function(t,i,s){for(var n=0;n<t.length;n++){var h=t[n];var e=i>0?s:0;h.wrapShift(e);i-=h.size.outerWidth}};y._unshiftCells=function(t){if(!t||!t.length){return}for(var i=0;i<t.length;i++){t[i].wrapShift(0)}};y.integratePhysics=function(){this.x+=this.velocity;this.velocity*=this.getFrictionFactor()};y.applyForce=function(t){this.velocity+=t};y.getFrictionFactor=function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]};y.getRestingPosition=function(){return this.x+this.velocity/(1-this.getFrictionFactor())};y.applyDragForce=function(){if(!this.isDraggable||!this.isPointerDown){return}var t=this.dragX-this.x;var i=t-this.velocity;this.applyForce(i)};y.applySelectedAttraction=function(){var t=this.isDraggable&&this.isPointerDown;if(t||this.isFreeScrolling||!this.slides.length){return}var i=this.selectedSlide.target*-1-this.x;var s=i*this.options.selectedAttraction;this.applyForce(s)};var p=window.getComputedStyle;var b=window.console;function g(t,i){t=f.makeArray(t);while(t.length){i.appendChild(t.shift())}}var w=0;var k={};function m(t,i){var s=f.getQueryElement(t);if(!s){if(b){b.error("Bad element for Flickity: "+(s||t))}return}this.element=s;if(this.element.flickityGUID){var n=k[this.element.flickityGUID];if(!k[this.element.flickityGUID])return;n.option(i);return n}this.options=f.extend({},this.constructor.defaults);this.option(i);this._create()}m.defaults={accessibility:true,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:true,percentPosition:true,resize:true,selectedAttraction:.025,setGallerySize:true};m.createMethods=[];var x=m.prototype;f.extend(x,a.prototype);x._create=function(){var t=this.guid=++w;this.element.flickityGUID=t;k[t]=this;this.selectedIndex=0;this.restingFrames=0;this.x=0;this.velocity=0;this.originSide=this.options.rightToLeft?"right":"left";this.viewport=document.createElement("div");this.viewport.className="flickity-viewport";this._createSlider();if(this.options.resize||this.options.watchCSS){window.addEventListener("resize",this)}for(var i in this.options.on){var s=this.options.on[i];this.on(i,s)}m.createMethods.forEach((function(t){this[t]()}),this);if(this.options.watchCSS){this.watchCSS()}else{this.activate()}};x.option=function(t){f.extend(this.options,t)};x.activate=function(){if(this.isActive){return}this.isActive=true;this.element.classList.add("flickity-enabled");if(this.options.rightToLeft){this.element.classList.add("flickity-rtl")}this.getSize();var t=this.element.children;g(t,this.slider);this.viewport.appendChild(this.slider);this.element.appendChild(this.viewport);this.reloadCells();if(this.options.accessibility){this.element.tabIndex=0;this.element.addEventListener("keydown",this)}this.emitEvent("activate");this.selectInitialIndex();this.isInitActivated=true;this.dispatchEvent("ready")};x._createSlider=function(){var t=document.createElement("div");t.className="flickity-slider";t.style[this.originSide]=0;this.slider=t};x._filterFindCellElements=function(t){return f.filterFindElements(t,this.options.cellSelector)};x.reloadCells=function(){this.cells=this._makeCells(this.slider.getRootNode().host?this.slider.getRootNode().host.children:this.slider.children);this.positionCells();this._getWrapShiftCells();this.setGallerySize()};x._makeCells=function(t){var i=this._filterFindCellElements(t);var s=i.map((function(t){return new u(t,this)}),this);return s};x.getLastCell=function(){return this.cells[this.cells.length-1]};x.getLastSlide=function(){return this.slides[this.slides.length-1]};x.positionCells=function(){this._sizeCells(this.cells);this._positionCells(0)};x._positionCells=function(t){t=t||0;this.maxCellHeight=t?this.maxCellHeight||0:0;var i=0;if(t>0){var s=this.cells[t-1];i=s.x+s.size.outerWidth}var n=this.cells.length;for(var h=t;h<n;h++){var e=this.cells[h];e.setPosition(i);i+=e.size.outerWidth;this.maxCellHeight=Math.max(e.size.outerHeight,this.maxCellHeight)}this.slideableWidth=i;this.updateSlides();this._containSlides();this.slidesWidth=n?this.getLastSlide().target-this.slides[0].target:0};x._sizeCells=function(t){t.forEach((function(t){t.getSize()}))};x.updateSlides=function(){this.slides=[];if(!this.cells.length){return}var t=new v(this);this.slides.push(t);var i=this.originSide=="left";var s=i?"marginRight":"marginLeft";var n=this._getCanCellFit();this.cells.forEach((function(i,h){if(!t.cells.length){t.addCell(i);return}var e=t.outerWidth-t.firstMargin+(i.size.outerWidth-i.size[s]);if(n.call(this,h,e)){t.addCell(i)}else{t.updateTarget();t=new v(this);this.slides.push(t);t.addCell(i)}}),this);t.updateTarget();this.updateSelectedSlide()};x._getCanCellFit=function(){var t=this.options.groupCells;if(!t){return function(){return false}}else if(typeof t=="number"){var i=parseInt(t,10);return function(t){return t%i!==0}}var s=typeof t=="string"&&t.match(/^(\d+)%$/);var n=s?parseInt(s[1],10)/100:1;return function(t,i){return i<=(this.size.innerWidth+1)*n}};x._init=x.reposition=function(){this.positionCells();this.positionSliderAtSelected()};x.getSize=function(){this.size=o(this.element);this.setCellAlign();this.cursorPosition=this.size.innerWidth*this.cellAlign};var z={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};x.setCellAlign=function(){var t=z[this.options.cellAlign];this.cellAlign=t?t[this.originSide]:this.options.cellAlign};x.setGallerySize=function(){if(this.options.setGallerySize){var t=this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight;this.viewport.style.height=t+"px"}};x._getWrapShiftCells=function(){if(!this.options.wrapAround){return}this._unshiftCells(this.beforeShiftCells);this._unshiftCells(this.afterShiftCells);var t=this.cursorPosition;var i=this.cells.length-1;this.beforeShiftCells=this._getGapCells(t,i,-1);t=this.size.innerWidth-this.cursorPosition;this.afterShiftCells=this._getGapCells(t,0,1)};x._getGapCells=function(t,i,s){var n=[];while(t>0){var h=this.cells[i];if(!h){break}n.push(h);i+=s;t-=h.size.outerWidth}return n};x._containSlides=function(){if(!this.options.contain||this.options.wrapAround||!this.cells.length){return}var t=this.options.rightToLeft;var i=t?"marginRight":"marginLeft";var s=t?"marginLeft":"marginRight";var n=this.slideableWidth-this.getLastCell().size[s];var h=n<this.size.innerWidth;var e=this.cursorPosition+this.cells[0].size[i];var r=n-this.size.innerWidth*(1-this.cellAlign);this.slides.forEach((function(t){if(h){t.target=n*this.cellAlign}else{t.target=Math.max(t.target,e);t.target=Math.min(t.target,r)}}),this)};x.dispatchEvent=function(t,i,s){var n=i?[i].concat(s):s;this.emitEvent(t,n)};x.select=function(t,i,s){if(!this.isActive){return}t=parseInt(t,10);this._wrapSelect(t);if(this.options.wrapAround||i){t=f.modulo(t,this.slides.length)}if(!this.slides[t]){return}var n=this.selectedIndex;this.selectedIndex=t;this.updateSelectedSlide();if(s){this.positionSliderAtSelected()}else{this.startAnimation()}if(this.options.adaptiveHeight){this.setGallerySize()}this.dispatchEvent("select",null,[t]);if(t!=n){this.dispatchEvent("change",null,[t])}this.dispatchEvent("cellSelect")};x._wrapSelect=function(t){var i=this.slides.length;var s=this.options.wrapAround&&i>1;if(!s){return t}var n=f.modulo(t,i);var h=Math.abs(n-this.selectedIndex);var e=Math.abs(n+i-this.selectedIndex);var r=Math.abs(n-i-this.selectedIndex);if(!this.isDragSelect&&e<h){t+=i}else if(!this.isDragSelect&&r<h){t-=i}if(t<0){this.x-=this.slideableWidth}else if(t>=i){this.x+=this.slideableWidth}};x.previous=function(t,i){this.select(this.selectedIndex-1,t,i)};x.next=function(t,i){this.select(this.selectedIndex+1,t,i)};x.updateSelectedSlide=function(){var t=this.slides[this.selectedIndex];if(!t){return}this.unselectSelectedSlide();this.selectedSlide=t;t.select();this.selectedCells=t.cells;this.selectedElements=t.getCellElements();this.selectedCell=t.cells[0];this.selectedElement=this.selectedElements[0]};x.unselectSelectedSlide=function(){if(this.selectedSlide){this.selectedSlide.unselect()}};x.selectInitialIndex=function(){var t=this.options.initialIndex;if(this.isInitActivated){this.select(this.selectedIndex,false,true);return}if(t&&typeof t=="string"){var i=this.queryCell(t);if(i){this.selectCell(t,false,true);return}}var s=0;if(t&&this.slides[t]){s=t}this.select(s,false,true)};x.selectCell=function(t,i,s){var n=this.queryCell(t);if(!n){return}var h=this.getCellSlideIndex(n);this.select(h,i,s)};x.getCellSlideIndex=function(t){for(var i=0;i<this.slides.length;i++){var s=this.slides[i];var n=s.cells.indexOf(t);if(n!=-1){return i}}};x.getCell=function(t){for(var i=0;i<this.cells.length;i++){var s=this.cells[i];if(s.element==t){return s}}};x.getCells=function(t){t=f.makeArray(t);var i=[];t.forEach((function(t){var s=this.getCell(t);if(s){i.push(s)}}),this);return i};x.getCellElements=function(){return this.cells.map((function(t){return t.element}))};x.getParentCell=function(t){var i=this.getCell(t);if(i){return i}t=f.getParent(t,".flickity-slider > *");return this.getCell(t)};x.getAdjacentCellElements=function(t,i){if(!t){return this.selectedSlide.getCellElements()}i=i===undefined?this.selectedIndex:i;var s=this.slides.length;if(1+t*2>=s){return this.getCellElements()}var n=[];for(var h=i-t;h<=i+t;h++){var e=this.options.wrapAround?f.modulo(h,s):h;var r=this.slides[e];if(r){n=n.concat(r.getCellElements())}}return n};x.queryCell=function(t){if(typeof t=="number"){return this.cells[t]}if(typeof t=="string"){if(t.match(/^[#\.]?[\d\/]/)){return}t=this.element.querySelector(t)}return this.getCell(t)};x.uiChange=function(){this.emitEvent("uiChange")};x.childUIPointerDown=function(t){if(t.type!="touchstart"){t.preventDefault()}this.focus()};x.onresize=function(){this.watchCSS();this.resize()};f.debounceMethod(m,"onresize",150);x.resize=function(){if(!this.isActive){return}this.getSize();if(this.options.wrapAround){this.x=f.modulo(this.x,this.slideableWidth)}this.positionCells();this._getWrapShiftCells();this.setGallerySize();this.emitEvent("resize");var t=this.selectedElements&&this.selectedElements[0];this.selectCell(t,false,true)};x.watchCSS=function(){var t=this.options.watchCSS;if(!t){return}var i=p(this.element,":after").content;if(i.indexOf("flickity")!=-1){this.activate()}else{this.deactivate()}};x.onkeydown=function(t){var i=document.activeElement&&document.activeElement!=this.element;if(!this.options.accessibility||i){return}var s=m.keyboardHandlers[t.keyCode];if(s){s.call(this)}};m.keyboardHandlers={37:function(){var t=this.options.rightToLeft?"next":"previous";this.uiChange();this[t]()},39:function(){var t=this.options.rightToLeft?"previous":"next";this.uiChange();this[t]()}};x.focus=function(){var t=window.pageYOffset;this.element.focus({preventScroll:true});if(window.pageYOffset!=t){window.scrollTo(window.pageXOffset,t)}};x.deactivate=function(){if(!this.isActive){return}this.element.classList.remove("flickity-enabled");this.element.classList.remove("flickity-rtl");this.unselectSelectedSlide();this.cells.forEach((function(t){t.destroy()}));this.element.removeChild(this.viewport);g(this.slider.children,this.element);if(this.options.accessibility){this.element.removeAttribute("tabIndex");this.element.removeEventListener("keydown",this)}this.isActive=false;this.emitEvent("deactivate")};x.destroy=function(){this.deactivate();window.removeEventListener("resize",this);this.allOff();this.emitEvent("destroy");delete this.element.flickityGUID;delete k[this.guid]};f.extend(x,y);m.data=function(t){t=f.getQueryElement(t);var i=t&&t.flickityGUID;return i&&k[i]};f.htmlInit(m,"flickity");m.Cell=u;m.Slide=v;var M=e((function(t){
|
11
11
|
/*!
|
12
12
|
* Unipointer v2.4.0
|
13
13
|
* base class for doing one thing with pointer event
|
@@ -19,5 +19,5 @@ import{r as t,c as i,h as s,a as n,g as h}from"./p-6ef53fa1.js";import{c as e,a
|
|
19
19
|
* Draggable base class
|
20
20
|
* MIT license
|
21
21
|
*/
|
22
|
-
(function(i,s){if(t.exports){t.exports=s(i,M)}else{i.Unidragger=s(i,i.Unipointer)}})(window,(function t(i,s){function n(){}var h=n.prototype=Object.create(s.prototype);h.bindHandles=function(){this._bindHandles(true)};h.unbindHandles=function(){this._bindHandles(false)};h._bindHandles=function(t){t=t===undefined?true:t;var s=t?"addEventListener":"removeEventListener";var n=t?this._touchActionValue:"";for(var h=0;h<this.handles.length;h++){var e=this.handles[h];this._bindStartEvent(e,t);e[s]("click",this);if(i.PointerEvent){e.style.touchAction=n}}};h._touchActionValue="none";h.pointerDown=function(t,i){var s=this.okayPointerDown(t);if(!s){return}this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY};t.preventDefault();this.pointerDownBlur();this._bindPostStartEvents(t);this.emitEvent("pointerDown",[t,i])};var e={TEXTAREA:true,INPUT:true,SELECT:true,OPTION:true};var r={radio:true,checkbox:true,button:true,submit:true,image:true,file:true};h.okayPointerDown=function(t){var i=e[t.target.nodeName];var s=r[t.target.type];var n=!i||s;if(!n){this._pointerReset()}return n};h.pointerDownBlur=function(){var t=document.activeElement;var i=t&&t.blur&&t!=document.body;if(i){t.blur()}};h.pointerMove=function(t,i){var s=this._dragPointerMove(t,i);this.emitEvent("pointerMove",[t,i,s]);this._dragMove(t,i,s)};h._dragPointerMove=function(t,i){var s={x:i.pageX-this.pointerDownPointer.pageX,y:i.pageY-this.pointerDownPointer.pageY};if(!this.isDragging&&this.hasDragStarted(s)){this._dragStart(t,i)}return s};h.hasDragStarted=function(t){return Math.abs(t.x)>3||Math.abs(t.y)>3};h.pointerUp=function(t,i){this.emitEvent("pointerUp",[t,i]);this._dragPointerUp(t,i)};h._dragPointerUp=function(t,i){if(this.isDragging){this._dragEnd(t,i)}else{this._staticClick(t,i)}};h._dragStart=function(t,i){this.isDragging=true;this.isPreventingClicks=true;this.dragStart(t,i)};h.dragStart=function(t,i){this.emitEvent("dragStart",[t,i])};h._dragMove=function(t,i,s){if(!this.isDragging){return}this.dragMove(t,i,s)};h.dragMove=function(t,i,s){t.preventDefault();this.emitEvent("dragMove",[t,i,s])};h._dragEnd=function(t,i){this.isDragging=false;setTimeout(function(){delete this.isPreventingClicks}.bind(this));this.dragEnd(t,i)};h.dragEnd=function(t,i){this.emitEvent("dragEnd",[t,i])};h.onclick=function(t){if(this.isPreventingClicks){t.preventDefault()}};h._staticClick=function(t,i){if(this.isIgnoringMouseUp&&t.type=="mouseup"){return}this.staticClick(t,i);if(t.type!="mouseup"){this.isIgnoringMouseUp=true;setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)}};h.staticClick=function(t,i){this.emitEvent("staticClick",[t,i])};n.getPointerPoint=s.getPointerPoint;return n}))}));f.extend(m.defaults,{draggable:">1",dragThreshold:3});m.createMethods.push("_createDrag");var S=m.prototype;f.extend(S,C.prototype);S._touchActionValue="pan-y";var L="createTouch"in document;var T=false;S._createDrag=function(){this.on("activate",this.onActivateDrag);this.on("uiChange",this._uiChangeDrag);this.on("deactivate",this.onDeactivateDrag);this.on("cellChange",this.updateDraggable);if(L&&!T){window.addEventListener("touchmove",(function(){}));T=true}};S.onActivateDrag=function(){this.handles=[this.viewport];this.bindHandles();this.updateDraggable()};S.onDeactivateDrag=function(){this.unbindHandles();this.element.classList.remove("is-draggable")};S.updateDraggable=function(){if(this.options.draggable==">1"){this.isDraggable=this.slides.length>1}else{this.isDraggable=this.options.draggable}if(this.isDraggable){this.element.classList.add("is-draggable")}else{this.element.classList.remove("is-draggable")}};S.bindDrag=function(){this.options.draggable=true;this.updateDraggable()};S.unbindDrag=function(){this.options.draggable=false;this.updateDraggable()};S._uiChangeDrag=function(){delete this.isFreeScrolling};S.pointerDown=function(t,i){if(!this.isDraggable){this._pointerDownDefault(t,i);return}var s=this.okayPointerDown(t);if(!s){return}this._pointerDownPreventDefault(t);this.pointerDownFocus(t);if(document.activeElement!=this.element){this.pointerDownBlur()}this.dragX=this.x;this.viewport.classList.add("is-pointer-down");this.pointerDownScroll=E();window.addEventListener("scroll",this);this._pointerDownDefault(t,i)};S._pointerDownDefault=function(t,i){this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY};this._bindPostStartEvents(t);this.dispatchEvent("pointerDown",t,[i])};var P={INPUT:true,TEXTAREA:true,SELECT:true};S.pointerDownFocus=function(t){var i=P[t.target.nodeName];if(!i){this.focus()}};S._pointerDownPreventDefault=function(t){var i=t.type=="touchstart";var s=t.pointerType=="touch";var n=P[t.target.nodeName];if(!i&&!s&&!n){t.preventDefault()}};S.hasDragStarted=function(t){return Math.abs(t.x)>this.options.dragThreshold};S.pointerUp=function(t,i){delete this.isTouchScrolling;this.viewport.classList.remove("is-pointer-down");this.dispatchEvent("pointerUp",t,[i]);this._dragPointerUp(t,i)};S.pointerDone=function(){window.removeEventListener("scroll",this);delete this.pointerDownScroll};S.dragStart=function(t,i){if(!this.isDraggable){return}this.dragStartPosition=this.x;this.startAnimation();window.removeEventListener("scroll",this);this.dispatchEvent("dragStart",t,[i])};S.pointerMove=function(t,i){var s=this._dragPointerMove(t,i);this.dispatchEvent("pointerMove",t,[i,s]);this._dragMove(t,i,s)};S.dragMove=function(t,i,s){if(!this.isDraggable){return}t.preventDefault();this.previousDragX=this.dragX;var n=this.options.rightToLeft?-1:1;if(this.options.wrapAround){s.x=s.x%this.slideableWidth}var h=this.dragStartPosition+s.x*n;if(!this.options.wrapAround&&this.slides.length){var e=Math.max(-this.slides[0].target,this.dragStartPosition);h=h>e?(h+e)*.5:h;var r=Math.min(-this.getLastSlide().target,this.dragStartPosition);h=h<r?(h+r)*.5:h}this.dragX=h;this.dragMoveTime=new Date;this.dispatchEvent("dragMove",t,[i,s])};S.dragEnd=function(t,i){if(!this.isDraggable){return}if(this.options.freeScroll){this.isFreeScrolling=true}var s=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){var n=this.getRestingPosition();this.isFreeScrolling=-n>this.slides[0].target&&-n<this.getLastSlide().target}else if(!this.options.freeScroll&&s==this.selectedIndex){s+=this.dragEndBoostSelect()}delete this.previousDragX;this.isDragSelect=this.options.wrapAround;this.select(s);delete this.isDragSelect;this.dispatchEvent("dragEnd",t,[i])};S.dragEndRestingSelect=function(){var t=this.getRestingPosition();var i=Math.abs(this.getSlideDistance(-t,this.selectedIndex));var s=this._getClosestResting(t,i,1);var n=this._getClosestResting(t,i,-1);var h=s.distance<n.distance?s.index:n.index;return h};S._getClosestResting=function(t,i,s){var n=this.selectedIndex;var h=Infinity;var e=this.options.contain&&!this.options.wrapAround?function(t,i){return t<=i}:function(t,i){return t<i};while(e(i,h)){n+=s;h=i;i=this.getSlideDistance(-t,n);if(i===null){break}i=Math.abs(i)}return{distance:h,index:n-s}};S.getSlideDistance=function(t,i){var s=this.slides.length;var n=this.options.wrapAround&&s>1;var h=n?f.modulo(i,s):i;var e=this.slides[h];if(!e){return null}var r=n?this.slideableWidth*Math.floor(i/s):0;return t-(e.target+r)};S.dragEndBoostSelect=function(){if(this.previousDragX===undefined||!this.dragMoveTime||new Date-this.dragMoveTime>100){return 0}var t=this.getSlideDistance(-this.dragX,this.selectedIndex);var i=this.previousDragX-this.dragX;if(t>0&&i>0){return 1}else if(t<0&&i<0){return-1}return 0};S.staticClick=function(t,i){var s=this.getParentCell(t.target);var n=s&&s.element;var h=s&&this.cells.indexOf(s);this.dispatchEvent("staticClick",t,[i,n,h])};S.onscroll=function(){var t=E();var i=this.pointerDownScroll.x-t.x;var s=this.pointerDownScroll.y-t.y;if(Math.abs(i)>3||Math.abs(s)>3){this._pointerDone()}};function E(){return{x:window.pageXOffset,y:window.pageYOffset}}var A="http://www.w3.org/2000/svg";function O(t,i){this.direction=t;this.parent=i;this.parentElement=this.parent.element.shadowRoot||this.parent.element;this._create()}O.prototype=Object.create(M.prototype);O.prototype._create=function(){this.isEnabled=true;this.isPrevious=this.direction==-1;var t=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==t;var i=this.element=document.createElement("button");i.className="flickity-button flickity-prev-next-button";i.className+=this.isPrevious?" previous":" next";i.setAttribute("type","button");this.disable();i.setAttribute("aria-label",this.isPrevious?"Previous":"Next");var s=this.createSVG();i.appendChild(s);this.parent.on("select",this.update.bind(this));this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))};O.prototype.activate=function(){this.bindStartEvent(this.element);this.element.addEventListener("click",this);this.parentElement.appendChild(this.element)};O.prototype.deactivate=function(){this.parentElement.removeChild(this.element);this.unbindStartEvent(this.element);this.element.removeEventListener("click",this)};O.prototype.createSVG=function(){var t=document.createElementNS(A,"svg");t.setAttribute("class","flickity-button-icon");t.setAttribute("viewBox","0 0 100 100");var i=document.createElementNS(A,"path");var s=D(this.parent.options.arrowShape);i.setAttribute("d",s);i.setAttribute("class","arrow");if(!this.isLeft){i.setAttribute("transform","translate(100, 100) rotate(180) ")}t.appendChild(i);return t};function D(t){if(typeof t=="string"){return t}return"M "+t.x0+",50"+" L "+t.x1+","+(t.y1+50)+" L "+t.x2+","+(t.y2+50)+" L "+t.x3+",50 "+" L "+t.x2+","+(50-t.y2)+" L "+t.x1+","+(50-t.y1)+" Z"}O.prototype.handleEvent=f.handleEvent;O.prototype.onclick=function(){if(!this.isEnabled){return}this.parent.uiChange();var t=this.isPrevious?"previous":"next";this.parent[t]()};O.prototype.enable=function(){if(this.isEnabled){return}this.element.disabled=false;this.isEnabled=true};O.prototype.disable=function(){if(!this.isEnabled){return}this.element.disabled=true;this.isEnabled=false};O.prototype.update=function(){var t=this.parent.slides;if(this.parent.options.wrapAround&&t.length>1){this.enable();return}var i=t.length?t.length-1:0;var s=this.isPrevious?0:i;var n=this.parent.selectedIndex==s?"disable":"enable";this[n]()};O.prototype.destroy=function(){this.deactivate();this.allOff()};f.extend(m.defaults,{prevNextButtons:true,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}});m.createMethods.push("_createPrevNextButtons");var j=m.prototype;j._createPrevNextButtons=function(){if(!this.options.prevNextButtons){return}this.prevButton=new O(-1,this);this.nextButton=new O(1,this);this.on("activate",this.activatePrevNextButtons)};j.activatePrevNextButtons=function(){this.prevButton.activate();this.nextButton.activate();this.on("deactivate",this.deactivatePrevNextButtons)};j.deactivatePrevNextButtons=function(){this.prevButton.deactivate();this.nextButton.deactivate();this.off("deactivate",this.deactivatePrevNextButtons)};m.PrevNextButton=O;function R(t){this.parent=t;this.parentElement=this.parent.element.shadowRoot||this.parent.element;this._create()}R.prototype=Object.create(M.prototype);R.prototype._create=function(){this.holder=document.createElement("ol");this.holder.className="flickity-page-dots";this.dots=[];this.handleClick=this.onClick.bind(this);this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))};R.prototype.activate=function(){this.setDots();this.holder.addEventListener("click",this.handleClick);this.bindStartEvent(this.holder);this.parentElement.appendChild(this.holder)};R.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick);this.unbindStartEvent(this.holder);this.parentElement.removeChild(this.holder)};R.prototype.setDots=function(){var t=this.parent.slides.length-this.dots.length;if(t>0){this.addDots(t)}else if(t<0){this.removeDots(-t)}};R.prototype.addDots=function(t){var i=document.createDocumentFragment();var s=[];var n=this.dots.length;var h=n+t;for(var e=n;e<h;e++){var r=document.createElement("li");r.classList.add("dot");r.setAttribute("aria-label","Page dot "+(e+1));i.appendChild(r);s.push(r)}this.holder.appendChild(i);this.dots=this.dots.concat(s)};R.prototype.removeDots=function(t){var i=this.dots.splice(this.dots.length-t,t);i.forEach((function(t){this.holder.removeChild(t)}),this)};R.prototype.updateSelected=function(){if(this.selectedDot){this.selectedDot.classList.remove("is-selected");this.selectedDot.removeAttribute("aria-current")}if(!this.dots.length){return}this.selectedDot=this.dots[this.parent.selectedIndex];this.selectedDot.classList.add("is-selected");this.selectedDot.setAttribute("aria-current","step")};R.prototype.onTap=R.prototype.onClick=function(t){var i=t.target;if(i.nodeName!="LI"){return}this.parent.uiChange();var s=this.dots.indexOf(i);this.parent.select(s)};R.prototype.destroy=function(){this.deactivate();this.allOff()};m.PageDots=R;f.extend(m.defaults,{pageDots:true});m.createMethods.push("_createPageDots");var I=m.prototype;I._createPageDots=function(){if(!this.options.pageDots){return}this.pageDots=new R(this);this.on("activate",this.activatePageDots);this.on("select",this.updateSelectedPageDots);this.on("cellChange",this.updatePageDots);this.on("resize",this.updatePageDots);this.on("deactivate",this.deactivatePageDots)};I.activatePageDots=function(){this.pageDots.activate()};I.updateSelectedPageDots=function(){this.pageDots.updateSelected()};I.updatePageDots=function(){this.pageDots.setDots()};I.deactivatePageDots=function(){this.pageDots.deactivate()};m.PageDots=R;function N(t){this.parent=t;this.state="stopped";this.onVisibilityChange=this.visibilityChange.bind(this);this.onVisibilityPlay=this.visibilityPlay.bind(this)}N.prototype=Object.create(a.prototype);N.prototype.play=function(){if(this.state=="playing"){return}var t=document.hidden;if(t){document.addEventListener("visibilitychange",this.onVisibilityPlay);return}this.state="playing";document.addEventListener("visibilitychange",this.onVisibilityChange);this.tick()};N.prototype.tick=function(){if(this.state!="playing"){return}var t=this.parent.options.autoPlay;t=typeof t=="number"?t:3e3;var i=this;this.clear();this.timeout=setTimeout((function(){i.parent.next(true);i.tick()}),t)};N.prototype.stop=function(){this.state="stopped";this.clear();document.removeEventListener("visibilitychange",this.onVisibilityChange)};N.prototype.clear=function(){clearTimeout(this.timeout)};N.prototype.pause=function(){if(this.state=="playing"){this.state="paused";this.clear()}};N.prototype.unpause=function(){if(this.state=="paused"){this.play()}};N.prototype.visibilityChange=function(){var t=document.hidden;this[t?"pause":"unpause"]()};N.prototype.visibilityPlay=function(){this.play();document.removeEventListener("visibilitychange",this.onVisibilityPlay)};f.extend(m.defaults,{pauseAutoPlayOnHover:true});m.createMethods.push("_createPlayer");var B=m.prototype;B._createPlayer=function(){this.player=new N(this);this.on("activate",this.activatePlayer);this.on("uiChange",this.stopPlayer);this.on("pointerDown",this.stopPlayer);this.on("deactivate",this.deactivatePlayer)};B.activatePlayer=function(){if(!this.options.autoPlay){return}this.player.play();this.element.addEventListener("mouseenter",this)};B.playPlayer=function(){this.player.play()};B.stopPlayer=function(){this.player.stop()};B.pausePlayer=function(){this.player.pause()};B.unpausePlayer=function(){this.player.unpause()};B.deactivatePlayer=function(){this.player.stop();this.element.removeEventListener("mouseenter",this)};B.onmouseenter=function(){if(!this.options.pauseAutoPlayOnHover){return}this.player.pause();this.element.addEventListener("mouseleave",this)};B.onmouseleave=function(){this.player.unpause();this.element.removeEventListener("mouseleave",this)};m.Player=N;function F(t){var i=document.createDocumentFragment();t.forEach((function(t){i.appendChild(t.element)}));return i}var H=m.prototype;H.insert=function(t,i){var s=this._makeCells(t);if(!s||!s.length){return}var n=this.cells.length;i=i===undefined?n:i;var h=F(s);var e=i==n;if(e){this.slider.appendChild(h)}else{var r=this.cells[i].element;this.slider.insertBefore(h,r)}if(i===0){this.cells=s.concat(this.cells)}else if(e){this.cells=this.cells.concat(s)}else{var a=this.cells.splice(i,n-i);this.cells=this.cells.concat(s).concat(a)}this._sizeCells(s);this.cellChange(i,true)};H.append=function(t){this.insert(t,this.cells.length)};H.prepend=function(t){this.insert(t,0)};H.remove=function(t){var i=this.getCells(t);if(!i||!i.length){return}var s=this.cells.length-1;i.forEach((function(t){t.remove();var i=this.cells.indexOf(t);s=Math.min(i,s);f.removeFrom(this.cells,t)}),this);this.cellChange(s,true)};H.cellSizeChange=function(t){var i=this.getCell(t);if(!i){return}i.getSize();var s=this.cells.indexOf(i);this.cellChange(s)};H.cellChange=function(t,i){var s=this.selectedElement;this._positionCells(t);this._getWrapShiftCells();this.setGallerySize();var n=this.getCell(s);if(n){this.selectedIndex=this.getCellSlideIndex(n)}this.selectedIndex=Math.min(this.slides.length-1,this.selectedIndex);this.emitEvent("cellChange",[t]);this.select(this.selectedIndex);if(i){this.positionSliderAtSelected()}};m.createMethods.push("_createLazyload");var _=m.prototype;_._createLazyload=function(){this.on("select",this.lazyLoad)};_.lazyLoad=function(){var t=this.options.lazyLoad;if(!t){return}var i=typeof t=="number"?t:0;var s=this.getAdjacentCellElements(i);var n=[];s.forEach((function(t){var i=W(t);n=n.concat(i)}));n.forEach((function(t){new V(t,this)}),this)};function W(t){if(t.nodeName=="IMG"){var i=t.getAttribute("data-flickity-lazyload");var s=t.getAttribute("data-flickity-lazyload-src");var n=t.getAttribute("data-flickity-lazyload-srcset");if(i||s||n){return[t]}}var h="img[data-flickity-lazyload], "+"img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]";var e=t.querySelectorAll(h);return f.makeArray(e)}function V(t,i){this.img=t;this.flickity=i;this.load()}V.prototype.handleEvent=f.handleEvent;V.prototype.load=function(){this.img.addEventListener("load",this);this.img.addEventListener("error",this);var t=this.img.getAttribute("data-flickity-lazyload")||this.img.getAttribute("data-flickity-lazyload-src");var i=this.img.getAttribute("data-flickity-lazyload-srcset");this.img.src=t;if(i){this.img.setAttribute("srcset",i)}this.img.removeAttribute("data-flickity-lazyload");this.img.removeAttribute("data-flickity-lazyload-src");this.img.removeAttribute("data-flickity-lazyload-srcset")};V.prototype.onload=function(t){this.complete(t,"flickity-lazyloaded")};V.prototype.onerror=function(t){this.complete(t,"flickity-lazyerror")};V.prototype.complete=function(t,i){this.img.removeEventListener("load",this);this.img.removeEventListener("error",this);var s=this.flickity.getParentCell(this.img);var n=s&&s.element;this.flickity.cellSizeChange(n);this.img.classList.add(i);this.flickity.dispatchEvent("lazyLoad",t,n)};m.LazyLoader=V;m.createMethods.push("_createFullscreen");var X=m.prototype;X._createFullscreen=function(){this.isFullscreen=false;if(!this.options.fullscreen){return}this.viewFullscreenButton=new U("view",this);this.exitFullscreenButton=new U("exit",this);this.on("activate",this._changeFullscreenActive);this.on("deactivate",this._changeFullscreenActive)};X._changeFullscreenActive=function(){var t=this.isActive?"appendChild":"removeChild";this.element[t](this.viewFullscreenButton.element);this.element[t](this.exitFullscreenButton.element);var i=this.isActive?"activate":"deactivate";this.viewFullscreenButton[i]();this.exitFullscreenButton[i]()};X.viewFullscreen=function(){this._changeFullscreen(true);this.focus()};X.exitFullscreen=function(){this._changeFullscreen(false)};X._changeFullscreen=function(t){if(this.isFullscreen==t){return}this.isFullscreen=t;var i=t?"add":"remove";document.documentElement.classList[i]("is-flickity-fullscreen");this.element.classList[i]("is-fullscreen");this.resize();if(this.isFullscreen){this.reposition()}this.dispatchEvent("fullscreenChange",null,[t])};X.toggleFullscreen=function(){this._changeFullscreen(!this.isFullscreen)};var Z=X.setGallerySize;X.setGallerySize=function(){if(!this.options.setGallerySize){return}if(this.isFullscreen){this.viewport.style.height=""}else{Z.call(this)}};m.keyboardHandlers[27]=function(){this.exitFullscreen()};function U(t,i){this.name=t;this.createButton();this.createIcon();this.onClick=function(){i[t+"Fullscreen"]()};this.clickHandler=this.onClick.bind(this)}U.prototype.createButton=function(){var t=this.element=document.createElement("button");t.className="flickity-button flickity-fullscreen-button "+"flickity-fullscreen-button-"+this.name;t.setAttribute("type","button");var i=Y(this.name+" full-screen");t.setAttribute("aria-label",i);t.title=i};function Y(t){return t[0].toUpperCase()+t.slice(1)}var G="http://www.w3.org/2000/svg";var J={view:"M15,20,7,28h5v4H0V20H4v5l8-8Zm5-5,8-8v5h4V0H20V4h5l-8,8Z",exit:"M32,3l-7,7h5v4H18V2h4V7l7-7ZM3,32l7-7v5h4V18H2v4H7L0,29Z"};U.prototype.createIcon=function(){var t=document.createElementNS(G,"svg");t.setAttribute("class","flickity-button-icon");t.setAttribute("viewBox","0 0 32 32");var i=document.createElementNS(G,"path");var s=J[this.name];i.setAttribute("d",s);t.appendChild(i);this.element.appendChild(t)};U.prototype.activate=function(){this.element.addEventListener("click",this.clickHandler)};U.prototype.deactivate=function(){this.element.removeEventListener("click",this.clickHandler)};m.FullscreenButton=U;var q=m.Slide;var Q=q.prototype.updateTarget;q.prototype.updateTarget=function(){Q.apply(this,arguments);if(!this.parent.options.fade){return}var t=this.target-this.x;var i=this.cells[0].x;this.cells.forEach((function(s){var n=s.x-i-t;s.renderPosition(n)}))};q.prototype.setOpacity=function(t){this.cells.forEach((function(i){i.element.style.opacity=t}))};var $=m.prototype;m.createMethods.push("_createFade");$._createFade=function(){this.fadeIndex=this.selectedIndex;this.prevSelectedIndex=this.selectedIndex;this.on("select",this.onSelectFade);this.on("dragEnd",this.onDragEndFade);this.on("settle",this.onSettleFade);this.on("activate",this.onActivateFade);this.on("deactivate",this.onDeactivateFade)};var K=$.updateSlides;$.updateSlides=function(){K.apply(this,arguments);if(!this.options.fade){return}this.slides.forEach((function(t,i){var s=i==this.selectedIndex?1:0;t.setOpacity(s)}),this)};$.onSelectFade=function(){this.fadeIndex=Math.min(this.prevSelectedIndex,this.slides.length-1);this.prevSelectedIndex=this.selectedIndex};$.onSettleFade=function(){delete this.didDragEnd;if(!this.options.fade){return}this.selectedSlide.setOpacity(1);var t=this.slides[this.fadeIndex];if(t&&this.fadeIndex!=this.selectedIndex){this.slides[this.fadeIndex].setOpacity(0)}};$.onDragEndFade=function(){this.didDragEnd=true};$.onActivateFade=function(){if(this.options.fade){this.element.classList.add("is-fade")}};$.onDeactivateFade=function(){if(!this.options.fade){return}this.element.classList.remove("is-fade");this.slides.forEach((function(t){t.setOpacity("")}))};var tt=$.positionSlider;$.positionSlider=function(){if(!this.options.fade){tt.apply(this,arguments);return}this.fadeSlides();this.dispatchScrollEvent()};var it=$.positionSliderAtSelected;$.positionSliderAtSelected=function(){if(this.options.fade){this.setTranslateX(0)}it.apply(this,arguments)};$.fadeSlides=function(){if(this.slides.length<2){return}var t=this.getFadeIndexes();var i=this.slides[t.a];var s=this.slides[t.b];var n=this.wrapDifference(i.target,s.target);var h=this.wrapDifference(i.target,-this.x);h=h/n;i.setOpacity(1-h);s.setOpacity(h);var e=t.a;if(this.isDragging){e=h>.5?t.a:t.b}var r=this.fadeHideIndex!=undefined&&this.fadeHideIndex!=e&&this.fadeHideIndex!=t.a&&this.fadeHideIndex!=t.b;if(r){this.slides[this.fadeHideIndex].setOpacity(0)}this.fadeHideIndex=e};$.getFadeIndexes=function(){if(!this.isDragging&&!this.didDragEnd){return{a:this.fadeIndex,b:this.selectedIndex}}if(this.options.wrapAround){return this.getFadeDragWrapIndexes()}else{return this.getFadeDragLimitIndexes()}};$.getFadeDragWrapIndexes=function(){var t=this.slides.map((function(t,i){return this.getSlideDistance(-this.x,i)}),this);var i=t.map((function(t){return Math.abs(t)}));var s=Math.min.apply(Math,i);var n=i.indexOf(s);var h=t[n];var e=this.slides.length;var r=h>=0?1:-1;return{a:n,b:f.modulo(n+r,e)}};$.getFadeDragLimitIndexes=function(){var t=0;for(var i=0;i<this.slides.length-1;i++){var s=this.slides[i];if(-this.x<s.target){break}t=i}return{a:t,b:t+1}};$.wrapDifference=function(t,i){var s=i-t;if(!this.options.wrapAround){return s}var n=s+this.slideableWidth;var h=s-this.slideableWidth;if(Math.abs(n)<Math.abs(s)){s=n}if(Math.abs(h)<Math.abs(s)){s=h}return s};var st=$._getWrapShiftCells;$._getWrapShiftCells=function(){if(!this.options.fade){st.apply(this,arguments)}};var nt=$.shiftWrapCells;$.shiftWrapCells=function(){if(!this.options.fade){nt.apply(this,arguments)}};const ht=m;const et=":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--dot-color:#ccc;--dot-color-active:var(--nano-color-primary, #007495);--navbtns-icon-color:var(--dot-color-active);--navbtns-bg-color:white;--navbtns-icon-color-disabled:var(--dot-color-active);--navbtns-bg-color-disabled:white;--fsbtn-icon-color:var(--dot-color-active);--fsbtn-bg-color:white;display:block;-webkit-user-select:none;user-select:none;overflow:hidden;transition:opacity 0.2s;opacity:0;max-width:100vw}:host([ready]){opacity:1}.slideshow{max-height:100%;min-height:inherit;height:inherit;position:relative}.slideshow.not-ready{max-width:100vw}.flickity-container{opacity:0;transition:opacity 0.2s;display:flex}.not-ready .flickity-container{width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}.flickity-container.slides-ready{min-height:inherit;max-height:inherit;height:inherit;width:auto}[hidden]{display:none !important}.ui-extras{pointer-events:none;position:absolute;block-size:100%;inline-size:100%;inset-block-start:0;inset-inline-start:0}.ui-extras *{pointer-events:all}/*! Flickity v2.2.1\nhttps://flickity.metafizzy.co\n---------------------------------------------- */.flickity-enabled{position:relative;opacity:1}.flickity-enabled:focus{outline:none}.flickity-viewport{overflow:hidden;position:relative;min-block-size:100%;flex:1}.flickity-slider{position:absolute;inline-size:100%;block-size:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:grabbing}.flickity-button{position:absolute;background:var(--navbtns-bg-color);border:none;color:#333;opacity:0.75}.flickity-button:hover{opacity:1;cursor:pointer}.flickity-button:focus{outline:none;box-shadow:0 0 0 5px #19f}.flickity-button:active{opacity:0.6}.flickity-button:disabled{opacity:0.3;cursor:auto;pointer-events:none;background:var(--navbtns-bg-color-disabled)}.flickity-button-icon{fill:var(--navbtns-icon-color)}.flickity-button:disabled .flickity-button-icon{fill:var(--navbtns-icon-color-disabled)}.flickity-prev-next-button{inset-block-start:50%;inline-size:44px;block-size:44px;border-radius:50%;transform:translateY(-50%)}.flickity-prev-next-button.previous{inset-inline-start:10px}.flickity-prev-next-button.next{inset-inline-end:10px}.flickity-rtl .flickity-prev-next-button.previous{inset-inline:auto 10px}.flickity-rtl .flickity-prev-next-button.next{inset-inline:10px auto}.flickity-prev-next-button .flickity-button-icon{position:absolute;inset-inline-start:20%;inset-block-start:20%;inline-size:60%;block-size:60%}.flickity-page-dots{position:absolute;inline-size:100%;inset-block-end:10px;padding:0;margin:0;list-style:none;text-align:center;line-height:1;z-index:4}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{display:inline-block;inline-size:10px;block-size:10px;margin-block:0;margin-inline:8px;border-radius:50%;cursor:pointer;background:var(--dot-color)}.flickity-page-dots .dot.is-selected{opacity:1;background:var(--dot-color-active)}.flickity-enabled.is-fullscreen{position:fixed;inset-inline-start:0;inset-block-start:0;inline-size:100%;block-size:100%;background:rgba(0, 0, 0, 0.9);-webkit-padding-after:35px;padding-block-end:35px;z-index:100}.flickity-enabled.is-fullscreen .flickity-page-dots{inset-block-end:45px}html.is-flickity-fullscreen{overflow:hidden}.flickity-fullscreen-button{display:block;inset-inline-end:10px;inset-block-start:10px;inline-size:24px;block-size:24px;border-radius:4px;background:var(--fsbtn-bg-color);fill:var(--fsbtn-icon-color)}.flickity-rtl .flickity-fullscreen-button{inset-inline:10px auto}.flickity-fullscreen-button-exit{display:none}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-exit{display:block}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-view{display:none}.flickity-fullscreen-button .flickity-button-icon{position:absolute;inline-size:16px;block-size:16px;inset-inline-start:4px;inset-block-start:4px}.flickity-enabled.is-fade .flickity-slider>*{pointer-events:none;z-index:0}.flickity-enabled.is-fade .flickity-slider ::slotted(.is-selected){pointer-events:auto;z-index:1}";const rt=class{constructor(s){t(this,s);this.nanoSlidesDidLoad=i(this,"nanoSlidesDidLoad",7);this.nanoSlidesReady=i(this,"nanoSlidesReady",7);this.nanoSlidesSelect=i(this,"nanoSlidesSelect",7);this.nanoSlidesChange=i(this,"nanoSlidesChange",7);this.nanoSlidesScroll=i(this,"nanoSlidesScroll",7);this.nanoSlidesTransitionEnd=i(this,"nanoSlidesTransitionEnd",7);this.nanoSlidesDragStart=i(this,"nanoSlidesDragStart",7);this.nanoSlidesDragMove=i(this,"nanoSlidesDragMove",7);this.nanoSlidesDragEnd=i(this,"nanoSlidesDragEnd",7);this.nanoSlidesTap=i(this,"nanoSlidesTap",7);this.nanoSlidesFullscreenChange=i(this,"nanoSlidesFullscreenChange",7);this.flickityReady=false;this.flickity=new Promise((t=>{this.readyflickity=t}));this.parralax=async()=>{const t=await this.flickity;t.slides.forEach(((i,s)=>{const n=this.childrenEles[s];const h=(i.target+t.x)*-1/3;n.style["transform"]="translateX("+h+"px)"}))};this.handleFullscreen=t=>{this.fullscreen=t;this.nanoSlidesFullscreenChange.emit(t)};this.handleSlideSelect=t=>{this.iCurrentSlide=t;this.nanoSlidesSelect.emit(t)};this.iCurrentSlide=undefined;this.slidesReady=undefined;this.didInit=false;this.options={};this.navbtns=false;this.pager=false;this.fullscreenbtn=false;this.fullscreen=false;this.animation="scroll";this.currentSlide=0;this.autoplay=false;this.ready=false}async optionsChanged(){if(this.flickityReady){const t=await this.getflickity();Object.assign(t.options,this.options);await this.update()}}async navbtnsChanged(){Array.from(this._getRoot().querySelectorAll(".flickity-prev-next-button")).forEach((t=>{t.hidden=!this.navbtns}))}async pagerChanged(){const t=this._getRoot().querySelector(".flickity-page-dots");t.hidden=!this.pager}async fullscreenBtnChanged(){const t=this._getRoot().querySelector(".flickity-fullscreen-button");t.hidden=!this.fullscreenbtn}async fullscreenChanged(t,i){const s=await this.getflickity();if(this.fullscreen)s.viewFullscreen();else if(typeof i!=="undefined")s.exitFullscreen()}async animationChange(t,i){const[s,n]=await Promise.all([this.getflickity(),at(this.host)]);n.forEach((t=>{t.style["left"]=undefined}));if(i==="parallax"){s.off("scroll",this.parralax);n.forEach(((t,i)=>{if(this.childrenEles&&this.childrenEles[i])this.childrenEles[i].style["transform"]=undefined}));this.update()}switch(this.animation){case"fade":this.options={fade:true,percentPosition:true};break;case"parallax":this.options={fade:false,percentPosition:false};s.on("scroll",this.parralax);break;default:this.options={fade:false,percentPosition:true};break}}currentSlideChange(){if(this.currentSlide!==this.iCurrentSlide)this.slideTo(this.currentSlide)}internalSlideChange(){this.currentSlide=this.iCurrentSlide}async autoPlayChange(){await this.stopAutoplay();if(this.autoplay){if(typeof this.autoplay==="string")this.autoplay=parseInt(this.autoplay);if(this.autoplay>0)this.startAutoplay(this.autoplay)}}async update(){const[t]=await Promise.all([this.getflickity(),at(this.host)]);this.childrenEles=this.host.querySelectorAll("nano-slide > *");t.reloadCells();t.resize();t.reposition()}async updateAutoHeight(t){const i=document.querySelector(".flickity-viewport");if(i)i.style.transition=t+"ms"}async slideTo(t,i){const s=await this.getflickity();s.select(t,i)}async slideNext(t,i){const s=await this.getflickity();s.next(i,t)}async slidePrev(t,i){const s=await this.getflickity();s.previous(t,i)}async getActiveIndex(){const t=await this.getflickity();return t.selectedIndex}async length(){const t=await this.getflickity();return t.slides.length}async isEnd(){const t=await this.getflickity();return t.selectedIndex===t.slides.length-1}async isBeginning(){const t=await this.getflickity();return t.selectedIndex===0}async startAutoplay(t){const i=await this.getflickity();if(t)this.options={autoPlay:t};setTimeout((()=>i.playPlayer()))}async stopAutoplay(){const t=await this.getflickity();t.stopPlayer()}async lockSwipes(t){const i=await this.getflickity();i.options.draggable=!t;i.updateDraggable()}async getflickity(){return this.flickity}async reload(){this.destroyflickity();setTimeout((()=>this.initflickity()),20)}_getRoot(){return this.host.shadowRoot?this.host.shadowRoot:this.host}destroyflickity(){const t=this.syncflickity;if(t!==undefined){t.destroy();this.flickity=new Promise((t=>{this.readyflickity=t}));this.flickityReady=false;this.syncflickity=undefined;this.ready=false}this.didInit=false}async initflickity(){const t=this.normalizeOptions();await at(this.host);this.flickityEl.style.height=this.flickityEl.getBoundingClientRect().height+"px";this.slidesReady=true;this.flickityEl=this.flickityEl||this._getRoot().querySelector(".flickity-container");if(this.flickityEl&&this.flickityEl.classList.contains("flickity-enabled"))this.destroyflickity();setTimeout((()=>{const i=new ht(this.flickityEl,t);this.flickityReady=true;this.syncflickity=i;this.animationChange();this.navbtnsChanged();this.pagerChanged();this.fullscreenChanged();this.fullscreenBtnChanged();this.readyflickity(i);this.ready=true;this.flickityEl.style.height="";if(!this.host.getBoundingClientRect().height){if(!window["ResizeObserver"])return;const t=this.resizeO=new ResizeObserver((()=>{i.resize();this.resizeO.disconnect()}));t.observe(this.host)}}),100)}normalizeOptions(){const t={cellSelector:"nano-slide",contain:true,prevNextButtons:true,fullscreen:true,accessibility:true,imagesLoaded:true,pageDots:true};if(this.animation==="fade"){t.fade=true}if(this.currentSlide>0){t.initialIndex=this.currentSlide}if(this.autoplay){if(typeof this.autoplay==="string")this.autoplay=parseInt(this.autoplay);if(this.autoplay>0)t.autoPlay=this.autoplay}const i={ready:()=>{setTimeout((()=>{this.nanoSlidesReady.emit()}),20)},select:this.handleSlideSelect,change:this.nanoSlidesChange.emit,scroll:this.nanoSlidesScroll.emit,settle:this.nanoSlidesTransitionEnd.emit,dragStart:this.nanoSlidesDragStart.emit,dragMove:this.nanoSlidesDragMove.emit,dragEnd:this.nanoSlidesDragEnd.emit,staticClick:this.nanoSlidesTap.emit,fullscreenChange:this.handleFullscreen};const s=!!this.options&&!!this.options.on?this.options.on:{};const n={on:Object.assign(Object.assign({},s),i)};return Object.assign(Object.assign(Object.assign({},t),n),this.options)}componentDidLoad(){if(typeof window!=="undefined"&&window.MutationObserver){const t=this.mutationO=new MutationObserver((t=>{if(t[0].addedNodes[0]&&t[0].addedNodes[0].nodeName.toLowerCase()==="nano-slide"&&this.flickityReady){this.update()}}));t.observe(this.host,{childList:true,subtree:true})}}componentWillLoad(){this.nanoSlidesDidLoad.emit();if(!this.didInit){this.didInit=true;this.initflickity()}}disconnectedCallback(){if(this.mutationO){this.mutationO.disconnect();this.mutationO=undefined}if(this.resizeO)this.resizeO.disconnect();this.destroyflickity()}render(){return s(n,null,s("div",{class:{slideshow:true,ready:this.ready,"not-ready":!this.ready}},s("div",{ref:t=>this.flickityEl=t,class:{"flickity-container":true,"slides-ready":this.slidesReady,"slides-not-ready":!this.slidesReady}},s("slot",null)),s("div",{class:"ui-extras"},s("slot",{name:"ui"}))))}get host(){return h(this)}static get watchers(){return{options:["optionsChanged"],navbtns:["navbtnsChanged"],pager:["pagerChanged"],fullscreenbtn:["fullscreenBtnChanged"],fullscreen:["fullscreenChanged"],animation:["animationChange"],currentSlide:["currentSlideChange"],iCurrentSlide:["internalSlideChange"],autoplay:["autoPlayChange"]}}};const at=t=>{const i=Array.from(t.querySelectorAll("nano-slide"));let s=i.filter((t=>!t.ready));if(!s.length)return Promise.resolve(i);return new Promise((n=>{const h=e=>{s=s.filter((t=>t!==e.target));if(!s.length){n(i);t.removeEventListener("nanoSlideReady",h)}};t.addEventListener("nanoSlideReady",h);t.addEventListener("nano-slide-ready",h)}))};rt.style=et;export{rt as nano_slides};
|
23
|
-
//# sourceMappingURL=p-
|
22
|
+
(function(i,s){if(t.exports){t.exports=s(i,M)}else{i.Unidragger=s(i,i.Unipointer)}})(window,(function t(i,s){function n(){}var h=n.prototype=Object.create(s.prototype);h.bindHandles=function(){this._bindHandles(true)};h.unbindHandles=function(){this._bindHandles(false)};h._bindHandles=function(t){t=t===undefined?true:t;var s=t?"addEventListener":"removeEventListener";var n=t?this._touchActionValue:"";for(var h=0;h<this.handles.length;h++){var e=this.handles[h];this._bindStartEvent(e,t);e[s]("click",this);if(i.PointerEvent){e.style.touchAction=n}}};h._touchActionValue="none";h.pointerDown=function(t,i){var s=this.okayPointerDown(t);if(!s){return}this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY};t.preventDefault();this.pointerDownBlur();this._bindPostStartEvents(t);this.emitEvent("pointerDown",[t,i])};var e={TEXTAREA:true,INPUT:true,SELECT:true,OPTION:true};var r={radio:true,checkbox:true,button:true,submit:true,image:true,file:true};h.okayPointerDown=function(t){var i=e[t.target.nodeName];var s=r[t.target.type];var n=!i||s;if(!n){this._pointerReset()}return n};h.pointerDownBlur=function(){var t=document.activeElement;var i=t&&t.blur&&t!=document.body;if(i){t.blur()}};h.pointerMove=function(t,i){var s=this._dragPointerMove(t,i);this.emitEvent("pointerMove",[t,i,s]);this._dragMove(t,i,s)};h._dragPointerMove=function(t,i){var s={x:i.pageX-this.pointerDownPointer.pageX,y:i.pageY-this.pointerDownPointer.pageY};if(!this.isDragging&&this.hasDragStarted(s)){this._dragStart(t,i)}return s};h.hasDragStarted=function(t){return Math.abs(t.x)>3||Math.abs(t.y)>3};h.pointerUp=function(t,i){this.emitEvent("pointerUp",[t,i]);this._dragPointerUp(t,i)};h._dragPointerUp=function(t,i){if(this.isDragging){this._dragEnd(t,i)}else{this._staticClick(t,i)}};h._dragStart=function(t,i){this.isDragging=true;this.isPreventingClicks=true;this.dragStart(t,i)};h.dragStart=function(t,i){this.emitEvent("dragStart",[t,i])};h._dragMove=function(t,i,s){if(!this.isDragging){return}this.dragMove(t,i,s)};h.dragMove=function(t,i,s){t.preventDefault();this.emitEvent("dragMove",[t,i,s])};h._dragEnd=function(t,i){this.isDragging=false;setTimeout(function(){delete this.isPreventingClicks}.bind(this));this.dragEnd(t,i)};h.dragEnd=function(t,i){this.emitEvent("dragEnd",[t,i])};h.onclick=function(t){if(this.isPreventingClicks){t.preventDefault()}};h._staticClick=function(t,i){if(this.isIgnoringMouseUp&&t.type=="mouseup"){return}this.staticClick(t,i);if(t.type!="mouseup"){this.isIgnoringMouseUp=true;setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)}};h.staticClick=function(t,i){this.emitEvent("staticClick",[t,i])};n.getPointerPoint=s.getPointerPoint;return n}))}));f.extend(m.defaults,{draggable:">1",dragThreshold:3});m.createMethods.push("_createDrag");var S=m.prototype;f.extend(S,C.prototype);S._touchActionValue="pan-y";var L="createTouch"in document;var T=false;S._createDrag=function(){this.on("activate",this.onActivateDrag);this.on("uiChange",this._uiChangeDrag);this.on("deactivate",this.onDeactivateDrag);this.on("cellChange",this.updateDraggable);if(L&&!T){window.addEventListener("touchmove",(function(){}));T=true}};S.onActivateDrag=function(){this.handles=[this.viewport];this.bindHandles();this.updateDraggable()};S.onDeactivateDrag=function(){this.unbindHandles();this.element.classList.remove("is-draggable")};S.updateDraggable=function(){if(this.options.draggable==">1"){this.isDraggable=this.slides.length>1}else{this.isDraggable=this.options.draggable}if(this.isDraggable){this.element.classList.add("is-draggable")}else{this.element.classList.remove("is-draggable")}};S.bindDrag=function(){this.options.draggable=true;this.updateDraggable()};S.unbindDrag=function(){this.options.draggable=false;this.updateDraggable()};S._uiChangeDrag=function(){delete this.isFreeScrolling};S.pointerDown=function(t,i){if(!this.isDraggable){this._pointerDownDefault(t,i);return}var s=this.okayPointerDown(t);if(!s){return}this._pointerDownPreventDefault(t);this.pointerDownFocus(t);if(document.activeElement!=this.element){this.pointerDownBlur()}this.dragX=this.x;this.viewport.classList.add("is-pointer-down");this.pointerDownScroll=E();window.addEventListener("scroll",this);this._pointerDownDefault(t,i)};S._pointerDownDefault=function(t,i){this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY};this._bindPostStartEvents(t);this.dispatchEvent("pointerDown",t,[i])};var P={INPUT:true,TEXTAREA:true,SELECT:true};S.pointerDownFocus=function(t){var i=P[t.target.nodeName];if(!i){this.focus()}};S._pointerDownPreventDefault=function(t){var i=t.type=="touchstart";var s=t.pointerType=="touch";var n=P[t.target.nodeName];if(!i&&!s&&!n){t.preventDefault()}};S.hasDragStarted=function(t){return Math.abs(t.x)>this.options.dragThreshold};S.pointerUp=function(t,i){delete this.isTouchScrolling;this.viewport.classList.remove("is-pointer-down");this.dispatchEvent("pointerUp",t,[i]);this._dragPointerUp(t,i)};S.pointerDone=function(){window.removeEventListener("scroll",this);delete this.pointerDownScroll};S.dragStart=function(t,i){if(!this.isDraggable){return}this.dragStartPosition=this.x;this.startAnimation();window.removeEventListener("scroll",this);this.dispatchEvent("dragStart",t,[i])};S.pointerMove=function(t,i){var s=this._dragPointerMove(t,i);this.dispatchEvent("pointerMove",t,[i,s]);this._dragMove(t,i,s)};S.dragMove=function(t,i,s){if(!this.isDraggable){return}t.preventDefault();this.previousDragX=this.dragX;var n=this.options.rightToLeft?-1:1;if(this.options.wrapAround){s.x=s.x%this.slideableWidth}var h=this.dragStartPosition+s.x*n;if(!this.options.wrapAround&&this.slides.length){var e=Math.max(-this.slides[0].target,this.dragStartPosition);h=h>e?(h+e)*.5:h;var r=Math.min(-this.getLastSlide().target,this.dragStartPosition);h=h<r?(h+r)*.5:h}this.dragX=h;this.dragMoveTime=new Date;this.dispatchEvent("dragMove",t,[i,s])};S.dragEnd=function(t,i){if(!this.isDraggable){return}if(this.options.freeScroll){this.isFreeScrolling=true}var s=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){var n=this.getRestingPosition();this.isFreeScrolling=-n>this.slides[0].target&&-n<this.getLastSlide().target}else if(!this.options.freeScroll&&s==this.selectedIndex){s+=this.dragEndBoostSelect()}delete this.previousDragX;this.isDragSelect=this.options.wrapAround;this.select(s);delete this.isDragSelect;this.dispatchEvent("dragEnd",t,[i])};S.dragEndRestingSelect=function(){var t=this.getRestingPosition();var i=Math.abs(this.getSlideDistance(-t,this.selectedIndex));var s=this._getClosestResting(t,i,1);var n=this._getClosestResting(t,i,-1);var h=s.distance<n.distance?s.index:n.index;return h};S._getClosestResting=function(t,i,s){var n=this.selectedIndex;var h=Infinity;var e=this.options.contain&&!this.options.wrapAround?function(t,i){return t<=i}:function(t,i){return t<i};while(e(i,h)){n+=s;h=i;i=this.getSlideDistance(-t,n);if(i===null){break}i=Math.abs(i)}return{distance:h,index:n-s}};S.getSlideDistance=function(t,i){var s=this.slides.length;var n=this.options.wrapAround&&s>1;var h=n?f.modulo(i,s):i;var e=this.slides[h];if(!e){return null}var r=n?this.slideableWidth*Math.floor(i/s):0;return t-(e.target+r)};S.dragEndBoostSelect=function(){if(this.previousDragX===undefined||!this.dragMoveTime||new Date-this.dragMoveTime>100){return 0}var t=this.getSlideDistance(-this.dragX,this.selectedIndex);var i=this.previousDragX-this.dragX;if(t>0&&i>0){return 1}else if(t<0&&i<0){return-1}return 0};S.staticClick=function(t,i){var s=this.getParentCell(t.target);var n=s&&s.element;var h=s&&this.cells.indexOf(s);this.dispatchEvent("staticClick",t,[i,n,h])};S.onscroll=function(){var t=E();var i=this.pointerDownScroll.x-t.x;var s=this.pointerDownScroll.y-t.y;if(Math.abs(i)>3||Math.abs(s)>3){this._pointerDone()}};function E(){return{x:window.pageXOffset,y:window.pageYOffset}}var A="http://www.w3.org/2000/svg";function O(t,i){this.direction=t;this.parent=i;this.parentElement=this.parent.element.shadowRoot||this.parent.element;this._create()}O.prototype=Object.create(M.prototype);O.prototype._create=function(){this.isEnabled=true;this.isPrevious=this.direction==-1;var t=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==t;var i=this.element=document.createElement("button");i.className="flickity-button flickity-prev-next-button";i.className+=this.isPrevious?" previous":" next";i.setAttribute("type","button");this.disable();i.setAttribute("aria-label",this.isPrevious?"Previous":"Next");var s=this.createSVG();i.appendChild(s);this.parent.on("select",this.update.bind(this));this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))};O.prototype.activate=function(){this.bindStartEvent(this.element);this.element.addEventListener("click",this);this.parentElement.appendChild(this.element)};O.prototype.deactivate=function(){this.parentElement.removeChild(this.element);this.unbindStartEvent(this.element);this.element.removeEventListener("click",this)};O.prototype.createSVG=function(){var t=document.createElementNS(A,"svg");t.setAttribute("class","flickity-button-icon");t.setAttribute("viewBox","0 0 100 100");var i=document.createElementNS(A,"path");var s=D(this.parent.options.arrowShape);i.setAttribute("d",s);i.setAttribute("class","arrow");if(!this.isLeft){i.setAttribute("transform","translate(100, 100) rotate(180) ")}t.appendChild(i);return t};function D(t){if(typeof t=="string"){return t}return"M "+t.x0+",50"+" L "+t.x1+","+(t.y1+50)+" L "+t.x2+","+(t.y2+50)+" L "+t.x3+",50 "+" L "+t.x2+","+(50-t.y2)+" L "+t.x1+","+(50-t.y1)+" Z"}O.prototype.handleEvent=f.handleEvent;O.prototype.onclick=function(){if(!this.isEnabled){return}this.parent.uiChange();var t=this.isPrevious?"previous":"next";this.parent[t]()};O.prototype.enable=function(){if(this.isEnabled){return}this.element.disabled=false;this.isEnabled=true};O.prototype.disable=function(){if(!this.isEnabled){return}this.element.disabled=true;this.isEnabled=false};O.prototype.update=function(){var t=this.parent.slides;if(this.parent.options.wrapAround&&t.length>1){this.enable();return}var i=t.length?t.length-1:0;var s=this.isPrevious?0:i;var n=this.parent.selectedIndex==s?"disable":"enable";this[n]()};O.prototype.destroy=function(){this.deactivate();this.allOff()};f.extend(m.defaults,{prevNextButtons:true,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}});m.createMethods.push("_createPrevNextButtons");var j=m.prototype;j._createPrevNextButtons=function(){if(!this.options.prevNextButtons){return}this.prevButton=new O(-1,this);this.nextButton=new O(1,this);this.on("activate",this.activatePrevNextButtons)};j.activatePrevNextButtons=function(){this.prevButton.activate();this.nextButton.activate();this.on("deactivate",this.deactivatePrevNextButtons)};j.deactivatePrevNextButtons=function(){this.prevButton.deactivate();this.nextButton.deactivate();this.off("deactivate",this.deactivatePrevNextButtons)};m.PrevNextButton=O;function R(t){this.parent=t;this.parentElement=this.parent.element.shadowRoot||this.parent.element;this._create()}R.prototype=Object.create(M.prototype);R.prototype._create=function(){this.holder=document.createElement("ol");this.holder.className="flickity-page-dots";this.dots=[];this.handleClick=this.onClick.bind(this);this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))};R.prototype.activate=function(){this.setDots();this.holder.addEventListener("click",this.handleClick);this.bindStartEvent(this.holder);this.parentElement.appendChild(this.holder)};R.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick);this.unbindStartEvent(this.holder);this.parentElement.removeChild(this.holder)};R.prototype.setDots=function(){var t=this.parent.slides.length-this.dots.length;if(t>0){this.addDots(t)}else if(t<0){this.removeDots(-t)}};R.prototype.addDots=function(t){var i=document.createDocumentFragment();var s=[];var n=this.dots.length;var h=n+t;for(var e=n;e<h;e++){var r=document.createElement("li");r.classList.add("dot");r.setAttribute("aria-label","Page dot "+(e+1));i.appendChild(r);s.push(r)}this.holder.appendChild(i);this.dots=this.dots.concat(s)};R.prototype.removeDots=function(t){var i=this.dots.splice(this.dots.length-t,t);i.forEach((function(t){this.holder.removeChild(t)}),this)};R.prototype.updateSelected=function(){if(this.selectedDot){this.selectedDot.classList.remove("is-selected");this.selectedDot.removeAttribute("aria-current")}if(!this.dots.length){return}this.selectedDot=this.dots[this.parent.selectedIndex];this.selectedDot.classList.add("is-selected");this.selectedDot.setAttribute("aria-current","step")};R.prototype.onTap=R.prototype.onClick=function(t){var i=t.target;if(i.nodeName!="LI"){return}this.parent.uiChange();var s=this.dots.indexOf(i);this.parent.select(s)};R.prototype.destroy=function(){this.deactivate();this.allOff()};m.PageDots=R;f.extend(m.defaults,{pageDots:true});m.createMethods.push("_createPageDots");var I=m.prototype;I._createPageDots=function(){if(!this.options.pageDots){return}this.pageDots=new R(this);this.on("activate",this.activatePageDots);this.on("select",this.updateSelectedPageDots);this.on("cellChange",this.updatePageDots);this.on("resize",this.updatePageDots);this.on("deactivate",this.deactivatePageDots)};I.activatePageDots=function(){this.pageDots.activate()};I.updateSelectedPageDots=function(){this.pageDots.updateSelected()};I.updatePageDots=function(){this.pageDots.setDots()};I.deactivatePageDots=function(){this.pageDots.deactivate()};m.PageDots=R;function N(t){this.parent=t;this.state="stopped";this.onVisibilityChange=this.visibilityChange.bind(this);this.onVisibilityPlay=this.visibilityPlay.bind(this)}N.prototype=Object.create(a.prototype);N.prototype.play=function(){if(this.state=="playing"){return}var t=document.hidden;if(t){document.addEventListener("visibilitychange",this.onVisibilityPlay);return}this.state="playing";document.addEventListener("visibilitychange",this.onVisibilityChange);this.tick()};N.prototype.tick=function(){if(this.state!="playing"){return}var t=this.parent.options.autoPlay;t=typeof t=="number"?t:3e3;var i=this;this.clear();this.timeout=setTimeout((function(){i.parent.next(true);i.tick()}),t)};N.prototype.stop=function(){this.state="stopped";this.clear();document.removeEventListener("visibilitychange",this.onVisibilityChange)};N.prototype.clear=function(){clearTimeout(this.timeout)};N.prototype.pause=function(){if(this.state=="playing"){this.state="paused";this.clear()}};N.prototype.unpause=function(){if(this.state=="paused"){this.play()}};N.prototype.visibilityChange=function(){var t=document.hidden;this[t?"pause":"unpause"]()};N.prototype.visibilityPlay=function(){this.play();document.removeEventListener("visibilitychange",this.onVisibilityPlay)};f.extend(m.defaults,{pauseAutoPlayOnHover:true});m.createMethods.push("_createPlayer");var B=m.prototype;B._createPlayer=function(){this.player=new N(this);this.on("activate",this.activatePlayer);this.on("uiChange",this.stopPlayer);this.on("pointerDown",this.stopPlayer);this.on("deactivate",this.deactivatePlayer)};B.activatePlayer=function(){if(!this.options.autoPlay){return}this.player.play();this.element.addEventListener("mouseenter",this)};B.playPlayer=function(){this.player.play()};B.stopPlayer=function(){this.player.stop()};B.pausePlayer=function(){this.player.pause()};B.unpausePlayer=function(){this.player.unpause()};B.deactivatePlayer=function(){this.player.stop();this.element.removeEventListener("mouseenter",this)};B.onmouseenter=function(){if(!this.options.pauseAutoPlayOnHover){return}this.player.pause();this.element.addEventListener("mouseleave",this)};B.onmouseleave=function(){this.player.unpause();this.element.removeEventListener("mouseleave",this)};m.Player=N;function F(t){var i=document.createDocumentFragment();t.forEach((function(t){i.appendChild(t.element)}));return i}var H=m.prototype;H.insert=function(t,i){var s=this._makeCells(t);if(!s||!s.length){return}var n=this.cells.length;i=i===undefined?n:i;var h=F(s);var e=i==n;if(e){this.slider.appendChild(h)}else{var r=this.cells[i].element;this.slider.insertBefore(h,r)}if(i===0){this.cells=s.concat(this.cells)}else if(e){this.cells=this.cells.concat(s)}else{var a=this.cells.splice(i,n-i);this.cells=this.cells.concat(s).concat(a)}this._sizeCells(s);this.cellChange(i,true)};H.append=function(t){this.insert(t,this.cells.length)};H.prepend=function(t){this.insert(t,0)};H.remove=function(t){var i=this.getCells(t);if(!i||!i.length){return}var s=this.cells.length-1;i.forEach((function(t){t.remove();var i=this.cells.indexOf(t);s=Math.min(i,s);f.removeFrom(this.cells,t)}),this);this.cellChange(s,true)};H.cellSizeChange=function(t){var i=this.getCell(t);if(!i){return}i.getSize();var s=this.cells.indexOf(i);this.cellChange(s)};H.cellChange=function(t,i){var s=this.selectedElement;this._positionCells(t);this._getWrapShiftCells();this.setGallerySize();var n=this.getCell(s);if(n){this.selectedIndex=this.getCellSlideIndex(n)}this.selectedIndex=Math.min(this.slides.length-1,this.selectedIndex);this.emitEvent("cellChange",[t]);this.select(this.selectedIndex);if(i){this.positionSliderAtSelected()}};m.createMethods.push("_createLazyload");var _=m.prototype;_._createLazyload=function(){this.on("select",this.lazyLoad)};_.lazyLoad=function(){var t=this.options.lazyLoad;if(!t){return}var i=typeof t=="number"?t:0;var s=this.getAdjacentCellElements(i);var n=[];s.forEach((function(t){var i=W(t);n=n.concat(i)}));n.forEach((function(t){new V(t,this)}),this)};function W(t){if(t.nodeName=="IMG"){var i=t.getAttribute("data-flickity-lazyload");var s=t.getAttribute("data-flickity-lazyload-src");var n=t.getAttribute("data-flickity-lazyload-srcset");if(i||s||n){return[t]}}var h="img[data-flickity-lazyload], "+"img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]";var e=t.querySelectorAll(h);return f.makeArray(e)}function V(t,i){this.img=t;this.flickity=i;this.load()}V.prototype.handleEvent=f.handleEvent;V.prototype.load=function(){this.img.addEventListener("load",this);this.img.addEventListener("error",this);var t=this.img.getAttribute("data-flickity-lazyload")||this.img.getAttribute("data-flickity-lazyload-src");var i=this.img.getAttribute("data-flickity-lazyload-srcset");this.img.src=t;if(i){this.img.setAttribute("srcset",i)}this.img.removeAttribute("data-flickity-lazyload");this.img.removeAttribute("data-flickity-lazyload-src");this.img.removeAttribute("data-flickity-lazyload-srcset")};V.prototype.onload=function(t){this.complete(t,"flickity-lazyloaded")};V.prototype.onerror=function(t){this.complete(t,"flickity-lazyerror")};V.prototype.complete=function(t,i){this.img.removeEventListener("load",this);this.img.removeEventListener("error",this);var s=this.flickity.getParentCell(this.img);var n=s&&s.element;this.flickity.cellSizeChange(n);this.img.classList.add(i);this.flickity.dispatchEvent("lazyLoad",t,n)};m.LazyLoader=V;m.createMethods.push("_createFullscreen");var X=m.prototype;X._createFullscreen=function(){this.isFullscreen=false;if(!this.options.fullscreen){return}this.viewFullscreenButton=new U("view",this);this.exitFullscreenButton=new U("exit",this);this.on("activate",this._changeFullscreenActive);this.on("deactivate",this._changeFullscreenActive)};X._changeFullscreenActive=function(){var t=this.isActive?"appendChild":"removeChild";this.element[t](this.viewFullscreenButton.element);this.element[t](this.exitFullscreenButton.element);var i=this.isActive?"activate":"deactivate";this.viewFullscreenButton[i]();this.exitFullscreenButton[i]()};X.viewFullscreen=function(){this._changeFullscreen(true);this.focus()};X.exitFullscreen=function(){this._changeFullscreen(false)};X._changeFullscreen=function(t){if(this.isFullscreen==t){return}this.isFullscreen=t;var i=t?"add":"remove";document.documentElement.classList[i]("is-flickity-fullscreen");this.element.classList[i]("is-fullscreen");this.resize();if(this.isFullscreen){this.reposition()}this.dispatchEvent("fullscreenChange",null,[t])};X.toggleFullscreen=function(){this._changeFullscreen(!this.isFullscreen)};var Z=X.setGallerySize;X.setGallerySize=function(){if(!this.options.setGallerySize){return}if(this.isFullscreen){this.viewport.style.height=""}else{Z.call(this)}};m.keyboardHandlers[27]=function(){this.exitFullscreen()};function U(t,i){this.name=t;this.createButton();this.createIcon();this.onClick=function(){i[t+"Fullscreen"]()};this.clickHandler=this.onClick.bind(this)}U.prototype.createButton=function(){var t=this.element=document.createElement("button");t.className="flickity-button flickity-fullscreen-button "+"flickity-fullscreen-button-"+this.name;t.setAttribute("type","button");var i=Y(this.name+" full-screen");t.setAttribute("aria-label",i);t.title=i};function Y(t){return t[0].toUpperCase()+t.slice(1)}var G="http://www.w3.org/2000/svg";var J={view:"M15,20,7,28h5v4H0V20H4v5l8-8Zm5-5,8-8v5h4V0H20V4h5l-8,8Z",exit:"M32,3l-7,7h5v4H18V2h4V7l7-7ZM3,32l7-7v5h4V18H2v4H7L0,29Z"};U.prototype.createIcon=function(){var t=document.createElementNS(G,"svg");t.setAttribute("class","flickity-button-icon");t.setAttribute("viewBox","0 0 32 32");var i=document.createElementNS(G,"path");var s=J[this.name];i.setAttribute("d",s);t.appendChild(i);this.element.appendChild(t)};U.prototype.activate=function(){this.element.addEventListener("click",this.clickHandler)};U.prototype.deactivate=function(){this.element.removeEventListener("click",this.clickHandler)};m.FullscreenButton=U;var q=m.Slide;var Q=q.prototype.updateTarget;q.prototype.updateTarget=function(){Q.apply(this,arguments);if(!this.parent.options.fade){return}var t=this.target-this.x;var i=this.cells[0].x;this.cells.forEach((function(s){var n=s.x-i-t;s.renderPosition(n)}))};q.prototype.setOpacity=function(t){this.cells.forEach((function(i){i.element.style.opacity=t}))};var $=m.prototype;m.createMethods.push("_createFade");$._createFade=function(){this.fadeIndex=this.selectedIndex;this.prevSelectedIndex=this.selectedIndex;this.on("select",this.onSelectFade);this.on("dragEnd",this.onDragEndFade);this.on("settle",this.onSettleFade);this.on("activate",this.onActivateFade);this.on("deactivate",this.onDeactivateFade)};var K=$.updateSlides;$.updateSlides=function(){K.apply(this,arguments);if(!this.options.fade){return}this.slides.forEach((function(t,i){var s=i==this.selectedIndex?1:0;t.setOpacity(s)}),this)};$.onSelectFade=function(){this.fadeIndex=Math.min(this.prevSelectedIndex,this.slides.length-1);this.prevSelectedIndex=this.selectedIndex};$.onSettleFade=function(){delete this.didDragEnd;if(!this.options.fade){return}this.selectedSlide.setOpacity(1);var t=this.slides[this.fadeIndex];if(t&&this.fadeIndex!=this.selectedIndex){this.slides[this.fadeIndex].setOpacity(0)}};$.onDragEndFade=function(){this.didDragEnd=true};$.onActivateFade=function(){if(this.options.fade){this.element.classList.add("is-fade")}};$.onDeactivateFade=function(){if(!this.options.fade){return}this.element.classList.remove("is-fade");this.slides.forEach((function(t){t.setOpacity("")}))};var tt=$.positionSlider;$.positionSlider=function(){if(!this.options.fade){tt.apply(this,arguments);return}this.fadeSlides();this.dispatchScrollEvent()};var it=$.positionSliderAtSelected;$.positionSliderAtSelected=function(){if(this.options.fade){this.setTranslateX(0)}it.apply(this,arguments)};$.fadeSlides=function(){if(this.slides.length<2){return}var t=this.getFadeIndexes();var i=this.slides[t.a];var s=this.slides[t.b];var n=this.wrapDifference(i.target,s.target);var h=this.wrapDifference(i.target,-this.x);h=h/n;i.setOpacity(1-h);s.setOpacity(h);var e=t.a;if(this.isDragging){e=h>.5?t.a:t.b}var r=this.fadeHideIndex!=undefined&&this.fadeHideIndex!=e&&this.fadeHideIndex!=t.a&&this.fadeHideIndex!=t.b;if(r){this.slides[this.fadeHideIndex].setOpacity(0)}this.fadeHideIndex=e};$.getFadeIndexes=function(){if(!this.isDragging&&!this.didDragEnd){return{a:this.fadeIndex,b:this.selectedIndex}}if(this.options.wrapAround){return this.getFadeDragWrapIndexes()}else{return this.getFadeDragLimitIndexes()}};$.getFadeDragWrapIndexes=function(){var t=this.slides.map((function(t,i){return this.getSlideDistance(-this.x,i)}),this);var i=t.map((function(t){return Math.abs(t)}));var s=Math.min.apply(Math,i);var n=i.indexOf(s);var h=t[n];var e=this.slides.length;var r=h>=0?1:-1;return{a:n,b:f.modulo(n+r,e)}};$.getFadeDragLimitIndexes=function(){var t=0;for(var i=0;i<this.slides.length-1;i++){var s=this.slides[i];if(-this.x<s.target){break}t=i}return{a:t,b:t+1}};$.wrapDifference=function(t,i){var s=i-t;if(!this.options.wrapAround){return s}var n=s+this.slideableWidth;var h=s-this.slideableWidth;if(Math.abs(n)<Math.abs(s)){s=n}if(Math.abs(h)<Math.abs(s)){s=h}return s};var st=$._getWrapShiftCells;$._getWrapShiftCells=function(){if(!this.options.fade){st.apply(this,arguments)}};var nt=$.shiftWrapCells;$.shiftWrapCells=function(){if(!this.options.fade){nt.apply(this,arguments)}};const ht=m;const et=":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--dot-color:#ccc;--dot-color-active:var(--nano-color-primary, #007495);--navbtns-icon-color:var(--dot-color-active);--navbtns-bg-color:white;--navbtns-icon-color-disabled:var(--dot-color-active);--navbtns-bg-color-disabled:white;--fsbtn-icon-color:var(--dot-color-active);--fsbtn-bg-color:white;display:block;-webkit-user-select:none;user-select:none;overflow:hidden;transition:opacity 0.2s;opacity:0;max-width:100vw}:host([ready]){opacity:1}.slideshow{max-height:100%;min-height:inherit;height:inherit;position:relative}.slideshow.not-ready{max-width:98vw}.flickity-container{opacity:0;transition:opacity 0.2s;display:flex;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}.not-ready .flickity-container{width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}.flickity-container.slides-ready{min-height:inherit;max-height:inherit;height:inherit;width:auto}[hidden]{display:none !important}.ui-extras{pointer-events:none;position:absolute;block-size:100%;inline-size:100%;inset-block-start:0;inset-inline-start:0}.ui-extras *{pointer-events:all}/*! Flickity v2.2.1\nhttps://flickity.metafizzy.co\n---------------------------------------------- */.flickity-enabled{position:relative;opacity:1}.flickity-enabled:focus{outline:none}.flickity-viewport{overflow:hidden;position:relative;min-block-size:100%;flex:1}.flickity-slider{position:absolute;inline-size:100%;block-size:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:grabbing}.flickity-button{position:absolute;background:var(--navbtns-bg-color);border:none;color:#333;opacity:0.75}.flickity-button:hover{opacity:1;cursor:pointer}.flickity-button:focus{outline:none;box-shadow:0 0 0 5px #19f}.flickity-button:active{opacity:0.6}.flickity-button:disabled{opacity:0.3;cursor:auto;pointer-events:none;background:var(--navbtns-bg-color-disabled)}.flickity-button-icon{fill:var(--navbtns-icon-color)}.flickity-button:disabled .flickity-button-icon{fill:var(--navbtns-icon-color-disabled)}.flickity-prev-next-button{inset-block-start:50%;inline-size:44px;block-size:44px;border-radius:50%;transform:translateY(-50%)}.flickity-prev-next-button.previous{inset-inline-start:10px}.flickity-prev-next-button.next{inset-inline-end:10px}.flickity-rtl .flickity-prev-next-button.previous{inset-inline:auto 10px}.flickity-rtl .flickity-prev-next-button.next{inset-inline:10px auto}.flickity-prev-next-button .flickity-button-icon{position:absolute;inset-inline-start:20%;inset-block-start:20%;inline-size:60%;block-size:60%}.flickity-page-dots{position:absolute;inline-size:100%;inset-block-end:10px;padding:0;margin:0;list-style:none;text-align:center;line-height:1;z-index:4}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{display:inline-block;inline-size:10px;block-size:10px;margin-block:0;margin-inline:8px;border-radius:50%;cursor:pointer;background:var(--dot-color)}.flickity-page-dots .dot.is-selected{opacity:1;background:var(--dot-color-active)}.flickity-enabled.is-fullscreen{position:fixed;inset-inline-start:0;inset-block-start:0;inline-size:100%;block-size:100%;background:rgba(0, 0, 0, 0.9);-webkit-padding-after:35px;padding-block-end:35px;z-index:100}.flickity-enabled.is-fullscreen .flickity-page-dots{inset-block-end:45px}html.is-flickity-fullscreen{overflow:hidden}.flickity-fullscreen-button{display:block;inset-inline-end:10px;inset-block-start:10px;inline-size:24px;block-size:24px;border-radius:4px;background:var(--fsbtn-bg-color);fill:var(--fsbtn-icon-color)}.flickity-rtl .flickity-fullscreen-button{inset-inline:10px auto}.flickity-fullscreen-button-exit{display:none}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-exit{display:block}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-view{display:none}.flickity-fullscreen-button .flickity-button-icon{position:absolute;inline-size:16px;block-size:16px;inset-inline-start:4px;inset-block-start:4px}.flickity-enabled.is-fade .flickity-slider>*{pointer-events:none;z-index:0}.flickity-enabled.is-fade .flickity-slider ::slotted(.is-selected){pointer-events:auto;z-index:1}";const rt=class{constructor(s){t(this,s);this.nanoSlidesDidLoad=i(this,"nanoSlidesDidLoad",7);this.nanoSlidesReady=i(this,"nanoSlidesReady",7);this.nanoSlidesSelect=i(this,"nanoSlidesSelect",7);this.nanoSlidesChange=i(this,"nanoSlidesChange",7);this.nanoSlidesScroll=i(this,"nanoSlidesScroll",7);this.nanoSlidesTransitionEnd=i(this,"nanoSlidesTransitionEnd",7);this.nanoSlidesDragStart=i(this,"nanoSlidesDragStart",7);this.nanoSlidesDragMove=i(this,"nanoSlidesDragMove",7);this.nanoSlidesDragEnd=i(this,"nanoSlidesDragEnd",7);this.nanoSlidesTap=i(this,"nanoSlidesTap",7);this.nanoSlidesFullscreenChange=i(this,"nanoSlidesFullscreenChange",7);this.flickityReady=false;this.flickity=new Promise((t=>{this.readyflickity=t}));this.parralax=async()=>{const t=await this.flickity;t.slides.forEach(((i,s)=>{const n=this.childrenEles[s];const h=(i.target+t.x)*-1/3;n.style["transform"]="translateX("+h+"px)"}))};this.handleFullscreen=t=>{this.fullscreen=t;this.nanoSlidesFullscreenChange.emit(t)};this.handleSlideSelect=t=>{this.iCurrentSlide=t;this.nanoSlidesSelect.emit(t)};this.iCurrentSlide=undefined;this.slidesReady=undefined;this.didInit=false;this.options={};this.navbtns=false;this.pager=false;this.fullscreenbtn=false;this.fullscreen=false;this.animation="scroll";this.currentSlide=0;this.autoplay=false;this.ready=false}async optionsChanged(){if(this.flickityReady){const t=await this.getflickity();Object.assign(t.options,this.options);await this.update()}}async navbtnsChanged(){Array.from(this._getRoot().querySelectorAll(".flickity-prev-next-button")).forEach((t=>{t.hidden=!this.navbtns}))}async pagerChanged(){const t=this._getRoot().querySelector(".flickity-page-dots");t.hidden=!this.pager}async fullscreenBtnChanged(){const t=this._getRoot().querySelector(".flickity-fullscreen-button");t.hidden=!this.fullscreenbtn}async fullscreenChanged(t,i){const s=await this.getflickity();if(this.fullscreen)s.viewFullscreen();else if(typeof i!=="undefined")s.exitFullscreen()}async animationChange(t,i){const[s,n]=await Promise.all([this.getflickity(),at(this.host)]);n.forEach((t=>{t.style["left"]=undefined}));if(i==="parallax"){s.off("scroll",this.parralax);n.forEach(((t,i)=>{if(this.childrenEles&&this.childrenEles[i])this.childrenEles[i].style["transform"]=undefined}));this.update()}switch(this.animation){case"fade":this.options={fade:true,percentPosition:true};break;case"parallax":this.options={fade:false,percentPosition:false};s.on("scroll",this.parralax);break;default:this.options={fade:false,percentPosition:true};break}}currentSlideChange(){if(this.currentSlide!==this.iCurrentSlide)this.slideTo(this.currentSlide)}internalSlideChange(){this.currentSlide=this.iCurrentSlide}async autoPlayChange(){await this.stopAutoplay();if(this.autoplay){if(typeof this.autoplay==="string")this.autoplay=parseInt(this.autoplay);if(this.autoplay>0)this.startAutoplay(this.autoplay)}}async update(){const[t]=await Promise.all([this.getflickity(),at(this.host)]);this.childrenEles=this.host.querySelectorAll("nano-slide > *");t.reloadCells();t.resize();t.reposition()}async updateAutoHeight(t){const i=document.querySelector(".flickity-viewport");if(i)i.style.transition=t+"ms"}async slideTo(t,i){const s=await this.getflickity();s.select(t,i)}async slideNext(t,i){const s=await this.getflickity();s.next(i,t)}async slidePrev(t,i){const s=await this.getflickity();s.previous(t,i)}async getActiveIndex(){const t=await this.getflickity();return t.selectedIndex}async length(){const t=await this.getflickity();return t.slides.length}async isEnd(){const t=await this.getflickity();return t.selectedIndex===t.slides.length-1}async isBeginning(){const t=await this.getflickity();return t.selectedIndex===0}async startAutoplay(t){const i=await this.getflickity();if(t)this.options={autoPlay:t};setTimeout((()=>i.playPlayer()))}async stopAutoplay(){const t=await this.getflickity();t.stopPlayer()}async lockSwipes(t){const i=await this.getflickity();i.options.draggable=!t;i.updateDraggable()}async getflickity(){return this.flickity}async reload(){this.destroyflickity();setTimeout((()=>this.initflickity()),20)}_getRoot(){return this.host.shadowRoot?this.host.shadowRoot:this.host}destroyflickity(){const t=this.syncflickity;if(t!==undefined){t.destroy();this.flickity=new Promise((t=>{this.readyflickity=t}));this.flickityReady=false;this.syncflickity=undefined;this.ready=false}this.didInit=false}async initflickity(){const t=this.normalizeOptions();await at(this.host);this.flickityEl.style.height=this.flickityEl.getBoundingClientRect().height+"px";this.slidesReady=true;this.flickityEl=this.flickityEl||this._getRoot().querySelector(".flickity-container");if(this.flickityEl&&this.flickityEl.classList.contains("flickity-enabled"))this.destroyflickity();setTimeout((()=>{this.flickityEl.style.height="";const i=new ht(this.flickityEl,t);this.flickityReady=true;this.syncflickity=i;this.animationChange();this.navbtnsChanged();this.pagerChanged();this.fullscreenChanged();this.fullscreenBtnChanged();this.readyflickity(i);this.ready=true;if(!window["ResizeObserver"])return;const s=this.resizeO=new ResizeObserver((()=>{i.resize()}));s.observe(this.host)}),100)}normalizeOptions(){const t={cellSelector:"nano-slide",contain:true,prevNextButtons:true,fullscreen:true,accessibility:true,imagesLoaded:true,pageDots:true};if(this.animation==="fade"){t.fade=true}if(this.currentSlide>0){t.initialIndex=this.currentSlide}if(this.autoplay){if(typeof this.autoplay==="string")this.autoplay=parseInt(this.autoplay);if(this.autoplay>0)t.autoPlay=this.autoplay}const i={ready:()=>{setTimeout((()=>{this.nanoSlidesReady.emit()}),20)},select:this.handleSlideSelect,change:this.nanoSlidesChange.emit,scroll:this.nanoSlidesScroll.emit,settle:this.nanoSlidesTransitionEnd.emit,dragStart:this.nanoSlidesDragStart.emit,dragMove:this.nanoSlidesDragMove.emit,dragEnd:this.nanoSlidesDragEnd.emit,staticClick:this.nanoSlidesTap.emit,fullscreenChange:this.handleFullscreen};const s=!!this.options&&!!this.options.on?this.options.on:{};const n={on:Object.assign(Object.assign({},s),i)};return Object.assign(Object.assign(Object.assign({},t),n),this.options)}componentDidLoad(){if(typeof window!=="undefined"&&window.MutationObserver){const t=this.mutationO=new MutationObserver((t=>{if(t[0].addedNodes[0]&&t[0].addedNodes[0].nodeName.toLowerCase()==="nano-slide"&&this.flickityReady){this.update()}}));t.observe(this.host,{childList:true,subtree:true})}}componentWillLoad(){this.nanoSlidesDidLoad.emit();if(!this.didInit){this.didInit=true;this.initflickity()}}disconnectedCallback(){if(this.mutationO){this.mutationO.disconnect();this.mutationO=undefined}if(this.resizeO)this.resizeO.disconnect();this.destroyflickity()}render(){return s(n,null,s("div",{class:{slideshow:true,ready:this.ready,"not-ready":!this.ready}},s("div",{ref:t=>this.flickityEl=t,class:{"flickity-container":true,"slides-ready":this.slidesReady,"slides-not-ready":!this.slidesReady}},s("slot",null)),s("div",{class:"ui-extras"},s("slot",{name:"ui"}))))}get host(){return h(this)}static get watchers(){return{options:["optionsChanged"],navbtns:["navbtnsChanged"],pager:["pagerChanged"],fullscreenbtn:["fullscreenBtnChanged"],fullscreen:["fullscreenChanged"],animation:["animationChange"],currentSlide:["currentSlideChange"],iCurrentSlide:["internalSlideChange"],autoplay:["autoPlayChange"]}}};const at=t=>{const i=Array.from(t.querySelectorAll("nano-slide"));let s=i.filter((t=>!t.ready));if(!s.length)return Promise.resolve(i);return new Promise((n=>{const h=e=>{s=s.filter((t=>t!==e.target));if(!s.length){n(i);t.removeEventListener("nanoSlideReady",h)}};t.addEventListener("nanoSlideReady",h);t.addEventListener("nano-slide-ready",h)}))};rt.style=et;export{rt as nano_slides};
|
23
|
+
//# sourceMappingURL=p-db370094.entry.js.map
|